@fileverse-dev/dsheet 4.1.24-stabilise-package-1 → 4.1.24-stabilise-package-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/components/skeleton-loader.d.ts +2 -1
- package/dist/{executeStringFunction-CT-4of9q.js → executeStringFunction--gHt0G5o.js} +2 -2
- package/dist/formula.js +1 -1
- package/dist/{index-CfRtF9ry.js → index-DTkdULNT.js} +179 -175
- package/dist/index.es.js +2 -2
- package/dist/sheet-engine/core/modules/cell-shift-dep-graph.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/rowcol-dep-graph.test.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{use-xlsx-import-impl-Yyav1K_X.js → use-xlsx-import-impl-DhCtyQw6.js} +4 -4
- package/dist/{xlsx-defined-names-D6d7zKHF.js → xlsx-defined-names-COueA4FW.js} +2 -2
- package/dist/{xlsx-export-impl-BHJqLH7w.js → xlsx-export-impl-lfDXFnFW.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-DGb-w2IM.js → xlsx-hyperlink-inline-Dyo_PyAb.js} +2 -2
- package/package.json +1 -1
|
@@ -3,10 +3,10 @@ var $W = (e, t, l) => t in e ? _W(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var He = (e, t, l) => $W(e, typeof t != "symbol" ? t + "" : t, l);
|
|
4
4
|
import { jsx as d, jsxs as R, Fragment as Lt } from "react/jsx-runtime";
|
|
5
5
|
import pt, { useRef as Le, useContext as It, useState as Ve, useMemo as lt, useEffect as xe, useCallback as Ge, useLayoutEffect as cl, forwardRef as Yh, useSyncExternalStore as Cp, createElement as su, useImperativeHandle as e5, createContext as xh, memo as t5 } from "react";
|
|
6
|
-
import { g as Jo, a as Oe, d as $t, r as el, h as Gc, j as Qt, k as rd, i as un, l as Pe, m as na, n as cu, o as l5, p as on, q as ad, s as Io, S as dd, t as dr, u as n5, v as i5, w as wh, x as Rp, y as gn, z as vp, A as Kn, B as Nt, C as Qi, D as Lh, E as lc, F as o5, G as nc, H as s5, I as xt, J as Pt, K as Bp, L as rl, M as
|
|
6
|
+
import { g as Jo, a as Oe, d as $t, r as el, h as Gc, j as Qt, k as rd, i as un, l as Pe, m as na, n as cu, o as l5, p as on, q as ad, s as Io, S as dd, t as dr, u as n5, v as i5, w as wh, x as Rp, y as gn, z as vp, A as Kn, B as Nt, C as Qi, D as Lh, E as lc, F as o5, G as nc, H as s5, I as xt, J as Pt, K as Bp, L as rl, M as fi, N as c5, O as ia, P as en, Q as Fn, R as vl, T as tl, U as Jn, V as M1, W as Ch, X as r5, Y as ic, Z as Xo, _ as gi, $ as O1, a0 as Mi, a1 as a5, a2 as Hp, a3 as oc, a4 as oa, a5 as kp, a6 as Hn, a7 as d5, a8 as Vo, a9 as u5, aa as Mn, ab as Rh, ac as vh, ad as bl, ae as Gl, af as Bh, ag as Hh, ah as To, ai as ur, aj as h5, ak as hn, al as kh, am as Fh, an as m5, ao as Fp, ap as Jp, aq as Tp, ar as Np, as as Up, at as Kp, au as hr, av as ru, aw as Mp, ax as Op, ay as zp, az as au, aA as Ep, aB as Dp, aC as b5, aD as qi, aE as Pp, aF as Ap, aG as jp, aH as Qp, aI as qp, aJ as _p, aK as Z5, aL as $p, aM as eI, aN as tI, aO as lI, aP as du, aQ as nI, aR as iI, aS as Jh, aT as So, aU as Yo, aV as oI, aW as sI, aX as Th, aY as cI, aZ as rI, a_ as aI, a$ as dI, b0 as p5, b1 as sa, b2 as I5, b3 as uI, b4 as sc, b5 as Vn, b6 as Wc, b7 as y5, b8 as Nh, b9 as yo, ba as oi, bb as f5, bc as g5, bd as vs, be as G5, bf as W5, bg as ud, bh as Uh, bi as X5, bj as V5, bk as S5, bl as Y5, bm as x5, bn as ca, bo as si, bp as Bl, bq as al, br as xo, bs as Kh, bt as w5, bu as L5, bv as hI, bw as C5, bx as Bs, by as Tn, bz as sl, bA as R5, bB as ra, bC as wo, bD as Mh, bE as $l, bF as aa, bG as Gi, bH as da, bI as mr, bJ as ua, bK as v5, bL as Oh, bM as zh, bN as Eh, bO as B5, bP as jl, bQ as H5, bR as mI, bS as yn, bT as Oi, bU as ho, bV as br, bW as k5, bX as F5, bY as Rl, bZ as J5, b_ as Hs, b$ as T5, c0 as On, c1 as _i, c2 as ha, c3 as fl, c4 as il, c5 as cc, c6 as rc, c7 as bI, c8 as ZI, c9 as Ji, ca as ma, cb as N5, cc as U5, cd as K5, ce as M5, cf as O5, cg as Ac, ch as z5, ci as E5, cj as D5, ck as P5, cl as Zr, cm as zl, cn as A5, co as pI, cp as II, cq as j5, cr as uu, cs as Dh, ct as ac, cu as ba, cv as Q5, cw as yI, cx as mo, cy as hu, cz as q5, cA as fI, cB as gI, cC as _5, cD as GI, cE as Ph, cF as WI, cG as XI, cH as $5, cI as Za, cJ as VI, cK as Ah, cL as SI, cM as YI, cN as xI, cO as wI, cP as LI, cQ as pa, cR as Ia, cS as CI, cT as ql, cU as jh, cV as Qh, cW as e3, cX as RI, cY as vI, cZ as hi, c_ as Nn, c$ as t3, d0 as BI, d1 as qh, d2 as mi, d3 as bi, d4 as jc, d5 as l3, d6 as n3, d7 as i3, d8 as pr, d9 as o3, da as HI, db as kI, dc as s3, dd as Ir, de as _h, df as FI, dg as c3, dh as $h, di as JI, dj as TI, dk as NI, dl as r3, dm as a3, dn as UI, dp as mu, dq as KI, dr as MI, ds as d3, dt as u3, du as OI, dv as h3, dw as m3, dx as bu, dy as ya, dz as Zu, dA as zI, dB as bo, dC as b3, dD as Z3, dE as EI, dF as DI, dG as PI, dH as AI, dI as jI, dJ as Gn, dK as em, dL as p3, dM as QI, dN as qI, dO as tm, dP as _I, dQ as I3, dR as y3, dS as yr, dT as $I, dU as f3, dV as g3, dW as G3, dX as ey, dY as pu, dZ as ty, d_ as li, d$ as ly, e0 as ny, e1 as iy, e2 as W3, e3 as Iu, e4 as ks, e5 as X3, e6 as oy, e7 as sy, e8 as yu, e9 as lm, ea as V3, eb as fu, ec as S3, ed as fr, ee as nm, ef as im, eg as om, eh as gu, ei as cy, ej as ry, ek as ay, el as Y3, em as x3, en as w3, eo as L3, ep as C3, eq as Fs, er as Js, es as Zo, et as dy, eu as R3, ev as uy, ew as hy, ex as Gu, ey as my, ez as by, eA as v3, eB as B3, eC as H3, eD as k3, eE as z1, eF as Zy, eG as py, eH as Iy, eI as yy, c as ci, eJ as F3, eK as J3, eL as T3, eM as N3, eN as U3, eO as hd, eP as K3, eQ as M3, eR as O3, eS as z3, eT as E3, eU as D3, eV as P3, e as sm, f as fa, eW as A3, eX as j3, eY as E1, eZ as D1, e_ as P1, e$ as A1, f0 as Q3, f1 as q3, f2 as j1 } from "./executeStringFunction--gHt0G5o.js";
|
|
7
7
|
import * as Ue from "yjs";
|
|
8
8
|
import { b as _3, i as $3, a as eX, m as tX, p as Wu, E as fy, C as md, c as Q1, T as lX, H as nX, d as iX, D as gy } from "./constants-8Ij49Lxv.js";
|
|
9
|
-
import { t as Ll, f as
|
|
9
|
+
import { t as Ll, f as Ti, m as oX, b as sX, s as cX, u as rX, c as aX } from "./persistence-utils-CSKBobX8.js";
|
|
10
10
|
import $, { isObject as Gy } from "lodash";
|
|
11
11
|
import ol, { produce as dX, applyPatches as Wy, produceWithPatches as uX, enablePatches as hX, isDraft as mX, current as bX } from "immer";
|
|
12
12
|
import { IndexeddbPersistence as Xy } from "y-indexeddb";
|
|
@@ -57,7 +57,7 @@ var Yy = { exports: {} };
|
|
|
57
57
|
})();
|
|
58
58
|
})(Yy);
|
|
59
59
|
var OX = Yy.exports;
|
|
60
|
-
const
|
|
60
|
+
const Zi = /* @__PURE__ */ Jo(OX);
|
|
61
61
|
function lb(e, t) {
|
|
62
62
|
return t <= 0 ? e : e.slice(t);
|
|
63
63
|
}
|
|
@@ -1989,14 +1989,14 @@ function a9(e, t) {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
function Vu(e) {
|
|
1992
|
-
return e == null ? !1 : !
|
|
1992
|
+
return e == null ? !1 : !fi(e.v) || e.m != null && String(e.m).trim() !== "";
|
|
1993
1993
|
}
|
|
1994
1994
|
function Ya(e, t, l) {
|
|
1995
1995
|
var o;
|
|
1996
1996
|
const n = (o = e[t]) == null ? void 0 : o[l];
|
|
1997
1997
|
if (n == null) return "";
|
|
1998
1998
|
const i = rl(t, l, e, "m");
|
|
1999
|
-
return i != null && String(i).trim() !== "" ? String(i) :
|
|
1999
|
+
return i != null && String(i).trim() !== "" ? String(i) : fi(n.v) ? "" : String(n.v);
|
|
2000
2000
|
}
|
|
2001
2001
|
function Oy(e) {
|
|
2002
2002
|
var l, n, i;
|
|
@@ -2270,7 +2270,7 @@ function pm(e, t, l) {
|
|
|
2270
2270
|
}
|
|
2271
2271
|
];
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2273
|
+
function Xi(e) {
|
|
2274
2274
|
var t;
|
|
2275
2275
|
return !e.length || !((t = e[0]) != null && t.length) ? null : [
|
|
2276
2276
|
{
|
|
@@ -2411,7 +2411,7 @@ function ym(e) {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
function qy(e, t, l) {
|
|
2413
2413
|
if (t == null || String(t).trim() === "") return [];
|
|
2414
|
-
const n =
|
|
2414
|
+
const n = Xi(l);
|
|
2415
2415
|
return n == null ? [] : mn(
|
|
2416
2416
|
t,
|
|
2417
2417
|
n,
|
|
@@ -2624,7 +2624,7 @@ function $y(e, t, l, n = "thisSheet", i = "next", o) {
|
|
|
2624
2624
|
{ row: [P, P], column: [K, K] }
|
|
2625
2625
|
]), Jn(e, P, K), { alertMsg: null, matchIndex: 0, matchTotal: 0 };
|
|
2626
2626
|
}
|
|
2627
|
-
const r = n === "specificRange" && o != null ? [o] :
|
|
2627
|
+
const r = n === "specificRange" && o != null ? [o] : Xi(s);
|
|
2628
2628
|
if (r == null)
|
|
2629
2629
|
return { alertMsg: c.noFindTip, matchIndex: 0, matchTotal: 0 };
|
|
2630
2630
|
const h = mn(
|
|
@@ -2693,7 +2693,7 @@ function ef(e, t, l, n = "thisSheet", i) {
|
|
|
2693
2693
|
}
|
|
2694
2694
|
const c = Pe(e);
|
|
2695
2695
|
if (c == null) return o;
|
|
2696
|
-
const s = n === "specificRange" && i != null ? [i] :
|
|
2696
|
+
const s = n === "specificRange" && i != null ? [i] : Xi(c);
|
|
2697
2697
|
if (s == null) return o;
|
|
2698
2698
|
const r = mn(
|
|
2699
2699
|
t,
|
|
@@ -2744,7 +2744,7 @@ function tf(e, t, l, n, i) {
|
|
|
2744
2744
|
const s = Pe(e);
|
|
2745
2745
|
if (t === "" || t == null || s == null)
|
|
2746
2746
|
return o.searchInputTip;
|
|
2747
|
-
const r = i != null ? [i] :
|
|
2747
|
+
const r = i != null ? [i] : Xi(s);
|
|
2748
2748
|
if (r == null)
|
|
2749
2749
|
return o.noReplceTip;
|
|
2750
2750
|
const h = mn(
|
|
@@ -2857,7 +2857,7 @@ function lf(e, t, l, n, i) {
|
|
|
2857
2857
|
const s = Pe(e);
|
|
2858
2858
|
if (t === "" || t == null || s == null)
|
|
2859
2859
|
return { ok: !1, message: o.searchInputTip };
|
|
2860
|
-
const r = i != null ? [i] :
|
|
2860
|
+
const r = i != null ? [i] : Xi(s);
|
|
2861
2861
|
if (r == null)
|
|
2862
2862
|
return { ok: !1, message: o.noReplceTip };
|
|
2863
2863
|
const h = mn(
|
|
@@ -3158,7 +3158,7 @@ function of(e, t, l, n, i, o, c, s) {
|
|
|
3158
3158
|
return setTimeout(S, 0), r;
|
|
3159
3159
|
}
|
|
3160
3160
|
function sf(e, t, l, n, i) {
|
|
3161
|
-
const o =
|
|
3161
|
+
const o = Xi(l), c = new AbortController();
|
|
3162
3162
|
return t == null || String(t).trim() === "" || o == null ? (setTimeout(() => i([]), 0), c) : of(
|
|
3163
3163
|
t,
|
|
3164
3164
|
o,
|
|
@@ -3267,16 +3267,16 @@ function wa(e) {
|
|
|
3267
3267
|
if (!Nt(e)) return;
|
|
3268
3268
|
Xo(e);
|
|
3269
3269
|
const l = Oe(e, e.currentSheetId);
|
|
3270
|
-
e.luckysheet_filter_save = void 0, e.filterOptions = void 0, e.filterContextMenu = void 0, e.filter = {},
|
|
3270
|
+
e.luckysheet_filter_save = void 0, e.filterOptions = void 0, e.filterContextMenu = void 0, e.filter = {}, gi(e), l != null && (e.luckysheetfile[l].filter = void 0, e.luckysheetfile[l].filter_select = void 0, e.luckysheetfile[l].config = $.assign({}, e.config)), e.viewerFilterVisible = !0;
|
|
3271
3271
|
}
|
|
3272
3272
|
function rf(e) {
|
|
3273
|
-
$.isEmpty(e.filter) || $.isNil(e.luckysheet_filter_save) || (e.viewerFilterVisible = !e.viewerFilterVisible,
|
|
3273
|
+
$.isEmpty(e.filter) || $.isNil(e.luckysheet_filter_save) || (e.viewerFilterVisible = !e.viewerFilterVisible, gi(e));
|
|
3274
3274
|
}
|
|
3275
3275
|
function af(e, t, l) {
|
|
3276
3276
|
if (!Nt(e)) return;
|
|
3277
3277
|
Xo(e);
|
|
3278
3278
|
const i = `${t - l}`;
|
|
3279
|
-
delete e.filter[i],
|
|
3279
|
+
delete e.filter[i], gi(e);
|
|
3280
3280
|
const o = Oe(e, e.currentSheetId);
|
|
3281
3281
|
if (o == null) return;
|
|
3282
3282
|
const c = e.luckysheetfile[o];
|
|
@@ -3301,7 +3301,7 @@ function La(e) {
|
|
|
3301
3301
|
const h = l.row[1];
|
|
3302
3302
|
for (let a = 0; a < n[h].length; a += 1) {
|
|
3303
3303
|
const u = n[h][a];
|
|
3304
|
-
if (u != null && !
|
|
3304
|
+
if (u != null && !fi(u.v))
|
|
3305
3305
|
s == null && (s = a);
|
|
3306
3306
|
else if (s != null) {
|
|
3307
3307
|
r = a - 1;
|
|
@@ -3353,7 +3353,7 @@ function df(e, t, l, n, i) {
|
|
|
3353
3353
|
const { filter: Y } = xt(e);
|
|
3354
3354
|
for (let f = l + 1; f <= n; f += 1)
|
|
3355
3355
|
if (!(f in o))
|
|
3356
|
-
if (s.push(f), G = I[f][t], G != null && !
|
|
3356
|
+
if (s.push(f), G = I[f][t], G != null && !fi(G.v) && G.ct != null && G.ct.t === "d") {
|
|
3357
3357
|
const y = Mi("YYYY-MM-DD", G.v), p = y.split("-")[0], g = y.split("-")[1], X = y.split("-")[2];
|
|
3358
3358
|
let S = $.find(h, (O) => O.value === p);
|
|
3359
3359
|
S == null && (S = {
|
|
@@ -3387,7 +3387,7 @@ function df(e, t, l, n, i) {
|
|
|
3387
3387
|
}, x.children.push(z)), S.rows.push(f), S.dateValues.push(y), x.rows.push(f), x.dateValues.push(y), z.rows.push(f), z.dateValues.push(y), u[y] = (u[y] || []).concat(f), f in c && (a = $.union(a, [y]));
|
|
3388
3388
|
} else {
|
|
3389
3389
|
let y, p;
|
|
3390
|
-
G == null ||
|
|
3390
|
+
G == null || fi(G.v) ? (y = null, p = null) : (y = G.v, p = G.m);
|
|
3391
3391
|
const g = m.get(`${y}`), X = p == null ? Y.valueBlank : `${p}`, S = `${y}#$$$#${p}`;
|
|
3392
3392
|
if (g != null) {
|
|
3393
3393
|
let x = $.find(g, (z) => z.mask === p);
|
|
@@ -3430,7 +3430,7 @@ function uf(e, t, l, n) {
|
|
|
3430
3430
|
const Y = u in (((a = e.config) == null ? void 0 : a.rowhidden) || {}), f = i.get(b);
|
|
3431
3431
|
if (f != null ? (f.rows.push(u), Y && (f.checked = !1)) : i.set(b, { color: b, checked: !Y, rows: [u] }), G != null) {
|
|
3432
3432
|
const y = o.get(G);
|
|
3433
|
-
y != null && m != null && !
|
|
3433
|
+
y != null && m != null && !fi(m.v) ? (y.rows.push(u), Y && (y.checked = !1)) : m != null && !fi(m.v) && o.set(G, { color: G, checked: !Y, rows: [u] });
|
|
3434
3434
|
}
|
|
3435
3435
|
}
|
|
3436
3436
|
const r = $.flatten(Array.from(i.values())), h = $.flatten(Array.from(o.values()));
|
|
@@ -3450,7 +3450,7 @@ function xu(e, t, l, n, i, o, c, s, r) {
|
|
|
3450
3450
|
c,
|
|
3451
3451
|
s,
|
|
3452
3452
|
r
|
|
3453
|
-
), e.viewerFilterVisible = !0,
|
|
3453
|
+
), e.viewerFilterVisible = !0, gi(e);
|
|
3454
3454
|
const h = Oe(e, e.currentSheetId);
|
|
3455
3455
|
h != null && (e.luckysheetfile[h].config = $.assign(
|
|
3456
3456
|
{},
|
|
@@ -3463,11 +3463,11 @@ function hf(e, t, l) {
|
|
|
3463
3463
|
if (n == null) return;
|
|
3464
3464
|
const i = e.luckysheetfile[n], o = i.id === e.currentSheetId, c = l.filter_select;
|
|
3465
3465
|
if (!(c != null && Array.isArray(c.row) && c.row.length === 2 && Array.isArray(c.column) && c.column.length === 2)) {
|
|
3466
|
-
i.filter = void 0, i.filter_select = void 0, o && (e.luckysheet_filter_save = void 0, e.filterOptions = void 0, e.filterContextMenu = void 0, e.filter = {}, Xo(e),
|
|
3466
|
+
i.filter = void 0, i.filter_select = void 0, o && (e.luckysheet_filter_save = void 0, e.filterOptions = void 0, e.filterContextMenu = void 0, e.filter = {}, Xo(e), gi(e));
|
|
3467
3467
|
return;
|
|
3468
3468
|
}
|
|
3469
3469
|
const r = l.filter && Object.keys(l.filter).length > 0 ? l.filter : void 0;
|
|
3470
|
-
i.filter_select = c, i.filter = r, o && (e.luckysheet_filter_save = c, e.filter = r ? { ...r } : {}, uc(e, c, t, r, !1), Xo(e),
|
|
3470
|
+
i.filter_select = c, i.filter = r, o && (e.luckysheet_filter_save = c, e.filter = r ? { ...r } : {}, uc(e, c, t, r, !1), Xo(e), gi(e));
|
|
3471
3471
|
}
|
|
3472
3472
|
const db = 8;
|
|
3473
3473
|
function L9(e, t, l, n, i, o, c) {
|
|
@@ -3996,7 +3996,7 @@ const pf = 4, If = 0.1, yf = (e, t, l) => {
|
|
|
3996
3996
|
r.c1,
|
|
3997
3997
|
r.c2
|
|
3998
3998
|
);
|
|
3999
|
-
l(o, c, s), e.formulaCache.
|
|
3999
|
+
l(o, c, s), e.formulaCache.resetDependencyIndexes(), Hh(
|
|
4000
4000
|
e,
|
|
4001
4001
|
e.currentSheetId,
|
|
4002
4002
|
o,
|
|
@@ -5084,7 +5084,7 @@ function $9(e) {
|
|
|
5084
5084
|
if (Df((t = e[l]) == null ? void 0 : t[n])) return { row: l, col: n };
|
|
5085
5085
|
return { row: 0, col: 0 };
|
|
5086
5086
|
}
|
|
5087
|
-
function
|
|
5087
|
+
function Ci(e, t) {
|
|
5088
5088
|
return e === `Digit${t}` || e === `Numpad${t}`;
|
|
5089
5089
|
}
|
|
5090
5090
|
function eV(e, t, l) {
|
|
@@ -5111,10 +5111,10 @@ function tV(e, t, l) {
|
|
|
5111
5111
|
return !1;
|
|
5112
5112
|
}
|
|
5113
5113
|
function lV(e, t) {
|
|
5114
|
-
if ((t.ctrlKey || t.metaKey) && t.shiftKey && !t.altKey &&
|
|
5114
|
+
if ((t.ctrlKey || t.metaKey) && t.shiftKey && !t.altKey && Ci(t.code, "7"))
|
|
5115
5115
|
return yo(e, "border-outside"), !0;
|
|
5116
5116
|
if (!t.altKey || !t.shiftKey || t.ctrlKey || t.metaKey) return !1;
|
|
5117
|
-
if (
|
|
5117
|
+
if (Ci(t.code, "6"))
|
|
5118
5118
|
return yo(e, "border-none"), !0;
|
|
5119
5119
|
const l = {
|
|
5120
5120
|
1: "border-top",
|
|
@@ -5126,7 +5126,7 @@ function lV(e, t) {
|
|
|
5126
5126
|
9: "border-inside"
|
|
5127
5127
|
};
|
|
5128
5128
|
for (const [n, i] of Object.entries(l))
|
|
5129
|
-
if (
|
|
5129
|
+
if (Ci(t.code, n))
|
|
5130
5130
|
return yo(e, i), !0;
|
|
5131
5131
|
return !1;
|
|
5132
5132
|
}
|
|
@@ -5150,7 +5150,7 @@ function cV(e) {
|
|
|
5150
5150
|
const t = Oe(e, e.currentSheetId);
|
|
5151
5151
|
if (t == null) return;
|
|
5152
5152
|
const l = e.luckysheetfile[t];
|
|
5153
|
-
l.config || (l.config = {}), e.config.rowhidden_manual = {}, l.config.rowhidden_manual = {},
|
|
5153
|
+
l.config || (l.config = {}), e.config.rowhidden_manual = {}, l.config.rowhidden_manual = {}, gi(e), l.config = e.config;
|
|
5154
5154
|
}
|
|
5155
5155
|
function rV(e) {
|
|
5156
5156
|
const t = Oe(e, e.currentSheetId);
|
|
@@ -5159,7 +5159,7 @@ function rV(e) {
|
|
|
5159
5159
|
l.config || (l.config = {}), e.config.colhidden = {}, l.config.colhidden = {}, l.config = e.config;
|
|
5160
5160
|
}
|
|
5161
5161
|
function aV(e, t) {
|
|
5162
|
-
return t.ctrlKey || t.metaKey ? t.altKey && !t.shiftKey &&
|
|
5162
|
+
return t.ctrlKey || t.metaKey ? t.altKey && !t.shiftKey && Ci(t.code, "9") ? (vs(e, "row"), !0) : t.shiftKey && !t.altKey && Ci(t.code, "9") ? (cV(e), !0) : t.altKey && !t.shiftKey && Ci(t.code, "0") ? (vs(e, "column"), !0) : t.shiftKey && !t.altKey && Ci(t.code, "0") ? (rV(e), !0) : !1 : !1;
|
|
5163
5163
|
}
|
|
5164
5164
|
function dV(e, t, l, n, i) {
|
|
5165
5165
|
return !(l.ctrlKey || l.metaKey) || l.altKey || l.shiftKey || l.key !== "Enter" || !y5(e, t, i) ? !1 : (n.enteredEditByTyping = !1, !0);
|
|
@@ -5433,7 +5433,7 @@ function pV(e, t, l, n, i, o, c, s) {
|
|
|
5433
5433
|
const I = Z.row_focus, G = Z.column_focus;
|
|
5434
5434
|
Bl(e, I, G, n), e.luckysheetCellUpdate = [I, G], t.enteredEditByTyping = !1, ri(t), t.ignoreWriteCell = !0;
|
|
5435
5435
|
const Y = v5();
|
|
5436
|
-
n.innerText = Y,
|
|
5436
|
+
n.innerText = Y, Gi(e, i, n, l.keyCode);
|
|
5437
5437
|
} else if (j9(l)) {
|
|
5438
5438
|
c(), l.stopPropagation();
|
|
5439
5439
|
return;
|
|
@@ -5723,9 +5723,9 @@ async function ku(e, t, l, n, i, o, c, s) {
|
|
|
5723
5723
|
const J = bV(n);
|
|
5724
5724
|
if (J === "=" && aa(e), J !== void 0) {
|
|
5725
5725
|
const B = w && /^([0-9]|[.+-])$/.test(J) ? `${J}%` : J;
|
|
5726
|
-
t.textContent = B, l && (l.textContent = B),
|
|
5726
|
+
t.textContent = B, l && (l.textContent = B), Gi(e, l, t, h), n.preventDefault();
|
|
5727
5727
|
} else
|
|
5728
|
-
t.textContent = "", l && (l.textContent = ""),
|
|
5728
|
+
t.textContent = "", l && (l.textContent = ""), Gi(e, l, t, h);
|
|
5729
5729
|
queueMicrotask(() => {
|
|
5730
5730
|
var B;
|
|
5731
5731
|
if (J !== void 0 && w && /^([0-9]|[.+-])$/.test(J)) {
|
|
@@ -6973,7 +6973,7 @@ function n2(e, t, l, n, i, o, c, s, r) {
|
|
|
6973
6973
|
var a, u, m, b, Z, I, G, Y, f, y;
|
|
6974
6974
|
const h = c.getBoundingClientRect();
|
|
6975
6975
|
if (c9(e, t), a9(e, t), Gm(e, t), gm(e, t), l9(e, t), e9(e, t), U5(e), S9(t), K5(t), R9(e, t, n, i, o, c), e.formulaCache.rangestart || e.formulaCache.rangedrag_column_start || e.formulaCache.rangedrag_row_start) {
|
|
6976
|
-
sl(e) === "fx" ?
|
|
6976
|
+
sl(e) === "fx" ? Gi(e, s, r, 0, void 0, !1) : Gi(e, r, s, 0, void 0, !1), e.luckysheet_select_status = !1, e.luckysheet_scroll_status = !1, e.luckysheet_rows_selected_status = !1, e.luckysheet_cols_selected_status = !1, n.preventDefault();
|
|
6977
6977
|
return;
|
|
6978
6978
|
}
|
|
6979
6979
|
if (e.luckysheet_select_status && e.luckysheetPaintModelOn && (M5(e, e.luckysheet_copy_save), e.luckysheetPaintSingle && sa(e)), e.luckysheet_select_status = !1, e.luckysheet_scroll_status = !1, e.luckysheet_rows_selected_status = !1, e.luckysheet_cols_selected_status = !1, e.luckysheet_model_move_state = !1, e.luckysheet_rows_change_size) {
|
|
@@ -7216,7 +7216,7 @@ function Qc(e, t, l, n, i, o) {
|
|
|
7216
7216
|
(P = e.luckysheet_select_save) == null ? void 0 : P[e.luckysheet_select_save.length - 1]
|
|
7217
7217
|
);
|
|
7218
7218
|
if (L) {
|
|
7219
|
-
const w = L.row_focus ?? ((K = L.row) == null ? void 0 : K[0]) ?? Z, J = Math.min(w, Z), D = Math.max(w, Z), B =
|
|
7219
|
+
const w = L.row_focus ?? ((K = L.row) == null ? void 0 : K[0]) ?? Z, J = Math.min(w, Z), D = Math.max(w, Z), B = Ji(e, J, D, 0, I);
|
|
7220
7220
|
L.row = [J, D], L.column = [0, I], B && (L.left = B.left, L.width = B.width, L.top = B.top, L.height = B.height, L.left_move = B.left, L.width_move = B.width, L.top_move = B.top, L.height_move = B.height), L.row_select = !0, L.column_select = !1, L.column_focus = 0, $.isNil(L.row_focus) && (L.row_focus = w), e.luckysheet_select_save[e.luckysheet_select_save.length - 1] = L;
|
|
7221
7221
|
}
|
|
7222
7222
|
} else l.ctrlKey || l.metaKey ? (V = e.luckysheet_select_save) == null || V.push({
|
|
@@ -7384,7 +7384,7 @@ function qc(e, t, l, n, i, o) {
|
|
|
7384
7384
|
(P = e.luckysheet_select_save) == null ? void 0 : P[e.luckysheet_select_save.length - 1]
|
|
7385
7385
|
);
|
|
7386
7386
|
if (L) {
|
|
7387
|
-
const w = L.column_focus ?? ((K = L.column) == null ? void 0 : K[0]) ?? Y, J = Math.min(w, Y), D = Math.max(w, Y), B =
|
|
7387
|
+
const w = L.column_focus ?? ((K = L.column) == null ? void 0 : K[0]) ?? Y, J = Math.min(w, Y), D = Math.max(w, Y), B = Ji(
|
|
7388
7388
|
e,
|
|
7389
7389
|
0,
|
|
7390
7390
|
u,
|
|
@@ -8882,7 +8882,7 @@ const gD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8882
8882
|
getFilterColumnValues: df,
|
|
8883
8883
|
getFilterHiddenRowsUnion: FI,
|
|
8884
8884
|
getFilterHiddenRowsUnionFromFilterMap: c3,
|
|
8885
|
-
getFindRangeOnCurrentSheet:
|
|
8885
|
+
getFindRangeOnCurrentSheet: Xi,
|
|
8886
8886
|
getFlowdata: Pe,
|
|
8887
8887
|
getFormulaEditorOwner: sl,
|
|
8888
8888
|
getFormulaRangeIndexAtCaret: $h,
|
|
@@ -8930,7 +8930,7 @@ const gD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8930
8930
|
handleColumnHeaderMouseDown: qc,
|
|
8931
8931
|
handleContextMenu: Hm,
|
|
8932
8932
|
handleCopy: Ms,
|
|
8933
|
-
handleFormulaInput:
|
|
8933
|
+
handleFormulaInput: Gi,
|
|
8934
8934
|
handleFreeze: Zu,
|
|
8935
8935
|
handleGlobalKeyDown: ku,
|
|
8936
8936
|
handleHorizontalAlign: zI,
|
|
@@ -8980,7 +8980,7 @@ const gD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8980
8980
|
isLinkValid: qI,
|
|
8981
8981
|
isNumericCellType: wh,
|
|
8982
8982
|
isOpenShortcutsModalShortcut: Ef,
|
|
8983
|
-
isRealNull:
|
|
8983
|
+
isRealNull: fi,
|
|
8984
8984
|
isRealNum: br,
|
|
8985
8985
|
isShowHidenCR: tm,
|
|
8986
8986
|
isTypedCurrencyDisplayFormat: _I,
|
|
@@ -9030,7 +9030,7 @@ const gD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9030
9030
|
quoteSsfLiteral: W3,
|
|
9031
9031
|
rangeHightlightselected: il,
|
|
9032
9032
|
rangeSetValue: cc,
|
|
9033
|
-
rebuildRowHiddenUnion:
|
|
9033
|
+
rebuildRowHiddenUnion: gi,
|
|
9034
9034
|
refreshFormulasUsingDefinedNames: Iu,
|
|
9035
9035
|
remapFormulaReferencesByMap: ks,
|
|
9036
9036
|
removeActiveImage: Us,
|
|
@@ -9065,7 +9065,7 @@ const gD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9065
9065
|
selectTitlesMap: nm,
|
|
9066
9066
|
selectTitlesRange: im,
|
|
9067
9067
|
selectionIsExactlyOneMergeBlock: om,
|
|
9068
|
-
seletedHighlistByindex:
|
|
9068
|
+
seletedHighlistByindex: Ji,
|
|
9069
9069
|
setCaretPosition: gu,
|
|
9070
9070
|
setCellError: Jh,
|
|
9071
9071
|
setCellValue: vl,
|
|
@@ -9605,7 +9605,7 @@ const Yb = "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,s
|
|
|
9605
9605
|
"vef",
|
|
9606
9606
|
"vnd",
|
|
9607
9607
|
"zar"
|
|
9608
|
-
],
|
|
9608
|
+
], Li = {};
|
|
9609
9609
|
function xb(e, t) {
|
|
9610
9610
|
fS.forEach((l) => {
|
|
9611
9611
|
gS.forEach((n) => {
|
|
@@ -9613,7 +9613,7 @@ function xb(e, t) {
|
|
|
9613
9613
|
const i = (o = e[l]) == null ? void 0 : o[n];
|
|
9614
9614
|
if (typeof i == "number") {
|
|
9615
9615
|
const c = `${l}-${n}`.toLowerCase();
|
|
9616
|
-
|
|
9616
|
+
Li[c] = { price: i, timestamp: t };
|
|
9617
9617
|
}
|
|
9618
9618
|
});
|
|
9619
9619
|
});
|
|
@@ -9624,12 +9624,12 @@ const wb = async (e) => new Promise((t, l) => {
|
|
|
9624
9624
|
async function Nm(e, t) {
|
|
9625
9625
|
var c;
|
|
9626
9626
|
const l = `${e}-${t}`.toLowerCase(), n = Date.now();
|
|
9627
|
-
if (
|
|
9628
|
-
return
|
|
9629
|
-
if (
|
|
9627
|
+
if (Li[l] && n - Li[l].timestamp < yS)
|
|
9628
|
+
return Li[l].price;
|
|
9629
|
+
if (Li[l])
|
|
9630
9630
|
return wb(Yb).then((s) => {
|
|
9631
9631
|
xb(s, n);
|
|
9632
|
-
}),
|
|
9632
|
+
}), Li[l].price;
|
|
9633
9633
|
const i = await wb(Yb), o = (c = i[e]) == null ? void 0 : c[t];
|
|
9634
9634
|
if (typeof o != "number") throw new Error("Invalid price data");
|
|
9635
9635
|
return xb(i, n), o;
|
|
@@ -9637,7 +9637,7 @@ async function Nm(e, t) {
|
|
|
9637
9637
|
const GS = (e, t) => {
|
|
9638
9638
|
var n;
|
|
9639
9639
|
const l = `${e}-${t}`.toLowerCase();
|
|
9640
|
-
return Nm(e, t), (n =
|
|
9640
|
+
return Nm(e, t), (n = Li[l]) == null ? void 0 : n.price;
|
|
9641
9641
|
};
|
|
9642
9642
|
function g2(e) {
|
|
9643
9643
|
let t = e;
|
|
@@ -14123,7 +14123,7 @@ const TS = {
|
|
|
14123
14123
|
{
|
|
14124
14124
|
name: e,
|
|
14125
14125
|
ref: s,
|
|
14126
|
-
className:
|
|
14126
|
+
className: Zi(r, t),
|
|
14127
14127
|
strokeWidth: l || 2,
|
|
14128
14128
|
fill: i || "none",
|
|
14129
14129
|
stroke: o || "currentColor",
|
|
@@ -14328,7 +14328,7 @@ function PS(e, t, l) {
|
|
|
14328
14328
|
]);
|
|
14329
14329
|
}
|
|
14330
14330
|
const AS = () => {
|
|
14331
|
-
var je, et, tt, Yt, Wt, ft, mt, zt,
|
|
14331
|
+
var je, et, tt, Yt, Wt, ft, mt, zt, Si, kt, At, Xl, no, jn, qo, io, Cn, oo, Yi;
|
|
14332
14332
|
const { context: e, setContext: t, refs: l } = It(wt), n = Le(null), i = Le(null), o = Lr(e.luckysheetCellUpdate), c = Lr(e.currentSheetId), [s, r] = Ve(!1), [h, a] = Ve(!1), [u, m] = Ve(""), [b, Z] = Ve(""), [I, G] = Ve(!1), Y = Le(null), [f, y] = Ve({ left: 0, top: 0 }), p = (je = e.luckysheet_select_save) == null ? void 0 : je[0], [g, X] = Ve(
|
|
14333
14333
|
{}
|
|
14334
14334
|
), [S, x] = Ve(0), [z, O] = Ve(!1), P = localStorage.getItem("formulaMore") === "true", [K, V] = Ve(!P), [L, w] = Ve(!1), J = Le(null), [D, B] = Ve(0), [M, C] = Ve(!1), T = p == null ? void 0 : p.row_focus, v = p == null ? void 0 : p.column_focus, q = PS(
|
|
@@ -14701,7 +14701,7 @@ const AS = () => {
|
|
|
14701
14701
|
Ze.innerHTML,
|
|
14702
14702
|
De.formulaCache.rangechangeindex
|
|
14703
14703
|
);
|
|
14704
|
-
const _t =
|
|
14704
|
+
const _t = Ji(
|
|
14705
14705
|
De,
|
|
14706
14706
|
Ft.row[0],
|
|
14707
14707
|
Ft.row[1],
|
|
@@ -14736,16 +14736,16 @@ const AS = () => {
|
|
|
14736
14736
|
const it = ht.getRangeAt(0);
|
|
14737
14737
|
if (!it.collapsed || !rt.contains(it.startContainer))
|
|
14738
14738
|
return !1;
|
|
14739
|
-
const st = (
|
|
14739
|
+
const st = (xi) => {
|
|
14740
14740
|
const so = document.createElement("span");
|
|
14741
14741
|
so.className = "luckysheet-input-span";
|
|
14742
14742
|
const Qn = document.createTextNode("");
|
|
14743
|
-
so.appendChild(Qn),
|
|
14743
|
+
so.appendChild(Qn), xi.insertAdjacentElement("afterend", so);
|
|
14744
14744
|
const cd = document.createRange();
|
|
14745
14745
|
cd.setStart(Qn, 0), cd.collapse(!0), ht.removeAllRanges(), ht.addRange(cd);
|
|
14746
14746
|
};
|
|
14747
14747
|
if (it.startContainer.nodeType === Node.ELEMENT_NODE) {
|
|
14748
|
-
const
|
|
14748
|
+
const xi = it.startContainer, so = it.startOffset - 1, Qn = so >= 0 ? xi.childNodes[so] : null;
|
|
14749
14749
|
if (Qn instanceof HTMLElement && Qn.tagName === "SPAN" && ((Vl = Qn.dataset) != null && Vl.linkType) && ((Rn = Qn.dataset) != null && Rn.linkAddress))
|
|
14750
14750
|
return st(Qn), !0;
|
|
14751
14751
|
}
|
|
@@ -14774,8 +14774,8 @@ const AS = () => {
|
|
|
14774
14774
|
Vl.insertAdjacentElement("afterend", st), st.insertAdjacentElement("afterend", yt);
|
|
14775
14775
|
else {
|
|
14776
14776
|
it.deleteContents();
|
|
14777
|
-
const
|
|
14778
|
-
|
|
14777
|
+
const xi = document.createDocumentFragment();
|
|
14778
|
+
xi.appendChild(st), xi.appendChild(yt), it.insertNode(xi);
|
|
14779
14779
|
}
|
|
14780
14780
|
const Rn = document.createRange();
|
|
14781
14781
|
return Rn.setStart(vt, 1), Rn.collapse(!0), ht.removeAllRanges(), ht.addRange(Rn), !0;
|
|
@@ -15143,7 +15143,7 @@ const AS = () => {
|
|
|
15143
15143
|
(ot) => {
|
|
15144
15144
|
if ((ot.formulaCache.rangestart || ot.formulaCache.rangedrag_column_start || ot.formulaCache.rangedrag_row_start || Rl(ot)) && ze || !Nt(ot, ot.luckysheet_select_save))
|
|
15145
15145
|
return;
|
|
15146
|
-
|
|
15146
|
+
Gi(
|
|
15147
15147
|
ot,
|
|
15148
15148
|
l.fxInput.current,
|
|
15149
15149
|
l.cellInput.current,
|
|
@@ -15329,7 +15329,7 @@ const AS = () => {
|
|
|
15329
15329
|
}));
|
|
15330
15330
|
ge(Xt);
|
|
15331
15331
|
}, [
|
|
15332
|
-
(
|
|
15332
|
+
(Si = e.linkCard) == null ? void 0 : Si.applyToSelection,
|
|
15333
15333
|
(kt = e.linkCard) == null ? void 0 : kt.selectionOffsets,
|
|
15334
15334
|
(At = e.linkCard) == null ? void 0 : At.r,
|
|
15335
15335
|
(Xl = e.linkCard) == null ? void 0 : Xl.c,
|
|
@@ -15462,7 +15462,7 @@ const AS = () => {
|
|
|
15462
15462
|
},
|
|
15463
15463
|
onMouseUp: (Ze) => Ze.stopPropagation(),
|
|
15464
15464
|
children: [
|
|
15465
|
-
!((
|
|
15465
|
+
!((Yi = e.rangeDialog) != null && Yi.show) && I && /* @__PURE__ */ d(
|
|
15466
15466
|
"div",
|
|
15467
15467
|
{
|
|
15468
15468
|
className: "luckysheet-cell-address-indicator",
|
|
@@ -16543,7 +16543,7 @@ const lY = ({ getContainer: e }) => {
|
|
|
16543
16543
|
de();
|
|
16544
16544
|
return;
|
|
16545
16545
|
}
|
|
16546
|
-
const he =
|
|
16546
|
+
const he = Xi(we);
|
|
16547
16547
|
if (he == null) return;
|
|
16548
16548
|
const Ie = Oe(
|
|
16549
16549
|
t,
|
|
@@ -18544,7 +18544,7 @@ const GY = () => {
|
|
|
18544
18544
|
const me = Yu(e, ce, de), ye = `${me.r1}_${me.r2}_${me.c1}_${me.c2}`, ge = ye === ie, ne = re.get(ye);
|
|
18545
18545
|
ne ? ge && (ne.active = !0) : re.set(ye, { ...me, active: ge });
|
|
18546
18546
|
}), Array.from(re.entries()).map(([ce, de]) => {
|
|
18547
|
-
const me =
|
|
18547
|
+
const me = Ji(
|
|
18548
18548
|
e,
|
|
18549
18549
|
de.r1,
|
|
18550
18550
|
de.r2,
|
|
@@ -18568,7 +18568,7 @@ const GY = () => {
|
|
|
18568
18568
|
r
|
|
18569
18569
|
]), a = lt(() => {
|
|
18570
18570
|
const k = e.searchRangeScopeHighlight;
|
|
18571
|
-
return !(e.showSearch || e.showReplace || e.findReplaceHiddenDuringRangePick) || !k || !k.row || !k.column ? null :
|
|
18571
|
+
return !(e.showSearch || e.showReplace || e.findReplaceHiddenDuringRangePick) || !k || !k.row || !k.column ? null : Ji(
|
|
18572
18572
|
e,
|
|
18573
18573
|
k.row[0],
|
|
18574
18574
|
k.row[1],
|
|
@@ -18589,7 +18589,7 @@ const GY = () => {
|
|
|
18589
18589
|
const E = U.row[0], se = U.row[1], ie = U.column[0], re = U.column[1];
|
|
18590
18590
|
if (E == null || se == null || ie == null || re == null || E > se || ie > re)
|
|
18591
18591
|
return null;
|
|
18592
|
-
const ce =
|
|
18592
|
+
const ce = Ji(e, E, se, ie, re);
|
|
18593
18593
|
return ce ? { key: `cf-hover-${W}-${E}_${se}_${ie}_${re}`, rect: ce } : null;
|
|
18594
18594
|
}).filter((U) => U != null) : [];
|
|
18595
18595
|
}, [
|
|
@@ -21328,7 +21328,7 @@ function fd(e) {
|
|
|
21328
21328
|
t && (h(), e.disabled || s(!0));
|
|
21329
21329
|
}, [t, h, e.disabled, s]), Z = Ge(() => {
|
|
21330
21330
|
t && a();
|
|
21331
|
-
}, [t, a]), I = lt(() =>
|
|
21331
|
+
}, [t, a]), I = lt(() => Zi(
|
|
21332
21332
|
"hover:color-bg-default-hover h-8 rounded p-2 w-full text-left flex items-center justify-between space-x-2 transition",
|
|
21333
21333
|
e.disabled ? "opacity-50 cursor-not-allowed" : void 0,
|
|
21334
21334
|
e.className
|
|
@@ -21365,7 +21365,7 @@ function fd(e) {
|
|
|
21365
21365
|
sideOffset: e.contentSideOffset ?? 4,
|
|
21366
21366
|
onMouseEnter: b,
|
|
21367
21367
|
onMouseLeave: Z,
|
|
21368
|
-
className:
|
|
21368
|
+
className: Zi(
|
|
21369
21369
|
"p-2 border-[1px] border-solid border-[var(--color-border-default,#E8EBEC)]",
|
|
21370
21370
|
e.contentClassName
|
|
21371
21371
|
),
|
|
@@ -24025,7 +24025,7 @@ const AY = () => {
|
|
|
24025
24025
|
const ge = ye.keyCode;
|
|
24026
24026
|
ge && ((!(ge >= 112 && ge <= 123 || ge <= 46 || ge === 144 || ge === 108 || ye.ctrlKey || ye.altKey || ye.shiftKey && (ge === 37 || ge === 38 || ge === 39 || ge === 40)) || ge === 8 || ge === 32 || ge === 46 || ye.ctrlKey && ge === 86) && r(
|
|
24027
24027
|
(he) => {
|
|
24028
|
-
|
|
24028
|
+
Gi(
|
|
24029
24029
|
he,
|
|
24030
24030
|
h.cellInput.current,
|
|
24031
24031
|
h.fxInput.current,
|
|
@@ -34797,11 +34797,15 @@ const sw = pt.forwardRef(
|
|
|
34797
34797
|
}
|
|
34798
34798
|
);
|
|
34799
34799
|
}, mw = ({
|
|
34800
|
-
isReadOnly: e
|
|
34800
|
+
isReadOnly: e,
|
|
34801
|
+
active: t = !0
|
|
34801
34802
|
}) => /* @__PURE__ */ R(
|
|
34802
34803
|
"div",
|
|
34803
34804
|
{
|
|
34804
|
-
className:
|
|
34805
|
+
className: Zi(
|
|
34806
|
+
"dsheet-skeleton-loader w-full h-full flex flex-col",
|
|
34807
|
+
!t && "invisible [transition:visibility_0s_linear_1200ms] [&_*]:!animate-none"
|
|
34808
|
+
),
|
|
34805
34809
|
"data-testid": "skeleton-loader",
|
|
34806
34810
|
children: [
|
|
34807
34811
|
/* @__PURE__ */ d(uw, { isReadOnly: e }),
|
|
@@ -34824,7 +34828,7 @@ function pw(e) {
|
|
|
34824
34828
|
var t = typeof e;
|
|
34825
34829
|
return e != null && (t == "object" || t == "function");
|
|
34826
34830
|
}
|
|
34827
|
-
var
|
|
34831
|
+
var Vi = pw, Iw = typeof ci == "object" && ci && ci.Object === Object && ci, j2 = Iw, yw = j2, fw = typeof self == "object" && self && self.Object === Object && self, gw = yw || fw || Function("return this")(), bn = gw, Gw = bn, Ww = function() {
|
|
34828
34832
|
return Gw.Date.now();
|
|
34829
34833
|
}, Xw = Ww, Vw = /\s/;
|
|
34830
34834
|
function Sw(e) {
|
|
@@ -34863,7 +34867,7 @@ var eo = Dw, Pw = mc, Aw = eo, jw = "[object Symbol]";
|
|
|
34863
34867
|
function Qw(e) {
|
|
34864
34868
|
return typeof e == "symbol" || Aw(e) && Pw(e) == jw;
|
|
34865
34869
|
}
|
|
34866
|
-
var qw = Qw, _w = Cw, h0 =
|
|
34870
|
+
var qw = Qw, _w = Cw, h0 = Vi, $w = qw, m0 = NaN, e6 = /^[-+]0x[0-9a-f]+$/i, t6 = /^0b[01]+$/i, l6 = /^0o[0-7]+$/i, n6 = parseInt;
|
|
34867
34871
|
function i6(e) {
|
|
34868
34872
|
if (typeof e == "number")
|
|
34869
34873
|
return e;
|
|
@@ -34879,7 +34883,7 @@ function i6(e) {
|
|
|
34879
34883
|
var l = t6.test(e);
|
|
34880
34884
|
return l || l6.test(e) ? n6(e.slice(2), l ? 2 : 8) : e6.test(e) ? m0 : +e;
|
|
34881
34885
|
}
|
|
34882
|
-
var o6 = i6, s6 =
|
|
34886
|
+
var o6 = i6, s6 = Vi, Yd = Xw, b0 = o6, c6 = "Expected a function", r6 = Math.max, a6 = Math.min;
|
|
34883
34887
|
function d6(e, t, l) {
|
|
34884
34888
|
var n, i, o, c, s, r, h = 0, a = !1, u = !1, m = !0;
|
|
34885
34889
|
if (typeof e != "function")
|
|
@@ -34927,7 +34931,7 @@ function d6(e, t, l) {
|
|
|
34927
34931
|
}
|
|
34928
34932
|
return g.cancel = y, g.flush = p, g;
|
|
34929
34933
|
}
|
|
34930
|
-
var u6 = d6, h6 = u6, m6 =
|
|
34934
|
+
var u6 = d6, h6 = u6, m6 = Vi, b6 = "Expected a function";
|
|
34931
34935
|
function Z6(e, t, l) {
|
|
34932
34936
|
var n = !0, i = !0;
|
|
34933
34937
|
if (typeof e != "function")
|
|
@@ -35420,7 +35424,7 @@ const X6 = (e, t) => {
|
|
|
35420
35424
|
([l, n]) => t(n, l)
|
|
35421
35425
|
);
|
|
35422
35426
|
};
|
|
35423
|
-
function
|
|
35427
|
+
function Ri(e) {
|
|
35424
35428
|
return e.toArray().map((t) => {
|
|
35425
35429
|
const l = {};
|
|
35426
35430
|
return X6(
|
|
@@ -35661,7 +35665,7 @@ class tL extends _6 {
|
|
|
35661
35665
|
const n = [];
|
|
35662
35666
|
this.meta.forEach((i, o) => {
|
|
35663
35667
|
o !== this.clientID && wd <= l - i.lastUpdated && this.states.has(o) && n.push(o);
|
|
35664
|
-
}), n.length > 0 &&
|
|
35668
|
+
}), n.length > 0 && pi(this, n, "timeout");
|
|
35665
35669
|
}, ig(wd / 10)), t.on("destroy", () => {
|
|
35666
35670
|
this.destroy();
|
|
35667
35671
|
}), this.setLocalState({});
|
|
@@ -35705,7 +35709,7 @@ class tL extends _6 {
|
|
|
35705
35709
|
return this.states;
|
|
35706
35710
|
}
|
|
35707
35711
|
}
|
|
35708
|
-
const
|
|
35712
|
+
const pi = (e, t, l) => {
|
|
35709
35713
|
const n = [];
|
|
35710
35714
|
for (let i = 0; i < t.length; i++) {
|
|
35711
35715
|
const o = t[i];
|
|
@@ -36545,7 +36549,7 @@ const Au = typeof addEventListener == "function" && typeof removeEventListener =
|
|
|
36545
36549
|
Au && addEventListener("offline", () => {
|
|
36546
36550
|
tr.forEach((e) => e());
|
|
36547
36551
|
}, !1);
|
|
36548
|
-
class
|
|
36552
|
+
class Ii extends hl {
|
|
36549
36553
|
/**
|
|
36550
36554
|
* Socket constructor.
|
|
36551
36555
|
*
|
|
@@ -36613,7 +36617,7 @@ class pi extends hl {
|
|
|
36613
36617
|
}, 0);
|
|
36614
36618
|
return;
|
|
36615
36619
|
}
|
|
36616
|
-
const t = this.opts.rememberUpgrade &&
|
|
36620
|
+
const t = this.opts.rememberUpgrade && Ii.priorWebsocketSuccess && this.transports.indexOf("websocket") !== -1 ? "websocket" : this.transports[0];
|
|
36617
36621
|
this.readyState = "opening";
|
|
36618
36622
|
const l = this.createTransport(t);
|
|
36619
36623
|
l.open(), this.setTransport(l);
|
|
@@ -36632,7 +36636,7 @@ class pi extends hl {
|
|
|
36632
36636
|
* @private
|
|
36633
36637
|
*/
|
|
36634
36638
|
onOpen() {
|
|
36635
|
-
this.readyState = "open",
|
|
36639
|
+
this.readyState = "open", Ii.priorWebsocketSuccess = this.transport.name === "websocket", this.emitReserved("open"), this.flush();
|
|
36636
36640
|
}
|
|
36637
36641
|
/**
|
|
36638
36642
|
* Handles a packet.
|
|
@@ -36796,7 +36800,7 @@ class pi extends hl {
|
|
|
36796
36800
|
* @private
|
|
36797
36801
|
*/
|
|
36798
36802
|
_onError(t) {
|
|
36799
|
-
if (
|
|
36803
|
+
if (Ii.priorWebsocketSuccess = !1, this.opts.tryAllTransports && this.transports.length > 1 && this.readyState === "opening")
|
|
36800
36804
|
return this.transports.shift(), this._open();
|
|
36801
36805
|
this.emitReserved("error", t), this._onClose("transport error", t);
|
|
36802
36806
|
}
|
|
@@ -36815,8 +36819,8 @@ class pi extends hl {
|
|
|
36815
36819
|
}
|
|
36816
36820
|
}
|
|
36817
36821
|
}
|
|
36818
|
-
|
|
36819
|
-
class kL extends
|
|
36822
|
+
Ii.protocol = mg;
|
|
36823
|
+
class kL extends Ii {
|
|
36820
36824
|
constructor() {
|
|
36821
36825
|
super(...arguments), this._upgrades = [];
|
|
36822
36826
|
}
|
|
@@ -36833,14 +36837,14 @@ class kL extends pi {
|
|
|
36833
36837
|
*/
|
|
36834
36838
|
_probe(t) {
|
|
36835
36839
|
let l = this.createTransport(t), n = !1;
|
|
36836
|
-
|
|
36840
|
+
Ii.priorWebsocketSuccess = !1;
|
|
36837
36841
|
const i = () => {
|
|
36838
36842
|
n || (l.send([{ type: "ping", data: "probe" }]), l.once("packet", (u) => {
|
|
36839
36843
|
if (!n)
|
|
36840
36844
|
if (u.type === "pong" && u.data === "probe") {
|
|
36841
36845
|
if (this.upgrading = !0, this.emitReserved("upgrading", l), !l)
|
|
36842
36846
|
return;
|
|
36843
|
-
|
|
36847
|
+
Ii.priorWebsocketSuccess = l.name === "websocket", this.transport.pause(() => {
|
|
36844
36848
|
n || this.readyState !== "closed" && (a(), this.setTransport(l), l.send([{ type: "upgrade" }]), this.emitReserved("upgrade", l), l = null, this.upgrading = !1, this.flush());
|
|
36845
36849
|
});
|
|
36846
36850
|
} else {
|
|
@@ -39449,19 +39453,19 @@ var Bd = function(e, t, l, n) {
|
|
|
39449
39453
|
h((n = n.apply(e, t || [])).next());
|
|
39450
39454
|
});
|
|
39451
39455
|
};
|
|
39452
|
-
class
|
|
39456
|
+
class vi {
|
|
39453
39457
|
constructor(t, l, n) {
|
|
39454
39458
|
this.jwtAlg = "EdDSA", this.secretKey = t, this.publicKey = l, this.exportable = n;
|
|
39455
39459
|
}
|
|
39456
39460
|
static create(t) {
|
|
39457
39461
|
return Bd(this, void 0, void 0, function* () {
|
|
39458
39462
|
const { exportable: l } = t || {}, n = Vs.generateKeyPair();
|
|
39459
|
-
return new
|
|
39463
|
+
return new vi(n.secretKey, n.publicKey, l ?? !1);
|
|
39460
39464
|
});
|
|
39461
39465
|
}
|
|
39462
39466
|
static fromSecretKey(t, l) {
|
|
39463
39467
|
const { format: n = "base64pad", exportable: i = !1 } = l || {}, o = qm(t, n), c = Vs.extractPublicKeyFromSecretKey(o);
|
|
39464
|
-
return new
|
|
39468
|
+
return new vi(o, c, i);
|
|
39465
39469
|
}
|
|
39466
39470
|
did() {
|
|
39467
39471
|
return wC(this.publicKey);
|
|
@@ -40452,7 +40456,7 @@ const w0 = zg("utf8", "u", (e) => "u" + new TextDecoder("utf8").decode(e), (e) =
|
|
|
40452
40456
|
binary: Hd,
|
|
40453
40457
|
...Fr
|
|
40454
40458
|
};
|
|
40455
|
-
function
|
|
40459
|
+
function Wi(e, t = "utf8") {
|
|
40456
40460
|
const l = Eg[t];
|
|
40457
40461
|
if (!l)
|
|
40458
40462
|
throw new Error(`Unsupported encoding "${t}"`);
|
|
@@ -40749,8 +40753,8 @@ var Ag = function(e, t, l, n) {
|
|
|
40749
40753
|
}
|
|
40750
40754
|
h((n = n.apply(e, t || [])).next());
|
|
40751
40755
|
});
|
|
40752
|
-
},
|
|
40753
|
-
return this instanceof
|
|
40756
|
+
}, Bi = function(e) {
|
|
40757
|
+
return this instanceof Bi ? (this.v = e, this) : new Bi(e);
|
|
40754
40758
|
}, xR = function(e, t, l) {
|
|
40755
40759
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
40756
40760
|
var n = l.apply(e, t || []), i, o = [];
|
|
@@ -40772,7 +40776,7 @@ var Ag = function(e, t, l, n) {
|
|
|
40772
40776
|
}
|
|
40773
40777
|
}
|
|
40774
40778
|
function r(m) {
|
|
40775
|
-
m.value instanceof
|
|
40779
|
+
m.value instanceof Bi ? Promise.resolve(m.value.v).then(h, a) : u(o[0][2], m);
|
|
40776
40780
|
}
|
|
40777
40781
|
function h(m) {
|
|
40778
40782
|
s("next", m);
|
|
@@ -40814,7 +40818,7 @@ const Qg = (e) => (t, l, n) => Ag(void 0, void 0, void 0, function* () {
|
|
|
40814
40818
|
};
|
|
40815
40819
|
if (!e.verifyIssuerAlg(t.iss, l))
|
|
40816
40820
|
throw new Error("The issuer's key type must match the given key type.");
|
|
40817
|
-
const o = RR(i), c = vR(t), s = `${o}.${c}`, r =
|
|
40821
|
+
const o = RR(i), c = vR(t), s = `${o}.${c}`, r = Wi(s, "utf8"), h = yield n(r);
|
|
40818
40822
|
return Object.freeze({
|
|
40819
40823
|
header: i,
|
|
40820
40824
|
payload: t,
|
|
@@ -40827,11 +40831,11 @@ function Ol(e) {
|
|
|
40827
40831
|
}
|
|
40828
40832
|
function RR(e) {
|
|
40829
40833
|
const t = Object.assign(Object.assign({}, e), { ucv: cR(e.ucv) });
|
|
40830
|
-
return Ds(
|
|
40834
|
+
return Ds(Wi(JSON.stringify(t), "utf8"), "base64url");
|
|
40831
40835
|
}
|
|
40832
40836
|
function vR(e) {
|
|
40833
40837
|
const t = Object.assign(Object.assign({}, e), { att: e.att.map(fR) });
|
|
40834
|
-
return Ds(
|
|
40838
|
+
return Ds(Wi(JSON.stringify(t), "utf8"), "base64url");
|
|
40835
40839
|
}
|
|
40836
40840
|
function BR(e) {
|
|
40837
40841
|
const [t, l, n] = e.split(".");
|
|
@@ -40839,7 +40843,7 @@ function BR(e) {
|
|
|
40839
40843
|
throw new Error(`Can't parse UCAN: ${e}: Expected JWT format: 3 dot-separated base64url-encoded values.`);
|
|
40840
40844
|
let i, o;
|
|
40841
40845
|
try {
|
|
40842
|
-
i = Ds(
|
|
40846
|
+
i = Ds(Wi(t, "base64url"), "utf8");
|
|
40843
40847
|
} catch {
|
|
40844
40848
|
throw new Error(`Can't parse UCAN header: ${t}: Can't parse as base64url.`);
|
|
40845
40849
|
}
|
|
@@ -40850,7 +40854,7 @@ function BR(e) {
|
|
|
40850
40854
|
}
|
|
40851
40855
|
let c, s;
|
|
40852
40856
|
try {
|
|
40853
|
-
c = Ds(
|
|
40857
|
+
c = Ds(Wi(l, "base64url"), "utf8");
|
|
40854
40858
|
} catch {
|
|
40855
40859
|
throw new Error(`Can't parse UCAN payload: ${l}: Can't parse as base64url.`);
|
|
40856
40860
|
}
|
|
@@ -40870,7 +40874,7 @@ const Ea = (e) => (t, l) => Ag(void 0, void 0, void 0, function* () {
|
|
|
40870
40874
|
if (n && !e.verifyIssuerAlg(r.iss, s.alg))
|
|
40871
40875
|
throw new Error(`Invalid UCAN: ${t}: Issuer key type does not match UCAN's \`alg\` property.`);
|
|
40872
40876
|
if (i) {
|
|
40873
|
-
const Z =
|
|
40877
|
+
const Z = Wi(u, "base64url"), I = Wi(`${h}.${a}`, "utf8");
|
|
40874
40878
|
if (!(yield e.verifySignature(r.iss, I, Z)))
|
|
40875
40879
|
throw new Error(`Invalid UCAN: ${t}: Signature invalid.`);
|
|
40876
40880
|
}
|
|
@@ -40885,7 +40889,7 @@ const Ea = (e) => (t, l) => Ag(void 0, void 0, void 0, function* () {
|
|
|
40885
40889
|
const { checkAddressing: n = !0, checkTimeBoundsSubset: i = !0, checkVersionMonotonic: o = !0 } = l || {};
|
|
40886
40890
|
for (const c of t.payload.prf)
|
|
40887
40891
|
try {
|
|
40888
|
-
const s = yield
|
|
40892
|
+
const s = yield Bi(Ea(e)(c, l));
|
|
40889
40893
|
if (n && t.payload.iss !== s.payload.aud)
|
|
40890
40894
|
throw new Error(`Invalid Proof: Issuer ${t.payload.iss} doesn't match parent's audience ${s.payload.aud}`);
|
|
40891
40895
|
if (i && s.payload.nbf != null && t.payload.exp > s.payload.nbf)
|
|
@@ -40894,9 +40898,9 @@ const Ea = (e) => (t, l) => Ag(void 0, void 0, void 0, function* () {
|
|
|
40894
40898
|
throw new Error(`Invalid Proof: Expiration (${s.payload.exp}) is before parent's 'not before' (${t.payload.nbf})`);
|
|
40895
40899
|
if (o && e1(t.header.ucv, s.header.ucv))
|
|
40896
40900
|
throw new Error(`Invalid Proof: Version (${s.header.ucv}) is higher than parent's version (${t.header.ucv})`);
|
|
40897
|
-
yield yield
|
|
40901
|
+
yield yield Bi(s);
|
|
40898
40902
|
} catch (s) {
|
|
40899
|
-
s instanceof Error ? yield yield
|
|
40903
|
+
s instanceof Error ? yield yield Bi(s) : yield yield Bi(new Error(`Error when trying to parse UCAN proof: ${s}`));
|
|
40900
40904
|
}
|
|
40901
40905
|
});
|
|
40902
40906
|
};
|
|
@@ -41627,7 +41631,7 @@ class $R {
|
|
|
41627
41631
|
const F0 = (e, t) => qC(t, e.subarray(0, t.byteLength)), J0 = "did:key:z", T0 = (e) => {
|
|
41628
41632
|
if (!e.startsWith(J0))
|
|
41629
41633
|
throw new Error(`Not a valid base58 formatted did:key: ${e}`);
|
|
41630
|
-
return
|
|
41634
|
+
return Wi(e.slice(J0.length), "base58btc");
|
|
41631
41635
|
}, N0 = (e) => {
|
|
41632
41636
|
const t = e.split(":");
|
|
41633
41637
|
if (t[0] !== "did")
|
|
@@ -42059,7 +42063,7 @@ Ot([
|
|
|
42059
42063
|
9344,
|
|
42060
42064
|
11139
|
|
42061
42065
|
]);
|
|
42062
|
-
function
|
|
42066
|
+
function Hi(e, t) {
|
|
42063
42067
|
for (let l = 0; l < 16; l++)
|
|
42064
42068
|
e[l] = t[l] | 0;
|
|
42065
42069
|
}
|
|
@@ -42136,7 +42140,7 @@ function uv(e, t) {
|
|
|
42136
42140
|
dv(i, t[2]), Hl(l, t[0], i), Hl(n, t[1], i), $g(e, n), e[31] ^= rv(l) << 7;
|
|
42137
42141
|
}
|
|
42138
42142
|
function hv(e, t, l) {
|
|
42139
|
-
|
|
42143
|
+
Hi(e[0], E0), Hi(e[1], ch), Hi(e[2], ch), Hi(e[3], E0);
|
|
42140
42144
|
for (let n = 255; n >= 0; --n) {
|
|
42141
42145
|
const i = l[n / 8 | 0] >> (n & 7) & 1;
|
|
42142
42146
|
j0(e, t, i), A0(t, e), A0(e, e), j0(e, t, i);
|
|
@@ -42144,7 +42148,7 @@ function hv(e, t, l) {
|
|
|
42144
42148
|
}
|
|
42145
42149
|
function mv(e, t) {
|
|
42146
42150
|
const l = [Ot(), Ot(), Ot(), Ot()];
|
|
42147
|
-
|
|
42151
|
+
Hi(l[0], D0), Hi(l[1], P0), Hi(l[2], ch), Hl(l[3], D0, P0), hv(e, l, t);
|
|
42148
42152
|
}
|
|
42149
42153
|
function Nd(e) {
|
|
42150
42154
|
if (e.length !== z0)
|
|
@@ -42159,7 +42163,7 @@ function Nd(e) {
|
|
|
42159
42163
|
secretKey: i
|
|
42160
42164
|
};
|
|
42161
42165
|
}
|
|
42162
|
-
const po = (e) => Ll(e), ys = (e, t = !1) =>
|
|
42166
|
+
const po = (e) => Ll(e), ys = (e, t = !1) => Ti(e, t);
|
|
42163
42167
|
function As(e, t) {
|
|
42164
42168
|
return t === "bytes" ? e : ys(e);
|
|
42165
42169
|
}
|
|
@@ -42601,7 +42605,7 @@ function Aa(e, t = {}, l = {}) {
|
|
|
42601
42605
|
i(t, !1), i(l, !0);
|
|
42602
42606
|
}
|
|
42603
42607
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
42604
|
-
const Cl = /* @__PURE__ */ BigInt(0), gl = /* @__PURE__ */ BigInt(1),
|
|
42608
|
+
const Cl = /* @__PURE__ */ BigInt(0), gl = /* @__PURE__ */ BigInt(1), ki = /* @__PURE__ */ BigInt(2), mG = /* @__PURE__ */ BigInt(3), bG = /* @__PURE__ */ BigInt(4), ZG = /* @__PURE__ */ BigInt(5), Lv = /* @__PURE__ */ BigInt(7), pG = /* @__PURE__ */ BigInt(8), Cv = /* @__PURE__ */ BigInt(9), IG = /* @__PURE__ */ BigInt(16);
|
|
42605
42609
|
function sn(e, t) {
|
|
42606
42610
|
if (t <= Cl)
|
|
42607
42611
|
throw new Error("mod: expected positive modulus, got " + t);
|
|
@@ -42640,7 +42644,7 @@ function yG(e, t) {
|
|
|
42640
42644
|
return a1(l, i, t), i;
|
|
42641
42645
|
}
|
|
42642
42646
|
function Rv(e, t) {
|
|
42643
|
-
const l = e, n = (l.ORDER - ZG) / pG, i = l.mul(t,
|
|
42647
|
+
const l = e, n = (l.ORDER - ZG) / pG, i = l.mul(t, ki), o = l.pow(i, n), c = l.mul(t, o), s = l.mul(l.mul(c, ki), o), r = l.mul(c, l.sub(s, l.ONE));
|
|
42644
42648
|
return a1(l, r, t), r;
|
|
42645
42649
|
}
|
|
42646
42650
|
function vv(e) {
|
|
@@ -42658,9 +42662,9 @@ function fG(e) {
|
|
|
42658
42662
|
if (e < mG)
|
|
42659
42663
|
throw new Error("sqrt is not defined for small field");
|
|
42660
42664
|
let t = e - gl, l = 0;
|
|
42661
|
-
for (; t %
|
|
42662
|
-
t /=
|
|
42663
|
-
let n =
|
|
42665
|
+
for (; t % ki === Cl; )
|
|
42666
|
+
t /= ki, l++;
|
|
42667
|
+
let n = ki;
|
|
42664
42668
|
const i = ja(e);
|
|
42665
42669
|
for (; _0(i, n) === 1; )
|
|
42666
42670
|
if (n++ > 1e3)
|
|
@@ -42668,7 +42672,7 @@ function fG(e) {
|
|
|
42668
42672
|
if (l === 1)
|
|
42669
42673
|
return yG;
|
|
42670
42674
|
let o = i.pow(n, t);
|
|
42671
|
-
const c = (t + gl) /
|
|
42675
|
+
const c = (t + gl) / ki;
|
|
42672
42676
|
return function(r, h) {
|
|
42673
42677
|
const a = r;
|
|
42674
42678
|
if (a.is0(h))
|
|
@@ -42741,7 +42745,7 @@ function gG(e, t, l = !1) {
|
|
|
42741
42745
|
return t.reduceRight((s, r, h) => n.is0(r) ? s : (i[h] = n.mul(s, i[h]), n.mul(s, r)), c), i;
|
|
42742
42746
|
}
|
|
42743
42747
|
function _0(e, t) {
|
|
42744
|
-
const l = e, n = (l.ORDER - gl) /
|
|
42748
|
+
const l = e, n = (l.ORDER - gl) / ki, i = l.pow(t, n), o = l.eql(i, l.ONE), c = l.eql(i, l.ZERO), s = l.eql(i, l.neg(l.ONE));
|
|
42745
42749
|
if (!o && !c && !s)
|
|
42746
42750
|
throw new Error("invalid Legendre symbol result");
|
|
42747
42751
|
return o ? 1 : c ? 0 : -1;
|
|
@@ -42893,7 +42897,7 @@ function Tv(e, t, l = !1) {
|
|
|
42893
42897
|
return l ? uG(s, i) : s1(s, i);
|
|
42894
42898
|
}
|
|
42895
42899
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
42896
|
-
const ko = /* @__PURE__ */ BigInt(0),
|
|
42900
|
+
const ko = /* @__PURE__ */ BigInt(0), Fi = /* @__PURE__ */ BigInt(1);
|
|
42897
42901
|
function Mr(e, t) {
|
|
42898
42902
|
const l = t.negate();
|
|
42899
42903
|
return e ? l : t;
|
|
@@ -42914,7 +42918,7 @@ function Kd(e, t) {
|
|
|
42914
42918
|
function tZ(e, t, l) {
|
|
42915
42919
|
const { windowSize: n, mask: i, maxNumber: o, shiftBy: c } = l;
|
|
42916
42920
|
let s = Number(e & i), r = e >> c;
|
|
42917
|
-
s > n && (s -= o, r +=
|
|
42921
|
+
s > n && (s -= o, r += Fi);
|
|
42918
42922
|
const h = t * n, a = h + Math.abs(s) - 1, u = s === 0, m = s < 0, b = t % 2 !== 0;
|
|
42919
42923
|
return { nextN: r, offset: a, isZero: u, isNeg: m, isNegF: b, offsetF: h };
|
|
42920
42924
|
}
|
|
@@ -42939,7 +42943,7 @@ class Nv {
|
|
|
42939
42943
|
_unsafeLadder(t, l, n = this.ZERO) {
|
|
42940
42944
|
let i = t;
|
|
42941
42945
|
for (; l > ko; )
|
|
42942
|
-
l &
|
|
42946
|
+
l & Fi && (n = n.add(i)), i = i.double(), l >>= Fi;
|
|
42943
42947
|
return n;
|
|
42944
42948
|
}
|
|
42945
42949
|
/**
|
|
@@ -43024,7 +43028,7 @@ class Nv {
|
|
|
43024
43028
|
function Uv(e, t, l, n) {
|
|
43025
43029
|
let i = t, o = e.ZERO, c = e.ZERO;
|
|
43026
43030
|
for (; l > ko || n > ko; )
|
|
43027
|
-
l &
|
|
43031
|
+
l & Fi && (o = o.add(i)), n & Fi && (c = c.add(i)), i = i.double(), l >>= Fi, n >>= Fi;
|
|
43028
43032
|
return { p1: o, p2: c };
|
|
43029
43033
|
}
|
|
43030
43034
|
function nZ(e, t, l) {
|
|
@@ -43836,7 +43840,7 @@ function nB(e) {
|
|
|
43836
43840
|
function Ki(e) {
|
|
43837
43841
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
43838
43842
|
}
|
|
43839
|
-
function
|
|
43843
|
+
function yi(...e) {
|
|
43840
43844
|
for (let t = 0; t < e.length; t++)
|
|
43841
43845
|
e[t].fill(0);
|
|
43842
43846
|
}
|
|
@@ -43982,7 +43986,7 @@ class mB {
|
|
|
43982
43986
|
const l = Ki(t), n = Math.floor(t.length / ao), i = t.length % ao;
|
|
43983
43987
|
for (let o = 0; o < n; o++)
|
|
43984
43988
|
this._updateBlock(ul(l[o * 4 + 0]), ul(l[o * 4 + 1]), ul(l[o * 4 + 2]), ul(l[o * 4 + 3]));
|
|
43985
|
-
return i && (BG.set(t.subarray(n * ao)), this._updateBlock(ul(ss[0]), ul(ss[1]), ul(ss[2]), ul(ss[3])),
|
|
43989
|
+
return i && (BG.set(t.subarray(n * ao)), this._updateBlock(ul(ss[0]), ul(ss[1]), ul(ss[2]), ul(ss[3])), yi(ss)), this;
|
|
43986
43990
|
}
|
|
43987
43991
|
destroy() {
|
|
43988
43992
|
this.destroyed = !0;
|
|
@@ -44024,7 +44028,7 @@ const IB = /* @__PURE__ */ (() => {
|
|
|
44024
44028
|
let n = e[255 - l];
|
|
44025
44029
|
n |= n << 8, t[e[l]] = (n ^ n >> 4 ^ n >> 5 ^ n >> 6 ^ n >> 7 ^ 99) & 255;
|
|
44026
44030
|
}
|
|
44027
|
-
return
|
|
44031
|
+
return yi(e), t;
|
|
44028
44032
|
})(), yB = (e) => e << 24 | e >>> 8, Ed = (e) => e << 8 | e >>> 24;
|
|
44029
44033
|
function fB(e, t) {
|
|
44030
44034
|
if (e.length !== 256)
|
|
@@ -44055,7 +44059,7 @@ function GB(e) {
|
|
|
44055
44059
|
let h = s[r - 1];
|
|
44056
44060
|
r % o === 0 ? h = c(yB(h)) ^ gB[r / o - 1] : o > 6 && r % o === 4 && (h = c(h)), s[r] = s[r - o] ^ h;
|
|
44057
44061
|
}
|
|
44058
|
-
return
|
|
44062
|
+
return yi(...n), s;
|
|
44059
44063
|
}
|
|
44060
44064
|
function Mc(e, t, l, n, i, o) {
|
|
44061
44065
|
return e[l << 8 & 65280 | n >>> 8 & 255] ^ t[i >>> 8 & 65280 | o >>> 24 & 255];
|
|
@@ -44088,7 +44092,7 @@ function Oc(e, t, l, n, i) {
|
|
|
44088
44092
|
const y = nB(f);
|
|
44089
44093
|
for (let p = Y, g = 0; p < u; p++, g++)
|
|
44090
44094
|
i[p] = n[p] ^ y[g];
|
|
44091
|
-
|
|
44095
|
+
yi(f);
|
|
44092
44096
|
}
|
|
44093
44097
|
return i;
|
|
44094
44098
|
}
|
|
@@ -44098,7 +44102,7 @@ function WB(e, t, l, n, i) {
|
|
|
44098
44102
|
const s = aB(8 * n.length, 8 * o, t);
|
|
44099
44103
|
c.update(n), c.update(s);
|
|
44100
44104
|
const r = c.digest();
|
|
44101
|
-
return
|
|
44105
|
+
return yi(s), r;
|
|
44102
44106
|
}
|
|
44103
44107
|
const kG = /* @__PURE__ */ cB({ blockSize: 16, nonceLength: 12, tagLength: 16, varSizeNonce: !0 }, function(t, l, n) {
|
|
44104
44108
|
if (l.length < 8)
|
|
@@ -44128,16 +44132,16 @@ const kG = /* @__PURE__ */ cB({ blockSize: 16, nonceLength: 12, tagLength: 16, v
|
|
|
44128
44132
|
const { xk: r, authKey: h, counter: a, tagMask: u } = c(), m = new Uint8Array(s.length + i), b = [r, h, a, u];
|
|
44129
44133
|
qs(s) || b.push(s = _s(s)), Oc(r, !1, a, s, m.subarray(0, s.length));
|
|
44130
44134
|
const Z = o(h, u, m.subarray(0, m.length - i));
|
|
44131
|
-
return b.push(Z), m.set(Z, s.length),
|
|
44135
|
+
return b.push(Z), m.set(Z, s.length), yi(...b), m;
|
|
44132
44136
|
},
|
|
44133
44137
|
decrypt(s) {
|
|
44134
44138
|
const { xk: r, authKey: h, counter: a, tagMask: u } = c(), m = [r, h, u, a];
|
|
44135
44139
|
qs(s) || m.push(s = _s(s));
|
|
44136
44140
|
const b = s.subarray(0, -i), Z = s.subarray(-i), I = o(h, u, b);
|
|
44137
44141
|
if (m.push(I), !oB(I, Z))
|
|
44138
|
-
throw
|
|
44142
|
+
throw yi(...m), new Error("aes/gcm: invalid ghash tag");
|
|
44139
44143
|
const G = Oc(r, !1, a, b);
|
|
44140
|
-
return
|
|
44144
|
+
return yi(...m), G;
|
|
44141
44145
|
}
|
|
44142
44146
|
};
|
|
44143
44147
|
}), or = "__n__", XB = 32;
|
|
@@ -44721,9 +44725,9 @@ class Z1 {
|
|
|
44721
44725
|
const { secretKey: l } = Nd(
|
|
44722
44726
|
Ll(t.roomKey)
|
|
44723
44727
|
);
|
|
44724
|
-
this.roomKey = t.roomKey, this.roomId = t.roomId, this.collaborationKeyPair =
|
|
44725
|
-
|
|
44726
|
-
), t.ownerEdSecret && (this.ownerKeyPair =
|
|
44728
|
+
this.roomKey = t.roomKey, this.roomId = t.roomId, this.collaborationKeyPair = vi.fromSecretKey(
|
|
44729
|
+
Ti(l)
|
|
44730
|
+
), t.ownerEdSecret && (this.ownerKeyPair = vi.fromSecretKey(t.ownerEdSecret)), t.contractAddress && (this.contractAddress = t.contractAddress), t.ownerAddress && (this.ownerAddress = t.ownerAddress), t.appFileId && (this.appFileId = t.appFileId), t.editLock && (this.editLock = t.editLock), t.identityToken && (this.identityToken = t.identityToken), t.editUcan && (this.editUcan = t.editUcan), this.lastGoodEditUcan = t.editUcan, t.refreshEditClaim && (this.refreshEditClaim = t.refreshEditClaim), t.actorHandle && (this.actorHandle = t.actorHandle), t.joinOnly && (this.joinOnly = t.joinOnly), t.encryptedTitle && (this.encryptedTitle = t.encryptedTitle), t.onHandshakeData && (this._onHandshakeData = t.onHandshakeData), t.onEpochAvailable && (this._onEpochAvailable = t.onEpochAvailable), t.onCutover && (this._onCutover = t.onCutover), t.roomInfo && (this.roomInfo = t.roomInfo);
|
|
44727
44731
|
}
|
|
44728
44732
|
get isConnected() {
|
|
44729
44733
|
return this._webSocketStatus === nl.CONNECTED;
|
|
@@ -44858,8 +44862,8 @@ class Z1 {
|
|
|
44858
44862
|
try {
|
|
44859
44863
|
n && (this.lastGoodEditUcan = n), this.roomKey = t;
|
|
44860
44864
|
const { secretKey: c } = Nd(Ll(t));
|
|
44861
|
-
this.collaborationKeyPair =
|
|
44862
|
-
|
|
44865
|
+
this.collaborationKeyPair = vi.fromSecretKey(
|
|
44866
|
+
Ti(c)
|
|
44863
44867
|
), this.collaborationUcan = void 0, l !== void 0 && (this.editLock = l);
|
|
44864
44868
|
const s = await this._authenticate({ rotationCutover: !0 });
|
|
44865
44869
|
if (s.statusCode !== 200)
|
|
@@ -44870,8 +44874,8 @@ class Z1 {
|
|
|
44870
44874
|
} catch (c) {
|
|
44871
44875
|
this.roomKey = i;
|
|
44872
44876
|
const { secretKey: s } = Nd(Ll(i));
|
|
44873
|
-
throw this.collaborationKeyPair =
|
|
44874
|
-
|
|
44877
|
+
throw this.collaborationKeyPair = vi.fromSecretKey(
|
|
44878
|
+
Ti(s)
|
|
44875
44879
|
), this.collaborationUcan = void 0, this.editLock = o, c;
|
|
44876
44880
|
} finally {
|
|
44877
44881
|
this._rotating = !1;
|
|
@@ -44987,7 +44991,7 @@ class Z1 {
|
|
|
44987
44991
|
const r = this.awareness.getStates(), h = Array.from(r.keys()).filter(
|
|
44988
44992
|
(a) => a !== this.awareness.clientID
|
|
44989
44993
|
);
|
|
44990
|
-
h.length > 0 &&
|
|
44994
|
+
h.length > 0 && pi(
|
|
44991
44995
|
this.awareness,
|
|
44992
44996
|
h,
|
|
44993
44997
|
"socket disconnect"
|
|
@@ -45412,7 +45416,7 @@ class eH {
|
|
|
45412
45416
|
if (this._status !== "idle") {
|
|
45413
45417
|
await this.awaitFlush();
|
|
45414
45418
|
try {
|
|
45415
|
-
this._awareness &&
|
|
45419
|
+
this._awareness && pi(
|
|
45416
45420
|
this._awareness,
|
|
45417
45421
|
[this.ydoc.clientID],
|
|
45418
45422
|
"session terminated"
|
|
@@ -45705,7 +45709,7 @@ class eH {
|
|
|
45705
45709
|
}
|
|
45706
45710
|
forceCleanup() {
|
|
45707
45711
|
var l;
|
|
45708
|
-
this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.mirrorIdleTimer && (clearTimeout(this.mirrorIdleTimer), this.mirrorIdleTimer = null), this.fireBeacon(), this.updateQueue = [], this._awareness &&
|
|
45712
|
+
this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.mirrorIdleTimer && (clearTimeout(this.mirrorIdleTimer), this.mirrorIdleTimer = null), this.fireBeacon(), this.updateQueue = [], this._awareness && pi(this._awareness, [this.ydoc.clientID], "cleanup"), this.cleanupAwareness(), (l = this.socketClient) == null || l.disconnect(), this.resetInternalState(), this._status = "idle", this._context = { ...ii };
|
|
45709
45713
|
const t = Ad(this._status, this._context);
|
|
45710
45714
|
this.onCollabStateChange(t);
|
|
45711
45715
|
}
|
|
@@ -45937,7 +45941,7 @@ class eH {
|
|
|
45937
45941
|
const c = await this.catchUpFloor(t, o);
|
|
45938
45942
|
if (!l() || (c && this.isOwner && this.send({ type: "SET_UNMERGED_UPDATES", hasUpdates: !0 }), !n || !i)) return;
|
|
45939
45943
|
const s = qB(this.ydoc, o.merged);
|
|
45940
|
-
s && l() && await this.broadcastLocalContents(
|
|
45944
|
+
s && l() && await this.broadcastLocalContents(Ti(s), t);
|
|
45941
45945
|
}, "hydrate"), this.maybeCompactTail(o);
|
|
45942
45946
|
}
|
|
45943
45947
|
// A tail that took multiple pages (or hundreds of rows) makes every future open pay
|
|
@@ -46162,7 +46166,7 @@ class eH {
|
|
|
46162
46166
|
}
|
|
46163
46167
|
async disconnectInternal() {
|
|
46164
46168
|
var t;
|
|
46165
|
-
this._awareness &&
|
|
46169
|
+
this._awareness && pi(
|
|
46166
46170
|
this._awareness,
|
|
46167
46171
|
[this.ydoc.clientID],
|
|
46168
46172
|
"disconnect"
|
|
@@ -46192,10 +46196,10 @@ const tH = { status: "idle" }, lH = (e) => {
|
|
|
46192
46196
|
}, [e.ydoc, c]), xe(() => {
|
|
46193
46197
|
if (!s) return;
|
|
46194
46198
|
const I = () => {
|
|
46195
|
-
|
|
46199
|
+
pi(s, [e.ydoc.clientID], "window unload");
|
|
46196
46200
|
};
|
|
46197
46201
|
return typeof window < "u" && typeof window.addEventListener == "function" && window.addEventListener("beforeunload", I), () => {
|
|
46198
|
-
|
|
46202
|
+
pi(s, [e.ydoc.clientID], "hook unmount"), typeof window < "u" && typeof window.removeEventListener == "function" && window.removeEventListener("beforeunload", I);
|
|
46199
46203
|
};
|
|
46200
46204
|
}, [s !== void 0]), xe(() => () => {
|
|
46201
46205
|
var I;
|
|
@@ -47293,7 +47297,7 @@ var Yk = Sk;
|
|
|
47293
47297
|
function xk(e) {
|
|
47294
47298
|
return this.__data__.has(e);
|
|
47295
47299
|
}
|
|
47296
|
-
var wk = xk, Lk = mc, Ck =
|
|
47300
|
+
var wk = xk, Lk = mc, Ck = Vi, Rk = "[object AsyncFunction]", vk = "[object Function]", Bk = "[object GeneratorFunction]", Hk = "[object Proxy]";
|
|
47297
47301
|
function kk(e) {
|
|
47298
47302
|
if (!Ck(e))
|
|
47299
47303
|
return !1;
|
|
@@ -47321,7 +47325,7 @@ function Ok(e) {
|
|
|
47321
47325
|
}
|
|
47322
47326
|
return "";
|
|
47323
47327
|
}
|
|
47324
|
-
var _G = Ok, zk = qG, Ek = Uk, Dk =
|
|
47328
|
+
var _G = Ok, zk = qG, Ek = Uk, Dk = Vi, Pk = _G, Ak = /[\\^$.*+?()[\]{}|]/g, jk = /^\[object .+?Constructor\]$/, Qk = Function.prototype, qk = Object.prototype, _k = Qk.toString, $k = qk.hasOwnProperty, eF = RegExp(
|
|
47325
47329
|
"^" + _k.call($k).replace(Ak, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
47326
47330
|
);
|
|
47327
47331
|
function tF(e) {
|
|
@@ -47720,8 +47724,8 @@ function i7(e, t, l, n, i, o) {
|
|
|
47720
47724
|
}
|
|
47721
47725
|
return o.delete(e), o.delete(t), I;
|
|
47722
47726
|
}
|
|
47723
|
-
var o7 = i7, s7 = lo, c7 = bn, r7 = s7(c7, "DataView"), a7 = r7, d7 = lo, u7 = bn, h7 = d7(u7, "Promise"), m7 = h7, b7 = lo, Z7 = bn, p7 = b7(Z7, "Set"), I7 = p7, y7 = lo, f7 = bn, g7 = y7(f7, "WeakMap"), G7 = g7, Zh = a7, ph = G1, Ih = m7, yh = I7, fh = G7, mW = mc, Qo = _G, kZ = "[object Map]", W7 = "[object Object]", FZ = "[object Promise]", JZ = "[object Set]", TZ = "[object WeakMap]", NZ = "[object DataView]", X7 = Qo(Zh), V7 = Qo(ph), S7 = Qo(Ih), Y7 = Qo(yh), x7 = Qo(fh),
|
|
47724
|
-
(Zh &&
|
|
47727
|
+
var o7 = i7, s7 = lo, c7 = bn, r7 = s7(c7, "DataView"), a7 = r7, d7 = lo, u7 = bn, h7 = d7(u7, "Promise"), m7 = h7, b7 = lo, Z7 = bn, p7 = b7(Z7, "Set"), I7 = p7, y7 = lo, f7 = bn, g7 = y7(f7, "WeakMap"), G7 = g7, Zh = a7, ph = G1, Ih = m7, yh = I7, fh = G7, mW = mc, Qo = _G, kZ = "[object Map]", W7 = "[object Object]", FZ = "[object Promise]", JZ = "[object Set]", TZ = "[object WeakMap]", NZ = "[object DataView]", X7 = Qo(Zh), V7 = Qo(ph), S7 = Qo(Ih), Y7 = Qo(yh), x7 = Qo(fh), wi = mW;
|
|
47728
|
+
(Zh && wi(new Zh(new ArrayBuffer(1))) != NZ || ph && wi(new ph()) != kZ || Ih && wi(Ih.resolve()) != FZ || yh && wi(new yh()) != JZ || fh && wi(new fh()) != TZ) && (wi = function(e) {
|
|
47725
47729
|
var t = mW(e), l = t == W7 ? e.constructor : void 0, n = l ? Qo(l) : "";
|
|
47726
47730
|
if (n)
|
|
47727
47731
|
switch (n) {
|
|
@@ -47738,7 +47742,7 @@ var o7 = i7, s7 = lo, c7 = bn, r7 = s7(c7, "DataView"), a7 = r7, d7 = lo, u7 = b
|
|
|
47738
47742
|
}
|
|
47739
47743
|
return t;
|
|
47740
47744
|
});
|
|
47741
|
-
var nd =
|
|
47745
|
+
var nd = wi, $d = eW, w7 = tW, L7 = dT, C7 = o7, UZ = nd, KZ = ld, MZ = X1, R7 = rW, v7 = 1, OZ = "[object Arguments]", zZ = "[object Array]", Ec = "[object Object]", B7 = Object.prototype, EZ = B7.hasOwnProperty;
|
|
47742
47746
|
function H7(e, t, l, n, i, o) {
|
|
47743
47747
|
var c = KZ(e), s = KZ(t), r = c ? zZ : UZ(e), h = s ? zZ : UZ(t);
|
|
47744
47748
|
r = r == OZ ? Ec : r, h = h == OZ ? Ec : h;
|
|
@@ -48366,7 +48370,7 @@ const eU = (e, t, l, n, i = !1, o, c, s = !1, r, h, a, u = !1, m, b, Z, I, G, Y
|
|
|
48366
48370
|
try {
|
|
48367
48371
|
const j = e.current.getArray(t);
|
|
48368
48372
|
tn(e.current, t) || bh(e.current, j);
|
|
48369
|
-
const Q =
|
|
48373
|
+
const Q = Ri(
|
|
48370
48374
|
// @ts-ignore
|
|
48371
48375
|
j
|
|
48372
48376
|
);
|
|
@@ -48622,7 +48626,7 @@ const eU = (e, t, l, n, i = !1, o, c, s = !1, r, h, a, u = !1, m, b, Z, I, G, Y
|
|
|
48622
48626
|
}
|
|
48623
48627
|
if (Wt.length > 0) {
|
|
48624
48628
|
const mt = he.get(tt), zt = (mt == null ? void 0 : mt.changedKeys) ?? /* @__PURE__ */ new Set();
|
|
48625
|
-
Wt.forEach((
|
|
48629
|
+
Wt.forEach((Si) => zt.add(Si)), he.set(tt, {
|
|
48626
48630
|
sheetId: tt,
|
|
48627
48631
|
sheetMap: je,
|
|
48628
48632
|
changedKeys: zt
|
|
@@ -48644,7 +48648,7 @@ const eU = (e, t, l, n, i = !1, o, c, s = !1, r, h, a, u = !1, m, b, Z, I, G, Y
|
|
|
48644
48648
|
if (mt instanceof Ue.Map) {
|
|
48645
48649
|
const zt = /* @__PURE__ */ new Map();
|
|
48646
48650
|
mt.forEach(
|
|
48647
|
-
(
|
|
48651
|
+
(Si, kt) => zt.set(kt, { action: "update" })
|
|
48648
48652
|
), ge.set(tt, {
|
|
48649
48653
|
sheetId: tt,
|
|
48650
48654
|
configMap: mt,
|
|
@@ -48706,7 +48710,7 @@ const eU = (e, t, l, n, i = !1, o, c, s = !1, r, h, a, u = !1, m, b, Z, I, G, Y
|
|
|
48706
48710
|
L,
|
|
48707
48711
|
() => {
|
|
48708
48712
|
try {
|
|
48709
|
-
const Te =
|
|
48713
|
+
const Te = Ri(j);
|
|
48710
48714
|
cs(
|
|
48711
48715
|
Te,
|
|
48712
48716
|
D(),
|
|
@@ -48911,7 +48915,7 @@ const eU = (e, t, l, n, i = !1, o, c, s = !1, r, h, a, u = !1, m, b, Z, I, G, Y
|
|
|
48911
48915
|
}
|
|
48912
48916
|
}, Se = () => {
|
|
48913
48917
|
try {
|
|
48914
|
-
const Te =
|
|
48918
|
+
const Te = Ri(j);
|
|
48915
48919
|
cs(
|
|
48916
48920
|
Te,
|
|
48917
48921
|
D(),
|
|
@@ -49015,7 +49019,7 @@ const eU = (e, t, l, n, i = !1, o, c, s = !1, r, h, a, u = !1, m, b, Z, I, G, Y
|
|
|
49015
49019
|
try {
|
|
49016
49020
|
const Q = e.current.getArray(t);
|
|
49017
49021
|
tn(e.current, t) || bh(e.current, Q);
|
|
49018
|
-
const _ =
|
|
49022
|
+
const _ = Ri(Q);
|
|
49019
49023
|
return KH(z, () => {
|
|
49020
49024
|
cs(
|
|
49021
49025
|
_,
|
|
@@ -49840,20 +49844,20 @@ const NU = (e, t) => {
|
|
|
49840
49844
|
(kt, At, Xl, no, jn, qo) => {
|
|
49841
49845
|
C((io) => {
|
|
49842
49846
|
const Cn = { ...io }, oo = Cn == null ? void 0 : Cn[no];
|
|
49843
|
-
let
|
|
49844
|
-
return Xl === "row" ?
|
|
49847
|
+
let Yi;
|
|
49848
|
+
return Xl === "row" ? Yi = cU(
|
|
49845
49849
|
oo,
|
|
49846
49850
|
kt,
|
|
49847
49851
|
At,
|
|
49848
49852
|
jn,
|
|
49849
49853
|
qo
|
|
49850
|
-
) :
|
|
49854
|
+
) : Yi = rU(
|
|
49851
49855
|
oo,
|
|
49852
49856
|
kt,
|
|
49853
49857
|
At,
|
|
49854
49858
|
jn,
|
|
49855
49859
|
qo
|
|
49856
|
-
),
|
|
49860
|
+
), Yi !== oo && (Cn[no] = Yi), JSON.stringify(Cn) !== JSON.stringify(io) ? Cn : io;
|
|
49857
49861
|
});
|
|
49858
49862
|
},
|
|
49859
49863
|
[]
|
|
@@ -49974,11 +49978,11 @@ const NU = (e, t) => {
|
|
|
49974
49978
|
() => Ce.current,
|
|
49975
49979
|
() => {
|
|
49976
49980
|
if (!se.current) return null;
|
|
49977
|
-
const kt =
|
|
49981
|
+
const kt = Ti(Ue.encodeStateAsUpdate(se.current));
|
|
49978
49982
|
let At = nt.current;
|
|
49979
49983
|
try {
|
|
49980
49984
|
const Xl = se.current.getArray(i);
|
|
49981
|
-
At =
|
|
49985
|
+
At = Ri(Xl), nt.current = At;
|
|
49982
49986
|
} catch {
|
|
49983
49987
|
}
|
|
49984
49988
|
return { data: { data: At }, update: kt };
|
|
@@ -50100,7 +50104,7 @@ const NU = (e, t) => {
|
|
|
50100
50104
|
be
|
|
50101
50105
|
]);
|
|
50102
50106
|
const ft = !ut || re === "initializing" || re === "syncing" || // In read-only mode, continue showing the loading state if we have no data yet
|
|
50103
|
-
oe && (!nt.current || nt.current.length === 0), mt = lt(() => (I == null ? void 0 : I.enabled) !== !0 ? !0 : I.connection.isOwner, [I]), zt = fH(I),
|
|
50107
|
+
oe && (!nt.current || nt.current.length === 0), mt = lt(() => (I == null ? void 0 : I.enabled) !== !0 ? !0 : I.connection.isOwner, [I]), zt = fH(I), Si = lt(() => {
|
|
50104
50108
|
var kt;
|
|
50105
50109
|
return {
|
|
50106
50110
|
setSelectedTemplate: e,
|
|
@@ -50194,7 +50198,7 @@ const NU = (e, t) => {
|
|
|
50194
50198
|
Q,
|
|
50195
50199
|
q
|
|
50196
50200
|
]);
|
|
50197
|
-
return /* @__PURE__ */ d(wW.Provider, { value:
|
|
50201
|
+
return /* @__PURE__ */ d(wW.Provider, { value: Si, children: /* @__PURE__ */ d(FU, { children: /* @__PURE__ */ d(HU, { isReadMode: oe, children: n }) }) });
|
|
50198
50202
|
}, k1 = () => {
|
|
50199
50203
|
const e = It(wW);
|
|
50200
50204
|
if (e === void 0)
|
|
@@ -51101,7 +51105,7 @@ const NU = (e, t) => {
|
|
|
51101
51105
|
(u, m) => {
|
|
51102
51106
|
m !== e.clientID && h - u.lastUpdated > s && a.push(m);
|
|
51103
51107
|
}
|
|
51104
|
-
), a.length > 0 &&
|
|
51108
|
+
), a.length > 0 && pi(e, a, "timeout");
|
|
51105
51109
|
}, 5e3);
|
|
51106
51110
|
return () => {
|
|
51107
51111
|
var h;
|
|
@@ -52050,7 +52054,7 @@ const CK = ({
|
|
|
52050
52054
|
return;
|
|
52051
52055
|
}
|
|
52052
52056
|
const w = t.getArray(n), J = (Q) => {
|
|
52053
|
-
const _ =
|
|
52057
|
+
const _ = Ri(t.getArray(n));
|
|
52054
52058
|
i.current = _, setTimeout(() => {
|
|
52055
52059
|
h && h(), l((N) => N + 1);
|
|
52056
52060
|
}, 200), setTimeout(() => {
|
|
@@ -52216,13 +52220,13 @@ const CK = ({
|
|
|
52216
52220
|
}, Y.readAsText(b);
|
|
52217
52221
|
});
|
|
52218
52222
|
}, lp = async (e, t, l, n) => {
|
|
52219
|
-
const { handleExportToXLSX: i } = await import("./xlsx-export-impl-
|
|
52223
|
+
const { handleExportToXLSX: i } = await import("./xlsx-export-impl-lfDXFnFW.js");
|
|
52220
52224
|
return i(e, t, l, n);
|
|
52221
52225
|
}, np = async (e, t, l, n) => {
|
|
52222
|
-
const { handleExportToODS: i } = await import("./xlsx-export-impl-
|
|
52226
|
+
const { handleExportToODS: i } = await import("./xlsx-export-impl-lfDXFnFW.js");
|
|
52223
52227
|
return i(e, t, l, n);
|
|
52224
52228
|
}, RD = async (e, t, l) => {
|
|
52225
|
-
const { exportToXLSXBytes: n } = await import("./xlsx-export-impl-
|
|
52229
|
+
const { exportToXLSXBytes: n } = await import("./xlsx-export-impl-lfDXFnFW.js");
|
|
52226
52230
|
return n(e, t, l);
|
|
52227
52231
|
}, tu = (e) => {
|
|
52228
52232
|
cm({
|
|
@@ -52313,7 +52317,7 @@ const CK = ({
|
|
|
52313
52317
|
}) => {
|
|
52314
52318
|
const [s, r] = Ve(!1), h = Ge(
|
|
52315
52319
|
async (u, m, b) => {
|
|
52316
|
-
const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-
|
|
52320
|
+
const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-DhCtyQw6.js");
|
|
52317
52321
|
return Z(
|
|
52318
52322
|
{
|
|
52319
52323
|
sheetEditorRef: e,
|
|
@@ -52344,7 +52348,7 @@ const CK = ({
|
|
|
52344
52348
|
), a = Ge(
|
|
52345
52349
|
async (u, m, b) => {
|
|
52346
52350
|
var y;
|
|
52347
|
-
const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-
|
|
52351
|
+
const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-DhCtyQw6.js"), G = u == null ? void 0 : u.target, Y = ((y = G == null ? void 0 : G.files) == null ? void 0 : y[0]) || m;
|
|
52348
52352
|
if (!Y) return;
|
|
52349
52353
|
const f = await Z(Y);
|
|
52350
52354
|
return I(
|
|
@@ -52687,7 +52691,7 @@ function n8(e) {
|
|
|
52687
52691
|
t.push(l);
|
|
52688
52692
|
return t;
|
|
52689
52693
|
}
|
|
52690
|
-
var i8 = n8, o8 =
|
|
52694
|
+
var i8 = n8, o8 = Vi, s8 = Y1, c8 = i8, r8 = Object.prototype, a8 = r8.hasOwnProperty;
|
|
52691
52695
|
function d8(e) {
|
|
52692
52696
|
if (!o8(e))
|
|
52693
52697
|
return c8(e);
|
|
@@ -52802,7 +52806,7 @@ function CM(e, t, l) {
|
|
|
52802
52806
|
return aM(e);
|
|
52803
52807
|
}
|
|
52804
52808
|
}
|
|
52805
|
-
var RM = CM, vM =
|
|
52809
|
+
var RM = CM, vM = Vi, up = Object.create, BM = /* @__PURE__ */ function() {
|
|
52806
52810
|
function e() {
|
|
52807
52811
|
}
|
|
52808
52812
|
return function(t) {
|
|
@@ -52826,7 +52830,7 @@ var zM = OM, EM = zM, DM = V1, hp = S1, mp = hp && hp.isMap, PM = mp ? DM(mp) :
|
|
|
52826
52830
|
function _M(e) {
|
|
52827
52831
|
return QM(e) && jM(e) == qM;
|
|
52828
52832
|
}
|
|
52829
|
-
var $M = _M, eO = $M, tO = V1, bp = S1, Zp = bp && bp.isSet, lO = Zp ? tO(Zp) : eO, nO = lO, iO = eW, oO = UK, sO = FW, cO = l8, rO = f8, aO = g8, dO = W8, uO = Y8, hO = T8, mO = hW, bO = O8, ZO = nd, pO = P8, IO = RM, yO = NM, fO = ld, gO = X1, GO = AM, WO =
|
|
52833
|
+
var $M = _M, eO = $M, tO = V1, bp = S1, Zp = bp && bp.isSet, lO = Zp ? tO(Zp) : eO, nO = lO, iO = eW, oO = UK, sO = FW, cO = l8, rO = f8, aO = g8, dO = W8, uO = Y8, hO = T8, mO = hW, bO = O8, ZO = nd, pO = P8, IO = RM, yO = NM, fO = ld, gO = X1, GO = AM, WO = Vi, XO = nO, VO = x1, SO = J1, YO = 1, xO = 2, wO = 4, NW = "[object Arguments]", LO = "[object Array]", CO = "[object Boolean]", RO = "[object Date]", vO = "[object Error]", UW = "[object Function]", BO = "[object GeneratorFunction]", HO = "[object Map]", kO = "[object Number]", KW = "[object Object]", FO = "[object RegExp]", JO = "[object Set]", TO = "[object String]", NO = "[object Symbol]", UO = "[object WeakMap]", KO = "[object ArrayBuffer]", MO = "[object DataView]", OO = "[object Float32Array]", zO = "[object Float64Array]", EO = "[object Int8Array]", DO = "[object Int16Array]", PO = "[object Int32Array]", AO = "[object Uint8Array]", jO = "[object Uint8ClampedArray]", QO = "[object Uint16Array]", qO = "[object Uint32Array]", jt = {};
|
|
52830
52834
|
jt[NW] = jt[LO] = jt[KO] = jt[MO] = jt[CO] = jt[RO] = jt[OO] = jt[zO] = jt[EO] = jt[DO] = jt[PO] = jt[HO] = jt[kO] = jt[KW] = jt[FO] = jt[JO] = jt[TO] = jt[NO] = jt[AO] = jt[jO] = jt[QO] = jt[qO] = !0;
|
|
52831
52835
|
jt[vO] = jt[UW] = jt[UO] = !1;
|
|
52832
52836
|
function rr(e, t, l, n, i, o) {
|
|
@@ -54738,7 +54742,7 @@ const Kz = ({
|
|
|
54738
54742
|
G.push([g()]);
|
|
54739
54743
|
});
|
|
54740
54744
|
});
|
|
54741
|
-
const y =
|
|
54745
|
+
const y = Ri(G);
|
|
54742
54746
|
i.current = y, r(y), o == null || o((p) => p + 1), setTimeout(() => {
|
|
54743
54747
|
var p;
|
|
54744
54748
|
(p = c.current) == null || p.activateSheet({
|
|
@@ -54788,7 +54792,7 @@ const Kz = ({
|
|
|
54788
54792
|
}, [e, l]), c ? /* @__PURE__ */ d(
|
|
54789
54793
|
"div",
|
|
54790
54794
|
{
|
|
54791
|
-
className:
|
|
54795
|
+
className: Zi(
|
|
54792
54796
|
"dsheet-transition-wrapper absolute inset-0 transition-opacity ease-in-out",
|
|
54793
54797
|
i ? "opacity-100" : "opacity-0",
|
|
54794
54798
|
n
|
|
@@ -57618,7 +57622,7 @@ const BE = ({ textToCopy: e }) => /* @__PURE__ */ d(
|
|
|
57618
57622
|
"div",
|
|
57619
57623
|
{
|
|
57620
57624
|
style: { height: "calc(100vh)" },
|
|
57621
|
-
className:
|
|
57625
|
+
className: Zi("dsheet-editor", W && "fortune-read-only"),
|
|
57622
57626
|
"data-testid": "dsheet-editor",
|
|
57623
57627
|
children: [
|
|
57624
57628
|
/* @__PURE__ */ d(
|
|
@@ -57675,7 +57679,7 @@ const BE = ({ textToCopy: e }) => /* @__PURE__ */ d(
|
|
|
57675
57679
|
"nav",
|
|
57676
57680
|
{
|
|
57677
57681
|
id: "Navbar",
|
|
57678
|
-
className:
|
|
57682
|
+
className: Zi(
|
|
57679
57683
|
"dsheet-nav h-[44px] color-bg-default px-4 flex gap-2 items-center justify-between w-screen fixed left-0 top-0 border-b color-border-default z-10 transition-transform duration-300",
|
|
57680
57684
|
{
|
|
57681
57685
|
"translate-y-0": !0,
|
|
@@ -57689,13 +57693,13 @@ const BE = ({ textToCopy: e }) => /* @__PURE__ */ d(
|
|
|
57689
57693
|
/* @__PURE__ */ R(
|
|
57690
57694
|
"div",
|
|
57691
57695
|
{
|
|
57692
|
-
className:
|
|
57696
|
+
className: Zi(
|
|
57693
57697
|
"dsheet-editor-main relative overflow-hidden",
|
|
57694
57698
|
l ? "h-[94dvh] md:!h-[calc(100vh-44px)] mt-[44px]" : "h-[100dvh] md:!h-[100vh]"
|
|
57695
57699
|
),
|
|
57696
57700
|
"data-testid": "dsheet-editor-main",
|
|
57697
57701
|
children: [
|
|
57698
|
-
/* @__PURE__ */ d(Gp, { show: !0, children: /* @__PURE__ */ d(mw, { isReadOnly: W }) }),
|
|
57702
|
+
/* @__PURE__ */ d(Gp, { show: !0, children: /* @__PURE__ */ d(mw, { isReadOnly: W, active: le }) }),
|
|
57699
57703
|
/* @__PURE__ */ d(Gp, { show: !L && be, duration: 1e3, children: /* @__PURE__ */ d(
|
|
57700
57704
|
Mz,
|
|
57701
57705
|
{
|
|
@@ -58087,7 +58091,7 @@ async function FD(e, t) {
|
|
|
58087
58091
|
const { convertOdsFileToXlsxFile: b } = await import("./ods-to-xlsx-DeJAYBkD.js");
|
|
58088
58092
|
u = await b(e);
|
|
58089
58093
|
}
|
|
58090
|
-
const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-
|
|
58094
|
+
const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-DhCtyQw6.js");
|
|
58091
58095
|
await m(
|
|
58092
58096
|
{
|
|
58093
58097
|
sheetEditorRef: c,
|
|
@@ -58113,7 +58117,7 @@ async function FD(e, t) {
|
|
|
58113
58117
|
if (n.getArray(l).length === 0)
|
|
58114
58118
|
throw new Error("No sheets were imported");
|
|
58115
58119
|
return {
|
|
58116
|
-
encodedContent:
|
|
58120
|
+
encodedContent: Ti(Ue.encodeStateAsUpdate(n)),
|
|
58117
58121
|
title: s.current,
|
|
58118
58122
|
warnings: r
|
|
58119
58123
|
};
|
|
@@ -58166,6 +58170,6 @@ export {
|
|
|
58166
58170
|
vD as v,
|
|
58167
58171
|
Ks as w,
|
|
58168
58172
|
Dy as x,
|
|
58169
|
-
|
|
58173
|
+
Ri as y,
|
|
58170
58174
|
Gh as z
|
|
58171
58175
|
};
|