@sheetxl/io-xlsx 0.8.0-beta.14 → 0.8.0-beta.16
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/LICENSE.md +8 -7
- package/browser/esm/BQaNticMfvf7-y0L.mjs +2474 -0
- package/browser/esm/{DbygDdjktfjoU4DI.mjs → BalqIL4s8nR3NbK8.mjs} +2528 -1702
- package/browser/esm/{Bs0IJqyry5ZycCBU.mjs → BiueQ3eVPDOEdEeL.mjs} +1321 -1087
- package/browser/esm/{CIRY1QIACITHu_lA.mjs → BtLo1V0gnJ3ktOw9.mjs} +2 -2
- package/browser/esm/{QuYxg3ec6kN-djPF.mjs → C3H8HKjSun-wLDrE.mjs} +5 -5
- package/browser/esm/{DN7ig6HovGU5gMbr.mjs → CCGqD5BzdZMq2pTI.mjs} +2 -2
- package/browser/esm/{BjkdoGjLpkKUlK5q.mjs → DT-3sV5qGuHTFmnB.mjs} +3295 -2163
- package/browser/esm/{DiNNY0EgHikWbrDz.mjs → W3dYk6brWDUtMZca.mjs} +3 -3
- package/browser/esm/{DAYdoS9sLmYf8kzD.mjs → X5YJn8ZwrgDKMwwO.mjs} +3 -3
- package/browser/esm/{Cs4lg7bxClbTkldF.mjs → ekV6d7YNDF6FkKLw.mjs} +423 -318
- package/browser/esm/{DKWU_JYjVmtOzTGr.mjs → idgOmd_zpVTKLyek.mjs} +3 -3
- package/browser/esm/index.mjs +3 -3
- package/node/esm/{TPq4Re0SQgONsX_u.mjs → BO8o53Yo-gLFNELS.mjs} +3 -3
- package/node/esm/{CvcAx132Yp5uUDUB.mjs → BT0HKieizRDqDegH.mjs} +440 -330
- package/node/esm/BmIrpH_719z1aqvw.mjs +2562 -0
- package/node/esm/CJYMs5EGkLOZKyF0.mjs +4676 -0
- package/node/esm/{H9egT6kWCw8RAf76.mjs → CZsPzV1CsMPKiICx.mjs} +2 -2
- package/node/esm/CdFqKswnjeM_u8-g.mjs +7242 -0
- package/node/esm/CnYiZh1EVKY4BNVs.mjs +6851 -0
- package/node/esm/{CkenuXqno-ffP331.mjs → OO5K_WYvAj-UV14K.mjs} +3 -3
- package/node/esm/index.mjs +5 -5
- package/package.json +4 -4
- package/types/src/AutoFilterRules.d.ts +26 -4
- package/types/src/OOXMLExtensions.d.ts +12 -1
- package/types/src/pivot/PivotArea.d.ts +20 -0
- package/types/src/pivot/PivotCacheRead.d.ts +30 -0
- package/types/src/pivot/PivotCacheWrite.d.ts +23 -0
- package/types/src/pivot/PivotFilters.d.ts +29 -0
- package/types/src/pivot/PivotFormats.d.ts +60 -0
- package/types/src/pivot/PivotTableRead.d.ts +44 -0
- package/types/src/pivot/PivotTableWrite.d.ts +13 -0
- package/types/src/pivot/_PivotCacheXml.d.ts +48 -0
- package/types/src/pivot/_PivotTableXml.d.ts +23 -0
- package/types/src/reader/PivotButtons.d.ts +14 -0
- package/types/src/reader/PivotCellFormats.d.ts +22 -0
- package/types/src/reader/SlicerJoin.d.ts +6 -4
- package/types/src/reader/_SlicerRecord.d.ts +22 -0
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +5 -0
- package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +6 -2
- package/types/src/reader/domVisitors/SlicersVisitor.d.ts +2 -0
- package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
- package/types/src/reader/domVisitors/index.d.ts +2 -0
- package/types/src/writer/EvaluationSheet.d.ts +5 -0
- package/types/src/writer/builder/Types.d.ts +13 -0
- package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
- package/types/src/writer/emitters/SlicerEmitter.d.ts +81 -18
- package/types/src/writer/emitters/StylesEmitter.d.ts +32 -1
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +19 -2
- package/types/src/writer/utils/DateSystem.d.ts +6 -0
- package/types/src/writer/utils/XfVariants.d.ts +61 -0
- package/browser/esm/Bomb4K5f16UyiyED.mjs +0 -2265
- package/node/esm/BCSJ_kqVLXkZlYh3.mjs +0 -5693
- package/node/esm/BCXSNXHvNQ9JQMLE.mjs +0 -6367
- package/node/esm/BycDf9HTtfpzL-zt.mjs +0 -2346
- package/node/esm/CTdvEKRTM-W1L1KU.mjs +0 -4437
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
|
@@ -1,2265 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.14
|
|
3
|
-
*
|
|
4
|
-
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { Color as e, IFill as t, IFontStyle as n } from "@sheetxl/sdk";
|
|
8
|
-
var r = [
|
|
9
|
-
"customMenu",
|
|
10
|
-
"description",
|
|
11
|
-
"help",
|
|
12
|
-
"statusBar",
|
|
13
|
-
"shortcutKey"
|
|
14
|
-
], i = [
|
|
15
|
-
"function",
|
|
16
|
-
"vbProcedure",
|
|
17
|
-
"xlm",
|
|
18
|
-
"publishToServer",
|
|
19
|
-
"workbookParameter"
|
|
20
|
-
], a = /<!\[CDATA\[([\s\S]*?)\]\]>|<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!DOCTYPE[^>]*>|<(\/?)([^\s/>]+)((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|([^<]+)/g, o = {
|
|
21
|
-
amp: "&",
|
|
22
|
-
lt: "<",
|
|
23
|
-
gt: ">",
|
|
24
|
-
quot: "\"",
|
|
25
|
-
apos: "'"
|
|
26
|
-
}, s = (e) => e.indexOf("&") === -1 ? e : e.replace(/&(#x[0-9a-fA-F]+|#\d+|\w+);/g, (e, t) => {
|
|
27
|
-
if (t[0] !== "#") return o[t] ?? e;
|
|
28
|
-
let n = t[1] === "x" ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
|
|
29
|
-
return Number.isFinite(n) ? String.fromCodePoint(n) : e;
|
|
30
|
-
}), c = (e) => {
|
|
31
|
-
let t = e.indexOf(":");
|
|
32
|
-
return t === -1 ? e : e.slice(t + 1);
|
|
33
|
-
}, l = (e) => {
|
|
34
|
-
let t = {
|
|
35
|
-
name: "",
|
|
36
|
-
qname: "",
|
|
37
|
-
attrs: "",
|
|
38
|
-
children: [],
|
|
39
|
-
start: 0,
|
|
40
|
-
end: e.length,
|
|
41
|
-
contentStart: 0,
|
|
42
|
-
contentEnd: e.length
|
|
43
|
-
}, n = [t];
|
|
44
|
-
a.lastIndex = 0;
|
|
45
|
-
for (let t = a.exec(e); t; t = a.exec(e)) {
|
|
46
|
-
let e = n[n.length - 1];
|
|
47
|
-
if (t[1] !== void 0) e.children.push(t[1]);
|
|
48
|
-
else if (t[6] !== void 0) e.children.push(s(t[6]));
|
|
49
|
-
else if (t[3] !== void 0) {
|
|
50
|
-
if (t[2]) {
|
|
51
|
-
if (n.length > 1) {
|
|
52
|
-
let e = n.pop();
|
|
53
|
-
e.contentEnd = t.index, e.end = t.index + t[0].length;
|
|
54
|
-
}
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
let r = t.index + t[0].length, i = {
|
|
58
|
-
name: c(t[3]),
|
|
59
|
-
qname: t[3],
|
|
60
|
-
attrs: t[4] ?? "",
|
|
61
|
-
children: [],
|
|
62
|
-
start: t.index,
|
|
63
|
-
end: r,
|
|
64
|
-
contentStart: r,
|
|
65
|
-
contentEnd: r
|
|
66
|
-
};
|
|
67
|
-
e.children.push(i), t[5] || n.push(i);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return t.children.find((e) => typeof e != "string") ?? null;
|
|
71
|
-
}, u = (e) => e.children.filter((e) => typeof e != "string"), d = (e) => {
|
|
72
|
-
let t = "";
|
|
73
|
-
for (let n of e.children) typeof n == "string" && (t += n);
|
|
74
|
-
return t;
|
|
75
|
-
}, f = "http://schemas.openxmlformats.org/drawingml/2006/chart", ee = "http://purl.oclc.org/ooxml/drawingml/chart", p = "http://schemas.openxmlformats.org/drawingml/2006/main", te = "http://purl.oclc.org/ooxml/drawingml/main", m = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", ne = "http://schemas.microsoft.com/office/drawing/2012/chart", re = "http://schemas.microsoft.com/office/drawing/2014/chartex", ie = "http://www.w3.org/XML/1998/namespace", h = {
|
|
76
|
-
c: "c",
|
|
77
|
-
a: "a",
|
|
78
|
-
r: "r",
|
|
79
|
-
c15: "c15",
|
|
80
|
-
cx: "cx"
|
|
81
|
-
}, ae = (e) => e === f || e === ee, oe = (e) => e === p || e === te, se = (e) => e === re, ce = Object.freeze({ xml: ie }), le = /([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g, g = (e) => {
|
|
82
|
-
let t = [];
|
|
83
|
-
le.lastIndex = 0;
|
|
84
|
-
for (let n = le.exec(e.attrs); n; n = le.exec(e.attrs)) t.push([n[1], s(n[2] ?? n[3] ?? "")]);
|
|
85
|
-
return t;
|
|
86
|
-
}, _ = (e, t) => {
|
|
87
|
-
let n = null;
|
|
88
|
-
for (let [r, i] of g(e)) r === "xmlns" ? (n ??= { ...t })[""] = i : r.startsWith("xmlns:") && ((n ??= { ...t })[r.slice(6)] = i);
|
|
89
|
-
return n ?? t;
|
|
90
|
-
}, ue = (e, t) => t[((e) => {
|
|
91
|
-
let t = e.indexOf(":");
|
|
92
|
-
return t === -1 ? "" : e.slice(0, t);
|
|
93
|
-
})(e.qname)], v = class {
|
|
94
|
-
constructor() {
|
|
95
|
-
this._parts = [];
|
|
96
|
-
}
|
|
97
|
-
open(e, t, n = !1) {
|
|
98
|
-
let r = "<" + e;
|
|
99
|
-
if (t) for (let [e, n] of t) r += ` ${e}="${de(n)}"`;
|
|
100
|
-
return this._parts.push(r + (n ? "/>" : ">")), this;
|
|
101
|
-
}
|
|
102
|
-
close(e) {
|
|
103
|
-
return this._parts.push(`</${e}>`), this;
|
|
104
|
-
}
|
|
105
|
-
val(e, t) {
|
|
106
|
-
return this.open(e, [["val", t]], !0);
|
|
107
|
-
}
|
|
108
|
-
text(e) {
|
|
109
|
-
return this._parts.push(((e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"))(e)), this;
|
|
110
|
-
}
|
|
111
|
-
raw(e) {
|
|
112
|
-
return this._parts.push(e), this;
|
|
113
|
-
}
|
|
114
|
-
toString() {
|
|
115
|
-
return this._parts.join("");
|
|
116
|
-
}
|
|
117
|
-
}, de = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """), y = (e) => e === "1" || e === "true" || e !== "0" && e !== "false" && null, b = (e) => e ? "1" : "0", fe = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?$/, x = (e) => {
|
|
118
|
-
let t = y(e);
|
|
119
|
-
return t === null ? fe.test(e) ? String(Number(e)) : e : b(t);
|
|
120
|
-
}, pe = /* @__PURE__ */ new Set(/* @__PURE__ */ "date1904.roundedCorners.autoTitleDeleted.plotVisOnly.showDLblsOverMax.varyColors.marker.smooth.invertIfNegative.bubble3D.delete.showLegendKey.showVal.showCatName.showSerName.showPercent.showBubbleSize.showLeaderLines.overlay.rAngAx.showHorzBorder.showVertBorder.showOutline.showKeys.auto.noMultiLvlLbl.wireframe.showNegBubbles.autoUpdate.applyToFront.applyToSides.applyToEnd.chartObject.data.formatting.selection.userInterface".split(".")), me = (e, t, n = !1) => {
|
|
121
|
-
let r = _(e, t), i = ue(e, r) ?? "", a = [];
|
|
122
|
-
for (let [t, n] of g(e)) {
|
|
123
|
-
if (t === "xmlns" || t.startsWith("xmlns:")) continue;
|
|
124
|
-
let e = t.indexOf(":"), i = e === -1 ? t : `{${r[t.slice(0, e)] ?? t.slice(0, e)}}${t.slice(e + 1)}`;
|
|
125
|
-
a.push(`${i}=${JSON.stringify(x(n))}`);
|
|
126
|
-
}
|
|
127
|
-
let o = u(e), s = o.length === 0 ? e.children.join("") : "";
|
|
128
|
-
a.length === 0 && o.length === 0 && s === "" && ae(i) && pe.has(e.name) && a.push("val=\"1\""), a.sort();
|
|
129
|
-
let c = `<{${i}}${e.name}${a.length ? " " + a.join(" ") : ""}>`;
|
|
130
|
-
if (o.length > 0) {
|
|
131
|
-
let t = [];
|
|
132
|
-
for (let i of e.children) typeof i == "string" ? i.trim() !== "" && t.push(JSON.stringify(i)) : t.push(me(i, r, n));
|
|
133
|
-
n && t.sort(), c += t.join("");
|
|
134
|
-
} else s !== "" && (c += JSON.stringify(s));
|
|
135
|
-
return c + "</>";
|
|
136
|
-
}, he = class {
|
|
137
|
-
constructor(e, t) {
|
|
138
|
-
this.xml = e, this.rootScope = t, this.kept = 0, this.reordered = 0;
|
|
139
|
-
let n = Object.values(t).find(ae) ?? f, r = oe(t[h.a]) ? t[h.a] : p;
|
|
140
|
-
this.writeScope = {
|
|
141
|
-
...t,
|
|
142
|
-
[h.c]: n,
|
|
143
|
-
[h.cx]: re,
|
|
144
|
-
[h.a]: r,
|
|
145
|
-
[h.r]: t[h.r] ?? m
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
markupOf(e, t) {
|
|
149
|
-
let n = this.xml.slice(e.start, e.end), r = new Set(g(e).map(([e]) => e).filter((e) => e === "xmlns" || e.startsWith("xmlns:"))), i = "";
|
|
150
|
-
for (let e of Object.keys(t)) e !== "xml" && t[e] !== this.rootScope[e] && (r.has(e === "" ? "xmlns" : `xmlns:${e}`) || (i += e === "" ? ` xmlns="${t[e]}"` : ` xmlns:${e}="${t[e]}"`));
|
|
151
|
-
if (i) {
|
|
152
|
-
let t = 1 + e.qname.length;
|
|
153
|
-
n = n.slice(0, t) + i + n.slice(t);
|
|
154
|
-
}
|
|
155
|
-
return n;
|
|
156
|
-
}
|
|
157
|
-
}, ge = (e, t) => {
|
|
158
|
-
switch (e) {
|
|
159
|
-
case "c": return ae(t);
|
|
160
|
-
case "c15": return t === ne;
|
|
161
|
-
case "cx": return se(t);
|
|
162
|
-
default: return oe(t);
|
|
163
|
-
}
|
|
164
|
-
}, S = (e, t, n, r) => {
|
|
165
|
-
let i = _(e, n), a = {}, o, s;
|
|
166
|
-
for (let [n, r] of g(e)) {
|
|
167
|
-
let e = t.attributes?.find((e) => e.name === n), i = e ? e.read(r) : void 0;
|
|
168
|
-
e && i !== void 0 && x(e.write(i)) === x(r) ? a[e.key] = i : (o ??= {})[n] = r;
|
|
169
|
-
}
|
|
170
|
-
let c = -1, l = "", d = {};
|
|
171
|
-
for (let n of u(e)) {
|
|
172
|
-
let e = _(n, i), o = ue(n, e), u = t.fields.findIndex((e) => e.tags.includes(n.name) && ge(e.ns, o)), f = u === -1 ? null : t.fields[u], ee = f && !f.many ? f.get ? f.get(a) : a[f.key] : void 0, p = u > c || u === c && !!f?.many;
|
|
173
|
-
if (f && ee === void 0 && (p || !f.many)) {
|
|
174
|
-
let t = f.read(n, e, r);
|
|
175
|
-
if (t !== void 0) {
|
|
176
|
-
f.many ? (a[f.key] ??= []).push(t) : f.set ? f.set(a, t) : a[f.key] = t, d[f.key] = (d[f.key] ?? 0) + 1, p ? (c = u, l = n.name) : r.reordered++;
|
|
177
|
-
continue;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
let te = c === -1 ? null : t.fields[c], m = {
|
|
181
|
-
after: l,
|
|
182
|
-
xml: r.markupOf(n, i)
|
|
183
|
-
};
|
|
184
|
-
te?.many && (m.at = d[te.key]), (s ??= []).push(m);
|
|
185
|
-
}
|
|
186
|
-
return (o || s) && (a.unknown = {}, s && (a.unknown.elements = s), o && (a.unknown.attributes = o)), t.afterRead?.(a, e, i, r), a;
|
|
187
|
-
}, C = (e, t, n, r) => {
|
|
188
|
-
let i = [];
|
|
189
|
-
for (let e of r.attributes ?? []) {
|
|
190
|
-
let t = n[e.key];
|
|
191
|
-
t !== void 0 && i.push([e.name, e.write(t)]);
|
|
192
|
-
}
|
|
193
|
-
let a = n.unknown;
|
|
194
|
-
if (a?.attributes) for (let e of Object.keys(a.attributes)) i.push([e, a.attributes[e]]);
|
|
195
|
-
for (let e of r.declares?.(n) ?? []) i.some(([t]) => t === e[0]) || i.push(e);
|
|
196
|
-
let o = new v(), s = a?.elements ? [...a.elements] : [], c = (e) => {
|
|
197
|
-
for (let t = 0; t < s.length; t++) e(s[t]) && (o.raw(s[t].xml), s.splice(t--, 1));
|
|
198
|
-
};
|
|
199
|
-
c((e) => e.after === "");
|
|
200
|
-
for (let e of r.fields) {
|
|
201
|
-
let t = e.get ? e.get(n) : n[e.key], r = (t) => e.tags.includes(t.after);
|
|
202
|
-
if (e.many) {
|
|
203
|
-
let n = t ?? [];
|
|
204
|
-
for (let t = 0; t < n.length; t++) e.write(o, n[t]), c((e) => r(e) && e.at === t + 1);
|
|
205
|
-
} else t !== void 0 && e.write(o, t);
|
|
206
|
-
c(r);
|
|
207
|
-
}
|
|
208
|
-
c(() => !0);
|
|
209
|
-
let l = o.toString();
|
|
210
|
-
l === "" ? e.open(t, i, !0) : e.open(t, i).raw(l).close(t);
|
|
211
|
-
}, w = (e, t) => `${h[e]}:${t}`, T = (e, t, n = e, r = "c") => ({
|
|
212
|
-
tags: [e],
|
|
213
|
-
key: n,
|
|
214
|
-
ns: r,
|
|
215
|
-
read: (e) => {
|
|
216
|
-
let n = ((e) => {
|
|
217
|
-
if (u(e).length > 0) return;
|
|
218
|
-
let t = null;
|
|
219
|
-
for (let [n, r] of g(e)) {
|
|
220
|
-
if (n !== "val") return;
|
|
221
|
-
t = r;
|
|
222
|
-
}
|
|
223
|
-
return t;
|
|
224
|
-
})(e);
|
|
225
|
-
if (n === void 0) return;
|
|
226
|
-
if (t === "bool") return n === null || (y(n) ?? void 0);
|
|
227
|
-
if (n === null) return;
|
|
228
|
-
if (t === "str") return n;
|
|
229
|
-
let r = Number(n);
|
|
230
|
-
return Number.isFinite(r) && (t !== "int" || Number.isInteger(r)) && x(String(r)) === x(n) ? r : void 0;
|
|
231
|
-
},
|
|
232
|
-
write: (n, i) => {
|
|
233
|
-
n.val(w(r, e), t === "bool" ? b(i) : String(i));
|
|
234
|
-
}
|
|
235
|
-
}), E = (e, t = e, n = "c") => ({
|
|
236
|
-
tags: [e],
|
|
237
|
-
key: t,
|
|
238
|
-
ns: n,
|
|
239
|
-
read: (e) => {
|
|
240
|
-
if (!(u(e).length > 0 || g(e).some(([e]) => !e.startsWith("xmlns")))) return d(e);
|
|
241
|
-
},
|
|
242
|
-
write: (t, r) => {
|
|
243
|
-
let i = w(n, e);
|
|
244
|
-
r === "" ? t.open(i, null, !0) : t.open(i).text(r).close(i);
|
|
245
|
-
}
|
|
246
|
-
}), D = (e, t, n = e, r) => {
|
|
247
|
-
let i = r?.ns ?? "c", a = typeof t == "function" ? t : () => t;
|
|
248
|
-
return {
|
|
249
|
-
tags: [e],
|
|
250
|
-
key: n,
|
|
251
|
-
ns: i,
|
|
252
|
-
many: r?.many,
|
|
253
|
-
read: (e, t, n) => S(e, a(), t, n),
|
|
254
|
-
write: (t, n) => C(t, w(i, e), n, a())
|
|
255
|
-
};
|
|
256
|
-
}, O = (e, t, n = e, r = 1) => ({
|
|
257
|
-
name: e,
|
|
258
|
-
key: n,
|
|
259
|
-
read: (e) => {
|
|
260
|
-
if (t === "str") return e;
|
|
261
|
-
if (t === "bool") return y(e) ?? void 0;
|
|
262
|
-
let n = Number(e);
|
|
263
|
-
return Number.isFinite(n) && (t !== "int" || Number.isInteger(n)) ? r === 1 ? n : n / r : void 0;
|
|
264
|
-
},
|
|
265
|
-
write: (e) => t === "bool" ? b(e) : t === "str" ? e : String(r === 1 ? e : Math.round(e * r))
|
|
266
|
-
}), _e = (e, t, n, r) => ({
|
|
267
|
-
name: e,
|
|
268
|
-
key: t,
|
|
269
|
-
read: n,
|
|
270
|
-
write: r
|
|
271
|
-
}), ve = (e) => ({
|
|
272
|
-
...e,
|
|
273
|
-
read: (t, n, r) => {
|
|
274
|
-
let i = e.read(t, n, r);
|
|
275
|
-
if (i === void 0) return;
|
|
276
|
-
let a = new v();
|
|
277
|
-
e.write(a, i);
|
|
278
|
-
let o = ((e, t) => {
|
|
279
|
-
let n = l(e);
|
|
280
|
-
return n ? me(n, t) : null;
|
|
281
|
-
})(a.toString(), r.writeScope) === me(t, n);
|
|
282
|
-
return o || r.kept++, o ? i : void 0;
|
|
283
|
-
}
|
|
284
|
-
}), k = (e) => `a:${e}`, ye = /* @__PURE__ */ new Set([
|
|
285
|
-
"bg1",
|
|
286
|
-
"tx1",
|
|
287
|
-
"bg2",
|
|
288
|
-
"tx2",
|
|
289
|
-
"accent1",
|
|
290
|
-
"accent2",
|
|
291
|
-
"accent3",
|
|
292
|
-
"accent4",
|
|
293
|
-
"accent5",
|
|
294
|
-
"accent6",
|
|
295
|
-
"hlink",
|
|
296
|
-
"folHlink",
|
|
297
|
-
"phClr",
|
|
298
|
-
"dk1",
|
|
299
|
-
"lt1",
|
|
300
|
-
"dk2",
|
|
301
|
-
"lt2"
|
|
302
|
-
]), be = /* @__PURE__ */ new Set(/* @__PURE__ */ "scrollBar.background.activeCaption.inactiveCaption.menu.window.windowFrame.menuText.windowText.captionText.activeBorder.inactiveBorder.appWorkspace.highlight.highlightText.btnFace.btnShadow.grayText.btnText.inactiveCaptionText.btnHighlight.3dDkShadow.3dLight.infoText.infoBk.hotLight.gradientActiveCaption.gradientInactiveCaption.menuHighlight.menuBar".split(".")), xe = [
|
|
303
|
-
"scrgbClr",
|
|
304
|
-
"srgbClr",
|
|
305
|
-
"hslClr",
|
|
306
|
-
"sysClr",
|
|
307
|
-
"schemeClr",
|
|
308
|
-
"prstClr"
|
|
309
|
-
], Se = (e) => e === "hue" || e === "hueOff" || e === "hueMod" ? 6e4 : e === "alpha" || e === "alphaOff" || e === "alphaMod" ? 1e5 : 1e3, A = (e, t) => {
|
|
310
|
-
let n = {};
|
|
311
|
-
for (let [r, i] of g(e)) {
|
|
312
|
-
if (!t.includes(r)) return null;
|
|
313
|
-
n[r] = i;
|
|
314
|
-
}
|
|
315
|
-
return n;
|
|
316
|
-
}, j = /^-?\d+$/, Ce = (e) => {
|
|
317
|
-
let t = u(e);
|
|
318
|
-
return t.length === 0 ? null : t.length > 1 || !xe.includes(t[0].name) ? void 0 : ((e) => {
|
|
319
|
-
let t;
|
|
320
|
-
switch (e.name) {
|
|
321
|
-
case "scrgbClr": {
|
|
322
|
-
let n = A(e, [
|
|
323
|
-
"r",
|
|
324
|
-
"g",
|
|
325
|
-
"b"
|
|
326
|
-
]);
|
|
327
|
-
if (!(n && j.test(n.r ?? "") && j.test(n.g ?? "") && j.test(n.b ?? ""))) return;
|
|
328
|
-
t = `lrgb(${Number(n.r) / 1e3},${Number(n.g) / 1e3},${Number(n.b) / 1e3})`;
|
|
329
|
-
break;
|
|
330
|
-
}
|
|
331
|
-
case "hslClr": {
|
|
332
|
-
let n = A(e, [
|
|
333
|
-
"hue",
|
|
334
|
-
"sat",
|
|
335
|
-
"lum"
|
|
336
|
-
]);
|
|
337
|
-
if (!(n && j.test(n.hue ?? "") && j.test(n.sat ?? "") && j.test(n.lum ?? ""))) return;
|
|
338
|
-
t = `hsl(${Number(n.hue) / 6e4},${Number(n.sat) / 1e3},${Number(n.lum) / 1e3})`;
|
|
339
|
-
break;
|
|
340
|
-
}
|
|
341
|
-
case "sysClr": {
|
|
342
|
-
let n = A(e, ["val", "lastClr"]);
|
|
343
|
-
if (!n?.val || !be.has(n.val)) return;
|
|
344
|
-
t = n.lastClr === void 0 ? n.val : `${n.val} lastClr ${n.lastClr}`;
|
|
345
|
-
break;
|
|
346
|
-
}
|
|
347
|
-
default: {
|
|
348
|
-
let n = A(e, ["val"]);
|
|
349
|
-
if (!n?.val || /\s/.test(n.val) || (ye.has(n.val) ? "schemeClr" : /^[0-9A-Fa-f]{6}$/.test(n.val) ? "srgbClr" : "prstClr") !== e.name) return;
|
|
350
|
-
t = n.val;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
for (let n of u(e)) {
|
|
354
|
-
if (u(n).length > 0) return;
|
|
355
|
-
let e = A(n, ["val"]);
|
|
356
|
-
if (!e) return;
|
|
357
|
-
if (e.val !== void 0) {
|
|
358
|
-
if (!j.test(e.val)) return;
|
|
359
|
-
t += ` ${n.name} ${Number(e.val) / Se(n.name)}`;
|
|
360
|
-
} else t += ` ${n.name}`;
|
|
361
|
-
}
|
|
362
|
-
return t;
|
|
363
|
-
})(t[0]);
|
|
364
|
-
}, we = /^-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?$/i, Te = (t, n) => {
|
|
365
|
-
let r = ((e) => {
|
|
366
|
-
let t = e.trim(), n = /^[a-z]+\([^)]*\)|^[^\s,]+/i.exec(t)?.[0] ?? t, r = t.slice(n.length).split(/\s*,\s*|\s+/).filter((e) => e !== "");
|
|
367
|
-
return [n.replace(/\s+/g, ""), ...r];
|
|
368
|
-
})(n), i = r.shift(), a, o, s = /^(lrgb|hsl)\(([^,]+),([^,]+),([^)]+)\)$/.exec(i);
|
|
369
|
-
if (s?.[1] === "lrgb") a = "scrgbClr", o = [
|
|
370
|
-
["r", String(Math.round(1e3 * Number(s[2])))],
|
|
371
|
-
["g", String(Math.round(1e3 * Number(s[3])))],
|
|
372
|
-
["b", String(Math.round(1e3 * Number(s[4])))]
|
|
373
|
-
];
|
|
374
|
-
else if (s?.[1] === "hsl") a = "hslClr", o = [
|
|
375
|
-
["hue", String(Math.round(6e4 * Number(s[2])))],
|
|
376
|
-
["sat", String(Math.round(1e3 * Number(s[3])))],
|
|
377
|
-
["lum", String(Math.round(1e3 * Number(s[4])))]
|
|
378
|
-
];
|
|
379
|
-
else if (r[0] === "lastClr" || be.has(i)) a = "sysClr", o = [["val", i]], r[0] === "lastClr" && (r.shift(), o.push(["lastClr", r.shift()]));
|
|
380
|
-
else {
|
|
381
|
-
let t = ((t) => {
|
|
382
|
-
if (ye.has(t) || /^[0-9A-Fa-f]{6}$/.test(t) || /^[a-z]+$/i.test(t)) return null;
|
|
383
|
-
let n;
|
|
384
|
-
try {
|
|
385
|
-
n = new e(t);
|
|
386
|
-
} catch {
|
|
387
|
-
return null;
|
|
388
|
-
}
|
|
389
|
-
let r = n.getType();
|
|
390
|
-
return r === "hex" || r === "rgb" || r === "hsl" ? n.toHex().toString(!1).replace("#", "").toUpperCase() : null;
|
|
391
|
-
})(i);
|
|
392
|
-
a = t ? "srgbClr" : ye.has(i) ? "schemeClr" : /^[0-9A-Fa-f]{6}$/.test(i) ? "srgbClr" : "prstClr", o = [["val", t ?? i]];
|
|
393
|
-
}
|
|
394
|
-
if (r.length !== 0) {
|
|
395
|
-
t.open(k(a), o);
|
|
396
|
-
for (let e = 0; e < r.length; e++) {
|
|
397
|
-
let n = r[e];
|
|
398
|
-
e + 1 < r.length && we.test(r[e + 1]) ? t.val(k(n), String(Math.round(Number(r[++e]) * Se(n)))) : t.open(k(n), null, !0);
|
|
399
|
-
}
|
|
400
|
-
t.close(k(a));
|
|
401
|
-
} else t.open(k(a), o, !0);
|
|
402
|
-
}, M = (e, t, n, r) => {
|
|
403
|
-
n === void 0 ? e.open(k(t), r, !0) : (e.open(k(t), r), Te(e, n), e.close(k(t)));
|
|
404
|
-
}, Ee = [
|
|
405
|
-
"noFill",
|
|
406
|
-
"solidFill",
|
|
407
|
-
"gradFill",
|
|
408
|
-
"pattFill",
|
|
409
|
-
"grpFill"
|
|
410
|
-
], De = (e) => {
|
|
411
|
-
let t = A(e, [
|
|
412
|
-
"l",
|
|
413
|
-
"t",
|
|
414
|
-
"r",
|
|
415
|
-
"b"
|
|
416
|
-
]);
|
|
417
|
-
if (!t) return;
|
|
418
|
-
let n = {};
|
|
419
|
-
return t.l !== void 0 && (n.left = Number(t.l) / 1e3), t.t !== void 0 && (n.top = Number(t.t) / 1e3), t.r !== void 0 && (n.right = Number(t.r) / 1e3), t.b !== void 0 && (n.bottom = Number(t.b) / 1e3), n;
|
|
420
|
-
}, Oe = (e, t, n) => {
|
|
421
|
-
let r = [];
|
|
422
|
-
n.left !== void 0 && r.push(["l", String(Math.round(1e3 * n.left))]), n.top !== void 0 && r.push(["t", String(Math.round(1e3 * n.top))]), n.right !== void 0 && r.push(["r", String(Math.round(1e3 * n.right))]), n.bottom !== void 0 && r.push(["b", String(Math.round(1e3 * n.bottom))]), e.open(k(t), r, !0);
|
|
423
|
-
}, ke = (e) => {
|
|
424
|
-
switch (e.name) {
|
|
425
|
-
case "noFill": return u(e).length === 0 && g(e).length === 0 ? { type: t.Type.None } : void 0;
|
|
426
|
-
case "grpFill": return u(e).length === 0 && g(e).length === 0 ? { type: t.Type.Group } : void 0;
|
|
427
|
-
case "solidFill": {
|
|
428
|
-
if (g(e).length > 0) return;
|
|
429
|
-
let n = Ce(e);
|
|
430
|
-
return n === void 0 ? void 0 : n === null ? { type: t.Type.Solid } : {
|
|
431
|
-
type: t.Type.Solid,
|
|
432
|
-
color: n
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
case "gradFill": return ((e) => {
|
|
436
|
-
let n = A(e, ["rotWithShape", "flip"]);
|
|
437
|
-
if (!n) return;
|
|
438
|
-
let r = { type: t.Type.Gradient };
|
|
439
|
-
if (n.rotWithShape !== void 0) {
|
|
440
|
-
let e = y(n.rotWithShape);
|
|
441
|
-
if (e === null) return;
|
|
442
|
-
r.isRotatedWithShape = e;
|
|
443
|
-
}
|
|
444
|
-
n.flip !== void 0 && (r.flip = n.flip);
|
|
445
|
-
for (let n of u(e)) if (n.name === "gsLst") {
|
|
446
|
-
let e = [];
|
|
447
|
-
for (let t of u(n)) {
|
|
448
|
-
let n = t.name === "gs" ? A(t, ["pos"]) : null, r = n && j.test(n.pos ?? "") ? Ce(t) : void 0;
|
|
449
|
-
if (!r) return;
|
|
450
|
-
e.push({
|
|
451
|
-
offset: Number(n.pos) / 1e5,
|
|
452
|
-
color: r
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
r.stops = e;
|
|
456
|
-
} else if (n.name === "lin") {
|
|
457
|
-
let e = A(n, ["ang", "scaled"]);
|
|
458
|
-
if (!e || u(n).length > 0) return;
|
|
459
|
-
if (r.gradientType = t.GradientType.Linear, e.ang !== void 0) {
|
|
460
|
-
if (!j.test(e.ang)) return;
|
|
461
|
-
r.angle = (Number(e.ang) / 6e4 + 90) % 360;
|
|
462
|
-
}
|
|
463
|
-
if (e.scaled !== void 0) {
|
|
464
|
-
let t = y(e.scaled);
|
|
465
|
-
if (t === null) return;
|
|
466
|
-
r.scaled = t;
|
|
467
|
-
}
|
|
468
|
-
} else if (n.name === "path") {
|
|
469
|
-
let e = A(n, ["path"]);
|
|
470
|
-
if (!e) return;
|
|
471
|
-
r.gradientType = e.path === "circle" ? t.GradientType.Path : e.path;
|
|
472
|
-
let i = u(n);
|
|
473
|
-
if (i.length > 1 || i.length === 1 && i[0].name !== "fillToRect") return;
|
|
474
|
-
if (i.length === 1) {
|
|
475
|
-
let e = De(i[0]);
|
|
476
|
-
if (!e) return;
|
|
477
|
-
r.focus = {
|
|
478
|
-
left: (e.left ?? 0) / 100,
|
|
479
|
-
top: (e.top ?? 0) / 100,
|
|
480
|
-
right: 1 - (e.right ?? 0) / 100,
|
|
481
|
-
bottom: 1 - (e.bottom ?? 0) / 100
|
|
482
|
-
};
|
|
483
|
-
}
|
|
484
|
-
} else {
|
|
485
|
-
if (n.name !== "tileRect") return;
|
|
486
|
-
{
|
|
487
|
-
let e = De(n);
|
|
488
|
-
if (!e) return;
|
|
489
|
-
r.tileRect = e;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
return r;
|
|
493
|
-
})(e);
|
|
494
|
-
case "pattFill": {
|
|
495
|
-
let n = A(e, ["prst"]);
|
|
496
|
-
if (!n) return;
|
|
497
|
-
let r = { type: t.Type.Pattern };
|
|
498
|
-
n.prst !== void 0 && (r.patternType = n.prst);
|
|
499
|
-
for (let t of u(e)) {
|
|
500
|
-
let e = t.name === "fgClr" || t.name === "bgClr" ? Ce(t) : void 0;
|
|
501
|
-
if (!e) return;
|
|
502
|
-
t.name === "fgClr" ? r.foreground = e : r.background = e;
|
|
503
|
-
}
|
|
504
|
-
return r;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}, Ae = (e, n) => {
|
|
508
|
-
switch (n.type) {
|
|
509
|
-
case t.Type.None:
|
|
510
|
-
e.open(k("noFill"), null, !0);
|
|
511
|
-
return;
|
|
512
|
-
case t.Type.Group:
|
|
513
|
-
e.open(k("grpFill"), null, !0);
|
|
514
|
-
return;
|
|
515
|
-
case t.Type.Solid:
|
|
516
|
-
M(e, "solidFill", n.color);
|
|
517
|
-
return;
|
|
518
|
-
case t.Type.Gradient:
|
|
519
|
-
((e, n) => {
|
|
520
|
-
let r = [];
|
|
521
|
-
if (n.flip !== void 0 && r.push(["flip", n.flip]), n.isRotatedWithShape !== void 0 && r.push(["rotWithShape", b(n.isRotatedWithShape)]), e.open(k("gradFill"), r), n.stops) {
|
|
522
|
-
e.open(k("gsLst"));
|
|
523
|
-
for (let t of n.stops) {
|
|
524
|
-
let { offset: n, color: r } = typeof t == "string" ? {
|
|
525
|
-
offset: 0,
|
|
526
|
-
color: t
|
|
527
|
-
} : t;
|
|
528
|
-
M(e, "gs", r, [["pos", String(Math.round(1e5 * (n ?? 0)))]]);
|
|
529
|
-
}
|
|
530
|
-
e.close(k("gsLst"));
|
|
531
|
-
}
|
|
532
|
-
if (n.gradientType === t.GradientType.Linear) {
|
|
533
|
-
let t = [];
|
|
534
|
-
n.angle !== void 0 && t.push(["ang", String(Math.round((n.angle - 90 + 360) % 360 * 6e4))]), n.scaled !== void 0 && t.push(["scaled", b(n.scaled)]), e.open(k("lin"), t, !0);
|
|
535
|
-
} else if (n.gradientType !== void 0) {
|
|
536
|
-
let r = n.gradientType === t.GradientType.Path ? "circle" : n.gradientType;
|
|
537
|
-
n.focus ? (e.open(k("path"), [["path", r]]), Oe(e, "fillToRect", {
|
|
538
|
-
left: 100 * n.focus.left,
|
|
539
|
-
top: 100 * n.focus.top,
|
|
540
|
-
right: 100 * (1 - n.focus.right),
|
|
541
|
-
bottom: 100 * (1 - n.focus.bottom)
|
|
542
|
-
}), e.close(k("path"))) : e.open(k("path"), [["path", r]], !0);
|
|
543
|
-
}
|
|
544
|
-
n.tileRect && Oe(e, "tileRect", n.tileRect), e.close(k("gradFill"));
|
|
545
|
-
})(e, n);
|
|
546
|
-
return;
|
|
547
|
-
case t.Type.Pattern: {
|
|
548
|
-
let t = n, r = t.patternType === void 0 ? [] : [["prst", t.patternType]];
|
|
549
|
-
t.foreground === void 0 && t.background === void 0 ? e.open(k("pattFill"), r, !0) : (e.open(k("pattFill"), r), t.foreground !== void 0 && M(e, "fgClr", t.foreground), t.background !== void 0 && M(e, "bgClr", t.background), e.close(k("pattFill")));
|
|
550
|
-
return;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
throw Error(`A chart cannot write a fill of type '${n.type}'.`);
|
|
554
|
-
}, je = (e) => ve({
|
|
555
|
-
tags: Ee,
|
|
556
|
-
key: e,
|
|
557
|
-
ns: "a",
|
|
558
|
-
read: (e) => ke(e),
|
|
559
|
-
write: (e, t) => Ae(e, t)
|
|
560
|
-
}), Me = {
|
|
561
|
-
tags: ["effectLst"],
|
|
562
|
-
key: "effects",
|
|
563
|
-
ns: "a",
|
|
564
|
-
read: (e) => u(e).length === 0 && g(e).length === 0 ? [] : void 0,
|
|
565
|
-
write: (e, t) => {
|
|
566
|
-
if (t.length > 0) throw Error("A chart cannot write effects yet.");
|
|
567
|
-
e.open(k("effectLst"), null, !0);
|
|
568
|
-
}
|
|
569
|
-
}, Ne = {
|
|
570
|
-
rnd: "round",
|
|
571
|
-
flat: "butt",
|
|
572
|
-
sq: "square"
|
|
573
|
-
}, Pe = (e, t) => ({
|
|
574
|
-
tags: [e],
|
|
575
|
-
key: `${t}Type`,
|
|
576
|
-
ns: "a",
|
|
577
|
-
read: (e) => {
|
|
578
|
-
let t = A(e, [
|
|
579
|
-
"type",
|
|
580
|
-
"w",
|
|
581
|
-
"len"
|
|
582
|
-
]);
|
|
583
|
-
if (t && !(u(e).length > 0) && Object.keys(t).length !== 0) return t;
|
|
584
|
-
},
|
|
585
|
-
write: (t, n) => {
|
|
586
|
-
let r = [];
|
|
587
|
-
for (let e of [
|
|
588
|
-
"type",
|
|
589
|
-
"w",
|
|
590
|
-
"len"
|
|
591
|
-
]) n[e] !== void 0 && r.push([e, n[e]]);
|
|
592
|
-
t.open(k(e), r, !0);
|
|
593
|
-
},
|
|
594
|
-
get: (e) => {
|
|
595
|
-
let n = {};
|
|
596
|
-
return e[`${t}Type`] !== void 0 && (n.type = e[`${t}Type`]), e[`${t}Width`] !== void 0 && (n.w = e[`${t}Width`]), e[`${t}Length`] !== void 0 && (n.len = e[`${t}Length`]), Object.keys(n).length > 0 ? n : void 0;
|
|
597
|
-
},
|
|
598
|
-
set: (e, n) => {
|
|
599
|
-
n.type !== void 0 && (e[`${t}Type`] = n.type), n.w !== void 0 && (e[`${t}Width`] = n.w), n.len !== void 0 && (e[`${t}Length`] = n.len);
|
|
600
|
-
}
|
|
601
|
-
}), Fe = {
|
|
602
|
-
attributes: [
|
|
603
|
-
O("w", "int", "width", 12700),
|
|
604
|
-
_e("cap", "lineCap", (e) => Ne[e], (e) => Object.keys(Ne).find((t) => Ne[t] === e)),
|
|
605
|
-
O("cmpd", "str", "compound"),
|
|
606
|
-
O("algn", "str", "align")
|
|
607
|
-
],
|
|
608
|
-
fields: [
|
|
609
|
-
je("fill"),
|
|
610
|
-
{
|
|
611
|
-
tags: ["prstDash", "custDash"],
|
|
612
|
-
key: "dash",
|
|
613
|
-
ns: "a",
|
|
614
|
-
read: (e) => {
|
|
615
|
-
if (e.name === "prstDash") {
|
|
616
|
-
let t = A(e, ["val"]);
|
|
617
|
-
return t?.val !== void 0 && u(e).length === 0 ? t.val : void 0;
|
|
618
|
-
}
|
|
619
|
-
if (g(e).length > 0) return;
|
|
620
|
-
let t = [];
|
|
621
|
-
for (let n of u(e)) {
|
|
622
|
-
let e = n.name === "ds" ? A(n, ["d", "sp"]) : null;
|
|
623
|
-
if (!e || !j.test(e.d ?? "") || !j.test(e.sp ?? "")) return;
|
|
624
|
-
t.push(Number(e.d) / 1e3, Number(e.sp) / 1e3);
|
|
625
|
-
}
|
|
626
|
-
return t;
|
|
627
|
-
},
|
|
628
|
-
write: (e, t) => {
|
|
629
|
-
if (typeof t != "string") {
|
|
630
|
-
e.open(k("custDash"));
|
|
631
|
-
for (let n = 0; n < t.length; n += 2) e.open(k("ds"), [["d", String(Math.round(1e3 * t[n]))], ["sp", String(Math.round(1e3 * t[n + 1]))]], !0);
|
|
632
|
-
e.close(k("custDash"));
|
|
633
|
-
} else e.val(k("prstDash"), t);
|
|
634
|
-
}
|
|
635
|
-
},
|
|
636
|
-
{
|
|
637
|
-
tags: [
|
|
638
|
-
"round",
|
|
639
|
-
"bevel",
|
|
640
|
-
"miter"
|
|
641
|
-
],
|
|
642
|
-
key: "lineJoin",
|
|
643
|
-
ns: "a",
|
|
644
|
-
read: (e) => {
|
|
645
|
-
let t = A(e, e.name === "miter" ? ["lim"] : []);
|
|
646
|
-
if (t && !(u(e).length > 0) && (t.lim === void 0 || j.test(t.lim))) return {
|
|
647
|
-
join: e.name,
|
|
648
|
-
limit: t.lim === void 0 ? void 0 : Number(t.lim) / 1e5
|
|
649
|
-
};
|
|
650
|
-
},
|
|
651
|
-
write: (e, t) => {
|
|
652
|
-
e.open(k(t.join), t.limit === void 0 ? null : [["lim", String(Math.round(1e5 * t.limit))]], !0);
|
|
653
|
-
},
|
|
654
|
-
get: (e) => e.lineJoin ? {
|
|
655
|
-
join: e.lineJoin,
|
|
656
|
-
limit: e.miterLimit
|
|
657
|
-
} : void 0,
|
|
658
|
-
set: (e, t) => {
|
|
659
|
-
e.lineJoin = t.join, t.limit !== void 0 && (e.miterLimit = t.limit);
|
|
660
|
-
}
|
|
661
|
-
},
|
|
662
|
-
Pe("headEnd", "head"),
|
|
663
|
-
Pe("tailEnd", "tail")
|
|
664
|
-
]
|
|
665
|
-
}, Ie = (e) => ve(D("ln", Fe, e, { ns: "a" })), Le = { fields: [
|
|
666
|
-
je("fill"),
|
|
667
|
-
Ie("stroke"),
|
|
668
|
-
Me
|
|
669
|
-
] }, N = (e, t, r) => ({
|
|
670
|
-
tags: [e],
|
|
671
|
-
key: t,
|
|
672
|
-
ns: "a",
|
|
673
|
-
read: (e) => {
|
|
674
|
-
let t = A(e, ["typeface"]);
|
|
675
|
-
if (!(t?.typeface === void 0 || u(e).length > 0)) return r && t.typeface === `+mn-${r}` ? n.ThemeFamily.Body : r && t.typeface === `+mj-${r}` ? n.ThemeFamily.Heading : t.typeface;
|
|
676
|
-
},
|
|
677
|
-
write: (t, i) => {
|
|
678
|
-
let a = r ? i === n.ThemeFamily.Body ? `+mn-${r}` : i === n.ThemeFamily.Heading ? `+mj-${r}` : i : i;
|
|
679
|
-
t.open(k(e), [["typeface", a]], !0);
|
|
680
|
-
}
|
|
681
|
-
}), Re = (e, t, n) => {
|
|
682
|
-
let r = Object.fromEntries(Object.entries(n).map(([e, t]) => [t, e]));
|
|
683
|
-
return _e(e, t, (e) => r[e], (e) => n[e] ?? e);
|
|
684
|
-
}, P = {
|
|
685
|
-
attributes: [
|
|
686
|
-
O("lang", "str", "language"),
|
|
687
|
-
O("altLang", "str", "alternateLanguage"),
|
|
688
|
-
O("sz", "int", "size", 100),
|
|
689
|
-
_e("b", "weight", (e) => {
|
|
690
|
-
let t = y(e);
|
|
691
|
-
return t === null ? void 0 : t ? 700 : 400;
|
|
692
|
-
}, (e) => b(e >= 600)),
|
|
693
|
-
_e("i", "style", (e) => {
|
|
694
|
-
let t = y(e);
|
|
695
|
-
return t === null ? void 0 : t ? "italic" : "normal";
|
|
696
|
-
}, (e) => b(e === "italic")),
|
|
697
|
-
Re("u", "underline", {
|
|
698
|
-
none: "none",
|
|
699
|
-
words: "words",
|
|
700
|
-
single: "sng",
|
|
701
|
-
double: "dbl",
|
|
702
|
-
heavy: "heavy",
|
|
703
|
-
dotted: "dotted",
|
|
704
|
-
dottedHeavy: "dottedHeavy",
|
|
705
|
-
dash: "dash",
|
|
706
|
-
dashHeavy: "dashHeavy",
|
|
707
|
-
dashLong: "dashLong",
|
|
708
|
-
dashLongHeavy: "dashLongHeavy",
|
|
709
|
-
dotDash: "dotDash",
|
|
710
|
-
dotDashHeavy: "dotDashHeavy",
|
|
711
|
-
dotDotDash: "dotDotDash",
|
|
712
|
-
dotDotDashHeavy: "dotDotDashHeavy",
|
|
713
|
-
wavy: "wavy",
|
|
714
|
-
wavyHeavy: "wavyHeavy",
|
|
715
|
-
wavyDouble: "wavyDbl"
|
|
716
|
-
}),
|
|
717
|
-
Re("strike", "strike", {
|
|
718
|
-
none: "noStrike",
|
|
719
|
-
single: "sngStrike",
|
|
720
|
-
double: "dblStrike"
|
|
721
|
-
}),
|
|
722
|
-
O("kern", "int", "kerning", 100),
|
|
723
|
-
Re("cap", "capitals", {
|
|
724
|
-
none: "none",
|
|
725
|
-
small: "small",
|
|
726
|
-
all: "all"
|
|
727
|
-
}),
|
|
728
|
-
O("spc", "int", "letterSpacing", 100),
|
|
729
|
-
O("normalizeH", "bool", "normalizeHeight"),
|
|
730
|
-
O("baseline", "int", "baseline", 1e3)
|
|
731
|
-
],
|
|
732
|
-
fields: [
|
|
733
|
-
Ie("outline"),
|
|
734
|
-
je("color"),
|
|
735
|
-
Me,
|
|
736
|
-
N("latin", "latin", "lt"),
|
|
737
|
-
N("ea", "eastAsian", "ea"),
|
|
738
|
-
N("cs", "complexScript", "cs"),
|
|
739
|
-
N("sym", "symbol")
|
|
740
|
-
]
|
|
741
|
-
}, ze = {
|
|
742
|
-
attributes: [O("algn", "str", "align"), O("rtl", "bool", "rtl")],
|
|
743
|
-
fields: [D("defRPr", P, "defaultRun", { ns: "a" })]
|
|
744
|
-
}, Be = { fields: [D("rPr", P, "rPr", { ns: "a" }), {
|
|
745
|
-
tags: ["t"],
|
|
746
|
-
key: "text",
|
|
747
|
-
ns: "a",
|
|
748
|
-
read: (e) => {
|
|
749
|
-
if (u(e).length > 0) return;
|
|
750
|
-
let t = !1;
|
|
751
|
-
for (let [n, r] of g(e)) if (n !== "xmlns" && !n.startsWith("xmlns:")) {
|
|
752
|
-
if (n !== "xml:space" || r !== "preserve") return;
|
|
753
|
-
t = !0;
|
|
754
|
-
}
|
|
755
|
-
return {
|
|
756
|
-
text: d(e),
|
|
757
|
-
preserve: t
|
|
758
|
-
};
|
|
759
|
-
},
|
|
760
|
-
get: (e) => e.text === void 0 ? void 0 : {
|
|
761
|
-
text: e.text,
|
|
762
|
-
preserve: !0 === e.preserveSpace
|
|
763
|
-
},
|
|
764
|
-
set: (e, t) => {
|
|
765
|
-
e.text = t.text, t.preserve && (e.preserveSpace = !0);
|
|
766
|
-
},
|
|
767
|
-
write: (e, t) => {
|
|
768
|
-
let n = k("t"), r = t.preserve ? [["xml:space", "preserve"]] : null;
|
|
769
|
-
t.text === "" ? e.open(n, r, !0) : e.open(n, r).text(t.text).close(n);
|
|
770
|
-
}
|
|
771
|
-
}] }, Ve = {
|
|
772
|
-
attributes: [O("id", "str", "id"), O("type", "str", "type")],
|
|
773
|
-
fields: Be.fields
|
|
774
|
-
}, He = { fields: [D("rPr", P, "rPr", { ns: "a" })] }, Ue = { fields: [
|
|
775
|
-
D("pPr", ze, "pPr", { ns: "a" }),
|
|
776
|
-
{
|
|
777
|
-
tags: [
|
|
778
|
-
"r",
|
|
779
|
-
"br",
|
|
780
|
-
"fld"
|
|
781
|
-
],
|
|
782
|
-
key: "runs",
|
|
783
|
-
ns: "a",
|
|
784
|
-
many: !0,
|
|
785
|
-
read: (e, t, n) => {
|
|
786
|
-
if (e.name === "br") return {
|
|
787
|
-
...S(e, He, t, n),
|
|
788
|
-
text: "\n",
|
|
789
|
-
break: !0
|
|
790
|
-
};
|
|
791
|
-
if (e.name === "r") {
|
|
792
|
-
let r = S(e, Be, t, n);
|
|
793
|
-
return r.text === void 0 ? void 0 : r;
|
|
794
|
-
}
|
|
795
|
-
let { id: r, type: i, ...a } = S(e, Ve, t, n);
|
|
796
|
-
return r === void 0 ? void 0 : (a.text ??= "", a.field = i === void 0 ? { id: r } : {
|
|
797
|
-
id: r,
|
|
798
|
-
type: i
|
|
799
|
-
}, a);
|
|
800
|
-
},
|
|
801
|
-
write: (e, t) => {
|
|
802
|
-
if (t.break) {
|
|
803
|
-
let { text: n, break: r, ...i } = t;
|
|
804
|
-
C(e, k("br"), i, He);
|
|
805
|
-
} else if (t.field) {
|
|
806
|
-
let { field: n, ...r } = t;
|
|
807
|
-
C(e, k("fld"), {
|
|
808
|
-
...r,
|
|
809
|
-
id: n.id,
|
|
810
|
-
type: n.type
|
|
811
|
-
}, Ve);
|
|
812
|
-
} else C(e, k("r"), t, Be);
|
|
813
|
-
}
|
|
814
|
-
},
|
|
815
|
-
D("endParaRPr", P, "endRun", { ns: "a" })
|
|
816
|
-
] }, We = { fields: [
|
|
817
|
-
D("bodyPr", {
|
|
818
|
-
attributes: [
|
|
819
|
-
O("rot", "int", "rotation", 6e4),
|
|
820
|
-
O("spcFirstLastPara", "bool", "spcFirstLastPara"),
|
|
821
|
-
O("vertOverflow", "str", "vertOverflow"),
|
|
822
|
-
O("horzOverflow", "str", "horzOverflow"),
|
|
823
|
-
O("vert", "str", "vert"),
|
|
824
|
-
O("wrap", "str", "wrap"),
|
|
825
|
-
O("lIns", "int", "lIns"),
|
|
826
|
-
O("tIns", "int", "tIns"),
|
|
827
|
-
O("rIns", "int", "rIns"),
|
|
828
|
-
O("bIns", "int", "bIns"),
|
|
829
|
-
O("anchor", "str", "anchor"),
|
|
830
|
-
O("anchorCtr", "bool", "anchorCtr")
|
|
831
|
-
],
|
|
832
|
-
fields: []
|
|
833
|
-
}, "bodyPr", { ns: "a" }),
|
|
834
|
-
D("lstStyle", { fields: [] }, "lstStyle", { ns: "a" }),
|
|
835
|
-
D("p", Ue, "paragraphs", {
|
|
836
|
-
ns: "a",
|
|
837
|
-
many: !0
|
|
838
|
-
})
|
|
839
|
-
] }, F = () => D("spPr", Le), I = () => D("txPr", We), Ge = {
|
|
840
|
-
attributes: [O("idx", "int"), O("formatCode", "str")],
|
|
841
|
-
fields: [E("v")]
|
|
842
|
-
}, Ke = { fields: [
|
|
843
|
-
E("formatCode"),
|
|
844
|
-
T("ptCount", "int"),
|
|
845
|
-
D("pt", Ge, "points", { many: !0 })
|
|
846
|
-
] }, qe = { fields: [T("ptCount", "int"), D("pt", Ge, "points", { many: !0 })] }, Je = { fields: [T("ptCount", "int"), D("lvl", { fields: [D("pt", Ge, "points", { many: !0 })] }, "levels", { many: !0 })] }, Ye = { fields: [E("f"), D("numCache", Ke, "cache")] }, Xe = { fields: [E("f"), D("strCache", qe, "cache")] }, Ze = { fields: [E("f"), D("multiLvlStrCache", Je, "cache")] }, Qe = D("datalabelsRange", { fields: [E("f", "f", "c15"), D("dlblRangeCache", qe, "cache", { ns: "c15" })] }, "datalabelsRange", { ns: "c15" }), $e = {
|
|
847
|
-
...Qe,
|
|
848
|
-
read: (e, t, n) => t[h.c15] === ne ? Qe.read(e, t, n) : void 0
|
|
849
|
-
}, et = T("showDataLabelsRange", "bool", "showDataLabelsRange", "c15"), tt = {
|
|
850
|
-
...et,
|
|
851
|
-
read: (e, t, n) => t[h.c15] === ne ? et.read(e, t, n) : void 0
|
|
852
|
-
}, nt = { fields: [D("ext", {
|
|
853
|
-
attributes: [O("uri", "str")],
|
|
854
|
-
fields: [$e, tt],
|
|
855
|
-
declares: (e) => e.datalabelsRange !== void 0 || e.showDataLabelsRange !== void 0 ? [[`xmlns:${h.c15}`, ne]] : []
|
|
856
|
-
}, "extensions", { many: !0 })] }, rt = { fields: [
|
|
857
|
-
D("multiLvlStrRef", Ze),
|
|
858
|
-
D("numRef", Ye),
|
|
859
|
-
D("numLit", Ke),
|
|
860
|
-
D("strRef", Xe),
|
|
861
|
-
D("strLit", qe)
|
|
862
|
-
] }, it = { fields: [D("strRef", Xe), E("v")] }, at = { fields: [D("strRef", Xe), D("rich", We)] }, ot = {
|
|
863
|
-
attributes: [O("formatCode", "str"), O("sourceLinked", "bool")],
|
|
864
|
-
fields: []
|
|
865
|
-
}, L = { fields: [D("manualLayout", { fields: [
|
|
866
|
-
T("layoutTarget", "str"),
|
|
867
|
-
T("xMode", "str"),
|
|
868
|
-
T("yMode", "str"),
|
|
869
|
-
T("wMode", "str"),
|
|
870
|
-
T("hMode", "str"),
|
|
871
|
-
T("x", "num"),
|
|
872
|
-
T("y", "num"),
|
|
873
|
-
T("w", "num"),
|
|
874
|
-
T("h", "num")
|
|
875
|
-
] })] }, st = { fields: [
|
|
876
|
-
D("tx", at),
|
|
877
|
-
D("layout", L),
|
|
878
|
-
T("overlay", "bool"),
|
|
879
|
-
F(),
|
|
880
|
-
I()
|
|
881
|
-
] }, ct = { fields: [F()] }, lt = { fields: [
|
|
882
|
-
T("symbol", "str"),
|
|
883
|
-
T("size", "int"),
|
|
884
|
-
F()
|
|
885
|
-
] }, ut = { fields: [
|
|
886
|
-
T("idx", "int"),
|
|
887
|
-
T("invertIfNegative", "bool"),
|
|
888
|
-
D("marker", lt),
|
|
889
|
-
T("bubble3D", "bool"),
|
|
890
|
-
T("explosion", "int"),
|
|
891
|
-
F()
|
|
892
|
-
] }, dt = () => [
|
|
893
|
-
D("numFmt", ot),
|
|
894
|
-
F(),
|
|
895
|
-
I(),
|
|
896
|
-
T("dLblPos", "str"),
|
|
897
|
-
T("showLegendKey", "bool"),
|
|
898
|
-
T("showVal", "bool"),
|
|
899
|
-
T("showCatName", "bool"),
|
|
900
|
-
T("showSerName", "bool"),
|
|
901
|
-
T("showPercent", "bool"),
|
|
902
|
-
T("showBubbleSize", "bool"),
|
|
903
|
-
E("separator")
|
|
904
|
-
], ft = { fields: [
|
|
905
|
-
D("dLbl", { fields: [
|
|
906
|
-
T("idx", "int"),
|
|
907
|
-
T("delete", "bool"),
|
|
908
|
-
D("layout", L),
|
|
909
|
-
D("tx", at),
|
|
910
|
-
...dt(),
|
|
911
|
-
D("extLst", nt)
|
|
912
|
-
] }, "labels", { many: !0 }),
|
|
913
|
-
T("delete", "bool"),
|
|
914
|
-
...dt(),
|
|
915
|
-
T("showLeaderLines", "bool"),
|
|
916
|
-
D("leaderLines", ct),
|
|
917
|
-
D("extLst", nt)
|
|
918
|
-
] }, pt = { fields: [
|
|
919
|
-
D("layout", L),
|
|
920
|
-
D("tx", at),
|
|
921
|
-
D("numFmt", ot),
|
|
922
|
-
F(),
|
|
923
|
-
I()
|
|
924
|
-
] }, mt = { fields: [
|
|
925
|
-
E("name"),
|
|
926
|
-
F(),
|
|
927
|
-
T("trendlineType", "str"),
|
|
928
|
-
T("order", "int"),
|
|
929
|
-
T("period", "int"),
|
|
930
|
-
T("forward", "num"),
|
|
931
|
-
T("backward", "num"),
|
|
932
|
-
T("intercept", "num"),
|
|
933
|
-
T("dispRSqr", "bool"),
|
|
934
|
-
T("dispEq", "bool"),
|
|
935
|
-
D("trendlineLbl", pt)
|
|
936
|
-
] }, ht = { fields: [
|
|
937
|
-
T("errDir", "str"),
|
|
938
|
-
T("errBarType", "str"),
|
|
939
|
-
T("errValType", "str"),
|
|
940
|
-
T("noEndCap", "bool"),
|
|
941
|
-
D("plus", rt),
|
|
942
|
-
D("minus", rt),
|
|
943
|
-
T("val", "num"),
|
|
944
|
-
F(),
|
|
945
|
-
D("extLst", nt)
|
|
946
|
-
] }, gt = { fields: [
|
|
947
|
-
T("gapWidth", "int"),
|
|
948
|
-
D("upBars", ct),
|
|
949
|
-
D("downBars", ct)
|
|
950
|
-
] }, R = () => [
|
|
951
|
-
T("idx", "int"),
|
|
952
|
-
T("order", "int"),
|
|
953
|
-
D("tx", it),
|
|
954
|
-
F()
|
|
955
|
-
], z = () => D("dPt", ut, "points", { many: !0 }), B = () => D("dLbls", ft), V = () => D("trendline", mt, "trendlines", { many: !0 }), H = () => D("errBars", ht, "errBars", { many: !0 }), U = (e) => D(e, rt), W = () => D("extLst", nt), _t = {
|
|
956
|
-
bar: { fields: [
|
|
957
|
-
...R(),
|
|
958
|
-
T("invertIfNegative", "bool"),
|
|
959
|
-
z(),
|
|
960
|
-
B(),
|
|
961
|
-
V(),
|
|
962
|
-
H(),
|
|
963
|
-
U("cat"),
|
|
964
|
-
U("val"),
|
|
965
|
-
T("shape", "str"),
|
|
966
|
-
W()
|
|
967
|
-
] },
|
|
968
|
-
line: { fields: [
|
|
969
|
-
...R(),
|
|
970
|
-
D("marker", lt),
|
|
971
|
-
z(),
|
|
972
|
-
B(),
|
|
973
|
-
V(),
|
|
974
|
-
H(),
|
|
975
|
-
U("cat"),
|
|
976
|
-
U("val"),
|
|
977
|
-
T("smooth", "bool"),
|
|
978
|
-
W()
|
|
979
|
-
] },
|
|
980
|
-
area: { fields: [
|
|
981
|
-
...R(),
|
|
982
|
-
z(),
|
|
983
|
-
B(),
|
|
984
|
-
V(),
|
|
985
|
-
H(),
|
|
986
|
-
U("cat"),
|
|
987
|
-
U("val"),
|
|
988
|
-
W()
|
|
989
|
-
] },
|
|
990
|
-
pie: { fields: [
|
|
991
|
-
...R(),
|
|
992
|
-
T("explosion", "int"),
|
|
993
|
-
z(),
|
|
994
|
-
B(),
|
|
995
|
-
U("cat"),
|
|
996
|
-
U("val"),
|
|
997
|
-
W()
|
|
998
|
-
] },
|
|
999
|
-
scatter: { fields: [
|
|
1000
|
-
...R(),
|
|
1001
|
-
D("marker", lt),
|
|
1002
|
-
z(),
|
|
1003
|
-
B(),
|
|
1004
|
-
V(),
|
|
1005
|
-
H(),
|
|
1006
|
-
U("xVal"),
|
|
1007
|
-
U("yVal"),
|
|
1008
|
-
T("smooth", "bool"),
|
|
1009
|
-
W()
|
|
1010
|
-
] },
|
|
1011
|
-
bubble: { fields: [
|
|
1012
|
-
...R(),
|
|
1013
|
-
T("invertIfNegative", "bool"),
|
|
1014
|
-
z(),
|
|
1015
|
-
B(),
|
|
1016
|
-
V(),
|
|
1017
|
-
H(),
|
|
1018
|
-
U("xVal"),
|
|
1019
|
-
U("yVal"),
|
|
1020
|
-
U("bubbleSize"),
|
|
1021
|
-
T("bubble3D", "bool"),
|
|
1022
|
-
W()
|
|
1023
|
-
] },
|
|
1024
|
-
radar: { fields: [
|
|
1025
|
-
...R(),
|
|
1026
|
-
D("marker", lt),
|
|
1027
|
-
z(),
|
|
1028
|
-
B(),
|
|
1029
|
-
U("cat"),
|
|
1030
|
-
U("val"),
|
|
1031
|
-
W()
|
|
1032
|
-
] },
|
|
1033
|
-
surface: { fields: [
|
|
1034
|
-
...R(),
|
|
1035
|
-
U("cat"),
|
|
1036
|
-
U("val"),
|
|
1037
|
-
W()
|
|
1038
|
-
] }
|
|
1039
|
-
}, G = (e) => D("ser", _t[e], "series", { many: !0 }), K = () => ({
|
|
1040
|
-
...T("axId", "int", "axIds"),
|
|
1041
|
-
many: !0
|
|
1042
|
-
}), q = (e, t) => D(e, ct, e, { many: t }), vt = {
|
|
1043
|
-
tags: ["custSplit"],
|
|
1044
|
-
key: "custSplit",
|
|
1045
|
-
ns: "c",
|
|
1046
|
-
read: (e, t, n) => {
|
|
1047
|
-
let r = S(e, { fields: [{
|
|
1048
|
-
...T("secondPiePt", "int", "points"),
|
|
1049
|
-
many: !0
|
|
1050
|
-
}] }, t, n);
|
|
1051
|
-
return r.unknown ? void 0 : r.points ?? [];
|
|
1052
|
-
},
|
|
1053
|
-
write: (e, t) => {
|
|
1054
|
-
C(e, "c:custSplit", { points: t }, { fields: [{
|
|
1055
|
-
...T("secondPiePt", "int", "points"),
|
|
1056
|
-
many: !0
|
|
1057
|
-
}] });
|
|
1058
|
-
}
|
|
1059
|
-
}, yt = { fields: [T("idx", "int"), F()] }, bt = {
|
|
1060
|
-
tags: ["bandFmts"],
|
|
1061
|
-
key: "bandFmts",
|
|
1062
|
-
ns: "c",
|
|
1063
|
-
read: (e, t, n) => {
|
|
1064
|
-
let r = S(e, { fields: [D("bandFmt", yt, "formats", { many: !0 })] }, t, n);
|
|
1065
|
-
return r.unknown ? void 0 : r.formats ?? [];
|
|
1066
|
-
},
|
|
1067
|
-
write: (e, t) => {
|
|
1068
|
-
C(e, "c:bandFmts", { formats: t }, { fields: [D("bandFmt", yt, "formats", { many: !0 })] });
|
|
1069
|
-
}
|
|
1070
|
-
}, xt = {
|
|
1071
|
-
areaChart: {
|
|
1072
|
-
type: "area",
|
|
1073
|
-
codec: { fields: [
|
|
1074
|
-
T("grouping", "str"),
|
|
1075
|
-
T("varyColors", "bool"),
|
|
1076
|
-
G("area"),
|
|
1077
|
-
B(),
|
|
1078
|
-
q("dropLines"),
|
|
1079
|
-
K()
|
|
1080
|
-
] }
|
|
1081
|
-
},
|
|
1082
|
-
area3DChart: {
|
|
1083
|
-
type: "area",
|
|
1084
|
-
is3D: !0,
|
|
1085
|
-
codec: { fields: [
|
|
1086
|
-
T("grouping", "str"),
|
|
1087
|
-
T("varyColors", "bool"),
|
|
1088
|
-
G("area"),
|
|
1089
|
-
B(),
|
|
1090
|
-
q("dropLines"),
|
|
1091
|
-
T("gapDepth", "int"),
|
|
1092
|
-
K()
|
|
1093
|
-
] }
|
|
1094
|
-
},
|
|
1095
|
-
lineChart: {
|
|
1096
|
-
type: "line",
|
|
1097
|
-
codec: { fields: [
|
|
1098
|
-
T("grouping", "str"),
|
|
1099
|
-
T("varyColors", "bool"),
|
|
1100
|
-
G("line"),
|
|
1101
|
-
B(),
|
|
1102
|
-
q("dropLines"),
|
|
1103
|
-
q("hiLowLines"),
|
|
1104
|
-
D("upDownBars", gt),
|
|
1105
|
-
T("marker", "bool"),
|
|
1106
|
-
T("smooth", "bool"),
|
|
1107
|
-
K()
|
|
1108
|
-
] }
|
|
1109
|
-
},
|
|
1110
|
-
line3DChart: {
|
|
1111
|
-
type: "line",
|
|
1112
|
-
is3D: !0,
|
|
1113
|
-
codec: { fields: [
|
|
1114
|
-
T("grouping", "str"),
|
|
1115
|
-
T("varyColors", "bool"),
|
|
1116
|
-
G("line"),
|
|
1117
|
-
B(),
|
|
1118
|
-
q("dropLines"),
|
|
1119
|
-
T("gapDepth", "int"),
|
|
1120
|
-
K()
|
|
1121
|
-
] }
|
|
1122
|
-
},
|
|
1123
|
-
stockChart: {
|
|
1124
|
-
type: "stock",
|
|
1125
|
-
codec: { fields: [
|
|
1126
|
-
G("line"),
|
|
1127
|
-
B(),
|
|
1128
|
-
q("dropLines"),
|
|
1129
|
-
q("hiLowLines"),
|
|
1130
|
-
D("upDownBars", gt),
|
|
1131
|
-
K()
|
|
1132
|
-
] }
|
|
1133
|
-
},
|
|
1134
|
-
radarChart: {
|
|
1135
|
-
type: "radar",
|
|
1136
|
-
codec: { fields: [
|
|
1137
|
-
T("radarStyle", "str"),
|
|
1138
|
-
T("varyColors", "bool"),
|
|
1139
|
-
G("radar"),
|
|
1140
|
-
B(),
|
|
1141
|
-
K()
|
|
1142
|
-
] }
|
|
1143
|
-
},
|
|
1144
|
-
scatterChart: {
|
|
1145
|
-
type: "scatter",
|
|
1146
|
-
codec: { fields: [
|
|
1147
|
-
T("scatterStyle", "str"),
|
|
1148
|
-
T("varyColors", "bool"),
|
|
1149
|
-
G("scatter"),
|
|
1150
|
-
B(),
|
|
1151
|
-
K()
|
|
1152
|
-
] }
|
|
1153
|
-
},
|
|
1154
|
-
pieChart: {
|
|
1155
|
-
type: "pie",
|
|
1156
|
-
codec: { fields: [
|
|
1157
|
-
T("varyColors", "bool"),
|
|
1158
|
-
G("pie"),
|
|
1159
|
-
B(),
|
|
1160
|
-
T("firstSliceAng", "int")
|
|
1161
|
-
] }
|
|
1162
|
-
},
|
|
1163
|
-
pie3DChart: {
|
|
1164
|
-
type: "pie",
|
|
1165
|
-
is3D: !0,
|
|
1166
|
-
codec: { fields: [
|
|
1167
|
-
T("varyColors", "bool"),
|
|
1168
|
-
G("pie"),
|
|
1169
|
-
B()
|
|
1170
|
-
] }
|
|
1171
|
-
},
|
|
1172
|
-
doughnutChart: {
|
|
1173
|
-
type: "doughnut",
|
|
1174
|
-
codec: { fields: [
|
|
1175
|
-
T("varyColors", "bool"),
|
|
1176
|
-
G("pie"),
|
|
1177
|
-
B(),
|
|
1178
|
-
T("firstSliceAng", "int"),
|
|
1179
|
-
T("holeSize", "int")
|
|
1180
|
-
] }
|
|
1181
|
-
},
|
|
1182
|
-
barChart: {
|
|
1183
|
-
type: "bar",
|
|
1184
|
-
codec: { fields: [
|
|
1185
|
-
T("barDir", "str"),
|
|
1186
|
-
T("grouping", "str"),
|
|
1187
|
-
T("varyColors", "bool"),
|
|
1188
|
-
G("bar"),
|
|
1189
|
-
B(),
|
|
1190
|
-
T("gapWidth", "int"),
|
|
1191
|
-
T("overlap", "int"),
|
|
1192
|
-
q("serLines", !0),
|
|
1193
|
-
K()
|
|
1194
|
-
] }
|
|
1195
|
-
},
|
|
1196
|
-
bar3DChart: {
|
|
1197
|
-
type: "bar",
|
|
1198
|
-
is3D: !0,
|
|
1199
|
-
codec: { fields: [
|
|
1200
|
-
T("barDir", "str"),
|
|
1201
|
-
T("grouping", "str"),
|
|
1202
|
-
T("varyColors", "bool"),
|
|
1203
|
-
G("bar"),
|
|
1204
|
-
B(),
|
|
1205
|
-
T("gapWidth", "int"),
|
|
1206
|
-
T("gapDepth", "int"),
|
|
1207
|
-
T("shape", "str"),
|
|
1208
|
-
K()
|
|
1209
|
-
] }
|
|
1210
|
-
},
|
|
1211
|
-
ofPieChart: {
|
|
1212
|
-
type: "ofPie",
|
|
1213
|
-
codec: { fields: [
|
|
1214
|
-
T("ofPieType", "str"),
|
|
1215
|
-
T("varyColors", "bool"),
|
|
1216
|
-
G("pie"),
|
|
1217
|
-
B(),
|
|
1218
|
-
T("gapWidth", "int"),
|
|
1219
|
-
T("splitType", "str"),
|
|
1220
|
-
T("splitPos", "num"),
|
|
1221
|
-
vt,
|
|
1222
|
-
T("secondPieSize", "int"),
|
|
1223
|
-
q("serLines", !0)
|
|
1224
|
-
] }
|
|
1225
|
-
},
|
|
1226
|
-
surfaceChart: {
|
|
1227
|
-
type: "surface",
|
|
1228
|
-
codec: { fields: [
|
|
1229
|
-
T("wireframe", "bool"),
|
|
1230
|
-
G("surface"),
|
|
1231
|
-
bt,
|
|
1232
|
-
K()
|
|
1233
|
-
] }
|
|
1234
|
-
},
|
|
1235
|
-
surface3DChart: {
|
|
1236
|
-
type: "surface",
|
|
1237
|
-
is3D: !0,
|
|
1238
|
-
codec: { fields: [
|
|
1239
|
-
T("wireframe", "bool"),
|
|
1240
|
-
G("surface"),
|
|
1241
|
-
bt,
|
|
1242
|
-
K()
|
|
1243
|
-
] }
|
|
1244
|
-
},
|
|
1245
|
-
bubbleChart: {
|
|
1246
|
-
type: "bubble",
|
|
1247
|
-
codec: { fields: [
|
|
1248
|
-
T("varyColors", "bool"),
|
|
1249
|
-
G("bubble"),
|
|
1250
|
-
B(),
|
|
1251
|
-
T("bubble3D", "bool"),
|
|
1252
|
-
T("bubbleScale", "int"),
|
|
1253
|
-
T("showNegBubbles", "bool"),
|
|
1254
|
-
T("sizeRepresents", "str"),
|
|
1255
|
-
K()
|
|
1256
|
-
] }
|
|
1257
|
-
}
|
|
1258
|
-
}, St = {
|
|
1259
|
-
tags: Object.keys(xt),
|
|
1260
|
-
key: "groups",
|
|
1261
|
-
ns: "c",
|
|
1262
|
-
many: !0,
|
|
1263
|
-
read: (e, t, n) => {
|
|
1264
|
-
let { type: r, is3D: i, codec: a } = xt[e.name], o = S(e, a, t, n);
|
|
1265
|
-
return o.series ??= [], o.axIds ??= [], i ? {
|
|
1266
|
-
type: r,
|
|
1267
|
-
is3D: i,
|
|
1268
|
-
...o
|
|
1269
|
-
} : {
|
|
1270
|
-
type: r,
|
|
1271
|
-
...o
|
|
1272
|
-
};
|
|
1273
|
-
},
|
|
1274
|
-
write: (e, t) => {
|
|
1275
|
-
let n = ((e) => `${e.type}${e.is3D ? "3D" : ""}Chart`)(t), { type: r, is3D: i, ...a } = Et(t);
|
|
1276
|
-
C(e, `c:${n}`, a, xt[n].codec);
|
|
1277
|
-
}
|
|
1278
|
-
}, Ct = [
|
|
1279
|
-
"ctr",
|
|
1280
|
-
"l",
|
|
1281
|
-
"r",
|
|
1282
|
-
"t",
|
|
1283
|
-
"b"
|
|
1284
|
-
], wt = (e) => {
|
|
1285
|
-
switch (e.type) {
|
|
1286
|
-
case "bar": return e.is3D ? [] : e.grouping === "stacked" || e.grouping === "percentStacked" ? [
|
|
1287
|
-
"ctr",
|
|
1288
|
-
"inEnd",
|
|
1289
|
-
"inBase"
|
|
1290
|
-
] : [
|
|
1291
|
-
"ctr",
|
|
1292
|
-
"inEnd",
|
|
1293
|
-
"inBase",
|
|
1294
|
-
"outEnd"
|
|
1295
|
-
];
|
|
1296
|
-
case "line": return e.is3D ? [] : Ct;
|
|
1297
|
-
case "stock":
|
|
1298
|
-
case "scatter":
|
|
1299
|
-
case "bubble": return Ct;
|
|
1300
|
-
case "pie":
|
|
1301
|
-
case "ofPie": return [
|
|
1302
|
-
"ctr",
|
|
1303
|
-
"inEnd",
|
|
1304
|
-
"outEnd",
|
|
1305
|
-
"bestFit"
|
|
1306
|
-
];
|
|
1307
|
-
default: return [];
|
|
1308
|
-
}
|
|
1309
|
-
}, Tt = (e, t) => t?.dLblPos !== void 0 && !e.includes(t.dLblPos), Et = (e) => {
|
|
1310
|
-
let t = wt(e), n = (e) => {
|
|
1311
|
-
if (!Tt(t, e)) return e;
|
|
1312
|
-
let { dLblPos: n, ...r } = e;
|
|
1313
|
-
return r;
|
|
1314
|
-
}, r = (e) => e.labels ? {
|
|
1315
|
-
...n(e),
|
|
1316
|
-
labels: e.labels.map(n)
|
|
1317
|
-
} : n(e);
|
|
1318
|
-
return {
|
|
1319
|
-
...e,
|
|
1320
|
-
...e.dLbls ? { dLbls: r(e.dLbls) } : {},
|
|
1321
|
-
series: e.series.map((e) => e.dLbls ? {
|
|
1322
|
-
...e,
|
|
1323
|
-
dLbls: r(e.dLbls)
|
|
1324
|
-
} : e)
|
|
1325
|
-
};
|
|
1326
|
-
}, Dt = { fields: [
|
|
1327
|
-
T("logBase", "num"),
|
|
1328
|
-
T("orientation", "str"),
|
|
1329
|
-
T("max", "num"),
|
|
1330
|
-
T("min", "num")
|
|
1331
|
-
] }, Ot = { fields: [
|
|
1332
|
-
D("layout", L),
|
|
1333
|
-
D("tx", at),
|
|
1334
|
-
F(),
|
|
1335
|
-
I()
|
|
1336
|
-
] }, kt = { fields: [
|
|
1337
|
-
T("custUnit", "num"),
|
|
1338
|
-
T("builtInUnit", "str"),
|
|
1339
|
-
D("dispUnitsLbl", Ot)
|
|
1340
|
-
] }, At = () => [
|
|
1341
|
-
T("axId", "int"),
|
|
1342
|
-
D("scaling", Dt),
|
|
1343
|
-
T("delete", "bool"),
|
|
1344
|
-
T("axPos", "str"),
|
|
1345
|
-
q("majorGridlines"),
|
|
1346
|
-
q("minorGridlines"),
|
|
1347
|
-
D("title", st),
|
|
1348
|
-
D("numFmt", ot),
|
|
1349
|
-
T("majorTickMark", "str"),
|
|
1350
|
-
T("minorTickMark", "str"),
|
|
1351
|
-
T("tickLblPos", "str"),
|
|
1352
|
-
F(),
|
|
1353
|
-
I(),
|
|
1354
|
-
T("crossAx", "int"),
|
|
1355
|
-
T("crosses", "str"),
|
|
1356
|
-
T("crossesAt", "num")
|
|
1357
|
-
], J = {
|
|
1358
|
-
valAx: {
|
|
1359
|
-
type: "val",
|
|
1360
|
-
codec: { fields: [
|
|
1361
|
-
...At(),
|
|
1362
|
-
T("crossBetween", "str"),
|
|
1363
|
-
T("majorUnit", "num"),
|
|
1364
|
-
T("minorUnit", "num"),
|
|
1365
|
-
D("dispUnits", kt)
|
|
1366
|
-
] }
|
|
1367
|
-
},
|
|
1368
|
-
catAx: {
|
|
1369
|
-
type: "cat",
|
|
1370
|
-
codec: { fields: [
|
|
1371
|
-
...At(),
|
|
1372
|
-
T("auto", "bool"),
|
|
1373
|
-
T("lblAlgn", "str"),
|
|
1374
|
-
T("lblOffset", "int"),
|
|
1375
|
-
T("tickLblSkip", "int"),
|
|
1376
|
-
T("tickMarkSkip", "int"),
|
|
1377
|
-
T("noMultiLvlLbl", "bool")
|
|
1378
|
-
] }
|
|
1379
|
-
},
|
|
1380
|
-
dateAx: {
|
|
1381
|
-
type: "date",
|
|
1382
|
-
codec: { fields: [
|
|
1383
|
-
...At(),
|
|
1384
|
-
T("auto", "bool"),
|
|
1385
|
-
T("lblOffset", "int"),
|
|
1386
|
-
T("baseTimeUnit", "str"),
|
|
1387
|
-
T("majorUnit", "num"),
|
|
1388
|
-
T("majorTimeUnit", "str"),
|
|
1389
|
-
T("minorUnit", "num"),
|
|
1390
|
-
T("minorTimeUnit", "str")
|
|
1391
|
-
] }
|
|
1392
|
-
},
|
|
1393
|
-
serAx: {
|
|
1394
|
-
type: "ser",
|
|
1395
|
-
codec: { fields: [
|
|
1396
|
-
...At(),
|
|
1397
|
-
T("tickLblSkip", "int"),
|
|
1398
|
-
T("tickMarkSkip", "int")
|
|
1399
|
-
] }
|
|
1400
|
-
}
|
|
1401
|
-
}, jt = {
|
|
1402
|
-
tags: Object.keys(J),
|
|
1403
|
-
key: "axes",
|
|
1404
|
-
ns: "c",
|
|
1405
|
-
many: !0,
|
|
1406
|
-
read: (e, t, n) => ({
|
|
1407
|
-
type: J[e.name].type,
|
|
1408
|
-
...S(e, J[e.name].codec, t, n)
|
|
1409
|
-
}),
|
|
1410
|
-
write: (e, t) => {
|
|
1411
|
-
let { type: n, ...r } = t, i = `${n}Ax`;
|
|
1412
|
-
C(e, `c:${i}`, r, J[i].codec);
|
|
1413
|
-
}
|
|
1414
|
-
}, Mt = { fields: [
|
|
1415
|
-
T("showHorzBorder", "bool"),
|
|
1416
|
-
T("showVertBorder", "bool"),
|
|
1417
|
-
T("showOutline", "bool"),
|
|
1418
|
-
T("showKeys", "bool"),
|
|
1419
|
-
F(),
|
|
1420
|
-
I()
|
|
1421
|
-
] }, Nt = {
|
|
1422
|
-
fields: [
|
|
1423
|
-
D("layout", L),
|
|
1424
|
-
St,
|
|
1425
|
-
jt,
|
|
1426
|
-
D("dTable", Mt),
|
|
1427
|
-
F()
|
|
1428
|
-
],
|
|
1429
|
-
afterRead: (e) => {
|
|
1430
|
-
e.groups ??= [], e.axes ??= [];
|
|
1431
|
-
}
|
|
1432
|
-
}, Pt = { fields: [
|
|
1433
|
-
T("rotX", "int"),
|
|
1434
|
-
T("hPercent", "int"),
|
|
1435
|
-
T("rotY", "int"),
|
|
1436
|
-
T("depthPercent", "int"),
|
|
1437
|
-
T("rAngAx", "bool"),
|
|
1438
|
-
T("perspective", "int")
|
|
1439
|
-
] }, Ft = { fields: [T("thickness", "int"), F()] }, It = { fields: [
|
|
1440
|
-
T("idx", "int"),
|
|
1441
|
-
T("delete", "bool"),
|
|
1442
|
-
I()
|
|
1443
|
-
] }, Lt = { fields: [
|
|
1444
|
-
T("legendPos", "str"),
|
|
1445
|
-
D("legendEntry", It, "entries", { many: !0 }),
|
|
1446
|
-
D("layout", L),
|
|
1447
|
-
T("overlay", "bool"),
|
|
1448
|
-
F(),
|
|
1449
|
-
I()
|
|
1450
|
-
] }, Rt = { fields: [
|
|
1451
|
-
D("title", st),
|
|
1452
|
-
T("autoTitleDeleted", "bool"),
|
|
1453
|
-
D("view3D", Pt),
|
|
1454
|
-
D("floor", Ft),
|
|
1455
|
-
D("sideWall", Ft),
|
|
1456
|
-
D("backWall", Ft),
|
|
1457
|
-
D("plotArea", Nt),
|
|
1458
|
-
D("legend", Lt),
|
|
1459
|
-
T("plotVisOnly", "bool"),
|
|
1460
|
-
T("dispBlanksAs", "str"),
|
|
1461
|
-
T("showDLblsOverMax", "bool")
|
|
1462
|
-
] }, zt = { fields: [E("name"), T("fmtId", "int")] }, Bt = { fields: [
|
|
1463
|
-
T("date1904", "bool"),
|
|
1464
|
-
T("lang", "str"),
|
|
1465
|
-
T("roundedCorners", "bool"),
|
|
1466
|
-
T("style", "int"),
|
|
1467
|
-
D("pivotSource", zt),
|
|
1468
|
-
D("chart", Rt),
|
|
1469
|
-
F(),
|
|
1470
|
-
I()
|
|
1471
|
-
] }, Vt = (e) => {
|
|
1472
|
-
let t = l(e);
|
|
1473
|
-
if (!t || t.name !== "chartSpace") return null;
|
|
1474
|
-
let n = _(t, ce);
|
|
1475
|
-
if (!ae(ue(t, n))) return null;
|
|
1476
|
-
let r = new he(e, n);
|
|
1477
|
-
return {
|
|
1478
|
-
model: S(t, Bt, ce, r),
|
|
1479
|
-
kept: r.kept,
|
|
1480
|
-
reordered: r.reordered
|
|
1481
|
-
};
|
|
1482
|
-
}, Ht = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n", Ut = (e) => {
|
|
1483
|
-
let t = { ...e.unknown?.attributes }, n = (e, n) => {
|
|
1484
|
-
t[`xmlns:${e}`] ??= n;
|
|
1485
|
-
};
|
|
1486
|
-
n(h.c, f), n(h.a, p), n(h.r, m);
|
|
1487
|
-
let r = new v().raw(Ht);
|
|
1488
|
-
return ((e, t) => {
|
|
1489
|
-
C(e, "c:chartSpace", t, Bt);
|
|
1490
|
-
})(r, {
|
|
1491
|
-
...e,
|
|
1492
|
-
unknown: {
|
|
1493
|
-
...e.unknown,
|
|
1494
|
-
attributes: t
|
|
1495
|
-
}
|
|
1496
|
-
}), r.toString();
|
|
1497
|
-
}, Wt = (e, t) => {
|
|
1498
|
-
if (t && (n = e, !(n.chart?.plotArea?.groups ?? []).some((e) => {
|
|
1499
|
-
let t = wt(e), n = (e) => Tt(t, e) || !!e?.labels?.some((e) => Tt(t, e));
|
|
1500
|
-
return n(e.dLbls) || e.series.some((e) => n(e.dLbls));
|
|
1501
|
-
}))) {
|
|
1502
|
-
let n = Vt(t);
|
|
1503
|
-
if (n && JSON.stringify(n.model) === JSON.stringify(e)) return t;
|
|
1504
|
-
}
|
|
1505
|
-
var n;
|
|
1506
|
-
return Ut(e);
|
|
1507
|
-
}, Y = (e, t, n = e, r) => D(e, t, n, {
|
|
1508
|
-
ns: "cx",
|
|
1509
|
-
many: r
|
|
1510
|
-
}), X = () => Y("spPr", Le), Z = () => Y("txPr", We), Gt = () => Y("numFmt", ot), Kt = (e) => ({
|
|
1511
|
-
name: e,
|
|
1512
|
-
key: e,
|
|
1513
|
-
read: (e) => {
|
|
1514
|
-
if (e === "auto") return "auto";
|
|
1515
|
-
let t = Number(e);
|
|
1516
|
-
return e.trim() !== "" && Number.isFinite(t) ? t : void 0;
|
|
1517
|
-
},
|
|
1518
|
-
write: (e) => String(e)
|
|
1519
|
-
}), qt = (e) => g(e).filter(([e]) => e !== "xmlns" && !e.startsWith("xmlns:")), Jt = (e) => ({
|
|
1520
|
-
tags: [e],
|
|
1521
|
-
key: e,
|
|
1522
|
-
ns: "cx",
|
|
1523
|
-
read: (e) => {
|
|
1524
|
-
if (u(e).length > 0) return;
|
|
1525
|
-
let t = { f: d(e) };
|
|
1526
|
-
for (let [n, r] of qt(e)) {
|
|
1527
|
-
if (n !== "dir" || r !== "col" && r !== "row") return;
|
|
1528
|
-
t.dir = r;
|
|
1529
|
-
}
|
|
1530
|
-
return t.f === "" ? void 0 : t;
|
|
1531
|
-
},
|
|
1532
|
-
write: (t, n) => {
|
|
1533
|
-
let r = w("cx", e);
|
|
1534
|
-
t.open(r, n.dir ? [["dir", n.dir]] : null).text(n.f).close(r);
|
|
1535
|
-
}
|
|
1536
|
-
}), Yt = {
|
|
1537
|
-
attributes: [
|
|
1538
|
-
O("ptCount", "int"),
|
|
1539
|
-
O("formatCode", "str"),
|
|
1540
|
-
O("name", "str")
|
|
1541
|
-
],
|
|
1542
|
-
fields: [{
|
|
1543
|
-
tags: ["pt"],
|
|
1544
|
-
key: "points",
|
|
1545
|
-
ns: "cx",
|
|
1546
|
-
many: !0,
|
|
1547
|
-
read: (e) => {
|
|
1548
|
-
if (u(e).length > 0) return;
|
|
1549
|
-
let t = qt(e);
|
|
1550
|
-
if (t.length !== 1 || t[0][0] !== "idx") return;
|
|
1551
|
-
let n = Number(t[0][1]);
|
|
1552
|
-
return Number.isInteger(n) && x(String(n)) === x(t[0][1]) ? {
|
|
1553
|
-
idx: n,
|
|
1554
|
-
v: d(e)
|
|
1555
|
-
} : void 0;
|
|
1556
|
-
},
|
|
1557
|
-
write: (e, t) => {
|
|
1558
|
-
let n = w("cx", "pt");
|
|
1559
|
-
t.v === "" ? e.open(n, [["idx", String(t.idx)]], !0) : e.open(n, [["idx", String(t.idx)]]).text(t.v).close(n);
|
|
1560
|
-
}
|
|
1561
|
-
}]
|
|
1562
|
-
}, Xt = {
|
|
1563
|
-
attributes: [O("type", "str")],
|
|
1564
|
-
fields: [
|
|
1565
|
-
Jt("f"),
|
|
1566
|
-
Jt("nf"),
|
|
1567
|
-
Y("lvl", Yt, "levels", !0)
|
|
1568
|
-
]
|
|
1569
|
-
}, Zt = /* @__PURE__ */ new Set([
|
|
1570
|
-
"val",
|
|
1571
|
-
"x",
|
|
1572
|
-
"y",
|
|
1573
|
-
"size",
|
|
1574
|
-
"colorVal"
|
|
1575
|
-
]), Qt = /* @__PURE__ */ new Set([
|
|
1576
|
-
"cat",
|
|
1577
|
-
"colorStr",
|
|
1578
|
-
"entityId"
|
|
1579
|
-
]), $t = {
|
|
1580
|
-
fields: [Y("data", {
|
|
1581
|
-
attributes: [O("id", "int")],
|
|
1582
|
-
fields: [{
|
|
1583
|
-
tags: ["numDim", "strDim"],
|
|
1584
|
-
key: "dimensions",
|
|
1585
|
-
ns: "cx",
|
|
1586
|
-
many: !0,
|
|
1587
|
-
read: (e, t, n) => {
|
|
1588
|
-
let r = S(e, Xt, t, n);
|
|
1589
|
-
return (e.name === "numDim" ? Zt : Qt).has(r.type) ? r : void 0;
|
|
1590
|
-
},
|
|
1591
|
-
write: (e, t) => {
|
|
1592
|
-
C(e, w("cx", Zt.has(t.type) ? "numDim" : "strDim"), t, Xt);
|
|
1593
|
-
}
|
|
1594
|
-
}],
|
|
1595
|
-
afterRead: (e) => {
|
|
1596
|
-
e.dimensions ??= [];
|
|
1597
|
-
}
|
|
1598
|
-
}, "data", !0)],
|
|
1599
|
-
afterRead: (e) => {
|
|
1600
|
-
e.data ??= [];
|
|
1601
|
-
}
|
|
1602
|
-
}, en = { fields: [Y("txData", { fields: [Jt("f"), E("v", "v", "cx")] }), Y("rich", We)] }, tn = () => [
|
|
1603
|
-
O("pos", "str"),
|
|
1604
|
-
O("align", "str"),
|
|
1605
|
-
O("overlay", "bool")
|
|
1606
|
-
], nn = {
|
|
1607
|
-
attributes: tn(),
|
|
1608
|
-
fields: [
|
|
1609
|
-
Y("tx", en),
|
|
1610
|
-
X(),
|
|
1611
|
-
Z()
|
|
1612
|
-
]
|
|
1613
|
-
}, rn = {
|
|
1614
|
-
attributes: tn(),
|
|
1615
|
-
fields: [X(), Z()]
|
|
1616
|
-
}, an = {
|
|
1617
|
-
attributes: [
|
|
1618
|
-
O("seriesName", "bool"),
|
|
1619
|
-
O("categoryName", "bool"),
|
|
1620
|
-
O("value", "bool")
|
|
1621
|
-
],
|
|
1622
|
-
fields: []
|
|
1623
|
-
}, on = () => [
|
|
1624
|
-
Gt(),
|
|
1625
|
-
X(),
|
|
1626
|
-
Z(),
|
|
1627
|
-
Y("visibility", an),
|
|
1628
|
-
E("separator", "separator", "cx")
|
|
1629
|
-
], sn = {
|
|
1630
|
-
attributes: [O("idx", "int"), O("pos", "str")],
|
|
1631
|
-
fields: on()
|
|
1632
|
-
}, cn = {
|
|
1633
|
-
attributes: [O("idx", "int")],
|
|
1634
|
-
fields: []
|
|
1635
|
-
}, ln = {
|
|
1636
|
-
attributes: [O("pos", "str")],
|
|
1637
|
-
fields: [
|
|
1638
|
-
...on(),
|
|
1639
|
-
Y("dataLabel", sn, "labels", !0),
|
|
1640
|
-
Y("dataLabelHidden", cn, "hiddenLabels", !0)
|
|
1641
|
-
]
|
|
1642
|
-
}, un = {
|
|
1643
|
-
attributes: [O("idx", "int")],
|
|
1644
|
-
fields: [X()]
|
|
1645
|
-
}, dn = {
|
|
1646
|
-
attributes: [
|
|
1647
|
-
"connectorLines",
|
|
1648
|
-
"meanLine",
|
|
1649
|
-
"meanMarker",
|
|
1650
|
-
"nonoutliers",
|
|
1651
|
-
"outliers"
|
|
1652
|
-
].map((e) => O(e, "bool")),
|
|
1653
|
-
fields: []
|
|
1654
|
-
}, fn = {
|
|
1655
|
-
attributes: [
|
|
1656
|
-
O("intervalClosed", "str"),
|
|
1657
|
-
Kt("underflow"),
|
|
1658
|
-
Kt("overflow")
|
|
1659
|
-
],
|
|
1660
|
-
fields: [T("binSize", "num", "binSize", "cx"), T("binCount", "int", "binCount", "cx")]
|
|
1661
|
-
}, pn = { fields: [{
|
|
1662
|
-
...T("idx", "int", "indexes", "cx"),
|
|
1663
|
-
many: !0
|
|
1664
|
-
}] }, mn = { fields: [
|
|
1665
|
-
T("parentLabelLayout", "str", "parentLabelLayout", "cx"),
|
|
1666
|
-
T("regionLabelLayout", "str", "regionLabelLayout", "cx"),
|
|
1667
|
-
Y("visibility", dn),
|
|
1668
|
-
Y("aggregation", { fields: [] }),
|
|
1669
|
-
Y("binning", fn),
|
|
1670
|
-
Y("statistics", {
|
|
1671
|
-
attributes: [O("quartileMethod", "str")],
|
|
1672
|
-
fields: []
|
|
1673
|
-
}),
|
|
1674
|
-
{
|
|
1675
|
-
tags: ["subtotals"],
|
|
1676
|
-
key: "subtotals",
|
|
1677
|
-
ns: "cx",
|
|
1678
|
-
read: (e, t, n) => {
|
|
1679
|
-
let r = S(e, pn, t, n);
|
|
1680
|
-
return r.unknown ? void 0 : r.indexes ?? [];
|
|
1681
|
-
},
|
|
1682
|
-
write: (e, t) => {
|
|
1683
|
-
C(e, w("cx", "subtotals"), { indexes: t }, pn);
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
] }, hn = {
|
|
1687
|
-
attributes: [
|
|
1688
|
-
O("layoutId", "str"),
|
|
1689
|
-
O("hidden", "bool"),
|
|
1690
|
-
O("ownerIdx", "int"),
|
|
1691
|
-
O("uniqueId", "str"),
|
|
1692
|
-
O("formatIdx", "int")
|
|
1693
|
-
],
|
|
1694
|
-
fields: [
|
|
1695
|
-
Y("tx", en),
|
|
1696
|
-
X(),
|
|
1697
|
-
Y("dataPt", un, "points", !0),
|
|
1698
|
-
Y("dataLabels", ln),
|
|
1699
|
-
T("dataId", "int", "dataId", "cx"),
|
|
1700
|
-
Y("layoutPr", mn),
|
|
1701
|
-
{
|
|
1702
|
-
...T("axisId", "int", "axisIds", "cx"),
|
|
1703
|
-
many: !0
|
|
1704
|
-
}
|
|
1705
|
-
]
|
|
1706
|
-
}, gn = {
|
|
1707
|
-
fields: [Y("plotSurface", { fields: [X()] }), Y("series", hn, "series", !0)],
|
|
1708
|
-
afterRead: (e) => {
|
|
1709
|
-
e.series ??= [];
|
|
1710
|
-
}
|
|
1711
|
-
}, _n = { fields: [
|
|
1712
|
-
Y("tx", en),
|
|
1713
|
-
X(),
|
|
1714
|
-
Z()
|
|
1715
|
-
] }, vn = { fields: [X()] }, yn = {
|
|
1716
|
-
attributes: [O("type", "str")],
|
|
1717
|
-
fields: []
|
|
1718
|
-
}, bn = {
|
|
1719
|
-
attributes: [O("id", "int"), O("hidden", "bool")],
|
|
1720
|
-
fields: [
|
|
1721
|
-
Y("catScaling", {
|
|
1722
|
-
attributes: [O("gapWidth", "num")],
|
|
1723
|
-
fields: []
|
|
1724
|
-
}),
|
|
1725
|
-
Y("valScaling", {
|
|
1726
|
-
attributes: [
|
|
1727
|
-
"max",
|
|
1728
|
-
"min",
|
|
1729
|
-
"majorUnit",
|
|
1730
|
-
"minorUnit"
|
|
1731
|
-
].map((e) => O(e, "num")),
|
|
1732
|
-
fields: []
|
|
1733
|
-
}),
|
|
1734
|
-
Y("title", _n),
|
|
1735
|
-
Y("units", {
|
|
1736
|
-
attributes: [O("unit", "str")],
|
|
1737
|
-
fields: [Y("unitsLabel", _n)]
|
|
1738
|
-
}),
|
|
1739
|
-
Y("majorGridlines", vn),
|
|
1740
|
-
Y("minorGridlines", vn),
|
|
1741
|
-
Y("majorTickMarks", yn),
|
|
1742
|
-
Y("minorTickMarks", yn),
|
|
1743
|
-
Y("tickLabels", { fields: [] }),
|
|
1744
|
-
Gt(),
|
|
1745
|
-
X(),
|
|
1746
|
-
Z()
|
|
1747
|
-
]
|
|
1748
|
-
}, xn = {
|
|
1749
|
-
fields: [
|
|
1750
|
-
Y("plotAreaRegion", gn),
|
|
1751
|
-
Y("axis", bn, "axes", !0),
|
|
1752
|
-
X()
|
|
1753
|
-
],
|
|
1754
|
-
afterRead: (e) => {
|
|
1755
|
-
e.axes ??= [];
|
|
1756
|
-
}
|
|
1757
|
-
}, Sn = { fields: [
|
|
1758
|
-
Y("title", nn),
|
|
1759
|
-
Y("plotArea", xn),
|
|
1760
|
-
Y("legend", rn)
|
|
1761
|
-
] }, Cn = { fields: [
|
|
1762
|
-
Y("chartData", $t),
|
|
1763
|
-
Y("chart", Sn),
|
|
1764
|
-
X(),
|
|
1765
|
-
Z()
|
|
1766
|
-
] }, wn = {
|
|
1767
|
-
waterfall: "waterfall",
|
|
1768
|
-
clusteredColumn: "histogram",
|
|
1769
|
-
boxWhisker: "boxWhisker",
|
|
1770
|
-
treemap: "treemap",
|
|
1771
|
-
sunburst: "sunburst",
|
|
1772
|
-
funnel: "funnel",
|
|
1773
|
-
regionMap: "regionMap"
|
|
1774
|
-
}, Tn = Object.fromEntries(Object.entries(wn).map(([e, t]) => [t, e])), En = new Set(Object.values(wn)), Dn = "paretoLine", On = {
|
|
1775
|
-
cat: "cat",
|
|
1776
|
-
val: "val",
|
|
1777
|
-
x: "xVal",
|
|
1778
|
-
y: "yVal",
|
|
1779
|
-
size: "bubbleSize",
|
|
1780
|
-
colorVal: "color",
|
|
1781
|
-
colorStr: "color",
|
|
1782
|
-
entityId: "entityId"
|
|
1783
|
-
}, kn = /* @__PURE__ */ new Set([
|
|
1784
|
-
"val",
|
|
1785
|
-
"x",
|
|
1786
|
-
"y",
|
|
1787
|
-
"size",
|
|
1788
|
-
"colorVal"
|
|
1789
|
-
]), An = [
|
|
1790
|
-
"cat",
|
|
1791
|
-
"colorStr",
|
|
1792
|
-
"entityId",
|
|
1793
|
-
"x",
|
|
1794
|
-
"y",
|
|
1795
|
-
"val",
|
|
1796
|
-
"size",
|
|
1797
|
-
"colorVal"
|
|
1798
|
-
], Q = (e) => {
|
|
1799
|
-
for (let t of Object.keys(e)) e[t] === void 0 && delete e[t];
|
|
1800
|
-
return e;
|
|
1801
|
-
}, $ = (e) => Q({
|
|
1802
|
-
f: e.f,
|
|
1803
|
-
dir: e.dir
|
|
1804
|
-
}), jn = (e) => e && Q({
|
|
1805
|
-
strRef: e.txData?.f ? $(e.txData.f) : void 0,
|
|
1806
|
-
v: e.txData?.v,
|
|
1807
|
-
rich: e.rich,
|
|
1808
|
-
unknown: e.unknown
|
|
1809
|
-
}), Mn = (e) => e && Q({
|
|
1810
|
-
tx: jn(e.tx),
|
|
1811
|
-
overlay: e.overlay,
|
|
1812
|
-
spPr: e.spPr,
|
|
1813
|
-
txPr: e.txPr,
|
|
1814
|
-
pos: e.pos,
|
|
1815
|
-
align: e.align,
|
|
1816
|
-
unknown: e.unknown
|
|
1817
|
-
}), Nn = (e) => Q({
|
|
1818
|
-
numFmt: e.numFmt,
|
|
1819
|
-
spPr: e.spPr,
|
|
1820
|
-
txPr: e.txPr,
|
|
1821
|
-
dLblPos: e.pos,
|
|
1822
|
-
showSerName: e.visibility?.seriesName,
|
|
1823
|
-
showCatName: e.visibility?.categoryName,
|
|
1824
|
-
showVal: e.visibility?.value,
|
|
1825
|
-
separator: e.separator,
|
|
1826
|
-
unknown: e.unknown
|
|
1827
|
-
}), Pn = (e) => {
|
|
1828
|
-
if (!e) return;
|
|
1829
|
-
let t = Nn(e), n = [...(e.labels ?? []).map((e) => ({
|
|
1830
|
-
idx: e.idx,
|
|
1831
|
-
...Nn(e)
|
|
1832
|
-
})), ...(e.hiddenLabels ?? []).map((e) => ({
|
|
1833
|
-
idx: e.idx,
|
|
1834
|
-
delete: !0
|
|
1835
|
-
}))];
|
|
1836
|
-
return n.length > 0 && (t.labels = n), t;
|
|
1837
|
-
}, Fn = (e, t) => {
|
|
1838
|
-
let n = (e ?? []).map((e) => ({ ...e }));
|
|
1839
|
-
for (let e of [...t ?? []].sort((e, t) => e - t)) {
|
|
1840
|
-
let t = n.find((t) => t.idx === e);
|
|
1841
|
-
t ? t.subtotal = !0 : n.push({
|
|
1842
|
-
idx: e,
|
|
1843
|
-
subtotal: !0
|
|
1844
|
-
});
|
|
1845
|
-
}
|
|
1846
|
-
return n.length > 0 ? n : void 0;
|
|
1847
|
-
}, In = (e) => {
|
|
1848
|
-
if (!e) return;
|
|
1849
|
-
let { subtotals: t, ...n } = e;
|
|
1850
|
-
return Object.keys(n).length > 0 ? n : void 0;
|
|
1851
|
-
}, Ln = (e) => Q({
|
|
1852
|
-
ptCount: e.ptCount,
|
|
1853
|
-
formatCode: e.formatCode,
|
|
1854
|
-
name: e.name,
|
|
1855
|
-
points: (e.points ?? []).map((e) => ({
|
|
1856
|
-
idx: e.idx,
|
|
1857
|
-
v: e.v
|
|
1858
|
-
})),
|
|
1859
|
-
unknown: e.unknown
|
|
1860
|
-
}), Rn = (e) => {
|
|
1861
|
-
let t = kn.has(e.type), n = e.levels?.map(Ln), r = {};
|
|
1862
|
-
return e.f ? r[t ? "numRef" : "strRef"] = Q({
|
|
1863
|
-
...$(e.f),
|
|
1864
|
-
cache: n ? { levels: n } : void 0
|
|
1865
|
-
}) : r[t ? "numLit" : "strLit"] = Q({ levels: n }), e.nf && (r.nf = $(e.nf)), e.unknown && (r.unknown = e.unknown), r;
|
|
1866
|
-
}, zn = (e, t) => {
|
|
1867
|
-
let n = Q({
|
|
1868
|
-
idx: e.formatIdx,
|
|
1869
|
-
hidden: e.hidden,
|
|
1870
|
-
uniqueId: e.uniqueId,
|
|
1871
|
-
tx: jn(e.tx),
|
|
1872
|
-
spPr: e.spPr,
|
|
1873
|
-
points: Fn(e.points, e.layoutPr?.subtotals),
|
|
1874
|
-
dLbls: Pn(e.dataLabels),
|
|
1875
|
-
layoutPr: In(e.layoutPr),
|
|
1876
|
-
unknown: e.unknown
|
|
1877
|
-
});
|
|
1878
|
-
for (let e of t?.dimensions ?? []) {
|
|
1879
|
-
let t = On[e.type];
|
|
1880
|
-
t && !n[t] && (n[t] = Rn(e));
|
|
1881
|
-
}
|
|
1882
|
-
return n;
|
|
1883
|
-
}, Bn = (e) => Q({
|
|
1884
|
-
idx: e.formatIdx,
|
|
1885
|
-
hidden: e.hidden,
|
|
1886
|
-
uniqueId: e.uniqueId,
|
|
1887
|
-
tx: jn(e.tx),
|
|
1888
|
-
spPr: e.spPr,
|
|
1889
|
-
points: Fn(e.points, e.layoutPr?.subtotals),
|
|
1890
|
-
dLbls: Pn(e.dataLabels),
|
|
1891
|
-
layoutPr: In(e.layoutPr),
|
|
1892
|
-
axIds: e.axisIds,
|
|
1893
|
-
unknown: e.unknown
|
|
1894
|
-
}), Vn = (e, t) => {
|
|
1895
|
-
let n = new Map(t.map((e) => [e.id, e])), r = [], i = [], a = null;
|
|
1896
|
-
for (let t of e?.series ?? []) {
|
|
1897
|
-
if (t.layoutId === Dn) {
|
|
1898
|
-
let e = t.ownerIdx === void 0 ? null : i[t.ownerIdx];
|
|
1899
|
-
e && !e.cumulativeLine && (e.cumulativeLine = Bn(t)), i.push(null);
|
|
1900
|
-
continue;
|
|
1901
|
-
}
|
|
1902
|
-
let e = wn[t.layoutId] ?? t.layoutId, o = t.axisIds ?? [];
|
|
1903
|
-
a && a.type === e && JSON.stringify(a.axIds) === JSON.stringify(o) || (a = {
|
|
1904
|
-
type: e,
|
|
1905
|
-
series: [],
|
|
1906
|
-
axIds: o
|
|
1907
|
-
}, r.push(a));
|
|
1908
|
-
let s = zn(t, t.dataId === void 0 ? void 0 : n.get(t.dataId));
|
|
1909
|
-
a.series.push(s), i.push(s);
|
|
1910
|
-
}
|
|
1911
|
-
return r;
|
|
1912
|
-
}, Hn = (e) => {
|
|
1913
|
-
let t = e.catScaling ?? e.valScaling;
|
|
1914
|
-
return Q({
|
|
1915
|
-
type: e.catScaling || !e.valScaling ? "cat" : "val",
|
|
1916
|
-
axId: e.id,
|
|
1917
|
-
scaling: Q({
|
|
1918
|
-
max: e.valScaling?.max,
|
|
1919
|
-
min: e.valScaling?.min,
|
|
1920
|
-
gapWidth: e.catScaling?.gapWidth,
|
|
1921
|
-
unknown: t?.unknown
|
|
1922
|
-
}),
|
|
1923
|
-
delete: e.hidden,
|
|
1924
|
-
majorGridlines: e.majorGridlines,
|
|
1925
|
-
minorGridlines: e.minorGridlines,
|
|
1926
|
-
title: Mn(e.title),
|
|
1927
|
-
numFmt: e.numFmt,
|
|
1928
|
-
majorTickMark: e.majorTickMarks?.type,
|
|
1929
|
-
minorTickMark: e.minorTickMarks?.type,
|
|
1930
|
-
tickLblPos: e.tickLabels ? void 0 : "none",
|
|
1931
|
-
spPr: e.spPr,
|
|
1932
|
-
txPr: e.txPr,
|
|
1933
|
-
majorUnit: e.valScaling?.majorUnit,
|
|
1934
|
-
minorUnit: e.valScaling?.minorUnit,
|
|
1935
|
-
dispUnits: e.units && Q({
|
|
1936
|
-
builtInUnit: e.units.unit,
|
|
1937
|
-
dispUnitsLbl: Mn(e.units.unitsLabel),
|
|
1938
|
-
unknown: e.units.unknown
|
|
1939
|
-
}),
|
|
1940
|
-
unknown: e.unknown
|
|
1941
|
-
});
|
|
1942
|
-
}, Un = (e) => e && Q({
|
|
1943
|
-
txData: e.strRef || e.v !== void 0 ? Q({
|
|
1944
|
-
f: e.strRef ? $(e.strRef) : void 0,
|
|
1945
|
-
v: e.v
|
|
1946
|
-
}) : void 0,
|
|
1947
|
-
rich: e.rich,
|
|
1948
|
-
unknown: e.unknown
|
|
1949
|
-
}), Wn = (e) => e && Q({
|
|
1950
|
-
tx: Un(e.tx),
|
|
1951
|
-
spPr: e.spPr,
|
|
1952
|
-
txPr: e.txPr,
|
|
1953
|
-
unknown: e.unknown
|
|
1954
|
-
}), Gn = (e) => {
|
|
1955
|
-
let t = e.showSerName !== void 0 || e.showCatName !== void 0 || e.showVal !== void 0;
|
|
1956
|
-
return Q({
|
|
1957
|
-
pos: e.dLblPos,
|
|
1958
|
-
numFmt: e.numFmt,
|
|
1959
|
-
spPr: e.spPr,
|
|
1960
|
-
txPr: e.txPr,
|
|
1961
|
-
visibility: t ? Q({
|
|
1962
|
-
seriesName: e.showSerName,
|
|
1963
|
-
categoryName: e.showCatName,
|
|
1964
|
-
value: e.showVal
|
|
1965
|
-
}) : void 0,
|
|
1966
|
-
separator: e.separator,
|
|
1967
|
-
unknown: e.unknown
|
|
1968
|
-
});
|
|
1969
|
-
}, Kn = (e) => !0 === e.delete && Object.keys(e).every((e) => e === "idx" || e === "delete"), qn = (e) => {
|
|
1970
|
-
if (!e) return;
|
|
1971
|
-
let t = Gn(e), n = (e.labels ?? []).filter((e) => !Kn(e)).map((e) => ({
|
|
1972
|
-
idx: e.idx,
|
|
1973
|
-
...Gn(e)
|
|
1974
|
-
})), r = (e.labels ?? []).filter(Kn).map((e) => ({ idx: e.idx }));
|
|
1975
|
-
return n.length > 0 && (t.labels = n), r.length > 0 && (t.hiddenLabels = r), t;
|
|
1976
|
-
}, Jn = (e) => {
|
|
1977
|
-
let t = (e ?? []).filter((e) => Object.keys(e).some((e) => e !== "idx" && e !== "subtotal")).map(({ subtotal: e, ...t }) => t);
|
|
1978
|
-
return t.length > 0 ? t : void 0;
|
|
1979
|
-
}, Yn = (e, t, n) => {
|
|
1980
|
-
let r = (t ?? []).filter((e) => e.subtotal).map((e) => e.idx).sort((e, t) => e - t);
|
|
1981
|
-
return r.length !== 0 || n ? {
|
|
1982
|
-
...e,
|
|
1983
|
-
subtotals: r
|
|
1984
|
-
} : e;
|
|
1985
|
-
}, Xn = (e) => Q({
|
|
1986
|
-
ptCount: e.ptCount,
|
|
1987
|
-
formatCode: e.formatCode,
|
|
1988
|
-
name: e.name,
|
|
1989
|
-
points: e.points.length > 0 ? e.points.map((e) => ({
|
|
1990
|
-
idx: e.idx,
|
|
1991
|
-
v: e.v
|
|
1992
|
-
})) : void 0,
|
|
1993
|
-
unknown: e.unknown
|
|
1994
|
-
}), Zn = (e, t) => e === "color" ? t.strRef || t.strLit ? "colorStr" : "colorVal" : Object.keys(On).find((t) => On[t] === e), Qn = (e) => {
|
|
1995
|
-
let t = [];
|
|
1996
|
-
for (let n of [
|
|
1997
|
-
"cat",
|
|
1998
|
-
"val",
|
|
1999
|
-
"xVal",
|
|
2000
|
-
"yVal",
|
|
2001
|
-
"bubbleSize",
|
|
2002
|
-
"color",
|
|
2003
|
-
"entityId"
|
|
2004
|
-
]) {
|
|
2005
|
-
let r = e[n];
|
|
2006
|
-
if (!r) continue;
|
|
2007
|
-
let i = r.numRef ?? r.strRef, a = (i ? i.cache : r.numLit ?? r.strLit)?.levels;
|
|
2008
|
-
t.push(Q({
|
|
2009
|
-
type: Zn(n, r),
|
|
2010
|
-
f: i ? $(i) : void 0,
|
|
2011
|
-
nf: r.nf ? $(r.nf) : void 0,
|
|
2012
|
-
levels: a && a.length > 0 ? a.map(Xn) : void 0,
|
|
2013
|
-
unknown: r.unknown
|
|
2014
|
-
}));
|
|
2015
|
-
}
|
|
2016
|
-
return t.sort((e, t) => An.indexOf(e.type) - An.indexOf(t.type));
|
|
2017
|
-
}, $n = (e) => {
|
|
2018
|
-
let t = e.scaling ?? {}, n = e.type === "cat" || e.type === "date";
|
|
2019
|
-
return Q({
|
|
2020
|
-
id: e.axId,
|
|
2021
|
-
hidden: e.delete,
|
|
2022
|
-
catScaling: n ? Q({
|
|
2023
|
-
gapWidth: t.gapWidth,
|
|
2024
|
-
unknown: t.unknown
|
|
2025
|
-
}) : void 0,
|
|
2026
|
-
valScaling: n ? void 0 : Q({
|
|
2027
|
-
max: t.max,
|
|
2028
|
-
min: t.min,
|
|
2029
|
-
majorUnit: e.majorUnit,
|
|
2030
|
-
minorUnit: e.minorUnit,
|
|
2031
|
-
unknown: t.unknown
|
|
2032
|
-
}),
|
|
2033
|
-
title: Wn(e.title),
|
|
2034
|
-
units: e.dispUnits && Q({
|
|
2035
|
-
unit: e.dispUnits.builtInUnit,
|
|
2036
|
-
unitsLabel: Wn(e.dispUnits.dispUnitsLbl),
|
|
2037
|
-
unknown: e.dispUnits.unknown
|
|
2038
|
-
}),
|
|
2039
|
-
majorGridlines: e.majorGridlines,
|
|
2040
|
-
minorGridlines: e.minorGridlines,
|
|
2041
|
-
majorTickMarks: e.majorTickMark ? { type: e.majorTickMark } : void 0,
|
|
2042
|
-
minorTickMarks: e.minorTickMark ? { type: e.minorTickMark } : void 0,
|
|
2043
|
-
tickLabels: e.tickLblPos === "none" ? void 0 : {},
|
|
2044
|
-
numFmt: e.numFmt,
|
|
2045
|
-
spPr: e.spPr,
|
|
2046
|
-
txPr: e.txPr,
|
|
2047
|
-
unknown: e.unknown
|
|
2048
|
-
});
|
|
2049
|
-
}, er = (e) => {
|
|
2050
|
-
let t = e.chart, n = t?.plotArea, r = [], i = [], a = [];
|
|
2051
|
-
for (let e of n?.groups ?? []) {
|
|
2052
|
-
let t = Tn[e.type];
|
|
2053
|
-
if (t) for (let n of e.series) {
|
|
2054
|
-
let o = Qn(n), s;
|
|
2055
|
-
if (o.length > 0) {
|
|
2056
|
-
let e = JSON.stringify(o);
|
|
2057
|
-
s = a.indexOf(e), s === -1 && (s = i.length, i.push({
|
|
2058
|
-
id: s,
|
|
2059
|
-
dimensions: o
|
|
2060
|
-
}), a.push(e));
|
|
2061
|
-
}
|
|
2062
|
-
let c = r.length;
|
|
2063
|
-
r.push(Q({
|
|
2064
|
-
layoutId: t,
|
|
2065
|
-
hidden: n.hidden,
|
|
2066
|
-
uniqueId: n.uniqueId,
|
|
2067
|
-
formatIdx: n.idx,
|
|
2068
|
-
tx: Un(n.tx),
|
|
2069
|
-
spPr: n.spPr,
|
|
2070
|
-
points: Jn(n.points),
|
|
2071
|
-
dataLabels: qn(n.dLbls),
|
|
2072
|
-
dataId: s,
|
|
2073
|
-
layoutPr: Yn(n.layoutPr, n.points, e.type === "waterfall"),
|
|
2074
|
-
axisIds: e.axIds.length > 0 ? e.axIds : void 0,
|
|
2075
|
-
unknown: n.unknown
|
|
2076
|
-
}));
|
|
2077
|
-
let l = n.cumulativeLine;
|
|
2078
|
-
l && r.push(Q({
|
|
2079
|
-
layoutId: Dn,
|
|
2080
|
-
hidden: l.hidden,
|
|
2081
|
-
ownerIdx: c,
|
|
2082
|
-
uniqueId: l.uniqueId,
|
|
2083
|
-
formatIdx: l.idx,
|
|
2084
|
-
tx: Un(l.tx),
|
|
2085
|
-
spPr: l.spPr,
|
|
2086
|
-
points: Jn(l.points),
|
|
2087
|
-
dataLabels: qn(l.dLbls),
|
|
2088
|
-
layoutPr: Yn(l.layoutPr, l.points, !1),
|
|
2089
|
-
axisIds: l.axIds,
|
|
2090
|
-
unknown: l.unknown
|
|
2091
|
-
}));
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
let o = t?.legend;
|
|
2095
|
-
return Q({
|
|
2096
|
-
chartData: { data: i },
|
|
2097
|
-
chart: Q({
|
|
2098
|
-
title: (s = t?.title, s && Q({
|
|
2099
|
-
pos: s.pos,
|
|
2100
|
-
align: s.align,
|
|
2101
|
-
overlay: s.overlay,
|
|
2102
|
-
tx: Un(s.tx),
|
|
2103
|
-
spPr: s.spPr,
|
|
2104
|
-
txPr: s.txPr,
|
|
2105
|
-
unknown: s.unknown
|
|
2106
|
-
})),
|
|
2107
|
-
plotArea: Q({
|
|
2108
|
-
plotAreaRegion: Q({
|
|
2109
|
-
plotSurface: n?.plotSurface,
|
|
2110
|
-
series: r
|
|
2111
|
-
}),
|
|
2112
|
-
axes: (n?.axes ?? []).map($n),
|
|
2113
|
-
spPr: n?.spPr,
|
|
2114
|
-
unknown: n?.unknown
|
|
2115
|
-
}),
|
|
2116
|
-
legend: o && Q({
|
|
2117
|
-
pos: o.legendPos === "tr" ? "r" : o.legendPos,
|
|
2118
|
-
align: o.align,
|
|
2119
|
-
overlay: o.overlay,
|
|
2120
|
-
spPr: o.spPr,
|
|
2121
|
-
txPr: o.txPr,
|
|
2122
|
-
unknown: o.unknown
|
|
2123
|
-
}),
|
|
2124
|
-
unknown: t?.unknown
|
|
2125
|
-
}),
|
|
2126
|
-
spPr: e.spPr,
|
|
2127
|
-
txPr: e.txPr,
|
|
2128
|
-
unknown: e.unknown
|
|
2129
|
-
});
|
|
2130
|
-
var s;
|
|
2131
|
-
}, tr = (e, t) => {
|
|
2132
|
-
if (e === t) return !0;
|
|
2133
|
-
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
2134
|
-
let n = (e) => Object.keys(e).filter((t) => e[t] !== void 0), r = n(e), i = n(t);
|
|
2135
|
-
return r.length === i.length && r.every((n) => tr(e[n], t[n]));
|
|
2136
|
-
}, nr = (e, t) => tr(e, er(t)), rr = (e) => {
|
|
2137
|
-
let t = l(e);
|
|
2138
|
-
if (!t || t.name !== "chartSpace") return null;
|
|
2139
|
-
let n = _(t, ce);
|
|
2140
|
-
if (!se(ue(t, n))) return null;
|
|
2141
|
-
let r = new he(e, n), i = S(t, Cn, ce, r), a = ((e) => {
|
|
2142
|
-
let t = e.chart, n = t?.plotArea, r = t?.legend;
|
|
2143
|
-
return Q({
|
|
2144
|
-
chart: Q({
|
|
2145
|
-
title: Mn(t?.title),
|
|
2146
|
-
plotArea: Q({
|
|
2147
|
-
groups: Vn(n?.plotAreaRegion, e.chartData?.data ?? []),
|
|
2148
|
-
axes: (n?.axes ?? []).map(Hn),
|
|
2149
|
-
spPr: n?.spPr,
|
|
2150
|
-
plotSurface: n?.plotAreaRegion?.plotSurface,
|
|
2151
|
-
unknown: n?.unknown
|
|
2152
|
-
}),
|
|
2153
|
-
legend: r && Q({
|
|
2154
|
-
legendPos: r.pos,
|
|
2155
|
-
align: r.align,
|
|
2156
|
-
overlay: r.overlay,
|
|
2157
|
-
spPr: r.spPr,
|
|
2158
|
-
txPr: r.txPr,
|
|
2159
|
-
unknown: r.unknown
|
|
2160
|
-
}),
|
|
2161
|
-
unknown: t?.unknown
|
|
2162
|
-
}),
|
|
2163
|
-
spPr: e.spPr,
|
|
2164
|
-
txPr: e.txPr,
|
|
2165
|
-
unknown: e.unknown
|
|
2166
|
-
});
|
|
2167
|
-
})(i);
|
|
2168
|
-
return {
|
|
2169
|
-
model: a,
|
|
2170
|
-
kept: r.kept,
|
|
2171
|
-
reordered: r.reordered,
|
|
2172
|
-
lossy: !nr(i, a)
|
|
2173
|
-
};
|
|
2174
|
-
}, ir = (e) => {
|
|
2175
|
-
let t = { ...e.unknown?.attributes }, n = (e, n) => {
|
|
2176
|
-
t[`xmlns:${e}`] ??= n;
|
|
2177
|
-
};
|
|
2178
|
-
n(h.a, p), n(h.r, m), n(h.cx, re);
|
|
2179
|
-
let r = er(e), i = new v().raw(Ht);
|
|
2180
|
-
return ((e, t) => {
|
|
2181
|
-
C(e, w("cx", "chartSpace"), t, Cn);
|
|
2182
|
-
})(i, {
|
|
2183
|
-
...r,
|
|
2184
|
-
unknown: {
|
|
2185
|
-
...r.unknown,
|
|
2186
|
-
attributes: t
|
|
2187
|
-
}
|
|
2188
|
-
}), i.toString();
|
|
2189
|
-
}, ar = (e, t) => {
|
|
2190
|
-
if (t) {
|
|
2191
|
-
let n = rr(t);
|
|
2192
|
-
if (n && JSON.stringify(n.model) === JSON.stringify(e)) return t;
|
|
2193
|
-
}
|
|
2194
|
-
return ir(e);
|
|
2195
|
-
}, or = {
|
|
2196
|
-
chart: {
|
|
2197
|
-
relType: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
|
|
2198
|
-
contentType: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
|
|
2199
|
-
path: "../charts/chart{n}.xml",
|
|
2200
|
-
graphicUri: f
|
|
2201
|
-
},
|
|
2202
|
-
chartEx: {
|
|
2203
|
-
relType: "http://schemas.microsoft.com/office/2014/relationships/chartEx",
|
|
2204
|
-
contentType: "application/vnd.ms-office.chartex+xml",
|
|
2205
|
-
path: "../charts/chartEx{n}.xml",
|
|
2206
|
-
graphicUri: re
|
|
2207
|
-
}
|
|
2208
|
-
}, sr = /* @__PURE__ */ new Set([
|
|
2209
|
-
"area",
|
|
2210
|
-
"bar",
|
|
2211
|
-
"line",
|
|
2212
|
-
"pie",
|
|
2213
|
-
"doughnut",
|
|
2214
|
-
"ofPie",
|
|
2215
|
-
"scatter",
|
|
2216
|
-
"bubble",
|
|
2217
|
-
"radar",
|
|
2218
|
-
"stock",
|
|
2219
|
-
"surface"
|
|
2220
|
-
]), cr = (e) => e === or.chartEx.relType ? "chartEx" : e === or.chart.relType ? "chart" : null, lr = (e) => sr.has(e) ? "chart" : En.has(e) ? "chartEx" : null, ur = (e) => {
|
|
2221
|
-
let t = Vt(e);
|
|
2222
|
-
if (t) return {
|
|
2223
|
-
model: t.model,
|
|
2224
|
-
family: "chart",
|
|
2225
|
-
kept: t.kept,
|
|
2226
|
-
lossy: !1
|
|
2227
|
-
};
|
|
2228
|
-
let n = rr(e);
|
|
2229
|
-
return n ? {
|
|
2230
|
-
model: n.model,
|
|
2231
|
-
family: "chartEx",
|
|
2232
|
-
kept: n.kept,
|
|
2233
|
-
lossy: n.lossy
|
|
2234
|
-
} : null;
|
|
2235
|
-
}, dr = (e) => {
|
|
2236
|
-
if (Array.isArray(e)) return e.map(dr);
|
|
2237
|
-
if (typeof e != "object" || !e) return e;
|
|
2238
|
-
let t = {};
|
|
2239
|
-
for (let [n, r] of Object.entries(e)) n !== "unknown" && (t[n] = dr(r));
|
|
2240
|
-
return t;
|
|
2241
|
-
}, fr = (e, t) => {
|
|
2242
|
-
let n = e.chart?.plotArea?.groups ?? [], r = n.map((e) => lr(e.type)).find((e) => e !== null) ?? t?.family ?? "chart", i = n.filter((e) => lr(e.type) !== r).map((e) => e.type), a = e;
|
|
2243
|
-
if (i.length > 0) {
|
|
2244
|
-
let t = {
|
|
2245
|
-
...e.chart.plotArea,
|
|
2246
|
-
groups: n.filter((e) => lr(e.type) === r)
|
|
2247
|
-
};
|
|
2248
|
-
a = {
|
|
2249
|
-
...e,
|
|
2250
|
-
chart: {
|
|
2251
|
-
...e.chart,
|
|
2252
|
-
plotArea: t
|
|
2253
|
-
}
|
|
2254
|
-
};
|
|
2255
|
-
}
|
|
2256
|
-
let o = (t?.family ?? r) === r;
|
|
2257
|
-
o || (a = dr(a));
|
|
2258
|
-
let s = o ? t?.xml : void 0;
|
|
2259
|
-
return {
|
|
2260
|
-
family: r,
|
|
2261
|
-
leftOut: i,
|
|
2262
|
-
xml: r === "chartEx" ? ar(a, s) : Wt(a, s)
|
|
2263
|
-
};
|
|
2264
|
-
};
|
|
2265
|
-
export { i as a, fr as i, cr as n, r as o, ur as r, or as t };
|