@sheetxl/studio-vanilla 0.4.6 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +3 -3
  2. package/browser/cjs/{CO2670BoVR60TAIO.cjs → 3nTDo2EiTknjadbt.cjs} +1 -1
  3. package/browser/cjs/6Wu3sLyx-7NM6CXS.cjs +301 -0
  4. package/browser/cjs/B11W4AIKbkJQG6ug.cjs +6 -0
  5. package/browser/cjs/{BDVO5vEdK7Wah9u6.cjs → BCnlTOmUDmizyvVV.cjs} +2 -2
  6. package/browser/cjs/{hlMzhbyi3yXzEax6.cjs → BIPxYhhi1F-y0gSm.cjs} +3 -3
  7. package/browser/cjs/{DJ3lRRtgGNfZ_GK7.cjs → BYhOQCFEzewgsKDn.cjs} +2 -2
  8. package/browser/cjs/{rf4-78JGGhtQMtw3.cjs → BqLDj2GlSzX8ZN3l.cjs} +1 -1
  9. package/browser/cjs/{ClnAKZeWBp1OEjmi.cjs → C2B3wbeahcHlbOBZ.cjs} +2 -2
  10. package/browser/cjs/C6nZKAevPqj8zJY-.cjs +6 -0
  11. package/browser/cjs/{BC1EuCQ2stuFE3uE.cjs → CD_HItzF2RneMAER.cjs} +2 -2
  12. package/browser/cjs/{Cg56Q7yFUDqoNyPz.cjs → CE5NVYltiso41NzK.cjs} +1 -1
  13. package/browser/cjs/{BEJCfS2GnnCHB_Mm.cjs → CHSE1pa8SMApg4BM.cjs} +2 -2
  14. package/browser/cjs/{D_BIUeiHuQDwD6QN.cjs → CTXKzcsm-W1ujL_U.cjs} +6 -6
  15. package/browser/cjs/{mzGAr1pI91e1sd2y.cjs → CcQjGGiCx6Qz7yJ4.cjs} +1 -1
  16. package/browser/cjs/{Ckn4M7Qh3E3gxz2w.cjs → Cqymi9AOXO_JYvY4.cjs} +2 -2
  17. package/browser/cjs/{CcvjqZjjmoPDS0vK.cjs → D6pPBbRPLTNFSXuO.cjs} +1 -1
  18. package/browser/cjs/DMUSzq5n2k0WNFw6.cjs +12 -0
  19. package/browser/cjs/DWTMnPR33rKK87Xt.cjs +12 -0
  20. package/browser/cjs/{VWWxZ8TRgMDlwBgU.cjs → Dds58NEqJ0OalWH3.cjs} +4 -4
  21. package/browser/cjs/{D52XNI-phrNzLrWS.cjs → Dy4SB47It0LGbh2I.cjs} +1 -1
  22. package/browser/cjs/{DAoqhWARDCCMxYfu.cjs → VJLb1uMfbKAUW1QF.cjs} +8 -8
  23. package/browser/cjs/{CRbLTUE75pKqxTAE.cjs → bHWvGntvmuk8t7sX.cjs} +2 -2
  24. package/browser/cjs/{CyL3JLfSqByl6NJK.cjs → euAV1pPrNOIb6DV4.cjs} +2 -2
  25. package/browser/cjs/{B0L2HuliuW9aTvJM.cjs → i0D2haODisHW8uGg.cjs} +1 -1
  26. package/browser/cjs/index.cjs +2 -2
  27. package/browser/cjs/{Ch1N2RfTkexbaLQZ.cjs → oNi7wirDlZ81Lm0Z.cjs} +1 -1
  28. package/browser/cjs/z1aNSOtWsEE21p2H.cjs +6 -0
  29. package/browser/esm/{DpJ6rBC_S3qKpTTz.mjs → 2RGq163l1wYJKGsa.mjs} +10887 -10878
  30. package/{cdn/assets/D7VphVLqKl6argvu.js → browser/esm/4C7Rg83L5RYFoOvl.mjs} +5 -5
  31. package/browser/esm/{BEb33qzyvFCELL-3.mjs → 6KgR81NK4yzANTBT.mjs} +8 -8
  32. package/{cdn/assets/BWgkRW6hv3jQZREe.js → browser/esm/B1CYiJmSpyx4TD5r.mjs} +20 -20
  33. package/{cdn/assets/Mf5PGnpvo2ab2ron.js → browser/esm/B7qUiL1xPnzfOHZw.mjs} +1 -1
  34. package/{cdn/assets/AWcFdkqHbjuM31T8.js → browser/esm/BEFQcBJ71bA297Zu.mjs} +1 -1
  35. package/browser/esm/{BcNJxq2cuxPkAW4q.mjs → BEIn7yNWsHNJisB6.mjs} +3 -3
  36. package/browser/esm/{DfNICWSvz9QDZQhb.mjs → BM74iVi-iQkHbrfo.mjs} +2 -2
  37. package/browser/esm/{Cj2uX_OMjmaU3fNR.mjs → BP8kNG31HYSkk1VW.mjs} +12 -12
  38. package/browser/esm/{DmlVS3gIBTC4kUV7.mjs → CA_DRvBOFOlhezCt.mjs} +8 -8
  39. package/browser/esm/{D0GrOZjFUR2HlnMz.mjs → CDkmbShJijwq4EBo.mjs} +6 -6
  40. package/browser/esm/{DzTywDe5V3E28PWl.mjs → CPi83FXApMlTaVbs.mjs} +1 -1
  41. package/browser/esm/{CyTYBSnJvDp00EQS.mjs → C_hRuPoaT857EnC1.mjs} +5 -5
  42. package/browser/esm/{nPC0QB7Y32vNdKJ6.mjs → CjVsKZEPAncg5mIk.mjs} +1 -1
  43. package/browser/esm/{Ka_EOSR_2pEe_9bW.mjs → Ckz080o58XOgRhqj.mjs} +2 -2
  44. package/browser/esm/{BefI9PT_BgRNGb7_.mjs → ClXspoNrNV-A8BaL.mjs} +2 -2
  45. package/browser/esm/{bnNlX3wyLfzCzkPl.mjs → DQ0Li3WfKbZxSFuB.mjs} +2 -2
  46. package/browser/esm/{yULhUqAUufR5kUwn.mjs → DXyJaUwHLq39-Jfa.mjs} +5 -5
  47. package/{cdn/assets/C_kr_6FpZ17pfLXi.js → browser/esm/D_FC0zteMRPriWTD.mjs} +1 -1
  48. package/browser/esm/{B10LhnZcMt1ayTsN.mjs → DnWiOUNTPvi_llPT.mjs} +1 -1
  49. package/browser/esm/{DB6PulwZ7VZjKPA8.mjs → DyUvHYGMNA9W2zL6.mjs} +1 -1
  50. package/browser/esm/{anzhTAYYl_AYExOH.mjs → EUFvcP5R4HFDLn2V.mjs} +5 -5
  51. package/browser/esm/cSe92c0HnvbRwiVM.mjs +944 -0
  52. package/{cdn/assets/DtxnQukkOL0CjEuQ.js → browser/esm/eXQ_1uhRMyN-hfDZ.mjs} +1 -1
  53. package/browser/esm/{Cy4td5Lr__p7Rygx.mjs → h4NbNvV8KCL9Tl1v.mjs} +16 -16
  54. package/browser/esm/index.mjs +2 -2
  55. package/browser/esm/xlL3Ai-ka9qMVeua.mjs +84 -0
  56. package/cdn/assets/{mJrwxSI9ER8tcfM5.js → B2hDWpWSEoChxhVY.js} +11896 -11887
  57. package/{browser/esm/Mf5PGnpvo2ab2ron.mjs → cdn/assets/B7qUiL1xPnzfOHZw.js} +1 -1
  58. package/{browser/esm/AWcFdkqHbjuM31T8.mjs → cdn/assets/BEFQcBJ71bA297Zu.js} +1 -1
  59. package/cdn/assets/{jzOOsUtK1t6fHp7l.js → BXBP2rNGQxrgUPvU.js} +5 -5
  60. package/cdn/assets/{yNhs_10ijt0MpP-T.js → BgChN-ZVYUOMDX9_.js} +12 -12
  61. package/cdn/assets/{DYHqPNPZiXqt-4Ux.js → Bvy1txLm7c3LbPL7.js} +6 -6
  62. package/cdn/assets/{zdC5k0nNqnRyMFF0.js → C1x5-f1q8NeSwRA2.js} +16 -16
  63. package/{browser/esm/Bhv6QhNtkfdin_7u.mjs → cdn/assets/C5NMOq74C3Sme49x.js} +20 -20
  64. package/cdn/assets/{D6ibgkGY0zdJZVdP.js → CLA1BGtRbWm0K0U0.js} +2 -2
  65. package/cdn/assets/{DzTywDe5V3E28PWl.js → CPi83FXApMlTaVbs.js} +1 -1
  66. package/cdn/assets/{nPC0QB7Y32vNdKJ6.js → CjVsKZEPAncg5mIk.js} +1 -1
  67. package/cdn/assets/{Bg1gxl7R7pEDQJ_e.js → CpVan9KpuEGXgwIK.js} +2 -2
  68. package/cdn/assets/{BH2PfED5elf6o2V9.js → CtDntnnwJW1rZ3sM.js} +5 -5
  69. package/cdn/assets/{A8kiDhrng-S3d7bC.js → CuG5WoZ4OOj9RCsv.js} +3 -3
  70. package/{browser/esm/ar5lDYhxFfJDlI4q.mjs → cdn/assets/DTvvMKZZfsVRhbow.js} +5 -5
  71. package/{browser/esm/C_kr_6FpZ17pfLXi.mjs → cdn/assets/D_FC0zteMRPriWTD.js} +1 -1
  72. package/cdn/assets/{BSywdRZwPRE8kvep.js → Dbd0AFDlzQDW0tOg.js} +5 -5
  73. package/cdn/assets/{B10LhnZcMt1ayTsN.js → DnWiOUNTPvi_llPT.js} +1 -1
  74. package/cdn/assets/{DOZC168cRHRH_MNy.js → DppHXtCDGzttFdS4.js} +2 -2
  75. package/cdn/assets/{BiXCdxCfyppsYKdi.js → DuU1-7vd87A1wfGJ.js} +2 -2
  76. package/cdn/assets/{DB6PulwZ7VZjKPA8.js → DyUvHYGMNA9W2zL6.js} +1 -1
  77. package/cdn/assets/{CGRxpUrPJQySyydG.js → O1XID2whLDb1cTWS.js} +8 -8
  78. package/{browser/esm/DtxnQukkOL0CjEuQ.mjs → cdn/assets/eXQ_1uhRMyN-hfDZ.js} +1 -1
  79. package/cdn/assets/{DgLqE4amKIfxfXZt.js → g4FhlroGKmJM7Utd.js} +8 -8
  80. package/cdn/assets/tJI1G_FjDgqWo3rJ.js +944 -0
  81. package/cdn/assets/xlL3Ai-ka9qMVeua.js +84 -0
  82. package/cdn/index.js +24 -24
  83. package/cdn/loader.js +2 -2
  84. package/package.json +3 -3
  85. package/types/index.d.ts +8 -8
  86. package/browser/cjs/C0AMVPCvA-TujT5K.cjs +0 -12
  87. package/browser/cjs/Cf2_qMNBs2gVwbh1.cjs +0 -12
  88. package/browser/cjs/CiQE7e1h2nORtvH-.cjs +0 -6
  89. package/browser/cjs/CndX6WxBX5l14erU.cjs +0 -301
  90. package/browser/cjs/D4J2MWfhcQh5QfIS.cjs +0 -6
  91. package/browser/cjs/D8mduMF3arHBud5b.cjs +0 -6
  92. package/browser/esm/C3Oq5rZbPE2to2eI.mjs +0 -940
  93. package/browser/esm/pQgC_MfgVvqv6lyK.mjs +0 -84
  94. package/cdn/assets/YtJ5y2-cVhR5MGYz.js +0 -940
  95. package/cdn/assets/pQgC_MfgVvqv6lyK.js +0 -84
@@ -0,0 +1,944 @@
1
+ import { jsx as f, jsxs as ie, Fragment as Kt } from "react/jsx-runtime";
2
+ import * as we from "react";
3
+ import L, { memo as Me, forwardRef as le, useRef as se, useMemo as te, useState as re, useEffect as G, useLayoutEffect as dt, useCallback as ne, Component as Gt, createElement as he, createContext as yn, isValidElement as Zt, useContext as wn, cloneElement as vn } from "react";
4
+ import { g as xt, e as yt, u as et, f as En, h as Cn, j as Sn, l as Dn, m as Tn, s as je, n as wt, o as vt, p as Tt, q as Mn, r as On, t as Xt, v as Ln, x as Wn, w as ae, U as Qt, D as Mt, W as pt, X as An, y as xe, z as Yt, A as Nn, B as me, V as Jt, C as Rn, E as mt, H as en, K as In, L as Pn, S as Fn, N as jn, O as Hn, Q as zn, Z as _n, _ as qn, c as Bn, $ as $n, a0 as ht, a1 as Vn, a2 as Un, a3 as Kn, a4 as Gn, a5 as Zn, a6 as Xn, J as Qn, a7 as ee, a8 as We, a9 as Ot, aa as Yn, ab as Jn, ac as eo, ad as to, ae as no, af as oo, ag as nt, ah as Ae, ai as ro, aj as ao, ak as io, al as so, am as Lt, an as Wt, ao as lo, ap as co, aq as uo, ar as po, as as Be } from "./B2hDWpWSEoChxhVY.js";
5
+ import { createPortal as mo } from "react-dom";
6
+ import { CommonUtils as ot, UndoManager as ho, Workbook as At, PartialError as fo } from "@sheetxl/sdk";
7
+ /**
8
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ function go(e) {
14
+ return xt("MuiCollapse", e);
15
+ }
16
+ yt("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
17
+ const ko = je("div", { name: "MuiCollapse", slot: "Root", overridesResolver: (e, o) => {
18
+ const { ownerState: r } = e;
19
+ return [o.root, o[r.orientation], r.state === "entered" && o.entered, r.state === "exited" && !r.in && r.collapsedSize === "0px" && o.hidden];
20
+ } })(Mn(({ theme: e }) => ({ height: 0, overflow: "hidden", transition: e.transitions.create("height"), variants: [{ props: { orientation: "horizontal" }, style: { height: "auto", width: 0, transition: e.transitions.create("width") } }, { props: { state: "entered" }, style: { height: "auto", overflow: "visible" } }, { props: { state: "entered", orientation: "horizontal" }, style: { width: "auto" } }, { props: ({ ownerState: o }) => o.state === "exited" && !o.in && o.collapsedSize === "0px", style: { visibility: "hidden" } }] }))), bo = je("div", { name: "MuiCollapse", slot: "Wrapper", overridesResolver: (e, o) => o.wrapper })({ display: "flex", width: "100%", variants: [{ props: { orientation: "horizontal" }, style: { width: "auto", height: "100%" } }] }), xo = je("div", { name: "MuiCollapse", slot: "WrapperInner", overridesResolver: (e, o) => o.wrapperInner })({ width: "100%", variants: [{ props: { orientation: "horizontal" }, style: { width: "auto", height: "100%" } }] }), ft = we.forwardRef(function(e, o) {
21
+ const r = et({ props: e, name: "MuiCollapse" }), { addEndListener: t, children: n, className: a, collapsedSize: i = "0px", component: l, easing: s, in: c, onEnter: u, onEntered: p, onEntering: k, onExit: w, onExited: b, onExiting: g, orientation: y = "vertical", style: h, timeout: d = En.standard, TransitionComponent: S = Cn, ...v } = r, A = { ...r, orientation: y, collapsedSize: i }, D = ((E) => {
22
+ const { orientation: B, classes: $ } = E;
23
+ return vt({ root: ["root", `${B}`], entered: ["entered"], hidden: ["hidden"], wrapper: ["wrapper", `${B}`], wrapperInner: ["wrapperInner", `${B}`] }, go, $);
24
+ })(A), j = Sn(), _ = Dn(), I = we.useRef(null), q = we.useRef(), K = typeof i == "number" ? `${i}px` : i, Q = y === "horizontal", de = Q ? "width" : "height", P = we.useRef(null), V = Tn(o, P), x = (E) => (B) => {
25
+ if (E) {
26
+ const $ = P.current;
27
+ B === void 0 ? E($) : E($, B);
28
+ }
29
+ }, M = () => I.current ? I.current[Q ? "clientWidth" : "clientHeight"] : 0, T = x((E, B) => {
30
+ I.current && Q && (I.current.style.position = "absolute"), E.style[de] = K, u && u(E, B);
31
+ }), F = x((E, B) => {
32
+ const $ = M();
33
+ I.current && Q && (I.current.style.position = "");
34
+ const { duration: Y, easing: pe } = Tt({ style: h, timeout: d, easing: s }, { mode: "enter" });
35
+ if (d === "auto") {
36
+ const ve = j.transitions.getAutoHeightDuration($);
37
+ E.style.transitionDuration = `${ve}ms`, q.current = ve;
38
+ } else E.style.transitionDuration = typeof Y == "string" ? Y : `${Y}ms`;
39
+ E.style[de] = `${$}px`, E.style.transitionTimingFunction = pe, k && k(E, B);
40
+ }), H = x((E, B) => {
41
+ E.style[de] = "auto", p && p(E, B);
42
+ }), z = x((E) => {
43
+ E.style[de] = `${M()}px`, w && w(E);
44
+ }), ge = x(b), N = x((E) => {
45
+ const B = M(), { duration: $, easing: Y } = Tt({ style: h, timeout: d, easing: s }, { mode: "exit" });
46
+ if (d === "auto") {
47
+ const pe = j.transitions.getAutoHeightDuration(B);
48
+ E.style.transitionDuration = `${pe}ms`, q.current = pe;
49
+ } else E.style.transitionDuration = typeof $ == "string" ? $ : `${$}ms`;
50
+ E.style[de] = K, E.style.transitionTimingFunction = Y, g && g(E);
51
+ });
52
+ return f(S, { in: c, onEnter: T, onEntered: H, onEntering: F, onExit: z, onExited: ge, onExiting: N, addEndListener: (E) => {
53
+ d === "auto" && _.start(q.current || 0, E), t && t(P.current, E);
54
+ }, nodeRef: P, timeout: d === "auto" ? null : d, ...v, children: (E, { ownerState: B, ...$ }) => f(ko, { as: l, className: wt(D.root, a, { entered: D.entered, exited: !c && K === "0px" && D.hidden }[E]), style: { [Q ? "minWidth" : "minHeight"]: K, ...h }, ref: V, ownerState: { ...A, state: E }, ...$, children: f(bo, { ownerState: { ...A, state: E }, className: D.wrapper, ref: I, children: f(xo, { ownerState: { ...A, state: E }, className: D.wrapperInner, children: n }) }) }) });
55
+ });
56
+ function yo(e) {
57
+ return xt("MuiCard", e);
58
+ }
59
+ ft && (ft.muiSupportAuto = !0), yt("MuiCard", ["root"]);
60
+ const wo = je(On, { name: "MuiCard", slot: "Root", overridesResolver: (e, o) => o.root })({ overflow: "hidden" }), vo = we.forwardRef(function(e, o) {
61
+ const r = et({ props: e, name: "MuiCard" }), { className: t, raised: n = !1, ...a } = r, i = { ...r, raised: n }, l = ((s) => {
62
+ const { classes: c } = s;
63
+ return vt({ root: ["root"] }, yo, c);
64
+ })(i);
65
+ return f(wo, { className: wt(l.root, t), elevation: n ? 8 : void 0, ref: o, ownerState: i, ...a });
66
+ });
67
+ function Eo(e) {
68
+ return xt("MuiCardActions", e);
69
+ }
70
+ yt("MuiCardActions", ["root", "spacing"]);
71
+ const Co = je("div", { name: "MuiCardActions", slot: "Root", overridesResolver: (e, o) => {
72
+ const { ownerState: r } = e;
73
+ return [o.root, !r.disableSpacing && o.spacing];
74
+ } })({ display: "flex", alignItems: "center", padding: 8, variants: [{ props: { disableSpacing: !1 }, style: { "& > :not(style) ~ :not(style)": { marginLeft: 8 } } }] }), So = we.forwardRef(function(e, o) {
75
+ const r = et({ props: e, name: "MuiCardActions" }), { disableSpacing: t = !1, className: n, ...a } = r, i = { ...r, disableSpacing: t }, l = ((s) => {
76
+ const { classes: c, disableSpacing: u } = s;
77
+ return vt({ root: ["root", !u && "spacing"] }, Eo, c);
78
+ })(i);
79
+ return f(Co, { className: wt(l.root, n), ownerState: i, ref: o, ...a });
80
+ }), gt = typeof Xt({}) == "function", Do = (e, o) => ({ WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale", boxSizing: "border-box", WebkitTextSizeAdjust: "100%", ...o && !e.vars && { colorScheme: e.palette.mode } }), To = (e) => ({ color: (e.vars || e).palette.text.primary, ...e.typography.body1, backgroundColor: (e.vars || e).palette.background.default, "@media print": { backgroundColor: (e.vars || e).palette.common.white } }), Nt = (e, o = !1) => {
81
+ const r = {};
82
+ o && e.colorSchemes && typeof e.getColorSchemeSelector == "function" && Object.entries(e.colorSchemes).forEach(([a, i]) => {
83
+ const l = e.getColorSchemeSelector(a);
84
+ l.startsWith("@") ? r[l] = { ":root": { colorScheme: i.palette?.mode } } : r[l.replace(/\s*&/, "")] = { colorScheme: i.palette?.mode };
85
+ });
86
+ let t = { html: Do(e, o), "*, *::before, *::after": { boxSizing: "inherit" }, "strong, b": { fontWeight: e.typography.fontWeightBold }, body: { margin: 0, ...To(e), "&::backdrop": { backgroundColor: (e.vars || e).palette.background.default } }, ...r };
87
+ const n = e.components?.MuiCssBaseline?.styleOverrides;
88
+ return n && (t = [t, n]), t;
89
+ }, Qe = "mui-ecs", Mo = Xt(gt ? ({ theme: e, enableColorScheme: o }) => Nt(e, o) : ({ theme: e }) => ((o) => {
90
+ const r = Nt(o, !1), t = Array.isArray(r) ? r[0] : r;
91
+ return !o.vars && t && (t.html[`:root:has(${Qe})`] = { colorScheme: o.palette.mode }), o.colorSchemes && Object.entries(o.colorSchemes).forEach(([n, a]) => {
92
+ const i = o.getColorSchemeSelector(n);
93
+ i.startsWith("@") ? t[i] = { [`:root:not(:has(.${Qe}))`]: { colorScheme: a.palette?.mode } } : t[i.replace(/\s*&/, "")] = { [`&:not(:has(.${Qe}))`]: { colorScheme: a.palette?.mode } };
94
+ }), r;
95
+ })(e));
96
+ function Oo(e) {
97
+ const o = et({ props: e, name: "MuiCssBaseline" }), { children: r, enableColorScheme: t = !1 } = o;
98
+ return ie(we.Fragment, { children: [gt && f(Mo, { enableColorScheme: t }), !gt && !t && f("span", { className: Qe, style: { display: "none" } }), r] });
99
+ }
100
+ const Lo = Ln(f("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z" }), "CancelOutlined"), Wo = yn(null), rt = { didCatch: !1, error: null };
101
+ class Ao extends Gt {
102
+ constructor(o) {
103
+ super(o), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = rt;
104
+ }
105
+ static getDerivedStateFromError(o) {
106
+ return { didCatch: !0, error: o };
107
+ }
108
+ resetErrorBoundary() {
109
+ const { error: o } = this.state;
110
+ if (o !== null) {
111
+ for (var r, t, n = arguments.length, a = new Array(n), i = 0; i < n; i++) a[i] = arguments[i];
112
+ (r = (t = this.props).onReset) === null || r === void 0 || r.call(t, { args: a, reason: "imperative-api" }), this.setState(rt);
113
+ }
114
+ }
115
+ componentDidCatch(o, r) {
116
+ var t, n;
117
+ (t = (n = this.props).onError) === null || t === void 0 || t.call(n, o, r);
118
+ }
119
+ componentDidUpdate(o, r) {
120
+ const { didCatch: t } = this.state, { resetKeys: n } = this.props;
121
+ var a, i;
122
+ t && r.error !== null && function() {
123
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
124
+ return l.length !== s.length || l.some((c, u) => !Object.is(c, s[u]));
125
+ }(o.resetKeys, n) && ((a = (i = this.props).onReset) === null || a === void 0 || a.call(i, { next: n, prev: o.resetKeys, reason: "keys" }), this.setState(rt));
126
+ }
127
+ render() {
128
+ const { children: o, fallbackRender: r, FallbackComponent: t, fallback: n } = this.props, { didCatch: a, error: i } = this.state;
129
+ let l = o;
130
+ if (a) {
131
+ const s = { error: i, resetErrorBoundary: this.resetErrorBoundary };
132
+ if (typeof r == "function") l = r(s);
133
+ else if (t) l = he(t, s);
134
+ else {
135
+ if (n === void 0) throw i;
136
+ l = n;
137
+ }
138
+ }
139
+ return he(Wo.Provider, { value: { didCatch: a, error: i, resetErrorBoundary: this.resetErrorBoundary } }, l);
140
+ }
141
+ }
142
+ function tn(e) {
143
+ var o, r, t = "";
144
+ if (typeof e == "string" || typeof e == "number") t += e;
145
+ else if (typeof e == "object") if (Array.isArray(e)) for (o = 0; o < e.length; o++) e[o] && (r = tn(e[o])) && (t && (t += " "), t += r);
146
+ else for (o in e) e[o] && (t && (t += " "), t += o);
147
+ return t;
148
+ }
149
+ function fe() {
150
+ for (var e, o, r = 0, t = ""; r < arguments.length; ) (e = arguments[r++]) && (o = tn(e)) && (t && (t += " "), t += o);
151
+ return t;
152
+ }
153
+ let No = { data: "" }, Ro = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, Io = /\/\*[^]*?\*\/| +/g, Rt = /\n+/g, ye = (e, o) => {
154
+ let r = "", t = "", n = "";
155
+ for (let a in e) {
156
+ let i = e[a];
157
+ a[0] == "@" ? a[1] == "i" ? r = a + " " + i + ";" : t += a[1] == "f" ? ye(i, a) : a + "{" + ye(i, a[1] == "k" ? "" : o) + "}" : typeof i == "object" ? t += ye(i, o ? o.replace(/([^,])+/g, (l) => a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (s) => /&/.test(s) ? s.replace(/&/g, l) : l ? l + " " + s : s)) : a) : i != null && (a = /^--/.test(a) ? a : a.replace(/[A-Z]/g, "-$&").toLowerCase(), n += ye.p ? ye.p(a, i) : a + ":" + i + ";");
158
+ }
159
+ return r + (o && n ? o + "{" + n + "}" : n) + t;
160
+ }, ce = {}, nn = (e) => {
161
+ if (typeof e == "object") {
162
+ let o = "";
163
+ for (let r in e) o += r + nn(e[r]);
164
+ return o;
165
+ }
166
+ return e;
167
+ };
168
+ function kt(e) {
169
+ let o = this || {}, r = e.call ? e(o.p) : e;
170
+ return ((i, l, s, c, u) => {
171
+ let p = nn(i), k = ce[p] || (ce[p] = ((d) => {
172
+ let S = 0, v = 11;
173
+ for (; S < d.length; ) v = 101 * v + d.charCodeAt(S++) >>> 0;
174
+ return "go" + v;
175
+ })(p));
176
+ if (!ce[k]) {
177
+ let d = p !== i ? i : ((S) => {
178
+ let v, A, D = [{}];
179
+ for (; v = Ro.exec(S.replace(Io, "")); ) v[4] ? D.shift() : v[3] ? (A = v[3].replace(Rt, " ").trim(), D.unshift(D[0][A] = D[0][A] || {})) : D[0][v[1]] = v[2].replace(Rt, " ").trim();
180
+ return D[0];
181
+ })(i);
182
+ ce[k] = ye(u ? { ["@keyframes " + k]: d } : d, s ? "" : "." + k);
183
+ }
184
+ let w = s && ce.g ? ce.g : null;
185
+ return s && (ce.g = ce[k]), b = ce[k], g = l, y = c, (h = w) ? g.data = g.data.replace(h, b) : g.data.indexOf(b) === -1 && (g.data = y ? b + g.data : g.data + b), k;
186
+ var b, g, y, h;
187
+ })(r.unshift ? r.raw ? (t = r, n = [].slice.call(arguments, 1), a = o.p, t.reduce((i, l, s) => {
188
+ let c = n[s];
189
+ if (c && c.call) {
190
+ let u = c(a), p = u && u.props && u.props.className || /^go/.test(u) && u;
191
+ c = p ? "." + p : u && typeof u == "object" ? u.props ? "" : ye(u, "") : u === !1 ? "" : u;
192
+ }
193
+ return i + l + (c ?? "");
194
+ }, "")) : r.reduce((i, l) => Object.assign(i, l && l.call ? l(o.p) : l), {}) : r, ((i) => typeof window == "object" ? ((i ? i.querySelector("#_goober") : window._goober) || Object.assign((i || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : i || No)(o.target), o.g, o.o, o.k);
195
+ var t, n, a;
196
+ }
197
+ function on(e, o, r) {
198
+ return o && function(t, n) {
199
+ for (var a = 0; a < n.length; a++) {
200
+ var i = n[a];
201
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
202
+ }
203
+ }(e.prototype, o), e;
204
+ }
205
+ function W() {
206
+ return W = Object.assign || function(e) {
207
+ for (var o = 1; o < arguments.length; o++) {
208
+ var r = arguments[o];
209
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
210
+ }
211
+ return e;
212
+ }, W.apply(this, arguments);
213
+ }
214
+ function rn(e, o) {
215
+ e.prototype = Object.create(o.prototype), e.prototype.constructor = e, e.__proto__ = o;
216
+ }
217
+ function He(e, o) {
218
+ if (e == null) return {};
219
+ var r, t, n = {}, a = Object.keys(e);
220
+ for (t = 0; t < a.length; t++) r = a[t], o.indexOf(r) >= 0 || (n[r] = e[r]);
221
+ return n;
222
+ }
223
+ function It(e) {
224
+ if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
225
+ return e;
226
+ }
227
+ kt.bind({ g: 1 }), kt.bind({ k: 1 });
228
+ var Pt = function() {
229
+ return "";
230
+ }, an = L.createContext({ enqueueSnackbar: Pt, closeSnackbar: Pt }), at = "@media (max-width:599.95px)", Ye = "@media (min-width:600px)", Ft = function(e) {
231
+ return e.charAt(0).toUpperCase() + e.slice(1);
232
+ }, Et = function(e) {
233
+ return "" + Ft(e.vertical) + Ft(e.horizontal);
234
+ }, $e = function(e) {
235
+ return !!e || e === 0;
236
+ }, Ve = "unmounted", Ce = "exited", Se = "entering", Ne = "entered", jt = "exiting", Ct = function(e) {
237
+ function o(t) {
238
+ var n;
239
+ n = e.call(this, t) || this;
240
+ var a, i = t.appear;
241
+ return n.appearStatus = null, t.in ? i ? (a = Ce, n.appearStatus = Se) : a = Ne : a = t.unmountOnExit || t.mountOnEnter ? Ve : Ce, n.state = { status: a }, n.nextCallback = null, n;
242
+ }
243
+ rn(o, e), o.getDerivedStateFromProps = function(t, n) {
244
+ return t.in && n.status === Ve ? { status: Ce } : null;
245
+ };
246
+ var r = o.prototype;
247
+ return r.componentDidMount = function() {
248
+ this.updateStatus(!0, this.appearStatus);
249
+ }, r.componentDidUpdate = function(t) {
250
+ var n = null;
251
+ if (t !== this.props) {
252
+ var a = this.state.status;
253
+ this.props.in ? a !== Se && a !== Ne && (n = Se) : a !== Se && a !== Ne || (n = jt);
254
+ }
255
+ this.updateStatus(!1, n);
256
+ }, r.componentWillUnmount = function() {
257
+ this.cancelNextCallback();
258
+ }, r.getTimeouts = function() {
259
+ var t = this.props.timeout, n = t, a = t;
260
+ return t != null && typeof t != "number" && typeof t != "string" && (a = t.exit, n = t.enter), { exit: a, enter: n };
261
+ }, r.updateStatus = function(t, n) {
262
+ t === void 0 && (t = !1), n !== null ? (this.cancelNextCallback(), n === Se ? this.performEnter(t) : this.performExit()) : this.props.unmountOnExit && this.state.status === Ce && this.setState({ status: Ve });
263
+ }, r.performEnter = function(t) {
264
+ var n = this, a = this.props.enter, i = t, l = this.getTimeouts();
265
+ t || a ? (this.props.onEnter && this.props.onEnter(this.node, i), this.safeSetState({ status: Se }, function() {
266
+ n.props.onEntering && n.props.onEntering(n.node, i), n.onTransitionEnd(l.enter, function() {
267
+ n.safeSetState({ status: Ne }, function() {
268
+ n.props.onEntered && n.props.onEntered(n.node, i);
269
+ });
270
+ });
271
+ })) : this.safeSetState({ status: Ne }, function() {
272
+ n.props.onEntered && n.props.onEntered(n.node, i);
273
+ });
274
+ }, r.performExit = function() {
275
+ var t = this, n = this.props.exit, a = this.getTimeouts();
276
+ n ? (this.props.onExit && this.props.onExit(this.node), this.safeSetState({ status: jt }, function() {
277
+ t.props.onExiting && t.props.onExiting(t.node), t.onTransitionEnd(a.exit, function() {
278
+ t.safeSetState({ status: Ce }, function() {
279
+ t.props.onExited && t.props.onExited(t.node);
280
+ });
281
+ });
282
+ })) : this.safeSetState({ status: Ce }, function() {
283
+ t.props.onExited && t.props.onExited(t.node);
284
+ });
285
+ }, r.cancelNextCallback = function() {
286
+ this.nextCallback !== null && this.nextCallback.cancel && (this.nextCallback.cancel(), this.nextCallback = null);
287
+ }, r.safeSetState = function(t, n) {
288
+ n = this.setNextCallback(n), this.setState(t, n);
289
+ }, r.setNextCallback = function(t) {
290
+ var n = this, a = !0;
291
+ return this.nextCallback = function() {
292
+ a && (a = !1, n.nextCallback = null, t());
293
+ }, this.nextCallback.cancel = function() {
294
+ a = !1;
295
+ }, this.nextCallback;
296
+ }, r.onTransitionEnd = function(t, n) {
297
+ this.setNextCallback(n);
298
+ var a = t == null && !this.props.addEndListener;
299
+ this.node && !a ? (this.props.addEndListener && this.props.addEndListener(this.node, this.nextCallback), t != null && setTimeout(this.nextCallback, t)) : setTimeout(this.nextCallback, 0);
300
+ }, r.render = function() {
301
+ var t = this.state.status;
302
+ if (t === Ve) return null;
303
+ var n = this.props;
304
+ return (0, n.children)(t, He(n, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
305
+ }, on(o, [{ key: "node", get: function() {
306
+ var t, n = (t = this.props.nodeRef) === null || t === void 0 ? void 0 : t.current;
307
+ if (!n) throw new Error("notistack - Custom snackbar is not refForwarding");
308
+ return n;
309
+ } }]), o;
310
+ }(L.Component);
311
+ function De() {
312
+ }
313
+ function Ht(e, o) {
314
+ typeof e == "function" ? e(o) : e && (e.current = o);
315
+ }
316
+ function bt(e, o) {
317
+ return te(function() {
318
+ return e == null && o == null ? null : function(r) {
319
+ Ht(e, r), Ht(o, r);
320
+ };
321
+ }, [e, o]);
322
+ }
323
+ function Je(e) {
324
+ var o = e.timeout, r = e.style, t = r === void 0 ? {} : r, n = e.mode;
325
+ return { duration: typeof o == "object" ? o[n] || 0 : o, easing: t.transitionTimingFunction, delay: t.transitionDelay };
326
+ }
327
+ Ct.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: De, onEntering: De, onEntered: De, onExit: De, onExiting: De, onExited: De };
328
+ var sn = function(e) {
329
+ e.scrollTop = e.scrollTop;
330
+ }, zt = function(e) {
331
+ return Math.round(e) + "ms";
332
+ };
333
+ function Te(e, o) {
334
+ e === void 0 && (e = ["all"]);
335
+ var r = o || {}, t = r.duration, n = t === void 0 ? 300 : t, a = r.easing, i = a === void 0 ? "cubic-bezier(0.4, 0, 0.2, 1)" : a, l = r.delay, s = l === void 0 ? 0 : l;
336
+ return (Array.isArray(e) ? e : [e]).map(function(c) {
337
+ var u = typeof n == "string" ? n : zt(n), p = typeof s == "string" ? s : zt(s);
338
+ return c + " " + u + " " + i + " " + p;
339
+ }).join(",");
340
+ }
341
+ function ln(e) {
342
+ var o;
343
+ return ((o = e) && o.ownerDocument || document).defaultView || window;
344
+ }
345
+ function Ue(e, o) {
346
+ if (o) {
347
+ var r = function(t, n) {
348
+ var a, i = n.getBoundingClientRect(), l = ln(n);
349
+ if (n.fakeTransform) a = n.fakeTransform;
350
+ else {
351
+ var s = l.getComputedStyle(n);
352
+ a = s.getPropertyValue("-webkit-transform") || s.getPropertyValue("transform");
353
+ }
354
+ var c = 0, u = 0;
355
+ if (a && a !== "none" && typeof a == "string") {
356
+ var p = a.split("(")[1].split(")")[0].split(",");
357
+ c = parseInt(p[4], 10), u = parseInt(p[5], 10);
358
+ }
359
+ switch (t) {
360
+ case "left":
361
+ return "translateX(" + (l.innerWidth + c - i.left) + "px)";
362
+ case "right":
363
+ return "translateX(-" + (i.left + i.width - c) + "px)";
364
+ case "up":
365
+ return "translateY(" + (l.innerHeight + u - i.top) + "px)";
366
+ default:
367
+ return "translateY(-" + (i.top + i.height - u) + "px)";
368
+ }
369
+ }(e, o);
370
+ r && (o.style.webkitTransform = r, o.style.transform = r);
371
+ }
372
+ }
373
+ var cn = le(function(e, o) {
374
+ var r = e.children, t = e.direction, n = t === void 0 ? "down" : t, a = e.in, i = e.style, l = e.timeout, s = l === void 0 ? 0 : l, c = e.onEnter, u = e.onEntered, p = e.onExit, k = e.onExited, w = He(e, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), b = se(null), g = bt(r.ref, b), y = bt(g, o), h = ne(function() {
375
+ b.current && Ue(n, b.current);
376
+ }, [n]);
377
+ return G(function() {
378
+ if (!a && n !== "down" && n !== "right") {
379
+ var d = function(v, A) {
380
+ var D;
381
+ function j() {
382
+ for (var _ = this, I = arguments.length, q = new Array(I), K = 0; K < I; K++) q[K] = arguments[K];
383
+ clearTimeout(D), D = setTimeout(function() {
384
+ v.apply(_, q);
385
+ }, A);
386
+ }
387
+ return A === void 0 && (A = 166), j.clear = function() {
388
+ clearTimeout(D);
389
+ }, j;
390
+ }(function() {
391
+ b.current && Ue(n, b.current);
392
+ }), S = ln(b.current);
393
+ return S.addEventListener("resize", d), function() {
394
+ d.clear(), S.removeEventListener("resize", d);
395
+ };
396
+ }
397
+ }, [n, a]), G(function() {
398
+ a || h();
399
+ }, [a, h]), he(Ct, Object.assign({ appear: !0, nodeRef: b, onEnter: function(d, S) {
400
+ Ue(n, d), sn(d), c && c(d, S);
401
+ }, onEntered: u, onEntering: function(d) {
402
+ var S = Je({ timeout: s, mode: "enter", style: W({}, i, { transitionTimingFunction: i?.transitionTimingFunction || "cubic-bezier(0.0, 0, 0.2, 1)" }) });
403
+ d.style.webkitTransition = Te("-webkit-transform", S), d.style.transition = Te("transform", S), d.style.webkitTransform = "none", d.style.transform = "none";
404
+ }, onExit: function(d) {
405
+ var S = Je({ timeout: s, mode: "exit", style: W({}, i, { transitionTimingFunction: i?.transitionTimingFunction || "cubic-bezier(0.4, 0, 0.6, 1)" }) });
406
+ d.style.webkitTransition = Te("-webkit-transform", S), d.style.transition = Te("transform", S), Ue(n, d), p && p(d);
407
+ }, onExited: function(d) {
408
+ d.style.webkitTransition = "", d.style.transition = "", k && k(d);
409
+ }, in: a, timeout: s }, w), function(d, S) {
410
+ return vn(r, W({ ref: y, style: W({ visibility: d !== "exited" || a ? void 0 : "hidden" }, i, {}, r.props.style) }, S));
411
+ });
412
+ });
413
+ cn.displayName = "Slide";
414
+ var Ke = function(e) {
415
+ return L.createElement("svg", Object.assign({ viewBox: "0 0 24 24", focusable: "false", style: { fontSize: 20, marginInlineEnd: 8, userSelect: "none", width: "1em", height: "1em", display: "inline-block", fill: "currentColor", flexShrink: 0 } }, e));
416
+ }, be = { maxSnack: 3, persist: !1, hideIconVariant: !1, disableWindowBlurListener: !1, variant: "default", autoHideDuration: 5e3, iconVariant: { default: void 0, success: L.createElement(function() {
417
+ return L.createElement(Ke, null, L.createElement("path", { d: `M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
418
+ 10.59L10 14.17L17.59 6.58L19 8L10 17Z` }));
419
+ }, null), warning: L.createElement(function() {
420
+ return L.createElement(Ke, null, L.createElement("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }));
421
+ }, null), error: L.createElement(function() {
422
+ return L.createElement(Ke, null, L.createElement("path", { d: `M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
423
+ 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
424
+ 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z` }));
425
+ }, null), info: L.createElement(function() {
426
+ return L.createElement(Ke, null, L.createElement("path", { d: `M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
427
+ 0 22,12A10,10 0 0,0 12,2Z` }));
428
+ }, null) }, anchorOrigin: { vertical: "bottom", horizontal: "left" }, TransitionComponent: cn, transitionDuration: { enter: 225, exit: 195 } };
429
+ function ze(e) {
430
+ return Object.entries(e).reduce(function(o, r) {
431
+ var t, n = r[0], a = r[1];
432
+ return W({}, o, ((t = {})[n] = kt(a), t));
433
+ }, {});
434
+ }
435
+ var un = "notistack-CollapseWrapper", Po = function(e) {
436
+ return "notistack-MuiContent-" + e;
437
+ }, _t = ze({ root: { height: 0 }, entered: { height: "auto" } }), it = "0px", dn = le(function(e, o) {
438
+ var r = e.children, t = e.in, n = e.onExited, a = se(null), i = se(null), l = bt(o, i), s = function() {
439
+ return a.current ? a.current.clientHeight : 0;
440
+ };
441
+ return he(Ct, { in: t, unmountOnExit: !0, onEnter: function(c) {
442
+ c.style.height = it;
443
+ }, onEntered: function(c) {
444
+ c.style.height = "auto";
445
+ }, onEntering: function(c) {
446
+ var u = s(), p = Je({ timeout: 175, mode: "enter" }), k = p.duration, w = p.easing;
447
+ c.style.transitionDuration = typeof k == "string" ? k : k + "ms", c.style.height = u + "px", c.style.transitionTimingFunction = w || "";
448
+ }, onExit: function(c) {
449
+ c.style.height = s() + "px";
450
+ }, onExited: n, onExiting: function(c) {
451
+ sn(c);
452
+ var u = Je({ timeout: 175, mode: "exit" }), p = u.duration, k = u.easing;
453
+ c.style.transitionDuration = typeof p == "string" ? p : p + "ms", c.style.height = it, c.style.transitionTimingFunction = k || "";
454
+ }, nodeRef: i, timeout: 175 }, function(c, u) {
455
+ return he("div", Object.assign({ ref: l, className: fe(_t.root, c === "entered" && _t.entered), style: W({ pointerEvents: "all", overflow: "hidden", minHeight: it, transition: Te("height") }, c === "entered" && { overflow: "visible" }, {}, c === "exited" && !t && { visibility: "hidden" }) }, u), he("div", { ref: a, className: un, style: { display: "flex", width: "100%" } }, r));
456
+ });
457
+ });
458
+ dn.displayName = "Collapse";
459
+ var qt = { right: "left", left: "right", bottom: "up", top: "down" }, Fo = function(e) {
460
+ return "anchorOrigin" + Et(e);
461
+ }, jo = function() {
462
+ };
463
+ function Fe(e, o) {
464
+ return e.reduce(function(r, t) {
465
+ return t == null ? r : function() {
466
+ for (var n = arguments.length, a = new Array(n), i = 0; i < n; i++) a[i] = arguments[i];
467
+ var l = [].concat(a);
468
+ o && l.indexOf(o) === -1 && l.push(o), r.apply(this, l), t.apply(this, l);
469
+ };
470
+ }, jo);
471
+ }
472
+ var Ho = typeof window < "u" ? dt : G;
473
+ function Bt(e) {
474
+ var o = se(e);
475
+ return Ho(function() {
476
+ o.current = e;
477
+ }), ne(function() {
478
+ return o.current.apply(void 0, arguments);
479
+ }, []);
480
+ }
481
+ var st, pn = le(function(e, o) {
482
+ var r = e.children, t = e.className, n = e.autoHideDuration, a = e.disableWindowBlurListener, i = a !== void 0 && a, l = e.onClose, s = e.id, c = e.open, u = e.SnackbarProps, p = u === void 0 ? {} : u, k = se(), w = Bt(function() {
483
+ l && l.apply(void 0, arguments);
484
+ }), b = Bt(function(h) {
485
+ l && h != null && (k.current && clearTimeout(k.current), k.current = setTimeout(function() {
486
+ w(null, "timeout", s);
487
+ }, h));
488
+ });
489
+ G(function() {
490
+ return c && b(n), function() {
491
+ k.current && clearTimeout(k.current);
492
+ };
493
+ }, [c, n, b]);
494
+ var g = function() {
495
+ k.current && clearTimeout(k.current);
496
+ }, y = ne(function() {
497
+ n != null && b(0.5 * n);
498
+ }, [n, b]);
499
+ return G(function() {
500
+ if (!i && c) return window.addEventListener("focus", y), window.addEventListener("blur", g), function() {
501
+ window.removeEventListener("focus", y), window.removeEventListener("blur", g);
502
+ };
503
+ }, [i, y, c]), he("div", Object.assign({ ref: o }, p, { className: fe("notistack-Snackbar", t), onMouseEnter: function(h) {
504
+ p.onMouseEnter && p.onMouseEnter(h), g();
505
+ }, onMouseLeave: function(h) {
506
+ p.onMouseLeave && p.onMouseLeave(h), y();
507
+ } }), r);
508
+ });
509
+ pn.displayName = "Snackbar";
510
+ var zo = ze({ root: (st = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, st[Ye] = { flexGrow: "initial", minWidth: "288px" }, st) }), St = le(function(e, o) {
511
+ var r = e.className, t = He(e, ["className"]);
512
+ return L.createElement("div", Object.assign({ ref: o, className: fe(zo.root, r) }, t));
513
+ });
514
+ St.displayName = "SnackbarContent";
515
+ var Re = ze({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), $t = "notistack-snackbar", mn = le(function(e, o) {
516
+ var r = e.id, t = e.message, n = e.action, a = e.iconVariant, i = e.variant, l = e.hideIconVariant, s = e.style, c = e.className, u = a[i], p = n;
517
+ return typeof p == "function" && (p = p(r)), L.createElement(St, { ref: o, role: "alert", "aria-describedby": $t, style: s, className: fe("notistack-MuiContent", Po(i), Re.root, Re[i], c, !l && u && Re.lessPadding) }, L.createElement("div", { id: $t, className: Re.message }, l ? null : u, t), p && L.createElement("div", { className: Re.action }, p));
518
+ });
519
+ mn.displayName = "MaterialDesignContent";
520
+ var Ie, lt, Ge, Ze, ct, _o = Me(mn), qo = ze({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), Bo = function(e) {
521
+ var o = se(), r = re(!0), t = r[0], n = r[1], a = Fe([e.snack.onClose, e.onClose]), i = ne(function() {
522
+ o.current = setTimeout(function() {
523
+ n(function(_) {
524
+ return !_;
525
+ });
526
+ }, 125);
527
+ }, []);
528
+ G(function() {
529
+ return function() {
530
+ o.current && clearTimeout(o.current);
531
+ };
532
+ }, []);
533
+ var l, s = e.snack, c = e.classes, u = e.Component, p = u === void 0 ? _o : u, k = te(function() {
534
+ return function(_) {
535
+ _ === void 0 && (_ = {});
536
+ var I = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
537
+ return Object.keys(_).filter(function(q) {
538
+ return !I[q];
539
+ }).reduce(function(q, K) {
540
+ var Q;
541
+ return W({}, q, ((Q = {})[K] = _[K], Q));
542
+ }, {});
543
+ }(c);
544
+ }, [c]), w = s.open, b = s.SnackbarProps, g = s.TransitionComponent, y = s.TransitionProps, h = s.transitionDuration, d = s.disableWindowBlurListener, S = s.content, v = He(s, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), A = W({ direction: (l = v.anchorOrigin, l.horizontal !== "center" ? qt[l.horizontal] : qt[l.vertical]), timeout: h }, y), D = S;
545
+ typeof D == "function" && (D = D(v.id, v.message));
546
+ var j = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(_, I) {
547
+ var q;
548
+ return W({}, _, ((q = {})[I] = Fe([e.snack[I], e[I]], v.id), q));
549
+ }, {});
550
+ return L.createElement(dn, { in: t, onExited: j.onExited }, L.createElement(pn, { open: w, id: v.id, disableWindowBlurListener: d, autoHideDuration: v.autoHideDuration, className: fe(qo.wrappedRoot, k.root, k[Fo(v.anchorOrigin)]), SnackbarProps: b, onClose: a }, L.createElement(g, Object.assign({}, A, { appear: !0, in: w, onExit: j.onExit, onExited: i, onEnter: j.onEnter, onEntered: Fe([j.onEntered, function() {
551
+ e.snack.requestClose && a(null, "instructed", e.snack.id);
552
+ }], v.id) }), D || L.createElement(p, Object.assign({}, v)))));
553
+ }, Pe = 20, ut = 6, $o = 2, Vt = "." + un, Xe = ze({ root: (Ie = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: Te(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, Ie[Vt] = { padding: ut + "px 0px", transition: "padding 300ms ease 0ms" }, Ie.maxWidth = "calc(100% - " + 2 * Pe + "px)", Ie[at] = { width: "100%", maxWidth: "calc(100% - 32px)" }, Ie), rootDense: (lt = {}, lt[Vt] = { padding: $o + "px 0px" }, lt), top: { top: Pe - ut + "px", flexDirection: "column" }, bottom: { bottom: Pe - ut + "px", flexDirection: "column-reverse" }, left: (Ge = { left: Pe + "px" }, Ge[Ye] = { alignItems: "flex-start" }, Ge[at] = { left: "16px" }, Ge), right: (Ze = { right: Pe + "px" }, Ze[Ye] = { alignItems: "flex-end" }, Ze[at] = { right: "16px" }, Ze), center: (ct = { left: "50%", transform: "translateX(-50%)" }, ct[Ye] = { alignItems: "center" }, ct) }), Vo = Me(function(e) {
554
+ var o = e.classes, r = o === void 0 ? {} : o, t = e.anchorOrigin, n = e.dense, a = e.children, i = fe("notistack-SnackbarContainer", Xe[t.vertical], Xe[t.horizontal], Xe.root, r.containerRoot, r["containerAnchorOrigin" + Et(t)], n && Xe.rootDense);
555
+ return L.createElement("div", { className: i }, a);
556
+ }), Ut = function(e) {
557
+ return !(typeof e == "string" || Zt(e));
558
+ }, Uo = function(e) {
559
+ function o(r) {
560
+ var t;
561
+ return (t = e.call(this, r) || this).enqueueSnackbar = function(n, a) {
562
+ if (a === void 0 && (a = {}), n == null) throw new Error("enqueueSnackbar called with invalid argument");
563
+ var i = Ut(n) ? n : a, l = Ut(n) ? n.message : n, s = i.key, c = i.preventDuplicate, u = He(i, ["key", "preventDuplicate"]), p = $e(s), k = p ? s : (/* @__PURE__ */ new Date()).getTime() + Math.random(), w = /* @__PURE__ */ function(g, y) {
564
+ return function(h, d) {
565
+ return d === void 0 && (d = !1), d ? W({}, be[h], {}, y[h], {}, g[h]) : h === "autoHideDuration" ? (D = g.autoHideDuration, j = y.autoHideDuration, (_ = function(I) {
566
+ return typeof I == "number" || I === null;
567
+ })(D) ? D : _(j) ? j : be.autoHideDuration) : h === "transitionDuration" ? (S = g.transitionDuration, v = y.transitionDuration, (A = function(I, q) {
568
+ return q.some(function(K) {
569
+ return typeof I === K;
570
+ });
571
+ })(S, ["string", "number"]) ? S : A(S, ["object"]) ? W({}, be.transitionDuration, {}, A(v, ["object"]) && v, {}, S) : A(v, ["string", "number"]) ? v : A(v, ["object"]) ? W({}, be.transitionDuration, {}, v) : be.transitionDuration) : g[h] || y[h] || be[h];
572
+ var S, v, A, D, j, _;
573
+ };
574
+ }(u, t.props), b = W({ id: k }, u, { message: l, open: !0, entered: !1, requestClose: !1, persist: w("persist"), action: w("action"), content: w("content"), variant: w("variant"), anchorOrigin: w("anchorOrigin"), disableWindowBlurListener: w("disableWindowBlurListener"), autoHideDuration: w("autoHideDuration"), hideIconVariant: w("hideIconVariant"), TransitionComponent: w("TransitionComponent"), transitionDuration: w("transitionDuration"), TransitionProps: w("TransitionProps", !0), iconVariant: w("iconVariant", !0), style: w("style", !0), SnackbarProps: w("SnackbarProps", !0), className: fe(t.props.className, u.className) });
575
+ return b.persist && (b.autoHideDuration = void 0), t.setState(function(g) {
576
+ if (c === void 0 && t.props.preventDuplicate || c) {
577
+ var y = function(S) {
578
+ return p ? S.id === k : S.message === l;
579
+ }, h = g.queue.findIndex(y) > -1, d = g.snacks.findIndex(y) > -1;
580
+ if (h || d) return g;
581
+ }
582
+ return t.handleDisplaySnack(W({}, g, { queue: [].concat(g.queue, [b]) }));
583
+ }), k;
584
+ }, t.handleDisplaySnack = function(n) {
585
+ return n.snacks.length >= t.maxSnack ? t.handleDismissOldest(n) : t.processQueue(n);
586
+ }, t.processQueue = function(n) {
587
+ var a = n.queue, i = n.snacks;
588
+ return a.length > 0 ? W({}, n, { snacks: [].concat(i, [a[0]]), queue: a.slice(1, a.length) }) : n;
589
+ }, t.handleDismissOldest = function(n) {
590
+ if (n.snacks.some(function(s) {
591
+ return !s.open || s.requestClose;
592
+ })) return n;
593
+ var a = !1, i = !1;
594
+ n.snacks.reduce(function(s, c) {
595
+ return s + (c.open && c.persist ? 1 : 0);
596
+ }, 0) === t.maxSnack && (i = !0);
597
+ var l = n.snacks.map(function(s) {
598
+ return a || s.persist && !i ? W({}, s) : (a = !0, s.entered ? (s.onClose && s.onClose(null, "maxsnack", s.id), t.props.onClose && t.props.onClose(null, "maxsnack", s.id), W({}, s, { open: !1 })) : W({}, s, { requestClose: !0 }));
599
+ });
600
+ return W({}, n, { snacks: l });
601
+ }, t.handleEnteredSnack = function(n, a, i) {
602
+ if (!$e(i)) throw new Error("handleEnteredSnack Cannot be called with undefined key");
603
+ t.setState(function(l) {
604
+ return { snacks: l.snacks.map(function(s) {
605
+ return s.id === i ? W({}, s, { entered: !0 }) : W({}, s);
606
+ }) };
607
+ });
608
+ }, t.handleCloseSnack = function(n, a, i) {
609
+ t.props.onClose && t.props.onClose(n, a, i);
610
+ var l = i === void 0;
611
+ t.setState(function(s) {
612
+ var c = s.snacks, u = s.queue;
613
+ return { snacks: c.map(function(p) {
614
+ return l || p.id === i ? p.entered ? W({}, p, { open: !1 }) : W({}, p, { requestClose: !0 }) : W({}, p);
615
+ }), queue: u.filter(function(p) {
616
+ return p.id !== i;
617
+ }) };
618
+ });
619
+ }, t.closeSnackbar = function(n) {
620
+ var a = t.state.snacks.find(function(i) {
621
+ return i.id === n;
622
+ });
623
+ $e(n) && a && a.onClose && a.onClose(null, "instructed", n), t.handleCloseSnack(null, "instructed", n);
624
+ }, t.handleExitedSnack = function(n, a) {
625
+ if (!$e(a)) throw new Error("handleExitedSnack Cannot be called with undefined key");
626
+ t.setState(function(i) {
627
+ var l = t.processQueue(W({}, i, { snacks: i.snacks.filter(function(s) {
628
+ return s.id !== a;
629
+ }) }));
630
+ return l.queue.length === 0 ? l : t.handleDismissOldest(l);
631
+ });
632
+ }, t.enqueueSnackbar, t.closeSnackbar, t.state = { snacks: [], queue: [], contextValue: { enqueueSnackbar: t.enqueueSnackbar.bind(It(t)), closeSnackbar: t.closeSnackbar.bind(It(t)) } }, t;
633
+ }
634
+ return rn(o, e), o.prototype.render = function() {
635
+ var r = this, t = this.state.contextValue, n = this.props, a = n.domRoot, i = n.children, l = n.dense, s = l !== void 0 && l, c = n.Components, u = c === void 0 ? {} : c, p = n.classes, k = this.state.snacks.reduce(function(b, g) {
636
+ var y, h = Et(g.anchorOrigin), d = b[h] || [];
637
+ return W({}, b, ((y = {})[h] = [].concat(d, [g]), y));
638
+ }, {}), w = Object.keys(k).map(function(b) {
639
+ var g = k[b], y = g[0];
640
+ return L.createElement(Vo, { key: b, dense: s, anchorOrigin: y.anchorOrigin, classes: p }, g.map(function(h) {
641
+ return L.createElement(Bo, { key: h.id, snack: h, classes: p, Component: u[h.variant], onClose: r.handleCloseSnack, onEnter: r.props.onEnter, onExit: r.props.onExit, onExited: Fe([r.handleExitedSnack, r.props.onExited], h.id), onEntered: Fe([r.handleEnteredSnack, r.props.onEntered], h.id) });
642
+ }));
643
+ });
644
+ return L.createElement(an.Provider, { value: t }, i, a ? mo(w, a) : w);
645
+ }, on(o, [{ key: "maxSnack", get: function() {
646
+ return this.props.maxSnack || be.maxSnack;
647
+ } }]), o;
648
+ }(Gt), hn = function() {
649
+ return wn(an);
650
+ };
651
+ const ue = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, fn = le((e, o) => {
652
+ const { id: r, message: t, iconVariant: n, error: a, hideIconVariant: i, ...l } = e, { closeSnackbar: s } = hn(), c = Bn(), [u, p] = re(!1), k = ne(() => {
653
+ p((g) => !g);
654
+ }, []), w = ne(() => {
655
+ s(r);
656
+ }, [r, s]);
657
+ let b = a?.message;
658
+ return !b && Zt(t) && (b = t), b || typeof t != "string" || (b = t), b || (b = `Unknown Error: ${t}`), f(St, { ref: o, className: mt(ue.root, "error-snackbar"), children: ie(vo, { className: ue.card, style: { backgroundColor: c.palette.error.dark, border: `1px solid ${c.palette.error.dark}` }, children: [ie(So, { className: ue.actionRoot, children: [i ? null : n?.error, f($n, { variant: "body2", component: "div", className: ue.typography, style: { color: c.palette.text.primary }, children: b }), f("div", { style: { flex: "1 1 auto" } }), ie("div", { className: ue.icons, children: [a ? f(ht, { "aria-label": "Show more", size: "small", className: mt(ue.expand, { [ue.expandOpen]: u }), style: { color: c.palette.action.active }, onClick: k, children: f(Vn, {}) }) : null, f(ht, { size: "small", className: ue.expand, style: { color: c.palette.action.active }, onClick: w, children: f(Un, { fontSize: "small" }) })] })] }), a ? f(ft, { in: u, timeout: "auto", unmountOnExit: !0, children: f("div", { className: ue.stackTraceContainer, style: { backgroundColor: c.palette.error.light, borderTop: `1px solid ${c.palette.error.main}` }, children: f(Kn, { error: a, hideLineNumbers: !0 }) }) }) : null] }) });
659
+ });
660
+ fn.displayName = "ToastError";
661
+ const gn = Me(le((e, o) => {
662
+ const { commands: r, commandHook: t, scope: n = "workbook", disabled: a = !1, ...i } = e, l = ae((c) => {
663
+ const u = { variant: ro.Menuitem, parentFloat: c.floatReference, commandHook: t, scope: n, disabled: a }, p = ie(Kt, { children: [f(nt, { ...u, command: r.getCommand("newWorkbook"), icon: Ae(f(ao, {})) }), f(io, { orientation: "horizontal" }), f(nt, { ...u, command: r.getCommand("openWorkbook"), icon: Ae(f(so, {})) }), f(Lt, { ...u, commands: r, quickCommand: "saveWorkbook", icon: Ae(f(uo, {})), createPopupPanel: (k) => {
664
+ const w = { ...u, parentFloat: k.floatReference, scope: "saveWorkbook" }, b = [];
665
+ return xe.getWriteFormats().forEach((g) => {
666
+ if (g.isDefault) return;
667
+ let y = null;
668
+ g.key === "CSV" ? y = Ae(f(lo, {})) : g.key === "Excel" && (y = Ae(f(co, {})));
669
+ const h = r.getCommand(`saveWorkbookAs${g.key}`);
670
+ h ? b.push(he(nt, { ...w, key: g.key, command: h, icon: y })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${g.key}'`);
671
+ }), Wt({ ...k, children: b, onClick: () => {
672
+ k.closeFloatAll();
673
+ } });
674
+ } })] });
675
+ return Wt({ ...c, children: p, onClick: (k) => {
676
+ k.isDefaultPrevented || c.closeFloatAll();
677
+ } });
678
+ }, [a, r, t, n]), s = "File";
679
+ return f(Lt, { commands: r, disabled: a, commandHook: t, scope: n, label: s, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (c) => `calc(1.25rem + ${c.spacing(2)}px)` } }, ...i, createPopupPanel: l, icon: f(po, { className: "label", icon: null, label: s }) });
680
+ }));
681
+ gn.displayName = "StandaloneFileCommandButton";
682
+ const Ko = f(no, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: f(me, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: f(oo, { onClick: () => {
683
+ window?.open("https://www.sheetxl.com", "_blank");
684
+ }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), kn = Me(le((e, o) => {
685
+ const { commands: r, workbook: t, logo: n = Ko, mainElement: a, showFileMenu: i = !0, showAppearanceMenu: l = !0, ...s } = e, { reference: c } = Hn(), [u, { width: p }] = zn(), k = p < 530, w = i ? f(gn, { commands: r, commandHook: { beforeExecute() {
686
+ c?.closeAll();
687
+ }, onError(h, d, S) {
688
+ } } }) : null, b = l ? f(_n, { commands: r, commandHook: { beforeExecute() {
689
+ c?.closeAll();
690
+ }, onError(h, d, S) {
691
+ } } }) : null, g = te(() => ({ paddingLeft: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1) }), []), y = se(null);
692
+ return f(me, { ref: en([y, u, o]), ...s, children: qn({ commands: r, renderCompact: k, workbook: t, selectWrapper: (h) => ie(me, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (d) => d.spacing(1), paddingLeft: (d) => d.spacing(1), paddingRight: (d) => d.spacing(1) }, children: [ie(me, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (d) => d.spacing(0.5) }, children: [n, ie(me, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (d) => d.spacing(0.25) }, children: [w, h] })] }), f(me, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: a }), f(me, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: k && !b ? "0 0 auto" : "1 1 100%" }, children: b })] }), selectProps: g, toolbarsProps: { Home: { sx: {} } } }) });
693
+ }));
694
+ kn.displayName = "StudioToolbar";
695
+ const bn = Me(le((e, o) => {
696
+ const { workbook: r, setWorkbook: t, refWorkbookTitle: n, titleWorkbook: a, setWorkbookTitle: i, titlePlaceHolder: l, children: s, undoManager: c, commands: u, importExportDisabled: p, themeOptions: k } = e, w = hn(), b = w ? w.enqueueSnackbar : () => {
697
+ }, g = w ? w.closeSnackbar : () => {
698
+ }, [y, h] = re({ isMounted: !1, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), d = ne(() => {
699
+ h((V) => ({ ...V, isMounted: !0 }));
700
+ }, []), S = ne(() => {
701
+ h((V) => ({ ...V, isMounted: !1 }));
702
+ }, []), v = Gn(), A = Zn(), D = Xn(), j = se(/* @__PURE__ */ new Set()), _ = te(() => {
703
+ const V = (x, M) => {
704
+ if (M?.onceKey) {
705
+ if (j.current.has(M.onceKey)) return;
706
+ const F = new Set(j.current);
707
+ F.add(M.onceKey), j.current = F;
708
+ }
709
+ const T = { variant: M?.type ?? Be.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: M?.preventDuplicate, persist: M?.persist ?? M?.type === Be.Error, action: (F) => f(ht, { onClick: () => g(F), children: f(Lo, {}) }) };
710
+ M?.enqueueProps && Object.assign(T, M.enqueueProps), x || console.log("message is 'null'", M), b(x ?? "Alert", T);
711
+ };
712
+ return { showMessage: V, showBusy: (x, M) => {
713
+ let T = null;
714
+ const F = new Promise((H) => {
715
+ T = H;
716
+ });
717
+ return h((H) => {
718
+ const z = new Map(H.starting);
719
+ return z.set(F, T), { ...H, label: x, starting: z };
720
+ }), F;
721
+ }, showWindow: (x, M, T) => {
722
+ const F = { ...M, onKeyDown: (H) => {
723
+ u?.dispatchToFocusedCommand(H), H.isDefaultPrevented() || H.isPropagationStopped() || M?.onKeyDown?.(H);
724
+ } };
725
+ return v(x, { sort: () => import("./CtDntnnwJW1rZ3sM.js"), numberFormat: () => import("./DppHXtCDGzttFdS4.js"), hyperlink: () => import("./Dbd0AFDlzQDW0tOg.js"), comments: () => import("./g4FhlroGKmJM7Utd.js"), find: () => import("./C5NMOq74C3Sme49x.js"), tableDetails: () => import("./DTvvMKZZfsVRhbow.js"), tableNew: () => import("./O1XID2whLDb1cTWS.js"), namedDetails: () => import("./BXBP2rNGQxrgUPvU.js") }[x], F, T);
726
+ }, showOptions: A, showInputOptions: D, showError: (x) => {
727
+ let M, T = Be.Error, F = "Unknown Error";
728
+ typeof x == "string" ? F = x : x instanceof Error && (M = x, x.message && (F = x.message)), x instanceof fo && (T = Be.Info), V(F, { type: T, enqueueProps: { error: M } });
729
+ } };
730
+ }, []), I = ne(() => {
731
+ }, []), q = ((V) => {
732
+ const { workbook: x, setWorkbook: M, importExportDisabled: T, workbookTitle: F = "export", setWorkbookTitle: H, notifier: z, requestWorkbookTitle: ge, themeOptions: N, undoManager: E, commands: B, onExecute: $ } = V, Y = ae(N?.onModeChange, [N?.onModeChange]), pe = ae(N?.onEnabledDarkGridChange, [N?.onEnabledDarkGridChange]), ve = ae(N?.onEnabledDarkImagesChange, [N?.onEnabledDarkImagesChange]), Ee = ae(async (R = null, oe = null) => {
733
+ const O = [];
734
+ let m, C = null, X = null;
735
+ if (typeof R == "string" ? X = R : C = R, m = C ? R : await Qn.openFileDialog(X ?? xe.getAllReadFormatTypeAsString().join(",")), !m) return null;
736
+ const J = { source: m, createWorkbookOptions: oe, onWarning: (tt) => {
737
+ O.push(tt);
738
+ } }, Le = await xe.read(J, z);
739
+ return O.length > 0 && (z?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn(`Import warnings:
740
+ ` + O.join(`
741
+ `))), Le;
742
+ }, [$, z, x]), _e = ae(async (R, oe, O) => {
743
+ if (!oe && ge) {
744
+ const m = await ge("Enter Workbook name to " + (O.isDefault ? "Save." : `Export as ${O.description}.`));
745
+ return m !== null && xe.writeFile(m, R, { formatType: O.key });
746
+ }
747
+ return xe.writeFile(oe, R, { formatType: O.key });
748
+ }, [z, x, ge]), U = ne(() => ({ contains: (R) => !0, focus() {
749
+ } }), []), ke = te(() => {
750
+ const R = [];
751
+ T || (xe.getWriteFormats().forEach((O) => {
752
+ const m = O.isDefault, C = { label: m ? "Save Workbook" : `Save Workbook as ${O.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${O.description}` }, tags: O.tags, description: `Save the workbook to the desktop${m ? "" : ` as ${O.description}`}.` };
753
+ m && (C.shortcut = { key: "S", modifiers: [We.Ctrl] }, R.push(new ee("saveWorkbookAs", U, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [We.Shift, We.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
754
+ _e(x, null, O).catch((J) => {
755
+ z?.showError?.(J);
756
+ });
757
+ })));
758
+ const X = m ? "saveWorkbook" : `saveWorkbookAs${O.key}`;
759
+ R.push(new ee(X, U, C, (J) => {
760
+ _e(x, J ?? F, O).catch((Le) => {
761
+ z?.showError?.(Le);
762
+ });
763
+ }));
764
+ }), R.push(new ee("openWorkbook", U, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [We.Ctrl] } }, async (O = null) => {
765
+ const m = { date1904: x.isDate1904(), ...x.options };
766
+ try {
767
+ const C = await Ee(O, m);
768
+ if (!C) return;
769
+ const X = C.title, J = C.workbook, Le = J.getSelectedSheet();
770
+ if (C.formatType.mimeType === "text/csv") {
771
+ const tt = x.findValidSheetName(X);
772
+ await x.doBatch(async () => {
773
+ const Dt = Le.getUsedRange();
774
+ Dt ? await x.getSheets().add({ name: tt, autoSelect: !0 }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }).copyFrom(Dt) : z?.showMessage("The file appears to be blank.");
775
+ }, `Import CSV '${X}'`);
776
+ } else x?.close(), H?.(X), M(J);
777
+ } catch (C) {
778
+ z?.showError?.(C);
779
+ }
780
+ })), R.push(new ee("openWorkbookFromUrl", U, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(O) {
781
+ if (!O) {
782
+ const m = await z?.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"] });
783
+ if (m.option !== "Open") return;
784
+ O = m.input;
785
+ }
786
+ O && console.log("openWorkbookFromUrl", O);
787
+ })));
788
+ let oe = [];
789
+ return N && (oe = [new ee("themeMode", U, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new ee("defaultThemeMode", U, { 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 ee("enableDarkGrid", U, { 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 ee("enableDarkImages", U, { 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." })]), [...R, ...oe, new Ot("help", U, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
790
+ }), new Ot("showKeyboardShortcuts", U, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [We.Ctrl] } }, () => {
791
+ }), new ee("gotoUrlGithub", U, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
792
+ window?.open("https://github.com/sheetxl/sheetxl");
793
+ }), new ee("gotoUrlDiscord", U, { label: "Discord", description: "Join our community on discord." }, () => {
794
+ window?.open("https://discord.gg/NTKdwUgK9p");
795
+ }), new ee("gotoUrlDocumentation", U, { label: "Documentation", description: "Read the documentation." }, () => {
796
+ window?.open("https://www.sheetxl.com/docs");
797
+ }), new ee("gotoUrlIssue", U, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
798
+ window?.open("https://github.com/sheetxl/sheetxl/issues");
799
+ })];
800
+ }, [x, F, z, T, N, B, E]), Z = te(() => {
801
+ let R = null;
802
+ return R = B ? B.createChildGroup(U, "standaloneWorkbook", !1) : new Yt(U, "standaloneWorkbook"), R.addCommands(ke, !0), R;
803
+ }, [B, ke]);
804
+ Yn({ manager: E, commands: Z, notifier: z });
805
+ const { themeMode: Oe } = Qt();
806
+ G(() => {
807
+ if (!N || !Z) return;
808
+ const R = N.mode === "dark" || !N.mode && Oe === "dark";
809
+ Z.getCommand("themeMode").update({ state: N.mode ?? null, label: R ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: R ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
810
+ Y(R ? pt.Light : pt.Dark);
811
+ }), Z.getCommand("defaultThemeMode").update({ state: !N.mode }).updateCallback(() => {
812
+ Y(null);
813
+ }), Z.getCommand("enableDarkGrid").update({ state: N.enableDarkGrid }).updateCallback(() => {
814
+ pe(!N.enableDarkGrid);
815
+ }), Z.getCommand("enableDarkImages").update({ state: N.enableDarkImages }).updateCallback(() => {
816
+ ve(!N.enableDarkImages);
817
+ });
818
+ }, [Oe, N, ke]);
819
+ const { showModal: qe } = Jn();
820
+ return G(() => {
821
+ const R = () => new Promise((oe, O) => {
822
+ const m = L.lazy(() => import("./BgChN-ZVYUOMDX9_.js")), C = qe(m, { title: "Shortcut Keys Reference", commands: Z, onDone: () => {
823
+ C.hide();
824
+ }, TransitionProps: { onExited: () => {
825
+ oe(!0);
826
+ } } });
827
+ });
828
+ Z.getCommand("showKeyboardShortcuts").updateCallback(() => R()), Z.getCommand("help").updateCallback(() => R());
829
+ }, [ke, Z]), Z;
830
+ })({ workbook: r, setWorkbook: t, importExportDisabled: p, workbookTitle: a, setWorkbookTitle: i, commands: u, requestWorkbookTitle: (V) => new Promise((x) => {
831
+ n.current ? n.current.requestWorkbookTitle((M, T) => {
832
+ x(M);
833
+ }, { selectAll: !0, requestReason: V }) : x(l);
834
+ }), themeOptions: k, undoManager: c, notifier: _, onExecute: I });
835
+ G(() => {
836
+ y.starting.size <= 0 || !y.isMounted || h((V) => {
837
+ const x = new Map(V.running);
838
+ return V.starting.forEach((M, T) => {
839
+ const F = () => {
840
+ h((H) => {
841
+ const z = new Map(H.running);
842
+ return z.delete(T), { ...H, running: z };
843
+ });
844
+ };
845
+ x.set(T, F), M(F);
846
+ }), { ...V, starting: /* @__PURE__ */ new Map(), running: x };
847
+ });
848
+ }, [y]);
849
+ const [K, Q] = re(null);
850
+ G(() => {
851
+ y.starting.size !== 0 || y.running.size !== 0 ? Q(f(Jt, { icon: f(eo, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: y.label, onMount: d, onUnmount: S, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : Q(null);
852
+ }, [y.starting, y.running]);
853
+ const de = te(() => f(to, { commands: q, disableHover: !0, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [q]), P = { notifier: _, commands: q };
854
+ return r && (P.statusBarProps = { childrenEnd: de }), ie(Kt, { children: [K, s ? L.cloneElement(s, P) : null] });
855
+ }));
856
+ bn.displayName = "SnackbarAndCommandsWrapper";
857
+ const xn = Me(le((e, o) => {
858
+ const { className: r, sx: t, style: n, onElementLoad: a, onError: i, undoManager: l, errorPanel: s = Wn, onKeyDown: c, workbook: u, createWorkbookOptions: p, onWorkbookChange: k, logo: w, importExportDisabled: b = !1, themeOptions: g, autoFocus: y = !1, commands: h, title: d, onTitleChange: S, titleProps: v, renderLoadingPanel: A, ...D } = e, j = se(null), _ = ae(k, [k]), I = ae(S ?? v?.onTitleChange, [S ?? v?.onTitleChange]), q = v?.placeHolder ?? "Untitled", K = g?.mode, { themeMode: Q, source: de } = Qt({ mode: K }), P = te(() => ({ ...g, light: Mt(!1, ot.deepMerge(g?.theme ?? {}, g?.light ?? {})), dark: Mt(!0, ot.deepMerge(g?.theme ?? {}, g?.dark ?? {})) }), [g]), V = Q === pt.Dark, [x, M] = re(null);
859
+ G(() => {
860
+ M(l ?? new ho());
861
+ }, [l]);
862
+ const [T, F] = re(null), [H, z] = re(null), ge = An();
863
+ dt(() => {
864
+ if (!u || Object.keys(u).length === 0 && !ot.isPromiseLike(u)) {
865
+ const m = { theme: ge.getDefaultTheme(), ...p };
866
+ z(new At(m));
867
+ } else z(u);
868
+ }, [u]), dt(() => {
869
+ if (H) {
870
+ if (H instanceof At) return F({ workbook: H }), void (u !== H && _?.(H));
871
+ (async () => {
872
+ try {
873
+ let m, C = await Promise.resolve(H);
874
+ C && C.source && (C = await xe.read(C)), C.workbook ? (Y(C.title), m = C.workbook) : m = C, _?.(m), F({ workbook: m });
875
+ } catch (m) {
876
+ _?.(null), F({ error: m });
877
+ }
878
+ })();
879
+ }
880
+ }, [H]);
881
+ const [N, E] = re(null);
882
+ G(() => {
883
+ if (!x || !T) return;
884
+ x.clear();
885
+ const m = T?.workbook?.getTransactions();
886
+ return m ? m.addListener({ onCommitEnd: (C) => {
887
+ C.getDescription() ? x.addUndoOperation({ description: C.getDescription(), undo: () => (m.revert(C.getId()), N.source?.focus(), () => {
888
+ m.restore(C.getId()), N.source?.focus();
889
+ }) }) : console.warn("commit has no description", C);
890
+ } }) : void 0;
891
+ }, [x, T, N]);
892
+ const B = ae((m) => {
893
+ m ? x.setRepeatableOperation({ description: m.label(), repeat: async () => m.execute() }) : x.setRepeatableOperation(null);
894
+ }, [x]), [$, Y] = re(d ?? v?.title ?? "");
895
+ G(() => {
896
+ Y(d ?? v?.title ?? "");
897
+ }, [d ?? v?.title]), G(() => {
898
+ I?.($);
899
+ }, [$]);
900
+ const [pe, ve] = re(null), Ee = te(() => {
901
+ const m = () => ({ contains: (C) => !0, focus() {
902
+ } });
903
+ return h ? h.createChildGroup(m, "application", !1) : new Yt(m, "application");
904
+ }, [h]), _e = ae((m) => {
905
+ ve(m.source.getViewportElement()), E(m), Ee.activate("sheet"), a?.(m);
906
+ }, [Ee]);
907
+ G(() => {
908
+ N && y && N.source?.focus(typeof y == "object" ? y : void 0);
909
+ }, [N]);
910
+ const U = se(null), ke = ne((m) => {
911
+ let C = null;
912
+ return v?.hidden || (C = f(Nn, { ...v, style: { maxWidth: "100%", ...v?.style }, workbook: j.current, ref: U, title: $, placeHolder: q, onTitleChange: (X) => {
913
+ Y(X);
914
+ } })), f(kn, { ...m, logo: w, mainElement: C, showFileMenu: !b, showAppearanceMenu: !!(P?.onEnabledDarkGridChange || P?.onEnabledDarkImagesChange || P?.onModeChange) });
915
+ }, [w, $, v, P, b, Ee]);
916
+ G(() => {
917
+ const m = (C) => C.preventDefault();
918
+ return j.current?.addEventListener("wheel", m, { passive: !1 }), () => {
919
+ j.current?.removeEventListener("wheel", m);
920
+ };
921
+ }, []);
922
+ const Z = te(() => {
923
+ const m = { transparentBackground: !0 };
924
+ return f(me, { sx: t, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...n }, children: A?.(m) ?? f(Jt, { ...m }) });
925
+ }, [t, n, A]), Oe = ne(({ error: m }) => (i?.(m), f(s, { sx: t, style: n, error: m ?? "Unable to display empty workbook." })), [t, n, i]), qe = te(() => ({ ...t, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (m) => m.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [t]), R = en([j, o]), oe = te(() => {
926
+ if (!T) return Z;
927
+ if (T.error || !T.workbook) return Oe({ error: T.error });
928
+ let m = null, C = null, X = !1;
929
+ return P && (m = V ? P.dark : P.light, C = V && P.enableDarkGrid ? P.dark : P.light, X = P.enableDarkImages), f(Rn, { sx: qe, style: n, tabIndex: 0, autoFocus: !0, workbook: T.workbook, ref: R, renderToolbar: ke, onElementLoad: _e, onRepeatCommandChange: B, onKeyDown: (J) => {
930
+ c?.(J);
931
+ }, renderLoadingPanel: A, gridTheme: C, headersTheme: m, enableDarkImages: X, className: mt(r, "sheetxl-workbook"), onContextMenu: (J) => J.preventDefault(), ...D }, "WorkbookElement");
932
+ }, [T, $, x, Z, A, P, D, ke, qe]);
933
+ let O = f(Ao, { fallbackRender: Oe, children: f(Uo, { maxSnack: 3, domRoot: pe, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (m, C, X) => {
934
+ j.current?.focus();
935
+ }, Components: { error: fn }, iconVariant: { success: f(Fn, { style: { marginRight: "8px" }, children: f("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: f(Pn, { style: { marginRight: "8px" } }) }, children: f(In, { children: f(bn, { workbook: T?.workbook, setWorkbook: z, importExportDisabled: b, titlePlaceHolder: q, titleWorkbook: $, setWorkbookTitle: Y, refWorkbookTitle: U, commands: Ee, undoManager: x, themeOptions: P, children: oe }) }) }) });
936
+ return P && (O = ie(jn, { theme: V ? P.dark : P.light, children: [P.cssBaseline ? f(Oo, {}) : null, O] })), O;
937
+ }));
938
+ xn.displayName = "EagerStudio";
939
+ const Go = Object.freeze(Object.defineProperty({ __proto__: null, default: xn }, Symbol.toStringTag, { value: "Module" })), er = Object.freeze(Object.defineProperty({ __proto__: null, E: Go, c: fe }, Symbol.toStringTag, { value: "Module" }));
940
+ export {
941
+ er as A,
942
+ ft as C,
943
+ fe as h
944
+ };