@sheetxl/io-xlsx 0.8.0-beta.20 → 0.8.0-beta.22
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/{Bw35-W8cnzxxvqQy.mjs → 2Tu0hkxKQVlv9Cra.mjs} +4 -4
- package/browser/esm/{CSOuRlSN9bhykqDr.mjs → B-gFy6wqDX1nS1H6.mjs} +724 -719
- package/browser/esm/{RFSuXvJ9sgsaA2LC.mjs → BksP77A3tWZz2uFZ.mjs} +4 -4
- package/browser/esm/{C16bEh6IrUpJONhS.mjs → CSeKlqJLKPdaHQnM.mjs} +2 -2
- package/browser/esm/{D7ogsrtXfjU5NW7r.mjs → Cx9ap9QP6pCr4onD.mjs} +2 -2
- package/browser/esm/{S4Uq85YdUb6O5Pz0.mjs → DEQzaCJ7RX2QoCut.mjs} +1 -1
- package/browser/esm/{PgUWs0pPSCSFYJtU.mjs → DKFJjTTJkuTmxyrC.mjs} +2 -2
- package/browser/esm/{CPK1-z95jtLOfCXG.mjs → Dm3PlbhnXRlbfwcc.mjs} +2 -2
- package/browser/esm/{DpPFQ7-tBwVyjvWr.mjs → TlUpdMxCXP6T7d5o.mjs} +1 -1
- package/browser/esm/{D2872f7aTugYxhht.mjs → fw-xerhhOIbrtjj8.mjs} +2 -2
- package/browser/esm/{D8CQKL3Y3CMFOPqD.mjs → hYm31nxQHahoYW47.mjs} +329 -319
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{D2vDZOgLcv-YiWnB.mjs → -4emwUa_cqmg0qom.mjs} +279 -274
- package/node/esm/{BSHqfcsR9hY-JB30.mjs → B1_JjHLkB9GQt41F.mjs} +1 -1
- package/node/esm/{DFw0ibBUmPyd-wey.mjs → BaRyFsg1YMFUyXd4.mjs} +4 -4
- package/node/esm/{BOAucs-qLpjtUOcZ.mjs → C1VsUbGfwY9-dlaU.mjs} +1 -1
- package/node/esm/{DGuQIj077oygCTGu.mjs → C6HiyeKhrpNGFeb3.mjs} +2 -2
- package/node/esm/{Qn2Bv4QG3mOLiJHh.mjs → CeRdSa9ObgI_mmCT.mjs} +478 -468
- package/node/esm/{C6eSWtTkyDQKbQdT.mjs → Dd0rxpiUIxg4BeeC.mjs} +2 -2
- package/node/esm/index.mjs +4 -4
- package/node/esm/{CPhiu1T7tl-leKh2.mjs → yNj0KH21rJk2rfm7.mjs} +2 -2
- package/package.json +3 -3
|
@@ -1,19 +1,19 @@
|
|
|
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.22
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { n as e, r as t } from "./
|
|
8
|
-
import { $ as n, $n as r, An as i, C as a, Cr as o, Ct as s, E as c, Er as l, Gt as u, In as d, Ir as f, It as p, Ln as m, Lt as h, Nn as g, Nr as _, Nt as v, Or as y, Pn as b, Qn as ee, Rn as te, Rr as x, Rt as
|
|
9
|
-
import { BufferUtils as
|
|
10
|
-
import { AddressUtils as
|
|
11
|
-
var
|
|
7
|
+
import { n as e, r as t } from "./TlUpdMxCXP6T7d5o.mjs";
|
|
8
|
+
import { $ as n, $n as r, An as i, C as a, Cr as o, Ct as s, E as c, Er as l, Gt as u, In as d, Ir as f, It as p, Ln as m, Lt as h, Nn as g, Nr as _, Nt as v, Or as y, Pn as b, Qn as ee, Rn as te, Rr as x, Rt as S, St as ne, T as re, Tt as ie, Ur as ae, Ut as oe, Vn as se, Wr as ce, Wt as le, Xn as C, Yn as w, Z as ue, Zn as de, _ as fe, _r as pe, _t as me, ar as he, br as T, cr as E, ct as D, dn as O, dr as k, er as ge, f as _e, fn as A, fr as ve, ft as ye, gr as j, ht as M, in as be, ir as N, it as P, jn as F, jt as xe, lt as I, mn as Se, mt as Ce, n as we, nn as Te, nr as Ee, nt as De, o as L, or as Oe, ot as ke, p as Ae, pr as je, pt as Me, qn as Ne, rn as Pe, sr as Fe, t as Ie, tn as Le, tr as R, ut as Re, vt as ze, wt as z, xr as Be, xt as B, yn as V, yr as Ve, zr as H } from "./Cx9ap9QP6pCr4onD.mjs";
|
|
9
|
+
import { BufferUtils as U, CommonUtils as He, ExpectedError as Ue, OverlappingRange as We, RangeAxis as Ge } from "@sheetxl/utils";
|
|
10
|
+
import { AddressUtils as W, BufferUtils as Ke, CommonUtils as qe, CoordUtils as Je, FormulaError as Ye, FormulaText as Xe, FunctionDeclarations as Ze, ICellStyle as Qe, ICondition as $e, IConditionalFormat as et, ICustomProperty as G, IFont as tt, IRange as nt, ITextFrame as rt, NumberFormat as it, OutOfBoundsError as at, PersonCollection as ot, ResourceCollection as st, RichDataRegistry as ct, Scalar as lt, Sort as ut, Theme as dt, Tuple as ft, Workbook as pt, pivotCellFormatsOf as K } from "@sheetxl/sdk";
|
|
11
|
+
var mt = {
|
|
12
12
|
ascending: "ascending",
|
|
13
13
|
descending: "descending",
|
|
14
14
|
natural: "dataSource"
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function ht(e, t) {
|
|
17
17
|
let n = e.sheets ?? [], r = /* @__PURE__ */ new Map();
|
|
18
18
|
for (let e = 0; e < n.length; e++) {
|
|
19
19
|
let t = n[e], i = _(t)?.tables ?? [];
|
|
@@ -56,11 +56,11 @@ function _t(e, t) {
|
|
|
56
56
|
if (!u) continue;
|
|
57
57
|
if (!u.tableId) {
|
|
58
58
|
if (u.pivotBody === void 0) continue;
|
|
59
|
-
n.json =
|
|
59
|
+
n.json = vt(u, n.json), n.json.pivot = _t(u, i, a, o, s), c.add(l), u.cachePath && t.markAbsorbed(u.cachePath);
|
|
60
60
|
continue;
|
|
61
61
|
}
|
|
62
|
-
let p = r.get(String(u.tableId)), m = p ?
|
|
63
|
-
p && m ? (n.json =
|
|
62
|
+
let p = r.get(String(u.tableId)), m = p ? gt(p.columns, u.columnId) : null;
|
|
63
|
+
p && m ? (n.json = vt(u, n.json, Xe.structuredReference(p.name, m.name)), c.add(l), u.cachePath && t.markAbsorbed(u.cachePath)) : (t.warn("A slicer names no table; it was not imported.", "xlsx.slicer.cacheDefinition"), f.splice(e, 1));
|
|
64
64
|
}
|
|
65
65
|
delete u.slicers;
|
|
66
66
|
}
|
|
@@ -69,13 +69,13 @@ function _t(e, t) {
|
|
|
69
69
|
r.length > 0 && r.every((e) => c.has(e)) && t.markAbsorbed(n);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function gt(e, t) {
|
|
73
73
|
if (!t) return null;
|
|
74
74
|
for (let n = 0; n < e.length; n++) if (e[n].id !== void 0 && String(e[n].id) === t) return e[n];
|
|
75
75
|
let n = Number(t);
|
|
76
76
|
return Number.isInteger(n) && n >= 1 && n <= e.length ? e[n - 1] : null;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function _t(e, t, n, r, i) {
|
|
79
79
|
let a = [], o = e.pivotTables ?? [];
|
|
80
80
|
for (let e = 0; e < o.length; e++) {
|
|
81
81
|
let n = t.get(o[e].tabId);
|
|
@@ -98,35 +98,35 @@ function yt(e, t, n, r, i) {
|
|
|
98
98
|
body: e.timelineBody ?? ""
|
|
99
99
|
}), s;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function vt(e, t, n) {
|
|
102
102
|
let r = { ...t };
|
|
103
103
|
if (n !== void 0 && (r.source = n), e.caption !== void 0 && e.caption !== e.sourceName && (r.caption = e.caption), !1 === e.showCaption && (r.hiddenCaption = !0), e.columnCount !== void 0 && e.columnCount > 1 && (r.columnCount = e.columnCount), e.rowHeight !== void 0) {
|
|
104
104
|
let t = Math.round(e.rowHeight / 9525);
|
|
105
105
|
t > 0 && t !== 27 && (r.rowHeight = t);
|
|
106
106
|
}
|
|
107
107
|
e.style && e.style !== "SlicerStyleLight1" && (r.style = e.style);
|
|
108
|
-
let i = e.sortOrder ?
|
|
108
|
+
let i = e.sortOrder ? mt[e.sortOrder] : void 0;
|
|
109
109
|
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;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
111
|
+
var yt = "xl/richData/rdrichvaluestructure.xml", bt = "xl/richData/rdrichvalue.xml", xt = "xl/richData/rdarray.xml", St = "xl/richData/rdsupportingpropertybagstructure.xml", Ct = "xl/richData/rdsupportingpropertybag.xml", wt = "xl/richData/rdRichValueTypes.xml", Tt = "xl/richData/richStyles.xml", q = (e, t) => {
|
|
112
112
|
let n = [], r = e?.childNodes, i = r?.length ?? 0;
|
|
113
113
|
for (let e = 0; e < i; e++) {
|
|
114
114
|
let i = r.item(e);
|
|
115
115
|
i.nodeType !== 1 || t && i.localName !== t || n.push(i);
|
|
116
116
|
}
|
|
117
117
|
return n;
|
|
118
|
-
},
|
|
118
|
+
}, Et = (e) => q(e, "k").map((e) => [e.getAttribute("n") ?? "", e.getAttribute("t") || null]), Dt = (e) => q(e, "v").map((e) => ({
|
|
119
119
|
t: e.getAttribute("t") || null,
|
|
120
120
|
text: e.textContent ?? ""
|
|
121
|
-
})),
|
|
121
|
+
})), Ot = (e) => {
|
|
122
122
|
let t = /* @__PURE__ */ new Map();
|
|
123
|
-
for (let n of
|
|
123
|
+
for (let n of q(e, "key")) {
|
|
124
124
|
let e = /* @__PURE__ */ new Map();
|
|
125
|
-
for (let t of
|
|
125
|
+
for (let t of q(n, "flag")) e.set(t.getAttribute("name") ?? "", t.getAttribute("value") ?? "");
|
|
126
126
|
t.set(n.getAttribute("name") ?? "", e);
|
|
127
127
|
}
|
|
128
128
|
return t;
|
|
129
|
-
},
|
|
129
|
+
}, kt = /* @__PURE__ */ new Uint8Array(), At = class e {
|
|
130
130
|
constructor(e, t, n) {
|
|
131
131
|
this.buffers = /* @__PURE__ */ new Map(), this.zip = e, this.entries = t, this.rawBuffer = n;
|
|
132
132
|
}
|
|
@@ -134,7 +134,7 @@ var xt = "xl/richData/rdrichvaluestructure.xml", St = "xl/richData/rdrichvalue.x
|
|
|
134
134
|
return e.startsWith("/") ? e.slice(1) : e;
|
|
135
135
|
}
|
|
136
136
|
static async create(t) {
|
|
137
|
-
let n = t instanceof Blob ?
|
|
137
|
+
let n = t instanceof Blob ? kt : t instanceof Uint8Array ? t : new Uint8Array(t), r = t instanceof Blob ? new H(t) : new ae(n), i = new x(r), a = /* @__PURE__ */ new Map();
|
|
138
138
|
for (let e of await i.getEntries()) e.directory || a.set(e.filename, e);
|
|
139
139
|
return new e(i, a, n);
|
|
140
140
|
}
|
|
@@ -152,12 +152,12 @@ var xt = "xl/richData/rdrichvaluestructure.xml", St = "xl/richData/rdrichvalue.x
|
|
|
152
152
|
if (r) return r;
|
|
153
153
|
let i = this.entries.get(n);
|
|
154
154
|
if (!i) return null;
|
|
155
|
-
let a = await i.getData(new
|
|
155
|
+
let a = await i.getData(new ce());
|
|
156
156
|
return this.buffers.set(n, a), a;
|
|
157
157
|
}
|
|
158
158
|
async prefetch(e) {
|
|
159
159
|
let t = [];
|
|
160
|
-
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new
|
|
160
|
+
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new ce()).then((e) => {
|
|
161
161
|
this.buffers.set(n, e);
|
|
162
162
|
}));
|
|
163
163
|
await Promise.all(t);
|
|
@@ -200,18 +200,18 @@ var xt = "xl/richData/rdrichvaluestructure.xml", St = "xl/richData/rdrichvalue.x
|
|
|
200
200
|
async close() {
|
|
201
201
|
await this.zip.close();
|
|
202
202
|
}
|
|
203
|
-
},
|
|
203
|
+
}, jt = class {
|
|
204
204
|
constructor(e) {
|
|
205
|
-
this._sink = e, this._samples = [], this._t0 =
|
|
205
|
+
this._sink = e, this._samples = [], this._t0 = Mt(), this._tPrev = this._t0, this._heapPrev = Nt();
|
|
206
206
|
}
|
|
207
207
|
mark(e) {
|
|
208
|
-
let t =
|
|
208
|
+
let t = Mt(), n = Nt(), r = {
|
|
209
209
|
label: e,
|
|
210
210
|
tMs: t - this._t0,
|
|
211
211
|
dtMs: t - this._tPrev,
|
|
212
212
|
heapBytes: n,
|
|
213
213
|
dHeapBytes: n !== void 0 && this._heapPrev !== void 0 ? n - this._heapPrev : void 0,
|
|
214
|
-
rssBytes:
|
|
214
|
+
rssBytes: Pt()
|
|
215
215
|
};
|
|
216
216
|
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
217
217
|
}
|
|
@@ -223,62 +223,62 @@ var xt = "xl/richData/rdrichvaluestructure.xml", St = "xl/richData/rdrichvalue.x
|
|
|
223
223
|
phase: e.label,
|
|
224
224
|
tMs: Math.round(e.tMs),
|
|
225
225
|
dtMs: Math.round(e.dtMs),
|
|
226
|
-
heapMB: e.heapBytes === void 0 ? "—" :
|
|
227
|
-
dHeapMB: e.dHeapBytes === void 0 ? "—" :
|
|
228
|
-
rssMB: e.rssBytes === void 0 ? "—" :
|
|
226
|
+
heapMB: e.heapBytes === void 0 ? "—" : Ft(e.heapBytes / 1048576),
|
|
227
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : Ft(e.dHeapBytes / 1048576),
|
|
228
|
+
rssMB: e.rssBytes === void 0 ? "—" : Ft(e.rssBytes / 1048576)
|
|
229
229
|
}));
|
|
230
230
|
}
|
|
231
|
-
},
|
|
232
|
-
function
|
|
231
|
+
}, Mt = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
232
|
+
function Nt() {
|
|
233
233
|
let e = typeof performance == "object" ? performance.memory : void 0;
|
|
234
234
|
if (e && typeof e.usedJSHeapSize == "number") return e.usedJSHeapSize;
|
|
235
235
|
let t = globalThis.process;
|
|
236
236
|
return typeof t == "object" && typeof t.memoryUsage == "function" ? t.memoryUsage().heapUsed : void 0;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function Pt() {
|
|
239
239
|
let e = globalThis.process;
|
|
240
240
|
if (typeof e == "object" && typeof e.memoryUsage == "function") return e.memoryUsage().rss;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Ft(e) {
|
|
243
243
|
return Math.round(10 * e) / 10;
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var It = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Lt = `-${It}.0-9·̀-ͯ‿-⁀`, Rt = (RegExp(`^[${It}]$`, "u"), RegExp(`^[${Lt}]$`, "u"), RegExp(`^[${It}][${Lt}]*$`, "u")), zt = (RegExp(`^[${Lt}]+$`, "u"), [
|
|
246
246
|
32,
|
|
247
247
|
10,
|
|
248
248
|
13,
|
|
249
249
|
9
|
|
250
250
|
]);
|
|
251
|
-
function
|
|
251
|
+
function Bt(e) {
|
|
252
252
|
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;
|
|
253
253
|
}
|
|
254
|
-
var
|
|
255
|
-
RegExp(`^[${
|
|
256
|
-
var
|
|
257
|
-
function
|
|
254
|
+
var Vt = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ht = `-${Vt}.0-9·̀-ͯ‿-⁀`;
|
|
255
|
+
RegExp(`^[${Vt}]$`, "u"), RegExp(`^[${Ht}]$`, "u"), RegExp(`^[${Vt}][${Ht}]*$`, "u"), RegExp(`^[${Ht}]+$`, "u");
|
|
256
|
+
var Ut = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Wt = `-${Ut}.0-9·̀-ͯ‿-⁀`, Gt = (RegExp(`^[${Ut}]$`, "u"), RegExp(`^[${Wt}]$`, "u"), RegExp(`^[${Ut}][${Wt}]*$`, "u"));
|
|
257
|
+
function Kt(e) {
|
|
258
258
|
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;
|
|
259
259
|
}
|
|
260
|
-
var
|
|
260
|
+
var qt = function(e) {
|
|
261
261
|
return e === 32 || e === 10 || e === 13 || e === 9;
|
|
262
|
-
},
|
|
262
|
+
}, Jt = function(e) {
|
|
263
263
|
return e >= 32 && e <= 55295 || e === 10 || e === 13 || e === 9 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
264
|
-
},
|
|
265
|
-
return
|
|
266
|
-
},
|
|
264
|
+
}, Yt = Bt, Xt = function(e) {
|
|
265
|
+
return Bt(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
266
|
+
}, Zt = zt, Qt = Rt, $t = function(e) {
|
|
267
267
|
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
268
|
-
},
|
|
269
|
-
return
|
|
270
|
-
},
|
|
268
|
+
}, en = Kt, tn = function(e) {
|
|
269
|
+
return Kt(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
270
|
+
}, nn = Gt, rn = "http://www.w3.org/XML/1998/namespace", an = "http://www.w3.org/2000/xmlns/", on = {
|
|
271
271
|
__proto__: null,
|
|
272
|
-
xml:
|
|
273
|
-
xmlns:
|
|
274
|
-
},
|
|
272
|
+
xml: rn,
|
|
273
|
+
xmlns: an
|
|
274
|
+
}, sn = {
|
|
275
275
|
__proto__: null,
|
|
276
276
|
amp: "&",
|
|
277
277
|
gt: ">",
|
|
278
278
|
lt: "<",
|
|
279
279
|
quot: "\"",
|
|
280
280
|
apos: "'"
|
|
281
|
-
},
|
|
281
|
+
}, J = -1, cn = -2, ln = 13, un = 33, dn = 10, fn = 60, pn = 61, Y = 62, X = 63, mn = 93, hn = (e) => e === 34 || e === 39, gn = [34, 39], _n = [
|
|
282
282
|
...gn,
|
|
283
283
|
91,
|
|
284
284
|
Y
|
|
@@ -289,9 +289,9 @@ var K = function(e) {
|
|
|
289
289
|
], yn = [
|
|
290
290
|
pn,
|
|
291
291
|
X,
|
|
292
|
-
...
|
|
292
|
+
...Zt
|
|
293
293
|
], bn = [
|
|
294
|
-
...
|
|
294
|
+
...Zt,
|
|
295
295
|
Y,
|
|
296
296
|
38,
|
|
297
297
|
fn
|
|
@@ -299,15 +299,15 @@ var K = function(e) {
|
|
|
299
299
|
function xn(e, t, n) {
|
|
300
300
|
switch (t) {
|
|
301
301
|
case "xml":
|
|
302
|
-
n !==
|
|
302
|
+
n !== rn && e.fail(`xml prefix must be bound to ${rn}.`);
|
|
303
303
|
break;
|
|
304
|
-
case "xmlns": n !==
|
|
304
|
+
case "xmlns": n !== an && e.fail(`xmlns prefix must be bound to ${an}.`);
|
|
305
305
|
}
|
|
306
306
|
switch (n) {
|
|
307
|
-
case
|
|
308
|
-
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
307
|
+
case an:
|
|
308
|
+
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${an}.`);
|
|
309
309
|
break;
|
|
310
|
-
case
|
|
310
|
+
case rn: switch (t) {
|
|
311
311
|
case "xml": break;
|
|
312
312
|
case "":
|
|
313
313
|
e.fail(`the default namespace may not be set to ${n}.`);
|
|
@@ -316,7 +316,7 @@ function xn(e, t, n) {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
var Sn, Cn = (e) =>
|
|
319
|
+
var Sn, Cn = (e) => nn.test(e), wn = (e) => Qt.test(e), Tn = {
|
|
320
320
|
xmldecl: "xmlDeclHandler",
|
|
321
321
|
text: "textHandler",
|
|
322
322
|
processinginstruction: "piHandler",
|
|
@@ -338,15 +338,15 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
338
338
|
this.i = 0, this.prevI = 0, this.opt = e ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
339
339
|
let t = this.xmlnsOpt = !!this.opt.xmlns;
|
|
340
340
|
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, t) {
|
|
341
|
-
this.nameStartCheck =
|
|
341
|
+
this.nameStartCheck = en, this.nameCheck = tn, this.isName = Cn, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
342
342
|
__proto__: null,
|
|
343
|
-
...
|
|
343
|
+
...on
|
|
344
344
|
};
|
|
345
345
|
let e = this.opt.additionalNamespaces;
|
|
346
346
|
e != null && (function(e, t) {
|
|
347
347
|
for (let n of Object.keys(t)) xn(e, n, t[n]);
|
|
348
348
|
}(this, e), Object.assign(this.ns, e));
|
|
349
|
-
} else this.nameStartCheck =
|
|
349
|
+
} else this.nameStartCheck = Yt, this.nameCheck = Xt, this.isName = wn, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
350
350
|
this.stateTable = [
|
|
351
351
|
this.sBegin,
|
|
352
352
|
this.sBeginWhitespace,
|
|
@@ -398,7 +398,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
398
398
|
_init() {
|
|
399
399
|
this.openWakaBang = "", this.text = "", this.name = "", this.piTarget = "", this.entity = "", this.q = null, this.tags = [], this.tag = null, this.topNS = null, this.chunk = "", this.chunkPosition = 0, this.i = 0, this.prevI = 0, this.carriedFromPrevious = void 0, this.forbiddenState = 0, this.attribList = [];
|
|
400
400
|
let { fragmentOpt: e } = this;
|
|
401
|
-
this.state = e ?
|
|
401
|
+
this.state = e ? ln : 0, this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = e, this.xmlDeclPossible = !e, this.xmlDeclExpects = ["version"], this.entityReturnState = void 0;
|
|
402
402
|
let { defaultXMLVersion: t } = this.opt;
|
|
403
403
|
if (t === void 0) {
|
|
404
404
|
if (!0 === this.opt.forceXMLVersion) throw Error("forceXMLVersion set but defaultXMLVersion is not set");
|
|
@@ -408,7 +408,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
408
408
|
version: void 0,
|
|
409
409
|
encoding: void 0,
|
|
410
410
|
standalone: void 0
|
|
411
|
-
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
411
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(sn), this.readyHandler?.();
|
|
412
412
|
}
|
|
413
413
|
get position() {
|
|
414
414
|
return this.chunkPosition + this.i;
|
|
@@ -446,13 +446,13 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
446
446
|
}
|
|
447
447
|
getCode10() {
|
|
448
448
|
let e = this.chunk, t = this.i;
|
|
449
|
-
if (this.prevI = t, this.i++, t >= e.length) return
|
|
449
|
+
if (this.prevI = t, this.i++, t >= e.length) return J;
|
|
450
450
|
let n = e.charCodeAt(t);
|
|
451
451
|
if (this.column++, n < 55296) {
|
|
452
452
|
if (n >= 32 || n === 9) return n;
|
|
453
453
|
switch (n) {
|
|
454
454
|
case dn: return this.line++, this.column = 0, this.positionAtNewLine = this.position, dn;
|
|
455
|
-
case 13: return e.charCodeAt(t + 1) === dn && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
455
|
+
case 13: return e.charCodeAt(t + 1) === dn && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, cn;
|
|
456
456
|
default: return this.fail("disallowed character."), n;
|
|
457
457
|
}
|
|
458
458
|
}
|
|
@@ -462,7 +462,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
462
462
|
}
|
|
463
463
|
getCode11() {
|
|
464
464
|
let { chunk: e, i: t } = this;
|
|
465
|
-
if (this.prevI = t, this.i = t + 1, t >= e.length) return
|
|
465
|
+
if (this.prevI = t, this.i = t + 1, t >= e.length) return J;
|
|
466
466
|
let n = e.charCodeAt(t);
|
|
467
467
|
if (this.column++, n < 55296) {
|
|
468
468
|
if (n > 31 && n < 127 || n > 159 && n !== 8232 || n === 9) return n;
|
|
@@ -473,7 +473,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
473
473
|
n !== dn && n !== 133 || (this.i = t + 2);
|
|
474
474
|
}
|
|
475
475
|
case 133:
|
|
476
|
-
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
476
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, cn;
|
|
477
477
|
default: return this.fail("disallowed character."), n;
|
|
478
478
|
}
|
|
479
479
|
}
|
|
@@ -483,7 +483,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
483
483
|
}
|
|
484
484
|
getCodeNorm() {
|
|
485
485
|
let e = this.getCode();
|
|
486
|
-
return e ===
|
|
486
|
+
return e === cn ? dn : e;
|
|
487
487
|
}
|
|
488
488
|
unGet() {
|
|
489
489
|
this.i = this.prevI, this.column--;
|
|
@@ -491,8 +491,8 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
491
491
|
captureTo(e) {
|
|
492
492
|
let { i: t } = this, { chunk: n } = this;
|
|
493
493
|
for (;;) {
|
|
494
|
-
let r = this.getCode(), i = r ===
|
|
495
|
-
if (a ===
|
|
494
|
+
let r = this.getCode(), i = r === cn, a = i ? dn : r;
|
|
495
|
+
if (a === J || e.includes(a)) return this.text += n.slice(t, this.prevI), a;
|
|
496
496
|
i && (this.text += `${n.slice(t, this.prevI)}\n`, t = this.i);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
@@ -501,10 +501,10 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
501
501
|
for (;;) {
|
|
502
502
|
let r = this.getCode();
|
|
503
503
|
switch (r) {
|
|
504
|
-
case
|
|
504
|
+
case cn:
|
|
505
505
|
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r = dn;
|
|
506
506
|
break;
|
|
507
|
-
case
|
|
507
|
+
case J: return this.text += n.slice(t), !1;
|
|
508
508
|
}
|
|
509
509
|
if (r === e) return this.text += n.slice(t, this.prevI), !0;
|
|
510
510
|
}
|
|
@@ -513,18 +513,18 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
513
513
|
let { chunk: e, i: t } = this;
|
|
514
514
|
for (;;) {
|
|
515
515
|
let n = this.getCode();
|
|
516
|
-
if (n ===
|
|
517
|
-
if (!
|
|
516
|
+
if (n === J) return this.name += e.slice(t), J;
|
|
517
|
+
if (!Xt(n)) return this.name += e.slice(t, this.prevI), n === cn ? dn : n;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
skipSpaces() {
|
|
521
521
|
for (;;) {
|
|
522
522
|
let e = this.getCodeNorm();
|
|
523
|
-
if (e ===
|
|
523
|
+
if (e === J || !qt(e)) return e;
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
setXMLVersion(e) {
|
|
527
|
-
this.currentXMLVersion = e, e === "1.0" ? (this.isChar =
|
|
527
|
+
this.currentXMLVersion = e, e === "1.0" ? (this.isChar = Jt, this.getCode = this.getCode10) : (this.isChar = $t, this.getCode = this.getCode11);
|
|
528
528
|
}
|
|
529
529
|
sBegin() {
|
|
530
530
|
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
@@ -535,17 +535,17 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
535
535
|
case fn:
|
|
536
536
|
if (this.state = 15, this.text.length !== 0) throw Error("no-empty text at start");
|
|
537
537
|
break;
|
|
538
|
-
case
|
|
539
|
-
default: this.unGet(), this.state =
|
|
538
|
+
case J: break;
|
|
539
|
+
default: this.unGet(), this.state = ln, this.xmlDeclPossible = !1;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
sDoctype() {
|
|
543
543
|
let e = this.captureTo(_n);
|
|
544
544
|
switch (e) {
|
|
545
545
|
case Y:
|
|
546
|
-
this.doctypeHandler?.(this.text), this.text = "", this.state =
|
|
546
|
+
this.doctypeHandler?.(this.text), this.text = "", this.state = ln, this.doctype = !0;
|
|
547
547
|
break;
|
|
548
|
-
case
|
|
548
|
+
case J: break;
|
|
549
549
|
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 : hn(e) && (this.state = 3, this.q = e);
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -555,7 +555,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
555
555
|
}
|
|
556
556
|
sDTD() {
|
|
557
557
|
let e = this.captureTo(vn);
|
|
558
|
-
e !==
|
|
558
|
+
e !== J && (this.text += String.fromCodePoint(e), e === mn ? this.state = 2 : e === fn ? this.state = 6 : hn(e) && (this.state = 5, this.q = e));
|
|
559
559
|
}
|
|
560
560
|
sDTDQuoted() {
|
|
561
561
|
let e = this.q;
|
|
@@ -601,22 +601,22 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
601
601
|
sEntity() {
|
|
602
602
|
let { i: e } = this, { chunk: t } = this;
|
|
603
603
|
t: for (;;) switch (this.getCode()) {
|
|
604
|
-
case
|
|
604
|
+
case cn:
|
|
605
605
|
this.entity += `${t.slice(e, this.prevI)}\n`, e = this.i;
|
|
606
606
|
break;
|
|
607
607
|
case 59: {
|
|
608
608
|
let { entityReturnState: n } = this, r = this.entity + t.slice(e, this.prevI), i;
|
|
609
|
-
this.state = n, r === "" ? (this.fail("empty entity name."), i = "&;") : (i = this.parseEntity(r), this.entity = ""), n ===
|
|
609
|
+
this.state = n, r === "" ? (this.fail("empty entity name."), i = "&;") : (i = this.parseEntity(r), this.entity = ""), n === ln && this.textHandler === void 0 || (this.text += i);
|
|
610
610
|
break t;
|
|
611
611
|
}
|
|
612
|
-
case
|
|
612
|
+
case J:
|
|
613
613
|
this.entity += t.slice(e);
|
|
614
614
|
break t;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
sOpenWaka() {
|
|
618
618
|
let e = this.getCode();
|
|
619
|
-
if (
|
|
619
|
+
if (Yt(e)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
620
620
|
else switch (e) {
|
|
621
621
|
case 47:
|
|
622
622
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -627,7 +627,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
627
627
|
case X:
|
|
628
628
|
this.state = 23;
|
|
629
629
|
break;
|
|
630
|
-
default: this.fail("disallowed character in tag name"), this.state =
|
|
630
|
+
default: this.fail("disallowed character in tag name"), this.state = ln, this.xmlDeclPossible = !1;
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
sOpenWakaBang() {
|
|
@@ -653,7 +653,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
653
653
|
}
|
|
654
654
|
sCommentEnded() {
|
|
655
655
|
let e = this.getCodeNorm();
|
|
656
|
-
e === Y ? this.state =
|
|
656
|
+
e === Y ? this.state = ln : (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(e)}`, this.state = 17);
|
|
657
657
|
}
|
|
658
658
|
sCData() {
|
|
659
659
|
this.captureToChar(mn) && (this.state = 21);
|
|
@@ -666,7 +666,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
666
666
|
let e = this.getCodeNorm();
|
|
667
667
|
switch (e) {
|
|
668
668
|
case Y:
|
|
669
|
-
this.cdataHandler?.(this.text), this.text = "", this.state =
|
|
669
|
+
this.cdataHandler?.(this.text), this.text = "", this.state = ln;
|
|
670
670
|
break;
|
|
671
671
|
case mn:
|
|
672
672
|
this.text += "]";
|
|
@@ -676,17 +676,17 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
676
676
|
}
|
|
677
677
|
sPIFirstChar() {
|
|
678
678
|
let e = this.getCodeNorm();
|
|
679
|
-
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === X ||
|
|
679
|
+
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === X || qt(e) ? (this.fail("processing instruction without a target."), this.state = e === X ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(e), this.state = 24);
|
|
680
680
|
}
|
|
681
681
|
sPIRest() {
|
|
682
682
|
let { chunk: e, i: t } = this;
|
|
683
683
|
for (;;) {
|
|
684
684
|
let n = this.getCodeNorm();
|
|
685
|
-
if (n ===
|
|
685
|
+
if (n === J) return void (this.piTarget += e.slice(t));
|
|
686
686
|
if (!this.nameCheck(n)) {
|
|
687
687
|
this.piTarget += e.slice(t, this.prevI);
|
|
688
688
|
let r = n === X;
|
|
689
|
-
r ||
|
|
689
|
+
r || qt(n) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = r ? un : 27) : this.state = r ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(n));
|
|
690
690
|
break;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
@@ -694,7 +694,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
694
694
|
sPIBody() {
|
|
695
695
|
if (this.text.length === 0) {
|
|
696
696
|
let e = this.getCodeNorm();
|
|
697
|
-
e === X ? this.state = 26 :
|
|
697
|
+
e === X ? this.state = 26 : qt(e) || (this.text = String.fromCodePoint(e));
|
|
698
698
|
} else this.captureToChar(X) && (this.state = 26);
|
|
699
699
|
}
|
|
700
700
|
sPIEnding() {
|
|
@@ -704,18 +704,18 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
704
704
|
e.toLowerCase() === "xml" && this.fail("the XML declaration must appear at the start of the document."), this.piHandler?.({
|
|
705
705
|
target: e,
|
|
706
706
|
body: this.text
|
|
707
|
-
}), this.piTarget = this.text = "", this.state =
|
|
707
|
+
}), this.piTarget = this.text = "", this.state = ln;
|
|
708
708
|
} else e === X ? this.text += "?" : (this.text += `?${String.fromCodePoint(e)}`, this.state = 25);
|
|
709
709
|
this.xmlDeclPossible = !1;
|
|
710
710
|
}
|
|
711
711
|
sXMLDeclNameStart() {
|
|
712
712
|
let e = this.skipSpaces();
|
|
713
|
-
e === X ? this.state = un : e !==
|
|
713
|
+
e === X ? this.state = un : e !== J && (this.state = 28, this.name = String.fromCodePoint(e));
|
|
714
714
|
}
|
|
715
715
|
sXMLDeclName() {
|
|
716
716
|
let e = this.captureTo(yn);
|
|
717
717
|
if (e === X) return this.state = un, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
718
|
-
if (
|
|
718
|
+
if (qt(e) || e === pn) {
|
|
719
719
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
720
720
|
case 0:
|
|
721
721
|
this.fail("did not expect any more name/value pairs.");
|
|
@@ -731,17 +731,17 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
731
731
|
sXMLDeclEq() {
|
|
732
732
|
let e = this.getCodeNorm();
|
|
733
733
|
if (e === X) return this.state = un, void this.fail("XML declaration is incomplete.");
|
|
734
|
-
|
|
734
|
+
qt(e) || (e !== pn && this.fail("value required."), this.state = 30);
|
|
735
735
|
}
|
|
736
736
|
sXMLDeclValueStart() {
|
|
737
737
|
let e = this.getCodeNorm();
|
|
738
738
|
if (e === X) return this.state = un, void this.fail("XML declaration is incomplete.");
|
|
739
|
-
|
|
739
|
+
qt(e) || (hn(e) ? this.q = e : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
740
740
|
}
|
|
741
741
|
sXMLDeclValue() {
|
|
742
742
|
let e = this.captureTo([this.q, X]);
|
|
743
743
|
if (e === X) return this.state = un, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
744
|
-
if (e ===
|
|
744
|
+
if (e === J) return;
|
|
745
745
|
let t = this.text;
|
|
746
746
|
switch (this.text = "", this.name) {
|
|
747
747
|
case "version": {
|
|
@@ -759,14 +759,14 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
759
759
|
}
|
|
760
760
|
sXMLDeclSeparator() {
|
|
761
761
|
let e = this.getCodeNorm();
|
|
762
|
-
e === X ? this.state = un : (
|
|
762
|
+
e === X ? this.state = un : (qt(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
763
763
|
}
|
|
764
764
|
sXMLDeclEnding() {
|
|
765
|
-
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 =
|
|
765
|
+
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 = ln) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
766
766
|
}
|
|
767
767
|
sOpenTag() {
|
|
768
768
|
let e = this.captureNameChars();
|
|
769
|
-
if (e ===
|
|
769
|
+
if (e === J) return;
|
|
770
770
|
let t = this.tag = {
|
|
771
771
|
name: this.name,
|
|
772
772
|
attributes: Object.create(null)
|
|
@@ -778,7 +778,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
778
778
|
case 47:
|
|
779
779
|
this.state = 35;
|
|
780
780
|
break;
|
|
781
|
-
default:
|
|
781
|
+
default: qt(e) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
sOpenTagSlash() {
|
|
@@ -786,25 +786,25 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
786
786
|
}
|
|
787
787
|
sAttrib() {
|
|
788
788
|
let e = this.skipSpaces();
|
|
789
|
-
e !==
|
|
789
|
+
e !== J && (Yt(e) ? (this.unGet(), this.state = 37) : e === Y ? this.openTag() : e === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
790
790
|
}
|
|
791
791
|
sAttribName() {
|
|
792
792
|
let e = this.captureNameChars();
|
|
793
|
-
e === pn ? this.state = 39 :
|
|
793
|
+
e === pn ? this.state = 39 : qt(e) ? this.state = 38 : e === Y ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : e !== J && this.fail("disallowed character in attribute name.");
|
|
794
794
|
}
|
|
795
795
|
sAttribNameSawWhite() {
|
|
796
796
|
let e = this.skipSpaces();
|
|
797
797
|
switch (e) {
|
|
798
|
-
case
|
|
798
|
+
case J: return;
|
|
799
799
|
case pn:
|
|
800
800
|
this.state = 39;
|
|
801
801
|
break;
|
|
802
|
-
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() :
|
|
802
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() : Yt(e) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
sAttribValue() {
|
|
806
806
|
let e = this.getCodeNorm();
|
|
807
|
-
hn(e) ? (this.q = e, this.state = 40) :
|
|
807
|
+
hn(e) ? (this.q = e, this.state = 40) : qt(e) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
808
808
|
}
|
|
809
809
|
sAttribValueQuoted() {
|
|
810
810
|
let { q: e, chunk: t } = this, { i: n } = this;
|
|
@@ -816,21 +816,21 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
816
816
|
this.text += t.slice(n, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
817
817
|
return;
|
|
818
818
|
case dn:
|
|
819
|
-
case
|
|
819
|
+
case cn:
|
|
820
820
|
case 9:
|
|
821
821
|
this.text += `${t.slice(n, this.prevI)} `, n = this.i;
|
|
822
822
|
break;
|
|
823
823
|
case fn:
|
|
824
824
|
this.text += t.slice(n, this.prevI), this.fail("disallowed character.");
|
|
825
825
|
return;
|
|
826
|
-
case
|
|
826
|
+
case J:
|
|
827
827
|
this.text += t.slice(n);
|
|
828
828
|
return;
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
sAttribValueClosed() {
|
|
832
832
|
let e = this.getCodeNorm();
|
|
833
|
-
|
|
833
|
+
qt(e) ? this.state = 36 : e === Y ? this.openTag() : e === 47 ? this.state = 35 : Yt(e) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
834
834
|
}
|
|
835
835
|
sAttribValueUnquoted() {
|
|
836
836
|
let e = this.captureTo(bn);
|
|
@@ -841,20 +841,20 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
841
841
|
case fn:
|
|
842
842
|
this.fail("disallowed character.");
|
|
843
843
|
break;
|
|
844
|
-
case
|
|
844
|
+
case J: break;
|
|
845
845
|
default: this.text.includes("]]>") && this.fail("the string \"]]>\" is disallowed in char data."), this.pushAttrib(this.name, this.text), this.name = this.text = "", e === Y ? this.openTag() : this.state = 36;
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
848
|
sCloseTag() {
|
|
849
849
|
let e = this.captureNameChars();
|
|
850
|
-
e === Y ? this.closeTag() :
|
|
850
|
+
e === Y ? this.closeTag() : qt(e) ? this.state = 44 : e !== J && this.fail("disallowed character in closing tag.");
|
|
851
851
|
}
|
|
852
852
|
sCloseTagSawWhite() {
|
|
853
853
|
switch (this.skipSpaces()) {
|
|
854
854
|
case Y:
|
|
855
855
|
this.closeTag();
|
|
856
856
|
break;
|
|
857
|
-
case
|
|
857
|
+
case J: break;
|
|
858
858
|
default: this.fail("disallowed character in closing tag.");
|
|
859
859
|
}
|
|
860
860
|
}
|
|
@@ -869,7 +869,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
869
869
|
t = 0;
|
|
870
870
|
break t;
|
|
871
871
|
case 38:
|
|
872
|
-
this.state = 14, this.entityReturnState =
|
|
872
|
+
this.state = 14, this.entityReturnState = ln, r !== void 0 && (this.text += n.slice(e, this.prevI)), t = 0;
|
|
873
873
|
break t;
|
|
874
874
|
case mn:
|
|
875
875
|
switch (t) {
|
|
@@ -886,10 +886,10 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
886
886
|
case Y:
|
|
887
887
|
t === 2 && this.fail("the string \"]]>\" is disallowed in char data."), t = 0;
|
|
888
888
|
break;
|
|
889
|
-
case
|
|
889
|
+
case cn:
|
|
890
890
|
r !== void 0 && (this.text += `${n.slice(e, this.prevI)}\n`), e = this.i, t = 0;
|
|
891
891
|
break;
|
|
892
|
-
case
|
|
892
|
+
case J:
|
|
893
893
|
r !== void 0 && (this.text += n.slice(e));
|
|
894
894
|
break t;
|
|
895
895
|
default: t = 0;
|
|
@@ -908,15 +908,15 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
908
908
|
}
|
|
909
909
|
break t;
|
|
910
910
|
case 38:
|
|
911
|
-
this.state = 14, this.entityReturnState =
|
|
911
|
+
this.state = 14, this.entityReturnState = ln, n !== void 0 && (this.text += t.slice(e, this.prevI)), r = !0;
|
|
912
912
|
break t;
|
|
913
|
-
case
|
|
913
|
+
case cn:
|
|
914
914
|
n !== void 0 && (this.text += `${t.slice(e, this.prevI)}\n`), e = this.i;
|
|
915
915
|
break;
|
|
916
|
-
case
|
|
916
|
+
case J:
|
|
917
917
|
n !== void 0 && (this.text += t.slice(e));
|
|
918
918
|
break t;
|
|
919
|
-
default:
|
|
919
|
+
default: qt(i) || (r = !0);
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
r && (this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0));
|
|
@@ -950,7 +950,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
950
950
|
let t = e.pop();
|
|
951
951
|
this.fail(`unclosed tag: ${t.name}`);
|
|
952
952
|
}
|
|
953
|
-
this.state !== 0 && this.state !==
|
|
953
|
+
this.state !== 0 && this.state !== ln && this.fail("unexpected end.");
|
|
954
954
|
let { text: t } = this;
|
|
955
955
|
return t.length !== 0 && (this.textHandler?.(t), this.text = ""), this._closed = !0, this.endHandler?.(), this._init(), this;
|
|
956
956
|
}
|
|
@@ -985,7 +985,7 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
985
985
|
let { attributes: n } = t, r = /* @__PURE__ */ new Set();
|
|
986
986
|
for (let t of e) {
|
|
987
987
|
let { name: e, prefix: i, local: a } = t, o, s;
|
|
988
|
-
i === "" ? (o = e === "xmlns" ?
|
|
988
|
+
i === "" ? (o = e === "xmlns" ? an : "", 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;
|
|
989
989
|
}
|
|
990
990
|
this.attribList = [];
|
|
991
991
|
}
|
|
@@ -997,16 +997,16 @@ var Sn, Cn = (e) => rn.test(e), wn = (e) => $t.test(e), Tn = {
|
|
|
997
997
|
openTag() {
|
|
998
998
|
this.processAttribs();
|
|
999
999
|
let { tags: e } = this, t = this.tag;
|
|
1000
|
-
t.isSelfClosing = !1, this.openTagHandler?.(t), e.push(t), this.state =
|
|
1000
|
+
t.isSelfClosing = !1, this.openTagHandler?.(t), e.push(t), this.state = ln, this.name = "";
|
|
1001
1001
|
}
|
|
1002
1002
|
openSelfClosingTag() {
|
|
1003
1003
|
this.processAttribs();
|
|
1004
1004
|
let { tags: e } = this, t = this.tag;
|
|
1005
|
-
t.isSelfClosing = !0, this.openTagHandler?.(t), this.closeTagHandler?.(t), (this.tag = e[e.length - 1] ?? null) === null && (this.closedRoot = !0), this.state =
|
|
1005
|
+
t.isSelfClosing = !0, this.openTagHandler?.(t), this.closeTagHandler?.(t), (this.tag = e[e.length - 1] ?? null) === null && (this.closedRoot = !0), this.state = ln, this.name = "";
|
|
1006
1006
|
}
|
|
1007
1007
|
closeTag() {
|
|
1008
1008
|
let { tags: e, name: t } = this;
|
|
1009
|
-
if (this.state =
|
|
1009
|
+
if (this.state = ln, this.name = "", t === "") return this.fail("weird empty close tag."), void (this.text += "</>");
|
|
1010
1010
|
let n = this.closeTagHandler, r = e.length;
|
|
1011
1011
|
for (; r-- > 0;) {
|
|
1012
1012
|
let r = this.tag = e.pop();
|
|
@@ -1406,7 +1406,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1406
1406
|
onEnd: t
|
|
1407
1407
|
};
|
|
1408
1408
|
}
|
|
1409
|
-
}, Rn = `IFERROR(${
|
|
1409
|
+
}, Rn = `IFERROR(${S}(`, zn = Rn.toUpperCase(), Bn = h.toUpperCase(), Vn = { kind: "none" }, Hn = { kind: "spilled" }, Un = (e, t) => {
|
|
1410
1410
|
if (e.charCodeAt(t) !== 34) return null;
|
|
1411
1411
|
let n = "", r = t + 1;
|
|
1412
1412
|
for (; r < e.length;) if (e.charCodeAt(r) === 34) {
|
|
@@ -1466,19 +1466,19 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1466
1466
|
return !(!r || r.rowStart !== e || r.colEnd !== t - 1) && (r.colEnd = t, this._byColumn.set(t, r), r.restored);
|
|
1467
1467
|
}
|
|
1468
1468
|
getFormulaArray() {
|
|
1469
|
-
return this._restored.map((e) => [
|
|
1469
|
+
return this._restored.map((e) => [W.rangeToString(e), "dynamic"]);
|
|
1470
1470
|
}
|
|
1471
1471
|
}, Kn = /^\s*TABLE\s*\(([^()]*)\)\s*$/i, qn = /^\s*(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})\s*$/, Jn = (e) => {
|
|
1472
1472
|
let t = qn.exec(e);
|
|
1473
1473
|
if (!t) return null;
|
|
1474
|
-
let n =
|
|
1474
|
+
let n = W.fastStringToCol(t[2]), r = parseInt(t[4], 10) - 1;
|
|
1475
1475
|
return n < 0 || r < 0 ? null : {
|
|
1476
1476
|
row: r,
|
|
1477
1477
|
col: n,
|
|
1478
1478
|
colAbsolute: t[1] === "$",
|
|
1479
1479
|
rowAbsolute: t[3] === "$"
|
|
1480
1480
|
};
|
|
1481
|
-
}, Yn = (e) =>
|
|
1481
|
+
}, Yn = (e) => W.cellToString({
|
|
1482
1482
|
rowIndex: e.row,
|
|
1483
1483
|
colIndex: e.col
|
|
1484
1484
|
}), Xn = (e, t) => {
|
|
@@ -1539,7 +1539,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1539
1539
|
n.weight = ar(t) ? 700 : 400;
|
|
1540
1540
|
break;
|
|
1541
1541
|
case "i":
|
|
1542
|
-
n.style = ar(t) ?
|
|
1542
|
+
n.style = ar(t) ? tt.Style.Italic : tt.Style.Normal;
|
|
1543
1543
|
break;
|
|
1544
1544
|
case "strike":
|
|
1545
1545
|
n.strike = z(ar(t));
|
|
@@ -1557,10 +1557,10 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1557
1557
|
break;
|
|
1558
1558
|
}
|
|
1559
1559
|
case "u":
|
|
1560
|
-
n.underline =
|
|
1560
|
+
n.underline = ie(t.val);
|
|
1561
1561
|
break;
|
|
1562
1562
|
case "vertAlign": {
|
|
1563
|
-
let e =
|
|
1563
|
+
let e = B(t.val);
|
|
1564
1564
|
e !== void 0 && (n.baseline = e);
|
|
1565
1565
|
break;
|
|
1566
1566
|
}
|
|
@@ -1585,7 +1585,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1585
1585
|
break;
|
|
1586
1586
|
}
|
|
1587
1587
|
case "scheme":
|
|
1588
|
-
|
|
1588
|
+
ne(n, t.val);
|
|
1589
1589
|
break;
|
|
1590
1590
|
case "color": {
|
|
1591
1591
|
let e = t.rgb;
|
|
@@ -1593,7 +1593,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1593
1593
|
n.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
|
|
1594
1594
|
break;
|
|
1595
1595
|
}
|
|
1596
|
-
let r =
|
|
1596
|
+
let r = ge((e) => t[e]);
|
|
1597
1597
|
r && (n.color = r);
|
|
1598
1598
|
break;
|
|
1599
1599
|
}
|
|
@@ -1626,9 +1626,9 @@ function rr(e, t) {
|
|
|
1626
1626
|
size: 11,
|
|
1627
1627
|
...t,
|
|
1628
1628
|
weight: 400,
|
|
1629
|
-
style:
|
|
1630
|
-
underline:
|
|
1631
|
-
strike:
|
|
1629
|
+
style: tt.Style.Normal,
|
|
1630
|
+
underline: tt.UnderlineStyle.None,
|
|
1631
|
+
strike: tt.StrikeStyle.None,
|
|
1632
1632
|
baseline: 0
|
|
1633
1633
|
}, r = Array(e.length);
|
|
1634
1634
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -1667,19 +1667,19 @@ var ir = {
|
|
|
1667
1667
|
return {
|
|
1668
1668
|
c: n(t("col")),
|
|
1669
1669
|
r: n(t("row")),
|
|
1670
|
-
x:
|
|
1671
|
-
y:
|
|
1670
|
+
x: le(t("colOff") ?? "0") ?? 0,
|
|
1671
|
+
y: le(t("rowOff") ?? "0") ?? 0
|
|
1672
1672
|
};
|
|
1673
1673
|
}, sr = "formulaDialect", cr = "isKnownFunction", lr = "date1904", ur = "richStrings", dr = "defaultFont", fr = (e, t, r, i, a, s, c, l) => {
|
|
1674
1674
|
let d = new Ln(), p = (e) => {
|
|
1675
1675
|
let t = e.getAttribute("dxfId", Q);
|
|
1676
1676
|
return t === null ? void 0 : i?.get(t) || (s?.(`A color filter or sort names a format that does not exist (dxfId '${t}').`), {});
|
|
1677
|
-
}, m = !1, h = l?.get("parseInlineDxf"), g = l?.get(sr), _ = (e) => g && e ? g.readDetached(e) : e, y = new
|
|
1677
|
+
}, m = !1, h = l?.get("parseInlineDxf"), g = l?.get(sr), _ = (e) => g && e ? g.readDetached(e) : e, y = new ft.TransposedBuilder(), b = null, ee = "topLeft";
|
|
1678
1678
|
d.registerVisitor({
|
|
1679
1679
|
from: "autoFilter",
|
|
1680
1680
|
to: "autoTable",
|
|
1681
1681
|
openTag: (e) => {
|
|
1682
|
-
let t = e.getAttribute("ref"), n =
|
|
1682
|
+
let t = e.getAttribute("ref"), n = W.fastStringToRange(t);
|
|
1683
1683
|
e.getSource().r = n, e.getSource().v = {};
|
|
1684
1684
|
},
|
|
1685
1685
|
closeTag: (e) => {
|
|
@@ -1727,11 +1727,17 @@ var ir = {
|
|
|
1727
1727
|
if (!t?.r) return;
|
|
1728
1728
|
let n = t.conditionals[t.conditionals.length - 1], r = n?.rule;
|
|
1729
1729
|
if (!r) return;
|
|
1730
|
-
let i = {}, a =
|
|
1730
|
+
let i = {}, a = D(r, s);
|
|
1731
1731
|
a && (i.condition = a), r.style && (i.style = r.style), r.scale && (i.scale = r.scale), r.stopIfTrue && (i.stopIfTrue = !0), r.pivot && typeof r.priority == "number" && (i.pivotKey = r.priority), n.v = i, n.priority = r.priority, r.x14Id && (n.x14Id = r.x14Id), delete n.rule;
|
|
1732
1732
|
}
|
|
1733
1733
|
});
|
|
1734
|
-
let te = (e) => {
|
|
1734
|
+
let te = (e, t) => {
|
|
1735
|
+
let n = t.minLength ?? 10, r = t.maxLength ?? 90;
|
|
1736
|
+
n === 0 ? delete e.minLength : e.minLength = n, r === 100 ? delete e.maxLength : e.maxLength = r;
|
|
1737
|
+
}, x = (e, t) => {
|
|
1738
|
+
let n = (e, t) => !e || e.type === t && e.value === void 0 && !e.exclusive, [r, i] = t;
|
|
1739
|
+
n(r, et.ColorStopType.Min) ? delete e.minPoint : e.minPoint = r, n(i, et.ColorStopType.Max) ? delete e.maxPoint : e.maxPoint = i;
|
|
1740
|
+
}, S = (e) => {
|
|
1735
1741
|
let t = e.conditions ?? [], n = [];
|
|
1736
1742
|
for (let e = 0; e < t.length; e++) {
|
|
1737
1743
|
let r = t[e], i = {};
|
|
@@ -1744,10 +1750,10 @@ var ir = {
|
|
|
1744
1750
|
to: {},
|
|
1745
1751
|
openTag: (e) => {},
|
|
1746
1752
|
closeTag: (e) => {
|
|
1747
|
-
let t = e.getSource(), n = t.colors ?? [], r =
|
|
1753
|
+
let t = e.getSource(), n = t.colors ?? [], r = S(t);
|
|
1748
1754
|
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1749
1755
|
e.getParent().scale = {
|
|
1750
|
-
type:
|
|
1756
|
+
type: et.ScaleType.ColorScale,
|
|
1751
1757
|
stops: r
|
|
1752
1758
|
};
|
|
1753
1759
|
}
|
|
@@ -1758,11 +1764,10 @@ var ir = {
|
|
|
1758
1764
|
e.copyTo("maxLength", Q), e.copyTo("minLength", Q), e.copyTo("showValue", Z);
|
|
1759
1765
|
},
|
|
1760
1766
|
closeTag: (e) => {
|
|
1761
|
-
let t = e.getSource(), n = {
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
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;
|
|
1767
|
+
let t = e.getSource(), n = { type: et.ScaleType.DataBar };
|
|
1768
|
+
x(n, S(t));
|
|
1769
|
+
let r = t.colors?.[0];
|
|
1770
|
+
r && (n.color = r), te(n, t), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1766
1771
|
}
|
|
1767
1772
|
}), d.registerVisitor({
|
|
1768
1773
|
from: "iconSet",
|
|
@@ -1772,8 +1777,8 @@ var ir = {
|
|
|
1772
1777
|
},
|
|
1773
1778
|
closeTag: (e) => {
|
|
1774
1779
|
let t = e.getSource(), n = {
|
|
1775
|
-
type:
|
|
1776
|
-
stops:
|
|
1780
|
+
type: et.ScaleType.IconSet,
|
|
1781
|
+
stops: S(t)
|
|
1777
1782
|
};
|
|
1778
1783
|
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;
|
|
1779
1784
|
}
|
|
@@ -1791,7 +1796,7 @@ var ir = {
|
|
|
1791
1796
|
let t = e.getParent();
|
|
1792
1797
|
t.conditions ||= [];
|
|
1793
1798
|
let n = e.getSource();
|
|
1794
|
-
if (t.conditions.push(n), e.copyTo("type", $), n.type ===
|
|
1799
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === et.ColorStopType.Formula) {
|
|
1795
1800
|
let t = e.getAttribute("val");
|
|
1796
1801
|
t != null && (n.value = _(String(t)));
|
|
1797
1802
|
} else e.copyTo("value", Pn, "val");
|
|
@@ -1803,7 +1808,7 @@ var ir = {
|
|
|
1803
1808
|
openTag: (e) => {
|
|
1804
1809
|
let t = e.getParent();
|
|
1805
1810
|
t.colors ||= [];
|
|
1806
|
-
let n =
|
|
1811
|
+
let n = ge((t) => e.getAttribute(t));
|
|
1807
1812
|
t.colors.push(n);
|
|
1808
1813
|
}
|
|
1809
1814
|
}), d.registerVisitor({
|
|
@@ -1829,7 +1834,7 @@ var ir = {
|
|
|
1829
1834
|
from: "colorFilter",
|
|
1830
1835
|
openTag: (e) => {
|
|
1831
1836
|
let t = e.getParent(), n = {};
|
|
1832
|
-
t.operator =
|
|
1837
|
+
t.operator = $e.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor", Z);
|
|
1833
1838
|
let r = p(e);
|
|
1834
1839
|
r && (n.style = r);
|
|
1835
1840
|
}
|
|
@@ -1837,39 +1842,39 @@ var ir = {
|
|
|
1837
1842
|
from: "iconFilter",
|
|
1838
1843
|
openTag: (e) => {
|
|
1839
1844
|
let t = e.getParent(), n = {};
|
|
1840
|
-
t.operator =
|
|
1845
|
+
t.operator = $e.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Q), e.copyToObject(n, "iconSet", $);
|
|
1841
1846
|
}
|
|
1842
1847
|
}), d.registerVisitor({
|
|
1843
1848
|
from: "top10",
|
|
1844
1849
|
openTag: (e) => {
|
|
1845
1850
|
let t = e.getParent(), n = {};
|
|
1846
|
-
t.operator =
|
|
1851
|
+
t.operator = $e.BuiltInOperatorNames.TopN, t.param = n, e.copyToObject(n, "filterVal", Pn), e.copyToObject(n, "percent", Z), e.copyToObject(n, "top", Z), e.copyToObject(n, "limit", Pn, "val");
|
|
1847
1852
|
}
|
|
1848
1853
|
}), d.registerVisitor({
|
|
1849
1854
|
from: "dynamicFilter",
|
|
1850
1855
|
openTag: (e) => {
|
|
1851
|
-
let t = e.getParent(), n =
|
|
1856
|
+
let t = e.getParent(), n = O(e.getAttribute("type"), e.getAttribute("val"), e.getAttribute("maxVal"));
|
|
1852
1857
|
t.operator = n.operator, t.param = n.param;
|
|
1853
1858
|
}
|
|
1854
1859
|
});
|
|
1855
|
-
let
|
|
1860
|
+
let ne = {
|
|
1856
1861
|
from: "filters",
|
|
1857
1862
|
to: {},
|
|
1858
1863
|
openTag: (e) => {
|
|
1859
1864
|
let t = e.getParent(), n = {};
|
|
1860
|
-
return t.selector =
|
|
1865
|
+
return t.selector = $e.BuiltInSelectorNames.Display, t.operator = $e.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", Z), e.copyToObject(n, "calendarType", $), n;
|
|
1861
1866
|
}
|
|
1862
1867
|
};
|
|
1863
|
-
d.registerVisitor(
|
|
1864
|
-
let
|
|
1868
|
+
d.registerVisitor(ne);
|
|
1869
|
+
let re = {
|
|
1865
1870
|
from: "filter",
|
|
1866
1871
|
openTag: (e) => {
|
|
1867
1872
|
let t = e.getParent(), n = t.items;
|
|
1868
1873
|
n || (n = [], t.items = n), n.push(e.getAttribute("val", $));
|
|
1869
1874
|
}
|
|
1870
1875
|
};
|
|
1871
|
-
d.registerVisitor(
|
|
1872
|
-
let
|
|
1876
|
+
d.registerVisitor(re);
|
|
1877
|
+
let ie = {
|
|
1873
1878
|
from: "dateGroupItem",
|
|
1874
1879
|
to: {},
|
|
1875
1880
|
openTag: (e) => {
|
|
@@ -1877,21 +1882,21 @@ var ir = {
|
|
|
1877
1882
|
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);
|
|
1878
1883
|
}
|
|
1879
1884
|
};
|
|
1880
|
-
d.registerVisitor(
|
|
1881
|
-
let
|
|
1882
|
-
|
|
1885
|
+
d.registerVisitor(ie);
|
|
1886
|
+
let ae = /* @__PURE__ */ new Map();
|
|
1887
|
+
ae.set("filterColumn", {
|
|
1883
1888
|
from: "filterColumn",
|
|
1884
1889
|
transparent: !0
|
|
1885
|
-
}),
|
|
1890
|
+
}), ae.set("filters", ne), ae.set("filter", re), ae.set("dateGroupItem", ie), d.registerVisitor({
|
|
1886
1891
|
from: "customFilters",
|
|
1887
1892
|
openTag: (e) => {
|
|
1888
1893
|
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1889
|
-
return t.operator = r ?
|
|
1894
|
+
return t.operator = r ? $e.BuiltInOperatorNames.And : $e.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1890
1895
|
},
|
|
1891
1896
|
closeTag: (e) => {
|
|
1892
1897
|
let t = e.getSource(), n = t?.param;
|
|
1893
1898
|
if (!t || !n) return;
|
|
1894
|
-
let r = n.length === 1 ? n[0] :
|
|
1899
|
+
let r = n.length === 1 ? n[0] : A(t);
|
|
1895
1900
|
r !== t && (t.operator = r.operator, t.param = r.param);
|
|
1896
1901
|
}
|
|
1897
1902
|
}), d.registerVisitor({
|
|
@@ -1899,14 +1904,14 @@ var ir = {
|
|
|
1899
1904
|
openTag: (e) => {
|
|
1900
1905
|
let t = e.getParent(), n;
|
|
1901
1906
|
Array.isArray(t) ? (n = {}, t.push(n)) : n = t;
|
|
1902
|
-
let r =
|
|
1907
|
+
let r = V({
|
|
1903
1908
|
operator: e.getAttribute("operator"),
|
|
1904
1909
|
val: e.getAttribute("val")
|
|
1905
1910
|
}, (t) => e.warn(t));
|
|
1906
1911
|
r && (n.operator = r.operator, n.param = r.param);
|
|
1907
1912
|
}
|
|
1908
1913
|
});
|
|
1909
|
-
let
|
|
1914
|
+
let se = {}, ce = null;
|
|
1910
1915
|
d.registerVisitor({
|
|
1911
1916
|
from: "sortState",
|
|
1912
1917
|
to: {},
|
|
@@ -1914,16 +1919,16 @@ var ir = {
|
|
|
1914
1919
|
let t = e.getParent(), n = t.v;
|
|
1915
1920
|
if (!n) return;
|
|
1916
1921
|
let r = {};
|
|
1917
|
-
|
|
1922
|
+
se = {};
|
|
1918
1923
|
let i = e.getAttribute("caseSensitive", Z);
|
|
1919
|
-
i != null && (
|
|
1924
|
+
i != null && (se.collatorOptions = i ? ut.CaseSensitiveOptions : ut.CaseInsensitiveOptions);
|
|
1920
1925
|
let a = e.getAttribute("sortMethod");
|
|
1921
|
-
a !== "stroke" && a !== "pinYin" || (
|
|
1922
|
-
...
|
|
1926
|
+
a !== "stroke" && a !== "pinYin" || (se.collatorOptions = {
|
|
1927
|
+
...se.collatorOptions,
|
|
1923
1928
|
collation: a === "stroke" ? "stroke" : "pinyin"
|
|
1924
|
-
}), e.getAttribute("columnSort", Z) && (r.axis =
|
|
1929
|
+
}), e.getAttribute("columnSort", Z) && (r.axis = nt.Axis.Column);
|
|
1925
1930
|
let o = e.getAttribute("ref"), s = t.r;
|
|
1926
|
-
|
|
1931
|
+
ce = o && s ? W.fastStringToRange(o) : null, ce && (r.extent = { range: v(s, ce) }), n.sort = r, e.setSource(t);
|
|
1927
1932
|
}
|
|
1928
1933
|
}), d.registerVisitor({
|
|
1929
1934
|
from: "sortCondition",
|
|
@@ -1937,11 +1942,11 @@ var ir = {
|
|
|
1937
1942
|
i || (i = [], r.sorts = i);
|
|
1938
1943
|
let a = e.getAttribute("ref"), o = 0, s = null;
|
|
1939
1944
|
if (a) {
|
|
1940
|
-
let e =
|
|
1941
|
-
o = r ? n - i : n, r &&
|
|
1945
|
+
let e = W.fastStringToRange(a, gr), n = e.colStart, r = t.r, i = r.colStart;
|
|
1946
|
+
o = r ? n - i : n, r && ce && (s = xe(r, ce, e));
|
|
1942
1947
|
}
|
|
1943
1948
|
r.extent && (r.extent.sorts ??= []).push(s);
|
|
1944
|
-
let c = { ...
|
|
1949
|
+
let c = { ...se }, l = Se(e.getAttribute("sortBy"));
|
|
1945
1950
|
l && (c.sortOn = l);
|
|
1946
1951
|
let u = p(e);
|
|
1947
1952
|
u && (c.style = u), e.copyToObject(c, "iconSet", $), e.copyToObject(c, "customList", $), c.reverse = e.getAttribute("descending", Z) ?? !1;
|
|
@@ -1952,12 +1957,12 @@ var ir = {
|
|
|
1952
1957
|
i.push(d);
|
|
1953
1958
|
}
|
|
1954
1959
|
});
|
|
1955
|
-
let
|
|
1960
|
+
let le = (e) => {
|
|
1956
1961
|
b = e.getSource(), ee = "topLeft", e.copyTo("topLeft", $, "topLeftCell");
|
|
1957
|
-
let t =
|
|
1962
|
+
let t = oe(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1958
1963
|
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");
|
|
1959
1964
|
let r = {};
|
|
1960
|
-
for (let [t, n] of
|
|
1965
|
+
for (let [t, n] of M) {
|
|
1961
1966
|
let i = e.getAttribute(n, Q);
|
|
1962
1967
|
i && (r[t] = Math.min(400, Math.max(10, i)));
|
|
1963
1968
|
}
|
|
@@ -1967,7 +1972,7 @@ var ir = {
|
|
|
1967
1972
|
from: "sheetView",
|
|
1968
1973
|
to: "view",
|
|
1969
1974
|
openTag: (e) => {
|
|
1970
|
-
|
|
1975
|
+
le(e);
|
|
1971
1976
|
},
|
|
1972
1977
|
closeTag: () => {
|
|
1973
1978
|
b = null;
|
|
@@ -1982,10 +1987,10 @@ var ir = {
|
|
|
1982
1987
|
from: "customSheetView",
|
|
1983
1988
|
to: [],
|
|
1984
1989
|
openTag: (e) => {
|
|
1985
|
-
|
|
1990
|
+
C = !0, le(e);
|
|
1986
1991
|
},
|
|
1987
1992
|
closeTag: () => {
|
|
1988
|
-
|
|
1993
|
+
C = !1, b = null;
|
|
1989
1994
|
}
|
|
1990
1995
|
}), d.registerVisitor({
|
|
1991
1996
|
from: "selection",
|
|
@@ -2016,7 +2021,7 @@ var ir = {
|
|
|
2016
2021
|
if (t === "frozen" || t === "frozenSplit") {
|
|
2017
2022
|
let t = {};
|
|
2018
2023
|
b.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
2019
|
-
let n = (b.topLeft ?
|
|
2024
|
+
let n = (b.topLeft ? W.fastStringToCell(b.topLeft) : void 0) ?? {
|
|
2020
2025
|
colIndex: 0,
|
|
2021
2026
|
rowIndex: 0
|
|
2022
2027
|
}, r = {
|
|
@@ -2028,7 +2033,7 @@ var ir = {
|
|
|
2028
2033
|
colIndex: n.colIndex + r.colIndex,
|
|
2029
2034
|
rowIndex: n.rowIndex + r.rowIndex
|
|
2030
2035
|
};
|
|
2031
|
-
t.coords =
|
|
2036
|
+
t.coords = W.cellToString(i);
|
|
2032
2037
|
}
|
|
2033
2038
|
}
|
|
2034
2039
|
}), d.registerVisitor({
|
|
@@ -2046,16 +2051,16 @@ var ir = {
|
|
|
2046
2051
|
from: "tabColor",
|
|
2047
2052
|
to: null,
|
|
2048
2053
|
openTag: (t) => {
|
|
2049
|
-
let n =
|
|
2054
|
+
let n = ge((e) => t.getAttribute(e));
|
|
2050
2055
|
n && (e.tabColor = n);
|
|
2051
2056
|
}
|
|
2052
2057
|
});
|
|
2053
|
-
let
|
|
2058
|
+
let C = !1, w = () => e.pageLayout ??= {};
|
|
2054
2059
|
d.registerVisitor({
|
|
2055
2060
|
from: "pageSetUpPr",
|
|
2056
2061
|
to: null,
|
|
2057
2062
|
openTag: (e) => {
|
|
2058
|
-
!0 === e.getAttribute("fitToPage", Z) && (
|
|
2063
|
+
!0 === e.getAttribute("fitToPage", Z) && (w().fitToPage = !0), !1 === e.getAttribute("autoPageBreaks", Z) && (w().hideAutoPageBreaks = !0);
|
|
2059
2064
|
}
|
|
2060
2065
|
}), d.registerVisitor({
|
|
2061
2066
|
from: "outlinePr",
|
|
@@ -2074,7 +2079,7 @@ var ir = {
|
|
|
2074
2079
|
from: "pageMargins",
|
|
2075
2080
|
to: null,
|
|
2076
2081
|
openTag: (e) => {
|
|
2077
|
-
if (
|
|
2082
|
+
if (C) return;
|
|
2078
2083
|
let t = (t, n) => e.getAttribute(t, Pn) ?? n, n = {
|
|
2079
2084
|
left: t("left", .7),
|
|
2080
2085
|
right: t("right", .7),
|
|
@@ -2083,14 +2088,14 @@ var ir = {
|
|
|
2083
2088
|
header: t("header", .3),
|
|
2084
2089
|
footer: t("footer", .3)
|
|
2085
2090
|
};
|
|
2086
|
-
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (
|
|
2091
|
+
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (w().margins = n);
|
|
2087
2092
|
}
|
|
2088
2093
|
}), d.registerVisitor({
|
|
2089
2094
|
from: "pageSetup",
|
|
2090
2095
|
to: null,
|
|
2091
2096
|
openTag: (e) => {
|
|
2092
|
-
if (
|
|
2093
|
-
let n =
|
|
2097
|
+
if (C) return;
|
|
2098
|
+
let n = w(), r = (t) => e.getAttribute(t, Q) ?? void 0, i = (t) => e.getAttribute(t, Z), a = e.getAttribute("orientation");
|
|
2094
2099
|
a !== "landscape" && a !== "portrait" || (n.orientation = a);
|
|
2095
2100
|
for (let e of [
|
|
2096
2101
|
"paperSize",
|
|
@@ -2109,7 +2114,7 @@ var ir = {
|
|
|
2109
2114
|
o && (n.paperHeight = o);
|
|
2110
2115
|
let s = e.getAttribute("paperWidth");
|
|
2111
2116
|
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);
|
|
2112
|
-
let c = e.getAttribute("cellComments"), l =
|
|
2117
|
+
let c = e.getAttribute("cellComments"), l = ye.find(([e]) => e === c)?.[1];
|
|
2113
2118
|
l && (n.printComments = l);
|
|
2114
2119
|
let u = e.getAttribute("errors"), d = Ce.find(([e]) => e === u)?.[1];
|
|
2115
2120
|
d && (n.printErrors = d);
|
|
@@ -2120,49 +2125,49 @@ var ir = {
|
|
|
2120
2125
|
from: "printOptions",
|
|
2121
2126
|
to: null,
|
|
2122
2127
|
openTag: (e) => {
|
|
2123
|
-
if (
|
|
2128
|
+
if (C) return;
|
|
2124
2129
|
let t = (t) => !0 === e.getAttribute(t, Z);
|
|
2125
|
-
t("horizontalCentered") && (
|
|
2130
|
+
t("horizontalCentered") && (w().centerHorizontally = !0), t("verticalCentered") && (w().centerVertically = !0), t("gridLines") && (w().printGridlines = !0), t("headings") && (w().printHeadings = !0);
|
|
2126
2131
|
}
|
|
2127
2132
|
}), d.registerVisitor({
|
|
2128
2133
|
from: "headerFooter",
|
|
2129
2134
|
to: {},
|
|
2130
2135
|
openTag: (e) => {
|
|
2131
|
-
if (
|
|
2136
|
+
if (C) return;
|
|
2132
2137
|
let t = {}, n = (t) => e.getAttribute(t, Z);
|
|
2133
|
-
!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 && (
|
|
2138
|
+
!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 && (w().headerFooter = t);
|
|
2134
2139
|
}
|
|
2135
2140
|
});
|
|
2136
2141
|
for (let e of Me) d.registerVisitor({
|
|
2137
2142
|
from: e,
|
|
2138
2143
|
to: {},
|
|
2139
2144
|
text: (t, n) => {
|
|
2140
|
-
if (
|
|
2141
|
-
let r =
|
|
2145
|
+
if (C) return;
|
|
2146
|
+
let r = w(), i = r.headerFooter ??= {};
|
|
2142
2147
|
i[e] = (i[e] ?? "") + f(t);
|
|
2143
2148
|
}
|
|
2144
2149
|
});
|
|
2145
|
-
let
|
|
2150
|
+
let de = "rowBreaks";
|
|
2146
2151
|
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]]) d.registerVisitor({
|
|
2147
2152
|
from: e,
|
|
2148
2153
|
to: {},
|
|
2149
2154
|
openTag: () => {
|
|
2150
|
-
|
|
2155
|
+
de = t;
|
|
2151
2156
|
}
|
|
2152
2157
|
});
|
|
2153
2158
|
d.registerVisitor({
|
|
2154
2159
|
from: "brk",
|
|
2155
2160
|
to: null,
|
|
2156
2161
|
openTag: (e) => {
|
|
2157
|
-
if (
|
|
2162
|
+
if (C) return;
|
|
2158
2163
|
let t = e.getAttribute("id", Q);
|
|
2159
2164
|
if (t == null) return;
|
|
2160
2165
|
let n = { index: t }, r = e.getAttribute("min", Q);
|
|
2161
2166
|
r != null && (n.min = r);
|
|
2162
2167
|
let i = e.getAttribute("max", Q);
|
|
2163
2168
|
i != null && (n.max = i), !0 !== e.getAttribute("man", Z) && (n.automatic = !0), !0 === e.getAttribute("pt", Z) && (n.pivot = !0);
|
|
2164
|
-
let a =
|
|
2165
|
-
(a[
|
|
2169
|
+
let a = w();
|
|
2170
|
+
(a[de] ??= []).push(n);
|
|
2166
2171
|
}
|
|
2167
2172
|
}), d.registerVisitor({
|
|
2168
2173
|
from: "ignoredErrors",
|
|
@@ -2202,7 +2207,7 @@ var ir = {
|
|
|
2202
2207
|
});
|
|
2203
2208
|
}
|
|
2204
2209
|
});
|
|
2205
|
-
let
|
|
2210
|
+
let pe = {
|
|
2206
2211
|
from: "dataValidation",
|
|
2207
2212
|
to: [],
|
|
2208
2213
|
openTag: (e) => {
|
|
@@ -2225,19 +2230,19 @@ var ir = {
|
|
|
2225
2230
|
n && (e.getAttribute("allowBlank", Z) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
2226
2231
|
}
|
|
2227
2232
|
};
|
|
2228
|
-
d.registerVisitor(
|
|
2233
|
+
d.registerVisitor(pe), d.registerVisitor({
|
|
2229
2234
|
from: "formula1",
|
|
2230
2235
|
to: {},
|
|
2231
2236
|
text: (e, t) => {
|
|
2232
2237
|
let n = t.getParent().rule;
|
|
2233
|
-
n?.type && (n.formula1 =
|
|
2238
|
+
n?.type && (n.formula1 = P(_(e), n.type));
|
|
2234
2239
|
}
|
|
2235
2240
|
}), d.registerVisitor({
|
|
2236
2241
|
from: "formula2",
|
|
2237
2242
|
to: {},
|
|
2238
2243
|
text: (e, t) => {
|
|
2239
2244
|
let n = t.getParent().rule;
|
|
2240
|
-
n?.type && (n.formula2 =
|
|
2245
|
+
n?.type && (n.formula2 = P(_(e), n.type));
|
|
2241
2246
|
}
|
|
2242
2247
|
}), d.registerVisitor({
|
|
2243
2248
|
from: "picture",
|
|
@@ -2249,7 +2254,7 @@ var ir = {
|
|
|
2249
2254
|
e.getSource().resId = r;
|
|
2250
2255
|
}
|
|
2251
2256
|
});
|
|
2252
|
-
let
|
|
2257
|
+
let _e = {
|
|
2253
2258
|
from: "slicer",
|
|
2254
2259
|
to: {},
|
|
2255
2260
|
openTag: (e) => {
|
|
@@ -2261,8 +2266,8 @@ var ir = {
|
|
|
2261
2266
|
for (let e of a) i.slicers[e] = r[e];
|
|
2262
2267
|
}
|
|
2263
2268
|
};
|
|
2264
|
-
d.registerVisitor(
|
|
2265
|
-
let
|
|
2269
|
+
d.registerVisitor(_e);
|
|
2270
|
+
let be = {
|
|
2266
2271
|
from: "timelineRef",
|
|
2267
2272
|
to: {},
|
|
2268
2273
|
openTag: (e) => {
|
|
@@ -2272,7 +2277,7 @@ var ir = {
|
|
|
2272
2277
|
i.slicers ??= {};
|
|
2273
2278
|
for (let e of Object.keys(r)) i.slicers[e] = r[e];
|
|
2274
2279
|
}
|
|
2275
|
-
},
|
|
2280
|
+
}, F = (e, t) => ({
|
|
2276
2281
|
from: e,
|
|
2277
2282
|
to: {},
|
|
2278
2283
|
openTag: (e) => {
|
|
@@ -2284,8 +2289,8 @@ var ir = {
|
|
|
2284
2289
|
closeTag: (e) => {
|
|
2285
2290
|
t(String(e.getSource() ?? ""), e);
|
|
2286
2291
|
}
|
|
2287
|
-
}),
|
|
2288
|
-
|
|
2292
|
+
}), I = /* @__PURE__ */ new Map();
|
|
2293
|
+
I.set("dataValidations", {
|
|
2289
2294
|
from: "dataValidations",
|
|
2290
2295
|
to: "validations",
|
|
2291
2296
|
openTag: (e) => {
|
|
@@ -2295,15 +2300,15 @@ var ir = {
|
|
|
2295
2300
|
closeTag: (e) => {
|
|
2296
2301
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2297
2302
|
}
|
|
2298
|
-
}),
|
|
2299
|
-
...
|
|
2303
|
+
}), I.set("dataValidation", {
|
|
2304
|
+
...pe,
|
|
2300
2305
|
closeTag: (e) => {
|
|
2301
|
-
|
|
2306
|
+
pe.closeTag(e);
|
|
2302
2307
|
let t = e.getSource();
|
|
2303
2308
|
t && !t.r && (e.warn("x14 dataValidation with no xm:sqref was dropped."), e.setSource(void 0));
|
|
2304
2309
|
}
|
|
2305
2310
|
});
|
|
2306
|
-
let
|
|
2311
|
+
let we = (e) => ({
|
|
2307
2312
|
from: e,
|
|
2308
2313
|
to: {},
|
|
2309
2314
|
openTag: (t) => {
|
|
@@ -2313,14 +2318,14 @@ var ir = {
|
|
|
2313
2318
|
});
|
|
2314
2319
|
}
|
|
2315
2320
|
});
|
|
2316
|
-
|
|
2321
|
+
I.set("formula1", we("formula1")), I.set("formula2", we("formula2")), I.set("f", F("f", (e, t) => {
|
|
2317
2322
|
let n = t.getParent(), r = n?.rule;
|
|
2318
|
-
r && (r[n.key] =
|
|
2319
|
-
})),
|
|
2323
|
+
r && (r[n.key] = P(_(e), r.type));
|
|
2324
|
+
})), I.set("sqref", F("sqref", (e, t) => {
|
|
2320
2325
|
let n = t.getParent(), r = e.trim();
|
|
2321
2326
|
n && r && (n.r = r.split(/\s+/).join(","));
|
|
2322
2327
|
}));
|
|
2323
|
-
let
|
|
2328
|
+
let Te = /* @__PURE__ */ new Map(), Ee = [], L = /* @__PURE__ */ new Map();
|
|
2324
2329
|
L.set("conditionalFormattings", {
|
|
2325
2330
|
from: "conditionalFormattings",
|
|
2326
2331
|
transparent: !0
|
|
@@ -2334,7 +2339,7 @@ var ir = {
|
|
|
2334
2339
|
let t = e.getSource(), n = t?.rules ?? [];
|
|
2335
2340
|
for (let e = 0; e < n.length; e++) {
|
|
2336
2341
|
let r = n[e];
|
|
2337
|
-
r.sqref = t.sqref, r.id ?
|
|
2342
|
+
r.sqref = t.sqref, r.id ? Te.set(r.id, r) : Ee.push(r);
|
|
2338
2343
|
}
|
|
2339
2344
|
}
|
|
2340
2345
|
}), L.set("cfRule", {
|
|
@@ -2347,7 +2352,7 @@ var ir = {
|
|
|
2347
2352
|
let t = e.getSource();
|
|
2348
2353
|
t && e.getParent()?.rules?.push(t);
|
|
2349
2354
|
}
|
|
2350
|
-
}), L.set("sqref",
|
|
2355
|
+
}), L.set("sqref", F("sqref", (e, t) => {
|
|
2351
2356
|
let n = t.getParent(), r = e.trim();
|
|
2352
2357
|
n && r && (n.sqref = r);
|
|
2353
2358
|
})), L.set("dataBar", {
|
|
@@ -2369,8 +2374,8 @@ var ir = {
|
|
|
2369
2374
|
e.getParent().iconSet = e.getSource();
|
|
2370
2375
|
}
|
|
2371
2376
|
});
|
|
2372
|
-
let
|
|
2373
|
-
|
|
2377
|
+
let Ae = /* @__PURE__ */ new Map();
|
|
2378
|
+
Ae.set("f", F("f", (e, t) => {
|
|
2374
2379
|
let n = t.getParent();
|
|
2375
2380
|
if (!n) return;
|
|
2376
2381
|
let r = e.trim(), i = Number(r);
|
|
@@ -2378,14 +2383,14 @@ var ir = {
|
|
|
2378
2383
|
})), L.set("cfvo", {
|
|
2379
2384
|
from: "cfvo",
|
|
2380
2385
|
to: {},
|
|
2381
|
-
scope: () =>
|
|
2386
|
+
scope: () => Ae,
|
|
2382
2387
|
openTag: (e) => {
|
|
2383
2388
|
let t = e.getParent();
|
|
2384
2389
|
t.conditions ||= [];
|
|
2385
2390
|
let n = e.getSource();
|
|
2386
2391
|
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
2387
2392
|
}
|
|
2388
|
-
}), L.set("f",
|
|
2393
|
+
}), L.set("f", F("f", (e, t) => {
|
|
2389
2394
|
let n = t.getParent();
|
|
2390
2395
|
n && (n.formulas ??= []).push(_(e));
|
|
2391
2396
|
})), L.set("dxf", {
|
|
@@ -2400,15 +2405,15 @@ var ir = {
|
|
|
2400
2405
|
n && (t.style = n);
|
|
2401
2406
|
}
|
|
2402
2407
|
});
|
|
2403
|
-
let
|
|
2408
|
+
let Ne = (e) => ({
|
|
2404
2409
|
from: e,
|
|
2405
2410
|
to: {},
|
|
2406
2411
|
openTag: (t) => {
|
|
2407
|
-
let n =
|
|
2412
|
+
let n = ge((e) => t.getAttribute(e));
|
|
2408
2413
|
n && (t.getParent()[e] = n);
|
|
2409
2414
|
}
|
|
2410
2415
|
});
|
|
2411
|
-
L.set("borderColor",
|
|
2416
|
+
L.set("borderColor", Ne("borderColor")), L.set("negativeFillColor", Ne("negativeFillColor")), L.set("negativeBorderColor", Ne("negativeBorderColor")), L.set("axisColor", Ne("axisColor")), L.set("cfIcon", {
|
|
2412
2417
|
from: "cfIcon",
|
|
2413
2418
|
to: {},
|
|
2414
2419
|
openTag: (e) => {
|
|
@@ -2421,23 +2426,23 @@ var ir = {
|
|
|
2421
2426
|
});
|
|
2422
2427
|
}
|
|
2423
2428
|
});
|
|
2424
|
-
let
|
|
2425
|
-
|
|
2429
|
+
let Pe = /* @__PURE__ */ new Map();
|
|
2430
|
+
Pe.set("id", F("id", (e, t) => {
|
|
2426
2431
|
let n = t.getParent(), r = e.trim();
|
|
2427
2432
|
n && r && (n.x14Id = r);
|
|
2428
2433
|
}));
|
|
2429
|
-
let
|
|
2430
|
-
|
|
2434
|
+
let Ie = /* @__PURE__ */ new Map();
|
|
2435
|
+
Ie.set("slicerList", {
|
|
2431
2436
|
from: "slicerList",
|
|
2432
2437
|
transparent: !0
|
|
2433
|
-
}),
|
|
2434
|
-
let
|
|
2435
|
-
|
|
2438
|
+
}), Ie.set("slicer", _e);
|
|
2439
|
+
let Le = /* @__PURE__ */ new Map();
|
|
2440
|
+
Le.set("timelineRefs", {
|
|
2436
2441
|
from: "timelineRefs",
|
|
2437
2442
|
transparent: !0
|
|
2438
|
-
}),
|
|
2439
|
-
let
|
|
2440
|
-
|
|
2443
|
+
}), Le.set("timelineRef", be);
|
|
2444
|
+
let R = /* @__PURE__ */ new Map();
|
|
2445
|
+
R.set("sparklineGroups", {
|
|
2441
2446
|
from: "sparklineGroups",
|
|
2442
2447
|
to: "sparklineGroups",
|
|
2443
2448
|
openTag: (e) => {
|
|
@@ -2447,7 +2452,7 @@ var ir = {
|
|
|
2447
2452
|
closeTag: (e) => {
|
|
2448
2453
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2449
2454
|
}
|
|
2450
|
-
}),
|
|
2455
|
+
}), R.set("sparklineGroup", {
|
|
2451
2456
|
from: "sparklineGroup",
|
|
2452
2457
|
to: [],
|
|
2453
2458
|
openTag: (e) => {
|
|
@@ -2462,29 +2467,29 @@ var ir = {
|
|
|
2462
2467
|
});
|
|
2463
2468
|
},
|
|
2464
2469
|
closeTag: (e) => {
|
|
2465
|
-
let t = e.getSource(), n =
|
|
2470
|
+
let t = e.getSource(), n = De(t.properties, t.entries);
|
|
2466
2471
|
n || e.warn("A sparkline group with no sparklines was dropped.", { onceKey: "xlsx.sheet.sparklineGroup.empty" }), e.setSource(n ?? void 0);
|
|
2467
2472
|
}
|
|
2468
2473
|
});
|
|
2469
|
-
for (let e of
|
|
2474
|
+
for (let e of ue) R.set(e, {
|
|
2470
2475
|
from: e,
|
|
2471
2476
|
to: {},
|
|
2472
2477
|
openTag: (t) => {
|
|
2473
|
-
let n =
|
|
2478
|
+
let n = ge((e) => t.getAttribute(e));
|
|
2474
2479
|
n && (t.getParent().properties[e] = n);
|
|
2475
2480
|
}
|
|
2476
2481
|
});
|
|
2477
|
-
|
|
2482
|
+
R.set("sparklines", {
|
|
2478
2483
|
from: "sparklines",
|
|
2479
2484
|
transparent: !0
|
|
2480
|
-
}),
|
|
2485
|
+
}), R.set("sparkline", {
|
|
2481
2486
|
from: "sparkline",
|
|
2482
2487
|
to: {},
|
|
2483
2488
|
openTag: (e) => {
|
|
2484
2489
|
e.setSource({ isSparkline: !0 });
|
|
2485
2490
|
},
|
|
2486
2491
|
closeTag: (e) => {
|
|
2487
|
-
let t = e.getSource(), n = e.getParent(), r = t?.sqref?.trim(), i = r ?
|
|
2492
|
+
let t = e.getSource(), n = e.getParent(), r = t?.sqref?.trim(), i = r ? W.fastStringToRange(r.split(/\s+/)[0]) : null;
|
|
2488
2493
|
i ? n.entries.push({
|
|
2489
2494
|
location: {
|
|
2490
2495
|
rowIndex: i.rowStart,
|
|
@@ -2493,24 +2498,24 @@ var ir = {
|
|
|
2493
2498
|
data: t.data ?? ""
|
|
2494
2499
|
}) : e.warn("A sparkline with no location was dropped.", { onceKey: "xlsx.sheet.sparkline.incomplete" });
|
|
2495
2500
|
}
|
|
2496
|
-
}),
|
|
2501
|
+
}), R.set("f", F("f", (e, t) => {
|
|
2497
2502
|
let n = t.getParent(), r = e.trim();
|
|
2498
2503
|
n && r && (n.isSparkline ? n.data = r : n.properties.dateRange = r);
|
|
2499
|
-
})),
|
|
2504
|
+
})), R.set("sqref", F("sqref", (e, t) => {
|
|
2500
2505
|
let n = t.getParent();
|
|
2501
2506
|
n?.isSparkline && (n.sqref = e);
|
|
2502
2507
|
}));
|
|
2503
|
-
let
|
|
2504
|
-
[o(je),
|
|
2505
|
-
[o(Fe),
|
|
2506
|
-
[o(
|
|
2508
|
+
let Re = /* @__PURE__ */ new Map([
|
|
2509
|
+
[o(je), R],
|
|
2510
|
+
[o(Fe), I],
|
|
2511
|
+
[o(he), L],
|
|
2507
2512
|
[o(Oe), L],
|
|
2508
|
-
[o(
|
|
2509
|
-
[o(
|
|
2510
|
-
[o(
|
|
2511
|
-
[o(
|
|
2512
|
-
[o(
|
|
2513
|
-
]),
|
|
2513
|
+
[o(N), Pe],
|
|
2514
|
+
[o(k), Ie],
|
|
2515
|
+
[o(ve), Ie],
|
|
2516
|
+
[o(j), Le],
|
|
2517
|
+
[o(E), ae]
|
|
2518
|
+
]), z = /* @__PURE__ */ new Set();
|
|
2514
2519
|
d.registerVisitor({
|
|
2515
2520
|
from: "extLst",
|
|
2516
2521
|
transparent: !0
|
|
@@ -2518,10 +2523,10 @@ var ir = {
|
|
|
2518
2523
|
from: "ext",
|
|
2519
2524
|
transparent: !0,
|
|
2520
2525
|
scope: (e) => {
|
|
2521
|
-
let t = e.getAttribute("uri"), n = o(t), r =
|
|
2526
|
+
let t = e.getAttribute("uri"), n = o(t), r = Re.get(n);
|
|
2522
2527
|
if (r) return r;
|
|
2523
|
-
if (!
|
|
2524
|
-
|
|
2528
|
+
if (!T.has(n) && !z.has(n)) {
|
|
2529
|
+
z.add(n);
|
|
2525
2530
|
let r = Be[n];
|
|
2526
2531
|
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.`);
|
|
2527
2532
|
}
|
|
@@ -2580,19 +2585,19 @@ var ir = {
|
|
|
2580
2585
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2581
2586
|
}
|
|
2582
2587
|
});
|
|
2583
|
-
let
|
|
2588
|
+
let B = null, Ve = !1, H = /* @__PURE__ */ new Map(), U = {
|
|
2584
2589
|
from: "Fallback",
|
|
2585
2590
|
to: null
|
|
2586
|
-
},
|
|
2591
|
+
}, He = {
|
|
2587
2592
|
from: "Choice",
|
|
2588
2593
|
transparent: !0
|
|
2589
2594
|
};
|
|
2590
|
-
|
|
2595
|
+
H.set("Fallback", U), H.set("Choice", He), H.set("control", {
|
|
2591
2596
|
from: "control",
|
|
2592
2597
|
transparent: !0,
|
|
2593
2598
|
openTag: (e) => {
|
|
2594
2599
|
let n = e.getAttribute("name"), r = e.getAttribute("r:id"), i = r ? t(r, "formControl") : null;
|
|
2595
|
-
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (
|
|
2600
|
+
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (B = null);
|
|
2596
2601
|
let a = i.json, o = parseInt(e.getAttribute("shapeId") ?? "", 10);
|
|
2597
2602
|
isNaN(o) || (a.shapeId = o);
|
|
2598
2603
|
let s = {
|
|
@@ -2615,29 +2620,29 @@ var ir = {
|
|
|
2615
2620
|
json: a
|
|
2616
2621
|
}
|
|
2617
2622
|
};
|
|
2618
|
-
n && (s.content.name = n),
|
|
2623
|
+
n && (s.content.name = n), B = {
|
|
2619
2624
|
movable: s,
|
|
2620
2625
|
control: a
|
|
2621
2626
|
};
|
|
2622
2627
|
},
|
|
2623
2628
|
closeTag: () => {
|
|
2624
|
-
|
|
2629
|
+
B &&= (e.movables ||= [], e.movables.push(B.movable), null);
|
|
2625
2630
|
}
|
|
2626
|
-
}),
|
|
2631
|
+
}), H.set("controlPr", {
|
|
2627
2632
|
from: "controlPr",
|
|
2628
2633
|
transparent: !0,
|
|
2629
2634
|
raw: !0,
|
|
2630
2635
|
openTag: (e) => {
|
|
2631
|
-
if (!
|
|
2636
|
+
if (!B) return;
|
|
2632
2637
|
let t = e.getFrom().attributes ?? {}, n = {};
|
|
2633
2638
|
for (let e in t) {
|
|
2634
2639
|
let r = t[e];
|
|
2635
2640
|
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2636
2641
|
}
|
|
2637
|
-
|
|
2642
|
+
fe(n, B.control);
|
|
2638
2643
|
},
|
|
2639
2644
|
closeTag: (e) => {
|
|
2640
|
-
if (!
|
|
2645
|
+
if (!B) return;
|
|
2641
2646
|
let t = ((e) => {
|
|
2642
2647
|
let t = /<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);
|
|
2643
2648
|
if (!t) return null;
|
|
@@ -2651,19 +2656,19 @@ var ir = {
|
|
|
2651
2656
|
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2652
2657
|
};
|
|
2653
2658
|
})(e.getRawXml() ?? "");
|
|
2654
|
-
t ? (
|
|
2659
|
+
t ? (B.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (B.movable.anchorType = t.anchorType), t.rest && (B.control.xml = t.rest)) : Ve || (Ve = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2655
2660
|
}
|
|
2656
2661
|
});
|
|
2657
|
-
let
|
|
2662
|
+
let Ue = {
|
|
2658
2663
|
from: "controls",
|
|
2659
2664
|
transparent: !0,
|
|
2660
|
-
scope: () =>
|
|
2665
|
+
scope: () => H
|
|
2661
2666
|
};
|
|
2662
|
-
d.registerVisitor(
|
|
2667
|
+
d.registerVisitor(Ue);
|
|
2663
2668
|
let We = /* @__PURE__ */ new Map([
|
|
2664
|
-
["Choice",
|
|
2665
|
-
["Fallback",
|
|
2666
|
-
["controls",
|
|
2669
|
+
["Choice", He],
|
|
2670
|
+
["Fallback", U],
|
|
2671
|
+
["controls", Ue]
|
|
2667
2672
|
]);
|
|
2668
2673
|
d.registerVisitor({
|
|
2669
2674
|
from: "AlternateContent",
|
|
@@ -2686,16 +2691,16 @@ var ir = {
|
|
|
2686
2691
|
}
|
|
2687
2692
|
});
|
|
2688
2693
|
let Ge = (e, t) => {
|
|
2689
|
-
t.conditions?.length && (e
|
|
2694
|
+
t.conditions?.length && x(e, S(t)), te(e, t), !1 === t.gradient ? e.solidFill = !0 : delete e.solidFill, 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);
|
|
2690
2695
|
}, Ke = (e, t) => {
|
|
2691
|
-
t.conditions?.length && (e.stops =
|
|
2696
|
+
t.conditions?.length && (e.stops = S(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);
|
|
2692
2697
|
}, qe = (e) => {
|
|
2693
2698
|
if (!e.sqref) return null;
|
|
2694
2699
|
let t = e.sqref.split(/\s+/).join(",");
|
|
2695
2700
|
if (e.type === "iconSet") {
|
|
2696
2701
|
if (!e.iconSet) return null;
|
|
2697
2702
|
let n = {
|
|
2698
|
-
type:
|
|
2703
|
+
type: et.ScaleType.IconSet,
|
|
2699
2704
|
stops: []
|
|
2700
2705
|
};
|
|
2701
2706
|
return Ke(n, e.iconSet), {
|
|
@@ -2704,7 +2709,7 @@ var ir = {
|
|
|
2704
2709
|
priority: e.priority
|
|
2705
2710
|
};
|
|
2706
2711
|
}
|
|
2707
|
-
let n =
|
|
2712
|
+
let n = D(e, s);
|
|
2708
2713
|
if (!n) return null;
|
|
2709
2714
|
let r = { condition: n };
|
|
2710
2715
|
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
@@ -2723,13 +2728,13 @@ var ir = {
|
|
|
2723
2728
|
let t = n[e], r = t.x14Id;
|
|
2724
2729
|
if (!r) continue;
|
|
2725
2730
|
delete t.x14Id;
|
|
2726
|
-
let i =
|
|
2731
|
+
let i = Te.get(r);
|
|
2727
2732
|
if (!i) continue;
|
|
2728
|
-
|
|
2733
|
+
Te.delete(r);
|
|
2729
2734
|
let a = t.v?.scale;
|
|
2730
|
-
i.dataBar && a?.type ===
|
|
2735
|
+
i.dataBar && a?.type === et.ScaleType.DataBar ? Ge(a, i.dataBar) : i.iconSet && a?.type === et.ScaleType.IconSet && Ke(a, i.iconSet);
|
|
2731
2736
|
}
|
|
2732
|
-
let r = [...
|
|
2737
|
+
let r = [...Te.values(), ...Ee], i = /* @__PURE__ */ new Set(), a = 0;
|
|
2733
2738
|
for (let e = 0; e < r.length; e++) {
|
|
2734
2739
|
let o = qe(r[e]);
|
|
2735
2740
|
o ? (n || (n = [], t.conditionals = n), n.push(o)) : (i.add(r[e].type ?? "unknown"), a++);
|
|
@@ -2769,7 +2774,7 @@ var ir = {
|
|
|
2769
2774
|
to: "protection",
|
|
2770
2775
|
openTag: (e) => {
|
|
2771
2776
|
let t = e.getSource();
|
|
2772
|
-
for (let n of
|
|
2777
|
+
for (let n of me) {
|
|
2773
2778
|
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2774
2779
|
t[n.key] = ze(n, r);
|
|
2775
2780
|
}
|
|
@@ -2822,7 +2827,7 @@ var ir = {
|
|
|
2822
2827
|
to: [],
|
|
2823
2828
|
openTag: (e) => {
|
|
2824
2829
|
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;
|
|
2825
|
-
t.r =
|
|
2830
|
+
t.r = W.runToString(i, a, !0);
|
|
2826
2831
|
let o = {};
|
|
2827
2832
|
t.v = o, e.copyToObject(o, "sz", Pn, "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");
|
|
2828
2833
|
}
|
|
@@ -2833,26 +2838,26 @@ var ir = {
|
|
|
2833
2838
|
e.warn("'OLE Objects' are not supported.");
|
|
2834
2839
|
}
|
|
2835
2840
|
});
|
|
2836
|
-
let Je = !1, Ye = !1, Xe = 0, Ze = "", Qe = "",
|
|
2841
|
+
let Je = !1, Ye = !1, Xe = 0, Ze = "", Qe = "", G = (e) => {
|
|
2837
2842
|
let t = e.indexOf(":");
|
|
2838
2843
|
return t === -1 ? e : e.slice(t + 1);
|
|
2839
|
-
},
|
|
2844
|
+
}, tt = new nr();
|
|
2840
2845
|
return vr(y, e, d.createEventHandler(e, a, s), s, c, {
|
|
2841
2846
|
onOpenTag: (e) => {
|
|
2842
2847
|
Je = !0;
|
|
2843
|
-
let t =
|
|
2844
|
-
t === "t" || t === "v" ? Xe === 0 && (Ye = !0) : t === "rPh" || t === "phoneticPr" ? Xe++ : Xe === 0 &&
|
|
2848
|
+
let t = G(e.name);
|
|
2849
|
+
t === "t" || t === "v" ? Xe === 0 && (Ye = !0) : t === "rPh" || t === "phoneticPr" ? Xe++ : Xe === 0 && tt.onOpenTag(t, e.attributes);
|
|
2845
2850
|
},
|
|
2846
2851
|
onText: (e) => {
|
|
2847
|
-
Ye && (Ze += e,
|
|
2852
|
+
Ye && (Ze += e, tt.onText(e));
|
|
2848
2853
|
},
|
|
2849
2854
|
onCloseTag: (e) => {
|
|
2850
|
-
let t =
|
|
2851
|
-
t === "t" || t === "v" ? Ye = !1 : t === "rPh" || t === "phoneticPr" ? Xe > 0 && Xe-- :
|
|
2855
|
+
let t = G(e.name);
|
|
2856
|
+
t === "t" || t === "v" ? Ye = !1 : t === "rPh" || t === "phoneticPr" ? Xe > 0 && Xe-- : tt.onCloseTag(t);
|
|
2852
2857
|
},
|
|
2853
2858
|
onEnd: () => {
|
|
2854
2859
|
if (!Je) return;
|
|
2855
|
-
let e =
|
|
2860
|
+
let e = tt.take();
|
|
2856
2861
|
Je = !1, Ye = !1, Xe = 0;
|
|
2857
2862
|
let t = f(Ze);
|
|
2858
2863
|
return Ze = "", Qe = t, e ? {
|
|
@@ -2904,25 +2909,25 @@ var ir = {
|
|
|
2904
2909
|
rowStart: 0,
|
|
2905
2910
|
rowEnd: 0
|
|
2906
2911
|
}, _r = (e) => e === "1" || e === "true", vr = (e, t, n, r, i, a, o, s, c, l) => {
|
|
2907
|
-
let u = !1, d = [], f = o?.get(ur), m = o?.get(dr), h = /* @__PURE__ */ new Map(), g = !1, _ = [], v = !1, y = null, b = null, ee = null, x = null,
|
|
2912
|
+
let u = !1, d = [], f = o?.get(ur), m = o?.get(dr), h = /* @__PURE__ */ new Map(), g = !1, _ = [], v = !1, y = null, b = null, ee = null, x = null, S = null, ne = null, re = o?.get("richData") ?? qe.EmptyArray, ie = null, ae = !1, oe = W.normalizeA1ToR1C1, se = Je.createConflatingRanges(), ce = /* @__PURE__ */ new Map(), le = [], C = [], w = !1, ue = !1, de = null, fe = (e) => {
|
|
2908
2913
|
let t = o?.get("metadata")?.values;
|
|
2909
2914
|
if (!t) return;
|
|
2910
2915
|
let n = parseInt(e, 10);
|
|
2911
2916
|
if (!Number.isFinite(n) || n < 1) return;
|
|
2912
2917
|
let r = t[n - 1]?.get("XLRICHVALUE");
|
|
2913
|
-
return r?.richValueIndex === void 0 ? void 0 :
|
|
2914
|
-
},
|
|
2918
|
+
return r?.richValueIndex === void 0 ? void 0 : re[r.richValueIndex];
|
|
2919
|
+
}, pe = !1, me = Je.createConflatingRanges(), he, T = !1, E = -1, D = -1, O = null, k = null, ge = (e) => ({
|
|
2915
2920
|
t: "r",
|
|
2916
2921
|
v: {
|
|
2917
2922
|
type: "hyperlink",
|
|
2918
2923
|
data: {
|
|
2919
|
-
address:
|
|
2924
|
+
address: he,
|
|
2920
2925
|
friendly: e
|
|
2921
2926
|
}
|
|
2922
2927
|
}
|
|
2923
|
-
}),
|
|
2928
|
+
}), _e = null, A = [], ve = null, ye = -2, j = 0, M = "", be = "", N = "", P = "", F = "", xe = "", I = "", Se = "", Ce = "", we = "", Te = "", Ee = "", De = "", L = "", Oe = !0, ke = null, Ae = !1, je = !1, Me = !1, Ne = null, Pe = 0, Fe = (e) => {
|
|
2924
2929
|
let r = e.name, s = r.indexOf(":");
|
|
2925
|
-
if (s !== -1 && (r = r.slice(s + 1)), Pe++, Pe % 196608 == 0 && i?.(Pe),
|
|
2930
|
+
if (s !== -1 && (r = r.slice(s + 1)), Pe++, Pe % 196608 == 0 && i?.(Pe), k) {
|
|
2926
2931
|
let t = e.attributes;
|
|
2927
2932
|
switch (r) {
|
|
2928
2933
|
case "v":
|
|
@@ -2937,16 +2942,16 @@ var ir = {
|
|
|
2937
2942
|
b = t.ref, y = e;
|
|
2938
2943
|
break;
|
|
2939
2944
|
case "array":
|
|
2940
|
-
b = t.ref,
|
|
2945
|
+
b = t.ref, de = b;
|
|
2941
2946
|
break;
|
|
2942
2947
|
case "dataTable": {
|
|
2943
2948
|
let e = ((e, t, n) => {
|
|
2944
2949
|
let r = e.r1, i = _r(e.del1);
|
|
2945
2950
|
if (!r && !i) return null;
|
|
2946
|
-
let a = e.ref ??
|
|
2951
|
+
let a = e.ref ?? W.cellToString({
|
|
2947
2952
|
rowIndex: t,
|
|
2948
2953
|
colIndex: n
|
|
2949
|
-
}), o =
|
|
2954
|
+
}), o = W.fastStringToRange(a);
|
|
2950
2955
|
if (!o) return null;
|
|
2951
2956
|
let s = { ref: {
|
|
2952
2957
|
rowStart: o.rowStart,
|
|
@@ -2959,36 +2964,36 @@ var ir = {
|
|
|
2959
2964
|
t && (s.columnInput = t), _r(e.del2) && (s.columnInputDeleted = !0);
|
|
2960
2965
|
}
|
|
2961
2966
|
return s;
|
|
2962
|
-
})(t,
|
|
2963
|
-
e && (
|
|
2967
|
+
})(t, E, D);
|
|
2968
|
+
e && (C.push(e), _r(t.ca) && me.append(E, D));
|
|
2964
2969
|
return;
|
|
2965
2970
|
}
|
|
2966
2971
|
}
|
|
2967
2972
|
let e = t.ca;
|
|
2968
|
-
e !== void 0 && (
|
|
2973
|
+
e !== void 0 && (pe = e === "1");
|
|
2969
2974
|
break;
|
|
2970
2975
|
case "is":
|
|
2971
|
-
|
|
2976
|
+
T = !0;
|
|
2972
2977
|
return;
|
|
2973
2978
|
}
|
|
2974
|
-
|
|
2979
|
+
T && !v && a?.onOpenTag?.(e);
|
|
2975
2980
|
} else if (u) {
|
|
2976
2981
|
if (r === "c") {
|
|
2977
|
-
|
|
2982
|
+
k = e, he = void 0;
|
|
2978
2983
|
let t = e.attributes, n = t.r;
|
|
2979
|
-
|
|
2984
|
+
D = n === void 0 ? D + 1 : W.fastStringToCol(n);
|
|
2980
2985
|
let r = t.t;
|
|
2981
|
-
r === void 0 ?
|
|
2986
|
+
r === void 0 ? _e = null : (_e = r, _e === "str" && (T = !0));
|
|
2982
2987
|
let i = t.s;
|
|
2983
|
-
i === void 0 && (Ne !== null || Me) && (i = "0"), i !== void 0 && (i = parseInt(i), ke && ke.value === i && ke.colEnd + 1 ===
|
|
2984
|
-
colStart:
|
|
2985
|
-
rowStart:
|
|
2986
|
-
colEnd:
|
|
2987
|
-
rowEnd:
|
|
2988
|
+
i === void 0 && (Ne !== null || Me) && (i = "0"), i !== void 0 && (i = parseInt(i), ke && ke.value === i && ke.colEnd + 1 === D ? ke.colEnd = D : (ke = {
|
|
2989
|
+
colStart: D,
|
|
2990
|
+
rowStart: E,
|
|
2991
|
+
colEnd: D,
|
|
2992
|
+
rowEnd: E,
|
|
2988
2993
|
value: i
|
|
2989
|
-
}, _.push(ke))),
|
|
2994
|
+
}, _.push(ke))), de = null, ue = !1, ae = !1;
|
|
2990
2995
|
let a = t.cm;
|
|
2991
|
-
|
|
2996
|
+
w = a !== void 0 && ((e) => {
|
|
2992
2997
|
let t = o?.get("metadata")?.cells;
|
|
2993
2998
|
if (!t) return !1;
|
|
2994
2999
|
let n = parseInt(e, 10);
|
|
@@ -2996,13 +3001,13 @@ var ir = {
|
|
|
2996
3001
|
})(a);
|
|
2997
3002
|
let s = t.vm;
|
|
2998
3003
|
if (s !== void 0) {
|
|
2999
|
-
let e =
|
|
3000
|
-
if (
|
|
3004
|
+
let e = fe(s);
|
|
3005
|
+
if (Ye.isError(e)) {
|
|
3001
3006
|
let t = e.getCode();
|
|
3002
|
-
|
|
3007
|
+
O = {
|
|
3003
3008
|
t: "e",
|
|
3004
3009
|
v: t
|
|
3005
|
-
},
|
|
3010
|
+
}, w && t === Ye.Code.Spill && (ue = !0);
|
|
3006
3011
|
}
|
|
3007
3012
|
}
|
|
3008
3013
|
}
|
|
@@ -3010,31 +3015,31 @@ var ir = {
|
|
|
3010
3015
|
if (je && r === "row") {
|
|
3011
3016
|
u = !0;
|
|
3012
3017
|
let t = e.attributes.r;
|
|
3013
|
-
if (
|
|
3018
|
+
if (E = t === void 0 ? E + 1 : parseInt(t) - 1, D = -1, c?.()) {
|
|
3014
3019
|
let e = d[d.length - 1];
|
|
3015
|
-
e && e.max + 1 ===
|
|
3016
|
-
min:
|
|
3017
|
-
max:
|
|
3020
|
+
e && e.max + 1 === E ? e.max = E : d.push({
|
|
3021
|
+
min: E,
|
|
3022
|
+
max: E
|
|
3018
3023
|
});
|
|
3019
3024
|
}
|
|
3020
|
-
if (
|
|
3021
|
-
if (
|
|
3022
|
-
let e =
|
|
3023
|
-
Ne = t &&
|
|
3024
|
-
min:
|
|
3025
|
-
max:
|
|
3025
|
+
if (j = 0, be = e.attributes.customHeight, be !== void 0 && (j |= pr.CustomHeight), be !== Ce && (Oe = !0, Ce = be), M = e.attributes.ht, M !== void 0 && (j |= pr.Ht), M !== Se && (Oe = !0, Se = M), N = e.attributes.hidden, N !== void 0 && (j |= pr.Hidden), N !== we && (Oe = !0, we = N), F = e.attributes.s, F !== void 0 && (j |= pr.S), F !== Ee && (Oe = !0, Ee = F), P = e.attributes.customFormat, P !== void 0 && (j |= pr.CustomFormat), P !== Te && (Oe = !0, Te = P), xe = e.attributes.outlineLevel, xe !== void 0 && (j |= pr.OutlineLevel), xe !== De && (Oe = !0, De = xe), I = e.attributes.collapsed, I !== void 0 && (j |= pr.Collapsed), I !== L && (Oe = !0, L = I), j !== 0) {
|
|
3026
|
+
if (ye + 1 !== E || Oe) {
|
|
3027
|
+
let e = be !== void 0 && (be === "1" || be === "true"), t = P !== void 0 && (P === "1" || P === "true");
|
|
3028
|
+
Ne = t && F !== void 0 ? F : null, t && Ne === null && (Ne = "0"), ve = {
|
|
3029
|
+
min: E,
|
|
3030
|
+
max: E,
|
|
3026
3031
|
value: {
|
|
3027
|
-
sz:
|
|
3032
|
+
sz: M === void 0 ? -1 : parseFloat(M),
|
|
3028
3033
|
csz: e,
|
|
3029
|
-
h:
|
|
3034
|
+
h: N !== void 0 && (N === "1" || N === "true"),
|
|
3030
3035
|
s: Ne === null ? void 0 : Ne === "0" ? 0 : parseInt(Ne),
|
|
3031
|
-
l:
|
|
3032
|
-
cl:
|
|
3036
|
+
l: xe === void 0 || xe === "0" ? 0 : parseInt(xe),
|
|
3037
|
+
cl: I !== void 0 && (I === "1" || I === "true")
|
|
3033
3038
|
}
|
|
3034
|
-
},
|
|
3035
|
-
} else
|
|
3039
|
+
}, A.push(ve);
|
|
3040
|
+
} else ve.max = E;
|
|
3036
3041
|
}
|
|
3037
|
-
|
|
3042
|
+
ye = E, Oe = !1;
|
|
3038
3043
|
return;
|
|
3039
3044
|
}
|
|
3040
3045
|
if (r === "sheetData" && (je = !0), !Ae && r === "sheetData") {
|
|
@@ -3046,7 +3051,7 @@ var ir = {
|
|
|
3046
3051
|
}
|
|
3047
3052
|
}, Ie = (t) => {
|
|
3048
3053
|
let r = t.name;
|
|
3049
|
-
if (r === "sheetData" && (je = !1), !v || r !== "c" && r !== "f" || (y && (x =
|
|
3054
|
+
if (r === "sheetData" && (je = !1), !v || r !== "c" && r !== "f" || (y && (x = ce.get(y) ?? null), x && (he = ((e) => {
|
|
3050
3055
|
if (e.length < 11 || (32 | e.charCodeAt(0)) != 104 || !/^HYPERLINK\(/i.test(e)) return;
|
|
3051
3056
|
let t = 1, n = !1, r = 10;
|
|
3052
3057
|
for (; r < e.length && t > 0; r++) {
|
|
@@ -3056,15 +3061,15 @@ var ir = {
|
|
|
3056
3061
|
if (t !== 0 || e.slice(r).trim().length > 0) return;
|
|
3057
3062
|
let i = /^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(e);
|
|
3058
3063
|
return i ? i[1].replace(/""/g, "\"") : null;
|
|
3059
|
-
})(x[2]),
|
|
3064
|
+
})(x[2]), se.append(E, D, x), pe && me.append(E, D)), de !== null && le.push([de, w ? ue ? "error" : "dynamic" : "fixed"]), v = !1, x = null, y = null, b = null, g = !1, pe = !1, de = null, w = !1, ue = !1), k) {
|
|
3060
3065
|
let n = r.indexOf(":");
|
|
3061
|
-
if (n !== -1 && (r = r.slice(n + 1)),
|
|
3066
|
+
if (n !== -1 && (r = r.slice(n + 1)), T) {
|
|
3062
3067
|
if (r === "is" || r === "v") {
|
|
3063
3068
|
let t = a?.onEnd?.();
|
|
3064
|
-
t == null ||
|
|
3069
|
+
t == null || ae && l?.() === "" || e.pushAt(E, D, he !== void 0 && typeof t == "number" ? ge(l?.() ?? "") : typeof t == "number" ? "" + t : t);
|
|
3065
3070
|
} else r !== "f" && a?.onCloseTag?.(t);
|
|
3066
3071
|
}
|
|
3067
|
-
g &&= !1, r === "c" && (
|
|
3072
|
+
g &&= !1, r === "c" && (k = null, T = !1);
|
|
3068
3073
|
} else {
|
|
3069
3074
|
if (u) return u = !1, void (ke = null);
|
|
3070
3075
|
n?.onCloseTag?.(t);
|
|
@@ -3072,13 +3077,13 @@ var ir = {
|
|
|
3072
3077
|
}, Le = (t) => {
|
|
3073
3078
|
let i = t.trim();
|
|
3074
3079
|
if (g) {
|
|
3075
|
-
switch (
|
|
3080
|
+
switch (O = null, _e) {
|
|
3076
3081
|
case null:
|
|
3077
3082
|
case "n":
|
|
3078
|
-
|
|
3083
|
+
O = lt.flushSubnormal(parseFloat(i));
|
|
3079
3084
|
break;
|
|
3080
3085
|
case "b":
|
|
3081
|
-
|
|
3086
|
+
O = i === "1" || i === "true";
|
|
3082
3087
|
break;
|
|
3083
3088
|
case "s": {
|
|
3084
3089
|
let e = parseInt(i, 10), t = h.get(e);
|
|
@@ -3086,7 +3091,7 @@ var ir = {
|
|
|
3086
3091
|
let n = f?.get(e);
|
|
3087
3092
|
t = n ? rr(n, m) : null, h.set(e, t);
|
|
3088
3093
|
}
|
|
3089
|
-
|
|
3094
|
+
O = t ? {
|
|
3090
3095
|
t: "r",
|
|
3091
3096
|
v: {
|
|
3092
3097
|
type: "richText",
|
|
@@ -3116,26 +3121,26 @@ var ir = {
|
|
|
3116
3121
|
}
|
|
3117
3122
|
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;
|
|
3118
3123
|
})(i, !0 === o?.get(lr));
|
|
3119
|
-
e === null ? s && (r?.(`Date '${i}' in cell ${
|
|
3120
|
-
colIndex:
|
|
3121
|
-
rowIndex:
|
|
3122
|
-
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"),
|
|
3124
|
+
e === null ? s && (r?.(`Date '${i}' in cell ${W.cellToString({
|
|
3125
|
+
colIndex: D,
|
|
3126
|
+
rowIndex: E
|
|
3127
|
+
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"), O = "" + s(i)) : O = e;
|
|
3123
3128
|
break;
|
|
3124
3129
|
}
|
|
3125
3130
|
case "e":
|
|
3126
3131
|
if (i === "#VALUE!") {
|
|
3127
|
-
let e =
|
|
3132
|
+
let e = k.attributes.vm;
|
|
3128
3133
|
if (e !== void 0) {
|
|
3129
|
-
let t =
|
|
3130
|
-
if (
|
|
3131
|
-
|
|
3134
|
+
let t = fe(e);
|
|
3135
|
+
if (Ye.isError(t)) {
|
|
3136
|
+
O = {
|
|
3132
3137
|
t: "e",
|
|
3133
3138
|
v: t.getCode()
|
|
3134
3139
|
};
|
|
3135
3140
|
break;
|
|
3136
3141
|
}
|
|
3137
|
-
if (
|
|
3138
|
-
|
|
3142
|
+
if (ct.isJSON(t)) {
|
|
3143
|
+
O = {
|
|
3139
3144
|
t: "r",
|
|
3140
3145
|
v: t
|
|
3141
3146
|
};
|
|
@@ -3143,33 +3148,33 @@ var ir = {
|
|
|
3143
3148
|
}
|
|
3144
3149
|
}
|
|
3145
3150
|
}
|
|
3146
|
-
let e =
|
|
3147
|
-
e ?
|
|
3151
|
+
let e = Ye.getBuiltInByLabel(i);
|
|
3152
|
+
e ? O = {
|
|
3148
3153
|
t: "e",
|
|
3149
3154
|
v: e.getCode()
|
|
3150
|
-
} : (
|
|
3151
|
-
colIndex:
|
|
3152
|
-
rowIndex:
|
|
3155
|
+
} : (O = i, r?.(`Unknown formula error '${i}' in cell ${W.cellToString({
|
|
3156
|
+
colIndex: D,
|
|
3157
|
+
rowIndex: E
|
|
3153
3158
|
})}`));
|
|
3154
3159
|
break;
|
|
3155
3160
|
case "str":
|
|
3156
|
-
case "inlineStr":
|
|
3161
|
+
case "inlineStr": T = !0;
|
|
3157
3162
|
}
|
|
3158
|
-
|
|
3163
|
+
O !== null && e.pushAt(E, D, he === void 0 || typeof O != "number" && typeof O != "boolean" ? O : ge(O));
|
|
3159
3164
|
}
|
|
3160
3165
|
let c = y !== null;
|
|
3161
3166
|
if (y) {
|
|
3162
|
-
if (
|
|
3167
|
+
if (S === y) x = ne;
|
|
3163
3168
|
else {
|
|
3164
|
-
if (x =
|
|
3169
|
+
if (x = ce.get(y) ?? null, !x) {
|
|
3165
3170
|
let e = [];
|
|
3166
|
-
ee =
|
|
3171
|
+
ee = oe(i, E, D, e), x = [
|
|
3167
3172
|
ee,
|
|
3168
3173
|
e,
|
|
3169
3174
|
i
|
|
3170
|
-
],
|
|
3175
|
+
], ce.set(y, x);
|
|
3171
3176
|
}
|
|
3172
|
-
|
|
3177
|
+
S = y, ne = x;
|
|
3173
3178
|
}
|
|
3174
3179
|
y = null;
|
|
3175
3180
|
}
|
|
@@ -3186,19 +3191,19 @@ var ir = {
|
|
|
3186
3191
|
formula: n
|
|
3187
3192
|
};
|
|
3188
3193
|
})(i);
|
|
3189
|
-
n.kind !== "none" && (
|
|
3194
|
+
n.kind !== "none" && (ie ??= new Gn(t), n.kind === "spilled" ? ae = ie.placeholder(E, D) : ie.anchor(E, D, n.formula) && (e = n.formula, pe ||= ((e) => Wn(e).some((e) => te(e) || !0 === Ze.get(e)?.getDeclaration().getReturnType()?.isVolatile()))(e)));
|
|
3190
3195
|
}
|
|
3191
|
-
if (
|
|
3196
|
+
if (ae) pe = !1;
|
|
3192
3197
|
else {
|
|
3193
3198
|
let t = [];
|
|
3194
|
-
ee =
|
|
3199
|
+
ee = oe(e, E, D, t), x = [
|
|
3195
3200
|
ee,
|
|
3196
3201
|
t,
|
|
3197
3202
|
e
|
|
3198
3203
|
];
|
|
3199
3204
|
}
|
|
3200
3205
|
}
|
|
3201
|
-
|
|
3206
|
+
T ? a?.onText?.(t) : u || n?.onText?.(i);
|
|
3202
3207
|
}, R = {
|
|
3203
3208
|
r: void 0,
|
|
3204
3209
|
t: void 0,
|
|
@@ -3218,11 +3223,11 @@ var ir = {
|
|
|
3218
3223
|
name: "f",
|
|
3219
3224
|
attributes: z,
|
|
3220
3225
|
isSelfClosing: !1
|
|
3221
|
-
},
|
|
3226
|
+
}, B = {
|
|
3222
3227
|
name: "v",
|
|
3223
3228
|
attributes: {},
|
|
3224
3229
|
isSelfClosing: !1
|
|
3225
|
-
},
|
|
3230
|
+
}, V = {
|
|
3226
3231
|
r: void 0,
|
|
3227
3232
|
s: void 0,
|
|
3228
3233
|
ht: void 0,
|
|
@@ -3231,47 +3236,47 @@ var ir = {
|
|
|
3231
3236
|
customHeight: void 0,
|
|
3232
3237
|
customFormat: void 0,
|
|
3233
3238
|
outlineLevel: void 0
|
|
3234
|
-
},
|
|
3239
|
+
}, Ve = {
|
|
3235
3240
|
name: "row",
|
|
3236
|
-
attributes:
|
|
3241
|
+
attributes: V,
|
|
3237
3242
|
isSelfClosing: !1
|
|
3238
|
-
},
|
|
3243
|
+
}, H = Nn.NEED_MORE, U = Nn.NOT_HANDLED, He = Nn.decodeText, Ue = !1, We = (e, t, n, r) => {
|
|
3239
3244
|
for (;;) {
|
|
3240
3245
|
let i = 0;
|
|
3241
3246
|
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
3242
|
-
if (t >= n) return
|
|
3243
|
-
if (i === 62) return
|
|
3244
|
-
if (i === 47) return t + 1 >= n ?
|
|
3247
|
+
if (t >= n) return H;
|
|
3248
|
+
if (i === 62) return Ue = !1, t + 1;
|
|
3249
|
+
if (i === 47) return t + 1 >= n ? H : e.charCodeAt(t + 1) === 62 ? (Ue = !0, t + 2) : U;
|
|
3245
3250
|
let a = t;
|
|
3246
3251
|
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
3247
|
-
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return
|
|
3252
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return U;
|
|
3248
3253
|
t++;
|
|
3249
3254
|
}
|
|
3250
|
-
if (t + 1 >= n) return
|
|
3255
|
+
if (t + 1 >= n) return H;
|
|
3251
3256
|
let o = t - a, s = e.charCodeAt(t + 1);
|
|
3252
|
-
if (s !== 34 && s !== 39) return
|
|
3257
|
+
if (s !== 34 && s !== 39) return U;
|
|
3253
3258
|
let c = t + 2, l = c;
|
|
3254
3259
|
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
3255
|
-
if (i === 38 || i < 32) return
|
|
3260
|
+
if (i === 38 || i < 32) return U;
|
|
3256
3261
|
l++;
|
|
3257
3262
|
}
|
|
3258
|
-
if (l >= n) return
|
|
3263
|
+
if (l >= n) return H;
|
|
3259
3264
|
t = l + 1;
|
|
3260
3265
|
let u = e.charCodeAt(a);
|
|
3261
3266
|
if (r === 2) switch (o) {
|
|
3262
3267
|
case 1:
|
|
3263
|
-
u === 114 ?
|
|
3268
|
+
u === 114 ? V.r = e.slice(c, l) : u === 115 && (V.s = e.slice(c, l));
|
|
3264
3269
|
break;
|
|
3265
3270
|
case 2:
|
|
3266
|
-
e.startsWith("ht", a) && (
|
|
3271
|
+
e.startsWith("ht", a) && (V.ht = e.slice(c, l));
|
|
3267
3272
|
break;
|
|
3268
3273
|
case 6:
|
|
3269
|
-
e.startsWith("hidden", a) && (
|
|
3274
|
+
e.startsWith("hidden", a) && (V.hidden = e.slice(c, l));
|
|
3270
3275
|
break;
|
|
3271
3276
|
case 9:
|
|
3272
|
-
e.startsWith("collapsed", a) && (
|
|
3277
|
+
e.startsWith("collapsed", a) && (V.collapsed = e.slice(c, l));
|
|
3273
3278
|
break;
|
|
3274
|
-
case 12: e.startsWith("customHeight", a) ?
|
|
3279
|
+
case 12: e.startsWith("customHeight", a) ? V.customHeight = e.slice(c, l) : e.startsWith("customFormat", a) ? V.customFormat = e.slice(c, l) : e.startsWith("outlineLevel", a) && (V.outlineLevel = e.slice(c, l));
|
|
3275
3280
|
}
|
|
3276
3281
|
else if (r === 0) o === 1 ? u === 114 ? R.r = e.slice(c, l) : u === 116 ? R.t = e.slice(c, l) : u === 115 && (R.s = e.slice(c, l)) : o === 2 && e.charCodeAt(a + 1) === 109 && (u === 99 ? R.cm = e.slice(c, l) : u === 118 && (R.vm = e.slice(c, l)));
|
|
3277
3282
|
else if (o === 1) u === 116 && (z.t = e.slice(c, l));
|
|
@@ -3280,7 +3285,7 @@ var ir = {
|
|
|
3280
3285
|
u === 115 && t === 105 ? z.si = e.slice(c, l) : u === 99 && t === 97 && (z.ca = e.slice(c, l));
|
|
3281
3286
|
} else o === 3 && e.startsWith("ref", a) && (z.ref = e.slice(c, l));
|
|
3282
3287
|
}
|
|
3283
|
-
},
|
|
3288
|
+
}, Ge = (e, t, n) => e.charCodeAt(t + 1) === 47 && e.charCodeAt(t + 2) === n && e.charCodeAt(t + 3) === 62;
|
|
3284
3289
|
return {
|
|
3285
3290
|
...n,
|
|
3286
3291
|
onEnd: () => {
|
|
@@ -3298,10 +3303,10 @@ var ir = {
|
|
|
3298
3303
|
}
|
|
3299
3304
|
});
|
|
3300
3305
|
for (let r of d) r.min > e && t.push(n(e, r.min - 1)), e = Math.max(e, r.max + 1);
|
|
3301
|
-
e <= Re && t.push(n(e, Re)), t.length > 0 && (
|
|
3306
|
+
e <= Re && t.push(n(e, Re)), t.length > 0 && (A.push(...t), A.sort((e, t) => e.min - t.min));
|
|
3302
3307
|
}
|
|
3303
|
-
|
|
3304
|
-
let r =
|
|
3308
|
+
A.length > 0 && (t.rows = W.runsToRefs(A, !1));
|
|
3309
|
+
let r = se.done(mr);
|
|
3305
3310
|
r = ((e, t) => {
|
|
3306
3311
|
let n = null;
|
|
3307
3312
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -3325,50 +3330,50 @@ var ir = {
|
|
|
3325
3330
|
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);
|
|
3326
3331
|
}
|
|
3327
3332
|
if (a !== (i.rowEnd - i.rowStart + 1) * (i.colEnd - i.colStart + 1)) continue;
|
|
3328
|
-
let o = Xn(
|
|
3333
|
+
let o = Xn(W.resolveRelativeToA1(n.value[1], i.rowStart, i.colStart), i);
|
|
3329
3334
|
if (o) {
|
|
3330
3335
|
t.push(o);
|
|
3331
3336
|
for (let t = 0; t < e.length; t++) r.add(e[t]);
|
|
3332
3337
|
}
|
|
3333
3338
|
}
|
|
3334
3339
|
return r.size === 0 ? e : e.filter((e) => !r.has(e));
|
|
3335
|
-
})(r,
|
|
3340
|
+
})(r, C);
|
|
3336
3341
|
let i = r.length;
|
|
3337
|
-
if (i > 0 ||
|
|
3342
|
+
if (i > 0 || C.length > 0) {
|
|
3338
3343
|
let e = Array(i);
|
|
3339
3344
|
for (let t = 0; t < i; t++) {
|
|
3340
|
-
let n = r[t], i =
|
|
3345
|
+
let n = r[t], i = W.rangeToString(n), a = n.value[1], o = W.resolveRelativeToA1(a, n.rowStart, n.colStart);
|
|
3341
3346
|
e[t] = [i, o];
|
|
3342
3347
|
}
|
|
3343
|
-
for (let t = 0; t <
|
|
3344
|
-
let n =
|
|
3345
|
-
e.push([
|
|
3348
|
+
for (let t = 0; t < C.length; t++) {
|
|
3349
|
+
let n = C[t], r = n.ref;
|
|
3350
|
+
e.push([W.cellToString({
|
|
3346
3351
|
rowIndex: r.rowStart,
|
|
3347
3352
|
colIndex: r.colStart
|
|
3348
|
-
}), p(n)]),
|
|
3353
|
+
}), p(n)]), le.push([W.rangeToString(r), "dynamic"]);
|
|
3349
3354
|
}
|
|
3350
3355
|
t.formulas = e;
|
|
3351
3356
|
}
|
|
3352
|
-
let a =
|
|
3357
|
+
let a = me.done(!0), o = a.length;
|
|
3353
3358
|
if (o > 0) {
|
|
3354
3359
|
let e = Array(o);
|
|
3355
3360
|
for (let t = 0; t < o; t++) {
|
|
3356
|
-
let n = a[t], r =
|
|
3361
|
+
let n = a[t], r = W.rangeToString(n);
|
|
3357
3362
|
e[t] = r;
|
|
3358
3363
|
}
|
|
3359
3364
|
t.volatile = e;
|
|
3360
3365
|
}
|
|
3361
|
-
|
|
3366
|
+
ie && le.push(...ie.getFormulaArray()), le.length > 0 && (t.formulaArray = [...le]);
|
|
3362
3367
|
let s = _.length;
|
|
3363
3368
|
if (s > 0) {
|
|
3364
|
-
_.sort(
|
|
3369
|
+
_.sort(Je.createRangeComparator(nt.Axis.Column));
|
|
3365
3370
|
let e = _[0], n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value, o = [];
|
|
3366
3371
|
o.push(e);
|
|
3367
3372
|
let c = null;
|
|
3368
3373
|
for (let t = 1; t < s; t++) c = _[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);
|
|
3369
3374
|
let l = o.length, u = Array(l);
|
|
3370
3375
|
for (let e = 0; e < l; e++) {
|
|
3371
|
-
let t = o[e], n =
|
|
3376
|
+
let t = o[e], n = W.rangeToString(t);
|
|
3372
3377
|
u[e] = [n, t.value];
|
|
3373
3378
|
}
|
|
3374
3379
|
t.directStyles = u;
|
|
@@ -3382,51 +3387,51 @@ var ir = {
|
|
|
3382
3387
|
elementScanners: [{
|
|
3383
3388
|
name: "c",
|
|
3384
3389
|
scan: (e, t, n) => {
|
|
3385
|
-
if (!u ||
|
|
3390
|
+
if (!u || k !== null) return U;
|
|
3386
3391
|
R.r = R.t = R.s = R.cm = R.vm = void 0;
|
|
3387
|
-
let r =
|
|
3392
|
+
let r = We(e, t + 2, n, 0);
|
|
3388
3393
|
if (r < 0) return r;
|
|
3389
3394
|
let i = R.t;
|
|
3390
|
-
if (R.r === void 0 || i === "str" || i === "inlineStr") return
|
|
3395
|
+
if (R.r === void 0 || i === "str" || i === "inlineStr") return U;
|
|
3391
3396
|
let a = !1, o = -1, s = -1, c = -1, l = -1, d = r;
|
|
3392
|
-
if (!
|
|
3397
|
+
if (!Ue) for (z.t = z.si = z.ref = z.ca = void 0;;) {
|
|
3393
3398
|
let t = e.indexOf("<", r);
|
|
3394
|
-
if (t === -1 || t + 3 >= n) return
|
|
3399
|
+
if (t === -1 || t + 3 >= n) return H;
|
|
3395
3400
|
for (let n = r; n < t; n++) {
|
|
3396
3401
|
let t = e.charCodeAt(n);
|
|
3397
|
-
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return
|
|
3402
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return U;
|
|
3398
3403
|
}
|
|
3399
3404
|
let i = e.charCodeAt(t + 1), u = e.charCodeAt(t + 2);
|
|
3400
3405
|
if (i === 47) {
|
|
3401
|
-
if (!
|
|
3406
|
+
if (!Ge(e, t, 99)) return U;
|
|
3402
3407
|
d = t + 4;
|
|
3403
3408
|
break;
|
|
3404
3409
|
}
|
|
3405
3410
|
if (i === 102 && !a && c === -1 && (u === 32 || u === 62 || u === 47)) {
|
|
3406
|
-
if (a = !0, r =
|
|
3407
|
-
if (z.t === "dataTable") return
|
|
3408
|
-
if (
|
|
3411
|
+
if (a = !0, r = We(e, t + 2, n, 1), r < 0) return r;
|
|
3412
|
+
if (z.t === "dataTable") return U;
|
|
3413
|
+
if (Ue) continue;
|
|
3409
3414
|
let i = e.indexOf("<", r);
|
|
3410
|
-
if (i === -1 || i + 3 >= n) return
|
|
3411
|
-
if (!
|
|
3415
|
+
if (i === -1 || i + 3 >= n) return H;
|
|
3416
|
+
if (!Ge(e, i, 102)) return U;
|
|
3412
3417
|
o = r, s = i, r = i + 4;
|
|
3413
3418
|
} else if (i === 118 && u === 62 && c === -1) {
|
|
3414
3419
|
let i = e.indexOf("<", t + 3);
|
|
3415
|
-
if (i === -1 || i + 3 >= n) return
|
|
3416
|
-
if (!
|
|
3420
|
+
if (i === -1 || i + 3 >= n) return H;
|
|
3421
|
+
if (!Ge(e, i, 118)) return U;
|
|
3417
3422
|
c = t + 3, l = i, r = i + 4;
|
|
3418
|
-
} else return
|
|
3423
|
+
} else return U;
|
|
3419
3424
|
}
|
|
3420
|
-
return Fe(ze), a && (Fe(Be), s > o && Le(
|
|
3425
|
+
return Fe(ze), a && (Fe(Be), s > o && Le(He(e.slice(o, s))), Ie(Be)), c !== -1 && (Fe(B), l > c && Le(He(e.slice(c, l))), Ie(B)), Ie(ze), d;
|
|
3421
3426
|
}
|
|
3422
3427
|
}, {
|
|
3423
3428
|
name: "row",
|
|
3424
|
-
openTag:
|
|
3429
|
+
openTag: Ve,
|
|
3425
3430
|
scan: (e, t, n) => {
|
|
3426
|
-
if (!je || u ||
|
|
3427
|
-
|
|
3428
|
-
let r =
|
|
3429
|
-
return r < 0 ? r :
|
|
3431
|
+
if (!je || u || k !== null) return U;
|
|
3432
|
+
V.r = V.s = V.ht = V.hidden = V.collapsed = V.customHeight = V.customFormat = V.outlineLevel = void 0;
|
|
3433
|
+
let r = We(e, t + 4, n, 2);
|
|
3434
|
+
return r < 0 ? r : Ue || V.r === void 0 ? U : (Fe(Ve), r);
|
|
3430
3435
|
}
|
|
3431
3436
|
}]
|
|
3432
3437
|
};
|
|
@@ -3509,42 +3514,42 @@ var Tr = {
|
|
|
3509
3514
|
Company: "company",
|
|
3510
3515
|
Manager: "manager"
|
|
3511
3516
|
}, Dr = {
|
|
3512
|
-
lpwstr:
|
|
3513
|
-
lpstr:
|
|
3514
|
-
bstr:
|
|
3515
|
-
i1:
|
|
3516
|
-
i2:
|
|
3517
|
-
i4:
|
|
3518
|
-
i8:
|
|
3519
|
-
int:
|
|
3520
|
-
ui1:
|
|
3521
|
-
ui2:
|
|
3522
|
-
ui4:
|
|
3523
|
-
ui8:
|
|
3524
|
-
uint:
|
|
3525
|
-
r4:
|
|
3526
|
-
r8:
|
|
3527
|
-
decimal:
|
|
3528
|
-
bool:
|
|
3529
|
-
filetime:
|
|
3530
|
-
date:
|
|
3517
|
+
lpwstr: G.Type.String,
|
|
3518
|
+
lpstr: G.Type.String,
|
|
3519
|
+
bstr: G.Type.String,
|
|
3520
|
+
i1: G.Type.Number,
|
|
3521
|
+
i2: G.Type.Number,
|
|
3522
|
+
i4: G.Type.Number,
|
|
3523
|
+
i8: G.Type.Number,
|
|
3524
|
+
int: G.Type.Number,
|
|
3525
|
+
ui1: G.Type.Number,
|
|
3526
|
+
ui2: G.Type.Number,
|
|
3527
|
+
ui4: G.Type.Number,
|
|
3528
|
+
ui8: G.Type.Number,
|
|
3529
|
+
uint: G.Type.Number,
|
|
3530
|
+
r4: G.Type.Float,
|
|
3531
|
+
r8: G.Type.Float,
|
|
3532
|
+
decimal: G.Type.Float,
|
|
3533
|
+
bool: G.Type.Boolean,
|
|
3534
|
+
filetime: G.Type.Date,
|
|
3535
|
+
date: G.Type.Date
|
|
3531
3536
|
}, Or = (e) => {
|
|
3532
3537
|
let t = e.kind ? Dr[e.kind] : void 0;
|
|
3533
3538
|
if (!t) return null;
|
|
3534
3539
|
let n = e.value.trim(), r;
|
|
3535
|
-
if (t ===
|
|
3540
|
+
if (t === G.Type.String) r = {
|
|
3536
3541
|
key: e.key,
|
|
3537
3542
|
type: t,
|
|
3538
3543
|
value: e.value
|
|
3539
3544
|
};
|
|
3540
|
-
else if (t ===
|
|
3545
|
+
else if (t === G.Type.Boolean) {
|
|
3541
3546
|
if (n !== "true" && n !== "false" && n !== "1" && n !== "0") return null;
|
|
3542
3547
|
r = {
|
|
3543
3548
|
key: e.key,
|
|
3544
3549
|
type: t,
|
|
3545
3550
|
value: n === "true" || n === "1"
|
|
3546
3551
|
};
|
|
3547
|
-
} else if (t ===
|
|
3552
|
+
} else if (t === G.Type.Date) {
|
|
3548
3553
|
let i = new Date(n);
|
|
3549
3554
|
if (!n || isNaN(i.getTime())) return null;
|
|
3550
3555
|
r = {
|
|
@@ -3555,22 +3560,22 @@ var Tr = {
|
|
|
3555
3560
|
} else {
|
|
3556
3561
|
let i = Number(n);
|
|
3557
3562
|
if (!n || !Number.isFinite(i)) return null;
|
|
3558
|
-
let a = t ===
|
|
3563
|
+
let a = t === G.Type.Number && i >= -2147483648 && i <= 2147483647;
|
|
3559
3564
|
r = {
|
|
3560
3565
|
key: e.key,
|
|
3561
|
-
type: a ? t :
|
|
3566
|
+
type: a ? t : G.Type.Float,
|
|
3562
3567
|
value: i
|
|
3563
3568
|
};
|
|
3564
3569
|
}
|
|
3565
3570
|
return e.linkTarget && (r.linkTarget = e.linkTarget), r;
|
|
3566
3571
|
}, kr = "hiddenXfs", Ar = (e) => (Array.isArray(e) ? e[1] : e?.v)?.s, jr = (e) => {
|
|
3567
3572
|
if (!e || e.length === 0) return !1;
|
|
3568
|
-
let t =
|
|
3573
|
+
let t = W.refsToRuns(e, !0), n = 0;
|
|
3569
3574
|
for (let e of t) {
|
|
3570
3575
|
if (e.min > n || e.value?.s === void 0) return !1;
|
|
3571
3576
|
n = Math.max(n, e.max + 1);
|
|
3572
3577
|
}
|
|
3573
|
-
return n >
|
|
3578
|
+
return n > I;
|
|
3574
3579
|
}, Mr = (e, t) => {
|
|
3575
3580
|
e.protection = {
|
|
3576
3581
|
...e.protection,
|
|
@@ -3581,7 +3586,7 @@ var Tr = {
|
|
|
3581
3586
|
if (!n || n.length === 0) return;
|
|
3582
3587
|
let r = null, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (e, o, s, c) => {
|
|
3583
3588
|
let l = "";
|
|
3584
|
-
c && (l = a.get(c) ??
|
|
3589
|
+
c && (l = a.get(c) ?? Ke.JSONStableStringify(c), a.set(c, l));
|
|
3585
3590
|
let u = `${e}|${o ?? ""}|${s ?? ""}|${l}`, d = i.get(u);
|
|
3586
3591
|
if (d !== void 0) return d;
|
|
3587
3592
|
let f = n[e], p = f ? Ir(f, o, s, c) : null, m = t?.get(e);
|
|
@@ -3589,11 +3594,11 @@ var Tr = {
|
|
|
3589
3594
|
if (!r) {
|
|
3590
3595
|
r = /* @__PURE__ */ new Map();
|
|
3591
3596
|
for (let e = 0; e < n.length; e++) {
|
|
3592
|
-
let i =
|
|
3597
|
+
let i = Ke.JSONStableStringify(n[e]), a = t?.get(e);
|
|
3593
3598
|
a !== void 0 && (i += `|${a}`), r.has(i) || r.set(i, e);
|
|
3594
3599
|
}
|
|
3595
3600
|
}
|
|
3596
|
-
let a =
|
|
3601
|
+
let a = Ke.JSONStableStringify(e);
|
|
3597
3602
|
i !== void 0 && (a += `|${i}`);
|
|
3598
3603
|
let o = r.get(a);
|
|
3599
3604
|
return o === void 0 && (o = n.length, n.push(e), r.set(a, o), i !== void 0 && t.set(o, i)), o;
|
|
@@ -3608,17 +3613,17 @@ var Tr = {
|
|
|
3608
3613
|
if (!t) continue;
|
|
3609
3614
|
let n = [];
|
|
3610
3615
|
for (let e of i) {
|
|
3611
|
-
let r =
|
|
3616
|
+
let r = W.fastStringToRange(e[0]), i = Ur(r, t.coords);
|
|
3612
3617
|
if (!i) {
|
|
3613
3618
|
n.push(e);
|
|
3614
3619
|
continue;
|
|
3615
3620
|
}
|
|
3616
3621
|
a = !0;
|
|
3617
|
-
for (let t of Wr(r, i)) n.push([
|
|
3622
|
+
for (let t of Wr(r, i)) n.push([W.rangeToString(t), e[1]]);
|
|
3618
3623
|
let { rowIndex: s, colIndex: c } = t.origin;
|
|
3619
3624
|
for (let r = i.rowStart; r <= i.rowEnd; r++) {
|
|
3620
3625
|
let a = i.colStart, l = null, u = (e) => {
|
|
3621
|
-
l !== null && n.push([
|
|
3626
|
+
l !== null && n.push([W.rangeToString({
|
|
3622
3627
|
rowStart: r,
|
|
3623
3628
|
rowEnd: r,
|
|
3624
3629
|
colStart: a,
|
|
@@ -3637,9 +3642,9 @@ var Tr = {
|
|
|
3637
3642
|
a && (e.directStyles = i);
|
|
3638
3643
|
}
|
|
3639
3644
|
}, Fr = (e, t) => {
|
|
3640
|
-
let n =
|
|
3645
|
+
let n = K(e, t);
|
|
3641
3646
|
if (!n || !e.location) return null;
|
|
3642
|
-
let r =
|
|
3647
|
+
let r = W.fastStringToRange(e.location), i = {
|
|
3643
3648
|
rowIndex: r.rowStart - n.top,
|
|
3644
3649
|
colIndex: r.colStart
|
|
3645
3650
|
};
|
|
@@ -3660,7 +3665,7 @@ var Tr = {
|
|
|
3660
3665
|
i = t;
|
|
3661
3666
|
}
|
|
3662
3667
|
let o = i.alignment;
|
|
3663
|
-
if (n !== null && o?.horizontal ===
|
|
3668
|
+
if (n !== null && o?.horizontal === rt.HorizontalAlignment.Left && (o.indent ?? 0) === n) {
|
|
3664
3669
|
let { horizontal: e, indent: t, ...n } = o, { alignment: r, ...a } = i;
|
|
3665
3670
|
i = Hr(n) ? a : {
|
|
3666
3671
|
...a,
|
|
@@ -3675,9 +3680,9 @@ var Tr = {
|
|
|
3675
3680
|
}
|
|
3676
3681
|
}
|
|
3677
3682
|
if (i === e) return e;
|
|
3678
|
-
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !==
|
|
3683
|
+
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !== Qe.BuiltInName.Normal)) return i;
|
|
3679
3684
|
return null;
|
|
3680
|
-
}, Lr = (e, t) => e === t ||
|
|
3685
|
+
}, Lr = (e, t) => e === t || it.toBuiltInID(e) === it.toBuiltInID(t), Rr = (e) => typeof e == "object" && !!e && !Array.isArray(e), zr = (e, t) => !(!Rr(e) || !Rr(t)) && (e.patternType === "solid" && t.patternType === "solid" ? e.foreground === t.foreground : Ke.JSONStableStringify(e) === Ke.JSONStableStringify(t)), Br = (e, t) => {
|
|
3681
3686
|
let n = null, r = (t, r) => {
|
|
3682
3687
|
n ??= { ...e }, r === void 0 ? delete n[t] : n[t] = r;
|
|
3683
3688
|
};
|
|
@@ -3693,9 +3698,9 @@ var Tr = {
|
|
|
3693
3698
|
}
|
|
3694
3699
|
return n ?? e;
|
|
3695
3700
|
}, Vr = {
|
|
3696
|
-
vertical:
|
|
3701
|
+
vertical: rt.VerticalAlignment.Bottom,
|
|
3697
3702
|
relativeIndent: 0,
|
|
3698
|
-
overflow:
|
|
3703
|
+
overflow: rt.Overflow.Visible,
|
|
3699
3704
|
rotation: 0
|
|
3700
3705
|
}, Hr = (e) => Object.keys(e).every((t) => e[t] === void 0 || Vr[t] === e[t]), Ur = (e, t) => {
|
|
3701
3706
|
let n = Math.max(e.rowStart, t.rowStart), r = Math.min(e.rowEnd, t.rowEnd), i = Math.max(e.colStart, t.colStart), a = Math.min(e.colEnd, t.colEnd);
|
|
@@ -3728,7 +3733,7 @@ var Tr = {
|
|
|
3728
3733
|
if (typeof e == "string") return void t.push(e);
|
|
3729
3734
|
let n = Array.isArray(e) ? e : [e];
|
|
3730
3735
|
for (let e = 0; e < n.length; e++) {
|
|
3731
|
-
let r =
|
|
3736
|
+
let r = W.rangeToString(n[e]);
|
|
3732
3737
|
r && t.push(r);
|
|
3733
3738
|
}
|
|
3734
3739
|
}, qr = (e) => {
|
|
@@ -3740,7 +3745,7 @@ var Tr = {
|
|
|
3740
3745
|
if (!e) return;
|
|
3741
3746
|
let i = t ? 2 : 1, a = t ? n.rowStart : n.colStart, o = t ? n.rowEnd : n.colEnd, s, c = -1;
|
|
3742
3747
|
for (let n of e) {
|
|
3743
|
-
let e =
|
|
3748
|
+
let e = W.refToRun(n, t), l = qr(n);
|
|
3744
3749
|
e && l !== void 0 ? l !== c || (t ? s.colEnd : s.rowEnd) + 1 !== e.min ? (s = {
|
|
3745
3750
|
colStart: t ? e.min : a,
|
|
3746
3751
|
rowStart: t ? a : e.min,
|
|
@@ -3796,51 +3801,51 @@ var Tr = {
|
|
|
3796
3801
|
225
|
|
3797
3802
|
], $r = /^xl\/worksheets\/[^/]+\.xml$/i, ei = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), ti = async (e, n) => {
|
|
3798
3803
|
let { password: o, onVBA: s, profile: u, calcOnLoad: p = "auto", createWorkbookOptions: h = {}, ...v } = n ?? {};
|
|
3799
|
-
await
|
|
3800
|
-
let te = !!h.origin && typeof h.origin != "string", x = u ? new
|
|
3801
|
-
|
|
3804
|
+
await Xe.load();
|
|
3805
|
+
let te = !!h.origin && typeof h.origin != "string", x = u ? new jt(typeof u == "function" ? u : void 0) : null, S = [], ne = (e, t, n) => {
|
|
3806
|
+
S.push([
|
|
3802
3807
|
e,
|
|
3803
3808
|
t ?? "",
|
|
3804
3809
|
n
|
|
3805
3810
|
]);
|
|
3806
|
-
},
|
|
3807
|
-
if (
|
|
3808
|
-
|
|
3809
|
-
let t = Math.min(
|
|
3810
|
-
|
|
3811
|
-
} : void 0,
|
|
3811
|
+
}, ie = { onWarning: ne }, ae = n?.progress, oe = ae?.onProgress ? ae.onProgress.bind(ae) : void 0, ce = e.byteLength, le = 0, ue = 0, fe = oe ? (e) => {
|
|
3812
|
+
if (le <= 0) return;
|
|
3813
|
+
ue += e;
|
|
3814
|
+
let t = Math.min(ce, Math.round(ue / le * ce));
|
|
3815
|
+
oe(t, ce);
|
|
3816
|
+
} : void 0, me = import("./BksP77A3tWZz2uFZ.mjs"), he = null;
|
|
3812
3817
|
try {
|
|
3813
|
-
|
|
3818
|
+
he = new DOMParser();
|
|
3814
3819
|
} catch {}
|
|
3815
|
-
let
|
|
3820
|
+
let T = null;
|
|
3816
3821
|
try {
|
|
3817
|
-
|
|
3822
|
+
T = new XMLSerializer();
|
|
3818
3823
|
} catch {}
|
|
3819
|
-
let D, O, k
|
|
3820
|
-
|
|
3824
|
+
let E, D, O, k = null;
|
|
3825
|
+
he || (k = import("./DKFJjTTJkuTmxyrC.mjs").then((e) => t(e.default, 1)));
|
|
3821
3826
|
try {
|
|
3822
|
-
let [e, t] = await Promise.all([
|
|
3823
|
-
|
|
3827
|
+
let [e, t] = await Promise.all([k, me]);
|
|
3828
|
+
E = new t.DOMTransformer(), D = he ?? new e.DOMParser(), O = T ?? new e.XMLSerializer();
|
|
3824
3829
|
} catch (e) {
|
|
3825
3830
|
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
3826
3831
|
}
|
|
3827
|
-
let
|
|
3832
|
+
let ge = (e) => O.serializeToString(e);
|
|
3828
3833
|
if (((e) => {
|
|
3829
3834
|
if (e.byteLength < Qr.length) return !1;
|
|
3830
3835
|
let t = new Uint8Array(e, 0, Qr.length);
|
|
3831
3836
|
return Qr.every((e, n) => t[n] === e);
|
|
3832
|
-
})(e)) throw new
|
|
3833
|
-
let
|
|
3837
|
+
})(e)) throw new Ue("This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.");
|
|
3838
|
+
let A;
|
|
3834
3839
|
try {
|
|
3835
|
-
|
|
3840
|
+
A = await At.create(e);
|
|
3836
3841
|
} catch (e) {
|
|
3837
|
-
throw new
|
|
3842
|
+
throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
3838
3843
|
}
|
|
3839
3844
|
x?.mark("zip-open");
|
|
3840
3845
|
try {
|
|
3841
|
-
if (!
|
|
3846
|
+
if (!A.has("[Content_Types].xml")) throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3842
3847
|
let e = (e) => {
|
|
3843
|
-
let t =
|
|
3848
|
+
let t = A.getEntry(e);
|
|
3844
3849
|
return t ? { content: t } : void 0;
|
|
3845
3850
|
}, t = {
|
|
3846
3851
|
workbooks: [],
|
|
@@ -3890,23 +3895,23 @@ var Tr = {
|
|
|
3890
3895
|
t?.(`Error parsing content types: ${e?.message ?? e}`);
|
|
3891
3896
|
}
|
|
3892
3897
|
}))(t, (e) => {
|
|
3893
|
-
|
|
3894
|
-
}), n = await
|
|
3898
|
+
S.push([e, "[Content_Types].xml"]);
|
|
3899
|
+
}), n = await A.getTextStream("[Content_Types].xml");
|
|
3895
3900
|
if (!n) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
3896
3901
|
try {
|
|
3897
3902
|
await Sn.parseStream(n, e, { xmlns: !1 });
|
|
3898
3903
|
} catch (e) {
|
|
3899
3904
|
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
3900
3905
|
}
|
|
3901
|
-
te && await
|
|
3906
|
+
te && await A.getBuffer("[Content_Types].xml");
|
|
3902
3907
|
}
|
|
3903
3908
|
x?.mark("content-types");
|
|
3904
3909
|
let n = t.sst, o = /* @__PURE__ */ new Set();
|
|
3905
3910
|
for (let e of t.sheets) o.add(Zr(e));
|
|
3906
3911
|
n && o.add(Zr(n));
|
|
3907
|
-
for (let e of o)
|
|
3908
|
-
if (await
|
|
3909
|
-
let n =
|
|
3912
|
+
for (let e of o) le += A.uncompressedSize(e);
|
|
3913
|
+
if (await A.prefetch((e) => !o.has(e) && !$r.test(e)), x?.mark("prefetch-side-parts"), t.workbooks.length === 0) {
|
|
3914
|
+
let n = C("_rels/.rels", e, D, E, ie);
|
|
3910
3915
|
if (n) {
|
|
3911
3916
|
for (let e of n.values()) if (e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && e.target) {
|
|
3912
3917
|
t.workbooks.push(e.target);
|
|
@@ -3914,40 +3919,40 @@ var Tr = {
|
|
|
3914
3919
|
}
|
|
3915
3920
|
}
|
|
3916
3921
|
}
|
|
3917
|
-
if (t.workbooks.length === 0) throw new
|
|
3918
|
-
let v = h?.resources ?? new
|
|
3919
|
-
|
|
3922
|
+
if (t.workbooks.length === 0) throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3923
|
+
let v = h?.resources ?? new st(), ue = v.beginPersist(), me = {}, he = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Map();
|
|
3924
|
+
T.set("parseInlineDxf", (e) => {
|
|
3920
3925
|
if (!e) return;
|
|
3921
|
-
let t =
|
|
3926
|
+
let t = D.parseFromString(`<dxf xmlns:x14="${pe}" xmlns:xm="${Ve}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
3922
3927
|
if (!t) return;
|
|
3923
|
-
let n =
|
|
3928
|
+
let n = E.parseDxf(t, "", ie);
|
|
3924
3929
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
3925
3930
|
});
|
|
3926
|
-
let
|
|
3927
|
-
|
|
3928
|
-
let
|
|
3929
|
-
|
|
3930
|
-
},
|
|
3931
|
+
let O = r("metadata", t, e, D, E, ie).entries().next()?.value?.[1]?.metadata;
|
|
3932
|
+
O && T.set("metadata", O), T.set(sr, d());
|
|
3933
|
+
let k = /* @__PURE__ */ new Map(), ve = [], ye = /* @__PURE__ */ new Set(), j = (e) => {
|
|
3934
|
+
ye.add(Zr(e));
|
|
3935
|
+
}, M = (t, n = k) => {
|
|
3931
3936
|
let r = t.lastIndexOf("/"), i = t.substring(0, r + 1) + "_rels/" + t.substring(r + 1, t.length) + ".rels", a = n.get(i);
|
|
3932
|
-
return a || (a =
|
|
3933
|
-
},
|
|
3934
|
-
let a =
|
|
3937
|
+
return a || (a = C(i, e, D, E, z), n.set(i, a)), a;
|
|
3938
|
+
}, N = (t, n, r, i = k) => {
|
|
3939
|
+
let a = M(n, i).get(t), o = a?.target;
|
|
3935
3940
|
if (!o) return null;
|
|
3936
3941
|
if (a.targetMode === "External") {
|
|
3937
3942
|
if (!r) return a.target;
|
|
3938
3943
|
let e = v.add({ source: { external: a.target } });
|
|
3939
|
-
return e.addReference(
|
|
3944
|
+
return e.addReference(me), he.add(e), ue.toResourceId(e);
|
|
3940
3945
|
}
|
|
3941
3946
|
let s = n.lastIndexOf("/"), c = n.substring(0, s + 1);
|
|
3942
|
-
o.startsWith("/") || (o = c + o), o =
|
|
3943
|
-
let l =
|
|
3947
|
+
o.startsWith("/") || (o = c + o), o = Ee(o);
|
|
3948
|
+
let l = E?.getVisitorParamsState().get("dxfs"), u = i.get(o);
|
|
3944
3949
|
if (!u) {
|
|
3945
3950
|
if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
3946
3951
|
let e = {};
|
|
3947
|
-
u = e,
|
|
3948
|
-
let t = fr(e, (e, t) => t === "legacyDrawing" ? Se(e, o) : t === "formControl" ? Ce(e, o) : t === "part" ?
|
|
3949
|
-
|
|
3950
|
-
}, void 0,
|
|
3952
|
+
u = e, ve.push((async () => {
|
|
3953
|
+
let t = fr(e, (e, t) => t === "legacyDrawing" ? Se(e, o) : t === "formControl" ? Ce(e, o) : t === "part" ? De(e, o) : N(e, o, t === "resource") ?? null, qe, l, () => {}, (e, t, n) => {
|
|
3954
|
+
ne(e, t ? `${t} (${o})` : o, n);
|
|
3955
|
+
}, void 0, T), n = await A.getTextStream(o, fe);
|
|
3951
3956
|
if (n) try {
|
|
3952
3957
|
await Sn.parseStream(n, t, {
|
|
3953
3958
|
xmlns: !1,
|
|
@@ -3956,21 +3961,21 @@ var Tr = {
|
|
|
3956
3961
|
} catch (e) {
|
|
3957
3962
|
throw Error(`Error parsing sheet: '${o}'`, { cause: e });
|
|
3958
3963
|
}
|
|
3959
|
-
let r =
|
|
3964
|
+
let r = M(o, i);
|
|
3960
3965
|
if (r) {
|
|
3961
|
-
|
|
3966
|
+
xe(e, o, r, i), Ae(e), _e(e);
|
|
3962
3967
|
let t = [];
|
|
3963
3968
|
r.forEach((e, n) => {
|
|
3964
3969
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
3965
|
-
let r =
|
|
3970
|
+
let r = De(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
3966
3971
|
if (!r?.xml) return;
|
|
3967
3972
|
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
3968
|
-
if (isNaN(a)) return void
|
|
3973
|
+
if (isNaN(a)) return void S.push([`Pivot table '${r.name}' names no cache and was dropped.`, o]);
|
|
3969
3974
|
let s = /\sname="([^"]*)"/.exec(i)?.[1], c = Le(r.xml);
|
|
3970
|
-
if (!c) return void
|
|
3971
|
-
let l =
|
|
3975
|
+
if (!c) return void S.push([`Pivot table '${r.name}' states no location and was dropped.`, o]);
|
|
3976
|
+
let l = E?.getVisitorParamsState(), u = Pe(l?.get("numFmts"), l?.get("dxfs")), d = Te(r.xml, u), f = d ? void 0 : be(r.xml, u);
|
|
3972
3977
|
t.push({
|
|
3973
|
-
...s ? { name:
|
|
3978
|
+
...s ? { name: se(s) } : {},
|
|
3974
3979
|
cacheId: a,
|
|
3975
3980
|
location: c,
|
|
3976
3981
|
part: r,
|
|
@@ -3981,12 +3986,12 @@ var Tr = {
|
|
|
3981
3986
|
}
|
|
3982
3987
|
})());
|
|
3983
3988
|
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
3984
|
-
let t = ee(o, e,
|
|
3989
|
+
let t = ee(o, e, D, E, z);
|
|
3985
3990
|
if (t && Object.keys(t).length !== 0) {
|
|
3986
3991
|
let e = t, n = e.__bookRelId, r = e.__absoluteUrlRelId;
|
|
3987
3992
|
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
3988
3993
|
let a = [];
|
|
3989
|
-
|
|
3994
|
+
M(o, i)?.forEach((e, t) => {
|
|
3990
3995
|
if (e.targetMode === "External" && e.type && e.target) {
|
|
3991
3996
|
let i = {
|
|
3992
3997
|
type: e.type,
|
|
@@ -3994,25 +3999,25 @@ var Tr = {
|
|
|
3994
3999
|
};
|
|
3995
4000
|
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
3996
4001
|
}
|
|
3997
|
-
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a,
|
|
4002
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a, j(o), u = e;
|
|
3998
4003
|
} else u = null;
|
|
3999
|
-
} else u = r ?
|
|
4004
|
+
} else u = r ? de(o, e, (e, t) => {
|
|
4000
4005
|
let n = v.add({ source: { buffer: e } });
|
|
4001
|
-
return n.addReference(
|
|
4002
|
-
}, z) : ee(o, e,
|
|
4006
|
+
return n.addReference(me), he.add(n), ue.toResourceId(n);
|
|
4007
|
+
}, z) : ee(o, e, D, E, z);
|
|
4003
4008
|
}
|
|
4004
4009
|
return u;
|
|
4005
|
-
},
|
|
4010
|
+
}, P = (e, t) => {
|
|
4006
4011
|
if (!e) return null;
|
|
4007
|
-
let n =
|
|
4012
|
+
let n = M(t, k)?.get(e);
|
|
4008
4013
|
if (!n?.target || n.targetMode === "External") return null;
|
|
4009
4014
|
let r = n.target;
|
|
4010
|
-
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r),
|
|
4011
|
-
},
|
|
4015
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), Ee(r);
|
|
4016
|
+
}, xe = (e, t, n, r) => {
|
|
4012
4017
|
let i = [], o = /* @__PURE__ */ new Map(), s = [];
|
|
4013
4018
|
n.forEach((e, n) => {
|
|
4014
4019
|
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
4015
|
-
let a =
|
|
4020
|
+
let a = N(n, t, !1, r)?.comments;
|
|
4016
4021
|
if (!a) return;
|
|
4017
4022
|
for (let e = 0; e < a.length; e++) {
|
|
4018
4023
|
let t = a[e];
|
|
@@ -4029,8 +4034,8 @@ var Tr = {
|
|
|
4029
4034
|
v: u
|
|
4030
4035
|
}));
|
|
4031
4036
|
}
|
|
4032
|
-
let c =
|
|
4033
|
-
c &&
|
|
4037
|
+
let c = P(n, t);
|
|
4038
|
+
c && j(c);
|
|
4034
4039
|
});
|
|
4035
4040
|
for (let e = 0; e < s.length; e++) {
|
|
4036
4041
|
let { parentId: t, json: n } = s[e], r = o.get(t);
|
|
@@ -4039,7 +4044,7 @@ var Tr = {
|
|
|
4039
4044
|
let l = [];
|
|
4040
4045
|
if (n.forEach((e, n) => {
|
|
4041
4046
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
4042
|
-
let i =
|
|
4047
|
+
let i = N(n, t, !1, r), a = i?.comments;
|
|
4043
4048
|
if (!a) return;
|
|
4044
4049
|
let s = i?.authors;
|
|
4045
4050
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -4051,7 +4056,7 @@ var Tr = {
|
|
|
4051
4056
|
n = void 0;
|
|
4052
4057
|
}
|
|
4053
4058
|
let r = {
|
|
4054
|
-
id:
|
|
4059
|
+
id: He.uuidV4().toUpperCase(),
|
|
4055
4060
|
asNote: !0,
|
|
4056
4061
|
content: t.v.content ?? ""
|
|
4057
4062
|
}, i = n ? ze({ displayName: n }) : void 0;
|
|
@@ -4060,8 +4065,8 @@ var Tr = {
|
|
|
4060
4065
|
v: r
|
|
4061
4066
|
});
|
|
4062
4067
|
}
|
|
4063
|
-
let c =
|
|
4064
|
-
c &&
|
|
4068
|
+
let c = P(n, t);
|
|
4069
|
+
c && j(c);
|
|
4065
4070
|
}), i.length === 0 && l.length === 0) return;
|
|
4066
4071
|
let u = [...i, ...l], d = e.legacyDrawing;
|
|
4067
4072
|
if (d?.xml) {
|
|
@@ -4070,7 +4075,7 @@ var Tr = {
|
|
|
4070
4075
|
let r = /* @__PURE__ */ new Map();
|
|
4071
4076
|
for (let e = 0; e < n.length; e++) {
|
|
4072
4077
|
let t = n[e];
|
|
4073
|
-
r.set(
|
|
4078
|
+
r.set(W.cellToString({
|
|
4074
4079
|
rowIndex: t.row,
|
|
4075
4080
|
colIndex: t.col
|
|
4076
4081
|
}), t);
|
|
@@ -4078,7 +4083,7 @@ var Tr = {
|
|
|
4078
4083
|
for (let e = 0; e < u.length; e++) {
|
|
4079
4084
|
let t = u[e], n = r.get(String(t.r).toUpperCase());
|
|
4080
4085
|
if (!n || (r.delete(String(t.r).toUpperCase()), !t.v.asNote)) continue;
|
|
4081
|
-
let i =
|
|
4086
|
+
let i = re(n.xml), a = {};
|
|
4082
4087
|
if (i.anchor) {
|
|
4083
4088
|
let [e, t, r, o, s, c, l, u] = i.anchor;
|
|
4084
4089
|
a.anchor = {
|
|
@@ -4108,28 +4113,28 @@ var Tr = {
|
|
|
4108
4113
|
}
|
|
4109
4114
|
e.comments = u;
|
|
4110
4115
|
}, Se = (t, n) => {
|
|
4111
|
-
let r =
|
|
4116
|
+
let r = P(t, n);
|
|
4112
4117
|
if (!r) return null;
|
|
4113
4118
|
let i = e(Zr(r));
|
|
4114
4119
|
if (!i) return null;
|
|
4115
4120
|
let a = { xml: wr(new TextDecoder("utf-8").decode(i.content)) }, o = [];
|
|
4116
|
-
return
|
|
4121
|
+
return M(r, k)?.forEach((e, t) => {
|
|
4117
4122
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
4118
|
-
let n =
|
|
4123
|
+
let n = N(t, r, !0);
|
|
4119
4124
|
typeof n == "number" && o.push({
|
|
4120
4125
|
id: t,
|
|
4121
4126
|
resId: n
|
|
4122
4127
|
});
|
|
4123
|
-
}), o.length > 0 && (a.images = o),
|
|
4128
|
+
}), o.length > 0 && (a.images = o), j(r), a;
|
|
4124
4129
|
}, Ce = (t, n) => {
|
|
4125
|
-
let r =
|
|
4130
|
+
let r = P(t, n);
|
|
4126
4131
|
if (!r) return null;
|
|
4127
|
-
let i = ee(r, e,
|
|
4128
|
-
return i &&
|
|
4129
|
-
},
|
|
4130
|
-
let s =
|
|
4132
|
+
let i = ee(r, e, D, E, z)?.formControl ?? null;
|
|
4133
|
+
return i && j(r), i;
|
|
4134
|
+
}, De = (n, r, i, a, o = /* @__PURE__ */ new Set()) => {
|
|
4135
|
+
let s = P(n, r);
|
|
4131
4136
|
if (!s || o.has(s)) return null;
|
|
4132
|
-
let c = i ??
|
|
4137
|
+
let c = i ?? M(r, k)?.get(n)?.type;
|
|
4133
4138
|
if (!c) return null;
|
|
4134
4139
|
let l = e(Zr(s));
|
|
4135
4140
|
if (!l) return null;
|
|
@@ -4141,15 +4146,15 @@ var Tr = {
|
|
|
4141
4146
|
};
|
|
4142
4147
|
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);
|
|
4143
4148
|
else {
|
|
4144
|
-
let e =
|
|
4149
|
+
let e = N(n, r, !0);
|
|
4145
4150
|
if (typeof e != "number") return null;
|
|
4146
4151
|
f.resId = e;
|
|
4147
4152
|
}
|
|
4148
4153
|
let p = [];
|
|
4149
|
-
return
|
|
4154
|
+
return M(s, k)?.forEach((e, t) => {
|
|
4150
4155
|
if (!e?.type || a && !a(e.type)) return;
|
|
4151
4156
|
if (e.targetMode === "External") {
|
|
4152
|
-
let n =
|
|
4157
|
+
let n = N(t, s, !0);
|
|
4153
4158
|
typeof n == "number" && p.push({
|
|
4154
4159
|
id: t,
|
|
4155
4160
|
type: e.type,
|
|
@@ -4157,32 +4162,32 @@ var Tr = {
|
|
|
4157
4162
|
});
|
|
4158
4163
|
return;
|
|
4159
4164
|
}
|
|
4160
|
-
let n =
|
|
4165
|
+
let n = De(t, s, e.type, a, o);
|
|
4161
4166
|
n && p.push(n);
|
|
4162
|
-
}), p.length > 0 && (f.parts = p),
|
|
4163
|
-
}, Oe = r("coreprops", t, e,
|
|
4167
|
+
}), p.length > 0 && (f.parts = p), j(s), f;
|
|
4168
|
+
}, Oe = r("coreprops", t, e, D, E, ie), ke = r("extprops", t, e, D, E, ie), je = r("custprops", t, e, D, E, ie);
|
|
4164
4169
|
je.forEach((e, t) => {
|
|
4165
|
-
e?.custom &&
|
|
4170
|
+
e?.custom && j(t);
|
|
4166
4171
|
});
|
|
4167
|
-
let Me = new
|
|
4172
|
+
let Me = new ot(), Fe = r("people", t, e, D, E, ie);
|
|
4168
4173
|
if (Fe.size > 0) {
|
|
4169
4174
|
let [e, t] = Fe.entries().next().value;
|
|
4170
|
-
Me.fromJSON(t?.persons),
|
|
4175
|
+
Me.fromJSON(t?.persons), j(e);
|
|
4171
4176
|
}
|
|
4172
4177
|
let ze = (e) => {
|
|
4173
4178
|
if (e) return Me.add(e).toJSON();
|
|
4174
4179
|
}, z = {
|
|
4175
|
-
paramMap:
|
|
4176
|
-
getRefs:
|
|
4177
|
-
getRef:
|
|
4178
|
-
parsedRefs:
|
|
4179
|
-
readEmbeddedPart: (e, t) =>
|
|
4180
|
+
paramMap: T,
|
|
4181
|
+
getRefs: M,
|
|
4182
|
+
getRef: N,
|
|
4183
|
+
parsedRefs: k,
|
|
4184
|
+
readEmbeddedPart: (e, t) => De(e, t),
|
|
4180
4185
|
addPerson: ze,
|
|
4181
|
-
serializeElement:
|
|
4182
|
-
onWarning:
|
|
4183
|
-
}, Be = [],
|
|
4184
|
-
if (
|
|
4185
|
-
let e = await
|
|
4186
|
+
serializeElement: ge,
|
|
4187
|
+
onWarning: ne
|
|
4188
|
+
}, Be = [], B = /* @__PURE__ */ new Map();
|
|
4189
|
+
if (T.set(ur, B), n) {
|
|
4190
|
+
let e = await A.getTextStream(n, fe);
|
|
4186
4191
|
if (e) {
|
|
4187
4192
|
let t = ((e, t) => {
|
|
4188
4193
|
let n = !1, r = !1, i = 0, a = "", o = new nr();
|
|
@@ -4203,9 +4208,9 @@ var Tr = {
|
|
|
4203
4208
|
}
|
|
4204
4209
|
};
|
|
4205
4210
|
})((e, t) => {
|
|
4206
|
-
t &&
|
|
4211
|
+
t && B.set(Be.length, t), Be.push(e);
|
|
4207
4212
|
}, (e) => {
|
|
4208
|
-
|
|
4213
|
+
ne(e, n);
|
|
4209
4214
|
});
|
|
4210
4215
|
try {
|
|
4211
4216
|
await Sn.parseStream(e, t, { xmlns: !1 });
|
|
@@ -4215,37 +4220,37 @@ var Tr = {
|
|
|
4215
4220
|
}
|
|
4216
4221
|
}
|
|
4217
4222
|
x?.mark("shared-strings");
|
|
4218
|
-
let
|
|
4219
|
-
let t =
|
|
4223
|
+
let V = Be.length, H = /* @__PURE__ */ new Map(), Ke = V, qe = (e) => {
|
|
4224
|
+
let t = H.get(e);
|
|
4220
4225
|
if (t !== void 0) return t;
|
|
4221
|
-
let n =
|
|
4222
|
-
return
|
|
4223
|
-
},
|
|
4224
|
-
t.slicersCache =
|
|
4225
|
-
let
|
|
4226
|
-
for (let e = 0; e <
|
|
4227
|
-
let t =
|
|
4228
|
-
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) &&
|
|
4229
|
-
}
|
|
4230
|
-
let
|
|
4231
|
-
|
|
4232
|
-
e?.cacheName && (e.cachePath = t,
|
|
4233
|
-
}),
|
|
4234
|
-
let
|
|
4235
|
-
t.slicers =
|
|
4236
|
-
for (let e = 0; e <
|
|
4237
|
-
let t =
|
|
4238
|
-
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") &&
|
|
4239
|
-
}
|
|
4240
|
-
let
|
|
4226
|
+
let n = Ke;
|
|
4227
|
+
return H.set(e, Ke++), Be.push(e), n;
|
|
4228
|
+
}, Je = [];
|
|
4229
|
+
t.slicersCache = Je;
|
|
4230
|
+
let Ye = A.getNames(), Xe = Ye.length;
|
|
4231
|
+
for (let e = 0; e < Xe; e++) {
|
|
4232
|
+
let t = Ye[e];
|
|
4233
|
+
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) && Je.push(`/${t}`);
|
|
4234
|
+
}
|
|
4235
|
+
let $e = r("slicersCache", t, e, D, E, z), et = /* @__PURE__ */ new Map();
|
|
4236
|
+
$e.forEach((e, t) => {
|
|
4237
|
+
e?.cacheName && (e.cachePath = t, et.set(e.cacheName, e));
|
|
4238
|
+
}), T.set("slicerCaches", et);
|
|
4239
|
+
let G = [];
|
|
4240
|
+
t.slicers = G;
|
|
4241
|
+
for (let e = 0; e < Xe; e++) {
|
|
4242
|
+
let t = Ye[e];
|
|
4243
|
+
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") && G.push(`/${t}`);
|
|
4244
|
+
}
|
|
4245
|
+
let tt = {
|
|
4241
4246
|
getFile: e,
|
|
4242
|
-
domParser:
|
|
4247
|
+
domParser: D,
|
|
4243
4248
|
getAddress: (e, t) => {
|
|
4244
|
-
let n =
|
|
4249
|
+
let n = N(t, e, !1);
|
|
4245
4250
|
return typeof n == "string" ? n : null;
|
|
4246
4251
|
},
|
|
4247
4252
|
getBytes: (t, n) => {
|
|
4248
|
-
let r =
|
|
4253
|
+
let r = P(n, t), i = r ? e(r.substring(1))?.content : void 0;
|
|
4249
4254
|
return i ? i.slice().buffer : null;
|
|
4250
4255
|
},
|
|
4251
4256
|
addFetched: (e, t) => {
|
|
@@ -4253,38 +4258,38 @@ var Tr = {
|
|
|
4253
4258
|
source: { buffer: e },
|
|
4254
4259
|
fetchedFrom: t
|
|
4255
4260
|
});
|
|
4256
|
-
return n.addReference(
|
|
4261
|
+
return n.addReference(me), he.add(n), ue.toResourceId(n);
|
|
4257
4262
|
},
|
|
4258
|
-
markAbsorbed:
|
|
4259
|
-
},
|
|
4260
|
-
for (let e of
|
|
4261
|
-
let
|
|
4263
|
+
markAbsorbed: j
|
|
4264
|
+
}, nt = /* @__PURE__ */ new Map();
|
|
4265
|
+
for (let e of w.getAll()) nt.set(e.structure, e.beginRead(tt));
|
|
4266
|
+
let rt = ((e, t) => {
|
|
4262
4267
|
let n = (n) => {
|
|
4263
4268
|
let r = e(n);
|
|
4264
4269
|
return r ? t.parseFromString(new TextDecoder().decode(r.content), "text/xml").documentElement ?? null : null;
|
|
4265
|
-
}, r =
|
|
4270
|
+
}, r = q(n(yt), "s").map((e) => ({
|
|
4266
4271
|
t: e.getAttribute("t") ?? "",
|
|
4267
|
-
keys:
|
|
4268
|
-
})), i =
|
|
4269
|
-
let t =
|
|
4272
|
+
keys: Et(e)
|
|
4273
|
+
})), i = q(n(bt), "rv").map((e) => {
|
|
4274
|
+
let t = q(e, "fb")[0];
|
|
4270
4275
|
return {
|
|
4271
4276
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
4272
|
-
values:
|
|
4277
|
+
values: q(e, "v").map((e) => e.textContent ?? ""),
|
|
4273
4278
|
fb: t ? t.textContent ?? "" : null
|
|
4274
4279
|
};
|
|
4275
|
-
}), a =
|
|
4276
|
-
let t =
|
|
4280
|
+
}), a = q(n(xt), "a").map((e) => {
|
|
4281
|
+
let t = Dt(e), n = parseInt(e.getAttribute("r") ?? "", 10), r = parseInt(e.getAttribute("c") ?? "", 10), i = n > 0 ? n : t.length;
|
|
4277
4282
|
return {
|
|
4278
4283
|
rows: i,
|
|
4279
4284
|
columns: r > 0 ? r : Math.max(1, Math.ceil(t.length / Math.max(1, i))),
|
|
4280
4285
|
items: t
|
|
4281
4286
|
};
|
|
4282
|
-
}), o =
|
|
4287
|
+
}), o = q(n(St), "s").map(Et), s = n(Ct), c = q(q(s, "spbArrays")[0], "a").map(Dt), l = q(q(s, "spbData")[0], "spb").map((e) => ({
|
|
4283
4288
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
4284
|
-
values:
|
|
4285
|
-
})), u = n(
|
|
4286
|
-
for (let e of
|
|
4287
|
-
let p = n(
|
|
4289
|
+
values: q(e, "v").map((e) => e.textContent ?? "")
|
|
4290
|
+
})), u = n(wt), d = Ot(q(q(u, "global")[0], "keyFlags")[0]), f = /* @__PURE__ */ new Map();
|
|
4291
|
+
for (let e of q(q(u, "types")[0], "type")) f.set(e.getAttribute("name") ?? "", Ot(q(e, "keyFlags")[0]));
|
|
4292
|
+
let p = n(Tt), m = q(q(p, "dxfs")[0], "dxf").map((e) => q(e, "numFmt")[0]?.getAttribute("formatCode") ?? null), h = q(q(p, "richProperties")[0], "rPr").map((e) => e.getAttribute("n") ?? "");
|
|
4288
4293
|
return {
|
|
4289
4294
|
structures: r,
|
|
4290
4295
|
values: i,
|
|
@@ -4294,9 +4299,9 @@ var Tr = {
|
|
|
4294
4299
|
bags: l,
|
|
4295
4300
|
globalKeyFlags: d,
|
|
4296
4301
|
typeKeyFlags: f,
|
|
4297
|
-
richStyles:
|
|
4302
|
+
richStyles: q(q(p, "richStyles")[0], "rSty").map((e) => {
|
|
4298
4303
|
let t = /* @__PURE__ */ new Map();
|
|
4299
|
-
for (let n of
|
|
4304
|
+
for (let n of q(e, "rpv")) {
|
|
4300
4305
|
let e = h[parseInt(n.getAttribute("i") ?? "-1", 10)];
|
|
4301
4306
|
e && t.set(e, n.textContent ?? "");
|
|
4302
4307
|
}
|
|
@@ -4308,23 +4313,23 @@ var Tr = {
|
|
|
4308
4313
|
};
|
|
4309
4314
|
})
|
|
4310
4315
|
};
|
|
4311
|
-
})(e,
|
|
4312
|
-
|
|
4316
|
+
})(e, D), it = Ne(rt, nt, (e) => {
|
|
4317
|
+
ne(e, "/xl/richData/rdrichvalue.xml");
|
|
4313
4318
|
});
|
|
4314
|
-
|
|
4315
|
-
for (let e = 0; e <
|
|
4316
|
-
let t =
|
|
4317
|
-
t.startsWith("xl/richData/") && !t.includes("/_rels/") &&
|
|
4318
|
-
}
|
|
4319
|
-
let
|
|
4320
|
-
if (
|
|
4321
|
-
let e =
|
|
4322
|
-
e?.value?.[1] && (
|
|
4323
|
-
}
|
|
4324
|
-
let
|
|
4325
|
-
|
|
4326
|
-
let
|
|
4327
|
-
|
|
4319
|
+
T.set("richData", rt.values.map((e, t) => it.cellValue(t)));
|
|
4320
|
+
for (let e = 0; e < Xe; e++) {
|
|
4321
|
+
let t = Ye[e];
|
|
4322
|
+
t.startsWith("xl/richData/") && !t.includes("/_rels/") && j(t);
|
|
4323
|
+
}
|
|
4324
|
+
let at = r("themes", t, e, D, E, z), ct = null;
|
|
4325
|
+
if (at && at.entries) {
|
|
4326
|
+
let e = at.entries().next();
|
|
4327
|
+
e?.value?.[1] && (ct = e.value[1]);
|
|
4328
|
+
}
|
|
4329
|
+
let lt = new dt(ct), ut = r("styles", t, e, D, E, z).entries().next()?.value?.[1];
|
|
4330
|
+
ut &&= JSON.parse(U.JSONStableStringify(ut));
|
|
4331
|
+
let ft = r("workbooks", t, e, D, E, z);
|
|
4332
|
+
T.set(lr, !0 === ft.entries().next().value?.[1]?.date1904), (h.calcOnLoad ?? p) !== "none" && T.set(cr, ((e, t) => {
|
|
4328
4333
|
let n = /* @__PURE__ */ new Set();
|
|
4329
4334
|
if (e) for (let t = 0; t < e.length; t++) n.add(String(e[t]?.name).toUpperCase());
|
|
4330
4335
|
if (t) for (let e = 0; e < t.length; e++) try {
|
|
@@ -4335,10 +4340,10 @@ var Tr = {
|
|
|
4335
4340
|
}, /* @__PURE__ */ new Map());
|
|
4336
4341
|
for (let e of r.keys()) n.add(e.toUpperCase());
|
|
4337
4342
|
} catch {}
|
|
4338
|
-
return (e) => n.has(e) ||
|
|
4339
|
-
})(
|
|
4343
|
+
return (e) => n.has(e) || Ze.has(e);
|
|
4344
|
+
})(ft.entries().next().value?.[1]?.names, h.functions)), x?.mark("side-parts-json"), await Promise.all(ve);
|
|
4340
4345
|
{
|
|
4341
|
-
let e =
|
|
4346
|
+
let e = ft.entries().next().value?.[1], t = d(e?.names), n = e?.sheets ?? [];
|
|
4342
4347
|
for (let e = 0; e < n.length; e++) {
|
|
4343
4348
|
let r = n[e], i = y(r);
|
|
4344
4349
|
if (r?.kind === "macro" && i?.part.xml) {
|
|
@@ -4354,12 +4359,12 @@ var Tr = {
|
|
|
4354
4359
|
typeof n == "string" && (r[e].ref = t.readDetached(n));
|
|
4355
4360
|
}
|
|
4356
4361
|
}
|
|
4357
|
-
|
|
4358
|
-
let
|
|
4359
|
-
...
|
|
4360
|
-
styles:
|
|
4361
|
-
theme:
|
|
4362
|
-
},
|
|
4362
|
+
oe && le > 0 && (oe(ce, ce), await new Promise((e) => setTimeout(e, 0))), x?.mark("sheets");
|
|
4363
|
+
let K = {
|
|
4364
|
+
...ft.entries().next().value?.[1],
|
|
4365
|
+
styles: ut,
|
|
4366
|
+
theme: lt.toJSON()
|
|
4367
|
+
}, mt = ((e, t, n, r) => {
|
|
4363
4368
|
let i = {}, a = (e, t) => {
|
|
4364
4369
|
if (e) for (let { key: n, value: r } of e) {
|
|
4365
4370
|
let e = t[n];
|
|
@@ -4381,9 +4386,9 @@ var Tr = {
|
|
|
4381
4386
|
}
|
|
4382
4387
|
return Object.keys(i).length > 0 ? i : void 0;
|
|
4383
4388
|
})(Oe.values().next().value?.properties, ke.values().next().value?.properties, je.values().next().value?.custom, (e, t) => {
|
|
4384
|
-
|
|
4389
|
+
ne(e, "docProps/custom.xml", t);
|
|
4385
4390
|
});
|
|
4386
|
-
|
|
4391
|
+
mt && (K.properties = mt), ((e, t) => {
|
|
4387
4392
|
if (!t || t.size === 0) return;
|
|
4388
4393
|
let n = e.styles;
|
|
4389
4394
|
if (!n) return;
|
|
@@ -4420,26 +4425,26 @@ var Tr = {
|
|
|
4420
4425
|
for (let e of r) e !== 0 && Mr(a[e] ?? (a[e] = {}), !0);
|
|
4421
4426
|
for (let e of i) e !== 0 && Mr(a[e] ?? (a[e] = {}), !1);
|
|
4422
4427
|
if (r.has(0)) {
|
|
4423
|
-
let e = n.named ??= [], t =
|
|
4428
|
+
let e = n.named ??= [], t = Qe.BuiltInName.Normal.toLowerCase(), r = e.find((e) => e.name?.toLowerCase() === t);
|
|
4424
4429
|
r || (r = {
|
|
4425
|
-
name:
|
|
4430
|
+
name: Qe.BuiltInName.Normal,
|
|
4426
4431
|
style: {}
|
|
4427
4432
|
}, e.push(r)), Mr(r.style, !0);
|
|
4428
4433
|
}
|
|
4429
|
-
})(
|
|
4434
|
+
})(K, T.get(kr)), ((e, t) => {
|
|
4430
4435
|
if (t && t.size !== 0) for (let n of e.sheets ?? []) {
|
|
4431
4436
|
let e = _(n), r = e?.pivotTables;
|
|
4432
4437
|
if (!e || !r || r.length === 0) continue;
|
|
4433
|
-
let i = r.map(
|
|
4438
|
+
let i = r.map(L), a = r.map(() => []);
|
|
4434
4439
|
for (let [n, r] of e.directStyles ?? []) {
|
|
4435
4440
|
if (!t.has(r)) continue;
|
|
4436
|
-
let e =
|
|
4441
|
+
let e = W.fastStringToRange(n);
|
|
4437
4442
|
for (let t = 0; t < i.length; t++) {
|
|
4438
4443
|
let n = i[t];
|
|
4439
4444
|
if (!n) continue;
|
|
4440
4445
|
let r = Math.max(e.rowStart, n.rowStart), o = Math.min(e.rowEnd, n.rowEnd), s = Math.max(e.colStart, n.colStart), c = Math.min(e.colEnd, n.colEnd);
|
|
4441
4446
|
if (r > o || s > c) continue;
|
|
4442
|
-
let l =
|
|
4447
|
+
let l = W.rangeToString({
|
|
4443
4448
|
rowStart: r - n.rowStart,
|
|
4444
4449
|
rowEnd: o - n.rowStart,
|
|
4445
4450
|
colStart: s - n.colStart,
|
|
@@ -4450,13 +4455,13 @@ var Tr = {
|
|
|
4450
4455
|
}
|
|
4451
4456
|
for (let e = 0; e < r.length; e++) a[e].length > 0 && (r[e].buttons = a[e]);
|
|
4452
4457
|
}
|
|
4453
|
-
})(
|
|
4454
|
-
let
|
|
4455
|
-
Pr(
|
|
4458
|
+
})(K, T.get(Nr));
|
|
4459
|
+
let gt = T.get(Gr);
|
|
4460
|
+
Pr(K, gt), ((e) => {
|
|
4456
4461
|
let t = {
|
|
4457
4462
|
colStart: 0,
|
|
4458
4463
|
rowStart: 0,
|
|
4459
|
-
colEnd:
|
|
4464
|
+
colEnd: I,
|
|
4460
4465
|
rowEnd: Re
|
|
4461
4466
|
};
|
|
4462
4467
|
for (let n of e.sheets ?? []) {
|
|
@@ -4466,14 +4471,14 @@ var Tr = {
|
|
|
4466
4471
|
if (Jr(e.cols, !0, t, r), Jr(e.rows, !1, t, r), r.length === 0) continue;
|
|
4467
4472
|
let i = [];
|
|
4468
4473
|
for (let [t, n] of e.directStyles ?? []) i.push({
|
|
4469
|
-
...
|
|
4474
|
+
...W.fastStringToRange(t),
|
|
4470
4475
|
value: {
|
|
4471
4476
|
kind: 0,
|
|
4472
4477
|
index: n
|
|
4473
4478
|
}
|
|
4474
4479
|
});
|
|
4475
4480
|
i.push(...r);
|
|
4476
|
-
let a = [], o = new
|
|
4481
|
+
let a = [], o = new We.IteratorInstance(i, { axis: Ge.Column });
|
|
4477
4482
|
for (let e = o.next(); !e.done; e = o.next()) {
|
|
4478
4483
|
let n = e.value.overlaps, r;
|
|
4479
4484
|
if (n.length === 1) {
|
|
@@ -4486,11 +4491,11 @@ var Tr = {
|
|
|
4486
4491
|
}
|
|
4487
4492
|
r = e ?? t ?? i;
|
|
4488
4493
|
}
|
|
4489
|
-
a.push([
|
|
4494
|
+
a.push([W.rangeToString(e.value.range, t), r.index]);
|
|
4490
4495
|
}
|
|
4491
4496
|
a.length > 0 ? e.directStyles = a : delete e.directStyles;
|
|
4492
4497
|
}
|
|
4493
|
-
})(
|
|
4498
|
+
})(K), gt && ((e, t, n) => {
|
|
4494
4499
|
if (!t || t.size === 0 || !n) return;
|
|
4495
4500
|
let r = (e) => {
|
|
4496
4501
|
if (e === void 0 || e === 0) return null;
|
|
@@ -4518,31 +4523,31 @@ var Tr = {
|
|
|
4518
4523
|
});
|
|
4519
4524
|
e.cellControls = i;
|
|
4520
4525
|
}
|
|
4521
|
-
})(
|
|
4526
|
+
})(K, gt, r("featurePropertyBag", t, e, D, E, z).values().next().value?.featurePropertyBag);
|
|
4522
4527
|
{
|
|
4523
4528
|
let n = /* @__PURE__ */ new Map();
|
|
4524
|
-
r("slicers", t, e,
|
|
4529
|
+
r("slicers", t, e, D, E, z).forEach((e, t) => {
|
|
4525
4530
|
e?.slicers && n.set(t, e.slicers);
|
|
4526
|
-
}),
|
|
4531
|
+
}), ht(K, {
|
|
4527
4532
|
warn: (e, t) => {
|
|
4528
|
-
|
|
4533
|
+
ne(e, "xl/slicers", t);
|
|
4529
4534
|
},
|
|
4530
|
-
markAbsorbed:
|
|
4535
|
+
markAbsorbed: j,
|
|
4531
4536
|
slicerParts: n
|
|
4532
4537
|
});
|
|
4533
4538
|
}
|
|
4534
|
-
|
|
4535
|
-
...
|
|
4539
|
+
K.calc = {
|
|
4540
|
+
...K.calc ?? {},
|
|
4536
4541
|
legacyIntersect: !0
|
|
4537
|
-
}, Be.length > 0 && (
|
|
4538
|
-
let
|
|
4539
|
-
|
|
4540
|
-
let
|
|
4541
|
-
if (
|
|
4542
|
-
let { VBAProject: e } = await import("./
|
|
4542
|
+
}, Be.length > 0 && (K.strings = Be);
|
|
4543
|
+
let _t = Me.toJSON();
|
|
4544
|
+
_t && _t.length > 0 && (K.people = _t);
|
|
4545
|
+
let vt = A.getEntry("xl/vbaProject.bin");
|
|
4546
|
+
if (vt) try {
|
|
4547
|
+
let { VBAProject: e } = await import("./fw-xerhhOIbrtjj8.mjs"), t = e.extract(vt);
|
|
4543
4548
|
if (t) {
|
|
4544
4549
|
let n = /* @__PURE__ */ new Map();
|
|
4545
|
-
for (let e of
|
|
4550
|
+
for (let e of K.sheets ?? []) {
|
|
4546
4551
|
let t = _(e), r = t?.codeName;
|
|
4547
4552
|
r && n.set(r, t);
|
|
4548
4553
|
}
|
|
@@ -4551,37 +4556,37 @@ var Tr = {
|
|
|
4551
4556
|
a && (t.source = a), i && (t.sourceHeader = i);
|
|
4552
4557
|
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
4553
4558
|
o || r.type !== "document" || (t.scope = "workbook");
|
|
4554
|
-
let s = o ? o.modules ??= {} :
|
|
4559
|
+
let s = o ? o.modules ??= {} : K.modules ??= {};
|
|
4555
4560
|
s[r.name] || (s[r.name] = t);
|
|
4556
4561
|
}
|
|
4557
4562
|
s?.(t);
|
|
4558
|
-
} else
|
|
4563
|
+
} else S.push(["Unable to parse VBA project.", "xl/vbaProject.bin"]);
|
|
4559
4564
|
} catch (e) {
|
|
4560
|
-
|
|
4565
|
+
S.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
4561
4566
|
}
|
|
4562
|
-
let
|
|
4567
|
+
let kt = T.get("calcId"), At = kt === void 0 || !(Number(kt) >= 191029), jt = h.calcOnLoad ?? (p === "auto" && At ? "full" : p), Mt = {
|
|
4563
4568
|
...h,
|
|
4564
|
-
calcOnLoad:
|
|
4569
|
+
calcOnLoad: jt,
|
|
4565
4570
|
resources: v,
|
|
4566
|
-
json:
|
|
4571
|
+
json: K
|
|
4567
4572
|
};
|
|
4568
|
-
if (
|
|
4569
|
-
let e =
|
|
4570
|
-
|
|
4573
|
+
if (Mt.disableLoadAutoFit === void 0) {
|
|
4574
|
+
let e = T.get(Ie);
|
|
4575
|
+
Mt.disableLoadAutoFit = !!e?.declared && e.normalIsThemeFont && await we(e.faces);
|
|
4571
4576
|
}
|
|
4572
4577
|
x?.mark("json-assembled");
|
|
4573
|
-
let
|
|
4574
|
-
if (x?.mark("workbook-constructed"),
|
|
4575
|
-
e.deleteReference(
|
|
4576
|
-
}),
|
|
4577
|
-
g(
|
|
4578
|
+
let Nt = new pt(Mt);
|
|
4579
|
+
if (x?.mark("workbook-constructed"), he.forEach((e) => {
|
|
4580
|
+
e.deleteReference(me);
|
|
4581
|
+
}), ue.endPersist(), te) {
|
|
4582
|
+
g(Nt);
|
|
4578
4583
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
4579
|
-
for (let n of
|
|
4580
|
-
let r =
|
|
4584
|
+
for (let n of A.getNames()) {
|
|
4585
|
+
let r = A.getEntry(n);
|
|
4581
4586
|
if (!r) continue;
|
|
4582
|
-
let i =
|
|
4587
|
+
let i = A.getRawEntry(n), a = i ? {
|
|
4583
4588
|
data: r,
|
|
4584
|
-
uncompressedSize:
|
|
4589
|
+
uncompressedSize: A.uncompressedSize(n),
|
|
4585
4590
|
raw: {
|
|
4586
4591
|
compressedData: i.data,
|
|
4587
4592
|
compressionMethod: i.compressionMethod,
|
|
@@ -4589,39 +4594,39 @@ var Tr = {
|
|
|
4589
4594
|
}
|
|
4590
4595
|
} : {
|
|
4591
4596
|
data: r,
|
|
4592
|
-
uncompressedSize:
|
|
4597
|
+
uncompressedSize: A.uncompressedSize(n)
|
|
4593
4598
|
};
|
|
4594
4599
|
e.set(n, a), t += r.byteLength;
|
|
4595
4600
|
}
|
|
4596
|
-
if (t > 67108864)
|
|
4601
|
+
if (t > 67108864) S.push([`Source package too large to retain (${t} bytes, limit ${i}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
4597
4602
|
else if (e.size > 0) {
|
|
4598
|
-
let t = new
|
|
4599
|
-
b(
|
|
4600
|
-
let n =
|
|
4603
|
+
let t = new F(e, ye);
|
|
4604
|
+
b(Nt, t);
|
|
4605
|
+
let n = Nt.getWorksheets().getItems(), r = Nt.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
4601
4606
|
let n = e.getOperation()?.name;
|
|
4602
4607
|
n !== "insertCells" && n !== "deleteCells" || t.markStructuralChange();
|
|
4603
|
-
} }), i =
|
|
4604
|
-
let e =
|
|
4608
|
+
} }), i = Nt.addListeners({ onSheetsChange: () => {
|
|
4609
|
+
let e = Nt.getWorksheets().getItems();
|
|
4605
4610
|
(e.length !== n.length || e.some((e, t) => e !== n[t])) && t.markStructuralChange(), n = e;
|
|
4606
4611
|
} });
|
|
4607
|
-
|
|
4608
|
-
r(), i(), g(
|
|
4612
|
+
Nt.addListeners({ onClose: () => {
|
|
4613
|
+
r(), i(), g(Nt);
|
|
4609
4614
|
} });
|
|
4610
4615
|
}
|
|
4611
4616
|
}
|
|
4612
|
-
if (
|
|
4617
|
+
if (S.length && ae?.onWarning) {
|
|
4613
4618
|
let e = /* @__PURE__ */ new Set();
|
|
4614
|
-
for (let t of
|
|
4619
|
+
for (let t of S) {
|
|
4615
4620
|
let [n, r, i] = t, a = i ?? n;
|
|
4616
|
-
e.has(a) || (e.add(a),
|
|
4621
|
+
e.has(a) || (e.add(a), ae.onWarning(n, r));
|
|
4617
4622
|
}
|
|
4618
4623
|
}
|
|
4619
|
-
return x && !0 === u && console.table(x.toTable()), await
|
|
4624
|
+
return x && !0 === u && console.table(x.toTable()), await Nt.whenFontsReady(), Nt;
|
|
4620
4625
|
} catch (e) {
|
|
4621
4626
|
let t = "Unable to parse XLSX.";
|
|
4622
|
-
throw e instanceof
|
|
4627
|
+
throw e instanceof at && (t = "Unable to open XLSX. There are too many rows or columns."), Error(t, { cause: e });
|
|
4623
4628
|
} finally {
|
|
4624
|
-
await
|
|
4629
|
+
await A.close().catch(() => {});
|
|
4625
4630
|
}
|
|
4626
4631
|
};
|
|
4627
4632
|
export { dr as a, kr as i, Gr as n, Nr as r, ti as readXLSX, Xr as t };
|