@sheetxl/studio-mui 0.4.9 → 0.4.11
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.
- package/browser/cjs/B29yIlf_FSHx9q3M.cjs +7 -0
- package/browser/cjs/B783moVfFT70yQuK.cjs +7 -0
- package/browser/cjs/BCtVyhxIZSUPH_Z4.cjs +7 -0
- package/browser/cjs/BE6O6K7i1mHBC3et.cjs +7 -0
- package/browser/cjs/BQ-G2ABc3FYN-D50.cjs +7 -0
- package/browser/cjs/BabvaPi1dUIPt5AG.cjs +7 -0
- package/browser/cjs/BbvcxaJzfy7H6xfa.cjs +7 -0
- package/browser/cjs/Bhh0dqxUzzOzHWMc.cjs +7 -0
- package/browser/cjs/CH50hiw_7LBSC6dR.cjs +7 -0
- package/browser/cjs/Cfb0T6htsh82UPK-.cjs +7 -0
- package/browser/cjs/CisYglNTHGrj9oMH.cjs +7 -0
- package/browser/cjs/Clbakb5VUTDTlofM.cjs +7 -0
- package/browser/cjs/D7xmeRe-f7IifEKc.cjs +7 -0
- package/browser/cjs/DCV-6w2JGk_faE3x.cjs +7 -0
- package/browser/cjs/DY2PuDSgw0TrB5-_.cjs +7 -0
- package/browser/cjs/Df5v6knUJ4dqHmmo.cjs +7 -0
- package/browser/cjs/DyzVC_iq7ceqC2fj.cjs +7 -0
- package/browser/cjs/QB_8kWYEsfOH_HwK.cjs +7 -0
- package/browser/cjs/aOmlMJRAkQEF59EX.cjs +7 -0
- package/browser/cjs/index.cjs +10 -4
- package/browser/cjs/li-J7BWV6WUzY5aq.cjs +7 -0
- package/browser/cjs/u0WmWLGlCwhnhL9i.cjs +7 -0
- package/browser/cjs/uoBAuXnlUz8scSA1.cjs +7 -0
- package/browser/cjs/xp2ZII-PuLk9tHK3.cjs +7 -0
- package/browser/cjs/xq-CJbsvm7BQO8lK.cjs +7 -0
- package/browser/esm/12Ttun7hzbiInyVr.mjs +7 -0
- package/browser/esm/7jSMnphGrNRPUa_S.mjs +7 -0
- package/browser/esm/AnCmK-idMDJ2vI8H.mjs +7 -0
- package/browser/esm/B-Ut_yUCD9THCz0T.mjs +7 -0
- package/browser/esm/BTD5k7gtFcqDwslB.mjs +7 -0
- package/browser/esm/BVRUNnRvnt7aVCDD.mjs +7 -0
- package/browser/esm/BauTkiamxm0HDt6M.mjs +7 -0
- package/browser/esm/BcIp2mxLBfjUBE0q.mjs +7 -0
- package/browser/esm/Bi_0z0hyhFuz5Ta3.mjs +7 -0
- package/browser/esm/BkDEdK7zOlsoUKCZ.mjs +7 -0
- package/browser/esm/BpGexBYtmHbTIJz2.mjs +7 -0
- package/browser/esm/CJawFB555VEY-Vge.mjs +7 -0
- package/browser/esm/CWogLlWYHiL4W6CH.mjs +7 -0
- package/browser/esm/Cr46Bo9bGoz0LbWq.mjs +7 -0
- package/browser/esm/Csk8rXNpaXmf5g7O.mjs +7 -0
- package/browser/esm/Cu-5HDPN8B0qE77-.mjs +7 -0
- package/browser/esm/CzgR8PxJ_89IC4Mr.mjs +7 -0
- package/browser/esm/DMUXpRbV3ahdB1lN.mjs +7 -0
- package/browser/esm/DiIX5KzrWnbDWjGE.mjs +7 -0
- package/browser/esm/Djo2IS-ivmVSrO3v.mjs +7 -0
- package/browser/esm/Hy95ExHvIFgzxQb-.mjs +7 -0
- package/browser/esm/Z1_72ZY8rW2Mc3g_.mjs +7 -0
- package/browser/esm/_ZR9nT54xwy-C6ow.mjs +7 -0
- package/browser/esm/csxyptiqbJZO0pQA.mjs +7 -0
- package/browser/esm/index.mjs +8 -82
- package/licenses/dependencies.txt +145 -145
- package/node/esm/{CsbP0EYKOHobzZCu.mjs → 8THCZRGNmI2nPqMR.mjs} +2 -2
- package/node/esm/{CGiJgZJFY-YsXWCX.mjs → BDm0y2dv7wLZhYj1.mjs} +1 -1
- package/node/esm/{CijBL1IDWaxPgQ_E.mjs → BPylexVHXa-t0sqJ.mjs} +6 -6
- package/node/esm/{B7xzqWxB07TdXnmo.mjs → BQYQg7lfqFbWaf8x.mjs} +2 -2
- package/node/esm/{BUVA6vYXyFFnBCMg.mjs → BSUbQzac78SXiAJe.mjs} +1 -1
- package/node/esm/{qewbqty13W1sKrMC.mjs → BeNXnrWMr5S34Oxb.mjs} +1 -1
- package/node/esm/{BfuG4JD3t3n1uOci.mjs → C6jxZQrvMLctjLZM.mjs} +4 -4
- package/node/esm/{Dn38s6pH3QNvdk-x.mjs → CCZepFZNn1pIXrnd.mjs} +1 -1
- package/node/esm/{9iDXWtTOWeDVslQL.mjs → CXSwyUs6BuNGCic0.mjs} +13 -13
- package/node/esm/{Dq49h62ihEYk_8VR.mjs → CaV6SH-PMyHlXUhx.mjs} +1 -1
- package/node/esm/{B18g9zjzyR9YL3Mv.mjs → D481dAOp77EZbV5s.mjs} +2 -2
- package/node/esm/{DWKLdf_rn5dajRBA.mjs → DHj9iDuBImdwscIb.mjs} +25 -25
- package/node/esm/{uY021f9cZSWYX0--.mjs → DIGsHHDexzj0uG_T.mjs} +5 -5
- package/node/esm/{Cr5l_3AqPbv4mke9.mjs → DLiw-2C_tqGgJIQ6.mjs} +2 -2
- package/node/esm/{CG1T0Z1roNRSVlal.mjs → DNJVdt9TbBsUE8Jm.mjs} +1 -1
- package/node/esm/{DGTK2YeARR5cTnft.mjs → DaCmut490aSCGvX8.mjs} +1 -1
- package/node/esm/{C7t1ZHhSDgJnZ4Da.mjs → Dd2OFQJQyYp6bAeP.mjs} +1 -1
- package/node/esm/{DHmVr6jRLzt6lD1x.mjs → DkpAjhQeaZn_Ipxg.mjs} +2 -2
- package/node/esm/{DODhKM0Qeycx3Hvp.mjs → DyMCnCG9LzH5Mgw0.mjs} +2 -2
- package/node/esm/{v4fR5lIq2IqY_Clq.mjs → RV-AvxVzzFKWjYFM.mjs} +38 -38
- package/node/esm/{tur4cwLbnCn69JK-.mjs → Ui3_6RhrEZQDOXwg.mjs} +8 -8
- package/node/esm/index.mjs +5373 -5075
- package/node/esm/{CILOMzOF30-XSZqR.mjs → qI75rORek8T0-Kpf.mjs} +2 -2
- package/package.json +8 -8
- package/types/index.d.ts +24 -0
- package/browser/cjs/02LSJ7jnb-ovS7ex.cjs +0 -15
- package/browser/cjs/BDDJIe6JwgEYEtda.cjs +0 -6
- package/browser/cjs/BGh6tEDK_1MFKfMU.cjs +0 -145
- package/browser/cjs/BSRDKlVOTYHfOAF_.cjs +0 -11
- package/browser/cjs/Bn0BSzVk_S-rvDwk.cjs +0 -6
- package/browser/cjs/Bzf8jKmmZl374mof.cjs +0 -6
- package/browser/cjs/C20NTPRE5_ExESDZ.cjs +0 -6
- package/browser/cjs/C5i9hklL-WNb8J_q.cjs +0 -42
- package/browser/cjs/CLxYxjd0yz1LCTB-.cjs +0 -6
- package/browser/cjs/CUo2iW5IL6UZJNWT.cjs +0 -6
- package/browser/cjs/C_QWbWVBVc6YJ4Q3.cjs +0 -16
- package/browser/cjs/CeeZxww7wpF45vvp.cjs +0 -6
- package/browser/cjs/CekKZCV1J1HUFIqO.cjs +0 -6
- package/browser/cjs/CgD0b2zJD8zElhuz.cjs +0 -6
- package/browser/cjs/CqwEnIUDMxWw5DX1.cjs +0 -87
- package/browser/cjs/CwOKyPq_H2afJacv.cjs +0 -7
- package/browser/cjs/D32t9wiFoNX7WVEo.cjs +0 -161
- package/browser/cjs/DILF3GzsMdg-Y2wu.cjs +0 -11
- package/browser/cjs/Dr-PR7J1T91UjrPL.cjs +0 -12
- package/browser/cjs/DyR0_iZAINpjodWL.cjs +0 -12
- package/browser/cjs/LWuNxqu9MyiniH_g.cjs +0 -18
- package/browser/cjs/O8r9K4Qh6Pgd6rXU.cjs +0 -7
- package/browser/cjs/jbTHHxJODyD10jVH.cjs +0 -6
- package/browser/cjs/n-4XaX3pkXUEEQ5u.cjs +0 -6
- package/browser/cjs/qQGaIq5VhlZJU-xf.cjs +0 -6
- package/browser/esm/AmErN6xXU01K_bEs.mjs +0 -3803
- package/browser/esm/B08nVBuOXar7x7in.mjs +0 -1703
- package/browser/esm/B8xKZIF9fvamlvW5.mjs +0 -1467
- package/browser/esm/BGWd79IfMfoHoO6g.mjs +0 -392
- package/browser/esm/BT8vduOS21nsJ6EQ.mjs +0 -1366
- package/browser/esm/Bz6NqTbktTH8Df6_.mjs +0 -2251
- package/browser/esm/CDRALHzsBIsRPM5g.mjs +0 -153
- package/browser/esm/CIH1rBtL9lK5ku-N.mjs +0 -13391
- package/browser/esm/CVJee4uHPTdpZGEH.mjs +0 -46
- package/browser/esm/CXUv64T9mbQbJGgM.mjs +0 -48
- package/browser/esm/Ca5nvvpeuP6Wsv5P.mjs +0 -43
- package/browser/esm/CelDYTh0f7McDj4o.mjs +0 -44
- package/browser/esm/DHlS6l8ZPDMN2cwP.mjs +0 -1672
- package/browser/esm/DXKQ9TZdaT7ytR1S.mjs +0 -640
- package/browser/esm/D_FJwwe-bsDiDGBV.mjs +0 -2410
- package/browser/esm/DduyjhwDREaxXNzm.mjs +0 -59
- package/browser/esm/DffuCp_514AjqJLT.mjs +0 -864
- package/browser/esm/DgC_oaBYpwh1mBi_.mjs +0 -25
- package/browser/esm/Dl-SlJoaP7EFX-GR.mjs +0 -52
- package/browser/esm/DpTSO921EQ7L_abP.mjs +0 -52
- package/browser/esm/Dr5y4zmj1js9FjzE.mjs +0 -1352
- package/browser/esm/DuoEo0hJBssfAmB4.mjs +0 -84
- package/browser/esm/jIv4VNLAAFANZjhN.mjs +0 -424
- package/browser/esm/wysWhT4-jO-uukUH.mjs +0 -23
- package/browser/esm/zZaxvhjZK5N3yZkw.mjs +0 -19947
- package/node/esm/BBWRiJSBxt6O1CfK.mjs +0 -312
|
@@ -1,864 +0,0 @@
|
|
|
1
|
-
import { jsx as f, jsxs as ae, Fragment as It } from "react/jsx-runtime";
|
|
2
|
-
import S, { Component as Ft, createElement as le, createContext as sn, memo as ve, forwardRef as ne, useRef as te, useState as J, useCallback as X, useEffect as B, useMemo as Z, useContext as ln, isValidElement as jt, cloneElement as cn, useLayoutEffect as it } from "react";
|
|
3
|
-
import { u as un, a as st, L as dn, T as ee, v as Ye, w as De, y as pn, M as mn, P as fn, z as hn, b as kt, W as me, d as gn, H as kn, e as bt, V as bn, f as xn, h as wn, j as yn, k as vn, m as Ht, n as En, l as Cn, A as Sn, Y as Dn, Q as $, Z as Te, X as xt, K as Rt, o as Tn, p as qt, q as lt, E as On, s as Ln, t as Mn, x as Wn, $ as Bt, G as Pn, B as Nn, D as He, U as An, F as wt, R as In, I as Fn, J as jn, N as Hn, O as Rn, S as qn } from "./zZaxvhjZK5N3yZkw.mjs";
|
|
4
|
-
import { createPortal as Bn } from "react-dom";
|
|
5
|
-
import { Card as _n, CardActions as Vn, Typography as zn, IconButton as ct, Collapse as Un, Box as se, SvgIcon as Gn, CssBaseline as Kn } from "@mui/material";
|
|
6
|
-
import { PartialError as $n, CommonUtils as Je, UndoManager as Zn, Workbook as yt } from "@sheetxl/sdk";
|
|
7
|
-
import { ExpandMore as Xn, Close as Qn, CancelOutlined as Yn } from "@mui/icons-material";
|
|
8
|
-
/**
|
|
9
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
|
|
10
|
-
*
|
|
11
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
12
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
13
|
-
*/
|
|
14
|
-
const Jn = sn(null), et = { didCatch: !1, error: null };
|
|
15
|
-
class eo extends Ft {
|
|
16
|
-
constructor(a) {
|
|
17
|
-
super(a), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = et;
|
|
18
|
-
}
|
|
19
|
-
static getDerivedStateFromError(a) {
|
|
20
|
-
return { didCatch: !0, error: a };
|
|
21
|
-
}
|
|
22
|
-
resetErrorBoundary() {
|
|
23
|
-
const { error: a } = this.state;
|
|
24
|
-
if (a !== null) {
|
|
25
|
-
for (var r, e, n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
|
|
26
|
-
(r = (e = this.props).onReset) === null || r === void 0 || r.call(e, { args: o, reason: "imperative-api" }), this.setState(et);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
componentDidCatch(a, r) {
|
|
30
|
-
var e, n;
|
|
31
|
-
(e = (n = this.props).onError) === null || e === void 0 || e.call(n, a, r);
|
|
32
|
-
}
|
|
33
|
-
componentDidUpdate(a, r) {
|
|
34
|
-
const { didCatch: e } = this.state, { resetKeys: n } = this.props;
|
|
35
|
-
var o, i;
|
|
36
|
-
e && r.error !== null && function() {
|
|
37
|
-
let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
38
|
-
return c.length !== s.length || c.some((l, u) => !Object.is(l, s[u]));
|
|
39
|
-
}(a.resetKeys, n) && ((o = (i = this.props).onReset) === null || o === void 0 || o.call(i, { next: n, prev: a.resetKeys, reason: "keys" }), this.setState(et));
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
const { children: a, fallbackRender: r, FallbackComponent: e, fallback: n } = this.props, { didCatch: o, error: i } = this.state;
|
|
43
|
-
let c = a;
|
|
44
|
-
if (o) {
|
|
45
|
-
const s = { error: i, resetErrorBoundary: this.resetErrorBoundary };
|
|
46
|
-
if (typeof r == "function") c = r(s);
|
|
47
|
-
else if (e) c = le(e, s);
|
|
48
|
-
else {
|
|
49
|
-
if (n === void 0) throw i;
|
|
50
|
-
c = n;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return le(Jn.Provider, { value: { didCatch: o, error: i, resetErrorBoundary: this.resetErrorBoundary } }, c);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function _t(t) {
|
|
57
|
-
var a, r, e = "";
|
|
58
|
-
if (typeof t == "string" || typeof t == "number") e += t;
|
|
59
|
-
else if (typeof t == "object") if (Array.isArray(t)) for (a = 0; a < t.length; a++) t[a] && (r = _t(t[a])) && (e && (e += " "), e += r);
|
|
60
|
-
else for (a in t) t[a] && (e && (e += " "), e += a);
|
|
61
|
-
return e;
|
|
62
|
-
}
|
|
63
|
-
function he() {
|
|
64
|
-
for (var t, a, r = 0, e = ""; r < arguments.length; ) (t = arguments[r++]) && (a = _t(t)) && (e && (e += " "), e += a);
|
|
65
|
-
return e;
|
|
66
|
-
}
|
|
67
|
-
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, fe = (t, a) => {
|
|
68
|
-
let r = "", e = "", n = "";
|
|
69
|
-
for (let o in t) {
|
|
70
|
-
let i = t[o];
|
|
71
|
-
o[0] == "@" ? o[1] == "i" ? r = o + " " + i + ";" : e += o[1] == "f" ? fe(i, o) : o + "{" + fe(i, o[1] == "k" ? "" : a) + "}" : typeof i == "object" ? e += fe(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 += fe.p ? fe.p(o, i) : o + ":" + i + ";");
|
|
72
|
-
}
|
|
73
|
-
return r + (a && n ? a + "{" + n + "}" : n) + e;
|
|
74
|
-
}, oe = {}, Vt = (t) => {
|
|
75
|
-
if (typeof t == "object") {
|
|
76
|
-
let a = "";
|
|
77
|
-
for (let r in t) a += r + Vt(t[r]);
|
|
78
|
-
return a;
|
|
79
|
-
}
|
|
80
|
-
return t;
|
|
81
|
-
}, ao = (t, a, r, e, n) => {
|
|
82
|
-
let o = Vt(t), i = oe[o] || (oe[o] = ((s) => {
|
|
83
|
-
let l = 0, u = 11;
|
|
84
|
-
for (; l < s.length; ) u = 101 * u + s.charCodeAt(l++) >>> 0;
|
|
85
|
-
return "go" + u;
|
|
86
|
-
})(o));
|
|
87
|
-
if (!oe[i]) {
|
|
88
|
-
let s = o !== t ? t : ((l) => {
|
|
89
|
-
let u, d, m = [{}];
|
|
90
|
-
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();
|
|
91
|
-
return m[0];
|
|
92
|
-
})(t);
|
|
93
|
-
oe[i] = fe(n ? { ["@keyframes " + i]: s } : s, r ? "" : "." + i);
|
|
94
|
-
}
|
|
95
|
-
let c = r && oe.g ? oe.g : null;
|
|
96
|
-
return r && (oe.g = oe[i]), ((s, l, u, d) => {
|
|
97
|
-
d ? l.data = l.data.replace(d, s) : l.data.indexOf(s) === -1 && (l.data = u ? s + l.data : l.data + s);
|
|
98
|
-
})(oe[i], a, e, c), i;
|
|
99
|
-
};
|
|
100
|
-
function ut(t) {
|
|
101
|
-
let a = this || {}, r = t.call ? t(a.p) : t;
|
|
102
|
-
return ao(r.unshift ? r.raw ? ((e, n, o) => e.reduce((i, c, s) => {
|
|
103
|
-
let l = n[s];
|
|
104
|
-
if (l && l.call) {
|
|
105
|
-
let u = l(o), d = u && u.props && u.props.className || /^go/.test(u) && u;
|
|
106
|
-
l = d ? "." + d : u && typeof u == "object" ? u.props ? "" : fe(u, "") : u === !1 ? "" : u;
|
|
107
|
-
}
|
|
108
|
-
return i + c + (l ?? "");
|
|
109
|
-
}, ""))(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);
|
|
110
|
-
}
|
|
111
|
-
function zt(t, a, r) {
|
|
112
|
-
return a && function(e, n) {
|
|
113
|
-
for (var o = 0; o < n.length; o++) {
|
|
114
|
-
var i = n[o];
|
|
115
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
|
|
116
|
-
}
|
|
117
|
-
}(t.prototype, a), t;
|
|
118
|
-
}
|
|
119
|
-
function T() {
|
|
120
|
-
return T = Object.assign || function(t) {
|
|
121
|
-
for (var a = 1; a < arguments.length; a++) {
|
|
122
|
-
var r = arguments[a];
|
|
123
|
-
for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && (t[e] = r[e]);
|
|
124
|
-
}
|
|
125
|
-
return t;
|
|
126
|
-
}, T.apply(this, arguments);
|
|
127
|
-
}
|
|
128
|
-
function Ut(t, a) {
|
|
129
|
-
t.prototype = Object.create(a.prototype), t.prototype.constructor = t, t.__proto__ = a;
|
|
130
|
-
}
|
|
131
|
-
function Ne(t, a) {
|
|
132
|
-
if (t == null) return {};
|
|
133
|
-
var r, e, n = {}, o = Object.keys(t);
|
|
134
|
-
for (e = 0; e < o.length; e++) r = o[e], a.indexOf(r) >= 0 || (n[r] = t[r]);
|
|
135
|
-
return n;
|
|
136
|
-
}
|
|
137
|
-
function Et(t) {
|
|
138
|
-
if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
139
|
-
return t;
|
|
140
|
-
}
|
|
141
|
-
ut.bind({ g: 1 }), ut.bind({ k: 1 });
|
|
142
|
-
var Ct = function() {
|
|
143
|
-
return "";
|
|
144
|
-
}, Gt = S.createContext({ enqueueSnackbar: Ct, closeSnackbar: Ct }), tt = "@media (max-width:599.95px)", Ge = "@media (min-width:600px)", St = function(t) {
|
|
145
|
-
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
146
|
-
}, pt = function(t) {
|
|
147
|
-
return "" + St(t.vertical) + St(t.horizontal);
|
|
148
|
-
}, Re = function(t) {
|
|
149
|
-
return !!t || t === 0;
|
|
150
|
-
}, qe = "unmounted", be = "exited", xe = "entering", Oe = "entered", Dt = "exiting", mt = function(t) {
|
|
151
|
-
function a(e) {
|
|
152
|
-
var n;
|
|
153
|
-
n = t.call(this, e) || this;
|
|
154
|
-
var o, i = e.appear;
|
|
155
|
-
return n.appearStatus = null, e.in ? i ? (o = be, n.appearStatus = xe) : o = Oe : o = e.unmountOnExit || e.mountOnEnter ? qe : be, n.state = { status: o }, n.nextCallback = null, n;
|
|
156
|
-
}
|
|
157
|
-
Ut(a, t), a.getDerivedStateFromProps = function(e, n) {
|
|
158
|
-
return e.in && n.status === qe ? { status: be } : null;
|
|
159
|
-
};
|
|
160
|
-
var r = a.prototype;
|
|
161
|
-
return r.componentDidMount = function() {
|
|
162
|
-
this.updateStatus(!0, this.appearStatus);
|
|
163
|
-
}, r.componentDidUpdate = function(e) {
|
|
164
|
-
var n = null;
|
|
165
|
-
if (e !== this.props) {
|
|
166
|
-
var o = this.state.status;
|
|
167
|
-
this.props.in ? o !== xe && o !== Oe && (n = xe) : o !== xe && o !== Oe || (n = Dt);
|
|
168
|
-
}
|
|
169
|
-
this.updateStatus(!1, n);
|
|
170
|
-
}, r.componentWillUnmount = function() {
|
|
171
|
-
this.cancelNextCallback();
|
|
172
|
-
}, r.getTimeouts = function() {
|
|
173
|
-
var e = this.props.timeout, n = e, o = e;
|
|
174
|
-
return e != null && typeof e != "number" && typeof e != "string" && (o = e.exit, n = e.enter), { exit: o, enter: n };
|
|
175
|
-
}, r.updateStatus = function(e, n) {
|
|
176
|
-
e === void 0 && (e = !1), n !== null ? (this.cancelNextCallback(), n === xe ? this.performEnter(e) : this.performExit()) : this.props.unmountOnExit && this.state.status === be && this.setState({ status: qe });
|
|
177
|
-
}, r.performEnter = function(e) {
|
|
178
|
-
var n = this, o = this.props.enter, i = e, c = this.getTimeouts();
|
|
179
|
-
e || o ? (this.props.onEnter && this.props.onEnter(this.node, i), this.safeSetState({ status: xe }, function() {
|
|
180
|
-
n.props.onEntering && n.props.onEntering(n.node, i), n.onTransitionEnd(c.enter, function() {
|
|
181
|
-
n.safeSetState({ status: Oe }, function() {
|
|
182
|
-
n.props.onEntered && n.props.onEntered(n.node, i);
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
})) : this.safeSetState({ status: Oe }, function() {
|
|
186
|
-
n.props.onEntered && n.props.onEntered(n.node, i);
|
|
187
|
-
});
|
|
188
|
-
}, r.performExit = function() {
|
|
189
|
-
var e = this, n = this.props.exit, o = this.getTimeouts();
|
|
190
|
-
n ? (this.props.onExit && this.props.onExit(this.node), this.safeSetState({ status: Dt }, function() {
|
|
191
|
-
e.props.onExiting && e.props.onExiting(e.node), e.onTransitionEnd(o.exit, function() {
|
|
192
|
-
e.safeSetState({ status: be }, function() {
|
|
193
|
-
e.props.onExited && e.props.onExited(e.node);
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
})) : this.safeSetState({ status: be }, function() {
|
|
197
|
-
e.props.onExited && e.props.onExited(e.node);
|
|
198
|
-
});
|
|
199
|
-
}, r.cancelNextCallback = function() {
|
|
200
|
-
this.nextCallback !== null && this.nextCallback.cancel && (this.nextCallback.cancel(), this.nextCallback = null);
|
|
201
|
-
}, r.safeSetState = function(e, n) {
|
|
202
|
-
n = this.setNextCallback(n), this.setState(e, n);
|
|
203
|
-
}, r.setNextCallback = function(e) {
|
|
204
|
-
var n = this, o = !0;
|
|
205
|
-
return this.nextCallback = function() {
|
|
206
|
-
o && (o = !1, n.nextCallback = null, e());
|
|
207
|
-
}, this.nextCallback.cancel = function() {
|
|
208
|
-
o = !1;
|
|
209
|
-
}, this.nextCallback;
|
|
210
|
-
}, r.onTransitionEnd = function(e, n) {
|
|
211
|
-
this.setNextCallback(n);
|
|
212
|
-
var o = e == null && !this.props.addEndListener;
|
|
213
|
-
this.node && !o ? (this.props.addEndListener && this.props.addEndListener(this.node, this.nextCallback), e != null && setTimeout(this.nextCallback, e)) : setTimeout(this.nextCallback, 0);
|
|
214
|
-
}, r.render = function() {
|
|
215
|
-
var e = this.state.status;
|
|
216
|
-
if (e === qe) return null;
|
|
217
|
-
var n = this.props;
|
|
218
|
-
return (0, n.children)(e, Ne(n, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
|
|
219
|
-
}, zt(a, [{ key: "node", get: function() {
|
|
220
|
-
var e, n = (e = this.props.nodeRef) === null || e === void 0 ? void 0 : e.current;
|
|
221
|
-
if (!n) throw new Error("notistack - Custom snackbar is not refForwarding");
|
|
222
|
-
return n;
|
|
223
|
-
} }]), a;
|
|
224
|
-
}(S.Component);
|
|
225
|
-
function we() {
|
|
226
|
-
}
|
|
227
|
-
function Tt(t, a) {
|
|
228
|
-
typeof t == "function" ? t(a) : t && (t.current = a);
|
|
229
|
-
}
|
|
230
|
-
function dt(t, a) {
|
|
231
|
-
return Z(function() {
|
|
232
|
-
return t == null && a == null ? null : function(r) {
|
|
233
|
-
Tt(t, r), Tt(a, r);
|
|
234
|
-
};
|
|
235
|
-
}, [t, a]);
|
|
236
|
-
}
|
|
237
|
-
function Ke(t) {
|
|
238
|
-
var a = t.timeout, r = t.style, e = r === void 0 ? {} : r, n = t.mode;
|
|
239
|
-
return { duration: typeof a == "object" ? a[n] || 0 : a, easing: e.transitionTimingFunction, delay: e.transitionDelay };
|
|
240
|
-
}
|
|
241
|
-
mt.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: we, onEntering: we, onEntered: we, onExit: we, onExiting: we, onExited: we };
|
|
242
|
-
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)", Kt = function(t) {
|
|
243
|
-
t.scrollTop = t.scrollTop;
|
|
244
|
-
}, Ot = function(t) {
|
|
245
|
-
return Math.round(t) + "ms";
|
|
246
|
-
};
|
|
247
|
-
function ye(t, a) {
|
|
248
|
-
t === void 0 && (t = ["all"]);
|
|
249
|
-
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;
|
|
250
|
-
return (Array.isArray(t) ? t : [t]).map(function(l) {
|
|
251
|
-
var u = typeof n == "string" ? n : Ot(n), d = typeof s == "string" ? s : Ot(s);
|
|
252
|
-
return l + " " + u + " " + i + " " + d;
|
|
253
|
-
}).join(",");
|
|
254
|
-
}
|
|
255
|
-
function $t(t) {
|
|
256
|
-
var a = function(r) {
|
|
257
|
-
return r && r.ownerDocument || document;
|
|
258
|
-
}(t);
|
|
259
|
-
return a.defaultView || window;
|
|
260
|
-
}
|
|
261
|
-
function Be(t, a) {
|
|
262
|
-
if (a) {
|
|
263
|
-
var r = function(e, n) {
|
|
264
|
-
var o, i = n.getBoundingClientRect(), c = $t(n);
|
|
265
|
-
if (n.fakeTransform) o = n.fakeTransform;
|
|
266
|
-
else {
|
|
267
|
-
var s = c.getComputedStyle(n);
|
|
268
|
-
o = s.getPropertyValue("-webkit-transform") || s.getPropertyValue("transform");
|
|
269
|
-
}
|
|
270
|
-
var l = 0, u = 0;
|
|
271
|
-
if (o && o !== "none" && typeof o == "string") {
|
|
272
|
-
var d = o.split("(")[1].split(")")[0].split(",");
|
|
273
|
-
l = parseInt(d[4], 10), u = parseInt(d[5], 10);
|
|
274
|
-
}
|
|
275
|
-
switch (e) {
|
|
276
|
-
case "left":
|
|
277
|
-
return "translateX(" + (c.innerWidth + l - i.left) + "px)";
|
|
278
|
-
case "right":
|
|
279
|
-
return "translateX(-" + (i.left + i.width - l) + "px)";
|
|
280
|
-
case "up":
|
|
281
|
-
return "translateY(" + (c.innerHeight + u - i.top) + "px)";
|
|
282
|
-
default:
|
|
283
|
-
return "translateY(-" + (i.top + i.height - u) + "px)";
|
|
284
|
-
}
|
|
285
|
-
}(t, a);
|
|
286
|
-
r && (a.style.webkitTransform = r, a.style.transform = r);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
var Zt = ne(function(t, a) {
|
|
290
|
-
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, x = Ne(t, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), g = te(null), w = dt(r.ref, g), v = dt(w, a), k = X(function() {
|
|
291
|
-
g.current && Be(n, g.current);
|
|
292
|
-
}, [n]);
|
|
293
|
-
return B(function() {
|
|
294
|
-
if (!o && n !== "down" && n !== "right") {
|
|
295
|
-
var h = function(E, U) {
|
|
296
|
-
var z;
|
|
297
|
-
function H() {
|
|
298
|
-
for (var R = this, G = arguments.length, q = new Array(G), Q = 0; Q < G; Q++) q[Q] = arguments[Q];
|
|
299
|
-
clearTimeout(z), z = setTimeout(function() {
|
|
300
|
-
E.apply(R, q);
|
|
301
|
-
}, U);
|
|
302
|
-
}
|
|
303
|
-
return U === void 0 && (U = 166), H.clear = function() {
|
|
304
|
-
clearTimeout(z);
|
|
305
|
-
}, H;
|
|
306
|
-
}(function() {
|
|
307
|
-
g.current && Be(n, g.current);
|
|
308
|
-
}), P = $t(g.current);
|
|
309
|
-
return P.addEventListener("resize", h), function() {
|
|
310
|
-
h.clear(), P.removeEventListener("resize", h);
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
}, [n, o]), B(function() {
|
|
314
|
-
o || k();
|
|
315
|
-
}, [o, k]), le(mt, Object.assign({ appear: !0, nodeRef: g, onEnter: function(h, P) {
|
|
316
|
-
Be(n, h), Kt(h), l && l(h, P);
|
|
317
|
-
}, onEntered: u, onEntering: function(h) {
|
|
318
|
-
var P = i?.transitionTimingFunction || so, E = Ke({ timeout: s, mode: "enter", style: T({}, i, { transitionTimingFunction: P }) });
|
|
319
|
-
h.style.webkitTransition = ye("-webkit-transform", E), h.style.transition = ye("transform", E), h.style.webkitTransform = "none", h.style.transform = "none";
|
|
320
|
-
}, onExit: function(h) {
|
|
321
|
-
var P = i?.transitionTimingFunction || lo, E = Ke({ timeout: s, mode: "exit", style: T({}, i, { transitionTimingFunction: P }) });
|
|
322
|
-
h.style.webkitTransition = ye("-webkit-transform", E), h.style.transition = ye("transform", E), Be(n, h), d && d(h);
|
|
323
|
-
}, onExited: function(h) {
|
|
324
|
-
h.style.webkitTransition = "", h.style.transition = "", m && m(h);
|
|
325
|
-
}, in: o, timeout: s }, x), function(h, P) {
|
|
326
|
-
return cn(r, T({ ref: v, style: T({ visibility: h !== "exited" || o ? void 0 : "hidden" }, i, {}, r.props.style) }, P));
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
Zt.displayName = "Slide";
|
|
330
|
-
var $e = function(t) {
|
|
331
|
-
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));
|
|
332
|
-
}, co = function() {
|
|
333
|
-
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
|
|
334
|
-
10.59L10 14.17L17.59 6.58L19 8L10 17Z` }));
|
|
335
|
-
}, uo = function() {
|
|
336
|
-
return S.createElement($e, null, S.createElement("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }));
|
|
337
|
-
}, po = function() {
|
|
338
|
-
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,
|
|
339
|
-
6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
|
|
340
|
-
13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z` }));
|
|
341
|
-
}, mo = function() {
|
|
342
|
-
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,
|
|
343
|
-
0 22,12A10,10 0 0,0 12,2Z` }));
|
|
344
|
-
}, pe = { 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: Zt, transitionDuration: { enter: 225, exit: 195 } }, fo = function(t, a) {
|
|
345
|
-
return function(r, e) {
|
|
346
|
-
return e === void 0 && (e = !1), e ? T({}, pe[r], {}, a[r], {}, t[r]) : r === "autoHideDuration" ? (n = t.autoHideDuration, o = a.autoHideDuration, (i = function(c) {
|
|
347
|
-
return typeof c == "number" || c === null;
|
|
348
|
-
})(n) ? n : i(o) ? o : pe.autoHideDuration) : r === "transitionDuration" ? function(c, s) {
|
|
349
|
-
var l = function(u, d) {
|
|
350
|
-
return d.some(function(m) {
|
|
351
|
-
return typeof u === m;
|
|
352
|
-
});
|
|
353
|
-
};
|
|
354
|
-
return l(c, ["string", "number"]) ? c : l(c, ["object"]) ? T({}, pe.transitionDuration, {}, l(s, ["object"]) && s, {}, c) : l(s, ["string", "number"]) ? s : l(s, ["object"]) ? T({}, pe.transitionDuration, {}, s) : pe.transitionDuration;
|
|
355
|
-
}(t.transitionDuration, a.transitionDuration) : t[r] || a[r] || pe[r];
|
|
356
|
-
var n, o, i;
|
|
357
|
-
};
|
|
358
|
-
};
|
|
359
|
-
function Ae(t) {
|
|
360
|
-
return Object.entries(t).reduce(function(a, r) {
|
|
361
|
-
var e, n = r[0], o = r[1];
|
|
362
|
-
return T({}, a, ((e = {})[n] = ut(o), e));
|
|
363
|
-
}, {});
|
|
364
|
-
}
|
|
365
|
-
var ho = "notistack-SnackbarContainer", go = "notistack-Snackbar", Xt = "notistack-CollapseWrapper", ko = "notistack-MuiContent", bo = function(t) {
|
|
366
|
-
return "notistack-MuiContent-" + t;
|
|
367
|
-
}, Lt = Ae({ root: { height: 0 }, entered: { height: "auto" } }), nt = "0px", Qt = ne(function(t, a) {
|
|
368
|
-
var r = t.children, e = t.in, n = t.onExited, o = te(null), i = te(null), c = dt(a, i), s = function() {
|
|
369
|
-
return o.current ? o.current.clientHeight : 0;
|
|
370
|
-
};
|
|
371
|
-
return le(mt, { in: e, unmountOnExit: !0, onEnter: function(l) {
|
|
372
|
-
l.style.height = nt;
|
|
373
|
-
}, onEntered: function(l) {
|
|
374
|
-
l.style.height = "auto";
|
|
375
|
-
}, onEntering: function(l) {
|
|
376
|
-
var u = s(), d = Ke({ timeout: 175, mode: "enter" }), m = d.duration, x = d.easing;
|
|
377
|
-
l.style.transitionDuration = typeof m == "string" ? m : m + "ms", l.style.height = u + "px", l.style.transitionTimingFunction = x || "";
|
|
378
|
-
}, onExit: function(l) {
|
|
379
|
-
l.style.height = s() + "px";
|
|
380
|
-
}, onExited: n, onExiting: function(l) {
|
|
381
|
-
Kt(l);
|
|
382
|
-
var u = Ke({ timeout: 175, mode: "exit" }), d = u.duration, m = u.easing;
|
|
383
|
-
l.style.transitionDuration = typeof d == "string" ? d : d + "ms", l.style.height = nt, l.style.transitionTimingFunction = m || "";
|
|
384
|
-
}, nodeRef: i, timeout: 175 }, function(l, u) {
|
|
385
|
-
return le("div", Object.assign({ ref: c, className: he(Lt.root, l === "entered" && Lt.entered), style: T({ pointerEvents: "all", overflow: "hidden", minHeight: nt, transition: ye("height") }, l === "entered" && { overflow: "visible" }, {}, l === "exited" && !e && { visibility: "hidden" }) }, u), le("div", { ref: o, className: Xt, style: { display: "flex", width: "100%" } }, r));
|
|
386
|
-
});
|
|
387
|
-
});
|
|
388
|
-
Qt.displayName = "Collapse";
|
|
389
|
-
var Mt = { right: "left", left: "right", bottom: "up", top: "down" }, xo = function(t) {
|
|
390
|
-
return "anchorOrigin" + pt(t);
|
|
391
|
-
}, wo = function() {
|
|
392
|
-
};
|
|
393
|
-
function Pe(t, a) {
|
|
394
|
-
return t.reduce(function(r, e) {
|
|
395
|
-
return e == null ? r : function() {
|
|
396
|
-
for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
|
|
397
|
-
var c = [].concat(o);
|
|
398
|
-
a && c.indexOf(a) === -1 && c.push(a), r.apply(this, c), e.apply(this, c);
|
|
399
|
-
};
|
|
400
|
-
}, wo);
|
|
401
|
-
}
|
|
402
|
-
var yo = typeof window < "u" ? it : B;
|
|
403
|
-
function Wt(t) {
|
|
404
|
-
var a = te(t);
|
|
405
|
-
return yo(function() {
|
|
406
|
-
a.current = t;
|
|
407
|
-
}), X(function() {
|
|
408
|
-
return a.current.apply(void 0, arguments);
|
|
409
|
-
}, []);
|
|
410
|
-
}
|
|
411
|
-
var ot, Yt = ne(function(t, a) {
|
|
412
|
-
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 = te(), x = Wt(function() {
|
|
413
|
-
c && c.apply(void 0, arguments);
|
|
414
|
-
}), g = Wt(function(k) {
|
|
415
|
-
c && k != null && (m.current && clearTimeout(m.current), m.current = setTimeout(function() {
|
|
416
|
-
x(null, "timeout", s);
|
|
417
|
-
}, k));
|
|
418
|
-
});
|
|
419
|
-
B(function() {
|
|
420
|
-
return l && g(n), function() {
|
|
421
|
-
m.current && clearTimeout(m.current);
|
|
422
|
-
};
|
|
423
|
-
}, [l, n, g]);
|
|
424
|
-
var w = function() {
|
|
425
|
-
m.current && clearTimeout(m.current);
|
|
426
|
-
}, v = X(function() {
|
|
427
|
-
n != null && g(0.5 * n);
|
|
428
|
-
}, [n, g]);
|
|
429
|
-
return B(function() {
|
|
430
|
-
if (!i && l) return window.addEventListener("focus", v), window.addEventListener("blur", w), function() {
|
|
431
|
-
window.removeEventListener("focus", v), window.removeEventListener("blur", w);
|
|
432
|
-
};
|
|
433
|
-
}, [i, v, l]), le("div", Object.assign({ ref: a }, d, { className: he(go, e), onMouseEnter: function(k) {
|
|
434
|
-
d.onMouseEnter && d.onMouseEnter(k), w();
|
|
435
|
-
}, onMouseLeave: function(k) {
|
|
436
|
-
d.onMouseLeave && d.onMouseLeave(k), v();
|
|
437
|
-
} }), r);
|
|
438
|
-
});
|
|
439
|
-
Yt.displayName = "Snackbar";
|
|
440
|
-
var vo = Ae({ root: (ot = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, ot[Ge] = { flexGrow: "initial", minWidth: "288px" }, ot) }), ft = ne(function(t, a) {
|
|
441
|
-
var r = t.className, e = Ne(t, ["className"]);
|
|
442
|
-
return S.createElement("div", Object.assign({ ref: a, className: he(vo.root, r) }, e));
|
|
443
|
-
});
|
|
444
|
-
ft.displayName = "SnackbarContent";
|
|
445
|
-
var Le = Ae({ 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" } }), Pt = "notistack-snackbar", Jt = ne(function(t, a) {
|
|
446
|
-
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;
|
|
447
|
-
return typeof d == "function" && (d = d(r)), S.createElement(ft, { ref: a, role: "alert", "aria-describedby": Pt, style: s, className: he(ko, bo(i), Le.root, Le[i], l, !c && u && Le.lessPadding) }, S.createElement("div", { id: Pt, className: Le.message }, c ? null : u, e), d && S.createElement("div", { className: Le.action }, d));
|
|
448
|
-
});
|
|
449
|
-
Jt.displayName = "MaterialDesignContent";
|
|
450
|
-
var Me, rt, _e, Ve, at, Eo = ve(Jt), Co = Ae({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), So = function(t) {
|
|
451
|
-
var a = te(), r = J(!0), e = r[0], n = r[1], o = Pe([t.snack.onClose, t.onClose]), i = X(function() {
|
|
452
|
-
a.current = setTimeout(function() {
|
|
453
|
-
n(function(R) {
|
|
454
|
-
return !R;
|
|
455
|
-
});
|
|
456
|
-
}, 125);
|
|
457
|
-
}, []);
|
|
458
|
-
B(function() {
|
|
459
|
-
return function() {
|
|
460
|
-
a.current && clearTimeout(a.current);
|
|
461
|
-
};
|
|
462
|
-
}, []);
|
|
463
|
-
var c, s = t.snack, l = t.classes, u = t.Component, d = u === void 0 ? Eo : u, m = Z(function() {
|
|
464
|
-
return function(R) {
|
|
465
|
-
R === void 0 && (R = {});
|
|
466
|
-
var G = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
|
|
467
|
-
return Object.keys(R).filter(function(q) {
|
|
468
|
-
return !G[q];
|
|
469
|
-
}).reduce(function(q, Q) {
|
|
470
|
-
var ce;
|
|
471
|
-
return T({}, q, ((ce = {})[Q] = R[Q], ce));
|
|
472
|
-
}, {});
|
|
473
|
-
}(l);
|
|
474
|
-
}, [l]), x = s.open, g = s.SnackbarProps, w = s.TransitionComponent, v = s.TransitionProps, k = s.transitionDuration, h = s.disableWindowBlurListener, P = s.content, E = Ne(s, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), U = T({ direction: (c = E.anchorOrigin, c.horizontal !== "center" ? Mt[c.horizontal] : Mt[c.vertical]), timeout: k }, v), z = P;
|
|
475
|
-
typeof z == "function" && (z = z(E.id, E.message));
|
|
476
|
-
var H = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(R, G) {
|
|
477
|
-
var q;
|
|
478
|
-
return T({}, R, ((q = {})[G] = Pe([t.snack[G], t[G]], E.id), q));
|
|
479
|
-
}, {});
|
|
480
|
-
return S.createElement(Qt, { in: e, onExited: H.onExited }, S.createElement(Yt, { open: x, id: E.id, disableWindowBlurListener: h, autoHideDuration: E.autoHideDuration, className: he(Co.wrappedRoot, m.root, m[xo(E.anchorOrigin)]), SnackbarProps: g, onClose: o }, S.createElement(w, Object.assign({}, U, { appear: !0, in: x, onExit: H.onExit, onExited: i, onEnter: H.onEnter, onEntered: Pe([H.onEntered, function() {
|
|
481
|
-
t.snack.requestClose && o(null, "instructed", t.snack.id);
|
|
482
|
-
}], E.id) }), z || S.createElement(d, Object.assign({}, E)))));
|
|
483
|
-
}, We = { default: 20 }, ze = { default: 6, dense: 2 }, Nt = "." + Xt, Ue = Ae({ root: (Me = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: ye(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, Me[Nt] = { padding: ze.default + "px 0px", transition: "padding 300ms ease 0ms" }, Me.maxWidth = "calc(100% - " + 2 * We.default + "px)", Me[tt] = { width: "100%", maxWidth: "calc(100% - 32px)" }, Me), rootDense: (rt = {}, rt[Nt] = { padding: ze.dense + "px 0px" }, rt), top: { top: We.default - ze.default + "px", flexDirection: "column" }, bottom: { bottom: We.default - ze.default + "px", flexDirection: "column-reverse" }, left: (_e = { left: We.default + "px" }, _e[Ge] = { alignItems: "flex-start" }, _e[tt] = { left: "16px" }, _e), right: (Ve = { right: We.default + "px" }, Ve[Ge] = { alignItems: "flex-end" }, Ve[tt] = { right: "16px" }, Ve), center: (at = { left: "50%", transform: "translateX(-50%)" }, at[Ge] = { alignItems: "center" }, at) }), Do = ve(function(t) {
|
|
484
|
-
var a = t.classes, r = a === void 0 ? {} : a, e = t.anchorOrigin, n = t.dense, o = t.children, i = he(ho, Ue[e.vertical], Ue[e.horizontal], Ue.root, r.containerRoot, r["containerAnchorOrigin" + pt(e)], n && Ue.rootDense);
|
|
485
|
-
return S.createElement("div", { className: i }, o);
|
|
486
|
-
}), At = function(t) {
|
|
487
|
-
return !(typeof t == "string" || jt(t));
|
|
488
|
-
}, To = function(t) {
|
|
489
|
-
function a(r) {
|
|
490
|
-
var e;
|
|
491
|
-
return (e = t.call(this, r) || this).enqueueSnackbar = function(n, o) {
|
|
492
|
-
if (o === void 0 && (o = {}), n == null) throw new Error("enqueueSnackbar called with invalid argument");
|
|
493
|
-
var i = At(n) ? n : o, c = At(n) ? n.message : n, s = i.key, l = i.preventDuplicate, u = Ne(i, ["key", "preventDuplicate"]), d = Re(s), m = d ? s : (/* @__PURE__ */ new Date()).getTime() + Math.random(), x = fo(u, e.props), g = T({ id: m }, u, { message: c, open: !0, entered: !1, requestClose: !1, persist: x("persist"), action: x("action"), content: x("content"), variant: x("variant"), anchorOrigin: x("anchorOrigin"), disableWindowBlurListener: x("disableWindowBlurListener"), autoHideDuration: x("autoHideDuration"), hideIconVariant: x("hideIconVariant"), TransitionComponent: x("TransitionComponent"), transitionDuration: x("transitionDuration"), TransitionProps: x("TransitionProps", !0), iconVariant: x("iconVariant", !0), style: x("style", !0), SnackbarProps: x("SnackbarProps", !0), className: he(e.props.className, u.className) });
|
|
494
|
-
return g.persist && (g.autoHideDuration = void 0), e.setState(function(w) {
|
|
495
|
-
if (l === void 0 && e.props.preventDuplicate || l) {
|
|
496
|
-
var v = function(P) {
|
|
497
|
-
return d ? P.id === m : P.message === c;
|
|
498
|
-
}, k = w.queue.findIndex(v) > -1, h = w.snacks.findIndex(v) > -1;
|
|
499
|
-
if (k || h) return w;
|
|
500
|
-
}
|
|
501
|
-
return e.handleDisplaySnack(T({}, w, { queue: [].concat(w.queue, [g]) }));
|
|
502
|
-
}), m;
|
|
503
|
-
}, e.handleDisplaySnack = function(n) {
|
|
504
|
-
return n.snacks.length >= e.maxSnack ? e.handleDismissOldest(n) : e.processQueue(n);
|
|
505
|
-
}, e.processQueue = function(n) {
|
|
506
|
-
var o = n.queue, i = n.snacks;
|
|
507
|
-
return o.length > 0 ? T({}, n, { snacks: [].concat(i, [o[0]]), queue: o.slice(1, o.length) }) : n;
|
|
508
|
-
}, e.handleDismissOldest = function(n) {
|
|
509
|
-
if (n.snacks.some(function(s) {
|
|
510
|
-
return !s.open || s.requestClose;
|
|
511
|
-
})) return n;
|
|
512
|
-
var o = !1, i = !1;
|
|
513
|
-
n.snacks.reduce(function(s, l) {
|
|
514
|
-
return s + (l.open && l.persist ? 1 : 0);
|
|
515
|
-
}, 0) === e.maxSnack && (i = !0);
|
|
516
|
-
var c = n.snacks.map(function(s) {
|
|
517
|
-
return o || s.persist && !i ? T({}, s) : (o = !0, s.entered ? (s.onClose && s.onClose(null, "maxsnack", s.id), e.props.onClose && e.props.onClose(null, "maxsnack", s.id), T({}, s, { open: !1 })) : T({}, s, { requestClose: !0 }));
|
|
518
|
-
});
|
|
519
|
-
return T({}, n, { snacks: c });
|
|
520
|
-
}, e.handleEnteredSnack = function(n, o, i) {
|
|
521
|
-
if (!Re(i)) throw new Error("handleEnteredSnack Cannot be called with undefined key");
|
|
522
|
-
e.setState(function(c) {
|
|
523
|
-
return { snacks: c.snacks.map(function(s) {
|
|
524
|
-
return s.id === i ? T({}, s, { entered: !0 }) : T({}, s);
|
|
525
|
-
}) };
|
|
526
|
-
});
|
|
527
|
-
}, e.handleCloseSnack = function(n, o, i) {
|
|
528
|
-
e.props.onClose && e.props.onClose(n, o, i);
|
|
529
|
-
var c = i === void 0;
|
|
530
|
-
e.setState(function(s) {
|
|
531
|
-
var l = s.snacks, u = s.queue;
|
|
532
|
-
return { snacks: l.map(function(d) {
|
|
533
|
-
return c || d.id === i ? d.entered ? T({}, d, { open: !1 }) : T({}, d, { requestClose: !0 }) : T({}, d);
|
|
534
|
-
}), queue: u.filter(function(d) {
|
|
535
|
-
return d.id !== i;
|
|
536
|
-
}) };
|
|
537
|
-
});
|
|
538
|
-
}, e.closeSnackbar = function(n) {
|
|
539
|
-
var o = e.state.snacks.find(function(i) {
|
|
540
|
-
return i.id === n;
|
|
541
|
-
});
|
|
542
|
-
Re(n) && o && o.onClose && o.onClose(null, "instructed", n), e.handleCloseSnack(null, "instructed", n);
|
|
543
|
-
}, e.handleExitedSnack = function(n, o) {
|
|
544
|
-
if (!Re(o)) throw new Error("handleExitedSnack Cannot be called with undefined key");
|
|
545
|
-
e.setState(function(i) {
|
|
546
|
-
var c = e.processQueue(T({}, i, { snacks: i.snacks.filter(function(s) {
|
|
547
|
-
return s.id !== o;
|
|
548
|
-
}) }));
|
|
549
|
-
return c.queue.length === 0 ? c : e.handleDismissOldest(c);
|
|
550
|
-
});
|
|
551
|
-
}, e.enqueueSnackbar, e.closeSnackbar, e.state = { snacks: [], queue: [], contextValue: { enqueueSnackbar: e.enqueueSnackbar.bind(Et(e)), closeSnackbar: e.closeSnackbar.bind(Et(e)) } }, e;
|
|
552
|
-
}
|
|
553
|
-
return Ut(a, t), a.prototype.render = function() {
|
|
554
|
-
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(g, w) {
|
|
555
|
-
var v, k = pt(w.anchorOrigin), h = g[k] || [];
|
|
556
|
-
return T({}, g, ((v = {})[k] = [].concat(h, [w]), v));
|
|
557
|
-
}, {}), x = Object.keys(m).map(function(g) {
|
|
558
|
-
var w = m[g], v = w[0];
|
|
559
|
-
return S.createElement(Do, { key: g, dense: s, anchorOrigin: v.anchorOrigin, classes: d }, w.map(function(k) {
|
|
560
|
-
return S.createElement(So, { key: k.id, snack: k, classes: d, Component: u[k.variant], onClose: r.handleCloseSnack, onEnter: r.props.onEnter, onExit: r.props.onExit, onExited: Pe([r.handleExitedSnack, r.props.onExited], k.id), onEntered: Pe([r.handleEnteredSnack, r.props.onEntered], k.id) });
|
|
561
|
-
}));
|
|
562
|
-
});
|
|
563
|
-
return S.createElement(Gt.Provider, { value: e }, i, o ? Bn(x, o) : x);
|
|
564
|
-
}, zt(a, [{ key: "maxSnack", get: function() {
|
|
565
|
-
return this.props.maxSnack || pe.maxSnack;
|
|
566
|
-
} }]), a;
|
|
567
|
-
}(Ft), en = function() {
|
|
568
|
-
return ln(Gt);
|
|
569
|
-
};
|
|
570
|
-
const re = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, tn = ne((t, a) => {
|
|
571
|
-
const { id: r, message: e, iconVariant: n, error: o, hideIconVariant: i, ...c } = t, { closeSnackbar: s } = en(), l = un(), [u, d] = J(!1), m = X(() => {
|
|
572
|
-
d((w) => !w);
|
|
573
|
-
}, []), x = X(() => {
|
|
574
|
-
s(r);
|
|
575
|
-
}, [r, s]);
|
|
576
|
-
let g = o?.message;
|
|
577
|
-
return !g && jt(e) && (g = e), g || typeof e != "string" || (g = e), g || (g = `Unknown Error: ${e}`), f(ft, { ref: a, className: st(re.root, "error-snackbar"), children: ae(_n, { className: re.card, style: { backgroundColor: l.palette.error.dark, border: `1px solid ${l.palette.error.dark}` }, children: [ae(Vn, { className: re.actionRoot, children: [i ? null : n?.error, f(zn, { variant: "body2", component: "div", className: re.typography, style: { color: l.palette.text.primary }, children: g }), f("div", { style: { flex: "1 1 auto" } }), ae("div", { className: re.icons, children: [o ? f(ct, { "aria-label": "Show more", size: "small", className: st(re.expand, { [re.expandOpen]: u }), style: { color: l.palette.action.active }, onClick: m, children: f(Xn, {}) }) : null, f(ct, { size: "small", className: re.expand, style: { color: l.palette.action.active }, onClick: x, children: f(Qn, { fontSize: "small" }) })] })] }), o ? f(Un, { in: u, timeout: "auto", unmountOnExit: !0, children: f("div", { className: re.stackTraceContainer, style: { backgroundColor: l.palette.error.light, borderTop: `1px solid ${l.palette.error.main}` }, children: f(dn, { error: o, hideLineNumbers: !0 }) }) }) : null] }) });
|
|
578
|
-
});
|
|
579
|
-
tn.displayName = "ToastError";
|
|
580
|
-
const nn = ve(ne((t, a) => {
|
|
581
|
-
const { commands: r, commandHook: e, scope: n = "workbook", disabled: o = !1, ...i } = t, c = ee((l) => {
|
|
582
|
-
const u = { variant: pn.Menuitem, parentFloat: l.floatReference, commandHook: e, scope: n, disabled: o }, d = ae(It, { children: [f(Ye, { ...u, command: r.getCommand("newWorkbook"), icon: De(f(mn, {})) }), f(fn, { orientation: "horizontal" }), f(Ye, { ...u, command: r.getCommand("openWorkbook"), icon: De(f(hn, {})) }), f(kt, { ...u, commands: r, quickCommand: "saveWorkbook", icon: De(f(bn, {})), createPopupPanel: (m) => {
|
|
583
|
-
const x = { ...u, parentFloat: m.floatReference, scope: "saveWorkbook" }, g = [];
|
|
584
|
-
return me.getWriteFormats().forEach((w) => {
|
|
585
|
-
if (w.isDefault) return;
|
|
586
|
-
let v = null;
|
|
587
|
-
w.key === "CSV" ? v = De(f(gn, {})) : w.key === "Excel" && (v = De(f(kn, {})));
|
|
588
|
-
const k = r.getCommand(`saveWorkbookAs${w.key}`);
|
|
589
|
-
k ? g.push(le(Ye, { ...x, key: w.key, command: k, icon: v })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${w.key}'`);
|
|
590
|
-
}), bt({ ...m, children: g, onClick: () => {
|
|
591
|
-
m.closeFloatAll();
|
|
592
|
-
} });
|
|
593
|
-
} })] });
|
|
594
|
-
return bt({ ...l, children: d, onClick: (m) => {
|
|
595
|
-
m.isDefaultPrevented || l.closeFloatAll();
|
|
596
|
-
} });
|
|
597
|
-
}, [o, r, e, n]), s = "File";
|
|
598
|
-
return f(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: f(xn, { className: "label", icon: null, label: s }) });
|
|
599
|
-
}));
|
|
600
|
-
nn.displayName = "StandaloneFileCommandButton";
|
|
601
|
-
const Oo = f(En, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: f(se, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: f(Cn, { onClick: () => {
|
|
602
|
-
window?.open("https://www.sheetxl.com", "_blank");
|
|
603
|
-
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), on = ve(ne((t, a) => {
|
|
604
|
-
const { commands: r, workbook: e, logo: n = Oo, mainElement: o, showFileMenu: i = !0, showAppearanceMenu: c = !0, ...s } = t, { reference: l } = wn(), [u, { width: d }] = yn(), m = d < 530, x = i ? f(nn, { commands: r, commandHook: { beforeExecute() {
|
|
605
|
-
l?.closeAll();
|
|
606
|
-
}, onError(k, h, P) {
|
|
607
|
-
} } }) : null, g = c ? f(Sn, { commands: r, commandHook: { beforeExecute() {
|
|
608
|
-
l?.closeAll();
|
|
609
|
-
}, onError(k, h, P) {
|
|
610
|
-
} } }) : null, w = Z(() => ({ paddingLeft: (k) => k.spacing(1), paddingRight: (k) => k.spacing(1) }), []), v = te(null);
|
|
611
|
-
return f(se, { ref: Ht([v, u, a]), ...s, children: vn({ commands: r, renderCompact: m, workbook: e, selectWrapper: (k) => ae(se, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (h) => h.spacing(1), paddingLeft: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1) }, children: [ae(se, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (h) => h.spacing(0.5) }, children: [n, ae(se, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (h) => h.spacing(0.25) }, children: [x, k] })] }), f(se, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: o }), f(se, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: m && !g ? "0 0 auto" : "1 1 100%" }, children: g })] }), selectProps: w, toolbarsProps: { Home: { sx: {} } } }) });
|
|
612
|
-
}));
|
|
613
|
-
on.displayName = "StudioToolbar";
|
|
614
|
-
const rn = ve(ne((t, a) => {
|
|
615
|
-
const { workbook: r, setWorkbook: e, refWorkbookTitle: n, titleWorkbook: o, setWorkbookTitle: i, titlePlaceHolder: c, children: s, undoManager: l, commands: u, importExportDisabled: d, themeOptions: m } = t, x = en(), g = x ? x.enqueueSnackbar : () => {
|
|
616
|
-
}, w = x ? x.closeSnackbar : () => {
|
|
617
|
-
}, [v, k] = J({ isMounted: !1, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), h = X(() => {
|
|
618
|
-
k((j) => ({ ...j, isMounted: !0 }));
|
|
619
|
-
}, []), P = X(() => {
|
|
620
|
-
k((j) => ({ ...j, isMounted: !1 }));
|
|
621
|
-
}, []), E = Ln(), U = Mn(), z = Wn(), H = te(/* @__PURE__ */ new Set()), R = Z(() => {
|
|
622
|
-
const j = (b, L) => {
|
|
623
|
-
if (L?.onceKey) {
|
|
624
|
-
if (H.current.has(L.onceKey)) return;
|
|
625
|
-
const W = new Set(H.current);
|
|
626
|
-
W.add(L.onceKey), H.current = W;
|
|
627
|
-
}
|
|
628
|
-
const D = { variant: L?.type ?? He.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: L?.preventDuplicate, persist: L?.persist ?? L?.type === He.Error, action: (W) => f(ct, { onClick: () => w(W), children: f(Yn, {}) }) };
|
|
629
|
-
L?.enqueueProps && Object.assign(D, L.enqueueProps), b || console.log("message is 'null'", L), g(b ?? "Alert", D);
|
|
630
|
-
};
|
|
631
|
-
return { showMessage: j, showBusy: (b, L) => {
|
|
632
|
-
let D = null;
|
|
633
|
-
const W = new Promise((N) => {
|
|
634
|
-
D = N;
|
|
635
|
-
});
|
|
636
|
-
return k((N) => {
|
|
637
|
-
const A = new Map(N.starting);
|
|
638
|
-
return A.set(W, D), { ...N, label: b, starting: A };
|
|
639
|
-
}), W;
|
|
640
|
-
}, showWindow: (b, L, D) => {
|
|
641
|
-
const W = { ...L, onKeyDown: (N) => {
|
|
642
|
-
u?.dispatchToFocusedCommand(N), N.isDefaultPrevented() || N.isPropagationStopped() || L?.onKeyDown?.(N);
|
|
643
|
-
} };
|
|
644
|
-
return E(b, { sort: () => import("./DgC_oaBYpwh1mBi_.mjs"), numberFormat: () => import("./DpTSO921EQ7L_abP.mjs"), hyperlink: () => import("./CXUv64T9mbQbJGgM.mjs"), comments: () => import("./Dl-SlJoaP7EFX-GR.mjs"), find: () => import("./CDRALHzsBIsRPM5g.mjs"), tableDetails: () => import("./DduyjhwDREaxXNzm.mjs"), tableNew: () => import("./wysWhT4-jO-uukUH.mjs"), namedDetails: () => import("./CelDYTh0f7McDj4o.mjs") }[b], W, D);
|
|
645
|
-
}, showOptions: U, showInputOptions: z, showError: (b) => {
|
|
646
|
-
let L, D = He.Error, W = "Unknown Error";
|
|
647
|
-
typeof b == "string" ? W = b : b instanceof Error && (L = b, b.message && (W = b.message)), b instanceof $n && (D = He.Info), j(W, { type: D, enqueueProps: { error: L } });
|
|
648
|
-
} };
|
|
649
|
-
}, []), G = X(() => {
|
|
650
|
-
}, []), q = ((j) => {
|
|
651
|
-
const { workbook: b, setWorkbook: L, importExportDisabled: D, workbookTitle: W = "export", setWorkbookTitle: N, notifier: A, requestWorkbookTitle: Ee, themeOptions: M, undoManager: Ie, commands: ge, onExecute: ie } = j, ue = ee(M?.onModeChange, [M?.onModeChange]), Ze = ee(M?.onEnabledDarkGridChange, [M?.onEnabledDarkGridChange]), Xe = ee(M?.onEnabledDarkImagesChange, [M?.onEnabledDarkImagesChange]), ke = ee(async (O = null, Y = null) => {
|
|
652
|
-
const C = [];
|
|
653
|
-
let p, y = null, V = null;
|
|
654
|
-
if (typeof O == "string" ? V = O : y = O, p = y ? O : await Dn.openFileDialog(V ?? me.getAllReadFormatTypeAsString().join(",")), !p) return null;
|
|
655
|
-
const K = { source: p, createWorkbookOptions: Y, onWarning: (Qe) => {
|
|
656
|
-
C.push(Qe);
|
|
657
|
-
} }, Se = await me.read(K, A);
|
|
658
|
-
return C.length > 0 && (A?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn(`Import warnings:
|
|
659
|
-
` + C.join(`
|
|
660
|
-
`))), Se;
|
|
661
|
-
}, [ie, A, b]), Fe = ee(async (O, Y, C) => {
|
|
662
|
-
if (!Y && Ee) {
|
|
663
|
-
const p = await Ee("Enter Workbook name to " + (C.isDefault ? "Save." : `Export as ${C.description}.`));
|
|
664
|
-
return p !== null && me.writeFile(p, O, { formatType: C.key });
|
|
665
|
-
}
|
|
666
|
-
return me.writeFile(Y, O, { formatType: C.key });
|
|
667
|
-
}, [A, b, Ee]), F = X(() => ({ contains: (O) => !0, focus() {
|
|
668
|
-
} }), []), de = Z(() => {
|
|
669
|
-
const O = [];
|
|
670
|
-
D || (me.getWriteFormats().forEach((C) => {
|
|
671
|
-
const p = C.isDefault, y = { label: p ? "Save Workbook" : `Save Workbook as ${C.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${C.description}` }, tags: C.tags, description: `Save the workbook to the desktop${p ? "" : ` as ${C.description}`}.` };
|
|
672
|
-
p && (y.shortcut = { key: "S", modifiers: [Te.Ctrl] }, O.push(new $("saveWorkbookAs", F, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Te.Shift, Te.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
|
|
673
|
-
Fe(b, null, C).catch((K) => {
|
|
674
|
-
A?.showError?.(K);
|
|
675
|
-
});
|
|
676
|
-
})));
|
|
677
|
-
const V = p ? "saveWorkbook" : `saveWorkbookAs${C.key}`;
|
|
678
|
-
O.push(new $(V, F, y, (K) => {
|
|
679
|
-
Fe(b, K ?? W, C).catch((Se) => {
|
|
680
|
-
A?.showError?.(Se);
|
|
681
|
-
});
|
|
682
|
-
}));
|
|
683
|
-
}), O.push(new $("openWorkbook", F, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [Te.Ctrl] } }, async (C = null) => {
|
|
684
|
-
const p = { date1904: b.isDate1904(), ...b.options };
|
|
685
|
-
try {
|
|
686
|
-
const y = await ke(C, p);
|
|
687
|
-
if (!y) return;
|
|
688
|
-
const V = y.title, K = y.workbook, Se = K.getSelectedSheet();
|
|
689
|
-
if (y.formatType.mimeType === "text/csv") {
|
|
690
|
-
const Qe = b.findValidSheetName(V);
|
|
691
|
-
await b.doBatch(async () => {
|
|
692
|
-
const gt = Se.getUsedRange();
|
|
693
|
-
if (!gt) return void A?.showMessage("The file appears to be blank.");
|
|
694
|
-
await b.getSheets().add({ name: Qe, autoSelect: !0 }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }).copyFrom(gt);
|
|
695
|
-
}, `Import CSV '${V}'`);
|
|
696
|
-
} else b?.close(), N?.(V), L(K);
|
|
697
|
-
} catch (y) {
|
|
698
|
-
A?.showError?.(y);
|
|
699
|
-
}
|
|
700
|
-
})), O.push(new $("openWorkbookFromUrl", F, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(C) {
|
|
701
|
-
if (!C) {
|
|
702
|
-
const p = await A?.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"] });
|
|
703
|
-
if (p.option !== "Open") return;
|
|
704
|
-
C = p.input;
|
|
705
|
-
}
|
|
706
|
-
C && console.log("openWorkbookFromUrl", C);
|
|
707
|
-
})));
|
|
708
|
-
let Y = [];
|
|
709
|
-
return M && (Y = [new $("themeMode", F, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new $("defaultThemeMode", F, { 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 $("enableDarkGrid", F, { 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 $("enableDarkImages", F, { 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." })]), [...O, ...Y, new xt("help", F, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
|
|
710
|
-
}), new xt("showKeyboardShortcuts", F, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [Te.Ctrl] } }, () => {
|
|
711
|
-
}), new $("gotoUrlGithub", F, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
|
|
712
|
-
window?.open("https://github.com/sheetxl/sheetxl");
|
|
713
|
-
}), new $("gotoUrlDiscord", F, { label: "Discord", description: "Join our community on discord." }, () => {
|
|
714
|
-
window?.open("https://discord.gg/NTKdwUgK9p");
|
|
715
|
-
}), new $("gotoUrlDocumentation", F, { label: "Documentation", description: "Read the documentation." }, () => {
|
|
716
|
-
window?.open("https://www.sheetxl.com/docs");
|
|
717
|
-
}), new $("gotoUrlIssue", F, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
|
|
718
|
-
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
719
|
-
})];
|
|
720
|
-
}, [b, W, A, D, M, ge, Ie]), _ = Z(() => {
|
|
721
|
-
let O = null;
|
|
722
|
-
return O = ge ? ge.createChildGroup(F, "standaloneWorkbook", !1) : new Rt(F, "standaloneWorkbook"), O.addCommands(de, !0), O;
|
|
723
|
-
}, [ge, de]);
|
|
724
|
-
Tn({ manager: Ie, commands: _, notifier: A });
|
|
725
|
-
const { themeMode: Ce } = qt();
|
|
726
|
-
B(() => {
|
|
727
|
-
if (!M || !_) return;
|
|
728
|
-
const O = M.mode === "dark" || !M.mode && Ce === "dark";
|
|
729
|
-
_.getCommand("themeMode").update({ state: M.mode ?? null, label: O ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: O ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
|
|
730
|
-
ue(O ? lt.Light : lt.Dark);
|
|
731
|
-
}), _.getCommand("defaultThemeMode").update({ state: !M.mode }).updateCallback(() => {
|
|
732
|
-
ue(null);
|
|
733
|
-
}), _.getCommand("enableDarkGrid").update({ state: M.enableDarkGrid }).updateCallback(() => {
|
|
734
|
-
Ze(!M.enableDarkGrid);
|
|
735
|
-
}), _.getCommand("enableDarkImages").update({ state: M.enableDarkImages }).updateCallback(() => {
|
|
736
|
-
Xe(!M.enableDarkImages);
|
|
737
|
-
});
|
|
738
|
-
}, [Ce, M, de]);
|
|
739
|
-
const { showModal: je } = On();
|
|
740
|
-
return B(() => {
|
|
741
|
-
const O = () => new Promise((Y, C) => {
|
|
742
|
-
const p = S.lazy(() => import("./Bz6NqTbktTH8Df6_.mjs")), y = je(p, { title: "Shortcut Keys Reference", commands: _, onDone: () => {
|
|
743
|
-
y.hide();
|
|
744
|
-
}, TransitionProps: { onExited: () => {
|
|
745
|
-
Y(!0);
|
|
746
|
-
} } });
|
|
747
|
-
});
|
|
748
|
-
_.getCommand("showKeyboardShortcuts").updateCallback(() => O()), _.getCommand("help").updateCallback(() => O());
|
|
749
|
-
}, [de, _]), _;
|
|
750
|
-
})({ workbook: r, setWorkbook: e, importExportDisabled: d, workbookTitle: o, setWorkbookTitle: i, commands: u, requestWorkbookTitle: (j) => new Promise((b) => {
|
|
751
|
-
n.current ? n.current.requestWorkbookTitle((L, D) => {
|
|
752
|
-
b(L);
|
|
753
|
-
}, { selectAll: !0, requestReason: j }) : b(c);
|
|
754
|
-
}), themeOptions: m, undoManager: l, notifier: R, onExecute: G });
|
|
755
|
-
B(() => {
|
|
756
|
-
v.starting.size <= 0 || !v.isMounted || k((j) => {
|
|
757
|
-
const b = new Map(j.running);
|
|
758
|
-
return j.starting.forEach((L, D) => {
|
|
759
|
-
const W = () => {
|
|
760
|
-
k((N) => {
|
|
761
|
-
const A = new Map(N.running);
|
|
762
|
-
return A.delete(D), { ...N, running: A };
|
|
763
|
-
});
|
|
764
|
-
};
|
|
765
|
-
b.set(D, W), L(W);
|
|
766
|
-
}), { ...j, starting: /* @__PURE__ */ new Map(), running: b };
|
|
767
|
-
});
|
|
768
|
-
}, [v]);
|
|
769
|
-
const [Q, ce] = J(null);
|
|
770
|
-
B(() => {
|
|
771
|
-
v.starting.size !== 0 || v.running.size !== 0 ? ce(f(Bt, { icon: f(Pn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: v.label, onMount: h, onUnmount: P, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : ce(null);
|
|
772
|
-
}, [v.starting, v.running]);
|
|
773
|
-
const ht = Z(() => f(Nn, { commands: q, disableHover: !0, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [q]), I = { notifier: R, commands: q };
|
|
774
|
-
return r && (I.statusBarProps = { childrenEnd: ht }), ae(It, { children: [Q, s ? S.cloneElement(s, I) : null] });
|
|
775
|
-
}));
|
|
776
|
-
rn.displayName = "SnackbarAndCommandsWrapper";
|
|
777
|
-
const an = ve(ne((t, a) => {
|
|
778
|
-
const { className: r, sx: e, style: n, onElementLoad: o, onError: i, undoManager: c, errorPanel: s = An, onKeyDown: l, workbook: u, createWorkbookOptions: d, onWorkbookChange: m, logo: x, importExportDisabled: g = !1, themeOptions: w, autoFocus: v = !1, commands: k, title: h, onTitleChange: P, titleProps: E, renderLoadingPanel: U, ...z } = t, H = te(null), R = ee(m, [m]), G = ee(P ?? E?.onTitleChange, [P ?? E?.onTitleChange]), q = E?.placeHolder ?? "Untitled", Q = w?.mode, { themeMode: ce, source: ht } = qt({ mode: Q }), I = Z(() => ({ ...w, light: wt(!1, Je.deepMerge(w?.theme ?? {}, w?.light ?? {})), dark: wt(!0, Je.deepMerge(w?.theme ?? {}, w?.dark ?? {})) }), [w]), j = ce === lt.Dark, [b, L] = J(null);
|
|
779
|
-
B(() => {
|
|
780
|
-
L(c ?? new Zn());
|
|
781
|
-
}, [c]);
|
|
782
|
-
const [D, W] = J(null), [N, A] = J(null), Ee = In();
|
|
783
|
-
it(() => {
|
|
784
|
-
if (!u || Object.keys(u).length === 0 && !Je.isPromiseLike(u)) {
|
|
785
|
-
const p = { theme: Ee.getDefaultTheme(), ...d };
|
|
786
|
-
A(new yt(p));
|
|
787
|
-
} else A(u);
|
|
788
|
-
}, [u]), it(() => {
|
|
789
|
-
if (N) {
|
|
790
|
-
if (N instanceof yt) return W({ workbook: N }), void (u !== N && R?.(N));
|
|
791
|
-
(async () => {
|
|
792
|
-
try {
|
|
793
|
-
let p, y = await Promise.resolve(N);
|
|
794
|
-
y && y.source && (y = await me.read(y)), y.workbook ? (ue(y.title), p = y.workbook) : p = y, R?.(p), W({ workbook: p });
|
|
795
|
-
} catch (p) {
|
|
796
|
-
R?.(null), W({ error: p });
|
|
797
|
-
}
|
|
798
|
-
})();
|
|
799
|
-
}
|
|
800
|
-
}, [N]);
|
|
801
|
-
const [M, Ie] = J(null);
|
|
802
|
-
B(() => {
|
|
803
|
-
if (!b || !D) return;
|
|
804
|
-
b.clear();
|
|
805
|
-
const p = D?.workbook?.getTransactions();
|
|
806
|
-
if (p)
|
|
807
|
-
return p.addListener({ onCommitEnd: (y) => {
|
|
808
|
-
y.getDescription() ? b.addUndoOperation({ description: y.getDescription(), undo: () => (p.revert(y.getId()), M.source?.focus(), () => {
|
|
809
|
-
p.restore(y.getId()), M.source?.focus();
|
|
810
|
-
}) }) : console.warn("commit has no description", y);
|
|
811
|
-
} });
|
|
812
|
-
}, [b, D, M]);
|
|
813
|
-
const ge = ee((p) => {
|
|
814
|
-
p ? b.setRepeatableOperation({ description: p.label(), repeat: async () => p.execute() }) : b.setRepeatableOperation(null);
|
|
815
|
-
}, [b]), [ie, ue] = J(h ?? E?.title ?? "");
|
|
816
|
-
B(() => {
|
|
817
|
-
ue(h ?? E?.title ?? "");
|
|
818
|
-
}, [h ?? E?.title]), B(() => {
|
|
819
|
-
G?.(ie);
|
|
820
|
-
}, [ie]);
|
|
821
|
-
const [Ze, Xe] = J(null), ke = Z(() => {
|
|
822
|
-
const p = () => ({ contains: (y) => !0, focus() {
|
|
823
|
-
} });
|
|
824
|
-
return k ? k.createChildGroup(p, "application", !1) : new Rt(p, "application");
|
|
825
|
-
}, [k]), Fe = ee((p) => {
|
|
826
|
-
Xe(p.source.getViewportElement()), Ie(p), ke.activate("sheet"), o?.(p);
|
|
827
|
-
}, [ke]);
|
|
828
|
-
B(() => {
|
|
829
|
-
M && v && M.source?.focus(typeof v == "object" ? v : void 0);
|
|
830
|
-
}, [M]);
|
|
831
|
-
const F = te(null), de = X((p) => {
|
|
832
|
-
let y = null;
|
|
833
|
-
return E?.hidden || (y = f(Fn, { ...E, style: { maxWidth: "100%", ...E?.style }, workbook: H.current, ref: F, title: ie, placeHolder: q, onTitleChange: (V) => {
|
|
834
|
-
ue(V);
|
|
835
|
-
} })), f(on, { ...p, logo: x, mainElement: y, showFileMenu: !g, showAppearanceMenu: !!(I?.onEnabledDarkGridChange || I?.onEnabledDarkImagesChange || I?.onModeChange) });
|
|
836
|
-
}, [x, ie, E, I, g, ke]);
|
|
837
|
-
B(() => {
|
|
838
|
-
const p = (y) => y.preventDefault();
|
|
839
|
-
return H.current?.addEventListener("wheel", p, { passive: !1 }), () => {
|
|
840
|
-
H.current?.removeEventListener("wheel", p);
|
|
841
|
-
};
|
|
842
|
-
}, []);
|
|
843
|
-
const _ = Z(() => {
|
|
844
|
-
const p = { transparentBackground: !0 };
|
|
845
|
-
return f(se, { sx: e, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...n }, children: U?.(p) ?? f(Bt, { ...p }) });
|
|
846
|
-
}, [e, n, U]), Ce = X(({ error: p }) => (i?.(p), f(s, { sx: e, style: n, error: p ?? "Unable to display empty workbook." })), [e, n, i]), je = Z(() => ({ ...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]), O = Ht([H, a]), Y = Z(() => {
|
|
847
|
-
if (!D) return _;
|
|
848
|
-
if (D.error || !D.workbook) return Ce({ error: D.error });
|
|
849
|
-
let p = null, y = null, V = !1;
|
|
850
|
-
return I && (p = j ? I.dark : I.light, y = j && I.enableDarkGrid ? I.dark : I.light, V = I.enableDarkImages), f(jn, { sx: je, style: n, tabIndex: 0, autoFocus: !0, workbook: D.workbook, ref: O, renderToolbar: de, onElementLoad: Fe, onRepeatCommandChange: ge, onKeyDown: (K) => {
|
|
851
|
-
l?.(K);
|
|
852
|
-
}, renderLoadingPanel: U, gridTheme: y, headersTheme: p, enableDarkImages: V, className: st(r, "sheetxl-workbook"), onContextMenu: (K) => K.preventDefault(), ...z }, "WorkbookElement");
|
|
853
|
-
}, [D, ie, b, _, U, I, z, de, je]);
|
|
854
|
-
let C = f(eo, { fallbackRender: Ce, children: f(To, { maxSnack: 3, domRoot: Ze, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (p, y, V) => {
|
|
855
|
-
H.current?.focus();
|
|
856
|
-
}, Components: { error: tn }, iconVariant: { success: f(Gn, { 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(Rn, { style: { marginRight: "8px" } }) }, children: f(Hn, { children: f(rn, { workbook: D?.workbook, setWorkbook: A, importExportDisabled: g, titlePlaceHolder: q, titleWorkbook: ie, setWorkbookTitle: ue, refWorkbookTitle: F, commands: ke, undoManager: b, themeOptions: I, children: Y }) }) }) });
|
|
857
|
-
return I && (C = ae(qn, { theme: j ? I.dark : I.light, children: [I.cssBaseline ? f(Kn, {}) : null, C] })), C;
|
|
858
|
-
}));
|
|
859
|
-
an.displayName = "EagerStudio";
|
|
860
|
-
const jo = Object.freeze(Object.defineProperty({ __proto__: null, default: an }, Symbol.toStringTag, { value: "Module" }));
|
|
861
|
-
export {
|
|
862
|
-
jo as E,
|
|
863
|
-
he as c
|
|
864
|
-
};
|