@sheetxl/io-xlsx 0.8.0-beta.11 → 0.8.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{Cv3R6fGatARKedSn.mjs → 9dwUocbOsJuAcmKn.mjs} +2514 -2058
- package/browser/esm/{CZ9I80og75SDRjv0.mjs → BIvDjK4Zl8bWRgl8.mjs} +2 -2
- package/browser/esm/{DatIA9fZbEPjW4bh.mjs → CcH5ITJFTMVWUJO9.mjs} +1810 -1294
- package/browser/esm/{yveeVJ6hKDI5KDEz.mjs → D8k22TSWPd_RHEpj.mjs} +1182 -1002
- package/browser/esm/{DICL6ecj9BdJv8aX.mjs → DKnOwucZq4z9_-r-.mjs} +4 -4
- package/browser/esm/{Bs0EzhdU8WgGfPzf.mjs → DO75RoAQTgMuVzXv.mjs} +2 -2
- package/browser/esm/{BiDqExNXiY7ykk8E.mjs → DVLJTjJCGqrJUa8c.mjs} +200 -199
- package/browser/esm/{CLWsOc6DO8l1G_LF.mjs → DeMZN_qj__PKo4Wh.mjs} +816 -764
- package/browser/esm/{CuAXx5i4uqTz-mMY.mjs → DsppUz-14Z7ti9i3.mjs} +1 -1
- package/browser/esm/{CzFYJPxmLyKgEKF0.mjs → aUBXbTh2r0u3x4Xo.mjs} +2 -2
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{ipiyzn5Pfohw2afB.mjs → BmIIQODk4dBVIXA4.mjs} +1280 -1096
- package/node/esm/{CxlSbH7mmnEEsqmX.mjs → C-e5AO_4TnGywT-m.mjs} +1 -1
- package/node/esm/{DScqM1V4wPntNP6-.mjs → C78E45n6j2E8rruH.mjs} +2044 -1585
- package/node/esm/{Bpqm_PpGLpdjL47-.mjs → CDKm5s3JE_d99TJw.mjs} +242 -241
- package/node/esm/{CAJxmJdobUbzpUz5.mjs → DCaAOfuW-w_dx_qd.mjs} +2 -2
- package/node/esm/{fopiRR7OiVoEiF7B.mjs → DSgxL0sBZtWMydVl.mjs} +2 -2
- package/node/esm/DXusvwW73FUDSyvD.mjs +6367 -0
- package/node/esm/{B9Zn6H1RV07Ob377.mjs → DsyuWxk3bdGhJUQN.mjs} +512 -460
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/DataTableFormula.d.ts +36 -0
- package/types/src/chart/ChartSpaceXml.d.ts +2 -1
- package/types/src/chart/_chartCodecs.d.ts +2 -0
- package/types/src/reader/CellControls.d.ts +18 -0
- package/types/src/reader/LibreOfficeDataTable.d.ts +3 -2
- package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -1
- package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +27 -0
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -0
- package/types/src/reader/domVisitors/index.d.ts +2 -4
- package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +14 -3
- package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
- package/types/src/richValue/IRichValueHandler.d.ts +109 -0
- package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
- package/types/src/richValue/RichDataParts.d.ts +69 -0
- package/types/src/richValue/RichRecordWriter.d.ts +61 -0
- package/types/src/richValue/RichValueHandlers.d.ts +25 -0
- package/types/src/richValue/RichValueResolver.d.ts +54 -0
- package/types/src/richValue/WebImageRichValueHandler.d.ts +42 -0
- package/types/src/richValue/index.d.ts +7 -0
- package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +18 -0
- package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
- package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
- package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
- package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
- package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
- package/types/src/writer/emitters/SlicerEmitter.d.ts +5 -2
- package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
- package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
- package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
- package/types/src/writer/utils/SheetStyleLayout.d.ts +18 -5
- package/node/esm/DD-yXSBzvDYy0TX5.mjs +0 -5842
- package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
|
@@ -1,24 +1,24 @@
|
|
|
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.12
|
|
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 { $
|
|
8
|
-
import { BufferUtils as
|
|
9
|
-
import { AddressUtils as
|
|
10
|
-
var
|
|
7
|
+
import { $n as e, $t as t, Bn as n, Bt as r, C as i, Cn as a, Dt as o, En as s, Et as c, Fn as l, Hn as u, It as d, Jt as f, Kt as p, Ln as m, Nn as h, On as g, Ot as _, Pn as v, Pt as y, Q as b, Qn as x, Sn as ee, Tn as te, Tt as ne, Vt as re, X as ie, Xn as ae, Xt as oe, Zt as se, _n as S, _t as C, ar as w, bn as ce, bt as T, d as le, dt as ue, en as de, et as fe, fn as E, ft as D, gn as O, gt as k, h as pe, hn as me, ht as he, jn as ge, kn as _e, mn as A, n as j, nn as ve, nr as ye, on as be, or as M, pt as xe, qn as N, qt as P, rn as Se, rr as F, rt as Ce, st as we, t as Te, tt as Ee, u as De, vn as I, vt as Oe, w as ke, wn as Ae, wt as je, x as Me, xn as Ne, xt as Pe, yn as Fe, zt as Ie } from "./9dwUocbOsJuAcmKn.mjs";
|
|
8
|
+
import { BufferUtils as Le, CommonUtils as L, ExpectedError as Re, OverlappingRange as ze, RangeAxis as Be } from "@sheetxl/utils";
|
|
9
|
+
import { AddressUtils as R, CommonUtils as Ve, CoordUtils as He, FormulaError as z, FormulaText as Ue, ICellStyle as B, ICondition as V, IConditionalFormat as H, ICustomProperty as U, IFont as We, IRange as Ge, OutOfBoundsError as Ke, PersonCollection as qe, ResourceCollection as Je, RichDataRegistry as Ye, Sort as Xe, Theme as Ze, Tuple as Qe, Workbook as $e } from "@sheetxl/sdk";
|
|
10
|
+
var et = {
|
|
11
11
|
ascending: "ascending",
|
|
12
12
|
descending: "descending",
|
|
13
13
|
natural: "dataSource"
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function tt(e, t) {
|
|
16
16
|
if (!t) return null;
|
|
17
17
|
for (let n = 0; n < e.length; n++) if (e[n].id !== void 0 && String(e[n].id) === t) return e[n];
|
|
18
18
|
let n = Number(t);
|
|
19
19
|
return Number.isInteger(n) && n >= 1 && n <= e.length ? e[n - 1] : null;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function nt(e, t, n) {
|
|
22
22
|
let r = {
|
|
23
23
|
...t,
|
|
24
24
|
source: n
|
|
@@ -28,50 +28,68 @@ function Ze(e, t, n) {
|
|
|
28
28
|
t > 0 && t !== 27 && (r.rowHeight = t);
|
|
29
29
|
}
|
|
30
30
|
e.style && e.style !== "SlicerStyleLight1" && (r.style = e.style);
|
|
31
|
-
let i = e.sortOrder ?
|
|
31
|
+
let i = e.sortOrder ? et[e.sortOrder] : void 0;
|
|
32
32
|
return i && i !== "ascending" && (r.sortOrder = i), e.crossFilter && e.crossFilter !== "showItemsWithDataAtTop" && (r.crossFilter = e.crossFilter), e.lockedPosition && (r.lockedPosition = !0), !1 === e.customListSort && (r.disabledCustomListSort = !0), e.cacheName && (r.cacheName = e.cacheName), e.startItem && (r.startItem = e.startItem), e.level !== void 0 && (r.level = e.level), e.uid && (r.uid = e.uid), r;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var rt = "xl/richData/rdrichvaluestructure.xml", it = "xl/richData/rdrichvalue.xml", at = "xl/richData/rdarray.xml", ot = "xl/richData/rdsupportingpropertybagstructure.xml", st = "xl/richData/rdsupportingpropertybag.xml", ct = "xl/richData/rdRichValueTypes.xml", lt = "xl/richData/richStyles.xml", W = (e, t) => {
|
|
35
|
+
let n = [], r = e?.childNodes, i = r?.length ?? 0;
|
|
36
|
+
for (let e = 0; e < i; e++) {
|
|
37
|
+
let i = r.item(e);
|
|
38
|
+
i.nodeType !== 1 || t && i.localName !== t || n.push(i);
|
|
39
|
+
}
|
|
40
|
+
return n;
|
|
41
|
+
}, ut = (e) => W(e, "k").map((e) => [e.getAttribute("n") ?? "", e.getAttribute("t") || null]), dt = (e) => W(e, "v").map((e) => ({
|
|
42
|
+
t: e.getAttribute("t") || null,
|
|
43
|
+
text: e.textContent ?? ""
|
|
44
|
+
})), ft = (e) => {
|
|
45
|
+
let t = /* @__PURE__ */ new Map();
|
|
46
|
+
for (let n of W(e, "key")) {
|
|
47
|
+
let e = /* @__PURE__ */ new Map();
|
|
48
|
+
for (let t of W(n, "flag")) e.set(t.getAttribute("name") ?? "", t.getAttribute("value") ?? "");
|
|
49
|
+
t.set(n.getAttribute("name") ?? "", e);
|
|
50
|
+
}
|
|
51
|
+
return t;
|
|
52
|
+
}, pt = /* @__PURE__ */ new Uint8Array(), mt = class t {
|
|
35
53
|
constructor(e, t, n) {
|
|
36
54
|
this.buffers = /* @__PURE__ */ new Map(), this.zip = e, this.entries = t, this.rawBuffer = n;
|
|
37
55
|
}
|
|
38
56
|
static normalize(e) {
|
|
39
57
|
return e.startsWith("/") ? e.slice(1) : e;
|
|
40
58
|
}
|
|
41
|
-
static async create(
|
|
42
|
-
let
|
|
43
|
-
for (let e of await
|
|
44
|
-
return new
|
|
59
|
+
static async create(n) {
|
|
60
|
+
let r = n instanceof Blob ? pt : n instanceof Uint8Array ? n : new Uint8Array(n), i = n instanceof Blob ? new e(n) : new ye(r), a = new x(i), o = /* @__PURE__ */ new Map();
|
|
61
|
+
for (let e of await a.getEntries()) e.directory || o.set(e.filename, e);
|
|
62
|
+
return new t(a, o, r);
|
|
45
63
|
}
|
|
46
64
|
getNames() {
|
|
47
65
|
return [...this.entries.keys()];
|
|
48
66
|
}
|
|
49
|
-
has(
|
|
50
|
-
return this.entries.has(
|
|
67
|
+
has(e) {
|
|
68
|
+
return this.entries.has(t.normalize(e));
|
|
51
69
|
}
|
|
52
|
-
uncompressedSize(
|
|
53
|
-
return this.entries.get(
|
|
70
|
+
uncompressedSize(e) {
|
|
71
|
+
return this.entries.get(t.normalize(e))?.uncompressedSize ?? 0;
|
|
54
72
|
}
|
|
55
|
-
async getBuffer(
|
|
56
|
-
let n =
|
|
73
|
+
async getBuffer(e) {
|
|
74
|
+
let n = t.normalize(e), r = this.buffers.get(n);
|
|
57
75
|
if (r) return r;
|
|
58
76
|
let i = this.entries.get(n);
|
|
59
77
|
if (!i) return null;
|
|
60
|
-
let a = await i.getData(new
|
|
78
|
+
let a = await i.getData(new F());
|
|
61
79
|
return this.buffers.set(n, a), a;
|
|
62
80
|
}
|
|
63
81
|
async prefetch(e) {
|
|
64
82
|
let t = [];
|
|
65
|
-
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new
|
|
83
|
+
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new F()).then((e) => {
|
|
66
84
|
this.buffers.set(n, e);
|
|
67
85
|
}));
|
|
68
86
|
await Promise.all(t);
|
|
69
87
|
}
|
|
70
|
-
getEntry(
|
|
71
|
-
return this.buffers.get(
|
|
88
|
+
getEntry(e) {
|
|
89
|
+
return this.buffers.get(t.normalize(e)) ?? null;
|
|
72
90
|
}
|
|
73
|
-
async getTextStream(
|
|
74
|
-
let r = this.entries.get(
|
|
91
|
+
async getTextStream(e, n) {
|
|
92
|
+
let r = this.entries.get(t.normalize(e));
|
|
75
93
|
if (!r) return null;
|
|
76
94
|
let i = new TransformStream();
|
|
77
95
|
r.getData(i.writable).catch(() => {});
|
|
@@ -88,8 +106,8 @@ var Qe = /* @__PURE__ */ new Uint8Array(), $e = class e {
|
|
|
88
106
|
i && e.enqueue(i);
|
|
89
107
|
} }).getReader();
|
|
90
108
|
}
|
|
91
|
-
getRawEntry(
|
|
92
|
-
let n = this.entries.get(
|
|
109
|
+
getRawEntry(e) {
|
|
110
|
+
let n = this.entries.get(t.normalize(e));
|
|
93
111
|
if (!n || n.encrypted || n.crc32 === void 0) return null;
|
|
94
112
|
let r = n.offset;
|
|
95
113
|
if (r + 30 > this.rawBuffer.byteLength) return null;
|
|
@@ -105,18 +123,18 @@ var Qe = /* @__PURE__ */ new Uint8Array(), $e = class e {
|
|
|
105
123
|
async close() {
|
|
106
124
|
await this.zip.close();
|
|
107
125
|
}
|
|
108
|
-
},
|
|
126
|
+
}, ht = class {
|
|
109
127
|
constructor(e) {
|
|
110
|
-
this._sink = e, this._samples = [], this._t0 =
|
|
128
|
+
this._sink = e, this._samples = [], this._t0 = gt(), this._tPrev = this._t0, this._heapPrev = _t();
|
|
111
129
|
}
|
|
112
130
|
mark(e) {
|
|
113
|
-
let t =
|
|
131
|
+
let t = gt(), n = _t(), r = {
|
|
114
132
|
label: e,
|
|
115
133
|
tMs: t - this._t0,
|
|
116
134
|
dtMs: t - this._tPrev,
|
|
117
135
|
heapBytes: n,
|
|
118
136
|
dHeapBytes: n !== void 0 && this._heapPrev !== void 0 ? n - this._heapPrev : void 0,
|
|
119
|
-
rssBytes:
|
|
137
|
+
rssBytes: vt()
|
|
120
138
|
};
|
|
121
139
|
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
122
140
|
}
|
|
@@ -128,91 +146,91 @@ var Qe = /* @__PURE__ */ new Uint8Array(), $e = class e {
|
|
|
128
146
|
phase: e.label,
|
|
129
147
|
tMs: Math.round(e.tMs),
|
|
130
148
|
dtMs: Math.round(e.dtMs),
|
|
131
|
-
heapMB: e.heapBytes === void 0 ? "—" :
|
|
132
|
-
dHeapMB: e.dHeapBytes === void 0 ? "—" :
|
|
133
|
-
rssMB: e.rssBytes === void 0 ? "—" :
|
|
149
|
+
heapMB: e.heapBytes === void 0 ? "—" : yt(e.heapBytes / 1048576),
|
|
150
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : yt(e.dHeapBytes / 1048576),
|
|
151
|
+
rssMB: e.rssBytes === void 0 ? "—" : yt(e.rssBytes / 1048576)
|
|
134
152
|
}));
|
|
135
153
|
}
|
|
136
|
-
},
|
|
137
|
-
function
|
|
154
|
+
}, gt = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
155
|
+
function _t() {
|
|
138
156
|
let e = typeof performance == "object" ? performance.memory : void 0;
|
|
139
157
|
if (e && typeof e.usedJSHeapSize == "number") return e.usedJSHeapSize;
|
|
140
158
|
let t = globalThis.process;
|
|
141
159
|
return typeof t == "object" && typeof t.memoryUsage == "function" ? t.memoryUsage().heapUsed : void 0;
|
|
142
160
|
}
|
|
143
|
-
function
|
|
161
|
+
function vt() {
|
|
144
162
|
let e = globalThis.process;
|
|
145
163
|
if (typeof e == "object" && typeof e.memoryUsage == "function") return e.memoryUsage().rss;
|
|
146
164
|
}
|
|
147
|
-
function
|
|
165
|
+
function yt(e) {
|
|
148
166
|
return Math.round(10 * e) / 10;
|
|
149
167
|
}
|
|
150
|
-
var
|
|
168
|
+
var bt = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", xt = `-${bt}.0-9·̀-ͯ‿-⁀`, St = (RegExp(`^[${bt}]$`, "u"), RegExp(`^[${xt}]$`, "u"), RegExp(`^[${bt}][${xt}]*$`, "u")), Ct = (RegExp(`^[${xt}]+$`, "u"), [
|
|
151
169
|
32,
|
|
152
170
|
10,
|
|
153
171
|
13,
|
|
154
172
|
9
|
|
155
173
|
]);
|
|
156
|
-
function
|
|
174
|
+
function G(e) {
|
|
157
175
|
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;
|
|
158
176
|
}
|
|
159
|
-
var
|
|
160
|
-
RegExp(`^[${
|
|
161
|
-
var
|
|
162
|
-
function
|
|
177
|
+
var wt = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Tt = `-${wt}.0-9·̀-ͯ‿-⁀`;
|
|
178
|
+
RegExp(`^[${wt}]$`, "u"), RegExp(`^[${Tt}]$`, "u"), RegExp(`^[${wt}][${Tt}]*$`, "u"), RegExp(`^[${Tt}]+$`, "u");
|
|
179
|
+
var Et = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Dt = `-${Et}.0-9·̀-ͯ‿-⁀`, Ot = (RegExp(`^[${Et}]$`, "u"), RegExp(`^[${Dt}]$`, "u"), RegExp(`^[${Et}][${Dt}]*$`, "u"));
|
|
180
|
+
function kt(e) {
|
|
163
181
|
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;
|
|
164
182
|
}
|
|
165
183
|
var K = function(e) {
|
|
166
184
|
return e === 32 || e === 10 || e === 13 || e === 9;
|
|
167
|
-
},
|
|
185
|
+
}, At = function(e) {
|
|
168
186
|
return e >= 32 && e <= 55295 || e === 10 || e === 13 || e === 9 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
169
|
-
},
|
|
170
|
-
return
|
|
171
|
-
},
|
|
187
|
+
}, jt = G, Mt = function(e) {
|
|
188
|
+
return G(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
189
|
+
}, Nt = Ct, Pt = St, Ft = function(e) {
|
|
172
190
|
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
173
|
-
},
|
|
174
|
-
return
|
|
175
|
-
},
|
|
191
|
+
}, It = kt, Lt = function(e) {
|
|
192
|
+
return kt(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
193
|
+
}, Rt = Ot, zt = "http://www.w3.org/XML/1998/namespace", Bt = "http://www.w3.org/2000/xmlns/", Vt = {
|
|
176
194
|
__proto__: null,
|
|
177
|
-
xml:
|
|
178
|
-
xmlns:
|
|
179
|
-
},
|
|
195
|
+
xml: zt,
|
|
196
|
+
xmlns: Bt
|
|
197
|
+
}, Ht = {
|
|
180
198
|
__proto__: null,
|
|
181
199
|
amp: "&",
|
|
182
200
|
gt: ">",
|
|
183
201
|
lt: "<",
|
|
184
202
|
quot: "\"",
|
|
185
203
|
apos: "'"
|
|
186
|
-
}, q = -1,
|
|
187
|
-
...
|
|
204
|
+
}, q = -1, Ut = -2, J = 13, Wt = 33, Gt = 10, Kt = 60, qt = 61, Y = 62, X = 63, Jt = 93, Yt = (e) => e === 34 || e === 39, Xt = [34, 39], Zt = [
|
|
205
|
+
...Xt,
|
|
188
206
|
91,
|
|
189
207
|
Y
|
|
190
|
-
],
|
|
191
|
-
...
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
],
|
|
195
|
-
|
|
208
|
+
], Qt = [
|
|
209
|
+
...Xt,
|
|
210
|
+
Kt,
|
|
211
|
+
Jt
|
|
212
|
+
], $t = [
|
|
213
|
+
qt,
|
|
196
214
|
X,
|
|
197
|
-
...
|
|
198
|
-
],
|
|
199
|
-
...
|
|
215
|
+
...Nt
|
|
216
|
+
], en = [
|
|
217
|
+
...Nt,
|
|
200
218
|
Y,
|
|
201
219
|
38,
|
|
202
|
-
|
|
220
|
+
Kt
|
|
203
221
|
];
|
|
204
|
-
function
|
|
222
|
+
function tn(e, t, n) {
|
|
205
223
|
switch (t) {
|
|
206
224
|
case "xml":
|
|
207
|
-
n !==
|
|
225
|
+
n !== zt && e.fail(`xml prefix must be bound to ${zt}.`);
|
|
208
226
|
break;
|
|
209
|
-
case "xmlns": n !==
|
|
227
|
+
case "xmlns": n !== Bt && e.fail(`xmlns prefix must be bound to ${Bt}.`);
|
|
210
228
|
}
|
|
211
229
|
switch (n) {
|
|
212
|
-
case
|
|
213
|
-
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
230
|
+
case Bt:
|
|
231
|
+
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${Bt}.`);
|
|
214
232
|
break;
|
|
215
|
-
case
|
|
233
|
+
case zt: switch (t) {
|
|
216
234
|
case "xml": break;
|
|
217
235
|
case "":
|
|
218
236
|
e.fail(`the default namespace may not be set to ${n}.`);
|
|
@@ -221,7 +239,7 @@ function Bt(e, t, n) {
|
|
|
221
239
|
}
|
|
222
240
|
}
|
|
223
241
|
}
|
|
224
|
-
var
|
|
242
|
+
var nn, rn = (e) => Rt.test(e), an = (e) => Pt.test(e), on = {
|
|
225
243
|
xmldecl: "xmlDeclHandler",
|
|
226
244
|
text: "textHandler",
|
|
227
245
|
processinginstruction: "piHandler",
|
|
@@ -235,7 +253,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
235
253
|
error: "errorHandler",
|
|
236
254
|
end: "endHandler",
|
|
237
255
|
ready: "readyHandler"
|
|
238
|
-
},
|
|
256
|
+
}, sn = class {
|
|
239
257
|
get closed() {
|
|
240
258
|
return this._closed;
|
|
241
259
|
}
|
|
@@ -243,15 +261,15 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
243
261
|
this.i = 0, this.prevI = 0, this.opt = e ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
244
262
|
let t = this.xmlnsOpt = !!this.opt.xmlns;
|
|
245
263
|
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, t) {
|
|
246
|
-
this.nameStartCheck =
|
|
264
|
+
this.nameStartCheck = It, this.nameCheck = Lt, this.isName = rn, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
247
265
|
__proto__: null,
|
|
248
|
-
...
|
|
266
|
+
...Vt
|
|
249
267
|
};
|
|
250
268
|
let e = this.opt.additionalNamespaces;
|
|
251
269
|
e != null && (function(e, t) {
|
|
252
|
-
for (let n of Object.keys(t))
|
|
270
|
+
for (let n of Object.keys(t)) tn(e, n, t[n]);
|
|
253
271
|
}(this, e), Object.assign(this.ns, e));
|
|
254
|
-
} else this.nameStartCheck =
|
|
272
|
+
} else this.nameStartCheck = jt, this.nameCheck = Mt, this.isName = an, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
255
273
|
this.stateTable = [
|
|
256
274
|
this.sBegin,
|
|
257
275
|
this.sBeginWhitespace,
|
|
@@ -313,7 +331,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
313
331
|
version: void 0,
|
|
314
332
|
encoding: void 0,
|
|
315
333
|
standalone: void 0
|
|
316
|
-
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
334
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(Ht), this.readyHandler?.();
|
|
317
335
|
}
|
|
318
336
|
get position() {
|
|
319
337
|
return this.chunkPosition + this.i;
|
|
@@ -322,10 +340,10 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
322
340
|
return this.position - this.positionAtNewLine;
|
|
323
341
|
}
|
|
324
342
|
on(e, t) {
|
|
325
|
-
this[
|
|
343
|
+
this[on[e]] = t;
|
|
326
344
|
}
|
|
327
345
|
off(e) {
|
|
328
|
-
this[
|
|
346
|
+
this[on[e]] = void 0;
|
|
329
347
|
}
|
|
330
348
|
makeError(e) {
|
|
331
349
|
let t = this.fileName ?? "";
|
|
@@ -356,8 +374,8 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
356
374
|
if (this.column++, n < 55296) {
|
|
357
375
|
if (n >= 32 || n === 9) return n;
|
|
358
376
|
switch (n) {
|
|
359
|
-
case
|
|
360
|
-
case 13: return e.charCodeAt(t + 1) ===
|
|
377
|
+
case Gt: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Gt;
|
|
378
|
+
case 13: return e.charCodeAt(t + 1) === Gt && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, Ut;
|
|
361
379
|
default: return this.fail("disallowed character."), n;
|
|
362
380
|
}
|
|
363
381
|
}
|
|
@@ -372,13 +390,13 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
372
390
|
if (this.column++, n < 55296) {
|
|
373
391
|
if (n > 31 && n < 127 || n > 159 && n !== 8232 || n === 9) return n;
|
|
374
392
|
switch (n) {
|
|
375
|
-
case
|
|
393
|
+
case Gt: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Gt;
|
|
376
394
|
case 13: {
|
|
377
395
|
let n = e.charCodeAt(t + 1);
|
|
378
|
-
n !==
|
|
396
|
+
n !== Gt && n !== 133 || (this.i = t + 2);
|
|
379
397
|
}
|
|
380
398
|
case 133:
|
|
381
|
-
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
399
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Ut;
|
|
382
400
|
default: return this.fail("disallowed character."), n;
|
|
383
401
|
}
|
|
384
402
|
}
|
|
@@ -388,7 +406,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
388
406
|
}
|
|
389
407
|
getCodeNorm() {
|
|
390
408
|
let e = this.getCode();
|
|
391
|
-
return e ===
|
|
409
|
+
return e === Ut ? Gt : e;
|
|
392
410
|
}
|
|
393
411
|
unGet() {
|
|
394
412
|
this.i = this.prevI, this.column--;
|
|
@@ -396,7 +414,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
396
414
|
captureTo(e) {
|
|
397
415
|
let { i: t } = this, { chunk: n } = this;
|
|
398
416
|
for (;;) {
|
|
399
|
-
let r = this.getCode(), i = r ===
|
|
417
|
+
let r = this.getCode(), i = r === Ut, a = i ? Gt : r;
|
|
400
418
|
if (a === q || e.includes(a)) return this.text += n.slice(t, this.prevI), a;
|
|
401
419
|
i && (this.text += `${n.slice(t, this.prevI)}\n`, t = this.i);
|
|
402
420
|
}
|
|
@@ -406,8 +424,8 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
406
424
|
for (;;) {
|
|
407
425
|
let r = this.getCode();
|
|
408
426
|
switch (r) {
|
|
409
|
-
case
|
|
410
|
-
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r =
|
|
427
|
+
case Ut:
|
|
428
|
+
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r = Gt;
|
|
411
429
|
break;
|
|
412
430
|
case q: return this.text += n.slice(t), !1;
|
|
413
431
|
}
|
|
@@ -419,7 +437,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
419
437
|
for (;;) {
|
|
420
438
|
let n = this.getCode();
|
|
421
439
|
if (n === q) return this.name += e.slice(t), q;
|
|
422
|
-
if (!
|
|
440
|
+
if (!Mt(n)) return this.name += e.slice(t, this.prevI), n === Ut ? Gt : n;
|
|
423
441
|
}
|
|
424
442
|
}
|
|
425
443
|
skipSpaces() {
|
|
@@ -429,7 +447,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
429
447
|
}
|
|
430
448
|
}
|
|
431
449
|
setXMLVersion(e) {
|
|
432
|
-
this.currentXMLVersion = e, e === "1.0" ? (this.isChar =
|
|
450
|
+
this.currentXMLVersion = e, e === "1.0" ? (this.isChar = At, this.getCode = this.getCode10) : (this.isChar = Ft, this.getCode = this.getCode11);
|
|
433
451
|
}
|
|
434
452
|
sBegin() {
|
|
435
453
|
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
@@ -437,7 +455,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
437
455
|
sBeginWhitespace() {
|
|
438
456
|
let e = this.i, t = this.skipSpaces();
|
|
439
457
|
switch (this.prevI !== e && (this.xmlDeclPossible = !1), t) {
|
|
440
|
-
case
|
|
458
|
+
case Kt:
|
|
441
459
|
if (this.state = 15, this.text.length !== 0) throw Error("no-empty text at start");
|
|
442
460
|
break;
|
|
443
461
|
case q: break;
|
|
@@ -445,13 +463,13 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
445
463
|
}
|
|
446
464
|
}
|
|
447
465
|
sDoctype() {
|
|
448
|
-
let e = this.captureTo(
|
|
466
|
+
let e = this.captureTo(Zt);
|
|
449
467
|
switch (e) {
|
|
450
468
|
case Y:
|
|
451
469
|
this.doctypeHandler?.(this.text), this.text = "", this.state = J, this.doctype = !0;
|
|
452
470
|
break;
|
|
453
471
|
case q: break;
|
|
454
|
-
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 :
|
|
472
|
+
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 : Yt(e) && (this.state = 3, this.q = e);
|
|
455
473
|
}
|
|
456
474
|
}
|
|
457
475
|
sDoctypeQuote() {
|
|
@@ -459,8 +477,8 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
459
477
|
this.captureToChar(e) && (this.text += String.fromCodePoint(e), this.q = null, this.state = 2);
|
|
460
478
|
}
|
|
461
479
|
sDTD() {
|
|
462
|
-
let e = this.captureTo(
|
|
463
|
-
e !== q && (this.text += String.fromCodePoint(e), e ===
|
|
480
|
+
let e = this.captureTo(Qt);
|
|
481
|
+
e !== q && (this.text += String.fromCodePoint(e), e === Jt ? this.state = 2 : e === Kt ? this.state = 6 : Yt(e) && (this.state = 5, this.q = e));
|
|
464
482
|
}
|
|
465
483
|
sDTDQuoted() {
|
|
466
484
|
let e = this.q;
|
|
@@ -506,7 +524,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
506
524
|
sEntity() {
|
|
507
525
|
let { i: e } = this, { chunk: t } = this;
|
|
508
526
|
t: for (;;) switch (this.getCode()) {
|
|
509
|
-
case
|
|
527
|
+
case Ut:
|
|
510
528
|
this.entity += `${t.slice(e, this.prevI)}\n`, e = this.i;
|
|
511
529
|
break;
|
|
512
530
|
case 59: {
|
|
@@ -521,7 +539,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
521
539
|
}
|
|
522
540
|
sOpenWaka() {
|
|
523
541
|
let e = this.getCode();
|
|
524
|
-
if (
|
|
542
|
+
if (jt(e)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
525
543
|
else switch (e) {
|
|
526
544
|
case 47:
|
|
527
545
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -561,11 +579,11 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
561
579
|
e === Y ? this.state = J : (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(e)}`, this.state = 17);
|
|
562
580
|
}
|
|
563
581
|
sCData() {
|
|
564
|
-
this.captureToChar(
|
|
582
|
+
this.captureToChar(Jt) && (this.state = 21);
|
|
565
583
|
}
|
|
566
584
|
sCDataEnding() {
|
|
567
585
|
let e = this.getCodeNorm();
|
|
568
|
-
e ===
|
|
586
|
+
e === Jt ? this.state = 22 : (this.text += `]${String.fromCodePoint(e)}`, this.state = 20);
|
|
569
587
|
}
|
|
570
588
|
sCDataEnding2() {
|
|
571
589
|
let e = this.getCodeNorm();
|
|
@@ -573,7 +591,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
573
591
|
case Y:
|
|
574
592
|
this.cdataHandler?.(this.text), this.text = "", this.state = J;
|
|
575
593
|
break;
|
|
576
|
-
case
|
|
594
|
+
case Jt:
|
|
577
595
|
this.text += "]";
|
|
578
596
|
break;
|
|
579
597
|
default: this.text += `]]${String.fromCodePoint(e)}`, this.state = 20;
|
|
@@ -591,7 +609,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
591
609
|
if (!this.nameCheck(n)) {
|
|
592
610
|
this.piTarget += e.slice(t, this.prevI);
|
|
593
611
|
let r = n === X;
|
|
594
|
-
r || K(n) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = r ?
|
|
612
|
+
r || K(n) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = r ? Wt : 27) : this.state = r ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(n));
|
|
595
613
|
break;
|
|
596
614
|
}
|
|
597
615
|
}
|
|
@@ -615,12 +633,12 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
615
633
|
}
|
|
616
634
|
sXMLDeclNameStart() {
|
|
617
635
|
let e = this.skipSpaces();
|
|
618
|
-
e === X ? this.state =
|
|
636
|
+
e === X ? this.state = Wt : e !== q && (this.state = 28, this.name = String.fromCodePoint(e));
|
|
619
637
|
}
|
|
620
638
|
sXMLDeclName() {
|
|
621
|
-
let e = this.captureTo(
|
|
622
|
-
if (e === X) return this.state =
|
|
623
|
-
if (K(e) || e ===
|
|
639
|
+
let e = this.captureTo($t);
|
|
640
|
+
if (e === X) return this.state = Wt, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
641
|
+
if (K(e) || e === qt) {
|
|
624
642
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
625
643
|
case 0:
|
|
626
644
|
this.fail("did not expect any more name/value pairs.");
|
|
@@ -630,22 +648,22 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
630
648
|
break;
|
|
631
649
|
default: this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`);
|
|
632
650
|
}
|
|
633
|
-
this.state = e ===
|
|
651
|
+
this.state = e === qt ? 30 : 29;
|
|
634
652
|
}
|
|
635
653
|
}
|
|
636
654
|
sXMLDeclEq() {
|
|
637
655
|
let e = this.getCodeNorm();
|
|
638
|
-
if (e === X) return this.state =
|
|
639
|
-
K(e) || (e !==
|
|
656
|
+
if (e === X) return this.state = Wt, void this.fail("XML declaration is incomplete.");
|
|
657
|
+
K(e) || (e !== qt && this.fail("value required."), this.state = 30);
|
|
640
658
|
}
|
|
641
659
|
sXMLDeclValueStart() {
|
|
642
660
|
let e = this.getCodeNorm();
|
|
643
|
-
if (e === X) return this.state =
|
|
644
|
-
K(e) || (
|
|
661
|
+
if (e === X) return this.state = Wt, void this.fail("XML declaration is incomplete.");
|
|
662
|
+
K(e) || (Yt(e) ? this.q = e : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
645
663
|
}
|
|
646
664
|
sXMLDeclValue() {
|
|
647
665
|
let e = this.captureTo([this.q, X]);
|
|
648
|
-
if (e === X) return this.state =
|
|
666
|
+
if (e === X) return this.state = Wt, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
649
667
|
if (e === q) return;
|
|
650
668
|
let t = this.text;
|
|
651
669
|
switch (this.text = "", this.name) {
|
|
@@ -664,7 +682,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
664
682
|
}
|
|
665
683
|
sXMLDeclSeparator() {
|
|
666
684
|
let e = this.getCodeNorm();
|
|
667
|
-
e === X ? this.state =
|
|
685
|
+
e === X ? this.state = Wt : (K(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
668
686
|
}
|
|
669
687
|
sXMLDeclEnding() {
|
|
670
688
|
this.getCodeNorm() === Y ? (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 = J) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
@@ -691,25 +709,25 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
691
709
|
}
|
|
692
710
|
sAttrib() {
|
|
693
711
|
let e = this.skipSpaces();
|
|
694
|
-
e !== q && (
|
|
712
|
+
e !== q && (jt(e) ? (this.unGet(), this.state = 37) : e === Y ? this.openTag() : e === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
695
713
|
}
|
|
696
714
|
sAttribName() {
|
|
697
715
|
let e = this.captureNameChars();
|
|
698
|
-
e ===
|
|
716
|
+
e === qt ? this.state = 39 : K(e) ? this.state = 38 : e === Y ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : e !== q && this.fail("disallowed character in attribute name.");
|
|
699
717
|
}
|
|
700
718
|
sAttribNameSawWhite() {
|
|
701
719
|
let e = this.skipSpaces();
|
|
702
720
|
switch (e) {
|
|
703
721
|
case q: return;
|
|
704
|
-
case
|
|
722
|
+
case qt:
|
|
705
723
|
this.state = 39;
|
|
706
724
|
break;
|
|
707
|
-
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() :
|
|
725
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() : jt(e) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
708
726
|
}
|
|
709
727
|
}
|
|
710
728
|
sAttribValue() {
|
|
711
729
|
let e = this.getCodeNorm();
|
|
712
|
-
|
|
730
|
+
Yt(e) ? (this.q = e, this.state = 40) : K(e) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
713
731
|
}
|
|
714
732
|
sAttribValueQuoted() {
|
|
715
733
|
let { q: e, chunk: t } = this, { i: n } = this;
|
|
@@ -720,12 +738,12 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
720
738
|
case 38:
|
|
721
739
|
this.text += t.slice(n, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
722
740
|
return;
|
|
723
|
-
case
|
|
724
|
-
case
|
|
741
|
+
case Gt:
|
|
742
|
+
case Ut:
|
|
725
743
|
case 9:
|
|
726
744
|
this.text += `${t.slice(n, this.prevI)} `, n = this.i;
|
|
727
745
|
break;
|
|
728
|
-
case
|
|
746
|
+
case Kt:
|
|
729
747
|
this.text += t.slice(n, this.prevI), this.fail("disallowed character.");
|
|
730
748
|
return;
|
|
731
749
|
case q:
|
|
@@ -735,15 +753,15 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
735
753
|
}
|
|
736
754
|
sAttribValueClosed() {
|
|
737
755
|
let e = this.getCodeNorm();
|
|
738
|
-
K(e) ? this.state = 36 : e === Y ? this.openTag() : e === 47 ? this.state = 35 :
|
|
756
|
+
K(e) ? this.state = 36 : e === Y ? this.openTag() : e === 47 ? this.state = 35 : jt(e) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
739
757
|
}
|
|
740
758
|
sAttribValueUnquoted() {
|
|
741
|
-
let e = this.captureTo(
|
|
759
|
+
let e = this.captureTo(en);
|
|
742
760
|
switch (e) {
|
|
743
761
|
case 38:
|
|
744
762
|
this.state = 14, this.entityReturnState = 42;
|
|
745
763
|
break;
|
|
746
|
-
case
|
|
764
|
+
case Kt:
|
|
747
765
|
this.fail("disallowed character.");
|
|
748
766
|
break;
|
|
749
767
|
case q: break;
|
|
@@ -766,7 +784,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
766
784
|
handleTextInRoot() {
|
|
767
785
|
let { i: e, forbiddenState: t } = this, { chunk: n, textHandler: r } = this;
|
|
768
786
|
t: for (;;) switch (this.getCode()) {
|
|
769
|
-
case
|
|
787
|
+
case Kt:
|
|
770
788
|
if (this.state = 15, r !== void 0) {
|
|
771
789
|
let { text: t } = this, i = n.slice(e, this.prevI);
|
|
772
790
|
t.length === 0 ? i.length !== 0 && r(i) : (r(t + i), this.text = "");
|
|
@@ -776,7 +794,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
776
794
|
case 38:
|
|
777
795
|
this.state = 14, this.entityReturnState = J, r !== void 0 && (this.text += n.slice(e, this.prevI)), t = 0;
|
|
778
796
|
break t;
|
|
779
|
-
case
|
|
797
|
+
case Jt:
|
|
780
798
|
switch (t) {
|
|
781
799
|
case 0:
|
|
782
800
|
t = 1;
|
|
@@ -791,7 +809,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
791
809
|
case Y:
|
|
792
810
|
t === 2 && this.fail("the string \"]]>\" is disallowed in char data."), t = 0;
|
|
793
811
|
break;
|
|
794
|
-
case
|
|
812
|
+
case Ut:
|
|
795
813
|
r !== void 0 && (this.text += `${n.slice(e, this.prevI)}\n`), e = this.i, t = 0;
|
|
796
814
|
break;
|
|
797
815
|
case q:
|
|
@@ -806,7 +824,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
806
824
|
t: for (;;) {
|
|
807
825
|
let i = this.getCode();
|
|
808
826
|
switch (i) {
|
|
809
|
-
case
|
|
827
|
+
case Kt:
|
|
810
828
|
if (this.state = 15, n !== void 0) {
|
|
811
829
|
let { text: r } = this, i = t.slice(e, this.prevI);
|
|
812
830
|
r.length === 0 ? i.length !== 0 && n(i) : (n(r + i), this.text = "");
|
|
@@ -815,7 +833,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
815
833
|
case 38:
|
|
816
834
|
this.state = 14, this.entityReturnState = J, n !== void 0 && (this.text += t.slice(e, this.prevI)), r = !0;
|
|
817
835
|
break t;
|
|
818
|
-
case
|
|
836
|
+
case Ut:
|
|
819
837
|
n !== void 0 && (this.text += `${t.slice(e, this.prevI)}\n`), e = this.i;
|
|
820
838
|
break;
|
|
821
839
|
case q:
|
|
@@ -835,10 +853,10 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
835
853
|
};
|
|
836
854
|
if (this.attribList.push(i), this.attributeHandler?.(i), n === "xmlns") {
|
|
837
855
|
let e = t.trim();
|
|
838
|
-
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e,
|
|
856
|
+
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e, tn(this, r, e);
|
|
839
857
|
} else if (e === "xmlns") {
|
|
840
858
|
let e = t.trim();
|
|
841
|
-
this.topNS[""] = e,
|
|
859
|
+
this.topNS[""] = e, tn(this, "", e);
|
|
842
860
|
}
|
|
843
861
|
}
|
|
844
862
|
pushAttribPlain(e, t) {
|
|
@@ -890,7 +908,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
890
908
|
let { attributes: n } = t, r = /* @__PURE__ */ new Set();
|
|
891
909
|
for (let t of e) {
|
|
892
910
|
let { name: e, prefix: i, local: a } = t, o, s;
|
|
893
|
-
i === "" ? (o = e === "xmlns" ?
|
|
911
|
+
i === "" ? (o = e === "xmlns" ? Bt : "", 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;
|
|
894
912
|
}
|
|
895
913
|
this.attribList = [];
|
|
896
914
|
}
|
|
@@ -928,21 +946,21 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
928
946
|
let t = NaN;
|
|
929
947
|
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};`);
|
|
930
948
|
}
|
|
931
|
-
},
|
|
949
|
+
}, cn = /&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g, ln = {
|
|
932
950
|
amp: "&",
|
|
933
951
|
lt: "<",
|
|
934
952
|
gt: ">",
|
|
935
953
|
quot: "\"",
|
|
936
954
|
apos: "'"
|
|
937
|
-
},
|
|
938
|
-
let n =
|
|
955
|
+
}, un = (e, t) => {
|
|
956
|
+
let n = ln[t];
|
|
939
957
|
if (n !== void 0) return n;
|
|
940
958
|
let r = t.charCodeAt(1) === 120 ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
|
|
941
959
|
return r > 0 && r <= 1114111 ? String.fromCodePoint(r) : e;
|
|
942
|
-
},
|
|
960
|
+
}, dn = (e) => {
|
|
943
961
|
let t = e;
|
|
944
|
-
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(
|
|
945
|
-
},
|
|
962
|
+
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(cn, un)), t;
|
|
963
|
+
}, fn = (e) => {
|
|
946
964
|
let t = e, n = t.length;
|
|
947
965
|
for (let e = 0; e < n; e++) {
|
|
948
966
|
let n = t.charCodeAt(e);
|
|
@@ -951,8 +969,8 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
951
969
|
break;
|
|
952
970
|
}
|
|
953
971
|
}
|
|
954
|
-
return t.indexOf("&") !== -1 && (t = t.replace(
|
|
955
|
-
},
|
|
972
|
+
return t.indexOf("&") !== -1 && (t = t.replace(cn, un)), t;
|
|
973
|
+
}, pn = (e) => e === 32 || e === 9 || e === 10 || e === 13, mn = class e {
|
|
956
974
|
constructor() {
|
|
957
975
|
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;
|
|
958
976
|
}
|
|
@@ -963,7 +981,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
963
981
|
this.NOT_HANDLED = -2;
|
|
964
982
|
}
|
|
965
983
|
static decodeText(e) {
|
|
966
|
-
return
|
|
984
|
+
return dn(e);
|
|
967
985
|
}
|
|
968
986
|
on(e, t) {
|
|
969
987
|
switch (e) {
|
|
@@ -1029,7 +1047,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
1029
1047
|
if (e.length === 0) return;
|
|
1030
1048
|
this._text = "";
|
|
1031
1049
|
let t = this._textHandler;
|
|
1032
|
-
t !== void 0 && this._tags.length !== 0 && t(
|
|
1050
|
+
t !== void 0 && this._tags.length !== 0 && t(dn(e));
|
|
1033
1051
|
}
|
|
1034
1052
|
_markup(t, n, r) {
|
|
1035
1053
|
if (n + 1 >= r) return -1;
|
|
@@ -1068,7 +1086,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
1068
1086
|
let i = n + 1 + o.name.length;
|
|
1069
1087
|
if (i >= r) return -1;
|
|
1070
1088
|
let a = t.charCodeAt(i);
|
|
1071
|
-
if (a === 62 || a === 47 ||
|
|
1089
|
+
if (a === 62 || a === 47 || pn(a)) {
|
|
1072
1090
|
this._flushText();
|
|
1073
1091
|
let i = o.scan(t, n, r);
|
|
1074
1092
|
if (i !== e.NOT_HANDLED) {
|
|
@@ -1086,11 +1104,11 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
1086
1104
|
}
|
|
1087
1105
|
_openTag(e, t, n) {
|
|
1088
1106
|
let r = t + 1, i = 0;
|
|
1089
|
-
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !
|
|
1107
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !pn(i));) r++;
|
|
1090
1108
|
if (r >= n) return -1;
|
|
1091
1109
|
let a = e.slice(t + 1, r), o = {}, s = !1;
|
|
1092
1110
|
for (;;) {
|
|
1093
|
-
for (; r < n &&
|
|
1111
|
+
for (; r < n && pn(i = e.charCodeAt(r));) r++;
|
|
1094
1112
|
if (r >= n) return -1;
|
|
1095
1113
|
if (i === 62) {
|
|
1096
1114
|
r++;
|
|
@@ -1106,16 +1124,16 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
1106
1124
|
break;
|
|
1107
1125
|
}
|
|
1108
1126
|
let t = r;
|
|
1109
|
-
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !
|
|
1127
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !pn(i));) r++;
|
|
1110
1128
|
if (r >= n) return -1;
|
|
1111
1129
|
let a = e.slice(t, r);
|
|
1112
|
-
for (; r < n &&
|
|
1130
|
+
for (; r < n && pn(i = e.charCodeAt(r));) r++;
|
|
1113
1131
|
if (r >= n) return -1;
|
|
1114
1132
|
if (i !== 61) {
|
|
1115
1133
|
this.fail("attribute without value.");
|
|
1116
1134
|
continue;
|
|
1117
1135
|
}
|
|
1118
|
-
for (r++; r < n &&
|
|
1136
|
+
for (r++; r < n && pn(i = e.charCodeAt(r));) r++;
|
|
1119
1137
|
if (r >= n) return -1;
|
|
1120
1138
|
if (i !== 34 && i !== 39) {
|
|
1121
1139
|
this.fail("unquoted attribute value.");
|
|
@@ -1123,7 +1141,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
1123
1141
|
}
|
|
1124
1142
|
let c = e.indexOf(i === 34 ? "\"" : "'", r + 1);
|
|
1125
1143
|
if (c === -1) return -1;
|
|
1126
|
-
a !== "__proto__" && (o[a] =
|
|
1144
|
+
a !== "__proto__" && (o[a] = fn(e.slice(r + 1, c))), r = c + 1;
|
|
1127
1145
|
}
|
|
1128
1146
|
this._flushText(), this._sawRoot = !0;
|
|
1129
1147
|
let c = {
|
|
@@ -1161,7 +1179,7 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
1161
1179
|
Ready: "ready"
|
|
1162
1180
|
}, e.parseStream = async (e, t, n) => {
|
|
1163
1181
|
if (n?.lean) return (async (e, t) => {
|
|
1164
|
-
let n = new
|
|
1182
|
+
let n = new mn(), r;
|
|
1165
1183
|
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);
|
|
1166
1184
|
let i = t.onEnd;
|
|
1167
1185
|
for (i && n.on("end", () => {
|
|
@@ -1173,13 +1191,13 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
1173
1191
|
}
|
|
1174
1192
|
return n.close(), r;
|
|
1175
1193
|
})(e, t);
|
|
1176
|
-
let r = new
|
|
1194
|
+
let r = new sn({
|
|
1177
1195
|
position: !1,
|
|
1178
1196
|
...n
|
|
1179
1197
|
}), i;
|
|
1180
|
-
t.onOpenTagStart && r.on(
|
|
1198
|
+
t.onOpenTagStart && r.on(nn.Events.OpenTagStart, t.onOpenTagStart), t.onOpenTag && r.on(nn.Events.OpenTag, t.onOpenTag), t.onCloseTag && r.on(nn.Events.CloseTag, t.onCloseTag), t.onAttribute && r.on(nn.Events.Attribute, t.onAttribute), t.onText && r.on(nn.Events.Text, t.onText), t.onError && r.on(nn.Events.Error, t.onError);
|
|
1181
1199
|
let a = t.onEnd;
|
|
1182
|
-
for (a && r.on(
|
|
1200
|
+
for (a && r.on(nn.Events.End, () => {
|
|
1183
1201
|
i = a();
|
|
1184
1202
|
});;) {
|
|
1185
1203
|
let { value: t, done: n } = await e.read();
|
|
@@ -1188,14 +1206,14 @@ var Vt, Ht = (e) => Ct.test(e), Ut = (e) => yt.test(e), Wt = {
|
|
|
1188
1206
|
}
|
|
1189
1207
|
return r.close(), i;
|
|
1190
1208
|
};
|
|
1191
|
-
})(
|
|
1209
|
+
})(nn ||= {});
|
|
1192
1210
|
var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, Q = (e) => {
|
|
1193
1211
|
let t = parseInt(e);
|
|
1194
1212
|
return isNaN(t) ? null : t;
|
|
1195
|
-
},
|
|
1213
|
+
}, hn = (e) => {
|
|
1196
1214
|
let t = parseFloat(e);
|
|
1197
1215
|
return isNaN(t) ? null : t;
|
|
1198
|
-
}, $ = null,
|
|
1216
|
+
}, $ = null, gn = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), _n = (e) => gn(e).replace(/"/g, """), vn = class {
|
|
1199
1217
|
constructor() {
|
|
1200
1218
|
this._registeredVisitors = /* @__PURE__ */ new Map();
|
|
1201
1219
|
}
|
|
@@ -1257,7 +1275,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1257
1275
|
let t = e.attributes ?? {}, n = `<${e.name}`;
|
|
1258
1276
|
for (let e in t) {
|
|
1259
1277
|
let r = t[e];
|
|
1260
|
-
n += ` ${e}="${
|
|
1278
|
+
n += ` ${e}="${_n(typeof r == "string" ? r : r?.value ?? "")}"`;
|
|
1261
1279
|
}
|
|
1262
1280
|
return n + ">";
|
|
1263
1281
|
})(e)), o = {
|
|
@@ -1306,12 +1324,12 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1306
1324
|
s = o?.local ?? null, c = o?.tag ?? null, l = o?.visitor ?? null, p = !o?.destination;
|
|
1307
1325
|
},
|
|
1308
1326
|
onText: (e) => {
|
|
1309
|
-
m ? m.push(
|
|
1327
|
+
m ? m.push(gn(e)) : l?.text?.(e, v);
|
|
1310
1328
|
},
|
|
1311
1329
|
onEnd: t
|
|
1312
1330
|
};
|
|
1313
1331
|
}
|
|
1314
|
-
},
|
|
1332
|
+
}, yn = `IFERROR(${re}(`, bn = yn.toUpperCase(), xn = r.toUpperCase(), Sn = { kind: "none" }, Cn = { kind: "spilled" }, wn = (e, t) => {
|
|
1315
1333
|
if (e.charCodeAt(t) !== 34) return null;
|
|
1316
1334
|
let n = "", r = t + 1;
|
|
1317
1335
|
for (; r < e.length;) if (e.charCodeAt(r) === 34) {
|
|
@@ -1322,12 +1340,12 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1322
1340
|
n += "\"", r += 2;
|
|
1323
1341
|
} else n += e[r], r++;
|
|
1324
1342
|
return null;
|
|
1325
|
-
},
|
|
1343
|
+
}, Tn = (e) => {
|
|
1326
1344
|
let t = [], n = 0;
|
|
1327
1345
|
for (; n < e.length;) {
|
|
1328
1346
|
let r = e.charCodeAt(n);
|
|
1329
1347
|
if (r === 34) {
|
|
1330
|
-
let t =
|
|
1348
|
+
let t = wn(e, n);
|
|
1331
1349
|
if (t === null) break;
|
|
1332
1350
|
n = t.end;
|
|
1333
1351
|
continue;
|
|
@@ -1345,59 +1363,64 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1345
1363
|
e.charCodeAt(i) === 40 && t.push(e.slice(n, i).toUpperCase().replace(/^_XLFN\./, "").replace(/^_XLWS\./, "")), n = i;
|
|
1346
1364
|
}
|
|
1347
1365
|
return t;
|
|
1348
|
-
},
|
|
1349
|
-
let t =
|
|
1366
|
+
}, En = /^\s*TABLE\s*\(([^()]*)\)\s*$/i, Dn = /^\s*(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})\s*$/, On = (e) => {
|
|
1367
|
+
let t = Dn.exec(e);
|
|
1350
1368
|
if (!t) return null;
|
|
1351
|
-
let n =
|
|
1369
|
+
let n = R.fastStringToCol(t[2]), r = parseInt(t[4], 10) - 1;
|
|
1352
1370
|
return n < 0 || r < 0 ? null : {
|
|
1353
1371
|
row: r,
|
|
1354
1372
|
col: n,
|
|
1355
1373
|
colAbsolute: t[1] === "$",
|
|
1356
1374
|
rowAbsolute: t[3] === "$"
|
|
1357
1375
|
};
|
|
1358
|
-
},
|
|
1376
|
+
}, kn = (e) => R.cellToString({
|
|
1359
1377
|
rowIndex: e.row,
|
|
1360
1378
|
colIndex: e.col
|
|
1361
|
-
}),
|
|
1362
|
-
let n =
|
|
1379
|
+
}), An = (e, t) => {
|
|
1380
|
+
let n = En.exec(e);
|
|
1363
1381
|
if (!n) return null;
|
|
1364
1382
|
let r = n[1].split(",");
|
|
1365
1383
|
if (r.length !== 3 && r.length !== 5) return null;
|
|
1366
1384
|
let i = [];
|
|
1367
1385
|
for (let e = 0; e < r.length; e++) {
|
|
1368
|
-
let t =
|
|
1386
|
+
let t = On(r[e]);
|
|
1369
1387
|
if (!t) return null;
|
|
1370
1388
|
i.push(t);
|
|
1371
1389
|
}
|
|
1372
|
-
let a = t.rowStart, o = t.colStart, s = (e) => e.colAbsolute && !e.rowAbsolute && e.col === o - 1 && e.row === a, c = (e) => e.rowAbsolute && !e.colAbsolute && e.row === a - 1 && e.col === o, l =
|
|
1390
|
+
let a = t.rowStart, o = t.colStart, s = (e) => e.colAbsolute && !e.rowAbsolute && e.col === o - 1 && e.row === a, c = (e) => e.rowAbsolute && !e.colAbsolute && e.row === a - 1 && e.col === o, l = {
|
|
1391
|
+
rowStart: a,
|
|
1392
|
+
colStart: o,
|
|
1393
|
+
rowEnd: t.rowEnd,
|
|
1394
|
+
colEnd: t.colEnd
|
|
1395
|
+
}, u = i[0];
|
|
1373
1396
|
if (i.length === 3) {
|
|
1374
1397
|
let [, e, t] = i;
|
|
1375
1398
|
return s(t) && c(u) ? {
|
|
1376
1399
|
ref: l,
|
|
1377
|
-
columnInput:
|
|
1400
|
+
columnInput: kn(e)
|
|
1378
1401
|
} : c(t) && s(u) ? {
|
|
1379
1402
|
ref: l,
|
|
1380
|
-
rowInput:
|
|
1403
|
+
rowInput: kn(e)
|
|
1381
1404
|
} : null;
|
|
1382
1405
|
}
|
|
1383
1406
|
if (!u.rowAbsolute || !u.colAbsolute || u.row !== a - 1 || u.col !== o - 1) return null;
|
|
1384
1407
|
let [, d, f, p, m] = i;
|
|
1385
1408
|
return s(f) && c(m) ? {
|
|
1386
1409
|
ref: l,
|
|
1387
|
-
rowInput:
|
|
1388
|
-
columnInput:
|
|
1410
|
+
rowInput: kn(p),
|
|
1411
|
+
columnInput: kn(d)
|
|
1389
1412
|
} : c(f) && s(m) ? {
|
|
1390
1413
|
ref: l,
|
|
1391
|
-
rowInput:
|
|
1392
|
-
columnInput:
|
|
1414
|
+
rowInput: kn(d),
|
|
1415
|
+
columnInput: kn(p)
|
|
1393
1416
|
} : null;
|
|
1394
|
-
},
|
|
1417
|
+
}, jn = /^(?:(\d{4})-(\d{2})-(\d{2}))?T?(?:(\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?)?(?:Z|[+-]\d{2}:?\d{2})?$/, Mn = /^PT(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?$/, Nn = (e, t, n) => {
|
|
1395
1418
|
let r = Math.floor((14 - t) / 12), i = e + 4800 - r, a = t + 12 * r - 3;
|
|
1396
1419
|
return n + Math.floor((153 * a + 2) / 5) + 365 * i + Math.floor(i / 4) - Math.floor(i / 100) + Math.floor(i / 400) - 32045;
|
|
1397
|
-
},
|
|
1420
|
+
}, Pn = Nn(1899, 12, 30), Fn = (e) => {
|
|
1398
1421
|
let t = e.indexOf(":");
|
|
1399
1422
|
return t === -1 ? e : e.slice(t + 1);
|
|
1400
|
-
},
|
|
1423
|
+
}, In = class {
|
|
1401
1424
|
constructor() {
|
|
1402
1425
|
this._runs = null, this._text = "", this._font = null, this._inRun = !1, this._inRPr = !1;
|
|
1403
1426
|
}
|
|
@@ -1408,31 +1431,31 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1408
1431
|
e === "r" ? (this._inRun = !0, this._text = "", this._font = null, this._runs ??= []) : e === "rPr" ? this._inRun && (this._inRPr = !0) : this._inRPr && function(e, t, n) {
|
|
1409
1432
|
switch (e) {
|
|
1410
1433
|
case "b":
|
|
1411
|
-
n.weight =
|
|
1434
|
+
n.weight = zn(t) ? 700 : 400;
|
|
1412
1435
|
break;
|
|
1413
1436
|
case "i":
|
|
1414
|
-
n.style =
|
|
1437
|
+
n.style = zn(t) ? We.Style.Italic : We.Style.Normal;
|
|
1415
1438
|
break;
|
|
1416
1439
|
case "strike":
|
|
1417
|
-
n.strike =
|
|
1440
|
+
n.strike = o(zn(t));
|
|
1418
1441
|
break;
|
|
1419
1442
|
case "outline":
|
|
1420
|
-
n.outline =
|
|
1443
|
+
n.outline = zn(t);
|
|
1421
1444
|
break;
|
|
1422
1445
|
case "shadow":
|
|
1423
|
-
n.shadow =
|
|
1446
|
+
n.shadow = zn(t);
|
|
1424
1447
|
break;
|
|
1425
1448
|
case "condense":
|
|
1426
1449
|
case "extend": {
|
|
1427
|
-
let r =
|
|
1450
|
+
let r = c(e, zn(t));
|
|
1428
1451
|
r !== void 0 && (n.letterSpacing = r);
|
|
1429
1452
|
break;
|
|
1430
1453
|
}
|
|
1431
1454
|
case "u":
|
|
1432
|
-
n.underline =
|
|
1455
|
+
n.underline = _(t.val);
|
|
1433
1456
|
break;
|
|
1434
1457
|
case "vertAlign": {
|
|
1435
|
-
let e =
|
|
1458
|
+
let e = je(t.val);
|
|
1436
1459
|
e !== void 0 && (n.baseline = e);
|
|
1437
1460
|
break;
|
|
1438
1461
|
}
|
|
@@ -1447,7 +1470,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1447
1470
|
break;
|
|
1448
1471
|
}
|
|
1449
1472
|
case "family": {
|
|
1450
|
-
let e =
|
|
1473
|
+
let e = Rn[t.val ?? ""];
|
|
1451
1474
|
e && (n.fallbacks = [e]);
|
|
1452
1475
|
break;
|
|
1453
1476
|
}
|
|
@@ -1457,7 +1480,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1457
1480
|
break;
|
|
1458
1481
|
}
|
|
1459
1482
|
case "scheme":
|
|
1460
|
-
|
|
1483
|
+
ne(n, t.val);
|
|
1461
1484
|
break;
|
|
1462
1485
|
case "color": {
|
|
1463
1486
|
let e = t.rgb;
|
|
@@ -1465,7 +1488,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1465
1488
|
n.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
|
|
1466
1489
|
break;
|
|
1467
1490
|
}
|
|
1468
|
-
let r =
|
|
1491
|
+
let r = Fe((e) => t[e]);
|
|
1469
1492
|
r && (n.color = r);
|
|
1470
1493
|
break;
|
|
1471
1494
|
}
|
|
@@ -1478,7 +1501,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1478
1501
|
onCloseTag(e) {
|
|
1479
1502
|
if (e === "rPr") this._inRPr = !1, this._font ??= {};
|
|
1480
1503
|
else if (e === "r" && this._inRun) {
|
|
1481
|
-
let e =
|
|
1504
|
+
let e = ae(this._text), t = this._font;
|
|
1482
1505
|
this._runs.push(t ? {
|
|
1483
1506
|
text: e,
|
|
1484
1507
|
font: t
|
|
@@ -1492,15 +1515,15 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1492
1515
|
return null;
|
|
1493
1516
|
}
|
|
1494
1517
|
};
|
|
1495
|
-
function
|
|
1518
|
+
function Ln(e, t) {
|
|
1496
1519
|
let n = {
|
|
1497
1520
|
family: "Calibri",
|
|
1498
1521
|
size: 11,
|
|
1499
1522
|
...t,
|
|
1500
1523
|
weight: 400,
|
|
1501
|
-
style:
|
|
1502
|
-
underline:
|
|
1503
|
-
strike:
|
|
1524
|
+
style: We.Style.Normal,
|
|
1525
|
+
underline: We.UnderlineStyle.None,
|
|
1526
|
+
strike: We.StrikeStyle.None,
|
|
1504
1527
|
baseline: 0
|
|
1505
1528
|
}, r = Array(e.length);
|
|
1506
1529
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -1520,16 +1543,16 @@ function Sn(e, t) {
|
|
|
1520
1543
|
}
|
|
1521
1544
|
return r;
|
|
1522
1545
|
}
|
|
1523
|
-
var
|
|
1546
|
+
var Rn = {
|
|
1524
1547
|
1: "serif",
|
|
1525
1548
|
2: "sans-serif",
|
|
1526
1549
|
3: "monospace",
|
|
1527
1550
|
4: "cursive",
|
|
1528
1551
|
5: "fantasy"
|
|
1529
|
-
},
|
|
1552
|
+
}, zn = (e) => {
|
|
1530
1553
|
let t = e.val;
|
|
1531
1554
|
return t === void 0 || t === "1" || t === "true";
|
|
1532
|
-
},
|
|
1555
|
+
}, Bn = (e) => {
|
|
1533
1556
|
let t = (t) => {
|
|
1534
1557
|
if (e) return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1];
|
|
1535
1558
|
}, n = (e) => {
|
|
@@ -1539,19 +1562,19 @@ var Cn = {
|
|
|
1539
1562
|
return {
|
|
1540
1563
|
c: n(t("col")),
|
|
1541
1564
|
r: n(t("row")),
|
|
1542
|
-
x:
|
|
1543
|
-
y:
|
|
1565
|
+
x: P(t("colOff") ?? "0") ?? 0,
|
|
1566
|
+
y: P(t("rowOff") ?? "0") ?? 0
|
|
1544
1567
|
};
|
|
1545
|
-
},
|
|
1546
|
-
let
|
|
1568
|
+
}, Vn = "formulaDialect", Hn = "date1904", Un = "richStrings", Wn = "defaultFont", Gn = (e, t, n, r, i, o, c, u) => {
|
|
1569
|
+
let h = new vn(), _ = (e) => {
|
|
1547
1570
|
let t = e.getAttribute("dxfId", Q);
|
|
1548
|
-
return t === null ? void 0 :
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1571
|
+
return t === null ? void 0 : r?.get(t) || (o?.(`A color filter or sort names a format that does not exist (dxfId '${t}').`), {});
|
|
1572
|
+
}, x = !1, ne = u?.get("parseInlineDxf"), re = u?.get(Vn), oe = (e) => re && e ? re.readDetached(e) : e, se = new Qe.TransposedBuilder(), S = null, w = "topLeft";
|
|
1573
|
+
h.registerVisitor({
|
|
1551
1574
|
from: "autoFilter",
|
|
1552
1575
|
to: "autoTable",
|
|
1553
1576
|
openTag: (e) => {
|
|
1554
|
-
let t = e.getAttribute("ref"), n =
|
|
1577
|
+
let t = e.getAttribute("ref"), n = R.fastStringToRange(t);
|
|
1555
1578
|
e.getSource().r = n, e.getSource().v = {};
|
|
1556
1579
|
},
|
|
1557
1580
|
closeTag: (e) => {
|
|
@@ -1561,7 +1584,7 @@ var Cn = {
|
|
|
1561
1584
|
e === 0 ? n.hiddenButtons = !1 : e === a && (n.hiddenButtons = !0);
|
|
1562
1585
|
}
|
|
1563
1586
|
}
|
|
1564
|
-
}),
|
|
1587
|
+
}), h.registerVisitor({
|
|
1565
1588
|
from: "conditionalFormatting",
|
|
1566
1589
|
to: {},
|
|
1567
1590
|
openTag: (e) => {
|
|
@@ -1575,7 +1598,7 @@ var Cn = {
|
|
|
1575
1598
|
}, i = e.getAttribute("pivot", Z);
|
|
1576
1599
|
i !== null && (r.pivot = i), e.setSource(r);
|
|
1577
1600
|
}
|
|
1578
|
-
}),
|
|
1601
|
+
}), h.registerVisitor({
|
|
1579
1602
|
from: "cfRule",
|
|
1580
1603
|
to: {},
|
|
1581
1604
|
openTag: (e) => {
|
|
@@ -1587,10 +1610,10 @@ var Cn = {
|
|
|
1587
1610
|
v: null,
|
|
1588
1611
|
rule: n
|
|
1589
1612
|
}), e.copyToObject(n, "type", $), e.copyToObject(n, "priority", Q), e.copyToObject(n, "stopIfTrue", Z);
|
|
1590
|
-
let
|
|
1591
|
-
if (
|
|
1592
|
-
let t =
|
|
1593
|
-
t ||= (
|
|
1613
|
+
let i = e.getAttribute("dxfId", Q);
|
|
1614
|
+
if (i !== null) {
|
|
1615
|
+
let t = r?.get(i);
|
|
1616
|
+
t ||= (o?.(`Unable to load conditional color. Invalid dxfI: '${i}' at '${e.getPath()}'.`), {}), n.style = t;
|
|
1594
1617
|
}
|
|
1595
1618
|
e.copyToObject(n, "aboveAverage", Z), e.copyToObject(n, "equalAverage", Z), e.copyToObject(n, "stdDev", Q), e.copyToObject(n, "bottom", Z), e.copyToObject(n, "percent", Z), e.copyToObject(n, "rank", Q), e.copyToObject(n, "operator", $), e.copyToObject(n, "text", $), e.copyToObject(n, "timePeriod", $);
|
|
1596
1619
|
},
|
|
@@ -1599,11 +1622,11 @@ var Cn = {
|
|
|
1599
1622
|
if (!t?.r) return;
|
|
1600
1623
|
let n = t.conditionals[t.conditionals.length - 1], r = n?.rule;
|
|
1601
1624
|
if (!r) return;
|
|
1602
|
-
let i = {}, a =
|
|
1625
|
+
let i = {}, a = ue(r, o);
|
|
1603
1626
|
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;
|
|
1604
1627
|
}
|
|
1605
1628
|
});
|
|
1606
|
-
let
|
|
1629
|
+
let ce = (e) => {
|
|
1607
1630
|
let t = e.conditions ?? [], n = [];
|
|
1608
1631
|
for (let e = 0; e < t.length; e++) {
|
|
1609
1632
|
let r = t[e], i = {};
|
|
@@ -1611,19 +1634,19 @@ var Cn = {
|
|
|
1611
1634
|
}
|
|
1612
1635
|
return n;
|
|
1613
1636
|
};
|
|
1614
|
-
|
|
1637
|
+
h.registerVisitor({
|
|
1615
1638
|
from: "colorScale",
|
|
1616
1639
|
to: {},
|
|
1617
1640
|
openTag: (e) => {},
|
|
1618
1641
|
closeTag: (e) => {
|
|
1619
|
-
let t = e.getSource(), n = t.colors ?? [], r =
|
|
1642
|
+
let t = e.getSource(), n = t.colors ?? [], r = ce(t);
|
|
1620
1643
|
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1621
1644
|
e.getParent().scale = {
|
|
1622
|
-
type:
|
|
1645
|
+
type: H.ScaleType.ColorScale,
|
|
1623
1646
|
stops: r
|
|
1624
1647
|
};
|
|
1625
1648
|
}
|
|
1626
|
-
}),
|
|
1649
|
+
}), h.registerVisitor({
|
|
1627
1650
|
from: "dataBar",
|
|
1628
1651
|
to: {},
|
|
1629
1652
|
openTag: (e) => {
|
|
@@ -1631,12 +1654,12 @@ var Cn = {
|
|
|
1631
1654
|
},
|
|
1632
1655
|
closeTag: (e) => {
|
|
1633
1656
|
let t = e.getSource(), n = {
|
|
1634
|
-
type:
|
|
1635
|
-
stops:
|
|
1657
|
+
type: H.ScaleType.DataBar,
|
|
1658
|
+
stops: ce(t)
|
|
1636
1659
|
}, r = t.colors?.[0];
|
|
1637
1660
|
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;
|
|
1638
1661
|
}
|
|
1639
|
-
}),
|
|
1662
|
+
}), h.registerVisitor({
|
|
1640
1663
|
from: "iconSet",
|
|
1641
1664
|
to: {},
|
|
1642
1665
|
openTag: (e) => {
|
|
@@ -1644,41 +1667,41 @@ var Cn = {
|
|
|
1644
1667
|
},
|
|
1645
1668
|
closeTag: (e) => {
|
|
1646
1669
|
let t = e.getSource(), n = {
|
|
1647
|
-
type:
|
|
1648
|
-
stops:
|
|
1670
|
+
type: H.ScaleType.IconSet,
|
|
1671
|
+
stops: ce(t)
|
|
1649
1672
|
};
|
|
1650
1673
|
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;
|
|
1651
1674
|
}
|
|
1652
|
-
}),
|
|
1675
|
+
}), h.registerVisitor({
|
|
1653
1676
|
from: "formula",
|
|
1654
1677
|
to: {},
|
|
1655
1678
|
text: (e, t) => {
|
|
1656
1679
|
let n = t.getParent(), r = n.formulas;
|
|
1657
|
-
r || (r = [], n.formulas = r), r.push(
|
|
1680
|
+
r || (r = [], n.formulas = r), r.push(oe(e));
|
|
1658
1681
|
}
|
|
1659
|
-
}),
|
|
1682
|
+
}), h.registerVisitor({
|
|
1660
1683
|
from: "cfvo",
|
|
1661
1684
|
to: {},
|
|
1662
1685
|
openTag: (e) => {
|
|
1663
1686
|
let t = e.getParent();
|
|
1664
1687
|
t.conditions ||= [];
|
|
1665
1688
|
let n = e.getSource();
|
|
1666
|
-
if (t.conditions.push(n), e.copyTo("type", $), n.type ===
|
|
1689
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === H.ColorStopType.Formula) {
|
|
1667
1690
|
let t = e.getAttribute("val");
|
|
1668
|
-
t != null && (n.value =
|
|
1669
|
-
} else e.copyTo("value",
|
|
1691
|
+
t != null && (n.value = oe(String(t)));
|
|
1692
|
+
} else e.copyTo("value", hn, "val");
|
|
1670
1693
|
!1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
1671
1694
|
}
|
|
1672
|
-
}),
|
|
1695
|
+
}), h.registerVisitor({
|
|
1673
1696
|
from: "color",
|
|
1674
1697
|
to: {},
|
|
1675
1698
|
openTag: (e) => {
|
|
1676
1699
|
let t = e.getParent();
|
|
1677
1700
|
t.colors ||= [];
|
|
1678
|
-
let n =
|
|
1701
|
+
let n = Fe((t) => e.getAttribute(t));
|
|
1679
1702
|
t.colors.push(n);
|
|
1680
1703
|
}
|
|
1681
|
-
}),
|
|
1704
|
+
}), h.registerVisitor({
|
|
1682
1705
|
from: "filterColumn",
|
|
1683
1706
|
to: {},
|
|
1684
1707
|
openTag: (e) => {
|
|
@@ -1697,51 +1720,51 @@ var Cn = {
|
|
|
1697
1720
|
}
|
|
1698
1721
|
return r;
|
|
1699
1722
|
}
|
|
1700
|
-
}),
|
|
1723
|
+
}), h.registerVisitor({
|
|
1701
1724
|
from: "colorFilter",
|
|
1702
1725
|
openTag: (e) => {
|
|
1703
1726
|
let t = e.getParent(), n = {};
|
|
1704
|
-
t.operator =
|
|
1705
|
-
let r =
|
|
1727
|
+
t.operator = V.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor", Z);
|
|
1728
|
+
let r = _(e);
|
|
1706
1729
|
r && (n.style = r);
|
|
1707
1730
|
}
|
|
1708
|
-
}),
|
|
1731
|
+
}), h.registerVisitor({
|
|
1709
1732
|
from: "iconFilter",
|
|
1710
1733
|
openTag: (e) => {
|
|
1711
1734
|
let t = e.getParent(), n = {};
|
|
1712
|
-
t.operator =
|
|
1735
|
+
t.operator = V.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Q), e.copyToObject(n, "iconSet", $);
|
|
1713
1736
|
}
|
|
1714
|
-
}),
|
|
1737
|
+
}), h.registerVisitor({
|
|
1715
1738
|
from: "top10",
|
|
1716
1739
|
openTag: (e) => {
|
|
1717
1740
|
let t = e.getParent(), n = {};
|
|
1718
|
-
t.operator =
|
|
1741
|
+
t.operator = V.BuiltInOperatorNames.TopN, t.param = n, e.copyToObject(n, "filterVal", hn), e.copyToObject(n, "percent", Z), e.copyToObject(n, "top", Z), e.copyToObject(n, "limit", hn, "val");
|
|
1719
1742
|
}
|
|
1720
|
-
}),
|
|
1743
|
+
}), h.registerVisitor({
|
|
1721
1744
|
from: "dynamicFilter",
|
|
1722
1745
|
openTag: (e) => {
|
|
1723
|
-
let t = e.getParent(), n =
|
|
1746
|
+
let t = e.getParent(), n = fe(e.getAttribute("type"));
|
|
1724
1747
|
t.operator = n.operator, t.param = n.param;
|
|
1725
1748
|
}
|
|
1726
1749
|
});
|
|
1727
|
-
let
|
|
1750
|
+
let le = {
|
|
1728
1751
|
from: "filters",
|
|
1729
1752
|
to: {},
|
|
1730
1753
|
openTag: (e) => {
|
|
1731
1754
|
let t = e.getParent(), n = {};
|
|
1732
|
-
return t.selector =
|
|
1755
|
+
return t.selector = V.BuiltInSelectorNames.Display, t.operator = V.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", Z), e.copyToObject(n, "calendarType", $), n;
|
|
1733
1756
|
}
|
|
1734
1757
|
};
|
|
1735
|
-
|
|
1736
|
-
let
|
|
1758
|
+
h.registerVisitor(le);
|
|
1759
|
+
let de = {
|
|
1737
1760
|
from: "filter",
|
|
1738
1761
|
openTag: (e) => {
|
|
1739
1762
|
let t = e.getParent(), n = t.items;
|
|
1740
1763
|
n || (n = [], t.items = n), n.push(e.getAttribute("val", $));
|
|
1741
1764
|
}
|
|
1742
1765
|
};
|
|
1743
|
-
|
|
1744
|
-
let
|
|
1766
|
+
h.registerVisitor(de);
|
|
1767
|
+
let E = {
|
|
1745
1768
|
from: "dateGroupItem",
|
|
1746
1769
|
to: {},
|
|
1747
1770
|
openTag: (e) => {
|
|
@@ -1749,55 +1772,55 @@ var Cn = {
|
|
|
1749
1772
|
n || (n = [], t.dateGroups = n), n.push(e.getSource()), e.copyTo("group", $, "dateTimeGrouping"), e.copyTo("day", Q), e.copyTo("hour", Q), e.copyTo("minute", Q), e.copyTo("month", Q), e.copyTo("second", Q), e.copyTo("year", Q);
|
|
1750
1773
|
}
|
|
1751
1774
|
};
|
|
1752
|
-
|
|
1753
|
-
let
|
|
1754
|
-
|
|
1775
|
+
h.registerVisitor(E);
|
|
1776
|
+
let D = /* @__PURE__ */ new Map();
|
|
1777
|
+
D.set("filterColumn", {
|
|
1755
1778
|
from: "filterColumn",
|
|
1756
1779
|
transparent: !0
|
|
1757
|
-
}),
|
|
1780
|
+
}), D.set("filters", le), D.set("filter", de), D.set("dateGroupItem", E), h.registerVisitor({
|
|
1758
1781
|
from: "customFilters",
|
|
1759
1782
|
openTag: (e) => {
|
|
1760
1783
|
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1761
|
-
return t.operator = r ?
|
|
1784
|
+
return t.operator = r ? V.BuiltInOperatorNames.And : V.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1762
1785
|
},
|
|
1763
1786
|
closeTag: (e) => {
|
|
1764
1787
|
let t = e.getSource(), n = t?.param;
|
|
1765
1788
|
if (!t || !n) return;
|
|
1766
|
-
let r = n.length === 1 ? n[0] :
|
|
1789
|
+
let r = n.length === 1 ? n[0] : Ee(t);
|
|
1767
1790
|
r !== t && (t.operator = r.operator, t.param = r.param);
|
|
1768
1791
|
}
|
|
1769
|
-
}),
|
|
1792
|
+
}), h.registerVisitor({
|
|
1770
1793
|
from: "customFilter",
|
|
1771
1794
|
openTag: (e) => {
|
|
1772
1795
|
let t = e.getParent(), n;
|
|
1773
1796
|
Array.isArray(t) ? (n = {}, t.push(n)) : n = t;
|
|
1774
|
-
let r =
|
|
1797
|
+
let r = we({
|
|
1775
1798
|
operator: e.getAttribute("operator"),
|
|
1776
1799
|
val: e.getAttribute("val")
|
|
1777
1800
|
}, (t) => e.warn(t));
|
|
1778
1801
|
r && (n.operator = r.operator, n.param = r.param);
|
|
1779
1802
|
}
|
|
1780
1803
|
});
|
|
1781
|
-
let
|
|
1782
|
-
|
|
1804
|
+
let O = {}, me = null;
|
|
1805
|
+
h.registerVisitor({
|
|
1783
1806
|
from: "sortState",
|
|
1784
1807
|
to: {},
|
|
1785
1808
|
openTag: (e) => {
|
|
1786
1809
|
let t = e.getParent(), n = t.v;
|
|
1787
1810
|
if (!n) return;
|
|
1788
1811
|
let r = {};
|
|
1789
|
-
|
|
1812
|
+
O = {};
|
|
1790
1813
|
let i = e.getAttribute("caseSensitive", Z);
|
|
1791
|
-
i != null && (
|
|
1814
|
+
i != null && (O.collatorOptions = i ? Xe.CaseSensitiveOptions : Xe.CaseInsensitiveOptions);
|
|
1792
1815
|
let a = e.getAttribute("sortMethod");
|
|
1793
|
-
a !== "stroke" && a !== "pinYin" || (
|
|
1794
|
-
...
|
|
1816
|
+
a !== "stroke" && a !== "pinYin" || (O.collatorOptions = {
|
|
1817
|
+
...O.collatorOptions,
|
|
1795
1818
|
collation: a === "stroke" ? "stroke" : "pinyin"
|
|
1796
|
-
}), e.getAttribute("columnSort", Z) && (r.axis =
|
|
1819
|
+
}), e.getAttribute("columnSort", Z) && (r.axis = Ge.Axis.Column);
|
|
1797
1820
|
let o = e.getAttribute("ref"), s = t.r;
|
|
1798
|
-
|
|
1821
|
+
me = o && s ? R.fastStringToRange(o) : null, me && (r.extent = { range: d(s, me) }), n.sort = r, e.setSource(t);
|
|
1799
1822
|
}
|
|
1800
|
-
}),
|
|
1823
|
+
}), h.registerVisitor({
|
|
1801
1824
|
from: "sortCondition",
|
|
1802
1825
|
to: {},
|
|
1803
1826
|
openTag: (e) => {
|
|
@@ -1809,13 +1832,13 @@ var Cn = {
|
|
|
1809
1832
|
i || (i = [], r.sorts = i);
|
|
1810
1833
|
let a = e.getAttribute("ref"), o = 0, s = null;
|
|
1811
1834
|
if (a) {
|
|
1812
|
-
let e =
|
|
1813
|
-
o = r ? n - i : n, r &&
|
|
1835
|
+
let e = R.fastStringToRange(a, Yn), n = e.colStart, r = t.r, i = r.colStart;
|
|
1836
|
+
o = r ? n - i : n, r && me && (s = y(r, me, e));
|
|
1814
1837
|
}
|
|
1815
1838
|
r.extent && (r.extent.sorts ??= []).push(s);
|
|
1816
|
-
let c = { ...
|
|
1839
|
+
let c = { ...O }, l = Ce(e.getAttribute("sortBy"));
|
|
1817
1840
|
l && (c.sortOn = l);
|
|
1818
|
-
let u =
|
|
1841
|
+
let u = _(e);
|
|
1819
1842
|
u && (c.style = u), e.copyToObject(c, "iconSet", $), e.copyToObject(c, "customList", $), c.reverse = e.getAttribute("descending", Z) ?? !1;
|
|
1820
1843
|
let d = {
|
|
1821
1844
|
index: o,
|
|
@@ -1824,49 +1847,49 @@ var Cn = {
|
|
|
1824
1847
|
i.push(d);
|
|
1825
1848
|
}
|
|
1826
1849
|
});
|
|
1827
|
-
let
|
|
1828
|
-
|
|
1829
|
-
let t =
|
|
1850
|
+
let ge = (e) => {
|
|
1851
|
+
S = e.getSource(), w = "topLeft", e.copyTo("topLeft", $, "topLeftCell");
|
|
1852
|
+
let t = p(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1830
1853
|
n === null || t || (e.getSource().gridLineColor = "index" + parseFloat(n)), e.copyTo("showZeros", Z), e.copyTo("showFormulas", Z), e.copyTo("zoomScale", Q), e.copyTo("viewMode", $, "view");
|
|
1831
1854
|
let r = {};
|
|
1832
|
-
for (let [t, n] of
|
|
1855
|
+
for (let [t, n] of Oe) {
|
|
1833
1856
|
let i = e.getAttribute(n, Q);
|
|
1834
1857
|
i && (r[t] = Math.min(400, Math.max(10, i)));
|
|
1835
1858
|
}
|
|
1836
1859
|
Object.keys(r).length > 0 && (e.getSource().zoomScales = r), e.copyTo("showRuler", Z), e.copyTo("showWhitespace", Z, "showWhiteSpace"), e.copyTo("windowProtection", Z), e.copyTo("showRowHeaders", Z, "showRowColHeaders"), e.copyTo("showColumnHeaders", Z, "showRowColHeaders"), e.copyTo("showRowGridlines", Z, "showGridLines"), e.copyTo("showColumnGridlines", Z, "showGridLines"), e.copyTo("rightToLeft", Z), e.copyTo("showOutlineSymbols", Z);
|
|
1837
1860
|
};
|
|
1838
|
-
|
|
1861
|
+
h.registerVisitor({
|
|
1839
1862
|
from: "sheetView",
|
|
1840
1863
|
to: "view",
|
|
1841
1864
|
openTag: (e) => {
|
|
1842
|
-
|
|
1865
|
+
ge(e);
|
|
1843
1866
|
},
|
|
1844
1867
|
closeTag: () => {
|
|
1845
|
-
|
|
1868
|
+
S = null;
|
|
1846
1869
|
}
|
|
1847
|
-
}),
|
|
1870
|
+
}), h.registerVisitor({
|
|
1848
1871
|
from: "customSheetViews",
|
|
1849
1872
|
to: "customSheetViews",
|
|
1850
1873
|
openTag: (e) => {
|
|
1851
1874
|
e.setSource([]);
|
|
1852
1875
|
}
|
|
1853
|
-
}),
|
|
1876
|
+
}), h.registerVisitor({
|
|
1854
1877
|
from: "customSheetView",
|
|
1855
1878
|
to: [],
|
|
1856
1879
|
openTag: (e) => {
|
|
1857
|
-
|
|
1880
|
+
A = !0, ge(e);
|
|
1858
1881
|
},
|
|
1859
1882
|
closeTag: () => {
|
|
1860
|
-
|
|
1883
|
+
A = !1, S = null;
|
|
1861
1884
|
}
|
|
1862
|
-
}),
|
|
1885
|
+
}), h.registerVisitor({
|
|
1863
1886
|
from: "selection",
|
|
1864
1887
|
to: null,
|
|
1865
1888
|
openTag: (e) => {
|
|
1866
|
-
if (!
|
|
1889
|
+
if (!S) return;
|
|
1867
1890
|
let t = e.getAttribute("activeCell")?.replace(/\$/g, ""), n = e.getAttribute("sqref")?.replace(/\$/g, ""), r = e.getAttribute("pane") ?? "topLeft";
|
|
1868
|
-
if (r !==
|
|
1869
|
-
let e =
|
|
1891
|
+
if (r !== w) {
|
|
1892
|
+
let e = S.freezePanes;
|
|
1870
1893
|
if (e && t) {
|
|
1871
1894
|
let i = { activeCell: t };
|
|
1872
1895
|
n && n !== t && (i.sqref = n), (e.paneSelections ??= {})[r] = i;
|
|
@@ -1876,19 +1899,19 @@ var Cn = {
|
|
|
1876
1899
|
let i = {};
|
|
1877
1900
|
t && (i.cell = t);
|
|
1878
1901
|
let a = e.getAttribute("activeCellId", Q);
|
|
1879
|
-
a !== null && (i.rangeIndex = a), n && n !== t && (i.ranges = n.trim().split(/\s+/)),
|
|
1902
|
+
a !== null && (i.rangeIndex = a), n && n !== t && (i.ranges = n.trim().split(/\s+/)), S.selection = i;
|
|
1880
1903
|
}
|
|
1881
|
-
}),
|
|
1904
|
+
}), h.registerVisitor({
|
|
1882
1905
|
from: "pane",
|
|
1883
1906
|
to: null,
|
|
1884
1907
|
openTag: (e) => {
|
|
1885
|
-
if (!
|
|
1886
|
-
|
|
1908
|
+
if (!S) return;
|
|
1909
|
+
w = e.getAttribute("activePane") ?? "topLeft";
|
|
1887
1910
|
let t = e.getAttribute("state");
|
|
1888
1911
|
if (t === "frozen" || t === "frozenSplit") {
|
|
1889
1912
|
let t = {};
|
|
1890
|
-
|
|
1891
|
-
let n = (
|
|
1913
|
+
S.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
1914
|
+
let n = (S.topLeft ? R.fastStringToCell(S.topLeft) : void 0) ?? {
|
|
1892
1915
|
colIndex: 0,
|
|
1893
1916
|
rowIndex: 0
|
|
1894
1917
|
}, r = {
|
|
@@ -1900,10 +1923,10 @@ var Cn = {
|
|
|
1900
1923
|
colIndex: n.colIndex + r.colIndex,
|
|
1901
1924
|
rowIndex: n.rowIndex + r.rowIndex
|
|
1902
1925
|
};
|
|
1903
|
-
t.coords =
|
|
1926
|
+
t.coords = R.cellToString(i);
|
|
1904
1927
|
}
|
|
1905
1928
|
}
|
|
1906
|
-
}),
|
|
1929
|
+
}), h.registerVisitor({
|
|
1907
1930
|
from: "sheetPr",
|
|
1908
1931
|
transparent: !0,
|
|
1909
1932
|
openTag: (t) => {
|
|
@@ -1914,22 +1937,22 @@ var Cn = {
|
|
|
1914
1937
|
let i = t.getAttribute("syncRef");
|
|
1915
1938
|
i && (r.anchor = i), Object.keys(r).length > 0 && (e.syncScroll = r);
|
|
1916
1939
|
}
|
|
1917
|
-
}),
|
|
1940
|
+
}), h.registerVisitor({
|
|
1918
1941
|
from: "tabColor",
|
|
1919
1942
|
to: null,
|
|
1920
1943
|
openTag: (t) => {
|
|
1921
|
-
let n =
|
|
1944
|
+
let n = Fe((e) => t.getAttribute(e));
|
|
1922
1945
|
n && (e.tabColor = n);
|
|
1923
1946
|
}
|
|
1924
1947
|
});
|
|
1925
|
-
let
|
|
1926
|
-
|
|
1948
|
+
let A = !1, j = () => e.pageLayout ??= {};
|
|
1949
|
+
h.registerVisitor({
|
|
1927
1950
|
from: "pageSetUpPr",
|
|
1928
1951
|
to: null,
|
|
1929
1952
|
openTag: (e) => {
|
|
1930
|
-
!0 === e.getAttribute("fitToPage", Z) && (
|
|
1953
|
+
!0 === e.getAttribute("fitToPage", Z) && (j().fitToPage = !0), !1 === e.getAttribute("autoPageBreaks", Z) && (j().hideAutoPageBreaks = !0);
|
|
1931
1954
|
}
|
|
1932
|
-
}),
|
|
1955
|
+
}), h.registerVisitor({
|
|
1933
1956
|
from: "outlinePr",
|
|
1934
1957
|
to: null,
|
|
1935
1958
|
openTag: (t) => {
|
|
@@ -1942,12 +1965,12 @@ var Cn = {
|
|
|
1942
1965
|
return n === "1" || n === "true";
|
|
1943
1966
|
})("applyStyles") && (r.automaticStyles = !0), Object.keys(r).length > 0 && (e.outline = r);
|
|
1944
1967
|
}
|
|
1945
|
-
}),
|
|
1968
|
+
}), h.registerVisitor({
|
|
1946
1969
|
from: "pageMargins",
|
|
1947
1970
|
to: null,
|
|
1948
1971
|
openTag: (e) => {
|
|
1949
|
-
if (
|
|
1950
|
-
let t = (t, n) => e.getAttribute(t,
|
|
1972
|
+
if (A) return;
|
|
1973
|
+
let t = (t, n) => e.getAttribute(t, hn) ?? n, n = {
|
|
1951
1974
|
left: t("left", .7),
|
|
1952
1975
|
right: t("right", .7),
|
|
1953
1976
|
top: t("top", .75),
|
|
@@ -1955,14 +1978,14 @@ var Cn = {
|
|
|
1955
1978
|
header: t("header", .3),
|
|
1956
1979
|
footer: t("footer", .3)
|
|
1957
1980
|
};
|
|
1958
|
-
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (
|
|
1981
|
+
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (j().margins = n);
|
|
1959
1982
|
}
|
|
1960
|
-
}),
|
|
1983
|
+
}), h.registerVisitor({
|
|
1961
1984
|
from: "pageSetup",
|
|
1962
1985
|
to: null,
|
|
1963
1986
|
openTag: (e) => {
|
|
1964
|
-
if (
|
|
1965
|
-
let n =
|
|
1987
|
+
if (A) return;
|
|
1988
|
+
let n = j(), r = (t) => e.getAttribute(t, Q) ?? void 0, i = (t) => e.getAttribute(t, Z), a = e.getAttribute("orientation");
|
|
1966
1989
|
a !== "landscape" && a !== "portrait" || (n.orientation = a);
|
|
1967
1990
|
for (let e of [
|
|
1968
1991
|
"paperSize",
|
|
@@ -1981,84 +2004,84 @@ var Cn = {
|
|
|
1981
2004
|
o && (n.paperHeight = o);
|
|
1982
2005
|
let s = e.getAttribute("paperWidth");
|
|
1983
2006
|
s && (n.paperWidth = s), e.getAttribute("pageOrder") === "overThenDown" && (n.printOrder = "overThenDown"), !0 === i("blackAndWhite") && (n.blackAndWhite = !0), !0 === i("draft") && (n.draftMode = !0), !0 === i("useFirstPageNumber") && (n.useFirstPageNumber = !0), !1 === i("usePrinterDefaults") && (n.ignorePrinterDefaults = !0);
|
|
1984
|
-
let c = e.getAttribute("cellComments"), l =
|
|
2007
|
+
let c = e.getAttribute("cellComments"), l = he.find(([e]) => e === c)?.[1];
|
|
1985
2008
|
l && (n.printComments = l);
|
|
1986
|
-
let u = e.getAttribute("errors"), d =
|
|
2009
|
+
let u = e.getAttribute("errors"), d = C.find(([e]) => e === u)?.[1];
|
|
1987
2010
|
d && (n.printErrors = d);
|
|
1988
2011
|
let f = e.getAttribute("r:id"), p = f ? t(f, "part") : null;
|
|
1989
2012
|
p && (n.printerSettings = p);
|
|
1990
2013
|
}
|
|
1991
|
-
}),
|
|
2014
|
+
}), h.registerVisitor({
|
|
1992
2015
|
from: "printOptions",
|
|
1993
2016
|
to: null,
|
|
1994
2017
|
openTag: (e) => {
|
|
1995
|
-
if (
|
|
2018
|
+
if (A) return;
|
|
1996
2019
|
let t = (t) => !0 === e.getAttribute(t, Z);
|
|
1997
|
-
t("horizontalCentered") && (
|
|
2020
|
+
t("horizontalCentered") && (j().centerHorizontally = !0), t("verticalCentered") && (j().centerVertically = !0), t("gridLines") && (j().printGridlines = !0), t("headings") && (j().printHeadings = !0);
|
|
1998
2021
|
}
|
|
1999
|
-
}),
|
|
2022
|
+
}), h.registerVisitor({
|
|
2000
2023
|
from: "headerFooter",
|
|
2001
2024
|
to: {},
|
|
2002
2025
|
openTag: (e) => {
|
|
2003
|
-
if (
|
|
2026
|
+
if (A) return;
|
|
2004
2027
|
let t = {}, n = (t) => e.getAttribute(t, Z);
|
|
2005
|
-
!0 === n("differentOddEven") && (t.differentOddEven = !0), !0 === n("differentFirst") && (t.differentFirst = !0), !1 === n("scaleWithDoc") && (t.ignoreSheetScale = !0), !1 === n("alignWithMargins") && (t.ignoreSheetMargins = !0), Object.keys(t).length > 0 && (
|
|
2028
|
+
!0 === n("differentOddEven") && (t.differentOddEven = !0), !0 === n("differentFirst") && (t.differentFirst = !0), !1 === n("scaleWithDoc") && (t.ignoreSheetScale = !0), !1 === n("alignWithMargins") && (t.ignoreSheetMargins = !0), Object.keys(t).length > 0 && (j().headerFooter = t);
|
|
2006
2029
|
}
|
|
2007
2030
|
});
|
|
2008
|
-
for (let e of
|
|
2031
|
+
for (let e of k) h.registerVisitor({
|
|
2009
2032
|
from: e,
|
|
2010
2033
|
to: {},
|
|
2011
2034
|
text: (t, n) => {
|
|
2012
|
-
if (
|
|
2013
|
-
let r =
|
|
2014
|
-
i[e] = (i[e] ?? "") +
|
|
2035
|
+
if (A) return;
|
|
2036
|
+
let r = j(), i = r.headerFooter ??= {};
|
|
2037
|
+
i[e] = (i[e] ?? "") + ae(t);
|
|
2015
2038
|
}
|
|
2016
2039
|
});
|
|
2017
|
-
let
|
|
2018
|
-
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]])
|
|
2040
|
+
let ve = "rowBreaks";
|
|
2041
|
+
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]]) h.registerVisitor({
|
|
2019
2042
|
from: e,
|
|
2020
2043
|
to: {},
|
|
2021
2044
|
openTag: () => {
|
|
2022
|
-
|
|
2045
|
+
ve = t;
|
|
2023
2046
|
}
|
|
2024
2047
|
});
|
|
2025
|
-
|
|
2048
|
+
h.registerVisitor({
|
|
2026
2049
|
from: "brk",
|
|
2027
2050
|
to: null,
|
|
2028
2051
|
openTag: (e) => {
|
|
2029
|
-
if (
|
|
2052
|
+
if (A) return;
|
|
2030
2053
|
let t = e.getAttribute("id", Q);
|
|
2031
2054
|
if (t == null) return;
|
|
2032
2055
|
let n = { index: t }, r = e.getAttribute("min", Q);
|
|
2033
2056
|
r != null && (n.min = r);
|
|
2034
2057
|
let i = e.getAttribute("max", Q);
|
|
2035
2058
|
i != null && (n.max = i), !0 !== e.getAttribute("man", Z) && (n.automatic = !0), !0 === e.getAttribute("pt", Z) && (n.pivot = !0);
|
|
2036
|
-
let a =
|
|
2037
|
-
(a[
|
|
2059
|
+
let a = j();
|
|
2060
|
+
(a[ve] ??= []).push(n);
|
|
2038
2061
|
}
|
|
2039
|
-
}),
|
|
2062
|
+
}), h.registerVisitor({
|
|
2040
2063
|
from: "ignoredErrors",
|
|
2041
2064
|
transparent: !0
|
|
2042
|
-
}),
|
|
2065
|
+
}), h.registerVisitor({
|
|
2043
2066
|
from: "ignoredError",
|
|
2044
2067
|
to: null,
|
|
2045
2068
|
openTag: (t) => {
|
|
2046
2069
|
let n = t.getAttribute("sqref");
|
|
2047
2070
|
if (!n) return;
|
|
2048
2071
|
let r = [];
|
|
2049
|
-
for (let e of
|
|
2072
|
+
for (let e of f) !0 === t.getAttribute(e, Z) && r.push(e);
|
|
2050
2073
|
if (r.length !== 0) for (let t of n.trim().split(/\s+/)) (e.ignoredErrors ??= []).push({
|
|
2051
2074
|
r: t,
|
|
2052
2075
|
v: r
|
|
2053
2076
|
});
|
|
2054
2077
|
}
|
|
2055
|
-
}),
|
|
2078
|
+
}), h.registerVisitor({
|
|
2056
2079
|
from: "mergeCells",
|
|
2057
2080
|
to: "merges",
|
|
2058
2081
|
openTag: (e) => {
|
|
2059
2082
|
e.setSource([]);
|
|
2060
2083
|
}
|
|
2061
|
-
}),
|
|
2084
|
+
}), h.registerVisitor({
|
|
2062
2085
|
from: "dataValidations",
|
|
2063
2086
|
to: "validations",
|
|
2064
2087
|
openTag: (t) => {
|
|
@@ -2074,7 +2097,7 @@ var Cn = {
|
|
|
2074
2097
|
});
|
|
2075
2098
|
}
|
|
2076
2099
|
});
|
|
2077
|
-
let
|
|
2100
|
+
let ye = {
|
|
2078
2101
|
from: "dataValidation",
|
|
2079
2102
|
to: [],
|
|
2080
2103
|
openTag: (e) => {
|
|
@@ -2093,25 +2116,25 @@ var Cn = {
|
|
|
2093
2116
|
closeTag: (e) => {
|
|
2094
2117
|
let t = e.getSource();
|
|
2095
2118
|
if (!t?.rule) return;
|
|
2096
|
-
let n =
|
|
2119
|
+
let n = b(t.rule, o);
|
|
2097
2120
|
n && (e.getAttribute("allowBlank", Z) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
2098
2121
|
}
|
|
2099
2122
|
};
|
|
2100
|
-
|
|
2123
|
+
h.registerVisitor(ye), h.registerVisitor({
|
|
2101
2124
|
from: "formula1",
|
|
2102
2125
|
to: {},
|
|
2103
2126
|
text: (e, t) => {
|
|
2104
2127
|
let n = t.getParent().rule;
|
|
2105
|
-
n?.type && (n.formula1 = ie(
|
|
2128
|
+
n?.type && (n.formula1 = ie(oe(e), n.type));
|
|
2106
2129
|
}
|
|
2107
|
-
}),
|
|
2130
|
+
}), h.registerVisitor({
|
|
2108
2131
|
from: "formula2",
|
|
2109
2132
|
to: {},
|
|
2110
2133
|
text: (e, t) => {
|
|
2111
2134
|
let n = t.getParent().rule;
|
|
2112
|
-
n?.type && (n.formula2 = ie(
|
|
2135
|
+
n?.type && (n.formula2 = ie(oe(e), n.type));
|
|
2113
2136
|
}
|
|
2114
|
-
}),
|
|
2137
|
+
}), h.registerVisitor({
|
|
2115
2138
|
from: "picture",
|
|
2116
2139
|
to: "picture",
|
|
2117
2140
|
openTag: (e) => {
|
|
@@ -2121,7 +2144,7 @@ var Cn = {
|
|
|
2121
2144
|
e.getSource().resId = r;
|
|
2122
2145
|
}
|
|
2123
2146
|
});
|
|
2124
|
-
let
|
|
2147
|
+
let be = {
|
|
2125
2148
|
from: "slicer",
|
|
2126
2149
|
to: {},
|
|
2127
2150
|
openTag: (e) => {
|
|
@@ -2133,8 +2156,8 @@ var Cn = {
|
|
|
2133
2156
|
for (let e of a) i.slicers[e] = r[e];
|
|
2134
2157
|
}
|
|
2135
2158
|
};
|
|
2136
|
-
|
|
2137
|
-
let
|
|
2159
|
+
h.registerVisitor(be);
|
|
2160
|
+
let M = (e, t) => ({
|
|
2138
2161
|
from: e,
|
|
2139
2162
|
to: {},
|
|
2140
2163
|
openTag: (e) => {
|
|
@@ -2146,8 +2169,8 @@ var Cn = {
|
|
|
2146
2169
|
closeTag: (e) => {
|
|
2147
2170
|
t(String(e.getSource() ?? ""), e);
|
|
2148
2171
|
}
|
|
2149
|
-
}),
|
|
2150
|
-
|
|
2172
|
+
}), xe = /* @__PURE__ */ new Map();
|
|
2173
|
+
xe.set("dataValidations", {
|
|
2151
2174
|
from: "dataValidations",
|
|
2152
2175
|
to: "validations",
|
|
2153
2176
|
openTag: (e) => {
|
|
@@ -2157,15 +2180,15 @@ var Cn = {
|
|
|
2157
2180
|
closeTag: (e) => {
|
|
2158
2181
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2159
2182
|
}
|
|
2160
|
-
}),
|
|
2161
|
-
...
|
|
2183
|
+
}), xe.set("dataValidation", {
|
|
2184
|
+
...ye,
|
|
2162
2185
|
closeTag: (e) => {
|
|
2163
|
-
|
|
2186
|
+
ye.closeTag(e);
|
|
2164
2187
|
let t = e.getSource();
|
|
2165
2188
|
t && !t.r && (e.warn("x14 dataValidation with no xm:sqref was dropped."), e.setSource(void 0));
|
|
2166
2189
|
}
|
|
2167
2190
|
});
|
|
2168
|
-
let
|
|
2191
|
+
let N = (e) => ({
|
|
2169
2192
|
from: e,
|
|
2170
2193
|
to: {},
|
|
2171
2194
|
openTag: (t) => {
|
|
@@ -2175,18 +2198,18 @@ var Cn = {
|
|
|
2175
2198
|
});
|
|
2176
2199
|
}
|
|
2177
2200
|
});
|
|
2178
|
-
|
|
2201
|
+
xe.set("formula1", N("formula1")), xe.set("formula2", N("formula2")), xe.set("f", M("f", (e, t) => {
|
|
2179
2202
|
let n = t.getParent(), r = n?.rule;
|
|
2180
|
-
r && (r[n.key] = ie(
|
|
2181
|
-
})),
|
|
2203
|
+
r && (r[n.key] = ie(oe(e), r.type));
|
|
2204
|
+
})), xe.set("sqref", M("sqref", (e, t) => {
|
|
2182
2205
|
let n = t.getParent(), r = e.trim();
|
|
2183
2206
|
n && r && (n.r = r.split(/\s+/).join(","));
|
|
2184
2207
|
}));
|
|
2185
|
-
let
|
|
2186
|
-
|
|
2208
|
+
let P = /* @__PURE__ */ new Map(), Se = [], F = /* @__PURE__ */ new Map();
|
|
2209
|
+
F.set("conditionalFormattings", {
|
|
2187
2210
|
from: "conditionalFormattings",
|
|
2188
2211
|
transparent: !0
|
|
2189
|
-
}),
|
|
2212
|
+
}), F.set("conditionalFormatting", {
|
|
2190
2213
|
from: "conditionalFormatting",
|
|
2191
2214
|
to: {},
|
|
2192
2215
|
openTag: (e) => {
|
|
@@ -2196,10 +2219,10 @@ var Cn = {
|
|
|
2196
2219
|
let t = e.getSource(), n = t?.rules ?? [];
|
|
2197
2220
|
for (let e = 0; e < n.length; e++) {
|
|
2198
2221
|
let r = n[e];
|
|
2199
|
-
r.sqref = t.sqref, r.id ?
|
|
2222
|
+
r.sqref = t.sqref, r.id ? P.set(r.id, r) : Se.push(r);
|
|
2200
2223
|
}
|
|
2201
2224
|
}
|
|
2202
|
-
}),
|
|
2225
|
+
}), F.set("cfRule", {
|
|
2203
2226
|
from: "cfRule",
|
|
2204
2227
|
to: {},
|
|
2205
2228
|
openTag: (e) => {
|
|
@@ -2209,10 +2232,10 @@ var Cn = {
|
|
|
2209
2232
|
let t = e.getSource();
|
|
2210
2233
|
t && e.getParent()?.rules?.push(t);
|
|
2211
2234
|
}
|
|
2212
|
-
}),
|
|
2235
|
+
}), F.set("sqref", M("sqref", (e, t) => {
|
|
2213
2236
|
let n = t.getParent(), r = e.trim();
|
|
2214
2237
|
n && r && (n.sqref = r);
|
|
2215
|
-
})),
|
|
2238
|
+
})), F.set("dataBar", {
|
|
2216
2239
|
from: "dataBar",
|
|
2217
2240
|
to: {},
|
|
2218
2241
|
openTag: (e) => {
|
|
@@ -2221,7 +2244,7 @@ var Cn = {
|
|
|
2221
2244
|
closeTag: (e) => {
|
|
2222
2245
|
e.getParent().dataBar = e.getSource();
|
|
2223
2246
|
}
|
|
2224
|
-
}),
|
|
2247
|
+
}), F.set("iconSet", {
|
|
2225
2248
|
from: "iconSet",
|
|
2226
2249
|
to: {},
|
|
2227
2250
|
openTag: (e) => {
|
|
@@ -2231,34 +2254,34 @@ var Cn = {
|
|
|
2231
2254
|
e.getParent().iconSet = e.getSource();
|
|
2232
2255
|
}
|
|
2233
2256
|
});
|
|
2234
|
-
let
|
|
2235
|
-
|
|
2257
|
+
let Te = /* @__PURE__ */ new Map();
|
|
2258
|
+
Te.set("f", M("f", (e, t) => {
|
|
2236
2259
|
let n = t.getParent();
|
|
2237
2260
|
if (!n) return;
|
|
2238
2261
|
let r = e.trim(), i = Number(r);
|
|
2239
|
-
n.value = r.length > 0 && Number.isFinite(i) ? i :
|
|
2240
|
-
})),
|
|
2262
|
+
n.value = r.length > 0 && Number.isFinite(i) ? i : oe(e);
|
|
2263
|
+
})), F.set("cfvo", {
|
|
2241
2264
|
from: "cfvo",
|
|
2242
2265
|
to: {},
|
|
2243
|
-
scope: () =>
|
|
2266
|
+
scope: () => Te,
|
|
2244
2267
|
openTag: (e) => {
|
|
2245
2268
|
let t = e.getParent();
|
|
2246
2269
|
t.conditions ||= [];
|
|
2247
2270
|
let n = e.getSource();
|
|
2248
2271
|
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
2249
2272
|
}
|
|
2250
|
-
}),
|
|
2273
|
+
}), F.set("f", M("f", (e, t) => {
|
|
2251
2274
|
let n = t.getParent();
|
|
2252
|
-
n && (n.formulas ??= []).push(
|
|
2253
|
-
})),
|
|
2275
|
+
n && (n.formulas ??= []).push(oe(e));
|
|
2276
|
+
})), F.set("dxf", {
|
|
2254
2277
|
from: "dxf",
|
|
2255
2278
|
to: {},
|
|
2256
2279
|
raw: !0,
|
|
2257
2280
|
closeTag: (e) => {
|
|
2258
|
-
if (!
|
|
2281
|
+
if (!ne) return;
|
|
2259
2282
|
let t = e.getParent();
|
|
2260
2283
|
if (!t) return;
|
|
2261
|
-
let n =
|
|
2284
|
+
let n = ne(e.getRawXml() ?? "");
|
|
2262
2285
|
n && (t.style = n);
|
|
2263
2286
|
}
|
|
2264
2287
|
});
|
|
@@ -2266,11 +2289,11 @@ var Cn = {
|
|
|
2266
2289
|
from: e,
|
|
2267
2290
|
to: {},
|
|
2268
2291
|
openTag: (t) => {
|
|
2269
|
-
let n =
|
|
2292
|
+
let n = Fe((e) => t.getAttribute(e));
|
|
2270
2293
|
n && (t.getParent()[e] = n);
|
|
2271
2294
|
}
|
|
2272
2295
|
});
|
|
2273
|
-
|
|
2296
|
+
F.set("borderColor", De("borderColor")), F.set("negativeFillColor", De("negativeFillColor")), F.set("negativeBorderColor", De("negativeBorderColor")), F.set("axisColor", De("axisColor")), F.set("cfIcon", {
|
|
2274
2297
|
from: "cfIcon",
|
|
2275
2298
|
to: {},
|
|
2276
2299
|
openTag: (e) => {
|
|
@@ -2283,8 +2306,8 @@ var Cn = {
|
|
|
2283
2306
|
});
|
|
2284
2307
|
}
|
|
2285
2308
|
});
|
|
2286
|
-
let
|
|
2287
|
-
|
|
2309
|
+
let I = /* @__PURE__ */ new Map();
|
|
2310
|
+
I.set("id", M("id", (e, t) => {
|
|
2288
2311
|
let n = t.getParent(), r = e.trim();
|
|
2289
2312
|
n && r && (n.x14Id = r);
|
|
2290
2313
|
}));
|
|
@@ -2292,46 +2315,46 @@ var Cn = {
|
|
|
2292
2315
|
ke.set("slicerList", {
|
|
2293
2316
|
from: "slicerList",
|
|
2294
2317
|
transparent: !0
|
|
2295
|
-
}), ke.set("slicer",
|
|
2296
|
-
let
|
|
2297
|
-
[
|
|
2298
|
-
[
|
|
2299
|
-
[
|
|
2300
|
-
[
|
|
2301
|
-
[
|
|
2302
|
-
[
|
|
2303
|
-
[
|
|
2318
|
+
}), ke.set("slicer", be);
|
|
2319
|
+
let je = /* @__PURE__ */ new Map([
|
|
2320
|
+
[m(te), xe],
|
|
2321
|
+
[m(a), F],
|
|
2322
|
+
[m(Ae), F],
|
|
2323
|
+
[m(ee), I],
|
|
2324
|
+
[m(g), ke],
|
|
2325
|
+
[m(_e), ke],
|
|
2326
|
+
[m(s), D]
|
|
2304
2327
|
]), Me = /* @__PURE__ */ new Set();
|
|
2305
|
-
|
|
2328
|
+
h.registerVisitor({
|
|
2306
2329
|
from: "extLst",
|
|
2307
2330
|
transparent: !0
|
|
2308
|
-
}),
|
|
2331
|
+
}), h.registerVisitor({
|
|
2309
2332
|
from: "ext",
|
|
2310
2333
|
transparent: !0,
|
|
2311
2334
|
scope: (e) => {
|
|
2312
|
-
let t = e.getAttribute("uri"), n =
|
|
2313
|
-
if (
|
|
2314
|
-
if (!
|
|
2335
|
+
let t = e.getAttribute("uri"), n = m(t), r = je.get(n);
|
|
2336
|
+
if (r) return r;
|
|
2337
|
+
if (!v.has(n) && !Me.has(n)) {
|
|
2315
2338
|
Me.add(n);
|
|
2316
|
-
let
|
|
2317
|
-
e.warn(
|
|
2339
|
+
let r = l[n];
|
|
2340
|
+
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.`);
|
|
2318
2341
|
}
|
|
2319
2342
|
return null;
|
|
2320
2343
|
}
|
|
2321
|
-
}),
|
|
2344
|
+
}), h.registerVisitor({
|
|
2322
2345
|
from: "mergeCell",
|
|
2323
2346
|
to: [],
|
|
2324
2347
|
openTag: (e) => {
|
|
2325
2348
|
let t = e.getAttribute("ref");
|
|
2326
2349
|
e.setSource(t);
|
|
2327
2350
|
}
|
|
2328
|
-
}),
|
|
2351
|
+
}), h.registerVisitor({
|
|
2329
2352
|
from: "hyperlinks",
|
|
2330
2353
|
to: "hyperlinks",
|
|
2331
2354
|
openTag: (e) => {
|
|
2332
2355
|
e.setSource([]);
|
|
2333
2356
|
}
|
|
2334
|
-
}),
|
|
2357
|
+
}), h.registerVisitor({
|
|
2335
2358
|
from: "hyperlink",
|
|
2336
2359
|
to: [],
|
|
2337
2360
|
openTag: (e) => {
|
|
@@ -2349,7 +2372,7 @@ var Cn = {
|
|
|
2349
2372
|
v: o
|
|
2350
2373
|
});
|
|
2351
2374
|
}
|
|
2352
|
-
}),
|
|
2375
|
+
}), h.registerVisitor({
|
|
2353
2376
|
from: "drawing",
|
|
2354
2377
|
to: "movables",
|
|
2355
2378
|
openTag: (e) => {
|
|
@@ -2358,32 +2381,32 @@ var Cn = {
|
|
|
2358
2381
|
let r = t(n);
|
|
2359
2382
|
r ? e.setSource(r.movables) : e.warn("A drawing part is missing; its shapes were not imported.", { onceKey: "xlsx.sheet.drawing.missing" });
|
|
2360
2383
|
}
|
|
2361
|
-
}),
|
|
2384
|
+
}), h.registerVisitor({
|
|
2362
2385
|
from: "legacyDrawing",
|
|
2363
2386
|
to: "legacyDrawing",
|
|
2364
2387
|
openTag: (e) => {
|
|
2365
2388
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2366
2389
|
}
|
|
2367
|
-
}),
|
|
2390
|
+
}), h.registerVisitor({
|
|
2368
2391
|
from: "legacyDrawingHF",
|
|
2369
2392
|
to: "legacyDrawingHF",
|
|
2370
2393
|
openTag: (e) => {
|
|
2371
2394
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2372
2395
|
}
|
|
2373
2396
|
});
|
|
2374
|
-
let
|
|
2397
|
+
let Ne = null, Ie = !1, Le = /* @__PURE__ */ new Map(), L = {
|
|
2375
2398
|
from: "Fallback",
|
|
2376
2399
|
to: null
|
|
2377
|
-
},
|
|
2400
|
+
}, Re = {
|
|
2378
2401
|
from: "Choice",
|
|
2379
2402
|
transparent: !0
|
|
2380
2403
|
};
|
|
2381
|
-
|
|
2404
|
+
Le.set("Fallback", L), Le.set("Choice", Re), Le.set("control", {
|
|
2382
2405
|
from: "control",
|
|
2383
2406
|
transparent: !0,
|
|
2384
2407
|
openTag: (e) => {
|
|
2385
2408
|
let n = e.getAttribute("name"), r = e.getAttribute("r:id"), i = r ? t(r, "formControl") : null;
|
|
2386
|
-
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (
|
|
2409
|
+
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (Ne = null);
|
|
2387
2410
|
let a = i.json, o = parseInt(e.getAttribute("shapeId") ?? "", 10);
|
|
2388
2411
|
isNaN(o) || (a.shapeId = o);
|
|
2389
2412
|
let s = {
|
|
@@ -2406,67 +2429,67 @@ var Cn = {
|
|
|
2406
2429
|
json: a
|
|
2407
2430
|
}
|
|
2408
2431
|
};
|
|
2409
|
-
n && (s.content.name = n),
|
|
2432
|
+
n && (s.content.name = n), Ne = {
|
|
2410
2433
|
movable: s,
|
|
2411
2434
|
control: a
|
|
2412
2435
|
};
|
|
2413
2436
|
},
|
|
2414
2437
|
closeTag: () => {
|
|
2415
|
-
|
|
2438
|
+
Ne &&= (e.movables ||= [], e.movables.push(Ne.movable), null);
|
|
2416
2439
|
}
|
|
2417
|
-
}),
|
|
2440
|
+
}), Le.set("controlPr", {
|
|
2418
2441
|
from: "controlPr",
|
|
2419
2442
|
transparent: !0,
|
|
2420
2443
|
raw: !0,
|
|
2421
2444
|
openTag: (e) => {
|
|
2422
|
-
if (!
|
|
2445
|
+
if (!Ne) return;
|
|
2423
2446
|
let t = e.getFrom().attributes ?? {}, n = {};
|
|
2424
2447
|
for (let e in t) {
|
|
2425
2448
|
let r = t[e];
|
|
2426
2449
|
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2427
2450
|
}
|
|
2428
|
-
|
|
2451
|
+
pe(n, Ne.control);
|
|
2429
2452
|
},
|
|
2430
2453
|
closeTag: (e) => {
|
|
2431
|
-
if (!
|
|
2454
|
+
if (!Ne) return;
|
|
2432
2455
|
let t = ((e) => {
|
|
2433
2456
|
let t = /<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);
|
|
2434
2457
|
if (!t) return null;
|
|
2435
2458
|
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);
|
|
2436
2459
|
return {
|
|
2437
2460
|
anchor: {
|
|
2438
|
-
tl:
|
|
2439
|
-
br:
|
|
2461
|
+
tl: Bn(r("from")),
|
|
2462
|
+
br: Bn(r("to"))
|
|
2440
2463
|
},
|
|
2441
2464
|
anchorType: a ? o ? "twoCell" : "oneCell" : "absolute",
|
|
2442
2465
|
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2443
2466
|
};
|
|
2444
2467
|
})(e.getRawXml() ?? "");
|
|
2445
|
-
t ? (
|
|
2468
|
+
t ? (Ne.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (Ne.movable.anchorType = t.anchorType), t.rest && (Ne.control.xml = t.rest)) : Ie || (Ie = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2446
2469
|
}
|
|
2447
2470
|
});
|
|
2448
|
-
let
|
|
2471
|
+
let ze = {
|
|
2449
2472
|
from: "controls",
|
|
2450
2473
|
transparent: !0,
|
|
2451
|
-
scope: () =>
|
|
2474
|
+
scope: () => Le
|
|
2452
2475
|
};
|
|
2453
|
-
|
|
2454
|
-
let
|
|
2455
|
-
["Choice",
|
|
2456
|
-
["Fallback",
|
|
2457
|
-
["controls",
|
|
2476
|
+
h.registerVisitor(ze);
|
|
2477
|
+
let Be = /* @__PURE__ */ new Map([
|
|
2478
|
+
["Choice", Re],
|
|
2479
|
+
["Fallback", L],
|
|
2480
|
+
["controls", ze]
|
|
2458
2481
|
]);
|
|
2459
|
-
|
|
2482
|
+
h.registerVisitor({
|
|
2460
2483
|
from: "AlternateContent",
|
|
2461
2484
|
transparent: !0,
|
|
2462
|
-
scope: () =>
|
|
2463
|
-
}),
|
|
2485
|
+
scope: () => Be
|
|
2486
|
+
}), h.registerVisitor({
|
|
2464
2487
|
from: "tableParts",
|
|
2465
2488
|
to: "tables",
|
|
2466
2489
|
openTag: (e) => {
|
|
2467
2490
|
e.setSource([]);
|
|
2468
2491
|
}
|
|
2469
|
-
}),
|
|
2492
|
+
}), h.registerVisitor({
|
|
2470
2493
|
from: "tablePart",
|
|
2471
2494
|
to: [],
|
|
2472
2495
|
openTag: (e) => {
|
|
@@ -2476,26 +2499,26 @@ var Cn = {
|
|
|
2476
2499
|
r ? e.setSource(r) : e.warn("A table part is missing; the table was not imported.", { onceKey: "xlsx.sheet.table.missing" });
|
|
2477
2500
|
}
|
|
2478
2501
|
});
|
|
2479
|
-
let
|
|
2480
|
-
t.conditions?.length && (e.stops =
|
|
2481
|
-
},
|
|
2482
|
-
t.conditions?.length && (e.stops =
|
|
2483
|
-
},
|
|
2502
|
+
let Ve = (e, t) => {
|
|
2503
|
+
t.conditions?.length && (e.stops = ce(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);
|
|
2504
|
+
}, He = (e, t) => {
|
|
2505
|
+
t.conditions?.length && (e.stops = ce(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);
|
|
2506
|
+
}, z = (e) => {
|
|
2484
2507
|
if (!e.sqref) return null;
|
|
2485
2508
|
let t = e.sqref.split(/\s+/).join(",");
|
|
2486
2509
|
if (e.type === "iconSet") {
|
|
2487
2510
|
if (!e.iconSet) return null;
|
|
2488
2511
|
let n = {
|
|
2489
|
-
type:
|
|
2512
|
+
type: H.ScaleType.IconSet,
|
|
2490
2513
|
stops: []
|
|
2491
2514
|
};
|
|
2492
|
-
return
|
|
2515
|
+
return He(n, e.iconSet), {
|
|
2493
2516
|
r: t,
|
|
2494
2517
|
v: { scale: n },
|
|
2495
2518
|
priority: e.priority
|
|
2496
2519
|
};
|
|
2497
2520
|
}
|
|
2498
|
-
let n =
|
|
2521
|
+
let n = ue(e, o);
|
|
2499
2522
|
if (!n) return null;
|
|
2500
2523
|
let r = { condition: n };
|
|
2501
2524
|
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
@@ -2504,7 +2527,7 @@ var Cn = {
|
|
|
2504
2527
|
priority: e.priority
|
|
2505
2528
|
};
|
|
2506
2529
|
};
|
|
2507
|
-
|
|
2530
|
+
h.registerVisitor({
|
|
2508
2531
|
from: "worksheet",
|
|
2509
2532
|
to: {},
|
|
2510
2533
|
openTag: (e) => {},
|
|
@@ -2514,27 +2537,27 @@ var Cn = {
|
|
|
2514
2537
|
let t = n[e], r = t.x14Id;
|
|
2515
2538
|
if (!r) continue;
|
|
2516
2539
|
delete t.x14Id;
|
|
2517
|
-
let i =
|
|
2540
|
+
let i = P.get(r);
|
|
2518
2541
|
if (!i) continue;
|
|
2519
|
-
|
|
2542
|
+
P.delete(r);
|
|
2520
2543
|
let a = t.v?.scale;
|
|
2521
|
-
i.dataBar && a?.type ===
|
|
2544
|
+
i.dataBar && a?.type === H.ScaleType.DataBar ? Ve(a, i.dataBar) : i.iconSet && a?.type === H.ScaleType.IconSet && He(a, i.iconSet);
|
|
2522
2545
|
}
|
|
2523
|
-
let r = [...
|
|
2546
|
+
let r = [...P.values(), ...Se], i = /* @__PURE__ */ new Set(), a = 0;
|
|
2524
2547
|
for (let e = 0; e < r.length; e++) {
|
|
2525
|
-
let o =
|
|
2548
|
+
let o = z(r[e]);
|
|
2526
2549
|
o ? (n || (n = [], t.conditionals = n), n.push(o)) : (i.add(r[e].type ?? "unknown"), a++);
|
|
2527
2550
|
}
|
|
2528
2551
|
if (a > 0) {
|
|
2529
2552
|
let e = [...i].map((e) => `'${e}'`).join(", ");
|
|
2530
|
-
|
|
2553
|
+
o?.(a === 1 ? `An x14-only conditional formatting rule (type ${e}) is not read and will be lost on resave.` : `${a} x14-only conditional formatting rules (types ${e}) are not read and will be lost on resave.`);
|
|
2531
2554
|
}
|
|
2532
2555
|
if (n) {
|
|
2533
2556
|
n.length > 1 && n.sort((e, t) => (e.priority ?? 1 / 0) - (t.priority ?? 1 / 0));
|
|
2534
2557
|
for (let e = 0; e < n.length; e++) delete n[e].priority;
|
|
2535
2558
|
}
|
|
2536
2559
|
}
|
|
2537
|
-
}),
|
|
2560
|
+
}), h.registerVisitor({
|
|
2538
2561
|
from: "customProperties",
|
|
2539
2562
|
to: "customProperties",
|
|
2540
2563
|
openTag: (e) => {
|
|
@@ -2544,7 +2567,7 @@ var Cn = {
|
|
|
2544
2567
|
let t = e.getSource();
|
|
2545
2568
|
t.length > 0 && (e.getParent().customProperties = t);
|
|
2546
2569
|
}
|
|
2547
|
-
}),
|
|
2570
|
+
}), h.registerVisitor({
|
|
2548
2571
|
from: "customPr",
|
|
2549
2572
|
to: {},
|
|
2550
2573
|
openTag: (e) => {
|
|
@@ -2555,26 +2578,26 @@ var Cn = {
|
|
|
2555
2578
|
let i = t(r, "resource"), a = e.getSource();
|
|
2556
2579
|
a.resId = i, n.push(a);
|
|
2557
2580
|
}
|
|
2558
|
-
}),
|
|
2581
|
+
}), h.registerVisitor({
|
|
2559
2582
|
from: "sheetProtection",
|
|
2560
2583
|
to: "protection",
|
|
2561
2584
|
openTag: (e) => {
|
|
2562
2585
|
let t = e.getSource();
|
|
2563
|
-
for (let n of
|
|
2586
|
+
for (let n of T) {
|
|
2564
2587
|
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2565
|
-
t[n.key] =
|
|
2588
|
+
t[n.key] = Pe(n, r);
|
|
2566
2589
|
}
|
|
2567
2590
|
if (t.sheet) return;
|
|
2568
2591
|
let n = {};
|
|
2569
2592
|
e.copyToObject(n, "hash", $, "hashValue"), e.copyToObject(n, "algorithm", $, "algorithmName"), e.copyToObject(n, "salt", $, "saltValue"), e.copyToObject(n, "spinCount", Q), e.copyToObject(n, "legacyHash", $, "password"), Object.keys(n).length > 0 && (e.getSource().password = n);
|
|
2570
2593
|
}
|
|
2571
|
-
}),
|
|
2594
|
+
}), h.registerVisitor({
|
|
2572
2595
|
from: "protectedRanges",
|
|
2573
2596
|
to: "protectedRanges",
|
|
2574
2597
|
openTag: (e) => {
|
|
2575
2598
|
e.setSource([]);
|
|
2576
2599
|
}
|
|
2577
|
-
}),
|
|
2600
|
+
}), h.registerVisitor({
|
|
2578
2601
|
from: "protectedRange",
|
|
2579
2602
|
to: [],
|
|
2580
2603
|
openTag: (e) => {
|
|
@@ -2592,71 +2615,71 @@ var Cn = {
|
|
|
2592
2615
|
let t = e.getSource();
|
|
2593
2616
|
t?.r && t.v.name || e.setSource(void 0);
|
|
2594
2617
|
}
|
|
2595
|
-
}),
|
|
2618
|
+
}), h.registerVisitor({
|
|
2596
2619
|
from: "sheetFormatPr",
|
|
2597
2620
|
to: "sheetFormatPr",
|
|
2598
2621
|
openTag: (t) => {
|
|
2599
|
-
t.copyToObject(e, "defaultColSize",
|
|
2622
|
+
t.copyToObject(e, "defaultColSize", hn, "defaultColWidth");
|
|
2600
2623
|
let n = t.getAttribute("customHeight");
|
|
2601
|
-
n !== "1" && n !== "true" || t.copyToObject(e, "defaultRowSize",
|
|
2624
|
+
n !== "1" && n !== "true" || t.copyToObject(e, "defaultRowSize", hn, "defaultRowHeight");
|
|
2602
2625
|
let r = t.getAttribute("baseColWidth", Q);
|
|
2603
|
-
r && r !== 8 && (e.baseColSize = r),
|
|
2626
|
+
r && r !== 8 && (e.baseColSize = r), x = !!t.getAttribute("zeroHeight", Z);
|
|
2604
2627
|
}
|
|
2605
|
-
}),
|
|
2628
|
+
}), h.registerVisitor({
|
|
2606
2629
|
from: "cols",
|
|
2607
2630
|
to: "cols",
|
|
2608
2631
|
openTag: (e) => {
|
|
2609
2632
|
e.setSource([]);
|
|
2610
2633
|
}
|
|
2611
|
-
}),
|
|
2634
|
+
}), h.registerVisitor({
|
|
2612
2635
|
from: "col",
|
|
2613
2636
|
to: [],
|
|
2614
2637
|
openTag: (e) => {
|
|
2615
2638
|
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;
|
|
2616
|
-
t.r =
|
|
2639
|
+
t.r = R.runToString(i, a, !0);
|
|
2617
2640
|
let o = {};
|
|
2618
|
-
t.v = o, e.copyToObject(o, "sz",
|
|
2641
|
+
t.v = o, e.copyToObject(o, "sz", hn, "width"), e.copyToObject(o, "csz", Z, "customWidth"), e.copyToObject(o, "h", Z, "hidden"), e.copyToObject(o, "l", Q, "outlineLevel"), e.copyToObject(o, "cl", Z, "collapsed"), e.getAttribute("bestFit", Z) && (o.bf = !0), e.copyToObject(o, "s", Q, "style");
|
|
2619
2642
|
}
|
|
2620
|
-
}),
|
|
2643
|
+
}), h.registerVisitor({
|
|
2621
2644
|
from: "oleObjects",
|
|
2622
2645
|
to: null,
|
|
2623
2646
|
openTag: (e) => {
|
|
2624
2647
|
e.warn("'OLE Objects' are not supported.");
|
|
2625
2648
|
}
|
|
2626
2649
|
});
|
|
2627
|
-
let
|
|
2650
|
+
let Ue = !1, B = !1, U = 0, We = "", Ke = "", qe = (e) => {
|
|
2628
2651
|
let t = e.indexOf(":");
|
|
2629
2652
|
return t === -1 ? e : e.slice(t + 1);
|
|
2630
|
-
}, Je = new
|
|
2631
|
-
return
|
|
2653
|
+
}, Je = new In();
|
|
2654
|
+
return Zn(se, e, h.createEventHandler(e, i, o), o, c, {
|
|
2632
2655
|
onOpenTag: (e) => {
|
|
2633
|
-
|
|
2634
|
-
let t =
|
|
2635
|
-
t === "t" || t === "v" ?
|
|
2656
|
+
Ue = !0;
|
|
2657
|
+
let t = qe(e.name);
|
|
2658
|
+
t === "t" || t === "v" ? U === 0 && (B = !0) : t === "rPh" || t === "phoneticPr" ? U++ : U === 0 && Je.onOpenTag(t, e.attributes);
|
|
2636
2659
|
},
|
|
2637
2660
|
onText: (e) => {
|
|
2638
|
-
|
|
2661
|
+
B && (We += e, Je.onText(e));
|
|
2639
2662
|
},
|
|
2640
2663
|
onCloseTag: (e) => {
|
|
2641
|
-
let t =
|
|
2642
|
-
t === "t" || t === "v" ?
|
|
2664
|
+
let t = qe(e.name);
|
|
2665
|
+
t === "t" || t === "v" ? B = !1 : t === "rPh" || t === "phoneticPr" ? U > 0 && U-- : Je.onCloseTag(t);
|
|
2643
2666
|
},
|
|
2644
2667
|
onEnd: () => {
|
|
2645
|
-
if (!
|
|
2668
|
+
if (!Ue) return;
|
|
2646
2669
|
let e = Je.take();
|
|
2647
|
-
|
|
2648
|
-
let t =
|
|
2649
|
-
return We = "", e ? {
|
|
2670
|
+
Ue = !1, B = !1, U = 0;
|
|
2671
|
+
let t = ae(We);
|
|
2672
|
+
return We = "", Ke = t, e ? {
|
|
2650
2673
|
t: "r",
|
|
2651
2674
|
v: {
|
|
2652
2675
|
type: "richText",
|
|
2653
|
-
data: { runs:
|
|
2676
|
+
data: { runs: Ln(e, u?.get(Wn)) }
|
|
2654
2677
|
}
|
|
2655
2678
|
} : n(t);
|
|
2656
2679
|
},
|
|
2657
2680
|
onError: (e) => {}
|
|
2658
|
-
},
|
|
2659
|
-
},
|
|
2681
|
+
}, u, n, () => x, () => Ke);
|
|
2682
|
+
}, Kn = class {
|
|
2660
2683
|
static {
|
|
2661
2684
|
this.Collapsed = 1;
|
|
2662
2685
|
}
|
|
@@ -2687,84 +2710,99 @@ var Cn = {
|
|
|
2687
2710
|
static {
|
|
2688
2711
|
this.Spans = 512;
|
|
2689
2712
|
}
|
|
2690
|
-
},
|
|
2713
|
+
}, qn = (e, t, n) => {
|
|
2691
2714
|
if (e[0].value[0] === e[1].value[0]) return t;
|
|
2692
|
-
},
|
|
2715
|
+
}, Jn = /^\s*TABLE\s*\(/i, Yn = {
|
|
2693
2716
|
colStart: 0,
|
|
2694
2717
|
colEnd: 0,
|
|
2695
2718
|
rowStart: 0,
|
|
2696
2719
|
rowEnd: 0
|
|
2697
|
-
},
|
|
2698
|
-
let
|
|
2720
|
+
}, Xn = (e) => e === "1" || e === "true", Zn = (e, t, n, r, i, a, o, s, c, l) => {
|
|
2721
|
+
let u = !1, d = [], f = o?.get(Un), p = o?.get(Wn), m = /* @__PURE__ */ new Map(), h = !1, g = [], _ = !1, v = null, y = null, b = null, x = null, ee = null, te = null, ne = o?.get("richData") ?? Ve.EmptyArray, re = o?.get("dummyWrapped") ?? null, ie = R.normalizeA1ToR1C1, ae = He.createConflatingRanges(), oe = /* @__PURE__ */ new Map(), se = [], S = [], C = !1, w = !1, ce = null, T = (e) => {
|
|
2699
2722
|
let t = o?.get("metadata")?.values;
|
|
2700
2723
|
if (!t) return;
|
|
2701
2724
|
let n = parseInt(e, 10);
|
|
2702
2725
|
if (!Number.isFinite(n) || n < 1) return;
|
|
2703
2726
|
let r = t[n - 1]?.get("XLRICHVALUE");
|
|
2704
|
-
return r?.richValueIndex === void 0 ? void 0 :
|
|
2705
|
-
},
|
|
2727
|
+
return r?.richValueIndex === void 0 ? void 0 : ne[r.richValueIndex];
|
|
2728
|
+
}, le = !1, ue = He.createConflatingRanges(), de, fe = !1, E = -1, D = -1, O = null, k = null, pe = (e) => ({
|
|
2729
|
+
t: "r",
|
|
2730
|
+
v: {
|
|
2731
|
+
type: "hyperlink",
|
|
2732
|
+
data: {
|
|
2733
|
+
address: de,
|
|
2734
|
+
friendly: e
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
}), me = null, he = [], ge = null, _e = -2, A = 0, j = "", ve = "", ye = "", be = "", M = "", N = "", P = "", Se = "", F = "", Ce = "", we = "", Te = "", Ee = "", De = "", I = !0, Oe = null, ke = !1, Ae = !1, je = !1, Me = null, Ne = 0, Pe = (e) => {
|
|
2706
2738
|
let r = e.name, s = r.indexOf(":");
|
|
2707
|
-
if (s !== -1 && (r = r.slice(s + 1)),
|
|
2708
|
-
let
|
|
2739
|
+
if (s !== -1 && (r = r.slice(s + 1)), Ne++, Ne % 196608 == 0 && i?.(Ne), k) {
|
|
2740
|
+
let t = e.attributes;
|
|
2709
2741
|
switch (r) {
|
|
2710
2742
|
case "v":
|
|
2711
|
-
|
|
2743
|
+
h = !0;
|
|
2712
2744
|
break;
|
|
2713
2745
|
case "f":
|
|
2714
|
-
switch (
|
|
2746
|
+
switch (_ = !0, t.t ?? null) {
|
|
2715
2747
|
case null:
|
|
2716
2748
|
case "normal": break;
|
|
2717
2749
|
case "shared":
|
|
2718
|
-
let e =
|
|
2719
|
-
|
|
2750
|
+
let e = t.si;
|
|
2751
|
+
y = t.ref, v = e;
|
|
2720
2752
|
break;
|
|
2721
2753
|
case "array":
|
|
2722
|
-
|
|
2754
|
+
y = t.ref, ce = y;
|
|
2723
2755
|
break;
|
|
2724
2756
|
case "dataTable": {
|
|
2725
2757
|
let e = ((e, t, n) => {
|
|
2726
|
-
let r = e.r1;
|
|
2727
|
-
if (!r) return null;
|
|
2728
|
-
let
|
|
2758
|
+
let r = e.r1, i = Xn(e.del1);
|
|
2759
|
+
if (!r && !i) return null;
|
|
2760
|
+
let a = e.ref ?? R.cellToString({
|
|
2729
2761
|
rowIndex: t,
|
|
2730
2762
|
colIndex: n
|
|
2731
|
-
})
|
|
2732
|
-
if (
|
|
2733
|
-
|
|
2763
|
+
}), o = R.fastStringToRange(a);
|
|
2764
|
+
if (!o) return null;
|
|
2765
|
+
let s = { ref: {
|
|
2766
|
+
rowStart: o.rowStart,
|
|
2767
|
+
colStart: o.colStart,
|
|
2768
|
+
rowEnd: o.rowEnd,
|
|
2769
|
+
colEnd: o.colEnd
|
|
2770
|
+
} }, c = Xn(e.dt2D);
|
|
2771
|
+
if (c || Xn(e.dtr) ? (r && (s.rowInput = r), i && (s.rowInputDeleted = !0)) : (r && (s.columnInput = r), i && (s.columnInputDeleted = !0)), c) {
|
|
2734
2772
|
let t = e.r2;
|
|
2735
|
-
t && (
|
|
2736
|
-
}
|
|
2737
|
-
return
|
|
2738
|
-
})(
|
|
2739
|
-
e && (t.
|
|
2773
|
+
t && (s.columnInput = t), Xn(e.del2) && (s.columnInputDeleted = !0);
|
|
2774
|
+
}
|
|
2775
|
+
return s;
|
|
2776
|
+
})(t, E, D);
|
|
2777
|
+
e && (S.push(e), Xn(t.ca) && ue.append(E, D));
|
|
2740
2778
|
return;
|
|
2741
2779
|
}
|
|
2742
2780
|
}
|
|
2743
|
-
let e =
|
|
2744
|
-
e !== void 0 && (
|
|
2781
|
+
let e = t.ca;
|
|
2782
|
+
e !== void 0 && (le = e === "1");
|
|
2745
2783
|
break;
|
|
2746
2784
|
case "is":
|
|
2747
|
-
|
|
2785
|
+
fe = !0;
|
|
2748
2786
|
return;
|
|
2749
2787
|
}
|
|
2750
|
-
|
|
2751
|
-
} else if (
|
|
2788
|
+
fe && !_ && a?.onOpenTag?.(e);
|
|
2789
|
+
} else if (u) {
|
|
2752
2790
|
if (r === "c") {
|
|
2753
|
-
|
|
2791
|
+
k = e, de = void 0;
|
|
2754
2792
|
let t = e.attributes, n = t.r;
|
|
2755
|
-
D = n === void 0 ? D + 1 :
|
|
2793
|
+
D = n === void 0 ? D + 1 : R.fastStringToCol(n);
|
|
2756
2794
|
let r = t.t;
|
|
2757
|
-
r === void 0 ?
|
|
2795
|
+
r === void 0 ? me = null : (me = r, me === "str" && (fe = !0));
|
|
2758
2796
|
let i = t.s;
|
|
2759
|
-
i === void 0 && (
|
|
2797
|
+
i === void 0 && (Me !== null || je) && (i = "0"), i !== void 0 && (i = parseInt(i), Oe && Oe.value === i && Oe.colEnd + 1 === D ? Oe.colEnd = D : (Oe = {
|
|
2760
2798
|
colStart: D,
|
|
2761
2799
|
rowStart: E,
|
|
2762
2800
|
colEnd: D,
|
|
2763
2801
|
rowEnd: E,
|
|
2764
2802
|
value: i
|
|
2765
|
-
},
|
|
2803
|
+
}, g.push(Oe))), ce = null, w = !1;
|
|
2766
2804
|
let a = t.cm;
|
|
2767
|
-
|
|
2805
|
+
C = a !== void 0 && ((e) => {
|
|
2768
2806
|
let t = o?.get("metadata")?.cells;
|
|
2769
2807
|
if (!t) return !1;
|
|
2770
2808
|
let n = parseInt(e, 10);
|
|
@@ -2772,73 +2810,83 @@ var Cn = {
|
|
|
2772
2810
|
})(a);
|
|
2773
2811
|
let s = t.vm;
|
|
2774
2812
|
if (s !== void 0) {
|
|
2775
|
-
let e =
|
|
2776
|
-
if (
|
|
2813
|
+
let e = T(s);
|
|
2814
|
+
if (z.isError(e)) {
|
|
2777
2815
|
let t = e.getCode();
|
|
2778
2816
|
O = {
|
|
2779
2817
|
t: "e",
|
|
2780
2818
|
v: t
|
|
2781
|
-
},
|
|
2819
|
+
}, C && t === z.Code.Spill && (w = !0);
|
|
2782
2820
|
}
|
|
2783
2821
|
}
|
|
2784
2822
|
}
|
|
2785
2823
|
} else {
|
|
2786
|
-
if (
|
|
2787
|
-
|
|
2824
|
+
if (Ae && r === "row") {
|
|
2825
|
+
u = !0;
|
|
2788
2826
|
let t = e.attributes.r;
|
|
2789
2827
|
if (E = t === void 0 ? E + 1 : parseInt(t) - 1, D = -1, c?.()) {
|
|
2790
|
-
let e =
|
|
2791
|
-
e && e.max + 1 === E ? e.max = E :
|
|
2828
|
+
let e = d[d.length - 1];
|
|
2829
|
+
e && e.max + 1 === E ? e.max = E : d.push({
|
|
2792
2830
|
min: E,
|
|
2793
2831
|
max: E
|
|
2794
2832
|
});
|
|
2795
2833
|
}
|
|
2796
|
-
if (
|
|
2797
|
-
if (
|
|
2798
|
-
let e =
|
|
2799
|
-
|
|
2834
|
+
if (A = 0, ve = e.attributes.customHeight, ve !== void 0 && (A |= Kn.CustomHeight), ve !== F && (I = !0, F = ve), j = e.attributes.ht, j !== void 0 && (A |= Kn.Ht), j !== Se && (I = !0, Se = j), ye = e.attributes.hidden, ye !== void 0 && (A |= Kn.Hidden), ye !== Ce && (I = !0, Ce = ye), M = e.attributes.s, M !== void 0 && (A |= Kn.S), M !== Te && (I = !0, Te = M), be = e.attributes.customFormat, be !== void 0 && (A |= Kn.CustomFormat), be !== we && (I = !0, we = be), N = e.attributes.outlineLevel, N !== void 0 && (A |= Kn.OutlineLevel), N !== Ee && (I = !0, Ee = N), P = e.attributes.collapsed, P !== void 0 && (A |= Kn.Collapsed), P !== De && (I = !0, De = P), A !== 0) {
|
|
2835
|
+
if (_e + 1 !== E || I) {
|
|
2836
|
+
let e = ve !== void 0 && (ve === "1" || ve === "true"), t = be !== void 0 && (be === "1" || be === "true");
|
|
2837
|
+
Me = t && M !== void 0 ? M : null, t && Me === null && (Me = "0"), ge = {
|
|
2800
2838
|
min: E,
|
|
2801
2839
|
max: E,
|
|
2802
2840
|
value: {
|
|
2803
|
-
sz:
|
|
2841
|
+
sz: j === void 0 ? -1 : parseFloat(j),
|
|
2804
2842
|
csz: e,
|
|
2805
|
-
h:
|
|
2806
|
-
s:
|
|
2807
|
-
l:
|
|
2808
|
-
cl:
|
|
2843
|
+
h: ye !== void 0 && (ye === "1" || ye === "true"),
|
|
2844
|
+
s: Me === null ? void 0 : Me === "0" ? 0 : parseInt(Me),
|
|
2845
|
+
l: N === void 0 || N === "0" ? 0 : parseInt(N),
|
|
2846
|
+
cl: P !== void 0 && (P === "1" || P === "true")
|
|
2809
2847
|
}
|
|
2810
|
-
},
|
|
2811
|
-
} else
|
|
2848
|
+
}, he.push(ge);
|
|
2849
|
+
} else ge.max = E;
|
|
2812
2850
|
}
|
|
2813
|
-
|
|
2851
|
+
_e = E, I = !1;
|
|
2814
2852
|
return;
|
|
2815
2853
|
}
|
|
2816
|
-
if (r === "sheetData" && (
|
|
2817
|
-
|
|
2854
|
+
if (r === "sheetData" && (Ae = !0), !ke && r === "sheetData") {
|
|
2855
|
+
ke = !0;
|
|
2818
2856
|
let e = t.cols, n = e ? e.length : 0;
|
|
2819
|
-
for (let t = 0; !
|
|
2857
|
+
for (let t = 0; !je && t < n; t++) e[t].v.s && (je = !0);
|
|
2820
2858
|
}
|
|
2821
2859
|
n?.onOpenTag?.(e);
|
|
2822
2860
|
}
|
|
2823
|
-
},
|
|
2861
|
+
}, Fe = (t) => {
|
|
2824
2862
|
let r = t.name;
|
|
2825
|
-
if (r === "sheetData" && (
|
|
2863
|
+
if (r === "sheetData" && (Ae = !1), !_ || r !== "c" && r !== "f" || (v && (x = oe.get(v) ?? null), x && (de = ((e) => {
|
|
2864
|
+
if (e.length < 11 || (32 | e.charCodeAt(0)) != 104 || !/^HYPERLINK\(/i.test(e)) return;
|
|
2865
|
+
let t = 1, n = !1, r = 10;
|
|
2866
|
+
for (; r < e.length && t > 0; r++) {
|
|
2867
|
+
let i = e.charCodeAt(r);
|
|
2868
|
+
n ? i === 34 && (e.charCodeAt(r + 1) === 34 ? r++ : n = !1) : i === 34 ? n = !0 : i === 40 ? t++ : i === 41 && t--;
|
|
2869
|
+
}
|
|
2870
|
+
if (t !== 0 || e.slice(r).trim().length > 0) return;
|
|
2871
|
+
let i = /^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(e);
|
|
2872
|
+
return i ? i[1].replace(/""/g, "\"") : null;
|
|
2873
|
+
})(x[2]), ae.append(E, D, x), le && ue.append(E, D)), ce !== null && se.push([ce, C ? w ? "error" : "dynamic" : "fixed"]), _ = !1, x = null, v = null, y = null, h = !1, le = !1, ce = null, C = !1, w = !1), k) {
|
|
2826
2874
|
let n = r.indexOf(":");
|
|
2827
|
-
if (n !== -1 && (r = r.slice(n + 1)),
|
|
2875
|
+
if (n !== -1 && (r = r.slice(n + 1)), fe) {
|
|
2828
2876
|
if (r === "is" || r === "v") {
|
|
2829
2877
|
let t = a?.onEnd?.();
|
|
2830
|
-
t != null && e.pushAt(E, D, typeof t == "number" ? "" + t : t);
|
|
2878
|
+
t != null && e.pushAt(E, D, de !== void 0 && typeof t == "number" ? pe(l?.() ?? "") : typeof t == "number" ? "" + t : t);
|
|
2831
2879
|
} else r !== "f" && a?.onCloseTag?.(t);
|
|
2832
2880
|
}
|
|
2833
|
-
|
|
2881
|
+
h &&= !1, r === "c" && (k = null, fe = !1);
|
|
2834
2882
|
} else {
|
|
2835
|
-
if (
|
|
2883
|
+
if (u) return u = !1, void (Oe = null);
|
|
2836
2884
|
n?.onCloseTag?.(t);
|
|
2837
2885
|
}
|
|
2838
|
-
},
|
|
2886
|
+
}, Le = (i) => {
|
|
2839
2887
|
let c = i.trim();
|
|
2840
|
-
if (
|
|
2841
|
-
switch (O = null,
|
|
2888
|
+
if (h) {
|
|
2889
|
+
switch (O = null, me) {
|
|
2842
2890
|
case null:
|
|
2843
2891
|
case "n":
|
|
2844
2892
|
O = parseFloat(c);
|
|
@@ -2847,10 +2895,10 @@ var Cn = {
|
|
|
2847
2895
|
O = c === "1" || c === "true";
|
|
2848
2896
|
break;
|
|
2849
2897
|
case "s": {
|
|
2850
|
-
let e = parseInt(c, 10), t =
|
|
2898
|
+
let e = parseInt(c, 10), t = m.get(e);
|
|
2851
2899
|
if (t === void 0) {
|
|
2852
|
-
let n =
|
|
2853
|
-
t = n ?
|
|
2900
|
+
let n = f?.get(e);
|
|
2901
|
+
t = n ? Ln(n, p) : null, m.set(e, t);
|
|
2854
2902
|
}
|
|
2855
2903
|
O = t ? {
|
|
2856
2904
|
t: "r",
|
|
@@ -2864,12 +2912,12 @@ var Cn = {
|
|
|
2864
2912
|
case "d": {
|
|
2865
2913
|
let e = ((e, t = !1) => {
|
|
2866
2914
|
if (!e) return null;
|
|
2867
|
-
let n =
|
|
2915
|
+
let n = Mn.exec(e);
|
|
2868
2916
|
if (n) {
|
|
2869
2917
|
let [, e, t, r] = n;
|
|
2870
2918
|
return e === void 0 && t === void 0 && r === void 0 ? null : (3600 * parseFloat(e ?? "0") + 60 * parseFloat(t ?? "0") + parseFloat(r ?? "0")) / 86400;
|
|
2871
2919
|
}
|
|
2872
|
-
let r =
|
|
2920
|
+
let r = jn.exec(e);
|
|
2873
2921
|
if (!r) return null;
|
|
2874
2922
|
let [, i, a, o, s, c, l, u] = r;
|
|
2875
2923
|
if (i === void 0 && s === void 0) return null;
|
|
@@ -2877,12 +2925,12 @@ var Cn = {
|
|
|
2877
2925
|
if (i !== void 0) {
|
|
2878
2926
|
let e = parseInt(i, 10), n = parseInt(a, 10), r = parseInt(o, 10);
|
|
2879
2927
|
if (n < 1 || n > 12 || r < 1 || r > 31) return null;
|
|
2880
|
-
let s =
|
|
2928
|
+
let s = Nn(e, n, r) - Pn;
|
|
2881
2929
|
if (d = s <= 60 ? s - 1 : s, t && (d -= 1462), d < 0) return null;
|
|
2882
2930
|
}
|
|
2883
2931
|
return s !== void 0 && (d += (3600 * parseInt(s, 10) + 60 * parseInt(c, 10) + (l === void 0 ? 0 : parseInt(l, 10)) + (u === void 0 ? 0 : parseFloat(u))) / 86400), d;
|
|
2884
|
-
})(c, !0 === o?.get(
|
|
2885
|
-
e === null ? s && (r?.(`Date '${c}' in cell ${
|
|
2932
|
+
})(c, !0 === o?.get(Hn));
|
|
2933
|
+
e === null ? s && (r?.(`Date '${c}' in cell ${R.cellToString({
|
|
2886
2934
|
colIndex: D,
|
|
2887
2935
|
rowIndex: E
|
|
2888
2936
|
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"), O = "" + s(c)) : O = e;
|
|
@@ -2890,60 +2938,67 @@ var Cn = {
|
|
|
2890
2938
|
}
|
|
2891
2939
|
case "e":
|
|
2892
2940
|
if (c === "#VALUE!") {
|
|
2893
|
-
let e =
|
|
2941
|
+
let e = k.attributes.vm;
|
|
2894
2942
|
if (e !== void 0) {
|
|
2895
|
-
let t =
|
|
2896
|
-
if (
|
|
2943
|
+
let t = T(e);
|
|
2944
|
+
if (z.isError(t)) {
|
|
2897
2945
|
O = {
|
|
2898
2946
|
t: "e",
|
|
2899
2947
|
v: t.getCode()
|
|
2900
2948
|
};
|
|
2901
2949
|
break;
|
|
2902
2950
|
}
|
|
2951
|
+
if (Ye.isJSON(t)) {
|
|
2952
|
+
O = {
|
|
2953
|
+
t: "r",
|
|
2954
|
+
v: t
|
|
2955
|
+
};
|
|
2956
|
+
break;
|
|
2957
|
+
}
|
|
2903
2958
|
}
|
|
2904
2959
|
}
|
|
2905
|
-
let e =
|
|
2960
|
+
let e = z.getBuiltInByLabel(c);
|
|
2906
2961
|
e ? O = {
|
|
2907
2962
|
t: "e",
|
|
2908
2963
|
v: e.getCode()
|
|
2909
|
-
} : (O = c, r?.(`Unknown formula error '${c}' in cell ${
|
|
2964
|
+
} : (O = c, r?.(`Unknown formula error '${c}' in cell ${R.cellToString({
|
|
2910
2965
|
colIndex: D,
|
|
2911
2966
|
rowIndex: E
|
|
2912
2967
|
})}`));
|
|
2913
2968
|
break;
|
|
2914
2969
|
case "str":
|
|
2915
|
-
case "inlineStr":
|
|
2970
|
+
case "inlineStr": fe = !0;
|
|
2916
2971
|
}
|
|
2917
|
-
O !== null && e.pushAt(E, D, O);
|
|
2972
|
+
O !== null && e.pushAt(E, D, de === void 0 || typeof O != "number" && typeof O != "boolean" ? O : pe(O));
|
|
2918
2973
|
}
|
|
2919
|
-
if (
|
|
2920
|
-
if (ee ===
|
|
2974
|
+
if (v) {
|
|
2975
|
+
if (ee === v) x = te;
|
|
2921
2976
|
else {
|
|
2922
|
-
if (
|
|
2977
|
+
if (x = oe.get(v) ?? null, !x) {
|
|
2923
2978
|
let e = [];
|
|
2924
|
-
|
|
2925
|
-
|
|
2979
|
+
b = ie(c, E, D, e), x = [
|
|
2980
|
+
b,
|
|
2926
2981
|
e,
|
|
2927
2982
|
c
|
|
2928
|
-
],
|
|
2983
|
+
], oe.set(v, x);
|
|
2929
2984
|
}
|
|
2930
|
-
ee =
|
|
2985
|
+
ee = v, te = x;
|
|
2931
2986
|
}
|
|
2932
|
-
|
|
2987
|
+
v = null;
|
|
2933
2988
|
}
|
|
2934
|
-
if (
|
|
2935
|
-
if (
|
|
2989
|
+
if (_) {
|
|
2990
|
+
if (re !== null) {
|
|
2936
2991
|
let e = ((e) => {
|
|
2937
|
-
if (e.length <
|
|
2938
|
-
let t =
|
|
2939
|
-
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return
|
|
2992
|
+
if (e.length < yn.length || e.slice(0, yn.length).toUpperCase() !== bn) return Sn;
|
|
2993
|
+
let t = wn(e, yn.length);
|
|
2994
|
+
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return Sn;
|
|
2940
2995
|
let n = t.value;
|
|
2941
|
-
return n.toUpperCase() ===
|
|
2996
|
+
return n.toUpperCase() === xn ? Cn : n.length === 0 ? Sn : {
|
|
2942
2997
|
kind: "formula",
|
|
2943
2998
|
formula: n
|
|
2944
2999
|
};
|
|
2945
3000
|
})(c);
|
|
2946
|
-
e.kind !== "none" &&
|
|
3001
|
+
e.kind !== "none" && re.push({
|
|
2947
3002
|
sheet: t,
|
|
2948
3003
|
rowIndex: E,
|
|
2949
3004
|
colIndex: D,
|
|
@@ -2951,33 +3006,33 @@ var Cn = {
|
|
|
2951
3006
|
});
|
|
2952
3007
|
}
|
|
2953
3008
|
let e = [];
|
|
2954
|
-
|
|
2955
|
-
|
|
3009
|
+
b = ie(c, E, D, e), x = [
|
|
3010
|
+
b,
|
|
2956
3011
|
e,
|
|
2957
3012
|
c
|
|
2958
3013
|
];
|
|
2959
3014
|
}
|
|
2960
|
-
|
|
2961
|
-
},
|
|
3015
|
+
fe ? a?.onText?.(i) : u || n?.onText?.(c);
|
|
3016
|
+
}, L = {
|
|
2962
3017
|
r: void 0,
|
|
2963
3018
|
t: void 0,
|
|
2964
3019
|
s: void 0,
|
|
2965
3020
|
cm: void 0,
|
|
2966
3021
|
vm: void 0
|
|
2967
|
-
},
|
|
3022
|
+
}, Re = {
|
|
2968
3023
|
name: "c",
|
|
2969
|
-
attributes:
|
|
3024
|
+
attributes: L,
|
|
2970
3025
|
isSelfClosing: !1
|
|
2971
|
-
},
|
|
3026
|
+
}, ze = {
|
|
2972
3027
|
t: void 0,
|
|
2973
3028
|
si: void 0,
|
|
2974
3029
|
ref: void 0,
|
|
2975
3030
|
ca: void 0
|
|
2976
|
-
},
|
|
3031
|
+
}, Be = {
|
|
2977
3032
|
name: "f",
|
|
2978
|
-
attributes:
|
|
3033
|
+
attributes: ze,
|
|
2979
3034
|
isSelfClosing: !1
|
|
2980
|
-
},
|
|
3035
|
+
}, Ue = {
|
|
2981
3036
|
name: "v",
|
|
2982
3037
|
attributes: {},
|
|
2983
3038
|
isSelfClosing: !1
|
|
@@ -2990,31 +3045,31 @@ var Cn = {
|
|
|
2990
3045
|
customHeight: void 0,
|
|
2991
3046
|
customFormat: void 0,
|
|
2992
3047
|
outlineLevel: void 0
|
|
2993
|
-
},
|
|
3048
|
+
}, V = {
|
|
2994
3049
|
name: "row",
|
|
2995
3050
|
attributes: B,
|
|
2996
3051
|
isSelfClosing: !1
|
|
2997
|
-
},
|
|
3052
|
+
}, H = mn.NEED_MORE, U = mn.NOT_HANDLED, We = mn.decodeText, Ke = !1, qe = (e, t, n, r) => {
|
|
2998
3053
|
for (;;) {
|
|
2999
3054
|
let i = 0;
|
|
3000
3055
|
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
3001
|
-
if (t >= n) return
|
|
3002
|
-
if (i === 62) return
|
|
3003
|
-
if (i === 47) return t + 1 >= n ?
|
|
3056
|
+
if (t >= n) return H;
|
|
3057
|
+
if (i === 62) return Ke = !1, t + 1;
|
|
3058
|
+
if (i === 47) return t + 1 >= n ? H : e.charCodeAt(t + 1) === 62 ? (Ke = !0, t + 2) : U;
|
|
3004
3059
|
let a = t;
|
|
3005
3060
|
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
3006
|
-
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return
|
|
3061
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return U;
|
|
3007
3062
|
t++;
|
|
3008
3063
|
}
|
|
3009
|
-
if (t + 1 >= n) return
|
|
3064
|
+
if (t + 1 >= n) return H;
|
|
3010
3065
|
let o = t - a, s = e.charCodeAt(t + 1);
|
|
3011
|
-
if (s !== 34 && s !== 39) return
|
|
3066
|
+
if (s !== 34 && s !== 39) return U;
|
|
3012
3067
|
let c = t + 2, l = c;
|
|
3013
3068
|
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
3014
|
-
if (i === 38 || i < 32) return
|
|
3069
|
+
if (i === 38 || i < 32) return U;
|
|
3015
3070
|
l++;
|
|
3016
3071
|
}
|
|
3017
|
-
if (l >= n) return
|
|
3072
|
+
if (l >= n) return H;
|
|
3018
3073
|
t = l + 1;
|
|
3019
3074
|
let u = e.charCodeAt(a);
|
|
3020
3075
|
if (r === 2) switch (o) {
|
|
@@ -3032,14 +3087,14 @@ var Cn = {
|
|
|
3032
3087
|
break;
|
|
3033
3088
|
case 12: e.startsWith("customHeight", a) ? B.customHeight = e.slice(c, l) : e.startsWith("customFormat", a) ? B.customFormat = e.slice(c, l) : e.startsWith("outlineLevel", a) && (B.outlineLevel = e.slice(c, l));
|
|
3034
3089
|
}
|
|
3035
|
-
else if (r === 0) o === 1 ? u === 114 ?
|
|
3036
|
-
else if (o === 1) u === 116 && (
|
|
3090
|
+
else if (r === 0) o === 1 ? u === 114 ? L.r = e.slice(c, l) : u === 116 ? L.t = e.slice(c, l) : u === 115 && (L.s = e.slice(c, l)) : o === 2 && e.charCodeAt(a + 1) === 109 && (u === 99 ? L.cm = e.slice(c, l) : u === 118 && (L.vm = e.slice(c, l)));
|
|
3091
|
+
else if (o === 1) u === 116 && (ze.t = e.slice(c, l));
|
|
3037
3092
|
else if (o === 2) {
|
|
3038
3093
|
let t = e.charCodeAt(a + 1);
|
|
3039
|
-
u === 115 && t === 105 ?
|
|
3040
|
-
} else o === 3 && e.startsWith("ref", a) && (
|
|
3094
|
+
u === 115 && t === 105 ? ze.si = e.slice(c, l) : u === 99 && t === 97 && (ze.ca = e.slice(c, l));
|
|
3095
|
+
} else o === 3 && e.startsWith("ref", a) && (ze.ref = e.slice(c, l));
|
|
3041
3096
|
}
|
|
3042
|
-
},
|
|
3097
|
+
}, Je = (e, t, n) => e.charCodeAt(t + 1) === 47 && e.charCodeAt(t + 2) === n && e.charCodeAt(t + 3) === 62;
|
|
3043
3098
|
return {
|
|
3044
3099
|
...n,
|
|
3045
3100
|
onEnd: () => {
|
|
@@ -3056,16 +3111,16 @@ var Cn = {
|
|
|
3056
3111
|
cl: !1
|
|
3057
3112
|
}
|
|
3058
3113
|
});
|
|
3059
|
-
for (let r of
|
|
3060
|
-
e <=
|
|
3114
|
+
for (let r of d) r.min > e && t.push(n(e, r.min - 1)), e = Math.max(e, r.max + 1);
|
|
3115
|
+
e <= xe && t.push(n(e, xe)), t.length > 0 && (he.push(...t), he.sort((e, t) => e.min - t.min));
|
|
3061
3116
|
}
|
|
3062
|
-
|
|
3063
|
-
let r =
|
|
3117
|
+
he.length > 0 && (t.rows = R.runsToRefs(he, !1));
|
|
3118
|
+
let r = ae.done(qn);
|
|
3064
3119
|
r = ((e, t) => {
|
|
3065
3120
|
let n = null;
|
|
3066
3121
|
for (let t = 0; t < e.length; t++) {
|
|
3067
3122
|
let r = e[t];
|
|
3068
|
-
if (!
|
|
3123
|
+
if (!Jn.test(r.value[2])) continue;
|
|
3069
3124
|
n ??= /* @__PURE__ */ new Map();
|
|
3070
3125
|
let i = r.value[0], a = n.get(i);
|
|
3071
3126
|
a ? a.push(r) : n.set(i, [r]);
|
|
@@ -3084,43 +3139,50 @@ var Cn = {
|
|
|
3084
3139
|
n.rowStart < i.rowStart && (i.rowStart = n.rowStart), n.colStart < i.colStart && (i.colStart = n.colStart), n.rowEnd > i.rowEnd && (i.rowEnd = n.rowEnd), n.colEnd > i.colEnd && (i.colEnd = n.colEnd), a += (n.rowEnd - n.rowStart + 1) * (n.colEnd - n.colStart + 1);
|
|
3085
3140
|
}
|
|
3086
3141
|
if (a !== (i.rowEnd - i.rowStart + 1) * (i.colEnd - i.colStart + 1)) continue;
|
|
3087
|
-
let o =
|
|
3142
|
+
let o = An(R.resolveRelativeToA1(n.value[1], i.rowStart, i.colStart), i);
|
|
3088
3143
|
if (o) {
|
|
3089
|
-
|
|
3144
|
+
t.push(o);
|
|
3090
3145
|
for (let t = 0; t < e.length; t++) r.add(e[t]);
|
|
3091
3146
|
}
|
|
3092
3147
|
}
|
|
3093
3148
|
return r.size === 0 ? e : e.filter((e) => !r.has(e));
|
|
3094
|
-
})(r,
|
|
3149
|
+
})(r, S);
|
|
3095
3150
|
let i = r.length;
|
|
3096
|
-
if (i > 0) {
|
|
3151
|
+
if (i > 0 || S.length > 0) {
|
|
3097
3152
|
let e = Array(i);
|
|
3098
3153
|
for (let t = 0; t < i; t++) {
|
|
3099
|
-
let n = r[t], i =
|
|
3154
|
+
let n = r[t], i = R.rangeToString(n), a = n.value[1], o = R.resolveRelativeToA1(a, n.rowStart, n.colStart);
|
|
3100
3155
|
e[t] = [i, o];
|
|
3101
3156
|
}
|
|
3157
|
+
for (let t = 0; t < S.length; t++) {
|
|
3158
|
+
let n = S[t], r = n.ref;
|
|
3159
|
+
e.push([R.cellToString({
|
|
3160
|
+
rowIndex: r.rowStart,
|
|
3161
|
+
colIndex: r.colStart
|
|
3162
|
+
}), Ie(n)]), se.push([R.rangeToString(r), "dynamic"]);
|
|
3163
|
+
}
|
|
3102
3164
|
t.formulas = e;
|
|
3103
3165
|
}
|
|
3104
|
-
let a =
|
|
3166
|
+
let a = ue.done(!0), o = a.length;
|
|
3105
3167
|
if (o > 0) {
|
|
3106
3168
|
let e = Array(o);
|
|
3107
3169
|
for (let t = 0; t < o; t++) {
|
|
3108
|
-
let n = a[t], r =
|
|
3170
|
+
let n = a[t], r = R.rangeToString(n);
|
|
3109
3171
|
e[t] = r;
|
|
3110
3172
|
}
|
|
3111
3173
|
t.volatile = e;
|
|
3112
3174
|
}
|
|
3113
|
-
|
|
3114
|
-
let s =
|
|
3175
|
+
se.length > 0 && (t.formulaArray = [...se]);
|
|
3176
|
+
let s = g.length;
|
|
3115
3177
|
if (s > 0) {
|
|
3116
|
-
|
|
3117
|
-
let e =
|
|
3178
|
+
g.sort(He.createRangeComparator(Ge.Axis.Column));
|
|
3179
|
+
let e = g[0], n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value, o = [];
|
|
3118
3180
|
o.push(e);
|
|
3119
3181
|
let c = null;
|
|
3120
|
-
for (let t = 1; t < s; t++) c =
|
|
3182
|
+
for (let t = 1; t < s; t++) c = g[t], a !== c.value || n !== c.colStart || r !== c.colEnd || i + 1 !== c.rowEnd ? (o.push(c), e = c, n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value) : (i = c.rowEnd, e.rowEnd = i);
|
|
3121
3183
|
let l = o.length, u = Array(l);
|
|
3122
3184
|
for (let e = 0; e < l; e++) {
|
|
3123
|
-
let t = o[e], n =
|
|
3185
|
+
let t = o[e], n = R.rangeToString(t);
|
|
3124
3186
|
u[e] = [n, t.value];
|
|
3125
3187
|
}
|
|
3126
3188
|
t.directStyles = u;
|
|
@@ -3128,70 +3190,70 @@ var Cn = {
|
|
|
3128
3190
|
let l = e.build();
|
|
3129
3191
|
l && (t.data = l.tuples), n?.onEnd?.();
|
|
3130
3192
|
},
|
|
3131
|
-
onOpenTag:
|
|
3132
|
-
onCloseTag:
|
|
3133
|
-
onText:
|
|
3193
|
+
onOpenTag: Pe,
|
|
3194
|
+
onCloseTag: Fe,
|
|
3195
|
+
onText: Le,
|
|
3134
3196
|
elementScanners: [{
|
|
3135
3197
|
name: "c",
|
|
3136
3198
|
scan: (e, t, n) => {
|
|
3137
|
-
if (!
|
|
3138
|
-
|
|
3139
|
-
let r =
|
|
3199
|
+
if (!u || k !== null) return U;
|
|
3200
|
+
L.r = L.t = L.s = L.cm = L.vm = void 0;
|
|
3201
|
+
let r = qe(e, t + 2, n, 0);
|
|
3140
3202
|
if (r < 0) return r;
|
|
3141
|
-
let i =
|
|
3142
|
-
if (
|
|
3143
|
-
let a = !1, o = -1, s = -1, c = -1,
|
|
3144
|
-
if (!
|
|
3203
|
+
let i = L.t;
|
|
3204
|
+
if (L.r === void 0 || i === "str" || i === "inlineStr") return U;
|
|
3205
|
+
let a = !1, o = -1, s = -1, c = -1, l = -1, d = r;
|
|
3206
|
+
if (!Ke) for (ze.t = ze.si = ze.ref = ze.ca = void 0;;) {
|
|
3145
3207
|
let t = e.indexOf("<", r);
|
|
3146
|
-
if (t === -1 || t + 3 >= n) return
|
|
3208
|
+
if (t === -1 || t + 3 >= n) return H;
|
|
3147
3209
|
for (let n = r; n < t; n++) {
|
|
3148
3210
|
let t = e.charCodeAt(n);
|
|
3149
|
-
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return
|
|
3211
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return U;
|
|
3150
3212
|
}
|
|
3151
|
-
let i = e.charCodeAt(t + 1),
|
|
3213
|
+
let i = e.charCodeAt(t + 1), u = e.charCodeAt(t + 2);
|
|
3152
3214
|
if (i === 47) {
|
|
3153
|
-
if (!
|
|
3215
|
+
if (!Je(e, t, 99)) return U;
|
|
3154
3216
|
d = t + 4;
|
|
3155
3217
|
break;
|
|
3156
3218
|
}
|
|
3157
|
-
if (i === 102 && !a && c === -1 && (
|
|
3158
|
-
if (a = !0, r =
|
|
3159
|
-
if (
|
|
3160
|
-
if (
|
|
3219
|
+
if (i === 102 && !a && c === -1 && (u === 32 || u === 62 || u === 47)) {
|
|
3220
|
+
if (a = !0, r = qe(e, t + 2, n, 1), r < 0) return r;
|
|
3221
|
+
if (ze.t === "dataTable") return U;
|
|
3222
|
+
if (Ke) continue;
|
|
3161
3223
|
let i = e.indexOf("<", r);
|
|
3162
|
-
if (i === -1 || i + 3 >= n) return
|
|
3163
|
-
if (!
|
|
3224
|
+
if (i === -1 || i + 3 >= n) return H;
|
|
3225
|
+
if (!Je(e, i, 102)) return U;
|
|
3164
3226
|
o = r, s = i, r = i + 4;
|
|
3165
|
-
} else if (i === 118 &&
|
|
3227
|
+
} else if (i === 118 && u === 62 && c === -1) {
|
|
3166
3228
|
let i = e.indexOf("<", t + 3);
|
|
3167
|
-
if (i === -1 || i + 3 >= n) return
|
|
3168
|
-
if (!
|
|
3169
|
-
c = t + 3,
|
|
3170
|
-
} else return
|
|
3229
|
+
if (i === -1 || i + 3 >= n) return H;
|
|
3230
|
+
if (!Je(e, i, 118)) return U;
|
|
3231
|
+
c = t + 3, l = i, r = i + 4;
|
|
3232
|
+
} else return U;
|
|
3171
3233
|
}
|
|
3172
|
-
return
|
|
3234
|
+
return Pe(Re), a && (Pe(Be), s > o && Le(We(e.slice(o, s))), Fe(Be)), c !== -1 && (Pe(Ue), l > c && Le(We(e.slice(c, l))), Fe(Ue)), Fe(Re), d;
|
|
3173
3235
|
}
|
|
3174
3236
|
}, {
|
|
3175
3237
|
name: "row",
|
|
3176
|
-
openTag:
|
|
3238
|
+
openTag: V,
|
|
3177
3239
|
scan: (e, t, n) => {
|
|
3178
|
-
if (!
|
|
3240
|
+
if (!Ae || u || k !== null) return U;
|
|
3179
3241
|
B.r = B.s = B.ht = B.hidden = B.collapsed = B.customHeight = B.customFormat = B.outlineLevel = void 0;
|
|
3180
|
-
let r =
|
|
3181
|
-
return r < 0 ? r :
|
|
3242
|
+
let r = qe(e, t + 4, n, 2);
|
|
3243
|
+
return r < 0 ? r : Ke || B.r === void 0 ? U : (Pe(V), r);
|
|
3182
3244
|
}
|
|
3183
3245
|
}]
|
|
3184
3246
|
};
|
|
3185
|
-
},
|
|
3247
|
+
}, Qn = /* @__PURE__ */ new Map([
|
|
3186
3248
|
["urn:schemas-microsoft-com:vml", "v"],
|
|
3187
3249
|
["urn:schemas-microsoft-com:office:office", "o"],
|
|
3188
3250
|
["urn:schemas-microsoft-com:office:excel", "x"]
|
|
3189
|
-
]),
|
|
3190
|
-
function
|
|
3251
|
+
]), $n = [...Qn].map(([e, t]) => ` xmlns:${t}="${e}"`).join(""), er = /<(\/?)([A-Za-z_][\w.-]*(?::[\w.-]+)?)((?:[^>"']|"[^"]*"|'[^']*')*?)(\/?)>/g, tr = /(\s+)([A-Za-z_][\w.-]*(?::[\w.-]+)?)(\s*=\s*)("[^"]*"|'[^']*')/g, nr = /\sxmlns(?::([\w.-]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
3252
|
+
function rr(e) {
|
|
3191
3253
|
if (!e || !((e) => {
|
|
3192
3254
|
let t;
|
|
3193
|
-
for (
|
|
3194
|
-
let e =
|
|
3255
|
+
for (nr.lastIndex = 0; (t = nr.exec(e)) !== null;) {
|
|
3256
|
+
let e = Qn.get(t[2] ?? t[3] ?? "");
|
|
3195
3257
|
if (e && e !== (t[1] ?? "")) return !0;
|
|
3196
3258
|
}
|
|
3197
3259
|
return !1;
|
|
@@ -3208,31 +3270,31 @@ function Hn(e) {
|
|
|
3208
3270
|
let r = t[n].bindings.get(e);
|
|
3209
3271
|
if (r !== void 0) return r;
|
|
3210
3272
|
}
|
|
3211
|
-
})(a, n), s = o === void 0 ? void 0 :
|
|
3273
|
+
})(a, n), s = o === void 0 ? void 0 : Qn.get(o);
|
|
3212
3274
|
return s ? `${s}:${i === -1 ? e : e.substring(i + 1)}` : null;
|
|
3213
|
-
}, r = !1, i = !1, a = e.replace(
|
|
3275
|
+
}, r = !1, i = !1, a = e.replace(er, (e, a, o, s, c) => {
|
|
3214
3276
|
if (a) {
|
|
3215
3277
|
let r = t[t.length - 1], i = n(o, null, !1);
|
|
3216
3278
|
return r && r.name === o && (r.nested > 0 ? r.nested-- : t.pop()), i ? `</${i}>` : e;
|
|
3217
3279
|
}
|
|
3218
3280
|
let l = ((e) => {
|
|
3219
3281
|
let t, n = null;
|
|
3220
|
-
for (
|
|
3282
|
+
for (nr.lastIndex = 0; (t = nr.exec(e)) !== null;) (n ??= /* @__PURE__ */ new Map()).set(t[1] ?? "", t[2] ?? t[3] ?? "");
|
|
3221
3283
|
return n;
|
|
3222
3284
|
})(s);
|
|
3223
3285
|
l?.forEach((e, t) => {
|
|
3224
|
-
let n = [...
|
|
3286
|
+
let n = [...Qn].find(([, e]) => e === t)?.[0];
|
|
3225
3287
|
n && n !== e && (r = !0);
|
|
3226
3288
|
});
|
|
3227
|
-
let u = n(o, l, !1), d = s.replace(
|
|
3289
|
+
let u = n(o, l, !1), d = s.replace(tr, (e, t, r, i, a) => {
|
|
3228
3290
|
if (r === "xmlns" || r.startsWith("xmlns:")) {
|
|
3229
3291
|
let t = a.slice(1, -1);
|
|
3230
|
-
return
|
|
3292
|
+
return Qn.has(t) ? "" : e;
|
|
3231
3293
|
}
|
|
3232
3294
|
let o = n(r, l, !0);
|
|
3233
3295
|
return o ? `${t}${o}${i}${a}` : e;
|
|
3234
3296
|
});
|
|
3235
|
-
if (i || (i = !0, d = d.replace(/\s+$/, "") +
|
|
3297
|
+
if (i || (i = !0, d = d.replace(/\s+$/, "") + $n), !c) {
|
|
3236
3298
|
let e = t[t.length - 1];
|
|
3237
3299
|
l ? t.push({
|
|
3238
3300
|
name: o,
|
|
@@ -3244,7 +3306,7 @@ function Hn(e) {
|
|
|
3244
3306
|
});
|
|
3245
3307
|
return r ? e : a;
|
|
3246
3308
|
}
|
|
3247
|
-
var
|
|
3309
|
+
var ir = {
|
|
3248
3310
|
creator: "author",
|
|
3249
3311
|
category: "category",
|
|
3250
3312
|
description: "comments",
|
|
@@ -3257,46 +3319,46 @@ var Un = {
|
|
|
3257
3319
|
revision: "revisionNumber",
|
|
3258
3320
|
subject: "subject",
|
|
3259
3321
|
title: "title"
|
|
3260
|
-
},
|
|
3322
|
+
}, ar = {
|
|
3261
3323
|
Company: "company",
|
|
3262
3324
|
Manager: "manager"
|
|
3263
|
-
},
|
|
3264
|
-
lpwstr:
|
|
3265
|
-
lpstr:
|
|
3266
|
-
bstr:
|
|
3267
|
-
i1:
|
|
3268
|
-
i2:
|
|
3269
|
-
i4:
|
|
3270
|
-
i8:
|
|
3271
|
-
int:
|
|
3272
|
-
ui1:
|
|
3273
|
-
ui2:
|
|
3274
|
-
ui4:
|
|
3275
|
-
ui8:
|
|
3276
|
-
uint:
|
|
3277
|
-
r4:
|
|
3278
|
-
r8:
|
|
3279
|
-
decimal:
|
|
3280
|
-
bool:
|
|
3281
|
-
filetime:
|
|
3282
|
-
date:
|
|
3283
|
-
},
|
|
3284
|
-
let t = e.kind ?
|
|
3325
|
+
}, or = {
|
|
3326
|
+
lpwstr: U.Type.String,
|
|
3327
|
+
lpstr: U.Type.String,
|
|
3328
|
+
bstr: U.Type.String,
|
|
3329
|
+
i1: U.Type.Number,
|
|
3330
|
+
i2: U.Type.Number,
|
|
3331
|
+
i4: U.Type.Number,
|
|
3332
|
+
i8: U.Type.Number,
|
|
3333
|
+
int: U.Type.Number,
|
|
3334
|
+
ui1: U.Type.Number,
|
|
3335
|
+
ui2: U.Type.Number,
|
|
3336
|
+
ui4: U.Type.Number,
|
|
3337
|
+
ui8: U.Type.Number,
|
|
3338
|
+
uint: U.Type.Number,
|
|
3339
|
+
r4: U.Type.Float,
|
|
3340
|
+
r8: U.Type.Float,
|
|
3341
|
+
decimal: U.Type.Float,
|
|
3342
|
+
bool: U.Type.Boolean,
|
|
3343
|
+
filetime: U.Type.Date,
|
|
3344
|
+
date: U.Type.Date
|
|
3345
|
+
}, sr = (e) => {
|
|
3346
|
+
let t = e.kind ? or[e.kind] : void 0;
|
|
3285
3347
|
if (!t) return null;
|
|
3286
3348
|
let n = e.value.trim(), r;
|
|
3287
|
-
if (t ===
|
|
3349
|
+
if (t === U.Type.String) r = {
|
|
3288
3350
|
key: e.key,
|
|
3289
3351
|
type: t,
|
|
3290
3352
|
value: e.value
|
|
3291
3353
|
};
|
|
3292
|
-
else if (t ===
|
|
3354
|
+
else if (t === U.Type.Boolean) {
|
|
3293
3355
|
if (n !== "true" && n !== "false" && n !== "1" && n !== "0") return null;
|
|
3294
3356
|
r = {
|
|
3295
3357
|
key: e.key,
|
|
3296
3358
|
type: t,
|
|
3297
3359
|
value: n === "true" || n === "1"
|
|
3298
3360
|
};
|
|
3299
|
-
} else if (t ===
|
|
3361
|
+
} else if (t === U.Type.Date) {
|
|
3300
3362
|
let i = new Date(n);
|
|
3301
3363
|
if (!n || isNaN(i.getTime())) return null;
|
|
3302
3364
|
r = {
|
|
@@ -3307,37 +3369,44 @@ var Un = {
|
|
|
3307
3369
|
} else {
|
|
3308
3370
|
let i = Number(n);
|
|
3309
3371
|
if (!n || !Number.isFinite(i)) return null;
|
|
3310
|
-
let a = t ===
|
|
3372
|
+
let a = t === U.Type.Number && i >= -2147483648 && i <= 2147483647;
|
|
3311
3373
|
r = {
|
|
3312
3374
|
key: e.key,
|
|
3313
|
-
type: a ? t :
|
|
3375
|
+
type: a ? t : U.Type.Float,
|
|
3314
3376
|
value: i
|
|
3315
3377
|
};
|
|
3316
3378
|
}
|
|
3317
3379
|
return e.linkTarget && (r.linkTarget = e.linkTarget), r;
|
|
3318
|
-
},
|
|
3380
|
+
}, cr = "hiddenXfs", lr = (e) => (Array.isArray(e) ? e[1] : e?.v)?.s, ur = (e) => {
|
|
3319
3381
|
if (!e || e.length === 0) return !1;
|
|
3320
|
-
let t =
|
|
3382
|
+
let t = R.refsToRuns(e, !0), n = 0;
|
|
3321
3383
|
for (let e of t) {
|
|
3322
3384
|
if (e.min > n || e.value?.s === void 0) return !1;
|
|
3323
3385
|
n = Math.max(n, e.max + 1);
|
|
3324
3386
|
}
|
|
3325
|
-
return n >
|
|
3326
|
-
},
|
|
3387
|
+
return n > D;
|
|
3388
|
+
}, dr = (e, t) => {
|
|
3327
3389
|
e.protection = {
|
|
3328
3390
|
...e.protection,
|
|
3329
3391
|
showFormulas: t
|
|
3330
3392
|
};
|
|
3331
|
-
},
|
|
3393
|
+
}, fr = "xfComplements", pr = (e, t) => {
|
|
3394
|
+
if (typeof e == "string") return void t.push(e);
|
|
3395
|
+
let n = Array.isArray(e) ? e : [e];
|
|
3396
|
+
for (let e = 0; e < n.length; e++) {
|
|
3397
|
+
let r = R.rangeToString(n[e]);
|
|
3398
|
+
r && t.push(r);
|
|
3399
|
+
}
|
|
3400
|
+
}, mr = (e) => {
|
|
3332
3401
|
let t = Array.isArray(e) ? e[1] : e.v;
|
|
3333
3402
|
if (!t || !("s" in t)) return;
|
|
3334
3403
|
let n = t.s;
|
|
3335
3404
|
return delete t.s, n;
|
|
3336
|
-
},
|
|
3405
|
+
}, hr = (e, t, n, r) => {
|
|
3337
3406
|
if (!e) return;
|
|
3338
3407
|
let i = t ? 2 : 1, a = t ? n.rowStart : n.colStart, o = t ? n.rowEnd : n.colEnd, s, c = -1;
|
|
3339
3408
|
for (let n of e) {
|
|
3340
|
-
let e =
|
|
3409
|
+
let e = R.refToRun(n, t), l = mr(n);
|
|
3341
3410
|
e && l !== void 0 ? l !== c || (t ? s.colEnd : s.rowEnd) + 1 !== e.min ? (s = {
|
|
3342
3411
|
colStart: t ? e.min : a,
|
|
3343
3412
|
rowStart: t ? a : e.min,
|
|
@@ -3349,7 +3418,7 @@ var Un = {
|
|
|
3349
3418
|
}
|
|
3350
3419
|
}, c = l, r.push(s)) : t ? s.colEnd = e.max : s.rowEnd = e.max : c = -1;
|
|
3351
3420
|
}
|
|
3352
|
-
},
|
|
3421
|
+
}, gr = {
|
|
3353
3422
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks",
|
|
3354
3423
|
"application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks",
|
|
3355
3424
|
"application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks",
|
|
@@ -3378,10 +3447,11 @@ var Un = {
|
|
|
3378
3447
|
"application/vnd.ms-excel.person+xml": "people",
|
|
3379
3448
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml": "metadata",
|
|
3380
3449
|
"application/vnd.ms-excel.sheetMetadata": "metadata",
|
|
3450
|
+
"application/vnd.ms-excel.featurepropertybag+xml": "featurePropertyBag",
|
|
3381
3451
|
"application/vnd.ms-excel.externalLink": "links",
|
|
3382
3452
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",
|
|
3383
3453
|
"application/vnd.openxmlformats-officedocument.theme+xml": "themes"
|
|
3384
|
-
},
|
|
3454
|
+
}, _r = w({ readXLSX: () => Sr }), vr = (e) => e.startsWith("/") ? e.slice(1) : e, yr = [
|
|
3385
3455
|
208,
|
|
3386
3456
|
207,
|
|
3387
3457
|
17,
|
|
@@ -3390,55 +3460,55 @@ var Un = {
|
|
|
3390
3460
|
177,
|
|
3391
3461
|
26,
|
|
3392
3462
|
225
|
|
3393
|
-
],
|
|
3394
|
-
let { password: a, onVBA: o, profile: s, calcOnLoad: c = "auto", createWorkbookOptions:
|
|
3395
|
-
await
|
|
3396
|
-
let
|
|
3397
|
-
|
|
3463
|
+
], br = /^xl\/worksheets\/[^/]+\.xml$/i, xr = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), Sr = async (e, r) => {
|
|
3464
|
+
let { password: a, onVBA: o, profile: s, calcOnLoad: c = "auto", createWorkbookOptions: l = {}, ...d } = r ?? {};
|
|
3465
|
+
await Ue.load();
|
|
3466
|
+
let f = !!l.origin && typeof l.origin != "string", p = s ? new ht(typeof s == "function" ? s : void 0) : null, m = [], g = (e, t, n) => {
|
|
3467
|
+
m.push([
|
|
3398
3468
|
e,
|
|
3399
3469
|
t ?? "",
|
|
3400
3470
|
n
|
|
3401
3471
|
]);
|
|
3402
|
-
},
|
|
3403
|
-
if (
|
|
3404
|
-
|
|
3405
|
-
let t = Math.min(
|
|
3406
|
-
|
|
3407
|
-
} : void 0,
|
|
3472
|
+
}, _ = { onWarning: g }, v = r?.progress, y = v?.onProgress ? v.onProgress.bind(v) : void 0, b = e.byteLength, x = 0, ee = 0, te = y ? (e) => {
|
|
3473
|
+
if (x <= 0) return;
|
|
3474
|
+
ee += e;
|
|
3475
|
+
let t = Math.min(b, Math.round(ee / x * b));
|
|
3476
|
+
y(t, b);
|
|
3477
|
+
} : void 0, ne = import("./DVLJTjJCGqrJUa8c.mjs"), re = null;
|
|
3408
3478
|
try {
|
|
3409
|
-
|
|
3479
|
+
re = new DOMParser();
|
|
3410
3480
|
} catch {}
|
|
3411
|
-
let
|
|
3481
|
+
let ie = null;
|
|
3412
3482
|
try {
|
|
3413
|
-
|
|
3483
|
+
ie = new XMLSerializer();
|
|
3414
3484
|
} catch {}
|
|
3415
|
-
let C, w,
|
|
3416
|
-
|
|
3485
|
+
let C, w, T, ue = null;
|
|
3486
|
+
re || (ue = import("./DO75RoAQTgMuVzXv.mjs").then((e) => M(e.default, 1)));
|
|
3417
3487
|
try {
|
|
3418
|
-
let [e, t] = await Promise.all([
|
|
3419
|
-
C = new t.DOMTransformer(), w =
|
|
3488
|
+
let [e, t] = await Promise.all([ue, ne]);
|
|
3489
|
+
C = new t.DOMTransformer(), w = re ?? new e.DOMParser(), T = ie ?? new e.XMLSerializer();
|
|
3420
3490
|
} catch (e) {
|
|
3421
3491
|
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
3422
3492
|
}
|
|
3423
|
-
let
|
|
3493
|
+
let fe = (e) => T.serializeToString(e);
|
|
3424
3494
|
if (((e) => {
|
|
3425
|
-
if (e.byteLength <
|
|
3426
|
-
let t = new Uint8Array(e, 0,
|
|
3427
|
-
return
|
|
3428
|
-
})(
|
|
3429
|
-
let
|
|
3495
|
+
if (e.byteLength < yr.length) return !1;
|
|
3496
|
+
let t = new Uint8Array(e, 0, yr.length);
|
|
3497
|
+
return yr.every((e, n) => t[n] === e);
|
|
3498
|
+
})(e)) throw new Re("This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.");
|
|
3499
|
+
let k;
|
|
3430
3500
|
try {
|
|
3431
|
-
|
|
3501
|
+
k = await mt.create(e);
|
|
3432
3502
|
} catch (e) {
|
|
3433
|
-
throw new
|
|
3503
|
+
throw new Re("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
3434
3504
|
}
|
|
3435
|
-
|
|
3505
|
+
p?.mark("zip-open");
|
|
3436
3506
|
try {
|
|
3437
|
-
if (!
|
|
3438
|
-
let
|
|
3439
|
-
let t =
|
|
3507
|
+
if (!k.has("[Content_Types].xml")) throw new Re("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3508
|
+
let e = (e) => {
|
|
3509
|
+
let t = k.getEntry(e);
|
|
3440
3510
|
return t ? { content: t } : void 0;
|
|
3441
|
-
},
|
|
3511
|
+
}, r = {
|
|
3442
3512
|
workbooks: [],
|
|
3443
3513
|
sheets: [],
|
|
3444
3514
|
charts: [],
|
|
@@ -3455,6 +3525,7 @@ var Un = {
|
|
|
3455
3525
|
styles: [],
|
|
3456
3526
|
metadata: [],
|
|
3457
3527
|
people: [],
|
|
3528
|
+
featurePropertyBag: [],
|
|
3458
3529
|
overrides: {},
|
|
3459
3530
|
sst: "",
|
|
3460
3531
|
style: "",
|
|
@@ -3471,7 +3542,7 @@ var Un = {
|
|
|
3471
3542
|
let t = r.ContentType, n = r.PartName;
|
|
3472
3543
|
if (!t || !n) return;
|
|
3473
3544
|
e.overrides[n.startsWith("/") ? n.slice(1) : n] = t;
|
|
3474
|
-
let i =
|
|
3545
|
+
let i = gr[t], a = i ? e[i] : void 0;
|
|
3475
3546
|
Array.isArray(a) && a.push(n);
|
|
3476
3547
|
} else if (n === "Default") {
|
|
3477
3548
|
let t = r.Extension, n = r.ContentType;
|
|
@@ -3484,70 +3555,69 @@ var Un = {
|
|
|
3484
3555
|
onError: (e) => {
|
|
3485
3556
|
t?.(`Error parsing content types: ${e?.message ?? e}`);
|
|
3486
3557
|
}
|
|
3487
|
-
}))(
|
|
3488
|
-
|
|
3489
|
-
}), t = await
|
|
3558
|
+
}))(r, (e) => {
|
|
3559
|
+
m.push([e, "[Content_Types].xml"]);
|
|
3560
|
+
}), t = await k.getTextStream("[Content_Types].xml");
|
|
3490
3561
|
if (!t) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
3491
3562
|
try {
|
|
3492
|
-
await
|
|
3563
|
+
await nn.parseStream(t, e, { xmlns: !1 });
|
|
3493
3564
|
} catch (e) {
|
|
3494
3565
|
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
3495
3566
|
}
|
|
3496
|
-
|
|
3497
|
-
}
|
|
3498
|
-
|
|
3499
|
-
let a =
|
|
3500
|
-
for (let e of
|
|
3501
|
-
a && d.add(
|
|
3502
|
-
for (let e of d)
|
|
3503
|
-
if (await
|
|
3504
|
-
let
|
|
3505
|
-
if (
|
|
3506
|
-
for (let
|
|
3507
|
-
|
|
3567
|
+
f && await k.getBuffer("[Content_Types].xml");
|
|
3568
|
+
}
|
|
3569
|
+
p?.mark("content-types");
|
|
3570
|
+
let a = r.sst, d = /* @__PURE__ */ new Set();
|
|
3571
|
+
for (let e of r.sheets) d.add(vr(e));
|
|
3572
|
+
a && d.add(vr(a));
|
|
3573
|
+
for (let e of d) x += k.uncompressedSize(e);
|
|
3574
|
+
if (await k.prefetch((e) => !d.has(e) && !br.test(e)), p?.mark("prefetch-side-parts"), r.workbooks.length === 0) {
|
|
3575
|
+
let t = me("_rels/.rels", e, w, C, _);
|
|
3576
|
+
if (t) {
|
|
3577
|
+
for (let e of t.values()) if (e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && e.target) {
|
|
3578
|
+
r.workbooks.push(e.target);
|
|
3508
3579
|
break;
|
|
3509
3580
|
}
|
|
3510
3581
|
}
|
|
3511
3582
|
}
|
|
3512
|
-
if (
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
S.set("richTypes", []), S.set("parseInlineDxf", (e) => {
|
|
3583
|
+
if (r.workbooks.length === 0) throw new Re("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3584
|
+
let ee = l?.resources ?? new Je(), ne = ee.beginPersist(), re = {}, ie = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Map();
|
|
3585
|
+
T.set("parseInlineDxf", (e) => {
|
|
3516
3586
|
if (!e) return;
|
|
3517
|
-
let t = w.parseFromString(`<dxf xmlns:x14="${
|
|
3587
|
+
let t = w.parseFromString(`<dxf xmlns:x14="${ge}" xmlns:xm="${h}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
3518
3588
|
if (!t) return;
|
|
3519
|
-
let
|
|
3520
|
-
return Object.keys(
|
|
3589
|
+
let n = C.parseDxf(t, "", _);
|
|
3590
|
+
return Object.keys(n).length > 0 ? n : void 0;
|
|
3521
3591
|
});
|
|
3522
|
-
let
|
|
3523
|
-
|
|
3524
|
-
let
|
|
3525
|
-
|
|
3526
|
-
let
|
|
3527
|
-
|
|
3528
|
-
}, P = (
|
|
3529
|
-
let
|
|
3530
|
-
return a || (a =
|
|
3531
|
-
}, F = (
|
|
3532
|
-
let a = P(
|
|
3592
|
+
let ue = [];
|
|
3593
|
+
T.set("dummyWrapped", ue);
|
|
3594
|
+
let pe = I("metadata", r, e, w, C, _).entries().next()?.value?.[1]?.metadata;
|
|
3595
|
+
pe && T.set("metadata", pe), T.set(Vn, ve());
|
|
3596
|
+
let he = /* @__PURE__ */ new Map(), _e = [], ye = /* @__PURE__ */ new Set(), M = (e) => {
|
|
3597
|
+
ye.add(vr(e));
|
|
3598
|
+
}, P = (t, n = he) => {
|
|
3599
|
+
let r = t.lastIndexOf("/"), i = t.substring(0, r + 1) + "_rels/" + t.substring(r + 1, t.length) + ".rels", a = n.get(i);
|
|
3600
|
+
return a || (a = me(i, e, w, C, z), n.set(i, a)), a;
|
|
3601
|
+
}, F = (t, n, r, i = he) => {
|
|
3602
|
+
let a = P(n, i).get(t), o = a?.target;
|
|
3533
3603
|
if (!o) return null;
|
|
3534
3604
|
if (a.targetMode === "External") {
|
|
3535
|
-
if (!
|
|
3536
|
-
let e =
|
|
3537
|
-
return e.addReference(
|
|
3605
|
+
if (!r) return a.target;
|
|
3606
|
+
let e = ee.add({ source: { external: a.target } });
|
|
3607
|
+
return e.addReference(re), ie.add(e), ne.toResourceId(e);
|
|
3538
3608
|
}
|
|
3539
|
-
let s =
|
|
3540
|
-
o.startsWith("/") || (o = c + o), o =
|
|
3609
|
+
let s = n.lastIndexOf("/"), c = n.substring(0, s + 1);
|
|
3610
|
+
o.startsWith("/") || (o = c + o), o = Ne(o);
|
|
3541
3611
|
let l = C?.getVisitorParamsState().get("dxfs"), u = i.get(o);
|
|
3542
3612
|
if (!u) {
|
|
3543
3613
|
if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
3544
3614
|
let e = {};
|
|
3545
|
-
u = e,
|
|
3546
|
-
let t =
|
|
3547
|
-
|
|
3548
|
-
}, void 0,
|
|
3615
|
+
u = e, _e.push((async () => {
|
|
3616
|
+
let t = Gn(e, (e, t) => t === "legacyDrawing" ? Ee(e, o) : t === "formControl" ? Oe(e, o) : t === "part" ? Ae(e, o) : F(e, o, t === "resource") ?? null, Ke, l, () => {}, (e, t, n) => {
|
|
3617
|
+
g(e, t ? `${t} (${o})` : o, n);
|
|
3618
|
+
}, void 0, T), n = await k.getTextStream(o, te);
|
|
3549
3619
|
if (n) try {
|
|
3550
|
-
await
|
|
3620
|
+
await nn.parseStream(n, t, {
|
|
3551
3621
|
xmlns: !1,
|
|
3552
3622
|
lean: !0
|
|
3553
3623
|
});
|
|
@@ -3556,17 +3626,17 @@ var Un = {
|
|
|
3556
3626
|
}
|
|
3557
3627
|
let r = P(o, i);
|
|
3558
3628
|
if (r) {
|
|
3559
|
-
|
|
3629
|
+
we(e, o, r, i), le(e), De(e);
|
|
3560
3630
|
let t = [];
|
|
3561
3631
|
r.forEach((e, n) => {
|
|
3562
3632
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
3563
|
-
let r =
|
|
3633
|
+
let r = Ae(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
3564
3634
|
if (!r?.xml) return;
|
|
3565
3635
|
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
3566
|
-
if (isNaN(a)) return void
|
|
3636
|
+
if (isNaN(a)) return void m.push([`Pivot table '${r.name}' names no cache and was dropped.`, o]);
|
|
3567
3637
|
let s = /\sname="([^"]*)"/.exec(i)?.[1];
|
|
3568
3638
|
t.push({
|
|
3569
|
-
...s ? { name:
|
|
3639
|
+
...s ? { name: be(s) } : {},
|
|
3570
3640
|
cacheId: a,
|
|
3571
3641
|
part: r
|
|
3572
3642
|
});
|
|
@@ -3574,10 +3644,10 @@ var Un = {
|
|
|
3574
3644
|
}
|
|
3575
3645
|
})());
|
|
3576
3646
|
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
3577
|
-
let
|
|
3578
|
-
if (
|
|
3579
|
-
let
|
|
3580
|
-
delete
|
|
3647
|
+
let t = S(o, e, w, C, z);
|
|
3648
|
+
if (t && Object.keys(t).length !== 0) {
|
|
3649
|
+
let e = t, n = e.__bookRelId, r = e.__absoluteUrlRelId;
|
|
3650
|
+
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
3581
3651
|
let a = [];
|
|
3582
3652
|
P(o, i)?.forEach((e, t) => {
|
|
3583
3653
|
if (e.targetMode === "External" && e.type && e.target) {
|
|
@@ -3587,159 +3657,159 @@ var Un = {
|
|
|
3587
3657
|
};
|
|
3588
3658
|
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
3589
3659
|
}
|
|
3590
|
-
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)),
|
|
3660
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a, M(o), u = e;
|
|
3591
3661
|
} else u = null;
|
|
3592
|
-
} else u =
|
|
3593
|
-
let n =
|
|
3594
|
-
return n.addReference(
|
|
3595
|
-
},
|
|
3662
|
+
} else u = r ? O(o, e, (e, t) => {
|
|
3663
|
+
let n = ee.add({ source: { buffer: e } });
|
|
3664
|
+
return n.addReference(re), ie.add(n), ne.toResourceId(n);
|
|
3665
|
+
}, z) : S(o, e, w, C, z);
|
|
3596
3666
|
}
|
|
3597
3667
|
return u;
|
|
3598
|
-
},
|
|
3668
|
+
}, Ce = (e, t) => {
|
|
3599
3669
|
if (!e) return null;
|
|
3600
|
-
let n = P(t,
|
|
3670
|
+
let n = P(t, he)?.get(e);
|
|
3601
3671
|
if (!n?.target || n.targetMode === "External") return null;
|
|
3602
3672
|
let r = n.target;
|
|
3603
|
-
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r),
|
|
3604
|
-
},
|
|
3673
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), Ne(r);
|
|
3674
|
+
}, we = (e, t, n, r) => {
|
|
3605
3675
|
let a = [], o = /* @__PURE__ */ new Map(), s = [];
|
|
3606
|
-
|
|
3676
|
+
n.forEach((e, n) => {
|
|
3607
3677
|
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
3608
|
-
let
|
|
3609
|
-
if (!
|
|
3610
|
-
for (let e = 0; e <
|
|
3611
|
-
let t =
|
|
3678
|
+
let i = F(n, t, !1, r)?.comments;
|
|
3679
|
+
if (!i) return;
|
|
3680
|
+
for (let e = 0; e < i.length; e++) {
|
|
3681
|
+
let t = i[e];
|
|
3612
3682
|
if (!t?.v?.id) continue;
|
|
3613
|
-
let { parentId: n, done:
|
|
3683
|
+
let { parentId: n, done: r, content: c, ...l } = t.v, u = {
|
|
3614
3684
|
...l,
|
|
3615
|
-
content:
|
|
3685
|
+
content: xr(c)
|
|
3616
3686
|
};
|
|
3617
3687
|
n ? s.push({
|
|
3618
3688
|
parentId: n,
|
|
3619
3689
|
json: u
|
|
3620
|
-
}) : (
|
|
3690
|
+
}) : (r && (u.done = !0), o.set(u.id, u), a.push({
|
|
3621
3691
|
r: t.r,
|
|
3622
3692
|
v: u
|
|
3623
3693
|
}));
|
|
3624
3694
|
}
|
|
3625
|
-
let c =
|
|
3626
|
-
c &&
|
|
3695
|
+
let c = Ce(n, t);
|
|
3696
|
+
c && M(c);
|
|
3627
3697
|
});
|
|
3628
3698
|
for (let e = 0; e < s.length; e++) {
|
|
3629
3699
|
let { parentId: t, json: n } = s[e], r = o.get(t);
|
|
3630
3700
|
r && (r.replies ??= []).push(n);
|
|
3631
3701
|
}
|
|
3632
3702
|
let c = [];
|
|
3633
|
-
if (
|
|
3703
|
+
if (n.forEach((e, n) => {
|
|
3634
3704
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
3635
|
-
let
|
|
3705
|
+
let i = F(n, t, !1, r), a = i?.comments;
|
|
3636
3706
|
if (!a) return;
|
|
3637
|
-
let s =
|
|
3707
|
+
let s = i?.authors;
|
|
3638
3708
|
for (let e = 0; e < a.length; e++) {
|
|
3639
3709
|
let t = a[e];
|
|
3640
3710
|
if (!t?.r) continue;
|
|
3641
3711
|
let n = s && t.v.authorId !== void 0 ? s[t.v.authorId] : void 0;
|
|
3642
3712
|
if (n && n.startsWith("tc=")) {
|
|
3643
|
-
if (o.has(
|
|
3713
|
+
if (o.has(ce(n.substring(3)))) continue;
|
|
3644
3714
|
n = void 0;
|
|
3645
3715
|
}
|
|
3646
3716
|
let r = {
|
|
3647
|
-
id:
|
|
3717
|
+
id: L.uuidV4().toUpperCase(),
|
|
3648
3718
|
asNote: !0,
|
|
3649
3719
|
content: t.v.content ?? ""
|
|
3650
|
-
}, i = n ?
|
|
3720
|
+
}, i = n ? He({ displayName: n }) : void 0;
|
|
3651
3721
|
i && (r.personId = i.id), c.push({
|
|
3652
3722
|
r: t.r,
|
|
3653
3723
|
v: r
|
|
3654
3724
|
});
|
|
3655
3725
|
}
|
|
3656
|
-
let l =
|
|
3657
|
-
l &&
|
|
3726
|
+
let l = Ce(n, t);
|
|
3727
|
+
l && M(l);
|
|
3658
3728
|
}), a.length === 0 && c.length === 0) return;
|
|
3659
3729
|
let l = [...a, ...c], u = e.legacyDrawing;
|
|
3660
3730
|
if (u?.xml) {
|
|
3661
|
-
let { rest:
|
|
3662
|
-
if (
|
|
3663
|
-
let
|
|
3664
|
-
for (let e = 0; e <
|
|
3665
|
-
let t =
|
|
3666
|
-
|
|
3731
|
+
let { rest: t, notes: n } = ke(u.xml);
|
|
3732
|
+
if (n.length > 0) {
|
|
3733
|
+
let r = /* @__PURE__ */ new Map();
|
|
3734
|
+
for (let e = 0; e < n.length; e++) {
|
|
3735
|
+
let t = n[e];
|
|
3736
|
+
r.set(R.cellToString({
|
|
3667
3737
|
rowIndex: t.row,
|
|
3668
3738
|
colIndex: t.col
|
|
3669
3739
|
}), t);
|
|
3670
3740
|
}
|
|
3671
3741
|
for (let e = 0; e < l.length; e++) {
|
|
3672
|
-
let
|
|
3673
|
-
if (!
|
|
3674
|
-
let a =
|
|
3742
|
+
let t = l[e], n = r.get(String(t.r).toUpperCase());
|
|
3743
|
+
if (!n || (r.delete(String(t.r).toUpperCase()), !t.v.asNote)) continue;
|
|
3744
|
+
let a = i(n.xml), o = {};
|
|
3675
3745
|
if (a.anchor) {
|
|
3676
|
-
let [e, t,
|
|
3746
|
+
let [e, t, r, i, s, c, l, u] = a.anchor;
|
|
3677
3747
|
o.anchor = {
|
|
3678
3748
|
tl: {
|
|
3679
|
-
c: e -
|
|
3749
|
+
c: e - n.col,
|
|
3680
3750
|
x: t,
|
|
3681
|
-
r:
|
|
3751
|
+
r: r - n.row,
|
|
3682
3752
|
y: i
|
|
3683
3753
|
},
|
|
3684
3754
|
br: {
|
|
3685
|
-
c: s -
|
|
3755
|
+
c: s - n.col,
|
|
3686
3756
|
x: c,
|
|
3687
|
-
r: l -
|
|
3757
|
+
r: l - n.row,
|
|
3688
3758
|
y: u
|
|
3689
3759
|
}
|
|
3690
3760
|
};
|
|
3691
3761
|
} else a.bounds && (o.bounds = a.bounds);
|
|
3692
|
-
a.style.fill && (o.fill = a.style.fill), a.style.stroke && (o.stroke = a.style.stroke), a.xml && (o.xml = a.xml), (o.anchor || o.bounds || o.fill || o.stroke || o.xml) && (
|
|
3762
|
+
a.style.fill && (o.fill = a.style.fill), a.style.stroke && (o.stroke = a.style.stroke), a.xml && (o.xml = a.xml), (o.anchor || o.bounds || o.fill || o.stroke || o.xml) && (t.v.box = o), a.visible && (t.v.shown = !0), a.alt && (t.v.description = a.alt);
|
|
3693
3763
|
}
|
|
3694
3764
|
let a = [];
|
|
3695
|
-
|
|
3765
|
+
r.forEach((e) => {
|
|
3696
3766
|
a.push(e.xml);
|
|
3697
3767
|
});
|
|
3698
|
-
let o =
|
|
3768
|
+
let o = Me(t, a);
|
|
3699
3769
|
o ? u.xml = o : delete e.legacyDrawing;
|
|
3700
3770
|
}
|
|
3701
3771
|
}
|
|
3702
3772
|
e.comments = l;
|
|
3703
|
-
},
|
|
3704
|
-
let
|
|
3705
|
-
if (!
|
|
3706
|
-
let i =
|
|
3773
|
+
}, Ee = (t, n) => {
|
|
3774
|
+
let r = Ce(t, n);
|
|
3775
|
+
if (!r) return null;
|
|
3776
|
+
let i = e(vr(r));
|
|
3707
3777
|
if (!i) return null;
|
|
3708
|
-
let a = { xml:
|
|
3709
|
-
return P(
|
|
3778
|
+
let a = { xml: rr(new TextDecoder("utf-8").decode(i.content)) }, o = [];
|
|
3779
|
+
return P(r, he)?.forEach((e, t) => {
|
|
3710
3780
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
3711
|
-
let
|
|
3712
|
-
typeof
|
|
3781
|
+
let n = F(t, r, !0);
|
|
3782
|
+
typeof n == "number" && o.push({
|
|
3713
3783
|
id: t,
|
|
3714
|
-
resId:
|
|
3784
|
+
resId: n
|
|
3715
3785
|
});
|
|
3716
|
-
}), o.length > 0 && (a.images = o),
|
|
3717
|
-
},
|
|
3718
|
-
let
|
|
3719
|
-
if (!
|
|
3720
|
-
let i =
|
|
3721
|
-
return i &&
|
|
3722
|
-
},
|
|
3723
|
-
let s =
|
|
3786
|
+
}), o.length > 0 && (a.images = o), M(r), a;
|
|
3787
|
+
}, Oe = (t, n) => {
|
|
3788
|
+
let r = Ce(t, n);
|
|
3789
|
+
if (!r) return null;
|
|
3790
|
+
let i = S(r, e, w, C, z)?.formControl ?? null;
|
|
3791
|
+
return i && M(r), i;
|
|
3792
|
+
}, Ae = (t, n, i, a, o = /* @__PURE__ */ new Set()) => {
|
|
3793
|
+
let s = Ce(t, n);
|
|
3724
3794
|
if (!s || o.has(s)) return null;
|
|
3725
|
-
let c =
|
|
3795
|
+
let c = i ?? P(n, he)?.get(t)?.type;
|
|
3726
3796
|
if (!c) return null;
|
|
3727
|
-
let l =
|
|
3797
|
+
let l = e(vr(s));
|
|
3728
3798
|
if (!l) return null;
|
|
3729
3799
|
o.add(s);
|
|
3730
|
-
let u = s.substring(s.lastIndexOf("/") + 1), d =
|
|
3731
|
-
id:
|
|
3800
|
+
let u = s.substring(s.lastIndexOf("/") + 1), d = r.overrides[vr(s)] ?? r.defaults[u.substring(u.lastIndexOf(".") + 1).toLowerCase()], f = {
|
|
3801
|
+
id: t,
|
|
3732
3802
|
type: c,
|
|
3733
3803
|
name: u
|
|
3734
3804
|
};
|
|
3735
3805
|
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);
|
|
3736
3806
|
else {
|
|
3737
|
-
let
|
|
3738
|
-
if (typeof
|
|
3739
|
-
f.resId =
|
|
3807
|
+
let e = F(t, n, !0);
|
|
3808
|
+
if (typeof e != "number") return null;
|
|
3809
|
+
f.resId = e;
|
|
3740
3810
|
}
|
|
3741
3811
|
let p = [];
|
|
3742
|
-
return P(s,
|
|
3812
|
+
return P(s, he)?.forEach((e, t) => {
|
|
3743
3813
|
if (!e?.type || a && !a(e.type)) return;
|
|
3744
3814
|
if (e.targetMode === "External") {
|
|
3745
3815
|
let n = F(t, s, !0);
|
|
@@ -3750,119 +3820,197 @@ var Un = {
|
|
|
3750
3820
|
});
|
|
3751
3821
|
return;
|
|
3752
3822
|
}
|
|
3753
|
-
let n =
|
|
3823
|
+
let n = Ae(t, s, e.type, a, o);
|
|
3754
3824
|
n && p.push(n);
|
|
3755
|
-
}), p.length > 0 && (f.parts = p),
|
|
3756
|
-
},
|
|
3757
|
-
|
|
3758
|
-
e?.custom &&
|
|
3825
|
+
}), p.length > 0 && (f.parts = p), M(s), f;
|
|
3826
|
+
}, je = I("coreprops", r, e, w, C, _), Pe = I("extprops", r, e, w, C, _), Fe = I("custprops", r, e, w, C, _);
|
|
3827
|
+
Fe.forEach((e, t) => {
|
|
3828
|
+
e?.custom && M(t);
|
|
3759
3829
|
});
|
|
3760
|
-
let
|
|
3761
|
-
if (
|
|
3762
|
-
let [e, t] =
|
|
3763
|
-
|
|
3764
|
-
}
|
|
3765
|
-
let
|
|
3766
|
-
if (e) return
|
|
3767
|
-
},
|
|
3768
|
-
paramMap:
|
|
3830
|
+
let Ie = new qe(), Ve = I("people", r, e, w, C, _);
|
|
3831
|
+
if (Ve.size > 0) {
|
|
3832
|
+
let [e, t] = Ve.entries().next().value;
|
|
3833
|
+
Ie.fromJSON(t?.persons), M(e);
|
|
3834
|
+
}
|
|
3835
|
+
let He = (e) => {
|
|
3836
|
+
if (e) return Ie.add(e).toJSON();
|
|
3837
|
+
}, z = {
|
|
3838
|
+
paramMap: T,
|
|
3769
3839
|
getRefs: P,
|
|
3770
3840
|
getRef: F,
|
|
3771
|
-
parsedRefs:
|
|
3772
|
-
readEmbeddedPart: (e, t) =>
|
|
3773
|
-
addPerson:
|
|
3774
|
-
serializeElement:
|
|
3775
|
-
onWarning:
|
|
3776
|
-
},
|
|
3777
|
-
if (
|
|
3778
|
-
let e = await
|
|
3841
|
+
parsedRefs: he,
|
|
3842
|
+
readEmbeddedPart: (e, t) => Ae(e, t),
|
|
3843
|
+
addPerson: He,
|
|
3844
|
+
serializeElement: fe,
|
|
3845
|
+
onWarning: g
|
|
3846
|
+
}, V = [], H = /* @__PURE__ */ new Map();
|
|
3847
|
+
if (T.set(Un, H), a) {
|
|
3848
|
+
let e = await k.getTextStream(a, te);
|
|
3779
3849
|
if (e) {
|
|
3780
3850
|
let t = ((e, t) => {
|
|
3781
|
-
let n = !1, r = !1, i = 0, a = "", o = new
|
|
3851
|
+
let n = !1, r = !1, i = 0, a = "", o = new In();
|
|
3782
3852
|
return {
|
|
3783
3853
|
onOpenTag: (e) => {
|
|
3784
|
-
let t =
|
|
3854
|
+
let t = Fn(e.name);
|
|
3785
3855
|
t === "t" ? n && i === 0 && (r = !0) : t === "si" ? (n = !0, a = "", o.reset(), i = 0) : t === "rPh" || t === "phoneticPr" ? i++ : n && i === 0 && o.onOpenTag(t, e.attributes);
|
|
3786
3856
|
},
|
|
3787
3857
|
onText: (e) => {
|
|
3788
3858
|
r && (a += e, o.onText(e));
|
|
3789
3859
|
},
|
|
3790
3860
|
onCloseTag: (t) => {
|
|
3791
|
-
let s =
|
|
3792
|
-
s === "t" ? r = !1 : s === "si" ? (e(
|
|
3861
|
+
let s = Fn(t.name);
|
|
3862
|
+
s === "t" ? r = !1 : s === "si" ? (e(ae(a), o.take() ?? void 0), n = !1, a = "") : s === "rPh" || s === "phoneticPr" ? i > 0 && i-- : o.onCloseTag(s);
|
|
3793
3863
|
},
|
|
3794
3864
|
onError: (e) => {
|
|
3795
3865
|
t?.(`Error parsing shared strings: ${e?.message ?? e}`);
|
|
3796
3866
|
}
|
|
3797
3867
|
};
|
|
3798
3868
|
})((e, t) => {
|
|
3799
|
-
t &&
|
|
3869
|
+
t && H.set(V.length, t), V.push(e);
|
|
3800
3870
|
}, (e) => {
|
|
3801
|
-
|
|
3871
|
+
g(e, a);
|
|
3802
3872
|
});
|
|
3803
3873
|
try {
|
|
3804
|
-
await
|
|
3874
|
+
await nn.parseStream(e, t, { xmlns: !1 });
|
|
3805
3875
|
} catch (e) {
|
|
3806
3876
|
throw Error(`Error parsing shared strings: '${a}'`, { cause: e });
|
|
3807
3877
|
}
|
|
3808
3878
|
}
|
|
3809
3879
|
}
|
|
3810
|
-
|
|
3811
|
-
let
|
|
3812
|
-
let t =
|
|
3880
|
+
p?.mark("shared-strings");
|
|
3881
|
+
let U = V.length, We = /* @__PURE__ */ new Map(), Ge = U, Ke = (e) => {
|
|
3882
|
+
let t = We.get(e);
|
|
3813
3883
|
if (t !== void 0) return t;
|
|
3814
|
-
let n =
|
|
3815
|
-
return
|
|
3816
|
-
},
|
|
3817
|
-
|
|
3818
|
-
let
|
|
3884
|
+
let n = Ge;
|
|
3885
|
+
return We.set(e, Ge++), V.push(e), n;
|
|
3886
|
+
}, Ye = [];
|
|
3887
|
+
r.slicersCache = Ye;
|
|
3888
|
+
let Xe = k.getNames(), Qe = Xe.length;
|
|
3889
|
+
for (let e = 0; e < Qe; e++) {
|
|
3890
|
+
let t = Xe[e];
|
|
3891
|
+
t && t.startsWith("xl/slicerCache") && Ye.push(`/${t}`);
|
|
3892
|
+
}
|
|
3893
|
+
let et = I("slicersCache", r, e, w, C, z), pt = /* @__PURE__ */ new Map();
|
|
3894
|
+
et.forEach((e, t) => {
|
|
3895
|
+
e?.cacheName && (e.cachePath = t, pt.set(e.cacheName, e));
|
|
3896
|
+
}), T.set("slicerCaches", pt);
|
|
3897
|
+
let mt = [];
|
|
3898
|
+
r.slicers = mt;
|
|
3819
3899
|
for (let e = 0; e < Qe; e++) {
|
|
3820
|
-
let t =
|
|
3821
|
-
t && t.startsWith("xl/
|
|
3822
|
-
}
|
|
3823
|
-
let
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3900
|
+
let t = Xe[e];
|
|
3901
|
+
t && t.startsWith("xl/slicers/") && t.endsWith(".xml") && mt.push(`/${t}`);
|
|
3902
|
+
}
|
|
3903
|
+
let ht = {
|
|
3904
|
+
getFile: e,
|
|
3905
|
+
domParser: w,
|
|
3906
|
+
getAddress: (e, t) => {
|
|
3907
|
+
let n = F(t, e, !1);
|
|
3908
|
+
return typeof n == "string" ? n : null;
|
|
3909
|
+
},
|
|
3910
|
+
getBytes: (t, n) => {
|
|
3911
|
+
let r = Ce(n, t), i = r ? e(r.substring(1))?.content : void 0;
|
|
3912
|
+
return i ? i.slice().buffer : null;
|
|
3913
|
+
},
|
|
3914
|
+
addFetched: (e, t) => {
|
|
3915
|
+
let n = ee.add({
|
|
3916
|
+
source: { buffer: e },
|
|
3917
|
+
fetchedFrom: t
|
|
3918
|
+
});
|
|
3919
|
+
return n.addReference(re), ie.add(n), ne.toResourceId(n);
|
|
3920
|
+
},
|
|
3921
|
+
markAbsorbed: M
|
|
3922
|
+
}, gt = /* @__PURE__ */ new Map();
|
|
3923
|
+
for (let e of A.getAll()) gt.set(e.structure, e.beginRead(ht));
|
|
3924
|
+
let _t = ((e, t) => {
|
|
3925
|
+
let n = (n) => {
|
|
3926
|
+
let r = e(n);
|
|
3927
|
+
return r ? t.parseFromString(new TextDecoder().decode(r.content), "text/xml").documentElement ?? null : null;
|
|
3928
|
+
}, r = W(n(rt), "s").map((e) => ({
|
|
3929
|
+
t: e.getAttribute("t") ?? "",
|
|
3930
|
+
keys: ut(e)
|
|
3931
|
+
})), i = W(n(it), "rv").map((e) => {
|
|
3932
|
+
let t = W(e, "fb")[0];
|
|
3933
|
+
return {
|
|
3934
|
+
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
3935
|
+
values: W(e, "v").map((e) => e.textContent ?? ""),
|
|
3936
|
+
fb: t ? t.textContent ?? "" : null
|
|
3937
|
+
};
|
|
3938
|
+
}), a = W(n(at), "a").map((e) => {
|
|
3939
|
+
let t = dt(e), n = parseInt(e.getAttribute("r") ?? "", 10), r = parseInt(e.getAttribute("c") ?? "", 10), i = n > 0 ? n : t.length;
|
|
3940
|
+
return {
|
|
3941
|
+
rows: i,
|
|
3942
|
+
columns: r > 0 ? r : Math.max(1, Math.ceil(t.length / Math.max(1, i))),
|
|
3943
|
+
items: t
|
|
3944
|
+
};
|
|
3945
|
+
}), o = W(n(ot), "s").map(ut), s = n(st), c = W(W(s, "spbArrays")[0], "a").map(dt), l = W(W(s, "spbData")[0], "spb").map((e) => ({
|
|
3946
|
+
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
3947
|
+
values: W(e, "v").map((e) => e.textContent ?? "")
|
|
3948
|
+
})), u = n(ct), d = ft(W(W(u, "global")[0], "keyFlags")[0]), f = /* @__PURE__ */ new Map();
|
|
3949
|
+
for (let e of W(W(u, "types")[0], "type")) f.set(e.getAttribute("name") ?? "", ft(W(e, "keyFlags")[0]));
|
|
3950
|
+
let p = n(lt), m = W(W(p, "dxfs")[0], "dxf").map((e) => W(e, "numFmt")[0]?.getAttribute("formatCode") ?? null), h = W(W(p, "richProperties")[0], "rPr").map((e) => e.getAttribute("n") ?? "");
|
|
3951
|
+
return {
|
|
3952
|
+
structures: r,
|
|
3953
|
+
values: i,
|
|
3954
|
+
arrays: a,
|
|
3955
|
+
bagStructures: o,
|
|
3956
|
+
bagArrays: c,
|
|
3957
|
+
bags: l,
|
|
3958
|
+
globalKeyFlags: d,
|
|
3959
|
+
typeKeyFlags: f,
|
|
3960
|
+
richStyles: W(W(p, "richStyles")[0], "rSty").map((e) => {
|
|
3961
|
+
let t = /* @__PURE__ */ new Map();
|
|
3962
|
+
for (let n of W(e, "rpv")) {
|
|
3963
|
+
let e = h[parseInt(n.getAttribute("i") ?? "-1", 10)];
|
|
3964
|
+
e && t.set(e, n.textContent ?? "");
|
|
3965
|
+
}
|
|
3966
|
+
let n = parseInt(e.getAttribute("dxfid") ?? "", 10);
|
|
3967
|
+
return {
|
|
3968
|
+
numberFormat: t.get("NumberFormat") ?? (n >= 0 ? m[n] ?? null : null),
|
|
3969
|
+
isTitle: t.get("IsTitleField") === "1",
|
|
3970
|
+
isHero: t.get("IsHeroField") === "1"
|
|
3971
|
+
};
|
|
3972
|
+
})
|
|
3973
|
+
};
|
|
3974
|
+
})(e, w), vt = E(_t, gt, (e) => {
|
|
3975
|
+
g(e, "/xl/richData/rdrichvalue.xml");
|
|
3976
|
+
});
|
|
3977
|
+
T.set("richData", _t.values.map((e, t) => vt.cellValue(t)));
|
|
3829
3978
|
for (let e = 0; e < Qe; e++) {
|
|
3830
|
-
let t =
|
|
3831
|
-
t
|
|
3832
|
-
}
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
S.set(Dn, !0 === ot.entries().next().value?.[1]?.date1904), h?.mark("side-parts-json"), await Promise.all(fe);
|
|
3979
|
+
let t = Xe[e];
|
|
3980
|
+
t.startsWith("xl/richData/") && !t.includes("/_rels/") && M(t);
|
|
3981
|
+
}
|
|
3982
|
+
let yt = I("themes", r, e, w, C, z), bt = null;
|
|
3983
|
+
if (yt && yt.entries) {
|
|
3984
|
+
let e = yt.entries().next();
|
|
3985
|
+
e?.value?.[1] && (bt = e.value[1]);
|
|
3986
|
+
}
|
|
3987
|
+
let xt = new Ze(bt), St = I("styles", r, e, w, C, z).entries().next()?.value?.[1];
|
|
3988
|
+
St &&= JSON.parse(Le.JSONStableStringify(St));
|
|
3989
|
+
let Ct = I("workbooks", r, e, w, C, z);
|
|
3990
|
+
T.set(Hn, !0 === Ct.entries().next().value?.[1]?.date1904), p?.mark("side-parts-json"), await Promise.all(_e);
|
|
3843
3991
|
{
|
|
3844
|
-
let
|
|
3992
|
+
let e = Ct.entries().next().value?.[1], t = ve(e?.names), r = e?.sheets ?? [];
|
|
3845
3993
|
for (let e = 0; e < r.length; e++) {
|
|
3846
|
-
let
|
|
3847
|
-
if (
|
|
3848
|
-
|
|
3994
|
+
let i = r[e], a = u(i);
|
|
3995
|
+
if (i?.kind === "macro" && a?.part.xml) {
|
|
3996
|
+
a.part.xml = n(a.part.xml, V);
|
|
3849
3997
|
continue;
|
|
3850
3998
|
}
|
|
3851
|
-
let
|
|
3852
|
-
|
|
3999
|
+
let o = N(i);
|
|
4000
|
+
o && Se(o, t);
|
|
3853
4001
|
}
|
|
3854
|
-
let i =
|
|
4002
|
+
let i = e?.names;
|
|
3855
4003
|
if (i) for (let e = 0; e < i.length; e++) {
|
|
3856
|
-
let
|
|
3857
|
-
typeof
|
|
4004
|
+
let n = i[e]?.ref;
|
|
4005
|
+
typeof n == "string" && (i[e].ref = t.readDetached(n));
|
|
3858
4006
|
}
|
|
3859
4007
|
}
|
|
3860
|
-
|
|
3861
|
-
let
|
|
3862
|
-
...
|
|
3863
|
-
styles:
|
|
3864
|
-
theme:
|
|
3865
|
-
},
|
|
4008
|
+
y && x > 0 && (y(b, b), await new Promise((e) => setTimeout(e, 0))), p?.mark("sheets");
|
|
4009
|
+
let G = {
|
|
4010
|
+
...Ct.entries().next().value?.[1],
|
|
4011
|
+
styles: St,
|
|
4012
|
+
theme: xt.toJSON()
|
|
4013
|
+
}, wt = ((e, t, n, r) => {
|
|
3866
4014
|
let i = {}, a = (e, t) => {
|
|
3867
4015
|
if (e) for (let { key: n, value: r } of e) {
|
|
3868
4016
|
let e = t[n];
|
|
@@ -3874,35 +4022,35 @@ var Un = {
|
|
|
3874
4022
|
}
|
|
3875
4023
|
}
|
|
3876
4024
|
};
|
|
3877
|
-
if (a(e,
|
|
4025
|
+
if (a(e, ir), a(t, ar), n) {
|
|
3878
4026
|
let e = [];
|
|
3879
4027
|
for (let t of n) {
|
|
3880
|
-
let n =
|
|
4028
|
+
let n = sr(t);
|
|
3881
4029
|
n ? e.push(n) : r?.(`The custom document property '${t.key}' holds a value of a kind that is not read (${t.kind ? "vt:" + t.kind : "none"}); it was dropped.`, "xlsx.docProps.custom.kind");
|
|
3882
4030
|
}
|
|
3883
4031
|
e.length > 0 && (i.custom = e);
|
|
3884
4032
|
}
|
|
3885
4033
|
return Object.keys(i).length > 0 ? i : void 0;
|
|
3886
|
-
})(
|
|
3887
|
-
|
|
4034
|
+
})(je.values().next().value?.properties, Pe.values().next().value?.properties, Fe.values().next().value?.custom, (e, t) => {
|
|
4035
|
+
g(e, "docProps/custom.xml", t);
|
|
3888
4036
|
});
|
|
3889
|
-
|
|
4037
|
+
wt && (G.properties = wt), ((e, t) => {
|
|
3890
4038
|
if (!t || t.size === 0) return;
|
|
3891
4039
|
let n = e.styles;
|
|
3892
4040
|
if (!n) return;
|
|
3893
4041
|
let r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
3894
4042
|
for (let n of e.sheets ?? []) {
|
|
3895
|
-
let e =
|
|
4043
|
+
let e = N(n);
|
|
3896
4044
|
if (!e) continue;
|
|
3897
4045
|
let a = /* @__PURE__ */ new Set();
|
|
3898
|
-
|
|
4046
|
+
ur(e.cols) || a.add(0);
|
|
3899
4047
|
for (let t of e.directStyles ?? []) a.add(Array.isArray(t) ? t[1] : t.v);
|
|
3900
4048
|
for (let t of e.rows ?? []) {
|
|
3901
|
-
let e =
|
|
4049
|
+
let e = lr(t);
|
|
3902
4050
|
e !== void 0 && a.add(e);
|
|
3903
4051
|
}
|
|
3904
4052
|
for (let t of e.cols ?? []) {
|
|
3905
|
-
let e =
|
|
4053
|
+
let e = lr(t);
|
|
3906
4054
|
e !== void 0 && a.add(e);
|
|
3907
4055
|
}
|
|
3908
4056
|
let o = !1;
|
|
@@ -3920,37 +4068,37 @@ var Un = {
|
|
|
3920
4068
|
}
|
|
3921
4069
|
if (r.size === 0) return;
|
|
3922
4070
|
let a = n.direct ??= [];
|
|
3923
|
-
for (let e of r) e !== 0 &&
|
|
3924
|
-
for (let e of i) e !== 0 &&
|
|
4071
|
+
for (let e of r) e !== 0 && dr(a[e] ?? (a[e] = {}), !0);
|
|
4072
|
+
for (let e of i) e !== 0 && dr(a[e] ?? (a[e] = {}), !1);
|
|
3925
4073
|
if (r.has(0)) {
|
|
3926
|
-
let e = n.named ??= [], t =
|
|
4074
|
+
let e = n.named ??= [], t = B.BuiltInName.Normal.toLowerCase(), r = e.find((e) => e.name?.toLowerCase() === t);
|
|
3927
4075
|
r || (r = {
|
|
3928
|
-
name:
|
|
4076
|
+
name: B.BuiltInName.Normal,
|
|
3929
4077
|
style: {}
|
|
3930
|
-
}, e.push(r)),
|
|
4078
|
+
}, e.push(r)), dr(r.style, !0);
|
|
3931
4079
|
}
|
|
3932
|
-
})(
|
|
4080
|
+
})(G, T.get(cr)), ((e) => {
|
|
3933
4081
|
let t = {
|
|
3934
4082
|
colStart: 0,
|
|
3935
4083
|
rowStart: 0,
|
|
3936
|
-
colEnd:
|
|
3937
|
-
rowEnd:
|
|
4084
|
+
colEnd: D,
|
|
4085
|
+
rowEnd: xe
|
|
3938
4086
|
};
|
|
3939
4087
|
for (let n of e.sheets ?? []) {
|
|
3940
|
-
let e =
|
|
4088
|
+
let e = N(n);
|
|
3941
4089
|
if (!e) continue;
|
|
3942
4090
|
let r = [];
|
|
3943
|
-
if (
|
|
4091
|
+
if (hr(e.cols, !0, t, r), hr(e.rows, !1, t, r), r.length === 0) continue;
|
|
3944
4092
|
let i = [];
|
|
3945
4093
|
for (let [t, n] of e.directStyles ?? []) i.push({
|
|
3946
|
-
...
|
|
4094
|
+
...R.fastStringToRange(t),
|
|
3947
4095
|
value: {
|
|
3948
4096
|
kind: 0,
|
|
3949
4097
|
index: n
|
|
3950
4098
|
}
|
|
3951
4099
|
});
|
|
3952
4100
|
i.push(...r);
|
|
3953
|
-
let a = [], o = new
|
|
4101
|
+
let a = [], o = new ze.IteratorInstance(i, { axis: Be.Column });
|
|
3954
4102
|
for (let e = o.next(); !e.done; e = o.next()) {
|
|
3955
4103
|
let n = e.value.overlaps, r;
|
|
3956
4104
|
if (n.length === 1) {
|
|
@@ -3963,19 +4111,51 @@ var Un = {
|
|
|
3963
4111
|
}
|
|
3964
4112
|
r = e ?? t ?? i;
|
|
3965
4113
|
}
|
|
3966
|
-
a.push([
|
|
4114
|
+
a.push([R.rangeToString(e.value.range, t), r.index]);
|
|
3967
4115
|
}
|
|
3968
4116
|
a.length > 0 ? e.directStyles = a : delete e.directStyles;
|
|
3969
4117
|
}
|
|
3970
|
-
})(
|
|
4118
|
+
})(G);
|
|
4119
|
+
{
|
|
4120
|
+
let t = T.get(fr);
|
|
4121
|
+
t && ((e, t, n) => {
|
|
4122
|
+
if (!t || t.size === 0 || !n) return;
|
|
4123
|
+
let r = (e) => {
|
|
4124
|
+
if (e === void 0 || e === 0) return null;
|
|
4125
|
+
let r = t.get(e);
|
|
4126
|
+
return r === void 0 ? null : n.controls[r] ?? null;
|
|
4127
|
+
};
|
|
4128
|
+
for (let t of e.sheets ?? []) {
|
|
4129
|
+
let e = N(t);
|
|
4130
|
+
if (!e) continue;
|
|
4131
|
+
let n = /* @__PURE__ */ new Map();
|
|
4132
|
+
for (let t of e.directStyles ?? []) {
|
|
4133
|
+
let e = Array.isArray(t) ? t[0] : t.r, i = r(Array.isArray(t) ? t[1] : t.v);
|
|
4134
|
+
if (!i) continue;
|
|
4135
|
+
let a = JSON.stringify(i), o = n.get(a);
|
|
4136
|
+
o || (o = {
|
|
4137
|
+
control: i,
|
|
4138
|
+
addresses: []
|
|
4139
|
+
}, n.set(a, o)), pr(e, o.addresses);
|
|
4140
|
+
}
|
|
4141
|
+
if (n.size === 0) continue;
|
|
4142
|
+
let i = [...e.cellControls ?? []];
|
|
4143
|
+
for (let { control: e, addresses: t } of n.values()) i.push({
|
|
4144
|
+
r: t.join(","),
|
|
4145
|
+
v: e
|
|
4146
|
+
});
|
|
4147
|
+
e.cellControls = i;
|
|
4148
|
+
}
|
|
4149
|
+
})(G, t, I("featurePropertyBag", r, e, w, C, z).values().next().value?.featurePropertyBag);
|
|
4150
|
+
}
|
|
3971
4151
|
{
|
|
3972
|
-
let
|
|
3973
|
-
|
|
3974
|
-
|
|
4152
|
+
let t = /* @__PURE__ */ new Map();
|
|
4153
|
+
I("slicers", r, e, w, C, z).forEach((e, n) => {
|
|
4154
|
+
e?.slicers && t.set(n, e.slicers);
|
|
3975
4155
|
}), function(e, t) {
|
|
3976
4156
|
let n = e.sheets ?? [], r = /* @__PURE__ */ new Map();
|
|
3977
4157
|
for (let e = 0; e < n.length; e++) {
|
|
3978
|
-
let t = n[e], i =
|
|
4158
|
+
let t = n[e], i = N(t)?.tables ?? [];
|
|
3979
4159
|
for (let e = 0; e < i.length; e++) {
|
|
3980
4160
|
let t = i[e], n = Array.isArray(t) ? t[1] : t?.v;
|
|
3981
4161
|
if (!n?.id) continue;
|
|
@@ -3988,7 +4168,7 @@ var Un = {
|
|
|
3988
4168
|
}
|
|
3989
4169
|
let i = /* @__PURE__ */ new Set();
|
|
3990
4170
|
for (let e = 0; e < n.length; e++) {
|
|
3991
|
-
let a = n[e], o =
|
|
4171
|
+
let a = n[e], o = N(a);
|
|
3992
4172
|
if (!o) continue;
|
|
3993
4173
|
let s = o.slicers, c = o.movables;
|
|
3994
4174
|
if (s && c) for (let e = c.length - 1; e >= 0; e--) {
|
|
@@ -3996,8 +4176,8 @@ var Un = {
|
|
|
3996
4176
|
if (n?.type !== "slicer" || n.json?.source) continue;
|
|
3997
4177
|
let a = n.name ?? "", o = s[a];
|
|
3998
4178
|
if (!o?.tableId) continue;
|
|
3999
|
-
let l = r.get(String(o.tableId)), u = l ?
|
|
4000
|
-
l && u ? (n.json =
|
|
4179
|
+
let l = r.get(String(o.tableId)), u = l ? tt(l.columns, o.columnId) : null;
|
|
4180
|
+
l && u ? (n.json = nt(o, n.json, Ue.structuredReference(l.name, u.name)), i.add(a), o.cachePath && t.markAbsorbed(o.cachePath)) : (t.warn("A slicer names no table; it was not imported.", "xlsx.slicer.cacheDefinition"), c.splice(e, 1));
|
|
4001
4181
|
}
|
|
4002
4182
|
delete o.slicers;
|
|
4003
4183
|
}
|
|
@@ -4005,27 +4185,27 @@ var Un = {
|
|
|
4005
4185
|
let r = Object.keys(e);
|
|
4006
4186
|
r.length > 0 && r.every((e) => i.has(e)) && t.markAbsorbed(n);
|
|
4007
4187
|
});
|
|
4008
|
-
}(
|
|
4188
|
+
}(G, {
|
|
4009
4189
|
warn: (e, t) => {
|
|
4010
|
-
|
|
4190
|
+
g(e, "xl/slicers", t);
|
|
4011
4191
|
},
|
|
4012
|
-
markAbsorbed:
|
|
4013
|
-
slicerParts:
|
|
4192
|
+
markAbsorbed: M,
|
|
4193
|
+
slicerParts: t
|
|
4014
4194
|
});
|
|
4015
4195
|
}
|
|
4016
|
-
|
|
4017
|
-
...
|
|
4196
|
+
G.calc = {
|
|
4197
|
+
...G.calc ?? {},
|
|
4018
4198
|
legacyIntersect: !0
|
|
4019
|
-
},
|
|
4020
|
-
let
|
|
4021
|
-
|
|
4022
|
-
let
|
|
4023
|
-
if (
|
|
4024
|
-
let { VBAProject: e } = await import("./
|
|
4199
|
+
}, V.length > 0 && (G.strings = V);
|
|
4200
|
+
let Tt = Ie.toJSON();
|
|
4201
|
+
Tt && Tt.length > 0 && (G.people = Tt);
|
|
4202
|
+
let Et = k.getEntry("xl/vbaProject.bin");
|
|
4203
|
+
if (Et) try {
|
|
4204
|
+
let { VBAProject: e } = await import("./aUBXbTh2r0u3x4Xo.mjs"), t = e.extract(Et);
|
|
4025
4205
|
if (t) {
|
|
4026
4206
|
let n = /* @__PURE__ */ new Map();
|
|
4027
|
-
for (let e of
|
|
4028
|
-
let t =
|
|
4207
|
+
for (let e of G.sheets ?? []) {
|
|
4208
|
+
let t = N(e), r = t?.codeName;
|
|
4029
4209
|
r && n.set(r, t);
|
|
4030
4210
|
}
|
|
4031
4211
|
for (let r of t.modules) {
|
|
@@ -4033,31 +4213,31 @@ var Un = {
|
|
|
4033
4213
|
a && (t.source = a), i && (t.sourceHeader = i);
|
|
4034
4214
|
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
4035
4215
|
o || r.type !== "document" || (t.scope = "workbook");
|
|
4036
|
-
let s = o ? o.modules ??= {} :
|
|
4216
|
+
let s = o ? o.modules ??= {} : G.modules ??= {};
|
|
4037
4217
|
s[r.name] || (s[r.name] = t);
|
|
4038
4218
|
}
|
|
4039
4219
|
o?.(t);
|
|
4040
|
-
} else
|
|
4220
|
+
} else m.push(["Unable to parse VBA project.", "xl/vbaProject.bin"]);
|
|
4041
4221
|
} catch (e) {
|
|
4042
|
-
|
|
4222
|
+
m.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
4043
4223
|
}
|
|
4044
|
-
let
|
|
4045
|
-
...
|
|
4046
|
-
calcOnLoad:
|
|
4047
|
-
resources:
|
|
4048
|
-
json:
|
|
4224
|
+
let Dt = T.get("calcId"), Ot = Dt === void 0 || !(Number(Dt) >= 191029), kt = l.calcOnLoad ?? (c === "auto" && Ot ? "full" : c), K = {
|
|
4225
|
+
...l,
|
|
4226
|
+
calcOnLoad: kt,
|
|
4227
|
+
resources: ee,
|
|
4228
|
+
json: G
|
|
4049
4229
|
};
|
|
4050
|
-
if (
|
|
4051
|
-
let e =
|
|
4052
|
-
|
|
4053
|
-
}
|
|
4054
|
-
|
|
4055
|
-
let
|
|
4056
|
-
if (
|
|
4057
|
-
await
|
|
4058
|
-
let e = /* @__PURE__ */ new Map(), t =
|
|
4230
|
+
if (K.disableLoadAutoFit === void 0) {
|
|
4231
|
+
let e = T.get(Te);
|
|
4232
|
+
K.disableLoadAutoFit = !!e?.declared && e.normalIsThemeFont && await j(e.faces);
|
|
4233
|
+
}
|
|
4234
|
+
p?.mark("json-assembled");
|
|
4235
|
+
let At = new $e(K);
|
|
4236
|
+
if (p?.mark("workbook-constructed"), ue.length > 0 && kt !== "none") {
|
|
4237
|
+
await At.whenCalculationReady();
|
|
4238
|
+
let e = /* @__PURE__ */ new Map(), t = G.sheets ?? [], n = At.getSheets({ visibility: "veryHidden" });
|
|
4059
4239
|
for (let r = 0; r < t.length; r++) {
|
|
4060
|
-
let i = t[r], a = n[r], o =
|
|
4240
|
+
let i = t[r], a = n[r], o = N(i);
|
|
4061
4241
|
o && a?.isIWorksheet && e.set(o, a);
|
|
4062
4242
|
}
|
|
4063
4243
|
((e, t, n) => {
|
|
@@ -4077,7 +4257,7 @@ var Un = {
|
|
|
4077
4257
|
for (let e of t) e.formula === null && o.add(i(e.rowIndex, e.colIndex));
|
|
4078
4258
|
for (let e of t) {
|
|
4079
4259
|
if (e.formula === null) continue;
|
|
4080
|
-
let t =
|
|
4260
|
+
let t = Tn(e.formula), n = !0;
|
|
4081
4261
|
for (let e of t) if (!a(e)) {
|
|
4082
4262
|
n = !1;
|
|
4083
4263
|
break;
|
|
@@ -4110,19 +4290,19 @@ var Un = {
|
|
|
4110
4290
|
}).setValue("=" + e.formula);
|
|
4111
4291
|
}
|
|
4112
4292
|
}
|
|
4113
|
-
})(
|
|
4114
|
-
}
|
|
4115
|
-
if (
|
|
4116
|
-
e.deleteReference(
|
|
4117
|
-
}),
|
|
4118
|
-
|
|
4119
|
-
let e = /* @__PURE__ */ new Map(),
|
|
4120
|
-
for (let
|
|
4121
|
-
let r =
|
|
4293
|
+
})(At, ue, e);
|
|
4294
|
+
}
|
|
4295
|
+
if (ie.forEach((e) => {
|
|
4296
|
+
e.deleteReference(re);
|
|
4297
|
+
}), ne.endPersist(), f) {
|
|
4298
|
+
t(At);
|
|
4299
|
+
let e = /* @__PURE__ */ new Map(), n = 0;
|
|
4300
|
+
for (let t of k.getNames()) {
|
|
4301
|
+
let r = k.getEntry(t);
|
|
4122
4302
|
if (!r) continue;
|
|
4123
|
-
let i =
|
|
4303
|
+
let i = k.getRawEntry(t), a = i ? {
|
|
4124
4304
|
data: r,
|
|
4125
|
-
uncompressedSize:
|
|
4305
|
+
uncompressedSize: k.uncompressedSize(t),
|
|
4126
4306
|
raw: {
|
|
4127
4307
|
compressedData: i.data,
|
|
4128
4308
|
compressionMethod: i.compressionMethod,
|
|
@@ -4130,39 +4310,39 @@ var Un = {
|
|
|
4130
4310
|
}
|
|
4131
4311
|
} : {
|
|
4132
4312
|
data: r,
|
|
4133
|
-
uncompressedSize:
|
|
4313
|
+
uncompressedSize: k.uncompressedSize(t)
|
|
4134
4314
|
};
|
|
4135
|
-
e.set(
|
|
4315
|
+
e.set(t, a), n += r.byteLength;
|
|
4136
4316
|
}
|
|
4137
|
-
if (
|
|
4317
|
+
if (n > 67108864) m.push([`Source package too large to retain (${n} bytes, limit ${oe}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
4138
4318
|
else if (e.size > 0) {
|
|
4139
|
-
let
|
|
4140
|
-
|
|
4141
|
-
let
|
|
4142
|
-
let
|
|
4143
|
-
|
|
4144
|
-
} }),
|
|
4145
|
-
let e =
|
|
4146
|
-
(e.length !==
|
|
4319
|
+
let n = new se(e, ye);
|
|
4320
|
+
de(At, n);
|
|
4321
|
+
let r = At.getWorksheets().getItems(), i = At.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
4322
|
+
let t = e.getOperation()?.name;
|
|
4323
|
+
t !== "insertCells" && t !== "deleteCells" || n.markStructuralChange();
|
|
4324
|
+
} }), a = At.addListeners({ onSheetsChange: () => {
|
|
4325
|
+
let e = At.getWorksheets().getItems();
|
|
4326
|
+
(e.length !== r.length || e.some((e, t) => e !== r[t])) && n.markStructuralChange(), r = e;
|
|
4147
4327
|
} });
|
|
4148
|
-
|
|
4149
|
-
|
|
4328
|
+
At.addListeners({ onClose: () => {
|
|
4329
|
+
i(), a(), t(At);
|
|
4150
4330
|
} });
|
|
4151
4331
|
}
|
|
4152
4332
|
}
|
|
4153
|
-
if (
|
|
4333
|
+
if (m.length && v?.onWarning) {
|
|
4154
4334
|
let e = /* @__PURE__ */ new Set();
|
|
4155
|
-
for (let t of
|
|
4335
|
+
for (let t of m) {
|
|
4156
4336
|
let [n, r, i] = t, a = i ?? n;
|
|
4157
|
-
e.has(a) || (e.add(a),
|
|
4337
|
+
e.has(a) || (e.add(a), v.onWarning(n, r));
|
|
4158
4338
|
}
|
|
4159
4339
|
}
|
|
4160
|
-
return
|
|
4340
|
+
return p && !0 === s && console.table(p.toTable()), await At.whenFontsReady(), At;
|
|
4161
4341
|
} catch (e) {
|
|
4162
4342
|
let t = "Unable to parse XLSX.";
|
|
4163
|
-
throw e instanceof
|
|
4343
|
+
throw e instanceof Ke && (t = "Unable to open XLSX. There are too many rows or columns."), Error(t, { cause: e });
|
|
4164
4344
|
} finally {
|
|
4165
|
-
await
|
|
4345
|
+
await k.close().catch(() => {});
|
|
4166
4346
|
}
|
|
4167
4347
|
};
|
|
4168
|
-
export {
|
|
4348
|
+
export { Wn as i, fr as n, cr as r, Sr as readXLSX, _r as t };
|