@sheetxl/io-xlsx 0.8.0-beta.5 → 0.8.0-beta.7
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/{DtBN3UOzNJjYBwJ6.cjs → 17tMBnuyu4YIxixh.cjs} +1 -1
- package/browser/cjs/BxU-OlZIQViQl7gX.cjs +1 -0
- package/browser/cjs/{DOTve1YXP86VW8ln.cjs → CDs8etXnw0kbBKKv.cjs} +1 -1
- package/browser/cjs/CycnxkfuKrDdwoJN.cjs +5 -0
- package/browser/cjs/DHKWtqZ0vQfXrbq1.cjs +2 -0
- package/browser/cjs/{DULsYP_GcPGLVYSE.cjs → MqKQ_B5qRARrRbO4.cjs} +16 -3
- package/browser/cjs/index.cjs +1 -1
- package/browser/esm/{CEbxib7xV2WuS-D3.mjs → 9n64lXAgZUe3aThr.mjs} +3 -3
- package/browser/esm/{CCD-nLdFzaQd6BuH.mjs → B4eKxNwxJjHLN126.mjs} +1 -1
- package/browser/esm/{BcWQ-WWSh4k_BbiQ.mjs → BsNoW41d6hdpxTTS.mjs} +4 -4
- package/browser/esm/{VMf5ikEX-Pl2qTh8.mjs → BvAptAMpZVyBCx6-.mjs} +246 -154
- package/browser/esm/{DJsvdO0gLkETZXLX.mjs → CGXxwkCRWLc0gcRQ.mjs} +2 -2
- package/browser/esm/{B1yJJD4hEJtoWKFg.mjs → CX3yVwe-BnhCk4FY.mjs} +2 -2
- package/browser/esm/{DZcQYS8AC3Q4KMNZ.mjs → CjKioy-GzeSf08f8.mjs} +599 -597
- package/browser/esm/{EvN99eSJ3aoJPumL.mjs → DUi-V-E_AJwTIqlO.mjs} +2 -2
- package/browser/esm/{B9qJ5NSreEcSeTPX.mjs → DwcLXqv8-6Tl1zLO.mjs} +1 -1
- package/browser/esm/{Cka8nUQmzdu2avsT.mjs → cJxidonaVNZHAXiZ.mjs} +899 -795
- package/browser/esm/{BIfJ7hj1nXfdThAg.mjs → dsVZVtt5w_yLb967.mjs} +1236 -1150
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{DmlGXhQHqcwqLA05.mjs → BRQYaMYO4UfhjJHw.mjs} +2 -2
- package/node/esm/{BJHtwV9ss8ol7zme.mjs → BlbtH3EvAf3K4foF.mjs} +177 -83
- package/node/esm/{CRjza0eYeRMSvbQf.mjs → C51yFT2l-6il_xXO.mjs} +1 -1
- package/node/esm/{C0lFi5Rstdk8y5VR.mjs → CMq7eF1vxibUumqT.mjs} +2 -2
- package/node/esm/{CsrSCSuGVvpk7uBv.mjs → DLBm8l0jyL2fVlxg.mjs} +2 -2
- package/node/esm/{CwK9xIdlW4XaFkip.mjs → DhSPOg9wN0kD87Tb.mjs} +380 -288
- package/node/esm/{CT9_4oNvQhBAW0fh.mjs → KeV-N47eTyh5YE70.mjs} +1652 -1545
- package/node/esm/index.mjs +4 -4
- package/node/esm/{DqkQZkjIOnAGH7ah.mjs → s_yVG0m9KB14YKeN.mjs} +576 -574
- package/package.json +3 -3
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +7 -2
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +4 -0
- package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -0
- package/types/src/utils/VmlNoteShapes.d.ts +82 -22
- package/types/src/writer/emitters/CommentsEmitter.d.ts +9 -3
- package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +7 -1
- package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +0 -2
- package/browser/cjs/CUhvQ38mNlw3YIEp.cjs +0 -5
- package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.7
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { r as e } from "./
|
|
8
|
-
import { $ as t, D as n,
|
|
9
|
-
import { a as
|
|
10
|
-
import { BufferUtils as
|
|
11
|
-
import { AddressUtils as
|
|
12
|
-
var I = /* @__PURE__ */ new Uint8Array(),
|
|
7
|
+
import { r as e } from "./DwcLXqv8-6Tl1zLO.mjs";
|
|
8
|
+
import { $ as t, D as n, E as r, F as i, G as a, K as o, L as s, M as c, P as l, Q as u, R as d, V as f, X as p, Y as m, Z as ee, _ as h, at as g, b as _, ct as v, et as y, f as te, h as ne, i as b, it as re, j as ie, nt as ae, o as oe, ot as x, rt as S, s as C, tt as w, u as T, v as se, w as ce } from "./dsVZVtt5w_yLb967.mjs";
|
|
9
|
+
import { a as E, d as le, f as D, h as ue, l as de, m as O, n as fe, p as k, s as A, t as pe, u as me } from "./9n64lXAgZUe3aThr.mjs";
|
|
10
|
+
import { BufferUtils as he, CommonUtils as ge, ExpectedError as j } from "@sheetxl/utils";
|
|
11
|
+
import { AddressUtils as M, CommonUtils as _e, CoordUtils as N, FormulaError as ve, ICondition as P, IConditionalFormat as F, IRange as ye, OutOfBoundsError as be, PersonCollection as xe, ResourceCollection as Se, Theme as Ce, Tuple as we, Workbook as Te } from "@sheetxl/sdk";
|
|
12
|
+
var I = /* @__PURE__ */ new Uint8Array(), L = class e {
|
|
13
13
|
constructor(e, t, n) {
|
|
14
14
|
this.buffers = /* @__PURE__ */ new Map(), this.zip = e, this.entries = t, this.rawBuffer = n;
|
|
15
15
|
}
|
|
@@ -17,7 +17,7 @@ var I = /* @__PURE__ */ new Uint8Array(), we = class e {
|
|
|
17
17
|
return e.startsWith("/") ? e.slice(1) : e;
|
|
18
18
|
}
|
|
19
19
|
static async create(t) {
|
|
20
|
-
let n = t instanceof Blob ? I : t instanceof Uint8Array ? t : new Uint8Array(t), r = new
|
|
20
|
+
let n = t instanceof Blob ? I : t instanceof Uint8Array ? t : new Uint8Array(t), r = new a(t instanceof Blob ? new o(t) : new m(n)), i = /* @__PURE__ */ new Map();
|
|
21
21
|
for (let e of await r.getEntries()) e.directory || i.set(e.filename, e);
|
|
22
22
|
return new e(r, i, n);
|
|
23
23
|
}
|
|
@@ -35,12 +35,12 @@ var I = /* @__PURE__ */ new Uint8Array(), we = class e {
|
|
|
35
35
|
if (r) return r;
|
|
36
36
|
let i = this.entries.get(n);
|
|
37
37
|
if (!i) return null;
|
|
38
|
-
let a = await i.getData(new
|
|
38
|
+
let a = await i.getData(new p());
|
|
39
39
|
return this.buffers.set(n, a), a;
|
|
40
40
|
}
|
|
41
41
|
async prefetch(e) {
|
|
42
42
|
let t = [];
|
|
43
|
-
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new
|
|
43
|
+
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new p()).then((e) => {
|
|
44
44
|
this.buffers.set(n, e);
|
|
45
45
|
}));
|
|
46
46
|
await Promise.all(t);
|
|
@@ -83,18 +83,18 @@ var I = /* @__PURE__ */ new Uint8Array(), we = class e {
|
|
|
83
83
|
async close() {
|
|
84
84
|
await this.zip.close();
|
|
85
85
|
}
|
|
86
|
-
},
|
|
86
|
+
}, R = class {
|
|
87
87
|
constructor(e) {
|
|
88
|
-
this._sink = e, this._samples = [], this._t0 =
|
|
88
|
+
this._sink = e, this._samples = [], this._t0 = Ee(), this._tPrev = this._t0, this._heapPrev = De();
|
|
89
89
|
}
|
|
90
90
|
mark(e) {
|
|
91
|
-
let t =
|
|
91
|
+
let t = Ee(), n = De(), r = {
|
|
92
92
|
label: e,
|
|
93
93
|
tMs: t - this._t0,
|
|
94
94
|
dtMs: t - this._tPrev,
|
|
95
95
|
heapBytes: n,
|
|
96
96
|
dHeapBytes: n !== void 0 && this._heapPrev !== void 0 ? n - this._heapPrev : void 0,
|
|
97
|
-
rssBytes:
|
|
97
|
+
rssBytes: z()
|
|
98
98
|
};
|
|
99
99
|
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
100
100
|
}
|
|
@@ -106,91 +106,91 @@ var I = /* @__PURE__ */ new Uint8Array(), we = class e {
|
|
|
106
106
|
phase: e.label,
|
|
107
107
|
tMs: Math.round(e.tMs),
|
|
108
108
|
dtMs: Math.round(e.dtMs),
|
|
109
|
-
heapMB: e.heapBytes === void 0 ? "—" :
|
|
110
|
-
dHeapMB: e.dHeapBytes === void 0 ? "—" :
|
|
111
|
-
rssMB: e.rssBytes === void 0 ? "—" :
|
|
109
|
+
heapMB: e.heapBytes === void 0 ? "—" : Oe(e.heapBytes / 1048576),
|
|
110
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : Oe(e.dHeapBytes / 1048576),
|
|
111
|
+
rssMB: e.rssBytes === void 0 ? "—" : Oe(e.rssBytes / 1048576)
|
|
112
112
|
}));
|
|
113
113
|
}
|
|
114
|
-
},
|
|
115
|
-
function
|
|
114
|
+
}, Ee = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
115
|
+
function De() {
|
|
116
116
|
let e = typeof performance == "object" ? performance.memory : void 0;
|
|
117
117
|
if (e && typeof e.usedJSHeapSize == "number") return e.usedJSHeapSize;
|
|
118
118
|
let t = globalThis.process;
|
|
119
119
|
return typeof t == "object" && typeof t.memoryUsage == "function" ? t.memoryUsage().heapUsed : void 0;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function z() {
|
|
122
122
|
let e = globalThis.process;
|
|
123
123
|
if (typeof e == "object" && typeof e.memoryUsage == "function") return e.memoryUsage().rss;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Oe(e) {
|
|
126
126
|
return Math.round(10 * e) / 10;
|
|
127
127
|
}
|
|
128
|
-
var
|
|
128
|
+
var B = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", ke = `-${B}.0-9·̀-ͯ‿-⁀`, V = (RegExp(`^[${B}]$`, "u"), RegExp(`^[${ke}]$`, "u"), RegExp(`^[${B}][${ke}]*$`, "u")), H = (RegExp(`^[${ke}]+$`, "u"), [
|
|
129
129
|
32,
|
|
130
130
|
10,
|
|
131
131
|
13,
|
|
132
132
|
9
|
|
133
133
|
]);
|
|
134
|
-
function
|
|
134
|
+
function Ae(e) {
|
|
135
135
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 58 || e === 95 || e === 8204 || e === 8205 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 767 || e >= 880 && e <= 893 || e >= 895 && e <= 8191 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
136
136
|
}
|
|
137
|
-
var
|
|
138
|
-
RegExp(`^[${
|
|
139
|
-
var je = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",
|
|
140
|
-
function
|
|
137
|
+
var U = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", W = `-${U}.0-9·̀-ͯ‿-⁀`;
|
|
138
|
+
RegExp(`^[${U}]$`, "u"), RegExp(`^[${W}]$`, "u"), RegExp(`^[${U}][${W}]*$`, "u"), RegExp(`^[${W}]+$`, "u");
|
|
139
|
+
var je = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Me = `-${je}.0-9·̀-ͯ‿-⁀`, Ne = (RegExp(`^[${je}]$`, "u"), RegExp(`^[${Me}]$`, "u"), RegExp(`^[${je}][${Me}]*$`, "u"));
|
|
140
|
+
function Pe(e) {
|
|
141
141
|
return e >= 65 && e <= 90 || e === 95 || e >= 97 && e <= 122 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 767 || e >= 880 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
142
142
|
}
|
|
143
|
-
var
|
|
143
|
+
var G = function(e) {
|
|
144
144
|
return e === 32 || e === 10 || e === 13 || e === 9;
|
|
145
|
-
},
|
|
145
|
+
}, Fe = function(e) {
|
|
146
146
|
return e >= 32 && e <= 55295 || e === 10 || e === 13 || e === 9 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
147
|
-
},
|
|
148
|
-
return
|
|
149
|
-
},
|
|
147
|
+
}, Ie = Ae, Le = function(e) {
|
|
148
|
+
return Ae(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
149
|
+
}, Re = H, ze = V, Be = function(e) {
|
|
150
150
|
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
151
|
-
},
|
|
152
|
-
return
|
|
153
|
-
},
|
|
151
|
+
}, Ve = Pe, He = function(e) {
|
|
152
|
+
return Pe(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
153
|
+
}, Ue = Ne, We = "http://www.w3.org/XML/1998/namespace", Ge = "http://www.w3.org/2000/xmlns/", Ke = {
|
|
154
154
|
__proto__: null,
|
|
155
|
-
xml:
|
|
156
|
-
xmlns:
|
|
157
|
-
},
|
|
155
|
+
xml: We,
|
|
156
|
+
xmlns: Ge
|
|
157
|
+
}, qe = {
|
|
158
158
|
__proto__: null,
|
|
159
159
|
amp: "&",
|
|
160
160
|
gt: ">",
|
|
161
161
|
lt: "<",
|
|
162
162
|
quot: "\"",
|
|
163
163
|
apos: "'"
|
|
164
|
-
},
|
|
165
|
-
|
|
164
|
+
}, K = -1, Je = -2, q = 13, Ye = 33, Xe = 10, Ze = 60, Qe = 61, J = 62, Y = 63, $e = 93, et = (e) => e === 34 || e === 39, tt = [34, 39], nt = [
|
|
165
|
+
...tt,
|
|
166
166
|
91,
|
|
167
167
|
J
|
|
168
|
-
], tt = [
|
|
169
|
-
...$e,
|
|
170
|
-
Ye,
|
|
171
|
-
Ze
|
|
172
|
-
], nt = [
|
|
173
|
-
Xe,
|
|
174
|
-
Y,
|
|
175
|
-
...Le
|
|
176
168
|
], rt = [
|
|
177
|
-
...
|
|
169
|
+
...tt,
|
|
170
|
+
Ze,
|
|
171
|
+
$e
|
|
172
|
+
], it = [
|
|
173
|
+
Qe,
|
|
174
|
+
Y,
|
|
175
|
+
...Re
|
|
176
|
+
], at = [
|
|
177
|
+
...Re,
|
|
178
178
|
J,
|
|
179
179
|
38,
|
|
180
|
-
|
|
180
|
+
Ze
|
|
181
181
|
];
|
|
182
|
-
function
|
|
182
|
+
function ot(e, t, n) {
|
|
183
183
|
switch (t) {
|
|
184
184
|
case "xml":
|
|
185
|
-
n !==
|
|
185
|
+
n !== We && e.fail(`xml prefix must be bound to ${We}.`);
|
|
186
186
|
break;
|
|
187
|
-
case "xmlns": n !==
|
|
187
|
+
case "xmlns": n !== Ge && e.fail(`xmlns prefix must be bound to ${Ge}.`);
|
|
188
188
|
}
|
|
189
189
|
switch (n) {
|
|
190
|
-
case
|
|
191
|
-
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
190
|
+
case Ge:
|
|
191
|
+
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${Ge}.`);
|
|
192
192
|
break;
|
|
193
|
-
case
|
|
193
|
+
case We: switch (t) {
|
|
194
194
|
case "xml": break;
|
|
195
195
|
case "":
|
|
196
196
|
e.fail(`the default namespace may not be set to ${n}.`);
|
|
@@ -199,7 +199,7 @@ function it(e, t, n) {
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
var
|
|
202
|
+
var st, ct = (e) => Ue.test(e), lt = (e) => ze.test(e), ut = {
|
|
203
203
|
xmldecl: "xmlDeclHandler",
|
|
204
204
|
text: "textHandler",
|
|
205
205
|
processinginstruction: "piHandler",
|
|
@@ -213,7 +213,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
213
213
|
error: "errorHandler",
|
|
214
214
|
end: "endHandler",
|
|
215
215
|
ready: "readyHandler"
|
|
216
|
-
},
|
|
216
|
+
}, dt = class {
|
|
217
217
|
get closed() {
|
|
218
218
|
return this._closed;
|
|
219
219
|
}
|
|
@@ -221,15 +221,15 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
221
221
|
this.i = 0, this.prevI = 0, this.opt = e ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
222
222
|
let t = this.xmlnsOpt = !!this.opt.xmlns;
|
|
223
223
|
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, t) {
|
|
224
|
-
this.nameStartCheck =
|
|
224
|
+
this.nameStartCheck = Ve, this.nameCheck = He, this.isName = ct, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
225
225
|
__proto__: null,
|
|
226
|
-
...
|
|
226
|
+
...Ke
|
|
227
227
|
};
|
|
228
228
|
let e = this.opt.additionalNamespaces;
|
|
229
229
|
e != null && (function(e, t) {
|
|
230
|
-
for (let n of Object.keys(t))
|
|
230
|
+
for (let n of Object.keys(t)) ot(e, n, t[n]);
|
|
231
231
|
}(this, e), Object.assign(this.ns, e));
|
|
232
|
-
} else this.nameStartCheck =
|
|
232
|
+
} else this.nameStartCheck = Ie, this.nameCheck = Le, this.isName = lt, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
233
233
|
this.stateTable = [
|
|
234
234
|
this.sBegin,
|
|
235
235
|
this.sBeginWhitespace,
|
|
@@ -291,7 +291,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
291
291
|
version: void 0,
|
|
292
292
|
encoding: void 0,
|
|
293
293
|
standalone: void 0
|
|
294
|
-
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
294
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(qe), this.readyHandler?.();
|
|
295
295
|
}
|
|
296
296
|
get position() {
|
|
297
297
|
return this.chunkPosition + this.i;
|
|
@@ -300,10 +300,10 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
300
300
|
return this.position - this.positionAtNewLine;
|
|
301
301
|
}
|
|
302
302
|
on(e, t) {
|
|
303
|
-
this[
|
|
303
|
+
this[ut[e]] = t;
|
|
304
304
|
}
|
|
305
305
|
off(e) {
|
|
306
|
-
this[
|
|
306
|
+
this[ut[e]] = void 0;
|
|
307
307
|
}
|
|
308
308
|
makeError(e) {
|
|
309
309
|
let t = this.fileName ?? "";
|
|
@@ -329,13 +329,13 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
329
329
|
}
|
|
330
330
|
getCode10() {
|
|
331
331
|
let e = this.chunk, t = this.i;
|
|
332
|
-
if (this.prevI = t, this.i++, t >= e.length) return
|
|
332
|
+
if (this.prevI = t, this.i++, t >= e.length) return K;
|
|
333
333
|
let n = e.charCodeAt(t);
|
|
334
334
|
if (this.column++, n < 55296) {
|
|
335
335
|
if (n >= 32 || n === 9) return n;
|
|
336
336
|
switch (n) {
|
|
337
|
-
case
|
|
338
|
-
case 13: return e.charCodeAt(t + 1) ===
|
|
337
|
+
case Xe: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Xe;
|
|
338
|
+
case 13: return e.charCodeAt(t + 1) === Xe && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, Je;
|
|
339
339
|
default: return this.fail("disallowed character."), n;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
@@ -345,18 +345,18 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
345
345
|
}
|
|
346
346
|
getCode11() {
|
|
347
347
|
let { chunk: e, i: t } = this;
|
|
348
|
-
if (this.prevI = t, this.i = t + 1, t >= e.length) return
|
|
348
|
+
if (this.prevI = t, this.i = t + 1, t >= e.length) return K;
|
|
349
349
|
let n = e.charCodeAt(t);
|
|
350
350
|
if (this.column++, n < 55296) {
|
|
351
351
|
if (n > 31 && n < 127 || n > 159 && n !== 8232 || n === 9) return n;
|
|
352
352
|
switch (n) {
|
|
353
|
-
case
|
|
353
|
+
case Xe: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Xe;
|
|
354
354
|
case 13: {
|
|
355
355
|
let n = e.charCodeAt(t + 1);
|
|
356
|
-
n !==
|
|
356
|
+
n !== Xe && n !== 133 || (this.i = t + 2);
|
|
357
357
|
}
|
|
358
358
|
case 133:
|
|
359
|
-
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
359
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Je;
|
|
360
360
|
default: return this.fail("disallowed character."), n;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
@@ -366,7 +366,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
366
366
|
}
|
|
367
367
|
getCodeNorm() {
|
|
368
368
|
let e = this.getCode();
|
|
369
|
-
return e ===
|
|
369
|
+
return e === Je ? Xe : e;
|
|
370
370
|
}
|
|
371
371
|
unGet() {
|
|
372
372
|
this.i = this.prevI, this.column--;
|
|
@@ -374,8 +374,8 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
374
374
|
captureTo(e) {
|
|
375
375
|
let { i: t } = this, { chunk: n } = this;
|
|
376
376
|
for (;;) {
|
|
377
|
-
let r = this.getCode(), i = r ===
|
|
378
|
-
if (a ===
|
|
377
|
+
let r = this.getCode(), i = r === Je, a = i ? Xe : r;
|
|
378
|
+
if (a === K || e.includes(a)) return this.text += n.slice(t, this.prevI), a;
|
|
379
379
|
i && (this.text += `${n.slice(t, this.prevI)}\n`, t = this.i);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
@@ -384,10 +384,10 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
384
384
|
for (;;) {
|
|
385
385
|
let r = this.getCode();
|
|
386
386
|
switch (r) {
|
|
387
|
-
case
|
|
388
|
-
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r =
|
|
387
|
+
case Je:
|
|
388
|
+
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r = Xe;
|
|
389
389
|
break;
|
|
390
|
-
case
|
|
390
|
+
case K: return this.text += n.slice(t), !1;
|
|
391
391
|
}
|
|
392
392
|
if (r === e) return this.text += n.slice(t, this.prevI), !0;
|
|
393
393
|
}
|
|
@@ -396,18 +396,18 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
396
396
|
let { chunk: e, i: t } = this;
|
|
397
397
|
for (;;) {
|
|
398
398
|
let n = this.getCode();
|
|
399
|
-
if (n ===
|
|
400
|
-
if (!
|
|
399
|
+
if (n === K) return this.name += e.slice(t), K;
|
|
400
|
+
if (!Le(n)) return this.name += e.slice(t, this.prevI), n === Je ? Xe : n;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
skipSpaces() {
|
|
404
404
|
for (;;) {
|
|
405
405
|
let e = this.getCodeNorm();
|
|
406
|
-
if (e ===
|
|
406
|
+
if (e === K || !G(e)) return e;
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
setXMLVersion(e) {
|
|
410
|
-
this.currentXMLVersion = e, e === "1.0" ? (this.isChar =
|
|
410
|
+
this.currentXMLVersion = e, e === "1.0" ? (this.isChar = Fe, this.getCode = this.getCode10) : (this.isChar = Be, this.getCode = this.getCode11);
|
|
411
411
|
}
|
|
412
412
|
sBegin() {
|
|
413
413
|
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
@@ -415,21 +415,21 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
415
415
|
sBeginWhitespace() {
|
|
416
416
|
let e = this.i, t = this.skipSpaces();
|
|
417
417
|
switch (this.prevI !== e && (this.xmlDeclPossible = !1), t) {
|
|
418
|
-
case
|
|
418
|
+
case Ze:
|
|
419
419
|
if (this.state = 15, this.text.length !== 0) throw Error("no-empty text at start");
|
|
420
420
|
break;
|
|
421
|
-
case
|
|
421
|
+
case K: break;
|
|
422
422
|
default: this.unGet(), this.state = q, this.xmlDeclPossible = !1;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
sDoctype() {
|
|
426
|
-
let e = this.captureTo(
|
|
426
|
+
let e = this.captureTo(nt);
|
|
427
427
|
switch (e) {
|
|
428
428
|
case J:
|
|
429
429
|
this.doctypeHandler?.(this.text), this.text = "", this.state = q, this.doctype = !0;
|
|
430
430
|
break;
|
|
431
|
-
case
|
|
432
|
-
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 :
|
|
431
|
+
case K: break;
|
|
432
|
+
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 : et(e) && (this.state = 3, this.q = e);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
sDoctypeQuote() {
|
|
@@ -437,8 +437,8 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
437
437
|
this.captureToChar(e) && (this.text += String.fromCodePoint(e), this.q = null, this.state = 2);
|
|
438
438
|
}
|
|
439
439
|
sDTD() {
|
|
440
|
-
let e = this.captureTo(
|
|
441
|
-
e !==
|
|
440
|
+
let e = this.captureTo(rt);
|
|
441
|
+
e !== K && (this.text += String.fromCodePoint(e), e === $e ? this.state = 2 : e === Ze ? this.state = 6 : et(e) && (this.state = 5, this.q = e));
|
|
442
442
|
}
|
|
443
443
|
sDTDQuoted() {
|
|
444
444
|
let e = this.q;
|
|
@@ -484,7 +484,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
484
484
|
sEntity() {
|
|
485
485
|
let { i: e } = this, { chunk: t } = this;
|
|
486
486
|
t: for (;;) switch (this.getCode()) {
|
|
487
|
-
case
|
|
487
|
+
case Je:
|
|
488
488
|
this.entity += `${t.slice(e, this.prevI)}\n`, e = this.i;
|
|
489
489
|
break;
|
|
490
490
|
case 59: {
|
|
@@ -492,14 +492,14 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
492
492
|
this.state = n, r === "" ? (this.fail("empty entity name."), i = "&;") : (i = this.parseEntity(r), this.entity = ""), n === q && this.textHandler === void 0 || (this.text += i);
|
|
493
493
|
break t;
|
|
494
494
|
}
|
|
495
|
-
case
|
|
495
|
+
case K:
|
|
496
496
|
this.entity += t.slice(e);
|
|
497
497
|
break t;
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
sOpenWaka() {
|
|
501
501
|
let e = this.getCode();
|
|
502
|
-
if (
|
|
502
|
+
if (Ie(e)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
503
503
|
else switch (e) {
|
|
504
504
|
case 47:
|
|
505
505
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -539,11 +539,11 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
539
539
|
e === J ? this.state = q : (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(e)}`, this.state = 17);
|
|
540
540
|
}
|
|
541
541
|
sCData() {
|
|
542
|
-
this.captureToChar(
|
|
542
|
+
this.captureToChar($e) && (this.state = 21);
|
|
543
543
|
}
|
|
544
544
|
sCDataEnding() {
|
|
545
545
|
let e = this.getCodeNorm();
|
|
546
|
-
e ===
|
|
546
|
+
e === $e ? this.state = 22 : (this.text += `]${String.fromCodePoint(e)}`, this.state = 20);
|
|
547
547
|
}
|
|
548
548
|
sCDataEnding2() {
|
|
549
549
|
let e = this.getCodeNorm();
|
|
@@ -551,7 +551,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
551
551
|
case J:
|
|
552
552
|
this.cdataHandler?.(this.text), this.text = "", this.state = q;
|
|
553
553
|
break;
|
|
554
|
-
case
|
|
554
|
+
case $e:
|
|
555
555
|
this.text += "]";
|
|
556
556
|
break;
|
|
557
557
|
default: this.text += `]]${String.fromCodePoint(e)}`, this.state = 20;
|
|
@@ -559,17 +559,17 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
559
559
|
}
|
|
560
560
|
sPIFirstChar() {
|
|
561
561
|
let e = this.getCodeNorm();
|
|
562
|
-
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === Y ||
|
|
562
|
+
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === Y || G(e) ? (this.fail("processing instruction without a target."), this.state = e === Y ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(e), this.state = 24);
|
|
563
563
|
}
|
|
564
564
|
sPIRest() {
|
|
565
565
|
let { chunk: e, i: t } = this;
|
|
566
566
|
for (;;) {
|
|
567
567
|
let n = this.getCodeNorm();
|
|
568
|
-
if (n ===
|
|
568
|
+
if (n === K) return void (this.piTarget += e.slice(t));
|
|
569
569
|
if (!this.nameCheck(n)) {
|
|
570
570
|
this.piTarget += e.slice(t, this.prevI);
|
|
571
571
|
let r = n === Y;
|
|
572
|
-
r ||
|
|
572
|
+
r || G(n) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = r ? Ye : 27) : this.state = r ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(n));
|
|
573
573
|
break;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
@@ -577,7 +577,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
577
577
|
sPIBody() {
|
|
578
578
|
if (this.text.length === 0) {
|
|
579
579
|
let e = this.getCodeNorm();
|
|
580
|
-
e === Y ? this.state = 26 :
|
|
580
|
+
e === Y ? this.state = 26 : G(e) || (this.text = String.fromCodePoint(e));
|
|
581
581
|
} else this.captureToChar(Y) && (this.state = 26);
|
|
582
582
|
}
|
|
583
583
|
sPIEnding() {
|
|
@@ -593,12 +593,12 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
593
593
|
}
|
|
594
594
|
sXMLDeclNameStart() {
|
|
595
595
|
let e = this.skipSpaces();
|
|
596
|
-
e === Y ? this.state =
|
|
596
|
+
e === Y ? this.state = Ye : e !== K && (this.state = 28, this.name = String.fromCodePoint(e));
|
|
597
597
|
}
|
|
598
598
|
sXMLDeclName() {
|
|
599
|
-
let e = this.captureTo(
|
|
600
|
-
if (e === Y) return this.state =
|
|
601
|
-
if (
|
|
599
|
+
let e = this.captureTo(it);
|
|
600
|
+
if (e === Y) return this.state = Ye, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
601
|
+
if (G(e) || e === Qe) {
|
|
602
602
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
603
603
|
case 0:
|
|
604
604
|
this.fail("did not expect any more name/value pairs.");
|
|
@@ -608,23 +608,23 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
608
608
|
break;
|
|
609
609
|
default: this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`);
|
|
610
610
|
}
|
|
611
|
-
this.state = e ===
|
|
611
|
+
this.state = e === Qe ? 30 : 29;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
sXMLDeclEq() {
|
|
615
615
|
let e = this.getCodeNorm();
|
|
616
|
-
if (e === Y) return this.state =
|
|
617
|
-
|
|
616
|
+
if (e === Y) return this.state = Ye, void this.fail("XML declaration is incomplete.");
|
|
617
|
+
G(e) || (e !== Qe && this.fail("value required."), this.state = 30);
|
|
618
618
|
}
|
|
619
619
|
sXMLDeclValueStart() {
|
|
620
620
|
let e = this.getCodeNorm();
|
|
621
|
-
if (e === Y) return this.state =
|
|
622
|
-
|
|
621
|
+
if (e === Y) return this.state = Ye, void this.fail("XML declaration is incomplete.");
|
|
622
|
+
G(e) || (et(e) ? this.q = e : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
623
623
|
}
|
|
624
624
|
sXMLDeclValue() {
|
|
625
625
|
let e = this.captureTo([this.q, Y]);
|
|
626
|
-
if (e === Y) return this.state =
|
|
627
|
-
if (e ===
|
|
626
|
+
if (e === Y) return this.state = Ye, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
627
|
+
if (e === K) return;
|
|
628
628
|
let t = this.text;
|
|
629
629
|
switch (this.text = "", this.name) {
|
|
630
630
|
case "version": {
|
|
@@ -642,14 +642,14 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
642
642
|
}
|
|
643
643
|
sXMLDeclSeparator() {
|
|
644
644
|
let e = this.getCodeNorm();
|
|
645
|
-
e === Y ? this.state =
|
|
645
|
+
e === Y ? this.state = Ye : (G(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
646
646
|
}
|
|
647
647
|
sXMLDeclEnding() {
|
|
648
648
|
this.getCodeNorm() === J ? (this.piTarget === "xml" ? this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version.") : this.fail("processing instructions are not allowed before root."), this.xmlDeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = q) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
649
649
|
}
|
|
650
650
|
sOpenTag() {
|
|
651
651
|
let e = this.captureNameChars();
|
|
652
|
-
if (e ===
|
|
652
|
+
if (e === K) return;
|
|
653
653
|
let t = this.tag = {
|
|
654
654
|
name: this.name,
|
|
655
655
|
attributes: Object.create(null)
|
|
@@ -661,7 +661,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
661
661
|
case 47:
|
|
662
662
|
this.state = 35;
|
|
663
663
|
break;
|
|
664
|
-
default:
|
|
664
|
+
default: G(e) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
sOpenTagSlash() {
|
|
@@ -669,25 +669,25 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
669
669
|
}
|
|
670
670
|
sAttrib() {
|
|
671
671
|
let e = this.skipSpaces();
|
|
672
|
-
e !==
|
|
672
|
+
e !== K && (Ie(e) ? (this.unGet(), this.state = 37) : e === J ? this.openTag() : e === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
673
673
|
}
|
|
674
674
|
sAttribName() {
|
|
675
675
|
let e = this.captureNameChars();
|
|
676
|
-
e ===
|
|
676
|
+
e === Qe ? this.state = 39 : G(e) ? this.state = 38 : e === J ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : e !== K && this.fail("disallowed character in attribute name.");
|
|
677
677
|
}
|
|
678
678
|
sAttribNameSawWhite() {
|
|
679
679
|
let e = this.skipSpaces();
|
|
680
680
|
switch (e) {
|
|
681
|
-
case
|
|
682
|
-
case
|
|
681
|
+
case K: return;
|
|
682
|
+
case Qe:
|
|
683
683
|
this.state = 39;
|
|
684
684
|
break;
|
|
685
|
-
default: this.fail("attribute without value."), this.text = "", this.name = "", e === J ? this.openTag() :
|
|
685
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", e === J ? this.openTag() : Ie(e) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
sAttribValue() {
|
|
689
689
|
let e = this.getCodeNorm();
|
|
690
|
-
|
|
690
|
+
et(e) ? (this.q = e, this.state = 40) : G(e) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
691
691
|
}
|
|
692
692
|
sAttribValueQuoted() {
|
|
693
693
|
let { q: e, chunk: t } = this, { i: n } = this;
|
|
@@ -698,53 +698,53 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
698
698
|
case 38:
|
|
699
699
|
this.text += t.slice(n, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
700
700
|
return;
|
|
701
|
+
case Xe:
|
|
701
702
|
case Je:
|
|
702
|
-
case K:
|
|
703
703
|
case 9:
|
|
704
704
|
this.text += `${t.slice(n, this.prevI)} `, n = this.i;
|
|
705
705
|
break;
|
|
706
|
-
case
|
|
706
|
+
case Ze:
|
|
707
707
|
this.text += t.slice(n, this.prevI), this.fail("disallowed character.");
|
|
708
708
|
return;
|
|
709
|
-
case
|
|
709
|
+
case K:
|
|
710
710
|
this.text += t.slice(n);
|
|
711
711
|
return;
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
sAttribValueClosed() {
|
|
715
715
|
let e = this.getCodeNorm();
|
|
716
|
-
|
|
716
|
+
G(e) ? this.state = 36 : e === J ? this.openTag() : e === 47 ? this.state = 35 : Ie(e) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
717
717
|
}
|
|
718
718
|
sAttribValueUnquoted() {
|
|
719
|
-
let e = this.captureTo(
|
|
719
|
+
let e = this.captureTo(at);
|
|
720
720
|
switch (e) {
|
|
721
721
|
case 38:
|
|
722
722
|
this.state = 14, this.entityReturnState = 42;
|
|
723
723
|
break;
|
|
724
|
-
case
|
|
724
|
+
case Ze:
|
|
725
725
|
this.fail("disallowed character.");
|
|
726
726
|
break;
|
|
727
|
-
case
|
|
727
|
+
case K: break;
|
|
728
728
|
default: this.text.includes("]]>") && this.fail("the string \"]]>\" is disallowed in char data."), this.pushAttrib(this.name, this.text), this.name = this.text = "", e === J ? this.openTag() : this.state = 36;
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
sCloseTag() {
|
|
732
732
|
let e = this.captureNameChars();
|
|
733
|
-
e === J ? this.closeTag() :
|
|
733
|
+
e === J ? this.closeTag() : G(e) ? this.state = 44 : e !== K && this.fail("disallowed character in closing tag.");
|
|
734
734
|
}
|
|
735
735
|
sCloseTagSawWhite() {
|
|
736
736
|
switch (this.skipSpaces()) {
|
|
737
737
|
case J:
|
|
738
738
|
this.closeTag();
|
|
739
739
|
break;
|
|
740
|
-
case
|
|
740
|
+
case K: break;
|
|
741
741
|
default: this.fail("disallowed character in closing tag.");
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
handleTextInRoot() {
|
|
745
745
|
let { i: e, forbiddenState: t } = this, { chunk: n, textHandler: r } = this;
|
|
746
746
|
t: for (;;) switch (this.getCode()) {
|
|
747
|
-
case
|
|
747
|
+
case Ze:
|
|
748
748
|
if (this.state = 15, r !== void 0) {
|
|
749
749
|
let { text: t } = this, i = n.slice(e, this.prevI);
|
|
750
750
|
t.length === 0 ? i.length !== 0 && r(i) : (r(t + i), this.text = "");
|
|
@@ -754,7 +754,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
754
754
|
case 38:
|
|
755
755
|
this.state = 14, this.entityReturnState = q, r !== void 0 && (this.text += n.slice(e, this.prevI)), t = 0;
|
|
756
756
|
break t;
|
|
757
|
-
case
|
|
757
|
+
case $e:
|
|
758
758
|
switch (t) {
|
|
759
759
|
case 0:
|
|
760
760
|
t = 1;
|
|
@@ -769,10 +769,10 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
769
769
|
case J:
|
|
770
770
|
t === 2 && this.fail("the string \"]]>\" is disallowed in char data."), t = 0;
|
|
771
771
|
break;
|
|
772
|
-
case
|
|
772
|
+
case Je:
|
|
773
773
|
r !== void 0 && (this.text += `${n.slice(e, this.prevI)}\n`), e = this.i, t = 0;
|
|
774
774
|
break;
|
|
775
|
-
case
|
|
775
|
+
case K:
|
|
776
776
|
r !== void 0 && (this.text += n.slice(e));
|
|
777
777
|
break t;
|
|
778
778
|
default: t = 0;
|
|
@@ -784,7 +784,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
784
784
|
t: for (;;) {
|
|
785
785
|
let i = this.getCode();
|
|
786
786
|
switch (i) {
|
|
787
|
-
case
|
|
787
|
+
case Ze:
|
|
788
788
|
if (this.state = 15, n !== void 0) {
|
|
789
789
|
let { text: r } = this, i = t.slice(e, this.prevI);
|
|
790
790
|
r.length === 0 ? i.length !== 0 && n(i) : (n(r + i), this.text = "");
|
|
@@ -793,13 +793,13 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
793
793
|
case 38:
|
|
794
794
|
this.state = 14, this.entityReturnState = q, n !== void 0 && (this.text += t.slice(e, this.prevI)), r = !0;
|
|
795
795
|
break t;
|
|
796
|
-
case
|
|
796
|
+
case Je:
|
|
797
797
|
n !== void 0 && (this.text += `${t.slice(e, this.prevI)}\n`), e = this.i;
|
|
798
798
|
break;
|
|
799
|
-
case
|
|
799
|
+
case K:
|
|
800
800
|
n !== void 0 && (this.text += t.slice(e));
|
|
801
801
|
break t;
|
|
802
|
-
default:
|
|
802
|
+
default: G(i) || (r = !0);
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
r && (this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0));
|
|
@@ -813,10 +813,10 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
813
813
|
};
|
|
814
814
|
if (this.attribList.push(i), this.attributeHandler?.(i), n === "xmlns") {
|
|
815
815
|
let e = t.trim();
|
|
816
|
-
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e,
|
|
816
|
+
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e, ot(this, r, e);
|
|
817
817
|
} else if (e === "xmlns") {
|
|
818
818
|
let e = t.trim();
|
|
819
|
-
this.topNS[""] = e,
|
|
819
|
+
this.topNS[""] = e, ot(this, "", e);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
pushAttribPlain(e, t) {
|
|
@@ -868,7 +868,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
868
868
|
let { attributes: n } = t, r = /* @__PURE__ */ new Set();
|
|
869
869
|
for (let t of e) {
|
|
870
870
|
let { name: e, prefix: i, local: a } = t, o, s;
|
|
871
|
-
i === "" ? (o = e === "xmlns" ?
|
|
871
|
+
i === "" ? (o = e === "xmlns" ? Ge : "", s = e) : (o = this.resolve(i), o === void 0 && (this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`), o = i), s = `{${o}}${a}`), r.has(s) && this.fail(`duplicate attribute: ${s}.`), r.add(s), t.uri = o, n[e] = t;
|
|
872
872
|
}
|
|
873
873
|
this.attribList = [];
|
|
874
874
|
}
|
|
@@ -906,21 +906,21 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
906
906
|
let t = NaN;
|
|
907
907
|
return e[1] === "x" && /^#x[0-9a-f]+$/i.test(e) ? t = parseInt(e.slice(2), 16) : /^#[0-9]+$/.test(e) && (t = parseInt(e.slice(1), 10)), this.isChar(t) ? String.fromCodePoint(t) : (this.fail("malformed character entity."), `&${e};`);
|
|
908
908
|
}
|
|
909
|
-
},
|
|
909
|
+
}, ft = /&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g, pt = {
|
|
910
910
|
amp: "&",
|
|
911
911
|
lt: "<",
|
|
912
912
|
gt: ">",
|
|
913
913
|
quot: "\"",
|
|
914
914
|
apos: "'"
|
|
915
|
-
},
|
|
916
|
-
let n =
|
|
915
|
+
}, mt = (e, t) => {
|
|
916
|
+
let n = pt[t];
|
|
917
917
|
if (n !== void 0) return n;
|
|
918
918
|
let r = t.charCodeAt(1) === 120 ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
|
|
919
919
|
return r > 0 && r <= 1114111 ? String.fromCodePoint(r) : e;
|
|
920
|
-
},
|
|
920
|
+
}, ht = (e) => {
|
|
921
921
|
let t = e;
|
|
922
|
-
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(
|
|
923
|
-
},
|
|
922
|
+
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(ft, mt)), t;
|
|
923
|
+
}, gt = (e) => {
|
|
924
924
|
let t = e, n = t.length;
|
|
925
925
|
for (let e = 0; e < n; e++) {
|
|
926
926
|
let n = t.charCodeAt(e);
|
|
@@ -929,8 +929,8 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
929
929
|
break;
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
-
return t.indexOf("&") !== -1 && (t = t.replace(
|
|
933
|
-
},
|
|
932
|
+
return t.indexOf("&") !== -1 && (t = t.replace(ft, mt)), t;
|
|
933
|
+
}, _t = (e) => e === 32 || e === 9 || e === 10 || e === 13, vt = class e {
|
|
934
934
|
constructor() {
|
|
935
935
|
this._openTagHandler = void 0, this._closeTagHandler = void 0, this._textHandler = void 0, this._cdataHandler = void 0, this._errorHandler = void 0, this._endHandler = void 0, this._scanners = null, this._carry = "", this._text = "", this._tags = [], this._sawRoot = !1, this._closed = !1;
|
|
936
936
|
}
|
|
@@ -941,7 +941,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
941
941
|
this.NOT_HANDLED = -2;
|
|
942
942
|
}
|
|
943
943
|
static decodeText(e) {
|
|
944
|
-
return
|
|
944
|
+
return ht(e);
|
|
945
945
|
}
|
|
946
946
|
on(e, t) {
|
|
947
947
|
switch (e) {
|
|
@@ -1007,7 +1007,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
1007
1007
|
if (e.length === 0) return;
|
|
1008
1008
|
this._text = "";
|
|
1009
1009
|
let t = this._textHandler;
|
|
1010
|
-
t !== void 0 && this._tags.length !== 0 && t(
|
|
1010
|
+
t !== void 0 && this._tags.length !== 0 && t(ht(e));
|
|
1011
1011
|
}
|
|
1012
1012
|
_markup(t, n, r) {
|
|
1013
1013
|
if (n + 1 >= r) return -1;
|
|
@@ -1046,7 +1046,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
1046
1046
|
let i = n + 1 + o.name.length;
|
|
1047
1047
|
if (i >= r) return -1;
|
|
1048
1048
|
let a = t.charCodeAt(i);
|
|
1049
|
-
if (a === 62 || a === 47 ||
|
|
1049
|
+
if (a === 62 || a === 47 || _t(a)) {
|
|
1050
1050
|
this._flushText();
|
|
1051
1051
|
let i = o.scan(t, n, r);
|
|
1052
1052
|
if (i !== e.NOT_HANDLED) {
|
|
@@ -1064,11 +1064,11 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
_openTag(e, t, n) {
|
|
1066
1066
|
let r = t + 1, i = 0;
|
|
1067
|
-
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !
|
|
1067
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !_t(i));) r++;
|
|
1068
1068
|
if (r >= n) return -1;
|
|
1069
1069
|
let a = e.slice(t + 1, r), o = {}, s = !1;
|
|
1070
1070
|
for (;;) {
|
|
1071
|
-
for (; r < n &&
|
|
1071
|
+
for (; r < n && _t(i = e.charCodeAt(r));) r++;
|
|
1072
1072
|
if (r >= n) return -1;
|
|
1073
1073
|
if (i === 62) {
|
|
1074
1074
|
r++;
|
|
@@ -1084,16 +1084,16 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
1084
1084
|
break;
|
|
1085
1085
|
}
|
|
1086
1086
|
let t = r;
|
|
1087
|
-
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !
|
|
1087
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !_t(i));) r++;
|
|
1088
1088
|
if (r >= n) return -1;
|
|
1089
1089
|
let a = e.slice(t, r);
|
|
1090
|
-
for (; r < n &&
|
|
1090
|
+
for (; r < n && _t(i = e.charCodeAt(r));) r++;
|
|
1091
1091
|
if (r >= n) return -1;
|
|
1092
1092
|
if (i !== 61) {
|
|
1093
1093
|
this.fail("attribute without value.");
|
|
1094
1094
|
continue;
|
|
1095
1095
|
}
|
|
1096
|
-
for (r++; r < n &&
|
|
1096
|
+
for (r++; r < n && _t(i = e.charCodeAt(r));) r++;
|
|
1097
1097
|
if (r >= n) return -1;
|
|
1098
1098
|
if (i !== 34 && i !== 39) {
|
|
1099
1099
|
this.fail("unquoted attribute value.");
|
|
@@ -1101,7 +1101,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
let c = e.indexOf(i === 34 ? "\"" : "'", r + 1);
|
|
1103
1103
|
if (c === -1) return -1;
|
|
1104
|
-
a !== "__proto__" && (o[a] =
|
|
1104
|
+
a !== "__proto__" && (o[a] = gt(e.slice(r + 1, c))), r = c + 1;
|
|
1105
1105
|
}
|
|
1106
1106
|
this._flushText(), this._sawRoot = !0;
|
|
1107
1107
|
let c = {
|
|
@@ -1139,7 +1139,7 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
1139
1139
|
Ready: "ready"
|
|
1140
1140
|
}, e.parseStream = async (e, t, n) => {
|
|
1141
1141
|
if (n?.lean) return (async (e, t) => {
|
|
1142
|
-
let n = new
|
|
1142
|
+
let n = new vt(), r;
|
|
1143
1143
|
t.elementScanners && n.setElementScanners(t.elementScanners), t.onOpenTag && n.on("opentag", t.onOpenTag), t.onCloseTag && n.on("closetag", t.onCloseTag), t.onText && n.on("text", t.onText), t.onError && n.on("error", t.onError);
|
|
1144
1144
|
let i = t.onEnd;
|
|
1145
1145
|
for (i && n.on("end", () => {
|
|
@@ -1151,13 +1151,13 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
1151
1151
|
}
|
|
1152
1152
|
return n.close(), r;
|
|
1153
1153
|
})(e, t);
|
|
1154
|
-
let r = new
|
|
1154
|
+
let r = new dt({
|
|
1155
1155
|
position: !1,
|
|
1156
1156
|
...n
|
|
1157
1157
|
}), i;
|
|
1158
|
-
t.onOpenTagStart && r.on(
|
|
1158
|
+
t.onOpenTagStart && r.on(st.Events.OpenTagStart, t.onOpenTagStart), t.onOpenTag && r.on(st.Events.OpenTag, t.onOpenTag), t.onCloseTag && r.on(st.Events.CloseTag, t.onCloseTag), t.onAttribute && r.on(st.Events.Attribute, t.onAttribute), t.onText && r.on(st.Events.Text, t.onText), t.onError && r.on(st.Events.Error, t.onError);
|
|
1159
1159
|
let a = t.onEnd;
|
|
1160
|
-
for (a && r.on(
|
|
1160
|
+
for (a && r.on(st.Events.End, () => {
|
|
1161
1161
|
i = a();
|
|
1162
1162
|
});;) {
|
|
1163
1163
|
let { value: t, done: n } = await e.read();
|
|
@@ -1166,14 +1166,14 @@ var at, ot = (e) => He.test(e), st = (e) => Re.test(e), ct = {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
return r.close(), i;
|
|
1168
1168
|
};
|
|
1169
|
-
})(
|
|
1169
|
+
})(st ||= {});
|
|
1170
1170
|
var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, Z = (e) => {
|
|
1171
1171
|
let t = parseInt(e);
|
|
1172
1172
|
return isNaN(t) ? null : t;
|
|
1173
1173
|
}, Q = (e) => {
|
|
1174
1174
|
let t = parseFloat(e);
|
|
1175
1175
|
return isNaN(t) ? null : t;
|
|
1176
|
-
}, $ = null,
|
|
1176
|
+
}, $ = null, yt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), bt = (e) => yt(e).replace(/"/g, """), xt = class {
|
|
1177
1177
|
constructor() {
|
|
1178
1178
|
this._registeredVisitors = /* @__PURE__ */ new Map();
|
|
1179
1179
|
}
|
|
@@ -1235,7 +1235,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1235
1235
|
let t = e.attributes ?? {}, n = `<${e.name}`;
|
|
1236
1236
|
for (let e in t) {
|
|
1237
1237
|
let r = t[e];
|
|
1238
|
-
n += ` ${e}="${
|
|
1238
|
+
n += ` ${e}="${bt(typeof r == "string" ? r : r?.value ?? "")}"`;
|
|
1239
1239
|
}
|
|
1240
1240
|
return n + ">";
|
|
1241
1241
|
})(e)), o = {
|
|
@@ -1284,12 +1284,12 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1284
1284
|
s = o?.local ?? null, c = o?.tag ?? null, l = o?.visitor ?? null, p = !o?.destination;
|
|
1285
1285
|
},
|
|
1286
1286
|
onText: (e) => {
|
|
1287
|
-
m ? m.push(
|
|
1287
|
+
m ? m.push(yt(e)) : l?.text?.(e, _);
|
|
1288
1288
|
},
|
|
1289
1289
|
onEnd: t
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
},
|
|
1292
|
+
}, St = `IFERROR(${n}(`, Ct = St.toUpperCase(), wt = r.toUpperCase(), Tt = { kind: "none" }, Et = { kind: "spilled" }, Dt = (e, t) => {
|
|
1293
1293
|
if (e.charCodeAt(t) !== 34) return null;
|
|
1294
1294
|
let n = "", r = t + 1;
|
|
1295
1295
|
for (; r < e.length;) if (e.charCodeAt(r) === 34) {
|
|
@@ -1300,12 +1300,12 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1300
1300
|
n += "\"", r += 2;
|
|
1301
1301
|
} else n += e[r], r++;
|
|
1302
1302
|
return null;
|
|
1303
|
-
},
|
|
1303
|
+
}, Ot = (e) => {
|
|
1304
1304
|
let t = [], n = 0;
|
|
1305
1305
|
for (; n < e.length;) {
|
|
1306
1306
|
let r = e.charCodeAt(n);
|
|
1307
1307
|
if (r === 34) {
|
|
1308
|
-
let t =
|
|
1308
|
+
let t = Dt(e, n);
|
|
1309
1309
|
if (t === null) break;
|
|
1310
1310
|
n = t.end;
|
|
1311
1311
|
continue;
|
|
@@ -1323,7 +1323,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1323
1323
|
e.charCodeAt(i) === 40 && t.push(e.slice(n, i).toUpperCase().replace(/^_XLFN\./, "").replace(/^_XLWS\./, "")), n = i;
|
|
1324
1324
|
}
|
|
1325
1325
|
return t;
|
|
1326
|
-
},
|
|
1326
|
+
}, kt = (e) => {
|
|
1327
1327
|
let t = (t) => {
|
|
1328
1328
|
if (e) return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1];
|
|
1329
1329
|
}, n = (e) => {
|
|
@@ -1336,13 +1336,13 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1336
1336
|
x: A(t("colOff") ?? "0") ?? 0,
|
|
1337
1337
|
y: A(t("rowOff") ?? "0") ?? 0
|
|
1338
1338
|
};
|
|
1339
|
-
},
|
|
1340
|
-
let l = new
|
|
1339
|
+
}, At = "formulaDialect", jt = (e, n, r, i, a, o, s, c) => {
|
|
1340
|
+
let l = new xt(), d = c?.get("parseInlineDxf"), f = c?.get(At), p = (e) => f && e ? f.readDetached(e) : e, m = new we.TransposedBuilder(), b = null;
|
|
1341
1341
|
l.registerVisitor({
|
|
1342
1342
|
from: "autoFilter",
|
|
1343
1343
|
to: "autoTable",
|
|
1344
1344
|
openTag: (e) => {
|
|
1345
|
-
let t = e.getAttribute("ref"), n =
|
|
1345
|
+
let t = e.getAttribute("ref"), n = M.fastStringToRange(t);
|
|
1346
1346
|
e.getSource().r = n, e.getSource().v = {};
|
|
1347
1347
|
},
|
|
1348
1348
|
closeTag: (e) => {
|
|
@@ -1390,11 +1390,11 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1390
1390
|
if (!t?.r) return;
|
|
1391
1391
|
let n = t.conditionals[t.conditionals.length - 1], r = n?.rule;
|
|
1392
1392
|
if (!r) return;
|
|
1393
|
-
let i = {}, a =
|
|
1393
|
+
let i = {}, a = h(r, o);
|
|
1394
1394
|
a && (i.condition = a), r.style && (i.style = r.style), r.scale && (i.scale = r.scale), r.stopIfTrue && (i.stopIfTrue = !0), r.pivot && (i.pivot = !0), n.v = i, n.priority = r.priority, r.x14Id && (n.x14Id = r.x14Id), delete n.rule;
|
|
1395
1395
|
}
|
|
1396
1396
|
});
|
|
1397
|
-
let
|
|
1397
|
+
let re = (e) => {
|
|
1398
1398
|
let t = e.conditions ?? [], n = [];
|
|
1399
1399
|
for (let e = 0; e < t.length; e++) {
|
|
1400
1400
|
let r = t[e], i = {};
|
|
@@ -1407,10 +1407,10 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1407
1407
|
to: {},
|
|
1408
1408
|
openTag: (e) => {},
|
|
1409
1409
|
closeTag: (e) => {
|
|
1410
|
-
let t = e.getSource(), n = t.colors ?? [], r =
|
|
1410
|
+
let t = e.getSource(), n = t.colors ?? [], r = re(t);
|
|
1411
1411
|
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1412
1412
|
e.getParent().scale = {
|
|
1413
|
-
type:
|
|
1413
|
+
type: F.ScaleType.ColorScale,
|
|
1414
1414
|
stops: r
|
|
1415
1415
|
};
|
|
1416
1416
|
}
|
|
@@ -1422,8 +1422,8 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1422
1422
|
},
|
|
1423
1423
|
closeTag: (e) => {
|
|
1424
1424
|
let t = e.getSource(), n = {
|
|
1425
|
-
type:
|
|
1426
|
-
stops:
|
|
1425
|
+
type: F.ScaleType.DataBar,
|
|
1426
|
+
stops: re(t)
|
|
1427
1427
|
}, r = t.colors?.[0];
|
|
1428
1428
|
r && (n.color = r), t.minLength !== void 0 && (n.minLength = t.minLength), t.maxLength !== void 0 && (n.maxLength = t.maxLength), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1429
1429
|
}
|
|
@@ -1435,8 +1435,8 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1435
1435
|
},
|
|
1436
1436
|
closeTag: (e) => {
|
|
1437
1437
|
let t = e.getSource(), n = {
|
|
1438
|
-
type:
|
|
1439
|
-
stops:
|
|
1438
|
+
type: F.ScaleType.IconSet,
|
|
1439
|
+
stops: re(t)
|
|
1440
1440
|
};
|
|
1441
1441
|
t.iconSet !== void 0 && (n.iconSet = t.iconSet), t.reverse !== void 0 && (n.reverse = t.reverse), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1442
1442
|
}
|
|
@@ -1445,7 +1445,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1445
1445
|
to: {},
|
|
1446
1446
|
text: (e, t) => {
|
|
1447
1447
|
let n = t.getParent(), r = n.formulas;
|
|
1448
|
-
r || (r = [], n.formulas = r), r.push(
|
|
1448
|
+
r || (r = [], n.formulas = r), r.push(p(e));
|
|
1449
1449
|
}
|
|
1450
1450
|
}), l.registerVisitor({
|
|
1451
1451
|
from: "cfvo",
|
|
@@ -1454,9 +1454,9 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1454
1454
|
let t = e.getParent();
|
|
1455
1455
|
t.conditions ||= [];
|
|
1456
1456
|
let n = e.getSource();
|
|
1457
|
-
if (t.conditions.push(n), e.copyTo("type", $), n.type ===
|
|
1457
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === F.ColorStopType.Formula) {
|
|
1458
1458
|
let t = e.getAttribute("val");
|
|
1459
|
-
t != null && (n.value =
|
|
1459
|
+
t != null && (n.value = p(String(t)));
|
|
1460
1460
|
} else e.copyTo("value", Q, "val");
|
|
1461
1461
|
!1 === e.getAttribute("gte", X) && (n.exclusive = !0);
|
|
1462
1462
|
}
|
|
@@ -1492,34 +1492,34 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1492
1492
|
from: "colorFilter",
|
|
1493
1493
|
openTag: (e) => {
|
|
1494
1494
|
let t = e.getParent(), n = {};
|
|
1495
|
-
t.operator =
|
|
1495
|
+
t.operator = P.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor"), e.copyToObject(n, "styleId", Z, "dxfId");
|
|
1496
1496
|
}
|
|
1497
1497
|
}), l.registerVisitor({
|
|
1498
1498
|
from: "iconFilter",
|
|
1499
1499
|
openTag: (e) => {
|
|
1500
1500
|
let t = e.getParent(), n = {};
|
|
1501
|
-
t.operator =
|
|
1501
|
+
t.operator = P.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Z), e.copyToObject(n, "iconSet", $);
|
|
1502
1502
|
}
|
|
1503
1503
|
}), l.registerVisitor({
|
|
1504
1504
|
from: "top10",
|
|
1505
1505
|
openTag: (e) => {
|
|
1506
1506
|
let t = e.getParent(), n = {};
|
|
1507
|
-
t.operator =
|
|
1507
|
+
t.operator = P.BuiltInOperatorNames.TopN, t.param = n, e.copyToObject(n, "filterVal", Q), e.copyToObject(n, "percent", X), e.copyToObject(n, "top", X), e.copyToObject(n, "limit", Q, "val");
|
|
1508
1508
|
}
|
|
1509
1509
|
}), l.registerVisitor({
|
|
1510
1510
|
from: "dynamicFilter",
|
|
1511
1511
|
openTag: (e) => {
|
|
1512
1512
|
let t = e.getParent(), n = {};
|
|
1513
|
-
t.operator =
|
|
1513
|
+
t.operator = P.BuiltInOperatorNames.TimePeriod, t.param = n;
|
|
1514
1514
|
let r = e.getAttribute("type");
|
|
1515
|
-
Object.values(
|
|
1515
|
+
Object.values(P.AverageType).includes(r) ? (t.operator = P.BuiltInOperatorNames.Average, e.copyToObject(n, "stdDevs", Z, "val")) : e.copyToObject(n, "anchorDate", Z, "val"), e.copyToObject(n, "operator", $, "type"), e.copyToObject(n, "maxVal", Q, "maxVal");
|
|
1516
1516
|
}
|
|
1517
1517
|
}), l.registerVisitor({
|
|
1518
1518
|
from: "filters",
|
|
1519
1519
|
to: {},
|
|
1520
1520
|
openTag: (e) => {
|
|
1521
1521
|
let t = e.getParent(), n = {};
|
|
1522
|
-
return t.operator =
|
|
1522
|
+
return t.operator = P.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", X), e.copyToObject(n, "calendarType", $), n;
|
|
1523
1523
|
}
|
|
1524
1524
|
}), l.registerVisitor({
|
|
1525
1525
|
from: "filter",
|
|
@@ -1538,7 +1538,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1538
1538
|
from: "customFilters",
|
|
1539
1539
|
openTag: (e) => {
|
|
1540
1540
|
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1541
|
-
return t.operator = r ?
|
|
1541
|
+
return t.operator = r ? P.BuiltInOperatorNames.And : P.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1542
1542
|
},
|
|
1543
1543
|
closeTag: (e) => {
|
|
1544
1544
|
let t = e.getSource(), n = t?.param;
|
|
@@ -1551,7 +1551,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1551
1551
|
openTag: (e) => {
|
|
1552
1552
|
let t = e.getParent(), n;
|
|
1553
1553
|
Array.isArray(t) ? (n = {}, t.push(n)) : n = t;
|
|
1554
|
-
let r =
|
|
1554
|
+
let r = ne({
|
|
1555
1555
|
operator: e.getAttribute("operator"),
|
|
1556
1556
|
val: e.getAttribute("val")
|
|
1557
1557
|
});
|
|
@@ -1576,7 +1576,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1576
1576
|
i || (i = [], r.sorts = i);
|
|
1577
1577
|
let a = e.getAttribute("ref"), o = 0;
|
|
1578
1578
|
if (a) {
|
|
1579
|
-
let e =
|
|
1579
|
+
let e = M.fastStringToRange(a, Pt).colStart, n = t.r, r = n.colStart;
|
|
1580
1580
|
o = n ? e - r : e;
|
|
1581
1581
|
}
|
|
1582
1582
|
let s = {};
|
|
@@ -1589,8 +1589,8 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1589
1589
|
}
|
|
1590
1590
|
});
|
|
1591
1591
|
let ie = (e) => {
|
|
1592
|
-
|
|
1593
|
-
let t =
|
|
1592
|
+
b = e.getSource(), e.copyTo("topLeft", $, "topLeftCell");
|
|
1593
|
+
let t = E(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1594
1594
|
n === null || t || (e.getSource().gridLineColor = "index" + parseFloat(n)), e.copyTo("showZeros", X), e.copyTo("showFormulas", X), e.copyTo("zoomScale", Z), e.copyTo("showRowHeaders", X, "showRowColHeaders"), e.copyTo("showColumnHeaders", X, "showRowColHeaders"), e.copyTo("showRowGridlines", X, "showGridLines"), e.copyTo("showColumnGridlines", X, "showGridLines"), e.copyTo("rightToLeft", X);
|
|
1595
1595
|
};
|
|
1596
1596
|
l.registerVisitor({
|
|
@@ -1600,7 +1600,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1600
1600
|
ie(e);
|
|
1601
1601
|
},
|
|
1602
1602
|
closeTag: () => {
|
|
1603
|
-
|
|
1603
|
+
b = null;
|
|
1604
1604
|
}
|
|
1605
1605
|
}), l.registerVisitor({
|
|
1606
1606
|
from: "customSheetViews",
|
|
@@ -1615,13 +1615,13 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1615
1615
|
ie(e);
|
|
1616
1616
|
},
|
|
1617
1617
|
closeTag: () => {
|
|
1618
|
-
|
|
1618
|
+
b = null;
|
|
1619
1619
|
}
|
|
1620
1620
|
}), l.registerVisitor({
|
|
1621
1621
|
from: "selection",
|
|
1622
1622
|
to: "selection",
|
|
1623
1623
|
openTag: (e) => {
|
|
1624
|
-
if (!
|
|
1624
|
+
if (!b) return;
|
|
1625
1625
|
e.copyTo("cell", $, "activeCell"), e.copyTo("rangeIndex", Z, "activeCellId");
|
|
1626
1626
|
let t = e.getAttribute("activeCell"), n = e.getAttribute("sqref");
|
|
1627
1627
|
n && n !== t && (e.getSource().ranges = n.trim().split(/\s+/));
|
|
@@ -1630,10 +1630,10 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1630
1630
|
from: "pane",
|
|
1631
1631
|
to: null,
|
|
1632
1632
|
openTag: (e) => {
|
|
1633
|
-
if (
|
|
1633
|
+
if (b && e.getAttribute("state") === "frozen") {
|
|
1634
1634
|
let t = {};
|
|
1635
|
-
|
|
1636
|
-
let n = (
|
|
1635
|
+
b.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
1636
|
+
let n = (b.topLeft ? M.fastStringToCell(b.topLeft) : void 0) ?? {
|
|
1637
1637
|
colIndex: 0,
|
|
1638
1638
|
rowIndex: 0
|
|
1639
1639
|
}, r = {
|
|
@@ -1645,7 +1645,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1645
1645
|
colIndex: n.colIndex + r.colIndex,
|
|
1646
1646
|
rowIndex: n.rowIndex + r.rowIndex
|
|
1647
1647
|
};
|
|
1648
|
-
t.coords =
|
|
1648
|
+
t.coords = M.cellToString(i);
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
1651
|
}), l.registerVisitor({
|
|
@@ -1727,7 +1727,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1727
1727
|
closeTag: (e) => {
|
|
1728
1728
|
let t = e.getSource();
|
|
1729
1729
|
if (!t?.rule) return;
|
|
1730
|
-
let n =
|
|
1730
|
+
let n = te(t.rule, o);
|
|
1731
1731
|
n && (e.getAttribute("allowBlank", X) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
1732
1732
|
}
|
|
1733
1733
|
};
|
|
@@ -1736,14 +1736,14 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1736
1736
|
to: {},
|
|
1737
1737
|
text: (e, t) => {
|
|
1738
1738
|
let n = t.getParent().rule;
|
|
1739
|
-
n?.type && (n.formula1 =
|
|
1739
|
+
n?.type && (n.formula1 = T(p(e), n.type));
|
|
1740
1740
|
}
|
|
1741
1741
|
}), l.registerVisitor({
|
|
1742
1742
|
from: "formula2",
|
|
1743
1743
|
to: {},
|
|
1744
1744
|
text: (e, t) => {
|
|
1745
1745
|
let n = t.getParent().rule;
|
|
1746
|
-
n?.type && (n.formula2 =
|
|
1746
|
+
n?.type && (n.formula2 = T(p(e), n.type));
|
|
1747
1747
|
}
|
|
1748
1748
|
}), l.registerVisitor({
|
|
1749
1749
|
from: "picture",
|
|
@@ -1755,7 +1755,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1755
1755
|
e.getSource().resId = r;
|
|
1756
1756
|
}
|
|
1757
1757
|
});
|
|
1758
|
-
let
|
|
1758
|
+
let S = {
|
|
1759
1759
|
from: "slicer",
|
|
1760
1760
|
to: {},
|
|
1761
1761
|
openTag: (e) => {
|
|
@@ -1767,8 +1767,8 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1767
1767
|
for (let e of a) i.slicers[e] = r[e];
|
|
1768
1768
|
}
|
|
1769
1769
|
};
|
|
1770
|
-
l.registerVisitor(
|
|
1771
|
-
let
|
|
1770
|
+
l.registerVisitor(S);
|
|
1771
|
+
let C = (e, t) => ({
|
|
1772
1772
|
from: e,
|
|
1773
1773
|
to: {},
|
|
1774
1774
|
openTag: (e) => {
|
|
@@ -1780,8 +1780,8 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1780
1780
|
closeTag: (e) => {
|
|
1781
1781
|
t(String(e.getSource() ?? ""), e);
|
|
1782
1782
|
}
|
|
1783
|
-
}),
|
|
1784
|
-
|
|
1783
|
+
}), le = /* @__PURE__ */ new Map();
|
|
1784
|
+
le.set("dataValidations", {
|
|
1785
1785
|
from: "dataValidations",
|
|
1786
1786
|
to: "validations",
|
|
1787
1787
|
openTag: (e) => {
|
|
@@ -1791,7 +1791,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1791
1791
|
closeTag: (e) => {
|
|
1792
1792
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
1793
1793
|
}
|
|
1794
|
-
}),
|
|
1794
|
+
}), le.set("dataValidation", {
|
|
1795
1795
|
...oe,
|
|
1796
1796
|
closeTag: (e) => {
|
|
1797
1797
|
oe.closeTag(e);
|
|
@@ -1809,10 +1809,10 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1809
1809
|
});
|
|
1810
1810
|
}
|
|
1811
1811
|
});
|
|
1812
|
-
|
|
1812
|
+
le.set("formula1", D("formula1")), le.set("formula2", D("formula2")), le.set("f", C("f", (e, t) => {
|
|
1813
1813
|
let n = t.getParent(), r = n?.rule;
|
|
1814
|
-
r && (r[n.key] =
|
|
1815
|
-
})),
|
|
1814
|
+
r && (r[n.key] = T(p(e), r.type));
|
|
1815
|
+
})), le.set("sqref", C("sqref", (e, t) => {
|
|
1816
1816
|
let n = t.getParent(), r = e.trim();
|
|
1817
1817
|
n && r && (n.r = r.split(/\s+/).join(","));
|
|
1818
1818
|
}));
|
|
@@ -1843,7 +1843,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1843
1843
|
let t = e.getSource();
|
|
1844
1844
|
t && e.getParent()?.rules?.push(t);
|
|
1845
1845
|
}
|
|
1846
|
-
}), O.set("sqref",
|
|
1846
|
+
}), O.set("sqref", C("sqref", (e, t) => {
|
|
1847
1847
|
let n = t.getParent(), r = e.trim();
|
|
1848
1848
|
n && r && (n.sqref = r);
|
|
1849
1849
|
})), O.set("dataBar", {
|
|
@@ -1865,25 +1865,25 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1865
1865
|
e.getParent().iconSet = e.getSource();
|
|
1866
1866
|
}
|
|
1867
1867
|
});
|
|
1868
|
-
let
|
|
1869
|
-
|
|
1868
|
+
let fe = /* @__PURE__ */ new Map();
|
|
1869
|
+
fe.set("f", C("f", (e, t) => {
|
|
1870
1870
|
let n = t.getParent();
|
|
1871
1871
|
if (!n) return;
|
|
1872
1872
|
let r = e.trim(), i = Number(r);
|
|
1873
|
-
n.value = r.length > 0 && Number.isFinite(i) ? i :
|
|
1873
|
+
n.value = r.length > 0 && Number.isFinite(i) ? i : p(e);
|
|
1874
1874
|
})), O.set("cfvo", {
|
|
1875
1875
|
from: "cfvo",
|
|
1876
1876
|
to: {},
|
|
1877
|
-
scope: () =>
|
|
1877
|
+
scope: () => fe,
|
|
1878
1878
|
openTag: (e) => {
|
|
1879
1879
|
let t = e.getParent();
|
|
1880
1880
|
t.conditions ||= [];
|
|
1881
1881
|
let n = e.getSource();
|
|
1882
1882
|
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", X) && (n.exclusive = !0);
|
|
1883
1883
|
}
|
|
1884
|
-
}), O.set("f",
|
|
1884
|
+
}), O.set("f", C("f", (e, t) => {
|
|
1885
1885
|
let n = t.getParent();
|
|
1886
|
-
n && (n.formulas ??= []).push(
|
|
1886
|
+
n && (n.formulas ??= []).push(p(e));
|
|
1887
1887
|
})), O.set("dxf", {
|
|
1888
1888
|
from: "dxf",
|
|
1889
1889
|
to: {},
|
|
@@ -1896,7 +1896,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1896
1896
|
n && (t.style = n);
|
|
1897
1897
|
}
|
|
1898
1898
|
});
|
|
1899
|
-
let
|
|
1899
|
+
let A = (e) => ({
|
|
1900
1900
|
from: e,
|
|
1901
1901
|
to: {},
|
|
1902
1902
|
openTag: (t) => {
|
|
@@ -1904,7 +1904,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1904
1904
|
n && (t.getParent()[e] = n);
|
|
1905
1905
|
}
|
|
1906
1906
|
});
|
|
1907
|
-
O.set("borderColor",
|
|
1907
|
+
O.set("borderColor", A("borderColor")), O.set("negativeFillColor", A("negativeFillColor")), O.set("negativeBorderColor", A("negativeBorderColor")), O.set("axisColor", A("axisColor")), O.set("cfIcon", {
|
|
1908
1908
|
from: "cfIcon",
|
|
1909
1909
|
to: {},
|
|
1910
1910
|
openTag: (e) => {
|
|
@@ -1918,7 +1918,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1918
1918
|
}
|
|
1919
1919
|
});
|
|
1920
1920
|
let pe = /* @__PURE__ */ new Map();
|
|
1921
|
-
pe.set("id",
|
|
1921
|
+
pe.set("id", C("id", (e, t) => {
|
|
1922
1922
|
let n = t.getParent(), r = e.trim();
|
|
1923
1923
|
n && r && (n.x14Id = r);
|
|
1924
1924
|
}));
|
|
@@ -1926,14 +1926,14 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1926
1926
|
me.set("slicerList", {
|
|
1927
1927
|
from: "slicerList",
|
|
1928
1928
|
transparent: !0
|
|
1929
|
-
}), me.set("slicer",
|
|
1929
|
+
}), me.set("slicer", S);
|
|
1930
1930
|
let he = /* @__PURE__ */ new Map([
|
|
1931
|
-
[
|
|
1932
|
-
[
|
|
1933
|
-
[
|
|
1934
|
-
[
|
|
1935
|
-
[
|
|
1936
|
-
[
|
|
1931
|
+
[v(y), le],
|
|
1932
|
+
[v(u), O],
|
|
1933
|
+
[v(t), O],
|
|
1934
|
+
[v(ee), pe],
|
|
1935
|
+
[v(w), me],
|
|
1936
|
+
[v(ae), me]
|
|
1937
1937
|
]), ge = /* @__PURE__ */ new Set();
|
|
1938
1938
|
l.registerVisitor({
|
|
1939
1939
|
from: "extLst",
|
|
@@ -1942,11 +1942,11 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1942
1942
|
from: "ext",
|
|
1943
1943
|
transparent: !0,
|
|
1944
1944
|
scope: (e) => {
|
|
1945
|
-
let t = e.getAttribute("uri"), n =
|
|
1945
|
+
let t = e.getAttribute("uri"), n = v(t), r = he.get(n);
|
|
1946
1946
|
if (r) return r;
|
|
1947
|
-
if (!
|
|
1947
|
+
if (!g.has(n) && !ge.has(n)) {
|
|
1948
1948
|
ge.add(n);
|
|
1949
|
-
let r =
|
|
1949
|
+
let r = x[n];
|
|
1950
1950
|
e.warn(r ? `Extension content '${r}' (${t}) is not read; it will be lost on resave.` : `Unknown extension content (uri ${t}) is not read; it will be lost on resave.`);
|
|
1951
1951
|
}
|
|
1952
1952
|
return null;
|
|
@@ -2007,14 +2007,14 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2007
2007
|
e.setSource(n(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2008
2008
|
}
|
|
2009
2009
|
});
|
|
2010
|
-
let
|
|
2010
|
+
let j = null, _e = !1, N = /* @__PURE__ */ new Map(), ve = {
|
|
2011
2011
|
from: "Fallback",
|
|
2012
2012
|
to: null
|
|
2013
|
-
},
|
|
2013
|
+
}, ye = {
|
|
2014
2014
|
from: "Choice",
|
|
2015
2015
|
transparent: !0
|
|
2016
2016
|
};
|
|
2017
|
-
|
|
2017
|
+
N.set("Fallback", ve), N.set("Choice", ye), N.set("control", {
|
|
2018
2018
|
from: "control",
|
|
2019
2019
|
transparent: !0,
|
|
2020
2020
|
openTag: (e) => {
|
|
@@ -2042,60 +2042,60 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2042
2042
|
json: t
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
|
-
o && (s.name = o),
|
|
2045
|
+
o && (s.content.name = o), j = {
|
|
2046
2046
|
movable: s,
|
|
2047
2047
|
control: t
|
|
2048
2048
|
};
|
|
2049
2049
|
},
|
|
2050
2050
|
closeTag: () => {
|
|
2051
|
-
|
|
2051
|
+
j &&= (e.movables ||= [], e.movables.push(j.movable), null);
|
|
2052
2052
|
}
|
|
2053
|
-
}),
|
|
2053
|
+
}), N.set("controlPr", {
|
|
2054
2054
|
from: "controlPr",
|
|
2055
2055
|
transparent: !0,
|
|
2056
2056
|
raw: !0,
|
|
2057
2057
|
openTag: (e) => {
|
|
2058
|
-
if (!
|
|
2058
|
+
if (!j) return;
|
|
2059
2059
|
let t = e.getFrom().attributes ?? {}, n = {};
|
|
2060
2060
|
for (let e in t) {
|
|
2061
2061
|
let r = t[e];
|
|
2062
2062
|
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2063
2063
|
}
|
|
2064
|
-
Object.keys(n).length > 0 && (
|
|
2064
|
+
Object.keys(n).length > 0 && (j.control.props = n);
|
|
2065
2065
|
},
|
|
2066
2066
|
closeTag: (e) => {
|
|
2067
|
-
if (!
|
|
2067
|
+
if (!j) return;
|
|
2068
2068
|
let t = ((e) => {
|
|
2069
2069
|
let t = /<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);
|
|
2070
2070
|
if (!t) return null;
|
|
2071
2071
|
let n = t[2], r = (e) => RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${e}>`).exec(n)?.[1], i = t[1], a = /\bmoveWithCells="(?:1|true)"/.test(i), o = /\bsizeWithCells="(?:1|true)"/.test(i);
|
|
2072
2072
|
return {
|
|
2073
2073
|
anchor: {
|
|
2074
|
-
tl:
|
|
2075
|
-
br:
|
|
2074
|
+
tl: kt(r("from")),
|
|
2075
|
+
br: kt(r("to"))
|
|
2076
2076
|
},
|
|
2077
2077
|
anchorType: a ? o ? "twoCell" : "oneCell" : "absolute",
|
|
2078
2078
|
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2079
2079
|
};
|
|
2080
2080
|
})(e.getRawXml() ?? "");
|
|
2081
|
-
t ? (
|
|
2081
|
+
t ? (j.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (j.movable.anchorType = t.anchorType), t.rest && (j.control.xml = t.rest)) : _e || (_e = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2082
2082
|
}
|
|
2083
2083
|
});
|
|
2084
|
-
let
|
|
2084
|
+
let be = {
|
|
2085
2085
|
from: "controls",
|
|
2086
2086
|
transparent: !0,
|
|
2087
|
-
scope: () =>
|
|
2087
|
+
scope: () => N
|
|
2088
2088
|
};
|
|
2089
|
-
l.registerVisitor(
|
|
2090
|
-
let
|
|
2091
|
-
["Choice",
|
|
2092
|
-
["Fallback",
|
|
2093
|
-
["controls",
|
|
2089
|
+
l.registerVisitor(be);
|
|
2090
|
+
let xe = /* @__PURE__ */ new Map([
|
|
2091
|
+
["Choice", ye],
|
|
2092
|
+
["Fallback", ve],
|
|
2093
|
+
["controls", be]
|
|
2094
2094
|
]);
|
|
2095
2095
|
l.registerVisitor({
|
|
2096
2096
|
from: "AlternateContent",
|
|
2097
2097
|
transparent: !0,
|
|
2098
|
-
scope: () =>
|
|
2098
|
+
scope: () => xe
|
|
2099
2099
|
}), l.registerVisitor({
|
|
2100
2100
|
from: "tableParts",
|
|
2101
2101
|
to: "tables",
|
|
@@ -2112,26 +2112,26 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2112
2112
|
r ? e.setSource(r) : e.warn("A table part is missing; the table was not imported.", { onceKey: "xlsx.sheet.table.missing" });
|
|
2113
2113
|
}
|
|
2114
2114
|
});
|
|
2115
|
-
let
|
|
2116
|
-
t.conditions?.length && (e.stops =
|
|
2117
|
-
},
|
|
2118
|
-
t.conditions?.length && (e.stops =
|
|
2119
|
-
},
|
|
2115
|
+
let Se = (e, t) => {
|
|
2116
|
+
t.conditions?.length && (e.stops = re(t)), t.minLength !== void 0 && (e.minLength = t.minLength), t.maxLength !== void 0 && (e.maxLength = t.maxLength), (t.gradient ?? 1) && (e.gradient = !0), t.border && t.borderColor && (e.borderColor = t.borderColor), !t.negativeBarColorSameAsPositive && t.negativeFillColor && (e.negativeFillColor = t.negativeFillColor), !(t.negativeBarBorderColorSameAsPositive ?? 1) && t.negativeBorderColor && (e.negativeBorderColor = t.negativeBorderColor), t.axisColor && (e.axisColor = t.axisColor), t.axisPosition !== "middle" && t.axisPosition !== "none" || (e.axisPosition = t.axisPosition), t.direction !== "leftToRight" && t.direction !== "rightToLeft" || (e.direction = t.direction);
|
|
2117
|
+
}, Ce = (e, t) => {
|
|
2118
|
+
t.conditions?.length && (e.stops = re(t)), t.iconSet && t.iconSet !== e.iconSet && (e.iconSet = t.iconSet), t.icons?.length && (e.icon = t.icons), t.reverse !== void 0 && (e.reverse = t.reverse), t.showValue !== void 0 && (e.showValue = t.showValue);
|
|
2119
|
+
}, Te = (e) => {
|
|
2120
2120
|
if (!e.sqref) return null;
|
|
2121
2121
|
let t = e.sqref.split(/\s+/).join(",");
|
|
2122
2122
|
if (e.type === "iconSet") {
|
|
2123
2123
|
if (!e.iconSet) return null;
|
|
2124
2124
|
let n = {
|
|
2125
|
-
type:
|
|
2125
|
+
type: F.ScaleType.IconSet,
|
|
2126
2126
|
stops: []
|
|
2127
2127
|
};
|
|
2128
|
-
return
|
|
2128
|
+
return Ce(n, e.iconSet), {
|
|
2129
2129
|
r: t,
|
|
2130
2130
|
v: { scale: n },
|
|
2131
2131
|
priority: e.priority
|
|
2132
2132
|
};
|
|
2133
2133
|
}
|
|
2134
|
-
let n =
|
|
2134
|
+
let n = h(e, o);
|
|
2135
2135
|
if (!n) return null;
|
|
2136
2136
|
let r = { condition: n };
|
|
2137
2137
|
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
@@ -2154,11 +2154,11 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2154
2154
|
if (!i) continue;
|
|
2155
2155
|
ue.delete(r);
|
|
2156
2156
|
let a = t.v?.scale;
|
|
2157
|
-
i.dataBar && a?.type ===
|
|
2157
|
+
i.dataBar && a?.type === F.ScaleType.DataBar ? Se(a, i.dataBar) : i.iconSet && a?.type === F.ScaleType.IconSet && Ce(a, i.iconSet);
|
|
2158
2158
|
}
|
|
2159
2159
|
let r = [...ue.values(), ...de], i = /* @__PURE__ */ new Set(), a = 0;
|
|
2160
2160
|
for (let e = 0; e < r.length; e++) {
|
|
2161
|
-
let o =
|
|
2161
|
+
let o = Te(r[e]);
|
|
2162
2162
|
o ? (n || (n = [], t.conditionals = n), n.push(o)) : (i.add(r[e].type ?? "unknown"), a++);
|
|
2163
2163
|
}
|
|
2164
2164
|
if (a > 0) {
|
|
@@ -2196,9 +2196,9 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2196
2196
|
to: "protection",
|
|
2197
2197
|
openTag: (e) => {
|
|
2198
2198
|
let t = e.getSource();
|
|
2199
|
-
for (let n of
|
|
2199
|
+
for (let n of se) {
|
|
2200
2200
|
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2201
|
-
t[n.key] =
|
|
2201
|
+
t[n.key] = _(n, r);
|
|
2202
2202
|
}
|
|
2203
2203
|
if (t.sheet) return;
|
|
2204
2204
|
let n = {};
|
|
@@ -2247,7 +2247,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2247
2247
|
to: [],
|
|
2248
2248
|
openTag: (e) => {
|
|
2249
2249
|
let t = e.getSource(), n = e.getAttribute("min"), r = e.getAttribute("max"), i = n === void 0 ? 0 : parseInt(n) - 1, a = r === void 0 ? i : parseInt(r) - 1;
|
|
2250
|
-
t.r =
|
|
2250
|
+
t.r = M.runToString(i, a, !0);
|
|
2251
2251
|
let o = {};
|
|
2252
2252
|
t.v = o, e.copyToObject(o, "sz", Q, "width"), e.copyToObject(o, "csz", X, "customWidth"), e.copyToObject(o, "h", X, "hidden"), e.copyToObject(o, "l", Z, "outlineLevel"), e.copyToObject(o, "s", Z, "style");
|
|
2253
2253
|
}
|
|
@@ -2258,31 +2258,31 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2258
2258
|
e.warn("'OLE Objects' are not supported.");
|
|
2259
2259
|
}
|
|
2260
2260
|
});
|
|
2261
|
-
let
|
|
2261
|
+
let I = !1, L = !1, R = 0, Ee = "", De = (e) => {
|
|
2262
2262
|
let t = e.indexOf(":");
|
|
2263
2263
|
return t === -1 ? e : e.slice(t + 1);
|
|
2264
2264
|
};
|
|
2265
|
-
return
|
|
2265
|
+
return Ft(m, e, l.createEventHandler(e, a, o), o, s, {
|
|
2266
2266
|
onOpenTag: (e) => {
|
|
2267
|
-
|
|
2267
|
+
I = !0;
|
|
2268
2268
|
let t = De(e.name);
|
|
2269
|
-
t === "t" || t === "v" ? R === 0 && (
|
|
2269
|
+
t === "t" || t === "v" ? R === 0 && (L = !0) : t !== "rPh" && t !== "phoneticPr" || R++;
|
|
2270
2270
|
},
|
|
2271
2271
|
onText: (e) => {
|
|
2272
|
-
|
|
2272
|
+
L && (Ee += e);
|
|
2273
2273
|
},
|
|
2274
2274
|
onCloseTag: (e) => {
|
|
2275
2275
|
let t = De(e.name);
|
|
2276
|
-
t === "t" || t === "v" ?
|
|
2276
|
+
t === "t" || t === "v" ? L = !1 : t !== "rPh" && t !== "phoneticPr" || R > 0 && R--;
|
|
2277
2277
|
},
|
|
2278
2278
|
onEnd: () => {
|
|
2279
|
-
if (!
|
|
2280
|
-
let e = r(
|
|
2281
|
-
return
|
|
2279
|
+
if (!I) return;
|
|
2280
|
+
let e = r(ce(Ee));
|
|
2281
|
+
return I = !1, L = !1, R = 0, Ee = "", e;
|
|
2282
2282
|
},
|
|
2283
2283
|
onError: (e) => {}
|
|
2284
2284
|
}, c);
|
|
2285
|
-
},
|
|
2285
|
+
}, Mt = class {
|
|
2286
2286
|
static {
|
|
2287
2287
|
this.Collapsed = 1;
|
|
2288
2288
|
}
|
|
@@ -2319,17 +2319,17 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2319
2319
|
static {
|
|
2320
2320
|
this.ThickTop = 2048;
|
|
2321
2321
|
}
|
|
2322
|
-
},
|
|
2322
|
+
}, Nt = (e, t, n) => {
|
|
2323
2323
|
if (e[0].value[0] === e[1].value[0]) return t;
|
|
2324
|
-
},
|
|
2324
|
+
}, Pt = {
|
|
2325
2325
|
colStart: 0,
|
|
2326
2326
|
colEnd: 0,
|
|
2327
2327
|
rowStart: 0,
|
|
2328
2328
|
rowEnd: 0
|
|
2329
|
-
},
|
|
2330
|
-
let s = !1, c = !1, l = [], u = !1, d = null, f = null, p = null, m = null, ee = null, h = null, g = o?.get("richData") ??
|
|
2329
|
+
}, Ft = (e, t, n, r, i, a, o) => {
|
|
2330
|
+
let s = !1, c = !1, l = [], u = !1, d = null, f = null, p = null, m = null, ee = null, h = null, g = o?.get("richData") ?? _e.EmptyArray, _ = o?.get("dummyWrapped") ?? null, v = M.normalizeA1ToR1C1, y = N.createConflatingRanges(), te = /* @__PURE__ */ new Map(), ne = [], b = !1, re = !1, ie = null, ae = !1, oe = N.createConflatingRanges(), x = !1, S = -1, C = -1, w = null, T = null, se = null, ce = [], E = null, le = -2, D = 0, ue = "", de = "", O = "", fe = "", k = "", A = "", pe = "", me = "", he = "", ge = "", j = "", P = "", F = "", be = "", xe = !0, Se = null, Ce = !1, we = !1, Te = !1, I = null, L = 0, R = (e) => {
|
|
2331
2331
|
let r = e.name, p = r.indexOf(":");
|
|
2332
|
-
if (p !== -1 && (r = r.slice(p + 1)),
|
|
2332
|
+
if (p !== -1 && (r = r.slice(p + 1)), L++, L % 196608 == 0 && i?.(L), T) {
|
|
2333
2333
|
let t = e.attributes;
|
|
2334
2334
|
switch (r) {
|
|
2335
2335
|
case "v":
|
|
@@ -2352,29 +2352,29 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2352
2352
|
e !== void 0 && (ae = e === "1");
|
|
2353
2353
|
break;
|
|
2354
2354
|
case "is":
|
|
2355
|
-
|
|
2355
|
+
x = !0;
|
|
2356
2356
|
return;
|
|
2357
2357
|
}
|
|
2358
|
-
|
|
2358
|
+
x && !u && a?.onOpenTag?.(e);
|
|
2359
2359
|
return;
|
|
2360
2360
|
}
|
|
2361
2361
|
if (s) {
|
|
2362
2362
|
if (r === "c") {
|
|
2363
|
-
|
|
2363
|
+
T = e;
|
|
2364
2364
|
let t = e.attributes, n = t.r;
|
|
2365
|
-
|
|
2365
|
+
C = M.fastStringToCol(n);
|
|
2366
2366
|
let r = t.t;
|
|
2367
|
-
r === void 0 ?
|
|
2367
|
+
r === void 0 ? se = null : (se = r, se === "str" && (x = !0));
|
|
2368
2368
|
let i = t.s;
|
|
2369
|
-
i === void 0 && (
|
|
2370
|
-
colStart:
|
|
2371
|
-
rowStart:
|
|
2372
|
-
colEnd:
|
|
2373
|
-
rowEnd:
|
|
2369
|
+
i === void 0 && (I !== null || Te) && (i = "0"), i !== void 0 && (i = parseInt(i), Se && Se.value === i && Se.colEnd + 1 === C ? Se.colEnd = C : (Se = {
|
|
2370
|
+
colStart: C,
|
|
2371
|
+
rowStart: S,
|
|
2372
|
+
colEnd: C,
|
|
2373
|
+
rowEnd: S,
|
|
2374
2374
|
value: i
|
|
2375
|
-
}, l.push(
|
|
2375
|
+
}, l.push(Se))), ie = null, re = !1;
|
|
2376
2376
|
let a = t.cm;
|
|
2377
|
-
|
|
2377
|
+
b = a !== void 0 && ((e) => {
|
|
2378
2378
|
let t = o?.get("metadata")?.cells;
|
|
2379
2379
|
if (!t) return !1;
|
|
2380
2380
|
let n = parseInt(e, 10);
|
|
@@ -2385,76 +2385,76 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2385
2385
|
let e = g[parseInt(s) - 1];
|
|
2386
2386
|
if (ve.isError(e)) {
|
|
2387
2387
|
let t = e.getCode();
|
|
2388
|
-
|
|
2388
|
+
w = {
|
|
2389
2389
|
t: "e",
|
|
2390
2390
|
v: t
|
|
2391
|
-
},
|
|
2391
|
+
}, b && t === ve.Code.Spill && (re = !0);
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
2395
|
} else {
|
|
2396
|
-
if (
|
|
2396
|
+
if (we && r === "row") {
|
|
2397
2397
|
s = !0;
|
|
2398
2398
|
let t = e.attributes.r;
|
|
2399
|
-
if (
|
|
2400
|
-
let e = de !== void 0 && (de === "1" || de === "true"), t =
|
|
2401
|
-
|
|
2402
|
-
min:
|
|
2403
|
-
max:
|
|
2399
|
+
if (S = parseInt(t) - 1, D = 0, de = e.attributes.customHeight, de !== void 0 && (D |= Mt.CustomHeight), de !== he && (xe = !0, he = de), ue = e.attributes.ht, ue !== void 0 && (D |= Mt.Ht), ue !== me && (xe = !0, me = ue), O = e.attributes.hidden, O !== void 0 && (D |= Mt.Hidden), O !== ge && (xe = !0, ge = O), k = e.attributes.s, k !== void 0 && (D |= Mt.S), k !== P && (xe = !0, P = k), fe = e.attributes.customFormat, fe !== void 0 && (D |= Mt.CustomFormat), fe !== j && (xe = !0, j = fe), A = e.attributes.outlineLevel, A !== void 0 && (D |= Mt.OutlineLevel), A !== F && (xe = !0, F = A), pe = e.attributes.collapsed, pe !== void 0 && (D |= Mt.Collapsed), pe !== be && (xe = !0, be = pe), D !== 0) if (le + 1 !== S || xe) {
|
|
2400
|
+
let e = de !== void 0 && (de === "1" || de === "true"), t = fe !== void 0 && (fe === "1" || fe === "true");
|
|
2401
|
+
I = t && k !== void 0 ? k : null, t && I === null && (I = "0"), E = {
|
|
2402
|
+
min: S,
|
|
2403
|
+
max: S,
|
|
2404
2404
|
value: {
|
|
2405
2405
|
sz: ue === void 0 ? -1 : parseFloat(ue),
|
|
2406
2406
|
csz: e,
|
|
2407
2407
|
h: O !== void 0 && (O === "1" || O === "true"),
|
|
2408
|
-
s:
|
|
2409
|
-
l:
|
|
2408
|
+
s: I === null ? void 0 : I === "0" ? 0 : parseInt(I),
|
|
2409
|
+
l: A === void 0 || A === "0" ? 0 : parseInt(A),
|
|
2410
2410
|
cl: pe !== void 0 && (pe === "1" || pe === "true")
|
|
2411
2411
|
}
|
|
2412
|
-
},
|
|
2413
|
-
} else
|
|
2414
|
-
|
|
2412
|
+
}, ce.push(E);
|
|
2413
|
+
} else E.max = S;
|
|
2414
|
+
le = S, xe = !1;
|
|
2415
2415
|
return;
|
|
2416
2416
|
}
|
|
2417
|
-
if (r === "sheetData" && (
|
|
2417
|
+
if (r === "sheetData" && (we = !0), !Ce && r === "sheetData") {
|
|
2418
2418
|
Ce = !0;
|
|
2419
2419
|
let e = t.cols, n = e ? e.length : 0;
|
|
2420
|
-
for (let t = 0; !
|
|
2420
|
+
for (let t = 0; !Te && t < n; t++) e[t].v.s && (Te = !0);
|
|
2421
2421
|
}
|
|
2422
2422
|
n?.onOpenTag?.(e);
|
|
2423
2423
|
}
|
|
2424
2424
|
}, Ee = (t) => {
|
|
2425
2425
|
let r = t.name;
|
|
2426
|
-
if (r === "sheetData" && (
|
|
2426
|
+
if (r === "sheetData" && (we = !1), !u || r !== "c" && r !== "f" || (d && (m = te.get(d) ?? null), m && (y.append(S, C, m), ae && oe.append(S, C)), ie !== null && ne.push([ie, b ? re ? "error" : "dynamic" : "fixed"]), u = !1, m = null, d = null, f = null, c = !1, ae = !1, ie = null, b = !1, re = !1), T) {
|
|
2427
2427
|
let n = r.indexOf(":");
|
|
2428
|
-
if (n !== -1 && (r = r.slice(n + 1)),
|
|
2428
|
+
if (n !== -1 && (r = r.slice(n + 1)), x) if (r === "is" || r === "v") {
|
|
2429
2429
|
let t = a?.onEnd?.();
|
|
2430
|
-
t != null && e.pushAt(
|
|
2430
|
+
t != null && e.pushAt(S, C, "" + t);
|
|
2431
2431
|
} else r !== "f" && a?.onCloseTag?.(t);
|
|
2432
|
-
c &&= !1, r === "c" && (
|
|
2432
|
+
c &&= !1, r === "c" && (T = null, x = !1);
|
|
2433
2433
|
return;
|
|
2434
2434
|
}
|
|
2435
|
-
if (s) return s = !1, void (
|
|
2435
|
+
if (s) return s = !1, void (Se = null);
|
|
2436
2436
|
n?.onCloseTag?.(t);
|
|
2437
2437
|
}, De = (i) => {
|
|
2438
2438
|
let o = i.trim();
|
|
2439
2439
|
if (c) {
|
|
2440
|
-
switch (
|
|
2440
|
+
switch (w = null, se) {
|
|
2441
2441
|
case null:
|
|
2442
2442
|
case "n":
|
|
2443
|
-
|
|
2443
|
+
w = parseFloat(o);
|
|
2444
2444
|
break;
|
|
2445
2445
|
case "b":
|
|
2446
|
-
|
|
2446
|
+
w = o === "1" || o === "true";
|
|
2447
2447
|
break;
|
|
2448
2448
|
case "s":
|
|
2449
|
-
|
|
2449
|
+
w = o;
|
|
2450
2450
|
break;
|
|
2451
2451
|
case "e":
|
|
2452
2452
|
if (o === "#VALUE!") {
|
|
2453
|
-
let e =
|
|
2453
|
+
let e = T.attributes.vm;
|
|
2454
2454
|
if (e !== void 0) {
|
|
2455
2455
|
let t = g[parseInt(e) - 1];
|
|
2456
2456
|
if (ve.isError(t)) {
|
|
2457
|
-
|
|
2457
|
+
w = {
|
|
2458
2458
|
t: "e",
|
|
2459
2459
|
v: t.getCode()
|
|
2460
2460
|
};
|
|
@@ -2463,29 +2463,29 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
2465
|
let e = ve.getBuiltInByLabel(o);
|
|
2466
|
-
e ?
|
|
2466
|
+
e ? w = {
|
|
2467
2467
|
t: "e",
|
|
2468
2468
|
v: e.getCode()
|
|
2469
|
-
} : (
|
|
2470
|
-
colIndex:
|
|
2471
|
-
rowIndex:
|
|
2469
|
+
} : (w = o, r?.(`Unknown formula error '${o}' in cell ${M.cellToString({
|
|
2470
|
+
colIndex: C,
|
|
2471
|
+
rowIndex: S
|
|
2472
2472
|
})}`));
|
|
2473
2473
|
break;
|
|
2474
2474
|
case "str":
|
|
2475
|
-
case "inlineStr":
|
|
2475
|
+
case "inlineStr": x = !0;
|
|
2476
2476
|
}
|
|
2477
|
-
|
|
2477
|
+
w !== null && e.pushAt(S, C, w);
|
|
2478
2478
|
}
|
|
2479
2479
|
if (d) {
|
|
2480
2480
|
if (ee === d) m = h;
|
|
2481
2481
|
else {
|
|
2482
|
-
if (m =
|
|
2482
|
+
if (m = te.get(d) ?? null, !m) {
|
|
2483
2483
|
let e = [];
|
|
2484
|
-
p = v(o,
|
|
2484
|
+
p = v(o, S, C, e), m = [
|
|
2485
2485
|
p,
|
|
2486
2486
|
e,
|
|
2487
2487
|
o
|
|
2488
|
-
],
|
|
2488
|
+
], te.set(d, m);
|
|
2489
2489
|
}
|
|
2490
2490
|
ee = d, h = m;
|
|
2491
2491
|
}
|
|
@@ -2494,30 +2494,30 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2494
2494
|
if (u) {
|
|
2495
2495
|
if (_ !== null) {
|
|
2496
2496
|
let e = ((e) => {
|
|
2497
|
-
if (e.length <
|
|
2498
|
-
let t =
|
|
2499
|
-
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return
|
|
2497
|
+
if (e.length < St.length || e.slice(0, St.length).toUpperCase() !== Ct) return Tt;
|
|
2498
|
+
let t = Dt(e, St.length);
|
|
2499
|
+
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return Tt;
|
|
2500
2500
|
let n = t.value;
|
|
2501
|
-
return n.toUpperCase() ===
|
|
2501
|
+
return n.toUpperCase() === wt ? Et : n.length === 0 ? Tt : {
|
|
2502
2502
|
kind: "formula",
|
|
2503
2503
|
formula: n
|
|
2504
2504
|
};
|
|
2505
2505
|
})(o);
|
|
2506
2506
|
e.kind !== "none" && _.push({
|
|
2507
2507
|
sheet: t,
|
|
2508
|
-
rowIndex:
|
|
2509
|
-
colIndex:
|
|
2508
|
+
rowIndex: S,
|
|
2509
|
+
colIndex: C,
|
|
2510
2510
|
formula: e.kind === "formula" ? e.formula : null
|
|
2511
2511
|
});
|
|
2512
2512
|
}
|
|
2513
2513
|
let e = [];
|
|
2514
|
-
p = v(o,
|
|
2514
|
+
p = v(o, S, C, e), m = [
|
|
2515
2515
|
p,
|
|
2516
2516
|
e,
|
|
2517
2517
|
o
|
|
2518
2518
|
];
|
|
2519
2519
|
}
|
|
2520
|
-
|
|
2520
|
+
x ? a?.onText?.(i) : s || n?.onText?.(o);
|
|
2521
2521
|
}, z = {
|
|
2522
2522
|
r: void 0,
|
|
2523
2523
|
t: void 0,
|
|
@@ -2554,27 +2554,27 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2554
2554
|
name: "row",
|
|
2555
2555
|
attributes: H,
|
|
2556
2556
|
isSelfClosing: !1
|
|
2557
|
-
},
|
|
2557
|
+
}, U = vt.NEED_MORE, W = vt.NOT_HANDLED, je = vt.decodeText, Me = !1, Ne = (e, t, n, r) => {
|
|
2558
2558
|
for (;;) {
|
|
2559
2559
|
let i = 0;
|
|
2560
2560
|
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
2561
|
-
if (t >= n) return
|
|
2562
|
-
if (i === 62) return
|
|
2563
|
-
if (i === 47) return t + 1 >= n ?
|
|
2561
|
+
if (t >= n) return U;
|
|
2562
|
+
if (i === 62) return Me = !1, t + 1;
|
|
2563
|
+
if (i === 47) return t + 1 >= n ? U : e.charCodeAt(t + 1) === 62 ? (Me = !0, t + 2) : W;
|
|
2564
2564
|
let a = t;
|
|
2565
2565
|
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
2566
|
-
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return
|
|
2566
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return W;
|
|
2567
2567
|
t++;
|
|
2568
2568
|
}
|
|
2569
|
-
if (t + 1 >= n) return
|
|
2569
|
+
if (t + 1 >= n) return U;
|
|
2570
2570
|
let o = t - a, s = e.charCodeAt(t + 1);
|
|
2571
|
-
if (s !== 34 && s !== 39) return
|
|
2571
|
+
if (s !== 34 && s !== 39) return W;
|
|
2572
2572
|
let c = t + 2, l = c;
|
|
2573
2573
|
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
2574
|
-
if (i === 38 || i < 32) return
|
|
2574
|
+
if (i === 38 || i < 32) return W;
|
|
2575
2575
|
l++;
|
|
2576
2576
|
}
|
|
2577
|
-
if (l >= n) return
|
|
2577
|
+
if (l >= n) return U;
|
|
2578
2578
|
t = l + 1;
|
|
2579
2579
|
let u = e.charCodeAt(a);
|
|
2580
2580
|
if (r === 2) switch (o) {
|
|
@@ -2603,13 +2603,13 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2603
2603
|
return {
|
|
2604
2604
|
...n,
|
|
2605
2605
|
onEnd: () => {
|
|
2606
|
-
|
|
2607
|
-
let r = y.done(
|
|
2606
|
+
ce.length > 0 && (t.rows = M.runsToRefs(ce, !1));
|
|
2607
|
+
let r = y.done(Nt), i = r.length;
|
|
2608
2608
|
if (i > 0) {
|
|
2609
2609
|
let e = Array(i);
|
|
2610
2610
|
for (let t = 0; t < i; t++) {
|
|
2611
|
-
let n = r[t], i =
|
|
2612
|
-
e[t] = [i,
|
|
2611
|
+
let n = r[t], i = M.rangeToString(n), a = n.value[1];
|
|
2612
|
+
e[t] = [i, M.resolveRelativeToA1(a, n.rowStart, n.colStart)];
|
|
2613
2613
|
}
|
|
2614
2614
|
t.formulas = e;
|
|
2615
2615
|
}
|
|
@@ -2618,14 +2618,14 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2618
2618
|
let e = Array(o);
|
|
2619
2619
|
for (let t = 0; t < o; t++) {
|
|
2620
2620
|
let n = a[t];
|
|
2621
|
-
e[t] =
|
|
2621
|
+
e[t] = M.rangeToString(n);
|
|
2622
2622
|
}
|
|
2623
2623
|
t.volatile = e;
|
|
2624
2624
|
}
|
|
2625
|
-
|
|
2625
|
+
ne.length > 0 && (t.formulaArray = [...ne]);
|
|
2626
2626
|
let s = l.length;
|
|
2627
2627
|
if (s > 0) {
|
|
2628
|
-
l.sort(
|
|
2628
|
+
l.sort(N.createRangeComparator(ye.Axis.Column));
|
|
2629
2629
|
let e = l[0], n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value, o = [];
|
|
2630
2630
|
o.push(e);
|
|
2631
2631
|
let c = null;
|
|
@@ -2633,7 +2633,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2633
2633
|
let u = o.length, d = Array(u);
|
|
2634
2634
|
for (let e = 0; e < u; e++) {
|
|
2635
2635
|
let t = o[e];
|
|
2636
|
-
d[e] = [
|
|
2636
|
+
d[e] = [M.rangeToString(t), t.value];
|
|
2637
2637
|
}
|
|
2638
2638
|
t.directStyles = d;
|
|
2639
2639
|
}
|
|
@@ -2646,61 +2646,61 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2646
2646
|
elementScanners: [{
|
|
2647
2647
|
name: "c",
|
|
2648
2648
|
scan: (e, t, n) => {
|
|
2649
|
-
if (!s ||
|
|
2649
|
+
if (!s || T !== null) return W;
|
|
2650
2650
|
z.r = z.t = z.s = z.cm = z.vm = void 0;
|
|
2651
|
-
let r =
|
|
2651
|
+
let r = Ne(e, t + 2, n, 0);
|
|
2652
2652
|
if (r < 0) return r;
|
|
2653
2653
|
let i = z.t;
|
|
2654
|
-
if (z.r === void 0 || i === "str" || i === "inlineStr") return
|
|
2654
|
+
if (z.r === void 0 || i === "str" || i === "inlineStr") return W;
|
|
2655
2655
|
let a = !1, o = -1, c = -1, l = -1, u = -1, d = r;
|
|
2656
|
-
if (!
|
|
2656
|
+
if (!Me) for (B.t = B.si = B.ref = B.ca = void 0;;) {
|
|
2657
2657
|
let t = e.indexOf("<", r);
|
|
2658
|
-
if (t === -1 || t + 3 >= n) return
|
|
2658
|
+
if (t === -1 || t + 3 >= n) return U;
|
|
2659
2659
|
for (let n = r; n < t; n++) {
|
|
2660
2660
|
let t = e.charCodeAt(n);
|
|
2661
|
-
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return
|
|
2661
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return W;
|
|
2662
2662
|
}
|
|
2663
2663
|
let i = e.charCodeAt(t + 1), s = e.charCodeAt(t + 2);
|
|
2664
2664
|
if (i === 47) {
|
|
2665
|
-
if (!Pe(e, t, 99)) return
|
|
2665
|
+
if (!Pe(e, t, 99)) return W;
|
|
2666
2666
|
d = t + 4;
|
|
2667
2667
|
break;
|
|
2668
2668
|
}
|
|
2669
2669
|
if (i === 102 && !a && l === -1 && (s === 32 || s === 62 || s === 47)) {
|
|
2670
|
-
if (a = !0, r =
|
|
2671
|
-
if (
|
|
2670
|
+
if (a = !0, r = Ne(e, t + 2, n, 1), r < 0) return r;
|
|
2671
|
+
if (Me) continue;
|
|
2672
2672
|
let i = e.indexOf("<", r);
|
|
2673
|
-
if (i === -1 || i + 3 >= n) return
|
|
2674
|
-
if (!Pe(e, i, 102)) return
|
|
2673
|
+
if (i === -1 || i + 3 >= n) return U;
|
|
2674
|
+
if (!Pe(e, i, 102)) return W;
|
|
2675
2675
|
o = r, c = i, r = i + 4;
|
|
2676
2676
|
continue;
|
|
2677
2677
|
}
|
|
2678
2678
|
if (i === 118 && s === 62 && l === -1) {
|
|
2679
2679
|
let i = e.indexOf("<", t + 3);
|
|
2680
|
-
if (i === -1 || i + 3 >= n) return
|
|
2681
|
-
if (!Pe(e, i, 118)) return
|
|
2680
|
+
if (i === -1 || i + 3 >= n) return U;
|
|
2681
|
+
if (!Pe(e, i, 118)) return W;
|
|
2682
2682
|
l = t + 3, u = i, r = i + 4;
|
|
2683
2683
|
continue;
|
|
2684
2684
|
}
|
|
2685
|
-
return
|
|
2685
|
+
return W;
|
|
2686
2686
|
}
|
|
2687
|
-
return R(Oe), a && (R(ke), c > o && De(
|
|
2687
|
+
return R(Oe), a && (R(ke), c > o && De(je(e.slice(o, c))), Ee(ke)), l !== -1 && (R(V), u > l && De(je(e.slice(l, u))), Ee(V)), Ee(Oe), d;
|
|
2688
2688
|
}
|
|
2689
2689
|
}, {
|
|
2690
2690
|
name: "row",
|
|
2691
2691
|
openTag: Ae,
|
|
2692
2692
|
scan: (e, t, n) => {
|
|
2693
|
-
if (!
|
|
2693
|
+
if (!we || s || T !== null) return W;
|
|
2694
2694
|
H.r = H.s = H.ht = H.hidden = H.collapsed = H.customHeight = H.customFormat = H.outlineLevel = void 0;
|
|
2695
|
-
let r =
|
|
2696
|
-
return r < 0 ? r :
|
|
2695
|
+
let r = Ne(e, t + 4, n, 2);
|
|
2696
|
+
return r < 0 ? r : Me || H.r === void 0 ? W : (R(Ae), r);
|
|
2697
2697
|
}
|
|
2698
2698
|
}]
|
|
2699
2699
|
};
|
|
2700
|
-
},
|
|
2700
|
+
}, It = (e) => {
|
|
2701
2701
|
let t = e.indexOf(":");
|
|
2702
2702
|
return t === -1 ? e : e.slice(t + 1);
|
|
2703
|
-
},
|
|
2703
|
+
}, Lt = {
|
|
2704
2704
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks",
|
|
2705
2705
|
"application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks",
|
|
2706
2706
|
"application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks",
|
|
@@ -2730,45 +2730,45 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2730
2730
|
"application/vnd.ms-excel.externalLink": "links",
|
|
2731
2731
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",
|
|
2732
2732
|
"application/vnd.openxmlformats-officedocument.theme+xml": "themes"
|
|
2733
|
-
},
|
|
2734
|
-
let { password:
|
|
2735
|
-
|
|
2733
|
+
}, Rt = (e) => e.startsWith("/") ? e.slice(1) : e, zt = /^xl\/(worksheets|chartsheets)\/[^/]+\.xml$/i, Bt = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), Vt = async (t, n) => {
|
|
2734
|
+
let { password: r, onVBA: a, profile: o, calcOnLoad: u = "auto", createWorkbookOptions: p = {}, ...m } = n ?? {}, ee = !!p.origin && typeof p.origin != "string", h = o ? new R(typeof o == "function" ? o : void 0) : null, g = [], _ = (e, t, n) => {
|
|
2735
|
+
g.push([
|
|
2736
2736
|
e,
|
|
2737
2737
|
t ?? "",
|
|
2738
2738
|
n
|
|
2739
2739
|
]);
|
|
2740
|
-
},
|
|
2741
|
-
if (
|
|
2740
|
+
}, v = { onWarning: _ }, y = n?.progress, te = y?.onProgress ? y.onProgress.bind(y) : void 0, ne = t.byteLength, ae = 0, x = 0, w = te ? (e) => {
|
|
2741
|
+
if (ae <= 0) return;
|
|
2742
2742
|
x += e;
|
|
2743
|
-
let t = Math.min(
|
|
2744
|
-
|
|
2745
|
-
} : void 0,
|
|
2743
|
+
let t = Math.min(ne, Math.round(x / ae * ne));
|
|
2744
|
+
te(t, ne);
|
|
2745
|
+
} : void 0, T = import("./BvAptAMpZVyBCx6-.mjs"), se = null;
|
|
2746
2746
|
try {
|
|
2747
|
-
|
|
2747
|
+
se = new DOMParser();
|
|
2748
2748
|
} catch {}
|
|
2749
|
-
let
|
|
2749
|
+
let E = null;
|
|
2750
2750
|
try {
|
|
2751
|
-
|
|
2751
|
+
E = new XMLSerializer();
|
|
2752
2752
|
} catch {}
|
|
2753
|
-
let k, A,
|
|
2754
|
-
|
|
2753
|
+
let k, A, _e, N = null;
|
|
2754
|
+
se || (N = import("./CX3yVwe-BnhCk4FY.mjs").then((t) => e(t.default, 1)));
|
|
2755
2755
|
try {
|
|
2756
|
-
let [e, t] = await Promise.all([
|
|
2757
|
-
k = new t.DOMTransformer(), A =
|
|
2756
|
+
let [e, t] = await Promise.all([N, T]);
|
|
2757
|
+
k = new t.DOMTransformer(), A = se ?? new e.DOMParser(), _e = E ?? new e.XMLSerializer();
|
|
2758
2758
|
} catch (e) {
|
|
2759
2759
|
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
2760
2760
|
}
|
|
2761
|
-
let ve = (e) =>
|
|
2761
|
+
let ve = (e) => _e.serializeToString(e), P;
|
|
2762
2762
|
try {
|
|
2763
|
-
|
|
2763
|
+
P = await L.create(t);
|
|
2764
2764
|
} catch (e) {
|
|
2765
|
-
throw new
|
|
2765
|
+
throw new j("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
2766
2766
|
}
|
|
2767
|
-
|
|
2767
|
+
h?.mark("zip-open");
|
|
2768
2768
|
try {
|
|
2769
|
-
if (!
|
|
2769
|
+
if (!P.has("[Content_Types].xml")) throw new j("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
2770
2770
|
let e = (e) => {
|
|
2771
|
-
let t =
|
|
2771
|
+
let t = P.getEntry(e);
|
|
2772
2772
|
return t ? { content: t } : void 0;
|
|
2773
2773
|
}, t = {
|
|
2774
2774
|
workbooks: [],
|
|
@@ -2803,7 +2803,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2803
2803
|
let t = r.ContentType, n = r.PartName;
|
|
2804
2804
|
if (!t || !n) return;
|
|
2805
2805
|
e.overrides[n.startsWith("/") ? n.slice(1) : n] = t;
|
|
2806
|
-
let i =
|
|
2806
|
+
let i = Lt[t], a = i ? e[i] : void 0;
|
|
2807
2807
|
Array.isArray(a) && a.push(n);
|
|
2808
2808
|
} else if (n === "Default") {
|
|
2809
2809
|
let t = r.Extension, n = r.ContentType;
|
|
@@ -2817,23 +2817,23 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2817
2817
|
t?.(`Error parsing content types: ${e?.message ?? e}`);
|
|
2818
2818
|
}
|
|
2819
2819
|
}))(t, (e) => {
|
|
2820
|
-
|
|
2821
|
-
}), n = await
|
|
2820
|
+
g.push([e, "[Content_Types].xml"]);
|
|
2821
|
+
}), n = await P.getTextStream("[Content_Types].xml");
|
|
2822
2822
|
if (!n) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
2823
2823
|
try {
|
|
2824
|
-
await
|
|
2824
|
+
await st.parseStream(n, e, { xmlns: !1 });
|
|
2825
2825
|
} catch (e) {
|
|
2826
2826
|
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
2827
2827
|
}
|
|
2828
|
-
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
let n = t.sst,
|
|
2832
|
-
for (let e of t.sheets)
|
|
2833
|
-
n &&
|
|
2834
|
-
for (let e of
|
|
2835
|
-
if (await
|
|
2836
|
-
let n =
|
|
2828
|
+
ee && await P.getBuffer("[Content_Types].xml");
|
|
2829
|
+
}
|
|
2830
|
+
h?.mark("content-types");
|
|
2831
|
+
let n = t.sst, r = /* @__PURE__ */ new Set();
|
|
2832
|
+
for (let e of t.sheets) r.add(Rt(e));
|
|
2833
|
+
n && r.add(Rt(n));
|
|
2834
|
+
for (let e of r) ae += P.uncompressedSize(e);
|
|
2835
|
+
if (await P.prefetch((e) => !r.has(e) && !zt.test(e)), h?.mark("prefetch-side-parts"), t.workbooks.length === 0) {
|
|
2836
|
+
let n = de("_rels/.rels", e, A, k, v);
|
|
2837
2837
|
if (n) {
|
|
2838
2838
|
for (let e of n.values()) if (e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && e.target) {
|
|
2839
2839
|
t.workbooks.push(e.target);
|
|
@@ -2841,108 +2841,108 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2841
2841
|
}
|
|
2842
2842
|
}
|
|
2843
2843
|
}
|
|
2844
|
-
if (t.workbooks.length === 0) throw new
|
|
2844
|
+
if (t.workbooks.length === 0) throw new j("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
2845
2845
|
t.richstructure = ["/xl/richData/rdrichvaluestructure.xml"], t.richdata = ["/xl/richData/rdrichvalue.xml"];
|
|
2846
|
-
let
|
|
2847
|
-
|
|
2846
|
+
let m = p?.resources ?? new Se(), x = m.beginPersist(), T = {}, se = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Map();
|
|
2847
|
+
E.set("richTypes", []), E.set("parseInlineDxf", (e) => {
|
|
2848
2848
|
if (!e) return;
|
|
2849
|
-
let t = A.parseFromString(`<dxf xmlns:x14="${
|
|
2849
|
+
let t = A.parseFromString(`<dxf xmlns:x14="${S}" xmlns:xm="${re}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
2850
2850
|
if (!t) return;
|
|
2851
|
-
let n = k.parseDxf(t, "",
|
|
2851
|
+
let n = k.parseDxf(t, "", v);
|
|
2852
2852
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
2853
2853
|
});
|
|
2854
|
-
let
|
|
2855
|
-
|
|
2856
|
-
let
|
|
2857
|
-
|
|
2858
|
-
let
|
|
2859
|
-
be.add(
|
|
2860
|
-
}, I = (t, n =
|
|
2854
|
+
let _e = [];
|
|
2855
|
+
E.set("dummyWrapped", _e);
|
|
2856
|
+
let N = D("metadata", t, e, A, k, v).entries().next()?.value?.[1]?.metadata;
|
|
2857
|
+
N && E.set("metadata", N), E.set(At, s());
|
|
2858
|
+
let F = /* @__PURE__ */ new Map(), ye = [], be = /* @__PURE__ */ new Set(), we = (e) => {
|
|
2859
|
+
be.add(Rt(e));
|
|
2860
|
+
}, I = (t, n = F) => {
|
|
2861
2861
|
let r = t.lastIndexOf("/"), i = t.substring(0, r + 1) + "_rels/" + t.substring(r + 1, t.length) + ".rels", a = n.get(i);
|
|
2862
|
-
return a || (a =
|
|
2863
|
-
},
|
|
2864
|
-
let
|
|
2865
|
-
if (!
|
|
2866
|
-
if (
|
|
2867
|
-
if (!r) return
|
|
2868
|
-
let e =
|
|
2869
|
-
return e.addReference(
|
|
2870
|
-
}
|
|
2871
|
-
let
|
|
2872
|
-
|
|
2873
|
-
let
|
|
2874
|
-
if (!
|
|
2862
|
+
return a || (a = de(i, e, A, k, V), n.set(i, a)), a;
|
|
2863
|
+
}, L = (t, n, r, i = F) => {
|
|
2864
|
+
let a = I(n, i).get(t), o = a?.target;
|
|
2865
|
+
if (!o) return null;
|
|
2866
|
+
if (a.targetMode === "External") {
|
|
2867
|
+
if (!r) return a.target;
|
|
2868
|
+
let e = m.add({ source: { external: a.target } });
|
|
2869
|
+
return e.addReference(T), se.add(e), x.toResourceId(e);
|
|
2870
|
+
}
|
|
2871
|
+
let s = n.lastIndexOf("/"), c = n.substring(0, s + 1);
|
|
2872
|
+
o.startsWith("/") || (o = c + o), o = ue(o);
|
|
2873
|
+
let l = k?.getVisitorParamsState().get("dxfs"), u = i.get(o);
|
|
2874
|
+
if (!u) if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
2875
2875
|
let e = {};
|
|
2876
|
-
|
|
2877
|
-
let t =
|
|
2878
|
-
|
|
2879
|
-
}, void 0,
|
|
2876
|
+
u = e, ye.push((async () => {
|
|
2877
|
+
let t = jt(e, (e, t) => t === "legacyDrawing" ? De(e, o) : t === "part" ? z(e, o) : L(e, o, t === "resource") ?? null, je, l, () => {}, (e, t, n) => {
|
|
2878
|
+
_(e, t ? `${t} (${o})` : o, n);
|
|
2879
|
+
}, void 0, E), n = await P.getTextStream(o, w);
|
|
2880
2880
|
if (n) try {
|
|
2881
|
-
await
|
|
2881
|
+
await st.parseStream(n, t, {
|
|
2882
2882
|
xmlns: !1,
|
|
2883
2883
|
lean: !0
|
|
2884
2884
|
});
|
|
2885
2885
|
} catch (e) {
|
|
2886
|
-
throw Error(`Error parsing sheet: '${
|
|
2886
|
+
throw Error(`Error parsing sheet: '${o}'`, { cause: e });
|
|
2887
2887
|
}
|
|
2888
|
-
let r = I(
|
|
2888
|
+
let r = I(o, i);
|
|
2889
2889
|
if (r) {
|
|
2890
|
-
|
|
2890
|
+
Ee(e, o, r, i);
|
|
2891
2891
|
let t = [];
|
|
2892
2892
|
r.forEach((e, n) => {
|
|
2893
2893
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
2894
|
-
let r =
|
|
2894
|
+
let r = z(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
2895
2895
|
if (!r?.xml) return;
|
|
2896
|
-
let
|
|
2897
|
-
if (isNaN(
|
|
2898
|
-
let
|
|
2896
|
+
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
2897
|
+
if (isNaN(a)) return void g.push([`Pivot table '${r.name}' names no cache and was dropped.`, o]);
|
|
2898
|
+
let s = /\sname="([^"]*)"/.exec(i)?.[1];
|
|
2899
2899
|
t.push({
|
|
2900
|
-
...
|
|
2901
|
-
cacheId:
|
|
2900
|
+
...s ? { name: f(s) } : {},
|
|
2901
|
+
cacheId: a,
|
|
2902
2902
|
part: r
|
|
2903
2903
|
});
|
|
2904
2904
|
}), t.length > 0 && (e.pivotTables = t);
|
|
2905
2905
|
}
|
|
2906
2906
|
})());
|
|
2907
|
-
} else if (
|
|
2908
|
-
let t = le(
|
|
2907
|
+
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
2908
|
+
let t = le(o, e, A, k, V);
|
|
2909
2909
|
if (t && Object.keys(t).length !== 0) {
|
|
2910
2910
|
let e = t, n = e.__bookRelId, r = e.__absoluteUrlRelId;
|
|
2911
2911
|
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
2912
|
-
let
|
|
2913
|
-
I(
|
|
2912
|
+
let a = [];
|
|
2913
|
+
I(o, i)?.forEach((e, t) => {
|
|
2914
2914
|
if (e.targetMode === "External" && e.type && e.target) {
|
|
2915
|
-
let
|
|
2915
|
+
let i = {
|
|
2916
2916
|
type: e.type,
|
|
2917
2917
|
target: e.target
|
|
2918
2918
|
};
|
|
2919
|
-
t === n ?
|
|
2919
|
+
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
2920
2920
|
}
|
|
2921
|
-
}),
|
|
2922
|
-
} else
|
|
2923
|
-
} else
|
|
2924
|
-
let n =
|
|
2925
|
-
return n.addReference(
|
|
2926
|
-
}, V) : le(
|
|
2927
|
-
return
|
|
2928
|
-
},
|
|
2921
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a, we(o), u = e;
|
|
2922
|
+
} else u = null;
|
|
2923
|
+
} else u = r ? me(o, e, (e, t) => {
|
|
2924
|
+
let n = m.add({ source: { buffer: e } });
|
|
2925
|
+
return n.addReference(T), se.add(n), x.toResourceId(n);
|
|
2926
|
+
}, V) : le(o, e, A, k, V);
|
|
2927
|
+
return u;
|
|
2928
|
+
}, R = (e, t) => {
|
|
2929
2929
|
if (!e) return null;
|
|
2930
|
-
let n = I(t,
|
|
2930
|
+
let n = I(t, F)?.get(e);
|
|
2931
2931
|
if (!n?.target || n.targetMode === "External") return null;
|
|
2932
2932
|
let r = n.target;
|
|
2933
|
-
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r),
|
|
2934
|
-
},
|
|
2933
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), ue(r);
|
|
2934
|
+
}, Ee = (e, t, n, r) => {
|
|
2935
2935
|
let i = [], a = /* @__PURE__ */ new Map(), o = [];
|
|
2936
2936
|
n.forEach((e, n) => {
|
|
2937
2937
|
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
2938
|
-
let s =
|
|
2938
|
+
let s = L(n, t, !1, r)?.comments;
|
|
2939
2939
|
if (!s) return;
|
|
2940
2940
|
for (let e = 0; e < s.length; e++) {
|
|
2941
2941
|
let t = s[e];
|
|
2942
2942
|
if (!t?.v?.id) continue;
|
|
2943
2943
|
let { parentId: n, done: r, content: c, ...l } = t.v, u = {
|
|
2944
2944
|
...l,
|
|
2945
|
-
content:
|
|
2945
|
+
content: Bt(c)
|
|
2946
2946
|
};
|
|
2947
2947
|
n ? o.push({
|
|
2948
2948
|
parentId: n,
|
|
@@ -2952,8 +2952,8 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2952
2952
|
v: u
|
|
2953
2953
|
}));
|
|
2954
2954
|
}
|
|
2955
|
-
let c =
|
|
2956
|
-
c &&
|
|
2955
|
+
let c = R(n, t);
|
|
2956
|
+
c && we(c);
|
|
2957
2957
|
});
|
|
2958
2958
|
for (let e = 0; e < o.length; e++) {
|
|
2959
2959
|
let { parentId: t, json: n } = o[e], r = a.get(t);
|
|
@@ -2962,7 +2962,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2962
2962
|
let s = [];
|
|
2963
2963
|
if (n.forEach((e, n) => {
|
|
2964
2964
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
2965
|
-
let i =
|
|
2965
|
+
let i = L(n, t, !1, r), o = i?.comments;
|
|
2966
2966
|
if (!o) return;
|
|
2967
2967
|
let c = i?.authors;
|
|
2968
2968
|
for (let e = 0; e < o.length; e++) {
|
|
@@ -2970,11 +2970,11 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2970
2970
|
if (!t?.r) continue;
|
|
2971
2971
|
let n = c && t.v.authorId !== void 0 ? c[t.v.authorId] : void 0;
|
|
2972
2972
|
if (n && n.startsWith("tc=")) {
|
|
2973
|
-
if (a.has(
|
|
2973
|
+
if (a.has(O(n.substring(3)))) continue;
|
|
2974
2974
|
n = void 0;
|
|
2975
2975
|
}
|
|
2976
2976
|
let r = {
|
|
2977
|
-
id:
|
|
2977
|
+
id: ge.uuidV4().toUpperCase(),
|
|
2978
2978
|
asNote: !0,
|
|
2979
2979
|
content: t.v.content ?? ""
|
|
2980
2980
|
}, i = n ? ke({ displayName: n }) : void 0;
|
|
@@ -2983,72 +2983,91 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
2983
2983
|
v: r
|
|
2984
2984
|
});
|
|
2985
2985
|
}
|
|
2986
|
-
let l =
|
|
2987
|
-
l &&
|
|
2986
|
+
let l = R(n, t);
|
|
2987
|
+
l && we(l);
|
|
2988
2988
|
}), i.length === 0 && s.length === 0) return;
|
|
2989
2989
|
let c = [...i, ...s], l = e.legacyDrawing;
|
|
2990
2990
|
if (l?.xml) {
|
|
2991
|
-
let { rest: t, notes: n } =
|
|
2991
|
+
let { rest: t, notes: n } = C(l.xml);
|
|
2992
2992
|
if (n.length > 0) {
|
|
2993
2993
|
let r = /* @__PURE__ */ new Map();
|
|
2994
2994
|
for (let e = 0; e < n.length; e++) {
|
|
2995
2995
|
let t = n[e];
|
|
2996
|
-
r.set(
|
|
2996
|
+
r.set(M.cellToString({
|
|
2997
2997
|
rowIndex: t.row,
|
|
2998
2998
|
colIndex: t.col
|
|
2999
2999
|
}), t);
|
|
3000
3000
|
}
|
|
3001
3001
|
for (let e = 0; e < c.length; e++) {
|
|
3002
3002
|
let t = c[e], n = r.get(String(t.r).toUpperCase());
|
|
3003
|
-
|
|
3003
|
+
if (!n || (r.delete(String(t.r).toUpperCase()), !t.v.asNote)) continue;
|
|
3004
|
+
let i = oe(n.xml), a = {};
|
|
3005
|
+
if (i.anchor) {
|
|
3006
|
+
let [e, t, r, o, s, c, l, u] = i.anchor;
|
|
3007
|
+
a.anchor = {
|
|
3008
|
+
tl: {
|
|
3009
|
+
c: e - n.col,
|
|
3010
|
+
x: t,
|
|
3011
|
+
r: r - n.row,
|
|
3012
|
+
y: o
|
|
3013
|
+
},
|
|
3014
|
+
br: {
|
|
3015
|
+
c: s - n.col,
|
|
3016
|
+
x: c,
|
|
3017
|
+
r: l - n.row,
|
|
3018
|
+
y: u
|
|
3019
|
+
}
|
|
3020
|
+
};
|
|
3021
|
+
}
|
|
3022
|
+
i.xml && (a.xml = i.xml), (a.anchor || a.xml) && (t.v.box = a), i.visible && (t.v.shown = !0), i.alt && (t.v.description = i.alt);
|
|
3004
3023
|
}
|
|
3005
3024
|
let i = [];
|
|
3006
3025
|
r.forEach((e) => {
|
|
3007
3026
|
i.push(e.xml);
|
|
3008
3027
|
});
|
|
3009
|
-
let a =
|
|
3028
|
+
let a = b(t, i);
|
|
3010
3029
|
a ? l.xml = a : delete e.legacyDrawing;
|
|
3011
3030
|
}
|
|
3012
3031
|
}
|
|
3013
3032
|
e.comments = c;
|
|
3014
|
-
},
|
|
3015
|
-
let r =
|
|
3033
|
+
}, De = (t, n) => {
|
|
3034
|
+
let r = R(t, n);
|
|
3016
3035
|
if (!r) return null;
|
|
3017
|
-
let i = e(
|
|
3036
|
+
let i = e(Rt(r));
|
|
3018
3037
|
if (!i) return null;
|
|
3019
3038
|
let a = { xml: new TextDecoder("utf-8").decode(i.content) }, o = [];
|
|
3020
|
-
return I(r,
|
|
3039
|
+
return I(r, F)?.forEach((e, t) => {
|
|
3021
3040
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
3022
|
-
let n =
|
|
3041
|
+
let n = L(t, r, !0);
|
|
3023
3042
|
typeof n == "number" && o.push({
|
|
3024
3043
|
id: t,
|
|
3025
3044
|
resId: n
|
|
3026
3045
|
});
|
|
3027
|
-
}), o.length > 0 && (a.images = o),
|
|
3028
|
-
},
|
|
3029
|
-
let s =
|
|
3046
|
+
}), o.length > 0 && (a.images = o), we(r), a;
|
|
3047
|
+
}, z = (n, r, i, a, o = /* @__PURE__ */ new Set()) => {
|
|
3048
|
+
let s = R(n, r);
|
|
3030
3049
|
if (!s || o.has(s)) return null;
|
|
3031
|
-
let c = i ?? I(r,
|
|
3050
|
+
let c = i ?? I(r, F)?.get(n)?.type;
|
|
3032
3051
|
if (!c) return null;
|
|
3033
|
-
let l = e(
|
|
3052
|
+
let l = e(Rt(s));
|
|
3034
3053
|
if (!l) return null;
|
|
3035
3054
|
o.add(s);
|
|
3036
|
-
let u = s.substring(s.lastIndexOf("/") + 1), d = t.overrides[
|
|
3055
|
+
let u = s.substring(s.lastIndexOf("/") + 1), d = t.overrides[Rt(s)] ?? t.defaults[u.substring(u.lastIndexOf(".") + 1).toLowerCase()], f = {
|
|
3037
3056
|
id: n,
|
|
3038
3057
|
type: c,
|
|
3039
3058
|
name: u
|
|
3040
3059
|
};
|
|
3041
3060
|
if (d && (f.contentType = d), ((e, t) => e ? e.endsWith("+xml") || e === "application/xml" : /\.(xml|rels|vml)$/i.test(t))(d, u)) f.xml = new TextDecoder("utf-8").decode(l.content);
|
|
3042
3061
|
else {
|
|
3043
|
-
let e =
|
|
3062
|
+
let e = L(n, r, !0);
|
|
3044
3063
|
if (typeof e != "number") return null;
|
|
3045
3064
|
f.resId = e;
|
|
3046
3065
|
}
|
|
3047
3066
|
let p = [];
|
|
3048
|
-
return I(s,
|
|
3067
|
+
return I(s, F)?.forEach((e, t) => {
|
|
3049
3068
|
if (!e?.type || a && !a(e.type)) return;
|
|
3050
3069
|
if (e.targetMode === "External") {
|
|
3051
|
-
let n =
|
|
3070
|
+
let n = L(t, s, !0);
|
|
3052
3071
|
typeof n == "number" && p.push({
|
|
3053
3072
|
id: t,
|
|
3054
3073
|
type: e.type,
|
|
@@ -3056,63 +3075,44 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3056
3075
|
});
|
|
3057
3076
|
return;
|
|
3058
3077
|
}
|
|
3059
|
-
let n =
|
|
3078
|
+
let n = z(t, s, e.type, a, o);
|
|
3060
3079
|
n && p.push(n);
|
|
3061
|
-
}), p.length > 0 && (f.parts = p),
|
|
3080
|
+
}), p.length > 0 && (f.parts = p), we(s), f;
|
|
3062
3081
|
};
|
|
3063
|
-
|
|
3064
|
-
let
|
|
3065
|
-
if (
|
|
3066
|
-
let [e, t] =
|
|
3067
|
-
|
|
3068
|
-
let e = B.length;
|
|
3069
|
-
for (let t = 0; t < e; t++) {
|
|
3070
|
-
let e = B[t];
|
|
3071
|
-
De.set(e.id, e), e.displayName !== void 0 && z.set(e.displayName, e);
|
|
3072
|
-
}
|
|
3073
|
-
}
|
|
3082
|
+
D("coreprops", t, e, A, k, v), D("extprops", t, e, A, k, v);
|
|
3083
|
+
let Oe = new xe(), B = D("people", t, e, A, k, v);
|
|
3084
|
+
if (B.size > 0) {
|
|
3085
|
+
let [e, t] = B.entries().next().value;
|
|
3086
|
+
Oe.fromJSON(t?.persons), we(e);
|
|
3074
3087
|
}
|
|
3075
3088
|
let ke = (e) => {
|
|
3076
|
-
if (
|
|
3077
|
-
if (e.id && De.has(e.id)) return De.get(e.id);
|
|
3078
|
-
let t = e.displayName;
|
|
3079
|
-
if (!e.id) {
|
|
3080
|
-
if (t) {
|
|
3081
|
-
let e = z.get(t);
|
|
3082
|
-
if (e) return e;
|
|
3083
|
-
}
|
|
3084
|
-
e.id = he.uuidV4();
|
|
3085
|
-
}
|
|
3086
|
-
let n = De.get(e.id);
|
|
3087
|
-
if (n) return n;
|
|
3088
|
-
let r = e;
|
|
3089
|
-
return De.set(e.id, r), t && z.set(t, r), B ||= [], B.push(r), r;
|
|
3089
|
+
if (e) return Oe.add(e).toJSON();
|
|
3090
3090
|
}, V = {
|
|
3091
|
-
paramMap:
|
|
3091
|
+
paramMap: E,
|
|
3092
3092
|
getRefs: I,
|
|
3093
|
-
getRef:
|
|
3094
|
-
parsedRefs:
|
|
3095
|
-
readEmbeddedPart: (e, t) =>
|
|
3093
|
+
getRef: L,
|
|
3094
|
+
parsedRefs: F,
|
|
3095
|
+
readEmbeddedPart: (e, t) => z(e, t),
|
|
3096
3096
|
addPerson: ke,
|
|
3097
3097
|
serializeElement: ve,
|
|
3098
|
-
onWarning:
|
|
3098
|
+
onWarning: _
|
|
3099
3099
|
}, H = [];
|
|
3100
3100
|
if (n) {
|
|
3101
|
-
let e = await
|
|
3101
|
+
let e = await P.getTextStream(n, w);
|
|
3102
3102
|
if (e) {
|
|
3103
3103
|
let t = ((e, t) => {
|
|
3104
3104
|
let n = !1, r = !1, i = 0, a = "";
|
|
3105
3105
|
return {
|
|
3106
3106
|
onOpenTag: (e) => {
|
|
3107
|
-
let t =
|
|
3107
|
+
let t = It(e.name);
|
|
3108
3108
|
t === "t" ? n && i === 0 && (r = !0) : t === "si" ? (n = !0, a = "", i = 0) : t !== "rPh" && t !== "phoneticPr" || i++;
|
|
3109
3109
|
},
|
|
3110
3110
|
onText: (e) => {
|
|
3111
3111
|
r && (a += e);
|
|
3112
3112
|
},
|
|
3113
3113
|
onCloseTag: (t) => {
|
|
3114
|
-
let o =
|
|
3115
|
-
o === "t" ? r = !1 : o === "si" ? (e(
|
|
3114
|
+
let o = It(t.name);
|
|
3115
|
+
o === "t" ? r = !1 : o === "si" ? (e(ce(a)), n = !1, a = "") : o !== "rPh" && o !== "phoneticPr" || i > 0 && i--;
|
|
3116
3116
|
},
|
|
3117
3117
|
onError: (e) => {
|
|
3118
3118
|
t?.(`Error parsing shared strings: ${e?.message ?? e}`);
|
|
@@ -3121,47 +3121,47 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3121
3121
|
})((e) => {
|
|
3122
3122
|
H.push(e);
|
|
3123
3123
|
}, (e) => {
|
|
3124
|
-
|
|
3124
|
+
_(e, n);
|
|
3125
3125
|
});
|
|
3126
3126
|
try {
|
|
3127
|
-
await
|
|
3127
|
+
await st.parseStream(e, t, { xmlns: !1 });
|
|
3128
3128
|
} catch (e) {
|
|
3129
3129
|
throw Error(`Error parsing shared strings: '${n}'`, { cause: e });
|
|
3130
3130
|
}
|
|
3131
3131
|
}
|
|
3132
3132
|
}
|
|
3133
|
-
|
|
3134
|
-
let Ae = H.length,
|
|
3135
|
-
let t =
|
|
3133
|
+
h?.mark("shared-strings");
|
|
3134
|
+
let Ae = H.length, U = /* @__PURE__ */ new Map(), W = Ae, je = (e) => {
|
|
3135
|
+
let t = U.get(e);
|
|
3136
3136
|
if (t !== void 0) return t;
|
|
3137
|
-
let n =
|
|
3138
|
-
return
|
|
3139
|
-
},
|
|
3140
|
-
t.slicersCache =
|
|
3141
|
-
let
|
|
3137
|
+
let n = W;
|
|
3138
|
+
return U.set(e, W++), H.push(e), n;
|
|
3139
|
+
}, Me = [];
|
|
3140
|
+
t.slicersCache = Me;
|
|
3141
|
+
let Ne = P.getNames(), Pe = Ne.length;
|
|
3142
3142
|
for (let e = 0; e < Pe; e++) {
|
|
3143
|
-
let t =
|
|
3144
|
-
t && t.startsWith("xl/slicerCache") &&
|
|
3143
|
+
let t = Ne[e];
|
|
3144
|
+
t && t.startsWith("xl/slicerCache") && Me.push(`/${t}`);
|
|
3145
3145
|
}
|
|
3146
|
-
let
|
|
3147
|
-
|
|
3146
|
+
let G = D("slicersCache", t, e, A, k, V), Fe = /* @__PURE__ */ new Map();
|
|
3147
|
+
G.forEach((e) => {
|
|
3148
3148
|
let t = e.name;
|
|
3149
|
-
delete e.name,
|
|
3150
|
-
}),
|
|
3151
|
-
let
|
|
3152
|
-
if (
|
|
3153
|
-
let e =
|
|
3154
|
-
e?.value?.[1] && (
|
|
3155
|
-
}
|
|
3156
|
-
let
|
|
3157
|
-
|
|
3158
|
-
let
|
|
3159
|
-
|
|
3149
|
+
delete e.name, Fe.set(t, e);
|
|
3150
|
+
}), E.set("slicerCaches", Fe), D("richstructure", t, e, A, k, V), D("richdata", t, e, A, k, V);
|
|
3151
|
+
let Ie = D("themes", t, e, A, k, V), Le = null;
|
|
3152
|
+
if (Ie && Ie.entries) {
|
|
3153
|
+
let e = Ie.entries().next();
|
|
3154
|
+
e?.value?.[1] && (Le = e.value[1]);
|
|
3155
|
+
}
|
|
3156
|
+
let Re = new Ce(Le), ze = D("styles", t, e, A, k, V).entries().next()?.value?.[1];
|
|
3157
|
+
ze &&= JSON.parse(he.JSONStableStringify(ze));
|
|
3158
|
+
let Be = D("workbooks", t, e, A, k, V);
|
|
3159
|
+
h?.mark("side-parts-json"), await Promise.all(ye);
|
|
3160
3160
|
{
|
|
3161
|
-
let e =
|
|
3161
|
+
let e = Be.entries().next().value?.[1], t = s(e?.names), n = e?.sheets ?? [];
|
|
3162
3162
|
for (let e = 0; e < n.length; e++) {
|
|
3163
3163
|
let r = n[e]?.sheet;
|
|
3164
|
-
r &&
|
|
3164
|
+
r && d(r, t);
|
|
3165
3165
|
}
|
|
3166
3166
|
let r = e?.names;
|
|
3167
3167
|
if (r) for (let e = 0; e < r.length; e++) {
|
|
@@ -3169,22 +3169,24 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3169
3169
|
typeof n == "string" && (r[e].ref = t.readDetached(n));
|
|
3170
3170
|
}
|
|
3171
3171
|
}
|
|
3172
|
-
|
|
3173
|
-
let
|
|
3174
|
-
...
|
|
3175
|
-
styles:
|
|
3176
|
-
theme:
|
|
3172
|
+
te && ae > 0 && (te(ne, ne), await new Promise((e) => setTimeout(e, 0))), h?.mark("sheets");
|
|
3173
|
+
let Ve = {
|
|
3174
|
+
...Be.entries().next().value?.[1],
|
|
3175
|
+
styles: ze,
|
|
3176
|
+
theme: Re.toJSON()
|
|
3177
3177
|
};
|
|
3178
|
-
|
|
3179
|
-
...
|
|
3178
|
+
fe(Ve, E.get(pe)), Ve.calc = {
|
|
3179
|
+
...Ve.calc ?? {},
|
|
3180
3180
|
legacyIntersect: !0
|
|
3181
|
-
}, H.length > 0 && (
|
|
3182
|
-
let
|
|
3181
|
+
}, H.length > 0 && (Ve.strings = H);
|
|
3182
|
+
let He = Oe.toJSON();
|
|
3183
|
+
He && He.length > 0 && (Ve.people = He);
|
|
3184
|
+
let Ue = P.getEntry("xl/vbaProject.bin");
|
|
3183
3185
|
if (Ue) try {
|
|
3184
|
-
let { VBAProject: e } = await import("./
|
|
3186
|
+
let { VBAProject: e } = await import("./DUi-V-E_AJwTIqlO.mjs"), t = e.extract(Ue);
|
|
3185
3187
|
if (t) {
|
|
3186
3188
|
let n = /* @__PURE__ */ new Map();
|
|
3187
|
-
for (let e of
|
|
3189
|
+
for (let e of Ve.sheets ?? []) {
|
|
3188
3190
|
let t = e?.sheet?.codeName;
|
|
3189
3191
|
t && n.set(t, e.sheet);
|
|
3190
3192
|
}
|
|
@@ -3193,25 +3195,25 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3193
3195
|
a && (t.source = a), i && (t.sourceHeader = i);
|
|
3194
3196
|
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
3195
3197
|
o || r.type !== "document" || (t.scope = "workbook");
|
|
3196
|
-
let s = o ? o.modules ??= {} :
|
|
3198
|
+
let s = o ? o.modules ??= {} : Ve.modules ??= {};
|
|
3197
3199
|
s[r.name] || (s[r.name] = t);
|
|
3198
3200
|
}
|
|
3199
|
-
|
|
3200
|
-
} else
|
|
3201
|
+
a?.(t);
|
|
3202
|
+
} else g.push(["Unable to parse VBA project.", "xl/vbaProject.bin"]);
|
|
3201
3203
|
} catch (e) {
|
|
3202
|
-
|
|
3204
|
+
g.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
3203
3205
|
}
|
|
3204
|
-
let We =
|
|
3205
|
-
...
|
|
3206
|
+
let We = E.get("calcId"), Ge = We === void 0 || !(Number(We) >= 191029), Ke = p.calcOnLoad ?? (u === "auto" && Ge ? "full" : u), qe = {
|
|
3207
|
+
...p,
|
|
3206
3208
|
calcOnLoad: Ke,
|
|
3207
|
-
resources:
|
|
3208
|
-
json:
|
|
3209
|
+
resources: m,
|
|
3210
|
+
json: Ve
|
|
3209
3211
|
};
|
|
3210
|
-
|
|
3211
|
-
let K = new
|
|
3212
|
-
if (
|
|
3212
|
+
qe.disableLoadAutoFit === void 0 && (qe.disableLoadAutoFit = !1), h?.mark("json-assembled");
|
|
3213
|
+
let K = new Te(qe);
|
|
3214
|
+
if (h?.mark("workbook-constructed"), _e.length > 0 && Ke !== "none") {
|
|
3213
3215
|
await K.whenCalculationReady();
|
|
3214
|
-
let e = /* @__PURE__ */ new Map(), t =
|
|
3216
|
+
let e = /* @__PURE__ */ new Map(), t = Ve.sheets ?? [], n = K.getSheets().getItems();
|
|
3215
3217
|
for (let r = 0; r < t.length; r++) {
|
|
3216
3218
|
let i = t[r]?.sheet, a = n[r];
|
|
3217
3219
|
i && a && e.set(i, a);
|
|
@@ -3233,7 +3235,7 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3233
3235
|
for (let e of t) e.formula === null && o.add(i(e.rowIndex, e.colIndex));
|
|
3234
3236
|
for (let e of t) {
|
|
3235
3237
|
if (e.formula === null) continue;
|
|
3236
|
-
let t =
|
|
3238
|
+
let t = Ot(e.formula), n = !0;
|
|
3237
3239
|
for (let e of t) if (!a(e)) {
|
|
3238
3240
|
n = !1;
|
|
3239
3241
|
break;
|
|
@@ -3266,19 +3268,19 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3266
3268
|
}).setValue("=" + e.formula);
|
|
3267
3269
|
}
|
|
3268
3270
|
}
|
|
3269
|
-
})(K,
|
|
3271
|
+
})(K, _e, e);
|
|
3270
3272
|
}
|
|
3271
|
-
if (
|
|
3272
|
-
e.deleteReference(
|
|
3273
|
-
}), x.endPersist(),
|
|
3274
|
-
|
|
3273
|
+
if (se.forEach((e) => {
|
|
3274
|
+
e.deleteReference(T);
|
|
3275
|
+
}), x.endPersist(), ee) {
|
|
3276
|
+
l(K);
|
|
3275
3277
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
3276
|
-
for (let n of
|
|
3277
|
-
let r =
|
|
3278
|
+
for (let n of P.getNames()) {
|
|
3279
|
+
let r = P.getEntry(n);
|
|
3278
3280
|
if (!r) continue;
|
|
3279
|
-
let i =
|
|
3281
|
+
let i = P.getRawEntry(n), a = i ? {
|
|
3280
3282
|
data: r,
|
|
3281
|
-
uncompressedSize:
|
|
3283
|
+
uncompressedSize: P.uncompressedSize(n),
|
|
3282
3284
|
raw: {
|
|
3283
3285
|
compressedData: i.data,
|
|
3284
3286
|
compressionMethod: i.compressionMethod,
|
|
@@ -3286,39 +3288,39 @@ var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
3286
3288
|
}
|
|
3287
3289
|
} : {
|
|
3288
3290
|
data: r,
|
|
3289
|
-
uncompressedSize:
|
|
3291
|
+
uncompressedSize: P.uncompressedSize(n)
|
|
3290
3292
|
};
|
|
3291
3293
|
e.set(n, a), t += r.byteLength;
|
|
3292
3294
|
}
|
|
3293
|
-
if (t > 67108864)
|
|
3295
|
+
if (t > 67108864) g.push([`Source package too large to retain (${t} bytes, limit ${ie}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
3294
3296
|
else if (e.size > 0) {
|
|
3295
3297
|
let t = new c(e, be);
|
|
3296
|
-
|
|
3297
|
-
let n = K.getSheets().getItems(),
|
|
3298
|
+
i(K, t);
|
|
3299
|
+
let n = K.getSheets().getItems(), r = K.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
3298
3300
|
let n = e.getOperation()?.name;
|
|
3299
3301
|
n !== "insertCells" && n !== "deleteCells" || t.markStructuralChange();
|
|
3300
|
-
} }),
|
|
3302
|
+
} }), a = K.addListeners({ onSheetsChange: () => {
|
|
3301
3303
|
let e = K.getSheets().getItems();
|
|
3302
3304
|
(e.length !== n.length || e.some((e, t) => e !== n[t])) && t.markStructuralChange(), n = e;
|
|
3303
3305
|
} });
|
|
3304
3306
|
K.addListeners({ onClose: () => {
|
|
3305
|
-
|
|
3307
|
+
r(), a(), l(K);
|
|
3306
3308
|
} });
|
|
3307
3309
|
}
|
|
3308
3310
|
}
|
|
3309
|
-
if (
|
|
3311
|
+
if (g.length && y?.onWarning) {
|
|
3310
3312
|
let e = /* @__PURE__ */ new Set();
|
|
3311
|
-
for (let t of
|
|
3313
|
+
for (let t of g) {
|
|
3312
3314
|
let [n, r, i] = t, a = i ?? n;
|
|
3313
|
-
e.has(a) || (e.add(a),
|
|
3315
|
+
e.has(a) || (e.add(a), y.onWarning(n, r));
|
|
3314
3316
|
}
|
|
3315
3317
|
}
|
|
3316
|
-
return
|
|
3318
|
+
return h && !0 === o && console.table(h.toTable()), K;
|
|
3317
3319
|
} catch (e) {
|
|
3318
3320
|
let t = "Unable to parse XLSX.";
|
|
3319
3321
|
throw e instanceof be && (t = "Unable to open XLSX. There are too many rows or columns."), Error(t, { cause: e });
|
|
3320
3322
|
} finally {
|
|
3321
|
-
await
|
|
3323
|
+
await P.close().catch(() => {});
|
|
3322
3324
|
}
|
|
3323
3325
|
};
|
|
3324
|
-
export {
|
|
3326
|
+
export { Vt as readXLSX };
|