@sheetxl/studio-mui 0.1.98

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 (178) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +24 -0
  3. package/build/browser/cjs/4XrhSt2xtUIXkiCt.cjs +1516 -0
  4. package/build/browser/cjs/B3EvhaQf456RMc1Q.cjs +6 -0
  5. package/build/browser/cjs/B3kl467PN2cpvrfz.cjs +12 -0
  6. package/build/browser/cjs/B5LCoenQbQmzic16.cjs +314 -0
  7. package/build/browser/cjs/BBuyHZwFlDRvHzBH.cjs +7 -0
  8. package/build/browser/cjs/BGoG_ROASNB2owBR.cjs +28 -0
  9. package/build/browser/cjs/BJ6Da8vZLjAl44pz.cjs +6 -0
  10. package/build/browser/cjs/BL_UVvG75SFsFaT3.cjs +6 -0
  11. package/build/browser/cjs/BNDoTytIOGtVh5l9.cjs +6 -0
  12. package/build/browser/cjs/BQOyVCuOdwDja_VV.cjs +42 -0
  13. package/build/browser/cjs/BRiPktKUmeJipjaa.cjs +6 -0
  14. package/build/browser/cjs/BabbNVs5iKg49rfk.cjs +6 -0
  15. package/build/browser/cjs/BcOX5vODdThWbKrR.cjs +6 -0
  16. package/build/browser/cjs/BchlMljYmXDs0Ol2.cjs +6 -0
  17. package/build/browser/cjs/BmYZvm13acvbFhOu.cjs +6 -0
  18. package/build/browser/cjs/BmbsW1n0-CkF3ITF.cjs +6 -0
  19. package/build/browser/cjs/BnCUyGP_ERKmL3ZR.cjs +6 -0
  20. package/build/browser/cjs/BtP4E1_yhMjpfbr5.cjs +6 -0
  21. package/build/browser/cjs/C3E9wmSfmgYmXfJN.cjs +205 -0
  22. package/build/browser/cjs/C3Hl78e9qfEHxJYc.cjs +6 -0
  23. package/build/browser/cjs/CEvRH8aOx3etutK_.cjs +17 -0
  24. package/build/browser/cjs/CLZSdaBnKDfb142R.cjs +6 -0
  25. package/build/browser/cjs/CN1cS39WcNrcPVqS.cjs +129 -0
  26. package/build/browser/cjs/CSH1hUnHovjo8Lb8.cjs +6 -0
  27. package/build/browser/cjs/CTNt3asYQRA-MROc.cjs +47 -0
  28. package/build/browser/cjs/C_JZEtvgcli6T7Wg.cjs +11 -0
  29. package/build/browser/cjs/CbaYZmvS8u-p_Z8Z.cjs +6 -0
  30. package/build/browser/cjs/Cc-4c3DRm96wq5rj.cjs +12 -0
  31. package/build/browser/cjs/CnY6DbatGmPyylfU.cjs +20 -0
  32. package/build/browser/cjs/CqkQGfzNax6GmZFo.cjs +6 -0
  33. package/build/browser/cjs/D2AF0a4vbNKzFxzA.cjs +21 -0
  34. package/build/browser/cjs/D4y1iYdx8sdwQ50T.cjs +6 -0
  35. package/build/browser/cjs/D5cF1EnyvnPY2IxS.cjs +150 -0
  36. package/build/browser/cjs/DA1-OPTYQTepGKEg.cjs +11 -0
  37. package/build/browser/cjs/DJDMVDpUqlEKYLjt.cjs +6 -0
  38. package/build/browser/cjs/DLXLJ8SNNjwM5C-P.cjs +6 -0
  39. package/build/browser/cjs/DV8lOsZBgyx7MTBW.cjs +6 -0
  40. package/build/browser/cjs/DZAPn_d9mpvfRzsb.cjs +6 -0
  41. package/build/browser/cjs/DaicqO_9d1hYzyB_.cjs +11 -0
  42. package/build/browser/cjs/Dfh6eMCbAjW14fdh.cjs +6 -0
  43. package/build/browser/cjs/DhI2lgDZL8GqBejN.cjs +6 -0
  44. package/build/browser/cjs/Ds6s8fpzOZsd2m1r.cjs +6 -0
  45. package/build/browser/cjs/DvIWGmDT5uBVQ5zH.cjs +16 -0
  46. package/build/browser/cjs/DvLgu20RiaayrJcW.cjs +7 -0
  47. package/build/browser/cjs/Dvhwt25gyHzxQLrp.cjs +6 -0
  48. package/build/browser/cjs/DvwApJM_CVrlpLxn.cjs +6 -0
  49. package/build/browser/cjs/DwVYzo4a05DMfta_.cjs +28 -0
  50. package/build/browser/cjs/NYdqUauA5i2q33UZ.cjs +6 -0
  51. package/build/browser/cjs/S2Xfq-KDgoT7ipPC.cjs +25 -0
  52. package/build/browser/cjs/TOZQZr9ZZ_Q-jdQZ.cjs +6 -0
  53. package/build/browser/cjs/bJuLOalXTwrshZL3.cjs +16 -0
  54. package/build/browser/cjs/eh9refYW4Gm25cmW.cjs +6 -0
  55. package/build/browser/cjs/hKqcVeb_8_4M79xj.cjs +6 -0
  56. package/build/browser/cjs/index.cjs +7 -0
  57. package/build/browser/cjs/is17hbP-kpOIBRP3.cjs +6 -0
  58. package/build/browser/cjs/pNY789kHWwRQXqse.cjs +17 -0
  59. package/build/browser/cjs/qJcc3ALtLWml32LU.cjs +18 -0
  60. package/build/browser/cjs/vWgVoELLfZ2ff1xL.cjs +6 -0
  61. package/build/browser/esm/2kwF7RVUWBY1zsgG.mjs +16 -0
  62. package/build/browser/esm/7Imk0owJj7oNHR7v.mjs +48 -0
  63. package/build/browser/esm/AuNwPf0DXe0twn35.mjs +1592 -0
  64. package/build/browser/esm/B1Kw9U_AxCk0Aq9f.mjs +59 -0
  65. package/build/browser/esm/B9l1_Tfw_tMhKCNB.mjs +437 -0
  66. package/build/browser/esm/B9winT3ff8rc4sbn.mjs +490 -0
  67. package/build/browser/esm/BEo9XX1sHmVjScSm.mjs +16 -0
  68. package/build/browser/esm/BGTcOBCyrTTlov_i.mjs +13399 -0
  69. package/build/browser/esm/BMGddfMXtKQ9AXQS.mjs +16 -0
  70. package/build/browser/esm/BQSa7N7QMGysdZdU.mjs +3932 -0
  71. package/build/browser/esm/BVEuc_3fLG2GN34k.mjs +16 -0
  72. package/build/browser/esm/BVh9YUwiSov8wcyY.mjs +1708 -0
  73. package/build/browser/esm/BZt5yM_TvoPXqdeA.mjs +3867 -0
  74. package/build/browser/esm/BfU8KdaB9wrEPWM-.mjs +16 -0
  75. package/build/browser/esm/BjUaiSvRZnas-HJW.mjs +16 -0
  76. package/build/browser/esm/BqiVaoAYJJqPrCUZ.mjs +16 -0
  77. package/build/browser/esm/BtMqJ5CRpKuAC4UQ.mjs +1486 -0
  78. package/build/browser/esm/BwvMR2cgGwFn8hAL.mjs +36 -0
  79. package/build/browser/esm/BxU3eVA-Adrnq7ZJ.mjs +1372 -0
  80. package/build/browser/esm/C00coampLNiXjWJJ.mjs +436 -0
  81. package/build/browser/esm/C6nh1rvYnAg2w2V2.mjs +838 -0
  82. package/build/browser/esm/C8gc149K34Zi2lP2.mjs +16 -0
  83. package/build/browser/esm/CGSkuCZY1EmTUNlQ.mjs +52 -0
  84. package/build/browser/esm/CKXzosgZX8Xe3l59.mjs +16 -0
  85. package/build/browser/esm/CNYANG0Z7mhGYo00.mjs +859 -0
  86. package/build/browser/esm/CV_FNw2i_aEc5nwA.mjs +16 -0
  87. package/build/browser/esm/CYSj0-zys2FKWgnb.mjs +18 -0
  88. package/build/browser/esm/CbTs5cvVaP1vPCYD.mjs +2248 -0
  89. package/build/browser/esm/CfAob8gGydmX1xQu.mjs +16 -0
  90. package/build/browser/esm/ChGigf2OPu7d44Km.mjs +16 -0
  91. package/build/browser/esm/CnzGN0S6zOfL_3SS.mjs +1358 -0
  92. package/build/browser/esm/CpyeUtXgDmrcMESB.mjs +52 -0
  93. package/build/browser/esm/CrEGjvQKhAcdw5sY.mjs +16 -0
  94. package/build/browser/esm/CtrrmHx9YbrOithw.mjs +152 -0
  95. package/build/browser/esm/CzAM0pDdZ7sjGgn9.mjs +86 -0
  96. package/build/browser/esm/D0oVDcgRUMZ9MHzu.mjs +41 -0
  97. package/build/browser/esm/D54Fpmnd9MzCzp-Z.mjs +16 -0
  98. package/build/browser/esm/D78-3ghInxscHLVq.mjs +23 -0
  99. package/build/browser/esm/DEpR6b4DMs-va6RS.mjs +43734 -0
  100. package/build/browser/esm/DEsqE49cIQZ8AqCe.mjs +398 -0
  101. package/build/browser/esm/DGe70xvBhc62ZVZz.mjs +2410 -0
  102. package/build/browser/esm/DXapJ5_yR4E8vDaK.mjs +1685 -0
  103. package/build/browser/esm/DjAZeDxBIBZsRTm3.mjs +24 -0
  104. package/build/browser/esm/DttdPwwDTcRX4uwL.mjs +44 -0
  105. package/build/browser/esm/FXcO0MVElhw9cc3v.mjs +49 -0
  106. package/build/browser/esm/GpycqJcrwTRtjEqA.mjs +16 -0
  107. package/build/browser/esm/HCE-tMxyVd0m-PgN.mjs +16 -0
  108. package/build/browser/esm/OCdyQRicV8KxUwMt.mjs +16 -0
  109. package/build/browser/esm/UukTgmLv7or2mhlB.mjs +16 -0
  110. package/build/browser/esm/_cuE13TWr3oEoKGP.mjs +34 -0
  111. package/build/browser/esm/aIlK3Ybu-1T4WHPv.mjs +640 -0
  112. package/build/browser/esm/bFSkTthAEOn7gv5x.mjs +16 -0
  113. package/build/browser/esm/bOhN6up-rdLRp82s.mjs +5588 -0
  114. package/build/browser/esm/index.mjs +85 -0
  115. package/build/browser/esm/ng3JdG4_hi9SgtHk.mjs +16 -0
  116. package/build/browser/esm/o6U2z4gZ7GE4QKZD.mjs +16 -0
  117. package/build/browser/esm/psav3cvsBQQczhPL.mjs +16 -0
  118. package/build/browser/esm/vn0iS301yg2hAbYd.mjs +51 -0
  119. package/build/licenses/dependencies.txt +1341 -0
  120. package/build/node/assets/style.css +1 -0
  121. package/build/node/esm/2kwF7RVUWBY1zsgG.mjs +16 -0
  122. package/build/node/esm/B-Xlyl81h27-bnvO.mjs +16 -0
  123. package/build/node/esm/B1_NYsn5D8x9QedP.mjs +307 -0
  124. package/build/node/esm/BCA5bxOeDA8k1Bm1.mjs +16 -0
  125. package/build/node/esm/BEo9XX1sHmVjScSm.mjs +16 -0
  126. package/build/node/esm/BIfdVpnJR1TZwCPR.mjs +1378 -0
  127. package/build/node/esm/BIqDzNJtkm-dyH0v.mjs +154 -0
  128. package/build/node/esm/BMGddfMXtKQ9AXQS.mjs +16 -0
  129. package/build/node/esm/BUOdfqhtCh8lhOhm.mjs +4000 -0
  130. package/build/node/esm/BYbE15S73xgn7S5E.mjs +88 -0
  131. package/build/node/esm/BfU8KdaB9wrEPWM-.mjs +16 -0
  132. package/build/node/esm/BkyivirgeiDKFSjk.mjs +16 -0
  133. package/build/node/esm/Bm1RqNJ-XvHpJW9z.mjs +831 -0
  134. package/build/node/esm/BqiVaoAYJJqPrCUZ.mjs +16 -0
  135. package/build/node/esm/Bx-30HInllXS7M_J.mjs +41 -0
  136. package/build/node/esm/Bx3lQBEvcqhxffT-.mjs +1726 -0
  137. package/build/node/esm/BxsKlaBFnb5wNq6R.mjs +53 -0
  138. package/build/node/esm/C4PMhNAV0KpPsKFj.mjs +24 -0
  139. package/build/node/esm/C7x3L6HtPhZjSrrZ.mjs +471 -0
  140. package/build/node/esm/C8gc149K34Zi2lP2.mjs +16 -0
  141. package/build/node/esm/CK-kn1p9NGRVM_h7.mjs +16 -0
  142. package/build/node/esm/CKR6snAwSONs7kfL.mjs +19 -0
  143. package/build/node/esm/CKXzosgZX8Xe3l59.mjs +16 -0
  144. package/build/node/esm/CLE_RHHvsDeoZ9Zd.mjs +561 -0
  145. package/build/node/esm/CMKci_5THkcJ-w9a.mjs +80 -0
  146. package/build/node/esm/CVU9bu6AnxcgkEwq.mjs +13466 -0
  147. package/build/node/esm/CfAob8gGydmX1xQu.mjs +16 -0
  148. package/build/node/esm/ChGigf2OPu7d44Km.mjs +16 -0
  149. package/build/node/esm/CkvkuPSf4R_DqArg.mjs +5648 -0
  150. package/build/node/esm/CnBMj0oJAyr9ZbjP.mjs +23 -0
  151. package/build/node/esm/CrEGjvQKhAcdw5sY.mjs +16 -0
  152. package/build/node/esm/Crx9i_8dm3OQsk_T.mjs +28 -0
  153. package/build/node/esm/CwUulbiMQH11aF4x.mjs +16 -0
  154. package/build/node/esm/D0Lh0V1tkdJPxZnI.mjs +392 -0
  155. package/build/node/esm/D54Fpmnd9MzCzp-Z.mjs +16 -0
  156. package/build/node/esm/D5bg3v_W8K9MVp0j.mjs +1711 -0
  157. package/build/node/esm/D8F08tiG98tM_voL.mjs +16 -0
  158. package/build/node/esm/DR7o1DOIK9zdiBgS.mjs +50 -0
  159. package/build/node/esm/DYEgm2kd3haV-Ml8.mjs +1246 -0
  160. package/build/node/esm/DfzhmhZ4I0Zurcqn.mjs +44 -0
  161. package/build/node/esm/Dg_ERnlsy5hwbzMA.mjs +1498 -0
  162. package/build/node/esm/Dt4cj_0sWgvt4FGj.mjs +92 -0
  163. package/build/node/esm/GpycqJcrwTRtjEqA.mjs +16 -0
  164. package/build/node/esm/LlkIFFfAjLiQ5Or6.mjs +3840 -0
  165. package/build/node/esm/OCdyQRicV8KxUwMt.mjs +16 -0
  166. package/build/node/esm/QATDL2FGAYcVnd33.mjs +49 -0
  167. package/build/node/esm/SvgA2TyqJYOzheuf.mjs +26 -0
  168. package/build/node/esm/VZ150KIUh5JVRqpk.mjs +52 -0
  169. package/build/node/esm/XRLHatWlgABiuBDS.mjs +52 -0
  170. package/build/node/esm/bFSkTthAEOn7gv5x.mjs +16 -0
  171. package/build/node/esm/index.mjs +44754 -0
  172. package/build/node/esm/lgtVRbg712G5Ba-x.mjs +60 -0
  173. package/build/node/esm/ng3JdG4_hi9SgtHk.mjs +16 -0
  174. package/build/node/esm/psav3cvsBQQczhPL.mjs +16 -0
  175. package/build/node/esm/zWnN2OzbhzCc6T7u.mjs +86 -0
  176. package/build/package.json +84 -0
  177. package/build/types/index.d.ts +1848 -0
  178. package/package.json +100 -0
@@ -0,0 +1,859 @@
1
+ import { jsx as h, jsxs as ie, Fragment as It } from "react/jsx-runtime";
2
+ import S, { Component as At, createElement as le, createContext as an, memo as Ee, forwardRef as oe, useRef as ne, useState as ee, useCallback as Z, useEffect as H, useMemo as $, useContext as sn, isValidElement as ln, cloneElement as cn, useLayoutEffect as st } from "react";
3
+ import { u as un, e as lt, h as dn, T as te, i as Je, y as Te, v as pn, S as mn, A as fn, _ as hn, j as kt, n as pe, o as gn, z as kn, t as bt, M as bn, w as xn, B as wn, E as yn, G as vn, H as jt, I as En, K as Cn, O as Sn, P as Ln, Q as K, Z as De, X as xt, R as Rt, U as Tn, $ as Ht, a0 as ct, a1 as Dn, a2 as On, a3 as Mn, a4 as Wn, a5 as qt, a6 as Fn, a7 as Pn, a8 as Re, a9 as Nn, aa as In, ab as wt, F as et, ac as An, ad as jn, ae as yt, af as Rn, ag as Hn, ah as qn, ai as Bn, aj as _n } from "./DEpR6b4DMs-va6RS.mjs";
4
+ import { createPortal as zn } from "react-dom";
5
+ import { Card as Vn, CardActions as Un, Typography as Gn, IconButton as ut, Collapse as Kn, Box as ue, SvgIcon as $n, CssBaseline as Zn } from "@mui/material";
6
+ import { ExpandMore as Xn, Close as Qn, CancelOutlined as Yn } from "@mui/icons-material";
7
+ /**
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
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
+ const Jn = an(null), tt = { didCatch: !1, error: null };
14
+ class eo extends At {
15
+ constructor(a) {
16
+ super(a), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = tt;
17
+ }
18
+ static getDerivedStateFromError(a) {
19
+ return { didCatch: !0, error: a };
20
+ }
21
+ resetErrorBoundary() {
22
+ const { error: a } = this.state;
23
+ if (a !== null) {
24
+ for (var r, e, n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
25
+ (r = (e = this.props).onReset) === null || r === void 0 || r.call(e, { args: o, reason: "imperative-api" }), this.setState(tt);
26
+ }
27
+ }
28
+ componentDidCatch(a, r) {
29
+ var e, n;
30
+ (e = (n = this.props).onError) === null || e === void 0 || e.call(n, a, r);
31
+ }
32
+ componentDidUpdate(a, r) {
33
+ const { didCatch: e } = this.state, { resetKeys: n } = this.props;
34
+ var o, i;
35
+ e && r.error !== null && function() {
36
+ let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
37
+ return c.length !== s.length || c.some((l, u) => !Object.is(l, s[u]));
38
+ }(a.resetKeys, n) && ((o = (i = this.props).onReset) === null || o === void 0 || o.call(i, { next: n, prev: a.resetKeys, reason: "keys" }), this.setState(tt));
39
+ }
40
+ render() {
41
+ const { children: a, fallbackRender: r, FallbackComponent: e, fallback: n } = this.props, { didCatch: o, error: i } = this.state;
42
+ let c = a;
43
+ if (o) {
44
+ const s = { error: i, resetErrorBoundary: this.resetErrorBoundary };
45
+ if (typeof r == "function") c = r(s);
46
+ else if (e) c = le(e, s);
47
+ else {
48
+ if (n === void 0) throw i;
49
+ c = n;
50
+ }
51
+ }
52
+ return le(Jn.Provider, { value: { didCatch: o, error: i, resetErrorBoundary: this.resetErrorBoundary } }, c);
53
+ }
54
+ }
55
+ function Bt(t) {
56
+ var a, r, e = "";
57
+ if (typeof t == "string" || typeof t == "number") e += t;
58
+ else if (typeof t == "object") if (Array.isArray(t)) for (a = 0; a < t.length; a++) t[a] && (r = Bt(t[a])) && (e && (e += " "), e += r);
59
+ else for (a in t) t[a] && (e && (e += " "), e += a);
60
+ return e;
61
+ }
62
+ function fe() {
63
+ for (var t, a, r = 0, e = ""; r < arguments.length; ) (t = arguments[r++]) && (a = Bt(t)) && (e && (e += " "), e += a);
64
+ return e;
65
+ }
66
+ let to = { data: "" }, no = (t) => typeof window == "object" ? ((t ? t.querySelector("#_goober") : window._goober) || Object.assign((t || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : t || to, oo = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, ro = /\/\*[^]*?\*\/| +/g, vt = /\n+/g, me = (t, a) => {
67
+ let r = "", e = "", n = "";
68
+ for (let o in t) {
69
+ let i = t[o];
70
+ o[0] == "@" ? o[1] == "i" ? r = o + " " + i + ";" : e += o[1] == "f" ? me(i, o) : o + "{" + me(i, o[1] == "k" ? "" : a) + "}" : typeof i == "object" ? e += me(i, a ? a.replace(/([^,])+/g, (c) => o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (s) => /&/.test(s) ? s.replace(/&/g, c) : c ? c + " " + s : s)) : o) : i != null && (o = /^--/.test(o) ? o : o.replace(/[A-Z]/g, "-$&").toLowerCase(), n += me.p ? me.p(o, i) : o + ":" + i + ";");
71
+ }
72
+ return r + (a && n ? a + "{" + n + "}" : n) + e;
73
+ }, re = {}, _t = (t) => {
74
+ if (typeof t == "object") {
75
+ let a = "";
76
+ for (let r in t) a += r + _t(t[r]);
77
+ return a;
78
+ }
79
+ return t;
80
+ }, ao = (t, a, r, e, n) => {
81
+ let o = _t(t), i = re[o] || (re[o] = ((s) => {
82
+ let l = 0, u = 11;
83
+ for (; l < s.length; ) u = 101 * u + s.charCodeAt(l++) >>> 0;
84
+ return "go" + u;
85
+ })(o));
86
+ if (!re[i]) {
87
+ let s = o !== t ? t : ((l) => {
88
+ let u, d, m = [{}];
89
+ for (; u = oo.exec(l.replace(ro, "")); ) u[4] ? m.shift() : u[3] ? (d = u[3].replace(vt, " ").trim(), m.unshift(m[0][d] = m[0][d] || {})) : m[0][u[1]] = u[2].replace(vt, " ").trim();
90
+ return m[0];
91
+ })(t);
92
+ re[i] = me(n ? { ["@keyframes " + i]: s } : s, r ? "" : "." + i);
93
+ }
94
+ let c = r && re.g ? re.g : null;
95
+ return r && (re.g = re[i]), ((s, l, u, d) => {
96
+ d ? l.data = l.data.replace(d, s) : l.data.indexOf(s) === -1 && (l.data = u ? s + l.data : l.data + s);
97
+ })(re[i], a, e, c), i;
98
+ };
99
+ function dt(t) {
100
+ let a = this || {}, r = t.call ? t(a.p) : t;
101
+ return ao(r.unshift ? r.raw ? ((e, n, o) => e.reduce((i, c, s) => {
102
+ let l = n[s];
103
+ if (l && l.call) {
104
+ let u = l(o), d = u && u.props && u.props.className || /^go/.test(u) && u;
105
+ l = d ? "." + d : u && typeof u == "object" ? u.props ? "" : me(u, "") : u === !1 ? "" : u;
106
+ }
107
+ return i + c + (l ?? "");
108
+ }, ""))(r, [].slice.call(arguments, 1), a.p) : r.reduce((e, n) => Object.assign(e, n && n.call ? n(a.p) : n), {}) : r, no(a.target), a.g, a.o, a.k);
109
+ }
110
+ function zt(t, a, r) {
111
+ return a && function(e, n) {
112
+ for (var o = 0; o < n.length; o++) {
113
+ var i = n[o];
114
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
115
+ }
116
+ }(t.prototype, a), t;
117
+ }
118
+ function L() {
119
+ return L = Object.assign || function(t) {
120
+ for (var a = 1; a < arguments.length; a++) {
121
+ var r = arguments[a];
122
+ for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && (t[e] = r[e]);
123
+ }
124
+ return t;
125
+ }, L.apply(this, arguments);
126
+ }
127
+ function Vt(t, a) {
128
+ t.prototype = Object.create(a.prototype), t.prototype.constructor = t, t.__proto__ = a;
129
+ }
130
+ function Ne(t, a) {
131
+ if (t == null) return {};
132
+ var r, e, n = {}, o = Object.keys(t);
133
+ for (e = 0; e < o.length; e++) r = o[e], a.indexOf(r) >= 0 || (n[r] = t[r]);
134
+ return n;
135
+ }
136
+ function Et(t) {
137
+ if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
138
+ return t;
139
+ }
140
+ dt.bind({ g: 1 }), dt.bind({ k: 1 });
141
+ var Ct = function() {
142
+ return "";
143
+ }, Ut = S.createContext({ enqueueSnackbar: Ct, closeSnackbar: Ct }), nt = "@media (max-width:599.95px)", Ge = "@media (min-width:600px)", St = function(t) {
144
+ return t.charAt(0).toUpperCase() + t.slice(1);
145
+ }, mt = function(t) {
146
+ return "" + St(t.vertical) + St(t.horizontal);
147
+ }, He = function(t) {
148
+ return !!t || t === 0;
149
+ }, qe = "unmounted", xe = "exited", we = "entering", Oe = "entered", Lt = "exiting", ft = function(t) {
150
+ function a(e) {
151
+ var n;
152
+ n = t.call(this, e) || this;
153
+ var o, i = e.appear;
154
+ return n.appearStatus = null, e.in ? i ? (o = xe, n.appearStatus = we) : o = Oe : o = e.unmountOnExit || e.mountOnEnter ? qe : xe, n.state = { status: o }, n.nextCallback = null, n;
155
+ }
156
+ Vt(a, t), a.getDerivedStateFromProps = function(e, n) {
157
+ return e.in && n.status === qe ? { status: xe } : null;
158
+ };
159
+ var r = a.prototype;
160
+ return r.componentDidMount = function() {
161
+ this.updateStatus(!0, this.appearStatus);
162
+ }, r.componentDidUpdate = function(e) {
163
+ var n = null;
164
+ if (e !== this.props) {
165
+ var o = this.state.status;
166
+ this.props.in ? o !== we && o !== Oe && (n = we) : o !== we && o !== Oe || (n = Lt);
167
+ }
168
+ this.updateStatus(!1, n);
169
+ }, r.componentWillUnmount = function() {
170
+ this.cancelNextCallback();
171
+ }, r.getTimeouts = function() {
172
+ var e = this.props.timeout, n = e, o = e;
173
+ return e != null && typeof e != "number" && typeof e != "string" && (o = e.exit, n = e.enter), { exit: o, enter: n };
174
+ }, r.updateStatus = function(e, n) {
175
+ e === void 0 && (e = !1), n !== null ? (this.cancelNextCallback(), n === we ? this.performEnter(e) : this.performExit()) : this.props.unmountOnExit && this.state.status === xe && this.setState({ status: qe });
176
+ }, r.performEnter = function(e) {
177
+ var n = this, o = this.props.enter, i = e, c = this.getTimeouts();
178
+ e || o ? (this.props.onEnter && this.props.onEnter(this.node, i), this.safeSetState({ status: we }, function() {
179
+ n.props.onEntering && n.props.onEntering(n.node, i), n.onTransitionEnd(c.enter, function() {
180
+ n.safeSetState({ status: Oe }, function() {
181
+ n.props.onEntered && n.props.onEntered(n.node, i);
182
+ });
183
+ });
184
+ })) : this.safeSetState({ status: Oe }, function() {
185
+ n.props.onEntered && n.props.onEntered(n.node, i);
186
+ });
187
+ }, r.performExit = function() {
188
+ var e = this, n = this.props.exit, o = this.getTimeouts();
189
+ n ? (this.props.onExit && this.props.onExit(this.node), this.safeSetState({ status: Lt }, function() {
190
+ e.props.onExiting && e.props.onExiting(e.node), e.onTransitionEnd(o.exit, function() {
191
+ e.safeSetState({ status: xe }, function() {
192
+ e.props.onExited && e.props.onExited(e.node);
193
+ });
194
+ });
195
+ })) : this.safeSetState({ status: xe }, function() {
196
+ e.props.onExited && e.props.onExited(e.node);
197
+ });
198
+ }, r.cancelNextCallback = function() {
199
+ this.nextCallback !== null && this.nextCallback.cancel && (this.nextCallback.cancel(), this.nextCallback = null);
200
+ }, r.safeSetState = function(e, n) {
201
+ n = this.setNextCallback(n), this.setState(e, n);
202
+ }, r.setNextCallback = function(e) {
203
+ var n = this, o = !0;
204
+ return this.nextCallback = function() {
205
+ o && (o = !1, n.nextCallback = null, e());
206
+ }, this.nextCallback.cancel = function() {
207
+ o = !1;
208
+ }, this.nextCallback;
209
+ }, r.onTransitionEnd = function(e, n) {
210
+ this.setNextCallback(n);
211
+ var o = e == null && !this.props.addEndListener;
212
+ this.node && !o ? (this.props.addEndListener && this.props.addEndListener(this.node, this.nextCallback), e != null && setTimeout(this.nextCallback, e)) : setTimeout(this.nextCallback, 0);
213
+ }, r.render = function() {
214
+ var e = this.state.status;
215
+ if (e === qe) return null;
216
+ var n = this.props;
217
+ return (0, n.children)(e, Ne(n, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
218
+ }, zt(a, [{ key: "node", get: function() {
219
+ var e, n = (e = this.props.nodeRef) === null || e === void 0 ? void 0 : e.current;
220
+ if (!n) throw new Error("notistack - Custom snackbar is not refForwarding");
221
+ return n;
222
+ } }]), a;
223
+ }(S.Component);
224
+ function ye() {
225
+ }
226
+ function Tt(t, a) {
227
+ typeof t == "function" ? t(a) : t && (t.current = a);
228
+ }
229
+ function pt(t, a) {
230
+ return $(function() {
231
+ return t == null && a == null ? null : function(r) {
232
+ Tt(t, r), Tt(a, r);
233
+ };
234
+ }, [t, a]);
235
+ }
236
+ function Ke(t) {
237
+ var a = t.timeout, r = t.style, e = r === void 0 ? {} : r, n = t.mode;
238
+ return { duration: typeof a == "object" ? a[n] || 0 : a, easing: e.transitionTimingFunction, delay: e.transitionDelay };
239
+ }
240
+ ft.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: ye, onEntering: ye, onEntered: ye, onExit: ye, onExiting: ye, onExited: ye };
241
+ var io = "cubic-bezier(0.4, 0, 0.2, 1)", so = "cubic-bezier(0.0, 0, 0.2, 1)", lo = "cubic-bezier(0.4, 0, 0.6, 1)", Gt = function(t) {
242
+ t.scrollTop = t.scrollTop;
243
+ }, Dt = function(t) {
244
+ return Math.round(t) + "ms";
245
+ };
246
+ function ve(t, a) {
247
+ t === void 0 && (t = ["all"]);
248
+ var r = a || {}, e = r.duration, n = e === void 0 ? 300 : e, o = r.easing, i = o === void 0 ? io : o, c = r.delay, s = c === void 0 ? 0 : c;
249
+ return (Array.isArray(t) ? t : [t]).map(function(l) {
250
+ var u = typeof n == "string" ? n : Dt(n), d = typeof s == "string" ? s : Dt(s);
251
+ return l + " " + u + " " + i + " " + d;
252
+ }).join(",");
253
+ }
254
+ function Kt(t) {
255
+ var a = function(r) {
256
+ return r && r.ownerDocument || document;
257
+ }(t);
258
+ return a.defaultView || window;
259
+ }
260
+ function Be(t, a) {
261
+ if (a) {
262
+ var r = function(e, n) {
263
+ var o, i = n.getBoundingClientRect(), c = Kt(n);
264
+ if (n.fakeTransform) o = n.fakeTransform;
265
+ else {
266
+ var s = c.getComputedStyle(n);
267
+ o = s.getPropertyValue("-webkit-transform") || s.getPropertyValue("transform");
268
+ }
269
+ var l = 0, u = 0;
270
+ if (o && o !== "none" && typeof o == "string") {
271
+ var d = o.split("(")[1].split(")")[0].split(",");
272
+ l = parseInt(d[4], 10), u = parseInt(d[5], 10);
273
+ }
274
+ switch (e) {
275
+ case "left":
276
+ return "translateX(" + (c.innerWidth + l - i.left) + "px)";
277
+ case "right":
278
+ return "translateX(-" + (i.left + i.width - l) + "px)";
279
+ case "up":
280
+ return "translateY(" + (c.innerHeight + u - i.top) + "px)";
281
+ default:
282
+ return "translateY(-" + (i.top + i.height - u) + "px)";
283
+ }
284
+ }(t, a);
285
+ r && (a.style.webkitTransform = r, a.style.transform = r);
286
+ }
287
+ }
288
+ var $t = oe(function(t, a) {
289
+ var r = t.children, e = t.direction, n = e === void 0 ? "down" : e, o = t.in, i = t.style, c = t.timeout, s = c === void 0 ? 0 : c, l = t.onEnter, u = t.onEntered, d = t.onExit, m = t.onExited, b = Ne(t, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), w = ne(null), x = pt(r.ref, w), y = pt(x, a), g = Z(function() {
290
+ w.current && Be(n, w.current);
291
+ }, [n]);
292
+ return H(function() {
293
+ if (!o && n !== "down" && n !== "right") {
294
+ var f = function(C, Y) {
295
+ var R;
296
+ function q() {
297
+ for (var B = this, V = arguments.length, _ = new Array(V), X = 0; X < V; X++) _[X] = arguments[X];
298
+ clearTimeout(R), R = setTimeout(function() {
299
+ C.apply(B, _);
300
+ }, Y);
301
+ }
302
+ return Y === void 0 && (Y = 166), q.clear = function() {
303
+ clearTimeout(R);
304
+ }, q;
305
+ }(function() {
306
+ w.current && Be(n, w.current);
307
+ }), M = Kt(w.current);
308
+ return M.addEventListener("resize", f), function() {
309
+ f.clear(), M.removeEventListener("resize", f);
310
+ };
311
+ }
312
+ }, [n, o]), H(function() {
313
+ o || g();
314
+ }, [o, g]), le(ft, Object.assign({ appear: !0, nodeRef: w, onEnter: function(f, M) {
315
+ Be(n, f), Gt(f), l && l(f, M);
316
+ }, onEntered: u, onEntering: function(f) {
317
+ var M = i?.transitionTimingFunction || so, C = Ke({ timeout: s, mode: "enter", style: L({}, i, { transitionTimingFunction: M }) });
318
+ f.style.webkitTransition = ve("-webkit-transform", C), f.style.transition = ve("transform", C), f.style.webkitTransform = "none", f.style.transform = "none";
319
+ }, onExit: function(f) {
320
+ var M = i?.transitionTimingFunction || lo, C = Ke({ timeout: s, mode: "exit", style: L({}, i, { transitionTimingFunction: M }) });
321
+ f.style.webkitTransition = ve("-webkit-transform", C), f.style.transition = ve("transform", C), Be(n, f), d && d(f);
322
+ }, onExited: function(f) {
323
+ f.style.webkitTransition = "", f.style.transition = "", m && m(f);
324
+ }, in: o, timeout: s }, b), function(f, M) {
325
+ return cn(r, L({ ref: y, style: L({ visibility: f !== "exited" || o ? void 0 : "hidden" }, i, {}, r.props.style) }, M));
326
+ });
327
+ });
328
+ $t.displayName = "Slide";
329
+ var $e = function(t) {
330
+ return S.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 } }, t));
331
+ }, co = function() {
332
+ return S.createElement($e, null, S.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
333
+ 10.59L10 14.17L17.59 6.58L19 8L10 17Z` }));
334
+ }, uo = function() {
335
+ return S.createElement($e, null, S.createElement("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }));
336
+ }, po = function() {
337
+ return S.createElement($e, null, S.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,
338
+ 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
339
+ 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z` }));
340
+ }, mo = function() {
341
+ return S.createElement($e, null, S.createElement("path", { d: `M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
342
+ 0 22,12A10,10 0 0,0 12,2Z` }));
343
+ }, de = { maxSnack: 3, persist: !1, hideIconVariant: !1, disableWindowBlurListener: !1, variant: "default", autoHideDuration: 5e3, iconVariant: { default: void 0, success: S.createElement(co, null), warning: S.createElement(uo, null), error: S.createElement(po, null), info: S.createElement(mo, null) }, anchorOrigin: { vertical: "bottom", horizontal: "left" }, TransitionComponent: $t, transitionDuration: { enter: 225, exit: 195 } }, fo = function(t, a) {
344
+ return function(r, e) {
345
+ return e === void 0 && (e = !1), e ? L({}, de[r], {}, a[r], {}, t[r]) : r === "autoHideDuration" ? (n = t.autoHideDuration, o = a.autoHideDuration, (i = function(c) {
346
+ return typeof c == "number" || c === null;
347
+ })(n) ? n : i(o) ? o : de.autoHideDuration) : r === "transitionDuration" ? function(c, s) {
348
+ var l = function(u, d) {
349
+ return d.some(function(m) {
350
+ return typeof u === m;
351
+ });
352
+ };
353
+ return l(c, ["string", "number"]) ? c : l(c, ["object"]) ? L({}, de.transitionDuration, {}, l(s, ["object"]) && s, {}, c) : l(s, ["string", "number"]) ? s : l(s, ["object"]) ? L({}, de.transitionDuration, {}, s) : de.transitionDuration;
354
+ }(t.transitionDuration, a.transitionDuration) : t[r] || a[r] || de[r];
355
+ var n, o, i;
356
+ };
357
+ };
358
+ function Ie(t) {
359
+ return Object.entries(t).reduce(function(a, r) {
360
+ var e, n = r[0], o = r[1];
361
+ return L({}, a, ((e = {})[n] = dt(o), e));
362
+ }, {});
363
+ }
364
+ var ho = "notistack-SnackbarContainer", go = "notistack-Snackbar", Zt = "notistack-CollapseWrapper", ko = "notistack-MuiContent", bo = function(t) {
365
+ return "notistack-MuiContent-" + t;
366
+ }, Ot = Ie({ root: { height: 0 }, entered: { height: "auto" } }), ot = "0px", Xt = oe(function(t, a) {
367
+ var r = t.children, e = t.in, n = t.onExited, o = ne(null), i = ne(null), c = pt(a, i), s = function() {
368
+ return o.current ? o.current.clientHeight : 0;
369
+ };
370
+ return le(ft, { in: e, unmountOnExit: !0, onEnter: function(l) {
371
+ l.style.height = ot;
372
+ }, onEntered: function(l) {
373
+ l.style.height = "auto";
374
+ }, onEntering: function(l) {
375
+ var u = s(), d = Ke({ timeout: 175, mode: "enter" }), m = d.duration, b = d.easing;
376
+ l.style.transitionDuration = typeof m == "string" ? m : m + "ms", l.style.height = u + "px", l.style.transitionTimingFunction = b || "";
377
+ }, onExit: function(l) {
378
+ l.style.height = s() + "px";
379
+ }, onExited: n, onExiting: function(l) {
380
+ Gt(l);
381
+ var u = Ke({ timeout: 175, mode: "exit" }), d = u.duration, m = u.easing;
382
+ l.style.transitionDuration = typeof d == "string" ? d : d + "ms", l.style.height = ot, l.style.transitionTimingFunction = m || "";
383
+ }, nodeRef: i, timeout: 175 }, function(l, u) {
384
+ return le("div", Object.assign({ ref: c, className: fe(Ot.root, l === "entered" && Ot.entered), style: L({ pointerEvents: "all", overflow: "hidden", minHeight: ot, transition: ve("height") }, l === "entered" && { overflow: "visible" }, {}, l === "exited" && !e && { visibility: "hidden" }) }, u), le("div", { ref: o, className: Zt, style: { display: "flex", width: "100%" } }, r));
385
+ });
386
+ });
387
+ Xt.displayName = "Collapse";
388
+ var Mt = { right: "left", left: "right", bottom: "up", top: "down" }, xo = function(t) {
389
+ return "anchorOrigin" + mt(t);
390
+ }, wo = function() {
391
+ };
392
+ function Pe(t, a) {
393
+ return t.reduce(function(r, e) {
394
+ return e == null ? r : function() {
395
+ for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
396
+ var c = [].concat(o);
397
+ a && c.indexOf(a) === -1 && c.push(a), r.apply(this, c), e.apply(this, c);
398
+ };
399
+ }, wo);
400
+ }
401
+ var yo = typeof window < "u" ? st : H;
402
+ function Wt(t) {
403
+ var a = ne(t);
404
+ return yo(function() {
405
+ a.current = t;
406
+ }), Z(function() {
407
+ return a.current.apply(void 0, arguments);
408
+ }, []);
409
+ }
410
+ var rt, Qt = oe(function(t, a) {
411
+ var r = t.children, e = t.className, n = t.autoHideDuration, o = t.disableWindowBlurListener, i = o !== void 0 && o, c = t.onClose, s = t.id, l = t.open, u = t.SnackbarProps, d = u === void 0 ? {} : u, m = ne(), b = Wt(function() {
412
+ c && c.apply(void 0, arguments);
413
+ }), w = Wt(function(g) {
414
+ c && g != null && (m.current && clearTimeout(m.current), m.current = setTimeout(function() {
415
+ b(null, "timeout", s);
416
+ }, g));
417
+ });
418
+ H(function() {
419
+ return l && w(n), function() {
420
+ m.current && clearTimeout(m.current);
421
+ };
422
+ }, [l, n, w]);
423
+ var x = function() {
424
+ m.current && clearTimeout(m.current);
425
+ }, y = Z(function() {
426
+ n != null && w(0.5 * n);
427
+ }, [n, w]);
428
+ return H(function() {
429
+ if (!i && l) return window.addEventListener("focus", y), window.addEventListener("blur", x), function() {
430
+ window.removeEventListener("focus", y), window.removeEventListener("blur", x);
431
+ };
432
+ }, [i, y, l]), le("div", Object.assign({ ref: a }, d, { className: fe(go, e), onMouseEnter: function(g) {
433
+ d.onMouseEnter && d.onMouseEnter(g), x();
434
+ }, onMouseLeave: function(g) {
435
+ d.onMouseLeave && d.onMouseLeave(g), y();
436
+ } }), r);
437
+ });
438
+ Qt.displayName = "Snackbar";
439
+ var vo = Ie({ root: (rt = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, rt[Ge] = { flexGrow: "initial", minWidth: "288px" }, rt) }), ht = oe(function(t, a) {
440
+ var r = t.className, e = Ne(t, ["className"]);
441
+ return S.createElement("div", Object.assign({ ref: a, className: fe(vo.root, r) }, e));
442
+ });
443
+ ht.displayName = "SnackbarContent";
444
+ var Me = Ie({ 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" } }), Ft = "notistack-snackbar", Yt = oe(function(t, a) {
445
+ var r = t.id, e = t.message, n = t.action, o = t.iconVariant, i = t.variant, c = t.hideIconVariant, s = t.style, l = t.className, u = o[i], d = n;
446
+ return typeof d == "function" && (d = d(r)), S.createElement(ht, { ref: a, role: "alert", "aria-describedby": Ft, style: s, className: fe(ko, bo(i), Me.root, Me[i], l, !c && u && Me.lessPadding) }, S.createElement("div", { id: Ft, className: Me.message }, c ? null : u, e), d && S.createElement("div", { className: Me.action }, d));
447
+ });
448
+ Yt.displayName = "MaterialDesignContent";
449
+ var We, at, _e, ze, it, Eo = Ee(Yt), Co = Ie({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), So = function(t) {
450
+ var a = ne(), r = ee(!0), e = r[0], n = r[1], o = Pe([t.snack.onClose, t.onClose]), i = Z(function() {
451
+ a.current = setTimeout(function() {
452
+ n(function(B) {
453
+ return !B;
454
+ });
455
+ }, 125);
456
+ }, []);
457
+ H(function() {
458
+ return function() {
459
+ a.current && clearTimeout(a.current);
460
+ };
461
+ }, []);
462
+ var c, s = t.snack, l = t.classes, u = t.Component, d = u === void 0 ? Eo : u, m = $(function() {
463
+ return function(B) {
464
+ B === void 0 && (B = {});
465
+ var V = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
466
+ return Object.keys(B).filter(function(_) {
467
+ return !V[_];
468
+ }).reduce(function(_, X) {
469
+ var he;
470
+ return L({}, _, ((he = {})[X] = B[X], he));
471
+ }, {});
472
+ }(l);
473
+ }, [l]), b = s.open, w = s.SnackbarProps, x = s.TransitionComponent, y = s.TransitionProps, g = s.transitionDuration, f = s.disableWindowBlurListener, M = s.content, C = Ne(s, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), Y = L({ direction: (c = C.anchorOrigin, c.horizontal !== "center" ? Mt[c.horizontal] : Mt[c.vertical]), timeout: g }, y), R = M;
474
+ typeof R == "function" && (R = R(C.id, C.message));
475
+ var q = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(B, V) {
476
+ var _;
477
+ return L({}, B, ((_ = {})[V] = Pe([t.snack[V], t[V]], C.id), _));
478
+ }, {});
479
+ return S.createElement(Xt, { in: e, onExited: q.onExited }, S.createElement(Qt, { open: b, id: C.id, disableWindowBlurListener: f, autoHideDuration: C.autoHideDuration, className: fe(Co.wrappedRoot, m.root, m[xo(C.anchorOrigin)]), SnackbarProps: w, onClose: o }, S.createElement(x, Object.assign({}, Y, { appear: !0, in: b, onExit: q.onExit, onExited: i, onEnter: q.onEnter, onEntered: Pe([q.onEntered, function() {
480
+ t.snack.requestClose && o(null, "instructed", t.snack.id);
481
+ }], C.id) }), R || S.createElement(d, Object.assign({}, C)))));
482
+ }, Fe = { default: 20 }, Ve = { default: 6, dense: 2 }, Pt = "." + Zt, Ue = Ie({ root: (We = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: ve(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, We[Pt] = { padding: Ve.default + "px 0px", transition: "padding 300ms ease 0ms" }, We.maxWidth = "calc(100% - " + 2 * Fe.default + "px)", We[nt] = { width: "100%", maxWidth: "calc(100% - 32px)" }, We), rootDense: (at = {}, at[Pt] = { padding: Ve.dense + "px 0px" }, at), top: { top: Fe.default - Ve.default + "px", flexDirection: "column" }, bottom: { bottom: Fe.default - Ve.default + "px", flexDirection: "column-reverse" }, left: (_e = { left: Fe.default + "px" }, _e[Ge] = { alignItems: "flex-start" }, _e[nt] = { left: "16px" }, _e), right: (ze = { right: Fe.default + "px" }, ze[Ge] = { alignItems: "flex-end" }, ze[nt] = { right: "16px" }, ze), center: (it = { left: "50%", transform: "translateX(-50%)" }, it[Ge] = { alignItems: "center" }, it) }), Lo = Ee(function(t) {
483
+ var a = t.classes, r = a === void 0 ? {} : a, e = t.anchorOrigin, n = t.dense, o = t.children, i = fe(ho, Ue[e.vertical], Ue[e.horizontal], Ue.root, r.containerRoot, r["containerAnchorOrigin" + mt(e)], n && Ue.rootDense);
484
+ return S.createElement("div", { className: i }, o);
485
+ }), Nt = function(t) {
486
+ return !(typeof t == "string" || ln(t));
487
+ }, To = function(t) {
488
+ function a(r) {
489
+ var e;
490
+ return (e = t.call(this, r) || this).enqueueSnackbar = function(n, o) {
491
+ if (o === void 0 && (o = {}), n == null) throw new Error("enqueueSnackbar called with invalid argument");
492
+ var i = Nt(n) ? n : o, c = Nt(n) ? n.message : n, s = i.key, l = i.preventDuplicate, u = Ne(i, ["key", "preventDuplicate"]), d = He(s), m = d ? s : (/* @__PURE__ */ new Date()).getTime() + Math.random(), b = fo(u, e.props), w = L({ id: m }, u, { message: c, open: !0, entered: !1, requestClose: !1, persist: b("persist"), action: b("action"), content: b("content"), variant: b("variant"), anchorOrigin: b("anchorOrigin"), disableWindowBlurListener: b("disableWindowBlurListener"), autoHideDuration: b("autoHideDuration"), hideIconVariant: b("hideIconVariant"), TransitionComponent: b("TransitionComponent"), transitionDuration: b("transitionDuration"), TransitionProps: b("TransitionProps", !0), iconVariant: b("iconVariant", !0), style: b("style", !0), SnackbarProps: b("SnackbarProps", !0), className: fe(e.props.className, u.className) });
493
+ return w.persist && (w.autoHideDuration = void 0), e.setState(function(x) {
494
+ if (l === void 0 && e.props.preventDuplicate || l) {
495
+ var y = function(M) {
496
+ return d ? M.id === m : M.message === c;
497
+ }, g = x.queue.findIndex(y) > -1, f = x.snacks.findIndex(y) > -1;
498
+ if (g || f) return x;
499
+ }
500
+ return e.handleDisplaySnack(L({}, x, { queue: [].concat(x.queue, [w]) }));
501
+ }), m;
502
+ }, e.handleDisplaySnack = function(n) {
503
+ return n.snacks.length >= e.maxSnack ? e.handleDismissOldest(n) : e.processQueue(n);
504
+ }, e.processQueue = function(n) {
505
+ var o = n.queue, i = n.snacks;
506
+ return o.length > 0 ? L({}, n, { snacks: [].concat(i, [o[0]]), queue: o.slice(1, o.length) }) : n;
507
+ }, e.handleDismissOldest = function(n) {
508
+ if (n.snacks.some(function(s) {
509
+ return !s.open || s.requestClose;
510
+ })) return n;
511
+ var o = !1, i = !1;
512
+ n.snacks.reduce(function(s, l) {
513
+ return s + (l.open && l.persist ? 1 : 0);
514
+ }, 0) === e.maxSnack && (i = !0);
515
+ var c = n.snacks.map(function(s) {
516
+ return o || s.persist && !i ? L({}, s) : (o = !0, s.entered ? (s.onClose && s.onClose(null, "maxsnack", s.id), e.props.onClose && e.props.onClose(null, "maxsnack", s.id), L({}, s, { open: !1 })) : L({}, s, { requestClose: !0 }));
517
+ });
518
+ return L({}, n, { snacks: c });
519
+ }, e.handleEnteredSnack = function(n, o, i) {
520
+ if (!He(i)) throw new Error("handleEnteredSnack Cannot be called with undefined key");
521
+ e.setState(function(c) {
522
+ return { snacks: c.snacks.map(function(s) {
523
+ return s.id === i ? L({}, s, { entered: !0 }) : L({}, s);
524
+ }) };
525
+ });
526
+ }, e.handleCloseSnack = function(n, o, i) {
527
+ e.props.onClose && e.props.onClose(n, o, i);
528
+ var c = i === void 0;
529
+ e.setState(function(s) {
530
+ var l = s.snacks, u = s.queue;
531
+ return { snacks: l.map(function(d) {
532
+ return c || d.id === i ? d.entered ? L({}, d, { open: !1 }) : L({}, d, { requestClose: !0 }) : L({}, d);
533
+ }), queue: u.filter(function(d) {
534
+ return d.id !== i;
535
+ }) };
536
+ });
537
+ }, e.closeSnackbar = function(n) {
538
+ var o = e.state.snacks.find(function(i) {
539
+ return i.id === n;
540
+ });
541
+ He(n) && o && o.onClose && o.onClose(null, "instructed", n), e.handleCloseSnack(null, "instructed", n);
542
+ }, e.handleExitedSnack = function(n, o) {
543
+ if (!He(o)) throw new Error("handleExitedSnack Cannot be called with undefined key");
544
+ e.setState(function(i) {
545
+ var c = e.processQueue(L({}, i, { snacks: i.snacks.filter(function(s) {
546
+ return s.id !== o;
547
+ }) }));
548
+ return c.queue.length === 0 ? c : e.handleDismissOldest(c);
549
+ });
550
+ }, e.enqueueSnackbar, e.closeSnackbar, e.state = { snacks: [], queue: [], contextValue: { enqueueSnackbar: e.enqueueSnackbar.bind(Et(e)), closeSnackbar: e.closeSnackbar.bind(Et(e)) } }, e;
551
+ }
552
+ return Vt(a, t), a.prototype.render = function() {
553
+ var r = this, e = this.state.contextValue, n = this.props, o = n.domRoot, i = n.children, c = n.dense, s = c !== void 0 && c, l = n.Components, u = l === void 0 ? {} : l, d = n.classes, m = this.state.snacks.reduce(function(w, x) {
554
+ var y, g = mt(x.anchorOrigin), f = w[g] || [];
555
+ return L({}, w, ((y = {})[g] = [].concat(f, [x]), y));
556
+ }, {}), b = Object.keys(m).map(function(w) {
557
+ var x = m[w], y = x[0];
558
+ return S.createElement(Lo, { key: w, dense: s, anchorOrigin: y.anchorOrigin, classes: d }, x.map(function(g) {
559
+ return S.createElement(So, { key: g.id, snack: g, classes: d, Component: u[g.variant], onClose: r.handleCloseSnack, onEnter: r.props.onEnter, onExit: r.props.onExit, onExited: Pe([r.handleExitedSnack, r.props.onExited], g.id), onEntered: Pe([r.handleEnteredSnack, r.props.onEntered], g.id) });
560
+ }));
561
+ });
562
+ return S.createElement(Ut.Provider, { value: e }, i, o ? zn(b, o) : b);
563
+ }, zt(a, [{ key: "maxSnack", get: function() {
564
+ return this.props.maxSnack || de.maxSnack;
565
+ } }]), a;
566
+ }(At), Jt = function() {
567
+ return sn(Ut);
568
+ };
569
+ const ae = { card: "_card_r6a8n_13", actionRoot: "_actionRoot_r6a8n_21", icons: "_icons_r6a8n_31", expand: "_expand_r6a8n_43", expandOpen: "_expandOpen_r6a8n_57", stackTraceContainer: "_stackTraceContainer_r6a8n_65" }, en = oe((t, a) => {
570
+ const { id: r, message: e, iconVariant: n, error: o, hideIconVariant: i, ...c } = t, { closeSnackbar: s } = Jt(), l = un(), [u, d] = ee(!1), m = Z(() => {
571
+ d((x) => !x);
572
+ }, []), b = Z(() => {
573
+ s(r);
574
+ }, [r, s]), w = o?.message || String(e);
575
+ return h(ht, { ref: a, className: lt(ae.root, "error-snackbar"), children: ie(Vn, { className: ae.card, style: { backgroundColor: l.palette.error.dark, border: `1px solid ${l.palette.error.dark}` }, children: [ie(Un, { className: ae.actionRoot, children: [i ? null : n?.error, h(Gn, { variant: "body2", component: "div", className: ae.typography, style: { color: l.palette.text.primary }, children: w }), h("div", { style: { flex: "1 1 auto" } }), ie("div", { className: ae.icons, children: [o ? h(ut, { "aria-label": "Show more", size: "small", className: lt(ae.expand, { [ae.expandOpen]: u }), style: { color: l.palette.action.active }, onClick: m, children: h(Xn, {}) }) : null, h(ut, { size: "small", className: ae.expand, style: { color: l.palette.action.active }, onClick: b, children: h(Qn, { fontSize: "small" }) })] })] }), o ? h(Kn, { in: u, timeout: "auto", unmountOnExit: !0, children: h("div", { className: ae.stackTraceContainer, style: { backgroundColor: l.palette.error.light, borderTop: `1px solid ${l.palette.error.main}` }, children: h(dn, { error: o, hideLineNumbers: !0 }) }) }) : null] }) });
576
+ });
577
+ en.displayName = "ToastError";
578
+ const tn = Ee(oe((t, a) => {
579
+ const { commands: r, commandHook: e, scope: n = "workbook", disabled: o = !1, ...i } = t, c = te((l) => {
580
+ const u = { variant: pn.Menuitem, parentFloat: l.floatReference, commandHook: e, scope: n, disabled: o }, d = ie(It, { children: [h(Je, { ...u, command: r.getCommand("newWorkbook"), icon: Te(h(mn, {})) }), h(fn, { orientation: "horizontal" }), h(Je, { ...u, command: r.getCommand("openWorkbook"), icon: Te(h(hn, {})) }), h(kt, { ...u, commands: r, quickCommand: "saveWorkbook", icon: Te(h(bn, {})), createPopupPanel: (m) => {
581
+ const b = { ...u, parentFloat: m.floatReference, scope: "saveWorkbook" }, w = [];
582
+ return pe.getWriteFormats().forEach((x) => {
583
+ if (x.isDefault) return;
584
+ let y = null;
585
+ x.key === "CSV" ? y = Te(h(gn, {})) : x.key === "Excel" && (y = Te(h(kn, {})));
586
+ const g = r.getCommand(`saveWorkbookAs${x.key}`);
587
+ g ? w.push(le(Je, { ...b, key: x.key, command: g, icon: y })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${x.key}'`);
588
+ }), bt({ ...m, children: w, onClick: () => {
589
+ m.closeFloatAll();
590
+ } });
591
+ } })] });
592
+ return bt({ ...l, children: d, onClick: (m) => {
593
+ m.isDefaultPrevented || l.closeFloatAll();
594
+ } });
595
+ }, [o, r, e, n]), s = "File";
596
+ return h(kt, { commands: r, disabled: o, commandHook: e, scope: n, label: s, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (l) => `calc(1.25rem + ${l.spacing(2)}px)` } }, ...i, createPopupPanel: c, icon: h(xn, { className: "label", icon: null, label: s }) });
597
+ }));
598
+ tn.displayName = "StandaloneFileCommandButton";
599
+ const Do = h(En, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: h(ue, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: h(Cn, { onClick: () => {
600
+ window?.open("https://www.sheetxl.com", "_blank");
601
+ }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), nn = Ee(oe((t, a) => {
602
+ const { commands: r, workbook: e, logo: n = Do, mainElement: o, showFileMenu: i = !0, showAppearanceMenu: c = !0, ...s } = t, { reference: l } = wn(), [u, { width: d }] = yn(), m = d < 530, b = i ? h(tn, { commands: r, commandHook: { beforeExecute() {
603
+ l?.closeAll();
604
+ }, onError(g, f, M) {
605
+ } } }) : null, w = c ? h(Sn, { commands: r, commandHook: { beforeExecute() {
606
+ l?.closeAll();
607
+ }, onError(g, f, M) {
608
+ } } }) : null, x = $(() => ({ paddingLeft: (g) => g.spacing(1), paddingRight: (g) => g.spacing(1) }), []), y = ne(null);
609
+ return h(ue, { ref: jt([y, u, a]), ...s, children: vn({ commands: r, renderCompact: m, workbook: e, selectWrapper: (g) => ie(ue, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (f) => f.spacing(1), paddingLeft: (f) => f.spacing(1), paddingRight: (f) => f.spacing(1) }, children: [ie(ue, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (f) => f.spacing(0.5) }, children: [n, ie(ue, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (f) => f.spacing(0.25) }, children: [b, g] })] }), h(ue, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: o }), h(ue, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: m && !w ? "0 0 auto" : "1 1 100%" }, children: w })] }), selectProps: x, toolbarsProps: { Home: { sx: {} } } }) });
610
+ }));
611
+ nn.displayName = "StandaloneWorkbookToolbar";
612
+ const on = Ee(oe((t, a) => {
613
+ const { workbook: r, setWorkbook: e, refWorkbookTitle: n, titleWorkbook: o, setWorkbookTitle: i, titlePlaceHolder: c, children: s, undoManager: l, commands: u, importExportDisabled: d, themeModeOptions: m } = t, b = Jt(), w = b ? b.enqueueSnackbar : () => {
614
+ }, x = b ? b.closeSnackbar : () => {
615
+ }, [y, g] = ee({ isMounted: !1, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), f = Z(() => {
616
+ g((O) => ({ ...O, isMounted: !0 }));
617
+ }, []), M = Z(() => {
618
+ g((O) => ({ ...O, isMounted: !1 }));
619
+ }, []), C = On(), Y = Mn(), R = Wn(), q = ne(/* @__PURE__ */ new Set()), B = $(() => {
620
+ const O = (v, E) => {
621
+ if (E?.onceKey) {
622
+ if (q.current.has(E.onceKey)) return;
623
+ const T = new Set(q.current);
624
+ T.add(E.onceKey), q.current = T;
625
+ }
626
+ const W = { variant: E?.type ?? Re.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: E?.preventDuplicate, persist: E?.persist ?? E?.type === Re.Error, action: (T) => h(ut, { onClick: () => x(T), children: h(Yn, {}) }) };
627
+ E?.enqueueProps && Object.assign(W, E.enqueueProps), v || console.log("message is 'null'", E), w(v ?? "Alert", W);
628
+ };
629
+ return { showMessage: O, showBusy: (v, E) => {
630
+ let W = null;
631
+ const T = new Promise((j) => {
632
+ W = j;
633
+ });
634
+ return g((j) => {
635
+ const I = new Map(j.starting);
636
+ return I.set(T, W), { ...j, label: v, starting: I };
637
+ }), T;
638
+ }, showWindow: (v, E, W) => {
639
+ const T = { ...E, onKeyDown: (j) => {
640
+ u?.dispatchToFocusedCommand(j), j.isDefaultPrevented() || j.isPropagationStopped() || E?.onKeyDown?.(j);
641
+ } };
642
+ return C(v, { sort: () => import("./DjAZeDxBIBZsRTm3.mjs"), numberFormat: () => import("./vn0iS301yg2hAbYd.mjs"), hyperlink: () => import("./7Imk0owJj7oNHR7v.mjs"), comments: () => import("./CpyeUtXgDmrcMESB.mjs"), find: () => import("./CtrrmHx9YbrOithw.mjs"), tableDetails: () => import("./B1Kw9U_AxCk0Aq9f.mjs"), tableNew: () => import("./D78-3ghInxscHLVq.mjs"), namedDetails: () => import("./DttdPwwDTcRX4uwL.mjs") }[v], T, W);
643
+ }, showOptions: Y, showInputOptions: R, showError: (v) => {
644
+ let E, W = Re.Error, T = "Unknown Error";
645
+ typeof v == "string" ? T = v : v instanceof Error && (E = v, v.message && (T = v.message)), v instanceof Nn && (W = Re.Info), O(T, { type: W, enqueueProps: { error: E } });
646
+ } };
647
+ }, []), V = Z(() => {
648
+ }, []), _ = ((O) => {
649
+ const { workbook: v, setWorkbook: E, importExportDisabled: W, workbookTitle: T = "export", setWorkbookTitle: j, notifier: I, requestWorkbookTitle: J, themeModeOptions: F, undoManager: Ae, commands: Q, onExecute: ke } = O, je = te(F?.onForceModeChange, [F?.onForceModeChange]), Ze = te(F?.onForceLightGridChange, [F?.onForceLightGridChange]), be = te(F?.onForceLightImagesChange, [F?.onForceLightImagesChange]), Xe = te(async (D = null, U = null) => {
650
+ const p = [];
651
+ let k, P = null, G = null;
652
+ if (typeof D == "string" ? G = D : P = D, k = P ? D : await Ln.openFileDialog(G ?? pe.getAllReadFormatTypeAsString().join(",")), !k) return null;
653
+ const se = { source: k, constructorOptions: U, onWarning: (Ye) => {
654
+ p.push(Ye);
655
+ } }, Le = await pe.read(se, I);
656
+ return p.length > 0 && (I?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn(`Import warnings:
657
+ ` + p.join(`
658
+ `))), Le;
659
+ }, [ke, I, v]), Ce = te(async (D, U, p) => {
660
+ if (!U && J) {
661
+ const k = await J("Enter Workbook name to " + (p.isDefault ? "Save." : `Export as ${p.description}.`));
662
+ return k !== null && pe.writeFile(k, D, { formatType: p.key });
663
+ }
664
+ return pe.writeFile(U, D, { formatType: p.key });
665
+ }, [I, v, J]), A = Z(() => ({ contains: (D) => !0, focus() {
666
+ } }), []), ce = $(() => {
667
+ const D = [];
668
+ W || (pe.getWriteFormats().forEach((p) => {
669
+ const k = p.isDefault, P = { label: k ? "Save Workbook" : `Save Workbook as ${p.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${p.description}` }, tags: p.tags, description: `Save the workbook to the desktop${k ? "" : ` as ${p.description}`}.` };
670
+ k && (P.shortcut = { key: "S", modifiers: [De.Ctrl] }, D.push(new K("saveWorkbookAs", A, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [De.Shift, De.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
671
+ Ce(v, null, p).catch((se) => {
672
+ I?.showError?.(se);
673
+ });
674
+ })));
675
+ const G = k ? "saveWorkbook" : `saveWorkbookAs${p.key}`;
676
+ D.push(new K(G, A, P, (se) => {
677
+ Ce(v, se ?? T, p).catch((Le) => {
678
+ I?.showError?.(Le);
679
+ });
680
+ }));
681
+ }), D.push(new K("openWorkbook", A, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [De.Ctrl] } }, async (p = null) => {
682
+ const k = { date1904: v.isDate1904(), ...v.options };
683
+ try {
684
+ const P = await Xe(p, k);
685
+ if (!P) return;
686
+ const G = P.title, se = P.workbook, Le = se.getSelectedSheet();
687
+ if (P.formatType.mimeType === "text/csv") {
688
+ const Ye = v.findValidSheetName(G);
689
+ await v.doBatch(async () => {
690
+ const gt = Le.getUsedRange();
691
+ if (!gt) return void I?.showMessage("The file appears to be blank.");
692
+ await v.getSheets().add({ name: Ye, autoSelect: !0 }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }).copyFrom(gt);
693
+ }, `Import CSV '${G}'`);
694
+ } else v?.close(), j?.(G), E(se);
695
+ } catch (P) {
696
+ I?.showError?.(P);
697
+ }
698
+ })), D.push(new K("openWorkbookFromUrl", A, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(p) {
699
+ if (!p) {
700
+ const k = await I?.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"] });
701
+ if (k.option !== "Open") return;
702
+ p = k.input;
703
+ }
704
+ p && console.log("openWorkbookFromUrl", p);
705
+ })));
706
+ let U = [];
707
+ return F && (U = [new K("themeMode", A, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new K("defaultThemeMode", A, { 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 K("forceLightGrid", A, { label: "Force Light Grid", description: "Force the grid to always render in light 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 K("forceLightImages", A, { label: "Force Light Images", description: "Force the images to always render in light 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." })]), [...D, ...U, new xt("help", A, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
708
+ }), new xt("showKeyboardShortcuts", A, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [De.Ctrl] } }, () => {
709
+ }), new K("gotoUrlGithub", A, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
710
+ window?.open("https://github.com/sheetxl/sheetxl");
711
+ }), new K("gotoUrlDiscord", A, { label: "Discord", description: "Join our community on discord." }, () => {
712
+ window?.open("https://discord.gg/NTKdwUgK9p");
713
+ }), new K("gotoUrlDocumentation", A, { label: "Documentation", description: "Read the documentation." }, () => {
714
+ window?.open("https://www.sheetxl.com/docs");
715
+ }), new K("gotoUrlIssue", A, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
716
+ window?.open("https://github.com/sheetxl/sheetxl/issues");
717
+ })];
718
+ }, [v, T, I, W, F, Q, Ae]), z = $(() => {
719
+ let D = null;
720
+ return D = Q ? Q.createChildGroup(A, "standaloneWorkbook", !1) : new Rt(A, "standaloneWorkbook"), D.addCommands(ce, !0), D;
721
+ }, [Q, ce]);
722
+ Tn({ manager: Ae, commands: z, notifier: I });
723
+ const { themeMode: Se } = Ht();
724
+ H(() => {
725
+ if (!F || !z) return;
726
+ const D = F.forceMode === "dark" || !F.forceMode && Se === "dark";
727
+ z.getCommand("themeMode").update({ state: F.forceMode ?? null, label: D ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: D ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
728
+ je(D ? ct.Light : ct.Dark);
729
+ }), z.getCommand("defaultThemeMode").update({ state: !F.forceMode }).updateCallback(() => {
730
+ je(null);
731
+ }), z.getCommand("forceLightGrid").update({ state: F.forceLightGrid }).updateCallback(() => {
732
+ Ze(!F.forceLightGrid);
733
+ }), z.getCommand("forceLightImages").update({ state: F.forceLightImages }).updateCallback(() => {
734
+ be(!F.forceLightImages);
735
+ });
736
+ }, [Se, F, ce]);
737
+ const { showModal: Qe } = Dn();
738
+ return H(() => {
739
+ const D = () => new Promise((U, p) => {
740
+ const k = S.lazy(() => import("./CbTs5cvVaP1vPCYD.mjs")), P = Qe(k, { title: "Shortcut Keys Reference", commands: z, onDone: () => {
741
+ P.hide();
742
+ }, TransitionProps: { onExited: () => {
743
+ U(!0);
744
+ } } });
745
+ });
746
+ z.getCommand("showKeyboardShortcuts").updateCallback(() => D()), z.getCommand("help").updateCallback(() => D());
747
+ }, [ce, z]), z;
748
+ })({ workbook: r, setWorkbook: e, importExportDisabled: d, workbookTitle: o, setWorkbookTitle: i, commands: u, requestWorkbookTitle: (O) => new Promise((v) => {
749
+ n.current ? n.current.requestWorkbookTitle((E, W) => {
750
+ v(E);
751
+ }, { selectAll: !0, requestReason: O }) : v(c);
752
+ }), themeModeOptions: m, undoManager: l, notifier: B, onExecute: V });
753
+ H(() => {
754
+ y.starting.size <= 0 || !y.isMounted || g((O) => {
755
+ const v = new Map(O.running);
756
+ return O.starting.forEach((E, W) => {
757
+ const T = () => {
758
+ g((j) => {
759
+ const I = new Map(j.running);
760
+ return I.delete(W), { ...j, running: I };
761
+ });
762
+ };
763
+ v.set(W, T), E(T);
764
+ }), { ...O, starting: /* @__PURE__ */ new Map(), running: v };
765
+ });
766
+ }, [y]);
767
+ const [X, he] = ee(null);
768
+ H(() => {
769
+ y.starting.size !== 0 || y.running.size !== 0 ? he(h(qt, { icon: h(Fn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: y.label, onMount: f, onUnmount: M, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : he(null);
770
+ }, [y.starting, y.running]);
771
+ const N = $(() => h(Pn, { commands: _, disableHover: !0, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [_]), ge = { notifier: B, commands: _ };
772
+ return r && (ge.statusBarProps = { childrenEnd: N }), ie(It, { children: [X, s ? S.cloneElement(s, ge) : null] });
773
+ }));
774
+ on.displayName = "SnackbarAndCommandsWrapper";
775
+ const rn = Ee(oe((t, a) => {
776
+ const { className: r, sx: e, style: n, onElementLoad: o, onError: i, undoManager: c, errorPanel: s = In, onKeyDown: l, workbook: u, createWorkbookOptions: d, onWorkbookChange: m, logo: b, importExportDisabled: w = !1, themeModeOptions: x, autoFocus: y = !1, commands: g, title: f, onTitleChange: M, titleProps: C, ...Y } = t, R = ne(null), q = te(m, [m]), B = te(M ?? C?.onTitleChange, [M ?? C?.onTitleChange]), V = C?.placeHolder ?? "Untitled", _ = x?.forceMode, { themeMode: X, source: he } = Ht({ mode: _ }), N = $(() => ({ ...x, light: wt(!1, et.deepMerge(x?.theme ?? {}, x?.light ?? {})), dark: wt(!0, et.deepMerge(x?.theme ?? {}, x?.dark ?? {})) }), [x]), ge = X === ct.Dark, [O, v] = ee(null);
777
+ H(() => {
778
+ v(c ?? new An());
779
+ }, [c]);
780
+ const [E, W] = ee(null), [T, j] = ee(null), I = jn();
781
+ st(() => {
782
+ if (!u || Object.keys(u).length === 0 && !et.isPromiseLike(u)) {
783
+ const p = { theme: I.getDefaultTheme(), ...d };
784
+ j(new yt(p));
785
+ } else j(u);
786
+ }, [u]), st(() => {
787
+ if (T) {
788
+ if (T instanceof yt) return W({ workbook: T }), void (u !== T && q?.(T));
789
+ (async () => {
790
+ try {
791
+ let p, k = await Promise.resolve(T);
792
+ k && k.source && (k = await pe.read(k)), k.workbook ? (ke(k.title), p = k.workbook) : p = k, q?.(p), W({ workbook: p });
793
+ } catch (p) {
794
+ q?.(null), W({ error: p });
795
+ }
796
+ })();
797
+ }
798
+ }, [T]);
799
+ const [J, F] = ee(null);
800
+ H(() => {
801
+ if (!O || !E) return;
802
+ O.clear();
803
+ const p = E?.workbook?.getTransactions();
804
+ if (p)
805
+ return p.addListener({ onCommitEnd: (k) => {
806
+ k.getDescription() ? O.addUndoOperation({ description: k.getDescription(), undo: () => (p.revert(k.getId()), J.source?.focus(), () => {
807
+ p.restore(k.getId()), J.source?.focus();
808
+ }) }) : console.warn("commit has no description", k);
809
+ } });
810
+ }, [O, E, J]);
811
+ const Ae = te((p) => {
812
+ p ? O.setRepeatableOperation({ description: p.label(), repeat: async () => p.execute() }) : O.setRepeatableOperation(null);
813
+ }, [O]), [Q, ke] = ee(f ?? C?.title ?? "");
814
+ H(() => {
815
+ ke(f ?? C?.title ?? "");
816
+ }, [f ?? C?.title]), H(() => {
817
+ B?.(Q);
818
+ }, [Q]);
819
+ const [je, Ze] = ee(null), be = $(() => {
820
+ const p = () => ({ contains: (k) => !0, focus() {
821
+ } });
822
+ return g ? g.createChildGroup(p, "application", !1) : new Rt(p, "application");
823
+ }, [g]), Xe = te((p) => {
824
+ Ze(p.source.getViewportElement()), F(p), be.activate("sheet"), o?.(p);
825
+ }, [be]);
826
+ H(() => {
827
+ J && y && J.source?.focus(typeof y == "object" ? y : void 0);
828
+ }, [J]);
829
+ const Ce = ne(null), A = Z((p) => {
830
+ let k = null;
831
+ return C?.hidden || (k = h(Rn, { ...C, style: { maxWidth: "100%", ...C?.style }, workbook: R.current, ref: Ce, title: Q, placeHolder: V, onTitleChange: (P) => {
832
+ ke(P);
833
+ } })), h(nn, { ...p, logo: b, mainElement: k, showFileMenu: !w, showAppearanceMenu: !!(N?.onForceLightGridChange || N?.onForceLightImagesChange || N?.onForceModeChange) });
834
+ }, [b, Q, C, N, w, be]);
835
+ H(() => {
836
+ const p = (k) => k.preventDefault();
837
+ return R.current?.addEventListener("wheel", p, { passive: !1 }), () => {
838
+ R.current?.removeEventListener("wheel", p);
839
+ };
840
+ }, []);
841
+ const ce = $(() => h(qt, { transparentBackground: !0, sx: e, style: n }), [e, n]), z = Z(({ error: p }) => (i?.(p), h(s, { sx: e, style: n, error: p ?? "Unable to display empty workbook." })), [e, n, i]), Se = $(() => ({ ...e, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (p) => p.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [e]), Qe = jt([R, a]), D = $(() => {
842
+ if (!E) return ce;
843
+ if (E.error || !E.workbook) return z({ error: E.error });
844
+ let p = null, k = null, P = !1;
845
+ return N && (p = ge ? N.dark : N.light, k = ge && !N.forceLightGrid ? N.dark : N.light, P = N.forceLightImages), h(Hn, { sx: Se, style: n, tabIndex: 0, autoFocus: !0, workbook: E.workbook, ref: Qe, renderToolbar: A, onElementLoad: Xe, onRepeatCommandChange: Ae, onKeyDown: (G) => {
846
+ l?.(G);
847
+ }, gridTheme: k, headersTheme: p, forceLightImages: P, className: lt(r, "sheetxl-workbook"), onContextMenu: (G) => G.preventDefault(), ...Y }, "WorkbookElement");
848
+ }, [E, Q, O, ce, N, Y, A, Se]);
849
+ let U = h(eo, { fallbackRender: z, children: h(To, { maxSnack: 3, domRoot: je, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (p, k, P) => {
850
+ R.current?.focus();
851
+ }, Components: { error: en }, iconVariant: { success: h($n, { style: { marginRight: "8px" }, children: h("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: h(Bn, { style: { marginRight: "8px" } }) }, children: h(qn, { children: h(on, { workbook: E?.workbook, setWorkbook: j, importExportDisabled: w, titlePlaceHolder: V, titleWorkbook: Q, setWorkbookTitle: ke, refWorkbookTitle: Ce, commands: be, undoManager: O, themeModeOptions: N, children: D }) }) }) });
852
+ return N && (U = ie(_n, { theme: ge ? N.dark : N.light, children: [N.cssBaseline ? h(Zn, {}) : null, U] })), U;
853
+ }));
854
+ rn.displayName = "EagerStandaloneWorkbook";
855
+ const Ao = Object.freeze(Object.defineProperty({ __proto__: null, default: rn }, Symbol.toStringTag, { value: "Module" }));
856
+ export {
857
+ Ao as E,
858
+ fe as c
859
+ };