@sheetxl/io-xlsx 0.8.0-beta.11 → 0.8.0-beta.12

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