@sheetxl/io-xlsx 0.8.0-beta.4 → 0.8.0-beta.6
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/{DtBN3UOzNJjYBwJ6.cjs → 17tMBnuyu4YIxixh.cjs} +1 -1
- package/browser/cjs/BxU-OlZIQViQl7gX.cjs +1 -0
- package/browser/cjs/DHKWtqZ0vQfXrbq1.cjs +2 -0
- package/browser/cjs/DpZr07y7ifaZGvJ9.cjs +5 -0
- package/browser/cjs/{DULsYP_GcPGLVYSE.cjs → MqKQ_B5qRARrRbO4.cjs} +16 -3
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/{D50I1kjDGjKtdscP.cjs → qb-YQ8mGwpogSP08.cjs} +1 -1
- package/browser/esm/{DcyhtW-b0Qc61fSF.mjs → 96C1ntelYWh7kQtW.mjs} +1 -1
- package/browser/esm/{CScanThyP_Zsuop7.mjs → B0E-_6m23g4BDnX6.mjs} +2 -2
- package/browser/esm/{DAH4QJQjfQWROftE.mjs → B3cYXnqV2Zjaw6Jp.mjs} +4 -4
- package/browser/esm/{P7pcaTdFuHdaP8Kr.mjs → BLEHoDT0SLbo8OO2.mjs} +1236 -1150
- package/browser/esm/{DvdG4L2_fIWYsiBZ.mjs → BYENv_UE3Hv5ghGD.mjs} +599 -597
- package/browser/esm/{Bt6u8hf00JM6h1Bc.mjs → CGgjL7wM5WHZA6Dt.mjs} +2 -2
- package/browser/esm/{Da9idUIQdRehyj4z.mjs → D01fs7vrCLlmdHoW.mjs} +899 -795
- package/browser/esm/{BEt-Vea7AfSKkqyd.mjs → DdTgGiFy8nAZTQ0d.mjs} +2 -2
- package/browser/esm/{DnPeZEWNe3KK1iBE.mjs → FwrsLfi1iEAQGIjj.mjs} +246 -154
- package/browser/esm/{Cu9aJ-sbk2TGdPvz.mjs → gicSNvWtBLkvLsIw.mjs} +3 -3
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{Cts9z7LQzph22lHy.mjs → k-aEFzUZ8aU9FPf4.mjs} +1 -1
- package/node/esm/{Bavd2-tTgTN4_ZH1.mjs → B-g20MoPHbZFapp8.mjs} +1652 -1545
- package/node/esm/{tB6NSRNVVsqPxD_r.mjs → Bu9QkKpBW4G2ULAg.mjs} +177 -83
- package/node/esm/{BAJ6Fs6QF59doAxx.mjs → CHl-WFsto0oTmBtB.mjs} +380 -288
- package/node/esm/{B1b4DNt8_H2KX57m.mjs → Co5_sjvEk9d-x9gx.mjs} +576 -574
- package/node/esm/{BBIL2I6FEUYTjeLE.mjs → D-l0hqYTXUIEFoTg.mjs} +2 -2
- package/node/esm/{BkLZKUzDOysb70y8.mjs → DWF_5NYPdrlTVvHi.mjs} +1 -1
- package/node/esm/{TxGIt5Le6PspY1cY.mjs → ZWSOYqmTKEmEOz2u.mjs} +2 -2
- package/node/esm/{BwAH8Xl-b1anYXZ1.mjs → am47EU_k1uSVm7yW.mjs} +2 -2
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +7 -2
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +4 -0
- package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -0
- package/types/src/utils/VmlNoteShapes.d.ts +82 -22
- package/types/src/writer/emitters/CommentsEmitter.d.ts +9 -3
- package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +7 -1
- package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +0 -2
- package/browser/cjs/Dlmxsx4kOACcqvc3.cjs +0 -5
- package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.6
|
|
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 { b as t,
|
|
9
|
-
import { a as i, c as a, i as o, m as s, o as c, p as l, r as u, s as d, t as f } from "./
|
|
7
|
+
import { n as e } from "./96C1ntelYWh7kQtW.mjs";
|
|
8
|
+
import { b as t, h as n, y as r } from "./BLEHoDT0SLbo8OO2.mjs";
|
|
9
|
+
import { a as i, c as a, i as o, m as s, o as c, p as l, r as u, s as d, t as f } from "./gicSNvWtBLkvLsIw.mjs";
|
|
10
10
|
import { CommonUtils as p } from "@sheetxl/utils";
|
|
11
|
-
import { AddressUtils as m, FormulaError as h, IBorders as g, ICondition as _, IEffect as v, IFill as y, IFont as b, IRange as
|
|
12
|
-
var
|
|
11
|
+
import { AddressUtils as m, FormulaError as h, IBorders as g, ICondition as _, IEffect as v, IFill as y, IFont as b, IRange as ee, IStyle as x, ITextFrame as S, Sort as C, Tuple as te } from "@sheetxl/sdk";
|
|
12
|
+
var ne = class {
|
|
13
13
|
constructor(e) {
|
|
14
14
|
this.list = e;
|
|
15
15
|
}
|
|
@@ -35,13 +35,13 @@ var te = class {
|
|
|
35
35
|
[Symbol.iterator]() {
|
|
36
36
|
return this.list.values();
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, re = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, ie = (e) => {
|
|
39
39
|
let t = parseInt(e);
|
|
40
40
|
return isNaN(t) ? null : t;
|
|
41
|
-
},
|
|
41
|
+
}, ae = (e) => {
|
|
42
42
|
let t = parseFloat(e);
|
|
43
43
|
return isNaN(t) ? null : t;
|
|
44
|
-
},
|
|
44
|
+
}, oe = /* @__PURE__ */ new Map(), w = class {
|
|
45
45
|
constructor(e, t, n, r, i, a = null, o = p.EmptyObject) {
|
|
46
46
|
this._fileLocation = "";
|
|
47
47
|
let s = (e, t, n) => o?.getRef?.(e, t, n, o?.parsedRefs), c = (e) => o?.getRefs?.(e, o?.parsedRefs);
|
|
@@ -54,7 +54,7 @@ var te = class {
|
|
|
54
54
|
return this._readEmbeddedPart?.(e, this._fileLocation) ?? null;
|
|
55
55
|
}
|
|
56
56
|
getRelationships() {
|
|
57
|
-
return this._getRefs?.(this._fileLocation) ??
|
|
57
|
+
return this._getRefs?.(this._fileLocation) ?? oe;
|
|
58
58
|
}
|
|
59
59
|
getPath() {
|
|
60
60
|
return this.currentPath;
|
|
@@ -112,7 +112,7 @@ var te = class {
|
|
|
112
112
|
}
|
|
113
113
|
if (n = a, n.length === 0) return null;
|
|
114
114
|
}
|
|
115
|
-
return n.length === 1 ? n[0] : n.length === 0 ? null : new
|
|
115
|
+
return n.length === 1 ? n[0] : n.length === 0 ? null : new ne(n);
|
|
116
116
|
}
|
|
117
117
|
_matchesElementName(e, t) {
|
|
118
118
|
return t.includes(":") ? (e.tagName || e.nodeName) === t : e.localName === t;
|
|
@@ -152,13 +152,13 @@ var te = class {
|
|
|
152
152
|
return n && n.hasAttribute("val") ? parseFloat(n.getAttribute("val")) ?? null : null;
|
|
153
153
|
}
|
|
154
154
|
get BOOLEAN_COPY() {
|
|
155
|
-
return
|
|
155
|
+
return re;
|
|
156
156
|
}
|
|
157
157
|
get INT_COPY() {
|
|
158
|
-
return
|
|
158
|
+
return ie;
|
|
159
159
|
}
|
|
160
160
|
get FLOAT_COPY() {
|
|
161
|
-
return
|
|
161
|
+
return ae;
|
|
162
162
|
}
|
|
163
163
|
copyFromAttribute(e, t, n, r = t, i = null) {
|
|
164
164
|
if (!e || !n || !e.hasAttribute(t)) return;
|
|
@@ -171,32 +171,32 @@ var te = class {
|
|
|
171
171
|
}
|
|
172
172
|
this.setToPath(n, r, a);
|
|
173
173
|
}
|
|
174
|
-
},
|
|
175
|
-
isBlank: () =>
|
|
176
|
-
isNotBlank: () =>
|
|
177
|
-
length: () =>
|
|
178
|
-
parseRotation: () =>
|
|
179
|
-
parseValAttrAsBoolean: () =>
|
|
180
|
-
parseValAttrAsFloat: () =>
|
|
181
|
-
parseValAttrAsInteger: () =>
|
|
182
|
-
parseValAttrAsString: () =>
|
|
183
|
-
}),
|
|
174
|
+
}, se = e({
|
|
175
|
+
isBlank: () => A,
|
|
176
|
+
isNotBlank: () => ce,
|
|
177
|
+
length: () => le,
|
|
178
|
+
parseRotation: () => T,
|
|
179
|
+
parseValAttrAsBoolean: () => D,
|
|
180
|
+
parseValAttrAsFloat: () => k,
|
|
181
|
+
parseValAttrAsInteger: () => O,
|
|
182
|
+
parseValAttrAsString: () => E
|
|
183
|
+
}), T = (e, t) => {
|
|
184
184
|
if (!e || !e.hasAttribute("rot")) return;
|
|
185
185
|
let n = e.getAttribute("rot"), r = p.roundAccurately(o(n), 2);
|
|
186
186
|
r !== -1e3 && (t.rotation = r);
|
|
187
|
-
},
|
|
187
|
+
}, E = (e, t, n, r, i) => {
|
|
188
188
|
let a = e.getValAttrAsString(r, t);
|
|
189
189
|
a !== null && (n[i] = a);
|
|
190
|
-
},
|
|
190
|
+
}, D = (e, t, n, r, i = r, a = null) => {
|
|
191
191
|
let o = e.getValAttrAsBoolean(r, t, a);
|
|
192
192
|
o !== null && (n[i] = o);
|
|
193
|
-
},
|
|
193
|
+
}, O = (e, t, n, r, i) => {
|
|
194
194
|
let a = e.getValAttrAsInteger(r, t);
|
|
195
195
|
a !== null && (n[i] = a);
|
|
196
|
-
},
|
|
196
|
+
}, k = (e, t, n, r, i, a = 1) => {
|
|
197
197
|
let o = e.getValAttrAsFloat(r, t);
|
|
198
198
|
o !== null && (n[i] = o * a);
|
|
199
|
-
},
|
|
199
|
+
}, A = (e) => !e || e.trim().length === 0, ce = (e) => !A(e), le = (e) => e?.length ?? 0, j = class {
|
|
200
200
|
constructor(e) {
|
|
201
201
|
this.jsonKey = e;
|
|
202
202
|
}
|
|
@@ -204,7 +204,7 @@ var te = class {
|
|
|
204
204
|
let r = {};
|
|
205
205
|
return n[this.jsonKey] = r, r;
|
|
206
206
|
}
|
|
207
|
-
},
|
|
207
|
+
}, M = class {
|
|
208
208
|
visit(e, t, n) {}
|
|
209
209
|
getStroke(e, t) {
|
|
210
210
|
let n = e.evaluate("ln", t);
|
|
@@ -212,7 +212,7 @@ var te = class {
|
|
|
212
212
|
}
|
|
213
213
|
parseLn(e, t) {
|
|
214
214
|
let n = {};
|
|
215
|
-
t.hasAttribute("algn") && (n.align = t.getAttribute("algn")), t.hasAttribute("cap") && (n.lineCap =
|
|
215
|
+
t.hasAttribute("algn") && (n.align = t.getAttribute("algn")), t.hasAttribute("cap") && (n.lineCap = P(t.getAttribute("cap"))), t.hasAttribute("cmpd") && (n.compound = t.getAttribute("cmpd")), t.hasAttribute("w") && (n.width = a(t.getAttribute("w")));
|
|
216
216
|
let r = e.evaluate("miter", t);
|
|
217
217
|
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");
|
|
218
218
|
let i = e.evaluate("custDash", t);
|
|
@@ -320,7 +320,7 @@ var te = class {
|
|
|
320
320
|
t.hasAttribute("flip") && (a.mirror = t.getAttribute("flip")), Object.keys(a).length > 0 && (n.tile = a);
|
|
321
321
|
let s = e.evaluate("path", t);
|
|
322
322
|
if (s) {
|
|
323
|
-
s.hasAttribute("path") && (n.gradientType =
|
|
323
|
+
s.hasAttribute("path") && (n.gradientType = N(s.getAttribute("path")));
|
|
324
324
|
let t = e.evaluate("fillToRect", s);
|
|
325
325
|
t && (n.focus = this.getRect(t));
|
|
326
326
|
}
|
|
@@ -409,17 +409,17 @@ var te = class {
|
|
|
409
409
|
let i = t.getAttribute("val");
|
|
410
410
|
return i ? ` ${n} ${!i || parseFloat(i) / r}` : ` ${n}`;
|
|
411
411
|
}
|
|
412
|
-
},
|
|
412
|
+
}, N = (e) => e === "circle" ? "radial" : e, P = (e) => {
|
|
413
413
|
if (e === "rnd") return "round";
|
|
414
414
|
if (e === "flat") return "butt";
|
|
415
415
|
if (e === "sq") return "square";
|
|
416
416
|
throw Error("Invalid lineCap type: " + e);
|
|
417
|
-
},
|
|
417
|
+
}, F = class extends M {
|
|
418
418
|
visit(e, t, n) {
|
|
419
419
|
try {
|
|
420
420
|
let r = e.evaluate("xfrm", t);
|
|
421
421
|
if (r) {
|
|
422
|
-
|
|
422
|
+
T(r, n);
|
|
423
423
|
let t = {
|
|
424
424
|
x: 0,
|
|
425
425
|
y: 0,
|
|
@@ -440,10 +440,10 @@ var te = class {
|
|
|
440
440
|
e.warn(`Unable to read shape properties: ${t?.message ?? t}`, { onceKey: "xlsx.shape.unreadable" });
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
},
|
|
443
|
+
}, I = class {
|
|
444
444
|
visit(e, t, n) {
|
|
445
445
|
let r = {};
|
|
446
|
-
if (
|
|
446
|
+
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) {
|
|
447
447
|
let t = e.getVisitorParamsState().get("types");
|
|
448
448
|
t || (e.warn("A chart type was read outside a chart; its types were started fresh.", { onceKey: "xlsx.chart.typesState" }), t = [], e.getVisitorParamsState().set("types", t)), t.push(r);
|
|
449
449
|
}
|
|
@@ -472,7 +472,7 @@ var te = class {
|
|
|
472
472
|
let r = e.evaluate("axId", t);
|
|
473
473
|
r && r.length !== 0 && (n.xAxisId = r.item(0).getAttribute("val"), n.yAxisId = r.item(1).getAttribute("val"));
|
|
474
474
|
}
|
|
475
|
-
},
|
|
475
|
+
}, L = (e, t, n) => {
|
|
476
476
|
if (!0 === e.getValAttrAsBoolean("invertIfNegative", t)) if (e.evaluate("extLst/ext/invertSolidFillFmt", t)) {
|
|
477
477
|
if (n.fill && n.fillNegative) {
|
|
478
478
|
let t = e.getFromPath(n, "fill.solid.adjs");
|
|
@@ -486,7 +486,7 @@ var te = class {
|
|
|
486
486
|
let a = {};
|
|
487
487
|
a.fill = i, n.strokeNegative = a;
|
|
488
488
|
}
|
|
489
|
-
},
|
|
489
|
+
}, R = class extends M {
|
|
490
490
|
constructor(e = "text") {
|
|
491
491
|
super(), this._jsonKey = e;
|
|
492
492
|
}
|
|
@@ -499,7 +499,7 @@ var te = class {
|
|
|
499
499
|
}
|
|
500
500
|
parseTextElement(e, t, n, r) {
|
|
501
501
|
let i = e.evaluate("p/pPr/defRPr", t) ?? e.evaluate("defRPr", t), a = i?.length === void 0 ? i : i.item(0);
|
|
502
|
-
a && (this.parseTextProperties(e, a, n), new
|
|
502
|
+
a && (this.parseTextProperties(e, a, n), new F().visit(e, a, n));
|
|
503
503
|
let o = n.runs ?? [], s = e.evaluate("p/r", t) ?? e.evaluate("r", t), c = (t) => {
|
|
504
504
|
let n = {}, r = e.evaluate("t", t), i = e.evaluate("rPr", t);
|
|
505
505
|
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 && o.push(n);
|
|
@@ -508,7 +508,7 @@ var te = class {
|
|
|
508
508
|
else c(s || t);
|
|
509
509
|
o.length > 0 && (n.runs = o);
|
|
510
510
|
let l = e.evaluate("bodyPr", t);
|
|
511
|
-
l &&
|
|
511
|
+
l && T(l, n);
|
|
512
512
|
}
|
|
513
513
|
parseTextProperties(e, t, n) {
|
|
514
514
|
if (!t) return;
|
|
@@ -525,7 +525,7 @@ var te = class {
|
|
|
525
525
|
i.hasAttribute("pitchFamily") && (e.pitch = i.getAttribute("pitchFamily")), i.hasAttribute("charset") && (e.charset = i.getAttribute("charset")), Object.keys(e).length > 0 && (n.font = e);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
},
|
|
528
|
+
}, z = class {
|
|
529
529
|
visit(e, t, n) {}
|
|
530
530
|
processDataBarColor(e, t, n, r, i = "auto") {
|
|
531
531
|
if (!t) return;
|
|
@@ -547,9 +547,9 @@ var te = class {
|
|
|
547
547
|
processFont(e, t, n) {
|
|
548
548
|
e.getValAttrAsBoolean("b", t, !0) && (n.weight = 700), e.getValAttrAsBoolean("i", t, !0) && (n.style = b.Style.Italic), e.getValAttrAsBoolean("strike", t, !0) && (n.strike = !0);
|
|
549
549
|
let r = e.evaluate("u", t);
|
|
550
|
-
r && (n.underline = r.getAttribute("val") || b.UnderlineStyle.Single),
|
|
550
|
+
r && (n.underline = r.getAttribute("val") || b.UnderlineStyle.Single), E(e, t, n, "vertAlign", "verticalAlign"), n.verticalAlign === "superscript" ? n.verticalAlign = b.VerticalAlignment.Super : n.verticalAlign === "subscript" && (n.verticalAlign = b.VerticalAlignment.Sub), k(e, t, n, "sz", "size");
|
|
551
551
|
let i = e.evaluate("color", t);
|
|
552
|
-
this.processDataBarColor(e, i, n, "color"), n.color ||= "auto",
|
|
552
|
+
this.processDataBarColor(e, i, n, "color"), n.color ||= "auto", E(e, t, n, "name", "family"), E(e, t, n, "rFont", "family");
|
|
553
553
|
let a = e.evaluate("family", t);
|
|
554
554
|
if (a) {
|
|
555
555
|
let e = a.getAttribute("val");
|
|
@@ -569,7 +569,7 @@ var te = class {
|
|
|
569
569
|
case "5": n.fallbacks = ["fantasy"];
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
return
|
|
572
|
+
return E(e, t, n, "scheme", "scheme"), n.family !== void 0 && n.scheme === void 0 && (n.scheme = b.Scheme.None), 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;
|
|
573
573
|
}
|
|
574
574
|
processFills(e, t, n) {
|
|
575
575
|
if (!t) return;
|
|
@@ -597,10 +597,10 @@ var te = class {
|
|
|
597
597
|
i && (n.gradientType = i);
|
|
598
598
|
let a = t.hasAttribute("degree") ? parseFloat(t.getAttribute("degree")) : 0;
|
|
599
599
|
(a + 90) % 360 != 0 && (n.angle = (a + 90) % 360), (t.hasAttribute("left") || t.hasAttribute("top") || t.hasAttribute("right") || t.hasAttribute("bottom")) && (n.focus = {
|
|
600
|
-
left:
|
|
601
|
-
top:
|
|
602
|
-
right:
|
|
603
|
-
bottom:
|
|
600
|
+
left: B(t.getAttribute("left")),
|
|
601
|
+
top: B(t.getAttribute("top")),
|
|
602
|
+
right: B(t.getAttribute("right")),
|
|
603
|
+
bottom: B(t.getAttribute("bottom"))
|
|
604
604
|
});
|
|
605
605
|
let o = t.childNodes, s = o.length;
|
|
606
606
|
for (let t = 0; t < s; t++) {
|
|
@@ -652,21 +652,25 @@ var te = class {
|
|
|
652
652
|
let o = e.evaluate("color", i);
|
|
653
653
|
return o && this.processDataBarColor(e, o, a, "color"), Object.keys(a).length > 0 ? n[r] = a : null;
|
|
654
654
|
}
|
|
655
|
-
},
|
|
655
|
+
}, B = (e) => {
|
|
656
656
|
if (!e) return 0;
|
|
657
657
|
let t = parseFloat(e);
|
|
658
658
|
return isNaN(t) ? 0 : t;
|
|
659
|
-
},
|
|
659
|
+
}, ue = {
|
|
660
660
|
auto: "auto",
|
|
661
661
|
autoNoTable: "automaticExceptTables",
|
|
662
662
|
manual: "manual"
|
|
663
|
-
},
|
|
663
|
+
}, V = class {
|
|
664
664
|
visit(e, t, n) {
|
|
665
665
|
if (!t) return;
|
|
666
666
|
let r = e.evaluate("*/cNvPr", t);
|
|
667
667
|
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;
|
|
668
668
|
}
|
|
669
|
-
|
|
669
|
+
setContent(e, t) {
|
|
670
|
+
let n = e;
|
|
671
|
+
n.name !== void 0 && (t.name = n.name, delete n.name), n.description !== void 0 && (t.description = n.description, delete n.description), e.content = t;
|
|
672
|
+
}
|
|
673
|
+
}, H = class extends V {
|
|
670
674
|
visit(e, t, n) {
|
|
671
675
|
if (!t) return;
|
|
672
676
|
if (e.getPath().includes("Fallback") && n.content) {
|
|
@@ -690,23 +694,52 @@ var te = class {
|
|
|
690
694
|
xml: e.serializeElement(t) ?? void 0,
|
|
691
695
|
sourceId: o === void 0 || isNaN(o) ? void 0 : o
|
|
692
696
|
};
|
|
693
|
-
return n
|
|
697
|
+
return this.setContent(n, {
|
|
694
698
|
type: "sp",
|
|
695
699
|
json: s
|
|
696
|
-
}, s;
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
|
|
700
|
-
|
|
700
|
+
}), s;
|
|
701
|
+
}
|
|
702
|
+
}, U = "richTypes", W = "richData", G = (e) => {
|
|
703
|
+
let t = e.getAttribute("val");
|
|
704
|
+
return t !== "0" && t !== "false";
|
|
705
|
+
}, de = {
|
|
706
|
+
1: "serif",
|
|
707
|
+
2: "sans-serif",
|
|
708
|
+
3: "monospace",
|
|
709
|
+
4: "cursive",
|
|
710
|
+
5: "fantasy"
|
|
711
|
+
};
|
|
712
|
+
function fe(e) {
|
|
713
|
+
let t = {}, n = e.childNodes;
|
|
701
714
|
for (let e = 0; e < n.length; e++) {
|
|
702
715
|
let r = n.item(e);
|
|
703
716
|
if (r.nodeType === 1) switch (r.localName) {
|
|
704
717
|
case "b":
|
|
705
|
-
t.
|
|
718
|
+
t.weight = G(r) ? 700 : 400;
|
|
706
719
|
break;
|
|
707
720
|
case "i":
|
|
708
|
-
t.
|
|
721
|
+
t.style = G(r) ? b.Style.Italic : b.Style.Normal;
|
|
722
|
+
break;
|
|
723
|
+
case "strike":
|
|
724
|
+
t.strike = G(r);
|
|
709
725
|
break;
|
|
726
|
+
case "outline":
|
|
727
|
+
t.outline = G(r);
|
|
728
|
+
break;
|
|
729
|
+
case "shadow":
|
|
730
|
+
t.shadow = G(r);
|
|
731
|
+
break;
|
|
732
|
+
case "extend":
|
|
733
|
+
t.extend = G(r);
|
|
734
|
+
break;
|
|
735
|
+
case "u":
|
|
736
|
+
t.underline = r.getAttribute("val") || b.UnderlineStyle.Single;
|
|
737
|
+
break;
|
|
738
|
+
case "vertAlign": {
|
|
739
|
+
let e = r.getAttribute("val");
|
|
740
|
+
e === "superscript" ? t.verticalAlign = b.VerticalAlignment.Super : e === "subscript" ? t.verticalAlign = b.VerticalAlignment.Sub : e === "baseline" && (t.verticalAlign = b.VerticalAlignment.Baseline);
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
710
743
|
case "sz": {
|
|
711
744
|
let e = parseFloat(r.getAttribute("val") ?? "");
|
|
712
745
|
isNaN(e) || (t.size = e);
|
|
@@ -714,18 +747,39 @@ function ue(e, t) {
|
|
|
714
747
|
}
|
|
715
748
|
case "rFont": {
|
|
716
749
|
let e = r.getAttribute("val");
|
|
717
|
-
e && (t.
|
|
750
|
+
e && (t.family = e);
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
case "family": {
|
|
754
|
+
let e = de[r.getAttribute("val") ?? ""];
|
|
755
|
+
e && (t.fallbacks = [e]);
|
|
756
|
+
break;
|
|
757
|
+
}
|
|
758
|
+
case "charset": {
|
|
759
|
+
let e = parseInt(r.getAttribute("val") ?? "", 10);
|
|
760
|
+
isNaN(e) || (t.charset = e);
|
|
761
|
+
break;
|
|
762
|
+
}
|
|
763
|
+
case "scheme": {
|
|
764
|
+
let e = r.getAttribute("val");
|
|
765
|
+
e && (t.scheme = e);
|
|
718
766
|
break;
|
|
719
767
|
}
|
|
720
768
|
case "color": {
|
|
721
769
|
let e = r.getAttribute("rgb");
|
|
722
|
-
e && (
|
|
770
|
+
if (e && !r.hasAttribute("theme")) {
|
|
771
|
+
t.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
let n = l((e) => r.getAttribute(e));
|
|
775
|
+
n && (t.color = n);
|
|
723
776
|
break;
|
|
724
777
|
}
|
|
725
778
|
}
|
|
726
779
|
}
|
|
780
|
+
return Object.keys(t).length > 0 ? t : null;
|
|
727
781
|
}
|
|
728
|
-
var
|
|
782
|
+
var pe = class {
|
|
729
783
|
visit(e, t, n) {
|
|
730
784
|
if (!t) return;
|
|
731
785
|
let r = t.childNodes, i = r.length;
|
|
@@ -739,7 +793,7 @@ var de = class {
|
|
|
739
793
|
let r = {};
|
|
740
794
|
e.copyFromAttribute(t, "Target", r, "target"), e.copyFromAttribute(t, "Type", r, "type"), e.copyFromAttribute(t, "TargetMode", r, "targetMode"), n[t.getAttribute("Id")] = r;
|
|
741
795
|
}
|
|
742
|
-
},
|
|
796
|
+
}, me = class {
|
|
743
797
|
visit(e, t, n) {
|
|
744
798
|
let r = [], i = t.childNodes, a = i.length;
|
|
745
799
|
for (let t = 0; t < a; t++) {
|
|
@@ -756,7 +810,7 @@ var de = class {
|
|
|
756
810
|
value: t.textContent || ""
|
|
757
811
|
};
|
|
758
812
|
}
|
|
759
|
-
},
|
|
813
|
+
}, he = class {
|
|
760
814
|
visit(e, t, n) {
|
|
761
815
|
let r = [], i = t.childNodes, a = i.length;
|
|
762
816
|
for (let t = 0; t < a; t++) {
|
|
@@ -773,9 +827,9 @@ var de = class {
|
|
|
773
827
|
value: t.textContent || ""
|
|
774
828
|
};
|
|
775
829
|
}
|
|
776
|
-
},
|
|
830
|
+
}, ge = class {
|
|
777
831
|
visit(e, t, n) {
|
|
778
|
-
return
|
|
832
|
+
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;
|
|
779
833
|
}
|
|
780
834
|
afterVisit(e, t, n) {
|
|
781
835
|
let r = {};
|
|
@@ -802,17 +856,17 @@ var de = class {
|
|
|
802
856
|
for (let e = 0; e < p; e++) f[e + ""] = d[e];
|
|
803
857
|
f.length = p, e.getVisitorParamsState().delete("types"), e.getVisitorParamsState().delete("axes"), e.getVisitorParamsState().delete("series");
|
|
804
858
|
}
|
|
805
|
-
},
|
|
859
|
+
}, _e = class {
|
|
806
860
|
visit(e, t, n) {
|
|
807
861
|
let r = {};
|
|
808
862
|
return n.plotArea = r, r;
|
|
809
863
|
}
|
|
810
|
-
},
|
|
864
|
+
}, ve = F, ye = class extends I {
|
|
811
865
|
parseType(e, t, n) {
|
|
812
866
|
let r = e.getValAttrAsString("barDir", t);
|
|
813
867
|
r && (n.type = r === "col" ? "column" : "bar");
|
|
814
868
|
}
|
|
815
|
-
}, K =
|
|
869
|
+
}, K = I, q = class {
|
|
816
870
|
constructor(e) {
|
|
817
871
|
this.jsonKey = e;
|
|
818
872
|
}
|
|
@@ -820,18 +874,18 @@ var de = class {
|
|
|
820
874
|
let r = {}, i = r, a = e.getValAttrAsString("idx", t);
|
|
821
875
|
a !== null && (i = {}, i[a] = r);
|
|
822
876
|
let o = e.getValAttrAsBoolean("delete", t);
|
|
823
|
-
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) : (
|
|
877
|
+
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"));
|
|
824
878
|
let s = e.evaluate("separator", t);
|
|
825
|
-
return s !== null && (r.separator = s.textContent),
|
|
879
|
+
return s !== null && (r.separator = s.textContent), E(e, t, r, "dLblPos", "position"), n[this.jsonKey] = i, r;
|
|
826
880
|
}
|
|
827
881
|
parseNumFormat(e, t, n) {
|
|
828
882
|
let r = e.evaluate("numFmt", t);
|
|
829
883
|
r && (n.formatCode = r.getAttribute("formatCode"), r.hasAttribute("sourceLinked") && (n.sourceLinked = r.getAttribute("sourceLinked") === "1"));
|
|
830
884
|
}
|
|
831
|
-
},
|
|
885
|
+
}, be = class {
|
|
832
886
|
visit(e, t, n) {
|
|
833
887
|
let r = {};
|
|
834
|
-
|
|
888
|
+
O(e, t, r, "explosion", "explosion");
|
|
835
889
|
let i = e.evaluate("cat/*/f", t);
|
|
836
890
|
i ||= e.evaluate("xVal/*/f", t);
|
|
837
891
|
let a = null;
|
|
@@ -839,7 +893,7 @@ var de = class {
|
|
|
839
893
|
let o = e.evaluate("val/*/f", t);
|
|
840
894
|
o ||= e.evaluate("yVal/*/f", t);
|
|
841
895
|
let s = null;
|
|
842
|
-
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),
|
|
896
|
+
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;
|
|
843
897
|
let c = e.getVisitorParamsState().get("series");
|
|
844
898
|
return c || (c = [], e.getVisitorParamsState().set("series", c)), c.push(r), r;
|
|
845
899
|
}
|
|
@@ -863,7 +917,7 @@ var de = class {
|
|
|
863
917
|
return n += "}", n;
|
|
864
918
|
}
|
|
865
919
|
afterVisit(e, t, n) {
|
|
866
|
-
|
|
920
|
+
L(e, t, n);
|
|
867
921
|
let r = e.getFromPath(n, "points");
|
|
868
922
|
if (r) {
|
|
869
923
|
let t = Object.keys(r);
|
|
@@ -875,15 +929,15 @@ var de = class {
|
|
|
875
929
|
}
|
|
876
930
|
}
|
|
877
931
|
}
|
|
878
|
-
},
|
|
932
|
+
}, xe = class {
|
|
879
933
|
DataPointVisitor() {}
|
|
880
934
|
visit(e, t, n) {
|
|
881
935
|
let r = e.getFromPath(n, "points"), i = null;
|
|
882
936
|
r ? i = r : (i = {}, e.setToPath(n, "points", i));
|
|
883
937
|
let a = {}, o = e.getValAttrAsString("idx", t);
|
|
884
|
-
return o !== null && (i[o] = a),
|
|
938
|
+
return o !== null && (i[o] = a), D(e, t, a, "bubble3D", "bubble3D"), O(e, t, a, "explosion", "explosion"), L(e, t, a), a;
|
|
885
939
|
}
|
|
886
|
-
},
|
|
940
|
+
}, Se = class {
|
|
887
941
|
visit(e, t, n) {
|
|
888
942
|
let r = t.parentNode.localName;
|
|
889
943
|
if (r === "ser" || r === "dPt") {
|
|
@@ -897,9 +951,9 @@ var de = class {
|
|
|
897
951
|
}, J = class {
|
|
898
952
|
visit(e, t, n) {
|
|
899
953
|
let r = {};
|
|
900
|
-
this.parseScaling(e, t, r),
|
|
954
|
+
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");
|
|
901
955
|
let i = e.getValAttrAsInteger("noMultiLvlLbl", t);
|
|
902
|
-
r.labelMultiLevel = i !== null && i === 0,
|
|
956
|
+
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") || (e.warn("An axis was read outside a chart; its axes were started fresh.", { onceKey: "xlsx.chart.axesState" }), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
|
|
903
957
|
let a = e.getValAttrAsString("axId", t);
|
|
904
958
|
return e.getVisitorParamsState().get("axes").set(a, r), r;
|
|
905
959
|
}
|
|
@@ -927,7 +981,7 @@ var de = class {
|
|
|
927
981
|
let r = e.getValAttrAsString("scaling/orientation", t);
|
|
928
982
|
r !== null && (n.inverted = r !== "minMax");
|
|
929
983
|
let i = e.getValAttrAsFloat("scaling/logBase", t);
|
|
930
|
-
i !== null && (n.logBase = i, n.scaleType = "log"),
|
|
984
|
+
i !== null && (n.logBase = i, n.scaleType = "log"), k(e, t, n, "scaling/max", "max"), k(e, t, n, "scaling/min", "min");
|
|
931
985
|
}
|
|
932
986
|
afterVisit(e, t, n) {
|
|
933
987
|
n.fill && n.labels && (n.labels.fill = n.fill, delete n.fill);
|
|
@@ -942,7 +996,7 @@ var de = class {
|
|
|
942
996
|
let s = e.evaluate("majorGridlines", t);
|
|
943
997
|
e.setToPath(n, "gridLinesMajor.shown", s !== null);
|
|
944
998
|
}
|
|
945
|
-
}, Y =
|
|
999
|
+
}, Y = R, Ce = class {
|
|
946
1000
|
visit(e, t, n) {
|
|
947
1001
|
let r = e.getVisitorParamsState().get("series"), i = e.getValAttrAsInteger("idx", t), a = i === null ? void 0 : r[i];
|
|
948
1002
|
if (a) {
|
|
@@ -953,19 +1007,19 @@ var de = class {
|
|
|
953
1007
|
}
|
|
954
1008
|
return n;
|
|
955
1009
|
}
|
|
956
|
-
},
|
|
1010
|
+
}, we = class {
|
|
957
1011
|
visit(e, t, n) {
|
|
958
1012
|
let r = {};
|
|
959
|
-
return
|
|
1013
|
+
return D(e, t, r, "overlay", "overlay"), E(e, t, r, "legendPos", "position"), n.legend = r, r;
|
|
960
1014
|
}
|
|
961
|
-
},
|
|
1015
|
+
}, Te = class extends F {
|
|
962
1016
|
visit(e, t, n) {
|
|
963
1017
|
let r = this.getFill(e, t);
|
|
964
1018
|
Object.keys(r).length > 0 && (n.fillNegative = r);
|
|
965
1019
|
let i = this.getStroke(e, t);
|
|
966
1020
|
return Object.keys(i).length > 0 && (n.strokeNegative = i), n;
|
|
967
1021
|
}
|
|
968
|
-
}, X = class extends
|
|
1022
|
+
}, X = class extends R {
|
|
969
1023
|
constructor(e = "title") {
|
|
970
1024
|
super(e);
|
|
971
1025
|
}
|
|
@@ -978,7 +1032,7 @@ var de = class {
|
|
|
978
1032
|
}
|
|
979
1033
|
visit(e, t, n) {
|
|
980
1034
|
let r = {};
|
|
981
|
-
|
|
1035
|
+
D(e, t, r, "overlay", "overlay"), n[this._jsonKey] = r;
|
|
982
1036
|
let i = e.getFromPath(r, this.getTextPath());
|
|
983
1037
|
i ||= {}, this.parseTitleRangeOrValue(e, t, r);
|
|
984
1038
|
let a = e.evaluate("txPr", t);
|
|
@@ -992,20 +1046,20 @@ var de = class {
|
|
|
992
1046
|
e !== null && (n.rotation = parseInt(e), delete n.title.rotation);
|
|
993
1047
|
}
|
|
994
1048
|
}
|
|
995
|
-
},
|
|
1049
|
+
}, Ee = class {
|
|
996
1050
|
visit(e, t, n) {
|
|
997
1051
|
let r = e.evaluate("manualLayout", t);
|
|
998
1052
|
if (r) {
|
|
999
1053
|
let t = {};
|
|
1000
|
-
|
|
1054
|
+
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);
|
|
1001
1055
|
}
|
|
1002
1056
|
return n;
|
|
1003
1057
|
}
|
|
1004
|
-
},
|
|
1058
|
+
}, De = class {
|
|
1005
1059
|
visit(e, t, n) {
|
|
1006
1060
|
return n.name = t.getAttribute("name"), n;
|
|
1007
1061
|
}
|
|
1008
|
-
},
|
|
1062
|
+
}, Oe = class extends M {
|
|
1009
1063
|
visit(e, t, n) {
|
|
1010
1064
|
let r = {};
|
|
1011
1065
|
r.name = t.getAttribute("name");
|
|
@@ -1019,7 +1073,7 @@ var de = class {
|
|
|
1019
1073
|
}
|
|
1020
1074
|
return Object.keys(r).length > 0 && (n.colors = r), r;
|
|
1021
1075
|
}
|
|
1022
|
-
},
|
|
1076
|
+
}, ke = class {
|
|
1023
1077
|
visit(e, t, n) {
|
|
1024
1078
|
let r = {};
|
|
1025
1079
|
r.name = t.getAttribute("name");
|
|
@@ -1037,7 +1091,7 @@ var de = class {
|
|
|
1037
1091
|
let a = r.getAttribute("panose");
|
|
1038
1092
|
return a && (n.fallbacks = [b.getPanoseFallback(a)]), n;
|
|
1039
1093
|
}
|
|
1040
|
-
},
|
|
1094
|
+
}, Ae = class extends M {
|
|
1041
1095
|
visit(e, t, n) {
|
|
1042
1096
|
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");
|
|
1043
1097
|
if (r && i && a && o) return n.fillStyleLst = r, n.lnStyleLst = i, n.effectStyleLst = a, void (n.bgFillStyleLst = o);
|
|
@@ -1099,7 +1153,7 @@ var de = class {
|
|
|
1099
1153
|
}
|
|
1100
1154
|
return i;
|
|
1101
1155
|
}
|
|
1102
|
-
},
|
|
1156
|
+
}, je = class {
|
|
1103
1157
|
visit(e, t, n) {
|
|
1104
1158
|
if (!t) return;
|
|
1105
1159
|
let r = {}, i = t.getAttribute("r:id");
|
|
@@ -1109,7 +1163,7 @@ var de = class {
|
|
|
1109
1163
|
}
|
|
1110
1164
|
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;
|
|
1111
1165
|
}
|
|
1112
|
-
},
|
|
1166
|
+
}, Me = class {
|
|
1113
1167
|
visit(e, t, n) {
|
|
1114
1168
|
if (!t) return;
|
|
1115
1169
|
let r = {}, i = [];
|
|
@@ -1229,11 +1283,11 @@ var de = class {
|
|
|
1229
1283
|
}
|
|
1230
1284
|
return n;
|
|
1231
1285
|
}
|
|
1232
|
-
},
|
|
1286
|
+
}, Ne = class {
|
|
1233
1287
|
visit(e, t, n) {
|
|
1234
1288
|
if (!t) return;
|
|
1235
1289
|
let r = t.getAttribute("ref"), a = {};
|
|
1236
|
-
t.hasAttribute("caseSensitive") && (a.collatorOptions = i(t.getAttribute("caseSensitive")) ?
|
|
1290
|
+
t.hasAttribute("caseSensitive") && (a.collatorOptions = i(t.getAttribute("caseSensitive")) ? C.CaseSensitiveOptions : C.CaseInsensitiveOptions);
|
|
1237
1291
|
let o = t.getAttribute("sortMethod");
|
|
1238
1292
|
o != null && o !== "none" && (o === "stroke" ? a.collatorOptions = {
|
|
1239
1293
|
...a.collatorOptions,
|
|
@@ -1243,7 +1297,7 @@ var de = class {
|
|
|
1243
1297
|
collation: "pinyin"
|
|
1244
1298
|
}));
|
|
1245
1299
|
let s = {};
|
|
1246
|
-
t.hasAttribute("columnSort") && i(t.getAttribute("columnSort")) && (s.axis =
|
|
1300
|
+
t.hasAttribute("columnSort") && i(t.getAttribute("columnSort")) && (s.axis = ee.Axis.Column);
|
|
1247
1301
|
let c = m.fastStringToRange(r), l = [];
|
|
1248
1302
|
return this.processSortConditions(e, t, l, c, a), l.length > 0 && (s.sorts = l), Object.keys(l).length > 0 && (n.sort = s), s;
|
|
1249
1303
|
}
|
|
@@ -1269,7 +1323,7 @@ var de = class {
|
|
|
1269
1323
|
}
|
|
1270
1324
|
}
|
|
1271
1325
|
}
|
|
1272
|
-
}, Z = class extends
|
|
1326
|
+
}, Z = class extends z {
|
|
1273
1327
|
visit(e, t, n) {
|
|
1274
1328
|
this.processNumFmts(e, e.evaluate("numFmts", t), null), e.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
|
|
1275
1329
|
let r = {
|
|
@@ -1356,7 +1410,7 @@ var de = class {
|
|
|
1356
1410
|
let s = t.getAttribute("xfId");
|
|
1357
1411
|
if (s && a) {
|
|
1358
1412
|
let e = a.get(parseInt(s));
|
|
1359
|
-
e && e !==
|
|
1413
|
+
e && e !== x.BuiltInName.Normal && (n.named = e);
|
|
1360
1414
|
}
|
|
1361
1415
|
let c = (e) => !(!o && t.hasAttribute(e)) || i(t.getAttribute(e)), l = (e) => !o || t.hasAttribute(e) && i(t.getAttribute(e)), u = o ? "0" : void 0;
|
|
1362
1416
|
if (c("applyFont")) {
|
|
@@ -1403,13 +1457,13 @@ var de = class {
|
|
|
1403
1457
|
}
|
|
1404
1458
|
processAlignment(e, t, n) {
|
|
1405
1459
|
let r = {};
|
|
1406
|
-
if (t?.hasAttribute("horizontal") ? r.horizontal = t.getAttribute("horizontal") : r.horizontal =
|
|
1460
|
+
if (t?.hasAttribute("horizontal") ? r.horizontal = t.getAttribute("horizontal") : r.horizontal = S.HorizontalAlignment.General, t?.hasAttribute("vertical") ? r.vertical = t.getAttribute("vertical") : r.vertical = S.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, i(t?.getAttribute("wrapText") ?? "") ? r.overflow = S.Overflow.Wrap : r.overflow = S.Overflow.Visible, i(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = S.Overflow.Shrink), t?.hasAttribute("textRotation")) {
|
|
1407
1461
|
let e = parseFloat(t.getAttribute("textRotation"));
|
|
1408
1462
|
e > 0 && e <= 90 ? e = 360 - e : e > 90 && e <= 180 ? e -= 90 : e === 255 && (e = 0, r.stacked = !0), r.rotation = e;
|
|
1409
1463
|
} else r.rotation = 0;
|
|
1410
1464
|
t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = i(t.getAttribute("justifyLastLine")));
|
|
1411
1465
|
let a = t?.getAttribute("readingOrder");
|
|
1412
|
-
return a && (a === "0" ? r.readingDirection =
|
|
1466
|
+
return a && (a === "0" ? r.readingDirection = S.ReadingDirection.Auto : a === "1" ? r.readingDirection = S.ReadingDirection.LeftToRight : a === "2" ? r.readingDirection = S.ReadingDirection.RightToLeft : e.warn(`Invalid readingOrder '${a}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(r).length > 0 && (n.alignment = r), n;
|
|
1413
1467
|
}
|
|
1414
1468
|
collectHiddenXfs(e) {
|
|
1415
1469
|
let t = /* @__PURE__ */ new Set();
|
|
@@ -1509,7 +1563,7 @@ var de = class {
|
|
|
1509
1563
|
if (t.nodeType === 1 && t.localName === "cellStyle") {
|
|
1510
1564
|
let e = parseInt(t.getAttribute("xfId") ?? ""), o = t.getAttribute("name"), s = t.getAttribute("builtinId"), c = o;
|
|
1511
1565
|
if (s !== null) {
|
|
1512
|
-
let e =
|
|
1566
|
+
let e = x.builtInNameFromId(parseInt(s));
|
|
1513
1567
|
e !== void 0 && (c = e);
|
|
1514
1568
|
}
|
|
1515
1569
|
if (a.set(e, c), !r[e]) continue;
|
|
@@ -1522,7 +1576,7 @@ var de = class {
|
|
|
1522
1576
|
}
|
|
1523
1577
|
}
|
|
1524
1578
|
afterVisit(e, t, n) {}
|
|
1525
|
-
},
|
|
1579
|
+
}, Pe = class extends z {
|
|
1526
1580
|
visit(e, t, n) {
|
|
1527
1581
|
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.processPivotCaches(e, e.evaluate("pivotCaches", t), n), this.processWorkbookProtection(e, e.evaluate("workbookProtection", t), n), this.processWorkbookPr(e, e.evaluate("workbookPr", t), n), n;
|
|
1528
1582
|
}
|
|
@@ -1535,13 +1589,13 @@ var de = class {
|
|
|
1535
1589
|
if (!n) return;
|
|
1536
1590
|
let a = {};
|
|
1537
1591
|
this.processPassword(e, n, a, "workbook", "password"), this.processPassword(e, n, a, "revisions", "revisionsPassword");
|
|
1538
|
-
for (let e of
|
|
1592
|
+
for (let e of r) a[e.key] = t(e, n.getAttribute(e.attribute));
|
|
1539
1593
|
return i.protection = a, i;
|
|
1540
1594
|
}
|
|
1541
1595
|
processCalcPr(e, t, n) {
|
|
1542
1596
|
if (!t) return;
|
|
1543
1597
|
let r = {};
|
|
1544
|
-
e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) =>
|
|
1598
|
+
e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) => ue[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, "maxIteration", e.INT_COPY), e.copyFromAttribute(t, "iterateDelta", r, "maxIterateChange", e.FLOAT_COPY);
|
|
1545
1599
|
let i = t.getAttribute("calcId");
|
|
1546
1600
|
i !== null && e.getVisitorParamsState().set("calcId", i), n.calc = r;
|
|
1547
1601
|
}
|
|
@@ -1624,7 +1678,7 @@ var de = class {
|
|
|
1624
1678
|
t && (e.copyFromAttribute(t, "date1904", n, "date1904", e.BOOLEAN_COPY), e.copyFromAttribute(t, "codeName", n, "codeName"), e.copyFromAttribute(t, "updateLinks", n, "updateLinks"));
|
|
1625
1679
|
}
|
|
1626
1680
|
afterVisit(e, t, n) {}
|
|
1627
|
-
},
|
|
1681
|
+
}, Fe = class {
|
|
1628
1682
|
visit(e, t, n) {
|
|
1629
1683
|
let r = {};
|
|
1630
1684
|
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), r.totalsRowShown = t.getAttribute("totalsRowShown") !== "0", r;
|
|
@@ -1676,7 +1730,7 @@ var de = class {
|
|
|
1676
1730
|
}
|
|
1677
1731
|
i.length > 0 && (n.columns = i);
|
|
1678
1732
|
}
|
|
1679
|
-
},
|
|
1733
|
+
}, Ie = class {
|
|
1680
1734
|
visit(e, t, n) {
|
|
1681
1735
|
let r = e.getVisitorParamsState().get("ref");
|
|
1682
1736
|
if (r) {
|
|
@@ -1685,7 +1739,7 @@ var de = class {
|
|
|
1685
1739
|
}
|
|
1686
1740
|
return e.copyFromAttribute(t, "altText", n), e.copyFromAttribute(t, "altTextSummary", n), n;
|
|
1687
1741
|
}
|
|
1688
|
-
},
|
|
1742
|
+
}, Le = class {
|
|
1689
1743
|
visit(e, t, n) {
|
|
1690
1744
|
let r = t.childNodes, i = r.length, a = null;
|
|
1691
1745
|
for (let e = 0; e < i; e++) {
|
|
@@ -1743,7 +1797,7 @@ var de = class {
|
|
|
1743
1797
|
i.length > 0 && (n.sheetDataSet = i);
|
|
1744
1798
|
}
|
|
1745
1799
|
processSheetData(e, t) {
|
|
1746
|
-
let n = new
|
|
1800
|
+
let n = new te.Builder(), r = t.childNodes, i = r.length;
|
|
1747
1801
|
for (let e = 0; e < i; e++) {
|
|
1748
1802
|
let t = r.item(e);
|
|
1749
1803
|
if (t.nodeType !== 1 || t.localName !== "row") continue;
|
|
@@ -1793,13 +1847,13 @@ var de = class {
|
|
|
1793
1847
|
let t = this._findChild(e, "alternateUrls");
|
|
1794
1848
|
return t ? this._findChild(t, "absoluteUrl")?.getAttribute("r:id") ?? null : null;
|
|
1795
1849
|
}
|
|
1796
|
-
},
|
|
1850
|
+
}, Re = class {
|
|
1797
1851
|
visit(e, t, n) {
|
|
1798
1852
|
e.copyFromAttribute(t, "name", n), e.copyFromAttribute(t, "sourceName", n);
|
|
1799
1853
|
let r = e.evaluate("*/tableSlicerCache", t);
|
|
1800
1854
|
return r ? (e.copyFromAttribute(r, "tableId", n), e.copyFromAttribute(r, "column", n, "columnId"), e.copyFromAttribute(r, "crossFilter", n), n) : (e.warn("A slicer names no table; it was not imported.", { onceKey: "xlsx.slicer.cacheDefinition" }), n);
|
|
1801
1855
|
}
|
|
1802
|
-
},
|
|
1856
|
+
}, ze = class {
|
|
1803
1857
|
visit(e, t, n) {
|
|
1804
1858
|
let r = n.slicers;
|
|
1805
1859
|
r || (r = {}, n.slicers = r);
|
|
@@ -1821,7 +1875,7 @@ var de = class {
|
|
|
1821
1875
|
}
|
|
1822
1876
|
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);
|
|
1823
1877
|
}
|
|
1824
|
-
},
|
|
1878
|
+
}, Be = class {
|
|
1825
1879
|
visit(e, t, n) {
|
|
1826
1880
|
return n;
|
|
1827
1881
|
}
|
|
@@ -1849,7 +1903,7 @@ var de = class {
|
|
|
1849
1903
|
};
|
|
1850
1904
|
return e.evaluate("col", t) && (i.c = parseInt(e.evaluate("col", t).textContent)), e.evaluate("row", t) && (i.r = parseInt(e.evaluate("row", t).textContent)), e.evaluate("colOff", t) && (i.x = d(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (i.y = d(e.evaluate("rowOff", t).textContent)), r === "from" ? n.tl = i : n.br = i, n;
|
|
1851
1905
|
}
|
|
1852
|
-
},
|
|
1906
|
+
}, Ve = class extends V {
|
|
1853
1907
|
visit(e, t, n) {
|
|
1854
1908
|
if (!t) return;
|
|
1855
1909
|
n = super.visit(e, t, n);
|
|
@@ -1886,9 +1940,9 @@ var de = class {
|
|
|
1886
1940
|
e.warn(`Unable to read a graphic frame: ${t?.message ?? t}`, { onceKey: "xlsx.drawing.graphicFrame" });
|
|
1887
1941
|
}
|
|
1888
1942
|
}
|
|
1889
|
-
return i && (n
|
|
1943
|
+
return i && this.setContent(n, i), i;
|
|
1890
1944
|
}
|
|
1891
|
-
},
|
|
1945
|
+
}, He = H, Ue = class extends V {
|
|
1892
1946
|
visit(e, t, n) {
|
|
1893
1947
|
if (!t) return;
|
|
1894
1948
|
let r = super.visit(e, t, n), i = e.evaluate("nvPicPr/cNvPicPr", t);
|
|
@@ -1907,32 +1961,34 @@ var de = class {
|
|
|
1907
1961
|
if (t = a.getAttribute("r:embed") ?? a.getAttribute("embed"), t ||= a.getAttribute("r:link") ?? a.getAttribute("link"), !t) return void e.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" });
|
|
1908
1962
|
o = e.getRef(t, !0);
|
|
1909
1963
|
}
|
|
1910
|
-
|
|
1964
|
+
let s = { resId: o };
|
|
1965
|
+
return this.setContent(n, {
|
|
1911
1966
|
type: "picture",
|
|
1912
|
-
json:
|
|
1913
|
-
}, r;
|
|
1967
|
+
json: s
|
|
1968
|
+
}), r;
|
|
1914
1969
|
}
|
|
1915
|
-
},
|
|
1970
|
+
}, We = class extends H {
|
|
1916
1971
|
visit(e, t, n) {
|
|
1917
1972
|
if (!t) return;
|
|
1973
|
+
let r = n;
|
|
1918
1974
|
n = super.visit(e, t, n);
|
|
1919
|
-
let
|
|
1920
|
-
if (
|
|
1921
|
-
let t = e.evaluate("grpSpLocks",
|
|
1975
|
+
let i = e.evaluate("nvGrpSpPr/cNvGrpSpPr", t);
|
|
1976
|
+
if (i) {
|
|
1977
|
+
let t = e.evaluate("grpSpLocks", i);
|
|
1922
1978
|
if (t) {
|
|
1923
1979
|
t.hasAttribute("noChangeAspect") && (n.lockAspect = t.getAttribute("noChangeAspect") === "1");
|
|
1924
1980
|
let e = {};
|
|
1925
1981
|
Object.keys(e).length > 0 && (n.locks = e);
|
|
1926
1982
|
}
|
|
1927
1983
|
}
|
|
1928
|
-
e.warn(`Unable to import '${
|
|
1929
|
-
let
|
|
1984
|
+
e.warn(`Unable to import '${r.content?.name}', group shapes are not supported.`);
|
|
1985
|
+
let a = {};
|
|
1930
1986
|
return n.content = {
|
|
1931
1987
|
type: "grpSp",
|
|
1932
|
-
json:
|
|
1933
|
-
},
|
|
1988
|
+
json: a
|
|
1989
|
+
}, a;
|
|
1934
1990
|
}
|
|
1935
|
-
},
|
|
1991
|
+
}, Ge = class extends H {
|
|
1936
1992
|
visit(e, t, n) {
|
|
1937
1993
|
if (!t) return;
|
|
1938
1994
|
n = super.visit(e, t, n);
|
|
@@ -1957,7 +2013,7 @@ var de = class {
|
|
|
1957
2013
|
json: s
|
|
1958
2014
|
}, s;
|
|
1959
2015
|
}
|
|
1960
|
-
},
|
|
2016
|
+
}, Ke = class {
|
|
1961
2017
|
visit(e, t, n) {
|
|
1962
2018
|
let r = [], i = /* @__PURE__ */ new Map(), a = {
|
|
1963
2019
|
cells: [],
|
|
@@ -2064,10 +2120,10 @@ var de = class {
|
|
|
2064
2120
|
}
|
|
2065
2121
|
return n;
|
|
2066
2122
|
}
|
|
2067
|
-
},
|
|
2123
|
+
}, qe = class {
|
|
2068
2124
|
visit(e, t, n) {
|
|
2069
|
-
let r = e.getVisitorParamsState().get(
|
|
2070
|
-
r || (r = [], e.getVisitorParamsState().set(
|
|
2125
|
+
let r = e.getVisitorParamsState().get(U);
|
|
2126
|
+
r || (r = [], e.getVisitorParamsState().set(U, r));
|
|
2071
2127
|
let i = t.childNodes, a = i.length;
|
|
2072
2128
|
for (let t = 0; t < a; t++) {
|
|
2073
2129
|
let n = i.item(t);
|
|
@@ -2091,12 +2147,12 @@ var de = class {
|
|
|
2091
2147
|
}
|
|
2092
2148
|
}
|
|
2093
2149
|
}
|
|
2094
|
-
},
|
|
2150
|
+
}, $ = class {
|
|
2095
2151
|
visit(e, t, n) {
|
|
2096
2152
|
let r = e.getVisitorParamsState().get("richTypes");
|
|
2097
2153
|
if (!r) return void e.warn("RichValueFound but not type.");
|
|
2098
|
-
let i = e.getVisitorParamsState().get(
|
|
2099
|
-
i || (i = [], e.getVisitorParamsState().set(
|
|
2154
|
+
let i = e.getVisitorParamsState().get(W);
|
|
2155
|
+
i || (i = [], e.getVisitorParamsState().set(W, i));
|
|
2100
2156
|
let a = t.childNodes, o = a.length;
|
|
2101
2157
|
for (let t = 0; t < o; t++) {
|
|
2102
2158
|
let n = a.item(t);
|
|
@@ -2132,7 +2188,7 @@ var de = class {
|
|
|
2132
2188
|
}
|
|
2133
2189
|
}
|
|
2134
2190
|
}
|
|
2135
|
-
},
|
|
2191
|
+
}, Je = class {
|
|
2136
2192
|
visit(e, t, n) {
|
|
2137
2193
|
if (!t) return;
|
|
2138
2194
|
let r = [];
|
|
@@ -2151,7 +2207,7 @@ var de = class {
|
|
|
2151
2207
|
}
|
|
2152
2208
|
}
|
|
2153
2209
|
}
|
|
2154
|
-
},
|
|
2210
|
+
}, Ye = class {
|
|
2155
2211
|
visit(e, t, n) {
|
|
2156
2212
|
if (!t) return;
|
|
2157
2213
|
let r = t.getAttribute("ref");
|
|
@@ -2172,9 +2228,15 @@ var de = class {
|
|
|
2172
2228
|
let e = { text: "" }, r = i.childNodes;
|
|
2173
2229
|
for (let t = 0; t < r.length; t++) {
|
|
2174
2230
|
let n = r.item(t);
|
|
2175
|
-
n.nodeType === 1
|
|
2231
|
+
if (n.nodeType === 1) {
|
|
2232
|
+
if (n.localName === "t") e.text += n.textContent ?? "";
|
|
2233
|
+
else if (n.localName === "rPr") {
|
|
2234
|
+
let t = fe(n);
|
|
2235
|
+
t && (e.font = t);
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2176
2238
|
}
|
|
2177
|
-
|
|
2239
|
+
e.font && (n = !1), t.push(e);
|
|
2178
2240
|
}
|
|
2179
2241
|
}
|
|
2180
2242
|
}
|
|
@@ -2184,24 +2246,54 @@ var de = class {
|
|
|
2184
2246
|
v: i
|
|
2185
2247
|
}), i;
|
|
2186
2248
|
}
|
|
2187
|
-
},
|
|
2249
|
+
}, Xe = class {
|
|
2188
2250
|
visit(e, t, n) {
|
|
2189
2251
|
if (!t) return;
|
|
2190
2252
|
let r = [];
|
|
2191
2253
|
return n.comments = r, r;
|
|
2192
2254
|
}
|
|
2193
|
-
},
|
|
2255
|
+
}, Ze = class {
|
|
2194
2256
|
visit(e, t, n) {
|
|
2195
2257
|
if (!t) return;
|
|
2196
2258
|
let r = {};
|
|
2197
2259
|
e.copyFromAttribute(t, "id", r, "id", s);
|
|
2198
2260
|
let a = t.getAttribute("ref");
|
|
2199
|
-
|
|
2261
|
+
e.copyFromAttribute(t, "personId", r, "personId", s), e.copyFromAttribute(t, "parentId", r, "parentId", s);
|
|
2262
|
+
let o = t.getAttribute("dT");
|
|
2263
|
+
o && (r.dt = function(e) {
|
|
2264
|
+
let t = /^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(e.trim());
|
|
2265
|
+
if (!t) return e;
|
|
2266
|
+
let [, n, r, i] = t;
|
|
2267
|
+
return `${n}${r ? `.${(r + "00").substring(0, 3)}` : ""}${i ?? "Z"}`;
|
|
2268
|
+
}(o)), t.hasAttribute("done") && (r.done = i(t.getAttribute("done")));
|
|
2269
|
+
let c = function(e) {
|
|
2270
|
+
let t, n = e.childNodes;
|
|
2271
|
+
for (let e = 0; e < n.length; e++) {
|
|
2272
|
+
let r = n.item(e);
|
|
2273
|
+
if (r.nodeType !== 1 || r.localName !== "mentions") continue;
|
|
2274
|
+
let i = r.childNodes;
|
|
2275
|
+
for (let e = 0; e < i.length; e++) {
|
|
2276
|
+
let n = i.item(e);
|
|
2277
|
+
if (n.nodeType !== 1 || n.localName !== "mention") continue;
|
|
2278
|
+
let r = n.getAttribute("mentionId"), a = n.getAttribute("mentionpersonId");
|
|
2279
|
+
if (!r || !a) continue;
|
|
2280
|
+
let o = {
|
|
2281
|
+
id: s(r),
|
|
2282
|
+
personId: s(a)
|
|
2283
|
+
}, c = parseInt(n.getAttribute("startIndex") ?? "", 10);
|
|
2284
|
+
isNaN(c) || (o.startIndex = c);
|
|
2285
|
+
let l = parseInt(n.getAttribute("length") ?? "", 10);
|
|
2286
|
+
isNaN(l) || (o.length = l), (t ??= []).push(o);
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
return t;
|
|
2290
|
+
}(t);
|
|
2291
|
+
return c && (r.mentions = c), n.push({
|
|
2200
2292
|
r: a,
|
|
2201
2293
|
v: r
|
|
2202
2294
|
}), r;
|
|
2203
2295
|
}
|
|
2204
|
-
},
|
|
2296
|
+
}, Qe = class {
|
|
2205
2297
|
visit(e, t, n) {
|
|
2206
2298
|
let r = [], i = t.childNodes, a = i.length;
|
|
2207
2299
|
for (let t = 0; t < a; t++) {
|
|
@@ -2213,27 +2305,27 @@ var de = class {
|
|
|
2213
2305
|
}
|
|
2214
2306
|
return r.length > 0 && (n.persons = r), r;
|
|
2215
2307
|
}
|
|
2216
|
-
},
|
|
2308
|
+
}, $e = class {
|
|
2217
2309
|
constructor(e, t) {
|
|
2218
2310
|
this.path = e, this.visitor = t;
|
|
2219
2311
|
}
|
|
2220
|
-
},
|
|
2312
|
+
}, et = class {
|
|
2221
2313
|
constructor() {
|
|
2222
|
-
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new
|
|
2314
|
+
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new pe()), this.registerVisitor("cp:coreProperties", new me()), this.registerVisitor("Properties", new he()), this.registerVisitor("spPr", new ve()), this.registerVisitor("txBody", new Y()), this.registerVisitor("txPr", new Y()), this.registerVisitor("c:chartSpace", new ge()), this.registerVisitor("c:plotArea", new _e()), this.registerVisitor("c:barChart", new ye()), 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 be()), this.registerVisitor("c:dPt", new xe()), this.registerVisitor("c:marker", new Se()), this.registerVisitor("c:catAx", new J()), this.registerVisitor("c:valAx", new J()), this.registerVisitor("c:dateAx", new J()), this.registerVisitor("c:majorGridlines", new j("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new j("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 we()), this.registerVisitor("c:legend", new Y("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new Ce()), this.registerVisitor("c:ser", new Te(), "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 Ee()), this.registerVisitor("c:dispUnits", new j("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new X("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new Y(), "tx/rich"), this.registerVisitor("a:theme", new De()), this.registerVisitor("a:theme", new Oe(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new ke(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Ae(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new Me()), this.registerVisitor("sortState", new Ne()), this.registerVisitor("s:workbook", new Pe()), this.registerVisitor("styleSheet", new Z()), this.registerVisitor("x14:table", new Ie()), this.registerVisitor("table", new Fe()), this.registerVisitor("externalLink", new Le()), this.registerVisitor("hlinkClick", new je()), this.registerVisitor("wsDr", new Be()), this.registerVisitor("twoCellAnchor", new Q()), this.registerVisitor("oneCellAnchor", new Q()), this.registerVisitor("absoluteAnchor", new Q()), this.registerVisitor("graphicFrame", new Ve()), this.registerVisitor("sp", new He()), this.registerVisitor("grpSp", new We()), this.registerVisitor("cxnSp", new Ge()), this.registerVisitor("pic", new Ue()), this.registerVisitor("metadata", new Ke()), this.registerVisitor("rvStructures", new qe()), this.registerVisitor("rvData", new $()), this.registerVisitor("comments", new Je()), this.registerVisitor("comment", new Ye()), this.registerVisitor("ThreadedComments", new Xe()), this.registerVisitor("threadedComment", new Ze()), this.registerVisitor("threadedComment", new Y("content"), "text"), this.registerVisitor("personList", new Qe()), this.registerVisitor("slicerCacheDefinition", new Re()), this.registerVisitor("slicers", new ze());
|
|
2223
2315
|
}
|
|
2224
2316
|
registerVisitor(e, t, n = null) {
|
|
2225
2317
|
e.indexOf(":") === -1 && (e = "*:" + e);
|
|
2226
2318
|
let r = e.split(":"), i = r.length > 1 ? r[1] : r[0];
|
|
2227
2319
|
if (!n) return this.visitorsByXmlTagName.set(i, t), void this.visitorsByXmlTagName.set(e, t);
|
|
2228
2320
|
let a = this.scopedVisitorsByXmlTagName.get(i);
|
|
2229
|
-
a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new
|
|
2321
|
+
a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new $e(n, t));
|
|
2230
2322
|
}
|
|
2231
2323
|
parseDxf(e, t = "", n = p.EmptyObject) {
|
|
2232
2324
|
this.visitorParamsState ||= /* @__PURE__ */ new Map();
|
|
2233
2325
|
let r = this.visitorParamsState, i = r.get("processingDXFs");
|
|
2234
2326
|
r.set("processingDXFs", !0);
|
|
2235
2327
|
try {
|
|
2236
|
-
let r = new
|
|
2328
|
+
let r = new w(null, this, "/dxf", e, {}, t, n), i = {};
|
|
2237
2329
|
return new Z().processDXF(r, e, i), i;
|
|
2238
2330
|
} finally {
|
|
2239
2331
|
i === void 0 ? r.delete("processingDXFs") : r.set("processingDXFs", i);
|
|
@@ -2247,7 +2339,7 @@ var de = class {
|
|
|
2247
2339
|
this.visitorParamsState && !n?.paramMap || (this.visitorParamsState = n?.paramMap ?? /* @__PURE__ */ new Map());
|
|
2248
2340
|
let i = {}, a = this.visitorsByXmlTagName.get(r.nodeName);
|
|
2249
2341
|
if (a ||= this.visitorsByXmlTagName.get(r.localName), !a) throw Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);
|
|
2250
|
-
let o = "/" + r.localName, s = new
|
|
2342
|
+
let o = "/" + r.localName, s = new w(null, this, o, r, i, t, n), c = [];
|
|
2251
2343
|
this._doWalk(a, s, c, r, i, t, n);
|
|
2252
2344
|
let l = c.length;
|
|
2253
2345
|
for (let e = 0; e < l; e++) {
|
|
@@ -2275,7 +2367,7 @@ var de = class {
|
|
|
2275
2367
|
for (; l && l !== r;) s = l.localName + "/" + s, l = l.parentNode;
|
|
2276
2368
|
let u = t.getPath() + "/" + s;
|
|
2277
2369
|
if (c.visitor) {
|
|
2278
|
-
let r = new
|
|
2370
|
+
let r = new w(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
|
|
2279
2371
|
this._doWalk(c.visitor, r, n, e, i, a, o);
|
|
2280
2372
|
}
|
|
2281
2373
|
};
|
|
@@ -2301,10 +2393,10 @@ var de = class {
|
|
|
2301
2393
|
if (r.nodeType !== 1) continue;
|
|
2302
2394
|
let c = r, p = c.nodeName, m = l.get(p);
|
|
2303
2395
|
m ||= (p = c.localName, l.get(p));
|
|
2304
|
-
let h = t.getPath() + "/" + p, g = new
|
|
2396
|
+
let h = t.getPath() + "/" + p, g = new w(t, this, h, u, d, a, o);
|
|
2305
2397
|
this._doWalk(m, g, n, c, s ?? i, a, o);
|
|
2306
2398
|
}
|
|
2307
2399
|
return s;
|
|
2308
2400
|
}
|
|
2309
2401
|
};
|
|
2310
|
-
export {
|
|
2402
|
+
export { et as DOMTransformer, w as ExecutionContext, u as NumberUtils, se as VisitorUtils };
|