@sheetxl/io-xlsx 0.7.28-beta.4 → 0.8.0-beta.2

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 (89) hide show
  1. package/browser/cjs/BzOEBR0jaxXg9wvt.cjs +5 -0
  2. package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +2 -0
  3. package/browser/cjs/Ca-xJDjg5bOpUPXX.cjs +1 -0
  4. package/browser/cjs/{D5Y4KQhKdukOkjvA.cjs → D3EWCPfCu-qMOIGd.cjs} +1 -2
  5. package/browser/cjs/{DK9GutW2zPbyNlfU.cjs → DULsYP_GcPGLVYSE.cjs} +10 -1
  6. package/browser/cjs/DtBN3UOzNJjYBwJ6.cjs +1 -0
  7. package/browser/cjs/index.cjs +1 -1
  8. package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +1 -0
  9. package/browser/esm/B9q618XELV7uWJsA.mjs +67 -0
  10. package/browser/esm/{D8qZcXzj_fdusd0Y.mjs → BwbMurFOptAFs7gC.mjs} +1596 -1130
  11. package/browser/esm/{BhohPLTubb_9rfrh.mjs → CMHb6pUUmsCP9r_9.mjs} +2 -2
  12. package/browser/esm/{saBnxecsRUpY6fGv.mjs → CMzkLUwbgA73RvCb.mjs} +1 -1
  13. package/browser/esm/D75_rfogFUfXADKc.mjs +3324 -0
  14. package/browser/esm/{DlBlJGlFQJrKovwJ.mjs → DfuBawaydlvgZMR-.mjs} +1827 -1050
  15. package/browser/esm/{BknJ4AeVeFJploh9.mjs → DhqYgh9G2vLn7mIE.mjs} +28 -13
  16. package/browser/esm/DoMlKUCnMSlR2qX5.mjs +159 -0
  17. package/browser/esm/{CV_L3E5OoPstI9lx.mjs → DtpWa7tZahylJ3HS.mjs} +446 -347
  18. package/browser/esm/{BXCOn1XvLvYSfpzi.mjs → IZf0hIeLYj3T0Xvu.mjs} +2 -2
  19. package/browser/esm/{C3sYFBc7Tym8l12A.mjs → _UDbQq5-pHbU1f82.mjs} +1 -1
  20. package/browser/esm/index.mjs +3 -3
  21. package/node/esm/{DsZ19z4oXoL-d0Lk.mjs → BD03jrMQ_UKA196-.mjs} +1937 -1142
  22. package/node/esm/{B6lQXVQjFT_OE3IA.mjs → Bi_kZVtZams7taqa.mjs} +2 -2
  23. package/node/esm/{BYCpXFieBgL_cwTO.mjs → BxHvzSROx_N_7nJH.mjs} +607 -506
  24. package/node/esm/{CfIzBnObj09fDuUX.mjs → CB1ijGbhl-e2l6Mm.mjs} +49 -35
  25. package/node/esm/CO1M1H1N6fB422K-.mjs +2959 -0
  26. package/node/esm/CWpezSa6TERGEv-B.mjs +3410 -0
  27. package/node/esm/{B9CUp-rqol5K1r1c.mjs → CY-pSutJLHskZfXZ.mjs} +1 -1
  28. package/node/esm/Dezt2uIDqlxjiuk5.mjs +170 -0
  29. package/node/esm/index.mjs +40 -25
  30. package/package.json +3 -3
  31. package/types/src/ConditionalFormatRules.d.ts +3 -3
  32. package/types/src/DataValidationRules.d.ts +18 -2
  33. package/types/src/ExcelCalcStamp.d.ts +39 -0
  34. package/types/src/ExcelCompat.d.ts +197 -42
  35. package/types/src/LegacyFormula.d.ts +28 -7
  36. package/types/src/Plugin.d.ts +16 -5
  37. package/types/src/ProtectionAttributes.d.ts +38 -0
  38. package/types/src/SourcePackage.d.ts +31 -12
  39. package/types/src/Types.d.ts +17 -0
  40. package/types/src/reader/HiddenFormulas.d.ts +16 -0
  41. package/types/src/reader/Warning.d.ts +29 -0
  42. package/types/src/reader/dom/DOMTransformer.d.ts +1 -1
  43. package/types/src/reader/dom/ExecutionContext.d.ts +16 -3
  44. package/types/src/reader/dom/Types.d.ts +19 -3
  45. package/types/src/reader/domVisitors/CommentVisitor.d.ts +18 -1
  46. package/types/src/reader/domVisitors/CommentsVisitor.d.ts +2 -2
  47. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +21 -3
  48. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  49. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -1
  50. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -1
  51. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  52. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +11 -1
  53. package/types/src/reader/sax/LeanSaxParser.d.ts +58 -0
  54. package/types/src/reader/sax/SaxParser.d.ts +11 -1
  55. package/types/src/reader/sax/SaxVisitor.d.ts +3 -2
  56. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +9 -0
  57. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +11 -4
  58. package/types/src/utils/VmlNoteShapes.d.ts +75 -0
  59. package/types/src/vba/VBAProject.d.ts +52 -4
  60. package/types/src/writer/builder/ContentTypes.d.ts +13 -0
  61. package/types/src/writer/builder/Emitter.d.ts +6 -6
  62. package/types/src/writer/builder/EmitterRegistry.d.ts +7 -0
  63. package/types/src/writer/builder/OpcXmlUtils.d.ts +2 -0
  64. package/types/src/writer/builder/PackageBuilder.d.ts +70 -22
  65. package/types/src/writer/builder/PartWriter.d.ts +5 -0
  66. package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
  67. package/types/src/writer/builder/Types.d.ts +107 -38
  68. package/types/src/writer/builder/_Types.d.ts +17 -0
  69. package/types/src/writer/emitters/CommentsEmitter.d.ts +52 -0
  70. package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
  71. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
  72. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
  73. package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
  74. package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
  75. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +21 -0
  76. package/types/src/writer/emitters/WorkbookEmitter.d.ts +16 -3
  77. package/types/src/writer/utils/DrawMLUtils.d.ts +16 -1
  78. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
  79. package/browser/cjs/Bhq8KfEhCnRykWeS.cjs +0 -1
  80. package/browser/cjs/BmG0GOcbuYvt3-R2.cjs +0 -1
  81. package/browser/cjs/D3YH3tTndeltJsh5.cjs +0 -1
  82. package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
  83. package/browser/cjs/Dmi-Tsz618B6vKpZ.cjs +0 -5
  84. package/browser/esm/BcnofzmeeuCVzr_M.mjs +0 -52
  85. package/browser/esm/C7R1lFA0iv-1bZ9i.mjs +0 -99
  86. package/browser/esm/DLEtaZiz_1cZH0dA.mjs +0 -2685
  87. package/node/esm/BSrW-J3BEH4Tza_S.mjs +0 -2486
  88. package/node/esm/Bqi4c7-14v0oNgFN.mjs +0 -108
  89. package/node/esm/D0frS50CfyeuXcuz.mjs +0 -2766
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.7.28-beta.4
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.2
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 { a as t, d as e, f as s, i as r, m as o, n as i, o as n, p as l, r as a, t as c } from "./Bqi4c7-14v0oNgFN.mjs";
8
- import { o as u } from "./BSrW-J3BEH4Tza_S.mjs";
9
- import { CommonUtils as h } from "@sheetxl/utils";
10
- import { AddressUtils as p, FormulaError as d, IBorder as g, ICondition as m, IEffect as b, IFill as A, IFont as f, IRange as y, IStyle as v, ITextFrame as N, Sort as F, Tuple as C } from "@sheetxl/sdk";
11
- var w = class {
7
+ import { a as t, c as e, g as s, i as r, m as o, o as i, p as n, r as a, s as l, t as c } from "./Dezt2uIDqlxjiuk5.mjs";
8
+ import { b as u, g as h, x as p } from "./CO1M1H1N6fB422K-.mjs";
9
+ import { CommonUtils as d } from "@sheetxl/utils";
10
+ import { AddressUtils as g, FormulaError as m, IBorders as b, ICondition as f, IEffect as A, IFill as y, IFont as v, IRange as N, IStyle as F, ITextFrame as C, Sort as w, Tuple as P } from "@sheetxl/sdk";
11
+ var S = class {
12
12
  constructor(t) {
13
13
  this.list = t;
14
14
  }
@@ -34,23 +34,26 @@ var w = class {
34
34
  [Symbol.iterator]() {
35
35
  return this.list.values();
36
36
  }
37
- }, P = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t && "0" !== t && "off" !== t && "false" !== t && null, S = (t) => {
37
+ }, x = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t && "0" !== t && "off" !== t && "false" !== t && null, T = (t) => {
38
38
  const e = parseInt(t);
39
39
  return isNaN(e) ? null : e;
40
40
  }, O = (t) => {
41
41
  const e = parseFloat(t);
42
42
  return isNaN(e) ? null : e;
43
- }, T = /* @__PURE__ */ new Map(), x = class {
44
- constructor(t, e, s, r, o, i = null, n = h.EmptyObject) {
43
+ }, k = /* @__PURE__ */ new Map(), V = class {
44
+ constructor(t, e, s, r, o, i = null, n = d.EmptyObject) {
45
45
  this._fileLocation = "";
46
- const l = (t, e, s) => n?.getRef?.(t, e, s, n?.parsedRefs), a = (t) => n?.getRefs?.(t, n?.parsedRefs);
47
- this._parent = t, this.sharedShared = e, this.currentPath = s, this.elemRoot = r, this.jsonRoot = o, t ? (this._fileLocation = t._fileLocation, this._getRef = t._getRef, this._getRefs = t._getRefs, this._serializeElement = t._serializeElement) : (i && (this._fileLocation = i), n?.getRef && (this._getRef = l), n?.getRefs && (this._getRefs = a), this._onWarning = n?.onWarning, this._addPerson = n?.addPerson, this._serializeElement = n?.serializeElement);
46
+ const a = (t, e, s) => n?.getRef?.(t, e, s, n?.parsedRefs), l = (t) => n?.getRefs?.(t, n?.parsedRefs);
47
+ this._parent = t, this.sharedShared = e, this.currentPath = s, this.elemRoot = r, this.jsonRoot = o, t ? (this._fileLocation = t._fileLocation, this._getRef = t._getRef, this._getRefs = t._getRefs, this._serializeElement = t._serializeElement, this._readEmbeddedPart = t._readEmbeddedPart) : (i && (this._fileLocation = i), n?.getRef && (this._getRef = a), n?.getRefs && (this._getRefs = l), this._onWarning = n?.onWarning, this._addPerson = n?.addPerson, this._serializeElement = n?.serializeElement, this._readEmbeddedPart = n?.readEmbeddedPart);
48
48
  }
49
49
  getRef(t, e = !1) {
50
50
  return this._getRef?.(t, this._fileLocation, e) ?? null;
51
51
  }
52
+ readEmbeddedPart(t) {
53
+ return this._readEmbeddedPart?.(t, this._fileLocation) ?? null;
54
+ }
52
55
  getRelationships() {
53
- return this._getRefs?.(this._fileLocation) ?? T;
56
+ return this._getRefs?.(this._fileLocation) ?? k;
54
57
  }
55
58
  getPath() {
56
59
  return this.currentPath;
@@ -64,8 +67,11 @@ var w = class {
64
67
  getJsonRoot() {
65
68
  return this.jsonRoot;
66
69
  }
67
- warn(t) {
68
- this._onWarning ? this._onWarning(t) : this._parent ? this._parent?.warn?.(t) : console.warn(t);
70
+ warn(t, e) {
71
+ this._raiseWarning(t, this.getFileLocation(), e?.onceKey);
72
+ }
73
+ _raiseWarning(t, e, s) {
74
+ this._onWarning ? this._onWarning(t, e, s) : this._parent ? this._parent._raiseWarning(t, e, s) : console.warn(t);
69
75
  }
70
76
  serializeElement(t) {
71
77
  return this._serializeElement?.(t) ?? null;
@@ -106,7 +112,7 @@ var w = class {
106
112
  }
107
113
  if (s = i, 0 === s.length) return null;
108
114
  }
109
- return 1 === s.length ? s[0] : 0 === s.length ? null : new w(s);
115
+ return 1 === s.length ? s[0] : 0 === s.length ? null : new S(s);
110
116
  }
111
117
  _matchesElementName(t, e) {
112
118
  return e.includes(":") ? (t.tagName || t.nodeName) === e : t.localName === e;
@@ -122,10 +128,10 @@ var w = class {
122
128
  }
123
129
  }
124
130
  getFromPath(t, e) {
125
- return h.getFromPath(t, e);
131
+ return d.getFromPath(t, e);
126
132
  }
127
133
  setToPath(t, e, s) {
128
- return h.setToPath(t, e, s);
134
+ return d.setToPath(t, e, s);
129
135
  }
130
136
  getValAttrAsString(t, e) {
131
137
  let s = this.evaluate(t, e);
@@ -146,10 +152,10 @@ var w = class {
146
152
  return s && s.hasAttribute("val") ? parseFloat(s.getAttribute("val")) ?? null : null;
147
153
  }
148
154
  get BOOLEAN_COPY() {
149
- return P;
155
+ return x;
150
156
  }
151
157
  get INT_COPY() {
152
- return S;
158
+ return T;
153
159
  }
154
160
  get FLOAT_COPY() {
155
161
  return O;
@@ -169,32 +175,32 @@ var w = class {
169
175
  }
170
176
  this.setToPath(s, r, i);
171
177
  }
172
- }, k = o({
173
- isBlank: () => E,
174
- isNotBlank: () => R,
175
- length: () => j,
176
- parseRotation: () => V,
177
- parseValAttrAsBoolean: () => L,
178
- parseValAttrAsFloat: () => _,
179
- parseValAttrAsInteger: () => B,
180
- parseValAttrAsString: () => I
181
- }), V = (t, e) => {
178
+ }, I = s({
179
+ isBlank: () => j,
180
+ isNotBlank: () => D,
181
+ length: () => Y,
182
+ parseRotation: () => L,
183
+ parseValAttrAsBoolean: () => B,
184
+ parseValAttrAsFloat: () => R,
185
+ parseValAttrAsInteger: () => E,
186
+ parseValAttrAsString: () => _
187
+ }), L = (t, e) => {
182
188
  if (!t || !t.hasAttribute("rot")) return;
183
- const s = t.getAttribute("rot"), r = h.roundAccurately(i(s), 2);
184
- -1e3 !== r && (e.rotation = r);
185
- }, I = (t, e, s, r, o) => {
189
+ const s = t.getAttribute("rot"), o = d.roundAccurately(r(s), 2);
190
+ -1e3 !== o && (e.rotation = o);
191
+ }, _ = (t, e, s, r, o) => {
186
192
  const i = t.getValAttrAsString(r, e);
187
193
  null !== i && (s[o] = i);
188
- }, L = (t, e, s, r, o = r, i = null) => {
194
+ }, B = (t, e, s, r, o = r, i = null) => {
189
195
  const n = t.getValAttrAsBoolean(r, e, i);
190
196
  null !== n && (s[o] = n);
191
- }, B = (t, e, s, r, o) => {
197
+ }, E = (t, e, s, r, o) => {
192
198
  const i = t.getValAttrAsInteger(r, e);
193
199
  null !== i && (s[o] = i);
194
- }, _ = (t, e, s, r, o, i = 1) => {
200
+ }, R = (t, e, s, r, o, i = 1) => {
195
201
  const n = t.getValAttrAsFloat(r, e);
196
202
  null !== n && (s[o] = n * i);
197
- }, E = (t) => !t || 0 === t.trim().length, R = (t) => !E(t), j = (t) => t?.length ?? 0, Y = class {
203
+ }, j = (t) => !t || 0 === t.trim().length, D = (t) => !j(t), Y = (t) => t?.length ?? 0, M = class {
198
204
  constructor(t) {
199
205
  this.jsonKey = t;
200
206
  }
@@ -202,33 +208,33 @@ var w = class {
202
208
  const r = {};
203
209
  return s[this.jsonKey] = r, r;
204
210
  }
205
- }, D = class {
211
+ }, z = class {
206
212
  visit(t, e, s) {}
207
213
  getStroke(t, e) {
208
214
  const s = t.evaluate("ln", e);
209
215
  return s ? this.parseLn(t, s) : {};
210
216
  }
211
- parseLn(t, e) {
212
- const s = {};
213
- e.hasAttribute("algn") && (s.align = e.getAttribute("algn")), e.hasAttribute("cap") && (s.lineCap = z(e.getAttribute("cap"))), e.hasAttribute("cmpd") && (s.compound = e.getAttribute("cmpd")), e.hasAttribute("w") && (s.width = n(e.getAttribute("w")));
214
- const o = t.evaluate("miter", e);
215
- o && (s.lineJoin = "miter", o.hasAttribute("lim") && (s.miterLimit = parseFloat(o.getAttribute("lim")) / 1e5)), t.evaluate("bevel", e) && (s.lineJoin = "bevel"), t.evaluate("round", e) && (s.lineJoin = "round");
216
- const i = t.evaluate("custDash", e);
217
- if (i) {
218
- const e = t.evaluate("ds", i);
217
+ parseLn(t, s) {
218
+ const r = {};
219
+ s.hasAttribute("algn") && (r.align = s.getAttribute("algn")), s.hasAttribute("cap") && (r.lineCap = X(s.getAttribute("cap"))), s.hasAttribute("cmpd") && (r.compound = s.getAttribute("cmpd")), s.hasAttribute("w") && (r.width = e(s.getAttribute("w")));
220
+ const o = t.evaluate("miter", s);
221
+ o && (r.lineJoin = "miter", o.hasAttribute("lim") && (r.miterLimit = parseFloat(o.getAttribute("lim")) / 1e5)), t.evaluate("bevel", s) && (r.lineJoin = "bevel"), t.evaluate("round", s) && (r.lineJoin = "round");
222
+ const n = t.evaluate("custDash", s);
223
+ if (n) {
224
+ const e = t.evaluate("ds", n);
219
225
  if (e && e.length > 0) {
220
226
  const t = [];
221
227
  for (let s = 0; s < e.length; s++) {
222
- const o = e.item(s);
223
- t.push(r(o.getAttribute("d") ?? "")), t.push(r(o.getAttribute("sp") ?? ""));
228
+ const r = e.item(s);
229
+ t.push(i(r.getAttribute("d") ?? "")), t.push(i(r.getAttribute("sp") ?? ""));
224
230
  }
225
- s.dash = t;
231
+ r.dash = t;
226
232
  }
227
233
  }
228
- const l = t.evaluate("prstDash", e);
229
- l && l.hasAttribute("val") && (s.dash = l.getAttribute("val")), this.parseEndElement(t, e, s, "headEnd", "head"), this.parseEndElement(t, e, s, "tailEnd", "tail");
230
- const a = this.getFill(t, e);
231
- return a && (s.fill = a), s;
234
+ const a = t.evaluate("prstDash", s);
235
+ a && a.hasAttribute("val") && (r.dash = a.getAttribute("val")), this.parseEndElement(t, s, r, "headEnd", "head"), this.parseEndElement(t, s, r, "tailEnd", "tail");
236
+ const l = this.getFill(t, s);
237
+ return l && (r.fill = l), r;
232
238
  }
233
239
  parseEndElement(t, e, s, r, o) {
234
240
  const i = t.evaluate(r, e);
@@ -250,55 +256,55 @@ var w = class {
250
256
  }
251
257
  return r;
252
258
  }
253
- processEffectElement(t, e, s) {
254
- switch (s) {
259
+ processEffectElement(s, o, n) {
260
+ switch (n) {
255
261
  case "outerShdw": {
256
- const s = {
257
- type: b.Type.OuterShadow,
258
- color: this.processAdjColor(t, e)
262
+ const n = {
263
+ type: A.Type.OuterShadow,
264
+ color: this.processAdjColor(s, o)
259
265
  };
260
- return e.hasAttribute("dist") && (s.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (s.angle = i(e.getAttribute("dir"))), e.hasAttribute("blurRad") && (s.blur = n(e.getAttribute("blurRad"))), e.hasAttribute("algn") && (s.alignment = e.getAttribute("algn")), e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), e.hasAttribute("sx") && (s.scaleX = r(e.getAttribute("sx"))), e.hasAttribute("sy") && (s.scaleY = r(e.getAttribute("sy"))), e.hasAttribute("kx") && (s.skewX = i(e.getAttribute("kx"))), e.hasAttribute("ky") && (s.skewY = i(e.getAttribute("ky"))), s;
266
+ return o.hasAttribute("dist") && (n.distance = e(o.getAttribute("dist"))), o.hasAttribute("dir") && (n.angle = r(o.getAttribute("dir"))), o.hasAttribute("blurRad") && (n.blur = e(o.getAttribute("blurRad"))), o.hasAttribute("algn") && (n.alignment = o.getAttribute("algn")), o.hasAttribute("rotWithShape") && (n.isRotatedWithShape = t(o.getAttribute("rotWithShape"))), o.hasAttribute("sx") && (n.scaleX = i(o.getAttribute("sx"))), o.hasAttribute("sy") && (n.scaleY = i(o.getAttribute("sy"))), o.hasAttribute("kx") && (n.skewX = r(o.getAttribute("kx"))), o.hasAttribute("ky") && (n.skewY = r(o.getAttribute("ky"))), n;
261
267
  }
262
268
  case "innerShdw": {
263
- const s = {
264
- type: b.Type.InnerShadow,
265
- color: this.processAdjColor(t, e)
269
+ const t = {
270
+ type: A.Type.InnerShadow,
271
+ color: this.processAdjColor(s, o)
266
272
  };
267
- return e.hasAttribute("dist") && (s.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (s.angle = i(e.getAttribute("dir"))), e.hasAttribute("blurRad") && (s.blur = n(e.getAttribute("blurRad"))), s;
273
+ return o.hasAttribute("dist") && (t.distance = e(o.getAttribute("dist"))), o.hasAttribute("dir") && (t.angle = r(o.getAttribute("dir"))), o.hasAttribute("blurRad") && (t.blur = e(o.getAttribute("blurRad"))), t;
268
274
  }
269
275
  case "prstShdw": {
270
- const s = {
271
- type: b.Type.PresetShadow,
272
- color: this.processAdjColor(t, e),
273
- preset: e.getAttribute("prst") ?? void 0
276
+ const t = {
277
+ type: A.Type.PresetShadow,
278
+ color: this.processAdjColor(s, o),
279
+ preset: o.getAttribute("prst") ?? void 0
274
280
  };
275
- return e.hasAttribute("dist") && (s.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (s.angle = i(e.getAttribute("dir"))), s;
281
+ return o.hasAttribute("dist") && (t.distance = e(o.getAttribute("dist"))), o.hasAttribute("dir") && (t.angle = r(o.getAttribute("dir"))), t;
276
282
  }
277
283
  case "glow": {
278
- const s = {
279
- type: b.Type.Glow,
280
- color: this.processAdjColor(t, e)
284
+ const t = {
285
+ type: A.Type.Glow,
286
+ color: this.processAdjColor(s, o)
281
287
  };
282
- return e.hasAttribute("rad") && (s.radius = n(e.getAttribute("rad"))), s;
288
+ return o.hasAttribute("rad") && (t.radius = e(o.getAttribute("rad"))), t;
283
289
  }
284
290
  case "softEdge": {
285
- const t = { type: b.Type.SoftEdge };
286
- return e.hasAttribute("rad") && (t.radius = n(e.getAttribute("rad"))), t;
291
+ const t = { type: A.Type.SoftEdge };
292
+ return o.hasAttribute("rad") && (t.radius = e(o.getAttribute("rad"))), t;
287
293
  }
288
294
  case "reflection": {
289
- const t = { type: b.Type.Reflection };
290
- return e.hasAttribute("blurRad") && (t.blur = n(e.getAttribute("blurRad"))), e.hasAttribute("dist") && (t.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (t.angle = i(e.getAttribute("dir"))), e.hasAttribute("fadeDir") && (t.fadeAngle = i(e.getAttribute("fadeDir"))), e.hasAttribute("stA") && (t.startAlpha = r(e.getAttribute("stA"))), e.hasAttribute("stPos") && (t.startPosition = r(e.getAttribute("stPos"))), e.hasAttribute("endA") && (t.endAlpha = r(e.getAttribute("endA"))), e.hasAttribute("endPos") && (t.endPosition = r(e.getAttribute("endPos"))), e.hasAttribute("sx") && (t.scaleX = r(e.getAttribute("sx"))), e.hasAttribute("sy") && (t.scaleY = r(e.getAttribute("sy"))), e.hasAttribute("kx") && (t.skewX = i(e.getAttribute("kx"))), e.hasAttribute("ky") && (t.skewY = i(e.getAttribute("ky"))), e.hasAttribute("algn") && (t.alignment = e.getAttribute("algn")), e.hasAttribute("rotWithShape") && (t.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), t;
295
+ const s = { type: A.Type.Reflection };
296
+ return o.hasAttribute("blurRad") && (s.blur = e(o.getAttribute("blurRad"))), o.hasAttribute("dist") && (s.distance = e(o.getAttribute("dist"))), o.hasAttribute("dir") && (s.angle = r(o.getAttribute("dir"))), o.hasAttribute("fadeDir") && (s.fadeAngle = r(o.getAttribute("fadeDir"))), o.hasAttribute("stA") && (s.startAlpha = i(o.getAttribute("stA"))), o.hasAttribute("stPos") && (s.startPosition = i(o.getAttribute("stPos"))), o.hasAttribute("endA") && (s.endAlpha = i(o.getAttribute("endA"))), o.hasAttribute("endPos") && (s.endPosition = i(o.getAttribute("endPos"))), o.hasAttribute("sx") && (s.scaleX = i(o.getAttribute("sx"))), o.hasAttribute("sy") && (s.scaleY = i(o.getAttribute("sy"))), o.hasAttribute("kx") && (s.skewX = r(o.getAttribute("kx"))), o.hasAttribute("ky") && (s.skewY = r(o.getAttribute("ky"))), o.hasAttribute("algn") && (s.alignment = o.getAttribute("algn")), o.hasAttribute("rotWithShape") && (s.isRotatedWithShape = t(o.getAttribute("rotWithShape"))), s;
291
297
  }
292
298
  default: return;
293
299
  }
294
300
  }
295
301
  getFill(t, e) {
296
- if (t.evaluate("noFill", e)) return { type: A.Type.None };
302
+ if (t.evaluate("noFill", e)) return { type: y.Type.None };
297
303
  const s = t.evaluate("solidFill", e);
298
304
  if (s) {
299
305
  const e = this.processAdjColor(t, s);
300
306
  if (e) return {
301
- type: A.Type.Solid,
307
+ type: y.Type.Solid,
302
308
  color: e
303
309
  };
304
310
  }
@@ -309,41 +315,41 @@ var w = class {
309
315
  const i = t.evaluate("blipFill", e);
310
316
  return i ? this.processImageFill(t, i) : null;
311
317
  }
312
- processGradFill(t, e) {
313
- const s = { type: A.Type.Gradient };
314
- e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = "1" === e.getAttribute("rotWithShape"));
315
- const o = t.evaluate("lin", e);
316
- o && (s.gradientType = A.GradientType.Linear, o.hasAttribute("ang") && (s.angle = i(o.getAttribute("ang"))), o.hasAttribute("scaled") && (s.scaled = a(o.getAttribute("scaled"))));
317
- const n = {};
318
- e.hasAttribute("flip") && (n.mirror = e.getAttribute("flip")), Object.keys(n).length > 0 && (s.tile = n);
319
- const l = t.evaluate("path", e);
318
+ processGradFill(e, s) {
319
+ const o = { type: y.Type.Gradient };
320
+ s.hasAttribute("rotWithShape") && (o.isRotatedWithShape = "1" === s.getAttribute("rotWithShape"));
321
+ const n = e.evaluate("lin", s);
322
+ n && (o.gradientType = y.GradientType.Linear, n.hasAttribute("ang") && (o.angle = r(n.getAttribute("ang"))), n.hasAttribute("scaled") && (o.scaled = t(n.getAttribute("scaled"))));
323
+ const a = {};
324
+ s.hasAttribute("flip") && (a.mirror = s.getAttribute("flip")), Object.keys(a).length > 0 && (o.tile = a);
325
+ const l = e.evaluate("path", s);
320
326
  if (l) {
321
- l.hasAttribute("path") && (s.gradientType = M(l.getAttribute("path")));
322
- const e = t.evaluate("fillToRect", l);
323
- e && (s.focus = this.getRect(e));
324
- }
325
- const c = t.evaluate("tileRect", e);
326
- c && (s.tile || (s.tile = {}), s.tile.bounds = this.getRect(c));
327
- const u = [], h = t.evaluate("gsLst/gs", e), p = h ? h.length : 0;
328
- for (let e = 0; e < p; e++) {
329
- const s = h.item(e), o = {
330
- offset: r(s.getAttribute("pos") ?? ""),
331
- color: this.processAdjColor(t, s)
327
+ l.hasAttribute("path") && (o.gradientType = U(l.getAttribute("path")));
328
+ const t = e.evaluate("fillToRect", l);
329
+ t && (o.focus = this.getRect(t));
330
+ }
331
+ const c = e.evaluate("tileRect", s);
332
+ c && (o.tile || (o.tile = {}), o.tile.bounds = this.getRect(c));
333
+ const u = [], h = e.evaluate("gsLst/gs", s), p = h ? h.length : 0;
334
+ for (let t = 0; t < p; t++) {
335
+ const s = h.item(t), r = {
336
+ offset: i(s.getAttribute("pos") ?? ""),
337
+ color: this.processAdjColor(e, s)
332
338
  };
333
- u.push(o);
339
+ u.push(r);
334
340
  }
335
- return u.length > 0 && (s.stops = u), s;
341
+ return u.length > 0 && (o.stops = u), o;
336
342
  }
337
343
  getRect(t) {
338
344
  const e = {};
339
- return t.hasAttribute("t") && (e.t = r(t.getAttribute("t"))), t.hasAttribute("l") && (e.l = r(t.getAttribute("l"))), t.hasAttribute("b") && (e.b = r(t.getAttribute("b"))), t.hasAttribute("r") && (e.r = r(t.getAttribute("r"))), 0 === Object.keys(e).length ? null : e;
345
+ return t.hasAttribute("t") && (e.t = i(t.getAttribute("t"))), t.hasAttribute("l") && (e.l = i(t.getAttribute("l"))), t.hasAttribute("b") && (e.b = i(t.getAttribute("b"))), t.hasAttribute("r") && (e.r = i(t.getAttribute("r"))), 0 === Object.keys(e).length ? null : e;
340
346
  }
341
- processImageFill(t, e) {
342
- const s = { type: A.Type.Image };
343
- return e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), e.hasAttribute("dpi") && (s.dpi = e.getAttribute("dpi")), s.ref = "https://www.sheetxl.com/logo-color-padded-white.jpg", s.tile = !1, s;
347
+ processImageFill(e, s) {
348
+ const r = { type: y.Type.Image };
349
+ return s.hasAttribute("rotWithShape") && (r.isRotatedWithShape = t(s.getAttribute("rotWithShape"))), s.hasAttribute("dpi") && (r.dpi = s.getAttribute("dpi")), r.ref = "https://www.sheetxl.com/logo-color-padded-white.jpg", r.tile = !1, r;
344
350
  }
345
351
  processPatternFill(t, e) {
346
- const s = { type: A.Type.Pattern };
352
+ const s = { type: y.Type.Pattern };
347
353
  s.patternType = e.getAttribute("prst");
348
354
  const r = t.evaluate("bgClr", e);
349
355
  if (r) {
@@ -372,11 +378,11 @@ var w = class {
372
378
  }
373
379
  const n = t.evaluate("scrgbClr", e);
374
380
  if (n) return this.processScrgbClrElement(t, n);
375
- const l = t.evaluate("srgbClr", e);
376
- return l ? this.processSrgbClrElement(t, l) : null;
381
+ const a = t.evaluate("srgbClr", e);
382
+ return a ? this.processSrgbClrElement(t, a) : null;
377
383
  }
378
384
  processScrgbClrElement(t, e) {
379
- let s = "lrgba(" + r(e.getAttribute("r") ?? "") + "," + r(e.getAttribute("g") ?? "") + "," + r(e.getAttribute("b") ?? "") + ")";
385
+ let s = "lrgba(" + i(e.getAttribute("r") ?? "") + "," + i(e.getAttribute("g") ?? "") + "," + i(e.getAttribute("b") ?? "") + ")";
380
386
  return s += this.processAdjustments(t, e), s;
381
387
  }
382
388
  processSrgbClrElement(t, e) {
@@ -384,7 +390,7 @@ var w = class {
384
390
  return s += this.processAdjustments(t, e), s;
385
391
  }
386
392
  processHslClr(t, e) {
387
- let s = "hsl(" + i(e.getAttribute("hue") ?? "") + "," + r(e.getAttribute("sat") ?? "") + "," + r(e.getAttribute("lum") ?? "") + ")";
393
+ let s = "hsl(" + r(e.getAttribute("hue") ?? "") + "," + i(e.getAttribute("sat") ?? "") + "," + i(e.getAttribute("lum") ?? "") + ")";
388
394
  return s += this.processAdjustments(t, e), s;
389
395
  }
390
396
  processClrWithValAttribute(t, e) {
@@ -409,43 +415,43 @@ var w = class {
409
415
  const o = e.getAttribute("val");
410
416
  return o ? ` ${s} ${!o || parseFloat(o) / r}` : ` ${s}`;
411
417
  }
412
- }, M = (t) => "circle" === t ? "radial" : t, z = (t) => {
418
+ }, U = (t) => "circle" === t ? "radial" : t, X = (t) => {
413
419
  if ("rnd" === t) return "round";
414
420
  if ("flat" === t) return "butt";
415
421
  if ("sq" === t) return "square";
416
422
  throw new Error("Invalid lineCap type: " + t);
417
- }, U = class extends D {
418
- visit(e, s, r) {
423
+ }, W = class extends z {
424
+ visit(t, e, s) {
419
425
  try {
420
- const o = e.evaluate("xfrm", s);
421
- if (o) {
422
- V(o, r);
423
- const s = {
426
+ const r = t.evaluate("xfrm", e);
427
+ if (r) {
428
+ L(r, s);
429
+ const e = {
424
430
  x: 0,
425
431
  y: 0,
426
432
  width: 0,
427
433
  height: 0
428
- }, i = e.evaluate("off", o);
429
- i && (s.x = t(i.getAttribute("x")) ?? 0, s.y = t(i.getAttribute("y")) ?? 0);
430
- const n = e.evaluate("ext", o);
431
- i && (s.width = t(n.getAttribute("cx")) ?? 0, s.height = t(n.getAttribute("cy")) ?? 0), r.bounds = s;
434
+ }, o = t.evaluate("off", r);
435
+ o && (e.x = l(o.getAttribute("x")) ?? 0, e.y = l(o.getAttribute("y")) ?? 0);
436
+ const i = t.evaluate("ext", r);
437
+ o && (e.width = l(i.getAttribute("cx")) ?? 0, e.height = l(i.getAttribute("cy")) ?? 0), s.bounds = e;
432
438
  }
433
- const i = e.evaluate("prstGeom", s);
434
- i?.hasAttribute("prst") ? r.geometry = i?.getAttribute("prst") : e.evaluate("customGeom", s) && console.warn("customGeom not supported yet");
435
- const n = this.getFill(e, s);
436
- n && Object.keys(n).length > 0 && (r.fill = n);
437
- const l = this.getStroke(e, s);
438
- return l && Object.keys(l).length > 0 && (r.stroke = l), r;
439
- } catch (t) {
440
- console.warn(t);
439
+ const o = t.evaluate("prstGeom", e);
440
+ o?.hasAttribute("prst") ? s.geometry = o?.getAttribute("prst") : t.evaluate("customGeom", e) && t.warn("Custom shape geometry is not supported; the shape keeps its bounds only.", { onceKey: "xlsx.shape.customGeometry" });
441
+ const i = this.getFill(t, e);
442
+ i && Object.keys(i).length > 0 && (s.fill = i);
443
+ const n = this.getStroke(t, e);
444
+ return n && Object.keys(n).length > 0 && (s.stroke = n), s;
445
+ } catch (e) {
446
+ t.warn(`Unable to read shape properties: ${e?.message ?? e}`, { onceKey: "xlsx.shape.unreadable" });
441
447
  }
442
448
  }
443
- }, W = class {
449
+ }, G = class {
444
450
  visit(t, e, s) {
445
451
  let r = {};
446
- if (I(t, e, r, "grouping", "grouping"), L(t, e, r, "varyColors", "varyColors"), _(t, e, r, "gapWidth", "gapWidth", .01), _(t, e, r, "overlap", "overlap", .01), this.parseType(t, e, r), B(t, e, r, "bubbleScale", "bubbleScale"), L(t, e, r, "showNegBubbles", "showNegativeBubbleValues"), L(t, e, r, "sizeRepresents", "bubbleSizeRepresentsWidth"), B(t, e, r, "firstSliceAng", "startAngle"), B(t, e, r, "holeSize", "holeSize"), I(t, e, r, "scatterStyle", "scatterStyle"), this.parseAxisIds(t, e, r), Object.keys(r).length > 0) {
452
+ if (_(t, e, r, "grouping", "grouping"), B(t, e, r, "varyColors", "varyColors"), R(t, e, r, "gapWidth", "gapWidth", .01), R(t, e, r, "overlap", "overlap", .01), this.parseType(t, e, r), E(t, e, r, "bubbleScale", "bubbleScale"), B(t, e, r, "showNegBubbles", "showNegativeBubbleValues"), B(t, e, r, "sizeRepresents", "bubbleSizeRepresentsWidth"), E(t, e, r, "firstSliceAng", "startAngle"), E(t, e, r, "holeSize", "holeSize"), _(t, e, r, "scatterStyle", "scatterStyle"), this.parseAxisIds(t, e, r), Object.keys(r).length > 0) {
447
453
  let e = t.getVisitorParamsState().get("types");
448
- e || (console.warn("Uninitialized types array in ChartTypeVisitor"), e = [], t.getVisitorParamsState().set("types", e)), e.push(r);
454
+ e || (t.warn("A chart type was read outside a chart; its types were started fresh.", { onceKey: "xlsx.chart.typesState" }), e = [], t.getVisitorParamsState().set("types", e)), e.push(r);
449
455
  }
450
456
  return r;
451
457
  }
@@ -472,7 +478,7 @@ var w = class {
472
478
  const r = t.evaluate("axId", e);
473
479
  r && 0 !== r.length && (s.xAxisId = r.item(0).getAttribute("val"), s.yAxisId = r.item(1).getAttribute("val"));
474
480
  }
475
- }, X = (t, e, s) => {
481
+ }, K = (t, e, s) => {
476
482
  if (!0 === t.getValAttrAsBoolean("invertIfNegative", e)) if (t.evaluate("extLst/ext/invertSolidFillFmt", e)) {
477
483
  if (s.fill && s.fillNegative) {
478
484
  const e = t.getFromPath(s, "fill.solid.adjs");
@@ -486,7 +492,7 @@ var w = class {
486
492
  const i = {};
487
493
  i.fill = o, s.strokeNegative = i;
488
494
  }
489
- }, G = class extends D {
495
+ }, $ = class extends z {
490
496
  constructor(t = "text") {
491
497
  super(), this._jsonKey = t;
492
498
  }
@@ -498,19 +504,19 @@ var w = class {
498
504
  return r || (r = {}), this.parseTextElement(t, e, r, !1), Object.keys(r).length > 0 && t.setToPath(s, this.getTextPath(), r), s;
499
505
  }
500
506
  parseTextElement(t, e, s, r) {
501
- const o = t.evaluate("p/pPr/defRPr", e) ?? t.evaluate("defRPr", e);
502
- o && (this.parseTextProperties(t, o, s), new U().visit(t, o, s));
503
- const i = s.runs ?? [], n = t.evaluate("p/r", e) ?? t.evaluate("r", e), l = (e) => {
507
+ const o = t.evaluate("p/pPr/defRPr", e) ?? t.evaluate("defRPr", e), i = void 0 !== o?.length ? o.item(0) : o;
508
+ i && (this.parseTextProperties(t, i, s), new W().visit(t, i, s));
509
+ const n = s.runs ?? [], a = t.evaluate("p/r", e) ?? t.evaluate("r", e), l = (e) => {
504
510
  const s = {};
505
511
  let r = t.evaluate("t", e);
506
512
  const o = t.evaluate("rPr", e);
507
- o && this.parseTextProperties(t, o, s), r && r.firstChild ? s.text = r.firstChild.textContent ?? "" : e.textContent && (s.text = e.textContent ?? ""), Object.keys(s).length > 0 && i.push(s);
513
+ o && this.parseTextProperties(t, o, s), r && r.firstChild ? s.text = r.firstChild.textContent ?? "" : e.textContent && (s.text = e.textContent ?? ""), Object.keys(s).length > 0 && n.push(s);
508
514
  };
509
- if (void 0 !== n?.length) for (let t = 0; n && t < n.length; t++) l(n.item(t));
510
- else l(n || e);
511
- i.length > 0 && (s.runs = i);
512
- const a = t.evaluate("bodyPr", e);
513
- a && V(a, s);
515
+ if (void 0 !== a?.length) for (let t = 0; a && t < a.length; t++) l(a.item(t));
516
+ else l(a || e);
517
+ n.length > 0 && (s.runs = n);
518
+ const c = t.evaluate("bodyPr", e);
519
+ c && L(c, s);
514
520
  }
515
521
  parseTextProperties(t, e, s) {
516
522
  if (!e) return;
@@ -522,17 +528,17 @@ var w = class {
522
528
  const t = s.font ?? {};
523
529
  if (o.hasAttribute("typeface") && (t.family = o.getAttribute("typeface")), o.hasAttribute("panose")) {
524
530
  const e = o.getAttribute("panose");
525
- e && (t.fallbacks = [f.getPanoseFallback(e)]);
531
+ e && (t.fallbacks = [v.getPanoseFallback(e)]);
526
532
  }
527
533
  o.hasAttribute("pitchFamily") && (t.pitch = o.getAttribute("pitchFamily")), o.hasAttribute("charset") && (t.charset = o.getAttribute("charset")), Object.keys(t).length > 0 && (s.font = t);
528
534
  }
529
535
  }
530
- }, $ = class {
536
+ }, H = class {
531
537
  visit(t, e, s) {}
532
- processDataBarColor(t, s, r, o, i = "auto") {
533
- if (!s) return;
534
- const n = e((t) => s.getAttribute(t), i);
535
- return n && (r[o] = n), r;
538
+ processDataBarColor(t, e, s, r, o = "auto") {
539
+ if (!e) return;
540
+ const i = n((t) => e.getAttribute(t), o);
541
+ return i && (s[r] = i), s;
536
542
  }
537
543
  processFonts(t, e, s) {
538
544
  if (!e) return;
@@ -549,11 +555,11 @@ var w = class {
549
555
  return s;
550
556
  }
551
557
  processFont(t, e, s) {
552
- t.getValAttrAsBoolean("b", e, !0) && (s.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (s.style = f.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (s.strike = !0);
558
+ t.getValAttrAsBoolean("b", e, !0) && (s.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (s.style = v.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (s.strike = !0);
553
559
  const r = t.evaluate("u", e);
554
- r && (s.underline = r.getAttribute("val") || f.UnderlineStyle.Single), I(t, e, s, "vertAlign", "verticalAlign"), "superscript" === s.verticalAlign ? s.verticalAlign = f.VerticalAlignment.Super : "subscript" === s.verticalAlign && (s.verticalAlign = f.VerticalAlignment.Sub), _(t, e, s, "sz", "size");
560
+ r && (s.underline = r.getAttribute("val") || v.UnderlineStyle.Single), _(t, e, s, "vertAlign", "verticalAlign"), "superscript" === s.verticalAlign ? s.verticalAlign = v.VerticalAlignment.Super : "subscript" === s.verticalAlign && (s.verticalAlign = v.VerticalAlignment.Sub), R(t, e, s, "sz", "size");
555
561
  const o = t.evaluate("color", e);
556
- this.processDataBarColor(t, o, s, "color"), s.color || (s.color = "auto"), I(t, e, s, "name", "family"), I(t, e, s, "rFont", "family");
562
+ this.processDataBarColor(t, o, s, "color"), s.color || (s.color = "auto"), _(t, e, s, "name", "family"), _(t, e, s, "rFont", "family");
557
563
  const i = t.evaluate("family", e);
558
564
  if (i) {
559
565
  const t = i.getAttribute("val");
@@ -573,7 +579,7 @@ var w = class {
573
579
  case "5": s.fallbacks = ["fantasy"];
574
580
  }
575
581
  }
576
- return I(t, e, s, "scheme", "scheme"), L(t, e, s, "shadow", "shadow", !0), L(t, e, s, "outline", "outline", !0), t.getValAttrAsBoolean("condense", e, !0) && (s.letterSpacing = -1), t.getValAttrAsBoolean("extend", e, !0) && (s.letterSpacing = 1), B(t, e, s, "charset", "charset"), s;
582
+ return _(t, e, s, "scheme", "scheme"), void 0 !== s.family && void 0 === s.scheme && (s.scheme = v.Scheme.None), B(t, e, s, "shadow", "shadow", !0), B(t, e, s, "outline", "outline", !0), t.getValAttrAsBoolean("condense", e, !0) && (s.letterSpacing = -1), t.getValAttrAsBoolean("extend", e, !0) && (s.letterSpacing = 1), E(t, e, s, "charset", "charset"), s;
577
583
  }
578
584
  processFills(t, e, s) {
579
585
  if (!e) return;
@@ -587,10 +593,10 @@ var w = class {
587
593
  return s;
588
594
  }
589
595
  processFill(t, e, s, r) {
590
- const o = { type: A.Type.None }, i = e.childNodes;
596
+ const o = { type: y.Type.None }, i = e.childNodes;
591
597
  let n = !1;
592
- const l = i.length;
593
- for (let e = 0; !n && e < l; e++) {
598
+ const a = i.length;
599
+ for (let e = 0; !n && e < a; e++) {
594
600
  const s = i.item(e);
595
601
  1 === s.nodeType && ("gradientFill" === s.localName ? (this.processGradientFill(t, s, o), n = !0) : "patternFill" === s.localName && (this.processPatternFill(t, s, o), n = !0));
596
602
  }
@@ -598,20 +604,20 @@ var w = class {
598
604
  }
599
605
  processGradientFill(t, e, s) {
600
606
  if (!e) return;
601
- s.type = A.Type.Gradient;
607
+ s.type = y.Type.Gradient;
602
608
  const r = [];
603
609
  s.stops = r;
604
610
  const o = e.getAttribute("type");
605
611
  o && (s.gradientType = o);
606
612
  const i = e.hasAttribute("degree") ? parseFloat(e.getAttribute("degree")) : 0;
607
613
  (i + 90) % 360 != 0 && (s.angle = (i + 90) % 360), (e.hasAttribute("left") || e.hasAttribute("top") || e.hasAttribute("right") || e.hasAttribute("bottom")) && (s.focus = {
608
- left: K(e.getAttribute("left")),
609
- top: K(e.getAttribute("top")),
610
- right: K(e.getAttribute("right")),
611
- bottom: K(e.getAttribute("bottom"))
614
+ left: q(e.getAttribute("left")),
615
+ top: q(e.getAttribute("top")),
616
+ right: q(e.getAttribute("right")),
617
+ bottom: q(e.getAttribute("bottom"))
612
618
  });
613
- const n = e.childNodes, l = n.length;
614
- for (let e = 0; e < l; e++) {
619
+ const n = e.childNodes, a = n.length;
620
+ for (let e = 0; e < a; e++) {
615
621
  const s = n.item(e);
616
622
  if (1 === s.nodeType && "stop" === s.localName) {
617
623
  const e = {};
@@ -624,20 +630,20 @@ var w = class {
624
630
  }
625
631
  processPatternFill(t, e, s) {
626
632
  if (!e) return;
627
- const r = t.getVisitorParamsState().get("processingDXFs"), o = e.getAttribute("patternType") || (r ? A.BuiltInSheetPattern.Solid : A.BuiltInSheetPattern.None);
628
- if (o === A.BuiltInSheetPattern.None) return { none: !0 };
629
- s.type = A.Type.Pattern, o && (s.patternType = o);
633
+ const r = t.getVisitorParamsState().get("processingDXFs"), o = e.getAttribute("patternType") || (r ? y.BuiltInSheetPattern.Solid : y.BuiltInSheetPattern.None);
634
+ if (o === y.BuiltInSheetPattern.None) return { none: !0 };
635
+ s.type = y.Type.Pattern, o && (s.patternType = o);
630
636
  let i = "foreground", n = "background";
631
- const l = s.patternType === A.BuiltInSheetPattern.Solid && r;
632
- let a = l ? "dk1" : "lt1", c = l ? "lt1" : "dk1";
633
- if (l) {
637
+ const a = s.patternType === y.BuiltInSheetPattern.Solid && r;
638
+ let l = a ? "dk1" : "lt1", c = a ? "lt1" : "dk1";
639
+ if (a) {
634
640
  const t = i;
635
641
  i = n, n = t;
636
642
  }
637
643
  const u = t.evaluate("fgColor", e);
638
- this.processDataBarColor(t, u, s, i, a);
644
+ this.processDataBarColor(t, u, s, i, l);
639
645
  const h = t.evaluate("bgColor", e);
640
- return this.processDataBarColor(t, h, s, n, c), l && (s.foreground || (s.foreground = "lt1"), s.background || (s.background = "dk1")), s;
646
+ return this.processDataBarColor(t, h, s, n, c), a && (s.foreground || (s.foreground = "lt1"), s.background || (s.background = "dk1")), s;
641
647
  }
642
648
  processBorders(t, e, s, r) {
643
649
  if (!e) return;
@@ -653,35 +659,38 @@ var w = class {
653
659
  processBorder(t, e, s, r, o) {
654
660
  if (!e) return;
655
661
  const i = {};
656
- return this.processBorderStroke(t, e, i, g.Edge.Left), this.processBorderStroke(t, e, i, g.Edge.Right), o ? (i.right || i.left) && (i.right ? i.vertical = { ...i.right } : i.vertical = { ...i.left }) : this.processBorderStroke(t, e, i, g.Edge.Vertical), this.processBorderStroke(t, e, i, g.Edge.Top), this.processBorderStroke(t, e, i, g.Edge.Bottom), o ? (i.bottom || i.top) && (i.bottom ? i.horizontal = { ...i.bottom } : i.horizontal = { ...i.top }) : this.processBorderStroke(t, e, i, g.Edge.Horizontal), s[r] = i, s;
662
+ return this.processBorderStroke(t, e, i, b.Edge.Left), this.processBorderStroke(t, e, i, b.Edge.Right), o ? (i.right || i.left) && (i.right ? i.vertical = { ...i.right } : i.vertical = { ...i.left }) : this.processBorderStroke(t, e, i, b.Edge.Vertical), this.processBorderStroke(t, e, i, b.Edge.Top), this.processBorderStroke(t, e, i, b.Edge.Bottom), o ? (i.bottom || i.top) && (i.bottom ? i.horizontal = { ...i.bottom } : i.horizontal = { ...i.top }) : this.processBorderStroke(t, e, i, b.Edge.Horizontal), s[r] = i, s;
657
663
  }
658
664
  processBorderStroke(t, e, s, r) {
659
665
  if (!e) return;
660
666
  const o = t.evaluate(r, e);
661
667
  if (!o) return;
662
668
  const i = {};
663
- o.hasAttribute("style") ? i.style = o.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style = g.StrokeStyle.None);
669
+ o.hasAttribute("style") ? i.style = o.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style = b.StrokeStyle.None);
664
670
  const n = t.evaluate("color", o);
665
671
  return n && this.processDataBarColor(t, n, i, "color"), Object.keys(i).length > 0 ? s[r] = i : null;
666
672
  }
667
- }, K = (t) => {
673
+ }, q = (t) => {
668
674
  if (!t) return 0;
669
675
  const e = parseFloat(t);
670
676
  return isNaN(e) ? 0 : e;
671
- }, H = {
677
+ }, J = {
672
678
  auto: "auto",
673
679
  autoNoTable: "automaticExceptTables",
674
680
  manual: "manual"
675
- }, q = class {
681
+ }, Q = class {
676
682
  visit(t, e, s) {
677
683
  if (!e) return;
678
684
  let r = t.evaluate("*/cNvPr", e);
679
685
  return r.item && (r = r.item(0)), r && (t.copyFromAttribute(r, "name", s), t.copyFromAttribute(r, "descr", s, "description"), t.copyFromAttribute(r, "hidden", s, "hidden", t.BOOLEAN_COPY), t.copyFromAttribute(r, "id", s)), s;
680
686
  }
681
- }, J = class extends q {
687
+ }, Z = class extends Q {
682
688
  visit(t, e, s) {
683
689
  if (!e) return;
684
- if (t.getPath().includes("Fallback") && s.content) return s;
690
+ if (t.getPath().includes("Fallback") && s.content) {
691
+ const r = s.content.json;
692
+ return "sp" === s.content.type && r?.xml && void 0 === r.fallbackXml && (r.fallbackXml = t.serializeElement(e) ?? void 0), s;
693
+ }
685
694
  s = super.visit(t, e, s);
686
695
  const r = t.evaluate("nvSpPr/cNvSpPr", e);
687
696
  if (r) {
@@ -692,20 +701,49 @@ var w = class {
692
701
  Object.keys(t).length > 0 && (s.locks = t);
693
702
  }
694
703
  }
695
- t.warn(`'${s.name}' is not editable; imported as a fixed drawing.`);
696
704
  let o = t.evaluate("*/cNvPr", e);
697
705
  o?.item && (o = o.item(0));
698
- const i = o?.getAttribute?.("id"), n = i ? parseInt(i, 10) : void 0, l = {
706
+ const i = o?.getAttribute?.("id"), n = i ? parseInt(i, 10) : void 0, a = {
699
707
  type: "sp",
700
708
  xml: t.serializeElement(e) ?? void 0,
701
709
  sourceId: void 0 === n || isNaN(n) ? void 0 : n
702
710
  };
703
711
  return s.content = {
704
712
  type: "sp",
705
- json: l
706
- }, l;
713
+ json: a
714
+ }, a;
715
+ }
716
+ }, tt = "richTypes", et = "richData";
717
+ function st(t, e) {
718
+ const s = t.childNodes;
719
+ for (let t = 0; t < s.length; t++) {
720
+ const r = s.item(t);
721
+ if (1 === r.nodeType) switch (r.localName) {
722
+ case "b":
723
+ e.bold = "0" !== r.getAttribute("val") && "false" !== r.getAttribute("val");
724
+ break;
725
+ case "i":
726
+ e.italic = "0" !== r.getAttribute("val") && "false" !== r.getAttribute("val");
727
+ break;
728
+ case "sz": {
729
+ const t = parseFloat(r.getAttribute("val") ?? "");
730
+ isNaN(t) || (e.size = t);
731
+ break;
732
+ }
733
+ case "rFont": {
734
+ const t = r.getAttribute("val");
735
+ t && (e.font = t);
736
+ break;
737
+ }
738
+ case "color": {
739
+ const t = r.getAttribute("rgb");
740
+ t && (e.color = "#" + (8 === t.length ? t.substring(2) : t));
741
+ break;
742
+ }
743
+ }
707
744
  }
708
- }, Q = "richTypes", Z = "richData", tt = class {
745
+ }
746
+ var rt = class {
709
747
  visit(t, e, s) {
710
748
  if (!e) return;
711
749
  const r = e.childNodes, o = r.length;
@@ -720,7 +758,7 @@ var w = class {
720
758
  t.copyFromAttribute(e, "Target", r, "target"), t.copyFromAttribute(e, "Type", r, "type"), t.copyFromAttribute(e, "TargetMode", r, "targetMode");
721
759
  s[e.getAttribute("Id")] = r;
722
760
  }
723
- }, et = class {
761
+ }, ot = class {
724
762
  visit(t, e, s) {
725
763
  const r = [], o = e.childNodes, i = o.length;
726
764
  for (let e = 0; e < i; e++) {
@@ -737,7 +775,7 @@ var w = class {
737
775
  value: e.textContent || ""
738
776
  };
739
777
  }
740
- }, st = class {
778
+ }, it = class {
741
779
  visit(t, e, s) {
742
780
  const r = [], o = e.childNodes, i = o.length;
743
781
  for (let e = 0; e < i; e++) {
@@ -754,24 +792,24 @@ var w = class {
754
792
  value: e.textContent || ""
755
793
  };
756
794
  }
757
- }, rt = class {
795
+ }, nt = class {
758
796
  visit(t, e, s) {
759
- return L(t, e, s, "roundedCorners", "roundedCorners"), B(t, e, s, ".//AlternateContent/Fallback/style", "styleId"), t.getVisitorParamsState().set("types", []), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), s.range = null, s;
797
+ return B(t, e, s, "roundedCorners", "roundedCorners"), E(t, e, s, ".//AlternateContent/Fallback/style", "styleId"), t.getVisitorParamsState().set("types", []), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), s.range = null, s;
760
798
  }
761
799
  afterVisit(t, e, s) {
762
800
  let r = {};
763
801
  s.types = r;
764
- let o = {}, i = 0, n = {}, l = 0, a = t.getVisitorParamsState().get("axes");
802
+ let o = {}, i = 0, n = {}, a = 0, l = t.getVisitorParamsState().get("axes");
765
803
  const c = t.getVisitorParamsState().get("types"), u = c.length;
766
804
  for (let t = 0; t < u; t++) {
767
805
  const e = c[t];
768
806
  if (e.xAxisId) {
769
- const r = e.xAxisId, n = a.get(r);
807
+ const r = e.xAxisId, n = l.get(r);
770
808
  o[t + ""] = n, e.offsetXAxis = t, delete e.xAxisId, s.xAxes = o, o.length = ++i;
771
809
  }
772
810
  if (e.yAxisId) {
773
- const r = e.yAxisId, o = a.get(r);
774
- n[t + ""] = o, e.offsetYAxis = t, delete e.yAxisId, s.yAxes = n, n.length = ++l;
811
+ const r = e.yAxisId, o = l.get(r);
812
+ n[t + ""] = o, e.offsetYAxis = t, delete e.yAxisId, s.yAxes = n, n.length = ++a;
775
813
  }
776
814
  r[t + ""] = e;
777
815
  }
@@ -784,17 +822,17 @@ var w = class {
784
822
  for (let t = 0; t < d; t++) p[t + ""] = h[t];
785
823
  p.length = d, t.getVisitorParamsState().delete("types"), t.getVisitorParamsState().delete("axes"), t.getVisitorParamsState().delete("series");
786
824
  }
787
- }, ot = class {
825
+ }, at = class {
788
826
  visit(t, e, s) {
789
827
  let r = {};
790
828
  return s.plotArea = r, r;
791
829
  }
792
- }, it = U, nt = class extends W {
830
+ }, lt = W, ct = class extends G {
793
831
  parseType(t, e, s) {
794
832
  const r = t.getValAttrAsString("barDir", e);
795
833
  r && (s.type = "col" === r ? "column" : "bar");
796
834
  }
797
- }, lt = W, at = class {
835
+ }, ut = G, ht = class {
798
836
  constructor(t) {
799
837
  this.jsonKey = t;
800
838
  }
@@ -802,28 +840,28 @@ var w = class {
802
840
  let r = {}, o = r, i = t.getValAttrAsString("idx", e);
803
841
  null !== i && (o = {}, o[i] = r);
804
842
  const n = t.getValAttrAsBoolean("delete", e);
805
- this.parseNumFormat(t, e, r), !0 === n ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (L(t, e, r, "showBubbleSize", "showBubbleSize"), L(t, e, r, "showCatName", "showCatName"), L(t, e, r, "showLeaderLines", "showLeaderLines"), L(t, e, r, "showPercent", "showPercentage"), L(t, e, r, "showSerName", "showSerName"), L(t, e, r, "showVal", "showVal"), L(t, e, r, "showLegendKey", "showLegendKey"));
806
- const l = t.evaluate("separator", e);
807
- return null !== l && (r.separator = l.textContent), I(t, e, r, "dLblPos", "position"), s[this.jsonKey] = o, r;
843
+ this.parseNumFormat(t, e, r), !0 === n ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (B(t, e, r, "showBubbleSize", "showBubbleSize"), B(t, e, r, "showCatName", "showCatName"), B(t, e, r, "showLeaderLines", "showLeaderLines"), B(t, e, r, "showPercent", "showPercentage"), B(t, e, r, "showSerName", "showSerName"), B(t, e, r, "showVal", "showVal"), B(t, e, r, "showLegendKey", "showLegendKey"));
844
+ const a = t.evaluate("separator", e);
845
+ return null !== a && (r.separator = a.textContent), _(t, e, r, "dLblPos", "position"), s[this.jsonKey] = o, r;
808
846
  }
809
847
  parseNumFormat(t, e, s) {
810
848
  const r = t.evaluate("numFmt", e);
811
849
  r && (s.formatCode = r.getAttribute("formatCode"), r.hasAttribute("sourceLinked") && (s.sourceLinked = "1" === r.getAttribute("sourceLinked")));
812
850
  }
813
- }, ct = class {
851
+ }, pt = class {
814
852
  visit(t, e, s) {
815
853
  const r = {};
816
- B(t, e, r, "explosion", "explosion");
854
+ E(t, e, r, "explosion", "explosion");
817
855
  let o = t.evaluate("cat/*/f", e);
818
856
  o || (o = t.evaluate("xVal/*/f", e));
819
857
  let i = null;
820
858
  null !== o && null !== o.firstChild && (i = o.firstChild.nodeValue), o || (o = t.evaluate("cat/strLit", e), o || (o = t.evaluate("cat/numLit", e)), o && (i = this.parsePointsAsString(t, o))), null !== i && (r.xRange = i);
821
859
  let n = t.evaluate("val/*/f", e);
822
860
  n || (n = t.evaluate("yVal/*/f", e));
823
- let l = null;
824
- n && n.firstChild && (l = n.firstChild.nodeValue), n || (n = t.evaluate("val/numLit", e), null !== n && (l = this.parsePointsAsString(t, n))), null !== l && (r.valRange = l), this.parseTitleRangeOrValue(t, e, r), B(t, e, r, "idx", "idx"), L(t, e, r, "smooth", "smooth"), r.offsetChart = t.getVisitorParamsState().get("types").length - 1;
825
- let a = t.getVisitorParamsState().get("series");
826
- return a || (a = [], t.getVisitorParamsState().set("series", a)), a.push(r), r;
861
+ let a = null;
862
+ n && n.firstChild && (a = n.firstChild.nodeValue), n || (n = t.evaluate("val/numLit", e), null !== n && (a = this.parsePointsAsString(t, n))), null !== a && (r.valRange = a), this.parseTitleRangeOrValue(t, e, r), E(t, e, r, "idx", "idx"), B(t, e, r, "smooth", "smooth"), r.offsetChart = t.getVisitorParamsState().get("types").length - 1;
863
+ let l = t.getVisitorParamsState().get("series");
864
+ return l || (l = [], t.getVisitorParamsState().set("series", l)), l.push(r), r;
827
865
  }
828
866
  parseTitleRangeOrValue(t, e, s) {
829
867
  const r = t.evaluate("tx/strRef/f", e);
@@ -847,27 +885,27 @@ var w = class {
847
885
  return s += "}", s;
848
886
  }
849
887
  afterVisit(t, e, s) {
850
- X(t, e, s);
888
+ K(t, e, s);
851
889
  let r = t.getFromPath(s, "points");
852
890
  if (r) {
853
891
  const e = Object.keys(r);
854
892
  for (let o = 0; o < e.length; o++) {
855
893
  const i = e[o], n = t.getFromPath(r, i);
856
894
  if (!n) continue;
857
- let l = t.getFromPath(n, "markers");
858
- l && (t.setToPath(s, "markers.points." + i, l), delete n.markers);
895
+ let a = t.getFromPath(n, "markers");
896
+ a && (t.setToPath(s, "markers.points." + i, a), delete n.markers);
859
897
  }
860
898
  }
861
899
  }
862
- }, ut = class {
900
+ }, dt = class {
863
901
  DataPointVisitor() {}
864
902
  visit(t, e, s) {
865
903
  let r = t.getFromPath(s, "points"), o = null;
866
904
  r ? o = r : (o = {}, t.setToPath(s, "points", o));
867
905
  let i = {}, n = t.getValAttrAsString("idx", e);
868
- return null !== n && (o[n] = i), L(t, e, i, "bubble3D", "bubble3D"), B(t, e, i, "explosion", "explosion"), X(t, e, i), i;
906
+ return null !== n && (o[n] = i), B(t, e, i, "bubble3D", "bubble3D"), E(t, e, i, "explosion", "explosion"), K(t, e, i), i;
869
907
  }
870
- }, ht = class {
908
+ }, gt = class {
871
909
  visit(t, e, s) {
872
910
  const r = e.parentNode.localName;
873
911
  if ("ser" === r || "dPt" === r) {
@@ -878,19 +916,19 @@ var w = class {
878
916
  }
879
917
  return null;
880
918
  }
881
- }, pt = class {
919
+ }, mt = class {
882
920
  visit(t, e, s) {
883
921
  let r = {};
884
- this.parseScaling(t, e, r), _(t, e, r, "majorUnit", "majorUnits"), _(t, e, r, "minorUnit", "minorUnits"), L(t, e, r, "delete", "shown"), this.parseOrientation(t, e, r), this.parseNumFormat(t, e, r), I(t, e, r, "majorTickMark", "majorTickMarks"), I(t, e, r, "minorTickMark", "minorTickMarks"), I(t, e, r, "crosses", "crosses"), _(t, e, r, "crossesAt", "crosses"), I(t, e, r, "crossBetween", "crossBetween"), this.parseLabelAlign(t, e, r), B(t, e, r, "lblOffset", "labelOffset"), I(t, e, r, "tickLblPos", "labelPosition");
922
+ this.parseScaling(t, e, r), R(t, e, r, "majorUnit", "majorUnits"), R(t, e, r, "minorUnit", "minorUnits"), B(t, e, r, "delete", "shown"), this.parseOrientation(t, e, r), this.parseNumFormat(t, e, r), _(t, e, r, "majorTickMark", "majorTickMarks"), _(t, e, r, "minorTickMark", "minorTickMarks"), _(t, e, r, "crosses", "crosses"), R(t, e, r, "crossesAt", "crosses"), _(t, e, r, "crossBetween", "crossBetween"), this.parseLabelAlign(t, e, r), E(t, e, r, "lblOffset", "labelOffset"), _(t, e, r, "tickLblPos", "labelPosition");
885
923
  const o = t.getValAttrAsInteger("noMultiLvlLbl", e);
886
- r.labelMultiLevel = null !== o && 0 === o, B(t, e, r, "tickMarkSkip", "tickMarkSkip"), B(t, e, r, "tickLblSkip", "labelInterval"), this.parseDisplayCustOrBuiltInUnit(e, t, r), this.parseTimeUnits(t, e, r, "majorUnitDates", "majorTimeUnit", "majorUnit"), this.parseTimeUnits(t, e, r, "minorUnitDates", "minorTimeUnit", "minorUnit"), I(t, e, r, "baseTimeUnit", "baseUnitDates"), t.getVisitorParamsState().get("axes") || (console.warn("Uninitialized axes map in AxisVisitor"), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
924
+ r.labelMultiLevel = null !== o && 0 === o, E(t, e, r, "tickMarkSkip", "tickMarkSkip"), E(t, e, r, "tickLblSkip", "labelInterval"), this.parseDisplayCustOrBuiltInUnit(e, t, r), this.parseTimeUnits(t, e, r, "majorUnitDates", "majorTimeUnit", "majorUnit"), this.parseTimeUnits(t, e, r, "minorUnitDates", "minorTimeUnit", "minorUnit"), _(t, e, r, "baseTimeUnit", "baseUnitDates"), t.getVisitorParamsState().get("axes") || (t.warn("An axis was read outside a chart; its axes were started fresh.", { onceKey: "xlsx.chart.axesState" }), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
887
925
  const i = t.getValAttrAsString("axId", e);
888
926
  return t.getVisitorParamsState().get("axes").set(i, r), r;
889
927
  }
890
928
  parseTimeUnits(t, e, s, r, o, i) {
891
929
  const n = {};
892
- let l = t.getValAttrAsString(o, e);
893
- null !== l && (n.dem = l, n.amt = t.getValAttrAsString(i, e)), Object.keys(n).length > 0 && (s[r] = n);
930
+ let a = t.getValAttrAsString(o, e);
931
+ null !== a && (n.dem = a, n.amt = t.getValAttrAsString(i, e)), Object.keys(n).length > 0 && (s[r] = n);
894
932
  }
895
933
  parseDisplayCustOrBuiltInUnit(t, e, s) {
896
934
  let r = e.getValAttrAsString("dispUnits/builtInUnit", t);
@@ -912,7 +950,7 @@ var w = class {
912
950
  const r = t.getValAttrAsString("scaling/orientation", e);
913
951
  null !== r && (s.inverted = "minMax" !== r);
914
952
  const o = t.getValAttrAsFloat("scaling/logBase", e);
915
- null !== o && (s.logBase = o, s.scaleType = "log"), _(t, e, s, "scaling/max", "max"), _(t, e, s, "scaling/min", "min");
953
+ null !== o && (s.logBase = o, s.scaleType = "log"), R(t, e, s, "scaling/max", "max"), R(t, e, s, "scaling/min", "min");
916
954
  }
917
955
  afterVisit(t, e, s) {
918
956
  s.fill && s.labels && (s.labels.fill = s.fill, delete s.fill);
@@ -924,10 +962,10 @@ var w = class {
924
962
  t.setToPath(s, "title.shown", null !== i);
925
963
  const n = t.evaluate("minorGridlines", e);
926
964
  t.setToPath(s, "gridLinesMinor.shown", null !== n);
927
- const l = t.evaluate("majorGridlines", e);
928
- t.setToPath(s, "gridLinesMajor.shown", null !== l);
965
+ const a = t.evaluate("majorGridlines", e);
966
+ t.setToPath(s, "gridLinesMajor.shown", null !== a);
929
967
  }
930
- }, dt = G, gt = class {
968
+ }, bt = $, ft = class {
931
969
  visit(t, e, s) {
932
970
  const r = t.getVisitorParamsState().get("series");
933
971
  let o = t.getValAttrAsInteger("idx", e), i = null !== o ? r[o] : void 0;
@@ -939,19 +977,19 @@ var w = class {
939
977
  }
940
978
  return s;
941
979
  }
942
- }, mt = class {
980
+ }, At = class {
943
981
  visit(t, e, s) {
944
982
  const r = {};
945
- return L(t, e, r, "overlay", "overlay"), I(t, e, r, "legendPos", "position"), s.legend = r, r;
983
+ return B(t, e, r, "overlay", "overlay"), _(t, e, r, "legendPos", "position"), s.legend = r, r;
946
984
  }
947
- }, bt = class extends U {
985
+ }, yt = class extends W {
948
986
  visit(t, e, s) {
949
987
  const r = this.getFill(t, e);
950
988
  Object.keys(r).length > 0 && (s.fillNegative = r);
951
989
  const o = this.getStroke(t, e);
952
990
  return Object.keys(o).length > 0 && (s.strokeNegative = o), s;
953
991
  }
954
- }, At = class extends G {
992
+ }, vt = class extends $ {
955
993
  constructor(t = "title") {
956
994
  super(t);
957
995
  }
@@ -964,7 +1002,7 @@ var w = class {
964
1002
  }
965
1003
  visit(t, e, s) {
966
1004
  const r = {};
967
- L(t, e, r, "overlay", "overlay"), s[this._jsonKey] = r;
1005
+ B(t, e, r, "overlay", "overlay"), s[this._jsonKey] = r;
968
1006
  let o = t.getFromPath(r, this.getTextPath());
969
1007
  o || (o = {}), this.parseTitleRangeOrValue(t, e, r);
970
1008
  const i = t.evaluate("txPr", e);
@@ -978,20 +1016,20 @@ var w = class {
978
1016
  null !== t && (s.rotation = parseInt(t), delete s.title.rotation);
979
1017
  }
980
1018
  }
981
- }, ft = class {
1019
+ }, Nt = class {
982
1020
  visit(t, e, s) {
983
1021
  const r = t.evaluate("manualLayout", e);
984
1022
  if (r) {
985
1023
  let e = {};
986
- _(t, r, e, "x", "x"), _(t, r, e, "y", "y"), _(t, r, e, "w", "w"), _(t, r, e, "h", "h"), I(t, r, e, "xMode", "xMode"), I(t, r, e, "yMode", "yMode"), I(t, r, e, "wMode", "wMode"), I(t, r, e, "hMode", "hMode"), Object.keys(e).length > 0 && (s.manualLayout = e);
1024
+ R(t, r, e, "x", "x"), R(t, r, e, "y", "y"), R(t, r, e, "w", "w"), R(t, r, e, "h", "h"), _(t, r, e, "xMode", "xMode"), _(t, r, e, "yMode", "yMode"), _(t, r, e, "wMode", "wMode"), _(t, r, e, "hMode", "hMode"), Object.keys(e).length > 0 && (s.manualLayout = e);
987
1025
  }
988
1026
  return s;
989
1027
  }
990
- }, yt = class {
1028
+ }, Ft = class {
991
1029
  visit(t, e, s) {
992
1030
  return s.name = e.getAttribute("name"), s;
993
1031
  }
994
- }, vt = class extends D {
1032
+ }, Ct = class extends z {
995
1033
  visit(t, e, s) {
996
1034
  const r = {};
997
1035
  r.name = e.getAttribute("name");
@@ -1006,14 +1044,14 @@ var w = class {
1006
1044
  }
1007
1045
  return Object.keys(r).length > 0 && (s.colors = r), r;
1008
1046
  }
1009
- }, Nt = class {
1047
+ }, wt = class {
1010
1048
  visit(t, e, s) {
1011
1049
  const r = {};
1012
1050
  r.name = e.getAttribute("name");
1013
1051
  const o = t.evaluate("majorFont", e), i = this.processFontElement(t, o, {});
1014
1052
  i && (r.majorFont = i.family, i.fallbacks && (r.majorFallbacks = i.fallbacks));
1015
- const n = t.evaluate("minorFont", e), l = this.processFontElement(t, n, {});
1016
- return l && (r.minorFont = l.family, l.fallbacks && (r.minorFallbacks = l.fallbacks)), s.fonts = r, r;
1053
+ const n = t.evaluate("minorFont", e), a = this.processFontElement(t, n, {});
1054
+ return a && (r.minorFont = a.family, a.fallbacks && (r.minorFallbacks = a.fallbacks)), s.fonts = r, r;
1017
1055
  }
1018
1056
  processFontElement(t, e, s) {
1019
1057
  if (!e) return;
@@ -1022,14 +1060,14 @@ var w = class {
1022
1060
  const o = r.getAttribute("typeface");
1023
1061
  o && (s.family = o);
1024
1062
  const i = r.getAttribute("panose");
1025
- return i && (s.fallbacks = [f.getPanoseFallback(i)]), s;
1063
+ return i && (s.fallbacks = [v.getPanoseFallback(i)]), s;
1026
1064
  }
1027
- }, Ft = class extends D {
1065
+ }, Pt = class extends z {
1028
1066
  visit(t, e, s) {
1029
1067
  const r = this.parseFillList(t, e, "fillStyleLst"), o = this.parseLnList(t, e, "lnStyleLst"), i = this.parseEffectStyleList(t, e, "effectStyleLst"), n = this.parseFillList(t, e, "bgFillStyleLst");
1030
1068
  if (r && o && i && n) return s.fillStyleLst = r, s.lnStyleLst = o, s.effectStyleLst = i, void (s.bgFillStyleLst = n);
1031
- const l = t.serializeElement(e);
1032
- l && (s.formatSchemeXml = l);
1069
+ const a = t.serializeElement(e);
1070
+ a && (s.formatSchemeXml = a);
1033
1071
  }
1034
1072
  parseFillList(t, e, s) {
1035
1073
  const r = t.evaluate(s, e);
@@ -1046,11 +1084,11 @@ var w = class {
1046
1084
  }
1047
1085
  parseFillListItem(t, e) {
1048
1086
  switch (e.localName) {
1049
- case "noFill": return { type: A.Type.None };
1087
+ case "noFill": return { type: y.Type.None };
1050
1088
  case "solidFill": {
1051
1089
  const s = this.processAdjColor(t, e);
1052
1090
  return s ? {
1053
- type: A.Type.Solid,
1091
+ type: y.Type.Solid,
1054
1092
  color: s
1055
1093
  } : void 0;
1056
1094
  }
@@ -1086,7 +1124,7 @@ var w = class {
1086
1124
  }
1087
1125
  return o;
1088
1126
  }
1089
- }, Ct = class {
1127
+ }, St = class {
1090
1128
  visit(t, e, s) {
1091
1129
  if (!e) return;
1092
1130
  const r = {}, o = e.getAttribute("r:id");
@@ -1096,7 +1134,7 @@ var w = class {
1096
1134
  }
1097
1135
  return t.copyFromAttribute(e, "tooltip", r, "screenTip"), t.copyFromAttribute(e, "history", r, "history", t.BOOLEAN_COPY), t.copyFromAttribute(e, "tgtFrame", r, "target"), s.hyperlink = r, r;
1098
1136
  }
1099
- }, wt = class {
1137
+ }, xt = class {
1100
1138
  visit(t, e, s) {
1101
1139
  if (!e) return;
1102
1140
  const r = {}, o = [];
@@ -1104,13 +1142,13 @@ var w = class {
1104
1142
  }
1105
1143
  processColorFilter(t, e) {
1106
1144
  const s = {}, r = {
1107
- operator: m.BuiltInOperatorNames.Color,
1145
+ operator: f.BuiltInOperatorNames.Color,
1108
1146
  param: s
1109
1147
  };
1110
1148
  return t.copyFromAttribute(e, "cellColor", s, "cellColor", t.BOOLEAN_COPY), t.copyFromAttribute(e, "dxfId", s, "styleId", t.INT_COPY), r;
1111
1149
  }
1112
1150
  processCustomFilter(t, e) {
1113
- return u({
1151
+ return h({
1114
1152
  operator: e.getAttribute("operator"),
1115
1153
  val: e.getAttribute("val")
1116
1154
  });
@@ -1119,10 +1157,10 @@ var w = class {
1119
1157
  const s = e.getAttribute("and"), r = "and" === s || "1" === s;
1120
1158
  e.getAttribute("val");
1121
1159
  const o = [], i = {
1122
- operator: r ? m.BuiltInOperatorNames.And : m.BuiltInOperatorNames.Or,
1160
+ operator: r ? f.BuiltInOperatorNames.And : f.BuiltInOperatorNames.Or,
1123
1161
  param: o
1124
- }, n = e.childNodes, l = n.length;
1125
- for (let e = 0; e < l; e++) {
1162
+ }, n = e.childNodes, a = n.length;
1163
+ for (let e = 0; e < a; e++) {
1126
1164
  const s = n.item(e);
1127
1165
  if (1 !== s.nodeType) continue;
1128
1166
  let r = null;
@@ -1132,11 +1170,11 @@ var w = class {
1132
1170
  }
1133
1171
  processDynamicFilter(t, e) {
1134
1172
  const s = {}, r = {
1135
- operator: m.BuiltInOperatorNames.TimePeriod,
1173
+ operator: f.BuiltInOperatorNames.TimePeriod,
1136
1174
  param: s
1137
1175
  };
1138
1176
  let o = e.getAttribute("type");
1139
- return "aboveAverage" === o ? o = m.AverageType.Above : "belowAverage" === o && (o = m.AverageType.Below), Object.values(m.AverageType).includes(o) ? (r.operator = m.BuiltInOperatorNames.Average, t.copyFromAttribute(e, "val", s, "stdDevs", t.INT_COPY)) : t.copyFromAttribute(e, "val", s, "anchorDate", t.INT_COPY), t.copyFromAttribute(e, "type", s, "operator"), t.copyFromAttribute(e, "maxVal", s, "maxVal", t.INT_COPY), r;
1177
+ return "aboveAverage" === o ? o = f.AverageType.Above : "belowAverage" === o && (o = f.AverageType.Below), Object.values(f.AverageType).includes(o) ? (r.operator = f.BuiltInOperatorNames.Average, t.copyFromAttribute(e, "val", s, "stdDevs", t.INT_COPY)) : t.copyFromAttribute(e, "val", s, "anchorDate", t.INT_COPY), t.copyFromAttribute(e, "type", s, "operator"), t.copyFromAttribute(e, "maxVal", s, "maxVal", t.INT_COPY), r;
1140
1178
  }
1141
1179
  processDateGroupItem(t, e) {
1142
1180
  const s = {};
@@ -1147,13 +1185,13 @@ var w = class {
1147
1185
  }
1148
1186
  processFilters(t, e) {
1149
1187
  const s = {}, r = {
1150
- operator: m.BuiltInOperatorNames.InSet,
1188
+ operator: f.BuiltInOperatorNames.InSet,
1151
1189
  param: s
1152
1190
  };
1153
1191
  t.copyFromAttribute(e, "blank", r, "blank", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calendarType", r, "calendarType");
1154
1192
  let o = [], i = [];
1155
- const n = e.childNodes, l = n.length;
1156
- for (let e = 0; e < l; e++) {
1193
+ const n = e.childNodes, a = n.length;
1194
+ for (let e = 0; e < a; e++) {
1157
1195
  const s = n.item(e);
1158
1196
  if (1 === s.nodeType) {
1159
1197
  if ("dateGroupItem" === s.localName) {
@@ -1169,14 +1207,14 @@ var w = class {
1169
1207
  }
1170
1208
  processIcon(t, e) {
1171
1209
  const s = {}, r = {
1172
- operator: m.BuiltInOperatorNames.Icon,
1210
+ operator: f.BuiltInOperatorNames.Icon,
1173
1211
  param: s
1174
1212
  };
1175
1213
  return t.copyFromAttribute(e, "iconId", s, "iconId", t.INT_COPY), t.copyFromAttribute(e, "iconSet", s), r;
1176
1214
  }
1177
1215
  processTop10(t, e) {
1178
1216
  const s = {}, r = {
1179
- operator: m.BuiltInOperatorNames.TopN,
1217
+ operator: f.BuiltInOperatorNames.TopN,
1180
1218
  param: s
1181
1219
  };
1182
1220
  return t.copyFromAttribute(e, "filterVal", s, "filterVal", t.FLOAT_COPY), t.copyFromAttribute(e, "percent", s, "percent", t.BOOLEAN_COPY), t.copyFromAttribute(e, "top", s, "top", t.BOOLEAN_COPY), t.copyFromAttribute(e, "val", s, "val", t.FLOAT_COPY), r;
@@ -1192,22 +1230,22 @@ var w = class {
1192
1230
  }
1193
1231
  return r;
1194
1232
  }
1195
- processFilterColumn(t, e, s) {
1196
- if (!e) return null;
1197
- if (!e.hasAttribute("colId")) return;
1198
- const r = parseInt(e.getAttribute("colId"));
1199
- let o = !1;
1200
- if (e.hasAttribute("hiddenButton") && (o = a(e.getAttribute("hiddenButton"))), o && s) {
1201
- let t = s.hiddenButtons;
1202
- t || (t = [], s.hiddenButtons = t), t.push(r);
1203
- }
1233
+ processFilterColumn(e, s, r) {
1234
+ if (!s) return null;
1235
+ if (!s.hasAttribute("colId")) return;
1236
+ const o = parseInt(s.getAttribute("colId"));
1204
1237
  let i = !1;
1205
- if (e.hasAttribute("showButton") && (i = a(e.getAttribute("showButton"))), i && s) {
1206
- let t = s.showButtons;
1207
- !0 !== t && (t || (t = [], s.showButtons = t), t[r] = !0);
1238
+ if (s.hasAttribute("hiddenButton") && (i = t(s.getAttribute("hiddenButton"))), i && r) {
1239
+ let t = r.hiddenButtons;
1240
+ t || (t = [], r.hiddenButtons = t), t.push(o);
1241
+ }
1242
+ let n = !1;
1243
+ if (s.hasAttribute("showButton") && (n = t(s.getAttribute("showButton"))), n && r) {
1244
+ let t = r.showButtons;
1245
+ !0 !== t && (t || (t = [], r.showButtons = t), t[o] = !0);
1208
1246
  }
1209
- const n = this.processFilterCriteria(t, e);
1210
- return n ? (n.index = r, n) : null;
1247
+ const a = this.processFilterCriteria(e, s);
1248
+ return a ? (a.index = o, a) : null;
1211
1249
  }
1212
1250
  processFilterColumns(t, e, s, r) {
1213
1251
  if (!e) return;
@@ -1221,34 +1259,34 @@ var w = class {
1221
1259
  }
1222
1260
  return s;
1223
1261
  }
1224
- }, Pt = class {
1225
- visit(t, e, s) {
1226
- if (!e) return;
1227
- const r = e.getAttribute("ref"), o = {};
1228
- e.hasAttribute("caseSensitive") && (o.collatorOptions = a(e.getAttribute("caseSensitive")) ? F.CaseSensitiveOptions : F.CaseInsensitiveOptions);
1229
- const i = e.getAttribute("sortMethod");
1230
- null != i && "none" !== i && ("stroke" === i ? o.collatorOptions = {
1231
- ...o.collatorOptions,
1262
+ }, Tt = class {
1263
+ visit(e, s, r) {
1264
+ if (!s) return;
1265
+ const o = s.getAttribute("ref"), i = {};
1266
+ s.hasAttribute("caseSensitive") && (i.collatorOptions = t(s.getAttribute("caseSensitive")) ? w.CaseSensitiveOptions : w.CaseInsensitiveOptions);
1267
+ const n = s.getAttribute("sortMethod");
1268
+ null != n && "none" !== n && ("stroke" === n ? i.collatorOptions = {
1269
+ ...i.collatorOptions,
1232
1270
  collation: "stroke"
1233
- } : "pinYin" === i && (o.collatorOptions = {
1234
- ...o.collatorOptions,
1271
+ } : "pinYin" === n && (i.collatorOptions = {
1272
+ ...i.collatorOptions,
1235
1273
  collation: "pinyin"
1236
1274
  }));
1237
- const n = {};
1238
- e.hasAttribute("columnSort") && a(e.getAttribute("columnSort")) && (n.axis = y.Axis.Column);
1239
- const l = p.fastStringToRange(r), c = [];
1240
- return this.processSortConditions(t, e, c, l, o), c.length > 0 && (n.sorts = c), Object.keys(c).length > 0 && (s.sort = n), n;
1275
+ const a = {};
1276
+ s.hasAttribute("columnSort") && t(s.getAttribute("columnSort")) && (a.axis = N.Axis.Column);
1277
+ const l = g.fastStringToRange(o), c = [];
1278
+ return this.processSortConditions(e, s, c, l, i), c.length > 0 && (a.sorts = c), Object.keys(c).length > 0 && (r.sort = a), a;
1241
1279
  }
1242
- processSortCondition(t, e, s, r) {
1243
- if (!e) return null;
1244
- const o = {};
1245
- if (!e.hasAttribute("ref")) return void console.warn("no ref for sort conditional", t.getPath());
1246
- if (e.hasAttribute("ref")) {
1247
- const t = e.getAttribute("ref"), r = p.fastStringToRange(t);
1248
- o.index = s ? r.colStart - s.colStart : r.colStart;
1280
+ processSortCondition(e, s, r, o) {
1281
+ if (!s) return null;
1282
+ const i = {};
1283
+ if (!s.hasAttribute("ref")) return void e.warn("A sort condition has no ref; it was dropped.", { onceKey: "xlsx.sheet.sort.noRef" });
1284
+ if (s.hasAttribute("ref")) {
1285
+ const t = s.getAttribute("ref"), e = g.fastStringToRange(t);
1286
+ i.index = r ? e.colStart - r.colStart : e.colStart;
1249
1287
  }
1250
- const i = { ...r };
1251
- return o.criteria = i, i.reverse = !1, e.hasAttribute("descending") && (i.reverse = a(e.getAttribute("descending"))), t.copyFromAttribute(e, "sortBy", i, "sortOn"), t.copyFromAttribute(e, "dxfId", i), t.copyFromAttribute(e, "iconSet", i), t.copyFromAttribute(e, "customList", i), o;
1288
+ const n = { ...o };
1289
+ return i.criteria = n, n.reverse = !1, s.hasAttribute("descending") && (n.reverse = t(s.getAttribute("descending"))), e.copyFromAttribute(s, "sortBy", n, "sortOn"), e.copyFromAttribute(s, "dxfId", n), e.copyFromAttribute(s, "iconSet", n), e.copyFromAttribute(s, "customList", n), i;
1252
1290
  }
1253
1291
  processSortConditions(t, e, s, r, o) {
1254
1292
  if (!e) return;
@@ -1261,7 +1299,7 @@ var w = class {
1261
1299
  }
1262
1300
  }
1263
1301
  }
1264
- }, St = class extends $ {
1302
+ }, Ot = class extends H {
1265
1303
  visit(t, e, s) {
1266
1304
  this.processNumFmts(t, t.evaluate("numFmts", e), null), t.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
1267
1305
  const r = {
@@ -1269,14 +1307,14 @@ var w = class {
1269
1307
  fonts: {},
1270
1308
  borders: {}
1271
1309
  };
1272
- this.processFonts(t, t.evaluate("fonts", e), r.fonts), this.processFills(t, t.evaluate("fills", e), r.fills), this.processBorders(t, t.evaluate("borders", e), r.borders, !0), r.fills[0] = { type: A.Type.None }, r.fills[1] = {
1273
- type: A.Type.Pattern,
1274
- patternType: A.BuiltInSheetPattern.Gray125
1310
+ this.processFonts(t, t.evaluate("fonts", e), r.fonts), this.processFills(t, t.evaluate("fills", e), r.fills), this.processBorders(t, t.evaluate("borders", e), r.borders, !0), r.fills[0] = { type: y.Type.None }, r.fills[1] = {
1311
+ type: y.Type.Pattern,
1312
+ patternType: y.BuiltInSheetPattern.Gray125
1275
1313
  }, r.borders[0] = {
1276
- bottom: { style: g.StrokeStyle.None },
1277
- left: { style: g.StrokeStyle.None },
1278
- right: { style: g.StrokeStyle.None },
1279
- top: { style: g.StrokeStyle.None }
1314
+ bottom: { style: b.StrokeStyle.None },
1315
+ left: { style: b.StrokeStyle.None },
1316
+ right: { style: b.StrokeStyle.None },
1317
+ top: { style: b.StrokeStyle.None }
1280
1318
  };
1281
1319
  const o = [];
1282
1320
  this.processXFs(t, t.evaluate("cellStyleXfs", e), o, r, null, !1);
@@ -1287,6 +1325,8 @@ var w = class {
1287
1325
  }
1288
1326
  const n = [];
1289
1327
  this.processXFs(t, t.evaluate("cellXfs", e), n, r, i), Object.keys(n).length > 0 && (s.direct = n);
1328
+ const a = this.collectHiddenXfs(t.evaluate("cellXfs", e));
1329
+ a.size > 0 && t.getVisitorParamsState().set(c, a);
1290
1330
  const l = [];
1291
1331
  return this.processDXFs(t, t.evaluate("dxfs", e), l), this.processTableStyles(t, t.evaluate("tableStyles", e), s, l), this.processIndexColors(t, t.evaluate("colors/indexedColors", e), s), this.processMruColors(t, t.evaluate("colors/mruColors", e), s), s;
1292
1332
  }
@@ -1332,83 +1372,98 @@ var w = class {
1332
1372
  }
1333
1373
  processXFs(t, e, s, r, o = null, i = !0) {
1334
1374
  if (!e) return;
1335
- const n = e.childNodes, l = n.length;
1336
- for (let e = 0; e < l; e++) {
1337
- const l = n.item(e);
1338
- if (1 === l.nodeType && "xf" === l.localName) {
1375
+ const n = e.childNodes, a = n.length;
1376
+ for (let e = 0; e < a; e++) {
1377
+ const a = n.item(e);
1378
+ if (1 === a.nodeType && "xf" === a.localName) {
1339
1379
  const e = {};
1340
- this.processXF(t, l, e, r, o, i), s.push(e);
1380
+ this.processXF(t, a, e, r, o, i), s.push(e);
1341
1381
  }
1342
1382
  }
1343
1383
  }
1344
- processXF(t, e, s, r, o, i) {
1345
- if (!e) return;
1346
- const n = e.getAttribute("xfId");
1347
- if (n && o) {
1348
- const t = o.get(parseInt(n));
1349
- t && t !== v.BuiltInName.Normal && (s.named = t);
1384
+ processXF(e, s, r, o, i, n) {
1385
+ if (!s) return;
1386
+ const a = s.getAttribute("xfId");
1387
+ if (a && i) {
1388
+ const t = i.get(parseInt(a));
1389
+ t && t !== F.BuiltInName.Normal && (r.named = t);
1350
1390
  }
1351
- const l = (t) => !(!i && e.hasAttribute(t)) || a(e.getAttribute(t)), c = (t) => !i || e.hasAttribute(t) && a(e.getAttribute(t)), u = "0", h = i ? u : void 0;
1391
+ const l = (e) => !(!n && s.hasAttribute(e)) || t(s.getAttribute(e)), c = (e) => !n || s.hasAttribute(e) && t(s.getAttribute(e)), u = "0", h = n ? u : void 0;
1352
1392
  if (l("applyFont")) {
1353
- const t = e.getAttribute("fontId") ?? h;
1393
+ const t = s.getAttribute("fontId") ?? h;
1354
1394
  if (void 0 !== t && (t !== u || c("applyFont"))) {
1355
- const e = r.fonts[t];
1356
- void 0 !== e && (s.font = e);
1395
+ const e = o.fonts[t];
1396
+ void 0 !== e && (r.font = e);
1357
1397
  }
1358
1398
  }
1359
1399
  if (l("applyFill")) {
1360
- const t = e.getAttribute("fillId") ?? h;
1400
+ const t = s.getAttribute("fillId") ?? h;
1361
1401
  if (void 0 !== t && (t !== u || c("applyFill"))) {
1362
- const e = r.fills[t];
1363
- void 0 !== e && Object.keys(e).length > 0 && (s.fill = e);
1402
+ const e = o.fills[t];
1403
+ void 0 !== e && Object.keys(e).length > 0 && (r.fill = e);
1364
1404
  }
1365
1405
  }
1366
1406
  if (l("applyBorder")) {
1367
- const t = e.getAttribute("borderId") ?? h;
1407
+ const t = s.getAttribute("borderId") ?? h;
1368
1408
  if (void 0 !== t && (t !== u || c("applyBorder"))) {
1369
- const e = r.borders[t];
1370
- void 0 !== e && (s.border = e);
1409
+ const e = o.borders[t];
1410
+ void 0 !== e && (r.borders = e);
1371
1411
  }
1372
1412
  }
1373
1413
  if (l("applyNumberFormat")) {
1374
- const r = e.getAttribute("numFmtId") ?? h;
1375
- if (void 0 !== r && (r !== u || c("applyNumberFormat"))) {
1376
- const e = parseInt(r);
1414
+ const t = s.getAttribute("numFmtId") ?? h;
1415
+ if (void 0 !== t && (t !== u || c("applyNumberFormat"))) {
1416
+ const s = parseInt(t);
1377
1417
  let o;
1378
- const i = t.getVisitorParamsState();
1418
+ const i = e.getVisitorParamsState();
1379
1419
  if (i) {
1380
1420
  const t = i.get("numFmts");
1381
- t && (o = t.get(e)), s.numberFormat = o ?? e;
1382
- } else console.warn("no visitor params state");
1421
+ t && (o = t.get(s)), r.numberFormat = o ?? s;
1422
+ } else e.warn("Number formats were unavailable; a cell format was not read.", { onceKey: "xlsx.style.numberFormat.state" });
1383
1423
  }
1384
1424
  }
1385
1425
  if (l("applyAlignment")) {
1386
- const r = t.evaluate("alignment", e);
1387
- (r || c("applyAlignment")) && this.processAlignment(t, r, s);
1426
+ const t = e.evaluate("alignment", s);
1427
+ (t || c("applyAlignment")) && this.processAlignment(e, t, r);
1388
1428
  }
1389
1429
  if (l("applyProtection")) {
1390
- const r = t.evaluate("protection", e);
1391
- (r || c("applyProtection")) && this.processProtection(t, r, s);
1430
+ const t = e.evaluate("protection", s);
1431
+ (t || c("applyProtection")) && this.processProtection(e, t, r);
1392
1432
  }
1393
- const p = a(e.getAttribute("quotePrefix") ?? "");
1394
- p && (s.quotePrefix = p);
1433
+ const p = t(s.getAttribute("quotePrefix") ?? "");
1434
+ p && (r.quotePrefix = p);
1395
1435
  }
1396
- processAlignment(t, e, s) {
1397
- const r = {};
1398
- if (e?.hasAttribute("horizontal") ? r.horizontal = e.getAttribute("horizontal") : r.horizontal = N.HorizontalAlignment.General, e?.hasAttribute("vertical") ? r.vertical = e.getAttribute("vertical") : r.vertical = N.VerticalAlignment.Bottom, e?.hasAttribute("indent") ? r.indent = parseInt(e.getAttribute("indent")) : r.indent = 0, e?.hasAttribute("relativeIndent") ? r.relativeIndent = parseInt(e.getAttribute("relativeIndent")) : r.relativeIndent = 0, a(e?.getAttribute("wrapText") ?? "") ? r.overflow = N.Overflow.Wrap : r.overflow = N.Overflow.Visible, a(e?.getAttribute("shrinkToFit") ?? "") && (r.overflow = N.Overflow.Shrink), e?.hasAttribute("textRotation")) {
1399
- let t = parseFloat(e.getAttribute("textRotation"));
1400
- t > 0 && t <= 90 ? t = 360 - t : t > 90 && t <= 180 ? t -= 90 : 255 === t && (t = 0, r.stacked = !0), r.rotation = t;
1401
- } else r.rotation = 0;
1402
- e?.hasAttribute("justifyLastLine") && (r.justifyLastLine = a(e.getAttribute("justifyLastLine")));
1403
- const o = e?.getAttribute("readingOrder");
1404
- return o && ("0" === o ? r.readingDirection = N.ReadingDirection.Auto : "1" === o ? r.readingDirection = N.ReadingDirection.LeftToRight : "2" === o ? r.readingDirection = N.ReadingDirection.RightToLeft : console.warn(`invalid readingOrder: ${o}`)), Object.keys(r).length > 0 && (s.alignment = r), s;
1405
- }
1406
- processProtection(t, e, s) {
1407
- if (!e) return;
1408
- const r = {}, o = e.getAttribute("locked");
1409
- o && !a(o) && (r.edit = !0);
1410
- const i = e.getAttribute("hidden");
1411
- return i && a(i) && (r.formulaHidden = !0), Object.keys(r).length > 0 && (s.protection = r), s;
1436
+ processAlignment(e, s, r) {
1437
+ const o = {};
1438
+ if (s?.hasAttribute("horizontal") ? o.horizontal = s.getAttribute("horizontal") : o.horizontal = C.HorizontalAlignment.General, s?.hasAttribute("vertical") ? o.vertical = s.getAttribute("vertical") : o.vertical = C.VerticalAlignment.Bottom, s?.hasAttribute("indent") ? o.indent = parseInt(s.getAttribute("indent")) : o.indent = 0, s?.hasAttribute("relativeIndent") ? o.relativeIndent = parseInt(s.getAttribute("relativeIndent")) : o.relativeIndent = 0, t(s?.getAttribute("wrapText") ?? "") ? o.overflow = C.Overflow.Wrap : o.overflow = C.Overflow.Visible, t(s?.getAttribute("shrinkToFit") ?? "") && (o.overflow = C.Overflow.Shrink), s?.hasAttribute("textRotation")) {
1439
+ let t = parseFloat(s.getAttribute("textRotation"));
1440
+ t > 0 && t <= 90 ? t = 360 - t : t > 90 && t <= 180 ? t -= 90 : 255 === t && (t = 0, o.stacked = !0), o.rotation = t;
1441
+ } else o.rotation = 0;
1442
+ s?.hasAttribute("justifyLastLine") && (o.justifyLastLine = t(s.getAttribute("justifyLastLine")));
1443
+ const i = s?.getAttribute("readingOrder");
1444
+ return i && ("0" === i ? o.readingDirection = C.ReadingDirection.Auto : "1" === i ? o.readingDirection = C.ReadingDirection.LeftToRight : "2" === i ? o.readingDirection = C.ReadingDirection.RightToLeft : e.warn(`Invalid readingOrder '${i}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(o).length > 0 && (r.alignment = o), r;
1445
+ }
1446
+ collectHiddenXfs(e) {
1447
+ const s = /* @__PURE__ */ new Set();
1448
+ if (!e) return s;
1449
+ const r = e.childNodes;
1450
+ let o = 0;
1451
+ for (let e = 0; e < r.length; e++) {
1452
+ const i = r.item(e);
1453
+ if (1 !== i.nodeType || "xf" !== i.localName) continue;
1454
+ const n = i.childNodes;
1455
+ for (let e = 0; e < n.length; e++) {
1456
+ const r = n.item(e);
1457
+ 1 === r.nodeType && "protection" === r.localName && t(r.getAttribute("hidden") ?? "") && s.add(o);
1458
+ }
1459
+ o++;
1460
+ }
1461
+ return s;
1462
+ }
1463
+ processProtection(e, s, r) {
1464
+ if (!s) return;
1465
+ const o = s.getAttribute("locked");
1466
+ return r.protection = { alwaysUnlocked: !!o && !t(o) }, r;
1412
1467
  }
1413
1468
  processDXF(t, e, s) {
1414
1469
  if (!e) return;
@@ -1423,7 +1478,7 @@ var w = class {
1423
1478
  this.processFill(t, o, e, 0), e.length > 0 && e[0] && (s.fill = e[0]);
1424
1479
  } else if (1 === o.nodeType && "border" === o.localName) {
1425
1480
  const e = [];
1426
- this.processBorder(t, o, e, 0, !1), e.length > 0 && e[0] && (s.border = e[0]);
1481
+ this.processBorder(t, o, e, 0, !1), e.length > 0 && e[0] && (s.borders = e[0]);
1427
1482
  } else if (1 === o.nodeType && "numFmt" === o.localName) {
1428
1483
  const t = o.getAttribute("formatCode");
1429
1484
  if (t) s.numberFormat = t;
@@ -1451,60 +1506,60 @@ var w = class {
1451
1506
  }
1452
1507
  t.getVisitorParamsState().delete("processingDXFs");
1453
1508
  }
1454
- processTableStyle(t, e, s, r, o = !1) {
1455
- const i = e.getAttribute("name"), n = { name: i };
1456
- e.hasAttribute("table") && (n.table = a(e.getAttribute("table"))), e.hasAttribute("pivot") && (n.pivot = a(e.getAttribute("pivot"))), o && !n.pivot && r.unshift(null);
1457
- const l = e.childNodes, c = l.length;
1509
+ processTableStyle(e, s, r, o, i = !1) {
1510
+ const n = s.getAttribute("name"), a = { name: n };
1511
+ s.hasAttribute("table") && (a.table = t(s.getAttribute("table"))), s.hasAttribute("pivot") && (a.pivot = t(s.getAttribute("pivot"))), i && !a.pivot && o.unshift(null);
1512
+ const l = s.childNodes, c = l.length;
1458
1513
  for (let t = 0; t < c; t++) {
1459
- const e = l.item(t);
1460
- if (1 === e.nodeType && "tableStyleElement" === e.localName) {
1461
- const t = e.getAttribute("type"), s = e.getAttribute("dxfId");
1462
- let o = null != s ? r?.[s] : void 0;
1463
- o || (console.warn("invalid dfx id", s), o = {}), n[t] = o;
1464
- let i = null;
1465
- e.hasAttribute("size") && (i = parseInt(e.getAttribute("size"))), i && !isNaN(i) && (o.size = i);
1514
+ const s = l.item(t);
1515
+ if (1 === s.nodeType && "tableStyleElement" === s.localName) {
1516
+ const t = s.getAttribute("type"), r = s.getAttribute("dxfId");
1517
+ let i = null != r ? o?.[r] : void 0;
1518
+ i || (e.warn(`A table style names a format that does not exist (dxfId '${r}').`, { onceKey: "xlsx.style.tableStyle.dxf" }), i = {}), a[t] = i;
1519
+ let n = null;
1520
+ s.hasAttribute("size") && (n = parseInt(s.getAttribute("size"))), n && !isNaN(n) && (i.size = n);
1466
1521
  }
1467
1522
  }
1468
- delete n.name, s[i] = n;
1523
+ delete a.name, r[n] = a;
1469
1524
  }
1470
1525
  processTableStyles(t, e, s, r, o) {
1471
1526
  if (!e) return;
1472
1527
  const i = {}, n = e.getAttribute("defaultTableStyle");
1473
1528
  n && (i.defaultTableStyle = n);
1474
- const l = e.getAttribute("defaultPivotStyle");
1475
- l && (i.defaultPivotStyle = l);
1476
- const a = e.childNodes, c = {}, u = a.length;
1529
+ const a = e.getAttribute("defaultPivotStyle");
1530
+ a && (i.defaultPivotStyle = a);
1531
+ const l = e.childNodes, c = {}, u = l.length;
1477
1532
  for (let e = 0; e < u; e++) {
1478
- const s = a.item(e);
1533
+ const s = l.item(e);
1479
1534
  1 === s.nodeType && "tableStyle" === s.localName && this.processTableStyle(t, s, c, r, o);
1480
1535
  }
1481
1536
  return Object.keys(c).length > 0 && (i.styles = c), Object.keys(i).length > 0 && (s.tables = i), s;
1482
1537
  }
1483
- processCellStyles(t, e, s, r, o) {
1484
- if (!e) return;
1485
- const i = e.childNodes, n = i.length;
1486
- for (let t = 0; t < n; t++) {
1487
- const e = i.item(t);
1488
- if (1 === e.nodeType && "cellStyle" === e.localName) {
1489
- const t = parseInt(e.getAttribute("xfId") ?? ""), i = e.getAttribute("name"), n = e.getAttribute("builtinId");
1490
- let l = i;
1491
- if (null !== n) {
1492
- const t = v.builtInNameFromId(parseInt(n));
1538
+ processCellStyles(e, s, r, o, i) {
1539
+ if (!s) return;
1540
+ const n = s.childNodes, a = n.length;
1541
+ for (let e = 0; e < a; e++) {
1542
+ const s = n.item(e);
1543
+ if (1 === s.nodeType && "cellStyle" === s.localName) {
1544
+ const e = parseInt(s.getAttribute("xfId") ?? ""), n = s.getAttribute("name"), a = s.getAttribute("builtinId");
1545
+ let l = n;
1546
+ if (null !== a) {
1547
+ const t = F.builtInNameFromId(parseInt(a));
1493
1548
  void 0 !== t && (l = t);
1494
1549
  }
1495
- if (o.set(t, l), !r[t]) continue;
1550
+ if (i.set(e, l), !o[e]) continue;
1496
1551
  const c = {
1497
1552
  name: l,
1498
- style: r[t]
1553
+ style: o[e]
1499
1554
  };
1500
- e.getAttribute("hidden") && (c.hidden = a(e.getAttribute("hidden"))), e.getAttribute("iLevel") && (c.iLevel = parseInt(e.getAttribute("iLevel"))), s.push(c);
1555
+ s.getAttribute("hidden") && (c.hidden = t(s.getAttribute("hidden"))), s.getAttribute("iLevel") && (c.iLevel = parseInt(s.getAttribute("iLevel"))), r.push(c);
1501
1556
  }
1502
1557
  }
1503
1558
  }
1504
1559
  afterVisit(t, e, s) {}
1505
- }, Ot = class extends $ {
1560
+ }, kt = class extends H {
1506
1561
  visit(t, e, s) {
1507
- return this.processSheetRefs(t, t.evaluate("sheets", e), s), this.processExternalReferences(t, t.evaluate("externalReferences", e), s), this.processBookViews(t, t.evaluate("bookViews", e), s), this.processDefinedNames(t, t.evaluate("definedNames", e), s), this.processCalcPr(t, t.evaluate("calcPr", e), s), this.processWorkbookProtection(t, t.evaluate("workbookProtection", e), s), this.processWorkbookPr(t, t.evaluate("workbookPr", e), s), s;
1562
+ return this.processSheetRefs(t, t.evaluate("sheets", e), s), this.processExternalReferences(t, t.evaluate("externalReferences", e), s), this.processBookViews(t, t.evaluate("bookViews", e), s), this.processDefinedNames(t, t.evaluate("definedNames", e), s), this.processCalcPr(t, t.evaluate("calcPr", e), s), this.processPivotCaches(t, t.evaluate("pivotCaches", e), s), this.processWorkbookProtection(t, t.evaluate("workbookProtection", e), s), this.processWorkbookPr(t, t.evaluate("workbookPr", e), s), s;
1508
1563
  }
1509
1564
  processPassword(t, e, s, r = "workbook", o = "password") {
1510
1565
  if (!e) return;
@@ -1514,12 +1569,16 @@ var w = class {
1514
1569
  processWorkbookProtection(t, e, s) {
1515
1570
  if (!e) return;
1516
1571
  const r = {};
1517
- return this.processPassword(t, e, r, "workbook", "password"), this.processPassword(t, e, r, "revisions", "revisionsPassword"), t.copyFromAttribute(e, "lockStructure", r, "structure", t.BOOLEAN_COPY), t.copyFromAttribute(e, "lockWindows", r, "windows", t.BOOLEAN_COPY), t.copyFromAttribute(e, "lockRevision", r, "revision", t.BOOLEAN_COPY), s.protection = r, s;
1572
+ this.processPassword(t, e, r, "workbook", "password"), this.processPassword(t, e, r, "revisions", "revisionsPassword");
1573
+ for (const t of u) r[t.key] = p(t, e.getAttribute(t.attribute));
1574
+ return s.protection = r, s;
1518
1575
  }
1519
1576
  processCalcPr(t, e, s) {
1520
1577
  if (!e) return;
1521
1578
  const r = {};
1522
- t.copyFromAttribute(e, "calcMode", r, "calcMode", (t) => H[t] ?? null), t.copyFromAttribute(e, "fullCalcOnLoad", r, "fullCalcOnLoad", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcOnSave", r, "calcOnSave", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcCompleted", r, "calcCompleted", t.BOOLEAN_COPY), t.copyFromAttribute(e, "fullPrecision", r, "fullPrecision", t.BOOLEAN_COPY), t.copyFromAttribute(e, "forceFullCalc", r, "forceFullCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "concurrentCalc", r, "concurrentCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "refMode", r, "refMode"), t.copyFromAttribute(e, "iterate", r, "iterate", t.BOOLEAN_COPY), t.copyFromAttribute(e, "iterateCount", r, "maxIterations", t.INT_COPY), t.copyFromAttribute(e, "iterateDelta", r, "maxIterateChange", t.FLOAT_COPY), s.calc = r;
1579
+ t.copyFromAttribute(e, "calcMode", r, "calcMode", (t) => J[t] ?? null), t.copyFromAttribute(e, "fullCalcOnLoad", r, "fullCalcOnLoad", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcOnSave", r, "calcOnSave", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcCompleted", r, "calcCompleted", t.BOOLEAN_COPY), t.copyFromAttribute(e, "fullPrecision", r, "fullPrecision", t.BOOLEAN_COPY), t.copyFromAttribute(e, "forceFullCalc", r, "forceFullCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "concurrentCalc", r, "concurrentCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "refMode", r, "refMode"), t.copyFromAttribute(e, "iterate", r, "iterate", t.BOOLEAN_COPY), t.copyFromAttribute(e, "iterateCount", r, "maxIteration", t.INT_COPY), t.copyFromAttribute(e, "iterateDelta", r, "maxIterateChange", t.FLOAT_COPY);
1580
+ const o = e.getAttribute("calcId");
1581
+ null !== o && t.getVisitorParamsState().set("calcId", o), s.calc = r;
1523
1582
  }
1524
1583
  processSheetRefs(t, e, s) {
1525
1584
  if (!e) return;
@@ -1532,7 +1591,7 @@ var w = class {
1532
1591
  }
1533
1592
  processSheetRef(t, e, s) {
1534
1593
  const r = {};
1535
- t.copyFromAttribute(e, "name", r, "name"), t.copyFromAttribute(e, "state", r, "visibility");
1594
+ t.copyFromAttribute(e, "name", r, "name"), t.copyFromAttribute(e, "state", r, "visibility"), t.copyFromAttribute(e, "sheetId", r, "sheetId", t.INT_COPY);
1536
1595
  const o = e.getAttribute("r:id"), i = t.getRef(o);
1537
1596
  i && (r.sheet = i), s.push(r);
1538
1597
  }
@@ -1548,6 +1607,22 @@ var w = class {
1548
1607
  }
1549
1608
  r.length > 0 && (s.externalBooks = r);
1550
1609
  }
1610
+ processPivotCaches(t, e, s) {
1611
+ if (!e) return;
1612
+ const r = [], o = e.childNodes, i = o.length;
1613
+ for (let e = 0; e < i; e++) {
1614
+ const s = o.item(e);
1615
+ if (1 !== s.nodeType || "pivotCache" !== s.localName) continue;
1616
+ const i = parseInt(s.getAttribute("cacheId") ?? "", 10), n = s.getAttribute("r:id");
1617
+ if (isNaN(i) || !n) continue;
1618
+ const a = t.readEmbeddedPart(n);
1619
+ a && r.push({
1620
+ cacheId: i,
1621
+ part: a
1622
+ });
1623
+ }
1624
+ r.length > 0 && (s.pivotCaches = r);
1625
+ }
1551
1626
  processBookViews(t, e, s) {
1552
1627
  if (!e) return;
1553
1628
  const r = e.childNodes;
@@ -1567,9 +1642,9 @@ var w = class {
1567
1642
  if (!e) return;
1568
1643
  const o = {}, i = e.firstChild;
1569
1644
  if (i && 3 === i.nodeType && (o.ref = i.textContent), t.copyFromAttribute(e, "name", o), t.copyFromAttribute(e, "comment", o), t.copyFromAttribute(e, "hidden", o, "hidden", t.BOOLEAN_COPY), e.hasAttribute("localSheetId")) {
1570
- const t = e.getAttribute("localSheetId");
1571
- if (!r[t]?.name) return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${t}' which does not exist.`);
1572
- o.scope = r[t].name;
1645
+ const s = e.getAttribute("localSheetId");
1646
+ if (!r[s]?.name) return void t.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${s}' which does not exist.`);
1647
+ o.scope = r[s].name;
1573
1648
  }
1574
1649
  t.copyFromAttribute(e, "customMenu", o), t.copyFromAttribute(e, "description", o), t.copyFromAttribute(e, "statusBar", o), t.copyFromAttribute(e, "help", o), t.copyFromAttribute(e, "shortcutKey", o), t.copyFromAttribute(e, "function", o, "function", t.BOOLEAN_COPY), t.copyFromAttribute(e, "functionGroupId", o, "functionGroupId", t.INT_COPY), t.copyFromAttribute(e, "publishToServer", o, "publishToServer", t.BOOLEAN_COPY), t.copyFromAttribute(e, "vbProcedure", o, "vbProcedure", t.BOOLEAN_COPY), t.copyFromAttribute(e, "xlm", o, "xlm", t.BOOLEAN_COPY), Object.keys(o).length > 0 && s.push(o);
1575
1650
  }
@@ -1583,13 +1658,13 @@ var w = class {
1583
1658
  r.length > 0 && (s.names = r);
1584
1659
  }
1585
1660
  processWorkbookPr(t, e, s) {
1586
- e && t.copyFromAttribute(e, "date1904", s, "date1904", t.BOOLEAN_COPY);
1661
+ e && (t.copyFromAttribute(e, "date1904", s, "date1904", t.BOOLEAN_COPY), t.copyFromAttribute(e, "codeName", s, "codeName"), t.copyFromAttribute(e, "updateLinks", s, "updateLinks"));
1587
1662
  }
1588
1663
  afterVisit(t, e, s) {}
1589
- }, Tt = class {
1664
+ }, Vt = class {
1590
1665
  visit(t, e, s) {
1591
1666
  const r = {};
1592
- return t.copyFromAttribute(e, "ref", s, "r"), t.getVisitorParamsState().set("ref", s.r), s.v = r, t.copyFromAttribute(e, "name", r), t.copyFromAttribute(e, "displayName", r), t.copyFromAttribute(e, "headerRowCount", r, "headerRowCount", t.INT_COPY), t.copyFromAttribute(e, "totalsRowCount", r, "totalsRowCount", t.INT_COPY), this.processTableColumns(t, e, r), this.processTableStyleInfo(t, e, r), t.copyFromAttribute(e, "id", r), t.copyFromAttribute(e, "comment", r, "description"), t.copyFromAttribute(e, "connectionId", r, "connectionId", t.INT_COPY), t.copyFromAttribute(e, "tableType", r), t.copyFromAttribute(e, "published", r, "published", t.BOOLEAN_COPY), t.copyFromAttribute(e, "insertRow", r, "insertRow", t.BOOLEAN_COPY), t.copyFromAttribute(e, "insertRowShift", r, "insertRowShift", t.BOOLEAN_COPY), t.copyFromAttribute(e, "totalsRowShown", r, "totalsRowShown", t.BOOLEAN_COPY), r;
1667
+ return t.copyFromAttribute(e, "ref", s, "r"), t.getVisitorParamsState().set("ref", s.r), s.v = r, t.copyFromAttribute(e, "name", r), t.copyFromAttribute(e, "displayName", r), t.copyFromAttribute(e, "headerRowCount", r, "headerRowCount", t.INT_COPY), t.copyFromAttribute(e, "totalsRowCount", r, "totalsRowCount", t.INT_COPY), this.processTableColumns(t, e, r), this.processTableStyleInfo(t, e, r), t.copyFromAttribute(e, "id", r), t.copyFromAttribute(e, "comment", r, "description"), t.copyFromAttribute(e, "connectionId", r, "connectionId", t.INT_COPY), t.copyFromAttribute(e, "tableType", r), t.copyFromAttribute(e, "published", r, "published", t.BOOLEAN_COPY), t.copyFromAttribute(e, "insertRow", r, "insertRow", t.BOOLEAN_COPY), t.copyFromAttribute(e, "insertRowShift", r, "insertRowShift", t.BOOLEAN_COPY), r.totalsRowShown = "0" !== e.getAttribute("totalsRowShown"), r;
1593
1668
  }
1594
1669
  afterVisit(t, e, s) {
1595
1670
  const r = s.v;
@@ -1623,7 +1698,9 @@ var w = class {
1623
1698
  const s = t.evaluate("totalsRowFormula", o);
1624
1699
  s && (e.totalsRowFormula = s.textContent);
1625
1700
  } else e.totalsRowFormula = r;
1626
- t.copyFromAttribute(o, "totalsRowLabel", e), s.push(e);
1701
+ t.copyFromAttribute(o, "totalsRowLabel", e);
1702
+ const i = t.evaluate("calculatedColumnFormula", o);
1703
+ i?.textContent && (e.calculatedColumnFormula = i.textContent), s.push(e);
1627
1704
  }
1628
1705
  }
1629
1706
  return s;
@@ -1636,7 +1713,7 @@ var w = class {
1636
1713
  }
1637
1714
  o.length > 0 && (s.columns = o);
1638
1715
  }
1639
- }, xt = class {
1716
+ }, It = class {
1640
1717
  visit(t, e, s) {
1641
1718
  const r = t.getVisitorParamsState().get("ref");
1642
1719
  if (r) {
@@ -1645,7 +1722,7 @@ var w = class {
1645
1722
  }
1646
1723
  return t.copyFromAttribute(e, "altText", s), t.copyFromAttribute(e, "altTextSummary", s), s;
1647
1724
  }
1648
- }, kt = class {
1725
+ }, Lt = class {
1649
1726
  visit(t, e, s) {
1650
1727
  const r = e.childNodes, o = r.length;
1651
1728
  let i = null;
@@ -1656,7 +1733,12 @@ var w = class {
1656
1733
  break;
1657
1734
  }
1658
1735
  }
1659
- return i ? (e.getAttribute("mc:Ignorable") && (s.mceIgnorable = !0), s.sheetNames = [], this.processSheetNames(t, i, s), this.processDefinedNames(t, i, s), this.processSheetDataSet(t, i, s), s) : s;
1736
+ if (!i) return s;
1737
+ e.getAttribute("mc:Ignorable") && (s.mceIgnorable = !0);
1738
+ const n = i.getAttribute("r:id");
1739
+ n && (s.__bookRelId = n);
1740
+ const a = this._findAbsoluteUrlRelId(i);
1741
+ return a && (s.__absoluteUrlRelId = a), s.sheetNames = [], this.processSheetNames(t, i, s), this.processDefinedNames(t, i, s), this.processSheetDataSet(t, i, s), s;
1660
1742
  }
1661
1743
  processSheetNames(t, e, s) {
1662
1744
  const r = this._findChild(e, "sheetNames");
@@ -1699,7 +1781,7 @@ var w = class {
1699
1781
  o.length > 0 && (s.sheetDataSet = o);
1700
1782
  }
1701
1783
  processSheetData(t, e) {
1702
- const s = new C.Builder(), r = e.childNodes, o = r.length;
1784
+ const s = new P.Builder(), r = e.childNodes, o = r.length;
1703
1785
  for (let t = 0; t < o; t++) {
1704
1786
  const e = r.item(t);
1705
1787
  if (1 !== e.nodeType || "row" !== e.localName) continue;
@@ -1709,7 +1791,7 @@ var w = class {
1709
1791
  if (1 !== e.nodeType || "cell" !== e.localName) continue;
1710
1792
  const r = e.getAttribute("r");
1711
1793
  if (!r) continue;
1712
- const i = p.fastStringToCell(r);
1794
+ const i = g.fastStringToCell(r);
1713
1795
  if (void 0 === i?.rowIndex || void 0 === i?.colIndex) continue;
1714
1796
  const n = this._readCellValue(e);
1715
1797
  void 0 !== n && s.pushAt(i.rowIndex, i.colIndex, n);
@@ -1729,7 +1811,7 @@ var w = class {
1729
1811
  case "str":
1730
1812
  default: return e;
1731
1813
  case "e": {
1732
- const t = d.getBuiltInByLabel(e);
1814
+ const t = m.getBuiltInByLabel(e);
1733
1815
  return t ? {
1734
1816
  t: "e",
1735
1817
  v: t.getCode()
@@ -1745,13 +1827,17 @@ var w = class {
1745
1827
  }
1746
1828
  return null;
1747
1829
  }
1748
- }, Vt = class {
1830
+ _findAbsoluteUrlRelId(t) {
1831
+ const e = this._findChild(t, "alternateUrls");
1832
+ return e ? this._findChild(e, "absoluteUrl")?.getAttribute("r:id") ?? null : null;
1833
+ }
1834
+ }, _t = class {
1749
1835
  visit(t, e, s) {
1750
1836
  t.copyFromAttribute(e, "name", s), t.copyFromAttribute(e, "sourceName", s);
1751
1837
  const r = t.evaluate("*/tableSlicerCache", e);
1752
- return r ? (t.copyFromAttribute(r, "tableId", s), t.copyFromAttribute(r, "column", s, "columnId"), t.copyFromAttribute(r, "crossFilter", s), s) : (console.warn("SlicerCacheDefinitionVisitor: missing tableSlicerCache element"), s);
1838
+ return r ? (t.copyFromAttribute(r, "tableId", s), t.copyFromAttribute(r, "column", s, "columnId"), t.copyFromAttribute(r, "crossFilter", s), s) : (t.warn("A slicer names no table; it was not imported.", { onceKey: "xlsx.slicer.cacheDefinition" }), s);
1753
1839
  }
1754
- }, It = class {
1840
+ }, Bt = class {
1755
1841
  visit(t, e, s) {
1756
1842
  let r = s.slicers;
1757
1843
  r || (r = {}, s.slicers = r);
@@ -1773,35 +1859,35 @@ var w = class {
1773
1859
  }
1774
1860
  t.copyFromAttribute(e, "caption", r), t.copyFromAttribute(e, "startItem", r, "startItem", t.INT_COPY), t.copyFromAttribute(e, "columnCount", r, "columnCount", t.INT_COPY), t.copyFromAttribute(e, "showCaption", r, "showCaption", t.BOOLEAN_COPY), t.copyFromAttribute(e, "level", r, "level", t.INT_COPY), t.copyFromAttribute(e, "style", r), t.copyFromAttribute(e, "locked", r, "locked", t.BOOLEAN_COPY), t.copyFromAttribute(e, "rowHeight", r, "rowHeight", t.INT_COPY);
1775
1861
  }
1776
- }, Lt = class {
1862
+ }, Et = class {
1777
1863
  visit(t, e, s) {
1778
1864
  return s;
1779
1865
  }
1780
- }, Bt = class {
1866
+ }, Rt = class {
1781
1867
  visit(t, e, s) {
1782
1868
  if (!e) return;
1783
1869
  const r = {};
1784
1870
  return t.copyFromAttribute(e, "editAs", r, "anchorType"), r.anchor = {}, "absoluteAnchor" === e.localName ? (r.anchorType = "absolute", this.processAbsoluteCoord(t, t.evaluate("xdr:pos", e), r.anchor, "from", "x", "y"), this.processAbsoluteCoord(t, t.evaluate("xdr:ext", e), r.anchor, "to", "cx", "cy")) : "oneCellAnchor" === e.localName ? (this.processOffsetCoord(t, t.evaluate("from", e), r.anchor, "from"), this.processAbsoluteCoord(t, t.evaluate("xdr:ext", e), r.anchor, "to", "cx", "cy")) : (this.processOffsetCoord(t, t.evaluate("from", e), r.anchor, "from"), this.processOffsetCoord(t, t.evaluate("to", e), r.anchor, "to")), s.movables || (s.movables = []), s.movables.push(r), r;
1785
1871
  }
1786
- processAbsoluteCoord(e, s, r, o, i, n) {
1787
- if (!s) return;
1788
- const l = {
1872
+ processAbsoluteCoord(t, e, s, r, o, i) {
1873
+ if (!e) return;
1874
+ const n = {
1789
1875
  x: 0,
1790
1876
  y: 0
1791
1877
  };
1792
- return l.x = t(s.getAttribute(i)), l.y = t(s.getAttribute(n)), "from" === o ? r.tl = l : r.br = l, r;
1878
+ return n.x = l(e.getAttribute(o)), n.y = l(e.getAttribute(i)), "from" === r ? s.tl = n : s.br = n, s;
1793
1879
  }
1794
- processOffsetCoord(e, s, r, o) {
1795
- if (!s) return;
1796
- const i = {
1880
+ processOffsetCoord(t, e, s, r) {
1881
+ if (!e) return;
1882
+ const o = {
1797
1883
  c: 0,
1798
1884
  r: 0,
1799
1885
  x: 0,
1800
1886
  y: 0
1801
1887
  };
1802
- return e.evaluate("col", s) && (i.c = parseInt(e.evaluate("col", s).textContent)), e.evaluate("row", s) && (i.r = parseInt(e.evaluate("row", s).textContent)), e.evaluate("colOff", s) && (i.x = t(e.evaluate("colOff", s).textContent)), e.evaluate("rowOff", s) && (i.y = t(e.evaluate("rowOff", s).textContent)), "from" === o ? r.tl = i : r.br = i, r;
1888
+ return t.evaluate("col", e) && (o.c = parseInt(t.evaluate("col", e).textContent)), t.evaluate("row", e) && (o.r = parseInt(t.evaluate("row", e).textContent)), t.evaluate("colOff", e) && (o.x = l(t.evaluate("colOff", e).textContent)), t.evaluate("rowOff", e) && (o.y = l(t.evaluate("rowOff", e).textContent)), "from" === r ? s.tl = o : s.br = o, s;
1803
1889
  }
1804
- }, _t = class extends q {
1890
+ }, jt = class extends Q {
1805
1891
  visit(t, e, s) {
1806
1892
  if (!e) return;
1807
1893
  s = super.visit(t, e, s);
@@ -1828,26 +1914,20 @@ var w = class {
1828
1914
  if ("chart" === s && i) {
1829
1915
  let s = t.evaluate("*/cNvPr", e);
1830
1916
  s?.item && (s = s.item(0));
1831
- const r = s?.getAttribute?.("id"), n = r ? parseInt(r, 10) : void 0, a = t.getRelationships().get(i);
1832
- let c;
1833
- if (a?.target) {
1834
- const e = t.getFileLocation(), s = e.slice(0, e.lastIndexOf("/") + 1);
1835
- c = l(a.target.startsWith("/") ? a.target : s + a.target);
1836
- }
1917
+ const r = s?.getAttribute?.("id"), n = r ? parseInt(r, 10) : void 0;
1837
1918
  o.json = {
1838
1919
  xml: t.serializeElement(e) ?? void 0,
1839
1920
  sourceId: void 0 === n || isNaN(n) ? void 0 : n,
1840
- chartRelId: i,
1841
- chartTargetPath: c
1921
+ part: t.readEmbeddedPart(i) ?? void 0
1842
1922
  };
1843
1923
  } else i && (o.json = t.getRef(i));
1844
- } catch (t) {
1845
- console.warn("Unable to parse graphicFrame", t);
1924
+ } catch (e) {
1925
+ t.warn(`Unable to read a graphic frame: ${e?.message ?? e}`, { onceKey: "xlsx.drawing.graphicFrame" });
1846
1926
  }
1847
1927
  }
1848
1928
  return o && (s.content = o), o;
1849
1929
  }
1850
- }, Et = J, Rt = class extends q {
1930
+ }, Dt = Z, Yt = class extends Q {
1851
1931
  visit(t, e, s) {
1852
1932
  if (!e) return;
1853
1933
  const r = super.visit(t, e, s), o = t.evaluate("nvPicPr/cNvPicPr", e);
@@ -1864,7 +1944,7 @@ var w = class {
1864
1944
  let n;
1865
1945
  if (i) {
1866
1946
  let e;
1867
- if (e = i.getAttribute("r:embed") ?? i.getAttribute("embed"), e || (e = i.getAttribute("r:link") ?? i.getAttribute("link")), !e) return void console.warn("no rId found for blip", i);
1947
+ if (e = i.getAttribute("r:embed") ?? i.getAttribute("embed"), e || (e = i.getAttribute("r:link") ?? i.getAttribute("link")), !e) return void t.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" });
1868
1948
  n = t.getRef(e, !0);
1869
1949
  }
1870
1950
  return s.content = {
@@ -1872,7 +1952,7 @@ var w = class {
1872
1952
  json: { resId: n }
1873
1953
  }, r;
1874
1954
  }
1875
- }, jt = class extends J {
1955
+ }, Mt = class extends Z {
1876
1956
  visit(t, e, s) {
1877
1957
  if (!e) return;
1878
1958
  s = super.visit(t, e, s);
@@ -1892,7 +1972,7 @@ var w = class {
1892
1972
  json: o
1893
1973
  }, o;
1894
1974
  }
1895
- }, Yt = class extends J {
1975
+ }, zt = class extends Z {
1896
1976
  visit(t, e, s) {
1897
1977
  if (!e) return;
1898
1978
  s = super.visit(t, e, s);
@@ -1905,20 +1985,19 @@ var w = class {
1905
1985
  Object.keys(t).length > 0 && (s.locks = t);
1906
1986
  }
1907
1987
  }
1908
- t.warn(`'${s.name}' is not editable; imported as a fixed drawing.`);
1909
1988
  let o = t.evaluate("*/cNvPr", e);
1910
1989
  o?.item && (o = o.item(0));
1911
- const i = o?.getAttribute?.("id"), n = i ? parseInt(i, 10) : void 0, l = {
1990
+ const i = o?.getAttribute?.("id"), n = i ? parseInt(i, 10) : void 0, a = {
1912
1991
  type: "cxnSp",
1913
1992
  xml: t.serializeElement(e) ?? void 0,
1914
1993
  sourceId: void 0 === n || isNaN(n) ? void 0 : n
1915
1994
  };
1916
1995
  return s.content = {
1917
1996
  type: "cxnSp",
1918
- json: l
1919
- }, l;
1997
+ json: a
1998
+ }, a;
1920
1999
  }
1921
- }, Dt = class {
2000
+ }, Ut = class {
1922
2001
  visit(t, e, s) {
1923
2002
  const r = [], o = /* @__PURE__ */ new Map(), i = {
1924
2003
  cells: [],
@@ -2016,19 +2095,19 @@ var w = class {
2016
2095
  for (let t = 0; t < r.length; t++) {
2017
2096
  const o = r.item(t);
2018
2097
  if (1 !== o.nodeType || "rc" !== o.localName) continue;
2019
- const i = Number(o.getAttribute("t")), n = Number(o.getAttribute("v")), l = e[i - 1];
2020
- if (!l) continue;
2021
- const { _blocks: a, ...c } = l, u = { ...c };
2098
+ const i = Number(o.getAttribute("t")), n = Number(o.getAttribute("v")), a = e[i - 1];
2099
+ if (!a) continue;
2100
+ const { _blocks: l, ...c } = a, u = { ...c };
2022
2101
  for (const t of Object.keys(u)) void 0 === u[t] && delete u[t];
2023
- const h = a[n];
2024
- h && (void 0 !== h.fDynamic && (u.fDynamic = h.fDynamic, u.fCollapsed = h.fCollapsed ?? !1), void 0 !== h.richValueIndex && (u.richValueIndex = h.richValueIndex)), s.set(l.name, u);
2102
+ const h = l[n];
2103
+ h && (void 0 !== h.fDynamic && (u.fDynamic = h.fDynamic, u.fCollapsed = h.fCollapsed ?? !1), void 0 !== h.richValueIndex && (u.richValueIndex = h.richValueIndex)), s.set(a.name, u);
2025
2104
  }
2026
2105
  return s;
2027
2106
  }
2028
- }, Mt = class {
2107
+ }, Xt = class {
2029
2108
  visit(t, e, s) {
2030
- let r = t.getVisitorParamsState().get(Q);
2031
- r || (r = [], t.getVisitorParamsState().set(Q, r));
2109
+ let r = t.getVisitorParamsState().get(tt);
2110
+ r || (r = [], t.getVisitorParamsState().set(tt, r));
2032
2111
  const o = e.childNodes, i = o.length;
2033
2112
  for (let e = 0; e < i; e++) {
2034
2113
  const s = o.item(e);
@@ -2052,12 +2131,12 @@ var w = class {
2052
2131
  }
2053
2132
  }
2054
2133
  }
2055
- }, zt = class {
2134
+ }, Wt = class {
2056
2135
  visit(t, e, s) {
2057
2136
  let r = t.getVisitorParamsState().get("richTypes");
2058
2137
  if (!r) return void t.warn("RichValueFound but not type.");
2059
- let o = t.getVisitorParamsState().get(Z);
2060
- o || (o = [], t.getVisitorParamsState().set(Z, o));
2138
+ let o = t.getVisitorParamsState().get(et);
2139
+ o || (o = [], t.getVisitorParamsState().set(et, o));
2061
2140
  const i = e.childNodes, n = i.length;
2062
2141
  for (let e = 0; e < n; e++) {
2063
2142
  const s = i.item(e);
@@ -2074,7 +2153,7 @@ var w = class {
2074
2153
  if ("_error" === e.type) {
2075
2154
  const t = e.errorType;
2076
2155
  if (t) try {
2077
- e = d.getBuiltInByCode(t + 1) ?? d.BuiltIn.Unknown;
2156
+ e = m.getBuiltInByCode(t + 1) ?? m.BuiltIn.Unknown;
2078
2157
  } catch (t) {}
2079
2158
  }
2080
2159
  return e;
@@ -2088,13 +2167,13 @@ var w = class {
2088
2167
  if (1 === r.nodeType && "v" === r.localName) {
2089
2168
  const o = n[e];
2090
2169
  if (!o) return void t.warn("Invalid richData");
2091
- const i = o[0], l = o[1];
2092
- let a = r.textContent;
2093
- "i" === l && (a = Number(a)), s[i] = a;
2170
+ const i = o[0], a = o[1];
2171
+ let l = r.textContent;
2172
+ "i" === a && (l = Number(l)), s[i] = l;
2094
2173
  }
2095
2174
  }
2096
2175
  }
2097
- }, Ut = class {
2176
+ }, Gt = class {
2098
2177
  visit(t, e, s) {
2099
2178
  if (!e) return;
2100
2179
  const r = [];
@@ -2113,114 +2192,136 @@ var w = class {
2113
2192
  }
2114
2193
  }
2115
2194
  }
2116
- }, Wt = class {
2195
+ }, Kt = class {
2117
2196
  visit(t, e, s) {
2118
2197
  if (!e) return;
2119
- const r = {}, o = e.getAttribute("ref");
2120
- t.copyFromAttribute(e, "authorId", r, "personId", t.INT_COPY), r.asNote = !0;
2121
- const i = {
2122
- r: o,
2123
- v: r
2124
- };
2125
- return s.push(i), r;
2198
+ const r = e.getAttribute("ref");
2199
+ if (!r) return;
2200
+ const o = { content: "" };
2201
+ if (e.hasAttribute("authorId")) {
2202
+ const t = parseInt(e.getAttribute("authorId"), 10);
2203
+ isNaN(t) || (o.authorId = t);
2204
+ }
2205
+ return o.content = function(t) {
2206
+ if (!t) return "";
2207
+ const e = [];
2208
+ let s = !0;
2209
+ const r = t.childNodes;
2210
+ for (let t = 0; t < r.length; t++) {
2211
+ const o = r.item(t);
2212
+ if (1 === o.nodeType) {
2213
+ if ("t" === o.localName) e.push({ text: o.textContent ?? "" });
2214
+ else if ("r" === o.localName) {
2215
+ const t = { text: "" }, r = o.childNodes;
2216
+ for (let e = 0; e < r.length; e++) {
2217
+ const s = r.item(e);
2218
+ 1 === s.nodeType && ("t" === s.localName ? t.text += s.textContent ?? "" : "rPr" === s.localName && st(s, t));
2219
+ }
2220
+ Object.keys(t).length > 1 && (s = !1), e.push(t);
2221
+ }
2222
+ }
2223
+ }
2224
+ return 0 === e.length ? t.textContent ?? "" : s ? e.map((t) => t.text).join("") : { runs: e };
2225
+ }(t.evaluate("text", e)), s.push({
2226
+ r,
2227
+ v: o
2228
+ }), o;
2126
2229
  }
2127
- }, Xt = class {
2230
+ }, $t = class {
2128
2231
  visit(t, e, s) {
2129
2232
  if (!e) return;
2130
2233
  const r = [];
2131
2234
  return s.comments = r, r;
2132
2235
  }
2133
- }, Gt = class {
2134
- visit(t, e, r) {
2135
- if (!e) return;
2136
- const o = {};
2137
- t.copyFromAttribute(e, "id", o, "id", s);
2138
- const i = e.getAttribute("ref");
2139
- t.copyFromAttribute(e, "personId", o, "personId", s), t.copyFromAttribute(e, "parentId", o, "parentId", s), t.copyFromAttribute(e, "dT", o), e.hasAttribute("done") && (o.done = a(e.getAttribute("done")));
2140
- const n = {
2141
- r: i,
2142
- v: o
2143
- };
2144
- return r.push(n), o;
2145
- }
2146
- }, $t = class {
2147
- visit(t, e, r) {
2148
- const o = [], i = e.childNodes, n = i.length;
2236
+ }, Ht = class {
2237
+ visit(e, s, r) {
2238
+ if (!s) return;
2239
+ const i = {};
2240
+ e.copyFromAttribute(s, "id", i, "id", o);
2241
+ const n = s.getAttribute("ref");
2242
+ return e.copyFromAttribute(s, "personId", i, "personId", o), e.copyFromAttribute(s, "parentId", i, "parentId", o), e.copyFromAttribute(s, "dT", i, "dt"), s.hasAttribute("done") && (i.done = t(s.getAttribute("done"))), r.push({
2243
+ r: n,
2244
+ v: i
2245
+ }), i;
2246
+ }
2247
+ }, qt = class {
2248
+ visit(t, e, s) {
2249
+ const r = [], i = e.childNodes, n = i.length;
2149
2250
  for (let e = 0; e < n; e++) {
2150
- const r = i.item(e);
2151
- if (1 === r.nodeType && "person" === r.localName) {
2251
+ const s = i.item(e);
2252
+ if (1 === s.nodeType && "person" === s.localName) {
2152
2253
  const e = {};
2153
- t.copyFromAttribute(r, "id", e, "id", s), t.copyFromAttribute(r, "displayName", e), t.copyFromAttribute(r, "userId", e, "userId", s), t.copyFromAttribute(r, "providerId", e), o.push(e);
2254
+ t.copyFromAttribute(s, "id", e, "id", o), t.copyFromAttribute(s, "displayName", e), t.copyFromAttribute(s, "userId", e, "userId", o), t.copyFromAttribute(s, "providerId", e), r.push(e);
2154
2255
  }
2155
2256
  }
2156
- return o.length > 0 && (r.persons = o), o;
2257
+ return r.length > 0 && (s.persons = r), r;
2157
2258
  }
2158
- }, Kt = class {
2259
+ }, Jt = class {
2159
2260
  constructor(t, e) {
2160
2261
  this.path = t, this.visitor = e;
2161
2262
  }
2162
- }, Ht = class {
2263
+ }, Qt = class {
2163
2264
  constructor() {
2164
- this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new tt()), this.registerVisitor("cp:coreProperties", new et()), this.registerVisitor("Properties", new st()), this.registerVisitor("spPr", new it()), this.registerVisitor("txBody", new dt()), this.registerVisitor("txPr", new dt()), this.registerVisitor("c:chartSpace", new rt()), this.registerVisitor("c:plotArea", new ot()), this.registerVisitor("c:barChart", new nt()), this.registerVisitor("c:doughnutChart", new lt()), this.registerVisitor("c:lineChart", new lt()), this.registerVisitor("c:ofPieType", new lt()), this.registerVisitor("c:pieChart", new lt()), this.registerVisitor("c:scatterChart", new lt()), this.registerVisitor("c:barChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new at("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new at("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new ct()), this.registerVisitor("c:dPt", new ut()), this.registerVisitor("c:marker", new ht()), this.registerVisitor("c:catAx", new pt()), this.registerVisitor("c:valAx", new pt()), this.registerVisitor("c:dateAx", new pt()), this.registerVisitor("c:majorGridlines", new Y("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new Y("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new dt("labels.text"), "txPr"), this.registerVisitor("c:valAx", new dt("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new dt("labels.text"), "txPr"), this.registerVisitor("c:legend", new mt()), this.registerVisitor("c:legend", new dt("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new gt()), this.registerVisitor("c:ser", new bt(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new at("labels"), "dLbls"), this.registerVisitor("c:dLbl", new at("points")), this.registerVisitor("c:title", new At()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new ft()), this.registerVisitor("c:dispUnits", new Y("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new At("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new dt(), "tx/rich"), this.registerVisitor("a:theme", new yt()), this.registerVisitor("a:theme", new vt(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new Nt(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Ft(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new wt()), this.registerVisitor("sortState", new Pt()), this.registerVisitor("s:workbook", new Ot()), this.registerVisitor("styleSheet", new St()), this.registerVisitor("x14:table", new xt()), this.registerVisitor("table", new Tt()), this.registerVisitor("externalLink", new kt()), this.registerVisitor("hlinkClick", new Ct()), this.registerVisitor("wsDr", new Lt()), this.registerVisitor("twoCellAnchor", new Bt()), this.registerVisitor("oneCellAnchor", new Bt()), this.registerVisitor("absoluteAnchor", new Bt()), this.registerVisitor("graphicFrame", new _t()), this.registerVisitor("sp", new Et()), this.registerVisitor("grpSp", new jt()), this.registerVisitor("cxnSp", new Yt()), this.registerVisitor("pic", new Rt()), this.registerVisitor("metadata", new Dt()), this.registerVisitor("rvStructures", new Mt()), this.registerVisitor("rvData", new zt()), this.registerVisitor("comments", new Ut()), this.registerVisitor("comment", new Wt()), this.registerVisitor("comment", new dt("content"), "text"), this.registerVisitor("ThreadedComments", new Xt()), this.registerVisitor("threadedComment", new Gt()), this.registerVisitor("threadedComment", new dt("content"), "text"), this.registerVisitor("personList", new $t()), this.registerVisitor("slicerCacheDefinition", new Vt()), this.registerVisitor("slicers", new It());
2265
+ this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new rt()), this.registerVisitor("cp:coreProperties", new ot()), this.registerVisitor("Properties", new it()), this.registerVisitor("spPr", new lt()), this.registerVisitor("txBody", new bt()), this.registerVisitor("txPr", new bt()), this.registerVisitor("c:chartSpace", new nt()), this.registerVisitor("c:plotArea", new at()), this.registerVisitor("c:barChart", new ct()), this.registerVisitor("c:doughnutChart", new ut()), this.registerVisitor("c:lineChart", new ut()), this.registerVisitor("c:ofPieType", new ut()), this.registerVisitor("c:pieChart", new ut()), this.registerVisitor("c:scatterChart", new ut()), this.registerVisitor("c:barChart", new ht("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new ht("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new ht("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new ht("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new ht("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new ht("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new pt()), this.registerVisitor("c:dPt", new dt()), this.registerVisitor("c:marker", new gt()), this.registerVisitor("c:catAx", new mt()), this.registerVisitor("c:valAx", new mt()), this.registerVisitor("c:dateAx", new mt()), this.registerVisitor("c:majorGridlines", new M("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new M("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new bt("labels.text"), "txPr"), this.registerVisitor("c:valAx", new bt("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new bt("labels.text"), "txPr"), this.registerVisitor("c:legend", new At()), this.registerVisitor("c:legend", new bt("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new ft()), this.registerVisitor("c:ser", new yt(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new ht("labels"), "dLbls"), this.registerVisitor("c:dLbl", new ht("points")), this.registerVisitor("c:title", new vt()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new Nt()), this.registerVisitor("c:dispUnits", new M("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new vt("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new bt(), "tx/rich"), this.registerVisitor("a:theme", new Ft()), this.registerVisitor("a:theme", new Ct(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new wt(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Pt(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new xt()), this.registerVisitor("sortState", new Tt()), this.registerVisitor("s:workbook", new kt()), this.registerVisitor("styleSheet", new Ot()), this.registerVisitor("x14:table", new It()), this.registerVisitor("table", new Vt()), this.registerVisitor("externalLink", new Lt()), this.registerVisitor("hlinkClick", new St()), this.registerVisitor("wsDr", new Et()), this.registerVisitor("twoCellAnchor", new Rt()), this.registerVisitor("oneCellAnchor", new Rt()), this.registerVisitor("absoluteAnchor", new Rt()), this.registerVisitor("graphicFrame", new jt()), this.registerVisitor("sp", new Dt()), this.registerVisitor("grpSp", new Mt()), this.registerVisitor("cxnSp", new zt()), this.registerVisitor("pic", new Yt()), this.registerVisitor("metadata", new Ut()), this.registerVisitor("rvStructures", new Xt()), this.registerVisitor("rvData", new Wt()), this.registerVisitor("comments", new Gt()), this.registerVisitor("comment", new Kt()), this.registerVisitor("ThreadedComments", new $t()), this.registerVisitor("threadedComment", new Ht()), this.registerVisitor("threadedComment", new bt("content"), "text"), this.registerVisitor("personList", new qt()), this.registerVisitor("slicerCacheDefinition", new _t()), this.registerVisitor("slicers", new Bt());
2165
2266
  }
2166
2267
  registerVisitor(t, e, s = null) {
2167
2268
  -1 === t.indexOf(":") && (t = "*:" + t);
2168
2269
  const r = t.split(":"), o = r.length > 1 ? r[1] : r[0];
2169
2270
  if (!s) return this.visitorsByXmlTagName.set(o, e), void this.visitorsByXmlTagName.set(t, e);
2170
2271
  let i = this.scopedVisitorsByXmlTagName.get(o);
2171
- i || (i = [], this.scopedVisitorsByXmlTagName.set(o, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new Kt(s, e));
2272
+ i || (i = [], this.scopedVisitorsByXmlTagName.set(o, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new Jt(s, e));
2172
2273
  }
2173
- parseDxf(t, e = "") {
2274
+ parseDxf(t, e = "", s = d.EmptyObject) {
2174
2275
  this.visitorParamsState || (this.visitorParamsState = /* @__PURE__ */ new Map());
2175
- const s = this.visitorParamsState, r = s.get("processingDXFs");
2176
- s.set("processingDXFs", !0);
2276
+ const r = this.visitorParamsState, o = r.get("processingDXFs");
2277
+ r.set("processingDXFs", !0);
2177
2278
  try {
2178
- const s = new x(null, this, "/dxf", t, {}, e), r = {};
2179
- return new St().processDXF(s, t, r), r;
2279
+ const r = new V(null, this, "/dxf", t, {}, e, s), o = {};
2280
+ return new Ot().processDXF(r, t, o), o;
2180
2281
  } finally {
2181
- void 0 === r ? s.delete("processingDXFs") : s.set("processingDXFs", r);
2282
+ void 0 === o ? r.delete("processingDXFs") : r.set("processingDXFs", o);
2182
2283
  }
2183
2284
  }
2184
2285
  getVisitorParamsState() {
2185
2286
  return this.visitorParamsState;
2186
2287
  }
2187
- transform(t, e, s = h.EmptyObject) {
2288
+ transform(t, e, s = d.EmptyObject) {
2188
2289
  const r = t.documentElement;
2189
2290
  this.visitorParamsState && !s?.paramMap || (this.visitorParamsState = s?.paramMap ?? /* @__PURE__ */ new Map());
2190
2291
  const o = {};
2191
2292
  let i = this.visitorsByXmlTagName.get(r.nodeName);
2192
2293
  if (i || (i = this.visitorsByXmlTagName.get(r.localName)), !i) throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);
2193
- const n = "/" + r.localName, l = new x(null, this, n, r, o, e, s), a = [];
2194
- this._doWalk(i, l, a, r, o, e, s);
2195
- const c = a.length;
2294
+ const n = "/" + r.localName, a = new V(null, this, n, r, o, e, s), l = [];
2295
+ this._doWalk(i, a, l, r, o, e, s);
2296
+ const c = l.length;
2196
2297
  for (let t = 0; t < c; t++) {
2197
- const e = a[t];
2298
+ const e = l[t];
2198
2299
  try {
2199
2300
  e.visitor?.afterVisit?.(e.context, e.elemParent, e.jsonParent);
2200
2301
  } catch (t) {
2201
- console.warn(`Error in afterVisit: ${e.context.getPath()}`, t);
2302
+ e.context.warn(`Unable to finish reading '${e.context.getPath()}': ${t?.message ?? t}`, { onceKey: "xlsx.transform.afterVisit" });
2202
2303
  }
2203
2304
  }
2204
2305
  return o;
2205
2306
  }
2206
2307
  _walkScoped(t, e, s, r, o, i, n) {
2207
- const l = this.scopedVisitorsByXmlTagName.get(t), a = l ? l.length : 0;
2208
- for (let c = 0; c < a; c++) {
2209
- const a = l[c];
2308
+ const a = this.scopedVisitorsByXmlTagName.get(t), l = a ? a.length : 0;
2309
+ for (let c = 0; c < l; c++) {
2310
+ const l = a[c];
2210
2311
  let u = null;
2211
2312
  try {
2212
- u = e.evaluate(a.path, r);
2213
- } catch (e) {
2214
- console.warn(`"Invalid path '${a.path}' for '${t}'.`);
2313
+ u = e.evaluate(l.path, r);
2314
+ } catch (s) {
2315
+ e.warn(`Invalid path '${l.path}' for '${t}'.`, { onceKey: "xlsx.transform.invalidPath" });
2215
2316
  }
2216
2317
  if (!u) continue;
2217
2318
  const h = (t) => {
2218
- let l = t.localName, c = t.parentNode;
2219
- for (; c && c !== r;) l = c.localName + "/" + l, c = c.parentNode;
2220
- const u = e.getPath() + "/" + l;
2221
- if (a.visitor) {
2222
- const r = new x(e, this, u, e.getElemRoot(), e.getJsonRoot(), i, n);
2223
- this._doWalk(a.visitor, r, s, t, o, i, n);
2319
+ let a = t.localName, c = t.parentNode;
2320
+ for (; c && c !== r;) a = c.localName + "/" + a, c = c.parentNode;
2321
+ const u = e.getPath() + "/" + a;
2322
+ if (l.visitor) {
2323
+ const r = new V(e, this, u, e.getElemRoot(), e.getJsonRoot(), i, n);
2324
+ this._doWalk(l.visitor, r, s, t, o, i, n);
2224
2325
  }
2225
2326
  };
2226
2327
  if (u.length > 0) {
@@ -2230,26 +2331,26 @@ var w = class {
2230
2331
  }
2231
2332
  }
2232
2333
  _doWalk(t, e, s, r, o, i, n) {
2233
- let l = null;
2334
+ let a = null;
2234
2335
  t && (s.push({
2235
2336
  visitor: t,
2236
2337
  context: e,
2237
2338
  elemParent: r,
2238
2339
  jsonParent: o
2239
- }), l = t.visit(e, r, o)), l || (l = o);
2240
- const a = r.localName;
2241
- this._walkScoped(a, e, s, r, l, i, n);
2340
+ }), a = t.visit(e, r, o)), a || (a = o);
2341
+ const l = r.localName;
2342
+ this._walkScoped(l, e, s, r, a, i, n);
2242
2343
  const c = this.visitorsByXmlTagName, u = e.getElemRoot(), h = e.getJsonRoot(), p = r.childNodes, d = p.length;
2243
2344
  for (let t = 0; t < d; t++) {
2244
2345
  const r = p.item(t);
2245
2346
  if (1 !== r.nodeType) continue;
2246
- const a = r;
2247
- let d = a.nodeName, g = c.get(d);
2248
- g || (d = a.localName, g = c.get(d));
2249
- const m = e.getPath() + "/" + d, b = new x(e, this, m, u, h, i, n);
2250
- this._doWalk(g, b, s, a, l ?? o, i, n);
2347
+ const l = r;
2348
+ let d = l.nodeName, g = c.get(d);
2349
+ g || (d = l.localName, g = c.get(d));
2350
+ const m = e.getPath() + "/" + d, b = new V(e, this, m, u, h, i, n);
2351
+ this._doWalk(g, b, s, l, a ?? o, i, n);
2251
2352
  }
2252
- return l;
2353
+ return a;
2253
2354
  }
2254
2355
  };
2255
- export { Ht as DOMTransformer, x as ExecutionContext, c as NumberUtils, k as VisitorUtils };
2356
+ export { Qt as DOMTransformer, V as ExecutionContext, a as NumberUtils, I as VisitorUtils };