@sheetxl/io-xlsx 0.7.28-beta.3 → 0.7.28-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/Bhq8KfEhCnRykWeS.cjs +1 -0
- package/browser/cjs/BmG0GOcbuYvt3-R2.cjs +1 -0
- package/browser/cjs/{BZsKjlEe8ttWIao7.cjs → D3YH3tTndeltJsh5.cjs} +1 -1
- package/browser/cjs/DK9GutW2zPbyNlfU.cjs +2 -0
- package/browser/cjs/Dmi-Tsz618B6vKpZ.cjs +5 -0
- package/browser/cjs/index.cjs +1 -1
- package/browser/esm/{C0ftqc3PDJkuDjFG.mjs → BXCOn1XvLvYSfpzi.mjs} +2 -2
- package/browser/esm/{BwSyMclyk-t3Qsxs.mjs → BcnofzmeeuCVzr_M.mjs} +5 -5
- package/browser/esm/{DmzsYgxDBYYWxQWu.mjs → BhohPLTubb_9rfrh.mjs} +2 -2
- package/browser/esm/{uIgz_sO2ZTlIJryO.mjs → BknJ4AeVeFJploh9.mjs} +2 -2
- package/browser/esm/{DatxS1drpnPiN0bA.mjs → C3sYFBc7Tym8l12A.mjs} +1 -1
- package/browser/esm/{9k07cBjQx8ZMNU1r.mjs → C7R1lFA0iv-1bZ9i.mjs} +2 -2
- package/browser/esm/{BjKFtNZckTyELfHX.mjs → CV_L3E5OoPstI9lx.mjs} +260 -242
- package/browser/esm/{Wg4pN30I3RZmpjIf.mjs → D8qZcXzj_fdusd0Y.mjs} +1460 -1387
- package/browser/esm/{DofvhgOWFHBSl9vH.mjs → DLEtaZiz_1cZH0dA.mjs} +743 -681
- package/browser/esm/{Da4uZFnis4q5dMxA.mjs → DlBlJGlFQJrKovwJ.mjs} +923 -889
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{B1HdC5n0VHTzJXno.mjs → saBnxecsRUpY6fGv.mjs} +1 -1
- package/node/esm/{DYH_lfcyj9wTL8Er.mjs → B6lQXVQjFT_OE3IA.mjs} +2 -2
- package/node/esm/{CUQy4BVE8DwTALUu.mjs → B9CUp-rqol5K1r1c.mjs} +1 -1
- package/node/esm/{f9-SN-lQDdZGt0vO.mjs → BSrW-J3BEH4Tza_S.mjs} +645 -572
- package/node/esm/{DWNfn3shRCVhbEOV.mjs → BYCpXFieBgL_cwTO.mjs} +197 -179
- package/node/esm/{zldOc2ba5Vlg1s2E.mjs → Bqi4c7-14v0oNgFN.mjs} +1 -1
- package/node/esm/{C9wIBQW-fwqlpFJm.mjs → CfIzBnObj09fDuUX.mjs} +2 -2
- package/node/esm/{BOF2zpi3fMaBFMe7.mjs → D0frS50CfyeuXcuz.mjs} +741 -677
- package/node/esm/{BTiGUmPt1-zNmYTg.mjs → DsZ19z4oXoL-d0Lk.mjs} +989 -949
- package/node/esm/index.mjs +5 -5
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +62 -0
- package/types/src/reader/dom/DOMTransformer.d.ts +10 -0
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +1 -1
- package/types/src/reader/sax/SaxVisitor.d.ts +14 -0
- package/types/src/writer/emitters/StylesEmitter.d.ts +13 -2
- package/types/src/writer/utils/AutoFilter.d.ts +3 -2
- package/browser/cjs/5QaWZ2tRVhz1rf3W.cjs +0 -1
- package/browser/cjs/Bi-WvoygX7yZzlxU.cjs +0 -5
- package/browser/cjs/D-8WoJkvdPf-79sB.cjs +0 -2
- package/browser/cjs/sEmMmxaNBSY_o-Zb.cjs +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.7.28-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.7.28-beta.4
|
|
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 { n as e } from "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { n as e } from "./saBnxecsRUpY6fGv.mjs";
|
|
8
|
+
import { o as t } from "./D8qZcXzj_fdusd0Y.mjs";
|
|
9
|
+
import { a as n, d as r, f as i, i as a, n as o, o as s, p as c, r as l, t as u } from "./C7R1lFA0iv-1bZ9i.mjs";
|
|
10
|
+
import { CommonUtils as d } from "@sheetxl/utils";
|
|
11
|
+
import { AddressUtils as f, FormulaError as p, IBorder as m, ICondition as h, IEffect as g, IFill as _, IFont as v, IRange as y, IStyle as b, ITextFrame as x, Sort as S, Tuple as ee } from "@sheetxl/sdk";
|
|
11
12
|
var te = class {
|
|
12
13
|
constructor(e) {
|
|
13
14
|
this.list = e;
|
|
@@ -40,8 +41,8 @@ var te = class {
|
|
|
40
41
|
}, ie = (e) => {
|
|
41
42
|
let t = parseFloat(e);
|
|
42
43
|
return isNaN(t) ? null : t;
|
|
43
|
-
}, ae = /* @__PURE__ */ new Map(),
|
|
44
|
-
constructor(e, t, n, r, i, a = null, o =
|
|
44
|
+
}, ae = /* @__PURE__ */ new Map(), C = class {
|
|
45
|
+
constructor(e, t, n, r, i, a = null, o = d.EmptyObject) {
|
|
45
46
|
this._fileLocation = "";
|
|
46
47
|
let s = (e, t, n) => o?.getRef?.(e, t, n, o?.parsedRefs), c = (e) => o?.getRefs?.(e, o?.parsedRefs);
|
|
47
48
|
this._parent = e, this.sharedShared = t, this.currentPath = n, this.elemRoot = r, this.jsonRoot = i, e ? (this._fileLocation = e._fileLocation, this._getRef = e._getRef, this._getRefs = e._getRefs, this._serializeElement = e._serializeElement) : (a && (this._fileLocation = a), o?.getRef && (this._getRef = s), o?.getRefs && (this._getRefs = c), this._onWarning = o?.onWarning, this._addPerson = o?.addPerson, this._serializeElement = o?.serializeElement);
|
|
@@ -121,10 +122,10 @@ var te = class {
|
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
getFromPath(e, t) {
|
|
124
|
-
return
|
|
125
|
+
return d.getFromPath(e, t);
|
|
125
126
|
}
|
|
126
127
|
setToPath(e, t, n) {
|
|
127
|
-
return
|
|
128
|
+
return d.setToPath(e, t, n);
|
|
128
129
|
}
|
|
129
130
|
getValAttrAsString(e, t) {
|
|
130
131
|
let n = this.evaluate(e, t);
|
|
@@ -164,32 +165,32 @@ var te = class {
|
|
|
164
165
|
}
|
|
165
166
|
this.setToPath(n, r, a);
|
|
166
167
|
}
|
|
167
|
-
},
|
|
168
|
-
isBlank: () =>
|
|
169
|
-
isNotBlank: () =>
|
|
170
|
-
length: () =>
|
|
171
|
-
parseRotation: () =>
|
|
172
|
-
parseValAttrAsBoolean: () =>
|
|
173
|
-
parseValAttrAsFloat: () =>
|
|
174
|
-
parseValAttrAsInteger: () =>
|
|
175
|
-
parseValAttrAsString: () =>
|
|
176
|
-
}),
|
|
168
|
+
}, w = e({
|
|
169
|
+
isBlank: () => A,
|
|
170
|
+
isNotBlank: () => j,
|
|
171
|
+
length: () => M,
|
|
172
|
+
parseRotation: () => T,
|
|
173
|
+
parseValAttrAsBoolean: () => D,
|
|
174
|
+
parseValAttrAsFloat: () => k,
|
|
175
|
+
parseValAttrAsInteger: () => O,
|
|
176
|
+
parseValAttrAsString: () => E
|
|
177
|
+
}), T = (e, t) => {
|
|
177
178
|
if (!e || !e.hasAttribute("rot")) return;
|
|
178
|
-
let n = e.getAttribute("rot"), r =
|
|
179
|
+
let n = e.getAttribute("rot"), r = d.roundAccurately(o(n), 2);
|
|
179
180
|
r !== -1e3 && (t.rotation = r);
|
|
180
|
-
},
|
|
181
|
+
}, E = (e, t, n, r, i) => {
|
|
181
182
|
let a = e.getValAttrAsString(r, t);
|
|
182
183
|
a !== null && (n[i] = a);
|
|
183
|
-
},
|
|
184
|
+
}, D = (e, t, n, r, i = r, a = null) => {
|
|
184
185
|
let o = e.getValAttrAsBoolean(r, t, a);
|
|
185
186
|
o !== null && (n[i] = o);
|
|
186
|
-
},
|
|
187
|
+
}, O = (e, t, n, r, i) => {
|
|
187
188
|
let a = e.getValAttrAsInteger(r, t);
|
|
188
189
|
a !== null && (n[i] = a);
|
|
189
|
-
},
|
|
190
|
+
}, k = (e, t, n, r, i, a = 1) => {
|
|
190
191
|
let o = e.getValAttrAsFloat(r, t);
|
|
191
192
|
o !== null && (n[i] = o * a);
|
|
192
|
-
},
|
|
193
|
+
}, A = (e) => !e || e.trim().length === 0, j = (e) => !A(e), M = (e) => e?.length ?? 0, N = class {
|
|
193
194
|
constructor(e) {
|
|
194
195
|
this.jsonKey = e;
|
|
195
196
|
}
|
|
@@ -197,7 +198,7 @@ var te = class {
|
|
|
197
198
|
let r = {};
|
|
198
199
|
return n[this.jsonKey] = r, r;
|
|
199
200
|
}
|
|
200
|
-
},
|
|
201
|
+
}, P = class {
|
|
201
202
|
visit(e, t, n) {}
|
|
202
203
|
getStroke(e, t) {
|
|
203
204
|
let n = e.evaluate("ln", t);
|
|
@@ -205,23 +206,23 @@ var te = class {
|
|
|
205
206
|
}
|
|
206
207
|
parseLn(e, t) {
|
|
207
208
|
let n = {};
|
|
208
|
-
t.hasAttribute("algn") && (n.align = t.getAttribute("algn")), t.hasAttribute("cap") && (n.lineCap = se(t.getAttribute("cap"))), t.hasAttribute("cmpd") && (n.compound = t.getAttribute("cmpd")), t.hasAttribute("w") && (n.width =
|
|
209
|
+
t.hasAttribute("algn") && (n.align = t.getAttribute("algn")), t.hasAttribute("cap") && (n.lineCap = se(t.getAttribute("cap"))), t.hasAttribute("cmpd") && (n.compound = t.getAttribute("cmpd")), t.hasAttribute("w") && (n.width = s(t.getAttribute("w")));
|
|
209
210
|
let r = e.evaluate("miter", t);
|
|
210
211
|
r && (n.lineJoin = "miter", r.hasAttribute("lim") && (n.miterLimit = parseFloat(r.getAttribute("lim")) / 1e5)), e.evaluate("bevel", t) && (n.lineJoin = "bevel"), e.evaluate("round", t) && (n.lineJoin = "round");
|
|
211
|
-
let
|
|
212
|
-
if (
|
|
213
|
-
let t = e.evaluate("ds",
|
|
212
|
+
let i = e.evaluate("custDash", t);
|
|
213
|
+
if (i) {
|
|
214
|
+
let t = e.evaluate("ds", i);
|
|
214
215
|
if (t && t.length > 0) {
|
|
215
216
|
let e = [];
|
|
216
217
|
for (let n = 0; n < t.length; n++) {
|
|
217
218
|
let r = t.item(n);
|
|
218
|
-
e.push(
|
|
219
|
+
e.push(a(r.getAttribute("d") ?? "")), e.push(a(r.getAttribute("sp") ?? ""));
|
|
219
220
|
}
|
|
220
221
|
n.dash = e;
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
|
-
let
|
|
224
|
-
|
|
224
|
+
let o = e.evaluate("prstDash", t);
|
|
225
|
+
o && o.hasAttribute("val") && (n.dash = o.getAttribute("val")), this.parseEndElement(e, t, n, "headEnd", "head"), this.parseEndElement(e, t, n, "tailEnd", "tail");
|
|
225
226
|
let c = this.getFill(e, t);
|
|
226
227
|
return c && (n.fill = c), n;
|
|
227
228
|
}
|
|
@@ -249,51 +250,51 @@ var te = class {
|
|
|
249
250
|
switch (n) {
|
|
250
251
|
case "outerShdw": {
|
|
251
252
|
let n = {
|
|
252
|
-
type:
|
|
253
|
+
type: g.Type.OuterShadow,
|
|
253
254
|
color: this.processAdjColor(e, t)
|
|
254
255
|
};
|
|
255
|
-
return t.hasAttribute("dist") && (n.distance =
|
|
256
|
+
return t.hasAttribute("dist") && (n.distance = s(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (n.blur = s(t.getAttribute("blurRad"))), t.hasAttribute("algn") && (n.alignment = t.getAttribute("algn")), t.hasAttribute("rotWithShape") && (n.isRotatedWithShape = l(t.getAttribute("rotWithShape"))), t.hasAttribute("sx") && (n.scaleX = a(t.getAttribute("sx"))), t.hasAttribute("sy") && (n.scaleY = a(t.getAttribute("sy"))), t.hasAttribute("kx") && (n.skewX = o(t.getAttribute("kx"))), t.hasAttribute("ky") && (n.skewY = o(t.getAttribute("ky"))), n;
|
|
256
257
|
}
|
|
257
258
|
case "innerShdw": {
|
|
258
259
|
let n = {
|
|
259
|
-
type:
|
|
260
|
+
type: g.Type.InnerShadow,
|
|
260
261
|
color: this.processAdjColor(e, t)
|
|
261
262
|
};
|
|
262
|
-
return t.hasAttribute("dist") && (n.distance =
|
|
263
|
+
return t.hasAttribute("dist") && (n.distance = s(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (n.blur = s(t.getAttribute("blurRad"))), n;
|
|
263
264
|
}
|
|
264
265
|
case "prstShdw": {
|
|
265
266
|
let n = {
|
|
266
|
-
type:
|
|
267
|
+
type: g.Type.PresetShadow,
|
|
267
268
|
color: this.processAdjColor(e, t),
|
|
268
269
|
preset: t.getAttribute("prst") ?? void 0
|
|
269
270
|
};
|
|
270
|
-
return t.hasAttribute("dist") && (n.distance =
|
|
271
|
+
return t.hasAttribute("dist") && (n.distance = s(t.getAttribute("dist"))), t.hasAttribute("dir") && (n.angle = o(t.getAttribute("dir"))), n;
|
|
271
272
|
}
|
|
272
273
|
case "glow": {
|
|
273
274
|
let n = {
|
|
274
|
-
type:
|
|
275
|
+
type: g.Type.Glow,
|
|
275
276
|
color: this.processAdjColor(e, t)
|
|
276
277
|
};
|
|
277
|
-
return t.hasAttribute("rad") && (n.radius =
|
|
278
|
+
return t.hasAttribute("rad") && (n.radius = s(t.getAttribute("rad"))), n;
|
|
278
279
|
}
|
|
279
280
|
case "softEdge": {
|
|
280
|
-
let e = { type:
|
|
281
|
-
return t.hasAttribute("rad") && (e.radius =
|
|
281
|
+
let e = { type: g.Type.SoftEdge };
|
|
282
|
+
return t.hasAttribute("rad") && (e.radius = s(t.getAttribute("rad"))), e;
|
|
282
283
|
}
|
|
283
284
|
case "reflection": {
|
|
284
|
-
let e = { type:
|
|
285
|
-
return t.hasAttribute("blurRad") && (e.blur =
|
|
285
|
+
let e = { type: g.Type.Reflection };
|
|
286
|
+
return t.hasAttribute("blurRad") && (e.blur = s(t.getAttribute("blurRad"))), t.hasAttribute("dist") && (e.distance = s(t.getAttribute("dist"))), t.hasAttribute("dir") && (e.angle = o(t.getAttribute("dir"))), t.hasAttribute("fadeDir") && (e.fadeAngle = o(t.getAttribute("fadeDir"))), t.hasAttribute("stA") && (e.startAlpha = a(t.getAttribute("stA"))), t.hasAttribute("stPos") && (e.startPosition = a(t.getAttribute("stPos"))), t.hasAttribute("endA") && (e.endAlpha = a(t.getAttribute("endA"))), t.hasAttribute("endPos") && (e.endPosition = a(t.getAttribute("endPos"))), t.hasAttribute("sx") && (e.scaleX = a(t.getAttribute("sx"))), t.hasAttribute("sy") && (e.scaleY = a(t.getAttribute("sy"))), t.hasAttribute("kx") && (e.skewX = o(t.getAttribute("kx"))), t.hasAttribute("ky") && (e.skewY = o(t.getAttribute("ky"))), t.hasAttribute("algn") && (e.alignment = t.getAttribute("algn")), t.hasAttribute("rotWithShape") && (e.isRotatedWithShape = l(t.getAttribute("rotWithShape"))), e;
|
|
286
287
|
}
|
|
287
288
|
default: return;
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
291
|
getFill(e, t) {
|
|
291
|
-
if (e.evaluate("noFill", t)) return { type:
|
|
292
|
+
if (e.evaluate("noFill", t)) return { type: _.Type.None };
|
|
292
293
|
let n = e.evaluate("solidFill", t);
|
|
293
294
|
if (n) {
|
|
294
295
|
let t = this.processAdjColor(e, n);
|
|
295
296
|
if (t) return {
|
|
296
|
-
type:
|
|
297
|
+
type: _.Type.Solid,
|
|
297
298
|
color: t
|
|
298
299
|
};
|
|
299
300
|
}
|
|
@@ -305,24 +306,24 @@ var te = class {
|
|
|
305
306
|
return a ? this.processImageFill(e, a) : null;
|
|
306
307
|
}
|
|
307
308
|
processGradFill(e, t) {
|
|
308
|
-
let n = { type:
|
|
309
|
+
let n = { type: _.Type.Gradient };
|
|
309
310
|
t.hasAttribute("rotWithShape") && (n.isRotatedWithShape = t.getAttribute("rotWithShape") === "1");
|
|
310
311
|
let r = e.evaluate("lin", t);
|
|
311
|
-
r && (n.gradientType =
|
|
312
|
-
let
|
|
313
|
-
t.hasAttribute("flip") && (
|
|
312
|
+
r && (n.gradientType = _.GradientType.Linear, r.hasAttribute("ang") && (n.angle = o(r.getAttribute("ang"))), r.hasAttribute("scaled") && (n.scaled = l(r.getAttribute("scaled"))));
|
|
313
|
+
let i = {};
|
|
314
|
+
t.hasAttribute("flip") && (i.mirror = t.getAttribute("flip")), Object.keys(i).length > 0 && (n.tile = i);
|
|
314
315
|
let s = e.evaluate("path", t);
|
|
315
316
|
if (s) {
|
|
316
317
|
s.hasAttribute("path") && (n.gradientType = oe(s.getAttribute("path")));
|
|
317
318
|
let t = e.evaluate("fillToRect", s);
|
|
318
319
|
t && (n.focus = this.getRect(t));
|
|
319
320
|
}
|
|
320
|
-
let
|
|
321
|
-
|
|
321
|
+
let c = e.evaluate("tileRect", t);
|
|
322
|
+
c && (n.tile ||= {}, n.tile.bounds = this.getRect(c));
|
|
322
323
|
let u = [], d = e.evaluate("gsLst/gs", t), f = d ? d.length : 0;
|
|
323
324
|
for (let t = 0; t < f; t++) {
|
|
324
325
|
let n = d.item(t), r = {
|
|
325
|
-
offset:
|
|
326
|
+
offset: a(n.getAttribute("pos") ?? ""),
|
|
326
327
|
color: this.processAdjColor(e, n)
|
|
327
328
|
};
|
|
328
329
|
u.push(r);
|
|
@@ -331,14 +332,14 @@ var te = class {
|
|
|
331
332
|
}
|
|
332
333
|
getRect(e) {
|
|
333
334
|
let t = {};
|
|
334
|
-
return e.hasAttribute("t") && (t.t =
|
|
335
|
+
return e.hasAttribute("t") && (t.t = a(e.getAttribute("t"))), e.hasAttribute("l") && (t.l = a(e.getAttribute("l"))), e.hasAttribute("b") && (t.b = a(e.getAttribute("b"))), e.hasAttribute("r") && (t.r = a(e.getAttribute("r"))), Object.keys(t).length === 0 ? null : t;
|
|
335
336
|
}
|
|
336
337
|
processImageFill(e, t) {
|
|
337
|
-
let n = { type:
|
|
338
|
-
return t.hasAttribute("rotWithShape") && (n.isRotatedWithShape =
|
|
338
|
+
let n = { type: _.Type.Image };
|
|
339
|
+
return t.hasAttribute("rotWithShape") && (n.isRotatedWithShape = l(t.getAttribute("rotWithShape"))), t.hasAttribute("dpi") && (n.dpi = t.getAttribute("dpi")), n.ref = "https://www.sheetxl.com/logo-color-padded-white.jpg", n.tile = !1, n;
|
|
339
340
|
}
|
|
340
341
|
processPatternFill(e, t) {
|
|
341
|
-
let n = { type:
|
|
342
|
+
let n = { type: _.Type.Pattern };
|
|
342
343
|
n.patternType = t.getAttribute("prst");
|
|
343
344
|
let r = e.evaluate("bgClr", t);
|
|
344
345
|
if (r) {
|
|
@@ -370,7 +371,7 @@ var te = class {
|
|
|
370
371
|
return s ? this.processSrgbClrElement(e, s) : null;
|
|
371
372
|
}
|
|
372
373
|
processScrgbClrElement(e, t) {
|
|
373
|
-
let n = "lrgba(" +
|
|
374
|
+
let n = "lrgba(" + a(t.getAttribute("r") ?? "") + "," + a(t.getAttribute("g") ?? "") + "," + a(t.getAttribute("b") ?? "") + ")";
|
|
374
375
|
return n += this.processAdjustments(e, t), n;
|
|
375
376
|
}
|
|
376
377
|
processSrgbClrElement(e, t) {
|
|
@@ -378,7 +379,7 @@ var te = class {
|
|
|
378
379
|
return n += this.processAdjustments(e, t), n;
|
|
379
380
|
}
|
|
380
381
|
processHslClr(e, t) {
|
|
381
|
-
let n = "hsl(" +
|
|
382
|
+
let n = "hsl(" + o(t.getAttribute("hue") ?? "") + "," + a(t.getAttribute("sat") ?? "") + "," + a(t.getAttribute("lum") ?? "") + ")";
|
|
382
383
|
return n += this.processAdjustments(e, t), n;
|
|
383
384
|
}
|
|
384
385
|
processClrWithValAttribute(e, t) {
|
|
@@ -407,36 +408,36 @@ var te = class {
|
|
|
407
408
|
if (e === "flat") return "butt";
|
|
408
409
|
if (e === "sq") return "square";
|
|
409
410
|
throw Error("Invalid lineCap type: " + e);
|
|
410
|
-
},
|
|
411
|
-
visit(e,
|
|
411
|
+
}, F = class extends P {
|
|
412
|
+
visit(e, t, r) {
|
|
412
413
|
try {
|
|
413
|
-
let i = e.evaluate("xfrm",
|
|
414
|
+
let i = e.evaluate("xfrm", t);
|
|
414
415
|
if (i) {
|
|
415
|
-
|
|
416
|
-
let
|
|
416
|
+
T(i, r);
|
|
417
|
+
let t = {
|
|
417
418
|
x: 0,
|
|
418
419
|
y: 0,
|
|
419
420
|
width: 0,
|
|
420
421
|
height: 0
|
|
421
422
|
}, a = e.evaluate("off", i);
|
|
422
|
-
a && (
|
|
423
|
+
a && (t.x = n(a.getAttribute("x")) ?? 0, t.y = n(a.getAttribute("y")) ?? 0);
|
|
423
424
|
let o = e.evaluate("ext", i);
|
|
424
|
-
a && (
|
|
425
|
+
a && (t.width = n(o.getAttribute("cx")) ?? 0, t.height = n(o.getAttribute("cy")) ?? 0), r.bounds = t;
|
|
425
426
|
}
|
|
426
|
-
let a = e.evaluate("prstGeom",
|
|
427
|
-
a?.hasAttribute("prst") ? r.geometry = a?.getAttribute("prst") : e.evaluate("customGeom",
|
|
428
|
-
let o = this.getFill(e,
|
|
427
|
+
let a = e.evaluate("prstGeom", t);
|
|
428
|
+
a?.hasAttribute("prst") ? r.geometry = a?.getAttribute("prst") : e.evaluate("customGeom", t) && console.warn("customGeom not supported yet");
|
|
429
|
+
let o = this.getFill(e, t);
|
|
429
430
|
o && Object.keys(o).length > 0 && (r.fill = o);
|
|
430
|
-
let s = this.getStroke(e,
|
|
431
|
+
let s = this.getStroke(e, t);
|
|
431
432
|
return s && Object.keys(s).length > 0 && (r.stroke = s), r;
|
|
432
433
|
} catch (e) {
|
|
433
434
|
console.warn(e);
|
|
434
435
|
}
|
|
435
436
|
}
|
|
436
|
-
},
|
|
437
|
+
}, I = class {
|
|
437
438
|
visit(e, t, n) {
|
|
438
439
|
let r = {};
|
|
439
|
-
if (
|
|
440
|
+
if (E(e, t, r, "grouping", "grouping"), D(e, t, r, "varyColors", "varyColors"), k(e, t, r, "gapWidth", "gapWidth", .01), k(e, t, r, "overlap", "overlap", .01), this.parseType(e, t, r), O(e, t, r, "bubbleScale", "bubbleScale"), D(e, t, r, "showNegBubbles", "showNegativeBubbleValues"), D(e, t, r, "sizeRepresents", "bubbleSizeRepresentsWidth"), O(e, t, r, "firstSliceAng", "startAngle"), O(e, t, r, "holeSize", "holeSize"), E(e, t, r, "scatterStyle", "scatterStyle"), this.parseAxisIds(e, t, r), Object.keys(r).length > 0) {
|
|
440
441
|
let t = e.getVisitorParamsState().get("types");
|
|
441
442
|
t || (console.warn("Uninitialized types array in ChartTypeVisitor"), t = [], e.getVisitorParamsState().set("types", t)), t.push(r);
|
|
442
443
|
}
|
|
@@ -465,7 +466,7 @@ var te = class {
|
|
|
465
466
|
let r = e.evaluate("axId", t);
|
|
466
467
|
r && r.length !== 0 && (n.xAxisId = r.item(0).getAttribute("val"), n.yAxisId = r.item(1).getAttribute("val"));
|
|
467
468
|
}
|
|
468
|
-
},
|
|
469
|
+
}, L = (e, t, n) => {
|
|
469
470
|
if (!0 === e.getValAttrAsBoolean("invertIfNegative", t)) if (e.evaluate("extLst/ext/invertSolidFillFmt", t)) {
|
|
470
471
|
if (n.fill && n.fillNegative) {
|
|
471
472
|
let t = e.getFromPath(n, "fill.solid.adjs");
|
|
@@ -479,7 +480,7 @@ var te = class {
|
|
|
479
480
|
let a = {};
|
|
480
481
|
a.fill = i, n.strokeNegative = a;
|
|
481
482
|
}
|
|
482
|
-
},
|
|
483
|
+
}, R = class extends P {
|
|
483
484
|
constructor(e = "text") {
|
|
484
485
|
super(), this._jsonKey = e;
|
|
485
486
|
}
|
|
@@ -492,7 +493,7 @@ var te = class {
|
|
|
492
493
|
}
|
|
493
494
|
parseTextElement(e, t, n, r) {
|
|
494
495
|
let i = e.evaluate("p/pPr/defRPr", t) ?? e.evaluate("defRPr", t);
|
|
495
|
-
i && (this.parseTextProperties(e, i, n), new
|
|
496
|
+
i && (this.parseTextProperties(e, i, n), new F().visit(e, i, n));
|
|
496
497
|
let a = n.runs ?? [], o = e.evaluate("p/r", t) ?? e.evaluate("r", t), s = (t) => {
|
|
497
498
|
let n = {}, r = e.evaluate("t", t), i = e.evaluate("rPr", t);
|
|
498
499
|
i && this.parseTextProperties(e, i, n), r && r.firstChild ? n.text = r.firstChild.textContent ?? "" : t.textContent && (n.text = t.textContent ?? ""), Object.keys(n).length > 0 && a.push(n);
|
|
@@ -501,7 +502,7 @@ var te = class {
|
|
|
501
502
|
else s(o || t);
|
|
502
503
|
a.length > 0 && (n.runs = a);
|
|
503
504
|
let c = e.evaluate("bodyPr", t);
|
|
504
|
-
c &&
|
|
505
|
+
c && T(c, n);
|
|
505
506
|
}
|
|
506
507
|
parseTextProperties(e, t, n) {
|
|
507
508
|
if (!t) return;
|
|
@@ -513,17 +514,17 @@ var te = class {
|
|
|
513
514
|
let e = n.font ?? {};
|
|
514
515
|
if (i.hasAttribute("typeface") && (e.family = i.getAttribute("typeface")), i.hasAttribute("panose")) {
|
|
515
516
|
let t = i.getAttribute("panose");
|
|
516
|
-
t && (e.fallbacks = [
|
|
517
|
+
t && (e.fallbacks = [v.getPanoseFallback(t)]);
|
|
517
518
|
}
|
|
518
519
|
i.hasAttribute("pitchFamily") && (e.pitch = i.getAttribute("pitchFamily")), i.hasAttribute("charset") && (e.charset = i.getAttribute("charset")), Object.keys(e).length > 0 && (n.font = e);
|
|
519
520
|
}
|
|
520
521
|
}
|
|
521
|
-
},
|
|
522
|
+
}, z = class {
|
|
522
523
|
visit(e, t, n) {}
|
|
523
|
-
processDataBarColor(e, t,
|
|
524
|
+
processDataBarColor(e, t, n, i, a = "auto") {
|
|
524
525
|
if (!t) return;
|
|
525
|
-
let o =
|
|
526
|
-
return o && (
|
|
526
|
+
let o = r((e) => t.getAttribute(e), a);
|
|
527
|
+
return o && (n[i] = o), n;
|
|
527
528
|
}
|
|
528
529
|
processFonts(e, t, n) {
|
|
529
530
|
if (!t) return;
|
|
@@ -538,11 +539,11 @@ var te = class {
|
|
|
538
539
|
return n;
|
|
539
540
|
}
|
|
540
541
|
processFont(e, t, n) {
|
|
541
|
-
e.getValAttrAsBoolean("b", t, !0) && (n.weight = 700), e.getValAttrAsBoolean("i", t, !0) && (n.style =
|
|
542
|
+
e.getValAttrAsBoolean("b", t, !0) && (n.weight = 700), e.getValAttrAsBoolean("i", t, !0) && (n.style = v.Style.Italic), e.getValAttrAsBoolean("strike", t, !0) && (n.strike = !0);
|
|
542
543
|
let r = e.evaluate("u", t);
|
|
543
|
-
r && (n.underline = r.getAttribute("val") ||
|
|
544
|
+
r && (n.underline = r.getAttribute("val") || v.UnderlineStyle.Single), E(e, t, n, "vertAlign", "verticalAlign"), n.verticalAlign === "superscript" ? n.verticalAlign = v.VerticalAlignment.Super : n.verticalAlign === "subscript" && (n.verticalAlign = v.VerticalAlignment.Sub), k(e, t, n, "sz", "size");
|
|
544
545
|
let i = e.evaluate("color", t);
|
|
545
|
-
this.processDataBarColor(e, i, n, "color"), n.color ||= "auto",
|
|
546
|
+
this.processDataBarColor(e, i, n, "color"), n.color ||= "auto", E(e, t, n, "name", "family"), E(e, t, n, "rFont", "family");
|
|
546
547
|
let a = e.evaluate("family", t);
|
|
547
548
|
if (a) {
|
|
548
549
|
let e = a.getAttribute("val");
|
|
@@ -562,7 +563,7 @@ var te = class {
|
|
|
562
563
|
case "5": n.fallbacks = ["fantasy"];
|
|
563
564
|
}
|
|
564
565
|
}
|
|
565
|
-
return
|
|
566
|
+
return E(e, t, n, "scheme", "scheme"), D(e, t, n, "shadow", "shadow", !0), D(e, t, n, "outline", "outline", !0), e.getValAttrAsBoolean("condense", t, !0) && (n.letterSpacing = -1), e.getValAttrAsBoolean("extend", t, !0) && (n.letterSpacing = 1), O(e, t, n, "charset", "charset"), n;
|
|
566
567
|
}
|
|
567
568
|
processFills(e, t, n) {
|
|
568
569
|
if (!t) return;
|
|
@@ -574,7 +575,7 @@ var te = class {
|
|
|
574
575
|
return n;
|
|
575
576
|
}
|
|
576
577
|
processFill(e, t, n, r) {
|
|
577
|
-
let i = { type:
|
|
578
|
+
let i = { type: _.Type.None }, a = t.childNodes, o = !1, s = a.length;
|
|
578
579
|
for (let t = 0; !o && t < s; t++) {
|
|
579
580
|
let n = a.item(t);
|
|
580
581
|
n.nodeType === 1 && (n.localName === "gradientFill" ? (this.processGradientFill(e, n, i), o = !0) : n.localName === "patternFill" && (this.processPatternFill(e, n, i), o = !0));
|
|
@@ -583,17 +584,17 @@ var te = class {
|
|
|
583
584
|
}
|
|
584
585
|
processGradientFill(e, t, n) {
|
|
585
586
|
if (!t) return;
|
|
586
|
-
n.type =
|
|
587
|
+
n.type = _.Type.Gradient;
|
|
587
588
|
let r = [];
|
|
588
589
|
n.stops = r;
|
|
589
590
|
let i = t.getAttribute("type");
|
|
590
591
|
i && (n.gradientType = i);
|
|
591
592
|
let a = t.hasAttribute("degree") ? parseFloat(t.getAttribute("degree")) : 0;
|
|
592
593
|
(a + 90) % 360 != 0 && (n.angle = (a + 90) % 360), (t.hasAttribute("left") || t.hasAttribute("top") || t.hasAttribute("right") || t.hasAttribute("bottom")) && (n.focus = {
|
|
593
|
-
left:
|
|
594
|
-
top:
|
|
595
|
-
right:
|
|
596
|
-
bottom:
|
|
594
|
+
left: B(t.getAttribute("left")),
|
|
595
|
+
top: B(t.getAttribute("top")),
|
|
596
|
+
right: B(t.getAttribute("right")),
|
|
597
|
+
bottom: B(t.getAttribute("bottom"))
|
|
597
598
|
});
|
|
598
599
|
let o = t.childNodes, s = o.length;
|
|
599
600
|
for (let t = 0; t < s; t++) {
|
|
@@ -609,10 +610,10 @@ var te = class {
|
|
|
609
610
|
}
|
|
610
611
|
processPatternFill(e, t, n) {
|
|
611
612
|
if (!t) return;
|
|
612
|
-
let r = e.getVisitorParamsState().get("processingDXFs"), i = t.getAttribute("patternType") || (r ?
|
|
613
|
-
if (i ===
|
|
614
|
-
n.type =
|
|
615
|
-
let a = "foreground", o = "background", s = n.patternType ===
|
|
613
|
+
let r = e.getVisitorParamsState().get("processingDXFs"), i = t.getAttribute("patternType") || (r ? _.BuiltInSheetPattern.Solid : _.BuiltInSheetPattern.None);
|
|
614
|
+
if (i === _.BuiltInSheetPattern.None) return { none: !0 };
|
|
615
|
+
n.type = _.Type.Pattern, i && (n.patternType = i);
|
|
616
|
+
let a = "foreground", o = "background", s = n.patternType === _.BuiltInSheetPattern.Solid && r, c = s ? "dk1" : "lt1", l = s ? "lt1" : "dk1";
|
|
616
617
|
if (s) {
|
|
617
618
|
let e = a;
|
|
618
619
|
a = o, o = e;
|
|
@@ -634,28 +635,32 @@ var te = class {
|
|
|
634
635
|
processBorder(e, t, n, r, i) {
|
|
635
636
|
if (!t) return;
|
|
636
637
|
let a = {};
|
|
637
|
-
return this.processBorderStroke(e, t, a,
|
|
638
|
+
return this.processBorderStroke(e, t, a, m.Edge.Left), this.processBorderStroke(e, t, a, m.Edge.Right), i ? (a.right || a.left) && (a.right ? a.vertical = { ...a.right } : a.vertical = { ...a.left }) : this.processBorderStroke(e, t, a, m.Edge.Vertical), this.processBorderStroke(e, t, a, m.Edge.Top), this.processBorderStroke(e, t, a, m.Edge.Bottom), i ? (a.bottom || a.top) && (a.bottom ? a.horizontal = { ...a.bottom } : a.horizontal = { ...a.top }) : this.processBorderStroke(e, t, a, m.Edge.Horizontal), n[r] = a, n;
|
|
638
639
|
}
|
|
639
640
|
processBorderStroke(e, t, n, r) {
|
|
640
641
|
if (!t) return;
|
|
641
642
|
let i = e.evaluate(r, t);
|
|
642
643
|
if (!i) return;
|
|
643
644
|
let a = {};
|
|
644
|
-
i.hasAttribute("style") ? a.style = i.getAttribute("style") : e.getVisitorParamsState().get("processingDXFs") && (a.style =
|
|
645
|
+
i.hasAttribute("style") ? a.style = i.getAttribute("style") : e.getVisitorParamsState().get("processingDXFs") && (a.style = m.StrokeStyle.None);
|
|
645
646
|
let o = e.evaluate("color", i);
|
|
646
647
|
return o && this.processDataBarColor(e, o, a, "color"), Object.keys(a).length > 0 ? n[r] = a : null;
|
|
647
648
|
}
|
|
648
|
-
},
|
|
649
|
+
}, B = (e) => {
|
|
649
650
|
if (!e) return 0;
|
|
650
651
|
let t = parseFloat(e);
|
|
651
652
|
return isNaN(t) ? 0 : t;
|
|
652
|
-
},
|
|
653
|
+
}, ce = {
|
|
654
|
+
auto: "auto",
|
|
655
|
+
autoNoTable: "automaticExceptTables",
|
|
656
|
+
manual: "manual"
|
|
657
|
+
}, V = class {
|
|
653
658
|
visit(e, t, n) {
|
|
654
659
|
if (!t) return;
|
|
655
660
|
let r = e.evaluate("*/cNvPr", t);
|
|
656
661
|
return r.item && (r = r.item(0)), r && (e.copyFromAttribute(r, "name", n), e.copyFromAttribute(r, "descr", n, "description"), e.copyFromAttribute(r, "hidden", n, "hidden", e.BOOLEAN_COPY), e.copyFromAttribute(r, "id", n)), n;
|
|
657
662
|
}
|
|
658
|
-
},
|
|
663
|
+
}, H = class extends V {
|
|
659
664
|
visit(e, t, n) {
|
|
660
665
|
if (!t) return;
|
|
661
666
|
if (e.getPath().includes("Fallback") && n.content) return n;
|
|
@@ -682,7 +687,7 @@ var te = class {
|
|
|
682
687
|
json: s
|
|
683
688
|
}, s;
|
|
684
689
|
}
|
|
685
|
-
},
|
|
690
|
+
}, U = "richTypes", W = "richData", G = class {
|
|
686
691
|
visit(e, t, n) {
|
|
687
692
|
if (!t) return;
|
|
688
693
|
let r = t.childNodes, i = r.length;
|
|
@@ -696,7 +701,7 @@ var te = class {
|
|
|
696
701
|
let r = {};
|
|
697
702
|
e.copyFromAttribute(t, "Target", r, "target"), e.copyFromAttribute(t, "Type", r, "type"), e.copyFromAttribute(t, "TargetMode", r, "targetMode"), n[t.getAttribute("Id")] = r;
|
|
698
703
|
}
|
|
699
|
-
},
|
|
704
|
+
}, le = class {
|
|
700
705
|
visit(e, t, n) {
|
|
701
706
|
let r = [], i = t.childNodes, a = i.length;
|
|
702
707
|
for (let t = 0; t < a; t++) {
|
|
@@ -713,7 +718,7 @@ var te = class {
|
|
|
713
718
|
value: t.textContent || ""
|
|
714
719
|
};
|
|
715
720
|
}
|
|
716
|
-
},
|
|
721
|
+
}, ue = class {
|
|
717
722
|
visit(e, t, n) {
|
|
718
723
|
let r = [], i = t.childNodes, a = i.length;
|
|
719
724
|
for (let t = 0; t < a; t++) {
|
|
@@ -730,9 +735,9 @@ var te = class {
|
|
|
730
735
|
value: t.textContent || ""
|
|
731
736
|
};
|
|
732
737
|
}
|
|
733
|
-
},
|
|
738
|
+
}, de = class {
|
|
734
739
|
visit(e, t, n) {
|
|
735
|
-
return
|
|
740
|
+
return D(e, t, n, "roundedCorners", "roundedCorners"), O(e, t, n, ".//AlternateContent/Fallback/style", "styleId"), e.getVisitorParamsState().set("types", []), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), n.range = null, n;
|
|
736
741
|
}
|
|
737
742
|
afterVisit(e, t, n) {
|
|
738
743
|
let r = {};
|
|
@@ -759,17 +764,17 @@ var te = class {
|
|
|
759
764
|
for (let e = 0; e < p; e++) f[e + ""] = d[e];
|
|
760
765
|
f.length = p, e.getVisitorParamsState().delete("types"), e.getVisitorParamsState().delete("axes"), e.getVisitorParamsState().delete("series");
|
|
761
766
|
}
|
|
762
|
-
},
|
|
767
|
+
}, fe = class {
|
|
763
768
|
visit(e, t, n) {
|
|
764
769
|
let r = {};
|
|
765
770
|
return n.plotArea = r, r;
|
|
766
771
|
}
|
|
767
|
-
},
|
|
772
|
+
}, pe = F, me = class extends I {
|
|
768
773
|
parseType(e, t, n) {
|
|
769
774
|
let r = e.getValAttrAsString("barDir", t);
|
|
770
775
|
r && (n.type = r === "col" ? "column" : "bar");
|
|
771
776
|
}
|
|
772
|
-
},
|
|
777
|
+
}, K = I, q = class {
|
|
773
778
|
constructor(e) {
|
|
774
779
|
this.jsonKey = e;
|
|
775
780
|
}
|
|
@@ -777,18 +782,18 @@ var te = class {
|
|
|
777
782
|
let r = {}, i = r, a = e.getValAttrAsString("idx", t);
|
|
778
783
|
a !== null && (i = {}, i[a] = r);
|
|
779
784
|
let o = e.getValAttrAsBoolean("delete", t);
|
|
780
|
-
this.parseNumFormat(e, t, r), !0 === o ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (
|
|
785
|
+
this.parseNumFormat(e, t, r), !0 === o ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (D(e, t, r, "showBubbleSize", "showBubbleSize"), D(e, t, r, "showCatName", "showCatName"), D(e, t, r, "showLeaderLines", "showLeaderLines"), D(e, t, r, "showPercent", "showPercentage"), D(e, t, r, "showSerName", "showSerName"), D(e, t, r, "showVal", "showVal"), D(e, t, r, "showLegendKey", "showLegendKey"));
|
|
781
786
|
let s = e.evaluate("separator", t);
|
|
782
|
-
return s !== null && (r.separator = s.textContent),
|
|
787
|
+
return s !== null && (r.separator = s.textContent), E(e, t, r, "dLblPos", "position"), n[this.jsonKey] = i, r;
|
|
783
788
|
}
|
|
784
789
|
parseNumFormat(e, t, n) {
|
|
785
790
|
let r = e.evaluate("numFmt", t);
|
|
786
791
|
r && (n.formatCode = r.getAttribute("formatCode"), r.hasAttribute("sourceLinked") && (n.sourceLinked = r.getAttribute("sourceLinked") === "1"));
|
|
787
792
|
}
|
|
788
|
-
},
|
|
793
|
+
}, he = class {
|
|
789
794
|
visit(e, t, n) {
|
|
790
795
|
let r = {};
|
|
791
|
-
|
|
796
|
+
O(e, t, r, "explosion", "explosion");
|
|
792
797
|
let i = e.evaluate("cat/*/f", t);
|
|
793
798
|
i ||= e.evaluate("xVal/*/f", t);
|
|
794
799
|
let a = null;
|
|
@@ -796,7 +801,7 @@ var te = class {
|
|
|
796
801
|
let o = e.evaluate("val/*/f", t);
|
|
797
802
|
o ||= e.evaluate("yVal/*/f", t);
|
|
798
803
|
let s = null;
|
|
799
|
-
o && o.firstChild && (s = o.firstChild.nodeValue), o || (o = e.evaluate("val/numLit", t), o !== null && (s = this.parsePointsAsString(e, o))), s !== null && (r.valRange = s), this.parseTitleRangeOrValue(e, t, r),
|
|
804
|
+
o && o.firstChild && (s = o.firstChild.nodeValue), o || (o = e.evaluate("val/numLit", t), o !== null && (s = this.parsePointsAsString(e, o))), s !== null && (r.valRange = s), this.parseTitleRangeOrValue(e, t, r), O(e, t, r, "idx", "idx"), D(e, t, r, "smooth", "smooth"), r.offsetChart = e.getVisitorParamsState().get("types").length - 1;
|
|
800
805
|
let c = e.getVisitorParamsState().get("series");
|
|
801
806
|
return c || (c = [], e.getVisitorParamsState().set("series", c)), c.push(r), r;
|
|
802
807
|
}
|
|
@@ -820,7 +825,7 @@ var te = class {
|
|
|
820
825
|
return n += "}", n;
|
|
821
826
|
}
|
|
822
827
|
afterVisit(e, t, n) {
|
|
823
|
-
|
|
828
|
+
L(e, t, n);
|
|
824
829
|
let r = e.getFromPath(n, "points");
|
|
825
830
|
if (r) {
|
|
826
831
|
let t = Object.keys(r);
|
|
@@ -832,15 +837,15 @@ var te = class {
|
|
|
832
837
|
}
|
|
833
838
|
}
|
|
834
839
|
}
|
|
835
|
-
},
|
|
840
|
+
}, ge = class {
|
|
836
841
|
DataPointVisitor() {}
|
|
837
842
|
visit(e, t, n) {
|
|
838
843
|
let r = e.getFromPath(n, "points"), i = null;
|
|
839
844
|
r ? i = r : (i = {}, e.setToPath(n, "points", i));
|
|
840
845
|
let a = {}, o = e.getValAttrAsString("idx", t);
|
|
841
|
-
return o !== null && (i[o] = a),
|
|
846
|
+
return o !== null && (i[o] = a), D(e, t, a, "bubble3D", "bubble3D"), O(e, t, a, "explosion", "explosion"), L(e, t, a), a;
|
|
842
847
|
}
|
|
843
|
-
},
|
|
848
|
+
}, _e = class {
|
|
844
849
|
visit(e, t, n) {
|
|
845
850
|
let r = t.parentNode.localName;
|
|
846
851
|
if (r === "ser" || r === "dPt") {
|
|
@@ -851,12 +856,12 @@ var te = class {
|
|
|
851
856
|
}
|
|
852
857
|
return null;
|
|
853
858
|
}
|
|
854
|
-
},
|
|
859
|
+
}, J = class {
|
|
855
860
|
visit(e, t, n) {
|
|
856
861
|
let r = {};
|
|
857
|
-
this.parseScaling(e, t, r),
|
|
862
|
+
this.parseScaling(e, t, r), k(e, t, r, "majorUnit", "majorUnits"), k(e, t, r, "minorUnit", "minorUnits"), D(e, t, r, "delete", "shown"), this.parseOrientation(e, t, r), this.parseNumFormat(e, t, r), E(e, t, r, "majorTickMark", "majorTickMarks"), E(e, t, r, "minorTickMark", "minorTickMarks"), E(e, t, r, "crosses", "crosses"), k(e, t, r, "crossesAt", "crosses"), E(e, t, r, "crossBetween", "crossBetween"), this.parseLabelAlign(e, t, r), O(e, t, r, "lblOffset", "labelOffset"), E(e, t, r, "tickLblPos", "labelPosition");
|
|
858
863
|
let i = e.getValAttrAsInteger("noMultiLvlLbl", t);
|
|
859
|
-
r.labelMultiLevel = i !== null && i === 0,
|
|
864
|
+
r.labelMultiLevel = i !== null && i === 0, O(e, t, r, "tickMarkSkip", "tickMarkSkip"), O(e, t, r, "tickLblSkip", "labelInterval"), this.parseDisplayCustOrBuiltInUnit(t, e, r), this.parseTimeUnits(e, t, r, "majorUnitDates", "majorTimeUnit", "majorUnit"), this.parseTimeUnits(e, t, r, "minorUnitDates", "minorTimeUnit", "minorUnit"), E(e, t, r, "baseTimeUnit", "baseUnitDates"), e.getVisitorParamsState().get("axes") || (console.warn("Uninitialized axes map in AxisVisitor"), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
|
|
860
865
|
let a = e.getValAttrAsString("axId", t);
|
|
861
866
|
return e.getVisitorParamsState().get("axes").set(a, r), r;
|
|
862
867
|
}
|
|
@@ -884,7 +889,7 @@ var te = class {
|
|
|
884
889
|
let r = e.getValAttrAsString("scaling/orientation", t);
|
|
885
890
|
r !== null && (n.inverted = r !== "minMax");
|
|
886
891
|
let i = e.getValAttrAsFloat("scaling/logBase", t);
|
|
887
|
-
i !== null && (n.logBase = i, n.scaleType = "log"),
|
|
892
|
+
i !== null && (n.logBase = i, n.scaleType = "log"), k(e, t, n, "scaling/max", "max"), k(e, t, n, "scaling/min", "min");
|
|
888
893
|
}
|
|
889
894
|
afterVisit(e, t, n) {
|
|
890
895
|
n.fill && n.labels && (n.labels.fill = n.fill, delete n.fill);
|
|
@@ -899,7 +904,7 @@ var te = class {
|
|
|
899
904
|
let s = e.evaluate("majorGridlines", t);
|
|
900
905
|
e.setToPath(n, "gridLinesMajor.shown", s !== null);
|
|
901
906
|
}
|
|
902
|
-
},
|
|
907
|
+
}, Y = R, ve = class {
|
|
903
908
|
visit(e, t, n) {
|
|
904
909
|
let r = e.getVisitorParamsState().get("series"), i = e.getValAttrAsInteger("idx", t), a = i === null ? void 0 : r[i];
|
|
905
910
|
if (a) {
|
|
@@ -910,19 +915,19 @@ var te = class {
|
|
|
910
915
|
}
|
|
911
916
|
return n;
|
|
912
917
|
}
|
|
913
|
-
},
|
|
918
|
+
}, ye = class {
|
|
914
919
|
visit(e, t, n) {
|
|
915
920
|
let r = {};
|
|
916
|
-
return
|
|
921
|
+
return D(e, t, r, "overlay", "overlay"), E(e, t, r, "legendPos", "position"), n.legend = r, r;
|
|
917
922
|
}
|
|
918
|
-
},
|
|
923
|
+
}, be = class extends F {
|
|
919
924
|
visit(e, t, n) {
|
|
920
925
|
let r = this.getFill(e, t);
|
|
921
926
|
Object.keys(r).length > 0 && (n.fillNegative = r);
|
|
922
927
|
let i = this.getStroke(e, t);
|
|
923
928
|
return Object.keys(i).length > 0 && (n.strokeNegative = i), n;
|
|
924
929
|
}
|
|
925
|
-
},
|
|
930
|
+
}, X = class extends R {
|
|
926
931
|
constructor(e = "title") {
|
|
927
932
|
super(e);
|
|
928
933
|
}
|
|
@@ -935,7 +940,7 @@ var te = class {
|
|
|
935
940
|
}
|
|
936
941
|
visit(e, t, n) {
|
|
937
942
|
let r = {};
|
|
938
|
-
|
|
943
|
+
D(e, t, r, "overlay", "overlay"), n[this._jsonKey] = r;
|
|
939
944
|
let i = e.getFromPath(r, this.getTextPath());
|
|
940
945
|
i ||= {}, this.parseTitleRangeOrValue(e, t, r);
|
|
941
946
|
let a = e.evaluate("txPr", t);
|
|
@@ -949,20 +954,20 @@ var te = class {
|
|
|
949
954
|
e !== null && (n.rotation = parseInt(e), delete n.title.rotation);
|
|
950
955
|
}
|
|
951
956
|
}
|
|
952
|
-
},
|
|
957
|
+
}, xe = class {
|
|
953
958
|
visit(e, t, n) {
|
|
954
959
|
let r = e.evaluate("manualLayout", t);
|
|
955
960
|
if (r) {
|
|
956
961
|
let t = {};
|
|
957
|
-
|
|
962
|
+
k(e, r, t, "x", "x"), k(e, r, t, "y", "y"), k(e, r, t, "w", "w"), k(e, r, t, "h", "h"), E(e, r, t, "xMode", "xMode"), E(e, r, t, "yMode", "yMode"), E(e, r, t, "wMode", "wMode"), E(e, r, t, "hMode", "hMode"), Object.keys(t).length > 0 && (n.manualLayout = t);
|
|
958
963
|
}
|
|
959
964
|
return n;
|
|
960
965
|
}
|
|
961
|
-
},
|
|
966
|
+
}, Se = class {
|
|
962
967
|
visit(e, t, n) {
|
|
963
968
|
return n.name = t.getAttribute("name"), n;
|
|
964
969
|
}
|
|
965
|
-
},
|
|
970
|
+
}, Ce = class extends P {
|
|
966
971
|
visit(e, t, n) {
|
|
967
972
|
let r = {};
|
|
968
973
|
r.name = t.getAttribute("name");
|
|
@@ -976,7 +981,7 @@ var te = class {
|
|
|
976
981
|
}
|
|
977
982
|
return Object.keys(r).length > 0 && (n.colors = r), r;
|
|
978
983
|
}
|
|
979
|
-
},
|
|
984
|
+
}, we = class {
|
|
980
985
|
visit(e, t, n) {
|
|
981
986
|
let r = {};
|
|
982
987
|
r.name = t.getAttribute("name");
|
|
@@ -992,9 +997,9 @@ var te = class {
|
|
|
992
997
|
let i = r.getAttribute("typeface");
|
|
993
998
|
i && (n.family = i);
|
|
994
999
|
let a = r.getAttribute("panose");
|
|
995
|
-
return a && (n.fallbacks = [
|
|
1000
|
+
return a && (n.fallbacks = [v.getPanoseFallback(a)]), n;
|
|
996
1001
|
}
|
|
997
|
-
},
|
|
1002
|
+
}, Te = class extends P {
|
|
998
1003
|
visit(e, t, n) {
|
|
999
1004
|
let r = this.parseFillList(e, t, "fillStyleLst"), i = this.parseLnList(e, t, "lnStyleLst"), a = this.parseEffectStyleList(e, t, "effectStyleLst"), o = this.parseFillList(e, t, "bgFillStyleLst");
|
|
1000
1005
|
if (r && i && a && o) return n.fillStyleLst = r, n.lnStyleLst = i, n.effectStyleLst = a, void (n.bgFillStyleLst = o);
|
|
@@ -1016,11 +1021,11 @@ var te = class {
|
|
|
1016
1021
|
}
|
|
1017
1022
|
parseFillListItem(e, t) {
|
|
1018
1023
|
switch (t.localName) {
|
|
1019
|
-
case "noFill": return { type:
|
|
1024
|
+
case "noFill": return { type: _.Type.None };
|
|
1020
1025
|
case "solidFill": {
|
|
1021
1026
|
let n = this.processAdjColor(e, t);
|
|
1022
1027
|
return n ? {
|
|
1023
|
-
type:
|
|
1028
|
+
type: _.Type.Solid,
|
|
1024
1029
|
color: n
|
|
1025
1030
|
} : void 0;
|
|
1026
1031
|
}
|
|
@@ -1056,7 +1061,7 @@ var te = class {
|
|
|
1056
1061
|
}
|
|
1057
1062
|
return i;
|
|
1058
1063
|
}
|
|
1059
|
-
},
|
|
1064
|
+
}, Ee = class {
|
|
1060
1065
|
visit(e, t, n) {
|
|
1061
1066
|
if (!t) return;
|
|
1062
1067
|
let r = {}, i = t.getAttribute("r:id");
|
|
@@ -1066,7 +1071,7 @@ var te = class {
|
|
|
1066
1071
|
}
|
|
1067
1072
|
return e.copyFromAttribute(t, "tooltip", r, "screenTip"), e.copyFromAttribute(t, "history", r, "history", e.BOOLEAN_COPY), e.copyFromAttribute(t, "tgtFrame", r, "target"), n.hyperlink = r, r;
|
|
1068
1073
|
}
|
|
1069
|
-
},
|
|
1074
|
+
}, De = class {
|
|
1070
1075
|
visit(e, t, n) {
|
|
1071
1076
|
if (!t) return;
|
|
1072
1077
|
let r = {}, i = [];
|
|
@@ -1074,22 +1079,22 @@ var te = class {
|
|
|
1074
1079
|
}
|
|
1075
1080
|
processColorFilter(e, t) {
|
|
1076
1081
|
let n = {}, r = {
|
|
1077
|
-
operator:
|
|
1082
|
+
operator: h.BuiltInOperatorNames.Color,
|
|
1078
1083
|
param: n
|
|
1079
1084
|
};
|
|
1080
1085
|
return e.copyFromAttribute(t, "cellColor", n, "cellColor", e.BOOLEAN_COPY), e.copyFromAttribute(t, "dxfId", n, "styleId", e.INT_COPY), r;
|
|
1081
1086
|
}
|
|
1082
|
-
processCustomFilter(e,
|
|
1083
|
-
return {
|
|
1084
|
-
operator:
|
|
1085
|
-
|
|
1086
|
-
};
|
|
1087
|
+
processCustomFilter(e, n) {
|
|
1088
|
+
return t({
|
|
1089
|
+
operator: n.getAttribute("operator"),
|
|
1090
|
+
val: n.getAttribute("val")
|
|
1091
|
+
});
|
|
1087
1092
|
}
|
|
1088
1093
|
processCustomFilters(e, t) {
|
|
1089
1094
|
let n = t.getAttribute("and"), r = n === "and" || n === "1";
|
|
1090
1095
|
t.getAttribute("val");
|
|
1091
1096
|
let i = [], a = {
|
|
1092
|
-
operator: r ?
|
|
1097
|
+
operator: r ? h.BuiltInOperatorNames.And : h.BuiltInOperatorNames.Or,
|
|
1093
1098
|
param: i
|
|
1094
1099
|
}, o = t.childNodes, s = o.length;
|
|
1095
1100
|
for (let t = 0; t < s; t++) {
|
|
@@ -1098,14 +1103,14 @@ var te = class {
|
|
|
1098
1103
|
let r = null;
|
|
1099
1104
|
n.localName === "customFilter" && (r = this.processCustomFilter(e, n)), r && i.push(r);
|
|
1100
1105
|
}
|
|
1101
|
-
return a;
|
|
1106
|
+
return i.length === 1 ? i[0] : a;
|
|
1102
1107
|
}
|
|
1103
1108
|
processDynamicFilter(e, t) {
|
|
1104
1109
|
let n = {}, r = {
|
|
1105
|
-
operator:
|
|
1110
|
+
operator: h.BuiltInOperatorNames.TimePeriod,
|
|
1106
1111
|
param: n
|
|
1107
1112
|
}, i = t.getAttribute("type");
|
|
1108
|
-
return i === "aboveAverage" ? i =
|
|
1113
|
+
return i === "aboveAverage" ? i = h.AverageType.Above : i === "belowAverage" && (i = h.AverageType.Below), Object.values(h.AverageType).includes(i) ? (r.operator = h.BuiltInOperatorNames.Average, e.copyFromAttribute(t, "val", n, "stdDevs", e.INT_COPY)) : e.copyFromAttribute(t, "val", n, "anchorDate", e.INT_COPY), e.copyFromAttribute(t, "type", n, "operator"), e.copyFromAttribute(t, "maxVal", n, "maxVal", e.INT_COPY), r;
|
|
1109
1114
|
}
|
|
1110
1115
|
processDateGroupItem(e, t) {
|
|
1111
1116
|
let n = {};
|
|
@@ -1116,7 +1121,7 @@ var te = class {
|
|
|
1116
1121
|
}
|
|
1117
1122
|
processFilters(e, t) {
|
|
1118
1123
|
let n = {}, r = {
|
|
1119
|
-
operator:
|
|
1124
|
+
operator: h.BuiltInOperatorNames.InSet,
|
|
1120
1125
|
param: n
|
|
1121
1126
|
};
|
|
1122
1127
|
e.copyFromAttribute(t, "blank", r, "blank", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calendarType", r, "calendarType");
|
|
@@ -1137,14 +1142,14 @@ var te = class {
|
|
|
1137
1142
|
}
|
|
1138
1143
|
processIcon(e, t) {
|
|
1139
1144
|
let n = {}, r = {
|
|
1140
|
-
operator:
|
|
1145
|
+
operator: h.BuiltInOperatorNames.Icon,
|
|
1141
1146
|
param: n
|
|
1142
1147
|
};
|
|
1143
1148
|
return e.copyFromAttribute(t, "iconId", n, "iconId", e.INT_COPY), e.copyFromAttribute(t, "iconSet", n), r;
|
|
1144
1149
|
}
|
|
1145
1150
|
processTop10(e, t) {
|
|
1146
1151
|
let n = {}, r = {
|
|
1147
|
-
operator:
|
|
1152
|
+
operator: h.BuiltInOperatorNames.TopN,
|
|
1148
1153
|
param: n
|
|
1149
1154
|
};
|
|
1150
1155
|
return e.copyFromAttribute(t, "filterVal", n, "filterVal", e.FLOAT_COPY), e.copyFromAttribute(t, "percent", n, "percent", e.BOOLEAN_COPY), e.copyFromAttribute(t, "top", n, "top", e.BOOLEAN_COPY), e.copyFromAttribute(t, "val", n, "val", e.FLOAT_COPY), r;
|
|
@@ -1162,12 +1167,12 @@ var te = class {
|
|
|
1162
1167
|
if (!t) return null;
|
|
1163
1168
|
if (!t.hasAttribute("colId")) return;
|
|
1164
1169
|
let r = parseInt(t.getAttribute("colId")), i = !1;
|
|
1165
|
-
if (t.hasAttribute("hiddenButton") && (i =
|
|
1170
|
+
if (t.hasAttribute("hiddenButton") && (i = l(t.getAttribute("hiddenButton"))), i && n) {
|
|
1166
1171
|
let e = n.hiddenButtons;
|
|
1167
1172
|
e || (e = [], n.hiddenButtons = e), e.push(r);
|
|
1168
1173
|
}
|
|
1169
1174
|
let a = !1;
|
|
1170
|
-
if (t.hasAttribute("showButton") && (a =
|
|
1175
|
+
if (t.hasAttribute("showButton") && (a = l(t.getAttribute("showButton"))), a && n) {
|
|
1171
1176
|
let e = n.showButtons;
|
|
1172
1177
|
!0 !== e && (e || (e = [], n.showButtons = e), e[r] = !0);
|
|
1173
1178
|
}
|
|
@@ -1186,11 +1191,11 @@ var te = class {
|
|
|
1186
1191
|
}
|
|
1187
1192
|
return n;
|
|
1188
1193
|
}
|
|
1189
|
-
},
|
|
1194
|
+
}, Oe = class {
|
|
1190
1195
|
visit(e, t, n) {
|
|
1191
1196
|
if (!t) return;
|
|
1192
1197
|
let r = t.getAttribute("ref"), i = {};
|
|
1193
|
-
t.hasAttribute("caseSensitive") && (i.collatorOptions =
|
|
1198
|
+
t.hasAttribute("caseSensitive") && (i.collatorOptions = l(t.getAttribute("caseSensitive")) ? S.CaseSensitiveOptions : S.CaseInsensitiveOptions);
|
|
1194
1199
|
let a = t.getAttribute("sortMethod");
|
|
1195
1200
|
a != null && a !== "none" && (a === "stroke" ? i.collatorOptions = {
|
|
1196
1201
|
...i.collatorOptions,
|
|
@@ -1200,20 +1205,20 @@ var te = class {
|
|
|
1200
1205
|
collation: "pinyin"
|
|
1201
1206
|
}));
|
|
1202
1207
|
let o = {};
|
|
1203
|
-
t.hasAttribute("columnSort") &&
|
|
1204
|
-
let s =
|
|
1205
|
-
return this.processSortConditions(e, t,
|
|
1208
|
+
t.hasAttribute("columnSort") && l(t.getAttribute("columnSort")) && (o.axis = y.Axis.Column);
|
|
1209
|
+
let s = f.fastStringToRange(r), c = [];
|
|
1210
|
+
return this.processSortConditions(e, t, c, s, i), c.length > 0 && (o.sorts = c), Object.keys(c).length > 0 && (n.sort = o), o;
|
|
1206
1211
|
}
|
|
1207
1212
|
processSortCondition(e, t, n, r) {
|
|
1208
1213
|
if (!t) return null;
|
|
1209
1214
|
let i = {};
|
|
1210
1215
|
if (!t.hasAttribute("ref")) return void console.warn("no ref for sort conditional", e.getPath());
|
|
1211
1216
|
if (t.hasAttribute("ref")) {
|
|
1212
|
-
let e = t.getAttribute("ref"), r =
|
|
1217
|
+
let e = t.getAttribute("ref"), r = f.fastStringToRange(e);
|
|
1213
1218
|
i.index = n ? r.colStart - n.colStart : r.colStart;
|
|
1214
1219
|
}
|
|
1215
1220
|
let a = { ...r };
|
|
1216
|
-
return i.criteria = a, a.reverse = !1, t.hasAttribute("descending") && (a.reverse =
|
|
1221
|
+
return i.criteria = a, a.reverse = !1, t.hasAttribute("descending") && (a.reverse = l(t.getAttribute("descending"))), e.copyFromAttribute(t, "sortBy", a, "sortOn"), e.copyFromAttribute(t, "dxfId", a), e.copyFromAttribute(t, "iconSet", a), e.copyFromAttribute(t, "customList", a), i;
|
|
1217
1222
|
}
|
|
1218
1223
|
processSortConditions(e, t, n, r, i) {
|
|
1219
1224
|
if (!t) return;
|
|
@@ -1226,7 +1231,7 @@ var te = class {
|
|
|
1226
1231
|
}
|
|
1227
1232
|
}
|
|
1228
1233
|
}
|
|
1229
|
-
},
|
|
1234
|
+
}, Z = class extends z {
|
|
1230
1235
|
visit(e, t, n) {
|
|
1231
1236
|
this.processNumFmts(e, e.evaluate("numFmts", t), null), e.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
|
|
1232
1237
|
let r = {
|
|
@@ -1234,14 +1239,14 @@ var te = class {
|
|
|
1234
1239
|
fonts: {},
|
|
1235
1240
|
borders: {}
|
|
1236
1241
|
};
|
|
1237
|
-
this.processFonts(e, e.evaluate("fonts", t), r.fonts), this.processFills(e, e.evaluate("fills", t), r.fills), this.processBorders(e, e.evaluate("borders", t), r.borders, !0), r.fills[0] = { type:
|
|
1238
|
-
type:
|
|
1239
|
-
patternType:
|
|
1242
|
+
this.processFonts(e, e.evaluate("fonts", t), r.fonts), this.processFills(e, e.evaluate("fills", t), r.fills), this.processBorders(e, e.evaluate("borders", t), r.borders, !0), r.fills[0] = { type: _.Type.None }, r.fills[1] = {
|
|
1243
|
+
type: _.Type.Pattern,
|
|
1244
|
+
patternType: _.BuiltInSheetPattern.Gray125
|
|
1240
1245
|
}, r.borders[0] = {
|
|
1241
|
-
bottom: { style:
|
|
1242
|
-
left: { style:
|
|
1243
|
-
right: { style:
|
|
1244
|
-
top: { style:
|
|
1246
|
+
bottom: { style: m.StrokeStyle.None },
|
|
1247
|
+
left: { style: m.StrokeStyle.None },
|
|
1248
|
+
right: { style: m.StrokeStyle.None },
|
|
1249
|
+
top: { style: m.StrokeStyle.None }
|
|
1245
1250
|
};
|
|
1246
1251
|
let i = [];
|
|
1247
1252
|
this.processXFs(e, e.evaluate("cellStyleXfs", t), i, r, null, !1);
|
|
@@ -1311,33 +1316,33 @@ var te = class {
|
|
|
1311
1316
|
let o = t.getAttribute("xfId");
|
|
1312
1317
|
if (o && i) {
|
|
1313
1318
|
let e = i.get(parseInt(o));
|
|
1314
|
-
e && e !==
|
|
1319
|
+
e && e !== b.BuiltInName.Normal && (n.named = e);
|
|
1315
1320
|
}
|
|
1316
|
-
let s = (e) => !(!a && t.hasAttribute(e)) ||
|
|
1321
|
+
let s = (e) => !(!a && t.hasAttribute(e)) || l(t.getAttribute(e)), c = (e) => !a || t.hasAttribute(e) && l(t.getAttribute(e)), u = a ? "0" : void 0;
|
|
1317
1322
|
if (s("applyFont")) {
|
|
1318
1323
|
let e = t.getAttribute("fontId") ?? u;
|
|
1319
|
-
if (e !== void 0 && (e !== "0" ||
|
|
1324
|
+
if (e !== void 0 && (e !== "0" || c("applyFont"))) {
|
|
1320
1325
|
let t = r.fonts[e];
|
|
1321
1326
|
t !== void 0 && (n.font = t);
|
|
1322
1327
|
}
|
|
1323
1328
|
}
|
|
1324
1329
|
if (s("applyFill")) {
|
|
1325
1330
|
let e = t.getAttribute("fillId") ?? u;
|
|
1326
|
-
if (e !== void 0 && (e !== "0" ||
|
|
1331
|
+
if (e !== void 0 && (e !== "0" || c("applyFill"))) {
|
|
1327
1332
|
let t = r.fills[e];
|
|
1328
1333
|
t !== void 0 && Object.keys(t).length > 0 && (n.fill = t);
|
|
1329
1334
|
}
|
|
1330
1335
|
}
|
|
1331
1336
|
if (s("applyBorder")) {
|
|
1332
1337
|
let e = t.getAttribute("borderId") ?? u;
|
|
1333
|
-
if (e !== void 0 && (e !== "0" ||
|
|
1338
|
+
if (e !== void 0 && (e !== "0" || c("applyBorder"))) {
|
|
1334
1339
|
let t = r.borders[e];
|
|
1335
1340
|
t !== void 0 && (n.border = t);
|
|
1336
1341
|
}
|
|
1337
1342
|
}
|
|
1338
1343
|
if (s("applyNumberFormat")) {
|
|
1339
1344
|
let r = t.getAttribute("numFmtId") ?? u;
|
|
1340
|
-
if (r !== void 0 && (r !== "0" ||
|
|
1345
|
+
if (r !== void 0 && (r !== "0" || c("applyNumberFormat"))) {
|
|
1341
1346
|
let t = parseInt(r), i, a = e.getVisitorParamsState();
|
|
1342
1347
|
if (a) {
|
|
1343
1348
|
let e = a.get("numFmts");
|
|
@@ -1347,31 +1352,31 @@ var te = class {
|
|
|
1347
1352
|
}
|
|
1348
1353
|
if (s("applyAlignment")) {
|
|
1349
1354
|
let r = e.evaluate("alignment", t);
|
|
1350
|
-
(r ||
|
|
1355
|
+
(r || c("applyAlignment")) && this.processAlignment(e, r, n);
|
|
1351
1356
|
}
|
|
1352
1357
|
if (s("applyProtection")) {
|
|
1353
1358
|
let r = e.evaluate("protection", t);
|
|
1354
|
-
(r ||
|
|
1359
|
+
(r || c("applyProtection")) && this.processProtection(e, r, n);
|
|
1355
1360
|
}
|
|
1356
|
-
let d =
|
|
1361
|
+
let d = l(t.getAttribute("quotePrefix") ?? "");
|
|
1357
1362
|
d && (n.quotePrefix = d);
|
|
1358
1363
|
}
|
|
1359
1364
|
processAlignment(e, t, n) {
|
|
1360
1365
|
let r = {};
|
|
1361
|
-
if (t?.hasAttribute("horizontal") ? r.horizontal = t.getAttribute("horizontal") : r.horizontal =
|
|
1366
|
+
if (t?.hasAttribute("horizontal") ? r.horizontal = t.getAttribute("horizontal") : r.horizontal = x.HorizontalAlignment.General, t?.hasAttribute("vertical") ? r.vertical = t.getAttribute("vertical") : r.vertical = x.VerticalAlignment.Bottom, t?.hasAttribute("indent") ? r.indent = parseInt(t.getAttribute("indent")) : r.indent = 0, t?.hasAttribute("relativeIndent") ? r.relativeIndent = parseInt(t.getAttribute("relativeIndent")) : r.relativeIndent = 0, l(t?.getAttribute("wrapText") ?? "") ? r.overflow = x.Overflow.Wrap : r.overflow = x.Overflow.Visible, l(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = x.Overflow.Shrink), t?.hasAttribute("textRotation")) {
|
|
1362
1367
|
let e = parseFloat(t.getAttribute("textRotation"));
|
|
1363
1368
|
e > 0 && e <= 90 ? e = 360 - e : e > 90 && e <= 180 ? e -= 90 : e === 255 && (e = 0, r.stacked = !0), r.rotation = e;
|
|
1364
1369
|
} else r.rotation = 0;
|
|
1365
|
-
t?.hasAttribute("justifyLastLine") && (r.justifyLastLine =
|
|
1370
|
+
t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = l(t.getAttribute("justifyLastLine")));
|
|
1366
1371
|
let i = t?.getAttribute("readingOrder");
|
|
1367
|
-
return i && (i === "0" ? r.readingDirection =
|
|
1372
|
+
return i && (i === "0" ? r.readingDirection = x.ReadingDirection.Auto : i === "1" ? r.readingDirection = x.ReadingDirection.LeftToRight : i === "2" ? r.readingDirection = x.ReadingDirection.RightToLeft : console.warn(`invalid readingOrder: ${i}`)), Object.keys(r).length > 0 && (n.alignment = r), n;
|
|
1368
1373
|
}
|
|
1369
1374
|
processProtection(e, t, n) {
|
|
1370
1375
|
if (!t) return;
|
|
1371
1376
|
let r = {}, i = t.getAttribute("locked");
|
|
1372
|
-
i && !
|
|
1377
|
+
i && !l(i) && (r.edit = !0);
|
|
1373
1378
|
let a = t.getAttribute("hidden");
|
|
1374
|
-
return a &&
|
|
1379
|
+
return a && l(a) && (r.formulaHidden = !0), Object.keys(r).length > 0 && (n.protection = r), n;
|
|
1375
1380
|
}
|
|
1376
1381
|
processDXF(e, t, n) {
|
|
1377
1382
|
if (!t) return;
|
|
@@ -1416,9 +1421,9 @@ var te = class {
|
|
|
1416
1421
|
}
|
|
1417
1422
|
processTableStyle(e, t, n, r, i = !1) {
|
|
1418
1423
|
let a = t.getAttribute("name"), o = { name: a };
|
|
1419
|
-
t.hasAttribute("table") && (o.table =
|
|
1420
|
-
let s = t.childNodes,
|
|
1421
|
-
for (let e = 0; e <
|
|
1424
|
+
t.hasAttribute("table") && (o.table = l(t.getAttribute("table"))), t.hasAttribute("pivot") && (o.pivot = l(t.getAttribute("pivot"))), i && !o.pivot && r.unshift(null);
|
|
1425
|
+
let s = t.childNodes, c = s.length;
|
|
1426
|
+
for (let e = 0; e < c; e++) {
|
|
1422
1427
|
let t = s.item(e);
|
|
1423
1428
|
if (t.nodeType === 1 && t.localName === "tableStyleElement") {
|
|
1424
1429
|
let e = t.getAttribute("type"), n = t.getAttribute("dxfId"), i = n == null ? void 0 : r?.[n];
|
|
@@ -1450,20 +1455,20 @@ var te = class {
|
|
|
1450
1455
|
if (t.nodeType === 1 && t.localName === "cellStyle") {
|
|
1451
1456
|
let e = parseInt(t.getAttribute("xfId") ?? ""), a = t.getAttribute("name"), o = t.getAttribute("builtinId"), s = a;
|
|
1452
1457
|
if (o !== null) {
|
|
1453
|
-
let e =
|
|
1458
|
+
let e = b.builtInNameFromId(parseInt(o));
|
|
1454
1459
|
e !== void 0 && (s = e);
|
|
1455
1460
|
}
|
|
1456
1461
|
if (i.set(e, s), !r[e]) continue;
|
|
1457
|
-
let
|
|
1462
|
+
let c = {
|
|
1458
1463
|
name: s,
|
|
1459
1464
|
style: r[e]
|
|
1460
1465
|
};
|
|
1461
|
-
t.getAttribute("hidden") && (
|
|
1466
|
+
t.getAttribute("hidden") && (c.hidden = l(t.getAttribute("hidden"))), t.getAttribute("iLevel") && (c.iLevel = parseInt(t.getAttribute("iLevel"))), n.push(c);
|
|
1462
1467
|
}
|
|
1463
1468
|
}
|
|
1464
1469
|
}
|
|
1465
1470
|
afterVisit(e, t, n) {}
|
|
1466
|
-
},
|
|
1471
|
+
}, ke = class extends z {
|
|
1467
1472
|
visit(e, t, n) {
|
|
1468
1473
|
return this.processSheetRefs(e, e.evaluate("sheets", t), n), this.processExternalReferences(e, e.evaluate("externalReferences", t), n), this.processBookViews(e, e.evaluate("bookViews", t), n), this.processDefinedNames(e, e.evaluate("definedNames", t), n), this.processCalcPr(e, e.evaluate("calcPr", t), n), this.processWorkbookProtection(e, e.evaluate("workbookProtection", t), n), this.processWorkbookPr(e, e.evaluate("workbookPr", t), n), n;
|
|
1469
1474
|
}
|
|
@@ -1478,7 +1483,9 @@ var te = class {
|
|
|
1478
1483
|
return this.processPassword(e, t, r, "workbook", "password"), this.processPassword(e, t, r, "revisions", "revisionsPassword"), e.copyFromAttribute(t, "lockStructure", r, "structure", e.BOOLEAN_COPY), e.copyFromAttribute(t, "lockWindows", r, "windows", e.BOOLEAN_COPY), e.copyFromAttribute(t, "lockRevision", r, "revision", e.BOOLEAN_COPY), n.protection = r, n;
|
|
1479
1484
|
}
|
|
1480
1485
|
processCalcPr(e, t, n) {
|
|
1481
|
-
|
|
1486
|
+
if (!t) return;
|
|
1487
|
+
let r = {};
|
|
1488
|
+
e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) => ce[e] ?? null), e.copyFromAttribute(t, "fullCalcOnLoad", r, "fullCalcOnLoad", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcOnSave", r, "calcOnSave", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcCompleted", r, "calcCompleted", e.BOOLEAN_COPY), e.copyFromAttribute(t, "fullPrecision", r, "fullPrecision", e.BOOLEAN_COPY), e.copyFromAttribute(t, "forceFullCalc", r, "forceFullCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "concurrentCalc", r, "concurrentCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "refMode", r, "refMode"), e.copyFromAttribute(t, "iterate", r, "iterate", e.BOOLEAN_COPY), e.copyFromAttribute(t, "iterateCount", r, "maxIterations", e.INT_COPY), e.copyFromAttribute(t, "iterateDelta", r, "maxIterateChange", e.FLOAT_COPY), n.calc = r;
|
|
1482
1489
|
}
|
|
1483
1490
|
processSheetRefs(e, t, n) {
|
|
1484
1491
|
if (!t) return;
|
|
@@ -1543,7 +1550,7 @@ var te = class {
|
|
|
1543
1550
|
t && e.copyFromAttribute(t, "date1904", n, "date1904", e.BOOLEAN_COPY);
|
|
1544
1551
|
}
|
|
1545
1552
|
afterVisit(e, t, n) {}
|
|
1546
|
-
},
|
|
1553
|
+
}, Ae = class {
|
|
1547
1554
|
visit(e, t, n) {
|
|
1548
1555
|
let r = {};
|
|
1549
1556
|
return e.copyFromAttribute(t, "ref", n, "r"), e.getVisitorParamsState().set("ref", n.r), n.v = r, e.copyFromAttribute(t, "name", r), e.copyFromAttribute(t, "displayName", r), e.copyFromAttribute(t, "headerRowCount", r, "headerRowCount", e.INT_COPY), e.copyFromAttribute(t, "totalsRowCount", r, "totalsRowCount", e.INT_COPY), this.processTableColumns(e, t, r), this.processTableStyleInfo(e, t, r), e.copyFromAttribute(t, "id", r), e.copyFromAttribute(t, "comment", r, "description"), e.copyFromAttribute(t, "connectionId", r, "connectionId", e.INT_COPY), e.copyFromAttribute(t, "tableType", r), e.copyFromAttribute(t, "published", r, "published", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRow", r, "insertRow", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRowShift", r, "insertRowShift", e.BOOLEAN_COPY), e.copyFromAttribute(t, "totalsRowShown", r, "totalsRowShown", e.BOOLEAN_COPY), r;
|
|
@@ -1593,7 +1600,7 @@ var te = class {
|
|
|
1593
1600
|
}
|
|
1594
1601
|
i.length > 0 && (n.columns = i);
|
|
1595
1602
|
}
|
|
1596
|
-
},
|
|
1603
|
+
}, je = class {
|
|
1597
1604
|
visit(e, t, n) {
|
|
1598
1605
|
let r = e.getVisitorParamsState().get("ref");
|
|
1599
1606
|
if (r) {
|
|
@@ -1602,7 +1609,7 @@ var te = class {
|
|
|
1602
1609
|
}
|
|
1603
1610
|
return e.copyFromAttribute(t, "altText", n), e.copyFromAttribute(t, "altTextSummary", n), n;
|
|
1604
1611
|
}
|
|
1605
|
-
},
|
|
1612
|
+
}, Me = class {
|
|
1606
1613
|
visit(e, t, n) {
|
|
1607
1614
|
let r = t.childNodes, i = r.length, a = null;
|
|
1608
1615
|
for (let e = 0; e < i; e++) {
|
|
@@ -1665,7 +1672,7 @@ var te = class {
|
|
|
1665
1672
|
if (t.nodeType !== 1 || t.localName !== "cell") continue;
|
|
1666
1673
|
let r = t.getAttribute("r");
|
|
1667
1674
|
if (!r) continue;
|
|
1668
|
-
let a =
|
|
1675
|
+
let a = f.fastStringToCell(r);
|
|
1669
1676
|
if (a?.rowIndex === void 0 || a?.colIndex === void 0) continue;
|
|
1670
1677
|
let o = this._readCellValue(t);
|
|
1671
1678
|
o !== void 0 && n.pushAt(a.rowIndex, a.colIndex, o);
|
|
@@ -1685,7 +1692,7 @@ var te = class {
|
|
|
1685
1692
|
case "str":
|
|
1686
1693
|
default: return t;
|
|
1687
1694
|
case "e": {
|
|
1688
|
-
let e =
|
|
1695
|
+
let e = p.getBuiltInByLabel(t);
|
|
1689
1696
|
return e ? {
|
|
1690
1697
|
t: "e",
|
|
1691
1698
|
v: e.getCode()
|
|
@@ -1701,13 +1708,13 @@ var te = class {
|
|
|
1701
1708
|
}
|
|
1702
1709
|
return null;
|
|
1703
1710
|
}
|
|
1704
|
-
},
|
|
1711
|
+
}, Ne = class {
|
|
1705
1712
|
visit(e, t, n) {
|
|
1706
1713
|
e.copyFromAttribute(t, "name", n), e.copyFromAttribute(t, "sourceName", n);
|
|
1707
1714
|
let r = e.evaluate("*/tableSlicerCache", t);
|
|
1708
1715
|
return r ? (e.copyFromAttribute(r, "tableId", n), e.copyFromAttribute(r, "column", n, "columnId"), e.copyFromAttribute(r, "crossFilter", n), n) : (console.warn("SlicerCacheDefinitionVisitor: missing tableSlicerCache element"), n);
|
|
1709
1716
|
}
|
|
1710
|
-
},
|
|
1717
|
+
}, Pe = class {
|
|
1711
1718
|
visit(e, t, n) {
|
|
1712
1719
|
let r = n.slicers;
|
|
1713
1720
|
r || (r = {}, n.slicers = r);
|
|
@@ -1729,7 +1736,7 @@ var te = class {
|
|
|
1729
1736
|
}
|
|
1730
1737
|
e.copyFromAttribute(t, "caption", r), e.copyFromAttribute(t, "startItem", r, "startItem", e.INT_COPY), e.copyFromAttribute(t, "columnCount", r, "columnCount", e.INT_COPY), e.copyFromAttribute(t, "showCaption", r, "showCaption", e.BOOLEAN_COPY), e.copyFromAttribute(t, "level", r, "level", e.INT_COPY), e.copyFromAttribute(t, "style", r), e.copyFromAttribute(t, "locked", r, "locked", e.BOOLEAN_COPY), e.copyFromAttribute(t, "rowHeight", r, "rowHeight", e.INT_COPY);
|
|
1731
1738
|
}
|
|
1732
|
-
},
|
|
1739
|
+
}, Fe = class {
|
|
1733
1740
|
visit(e, t, n) {
|
|
1734
1741
|
return n;
|
|
1735
1742
|
}
|
|
@@ -1739,25 +1746,25 @@ var te = class {
|
|
|
1739
1746
|
let r = {};
|
|
1740
1747
|
return e.copyFromAttribute(t, "editAs", r, "anchorType"), r.anchor = {}, t.localName === "absoluteAnchor" ? (r.anchorType = "absolute", this.processAbsoluteCoord(e, e.evaluate("xdr:pos", t), r.anchor, "from", "x", "y"), this.processAbsoluteCoord(e, e.evaluate("xdr:ext", t), r.anchor, "to", "cx", "cy")) : t.localName === "oneCellAnchor" ? (this.processOffsetCoord(e, e.evaluate("from", t), r.anchor, "from"), this.processAbsoluteCoord(e, e.evaluate("xdr:ext", t), r.anchor, "to", "cx", "cy")) : (this.processOffsetCoord(e, e.evaluate("from", t), r.anchor, "from"), this.processOffsetCoord(e, e.evaluate("to", t), r.anchor, "to")), n.movables ||= [], n.movables.push(r), r;
|
|
1741
1748
|
}
|
|
1742
|
-
processAbsoluteCoord(e,
|
|
1743
|
-
if (!
|
|
1749
|
+
processAbsoluteCoord(e, t, r, i, a, o) {
|
|
1750
|
+
if (!t) return;
|
|
1744
1751
|
let s = {
|
|
1745
1752
|
x: 0,
|
|
1746
1753
|
y: 0
|
|
1747
1754
|
};
|
|
1748
|
-
return s.x = t
|
|
1755
|
+
return s.x = n(t.getAttribute(a)), s.y = n(t.getAttribute(o)), i === "from" ? r.tl = s : r.br = s, r;
|
|
1749
1756
|
}
|
|
1750
|
-
processOffsetCoord(e,
|
|
1751
|
-
if (!
|
|
1757
|
+
processOffsetCoord(e, t, r, i) {
|
|
1758
|
+
if (!t) return;
|
|
1752
1759
|
let a = {
|
|
1753
1760
|
c: 0,
|
|
1754
1761
|
r: 0,
|
|
1755
1762
|
x: 0,
|
|
1756
1763
|
y: 0
|
|
1757
1764
|
};
|
|
1758
|
-
return e.evaluate("col",
|
|
1765
|
+
return e.evaluate("col", t) && (a.c = parseInt(e.evaluate("col", t).textContent)), e.evaluate("row", t) && (a.r = parseInt(e.evaluate("row", t).textContent)), e.evaluate("colOff", t) && (a.x = n(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (a.y = n(e.evaluate("rowOff", t).textContent)), i === "from" ? r.tl = a : r.br = a, r;
|
|
1759
1766
|
}
|
|
1760
|
-
},
|
|
1767
|
+
}, Ie = class extends V {
|
|
1761
1768
|
visit(e, t, n) {
|
|
1762
1769
|
if (!t) return;
|
|
1763
1770
|
n = super.visit(e, t, n);
|
|
@@ -1783,10 +1790,10 @@ var te = class {
|
|
|
1783
1790
|
if (n === "chart" && a) {
|
|
1784
1791
|
let n = e.evaluate("*/cNvPr", t);
|
|
1785
1792
|
n?.item && (n = n.item(0));
|
|
1786
|
-
let r = n?.getAttribute?.("id"), o = r ? parseInt(r, 10) : void 0,
|
|
1787
|
-
if (
|
|
1793
|
+
let r = n?.getAttribute?.("id"), o = r ? parseInt(r, 10) : void 0, s = e.getRelationships().get(a), l;
|
|
1794
|
+
if (s?.target) {
|
|
1788
1795
|
let t = e.getFileLocation(), n = t.slice(0, t.lastIndexOf("/") + 1);
|
|
1789
|
-
l = s
|
|
1796
|
+
l = c(s.target.startsWith("/") ? s.target : n + s.target);
|
|
1790
1797
|
}
|
|
1791
1798
|
i.json = {
|
|
1792
1799
|
xml: e.serializeElement(t) ?? void 0,
|
|
@@ -1801,7 +1808,7 @@ var te = class {
|
|
|
1801
1808
|
}
|
|
1802
1809
|
return i && (n.content = i), i;
|
|
1803
1810
|
}
|
|
1804
|
-
},
|
|
1811
|
+
}, Le = H, Re = class extends V {
|
|
1805
1812
|
visit(e, t, n) {
|
|
1806
1813
|
if (!t) return;
|
|
1807
1814
|
let r = super.visit(e, t, n), i = e.evaluate("nvPicPr/cNvPicPr", t);
|
|
@@ -1825,7 +1832,7 @@ var te = class {
|
|
|
1825
1832
|
json: { resId: o }
|
|
1826
1833
|
}, r;
|
|
1827
1834
|
}
|
|
1828
|
-
},
|
|
1835
|
+
}, ze = class extends H {
|
|
1829
1836
|
visit(e, t, n) {
|
|
1830
1837
|
if (!t) return;
|
|
1831
1838
|
n = super.visit(e, t, n);
|
|
@@ -1845,7 +1852,7 @@ var te = class {
|
|
|
1845
1852
|
json: i
|
|
1846
1853
|
}, i;
|
|
1847
1854
|
}
|
|
1848
|
-
},
|
|
1855
|
+
}, Be = class extends H {
|
|
1849
1856
|
visit(e, t, n) {
|
|
1850
1857
|
if (!t) return;
|
|
1851
1858
|
n = super.visit(e, t, n);
|
|
@@ -1871,7 +1878,7 @@ var te = class {
|
|
|
1871
1878
|
json: s
|
|
1872
1879
|
}, s;
|
|
1873
1880
|
}
|
|
1874
|
-
},
|
|
1881
|
+
}, Ve = class {
|
|
1875
1882
|
visit(e, t, n) {
|
|
1876
1883
|
let r = [], i = /* @__PURE__ */ new Map(), a = {
|
|
1877
1884
|
cells: [],
|
|
@@ -1978,10 +1985,10 @@ var te = class {
|
|
|
1978
1985
|
}
|
|
1979
1986
|
return n;
|
|
1980
1987
|
}
|
|
1981
|
-
},
|
|
1988
|
+
}, $ = class {
|
|
1982
1989
|
visit(e, t, n) {
|
|
1983
|
-
let r = e.getVisitorParamsState().get(
|
|
1984
|
-
r || (r = [], e.getVisitorParamsState().set(
|
|
1990
|
+
let r = e.getVisitorParamsState().get(U);
|
|
1991
|
+
r || (r = [], e.getVisitorParamsState().set(U, r));
|
|
1985
1992
|
let i = t.childNodes, a = i.length;
|
|
1986
1993
|
for (let t = 0; t < a; t++) {
|
|
1987
1994
|
let n = i.item(t);
|
|
@@ -2005,12 +2012,12 @@ var te = class {
|
|
|
2005
2012
|
}
|
|
2006
2013
|
}
|
|
2007
2014
|
}
|
|
2008
|
-
},
|
|
2015
|
+
}, He = class {
|
|
2009
2016
|
visit(e, t, n) {
|
|
2010
2017
|
let r = e.getVisitorParamsState().get("richTypes");
|
|
2011
2018
|
if (!r) return void e.warn("RichValueFound but not type.");
|
|
2012
|
-
let i = e.getVisitorParamsState().get(
|
|
2013
|
-
i || (i = [], e.getVisitorParamsState().set(
|
|
2019
|
+
let i = e.getVisitorParamsState().get(W);
|
|
2020
|
+
i || (i = [], e.getVisitorParamsState().set(W, i));
|
|
2014
2021
|
let a = t.childNodes, o = a.length;
|
|
2015
2022
|
for (let t = 0; t < o; t++) {
|
|
2016
2023
|
let n = a.item(t);
|
|
@@ -2027,7 +2034,7 @@ var te = class {
|
|
|
2027
2034
|
if (t.type === "_error") {
|
|
2028
2035
|
let e = t.errorType;
|
|
2029
2036
|
if (e) try {
|
|
2030
|
-
t =
|
|
2037
|
+
t = p.getBuiltInByCode(e + 1) ?? p.BuiltIn.Unknown;
|
|
2031
2038
|
} catch {}
|
|
2032
2039
|
}
|
|
2033
2040
|
return t;
|
|
@@ -2046,7 +2053,7 @@ var te = class {
|
|
|
2046
2053
|
}
|
|
2047
2054
|
}
|
|
2048
2055
|
}
|
|
2049
|
-
},
|
|
2056
|
+
}, Ue = class {
|
|
2050
2057
|
visit(e, t, n) {
|
|
2051
2058
|
if (!t) return;
|
|
2052
2059
|
let r = [];
|
|
@@ -2065,7 +2072,7 @@ var te = class {
|
|
|
2065
2072
|
}
|
|
2066
2073
|
}
|
|
2067
2074
|
}
|
|
2068
|
-
},
|
|
2075
|
+
}, We = class {
|
|
2069
2076
|
visit(e, t, n) {
|
|
2070
2077
|
if (!t) return;
|
|
2071
2078
|
let r = {}, i = t.getAttribute("ref");
|
|
@@ -2076,61 +2083,72 @@ var te = class {
|
|
|
2076
2083
|
};
|
|
2077
2084
|
return n.push(a), r;
|
|
2078
2085
|
}
|
|
2079
|
-
},
|
|
2086
|
+
}, Ge = class {
|
|
2080
2087
|
visit(e, t, n) {
|
|
2081
2088
|
if (!t) return;
|
|
2082
2089
|
let r = [];
|
|
2083
2090
|
return n.comments = r, r;
|
|
2084
2091
|
}
|
|
2085
|
-
},
|
|
2092
|
+
}, Ke = class {
|
|
2086
2093
|
visit(e, t, n) {
|
|
2087
2094
|
if (!t) return;
|
|
2088
|
-
let
|
|
2089
|
-
e.copyFromAttribute(t, "id",
|
|
2095
|
+
let r = {};
|
|
2096
|
+
e.copyFromAttribute(t, "id", r, "id", i);
|
|
2090
2097
|
let a = t.getAttribute("ref");
|
|
2091
|
-
e.copyFromAttribute(t, "personId",
|
|
2098
|
+
e.copyFromAttribute(t, "personId", r, "personId", i), e.copyFromAttribute(t, "parentId", r, "parentId", i), e.copyFromAttribute(t, "dT", r), t.hasAttribute("done") && (r.done = l(t.getAttribute("done")));
|
|
2092
2099
|
let o = {
|
|
2093
2100
|
r: a,
|
|
2094
|
-
v:
|
|
2101
|
+
v: r
|
|
2095
2102
|
};
|
|
2096
|
-
return n.push(o),
|
|
2103
|
+
return n.push(o), r;
|
|
2097
2104
|
}
|
|
2098
|
-
},
|
|
2105
|
+
}, qe = class {
|
|
2099
2106
|
visit(e, t, n) {
|
|
2100
|
-
let
|
|
2107
|
+
let r = [], a = t.childNodes, o = a.length;
|
|
2101
2108
|
for (let t = 0; t < o; t++) {
|
|
2102
2109
|
let n = a.item(t);
|
|
2103
2110
|
if (n.nodeType === 1 && n.localName === "person") {
|
|
2104
2111
|
let t = {};
|
|
2105
|
-
e.copyFromAttribute(n, "id", t, "id",
|
|
2112
|
+
e.copyFromAttribute(n, "id", t, "id", i), e.copyFromAttribute(n, "displayName", t), e.copyFromAttribute(n, "userId", t, "userId", i), e.copyFromAttribute(n, "providerId", t), r.push(t);
|
|
2106
2113
|
}
|
|
2107
2114
|
}
|
|
2108
|
-
return
|
|
2115
|
+
return r.length > 0 && (n.persons = r), r;
|
|
2109
2116
|
}
|
|
2110
|
-
},
|
|
2117
|
+
}, Je = class {
|
|
2111
2118
|
constructor(e, t) {
|
|
2112
2119
|
this.path = e, this.visitor = t;
|
|
2113
2120
|
}
|
|
2114
|
-
},
|
|
2121
|
+
}, Ye = class {
|
|
2115
2122
|
constructor() {
|
|
2116
|
-
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new
|
|
2123
|
+
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new G()), this.registerVisitor("cp:coreProperties", new le()), this.registerVisitor("Properties", new ue()), this.registerVisitor("spPr", new pe()), this.registerVisitor("txBody", new Y()), this.registerVisitor("txPr", new Y()), this.registerVisitor("c:chartSpace", new de()), this.registerVisitor("c:plotArea", new fe()), this.registerVisitor("c:barChart", new me()), this.registerVisitor("c:doughnutChart", new K()), this.registerVisitor("c:lineChart", new K()), this.registerVisitor("c:ofPieType", new K()), this.registerVisitor("c:pieChart", new K()), this.registerVisitor("c:scatterChart", new K()), this.registerVisitor("c:barChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new q("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new q("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new he()), this.registerVisitor("c:dPt", new ge()), this.registerVisitor("c:marker", new _e()), this.registerVisitor("c:catAx", new J()), this.registerVisitor("c:valAx", new J()), this.registerVisitor("c:dateAx", new J()), this.registerVisitor("c:majorGridlines", new N("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new N("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:valAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new Y("labels.text"), "txPr"), this.registerVisitor("c:legend", new ye()), this.registerVisitor("c:legend", new Y("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new ve()), this.registerVisitor("c:ser", new be(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new q("labels"), "dLbls"), this.registerVisitor("c:dLbl", new q("points")), this.registerVisitor("c:title", new X()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new xe()), this.registerVisitor("c:dispUnits", new N("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new X("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new Y(), "tx/rich"), this.registerVisitor("a:theme", new Se()), this.registerVisitor("a:theme", new Ce(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new we(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Te(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new De()), this.registerVisitor("sortState", new Oe()), this.registerVisitor("s:workbook", new ke()), this.registerVisitor("styleSheet", new Z()), this.registerVisitor("x14:table", new je()), this.registerVisitor("table", new Ae()), this.registerVisitor("externalLink", new Me()), this.registerVisitor("hlinkClick", new Ee()), this.registerVisitor("wsDr", new Fe()), this.registerVisitor("twoCellAnchor", new Q()), this.registerVisitor("oneCellAnchor", new Q()), this.registerVisitor("absoluteAnchor", new Q()), this.registerVisitor("graphicFrame", new Ie()), this.registerVisitor("sp", new Le()), this.registerVisitor("grpSp", new ze()), this.registerVisitor("cxnSp", new Be()), this.registerVisitor("pic", new Re()), this.registerVisitor("metadata", new Ve()), this.registerVisitor("rvStructures", new $()), this.registerVisitor("rvData", new He()), this.registerVisitor("comments", new Ue()), this.registerVisitor("comment", new We()), this.registerVisitor("comment", new Y("content"), "text"), this.registerVisitor("ThreadedComments", new Ge()), this.registerVisitor("threadedComment", new Ke()), this.registerVisitor("threadedComment", new Y("content"), "text"), this.registerVisitor("personList", new qe()), this.registerVisitor("slicerCacheDefinition", new Ne()), this.registerVisitor("slicers", new Pe());
|
|
2117
2124
|
}
|
|
2118
2125
|
registerVisitor(e, t, n = null) {
|
|
2119
2126
|
e.indexOf(":") === -1 && (e = "*:" + e);
|
|
2120
2127
|
let r = e.split(":"), i = r.length > 1 ? r[1] : r[0];
|
|
2121
2128
|
if (!n) return this.visitorsByXmlTagName.set(i, t), void this.visitorsByXmlTagName.set(e, t);
|
|
2122
2129
|
let a = this.scopedVisitorsByXmlTagName.get(i);
|
|
2123
|
-
a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new
|
|
2130
|
+
a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new Je(n, t));
|
|
2131
|
+
}
|
|
2132
|
+
parseDxf(e, t = "") {
|
|
2133
|
+
this.visitorParamsState ||= /* @__PURE__ */ new Map();
|
|
2134
|
+
let n = this.visitorParamsState, r = n.get("processingDXFs");
|
|
2135
|
+
n.set("processingDXFs", !0);
|
|
2136
|
+
try {
|
|
2137
|
+
let n = new C(null, this, "/dxf", e, {}, t), r = {};
|
|
2138
|
+
return new Z().processDXF(n, e, r), r;
|
|
2139
|
+
} finally {
|
|
2140
|
+
r === void 0 ? n.delete("processingDXFs") : n.set("processingDXFs", r);
|
|
2141
|
+
}
|
|
2124
2142
|
}
|
|
2125
2143
|
getVisitorParamsState() {
|
|
2126
2144
|
return this.visitorParamsState;
|
|
2127
2145
|
}
|
|
2128
|
-
transform(e, t, n =
|
|
2146
|
+
transform(e, t, n = d.EmptyObject) {
|
|
2129
2147
|
let r = e.documentElement;
|
|
2130
2148
|
this.visitorParamsState && !n?.paramMap || (this.visitorParamsState = n?.paramMap ?? /* @__PURE__ */ new Map());
|
|
2131
2149
|
let i = {}, a = this.visitorsByXmlTagName.get(r.nodeName);
|
|
2132
2150
|
if (a ||= this.visitorsByXmlTagName.get(r.localName), !a) throw Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);
|
|
2133
|
-
let o = "/" + r.localName, s = new
|
|
2151
|
+
let o = "/" + r.localName, s = new C(null, this, o, r, i, t, n), c = [];
|
|
2134
2152
|
this._doWalk(a, s, c, r, i, t, n);
|
|
2135
2153
|
let l = c.length;
|
|
2136
2154
|
for (let e = 0; e < l; e++) {
|
|
@@ -2158,7 +2176,7 @@ var te = class {
|
|
|
2158
2176
|
for (; l && l !== r;) s = l.localName + "/" + s, l = l.parentNode;
|
|
2159
2177
|
let u = t.getPath() + "/" + s;
|
|
2160
2178
|
if (c.visitor) {
|
|
2161
|
-
let r = new
|
|
2179
|
+
let r = new C(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
|
|
2162
2180
|
this._doWalk(c.visitor, r, n, e, i, a, o);
|
|
2163
2181
|
}
|
|
2164
2182
|
};
|
|
@@ -2184,10 +2202,10 @@ var te = class {
|
|
|
2184
2202
|
if (r.nodeType !== 1) continue;
|
|
2185
2203
|
let c = r, p = c.nodeName, m = l.get(p);
|
|
2186
2204
|
m ||= (p = c.localName, l.get(p));
|
|
2187
|
-
let h = t.getPath() + "/" + p, g = new
|
|
2205
|
+
let h = t.getPath() + "/" + p, g = new C(t, this, h, u, d, a, o);
|
|
2188
2206
|
this._doWalk(m, g, n, c, s ?? i, a, o);
|
|
2189
2207
|
}
|
|
2190
2208
|
return s;
|
|
2191
2209
|
}
|
|
2192
2210
|
};
|
|
2193
|
-
export {
|
|
2211
|
+
export { Ye as DOMTransformer, C as ExecutionContext, u as NumberUtils, w as VisitorUtils };
|