@sheetxl/studio-vanilla 0.4.10 → 0.4.12
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/B35OZ0mE8aINQPP9.cjs +7 -0
- package/browser/cjs/BPzEQNENF-gEBkg9.cjs +7 -0
- package/browser/cjs/BUokV6yuzE-_8MyK.cjs +7 -0
- package/browser/cjs/BeZHmOKfa37mFNAu.cjs +7 -0
- package/browser/cjs/BflJ_0gT9lQtDvY_.cjs +7 -0
- package/browser/cjs/BwN8vKi5o3-PbIMo.cjs +7 -0
- package/browser/cjs/C3OizZPVuxO2fjSG.cjs +7 -0
- package/browser/cjs/CBL6KkiWI2RPflEN.cjs +7 -0
- package/browser/cjs/CN6-6xpZMpFqSS8M.cjs +7 -0
- package/browser/cjs/CTrEV_UpxC0W6cZZ.cjs +7 -0
- package/browser/cjs/CU30GVjjFXl44vEU.cjs +7 -0
- package/browser/cjs/CZWBxvUXzfpn_zmc.cjs +7 -0
- package/browser/cjs/Ccs2ouvlLekaLGH0.cjs +7 -0
- package/browser/cjs/Ce-8L4Viq3I_6j0i.cjs +7 -0
- package/browser/cjs/CtNjLzIHB8WX63Bl.cjs +7 -0
- package/browser/cjs/DAHpsyykuPBkoh-Z.cjs +7 -0
- package/browser/cjs/DJbKKxeeTEHHA1gR.cjs +107 -0
- package/browser/cjs/D_VQzwC1zzTJyKtG.cjs +7 -0
- package/browser/cjs/GrsZZ_mEdsM5dEMA.cjs +7 -0
- package/browser/cjs/JKEGlXjMwGnXk_Gv.cjs +7 -0
- package/browser/cjs/L1iE_VcelYZIy0wI.cjs +7 -0
- package/browser/cjs/Q_VvA-yUQx3xFKiJ.cjs +7 -0
- package/browser/cjs/fTGpiXzFm3K_u2Fm.cjs +7 -0
- package/browser/cjs/hwDUzorB6aCvH1eL.cjs +7 -0
- package/browser/cjs/index.cjs +4 -3
- package/browser/cjs/no5c2H18QD2qmOH6.cjs +7 -0
- package/browser/esm/B4Mm5gczpI_k2zzN.mjs +7 -0
- package/browser/esm/B8ISUdOxsJMYWzNN.mjs +7 -0
- package/browser/esm/BnJiF38TGudjoHzT.mjs +7 -0
- package/browser/esm/Bts4nCgfCAUpTfxz.mjs +7 -0
- package/browser/esm/C3cyAbIH8Qc8MIFN.mjs +107 -0
- package/browser/esm/C4jlaVv8bELgiHyE.mjs +7 -0
- package/browser/esm/CYIhGb86r-kKOrP5.mjs +7 -0
- package/browser/esm/CcpskguvlvemArQn.mjs +7 -0
- package/browser/esm/CeRfALx1iU5fqOUg.mjs +7 -0
- package/browser/esm/CfYWmP_Hots5f0f6.mjs +7 -0
- package/browser/esm/CkarbqNx_lhlBnw7.mjs +7 -0
- package/browser/esm/D2PlWNQjrTgf6GuR.mjs +7 -0
- package/browser/esm/D3KNxvnrwR6_fTJE.mjs +7 -0
- package/browser/esm/DIJyH94oCzUnlcNZ.mjs +7 -0
- package/browser/esm/DVAG1NxFe3cMjLE1.mjs +7 -0
- package/browser/esm/DVqga7g7j0FUiM6p.mjs +7 -0
- package/browser/esm/DcX8yGEBX6qi9RCe.mjs +7 -0
- package/browser/esm/DeXfOSxGE_Ez7DZq.mjs +7 -0
- package/browser/esm/DzgM_rkwyIHsCb6I.mjs +7 -0
- package/browser/esm/M4hZ25330e96seUM.mjs +7 -0
- package/browser/esm/Qp2Toeh_EbJH_f_6.mjs +7 -0
- package/browser/esm/SAyRTPVprOHZ8Up8.mjs +7 -0
- package/browser/esm/_ft7JYO6QdDbIu3d.mjs +7 -0
- package/browser/esm/dpdy0BU4GGI5lZrX.mjs +7 -0
- package/browser/esm/index.mjs +2 -8
- package/browser/esm/oLCocGFRAwsVsOSE.mjs +7 -0
- package/cdn/assets/7_O6nILzn1fSVvkO.js +13449 -0
- package/cdn/assets/B3kbBB6oxKBErwzn.js +27 -0
- package/cdn/assets/BB66NDz7S3ocEfRB.js +150 -0
- package/cdn/assets/BCK7yhx9JfzU2rF0.js +22 -0
- package/{browser/esm/DIGFi66CQPMV3HsL.mjs → cdn/assets/BSAH88RG1oubICau.js} +25 -25
- package/cdn/assets/{B-9FcTf3xBEVGdjV.js → BT5EcMEFBsphczwC.js} +536 -534
- package/cdn/assets/BcWoqhD_sX85c7Mh.js +1701 -0
- package/cdn/assets/BoOefjrM4kZ-YXxa.js +90 -0
- package/cdn/assets/BtweFYnoj_aEfydW.js +1371 -0
- package/cdn/assets/Bv0Xb6DdcQbPYJKo.js +24 -0
- package/cdn/assets/CC-S4NMYhLg3WgqO.js +3875 -0
- package/cdn/assets/CJhyHcQcrhbtC33r.js +50 -0
- package/cdn/assets/CUc6gRjjRGTFWSHD.js +50 -0
- package/{browser/esm/D47D26mVYSAdb5C8.mjs → cdn/assets/CfObTzh8pGdd8D23.js} +560 -555
- package/cdn/assets/CiY3HumGDc_5bMtR.js +58 -0
- package/cdn/assets/CpPLN0-hDsTIFHZV.js +46 -0
- package/{browser/esm/C_Zx1tYjI3n7KKZH.mjs → cdn/assets/Cq94woVmlxhjWVRI.js} +2 -2
- package/cdn/assets/CsjftXmSYQRHNKdq.js +41 -0
- package/cdn/assets/DBL4jY0AVc53RGNm.js +637 -0
- package/cdn/assets/DDW1WJ2IM_9ZUfKm.js +36 -0
- package/cdn/assets/{Bt1JSlSpWXDOBfq3.js → DJQOS9qxVAlpgDMt.js} +5 -4
- package/cdn/assets/DWJE3K3jMKMTCi3o.js +393 -0
- package/cdn/assets/D_5RgqgwXsoqLJDR.js +241 -0
- package/cdn/assets/DfmaL8DmDaFAv8M_.js +6481 -0
- package/cdn/assets/DgLPO_EQ9DYoGgec.js +423 -0
- package/cdn/assets/{B3J6oAmsS7oLNFPd.js → DkS6quwH1okWaho6.js} +3 -3
- package/cdn/assets/DxMu6URURFWj9aXM.js +2373 -0
- package/cdn/assets/Jhm2DAcrfAqiM-Y-.js +26490 -0
- package/cdn/assets/MRBi3juXAW0lA_mj.js +1358 -0
- package/cdn/assets/dk2teWHDODYNarJY.js +27 -0
- package/cdn/assets/phYz0vGgqIEQ2hco.js +12 -0
- package/cdn/assets/qA23x9VVBL9R4qxN.js +43 -0
- package/cdn/index.js +8 -8
- package/cdn/loader.js +1 -1
- package/package.json +5 -5
- package/browser/cjs/B1UGqZP_7Z0Ewpog.cjs +0 -6
- package/browser/cjs/B6m9VXoFseD4zuZ5.cjs +0 -6
- package/browser/cjs/BKePSaEpM6Z063z-.cjs +0 -161
- package/browser/cjs/Bqn0ZeP_srNfL9rG.cjs +0 -6
- package/browser/cjs/C-izbj62pQuZjOrT.cjs +0 -304
- package/browser/cjs/C-w-GX8N54TxTjjf.cjs +0 -6
- package/browser/cjs/C1QGdcqJ-9sdGTQR.cjs +0 -6
- package/browser/cjs/C38aiRglHLxZ8KRY.cjs +0 -6
- package/browser/cjs/C4JMn_hMnlOnDpQO.cjs +0 -6
- package/browser/cjs/CApEj4LhhPUvQjIG.cjs +0 -16
- package/browser/cjs/CFcJbmmXjWjl6fQH.cjs +0 -6
- package/browser/cjs/CKiDbCZ6rGgXK7yN.cjs +0 -42
- package/browser/cjs/CM8btXQsJbnFKXUm.cjs +0 -6
- package/browser/cjs/Cb0K3Wzp7BAa4zni.cjs +0 -15
- package/browser/cjs/CiAUhPU7v1BK-8Bb.cjs +0 -7
- package/browser/cjs/CsXS-EN0N5SZHTnQ.cjs +0 -145
- package/browser/cjs/Cu2eUomoF0HToa4l.cjs +0 -6
- package/browser/cjs/Cy7ii9B_Vqx94pbu.cjs +0 -19
- package/browser/cjs/CzI4ZcsmzsyPBpWN.cjs +0 -12
- package/browser/cjs/DKHzUx2gKXwboKy1.cjs +0 -11
- package/browser/cjs/DKc8wAq8dwbDddQn.cjs +0 -11
- package/browser/cjs/DMyKApbUVRtNYC4e.cjs +0 -6
- package/browser/cjs/DROR08HMGyg7rizQ.cjs +0 -6
- package/browser/cjs/DfGDZlbFVknGyu_X.cjs +0 -6
- package/browser/cjs/OQdqVM_6m78kE5Aj.cjs +0 -7
- package/browser/cjs/v4OEtYXaUw_GeiXM.cjs +0 -12
- package/browser/esm/4uEr84M4w57AMyDg.mjs +0 -1703
- package/browser/esm/B8Ja5DlyKAy8xfQD.mjs +0 -1365
- package/browser/esm/B9bN60uAvy62vnwt.mjs +0 -22
- package/browser/esm/BAOzSQdzHl43K9Hd.mjs +0 -50
- package/browser/esm/BQYSD5Nb35y0WeeV.mjs +0 -421
- package/browser/esm/BVcaNvORp_uKPQgJ.mjs +0 -46
- package/browser/esm/BqXO_cQhrMJu7JoQ.mjs +0 -3756
- package/browser/esm/C18A_DcIEHNYBDvR.mjs +0 -46
- package/browser/esm/C7FoKZbSzjvuY3UB.mjs +0 -43
- package/browser/esm/CCIJpHSbFPjTEF8S.mjs +0 -1665
- package/browser/esm/CHNPjJxb0GY_naLa.mjs +0 -25025
- package/browser/esm/CKHsU9LUNYowimxS.mjs +0 -1346
- package/browser/esm/Cm-m3bZh0V44y0li.mjs +0 -390
- package/browser/esm/D1e_ccSgcNXvWHgy.mjs +0 -151
- package/browser/esm/D9CdO3PtV12RnK8K.mjs +0 -1467
- package/browser/esm/D9x-Q8y57gePf-tE.mjs +0 -944
- package/browser/esm/DHhXutXh7b5LsU1m.mjs +0 -2346
- package/browser/esm/DamiTeQsSMP2Cwld.mjs +0 -58
- package/browser/esm/DhD48oFrbrnZ6Zg5.mjs +0 -13208
- package/browser/esm/Ln2ZalJgj1CiJJue.mjs +0 -50
- package/browser/esm/S9fgUO7h8YgZxoKH.mjs +0 -633
- package/browser/esm/qVAHcpq07IhtAaQc.mjs +0 -24
- package/browser/esm/xrzJ8ILZHb118Oyt.mjs +0 -41
- package/cdn/assets/2-xJlw77WsCoyz09.js +0 -24872
- package/cdn/assets/B-p1i2SNRMunPXCF.js +0 -43
- package/cdn/assets/B8Ja5DlyKAy8xfQD.js +0 -1365
- package/cdn/assets/BG3YTMAzNKPRGoLs.js +0 -50
- package/cdn/assets/BQYSD5Nb35y0WeeV.js +0 -421
- package/cdn/assets/BbzUpvQOkxsN-yIH.js +0 -2346
- package/cdn/assets/BqXO_cQhrMJu7JoQ.js +0 -3756
- package/cdn/assets/CCIJpHSbFPjTEF8S.js +0 -1665
- package/cdn/assets/CKHsU9LUNYowimxS.js +0 -1346
- package/cdn/assets/CWLJZwD2GVXljoWG.js +0 -46
- package/cdn/assets/Cm-m3bZh0V44y0li.js +0 -390
- package/cdn/assets/CtQlXGkNWgI-vtGy.js +0 -2178
- package/cdn/assets/DIGFi66CQPMV3HsL.js +0 -84
- package/cdn/assets/DK4S0DbayChkfTD6.js +0 -58
- package/cdn/assets/DQvsBz9F1GS_S7r9.js +0 -50
- package/cdn/assets/DTOgv_zwXSur-yCq.js +0 -151
- package/cdn/assets/DYZjOnD8WWQkCYuH.js +0 -944
- package/cdn/assets/DhD48oFrbrnZ6Zg5.js +0 -13208
- package/cdn/assets/DhyAyTCDkMBf392P.js +0 -21
- package/cdn/assets/P7HeVw5SHROLSWBz.js +0 -24
- package/cdn/assets/S4Z0SN8x6EltjsHT.js +0 -22
- package/cdn/assets/S9fgUO7h8YgZxoKH.js +0 -633
- package/cdn/assets/guYe4C_6pE93QsDV.js +0 -41
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { NumberFormat as Ht, ScalarType as Ft, ResourceCollection as
|
|
2
|
-
import {
|
|
1
|
+
import { NumberFormat as Ht, ScalarType as Ft, ResourceCollection as Ss, Tuple as Cs, IAutoFilter as Gt, AddressUtils as at, CoordUtils as Pe, FormulaError as ks, IRange as As, CommonUtils as ss, Theme as Es, JSONStableStringify as Ds, Workbook as Ps, IColor as Os, OutOfBoundsError as Is } from "@sheetxl/sdk";
|
|
2
|
+
import { _ as hs } from "./Jhm2DAcrfAqiM-Y-.js";
|
|
3
3
|
/**
|
|
4
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
4
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.12
|
|
5
5
|
*
|
|
6
6
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
7
7
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
8
8
|
*/
|
|
9
|
-
const
|
|
10
|
-
function
|
|
9
|
+
const is = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Vs = new RegExp(`^[${is}][-${is}.0-9·̀-ͯ‿-⁀]*$`, "u");
|
|
10
|
+
function us(i) {
|
|
11
11
|
return i >= 65 && i <= 90 || i >= 97 && i <= 122 || i === 58 || i === 95 || i === 8204 || i === 8205 || i >= 192 && i <= 214 || i >= 216 && i <= 246 || i >= 248 && i <= 767 || i >= 880 && i <= 893 || i >= 895 && i <= 8191 || i >= 8304 && i <= 8591 || i >= 11264 && i <= 12271 || i >= 12289 && i <= 55295 || i >= 63744 && i <= 64975 || i >= 65008 && i <= 65533 || i >= 65536 && i <= 983039;
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function
|
|
13
|
+
const os = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ls = new RegExp(`^[${os}][-${os}.0-9·̀-ͯ‿-⁀]*$`, "u");
|
|
14
|
+
function ds(i) {
|
|
15
15
|
return i >= 65 && i <= 90 || i === 95 || i >= 97 && i <= 122 || i >= 192 && i <= 214 || i >= 216 && i <= 246 || i >= 248 && i <= 767 || i >= 880 && i <= 893 || i >= 895 && i <= 8191 || i >= 8204 && i <= 8205 || i >= 8304 && i <= 8591 || i >= 11264 && i <= 12271 || i >= 12289 && i <= 55295 || i >= 63744 && i <= 64975 || i >= 65008 && i <= 65533 || i >= 65536 && i <= 983039;
|
|
16
16
|
}
|
|
17
17
|
const q = function(i) {
|
|
18
18
|
return i === 32 || i === 10 || i === 13 || i === 9;
|
|
19
|
-
},
|
|
19
|
+
}, Ns = function(i) {
|
|
20
20
|
return i >= 32 && i <= 55295 || i === 10 || i === 13 || i === 9 || i >= 57344 && i <= 65533 || i >= 65536 && i <= 1114111;
|
|
21
|
-
},
|
|
22
|
-
return
|
|
23
|
-
},
|
|
21
|
+
}, ce = us, rs = function(i) {
|
|
22
|
+
return us(i) || i >= 48 && i <= 57 || i === 45 || i === 46 || i === 183 || i >= 768 && i <= 879 || i >= 8255 && i <= 8256;
|
|
23
|
+
}, ps = [32, 10, 13, 9], Rs = Vs, $s = function(i) {
|
|
24
24
|
return i >= 1 && i <= 55295 || i >= 57344 && i <= 65533 || i >= 65536 && i <= 1114111;
|
|
25
|
-
},
|
|
26
|
-
return
|
|
27
|
-
},
|
|
28
|
-
function
|
|
25
|
+
}, Ms = ds, js = function(i) {
|
|
26
|
+
return ds(i) || i === 45 || i === 46 || i >= 48 && i <= 57 || i === 183 || i >= 768 && i <= 879 || i >= 8255 && i <= 8256;
|
|
27
|
+
}, Hs = Ls, ye = "http://www.w3.org/XML/1998/namespace", Kt = "http://www.w3.org/2000/xmlns/", Fs = { __proto__: null, xml: ye, xmlns: Kt }, Xs = { __proto__: null, amp: "&", gt: ">", lt: "<", quot: '"', apos: "'" }, O = -1, lt = -2, B = 13, Xt = 33, it = 10, vt = 60, Jt = 61, M = 62, F = 63, Qt = 93, Te = (i) => i === 34 || i === 39, gs = [34, 39], Bs = [...gs, 91, M], Ws = [...gs, vt, Qt], _s = [Jt, F, ...ps], qs = [...ps, M, 38, vt];
|
|
28
|
+
function Oe(i, t, s) {
|
|
29
29
|
switch (t) {
|
|
30
30
|
case "xml":
|
|
31
|
-
s !==
|
|
31
|
+
s !== ye && i.fail(`xml prefix must be bound to ${ye}.`);
|
|
32
32
|
break;
|
|
33
33
|
case "xmlns":
|
|
34
|
-
s !==
|
|
34
|
+
s !== Kt && i.fail(`xmlns prefix must be bound to ${Kt}.`);
|
|
35
35
|
}
|
|
36
36
|
switch (s) {
|
|
37
|
-
case
|
|
38
|
-
i.fail(t === "" ? `the default namespace may not be set to ${s}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
37
|
+
case Kt:
|
|
38
|
+
i.fail(t === "" ? `the default namespace may not be set to ${s}.` : `may not assign a prefix (even "xmlns") to the URI ${Kt}.`);
|
|
39
39
|
break;
|
|
40
|
-
case
|
|
40
|
+
case ye:
|
|
41
41
|
switch (t) {
|
|
42
42
|
case "xml":
|
|
43
43
|
break;
|
|
@@ -49,18 +49,18 @@ function Pe(i, t, s) {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
class
|
|
52
|
+
const zs = (i) => Hs.test(i), Us = (i) => Rs.test(i), ns = { xmldecl: "xmldeclHandler", text: "textHandler", processinginstruction: "piHandler", doctype: "doctypeHandler", comment: "commentHandler", opentagstart: "openTagStartHandler", attribute: "attributeHandler", opentag: "openTagHandler", closetag: "closeTagHandler", cdata: "cdataHandler", error: "errorHandler", end: "endHandler", ready: "readyHandler" };
|
|
53
|
+
class Gs {
|
|
54
54
|
constructor(t) {
|
|
55
55
|
this.i = 0, this.prevI = 0, this.opt = t ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
56
56
|
const s = this.xmlnsOpt = !!this.opt.xmlns;
|
|
57
57
|
if (this.trackPosition = this.opt.position !== !1, this.fileName = this.opt.fileName, s) {
|
|
58
|
-
this.nameStartCheck =
|
|
58
|
+
this.nameStartCheck = Ms, this.nameCheck = js, this.isName = zs, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = { __proto__: null, ...Fs };
|
|
59
59
|
const o = this.opt.additionalNamespaces;
|
|
60
60
|
o != null && (function(n, a) {
|
|
61
|
-
for (const c of Object.keys(a))
|
|
61
|
+
for (const c of Object.keys(a)) Oe(n, c, a[c]);
|
|
62
62
|
}(this, o), Object.assign(this.ns, o));
|
|
63
|
-
} else this.nameStartCheck =
|
|
63
|
+
} else this.nameStartCheck = ce, this.nameCheck = rs, this.isName = Us, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
64
64
|
this.stateTable = [this.sBegin, this.sBeginWhitespace, this.sDoctype, this.sDoctypeQuote, this.sDTD, this.sDTDQuoted, this.sDTDOpenWaka, this.sDTDOpenWakaBang, this.sDTDComment, this.sDTDCommentEnding, this.sDTDCommentEnded, this.sDTDPI, this.sDTDPIEnding, this.sText, this.sEntity, this.sOpenWaka, this.sOpenWakaBang, this.sComment, this.sCommentEnding, this.sCommentEnded, this.sCData, this.sCDataEnding, this.sCDataEnding2, this.sPIFirstChar, this.sPIRest, this.sPIBody, this.sPIEnding, this.sXMLDeclNameStart, this.sXMLDeclName, this.sXMLDeclEq, this.sXMLDeclValueStart, this.sXMLDeclValue, this.sXMLDeclSeparator, this.sXMLDeclEnding, this.sOpenTag, this.sOpenTagSlash, this.sAttrib, this.sAttribName, this.sAttribNameSawWhite, this.sAttribValue, this.sAttribValueQuoted, this.sAttribValueClosed, this.sAttribValueUnquoted, this.sCloseTag, this.sCloseTagSawWhite], this._init();
|
|
65
65
|
}
|
|
66
66
|
get closed() {
|
|
@@ -75,7 +75,7 @@ class Us {
|
|
|
75
75
|
if (this.opt.forceXMLVersion === !0) throw new Error("forceXMLVersion set but defaultXMLVersion is not set");
|
|
76
76
|
s = "1.0";
|
|
77
77
|
}
|
|
78
|
-
this.setXMLVersion(s), this.positionAtNewLine = 0, this.doctype = !1, this._closed = !1, this.xmlDecl = { version: void 0, encoding: void 0, standalone: void 0 }, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
78
|
+
this.setXMLVersion(s), this.positionAtNewLine = 0, this.doctype = !1, this._closed = !1, this.xmlDecl = { version: void 0, encoding: void 0, standalone: void 0 }, this.line = 1, this.column = 0, this.ENTITIES = Object.create(Xs), this.readyHandler?.();
|
|
79
79
|
}
|
|
80
80
|
get position() {
|
|
81
81
|
return this.chunkPosition + this.i;
|
|
@@ -84,10 +84,10 @@ class Us {
|
|
|
84
84
|
return this.position - this.positionAtNewLine;
|
|
85
85
|
}
|
|
86
86
|
on(t, s) {
|
|
87
|
-
this[
|
|
87
|
+
this[ns[t]] = s;
|
|
88
88
|
}
|
|
89
89
|
off(t) {
|
|
90
|
-
this[
|
|
90
|
+
this[ns[t]] = void 0;
|
|
91
91
|
}
|
|
92
92
|
makeError(t) {
|
|
93
93
|
let s = this.fileName ?? "";
|
|
@@ -193,7 +193,7 @@ class Us {
|
|
|
193
193
|
for (; ; ) {
|
|
194
194
|
const o = this.getCode();
|
|
195
195
|
if (o === O) return this.name += t.slice(s), O;
|
|
196
|
-
if (!
|
|
196
|
+
if (!rs(o)) return this.name += t.slice(s, this.prevI), o === lt ? it : o;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
skipSpaces() {
|
|
@@ -203,7 +203,7 @@ class Us {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
setXMLVersion(t) {
|
|
206
|
-
this.currentXMLVersion = t, t === "1.0" ? (this.isChar =
|
|
206
|
+
this.currentXMLVersion = t, t === "1.0" ? (this.isChar = Ns, this.getCode = this.getCode10) : (this.isChar = $s, this.getCode = this.getCode11);
|
|
207
207
|
}
|
|
208
208
|
sBegin() {
|
|
209
209
|
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
@@ -211,7 +211,7 @@ class Us {
|
|
|
211
211
|
sBeginWhitespace() {
|
|
212
212
|
const t = this.i, s = this.skipSpaces();
|
|
213
213
|
switch (this.prevI !== t && (this.xmlDeclPossible = !1), s) {
|
|
214
|
-
case
|
|
214
|
+
case vt:
|
|
215
215
|
if (this.state = 15, this.text.length !== 0) throw new Error("no-empty text at start");
|
|
216
216
|
break;
|
|
217
217
|
case O:
|
|
@@ -221,7 +221,7 @@ class Us {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
sDoctype() {
|
|
224
|
-
const t = this.captureTo(
|
|
224
|
+
const t = this.captureTo(Bs);
|
|
225
225
|
switch (t) {
|
|
226
226
|
case M:
|
|
227
227
|
this.doctypeHandler?.(this.text), this.text = "", this.state = B, this.doctype = !0;
|
|
@@ -229,7 +229,7 @@ class Us {
|
|
|
229
229
|
case O:
|
|
230
230
|
break;
|
|
231
231
|
default:
|
|
232
|
-
this.text += String.fromCodePoint(t), t === 91 ? this.state = 4 :
|
|
232
|
+
this.text += String.fromCodePoint(t), t === 91 ? this.state = 4 : Te(t) && (this.state = 3, this.q = t);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
sDoctypeQuote() {
|
|
@@ -237,8 +237,8 @@ class Us {
|
|
|
237
237
|
this.captureToChar(t) && (this.text += String.fromCodePoint(t), this.q = null, this.state = 2);
|
|
238
238
|
}
|
|
239
239
|
sDTD() {
|
|
240
|
-
const t = this.captureTo(
|
|
241
|
-
t !== O && (this.text += String.fromCodePoint(t), t ===
|
|
240
|
+
const t = this.captureTo(Ws);
|
|
241
|
+
t !== O && (this.text += String.fromCodePoint(t), t === Qt ? this.state = 2 : t === vt ? this.state = 6 : Te(t) && (this.state = 5, this.q = t));
|
|
242
242
|
}
|
|
243
243
|
sDTDQuoted() {
|
|
244
244
|
const t = this.q;
|
|
@@ -303,7 +303,7 @@ class Us {
|
|
|
303
303
|
}
|
|
304
304
|
sOpenWaka() {
|
|
305
305
|
const t = this.getCode();
|
|
306
|
-
if (
|
|
306
|
+
if (ce(t)) this.state = 34, this.unget(), this.xmlDeclPossible = !1;
|
|
307
307
|
else switch (t) {
|
|
308
308
|
case 47:
|
|
309
309
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -345,11 +345,11 @@ class Us {
|
|
|
345
345
|
t !== M ? (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(t)}`, this.state = 17) : this.state = B;
|
|
346
346
|
}
|
|
347
347
|
sCData() {
|
|
348
|
-
this.captureToChar(
|
|
348
|
+
this.captureToChar(Qt) && (this.state = 21);
|
|
349
349
|
}
|
|
350
350
|
sCDataEnding() {
|
|
351
351
|
const t = this.getCodeNorm();
|
|
352
|
-
t ===
|
|
352
|
+
t === Qt ? this.state = 22 : (this.text += `]${String.fromCodePoint(t)}`, this.state = 20);
|
|
353
353
|
}
|
|
354
354
|
sCDataEnding2() {
|
|
355
355
|
const t = this.getCodeNorm();
|
|
@@ -357,7 +357,7 @@ class Us {
|
|
|
357
357
|
case M:
|
|
358
358
|
this.cdataHandler?.(this.text), this.text = "", this.state = B;
|
|
359
359
|
break;
|
|
360
|
-
case
|
|
360
|
+
case Qt:
|
|
361
361
|
this.text += "]";
|
|
362
362
|
break;
|
|
363
363
|
default:
|
|
@@ -400,7 +400,7 @@ class Us {
|
|
|
400
400
|
t !== F ? t !== O && (this.state = 28, this.name = String.fromCodePoint(t)) : this.state = Xt;
|
|
401
401
|
}
|
|
402
402
|
sXMLDeclName() {
|
|
403
|
-
const t = this.captureTo(
|
|
403
|
+
const t = this.captureTo(_s);
|
|
404
404
|
if (t === F) return this.state = Xt, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
405
405
|
if (q(t) || t === Jt) {
|
|
406
406
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
@@ -424,7 +424,7 @@ class Us {
|
|
|
424
424
|
sXMLDeclValueStart() {
|
|
425
425
|
const t = this.getCodeNorm();
|
|
426
426
|
if (t === F) return this.state = Xt, void this.fail("XML declaration is incomplete.");
|
|
427
|
-
q(t) || (
|
|
427
|
+
q(t) || (Te(t) ? this.q = t : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
428
428
|
}
|
|
429
429
|
sXMLDeclValue() {
|
|
430
430
|
const t = this.captureTo([this.q, F]);
|
|
@@ -473,7 +473,7 @@ class Us {
|
|
|
473
473
|
}
|
|
474
474
|
sAttrib() {
|
|
475
475
|
const t = this.skipSpaces();
|
|
476
|
-
t !== O && (
|
|
476
|
+
t !== O && (ce(t) ? (this.unget(), this.state = 37) : t === M ? this.openTag() : t === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
477
477
|
}
|
|
478
478
|
sAttribName() {
|
|
479
479
|
const t = this.captureNameChars();
|
|
@@ -488,12 +488,12 @@ class Us {
|
|
|
488
488
|
this.state = 39;
|
|
489
489
|
break;
|
|
490
490
|
default:
|
|
491
|
-
this.fail("attribute without value."), this.text = "", this.name = "", t === M ? this.openTag() :
|
|
491
|
+
this.fail("attribute without value."), this.text = "", this.name = "", t === M ? this.openTag() : ce(t) ? (this.unget(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
sAttribValue() {
|
|
495
495
|
const t = this.getCodeNorm();
|
|
496
|
-
|
|
496
|
+
Te(t) ? (this.q = t, this.state = 40) : q(t) || (this.fail("unquoted attribute value."), this.state = 42, this.unget());
|
|
497
497
|
}
|
|
498
498
|
sAttribValueQuoted() {
|
|
499
499
|
const { q: t, chunk: s } = this;
|
|
@@ -508,7 +508,7 @@ class Us {
|
|
|
508
508
|
case 9:
|
|
509
509
|
this.text += `${s.slice(o, this.prevI)} `, o = this.i;
|
|
510
510
|
break;
|
|
511
|
-
case
|
|
511
|
+
case vt:
|
|
512
512
|
return this.text += s.slice(o, this.prevI), void this.fail("disallowed character.");
|
|
513
513
|
case O:
|
|
514
514
|
return void (this.text += s.slice(o));
|
|
@@ -516,15 +516,15 @@ class Us {
|
|
|
516
516
|
}
|
|
517
517
|
sAttribValueClosed() {
|
|
518
518
|
const t = this.getCodeNorm();
|
|
519
|
-
q(t) ? this.state = 36 : t === M ? this.openTag() : t === 47 ? this.state = 35 :
|
|
519
|
+
q(t) ? this.state = 36 : t === M ? this.openTag() : t === 47 ? this.state = 35 : ce(t) ? (this.fail("no whitespace between attributes."), this.unget(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
520
520
|
}
|
|
521
521
|
sAttribValueUnquoted() {
|
|
522
|
-
const t = this.captureTo(
|
|
522
|
+
const t = this.captureTo(qs);
|
|
523
523
|
switch (t) {
|
|
524
524
|
case 38:
|
|
525
525
|
this.state = 14, this.entityReturnState = 42;
|
|
526
526
|
break;
|
|
527
|
-
case
|
|
527
|
+
case vt:
|
|
528
528
|
this.fail("disallowed character.");
|
|
529
529
|
break;
|
|
530
530
|
case O:
|
|
@@ -552,7 +552,7 @@ class Us {
|
|
|
552
552
|
let { i: t, forbiddenState: s } = this;
|
|
553
553
|
const { chunk: o, textHandler: n } = this;
|
|
554
554
|
t: for (; ; ) switch (this.getCode()) {
|
|
555
|
-
case
|
|
555
|
+
case vt:
|
|
556
556
|
if (this.state = 15, n !== void 0) {
|
|
557
557
|
const { text: a } = this, c = o.slice(t, this.prevI);
|
|
558
558
|
a.length !== 0 ? (n(a + c), this.text = "") : c.length !== 0 && n(c);
|
|
@@ -562,7 +562,7 @@ class Us {
|
|
|
562
562
|
case 38:
|
|
563
563
|
this.state = 14, this.entityReturnState = B, n !== void 0 && (this.text += o.slice(t, this.prevI)), s = 0;
|
|
564
564
|
break t;
|
|
565
|
-
case
|
|
565
|
+
case Qt:
|
|
566
566
|
switch (s) {
|
|
567
567
|
case 0:
|
|
568
568
|
s = 1;
|
|
@@ -598,7 +598,7 @@ class Us {
|
|
|
598
598
|
t: for (; ; ) {
|
|
599
599
|
const a = this.getCode();
|
|
600
600
|
switch (a) {
|
|
601
|
-
case
|
|
601
|
+
case vt:
|
|
602
602
|
if (this.state = 15, o !== void 0) {
|
|
603
603
|
const { text: c } = this, m = s.slice(t, this.prevI);
|
|
604
604
|
c.length !== 0 ? (o(c + m), this.text = "") : m.length !== 0 && o(m);
|
|
@@ -624,10 +624,10 @@ class Us {
|
|
|
624
624
|
const { prefix: o, local: n } = this.qname(t), a = { name: t, prefix: o, local: n, value: s };
|
|
625
625
|
if (this.attribList.push(a), this.attributeHandler?.(a), o === "xmlns") {
|
|
626
626
|
const c = s.trim();
|
|
627
|
-
this.currentXMLVersion === "1.0" && c === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[n] = c,
|
|
627
|
+
this.currentXMLVersion === "1.0" && c === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[n] = c, Oe(this, n, c);
|
|
628
628
|
} else if (t === "xmlns") {
|
|
629
629
|
const c = s.trim();
|
|
630
|
-
this.topNS[""] = c,
|
|
630
|
+
this.topNS[""] = c, Oe(this, "", c);
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
pushAttribPlain(t, s) {
|
|
@@ -671,7 +671,7 @@ class Us {
|
|
|
671
671
|
for (const a of t) {
|
|
672
672
|
const { name: c, prefix: m, local: v } = a;
|
|
673
673
|
let b, x;
|
|
674
|
-
m === "" ? (b = c === "xmlns" ?
|
|
674
|
+
m === "" ? (b = c === "xmlns" ? Kt : "", x = c) : (b = this.resolve(m), b === void 0 && (this.fail(`unbound namespace prefix: ${JSON.stringify(m)}.`), b = m), x = `{${b}}${v}`), n.has(x) && this.fail(`duplicate attribute: ${x}.`), n.add(x), a.uri = b, o[c] = a;
|
|
675
675
|
}
|
|
676
676
|
this.attribList = [];
|
|
677
677
|
}
|
|
@@ -711,16 +711,16 @@ class Us {
|
|
|
711
711
|
return t[1] === "x" && /^#x[0-9a-f]+$/i.test(t) ? s = parseInt(t.slice(2), 16) : /^#[0-9]+$/.test(t) && (s = parseInt(t.slice(1), 10)), this.isChar(s) ? String.fromCodePoint(s) : (this.fail("malformed character entity."), `&${t};`);
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
var
|
|
715
|
-
(
|
|
716
|
-
const o = new
|
|
714
|
+
var Ie, yt;
|
|
715
|
+
(yt = Ie || (Ie = {})).Events = { XmlDecl: "xmldecl", Text: "text", ProcessingInstruction: "processinginstruction", Doctype: "doctype", Comment: "comment", OpenTagStart: "opentagstart", Attribute: "attribute", OpenTag: "opentag", CloseTag: "closetag", CDdata: "cdata", Error: "error", End: "end", Ready: "ready" }, yt.parseStream = async (i, t, s) => {
|
|
716
|
+
const o = new Gs({ position: !1, ...s });
|
|
717
717
|
let n;
|
|
718
|
-
if (t.onOpenTagStart && o.on(
|
|
718
|
+
if (t.onOpenTagStart && o.on(yt.Events.OpenTagStart, t.onOpenTagStart), t.onOpenTag && o.on(yt.Events.OpenTag, t.onOpenTag), t.onCloseTag && o.on(yt.Events.CloseTag, t.onCloseTag), t.onAttribute && o.on(yt.Events.Attribute, t.onAttribute), t.onText && o.on(yt.Events.Text, t.onText), t.onError && o.on(yt.Events.Error, t.onError), t.onEnd) {
|
|
719
719
|
t.onEnd;
|
|
720
720
|
const a = () => {
|
|
721
721
|
n = t.onEnd();
|
|
722
722
|
};
|
|
723
|
-
o.on(
|
|
723
|
+
o.on(yt.Events.End, a);
|
|
724
724
|
}
|
|
725
725
|
for (; ; ) {
|
|
726
726
|
const { value: a, done: c } = await i.read();
|
|
@@ -736,7 +736,7 @@ const w = (i) => i === !0 || i === "1" || i === "on" || i === "true" || i !== !1
|
|
|
736
736
|
const t = parseFloat(i);
|
|
737
737
|
return isNaN(t) ? null : t;
|
|
738
738
|
}, k = null;
|
|
739
|
-
class
|
|
739
|
+
class Zs {
|
|
740
740
|
constructor() {
|
|
741
741
|
this._registeredVisitors = /* @__PURE__ */ new Map();
|
|
742
742
|
}
|
|
@@ -752,7 +752,8 @@ class Gs {
|
|
|
752
752
|
let I = v.attributes[T];
|
|
753
753
|
if (f) {
|
|
754
754
|
if (Array.isArray(f)) {
|
|
755
|
-
for (let H = 0; H < f.length; H++)
|
|
755
|
+
for (let H = 0; H < f.length; H++)
|
|
756
|
+
if (I == null || (I = f[H](I), I == null)) return;
|
|
756
757
|
} else if (I == null || (I = f(I), I == null)) return;
|
|
757
758
|
}
|
|
758
759
|
return I;
|
|
@@ -799,7 +800,7 @@ class Gs {
|
|
|
799
800
|
}, onEnd: s };
|
|
800
801
|
}
|
|
801
802
|
}
|
|
802
|
-
const
|
|
803
|
+
const as = (i, t, s, o = null) => {
|
|
803
804
|
if (!i) return null;
|
|
804
805
|
let n = i;
|
|
805
806
|
n.startsWith("/") && (n = n.substring(1));
|
|
@@ -814,7 +815,7 @@ const ns = (i, t, s, o = null) => {
|
|
|
814
815
|
console.warn(v);
|
|
815
816
|
}
|
|
816
817
|
return o?.parsedRefs?.set(i, m), m;
|
|
817
|
-
},
|
|
818
|
+
}, Ve = (i, t, s, o, n = null) => {
|
|
818
819
|
if (!i) return null;
|
|
819
820
|
let a = i;
|
|
820
821
|
a.startsWith("/") && (a = a.substring(1));
|
|
@@ -830,7 +831,7 @@ const ns = (i, t, s, o = null) => {
|
|
|
830
831
|
console.warn(b);
|
|
831
832
|
}
|
|
832
833
|
return null;
|
|
833
|
-
},
|
|
834
|
+
}, Zt = (i, t, s, o, n = null) => {
|
|
834
835
|
const a = /* @__PURE__ */ new Map();
|
|
835
836
|
let c = t.Directory[i];
|
|
836
837
|
const m = c ? c.length : 0;
|
|
@@ -839,11 +840,11 @@ const ns = (i, t, s, o = null) => {
|
|
|
839
840
|
if (!b) continue;
|
|
840
841
|
let x = b;
|
|
841
842
|
x.startsWith("/") && (x = x.substring(1));
|
|
842
|
-
const E =
|
|
843
|
+
const E = Ve(x, (y) => t.files[y], s, o, n);
|
|
843
844
|
a.set(x, E);
|
|
844
845
|
}
|
|
845
846
|
return a;
|
|
846
|
-
},
|
|
847
|
+
}, Js = ["lt1", "dk1", "lt2", "dk2", "accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "hlink", "folHlink"], ls = (i, t = "dk1") => {
|
|
847
848
|
let s;
|
|
848
849
|
const o = i("auto");
|
|
849
850
|
o === void 0 || o !== "1" && o !== "true" || (s = t);
|
|
@@ -852,10 +853,10 @@ const ns = (i, t, s, o = null) => {
|
|
|
852
853
|
const a = i("rgb");
|
|
853
854
|
a && (s = a.toLowerCase(), a.length !== 8 || a.startsWith("FF") || (s = "FF" + a.substring(2, a.length)));
|
|
854
855
|
const c = i("theme");
|
|
855
|
-
c && (s =
|
|
856
|
+
c && (s = Js[c]);
|
|
856
857
|
let m = i("tint");
|
|
857
|
-
if (m && (s += ` ${
|
|
858
|
-
}, Qs = (i) => i && i.replace(/^\{([\s\S]+)\}$/, "$1"),
|
|
858
|
+
if (m && (s += ` ${Os.AdjustmentType.ETint} ${parseFloat(m)}`), s) return s;
|
|
859
|
+
}, Qs = (i) => i && i.replace(/^\{([\s\S]+)\}$/, "$1"), ii = (i) => i ? hs.roundAccurately(parseFloat(i) / 12700, 4) : null, oi = (i) => i ? hs.roundAccurately(parseFloat(i) / 9525, 1) : null, ri = (i) => parseFloat(i) / 1e3, ni = (i) => parseFloat(i) / 6e4, Ks = (i) => i === "true" || i === "1";
|
|
859
860
|
class Bt {
|
|
860
861
|
static {
|
|
861
862
|
this.Collapsed = 1;
|
|
@@ -894,17 +895,17 @@ class Bt {
|
|
|
894
895
|
this.ThickTop = 2048;
|
|
895
896
|
}
|
|
896
897
|
}
|
|
897
|
-
const
|
|
898
|
+
const Ys = (i, t, s) => {
|
|
898
899
|
if (i[0].value[0] === i[1].value[0]) return t;
|
|
899
|
-
},
|
|
900
|
-
const { password: s, onWarning: o, createWorkbookOptions: n = {}, ...a } = t ?? {}, c = import("./
|
|
900
|
+
}, cs = { colStart: 0, colEnd: 0, rowStart: 0, rowEnd: 0 }, ai = Object.freeze(Object.defineProperty({ __proto__: null, fromBufferXLSX: async (i, t) => {
|
|
901
|
+
const { password: s, onWarning: o, createWorkbookOptions: n = {}, ...a } = t ?? {}, c = import("./7_O6nILzn1fSVvkO.js"), m = import("./DJQOS9qxVAlpgDMt.js");
|
|
901
902
|
let v = null;
|
|
902
903
|
try {
|
|
903
904
|
v = new DOMParser();
|
|
904
905
|
} catch {
|
|
905
906
|
}
|
|
906
907
|
let b = null;
|
|
907
|
-
v || (b = import("./
|
|
908
|
+
v || (b = import("./MRBi3juXAW0lA_mj.js").then((u) => u.i));
|
|
908
909
|
let x = null, E = null, y = null;
|
|
909
910
|
try {
|
|
910
911
|
const u = await Promise.all([c, m, b]);
|
|
@@ -916,500 +917,501 @@ const Ks = (i, t, s) => {
|
|
|
916
917
|
const u = x.read(i, { type: "array", sheets: [], cellStyles: !1, bookFiles: !0 });
|
|
917
918
|
if (!u.Directory) throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
918
919
|
u.Directory.richstructure = ["/xl/richData/rdrichvaluestructure.xml"], u.Directory.richdata = ["/xl/richData/rdrichvalue.xml"];
|
|
919
|
-
const D = new E.FromOOXMLConverter(), g = v ?? new y.DOMParser(), T = n?.resources ?? new
|
|
920
|
+
const D = new E.FromOOXMLConverter(), g = v ?? new y.DOMParser(), T = n?.resources ?? new Ss(), f = T.beginPersist(), I = {}, H = /* @__PURE__ */ new Set(), W = /* @__PURE__ */ new Map();
|
|
920
921
|
W.set("richTypes", []);
|
|
921
|
-
const ht = /* @__PURE__ */ new Map(),
|
|
922
|
+
const ht = /* @__PURE__ */ new Map(), Le = [], he = (P) => u.files[P], be = (P, z) => {
|
|
922
923
|
const K = P.lastIndexOf("/"), ut = P.substring(0, K + 1) + "_rels/" + P.substring(K + 1, P.length) + ".rels";
|
|
923
924
|
let dt = z.get(ut);
|
|
924
|
-
return dt || (dt = ((R,
|
|
925
|
+
return dt || (dt = ((R, Se, Ce, ke, Wt = null) => {
|
|
925
926
|
if (!R) return null;
|
|
926
|
-
const
|
|
927
|
-
if (!
|
|
928
|
-
const
|
|
929
|
-
for (let xt = 0; xt <
|
|
930
|
-
const
|
|
931
|
-
|
|
927
|
+
const _t = Ve(R, Se, Ce, ke, Wt);
|
|
928
|
+
if (!_t) return null;
|
|
929
|
+
const Y = /* @__PURE__ */ new Map(), pt = Object.keys(_t), Ct = pt.length;
|
|
930
|
+
for (let xt = 0; xt < Ct; xt++) {
|
|
931
|
+
const kt = pt[xt], Yt = _t[kt];
|
|
932
|
+
Y.set(kt, Yt);
|
|
932
933
|
}
|
|
933
|
-
return
|
|
934
|
-
})(ut,
|
|
935
|
-
},
|
|
936
|
-
let dt =
|
|
934
|
+
return Y;
|
|
935
|
+
})(ut, he, g, D, bt), z.set(ut, dt)), dt;
|
|
936
|
+
}, ue = (P, z, K, ut = ht) => {
|
|
937
|
+
let dt = be(z, ut).get(P), R = dt?.target;
|
|
937
938
|
if (!R) return null;
|
|
938
939
|
if (dt.targetMode === "External") return dt.target;
|
|
939
|
-
const
|
|
940
|
-
R.startsWith("/") || (R =
|
|
941
|
-
const
|
|
942
|
-
return
|
|
940
|
+
const Se = z.lastIndexOf("/"), Ce = z.substring(0, Se + 1);
|
|
941
|
+
R.startsWith("/") || (R = Ce + R), R = ((_t) => {
|
|
942
|
+
const Y = _t.split(/\/+/);
|
|
943
|
+
return Y.reduce((Ct, xt, kt) => (xt === "." ? Ct.splice(kt, 1) : xt === ".." && Ct.splice(kt - 1, 2), Ct), Y).join("/");
|
|
943
944
|
})(R);
|
|
944
|
-
const
|
|
945
|
+
const ke = D?.getVisitorParamsState().get("dxfs");
|
|
945
946
|
let Wt = ut.get(R);
|
|
946
|
-
if (!Wt)
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
const
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
}
|
|
969
|
-
delete r.rule;
|
|
970
|
-
} }), h.registerVisitor({ from: "cfRule", to: "rule", openTag: (e) => {
|
|
971
|
-
const r = e.getParent();
|
|
972
|
-
e.copyToObject(r, "type", k), e.copyToObject(r, "priority", A), e.copyToObject(r, "stopIfTrue", w);
|
|
973
|
-
const l = e.getAttribute("dxfId", A);
|
|
974
|
-
if (l !== null) {
|
|
975
|
-
let d = _?.get(l);
|
|
976
|
-
d || (Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`), d = {}), r.style = d;
|
|
977
|
-
}
|
|
978
|
-
e.copyToObject(r, "aboveAverage", w), e.copyToObject(r, "equalAverage", w), e.copyToObject(r, "stdDev", A), e.copyToObject(r, "bottom", w), e.copyToObject(r, "percent", w), e.copyToObject(r, "rank", A), e.copyToObject(r, "operator", k), e.copyToObject(r, "text", k), e.copyToObject(r, "timePeriod", k);
|
|
979
|
-
} }), h.registerVisitor({ from: "colorScale", to: "colorScale" }), h.registerVisitor({ from: "dataBar", to: "dataBar", openTag: (e) => {
|
|
980
|
-
e.copyTo("maxLength", A), e.copyTo("minLength", A), e.copyTo("showValue", w);
|
|
981
|
-
} }), h.registerVisitor({ from: "iconSet", to: "iconSet", openTag: (e) => {
|
|
982
|
-
e.copyTo("iconSet", k), e.copyTo("reverse", w), e.copyTo("showValue", w);
|
|
983
|
-
} }), h.registerVisitor({ from: "formula", to: null, text: (e, r) => {
|
|
984
|
-
const l = r.getParent();
|
|
985
|
-
let d = l.formulas;
|
|
986
|
-
d || (d = [], l.formulas = d), d.push(e);
|
|
987
|
-
} }), h.registerVisitor({ from: "cfvo", to: {}, openTag: (e) => {
|
|
988
|
-
const r = e.getParent();
|
|
989
|
-
r.conditions || (r.conditions = []), r.conditions.push(e.getSource()), e.copyTo("type", k), e.copyTo("value", ct, "val"), e.copyTo("gte", w);
|
|
990
|
-
} }), h.registerVisitor({ from: "color", to: {}, openTag: (e) => {
|
|
991
|
-
const r = e.getParent();
|
|
992
|
-
r.colors || (r.colors = []);
|
|
993
|
-
const l = as((d) => e.getAttribute(d));
|
|
994
|
-
r.colors.push(l);
|
|
995
|
-
} }), h.registerVisitor({ from: "filterColumn", to: "filterColumn", openTag: (e) => {
|
|
996
|
-
const r = e.getParent();
|
|
997
|
-
r.fields || (r.fields = []), r.fields.push(e.getSource()), e.copyTo("offset", A, "colId"), e.copyTo("hiddenButton", w), e.copyTo("showButton", w);
|
|
998
|
-
} }), h.registerVisitor({ from: "colorFilter", to: "colorFilter", openTag: (e) => {
|
|
999
|
-
const r = e.getParent();
|
|
1000
|
-
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Zt.Type.Color, e.copyTo("cellColor", w), e.copyTo("styleId", A, "dxfId");
|
|
1001
|
-
} }), h.registerVisitor({ from: "dynamicFilter", to: "dynamicFilter", openTag: (e) => {
|
|
1002
|
-
const r = e.getParent();
|
|
1003
|
-
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Zt.Type.Dynamic, e.copyTo("dynamicType", k, "type"), e.copyTo("val", ct), e.copyTo("maxVal", ct, "maxVal");
|
|
1004
|
-
} }), h.registerVisitor({ from: "iconFilter", to: "iconFilter", openTag: (e) => {
|
|
1005
|
-
const r = e.getParent();
|
|
1006
|
-
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Zt.Type.Icon, e.copyTo("iconId", A), e.copyTo("iconSet", k);
|
|
1007
|
-
} }), h.registerVisitor({ from: "top10", to: "top10", openTag: (e) => {
|
|
1008
|
-
const r = e.getParent();
|
|
1009
|
-
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Zt.Type.Top10, e.copyTo("filterVal", ct), e.copyTo("percent", w), e.copyTo("top", w), e.copyTo("val", ct);
|
|
1010
|
-
} }), h.registerVisitor({ from: "filters", to: "filters", openTag: (e) => {
|
|
1011
|
-
const r = e.getParent();
|
|
1012
|
-
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Zt.Type.Items, e.copyTo("blank", w), e.copyTo("calendarType", k);
|
|
1013
|
-
} }), h.registerVisitor({ from: "dateGroupItem", to: "dateGroupItem", openTag: (e) => {
|
|
1014
|
-
const r = e.getParent();
|
|
1015
|
-
r.dateGroups || (r.dateGroups = []), r.dateGroups.push(e.getSource()), e.copyTo("group", k, "dateTimeGrouping"), e.copyTo("day", A), e.copyTo("hour", A), e.copyTo("minute", A), e.copyTo("month", A), e.copyTo("second", A), e.copyTo("year", A);
|
|
1016
|
-
} }), h.registerVisitor({ from: "filter", to: "filter", openTag: (e) => {
|
|
1017
|
-
const r = e.getParent();
|
|
1018
|
-
r.items || (r.items = []), r.items.push(e.getAttribute("val", ct));
|
|
1019
|
-
} }), h.registerVisitor({ from: "customFilters", to: "customFilters", openTag: (e) => {
|
|
1020
|
-
const r = e.getParent();
|
|
1021
|
-
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Zt.Type.Custom, e.copyTo("and", w);
|
|
1022
|
-
} }), h.registerVisitor({ from: "customFilter", to: "customFilter", openTag: (e) => {
|
|
1023
|
-
const r = e.getParent();
|
|
1024
|
-
r.filters || (r.filters = []), r.filters.push(e.getSource()), e.copyTo("operator", k), e.copyTo("value", ct, "val");
|
|
1025
|
-
} }), h.registerVisitor({ from: "sortState", to: "sort", openTag: (e) => {
|
|
1026
|
-
e.copyTo("ref", k);
|
|
1027
|
-
} }), h.registerVisitor({ from: "sortCondition", to: "sortCondition", openTag: (e) => {
|
|
1028
|
-
const r = e.getParent();
|
|
1029
|
-
r.fields || (r.fields = []);
|
|
1030
|
-
const l = e.getSource();
|
|
1031
|
-
r.fields.push(l), e.copyTo("sortOn", k, "sortBy"), e.copyTo("dxfId", k, "sortBy"), e.copyTo("iconSet", k), e.copyTo("customList", k);
|
|
1032
|
-
const d = e.getAttribute("ref");
|
|
1033
|
-
if (d) {
|
|
1034
|
-
const S = at.fastStringToRange(d, ls).colStart, pt = at.fastStringToRange(r.ref, ls), ot = pt.colStart;
|
|
1035
|
-
l.offset = pt ? S - ot : S;
|
|
1036
|
-
}
|
|
1037
|
-
l.reverse = e.getAttribute("descending", w) ?? !1;
|
|
1038
|
-
} }), h.registerVisitor({ from: "AlternateContent", to: null });
|
|
1039
|
-
const ge = (e) => {
|
|
1040
|
-
j = e.getSource(), e.copyTo("topLeft", k, "topLeftCell");
|
|
1041
|
-
const r = Js(e.getAttribute("defaultGridColor")), l = e.getAttribute("colorId");
|
|
1042
|
-
l === null || r || (e.getSource().gridLineColor = "index" + parseFloat(l)), e.copyTo("showZeros", w), e.copyTo("showFormulas", w), e.copyTo("zoomScale", A), e.copyTo("showRowHeaders", w, "showRowColHeaders"), e.copyTo("showColumnHeaders", w, "showRowColHeaders"), e.copyTo("showRowGridlines", w, "showGridLines"), e.copyTo("showColumnGridlines", w, "showGridLines");
|
|
1043
|
-
};
|
|
1044
|
-
h.registerVisitor({ from: "sheetView", to: "view", openTag: (e) => {
|
|
1045
|
-
ge(e);
|
|
1046
|
-
}, closeTag: () => {
|
|
1047
|
-
j = null;
|
|
1048
|
-
} }), h.registerVisitor({ from: "customSheetViews", to: "customSheetViews", openTag: (e) => {
|
|
1049
|
-
e.setSource([]);
|
|
1050
|
-
} }), h.registerVisitor({ from: "customSheetView", to: [], openTag: (e) => {
|
|
1051
|
-
ge(e);
|
|
1052
|
-
}, closeTag: () => {
|
|
1053
|
-
j = null;
|
|
1054
|
-
} }), h.registerVisitor({ from: "selection", to: "selection", openTag: (e) => {
|
|
1055
|
-
if (!j) return;
|
|
1056
|
-
e.copyTo("cell", k, "activeCell"), e.copyTo("rangeIndex", A, "activeCellId");
|
|
1057
|
-
const r = e.getAttribute("activeCell"), l = e.getAttribute("sqref");
|
|
1058
|
-
l && l !== r && (e.getSource().ranges = l.split(" "));
|
|
1059
|
-
} }), h.registerVisitor({ from: "pane", to: "pane", openTag: (e) => {
|
|
1060
|
-
if (j && e.getAttribute("state") === "frozen") {
|
|
1061
|
-
const r = {};
|
|
1062
|
-
j.freezePanes = r, e.copyToObject(r, "topLeft", k, "topLeftCell");
|
|
1063
|
-
const l = j.topLeft ? at.fastStringToCell(j.topLeft) : { colIndex: 0, rowIndex: 0 }, d = { colIndex: 0, rowIndex: 0 };
|
|
1064
|
-
e.copyToObject(d, "colIndex", A, "xSplit"), e.copyToObject(d, "rowIndex", A, "ySplit");
|
|
1065
|
-
const S = { colIndex: l.colIndex + d.colIndex, rowIndex: l.rowIndex + d.rowIndex };
|
|
1066
|
-
r.coords = at.cellToString(S);
|
|
1067
|
-
}
|
|
1068
|
-
} }), h.registerVisitor({ from: "tabColor", to: null, openTag: (e) => {
|
|
1069
|
-
const r = as((l) => e.getAttribute(l));
|
|
1070
|
-
r && (V.tabColor = r);
|
|
1071
|
-
} }), h.registerVisitor({ from: "pageSetUpPr", to: "pageSetUpPr", openTag: (e) => {
|
|
1072
|
-
} }), h.registerVisitor({ from: "outlinePr", to: "outlinePr", openTag: (e) => {
|
|
1073
|
-
} }), h.registerVisitor({ from: "pageMargins", to: "pageMargins", openTag: (e) => {
|
|
1074
|
-
} }), h.registerVisitor({ from: "pageSetup", to: "pageSetup", openTag: (e) => {
|
|
1075
|
-
} }), h.registerVisitor({ from: "printOptions", to: "printOptions", openTag: (e) => {
|
|
1076
|
-
} }), h.registerVisitor({ from: "mergeCells", to: "merges", openTag: (e) => {
|
|
1077
|
-
e.setSource([]);
|
|
1078
|
-
} }), h.registerVisitor({ from: "mergeCell", to: [], openTag: (e) => {
|
|
1079
|
-
const r = e.getAttribute("ref");
|
|
1080
|
-
e.setSource(r);
|
|
1081
|
-
} }), h.registerVisitor({ from: "hyperlinks", to: "hyperlinks", openTag: (e) => {
|
|
1082
|
-
e.setSource([]);
|
|
1083
|
-
} }), h.registerVisitor({ from: "hyperlink", to: [], openTag: (e) => {
|
|
1084
|
-
const r = e.getAttribute("r:id"), l = e.getAttribute("ref");
|
|
1085
|
-
if (!l) return void console.warn("No ref found for hyperlink");
|
|
1086
|
-
e.setKey(l);
|
|
1087
|
-
let d = r ? U(r) : "";
|
|
1088
|
-
if (typeof d != "string") return void console.warn("Invalid address ", d);
|
|
1089
|
-
const S = e.getAttribute("location");
|
|
1090
|
-
d.endsWith("\\") && (d = d.substring(0, d.length - 1));
|
|
1091
|
-
const pt = e.getAttribute("location");
|
|
1092
|
-
if (pt && (S && S !== pt && console.warn("display and location are different", S, pt), d += "#" + pt), !d) return void console.warn("No address found for hyperlink. r:id", r);
|
|
1093
|
-
let ot;
|
|
1094
|
-
const At = e.getAttribute("tooltip");
|
|
1095
|
-
ot = At ? { address: d, tooltip: At } : d, e.setSource({ r: l, v: ot });
|
|
1096
|
-
} }), h.registerVisitor({ from: "drawing", to: "movables", openTag: (e) => {
|
|
1097
|
-
const r = e.getAttribute("r:id");
|
|
1098
|
-
if (!r) return;
|
|
1099
|
-
const l = U(r);
|
|
1100
|
-
l ? e.setSource(l.movables) : console.warn("no drawing found for rId", r);
|
|
1101
|
-
} }), h.registerVisitor({ from: "tableParts", to: "tables", openTag: (e) => {
|
|
1102
|
-
e.setSource([]);
|
|
1103
|
-
} }), h.registerVisitor({ from: "tablePart", to: [], openTag: (e) => {
|
|
1104
|
-
const r = e.getAttribute("r:id");
|
|
1105
|
-
if (!r) return;
|
|
1106
|
-
const l = U(r);
|
|
1107
|
-
l ? e.setSource(l) : console.warn("no table found for rId", r);
|
|
1108
|
-
} }), h.registerVisitor({ from: "worksheet", to: "worksheet", openTag: (e) => {
|
|
1109
|
-
} }), h.registerVisitor({ from: "sheetProtection", to: "protection", openTag: (e) => {
|
|
1110
|
-
let r = !1;
|
|
1111
|
-
if (e.hasAttribute("sheet") && w(e.getAttribute("sheet")) && (r = !0), !r) return void e.setSource(void 0);
|
|
1112
|
-
const l = (S) => S === !0 || S === "1" || S === "on" || S === "true" || S === !1 || S === "0" || S === "off" || S === "false" || null;
|
|
1113
|
-
e.copyTo("autoFilter", l), e.copyTo("deleteColumns", l), e.copyTo("formatCells", l), e.copyTo("formatColumns", l), e.copyTo("formatRows", l), e.copyTo("insertColumns", l), e.copyTo("insertHyperlinks", l), e.copyTo("insertRows", l), e.copyTo("objects", l), e.copyTo("pivotTables", l), e.copyTo("scenarios", l), e.copyTo("selectUnlockedCells", l), e.copyTo("selectUnlockedCells", l), e.copyTo("sort", l);
|
|
1114
|
-
const d = {};
|
|
1115
|
-
e.copyToObject(d, "hash", k, "hashValue"), e.copyToObject(d, "algorithm", k, "algorithmName"), e.copyToObject(d, "salt", k, "saltValue"), e.copyToObject(d, "spinCount", A), Object.keys(d).length > 0 && (e.getSource().password = d);
|
|
1116
|
-
} }), h.registerVisitor({ from: "protectedRanges", to: "protectedRanges", openTag: (e) => {
|
|
1117
|
-
e.setSource({});
|
|
1118
|
-
} }), h.registerVisitor({ from: "protectedRange", to: {}, openTag: (e) => {
|
|
1119
|
-
const r = e.getAttribute("sqref");
|
|
1120
|
-
e.setKey(r), e.copyTo("name"), e.copyTo("securityDescriptor");
|
|
1121
|
-
const l = {};
|
|
1122
|
-
e.copyToObject(l, "hash", k, "hashValue"), e.copyToObject(l, "algorithm", k, "algorithmName"), e.copyToObject(l, "salt", k, "saltValue"), e.copyToObject(l, "spinCount", A), Object.keys(l).length > 0 && (e.getSource().password = l);
|
|
1123
|
-
} }), h.registerVisitor({ from: "sheetFormatPr", to: "sheetFormatPr", openTag: (e) => {
|
|
1124
|
-
e.copyToObject(V, "defaultColSize", ct, "defaultColWidth"), e.copyToObject(V, "outlineLevelCol", A, "outlineLevelCol");
|
|
1125
|
-
const r = e.getAttribute("customHeight");
|
|
1126
|
-
r !== "1" && r !== "true" || e.copyToObject(V, "defaultRowSize", ct, "defaultRowHeight"), e.copyToObject(V, "outlineLevelRow", A, "outlineLevelRow");
|
|
1127
|
-
} }), h.registerVisitor({ from: "cols", to: "cols", openTag: (e) => {
|
|
1128
|
-
e.setSource([]);
|
|
1129
|
-
} }), h.registerVisitor({ from: "col", to: [], openTag: (e) => {
|
|
1130
|
-
e.copyTo("min", (r) => parseInt(r) - 1), e.copyTo("max", (r) => parseInt(r) - 1), e.copyTo("sz", ct, "width"), e.copyTo("cs", w, "customWidth"), e.copyTo("h", w, "hidden"), e.copyTo("l", A, "outlineLevel"), e.copyTo("s", A, "style");
|
|
1131
|
-
} }), h.registerVisitor({ from: "oleObjects", to: null, openTag: (e) => {
|
|
1132
|
-
e.warn("'OLE Objects' are not supported.");
|
|
1133
|
-
} });
|
|
1134
|
-
let ee = null;
|
|
1135
|
-
const xs = { onOpenTag: (e) => {
|
|
1136
|
-
ee === null && (ee = "");
|
|
1137
|
-
}, onText: (e) => {
|
|
1138
|
-
ee += e;
|
|
1139
|
-
}, onEnd: () => {
|
|
1140
|
-
const e = te(ee);
|
|
1141
|
-
return ee = null, e;
|
|
1142
|
-
}, onError: (e) => {
|
|
1143
|
-
} };
|
|
1144
|
-
return ((e, r, l, d, S, pt) => {
|
|
1145
|
-
let ot = !1, At = !1, zt = [], Ut = !1, Et = null, se = null, fe = null, rt = null, He = null, Fe = null;
|
|
1146
|
-
const ws = pt?.get("richData") ?? [], Xe = at.normalizeA1ToR1C1, Be = De.createConflatingRanges(), We = /* @__PURE__ */ new Map(), ke = [];
|
|
1147
|
-
let ie = null;
|
|
1148
|
-
const _e = De.createConflatingRanges();
|
|
1149
|
-
let oe, Dt = !1, X = -1, J = -1, gt = null, re = null;
|
|
1150
|
-
const Ae = [];
|
|
1151
|
-
let Ee = null, qe = -2, ft = 0, Gt = "", Pt = "", Ot = "", It = "", Vt = "", Lt = "", Nt = "", ze = "", Ue = "", Ge = "", Ze = "", Qe = "", Je = "", Ke = "", mt = !0, Rt = null;
|
|
1152
|
-
return { ...l, onEnd: () => {
|
|
1153
|
-
Ae.length > 0 && (r.rows = Ae);
|
|
1154
|
-
let p = Be.done(Ks);
|
|
1155
|
-
const C = p.length;
|
|
1156
|
-
if (C > 0) {
|
|
1157
|
-
const $ = new Array(C);
|
|
1158
|
-
for (let L = 0; L < C; L++) {
|
|
1159
|
-
const nt = p[L], $t = at.rangeToString(nt), Mt = nt.value[1], ne = at.resolveRelativeToA1(Mt, nt.rowStart, nt.colStart);
|
|
1160
|
-
$[L] = [$t, ne];
|
|
947
|
+
if (!Wt)
|
|
948
|
+
if (dt.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
949
|
+
const Y = {};
|
|
950
|
+
Wt = Y;
|
|
951
|
+
const pt = async () => {
|
|
952
|
+
const Ct = ((V, U, ee, _, G, Z, tt) => {
|
|
953
|
+
const h = new Zs(), J = new Cs.TransposedBuilder();
|
|
954
|
+
let j = null;
|
|
955
|
+
h.registerVisitor({ from: "autoFilter", to: "filter", openTag: (e) => {
|
|
956
|
+
e.copyTo("ref", k);
|
|
957
|
+
} }), h.registerVisitor({ from: "conditionalFormatting", to: {}, openTag: (e) => {
|
|
958
|
+
const r = e.getParent();
|
|
959
|
+
r.conditionals || (r.conditionals = []), r.conditionals.push(e.getSource());
|
|
960
|
+
const l = e.getAttribute("sqref");
|
|
961
|
+
l && (e.getSource().ref = l.split(" ").join(",")), e.copyTo("pivot", w);
|
|
962
|
+
}, closeTag: (e) => {
|
|
963
|
+
const r = e.getSource();
|
|
964
|
+
if (r.rule) {
|
|
965
|
+
const l = Object.keys(r.rule);
|
|
966
|
+
for (let d = 0; d < l.length; d++) {
|
|
967
|
+
const S = l[d];
|
|
968
|
+
S !== "rule" && (r[S] = r.rule[S]);
|
|
1161
969
|
}
|
|
1162
|
-
r.formulas = $;
|
|
1163
970
|
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
r.
|
|
971
|
+
delete r.rule;
|
|
972
|
+
} }), h.registerVisitor({ from: "cfRule", to: "rule", openTag: (e) => {
|
|
973
|
+
const r = e.getParent();
|
|
974
|
+
e.copyToObject(r, "type", k), e.copyToObject(r, "priority", A), e.copyToObject(r, "stopIfTrue", w);
|
|
975
|
+
const l = e.getAttribute("dxfId", A);
|
|
976
|
+
if (l !== null) {
|
|
977
|
+
let d = _?.get(l);
|
|
978
|
+
d || (Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`), d = {}), r.style = d;
|
|
1172
979
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
980
|
+
e.copyToObject(r, "aboveAverage", w), e.copyToObject(r, "equalAverage", w), e.copyToObject(r, "stdDev", A), e.copyToObject(r, "bottom", w), e.copyToObject(r, "percent", w), e.copyToObject(r, "rank", A), e.copyToObject(r, "operator", k), e.copyToObject(r, "text", k), e.copyToObject(r, "timePeriod", k);
|
|
981
|
+
} }), h.registerVisitor({ from: "colorScale", to: "colorScale" }), h.registerVisitor({ from: "dataBar", to: "dataBar", openTag: (e) => {
|
|
982
|
+
e.copyTo("maxLength", A), e.copyTo("minLength", A), e.copyTo("showValue", w);
|
|
983
|
+
} }), h.registerVisitor({ from: "iconSet", to: "iconSet", openTag: (e) => {
|
|
984
|
+
e.copyTo("iconSet", k), e.copyTo("reverse", w), e.copyTo("showValue", w);
|
|
985
|
+
} }), h.registerVisitor({ from: "formula", to: null, text: (e, r) => {
|
|
986
|
+
const l = r.getParent();
|
|
987
|
+
let d = l.formulas;
|
|
988
|
+
d || (d = [], l.formulas = d), d.push(e);
|
|
989
|
+
} }), h.registerVisitor({ from: "cfvo", to: {}, openTag: (e) => {
|
|
990
|
+
const r = e.getParent();
|
|
991
|
+
r.conditions || (r.conditions = []), r.conditions.push(e.getSource()), e.copyTo("type", k), e.copyTo("value", ct, "val"), e.copyTo("gte", w);
|
|
992
|
+
} }), h.registerVisitor({ from: "color", to: {}, openTag: (e) => {
|
|
993
|
+
const r = e.getParent();
|
|
994
|
+
r.colors || (r.colors = []);
|
|
995
|
+
const l = ls((d) => e.getAttribute(d));
|
|
996
|
+
r.colors.push(l);
|
|
997
|
+
} }), h.registerVisitor({ from: "filterColumn", to: "filterColumn", openTag: (e) => {
|
|
998
|
+
const r = e.getParent();
|
|
999
|
+
r.fields || (r.fields = []), r.fields.push(e.getSource()), e.copyTo("offset", A, "colId"), e.copyTo("hiddenButton", w), e.copyTo("showButton", w);
|
|
1000
|
+
} }), h.registerVisitor({ from: "colorFilter", to: "colorFilter", openTag: (e) => {
|
|
1001
|
+
const r = e.getParent();
|
|
1002
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Color, e.copyTo("cellColor", w), e.copyTo("styleId", A, "dxfId");
|
|
1003
|
+
} }), h.registerVisitor({ from: "dynamicFilter", to: "dynamicFilter", openTag: (e) => {
|
|
1004
|
+
const r = e.getParent();
|
|
1005
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Dynamic, e.copyTo("dynamicType", k, "type"), e.copyTo("val", ct), e.copyTo("maxVal", ct, "maxVal");
|
|
1006
|
+
} }), h.registerVisitor({ from: "iconFilter", to: "iconFilter", openTag: (e) => {
|
|
1007
|
+
const r = e.getParent();
|
|
1008
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Icon, e.copyTo("iconId", A), e.copyTo("iconSet", k);
|
|
1009
|
+
} }), h.registerVisitor({ from: "top10", to: "top10", openTag: (e) => {
|
|
1010
|
+
const r = e.getParent();
|
|
1011
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Top10, e.copyTo("filterVal", ct), e.copyTo("percent", w), e.copyTo("top", w), e.copyTo("val", ct);
|
|
1012
|
+
} }), h.registerVisitor({ from: "filters", to: "filters", openTag: (e) => {
|
|
1013
|
+
const r = e.getParent();
|
|
1014
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Items, e.copyTo("blank", w), e.copyTo("calendarType", k);
|
|
1015
|
+
} }), h.registerVisitor({ from: "dateGroupItem", to: "dateGroupItem", openTag: (e) => {
|
|
1016
|
+
const r = e.getParent();
|
|
1017
|
+
r.dateGroups || (r.dateGroups = []), r.dateGroups.push(e.getSource()), e.copyTo("group", k, "dateTimeGrouping"), e.copyTo("day", A), e.copyTo("hour", A), e.copyTo("minute", A), e.copyTo("month", A), e.copyTo("second", A), e.copyTo("year", A);
|
|
1018
|
+
} }), h.registerVisitor({ from: "filter", to: "filter", openTag: (e) => {
|
|
1019
|
+
const r = e.getParent();
|
|
1020
|
+
r.items || (r.items = []), r.items.push(e.getAttribute("val", ct));
|
|
1021
|
+
} }), h.registerVisitor({ from: "customFilters", to: "customFilters", openTag: (e) => {
|
|
1022
|
+
const r = e.getParent();
|
|
1023
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Custom, e.copyTo("and", w);
|
|
1024
|
+
} }), h.registerVisitor({ from: "customFilter", to: "customFilter", openTag: (e) => {
|
|
1025
|
+
const r = e.getParent();
|
|
1026
|
+
r.filters || (r.filters = []), r.filters.push(e.getSource()), e.copyTo("operator", k), e.copyTo("value", ct, "val");
|
|
1027
|
+
} }), h.registerVisitor({ from: "sortState", to: "sort", openTag: (e) => {
|
|
1028
|
+
e.copyTo("ref", k);
|
|
1029
|
+
} }), h.registerVisitor({ from: "sortCondition", to: "sortCondition", openTag: (e) => {
|
|
1030
|
+
const r = e.getParent();
|
|
1031
|
+
r.fields || (r.fields = []);
|
|
1032
|
+
const l = e.getSource();
|
|
1033
|
+
r.fields.push(l), e.copyTo("sortOn", k, "sortBy"), e.copyTo("dxfId", k, "sortBy"), e.copyTo("iconSet", k), e.copyTo("customList", k);
|
|
1034
|
+
const d = e.getAttribute("ref");
|
|
1035
|
+
if (d) {
|
|
1036
|
+
const S = at.fastStringToRange(d, cs).colStart, gt = at.fastStringToRange(r.ref, cs), ot = gt.colStart;
|
|
1037
|
+
l.offset = gt ? S - ot : S;
|
|
1186
1038
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1039
|
+
l.reverse = e.getAttribute("descending", w) ?? !1;
|
|
1040
|
+
} }), h.registerVisitor({ from: "AlternateContent", to: null });
|
|
1041
|
+
const fe = (e) => {
|
|
1042
|
+
j = e.getSource(), e.copyTo("topLeft", k, "topLeftCell");
|
|
1043
|
+
const r = Ks(e.getAttribute("defaultGridColor")), l = e.getAttribute("colorId");
|
|
1044
|
+
l === null || r || (e.getSource().gridLineColor = "index" + parseFloat(l)), e.copyTo("showZeros", w), e.copyTo("showFormulas", w), e.copyTo("zoomScale", A), e.copyTo("showRowHeaders", w, "showRowColHeaders"), e.copyTo("showColumnHeaders", w, "showRowColHeaders"), e.copyTo("showRowGridlines", w, "showGridLines"), e.copyTo("showColumnGridlines", w, "showGridLines");
|
|
1045
|
+
};
|
|
1046
|
+
h.registerVisitor({ from: "sheetView", to: "view", openTag: (e) => {
|
|
1047
|
+
fe(e);
|
|
1048
|
+
}, closeTag: () => {
|
|
1049
|
+
j = null;
|
|
1050
|
+
} }), h.registerVisitor({ from: "customSheetViews", to: "customSheetViews", openTag: (e) => {
|
|
1051
|
+
e.setSource([]);
|
|
1052
|
+
} }), h.registerVisitor({ from: "customSheetView", to: [], openTag: (e) => {
|
|
1053
|
+
fe(e);
|
|
1054
|
+
}, closeTag: () => {
|
|
1055
|
+
j = null;
|
|
1056
|
+
} }), h.registerVisitor({ from: "selection", to: "selection", openTag: (e) => {
|
|
1057
|
+
if (!j) return;
|
|
1058
|
+
e.copyTo("cell", k, "activeCell"), e.copyTo("rangeIndex", A, "activeCellId");
|
|
1059
|
+
const r = e.getAttribute("activeCell"), l = e.getAttribute("sqref");
|
|
1060
|
+
l && l !== r && (e.getSource().ranges = l.split(" "));
|
|
1061
|
+
} }), h.registerVisitor({ from: "pane", to: "pane", openTag: (e) => {
|
|
1062
|
+
if (j && e.getAttribute("state") === "frozen") {
|
|
1063
|
+
const r = {};
|
|
1064
|
+
j.freezePanes = r, e.copyToObject(r, "topLeft", k, "topLeftCell");
|
|
1065
|
+
const l = j.topLeft ? at.fastStringToCell(j.topLeft) : { colIndex: 0, rowIndex: 0 }, d = { colIndex: 0, rowIndex: 0 };
|
|
1066
|
+
e.copyToObject(d, "colIndex", A, "xSplit"), e.copyToObject(d, "rowIndex", A, "ySplit");
|
|
1067
|
+
const S = { colIndex: l.colIndex + d.colIndex, rowIndex: l.rowIndex + d.rowIndex };
|
|
1068
|
+
r.coords = at.cellToString(S);
|
|
1191
1069
|
}
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1070
|
+
} }), h.registerVisitor({ from: "tabColor", to: null, openTag: (e) => {
|
|
1071
|
+
const r = ls((l) => e.getAttribute(l));
|
|
1072
|
+
r && (V.tabColor = r);
|
|
1073
|
+
} }), h.registerVisitor({ from: "pageSetUpPr", to: "pageSetUpPr", openTag: (e) => {
|
|
1074
|
+
} }), h.registerVisitor({ from: "outlinePr", to: "outlinePr", openTag: (e) => {
|
|
1075
|
+
} }), h.registerVisitor({ from: "pageMargins", to: "pageMargins", openTag: (e) => {
|
|
1076
|
+
} }), h.registerVisitor({ from: "pageSetup", to: "pageSetup", openTag: (e) => {
|
|
1077
|
+
} }), h.registerVisitor({ from: "printOptions", to: "printOptions", openTag: (e) => {
|
|
1078
|
+
} }), h.registerVisitor({ from: "mergeCells", to: "merges", openTag: (e) => {
|
|
1079
|
+
e.setSource([]);
|
|
1080
|
+
} }), h.registerVisitor({ from: "mergeCell", to: [], openTag: (e) => {
|
|
1081
|
+
const r = e.getAttribute("ref");
|
|
1082
|
+
e.setSource(r);
|
|
1083
|
+
} }), h.registerVisitor({ from: "hyperlinks", to: "hyperlinks", openTag: (e) => {
|
|
1084
|
+
e.setSource([]);
|
|
1085
|
+
} }), h.registerVisitor({ from: "hyperlink", to: [], openTag: (e) => {
|
|
1086
|
+
const r = e.getAttribute("r:id"), l = e.getAttribute("ref");
|
|
1087
|
+
if (!l) return void console.warn("No ref found for hyperlink");
|
|
1088
|
+
e.setKey(l);
|
|
1089
|
+
let d = r ? U(r) : "";
|
|
1090
|
+
if (typeof d != "string") return void console.warn("Invalid address ", d);
|
|
1091
|
+
const S = e.getAttribute("location");
|
|
1092
|
+
d.endsWith("\\") && (d = d.substring(0, d.length - 1));
|
|
1093
|
+
const gt = e.getAttribute("location");
|
|
1094
|
+
if (gt && (S && S !== gt && console.warn("display and location are different", S, gt), d += "#" + gt), !d) return void console.warn("No address found for hyperlink. r:id", r);
|
|
1095
|
+
let ot;
|
|
1096
|
+
const At = e.getAttribute("tooltip");
|
|
1097
|
+
ot = At ? { address: d, tooltip: At } : d, e.setSource({ r: l, v: ot });
|
|
1098
|
+
} }), h.registerVisitor({ from: "drawing", to: "movables", openTag: (e) => {
|
|
1099
|
+
const r = e.getAttribute("r:id");
|
|
1100
|
+
if (!r) return;
|
|
1101
|
+
const l = U(r);
|
|
1102
|
+
l ? e.setSource(l.movables) : console.warn("no drawing found for rId", r);
|
|
1103
|
+
} }), h.registerVisitor({ from: "tableParts", to: "tables", openTag: (e) => {
|
|
1104
|
+
e.setSource([]);
|
|
1105
|
+
} }), h.registerVisitor({ from: "tablePart", to: [], openTag: (e) => {
|
|
1106
|
+
const r = e.getAttribute("r:id");
|
|
1107
|
+
if (!r) return;
|
|
1108
|
+
const l = U(r);
|
|
1109
|
+
l ? e.setSource(l) : console.warn("no table found for rId", r);
|
|
1110
|
+
} }), h.registerVisitor({ from: "worksheet", to: "worksheet", openTag: (e) => {
|
|
1111
|
+
} }), h.registerVisitor({ from: "sheetProtection", to: "protection", openTag: (e) => {
|
|
1112
|
+
let r = !1;
|
|
1113
|
+
if (e.hasAttribute("sheet") && w(e.getAttribute("sheet")) && (r = !0), !r) return void e.setSource(void 0);
|
|
1114
|
+
const l = (S) => S === !0 || S === "1" || S === "on" || S === "true" || S === !1 || S === "0" || S === "off" || S === "false" || null;
|
|
1115
|
+
e.copyTo("autoFilter", l), e.copyTo("deleteColumns", l), e.copyTo("formatCells", l), e.copyTo("formatColumns", l), e.copyTo("formatRows", l), e.copyTo("insertColumns", l), e.copyTo("insertHyperlinks", l), e.copyTo("insertRows", l), e.copyTo("objects", l), e.copyTo("pivotTables", l), e.copyTo("scenarios", l), e.copyTo("selectUnlockedCells", l), e.copyTo("selectUnlockedCells", l), e.copyTo("sort", l);
|
|
1116
|
+
const d = {};
|
|
1117
|
+
e.copyToObject(d, "hash", k, "hashValue"), e.copyToObject(d, "algorithm", k, "algorithmName"), e.copyToObject(d, "salt", k, "saltValue"), e.copyToObject(d, "spinCount", A), Object.keys(d).length > 0 && (e.getSource().password = d);
|
|
1118
|
+
} }), h.registerVisitor({ from: "protectedRanges", to: "protectedRanges", openTag: (e) => {
|
|
1119
|
+
e.setSource({});
|
|
1120
|
+
} }), h.registerVisitor({ from: "protectedRange", to: {}, openTag: (e) => {
|
|
1121
|
+
const r = e.getAttribute("sqref");
|
|
1122
|
+
e.setKey(r), e.copyTo("name"), e.copyTo("securityDescriptor");
|
|
1123
|
+
const l = {};
|
|
1124
|
+
e.copyToObject(l, "hash", k, "hashValue"), e.copyToObject(l, "algorithm", k, "algorithmName"), e.copyToObject(l, "salt", k, "saltValue"), e.copyToObject(l, "spinCount", A), Object.keys(l).length > 0 && (e.getSource().password = l);
|
|
1125
|
+
} }), h.registerVisitor({ from: "sheetFormatPr", to: "sheetFormatPr", openTag: (e) => {
|
|
1126
|
+
e.copyToObject(V, "defaultColSize", ct, "defaultColWidth"), e.copyToObject(V, "outlineLevelCol", A, "outlineLevelCol");
|
|
1127
|
+
const r = e.getAttribute("customHeight");
|
|
1128
|
+
r !== "1" && r !== "true" || e.copyToObject(V, "defaultRowSize", ct, "defaultRowHeight"), e.copyToObject(V, "outlineLevelRow", A, "outlineLevelRow");
|
|
1129
|
+
} }), h.registerVisitor({ from: "cols", to: "cols", openTag: (e) => {
|
|
1130
|
+
e.setSource([]);
|
|
1131
|
+
} }), h.registerVisitor({ from: "col", to: [], openTag: (e) => {
|
|
1132
|
+
e.copyTo("min", (r) => parseInt(r) - 1), e.copyTo("max", (r) => parseInt(r) - 1), e.copyTo("sz", ct, "width"), e.copyTo("cs", w, "customWidth"), e.copyTo("h", w, "hidden"), e.copyTo("l", A, "outlineLevel"), e.copyTo("s", A, "style");
|
|
1133
|
+
} }), h.registerVisitor({ from: "oleObjects", to: null, openTag: (e) => {
|
|
1134
|
+
e.warn("'OLE Objects' are not supported.");
|
|
1135
|
+
} });
|
|
1136
|
+
let se = null;
|
|
1137
|
+
const ws = { onOpenTag: (e) => {
|
|
1138
|
+
se === null && (se = "");
|
|
1139
|
+
}, onText: (e) => {
|
|
1140
|
+
se += e;
|
|
1141
|
+
}, onEnd: () => {
|
|
1142
|
+
const e = ee(se);
|
|
1143
|
+
return se = null, e;
|
|
1144
|
+
}, onError: (e) => {
|
|
1145
|
+
} };
|
|
1146
|
+
return ((e, r, l, d, S, gt) => {
|
|
1147
|
+
let ot = !1, At = !1, qt = [], zt = !1, Et = null, ie = null, me = null, rt = null, Fe = null, Xe = null;
|
|
1148
|
+
const vs = gt?.get("richData") ?? [], Be = at.normalizeA1ToR1C1, We = Pe.createConflatingRanges(), _e = /* @__PURE__ */ new Map(), Ae = [];
|
|
1149
|
+
let oe = null;
|
|
1150
|
+
const qe = Pe.createConflatingRanges();
|
|
1151
|
+
let re, Dt = !1, X = -1, Q = -1, ft = null, ne = null;
|
|
1152
|
+
const Ee = [];
|
|
1153
|
+
let De = null, ze = -2, mt = 0, Ut = "", Pt = "", Ot = "", It = "", Vt = "", Lt = "", Nt = "", Ue = "", Ge = "", Ze = "", Je = "", Qe = "", Ke = "", Ye = "", Tt = !0, Rt = null;
|
|
1154
|
+
return { ...l, onEnd: () => {
|
|
1155
|
+
Ee.length > 0 && (r.rows = Ee);
|
|
1156
|
+
let p = We.done(Ys);
|
|
1157
|
+
const C = p.length;
|
|
1158
|
+
if (C > 0) {
|
|
1159
|
+
const $ = new Array(C);
|
|
1160
|
+
for (let L = 0; L < C; L++) {
|
|
1161
|
+
const nt = p[L], $t = at.rangeToString(nt), Mt = nt.value[1], ae = at.resolveRelativeToA1(Mt, nt.rowStart, nt.colStart);
|
|
1162
|
+
$[L] = [$t, ae];
|
|
1163
|
+
}
|
|
1164
|
+
r.formulas = $;
|
|
1222
1165
|
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
st === void 0 ? re = null : (re = st, re === "str" && (Dt = !0));
|
|
1232
|
-
let $ = p.attributes.s;
|
|
1233
|
-
$ !== void 0 && ($ = parseInt($), Rt && Rt.value === $ && Rt.colEnd + 1 === J ? Rt.colEnd = J : (Rt = { colStart: J, rowStart: X, colEnd: J, rowEnd: X, value: $ }, zt.push(Rt)));
|
|
1166
|
+
const et = qe.done(!0), N = et.length;
|
|
1167
|
+
if (N > 0) {
|
|
1168
|
+
const $ = new Array(N);
|
|
1169
|
+
for (let L = 0; L < N; L++) {
|
|
1170
|
+
const nt = et[L], $t = at.rangeToString(nt);
|
|
1171
|
+
$[L] = $t;
|
|
1172
|
+
}
|
|
1173
|
+
r.volatile = $;
|
|
1234
1174
|
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1175
|
+
if (Ae.length > 0 && (r.dynamicArray = [...Ae]), qt.length > 0) {
|
|
1176
|
+
qt.sort(Pe.createRangeComparator(As.Orientation.Column));
|
|
1177
|
+
const $ = [];
|
|
1178
|
+
let L = null, nt = -1, $t = -1, Mt = -1, ae = -1, wt = null;
|
|
1179
|
+
const ts = qt.length;
|
|
1180
|
+
ts > 0 && (L = qt[0], nt = L.colStart, $t = L.colEnd, Mt = L.rowEnd, ae = L.value, $.push(L));
|
|
1181
|
+
for (let jt = 1; jt < ts; jt++) wt = qt[jt], ae !== wt.value || nt !== wt.colStart || $t !== wt.colEnd || Mt + 1 !== wt.rowEnd ? ($.push(wt), L = wt, nt = L.colStart, $t = L.colEnd, Mt = L.rowEnd, ae = L.value) : (Mt = wt.rowEnd, L.rowEnd = Mt);
|
|
1182
|
+
let es = [];
|
|
1183
|
+
for (let jt = 0; jt < $.length; jt++) {
|
|
1184
|
+
const le = $[jt];
|
|
1185
|
+
es.push({ r: { colStart: le.colStart, colEnd: le.colEnd, rowStart: le.rowStart, rowEnd: le.rowEnd }, v: le.value });
|
|
1186
|
+
}
|
|
1187
|
+
r.directStyles = es;
|
|
1244
1188
|
}
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1189
|
+
const st = e.build();
|
|
1190
|
+
if (st) {
|
|
1191
|
+
const $ = st.tuples;
|
|
1192
|
+
r.data = $;
|
|
1193
|
+
}
|
|
1194
|
+
l?.onEnd?.();
|
|
1195
|
+
}, onOpenTag: (p) => {
|
|
1249
1196
|
let C = p.name;
|
|
1250
1197
|
const et = C.indexOf(":");
|
|
1251
|
-
if (et !== -1 && (C = C.slice(et + 1)),
|
|
1252
|
-
const N =
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
case "s":
|
|
1270
|
-
gt = p;
|
|
1271
|
-
break;
|
|
1272
|
-
case "e":
|
|
1273
|
-
if (p === "#VALUE!") {
|
|
1274
|
-
const et = oe.attributes.vm;
|
|
1275
|
-
if (et !== void 0) {
|
|
1276
|
-
const N = ws[parseInt(et) - 1];
|
|
1277
|
-
if (N && N.isFormulaError) {
|
|
1278
|
-
gt = { t: Ft.Error, v: N.getCode() };
|
|
1198
|
+
if (et !== -1 && (C = C.slice(et + 1)), re) {
|
|
1199
|
+
const N = p.attributes;
|
|
1200
|
+
switch (C) {
|
|
1201
|
+
case "v":
|
|
1202
|
+
At = !0;
|
|
1203
|
+
break;
|
|
1204
|
+
case "f":
|
|
1205
|
+
switch (N.t ?? null) {
|
|
1206
|
+
case null:
|
|
1207
|
+
case "normal":
|
|
1208
|
+
zt = !0;
|
|
1209
|
+
break;
|
|
1210
|
+
case "shared":
|
|
1211
|
+
const st = N.si;
|
|
1212
|
+
ie = N.ref, Et = st;
|
|
1213
|
+
break;
|
|
1214
|
+
case "array":
|
|
1215
|
+
zt = !0, ie = N.ref, oe = [ie, !1];
|
|
1279
1216
|
break;
|
|
1217
|
+
case "datatable":
|
|
1218
|
+
zt = !0, ie = N.ref, zt = !0;
|
|
1219
|
+
}
|
|
1220
|
+
N.ca !== void 0 && qe.append(X, Q);
|
|
1221
|
+
break;
|
|
1222
|
+
case "is":
|
|
1223
|
+
return void (Dt = !0);
|
|
1224
|
+
}
|
|
1225
|
+
return void (Dt && S?.onOpenTag(p));
|
|
1226
|
+
}
|
|
1227
|
+
if (ot) {
|
|
1228
|
+
if (C === "c") {
|
|
1229
|
+
re = p;
|
|
1230
|
+
const N = p.attributes.r;
|
|
1231
|
+
Q = at.fastStringToCol(N);
|
|
1232
|
+
const st = p.attributes.t;
|
|
1233
|
+
st === void 0 ? ne = null : (ne = st, ne === "str" && (Dt = !0));
|
|
1234
|
+
let $ = p.attributes.s;
|
|
1235
|
+
$ !== void 0 && ($ = parseInt($), Rt && Rt.value === $ && Rt.colEnd + 1 === Q ? Rt.colEnd = Q : (Rt = { colStart: Q, rowStart: X, colEnd: Q, rowEnd: X, value: $ }, qt.push(Rt)));
|
|
1236
|
+
}
|
|
1237
|
+
} else {
|
|
1238
|
+
if (C === "row") {
|
|
1239
|
+
ot = !0;
|
|
1240
|
+
const N = p.attributes.r;
|
|
1241
|
+
if (X = parseInt(N) - 1, mt = 0, Pt = p.attributes.customHeight, Pt !== void 0 && (mt |= Bt.CustomHeight), Pt !== Ge && (Tt = !0, Ge = Pt), Ut = p.attributes.ht, Ut !== void 0 && (mt |= Bt.Ht), Ut !== Ue && (Tt = !0, Ue = Ut), Ot = p.attributes.hidden, Ot !== void 0 && (mt |= Bt.Hidden), Ot !== Ze && (Tt = !0, Ze = Ot), Vt = p.attributes.s, Vt !== void 0 && (mt |= Bt.S), Vt !== Qe && (Tt = !0, Qe = Vt), It = p.attributes.customFormat, It !== void 0 && (mt |= Bt.CustomFormat), It !== Je && (Tt = !0, Je = It), Lt = p.attributes.outlineLevel, Lt !== void 0 && (mt |= Bt.OutlineLevel), Lt !== Ke && (Tt = !0, Ke = Lt), Nt = p.attributes.collapsed, Nt !== void 0 && (mt |= Bt.Collapsed), Nt !== Ye && (Tt = !0, Ye = Nt), mt !== 0) if (ze + 1 !== X || Tt) {
|
|
1242
|
+
const st = Pt !== void 0 && (Pt === "1" || Pt === "true"), $ = It !== void 0 && (It === "1" || It === "true");
|
|
1243
|
+
De = { min: X, max: X, sz: st && Ut !== void 0 ? parseFloat(Ut) : -1, csz: st, h: Ot !== void 0 && (Ot === "1" || Ot === "true"), s: st && Vt !== void 0 && Vt !== "0" ? parseInt(Vt) : 0, cs: $, l: Lt === void 0 || Lt === "0" ? 0 : parseInt(Lt), cl: Nt !== void 0 && (Nt === "1" || Nt === "true") }, Ee.push(De);
|
|
1244
|
+
} else De.max = X;
|
|
1245
|
+
return ze = X, void (Tt = !1);
|
|
1246
|
+
}
|
|
1247
|
+
l?.onOpenTag(p);
|
|
1248
|
+
}
|
|
1249
|
+
}, onCloseTag: (p) => {
|
|
1250
|
+
if (re) {
|
|
1251
|
+
let C = p.name;
|
|
1252
|
+
const et = C.indexOf(":");
|
|
1253
|
+
if (et !== -1 && (C = C.slice(et + 1)), Dt) if (C === "is" || C === "v") {
|
|
1254
|
+
const N = S?.onEnd();
|
|
1255
|
+
N !== null && e.addValue(X, Q, "" + N);
|
|
1256
|
+
} else S?.onCloseTag?.(p);
|
|
1257
|
+
return At && (At = !1), void (C === "c" && (re = null, Dt = !1));
|
|
1258
|
+
}
|
|
1259
|
+
if (ot) return ot = !1, void (Rt = null);
|
|
1260
|
+
l?.onCloseTag(p);
|
|
1261
|
+
}, onText: (p) => {
|
|
1262
|
+
if (p = p.trim(), At) {
|
|
1263
|
+
switch (ft = null, ne) {
|
|
1264
|
+
case null:
|
|
1265
|
+
case "n":
|
|
1266
|
+
ft = parseFloat(p);
|
|
1267
|
+
break;
|
|
1268
|
+
case "b":
|
|
1269
|
+
ft = p === "1" || p === "true";
|
|
1270
|
+
break;
|
|
1271
|
+
case "s":
|
|
1272
|
+
ft = p;
|
|
1273
|
+
break;
|
|
1274
|
+
case "e":
|
|
1275
|
+
if (p === "#VALUE!") {
|
|
1276
|
+
const et = re.attributes.vm;
|
|
1277
|
+
if (et !== void 0) {
|
|
1278
|
+
const N = vs[parseInt(et) - 1];
|
|
1279
|
+
if (N && N.isFormulaError) {
|
|
1280
|
+
ft = { t: Ft.Error, v: N.getCode() };
|
|
1281
|
+
break;
|
|
1282
|
+
}
|
|
1280
1283
|
}
|
|
1281
1284
|
}
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1285
|
+
const C = ks.getBuiltInByLabel(p);
|
|
1286
|
+
C ? ft = { t: Ft.Error, v: C.getCode() } : (ft = p, d?.(`Unknown formula error '${p}' in cell ${at.cellToString({ colIndex: Q, rowIndex: X })}`));
|
|
1287
|
+
break;
|
|
1288
|
+
case "str":
|
|
1289
|
+
case "inlineStr":
|
|
1290
|
+
Dt = !0;
|
|
1291
|
+
}
|
|
1292
|
+
ft !== null && e.addValue(X, Q, ft);
|
|
1289
1293
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1294
|
+
if (oe && (ne === "e" && (oe[1] = !0), Ae.push(oe), oe = null), Et) if (Fe === Et) rt = Xe;
|
|
1295
|
+
else {
|
|
1296
|
+
if (rt = _e.get(Et), !rt) {
|
|
1297
|
+
const C = [];
|
|
1298
|
+
me = Be(p, X, Q, C), rt = [me, C, p], _e.set(Et, rt);
|
|
1299
|
+
}
|
|
1300
|
+
Fe = Et, Xe = rt;
|
|
1301
|
+
}
|
|
1302
|
+
if (zt) {
|
|
1295
1303
|
const C = [];
|
|
1296
|
-
|
|
1304
|
+
me = Be(p, X, Q, C), rt = [me, C, p];
|
|
1305
|
+
}
|
|
1306
|
+
if (rt) return We.append(X, Q, rt), rt = null, zt = !1, Et = null, void (ie = null);
|
|
1307
|
+
Dt ? S?.onText(p) : ot || l?.onText(p);
|
|
1308
|
+
} };
|
|
1309
|
+
})(J, V, h.createEventHandler(V, () => {
|
|
1310
|
+
}, Z), Z, ws, tt);
|
|
1311
|
+
})(Y, (V, U = !1) => ue(V, R, U) ?? null, ms, ke, 0, (V) => {
|
|
1312
|
+
o && (V = R + ": " + V, o?.(V));
|
|
1313
|
+
}, W), xt = as(R, he), kt = await (async (V, U = 8388608) => {
|
|
1314
|
+
await (async () => {
|
|
1315
|
+
if (typeof ReadableStream > "u") if (typeof window > "u") {
|
|
1316
|
+
const { ReadableStream: Z } = await import("./BcWoqhD_sX85c7Mh.js");
|
|
1317
|
+
globalThis.ReadableStream = Z;
|
|
1318
|
+
} else console.warn("Browser does not support ReadableStream; consider loading a polyfill.");
|
|
1319
|
+
})();
|
|
1320
|
+
const ee = new TextDecoder("utf-8");
|
|
1321
|
+
let _ = 0;
|
|
1322
|
+
const G = V instanceof Uint8Array ? V : new Uint8Array(V);
|
|
1323
|
+
return new ReadableStream({ pull(Z) {
|
|
1324
|
+
if (_ >= G.byteLength) return void Z.close();
|
|
1325
|
+
const tt = G.subarray(_, Math.min(_ + U, G.byteLength)), h = ee.decode(tt, { stream: _ + U < G.byteLength });
|
|
1326
|
+
Z.enqueue(h), _ += tt.length;
|
|
1327
|
+
} }).getReader();
|
|
1328
|
+
})(xt);
|
|
1329
|
+
try {
|
|
1330
|
+
await Ie.parseStream(kt, Ct, { xmlns: !1 });
|
|
1331
|
+
} catch (V) {
|
|
1332
|
+
throw console.warn(`Error parsing sheet: '${R}'`, V), new Error(`Error parsing sheet: '${R}'`, { cause: V });
|
|
1333
|
+
}
|
|
1334
|
+
const Yt = be(R, ut);
|
|
1335
|
+
let te, He = /* @__PURE__ */ new Map();
|
|
1336
|
+
if (Yt) {
|
|
1337
|
+
const V = "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";
|
|
1338
|
+
let U;
|
|
1339
|
+
Yt.forEach((_, G) => {
|
|
1340
|
+
_.type === V && (te = ue(G, R, !1, ut)?.comments, te && te.forEach((tt) => {
|
|
1341
|
+
He.set(tt.id, tt);
|
|
1342
|
+
}));
|
|
1343
|
+
});
|
|
1344
|
+
const ee = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
1345
|
+
if (Yt.forEach((_, G) => {
|
|
1346
|
+
_.type === ee && (U = ue(G, R, !1, ut));
|
|
1347
|
+
}), U || te) {
|
|
1348
|
+
const _ = te ?? [], G = U?.comments;
|
|
1349
|
+
if (G) {
|
|
1350
|
+
const Z = U?.authors;
|
|
1351
|
+
for (let tt = 0; tt < G.length; tt++) {
|
|
1352
|
+
const h = G[tt];
|
|
1353
|
+
let J = h.authorId !== void 0 ? Z[h.authorId] : void 0;
|
|
1354
|
+
if ((!J || J.startsWith("tc=")) && (J = Qs(J.substring(3)), He.has(J))) continue;
|
|
1355
|
+
let j = pe.get(J);
|
|
1356
|
+
j || (j = $e.get(J)), j || (j = { id: ss.uuidV4(), displayName: J }, $e.set(j.displayName, j), pe.set(j.id, j)), J = j?.id ?? null;
|
|
1357
|
+
const fe = { id: ss.uuidV4(), personId: J, ref: h.ref, done: !1, asNote: !0, content: h.content };
|
|
1358
|
+
_.push(fe);
|
|
1297
1359
|
}
|
|
1298
|
-
He = Et, Fe = rt;
|
|
1299
|
-
}
|
|
1300
|
-
if (Ut) {
|
|
1301
|
-
const C = [];
|
|
1302
|
-
fe = Xe(p, X, J, C), rt = [fe, C, p];
|
|
1303
|
-
}
|
|
1304
|
-
if (rt) return Be.append(X, J, rt), rt = null, Ut = !1, Et = null, void (se = null);
|
|
1305
|
-
Dt ? S?.onText(p) : ot || l?.onText(p);
|
|
1306
|
-
} };
|
|
1307
|
-
})(Q, V, h.createEventHandler(V, () => {
|
|
1308
|
-
}, Z), Z, xs, wt);
|
|
1309
|
-
})(Y, (V, U = !1) => he(V, R, U) ?? null, fs, Ce, 0, (V) => {
|
|
1310
|
-
o && (V = R + ": " + V, o?.(V));
|
|
1311
|
-
}, W), _t = ns(R, ce), xt = await (async (V, U = 8388608) => {
|
|
1312
|
-
await (async () => {
|
|
1313
|
-
if (typeof ReadableStream > "u") if (typeof window > "u") {
|
|
1314
|
-
const { ReadableStream: Z } = await import("./CCIJpHSbFPjTEF8S.js");
|
|
1315
|
-
globalThis.ReadableStream = Z;
|
|
1316
|
-
} else console.warn("Browser does not support ReadableStream; consider loading a polyfill.");
|
|
1317
|
-
})();
|
|
1318
|
-
const te = new TextDecoder("utf-8");
|
|
1319
|
-
let _ = 0;
|
|
1320
|
-
const G = V instanceof Uint8Array ? V : new Uint8Array(V);
|
|
1321
|
-
return new ReadableStream({ pull(Z) {
|
|
1322
|
-
if (_ >= G.byteLength) return void Z.close();
|
|
1323
|
-
const wt = G.subarray(_, Math.min(_ + U, G.byteLength)), h = te.decode(wt, { stream: _ + U < G.byteLength });
|
|
1324
|
-
Z.enqueue(h), _ += wt.length;
|
|
1325
|
-
} }).getReader();
|
|
1326
|
-
})(_t);
|
|
1327
|
-
try {
|
|
1328
|
-
await Oe.parseStream(xt, bt, { xmlns: !1 });
|
|
1329
|
-
} catch (V) {
|
|
1330
|
-
throw console.warn(`Error parsing sheet: '${R}'`, V), new Error(`Error parsing sheet: '${R}'`, { cause: V });
|
|
1331
|
-
}
|
|
1332
|
-
const qt = ye(R, ut);
|
|
1333
|
-
let kt, je = /* @__PURE__ */ new Map();
|
|
1334
|
-
if (qt) {
|
|
1335
|
-
const V = "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";
|
|
1336
|
-
let U;
|
|
1337
|
-
qt.forEach((_, G) => {
|
|
1338
|
-
_.type === V && (kt = he(G, R, !1, ut)?.comments, kt && kt.forEach((Z) => {
|
|
1339
|
-
je.set(Z.id, Z);
|
|
1340
|
-
}));
|
|
1341
|
-
});
|
|
1342
|
-
const te = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
1343
|
-
if (qt.forEach((_, G) => {
|
|
1344
|
-
_.type === te && (U = he(G, R, !1, ut));
|
|
1345
|
-
}), U || kt) {
|
|
1346
|
-
const _ = kt ?? [], G = U?.comments;
|
|
1347
|
-
if (G) {
|
|
1348
|
-
const Z = U?.authors;
|
|
1349
|
-
for (let wt = 0; wt < G.length; wt++) {
|
|
1350
|
-
const h = G[wt];
|
|
1351
|
-
let Q = h.authorId !== void 0 ? Z[h.authorId] : void 0;
|
|
1352
|
-
if ((!Q || Q.startsWith("tc=")) && (Q = Qs(Q.substring(3)), je.has(Q))) continue;
|
|
1353
|
-
let j = de.get(Q);
|
|
1354
|
-
j || (j = Re.get(Q)), j || (j = { id: es.uuidV4(), displayName: Q }, Re.set(j.displayName, j), de.set(j.id, j)), Q = j?.id ?? null;
|
|
1355
|
-
const ge = { id: es.uuidV4(), personId: Q, ref: h.ref, done: !1, asNote: !0, content: h.content };
|
|
1356
|
-
_.push(ge);
|
|
1357
1360
|
}
|
|
1361
|
+
Y.comments = _;
|
|
1358
1362
|
}
|
|
1359
|
-
Y.comments = _;
|
|
1360
1363
|
}
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
}, yt) : Ie(R, ce, g, D, yt);
|
|
1364
|
+
};
|
|
1365
|
+
Le.push(pt());
|
|
1366
|
+
} else Wt = K ? as(R, he, (Y) => {
|
|
1367
|
+
const pt = T.add({ buffer: Y });
|
|
1368
|
+
return pt.addReference(I), H.add(pt), f.toResourceId(pt);
|
|
1369
|
+
}, bt) : Ve(R, he, g, D, bt);
|
|
1368
1370
|
return Wt;
|
|
1369
|
-
},
|
|
1370
|
-
let
|
|
1371
|
-
u.Strings && (
|
|
1372
|
-
const
|
|
1373
|
-
for (let P = 0; P <
|
|
1374
|
-
const
|
|
1375
|
-
let
|
|
1376
|
-
const
|
|
1377
|
-
const z =
|
|
1371
|
+
}, bt = { paramMap: W, getRefs: be, getRef: ue, parsedRefs: ht, onWarning: o, addPerson: (P) => null }, de = [];
|
|
1372
|
+
let xe = 0;
|
|
1373
|
+
u.Strings && (xe = parseInt(u.Strings.Unique ?? u.Strings.length ?? 0));
|
|
1374
|
+
const fs = u.Strings ?? [];
|
|
1375
|
+
for (let P = 0; P < xe; P++) de.push(fs[P]?.t ?? "");
|
|
1376
|
+
const Ne = /* @__PURE__ */ new Map();
|
|
1377
|
+
let Re = xe;
|
|
1378
|
+
const ms = (P) => {
|
|
1379
|
+
const z = Ne.get(P);
|
|
1378
1380
|
if (z !== void 0) return z;
|
|
1379
|
-
const K =
|
|
1380
|
-
return
|
|
1381
|
-
},
|
|
1382
|
-
let
|
|
1383
|
-
if (
|
|
1384
|
-
const P =
|
|
1381
|
+
const K = Re;
|
|
1382
|
+
return Ne.set(P, Re++), de.push(P), K;
|
|
1383
|
+
}, pe = (Zt("richstructure", u, g, D, bt), Zt("richdata", u, g, D, bt), /* @__PURE__ */ new Map()), $e = /* @__PURE__ */ new Map(), Me = Zt("people", u, g, D);
|
|
1384
|
+
let St = null;
|
|
1385
|
+
if (Me.size > 0 && (St = Me.entries().next()?.value?.[1]?.persons, St)) {
|
|
1386
|
+
const P = St.length;
|
|
1385
1387
|
for (let z = 0; z < P; z++) {
|
|
1386
|
-
const K =
|
|
1387
|
-
|
|
1388
|
+
const K = St[z];
|
|
1389
|
+
pe.set(K.id, K), pe.set(K.displayName, K);
|
|
1388
1390
|
}
|
|
1389
1391
|
}
|
|
1390
|
-
const
|
|
1391
|
-
let
|
|
1392
|
-
if (
|
|
1393
|
-
let P =
|
|
1394
|
-
P?.value?.[1] && (
|
|
1392
|
+
const we = Zt("themes", u, g, D, bt);
|
|
1393
|
+
let je = null;
|
|
1394
|
+
if (we && we.entries) {
|
|
1395
|
+
let P = we.entries().next();
|
|
1396
|
+
P?.value?.[1] && (je = P.value[1]);
|
|
1395
1397
|
}
|
|
1396
|
-
const
|
|
1397
|
-
let
|
|
1398
|
-
|
|
1399
|
-
const
|
|
1400
|
-
await Promise.all(
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1403
|
-
const
|
|
1398
|
+
const Ts = new Es(je);
|
|
1399
|
+
let ge = Zt("styles", u, g, D, bt).entries().next()?.value[1];
|
|
1400
|
+
ge && (ge = JSON.parse(Ds(ge)));
|
|
1401
|
+
const ys = Zt("workbooks", u, g, D, bt);
|
|
1402
|
+
await Promise.all(Le);
|
|
1403
|
+
const ve = { ...ys.entries().next().value[1], styles: ge, theme: Ts.toJSON() };
|
|
1404
|
+
de.length > 0 && (ve.strings = de), St && St.length > 0 && (ve.people = St);
|
|
1405
|
+
const bs = { ...n, resources: T, json: ve }, xs = new Ps(bs);
|
|
1404
1406
|
return H.forEach((P) => {
|
|
1405
1407
|
P.deleteReference(I);
|
|
1406
|
-
}), f.endPersist(),
|
|
1408
|
+
}), f.endPersist(), xs;
|
|
1407
1409
|
} catch (u) {
|
|
1408
1410
|
let D = "Unable to parse XLSX.";
|
|
1409
|
-
throw u instanceof
|
|
1411
|
+
throw u instanceof Is && (D = "Unable to open XLSX. There are too many rows or columns."), new Error(D, { cause: u });
|
|
1410
1412
|
}
|
|
1411
1413
|
}, toBufferXLSX: async (i, t) => {
|
|
1412
|
-
const s = await import("./
|
|
1414
|
+
const s = await import("./7_O6nILzn1fSVvkO.js"), o = await i.toJSON(!0), n = s.utils.book_new();
|
|
1413
1415
|
for (let a = 0; a < o.sheets.length; a++) {
|
|
1414
1416
|
const c = o.sheets[a], m = s.utils.json_to_sheet([{}]);
|
|
1415
1417
|
s.utils.book_append_sheet(n, m, c.name);
|
|
@@ -1456,12 +1458,12 @@ const Ks = (i, t, s) => {
|
|
|
1456
1458
|
return s.write(n, { type: "array", bookType: "xlsx" }), s.write(n, { type: "array", bookType: "xlsx" });
|
|
1457
1459
|
} }, Symbol.toStringTag, { value: "Module" }));
|
|
1458
1460
|
export {
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1461
|
+
ri as a,
|
|
1462
|
+
Ks as b,
|
|
1463
|
+
oi as c,
|
|
1464
|
+
ls as d,
|
|
1465
|
+
ai as i,
|
|
1466
|
+
ni as p,
|
|
1465
1467
|
Qs as r,
|
|
1466
|
-
|
|
1468
|
+
ii as t
|
|
1467
1469
|
};
|