@sheetxl/io-xlsx 0.8.0-beta.6 → 0.8.0-beta.9
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/B0Ugu_crqQYpdfQz.cjs +1 -0
- package/browser/cjs/{qb-YQ8mGwpogSP08.cjs → BHM3_D9PsNURVAVy.cjs} +1 -1
- package/browser/cjs/BHWdwAQ322YA8JAZ.cjs +6 -0
- package/browser/cjs/CeuX8p1aBuKTuagi.cjs +2 -0
- package/browser/cjs/DSM4q1dhVVXvsgby.cjs +30 -0
- package/browser/cjs/DiAHwNv2I8RHE9GY.cjs +1 -0
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/wrpXlaSBGEicQf6_.cjs +6 -0
- package/browser/esm/{B3cYXnqV2Zjaw6Jp.mjs → Bu64BYvRAlVftMr1.mjs} +4 -4
- package/browser/esm/{B0E-_6m23g4BDnX6.mjs → C-2KaUyV4gs-sDTZ.mjs} +2 -2
- package/browser/esm/{CGgjL7wM5WHZA6Dt.mjs → CRrTMRdN_IcSA_pm.mjs} +2 -2
- package/browser/esm/{BYENv_UE3Hv5ghGD.mjs → CWt4fDYEbj2hvsl_.mjs} +820 -800
- package/browser/esm/{BLEHoDT0SLbo8OO2.mjs → Ccnxz-y2WBEgfvvh.mjs} +2606 -1408
- package/browser/esm/{k-aEFzUZ8aU9FPf4.mjs → CxtFawTfwRTCC4Xr.mjs} +1 -1
- package/browser/esm/{DdTgGiFy8nAZTQ0d.mjs → D-epcZSoKLbsAIaC.mjs} +2 -2
- package/browser/esm/DsSIg46AR7IFBN5N.mjs +2298 -0
- package/browser/esm/{D01fs7vrCLlmdHoW.mjs → Dx64JMAGwNNDBkC1.mjs} +1555 -1159
- package/browser/esm/Sv4twwEJDb9dZ91h.mjs +149 -0
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{am47EU_k1uSVm7yW.mjs → BCr4lCI6qQXXN0K1.mjs} +2 -2
- package/node/esm/BPn5XBizKkwaUqXB.mjs +4285 -0
- package/node/esm/{D-l0hqYTXUIEFoTg.mjs → BVV11IlqF6Lmlv8D.mjs} +53 -69
- package/node/esm/{Co5_sjvEk9d-x9gx.mjs → BiJEEgltJzx94zIR.mjs} +930 -909
- package/node/esm/{DWF_5NYPdrlTVvHi.mjs → BsTMtvwpQoPNv95M.mjs} +1 -1
- package/node/esm/{ZWSOYqmTKEmEOz2u.mjs → CBtj0-a4l2qux2hA.mjs} +2 -2
- package/node/esm/CkmZuMvRTpva7eQu.mjs +5074 -0
- package/node/esm/index.mjs +4 -4
- package/node/esm/j0RE2usgdljRw_gr.mjs +2345 -0
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +83 -10
- package/types/src/OOXMLExtensions.d.ts +6 -0
- package/types/src/reader/dom/CustGeomUtils.d.ts +7 -0
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +13 -0
- package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +7 -1
- package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +23 -1
- package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +20 -1
- package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +20 -1
- package/types/src/reader/domVisitors/DrawingVisitor.d.ts +8 -0
- package/types/src/reader/domVisitors/FormControlPrVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/ShapeTextVisitor.d.ts +44 -0
- package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/index.d.ts +4 -2
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +1 -1
- package/types/src/utils/DrawingMLText.d.ts +39 -0
- package/types/src/utils/FormControls.d.ts +97 -0
- package/types/src/writer/builder/Emitter.d.ts +5 -0
- package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
- package/types/src/writer/builder/Types.d.ts +10 -0
- package/types/src/writer/utils/CustGeomUtils.d.ts +5 -0
- package/types/src/writer/utils/DrawMLUtils.d.ts +39 -2
- package/types/src/writer/utils/PrstGeomUtils.d.ts +6 -0
- package/types/src/writer/utils/TextUtils.d.ts +21 -2
- package/browser/cjs/17tMBnuyu4YIxixh.cjs +0 -1
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
- package/browser/cjs/BxU-OlZIQViQl7gX.cjs +0 -1
- package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
- package/browser/cjs/DHKWtqZ0vQfXrbq1.cjs +0 -2
- package/browser/cjs/DpZr07y7ifaZGvJ9.cjs +0 -5
- package/browser/cjs/MqKQ_B5qRARrRbO4.cjs +0 -24
- package/browser/esm/96C1ntelYWh7kQtW.mjs +0 -24
- package/browser/esm/FwrsLfi1iEAQGIjj.mjs +0 -2402
- package/browser/esm/gicSNvWtBLkvLsIw.mjs +0 -159
- package/node/esm/B-g20MoPHbZFapp8.mjs +0 -4642
- package/node/esm/Bu9QkKpBW4G2ULAg.mjs +0 -2450
- package/node/esm/CHl-WFsto0oTmBtB.mjs +0 -3051
- package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts +0 -6
|
@@ -0,0 +1,4285 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.9
|
|
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 { CommonUtils as e } from "@sheetxl/utils";
|
|
8
|
+
import { AddressUtils as t, FormulaError as r, FormulaText as n, FunctionDeclarations as a, ICalculation as o, ICondition as s, IEffect as i, IFill as l, IFont as c, IShape as u, IText as p, ITextFrame as E, ShapeStyleUtils as f, parseFormulaLiteral as A } from "@sheetxl/sdk";
|
|
9
|
+
var T = Object.defineProperty, S = (e, t) => {
|
|
10
|
+
let r = {};
|
|
11
|
+
for (var n in e) T(r, n, {
|
|
12
|
+
get: e[n],
|
|
13
|
+
enumerable: !0
|
|
14
|
+
});
|
|
15
|
+
return t || T(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
16
|
+
}, R = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main", d = "http://schemas.microsoft.com/office/excel/2006/main", g = "{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}", m = "{78C0D931-6437-407d-A8EE-F0AAD7539E65}", O = "{78C0D931-6839-4c89-B8D6-976A2CC4E5B4}", h = "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}", I = "{A8765BA9-456A-4dab-B4F3-ACF838C121DE}", N = "{3A4CF648-6AED-40f4-86FF-DC5316D8AED3}", C = "{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}", L = {
|
|
17
|
+
"{05C60535-1F16-4FD2-B633-F4F36F0B64E0}": "sparklines",
|
|
18
|
+
"{7E03D99C-DC04-49D9-9315-930204A7B6E9}": "timelines",
|
|
19
|
+
"{01252117-D84E-4E92-8308-4BE1C098FCBB}": "ignoredErrors",
|
|
20
|
+
"{F7C9EE02-42E1-4005-9D12-6889AFFD525C}": "workbook protection extensions"
|
|
21
|
+
}, y = /* @__PURE__ */ new Set(["{77BFE23E-C014-4D31-8A63-9C772DBF06B6}"]);
|
|
22
|
+
function b(e) {
|
|
23
|
+
return (e ?? "").toUpperCase();
|
|
24
|
+
}
|
|
25
|
+
function x(e) {
|
|
26
|
+
return `{${e().toUpperCase()}}`;
|
|
27
|
+
}
|
|
28
|
+
var v = /&(amp|lt|gt|quot|apos|#x[0-9a-fA-F]+|#[0-9]+);/g;
|
|
29
|
+
function D(e, t) {
|
|
30
|
+
switch (t) {
|
|
31
|
+
case "amp": return "&";
|
|
32
|
+
case "lt": return "<";
|
|
33
|
+
case "gt": return ">";
|
|
34
|
+
case "quot": return "\"";
|
|
35
|
+
case "apos": return "'";
|
|
36
|
+
default: return t.startsWith("#x") ? String.fromCodePoint(parseInt(t.slice(2), 16)) : t.startsWith("#") ? String.fromCodePoint(parseInt(t.slice(1), 10)) : e;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function P(e) {
|
|
40
|
+
return e.replace(v, D);
|
|
41
|
+
}
|
|
42
|
+
function M(e) {
|
|
43
|
+
const t = {}, r = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*"([^"]*)"/g;
|
|
44
|
+
let n;
|
|
45
|
+
for (; n = r.exec(e);) t[n[1]] = P(n[2]);
|
|
46
|
+
return t;
|
|
47
|
+
}
|
|
48
|
+
function F(e, t) {
|
|
49
|
+
const r = [], n = new RegExp(`<${t}\\b([^>]*)/?>`, "g");
|
|
50
|
+
let a;
|
|
51
|
+
for (; a = n.exec(e);) r.push(M(a[1]));
|
|
52
|
+
return r;
|
|
53
|
+
}
|
|
54
|
+
function B(e) {
|
|
55
|
+
const t = new TextDecoder("utf-8").decode(e), r = F(t, "Default").map((e) => ({
|
|
56
|
+
ext: (e.Extension ?? "").toLowerCase(),
|
|
57
|
+
contentType: e.ContentType ?? ""
|
|
58
|
+
})).filter((e) => e.ext && e.contentType), n = /* @__PURE__ */ new Map();
|
|
59
|
+
for (const e of F(t, "Override")) e.PartName && e.ContentType && n.set(e.PartName, e.ContentType);
|
|
60
|
+
return {
|
|
61
|
+
defaults: r,
|
|
62
|
+
overrides: n
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function U(e) {
|
|
66
|
+
return F(new TextDecoder("utf-8").decode(e), "Relationship").filter((e) => e.Type && e.Target).map((e) => ({
|
|
67
|
+
id: e.Id ?? "",
|
|
68
|
+
type: e.Type,
|
|
69
|
+
target: e.Target,
|
|
70
|
+
external: "External" === e.TargetMode
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
var w = "191029", k = "<ext uri=\"{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}\" xmlns:xcalcf=\"http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures\"><xcalcf:calcFeatures><xcalcf:feature name=\"microsoft.com:RD\"/><xcalcf:feature name=\"microsoft.com:Single\"/><xcalcf:feature name=\"microsoft.com:FV\"/><xcalcf:feature name=\"microsoft.com:CNMTM\"/><xcalcf:feature name=\"microsoft.com:LET_WF\"/><xcalcf:feature name=\"microsoft.com:LAMBDA_WF\"/><xcalcf:feature name=\"microsoft.com:ARRAYTEXT_WF\"/></xcalcf:calcFeatures></ext>", G = "_xlfn.", V = "_xlfn._xlws.", W = /* @__PURE__ */ new Map([
|
|
74
|
+
["ANCHORARRAY", {
|
|
75
|
+
prefix: G,
|
|
76
|
+
unimplemented: !0
|
|
77
|
+
}],
|
|
78
|
+
["SINGLE", {
|
|
79
|
+
prefix: G,
|
|
80
|
+
unimplemented: !0
|
|
81
|
+
}],
|
|
82
|
+
["_TRO_ALL", {
|
|
83
|
+
prefix: G,
|
|
84
|
+
unimplemented: !0
|
|
85
|
+
}],
|
|
86
|
+
["_TRO_LEADING", {
|
|
87
|
+
prefix: G,
|
|
88
|
+
unimplemented: !0
|
|
89
|
+
}],
|
|
90
|
+
["_TRO_TRAILING", {
|
|
91
|
+
prefix: G,
|
|
92
|
+
unimplemented: !0
|
|
93
|
+
}],
|
|
94
|
+
["COPILOT", {
|
|
95
|
+
prefix: G,
|
|
96
|
+
unimplemented: !0
|
|
97
|
+
}],
|
|
98
|
+
["LONGTEXT", {
|
|
99
|
+
prefix: G,
|
|
100
|
+
unimplemented: !0
|
|
101
|
+
}],
|
|
102
|
+
["_LONGTEXT", {
|
|
103
|
+
prefix: G,
|
|
104
|
+
unimplemented: !0
|
|
105
|
+
}],
|
|
106
|
+
["PQSOURCE", {
|
|
107
|
+
prefix: G,
|
|
108
|
+
unimplemented: !0
|
|
109
|
+
}],
|
|
110
|
+
["PY", {
|
|
111
|
+
prefix: V,
|
|
112
|
+
unimplemented: !0
|
|
113
|
+
}],
|
|
114
|
+
["PYTHON_STR", {
|
|
115
|
+
prefix: G,
|
|
116
|
+
unimplemented: !0
|
|
117
|
+
}],
|
|
118
|
+
["PYTHON_TYPE", {
|
|
119
|
+
prefix: G,
|
|
120
|
+
unimplemented: !0
|
|
121
|
+
}],
|
|
122
|
+
["PYTHON_TYPENAME", {
|
|
123
|
+
prefix: G,
|
|
124
|
+
unimplemented: !0
|
|
125
|
+
}],
|
|
126
|
+
["QUERYSTRING", {
|
|
127
|
+
prefix: G,
|
|
128
|
+
unimplemented: !0
|
|
129
|
+
}],
|
|
130
|
+
["ACCRINT", { intersect: "never" }],
|
|
131
|
+
["ACCRINTM", { intersect: "never" }],
|
|
132
|
+
["AMORDEGRC", { intersect: "never" }],
|
|
133
|
+
["AMORLINC", { intersect: "never" }],
|
|
134
|
+
["BESSELI", { intersect: "never" }],
|
|
135
|
+
["BESSELJ", { intersect: "never" }],
|
|
136
|
+
["BESSELK", { intersect: "never" }],
|
|
137
|
+
["BESSELY", { intersect: "never" }],
|
|
138
|
+
["BIN2DEC", { intersect: "never" }],
|
|
139
|
+
["BIN2HEX", { intersect: "never" }],
|
|
140
|
+
["BIN2OCT", { intersect: "never" }],
|
|
141
|
+
["COMPLEX", { intersect: "never" }],
|
|
142
|
+
["CONVERT", { intersect: "never" }],
|
|
143
|
+
["COUPDAYBS", { intersect: "never" }],
|
|
144
|
+
["COUPDAYS", { intersect: "never" }],
|
|
145
|
+
["COUPDAYSNC", { intersect: "never" }],
|
|
146
|
+
["COUPNCD", { intersect: "never" }],
|
|
147
|
+
["COUPNUM", { intersect: "never" }],
|
|
148
|
+
["COUPPCD", { intersect: "never" }],
|
|
149
|
+
["CUMIPMT", { intersect: "never" }],
|
|
150
|
+
["CUMPRINC", { intersect: "never" }],
|
|
151
|
+
["DAVERAGE", { intersect: "never" }],
|
|
152
|
+
["DCOUNT", { intersect: "never" }],
|
|
153
|
+
["DCOUNTA", { intersect: "never" }],
|
|
154
|
+
["DEC2BIN", { intersect: "never" }],
|
|
155
|
+
["DEC2HEX", { intersect: "never" }],
|
|
156
|
+
["DEC2OCT", { intersect: "never" }],
|
|
157
|
+
["DELTA", { intersect: "never" }],
|
|
158
|
+
["DGET", { intersect: "never" }],
|
|
159
|
+
["DISC", { intersect: "never" }],
|
|
160
|
+
["DMAX", { intersect: "never" }],
|
|
161
|
+
["DMIN", { intersect: "never" }],
|
|
162
|
+
["DOLLARDE", { intersect: "never" }],
|
|
163
|
+
["DOLLARFR", { intersect: "never" }],
|
|
164
|
+
["DPRODUCT", { intersect: "never" }],
|
|
165
|
+
["DSTDEV", { intersect: "never" }],
|
|
166
|
+
["DSTDEVP", { intersect: "never" }],
|
|
167
|
+
["DSUM", { intersect: "never" }],
|
|
168
|
+
["DURATION", { intersect: "never" }],
|
|
169
|
+
["DVAR", { intersect: "never" }],
|
|
170
|
+
["DVARP", { intersect: "never" }],
|
|
171
|
+
["EDATE", { intersect: "never" }],
|
|
172
|
+
["EFFECT", { intersect: "never" }],
|
|
173
|
+
["EOMONTH", { intersect: "never" }],
|
|
174
|
+
["ERF", { intersect: "never" }],
|
|
175
|
+
["ERF.PRECISE", {
|
|
176
|
+
prefix: G,
|
|
177
|
+
intersect: "never"
|
|
178
|
+
}],
|
|
179
|
+
["ERFC", { intersect: "never" }],
|
|
180
|
+
["ERFC.PRECISE", {
|
|
181
|
+
prefix: G,
|
|
182
|
+
intersect: "never"
|
|
183
|
+
}],
|
|
184
|
+
["FACTDOUBLE", { intersect: "never" }],
|
|
185
|
+
["GCD", {
|
|
186
|
+
intersect: "never",
|
|
187
|
+
arrayScope: "consumer"
|
|
188
|
+
}],
|
|
189
|
+
["GESTEP", { intersect: "never" }],
|
|
190
|
+
["HEX2BIN", { intersect: "never" }],
|
|
191
|
+
["HEX2DEC", { intersect: "never" }],
|
|
192
|
+
["HEX2OCT", { intersect: "never" }],
|
|
193
|
+
["IMABS", { intersect: "never" }],
|
|
194
|
+
["IMAGINARY", { intersect: "never" }],
|
|
195
|
+
["IMARGUMENT", { intersect: "never" }],
|
|
196
|
+
["IMCONJUGATE", { intersect: "never" }],
|
|
197
|
+
["IMCOS", { intersect: "never" }],
|
|
198
|
+
["IMCOSH", {
|
|
199
|
+
prefix: G,
|
|
200
|
+
intersect: "never"
|
|
201
|
+
}],
|
|
202
|
+
["IMCOT", {
|
|
203
|
+
prefix: G,
|
|
204
|
+
intersect: "never"
|
|
205
|
+
}],
|
|
206
|
+
["IMCSC", {
|
|
207
|
+
prefix: G,
|
|
208
|
+
intersect: "never"
|
|
209
|
+
}],
|
|
210
|
+
["IMCSCH", {
|
|
211
|
+
prefix: G,
|
|
212
|
+
intersect: "never"
|
|
213
|
+
}],
|
|
214
|
+
["IMDIV", { intersect: "never" }],
|
|
215
|
+
["IMEXP", { intersect: "never" }],
|
|
216
|
+
["IMLN", { intersect: "never" }],
|
|
217
|
+
["IMLOG10", { intersect: "never" }],
|
|
218
|
+
["IMLOG2", { intersect: "never" }],
|
|
219
|
+
["IMPOWER", { intersect: "never" }],
|
|
220
|
+
["IMPRODUCT", {
|
|
221
|
+
intersect: "never",
|
|
222
|
+
arrayScope: "consumer"
|
|
223
|
+
}],
|
|
224
|
+
["IMREAL", { intersect: "never" }],
|
|
225
|
+
["IMSEC", {
|
|
226
|
+
prefix: G,
|
|
227
|
+
intersect: "never"
|
|
228
|
+
}],
|
|
229
|
+
["IMSECH", {
|
|
230
|
+
prefix: G,
|
|
231
|
+
intersect: "never"
|
|
232
|
+
}],
|
|
233
|
+
["IMSIN", { intersect: "never" }],
|
|
234
|
+
["IMSINH", {
|
|
235
|
+
prefix: G,
|
|
236
|
+
intersect: "never"
|
|
237
|
+
}],
|
|
238
|
+
["IMSQRT", { intersect: "never" }],
|
|
239
|
+
["IMSUB", { intersect: "never" }],
|
|
240
|
+
["IMSUM", {
|
|
241
|
+
intersect: "never",
|
|
242
|
+
arrayScope: "consumer"
|
|
243
|
+
}],
|
|
244
|
+
["IMTAN", {
|
|
245
|
+
prefix: G,
|
|
246
|
+
intersect: "never"
|
|
247
|
+
}],
|
|
248
|
+
["INTRATE", { intersect: "never" }],
|
|
249
|
+
["ISOMITTED", {
|
|
250
|
+
prefix: G,
|
|
251
|
+
intersect: "never",
|
|
252
|
+
arrayScope: "consumer"
|
|
253
|
+
}],
|
|
254
|
+
["LCM", {
|
|
255
|
+
intersect: "never",
|
|
256
|
+
arrayScope: "consumer"
|
|
257
|
+
}],
|
|
258
|
+
["MDURATION", { intersect: "never" }],
|
|
259
|
+
["MROUND", { intersect: "never" }],
|
|
260
|
+
["MULTINOMIAL", {
|
|
261
|
+
intersect: "never",
|
|
262
|
+
arrayScope: "consumer"
|
|
263
|
+
}],
|
|
264
|
+
["N", { intersect: "never" }],
|
|
265
|
+
["NETWORKDAYS", {
|
|
266
|
+
intersect: "never",
|
|
267
|
+
arrayScope: "consumer"
|
|
268
|
+
}],
|
|
269
|
+
["NOMINAL", { intersect: "never" }],
|
|
270
|
+
["OCT2BIN", { intersect: "never" }],
|
|
271
|
+
["OCT2DEC", { intersect: "never" }],
|
|
272
|
+
["OCT2HEX", { intersect: "never" }],
|
|
273
|
+
["ODDFPRICE", { intersect: "never" }],
|
|
274
|
+
["ODDFYIELD", { intersect: "never" }],
|
|
275
|
+
["ODDLPRICE", { intersect: "never" }],
|
|
276
|
+
["ODDLYIELD", { intersect: "never" }],
|
|
277
|
+
["PRICE", { intersect: "never" }],
|
|
278
|
+
["PRICEDISC", { intersect: "never" }],
|
|
279
|
+
["PRICEMAT", { intersect: "never" }],
|
|
280
|
+
["QUOTIENT", { intersect: "never" }],
|
|
281
|
+
["RANDBETWEEN", {
|
|
282
|
+
intersect: "never",
|
|
283
|
+
volatile: !0
|
|
284
|
+
}],
|
|
285
|
+
["RECEIVED", { intersect: "never" }],
|
|
286
|
+
["SERIESSUM", {
|
|
287
|
+
intersect: "never",
|
|
288
|
+
arrayScope: "consumer"
|
|
289
|
+
}],
|
|
290
|
+
["SQRTPI", { intersect: "never" }],
|
|
291
|
+
["T", { intersect: "never" }],
|
|
292
|
+
["TBILLEQ", { intersect: "never" }],
|
|
293
|
+
["TBILLPRICE", { intersect: "never" }],
|
|
294
|
+
["TBILLYIELD", { intersect: "never" }],
|
|
295
|
+
["WEEKNUM", { intersect: "never" }],
|
|
296
|
+
["WORKDAY", {
|
|
297
|
+
intersect: "never",
|
|
298
|
+
arrayScope: "consumer"
|
|
299
|
+
}],
|
|
300
|
+
["XIRR", {
|
|
301
|
+
intersect: "never",
|
|
302
|
+
arrayScope: "consumer"
|
|
303
|
+
}],
|
|
304
|
+
["XNPV", {
|
|
305
|
+
intersect: "never",
|
|
306
|
+
arrayScope: "consumer"
|
|
307
|
+
}],
|
|
308
|
+
["YEARFRAC", { intersect: "never" }],
|
|
309
|
+
["YIELD", { intersect: "never" }],
|
|
310
|
+
["YIELDDISC", { intersect: "never" }],
|
|
311
|
+
["YIELDMAT", { intersect: "never" }],
|
|
312
|
+
["CONCATENATE", { slotAlways: [0] }],
|
|
313
|
+
["GETPIVOTDATA", {
|
|
314
|
+
slotNever: [0, 1],
|
|
315
|
+
slotAlways: [3]
|
|
316
|
+
}],
|
|
317
|
+
["MAKEARRAY", {
|
|
318
|
+
prefix: G,
|
|
319
|
+
slotNever: [2],
|
|
320
|
+
arrayScope: "consumer"
|
|
321
|
+
}],
|
|
322
|
+
["MATCH", {
|
|
323
|
+
slotNever: [2],
|
|
324
|
+
scopeClears: [1]
|
|
325
|
+
}],
|
|
326
|
+
["NETWORKDAYS.INTL", {
|
|
327
|
+
slotNever: [0, 1],
|
|
328
|
+
arrayScope: "consumer"
|
|
329
|
+
}],
|
|
330
|
+
["NPV", { slotNever: [1] }],
|
|
331
|
+
["SCAN", {
|
|
332
|
+
prefix: G,
|
|
333
|
+
slotNever: [0],
|
|
334
|
+
arrayScope: "opens"
|
|
335
|
+
}],
|
|
336
|
+
["TEXTJOIN", {
|
|
337
|
+
prefix: G,
|
|
338
|
+
slotNever: [0],
|
|
339
|
+
arrayScope: "consumer"
|
|
340
|
+
}],
|
|
341
|
+
["TEXTSPLIT", {
|
|
342
|
+
prefix: G,
|
|
343
|
+
slotAlways: [1, 2],
|
|
344
|
+
arrayScope: "consumer"
|
|
345
|
+
}],
|
|
346
|
+
["TRANSPOSE", {
|
|
347
|
+
slotAlways: [0],
|
|
348
|
+
arrayScope: "consumer"
|
|
349
|
+
}],
|
|
350
|
+
["TYPE", {
|
|
351
|
+
slotAlways: [0],
|
|
352
|
+
arrayScope: "consumer"
|
|
353
|
+
}],
|
|
354
|
+
["WORKDAY.INTL", {
|
|
355
|
+
slotNever: [0, 1],
|
|
356
|
+
arrayScope: "consumer"
|
|
357
|
+
}],
|
|
358
|
+
["XMATCH", { prefix: G }],
|
|
359
|
+
["CELL", {
|
|
360
|
+
arrayReturn: !0,
|
|
361
|
+
arrayScope: "consumer",
|
|
362
|
+
volatile: !0
|
|
363
|
+
}],
|
|
364
|
+
["COLUMN", { readsPerCell: 0 }],
|
|
365
|
+
["FORMULATEXT", {
|
|
366
|
+
prefix: G,
|
|
367
|
+
readsPerCell: 0
|
|
368
|
+
}],
|
|
369
|
+
["ISFORMULA", {
|
|
370
|
+
prefix: G,
|
|
371
|
+
readsPerCell: 0
|
|
372
|
+
}],
|
|
373
|
+
["REDUCE", {
|
|
374
|
+
prefix: G,
|
|
375
|
+
arrayReturn: !0,
|
|
376
|
+
arrayScope: "opens",
|
|
377
|
+
scopeClears: [0]
|
|
378
|
+
}],
|
|
379
|
+
["ROW", { readsPerCell: 0 }],
|
|
380
|
+
["AGGREGATE", {
|
|
381
|
+
prefix: G,
|
|
382
|
+
arrayScope: "opens"
|
|
383
|
+
}],
|
|
384
|
+
["FILTER", {
|
|
385
|
+
prefix: V,
|
|
386
|
+
slotAlways: [2],
|
|
387
|
+
arrayScope: "opens"
|
|
388
|
+
}],
|
|
389
|
+
["INDEX", { arrayScope: "opens" }],
|
|
390
|
+
["LOOKUP", { arrayScope: "opens" }],
|
|
391
|
+
["MMULT", { arrayScope: "opens" }],
|
|
392
|
+
["SORT", {
|
|
393
|
+
prefix: V,
|
|
394
|
+
arrayScope: "opens"
|
|
395
|
+
}],
|
|
396
|
+
["SUMPRODUCT", { arrayScope: "opens" }],
|
|
397
|
+
["XLOOKUP", {
|
|
398
|
+
prefix: G,
|
|
399
|
+
slotNever: [3],
|
|
400
|
+
arrayScope: "opens",
|
|
401
|
+
scopeClears: [0]
|
|
402
|
+
}],
|
|
403
|
+
["ARRAYTOTEXT", {
|
|
404
|
+
prefix: G,
|
|
405
|
+
arrayScope: "opens"
|
|
406
|
+
}],
|
|
407
|
+
["BYCOL", {
|
|
408
|
+
prefix: G,
|
|
409
|
+
arrayScope: "opens"
|
|
410
|
+
}],
|
|
411
|
+
["BYROW", {
|
|
412
|
+
prefix: G,
|
|
413
|
+
arrayScope: "opens"
|
|
414
|
+
}],
|
|
415
|
+
["CHOOSECOLS", {
|
|
416
|
+
prefix: G,
|
|
417
|
+
arrayScope: "opens"
|
|
418
|
+
}],
|
|
419
|
+
["CHOOSEROWS", {
|
|
420
|
+
prefix: G,
|
|
421
|
+
arrayScope: "opens"
|
|
422
|
+
}],
|
|
423
|
+
["COLUMNS", { arrayScope: "opens" }],
|
|
424
|
+
["EXPAND", {
|
|
425
|
+
prefix: G,
|
|
426
|
+
arrayScope: "opens"
|
|
427
|
+
}],
|
|
428
|
+
["GROUPBY", {
|
|
429
|
+
prefix: G,
|
|
430
|
+
arrayScope: "opens"
|
|
431
|
+
}],
|
|
432
|
+
["HSTACK", {
|
|
433
|
+
prefix: G,
|
|
434
|
+
arrayScope: "opens"
|
|
435
|
+
}],
|
|
436
|
+
["IRR", { arrayScope: "opens" }],
|
|
437
|
+
["MAP", {
|
|
438
|
+
prefix: G,
|
|
439
|
+
arrayScope: "opens"
|
|
440
|
+
}],
|
|
441
|
+
["MDETERM", { arrayScope: "opens" }],
|
|
442
|
+
["MINVERSE", { arrayScope: "opens" }],
|
|
443
|
+
["MIRR", { arrayScope: "opens" }],
|
|
444
|
+
["PIVOTBY", {
|
|
445
|
+
prefix: G,
|
|
446
|
+
arrayScope: "opens"
|
|
447
|
+
}],
|
|
448
|
+
["ROWS", { arrayScope: "opens" }],
|
|
449
|
+
["SHEETS", {
|
|
450
|
+
prefix: G,
|
|
451
|
+
arrayScope: "opens"
|
|
452
|
+
}],
|
|
453
|
+
["SORTBY", {
|
|
454
|
+
prefix: G,
|
|
455
|
+
arrayScope: "opens"
|
|
456
|
+
}],
|
|
457
|
+
["TAKE", {
|
|
458
|
+
prefix: G,
|
|
459
|
+
arrayScope: "opens"
|
|
460
|
+
}],
|
|
461
|
+
["TOCOL", {
|
|
462
|
+
prefix: G,
|
|
463
|
+
arrayScope: "opens"
|
|
464
|
+
}],
|
|
465
|
+
["TOROW", {
|
|
466
|
+
prefix: G,
|
|
467
|
+
arrayScope: "opens"
|
|
468
|
+
}],
|
|
469
|
+
["UNIQUE", {
|
|
470
|
+
prefix: G,
|
|
471
|
+
arrayScope: "opens"
|
|
472
|
+
}],
|
|
473
|
+
["VSTACK", {
|
|
474
|
+
prefix: G,
|
|
475
|
+
arrayScope: "opens"
|
|
476
|
+
}],
|
|
477
|
+
["WRAPCOLS", {
|
|
478
|
+
prefix: G,
|
|
479
|
+
arrayScope: "opens"
|
|
480
|
+
}],
|
|
481
|
+
["WRAPROWS", {
|
|
482
|
+
prefix: G,
|
|
483
|
+
arrayScope: "opens"
|
|
484
|
+
}],
|
|
485
|
+
["CHISQ.TEST", {
|
|
486
|
+
prefix: G,
|
|
487
|
+
arrayScope: "opens"
|
|
488
|
+
}],
|
|
489
|
+
["CORREL", { arrayScope: "opens" }],
|
|
490
|
+
["COVAR", { arrayScope: "opens" }],
|
|
491
|
+
["COVARIANCE.P", {
|
|
492
|
+
prefix: G,
|
|
493
|
+
arrayScope: "opens"
|
|
494
|
+
}],
|
|
495
|
+
["COVARIANCE.S", {
|
|
496
|
+
prefix: G,
|
|
497
|
+
arrayScope: "opens"
|
|
498
|
+
}],
|
|
499
|
+
["F.TEST", {
|
|
500
|
+
prefix: G,
|
|
501
|
+
arrayScope: "opens"
|
|
502
|
+
}],
|
|
503
|
+
["FORECAST", { arrayScope: "opens" }],
|
|
504
|
+
["FORECAST.LINEAR", {
|
|
505
|
+
prefix: G,
|
|
506
|
+
arrayScope: "opens"
|
|
507
|
+
}],
|
|
508
|
+
["GROWTH", {
|
|
509
|
+
intersect: "never",
|
|
510
|
+
arrayScope: "opens"
|
|
511
|
+
}],
|
|
512
|
+
["INTERCEPT", { arrayScope: "opens" }],
|
|
513
|
+
["LINEST", {
|
|
514
|
+
intersect: "never",
|
|
515
|
+
arrayScope: "opens"
|
|
516
|
+
}],
|
|
517
|
+
["LOGEST", {
|
|
518
|
+
intersect: "never",
|
|
519
|
+
arrayScope: "opens"
|
|
520
|
+
}],
|
|
521
|
+
["PEARSON", { arrayScope: "opens" }],
|
|
522
|
+
["PROB", { arrayScope: "opens" }],
|
|
523
|
+
["RSQ", { arrayScope: "opens" }],
|
|
524
|
+
["SLOPE", { arrayScope: "opens" }],
|
|
525
|
+
["STEYX", { arrayScope: "opens" }],
|
|
526
|
+
["SUMX2MY2", { arrayScope: "opens" }],
|
|
527
|
+
["SUMX2PY2", { arrayScope: "opens" }],
|
|
528
|
+
["SUMXMY2", { arrayScope: "opens" }],
|
|
529
|
+
["T.TEST", {
|
|
530
|
+
prefix: G,
|
|
531
|
+
arrayScope: "opens"
|
|
532
|
+
}],
|
|
533
|
+
["TREND", {
|
|
534
|
+
intersect: "never",
|
|
535
|
+
arrayScope: "opens"
|
|
536
|
+
}],
|
|
537
|
+
["CHITEST", { arrayScope: "opens" }],
|
|
538
|
+
["FORECAST.ETS", {
|
|
539
|
+
prefix: G,
|
|
540
|
+
arrayScope: "opens"
|
|
541
|
+
}],
|
|
542
|
+
["FORECAST.ETS.CONFINT", {
|
|
543
|
+
prefix: G,
|
|
544
|
+
arrayScope: "opens"
|
|
545
|
+
}],
|
|
546
|
+
["FORECAST.ETS.SEASONALITY", {
|
|
547
|
+
prefix: G,
|
|
548
|
+
arrayScope: "opens"
|
|
549
|
+
}],
|
|
550
|
+
["FORECAST.ETS.STAT", {
|
|
551
|
+
prefix: G,
|
|
552
|
+
arrayScope: "opens"
|
|
553
|
+
}],
|
|
554
|
+
["FTEST", { arrayScope: "opens" }],
|
|
555
|
+
["TTEST", { arrayScope: "opens" }],
|
|
556
|
+
["FREQUENCY", { arrayScope: "opens" }],
|
|
557
|
+
["MODE", { arrayScope: "opens" }],
|
|
558
|
+
["MODE.MULT", {
|
|
559
|
+
prefix: G,
|
|
560
|
+
arrayScope: "opens"
|
|
561
|
+
}],
|
|
562
|
+
["MODE.SNGL", {
|
|
563
|
+
prefix: G,
|
|
564
|
+
arrayScope: "opens"
|
|
565
|
+
}],
|
|
566
|
+
["AVEDEV", { arrayScope: "consumer" }],
|
|
567
|
+
["AVERAGE", { arrayScope: "consumer" }],
|
|
568
|
+
["AVERAGEA", { arrayScope: "consumer" }],
|
|
569
|
+
["CONCAT", {
|
|
570
|
+
prefix: G,
|
|
571
|
+
arrayScope: "consumer"
|
|
572
|
+
}],
|
|
573
|
+
["COUNT", { arrayScope: "consumer" }],
|
|
574
|
+
["COUNTA", { arrayScope: "consumer" }],
|
|
575
|
+
["DEVSQ", { arrayScope: "consumer" }],
|
|
576
|
+
["GEOMEAN", { arrayScope: "consumer" }],
|
|
577
|
+
["HARMEAN", { arrayScope: "consumer" }],
|
|
578
|
+
["HLOOKUP", { arrayScope: "consumer" }],
|
|
579
|
+
["KURT", { arrayScope: "consumer" }],
|
|
580
|
+
["LARGE", { arrayScope: "consumer" }],
|
|
581
|
+
["LET", {
|
|
582
|
+
prefix: G,
|
|
583
|
+
arrayScope: "consumer"
|
|
584
|
+
}],
|
|
585
|
+
["MAX", { arrayScope: "consumer" }],
|
|
586
|
+
["MAXA", { arrayScope: "consumer" }],
|
|
587
|
+
["MEDIAN", { arrayScope: "consumer" }],
|
|
588
|
+
["MIN", { arrayScope: "consumer" }],
|
|
589
|
+
["MINA", { arrayScope: "consumer" }],
|
|
590
|
+
["PERCENTILE", { arrayScope: "consumer" }],
|
|
591
|
+
["PERCENTILE.EXC", {
|
|
592
|
+
prefix: G,
|
|
593
|
+
arrayScope: "consumer"
|
|
594
|
+
}],
|
|
595
|
+
["PERCENTILE.INC", {
|
|
596
|
+
prefix: G,
|
|
597
|
+
arrayScope: "consumer"
|
|
598
|
+
}],
|
|
599
|
+
["PRODUCT", { arrayScope: "consumer" }],
|
|
600
|
+
["QUARTILE", { arrayScope: "consumer" }],
|
|
601
|
+
["QUARTILE.EXC", {
|
|
602
|
+
prefix: G,
|
|
603
|
+
arrayScope: "consumer"
|
|
604
|
+
}],
|
|
605
|
+
["QUARTILE.INC", {
|
|
606
|
+
prefix: G,
|
|
607
|
+
arrayScope: "consumer"
|
|
608
|
+
}],
|
|
609
|
+
["SKEW", { arrayScope: "consumer" }],
|
|
610
|
+
["SKEW.P", {
|
|
611
|
+
prefix: G,
|
|
612
|
+
arrayScope: "consumer"
|
|
613
|
+
}],
|
|
614
|
+
["SMALL", { arrayScope: "consumer" }],
|
|
615
|
+
["STDEV", { arrayScope: "consumer" }],
|
|
616
|
+
["STDEV.P", {
|
|
617
|
+
prefix: G,
|
|
618
|
+
arrayScope: "consumer"
|
|
619
|
+
}],
|
|
620
|
+
["STDEV.S", {
|
|
621
|
+
prefix: G,
|
|
622
|
+
arrayScope: "consumer"
|
|
623
|
+
}],
|
|
624
|
+
["STDEVA", { arrayScope: "consumer" }],
|
|
625
|
+
["STDEVP", { arrayScope: "consumer" }],
|
|
626
|
+
["SUM", { arrayScope: "consumer" }],
|
|
627
|
+
["SUMSQ", { arrayScope: "consumer" }],
|
|
628
|
+
["TRIMMEAN", { arrayScope: "consumer" }],
|
|
629
|
+
["VAR", { arrayScope: "consumer" }],
|
|
630
|
+
["VAR.P", {
|
|
631
|
+
prefix: G,
|
|
632
|
+
arrayScope: "consumer"
|
|
633
|
+
}],
|
|
634
|
+
["VAR.S", {
|
|
635
|
+
prefix: G,
|
|
636
|
+
arrayScope: "consumer"
|
|
637
|
+
}],
|
|
638
|
+
["VARA", { arrayScope: "consumer" }],
|
|
639
|
+
["VARP", { arrayScope: "consumer" }],
|
|
640
|
+
["VARPA", { arrayScope: "consumer" }],
|
|
641
|
+
["VLOOKUP", { arrayScope: "consumer" }],
|
|
642
|
+
["AND", { arrayScope: "consumer" }],
|
|
643
|
+
["CUBEVALUE", { arrayScope: "consumer" }],
|
|
644
|
+
["FIELDVALUE", {
|
|
645
|
+
prefix: G,
|
|
646
|
+
arrayScope: "consumer"
|
|
647
|
+
}],
|
|
648
|
+
["FILTERXML", {
|
|
649
|
+
prefix: G,
|
|
650
|
+
arrayScope: "consumer"
|
|
651
|
+
}],
|
|
652
|
+
["FVSCHEDULE", {
|
|
653
|
+
intersect: "never",
|
|
654
|
+
arrayScope: "consumer"
|
|
655
|
+
}],
|
|
656
|
+
["HYPERLINK", { arrayScope: "consumer" }],
|
|
657
|
+
["ISREF", { arrayScope: "consumer" }],
|
|
658
|
+
["MUNIT", {
|
|
659
|
+
prefix: G,
|
|
660
|
+
arrayScope: "consumer"
|
|
661
|
+
}],
|
|
662
|
+
["OR", { arrayScope: "consumer" }],
|
|
663
|
+
["PERCENTOF", {
|
|
664
|
+
prefix: G,
|
|
665
|
+
arrayScope: "consumer"
|
|
666
|
+
}],
|
|
667
|
+
["PERCENTRANK", { arrayScope: "consumer" }],
|
|
668
|
+
["PERCENTRANK.EXC", {
|
|
669
|
+
prefix: G,
|
|
670
|
+
arrayScope: "consumer"
|
|
671
|
+
}],
|
|
672
|
+
["PERCENTRANK.INC", {
|
|
673
|
+
prefix: G,
|
|
674
|
+
arrayScope: "consumer"
|
|
675
|
+
}],
|
|
676
|
+
["REGEXEXTRACT", {
|
|
677
|
+
prefix: G,
|
|
678
|
+
arrayScope: "consumer"
|
|
679
|
+
}],
|
|
680
|
+
["SEQUENCE", {
|
|
681
|
+
prefix: G,
|
|
682
|
+
arrayScope: "consumer"
|
|
683
|
+
}],
|
|
684
|
+
["SHEET", {
|
|
685
|
+
prefix: G,
|
|
686
|
+
arrayScope: "consumer"
|
|
687
|
+
}],
|
|
688
|
+
["STDEVPA", { arrayScope: "consumer" }],
|
|
689
|
+
["STOCKHISTORY", {
|
|
690
|
+
prefix: G,
|
|
691
|
+
arrayScope: "consumer"
|
|
692
|
+
}],
|
|
693
|
+
["XOR", {
|
|
694
|
+
prefix: G,
|
|
695
|
+
arrayScope: "consumer"
|
|
696
|
+
}],
|
|
697
|
+
["Z.TEST", {
|
|
698
|
+
prefix: G,
|
|
699
|
+
arrayScope: "consumer"
|
|
700
|
+
}],
|
|
701
|
+
["ZTEST", { arrayScope: "consumer" }],
|
|
702
|
+
["IF", { arrayScope: "lazy" }],
|
|
703
|
+
["IFERROR", {
|
|
704
|
+
valueReturn: !0,
|
|
705
|
+
arrayScope: "lazy"
|
|
706
|
+
}],
|
|
707
|
+
["IFNA", {
|
|
708
|
+
prefix: G,
|
|
709
|
+
valueReturn: !0,
|
|
710
|
+
arrayScope: "lazy"
|
|
711
|
+
}],
|
|
712
|
+
["IFS", {
|
|
713
|
+
prefix: G,
|
|
714
|
+
arrayReturn: !0,
|
|
715
|
+
arrayScope: "lazy"
|
|
716
|
+
}],
|
|
717
|
+
["SWITCH", {
|
|
718
|
+
prefix: G,
|
|
719
|
+
arrayReturn: !0,
|
|
720
|
+
arrayScope: "lazy"
|
|
721
|
+
}],
|
|
722
|
+
["CHOOSE", { scopeClears: [0, 1] }],
|
|
723
|
+
["DROP", {
|
|
724
|
+
prefix: G,
|
|
725
|
+
scopeClears: [1, 2]
|
|
726
|
+
}],
|
|
727
|
+
["INDIRECT", { volatile: !0 }],
|
|
728
|
+
["INFO", { volatile: !0 }],
|
|
729
|
+
["NOW", { volatile: !0 }],
|
|
730
|
+
["OFFSET", { volatile: !0 }],
|
|
731
|
+
["RAND", { volatile: !0 }],
|
|
732
|
+
["RANDARRAY", {
|
|
733
|
+
prefix: G,
|
|
734
|
+
arrayScope: "consumer",
|
|
735
|
+
volatile: !0
|
|
736
|
+
}],
|
|
737
|
+
["TODAY", { volatile: !0 }],
|
|
738
|
+
["TRIMRANGE", {
|
|
739
|
+
prefix: G,
|
|
740
|
+
arrayScope: "opens",
|
|
741
|
+
volatile: !0
|
|
742
|
+
}],
|
|
743
|
+
["ABS", {}],
|
|
744
|
+
["ACOS", {}],
|
|
745
|
+
["ACOSH", {}],
|
|
746
|
+
["ACOT", { prefix: G }],
|
|
747
|
+
["ACOTH", { prefix: G }],
|
|
748
|
+
["ADDRESS", {}],
|
|
749
|
+
["ARABIC", { prefix: G }],
|
|
750
|
+
["AREAS", {}],
|
|
751
|
+
["ASC", {}],
|
|
752
|
+
["ASIN", {}],
|
|
753
|
+
["ASINH", {}],
|
|
754
|
+
["ATAN", {}],
|
|
755
|
+
["ATAN2", {}],
|
|
756
|
+
["ATANH", {}],
|
|
757
|
+
["AVERAGEIF", {}],
|
|
758
|
+
["AVERAGEIFS", {}],
|
|
759
|
+
["BAHTTEXT", {}],
|
|
760
|
+
["BASE", { prefix: G }],
|
|
761
|
+
["BETA.DIST", { prefix: G }],
|
|
762
|
+
["BETA.INV", { prefix: G }],
|
|
763
|
+
["BETADIST", {}],
|
|
764
|
+
["BETAINV", {}],
|
|
765
|
+
["BINOM.DIST", { prefix: G }],
|
|
766
|
+
["BINOM.DIST.RANGE", { prefix: G }],
|
|
767
|
+
["BINOM.INV", { prefix: G }],
|
|
768
|
+
["BINOMDIST", {}],
|
|
769
|
+
["BITAND", { prefix: G }],
|
|
770
|
+
["BITLSHIFT", { prefix: G }],
|
|
771
|
+
["BITOR", { prefix: G }],
|
|
772
|
+
["BITRSHIFT", { prefix: G }],
|
|
773
|
+
["BITXOR", { prefix: G }],
|
|
774
|
+
["CEILING", {}],
|
|
775
|
+
["CEILING.MATH", { prefix: G }],
|
|
776
|
+
["CEILING.PRECISE", { prefix: G }],
|
|
777
|
+
["CHAR", {}],
|
|
778
|
+
["CHIDIST", {}],
|
|
779
|
+
["CHIINV", {}],
|
|
780
|
+
["CHISQ.DIST", { prefix: G }],
|
|
781
|
+
["CHISQ.DIST.RT", { prefix: G }],
|
|
782
|
+
["CHISQ.INV", { prefix: G }],
|
|
783
|
+
["CHISQ.INV.RT", { prefix: G }],
|
|
784
|
+
["CLEAN", {}],
|
|
785
|
+
["CODE", {}],
|
|
786
|
+
["COMBIN", {}],
|
|
787
|
+
["COMBINA", { prefix: G }],
|
|
788
|
+
["CONFIDENCE", {}],
|
|
789
|
+
["CONFIDENCE.NORM", { prefix: G }],
|
|
790
|
+
["CONFIDENCE.T", { prefix: G }],
|
|
791
|
+
["COS", {}],
|
|
792
|
+
["COSH", {}],
|
|
793
|
+
["COT", { prefix: G }],
|
|
794
|
+
["COTH", { prefix: G }],
|
|
795
|
+
["COUNTBLANK", {}],
|
|
796
|
+
["COUNTIF", {}],
|
|
797
|
+
["COUNTIFS", {}],
|
|
798
|
+
["CRITBINOM", {}],
|
|
799
|
+
["CSC", { prefix: G }],
|
|
800
|
+
["CSCH", { prefix: G }],
|
|
801
|
+
["CUBEKPIMEMBER", {}],
|
|
802
|
+
["CUBEMEMBER", {}],
|
|
803
|
+
["CUBEMEMBERPROPERTY", {}],
|
|
804
|
+
["CUBERANKEDMEMBER", {}],
|
|
805
|
+
["CUBESET", {}],
|
|
806
|
+
["CUBESETCOUNT", {}],
|
|
807
|
+
["DATE", {}],
|
|
808
|
+
["DATEDIF", {}],
|
|
809
|
+
["DATESTRING", {}],
|
|
810
|
+
["DATEVALUE", {}],
|
|
811
|
+
["DAY", {}],
|
|
812
|
+
["DAYS", { prefix: G }],
|
|
813
|
+
["DAYS360", {}],
|
|
814
|
+
["DB", {}],
|
|
815
|
+
["DBCS", {}],
|
|
816
|
+
["DDB", {}],
|
|
817
|
+
["DECIMAL", { prefix: G }],
|
|
818
|
+
["DEGREES", {}],
|
|
819
|
+
["DETECTLANGUAGE", { prefix: G }],
|
|
820
|
+
["DOLLAR", {}],
|
|
821
|
+
["ECMA.CEILING", {}],
|
|
822
|
+
["ENCODEURL", { prefix: G }],
|
|
823
|
+
["ERROR.TYPE", {}],
|
|
824
|
+
["EVEN", {}],
|
|
825
|
+
["EXACT", {}],
|
|
826
|
+
["EXP", {}],
|
|
827
|
+
["EXPON.DIST", { prefix: G }],
|
|
828
|
+
["EXPONDIST", {}],
|
|
829
|
+
["F.DIST", { prefix: G }],
|
|
830
|
+
["F.DIST.RT", { prefix: G }],
|
|
831
|
+
["F.INV", { prefix: G }],
|
|
832
|
+
["F.INV.RT", { prefix: G }],
|
|
833
|
+
["FACT", {}],
|
|
834
|
+
["FALSE", {}],
|
|
835
|
+
["FDIST", {}],
|
|
836
|
+
["FIND", {}],
|
|
837
|
+
["FINDB", {}],
|
|
838
|
+
["FINV", {}],
|
|
839
|
+
["FISHER", {}],
|
|
840
|
+
["FISHERINV", {}],
|
|
841
|
+
["FIXED", {}],
|
|
842
|
+
["FLOOR", {}],
|
|
843
|
+
["FLOOR.MATH", { prefix: G }],
|
|
844
|
+
["FLOOR.PRECISE", { prefix: G }],
|
|
845
|
+
["FV", {}],
|
|
846
|
+
["GAMMA", { prefix: G }],
|
|
847
|
+
["GAMMA.DIST", { prefix: G }],
|
|
848
|
+
["GAMMA.INV", { prefix: G }],
|
|
849
|
+
["GAMMADIST", {}],
|
|
850
|
+
["GAMMAINV", {}],
|
|
851
|
+
["GAMMALN", {}],
|
|
852
|
+
["GAMMALN.PRECISE", { prefix: G }],
|
|
853
|
+
["GAUSS", { prefix: G }],
|
|
854
|
+
["HOUR", {}],
|
|
855
|
+
["HYPGEOM.DIST", { prefix: G }],
|
|
856
|
+
["HYPGEOMDIST", {}],
|
|
857
|
+
["IMAGE", { prefix: G }],
|
|
858
|
+
["INT", {}],
|
|
859
|
+
["IPMT", {}],
|
|
860
|
+
["ISBLANK", {}],
|
|
861
|
+
["ISERR", {}],
|
|
862
|
+
["ISERROR", {}],
|
|
863
|
+
["ISEVEN", {}],
|
|
864
|
+
["ISLOGICAL", {}],
|
|
865
|
+
["ISNA", {}],
|
|
866
|
+
["ISNONTEXT", {}],
|
|
867
|
+
["ISNUMBER", {}],
|
|
868
|
+
["ISO.CEILING", {}],
|
|
869
|
+
["ISODD", {}],
|
|
870
|
+
["ISOWEEKNUM", { prefix: G }],
|
|
871
|
+
["ISPMT", {}],
|
|
872
|
+
["ISTEXT", {}],
|
|
873
|
+
["LAMBDA", { prefix: G }],
|
|
874
|
+
["LEFT", {}],
|
|
875
|
+
["LEFTB", {}],
|
|
876
|
+
["LEN", {}],
|
|
877
|
+
["LENB", {}],
|
|
878
|
+
["LN", {}],
|
|
879
|
+
["LOG", {}],
|
|
880
|
+
["LOG10", {}],
|
|
881
|
+
["LOGINV", {}],
|
|
882
|
+
["LOGNORM.DIST", { prefix: G }],
|
|
883
|
+
["LOGNORM.INV", { prefix: G }],
|
|
884
|
+
["LOGNORMDIST", {}],
|
|
885
|
+
["LOWER", {}],
|
|
886
|
+
["MAXIFS", { prefix: G }],
|
|
887
|
+
["MID", {}],
|
|
888
|
+
["MIDB", {}],
|
|
889
|
+
["MINIFS", { prefix: G }],
|
|
890
|
+
["MINUTE", {}],
|
|
891
|
+
["MOD", {}],
|
|
892
|
+
["MONTH", {}],
|
|
893
|
+
["NA", {}],
|
|
894
|
+
["NEGBINOM.DIST", { prefix: G }],
|
|
895
|
+
["NEGBINOMDIST", {}],
|
|
896
|
+
["NORM.DIST", { prefix: G }],
|
|
897
|
+
["NORM.INV", { prefix: G }],
|
|
898
|
+
["NORM.S.DIST", { prefix: G }],
|
|
899
|
+
["NORM.S.INV", { prefix: G }],
|
|
900
|
+
["NORMDIST", {}],
|
|
901
|
+
["NORMINV", {}],
|
|
902
|
+
["NORMSDIST", {}],
|
|
903
|
+
["NORMSINV", {}],
|
|
904
|
+
["NOT", {}],
|
|
905
|
+
["NPER", {}],
|
|
906
|
+
["NUMBERSTRING", {}],
|
|
907
|
+
["NUMBERVALUE", { prefix: G }],
|
|
908
|
+
["ODD", {}],
|
|
909
|
+
["PDURATION", { prefix: G }],
|
|
910
|
+
["PERMUT", {}],
|
|
911
|
+
["PERMUTATIONA", { prefix: G }],
|
|
912
|
+
["PHI", { prefix: G }],
|
|
913
|
+
["PHONETIC", {}],
|
|
914
|
+
["PI", {}],
|
|
915
|
+
["PMT", {}],
|
|
916
|
+
["POISSON", {}],
|
|
917
|
+
["POISSON.DIST", { prefix: G }],
|
|
918
|
+
["POWER", {}],
|
|
919
|
+
["PPMT", {}],
|
|
920
|
+
["PROPER", {}],
|
|
921
|
+
["PV", {}],
|
|
922
|
+
["RADIANS", {}],
|
|
923
|
+
["RANK", {}],
|
|
924
|
+
["RANK.AVG", { prefix: G }],
|
|
925
|
+
["RANK.EQ", { prefix: G }],
|
|
926
|
+
["RATE", {}],
|
|
927
|
+
["REGEXREPLACE", { prefix: G }],
|
|
928
|
+
["REGEXTEST", { prefix: G }],
|
|
929
|
+
["REPLACE", {}],
|
|
930
|
+
["REPLACEB", {}],
|
|
931
|
+
["REPT", {}],
|
|
932
|
+
["RIGHT", {}],
|
|
933
|
+
["RIGHTB", {}],
|
|
934
|
+
["ROMAN", {}],
|
|
935
|
+
["ROUND", {}],
|
|
936
|
+
["ROUNDDOWN", {}],
|
|
937
|
+
["ROUNDUP", {}],
|
|
938
|
+
["RRI", { prefix: G }],
|
|
939
|
+
["RTD", {}],
|
|
940
|
+
["SEARCH", {}],
|
|
941
|
+
["SEARCHB", {}],
|
|
942
|
+
["SEC", { prefix: G }],
|
|
943
|
+
["SECH", { prefix: G }],
|
|
944
|
+
["SECOND", {}],
|
|
945
|
+
["SIGN", {}],
|
|
946
|
+
["SIN", {}],
|
|
947
|
+
["SINH", {}],
|
|
948
|
+
["SLN", {}],
|
|
949
|
+
["SPLIT", {}],
|
|
950
|
+
["SQRT", {}],
|
|
951
|
+
["STANDARDIZE", {}],
|
|
952
|
+
["SUBSTITUTE", {}],
|
|
953
|
+
["SUBTOTAL", {}],
|
|
954
|
+
["SUMIF", {}],
|
|
955
|
+
["SUMIFS", {}],
|
|
956
|
+
["SYD", {}],
|
|
957
|
+
["T.DIST", { prefix: G }],
|
|
958
|
+
["T.DIST.2T", { prefix: G }],
|
|
959
|
+
["T.DIST.RT", { prefix: G }],
|
|
960
|
+
["T.INV", { prefix: G }],
|
|
961
|
+
["T.INV.2T", { prefix: G }],
|
|
962
|
+
["TAN", {}],
|
|
963
|
+
["TANH", {}],
|
|
964
|
+
["TDIST", {}],
|
|
965
|
+
["TEXT", {}],
|
|
966
|
+
["TEXTAFTER", { prefix: G }],
|
|
967
|
+
["TEXTBEFORE", { prefix: G }],
|
|
968
|
+
["TIME", {}],
|
|
969
|
+
["TIMEVALUE", {}],
|
|
970
|
+
["TINV", {}],
|
|
971
|
+
["TRANSLATE", { prefix: G }],
|
|
972
|
+
["TRIM", {}],
|
|
973
|
+
["TRUE", {}],
|
|
974
|
+
["TRUNC", {}],
|
|
975
|
+
["UNICHAR", { prefix: G }],
|
|
976
|
+
["UNICODE", { prefix: G }],
|
|
977
|
+
["UPPER", {}],
|
|
978
|
+
["VALUE", {}],
|
|
979
|
+
["VALUETOTEXT", { prefix: G }],
|
|
980
|
+
["VDB", {}],
|
|
981
|
+
["WAIT", {}],
|
|
982
|
+
["WEBSERVICE", { prefix: G }],
|
|
983
|
+
["WEEKDAY", {}],
|
|
984
|
+
["WEIBULL", {}],
|
|
985
|
+
["WEIBULL.DIST", { prefix: G }],
|
|
986
|
+
["YEAR", {}]
|
|
987
|
+
]), H = (e) => "never" === W.get(e)?.intersect, $ = (e, t) => !0 === W.get(e)?.slotNever?.includes(t), Y = (e, t) => !0 === W.get(e)?.slotAlways?.includes(t), X = (e) => !0 === W.get(e)?.valueReturn, _ = (e) => W.get(e)?.readsPerCell, K = (e) => "opens" === W.get(e)?.arrayScope, j = (e, t) => ({
|
|
988
|
+
type: "function",
|
|
989
|
+
value: e,
|
|
990
|
+
inputs: t ?? null
|
|
991
|
+
});
|
|
992
|
+
function q(e) {
|
|
993
|
+
return (t, r) => {
|
|
994
|
+
const n = t.type, a = t.value;
|
|
995
|
+
if ("function" === n) {
|
|
996
|
+
const e = String(a).toUpperCase(), r = (o = e, W.get(o)?.prefix), n = "LET" === e || "LAMBDA" === e ? ee(t, e) : void 0;
|
|
997
|
+
if (r || n) return {
|
|
998
|
+
...t,
|
|
999
|
+
value: r ? r + a : a,
|
|
1000
|
+
inputs: n ?? t.inputs
|
|
1001
|
+
};
|
|
1002
|
+
} else if ("infix" === n) {
|
|
1003
|
+
let e;
|
|
1004
|
+
if (".:." === a ? e = "_TRO_ALL" : ".:" === a ? e = "_TRO_LEADING" : ":." === a && (e = "_TRO_TRAILING"), e) {
|
|
1005
|
+
const r = {
|
|
1006
|
+
type: "infix",
|
|
1007
|
+
value: ":",
|
|
1008
|
+
inputs: t.inputs,
|
|
1009
|
+
isReference: !0
|
|
1010
|
+
};
|
|
1011
|
+
return j(G + e, [r]);
|
|
1012
|
+
}
|
|
1013
|
+
} else if ("postfix" === n) {
|
|
1014
|
+
if ("#" === a) return j(G + "ANCHORARRAY", [t.inputs[0]]);
|
|
1015
|
+
} else if ("string" === n) {
|
|
1016
|
+
const e = String(a ?? "");
|
|
1017
|
+
if (e.length > 255) {
|
|
1018
|
+
const t = [];
|
|
1019
|
+
for (let r = 0; r < e.length; r += 255) t.push({
|
|
1020
|
+
type: "string",
|
|
1021
|
+
value: e.substring(r, r + 255),
|
|
1022
|
+
inputs: null
|
|
1023
|
+
});
|
|
1024
|
+
return j(G + "_LONGTEXT", t);
|
|
1025
|
+
}
|
|
1026
|
+
} else if ("prefix" === n) {
|
|
1027
|
+
if ("@" === a && "tableReference" !== r?.type) return j(G + "SINGLE", [t.inputs[0]]);
|
|
1028
|
+
} else if ("named" === n) {
|
|
1029
|
+
const r = a, n = r?.name;
|
|
1030
|
+
if (n && !r.scope) {
|
|
1031
|
+
const r = n.toUpperCase();
|
|
1032
|
+
if (((e) => {
|
|
1033
|
+
const t = W.get(e);
|
|
1034
|
+
return void 0 !== t && !0 !== t.unimplemented;
|
|
1035
|
+
})(r) && !e?.has(r)) return {
|
|
1036
|
+
...t,
|
|
1037
|
+
value: {
|
|
1038
|
+
name: "_xleta." + n,
|
|
1039
|
+
scope: null
|
|
1040
|
+
}
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
} else if ("tableReference" === n) return !t.inputs && t.value ? {
|
|
1044
|
+
...t,
|
|
1045
|
+
inputs: []
|
|
1046
|
+
} : oe(t);
|
|
1047
|
+
var o;
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
var z = (e, t) => e.length > t.length && e.substring(0, t.length).toLowerCase() === t, Q = (e) => {
|
|
1051
|
+
if ("named" !== e?.type) return;
|
|
1052
|
+
const t = e.value, r = t?.name;
|
|
1053
|
+
return !r || t.scope || z(r, "_xlpm.") ? void 0 : z(r, "_xleta.") ? r.substring(7) : r;
|
|
1054
|
+
}, Z = (e, t) => ({
|
|
1055
|
+
...e,
|
|
1056
|
+
value: {
|
|
1057
|
+
name: "_xlpm." + t,
|
|
1058
|
+
scope: null
|
|
1059
|
+
}
|
|
1060
|
+
}), J = (e, t) => {
|
|
1061
|
+
const r = Q(e);
|
|
1062
|
+
if (void 0 !== r) return r.toUpperCase() === t ? Z(e, r) : e;
|
|
1063
|
+
const n = e.inputs;
|
|
1064
|
+
if (!n) return e;
|
|
1065
|
+
let a;
|
|
1066
|
+
for (let e = 0; e < n.length; e++) {
|
|
1067
|
+
const r = n[e];
|
|
1068
|
+
if (!r) continue;
|
|
1069
|
+
const o = J(r, t);
|
|
1070
|
+
o !== r && (a || (a = [...n]), a[e] = o);
|
|
1071
|
+
}
|
|
1072
|
+
return a ? {
|
|
1073
|
+
...e,
|
|
1074
|
+
inputs: a
|
|
1075
|
+
} : e;
|
|
1076
|
+
}, ee = (e, t) => {
|
|
1077
|
+
const r = e.inputs, n = r?.length ?? 0;
|
|
1078
|
+
if (!r || n < 2) return;
|
|
1079
|
+
let a;
|
|
1080
|
+
const o = (e) => (a ?? r)[e], s = (e, t) => {
|
|
1081
|
+
t !== o(e) && (a || (a = [...r]), a[e] = t);
|
|
1082
|
+
}, i = [];
|
|
1083
|
+
if ("LAMBDA" === t) for (let e = 0; e < n - 1; e++) i.push([e, n - 1]);
|
|
1084
|
+
else for (let e = 0; e + 1 < n; e += 2) i.push([e, e + 2]);
|
|
1085
|
+
for (const [e, t] of i) {
|
|
1086
|
+
const r = o(e), a = Q(r);
|
|
1087
|
+
if (void 0 === a) continue;
|
|
1088
|
+
s(e, !0 === r.value?.optional ? {
|
|
1089
|
+
...r,
|
|
1090
|
+
value: {
|
|
1091
|
+
name: "_xlop." + a,
|
|
1092
|
+
scope: null
|
|
1093
|
+
}
|
|
1094
|
+
} : Z(r, a));
|
|
1095
|
+
const i = a.toUpperCase();
|
|
1096
|
+
for (let e = t; e < n; e++) {
|
|
1097
|
+
const t = o(e);
|
|
1098
|
+
t && s(e, J(t, i));
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
return a;
|
|
1102
|
+
}, te = [
|
|
1103
|
+
"_XLFN._XLWS.",
|
|
1104
|
+
"_XLFN.",
|
|
1105
|
+
"_XLWS.",
|
|
1106
|
+
"_XLETA.",
|
|
1107
|
+
"_XLPM."
|
|
1108
|
+
], re = (e) => {
|
|
1109
|
+
const t = e.toUpperCase();
|
|
1110
|
+
let r = 0, n = !0;
|
|
1111
|
+
for (; n;) {
|
|
1112
|
+
n = !1;
|
|
1113
|
+
for (const e of te) if (t.startsWith(e, r)) {
|
|
1114
|
+
r += e.length, n = !0;
|
|
1115
|
+
break;
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
return 0 === r ? e : e.substring(r);
|
|
1119
|
+
}, ne = /* @__PURE__ */ new Map([
|
|
1120
|
+
["_TRO_ALL", ".:."],
|
|
1121
|
+
["_TRO_LEADING", ".:"],
|
|
1122
|
+
["_TRO_TRAILING", ":."]
|
|
1123
|
+
]);
|
|
1124
|
+
function ae() {
|
|
1125
|
+
return (e) => {
|
|
1126
|
+
const t = e.type;
|
|
1127
|
+
if ("function" === t) {
|
|
1128
|
+
const t = String(e.value ?? ""), r = re(t), n = r.toUpperCase(), a = e.inputs;
|
|
1129
|
+
if ("SINGLE" === n && 1 === a?.length) return {
|
|
1130
|
+
type: "prefix",
|
|
1131
|
+
value: "@",
|
|
1132
|
+
inputs: [a[0]],
|
|
1133
|
+
isReference: !0
|
|
1134
|
+
};
|
|
1135
|
+
if ("ANCHORARRAY" === n && 1 === a?.length) return {
|
|
1136
|
+
type: "postfix",
|
|
1137
|
+
value: "#",
|
|
1138
|
+
inputs: [a[0]],
|
|
1139
|
+
isReference: !0
|
|
1140
|
+
};
|
|
1141
|
+
const o = ne.get(n);
|
|
1142
|
+
if (o && 1 === a?.length && 2 === a[0]?.inputs?.length) {
|
|
1143
|
+
const e = a[0];
|
|
1144
|
+
return {
|
|
1145
|
+
type: "infix",
|
|
1146
|
+
value: o,
|
|
1147
|
+
inputs: [e.inputs[0], e.inputs[1]],
|
|
1148
|
+
isReference: e.isReference ?? !0
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
if ("_LONGTEXT" === n && a && a.length > 0 && a.every((e) => "string" === e?.type)) {
|
|
1152
|
+
let e = "";
|
|
1153
|
+
for (let t = 0; t < a.length; t++) e += String(a[t].value ?? "");
|
|
1154
|
+
return {
|
|
1155
|
+
type: "string",
|
|
1156
|
+
value: e,
|
|
1157
|
+
inputs: null
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
if (r !== t) return {
|
|
1161
|
+
...e,
|
|
1162
|
+
value: n
|
|
1163
|
+
};
|
|
1164
|
+
} else if ("named" === t) {
|
|
1165
|
+
const t = e.value, r = t?.name ?? "";
|
|
1166
|
+
if (z(r, "_xlop.")) {
|
|
1167
|
+
const n = re(r.substring(6));
|
|
1168
|
+
return {
|
|
1169
|
+
...e,
|
|
1170
|
+
value: {
|
|
1171
|
+
name: n,
|
|
1172
|
+
scope: t?.scope ?? null,
|
|
1173
|
+
optional: !0
|
|
1174
|
+
}
|
|
1175
|
+
};
|
|
1176
|
+
}
|
|
1177
|
+
const n = re(r);
|
|
1178
|
+
if (n !== r) return {
|
|
1179
|
+
...e,
|
|
1180
|
+
value: {
|
|
1181
|
+
name: n,
|
|
1182
|
+
scope: t?.scope ?? null
|
|
1183
|
+
}
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
var oe = (e) => {
|
|
1189
|
+
const t = e.inputs;
|
|
1190
|
+
if (!t) return;
|
|
1191
|
+
let r = !1;
|
|
1192
|
+
const n = [];
|
|
1193
|
+
for (const e of t) if ("prefix" === e?.type && "@" === e.value) {
|
|
1194
|
+
n.push({
|
|
1195
|
+
type: "tableSpecifier",
|
|
1196
|
+
value: "#This Row",
|
|
1197
|
+
inputs: null,
|
|
1198
|
+
isReference: !0
|
|
1199
|
+
});
|
|
1200
|
+
const t = e.inputs?.[0];
|
|
1201
|
+
t && n.push("tableColumn" === t.type ? {
|
|
1202
|
+
type: "tableColumn",
|
|
1203
|
+
value: t.value,
|
|
1204
|
+
inputs: null,
|
|
1205
|
+
isReference: !0
|
|
1206
|
+
} : t), r = !0;
|
|
1207
|
+
} else n.push(e);
|
|
1208
|
+
return r ? {
|
|
1209
|
+
...e,
|
|
1210
|
+
inputs: n
|
|
1211
|
+
} : void 0;
|
|
1212
|
+
}, se = (e) => {
|
|
1213
|
+
if (!e) return !1;
|
|
1214
|
+
if ("function" === e.type && (t = fe(e), !0 === W.get(t)?.volatile)) return !0;
|
|
1215
|
+
var t;
|
|
1216
|
+
const r = e.inputs;
|
|
1217
|
+
if (!r) return !1;
|
|
1218
|
+
for (let e = 0; e < r.length; e++) if (se(r[e])) return !0;
|
|
1219
|
+
return !1;
|
|
1220
|
+
}, ie = (e, t) => {
|
|
1221
|
+
if (!e) return !1;
|
|
1222
|
+
if (he(e, t)) return !0;
|
|
1223
|
+
const r = e.inputs;
|
|
1224
|
+
if (!r) return !1;
|
|
1225
|
+
for (let e = 0; e < r.length; e++) if (ie(r[e], t)) return !0;
|
|
1226
|
+
return !1;
|
|
1227
|
+
}, le = /* @__PURE__ */ new Set([
|
|
1228
|
+
"+",
|
|
1229
|
+
"-",
|
|
1230
|
+
"*",
|
|
1231
|
+
"/",
|
|
1232
|
+
"^",
|
|
1233
|
+
"&",
|
|
1234
|
+
"=",
|
|
1235
|
+
"<>",
|
|
1236
|
+
">",
|
|
1237
|
+
"<",
|
|
1238
|
+
">=",
|
|
1239
|
+
"<="
|
|
1240
|
+
]), ce = /* @__PURE__ */ new Set(["-", "+"]), ue = /* @__PURE__ */ new Set([
|
|
1241
|
+
":",
|
|
1242
|
+
" ",
|
|
1243
|
+
".:.",
|
|
1244
|
+
".:",
|
|
1245
|
+
":."
|
|
1246
|
+
]), pe = (e) => {
|
|
1247
|
+
if (!e) return null;
|
|
1248
|
+
if ("cell" === e.type) {
|
|
1249
|
+
const t = e.value;
|
|
1250
|
+
return t ? {
|
|
1251
|
+
rows: t.rowIndex === Number.MIN_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : 1,
|
|
1252
|
+
cols: t.colIndex === Number.MIN_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : 1
|
|
1253
|
+
} : null;
|
|
1254
|
+
}
|
|
1255
|
+
if ("infix" === e.type && ":" === e.value) {
|
|
1256
|
+
const t = e.inputs?.[0], r = e.inputs?.[1];
|
|
1257
|
+
if ("cell" !== t?.type || "cell" !== r?.type) return null;
|
|
1258
|
+
const n = t.value, a = r.value;
|
|
1259
|
+
return n && a ? n.rowIndex === Number.MIN_SAFE_INTEGER || a.rowIndex === Number.MIN_SAFE_INTEGER || n.colIndex === Number.MIN_SAFE_INTEGER || a.colIndex === Number.MIN_SAFE_INTEGER ? null : {
|
|
1260
|
+
rows: Math.abs(a.rowIndex - n.rowIndex) + 1,
|
|
1261
|
+
cols: Math.abs(a.colIndex - n.colIndex) + 1
|
|
1262
|
+
} : null;
|
|
1263
|
+
}
|
|
1264
|
+
return null;
|
|
1265
|
+
}, Ee = (e) => {
|
|
1266
|
+
if (!e || "number" !== e.type) return null;
|
|
1267
|
+
const t = "number" == typeof e.value ? e.value : Number(e.value);
|
|
1268
|
+
return Number.isFinite(t) ? t : null;
|
|
1269
|
+
}, fe = (e) => String(e.value ?? "").toUpperCase(), Ae = /* @__PURE__ */ new WeakMap(), Te = (e) => {
|
|
1270
|
+
let t = Ae.get(e);
|
|
1271
|
+
return t || (t = ((e) => {
|
|
1272
|
+
const t = [], r = [], n = (e) => {
|
|
1273
|
+
t.push(null !== e.getRangeType() || e.getArrayDepth() > 0), r.push(null !== e.getScalarType());
|
|
1274
|
+
};
|
|
1275
|
+
let a = 0;
|
|
1276
|
+
for (const t of e.getDeclaration().getParameters()) {
|
|
1277
|
+
const e = t.getRepeatingTypes();
|
|
1278
|
+
if (e) {
|
|
1279
|
+
a = e.length;
|
|
1280
|
+
for (const t of e) n(t);
|
|
1281
|
+
break;
|
|
1282
|
+
}
|
|
1283
|
+
if (t.isRest()) {
|
|
1284
|
+
a = 1, n(t);
|
|
1285
|
+
break;
|
|
1286
|
+
}
|
|
1287
|
+
n(t);
|
|
1288
|
+
}
|
|
1289
|
+
return {
|
|
1290
|
+
accepts: t,
|
|
1291
|
+
valueTyped: r,
|
|
1292
|
+
period: a
|
|
1293
|
+
};
|
|
1294
|
+
})(e), Ae.set(e, t)), t;
|
|
1295
|
+
}, Se = (e, t) => {
|
|
1296
|
+
const r = e.accepts.length;
|
|
1297
|
+
if (t < r) return t;
|
|
1298
|
+
if (e.period > 0) {
|
|
1299
|
+
const n = r - e.period;
|
|
1300
|
+
return n + (t - n) % e.period;
|
|
1301
|
+
}
|
|
1302
|
+
return -1;
|
|
1303
|
+
}, Re = (e, t, r) => {
|
|
1304
|
+
const n = Te(t), a = Se(n, r);
|
|
1305
|
+
return a < 0 ? null : !!Y(e, a) || !H(e) && !$(e, a) && !n.accepts[a];
|
|
1306
|
+
}, de = (e, t) => t && "function" === e.type ? !((e) => {
|
|
1307
|
+
const t = W.get(e)?.arrayScope;
|
|
1308
|
+
return "consumer" === t || "lazy" === t;
|
|
1309
|
+
})(fe(e)) : t, ge = (e, t, r) => {
|
|
1310
|
+
const n = de(e, r);
|
|
1311
|
+
if ("function" !== e.type) return () => n;
|
|
1312
|
+
const a = fe(e), o = K(a), s = n && void 0 !== ((e) => W.get(e))(a)?.scopeClears;
|
|
1313
|
+
if (!o && !s) return () => n;
|
|
1314
|
+
const i = t.getFunction(a);
|
|
1315
|
+
if (!i) return () => n;
|
|
1316
|
+
const l = Te(i);
|
|
1317
|
+
return (e) => {
|
|
1318
|
+
const t = Se(l, e);
|
|
1319
|
+
return !(t >= 0 && ((e, t) => !0 === W.get(e)?.scopeClears?.includes(t))(a, t)) && (n || ((e, t, r) => {
|
|
1320
|
+
if (!K(e) || !t.isBuiltIn()) return !1;
|
|
1321
|
+
const n = Te(t), a = Se(n, r);
|
|
1322
|
+
return !(a < 0) && !Y(e, a) && n.accepts[a];
|
|
1323
|
+
})(a, i, e));
|
|
1324
|
+
};
|
|
1325
|
+
}, me = (e, t, r) => {
|
|
1326
|
+
if (!r) return () => !1;
|
|
1327
|
+
const n = e.type;
|
|
1328
|
+
if ("paren" === n) return () => !0;
|
|
1329
|
+
if ("prefix" === n) return () => ce.has(e.value);
|
|
1330
|
+
if ("infix" === n) return () => le.has(e.value);
|
|
1331
|
+
if ("function" !== n) return () => !1;
|
|
1332
|
+
const a = t.getFunction(fe(e));
|
|
1333
|
+
if (!a) return () => !1;
|
|
1334
|
+
const o = Te(a);
|
|
1335
|
+
return (e) => {
|
|
1336
|
+
const t = Se(o, e);
|
|
1337
|
+
return t >= 0 && !o.accepts[t];
|
|
1338
|
+
};
|
|
1339
|
+
}, Oe = (e, t, r, n) => {
|
|
1340
|
+
if (!e) return !1;
|
|
1341
|
+
const a = e.type;
|
|
1342
|
+
if ("prefix" === a) {
|
|
1343
|
+
const a = e.value;
|
|
1344
|
+
return "@" !== a && !!ce.has(a) && Oe(e.inputs?.[0], t, r, n);
|
|
1345
|
+
}
|
|
1346
|
+
if ("infix" === a && ue.has(e.value)) return !0;
|
|
1347
|
+
if ("postfix" === a && "#" === e.value) return !0;
|
|
1348
|
+
if ("tableReference" === a) return !0;
|
|
1349
|
+
if ("array" === a) return n;
|
|
1350
|
+
if ("paren" === a) return Oe(e.inputs?.[0], t, r, n);
|
|
1351
|
+
if ("cell" === a) {
|
|
1352
|
+
const t = pe(e);
|
|
1353
|
+
return null !== t && !(1 === t.rows && 1 === t.cols);
|
|
1354
|
+
}
|
|
1355
|
+
if ("named" === a) {
|
|
1356
|
+
const n = e.value, a = n?.name;
|
|
1357
|
+
if (!a) return !1;
|
|
1358
|
+
const o = `${n.scope ?? ""}!${a.toUpperCase()}`;
|
|
1359
|
+
if (r.has(o)) return !1;
|
|
1360
|
+
r.add(o);
|
|
1361
|
+
try {
|
|
1362
|
+
const e = t.getNamedRoot(a, n.scope);
|
|
1363
|
+
return !!e && Oe(e, t, r, !0);
|
|
1364
|
+
} finally {
|
|
1365
|
+
r.delete(o);
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
if ("infix" === a && le.has(e.value)) return Oe(e.inputs?.[0], t, r, n) || Oe(e.inputs?.[1], t, r, n);
|
|
1369
|
+
if ("call" === a) return he(e, t);
|
|
1370
|
+
if ("function" === a) {
|
|
1371
|
+
const a = fe(e), o = t.getFunction(a);
|
|
1372
|
+
if (!o) return t.hasFunctions();
|
|
1373
|
+
const s = ((e, t, r, n, a) => {
|
|
1374
|
+
if (!r.isBuiltIn()) return null;
|
|
1375
|
+
const o = e.inputs;
|
|
1376
|
+
if (!o) return null;
|
|
1377
|
+
const s = o[0];
|
|
1378
|
+
switch (t) {
|
|
1379
|
+
case "OFFSET": {
|
|
1380
|
+
const e = o[3], t = o[4];
|
|
1381
|
+
if (void 0 === e && void 0 === t) return Oe(s, n, a, !0);
|
|
1382
|
+
const r = s ? pe(s) : null, i = void 0 === e ? 1 === r?.rows : 1 === Ee(e), l = void 0 === t ? 1 === r?.cols : 1 === Ee(t);
|
|
1383
|
+
return !(i && l);
|
|
1384
|
+
}
|
|
1385
|
+
case "INDEX": {
|
|
1386
|
+
const e = o[1], t = o[2], r = s ? pe(s) : null;
|
|
1387
|
+
if (1 === r?.rows && 1 === r?.cols) return !1;
|
|
1388
|
+
const n = (e, t) => {
|
|
1389
|
+
if (void 0 === e) return 1 === t;
|
|
1390
|
+
const r = Ee(e);
|
|
1391
|
+
return null !== r && 0 !== r;
|
|
1392
|
+
};
|
|
1393
|
+
return !(n(e, r?.rows) && n(t, r?.cols));
|
|
1394
|
+
}
|
|
1395
|
+
case "XLOOKUP": {
|
|
1396
|
+
if (o[3] && Oe(o[3], n, a, !0)) return !0;
|
|
1397
|
+
const e = o[1] ? pe(o[1]) : null, t = o[2] ? pe(o[2]) : null;
|
|
1398
|
+
return !(e && t && (1 === e.rows && 1 === e.cols ? 1 === t.rows && 1 === t.cols : 1 === e.cols ? 1 === t.cols : 1 === e.rows && 1 === t.rows));
|
|
1399
|
+
}
|
|
1400
|
+
default: return null;
|
|
1401
|
+
}
|
|
1402
|
+
})(e, a, o, t, r);
|
|
1403
|
+
if (null !== s) return s;
|
|
1404
|
+
const i = _(a);
|
|
1405
|
+
if (void 0 !== i && o.isBuiltIn()) return Oe(e.inputs?.[i], t, r, !0);
|
|
1406
|
+
if (o.isBuiltIn() && ((e) => !0 === W.get(e)?.arrayReturn)(a)) return !0;
|
|
1407
|
+
const l = o.getDeclaration().getReturnType();
|
|
1408
|
+
if (null !== l.getRangeType()) return !0;
|
|
1409
|
+
const c = o.isBuiltIn() && X(a);
|
|
1410
|
+
if (null !== l.getScalarType() && !c) return !1;
|
|
1411
|
+
const u = e.inputs;
|
|
1412
|
+
if (!u) return !1;
|
|
1413
|
+
const p = c || n;
|
|
1414
|
+
for (let e = 0; e < u.length; e++) if (Oe(u[e], t, r, p)) return !0;
|
|
1415
|
+
return !1;
|
|
1416
|
+
}
|
|
1417
|
+
return !1;
|
|
1418
|
+
}, he = (e, t) => {
|
|
1419
|
+
const r = e.type;
|
|
1420
|
+
if ("function" === r) return t.hasFunctions() && null === t.getFunction(fe(e));
|
|
1421
|
+
if ("call" === r) {
|
|
1422
|
+
const r = e.inputs?.[0];
|
|
1423
|
+
if ("named" !== r?.type) return !1;
|
|
1424
|
+
const n = r.value;
|
|
1425
|
+
return !!n?.name && t.hasFunctions() && null === t.getNamedRoot(n.name, n.scope);
|
|
1426
|
+
}
|
|
1427
|
+
return !1;
|
|
1428
|
+
}, Ie = (e, t, r) => {
|
|
1429
|
+
if (!e || "function" !== e.type) return !1;
|
|
1430
|
+
const n = fe(e);
|
|
1431
|
+
return !(!X(n) && void 0 === _(n)) && !!t.getFunction(n)?.isBuiltIn() && Oe(e, t, r, !0);
|
|
1432
|
+
}, Ne = (e, t, r, n = !1, a = !1) => {
|
|
1433
|
+
const o = e.inputs;
|
|
1434
|
+
if (!o) return null;
|
|
1435
|
+
if (de(e, n)) return null;
|
|
1436
|
+
const s = e.type, i = me(e, t, a);
|
|
1437
|
+
let l = null;
|
|
1438
|
+
if ("infix" === s && le.has(e.value)) {
|
|
1439
|
+
for (let e = 0; e < 2; e++) Oe(o[e], t, r, i(e)) && (l ??= []).push(e);
|
|
1440
|
+
return l;
|
|
1441
|
+
}
|
|
1442
|
+
if ("prefix" === s && ce.has(e.value)) return Oe(o[0], t, r, i(0)) && (l = [0]), l;
|
|
1443
|
+
if ("function" !== s) return null;
|
|
1444
|
+
const c = fe(e), u = t.getFunction(c);
|
|
1445
|
+
if (!u) return null;
|
|
1446
|
+
const p = Te(u);
|
|
1447
|
+
for (let e = 0; e < o.length; e++) {
|
|
1448
|
+
const n = Re(c, u, e);
|
|
1449
|
+
if (null === n) break;
|
|
1450
|
+
if (n) {
|
|
1451
|
+
Oe(o[e], t, r, i(e)) && (l ??= []).push(e);
|
|
1452
|
+
continue;
|
|
1453
|
+
}
|
|
1454
|
+
if (H(c)) continue;
|
|
1455
|
+
const a = Se(p, e);
|
|
1456
|
+
a < 0 || !p.valueTyped[a] || $(c, a) || Ie(o[e], t, r) && (l ??= []).push(e);
|
|
1457
|
+
}
|
|
1458
|
+
return l;
|
|
1459
|
+
}, Ce = (e) => {
|
|
1460
|
+
const t = "paren" === e?.type ? e.inputs?.[0] : void 0;
|
|
1461
|
+
return t ? {
|
|
1462
|
+
...e,
|
|
1463
|
+
inputs: [Ce(t)]
|
|
1464
|
+
} : {
|
|
1465
|
+
type: "prefix",
|
|
1466
|
+
value: "@",
|
|
1467
|
+
inputs: [e],
|
|
1468
|
+
isReference: !0
|
|
1469
|
+
};
|
|
1470
|
+
}, Le = (e, t) => {
|
|
1471
|
+
if (!e) return !1;
|
|
1472
|
+
const r = /* @__PURE__ */ new Set();
|
|
1473
|
+
if (Oe(e, t, r, !0)) return !0;
|
|
1474
|
+
let n = !1;
|
|
1475
|
+
const a = (e, o, s) => {
|
|
1476
|
+
if (n || !e) return;
|
|
1477
|
+
if ("call" === e.type && !he(e, t)) return void (n = !0);
|
|
1478
|
+
if (Ne(e, t, r, o, s)) return void (n = !0);
|
|
1479
|
+
const i = e.inputs;
|
|
1480
|
+
if (!i) return;
|
|
1481
|
+
const l = ge(e, t, o), c = me(e, t, s);
|
|
1482
|
+
for (let e = 0; e < i.length && !n; e++) i[e] && a(i[e], l(e), c(e));
|
|
1483
|
+
};
|
|
1484
|
+
return a(e, !1, !0), n;
|
|
1485
|
+
};
|
|
1486
|
+
function ye(e) {
|
|
1487
|
+
const t = ae();
|
|
1488
|
+
return {
|
|
1489
|
+
base: (e, r) => {
|
|
1490
|
+
const n = t(e, r) ?? e;
|
|
1491
|
+
return n === e ? void 0 : n;
|
|
1492
|
+
},
|
|
1493
|
+
legacy: (r, n) => {
|
|
1494
|
+
const a = t(r, n) ?? r;
|
|
1495
|
+
if (void 0 !== n) return a === r ? void 0 : a;
|
|
1496
|
+
const o = ((e, t) => {
|
|
1497
|
+
if (!e) return e;
|
|
1498
|
+
const r = /* @__PURE__ */ new Set(), n = (e, a, o) => {
|
|
1499
|
+
const s = e.inputs;
|
|
1500
|
+
let i = e;
|
|
1501
|
+
if (s) {
|
|
1502
|
+
const r = ge(e, t, a), l = me(e, t, o);
|
|
1503
|
+
let c;
|
|
1504
|
+
for (let e = 0; e < s.length; e++) {
|
|
1505
|
+
const t = s[e];
|
|
1506
|
+
if (!t) continue;
|
|
1507
|
+
const a = n(t, r(e), l(e));
|
|
1508
|
+
a !== t && (c || (c = [...s]), c[e] = a);
|
|
1509
|
+
}
|
|
1510
|
+
c && (i = {
|
|
1511
|
+
...e,
|
|
1512
|
+
inputs: c
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
const l = Ne(i, t, r, a, o);
|
|
1516
|
+
if (!l) return i;
|
|
1517
|
+
const c = [...i.inputs];
|
|
1518
|
+
for (const e of l) c[e] = Ce(c[e]);
|
|
1519
|
+
return {
|
|
1520
|
+
...i,
|
|
1521
|
+
inputs: c
|
|
1522
|
+
};
|
|
1523
|
+
}, a = n(e, !1, !0);
|
|
1524
|
+
return Oe(a, t, r, !0) ? Ce(a) : a;
|
|
1525
|
+
})(a, e);
|
|
1526
|
+
return o === r ? void 0 : o;
|
|
1527
|
+
}
|
|
1528
|
+
};
|
|
1529
|
+
}
|
|
1530
|
+
var be = "xlsxFormulaDialect";
|
|
1531
|
+
function xe(e, t) {
|
|
1532
|
+
const r = /* @__PURE__ */ new Set();
|
|
1533
|
+
if (t) for (let e = 0; e < t.length; e++) r.add(String(t[e]).toUpperCase());
|
|
1534
|
+
const o = /* @__PURE__ */ new Map();
|
|
1535
|
+
if (e) for (let t = 0; t < e.length; t++) {
|
|
1536
|
+
const r = e[t], n = String(r?.name ?? "").toUpperCase();
|
|
1537
|
+
if (!n) continue;
|
|
1538
|
+
let a = o.get(n);
|
|
1539
|
+
a || o.set(n, a = []), a.push(r);
|
|
1540
|
+
}
|
|
1541
|
+
const s = ae(), i = /* @__PURE__ */ new Map(), l = {
|
|
1542
|
+
getFunction: (e) => a.get(e),
|
|
1543
|
+
hasFunctions: () => !0,
|
|
1544
|
+
getNamedRoot: (e, t) => {
|
|
1545
|
+
const r = o.get(e.toUpperCase());
|
|
1546
|
+
if (!r) return null;
|
|
1547
|
+
const a = t ? t.toUpperCase() : null, l = a ? r.find((e) => String(e.scope ?? "").toUpperCase() === a) ?? r[0] : r.find((e) => !e.scope) ?? r[0], c = l?.ref;
|
|
1548
|
+
if ("string" != typeof c) return null;
|
|
1549
|
+
const u = `${String(l.scope ?? "").toUpperCase()}!${e.toUpperCase()}`, p = i.get(u);
|
|
1550
|
+
if (void 0 !== p) return p;
|
|
1551
|
+
const E = n.parse(c), f = E ? n.transform(E, s) : null;
|
|
1552
|
+
return i.set(u, f), f;
|
|
1553
|
+
}
|
|
1554
|
+
}, c = ye(l), u = q({ has: (e) => o.has(e.toUpperCase()) }), p = function(e, t) {
|
|
1555
|
+
const r = ae();
|
|
1556
|
+
return (n, a) => {
|
|
1557
|
+
const o = e(n, a) ?? n;
|
|
1558
|
+
if (void 0 !== a) return o === n ? void 0 : o;
|
|
1559
|
+
const s = /* @__PURE__ */ new Map(), i = Me(o, void 0, r, s);
|
|
1560
|
+
if (0 === s.size || Le(i, t)) return o === n ? void 0 : o;
|
|
1561
|
+
const l = /* @__PURE__ */ new Set();
|
|
1562
|
+
for (const e of Pe(i, t)) {
|
|
1563
|
+
const t = s.get(e);
|
|
1564
|
+
t && l.add(t);
|
|
1565
|
+
}
|
|
1566
|
+
return 0 === l.size ? o === n ? void 0 : o : Fe(o, l);
|
|
1567
|
+
};
|
|
1568
|
+
}(u, l), E = (e, t, r) => {
|
|
1569
|
+
const a = n.parse(e, { anchor: t });
|
|
1570
|
+
if (!a) return e;
|
|
1571
|
+
const o = n.transform(a, r);
|
|
1572
|
+
return o === a ? e : n.image(o, { at: t });
|
|
1573
|
+
};
|
|
1574
|
+
return {
|
|
1575
|
+
parse: (e, t) => n.parse(e, {
|
|
1576
|
+
anchor: t,
|
|
1577
|
+
normalize: !0
|
|
1578
|
+
}),
|
|
1579
|
+
readText: (e, t, r) => E(e, t, r ? c.base : c.legacy),
|
|
1580
|
+
readDetached: (e) => E(e, void 0, c.base),
|
|
1581
|
+
annotate: (e) => {
|
|
1582
|
+
const t = Le(e, l), r = se(e) || ie(e, l);
|
|
1583
|
+
if (!t && !r) return;
|
|
1584
|
+
const n = {};
|
|
1585
|
+
return t && (n.cm = !0), r && (n.ca = !0), n;
|
|
1586
|
+
},
|
|
1587
|
+
spell: (e, t, a) => {
|
|
1588
|
+
const o = a || r.size > 0 ? n.transform(e, ((e) => (t) => {
|
|
1589
|
+
const n = t.type;
|
|
1590
|
+
if ("tableReference" === n) return !t.value && e ? {
|
|
1591
|
+
...t,
|
|
1592
|
+
value: e
|
|
1593
|
+
} : void 0;
|
|
1594
|
+
if ("named" === n && r.size > 0) {
|
|
1595
|
+
const e = t.value;
|
|
1596
|
+
if (e?.name && !e.scope && r.has(e.name.toUpperCase())) return {
|
|
1597
|
+
type: "tableReference",
|
|
1598
|
+
value: e.name,
|
|
1599
|
+
inputs: null,
|
|
1600
|
+
isReference: !0
|
|
1601
|
+
};
|
|
1602
|
+
}
|
|
1603
|
+
})(a)) : e;
|
|
1604
|
+
return n.transform(o, t ? u : p);
|
|
1605
|
+
},
|
|
1606
|
+
writeName: (e) => E(e, void 0, u)
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
function ve(e, r) {
|
|
1610
|
+
(function(e, r) {
|
|
1611
|
+
const n = e.tables;
|
|
1612
|
+
if (!n) return;
|
|
1613
|
+
for (let e = 0; e < n.length; e++) {
|
|
1614
|
+
const a = n[e], o = Array.isArray(a) ? a[0] : a?.r, s = Array.isArray(a) ? a[1] : a?.v, i = s?.columns;
|
|
1615
|
+
if (!i || "string" != typeof o) continue;
|
|
1616
|
+
const l = t.fastStringToRange(o), c = l.rowStart + (s.headerRowCount ?? 1);
|
|
1617
|
+
for (let e = 0; e < i.length; e++) {
|
|
1618
|
+
const t = i[e];
|
|
1619
|
+
if (!t || "object" != typeof t) continue;
|
|
1620
|
+
const n = {
|
|
1621
|
+
rowIndex: c,
|
|
1622
|
+
colIndex: l.colStart + e
|
|
1623
|
+
}, a = t.calculatedColumnFormula;
|
|
1624
|
+
"string" == typeof a && a && (t.calculatedColumnFormula = r.readText(a, n, !1));
|
|
1625
|
+
const o = t.totalsRowFormula;
|
|
1626
|
+
"string" == typeof o && o && (t.totalsRowFormula = r.readText(o, n, !1));
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
})(e, r);
|
|
1630
|
+
const n = e.formulas;
|
|
1631
|
+
if (!n || 0 === n.length) return;
|
|
1632
|
+
const a = /* @__PURE__ */ new Set(), o = e.formulaArray;
|
|
1633
|
+
if (o) for (let e = 0; e < o.length; e++) {
|
|
1634
|
+
const r = t.fastStringToRange(String(o[e][0]));
|
|
1635
|
+
a.add(`${r.rowStart},${r.colStart}`);
|
|
1636
|
+
}
|
|
1637
|
+
for (let e = 0; e < n.length; e++) {
|
|
1638
|
+
const o = n[e], s = o[1];
|
|
1639
|
+
if ("string" != typeof s) continue;
|
|
1640
|
+
const i = t.fastStringToRange(String(o[0])), l = {
|
|
1641
|
+
rowIndex: i.rowStart,
|
|
1642
|
+
colIndex: i.colStart
|
|
1643
|
+
}, c = r.readText(s, l, a.has(`${i.rowStart},${i.colStart}`));
|
|
1644
|
+
c !== s && (o[1] = c);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
var De = (e) => "prefix" === e?.type && "@" === e.value && !!e.inputs?.[0], Pe = (e, t) => {
|
|
1648
|
+
const r = /* @__PURE__ */ new Set();
|
|
1649
|
+
if (!e) return r;
|
|
1650
|
+
const n = /* @__PURE__ */ new Set(), a = (e, o, s) => {
|
|
1651
|
+
const i = e.inputs;
|
|
1652
|
+
if (!i) return;
|
|
1653
|
+
let l;
|
|
1654
|
+
for (let e = 0; e < i.length; e++) {
|
|
1655
|
+
const t = i[e];
|
|
1656
|
+
De(t) && "paren" !== t.inputs[0].type && (l || (l = [...i]), l[e] = t.inputs[0]);
|
|
1657
|
+
}
|
|
1658
|
+
if (l) {
|
|
1659
|
+
const a = Ne({
|
|
1660
|
+
...e,
|
|
1661
|
+
inputs: l
|
|
1662
|
+
}, t, n, o, s);
|
|
1663
|
+
if (a) for (const e of a) l[e] !== i[e] && r.add(i[e]);
|
|
1664
|
+
}
|
|
1665
|
+
const c = ge(e, t, o), u = me(e, t, s);
|
|
1666
|
+
for (let e = 0; e < i.length; e++) {
|
|
1667
|
+
const t = i[e];
|
|
1668
|
+
t && a(t, c(e), u(e));
|
|
1669
|
+
}
|
|
1670
|
+
};
|
|
1671
|
+
return a(e, !1, !0), De(e) && "paren" !== e.inputs[0].type && Oe(e.inputs[0], t, n, !0) && r.add(e), r;
|
|
1672
|
+
}, Me = (e, t, r, n) => {
|
|
1673
|
+
const a = e.inputs;
|
|
1674
|
+
let o = e;
|
|
1675
|
+
if (a) {
|
|
1676
|
+
let t;
|
|
1677
|
+
for (let o = 0; o < a.length; o++) {
|
|
1678
|
+
const s = a[o];
|
|
1679
|
+
if (!s) continue;
|
|
1680
|
+
const i = Me(s, e, r, n);
|
|
1681
|
+
i !== s && (t || (t = [...a]), t[o] = i);
|
|
1682
|
+
}
|
|
1683
|
+
t && (o = {
|
|
1684
|
+
...e,
|
|
1685
|
+
inputs: t
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1688
|
+
const s = r(o, t);
|
|
1689
|
+
return s && s !== o ? (De(s) && "function" === o.type && n.set(s, e), s) : o;
|
|
1690
|
+
}, Fe = (e, t) => {
|
|
1691
|
+
if (t.has(e)) return Fe(e.inputs[0], t);
|
|
1692
|
+
const r = e.inputs;
|
|
1693
|
+
if (!r) return e;
|
|
1694
|
+
let n;
|
|
1695
|
+
for (let e = 0; e < r.length; e++) {
|
|
1696
|
+
const a = r[e];
|
|
1697
|
+
if (!a) continue;
|
|
1698
|
+
const o = Fe(a, t);
|
|
1699
|
+
o !== a && (n || (n = [...r]), n[e] = o);
|
|
1700
|
+
}
|
|
1701
|
+
return n ? {
|
|
1702
|
+
...e,
|
|
1703
|
+
inputs: n
|
|
1704
|
+
} : e;
|
|
1705
|
+
};
|
|
1706
|
+
var Be = 67108864, Ue = class {
|
|
1707
|
+
constructor(e, t) {
|
|
1708
|
+
this._structurallyChanged = !1, this._parts = e, this._absorbed = t ?? /* @__PURE__ */ new Set();
|
|
1709
|
+
let r = 0;
|
|
1710
|
+
for (const t of e.values()) r += t.data.byteLength;
|
|
1711
|
+
this._totalBytes = r;
|
|
1712
|
+
}
|
|
1713
|
+
getNames() {
|
|
1714
|
+
return [...this._parts.keys()];
|
|
1715
|
+
}
|
|
1716
|
+
has(e) {
|
|
1717
|
+
return this._parts.has(e);
|
|
1718
|
+
}
|
|
1719
|
+
getPart(e) {
|
|
1720
|
+
return this._parts.get(e) ?? null;
|
|
1721
|
+
}
|
|
1722
|
+
isAbsorbed(e) {
|
|
1723
|
+
return this._absorbed.has(e);
|
|
1724
|
+
}
|
|
1725
|
+
getTotalBytes() {
|
|
1726
|
+
return this._totalBytes;
|
|
1727
|
+
}
|
|
1728
|
+
hasStructuralChange() {
|
|
1729
|
+
return this._structurallyChanged;
|
|
1730
|
+
}
|
|
1731
|
+
markStructuralChange() {
|
|
1732
|
+
this._structurallyChanged = !0;
|
|
1733
|
+
}
|
|
1734
|
+
}, we = /* @__PURE__ */ new WeakMap();
|
|
1735
|
+
function ke(e) {
|
|
1736
|
+
return e ? we.get(e) ?? null : null;
|
|
1737
|
+
}
|
|
1738
|
+
function Ge(e, t) {
|
|
1739
|
+
we.set(e, t);
|
|
1740
|
+
}
|
|
1741
|
+
function Ve(e) {
|
|
1742
|
+
e && we.delete(e);
|
|
1743
|
+
}
|
|
1744
|
+
var We = S({
|
|
1745
|
+
EMU_PER_PIXEL: () => $e,
|
|
1746
|
+
EMU_PER_POINT: () => He,
|
|
1747
|
+
fixedPointToDouble: () => _e,
|
|
1748
|
+
parseAngle: () => je,
|
|
1749
|
+
parseAsBoolean: () => qe,
|
|
1750
|
+
parsePercentage: () => Ke,
|
|
1751
|
+
toPixels: () => Xe,
|
|
1752
|
+
toPoints: () => Ye
|
|
1753
|
+
}), He = 12700, $e = 9525, Ye = (t) => t ? e.roundAccurately(parseFloat(t) / He, 4) : null, Xe = (t) => t ? e.roundAccurately(parseFloat(t) / $e, 1) : null, _e = (e) => (e >> 16) + (65535 & e) / 65536, Ke = (e) => parseFloat(e) / 1e3, je = (e) => parseFloat(e) / 6e4, qe = (e) => "true" === e || "1" === e, ze = /* @__PURE__ */ new Set([
|
|
1754
|
+
"A1.R1C1",
|
|
1755
|
+
"ABSREF",
|
|
1756
|
+
"ACTIVATE",
|
|
1757
|
+
"ACTIVATE.NEXT",
|
|
1758
|
+
"ACTIVATE.NOTES",
|
|
1759
|
+
"ACTIVATE.PREV",
|
|
1760
|
+
"ACTIVE.CELL",
|
|
1761
|
+
"ACTIVE.CELL.FONT",
|
|
1762
|
+
"ADD.ARROW",
|
|
1763
|
+
"ADD.BAR",
|
|
1764
|
+
"ADD.CHART.AUTOFORMAT",
|
|
1765
|
+
"ADD.COMMAND",
|
|
1766
|
+
"ADD.LIST.ITEM",
|
|
1767
|
+
"ADD.MENU",
|
|
1768
|
+
"ADD.OVERLAY",
|
|
1769
|
+
"ADD.PRINT.AREA",
|
|
1770
|
+
"ADD.TOOL",
|
|
1771
|
+
"ADD.TOOLBAR",
|
|
1772
|
+
"ADDIN.MANAGER",
|
|
1773
|
+
"ALERT",
|
|
1774
|
+
"ALIGNMENT",
|
|
1775
|
+
"APP.ACTIVATE",
|
|
1776
|
+
"APP.ACTIVATE.MICROSOFT",
|
|
1777
|
+
"APP.MAXIMIZE",
|
|
1778
|
+
"APP.MINIMIZE",
|
|
1779
|
+
"APP.MOVE",
|
|
1780
|
+
"APP.RESTORE",
|
|
1781
|
+
"APP.SIZE",
|
|
1782
|
+
"APP.TITLE",
|
|
1783
|
+
"APPLY.NAMES",
|
|
1784
|
+
"APPLY.STYLE",
|
|
1785
|
+
"ARGUMENT",
|
|
1786
|
+
"ARRANGE.ALL",
|
|
1787
|
+
"ASSIGN.TO.OBJECT",
|
|
1788
|
+
"ASSIGN.TO.TOOL",
|
|
1789
|
+
"ATTACH.TEXT",
|
|
1790
|
+
"ATTACH.TOOLBARS",
|
|
1791
|
+
"ATTRIBUTES",
|
|
1792
|
+
"AUTO.OUTLINE",
|
|
1793
|
+
"AUTOCORRECT",
|
|
1794
|
+
"AXES",
|
|
1795
|
+
"BEEP",
|
|
1796
|
+
"BORDER",
|
|
1797
|
+
"BREAK",
|
|
1798
|
+
"BRING.TO.FRONT",
|
|
1799
|
+
"CALCULATE.DOCUMENT",
|
|
1800
|
+
"CALCULATE.NOW",
|
|
1801
|
+
"CALCULATION",
|
|
1802
|
+
"CALL",
|
|
1803
|
+
"CALLER",
|
|
1804
|
+
"CANCEL.COPY",
|
|
1805
|
+
"CANCEL.KEY",
|
|
1806
|
+
"CELL.PROTECTION",
|
|
1807
|
+
"CHANGE.LINK",
|
|
1808
|
+
"CHART.ADD.DATA",
|
|
1809
|
+
"CHART.TREND",
|
|
1810
|
+
"CHART.WIZARD",
|
|
1811
|
+
"CHECK.COMMAND",
|
|
1812
|
+
"CHECKBOX.PROPERTIES",
|
|
1813
|
+
"CLEAR",
|
|
1814
|
+
"CLEAR.OUTLINE",
|
|
1815
|
+
"CLEAR.PRINT.AREA",
|
|
1816
|
+
"CLEAR.ROUTING.SLIP",
|
|
1817
|
+
"CLOSE",
|
|
1818
|
+
"CLOSE.ALL",
|
|
1819
|
+
"COLOR.PALETTE",
|
|
1820
|
+
"COLUMN.WIDTH",
|
|
1821
|
+
"COMBINATION",
|
|
1822
|
+
"CONSOLIDATE",
|
|
1823
|
+
"CONSTRAIN.NUMERIC",
|
|
1824
|
+
"COPY",
|
|
1825
|
+
"COPY.CHART",
|
|
1826
|
+
"COPY.PICTURE",
|
|
1827
|
+
"COPY.TOOL",
|
|
1828
|
+
"CREATE.NAMES",
|
|
1829
|
+
"CREATE.OBJECT",
|
|
1830
|
+
"CREATE.PUBLISHER",
|
|
1831
|
+
"CUSTOM.REPEAT",
|
|
1832
|
+
"CUSTOM.UNDO",
|
|
1833
|
+
"CUSTOMIZE.TOOLBAR",
|
|
1834
|
+
"CUT",
|
|
1835
|
+
"DATA.DELETE",
|
|
1836
|
+
"DATA.FIND",
|
|
1837
|
+
"DATA.FIND.NEXT",
|
|
1838
|
+
"DATA.FIND.PREV",
|
|
1839
|
+
"DATA.FORM",
|
|
1840
|
+
"DATA.LABEL",
|
|
1841
|
+
"DATA.SERIES",
|
|
1842
|
+
"DEFINE.NAME",
|
|
1843
|
+
"DEFINE.STYLE",
|
|
1844
|
+
"DELETE.ARROW",
|
|
1845
|
+
"DELETE.BAR",
|
|
1846
|
+
"DELETE.CHART.AUTOFORMAT",
|
|
1847
|
+
"DELETE.COMMAND",
|
|
1848
|
+
"DELETE.FORMAT",
|
|
1849
|
+
"DELETE.MENU",
|
|
1850
|
+
"DELETE.NAME",
|
|
1851
|
+
"DELETE.NOTE",
|
|
1852
|
+
"DELETE.OVERLAY",
|
|
1853
|
+
"DELETE.STYLE",
|
|
1854
|
+
"DELETE.TOOL",
|
|
1855
|
+
"DELETE.TOOLBAR",
|
|
1856
|
+
"DEMOTE",
|
|
1857
|
+
"DEREF",
|
|
1858
|
+
"DIALOG.BOX",
|
|
1859
|
+
"DIRECTORY",
|
|
1860
|
+
"DISABLE.INPUT",
|
|
1861
|
+
"DISPLAY",
|
|
1862
|
+
"DOCUMENTS",
|
|
1863
|
+
"DUPLICATE",
|
|
1864
|
+
"ECHO",
|
|
1865
|
+
"EDIT.COLOR",
|
|
1866
|
+
"EDIT.DELETE",
|
|
1867
|
+
"EDIT.OBJECT",
|
|
1868
|
+
"EDIT.REPEAT",
|
|
1869
|
+
"EDIT.SERIES",
|
|
1870
|
+
"EDIT.TOOL",
|
|
1871
|
+
"EDITBOX.PROPERTIES",
|
|
1872
|
+
"EDITION.OPTIONS",
|
|
1873
|
+
"ELSE",
|
|
1874
|
+
"ELSE.IF",
|
|
1875
|
+
"ENABLE.COMMAND",
|
|
1876
|
+
"ENABLE.OBJECT",
|
|
1877
|
+
"ENABLE.TIPWIZARD",
|
|
1878
|
+
"ENABLE.TOOL",
|
|
1879
|
+
"END.IF",
|
|
1880
|
+
"ENTER.DATA",
|
|
1881
|
+
"ERROR",
|
|
1882
|
+
"ERRORBAR.X",
|
|
1883
|
+
"ERRORBAR.Y",
|
|
1884
|
+
"EVALUATE",
|
|
1885
|
+
"EXEC",
|
|
1886
|
+
"EXECUTE",
|
|
1887
|
+
"EXTEND.POLYGON",
|
|
1888
|
+
"EXTRACT",
|
|
1889
|
+
"FCLOSE",
|
|
1890
|
+
"FILE.CLOSE",
|
|
1891
|
+
"FILE.DELETE",
|
|
1892
|
+
"FILES",
|
|
1893
|
+
"FILL.AUTO",
|
|
1894
|
+
"FILL.DOWN",
|
|
1895
|
+
"FILL.GROUP",
|
|
1896
|
+
"FILL.LEFT",
|
|
1897
|
+
"FILL.RIGHT",
|
|
1898
|
+
"FILL.UP",
|
|
1899
|
+
"FILTER.ADVANCED",
|
|
1900
|
+
"FILTER.SHOW.ALL",
|
|
1901
|
+
"FIND.FILE",
|
|
1902
|
+
"FONT",
|
|
1903
|
+
"FONT.PROPERTIES",
|
|
1904
|
+
"FOPEN",
|
|
1905
|
+
"FOR",
|
|
1906
|
+
"FOR.CELL",
|
|
1907
|
+
"FORMAT.AUTO",
|
|
1908
|
+
"FORMAT.CHART",
|
|
1909
|
+
"FORMAT.CHARTTYPE",
|
|
1910
|
+
"FORMAT.FONT",
|
|
1911
|
+
"FORMAT.LEGEND",
|
|
1912
|
+
"FORMAT.MAIN",
|
|
1913
|
+
"FORMAT.MOVE",
|
|
1914
|
+
"FORMAT.NUMBER",
|
|
1915
|
+
"FORMAT.OVERLAY",
|
|
1916
|
+
"FORMAT.SHAPE",
|
|
1917
|
+
"FORMAT.SIZE",
|
|
1918
|
+
"FORMAT.TEXT",
|
|
1919
|
+
"FORMULA",
|
|
1920
|
+
"FORMULA.ARRAY",
|
|
1921
|
+
"FORMULA.CONVERT",
|
|
1922
|
+
"FORMULA.FILL",
|
|
1923
|
+
"FORMULA.FIND",
|
|
1924
|
+
"FORMULA.FIND.NEXT",
|
|
1925
|
+
"FORMULA.FIND.PREV",
|
|
1926
|
+
"FORMULA.GOTO",
|
|
1927
|
+
"FORMULA.REPLACE",
|
|
1928
|
+
"FPOS",
|
|
1929
|
+
"FREAD",
|
|
1930
|
+
"FREADLN",
|
|
1931
|
+
"FREEZE.PANES",
|
|
1932
|
+
"FSIZE",
|
|
1933
|
+
"FULL",
|
|
1934
|
+
"FULL.SCREEN",
|
|
1935
|
+
"FUNCTION.WIZARD",
|
|
1936
|
+
"FWRITE",
|
|
1937
|
+
"FWRITELN",
|
|
1938
|
+
"GALLERY.3D.AREA",
|
|
1939
|
+
"GALLERY.3D.BAR",
|
|
1940
|
+
"GALLERY.3D.COLUMN",
|
|
1941
|
+
"GALLERY.3D.LINE",
|
|
1942
|
+
"GALLERY.3D.PIE",
|
|
1943
|
+
"GALLERY.3D.SURFACE",
|
|
1944
|
+
"GALLERY.AREA",
|
|
1945
|
+
"GALLERY.BAR",
|
|
1946
|
+
"GALLERY.COLUMN",
|
|
1947
|
+
"GALLERY.CUSTOM",
|
|
1948
|
+
"GALLERY.DOUGHNUT",
|
|
1949
|
+
"GALLERY.LINE",
|
|
1950
|
+
"GALLERY.PIE",
|
|
1951
|
+
"GALLERY.RADAR",
|
|
1952
|
+
"GALLERY.SCATTER",
|
|
1953
|
+
"GET.BAR",
|
|
1954
|
+
"GET.CELL",
|
|
1955
|
+
"GET.CHART.ITEM",
|
|
1956
|
+
"GET.DEF",
|
|
1957
|
+
"GET.DOCUMENT",
|
|
1958
|
+
"GET.FORMULA",
|
|
1959
|
+
"GET.LINK.INFO",
|
|
1960
|
+
"GET.MOVIE",
|
|
1961
|
+
"GET.NAME",
|
|
1962
|
+
"GET.NOTE",
|
|
1963
|
+
"GET.OBJECT",
|
|
1964
|
+
"GET.TOOL",
|
|
1965
|
+
"GET.TOOLBAR",
|
|
1966
|
+
"GET.WINDOW",
|
|
1967
|
+
"GET.WORKBOOK",
|
|
1968
|
+
"GET.WORKSPACE",
|
|
1969
|
+
"GOAL.SEEK",
|
|
1970
|
+
"GOTO",
|
|
1971
|
+
"GRIDLINES",
|
|
1972
|
+
"GROUP",
|
|
1973
|
+
"HALT",
|
|
1974
|
+
"HELP",
|
|
1975
|
+
"HIDE",
|
|
1976
|
+
"HIDE.DIALOG",
|
|
1977
|
+
"HIDE.OBJECT",
|
|
1978
|
+
"HIDEALL.INKANNOTS",
|
|
1979
|
+
"HIDEALL.NOTES",
|
|
1980
|
+
"HIDECURR.NOTE",
|
|
1981
|
+
"HLINE",
|
|
1982
|
+
"HPAGE",
|
|
1983
|
+
"HSCROLL",
|
|
1984
|
+
"INITIATE",
|
|
1985
|
+
"INPUT",
|
|
1986
|
+
"INSERT",
|
|
1987
|
+
"INSERT.MAP.OBJECT",
|
|
1988
|
+
"INSERT.OBJECT",
|
|
1989
|
+
"INSERT.PICTURE",
|
|
1990
|
+
"INSERT.TITLE",
|
|
1991
|
+
"INSERTDATATABLE",
|
|
1992
|
+
"JUSTIFY",
|
|
1993
|
+
"LABEL.PROPERTIES",
|
|
1994
|
+
"LAST.ERROR",
|
|
1995
|
+
"LAYOUT",
|
|
1996
|
+
"LEGEND",
|
|
1997
|
+
"LINE.PRINT",
|
|
1998
|
+
"LINK.COMBO",
|
|
1999
|
+
"LINK.FORMAT",
|
|
2000
|
+
"LINKS",
|
|
2001
|
+
"LIST.NAMES",
|
|
2002
|
+
"LISTBOX.PROPERTIES",
|
|
2003
|
+
"MACRO.OPTIONS",
|
|
2004
|
+
"MAIL.ADD.MAILER",
|
|
2005
|
+
"MAIL.DELETE.MAILER",
|
|
2006
|
+
"MAIL.EDIT.MAILER",
|
|
2007
|
+
"MAIL.FORWARD",
|
|
2008
|
+
"MAIL.LOGOFF",
|
|
2009
|
+
"MAIL.LOGON",
|
|
2010
|
+
"MAIL.NEXT.LETTER",
|
|
2011
|
+
"MAIL.REPLY",
|
|
2012
|
+
"MAIL.REPLY.ALL",
|
|
2013
|
+
"MAIL.SEND.MAILER",
|
|
2014
|
+
"MAIN.CHART",
|
|
2015
|
+
"MAIN.CHART.TYPE",
|
|
2016
|
+
"MENU.EDITOR",
|
|
2017
|
+
"MERGE.STYLES",
|
|
2018
|
+
"MESSAGE",
|
|
2019
|
+
"MOVE.BRK",
|
|
2020
|
+
"MOVE.TOOL",
|
|
2021
|
+
"MOVIE.COMMAND",
|
|
2022
|
+
"MSOCHECKS",
|
|
2023
|
+
"NAMES",
|
|
2024
|
+
"NEW",
|
|
2025
|
+
"NEW.WINDOW",
|
|
2026
|
+
"NEWWEBQUERY",
|
|
2027
|
+
"NEXT",
|
|
2028
|
+
"NORMAL",
|
|
2029
|
+
"NOTE",
|
|
2030
|
+
"OBJECT.PROPERTIES",
|
|
2031
|
+
"OBJECT.PROTECTION",
|
|
2032
|
+
"ON.DATA",
|
|
2033
|
+
"ON.DOUBLECLICK",
|
|
2034
|
+
"ON.ENTRY",
|
|
2035
|
+
"ON.KEY",
|
|
2036
|
+
"ON.RECALC",
|
|
2037
|
+
"ON.SHEET",
|
|
2038
|
+
"ON.TIME",
|
|
2039
|
+
"ON.WINDOW",
|
|
2040
|
+
"OPEN",
|
|
2041
|
+
"OPEN.DIALOG",
|
|
2042
|
+
"OPEN.LINKS",
|
|
2043
|
+
"OPEN.MAIL",
|
|
2044
|
+
"OPEN.TEXT",
|
|
2045
|
+
"OPTIONS.CALCULATION",
|
|
2046
|
+
"OPTIONS.CHART",
|
|
2047
|
+
"OPTIONS.EDIT",
|
|
2048
|
+
"OPTIONS.GENERAL",
|
|
2049
|
+
"OPTIONS.LISTS.ADD",
|
|
2050
|
+
"OPTIONS.LISTS.DELETE",
|
|
2051
|
+
"OPTIONS.LISTS.GET",
|
|
2052
|
+
"OPTIONS.ME",
|
|
2053
|
+
"OPTIONS.MENONO",
|
|
2054
|
+
"OPTIONS.SAVE",
|
|
2055
|
+
"OPTIONS.SPELL",
|
|
2056
|
+
"OPTIONS.TRANSITION",
|
|
2057
|
+
"OPTIONS.VIEW",
|
|
2058
|
+
"OUTLINE",
|
|
2059
|
+
"OVERLAY",
|
|
2060
|
+
"OVERLAY.CHART.TYPE",
|
|
2061
|
+
"PAGE.SETUP",
|
|
2062
|
+
"PARSE",
|
|
2063
|
+
"PASTE",
|
|
2064
|
+
"PASTE.LINK",
|
|
2065
|
+
"PASTE.PICTURE",
|
|
2066
|
+
"PASTE.PICTURE.LINK",
|
|
2067
|
+
"PASTE.SPECIAL",
|
|
2068
|
+
"PASTE.TOOL",
|
|
2069
|
+
"PATTERNS",
|
|
2070
|
+
"PAUSE",
|
|
2071
|
+
"PICKLIST",
|
|
2072
|
+
"PIVOT.ADD.FIELDS",
|
|
2073
|
+
"PIVOT.FIELD",
|
|
2074
|
+
"PIVOT.FIELD.GROUP",
|
|
2075
|
+
"PIVOT.FIELD.PROPERTIES",
|
|
2076
|
+
"PIVOT.FIELD.UNGROUP",
|
|
2077
|
+
"PIVOT.ITEM",
|
|
2078
|
+
"PIVOT.ITEM.PROPERTIES",
|
|
2079
|
+
"PIVOT.REFRESH",
|
|
2080
|
+
"PIVOT.SHOW.PAGES",
|
|
2081
|
+
"PIVOT.TABLE.CHART",
|
|
2082
|
+
"PIVOT.TABLE.WIZARD",
|
|
2083
|
+
"POKE",
|
|
2084
|
+
"POST.DOCUMENT",
|
|
2085
|
+
"PRECISION",
|
|
2086
|
+
"PREFERRED",
|
|
2087
|
+
"PRESS.TOOL",
|
|
2088
|
+
"PRINT",
|
|
2089
|
+
"PRINT.PREVIEW",
|
|
2090
|
+
"PRINTER.SETUP",
|
|
2091
|
+
"PROMOTE",
|
|
2092
|
+
"PROTECT.DOCUMENT",
|
|
2093
|
+
"PROTECT.REVISIONS",
|
|
2094
|
+
"PUSHBUTTON.PROPERTIES",
|
|
2095
|
+
"QUIT",
|
|
2096
|
+
"REFTEXT",
|
|
2097
|
+
"REGISTER",
|
|
2098
|
+
"REGISTER.ID",
|
|
2099
|
+
"RELREF",
|
|
2100
|
+
"REMOVE.LIST.ITEM",
|
|
2101
|
+
"REMOVE.PAGE.BREAK",
|
|
2102
|
+
"RENAME.COMMAND",
|
|
2103
|
+
"RENAME.OBJECT",
|
|
2104
|
+
"REPLACE.FONT",
|
|
2105
|
+
"REQUEST",
|
|
2106
|
+
"RESET.TOOL",
|
|
2107
|
+
"RESET.TOOLBAR",
|
|
2108
|
+
"RESTART",
|
|
2109
|
+
"RESULT",
|
|
2110
|
+
"RESUME",
|
|
2111
|
+
"RETURN",
|
|
2112
|
+
"RM.PRINT.AREA",
|
|
2113
|
+
"ROUTE.DOCUMENT",
|
|
2114
|
+
"ROUTING.SLIP",
|
|
2115
|
+
"ROW.HEIGHT",
|
|
2116
|
+
"RUN",
|
|
2117
|
+
"SAVE",
|
|
2118
|
+
"SAVE.AS",
|
|
2119
|
+
"SAVE.COPY.AS",
|
|
2120
|
+
"SAVE.DIALOG",
|
|
2121
|
+
"SAVE.NEW.OBJECT",
|
|
2122
|
+
"SAVE.TOOLBAR",
|
|
2123
|
+
"SAVE.WORKBOOK",
|
|
2124
|
+
"SAVE.WORKSPACE",
|
|
2125
|
+
"SCALE",
|
|
2126
|
+
"SCENARIO.ADD",
|
|
2127
|
+
"SCENARIO.CELLS",
|
|
2128
|
+
"SCENARIO.DELETE",
|
|
2129
|
+
"SCENARIO.EDIT",
|
|
2130
|
+
"SCENARIO.GET",
|
|
2131
|
+
"SCENARIO.MERGE",
|
|
2132
|
+
"SCENARIO.SHOW",
|
|
2133
|
+
"SCENARIO.SHOW.NEXT",
|
|
2134
|
+
"SCENARIO.SUMMARY",
|
|
2135
|
+
"SCROLLBAR.PROPERTIES",
|
|
2136
|
+
"SELECT",
|
|
2137
|
+
"SELECT.ALL",
|
|
2138
|
+
"SELECT.CHART",
|
|
2139
|
+
"SELECT.END",
|
|
2140
|
+
"SELECT.LAST.CELL",
|
|
2141
|
+
"SELECT.LIST.ITEM",
|
|
2142
|
+
"SELECT.PLOT.AREA",
|
|
2143
|
+
"SELECT.SPECIAL",
|
|
2144
|
+
"SELECTION",
|
|
2145
|
+
"SERIES",
|
|
2146
|
+
"SEND.KEYS",
|
|
2147
|
+
"SEND.MAIL",
|
|
2148
|
+
"SEND.TO.BACK",
|
|
2149
|
+
"SERIES.AXES",
|
|
2150
|
+
"SERIES.ORDER",
|
|
2151
|
+
"SERIES.X",
|
|
2152
|
+
"SERIES.Y",
|
|
2153
|
+
"SET.CONTROL.VALUE",
|
|
2154
|
+
"SET.CRITERIA",
|
|
2155
|
+
"SET.DATABASE",
|
|
2156
|
+
"SET.DIALOG.DEFAULT",
|
|
2157
|
+
"SET.DIALOG.FOCUS",
|
|
2158
|
+
"SET.EXTRACT",
|
|
2159
|
+
"SET.LIST.ITEM",
|
|
2160
|
+
"SET.NAME",
|
|
2161
|
+
"SET.PAGE.BREAK",
|
|
2162
|
+
"SET.PREFERRED",
|
|
2163
|
+
"SET.PRINT.AREA",
|
|
2164
|
+
"SET.PRINT.TITLES",
|
|
2165
|
+
"SET.UPDATE.STATUS",
|
|
2166
|
+
"SET.VALUE",
|
|
2167
|
+
"SHARE",
|
|
2168
|
+
"SHARE.NAME",
|
|
2169
|
+
"SHEET.BACKGROUND",
|
|
2170
|
+
"SHORT.MENUS",
|
|
2171
|
+
"SHOW.ACTIVE.CELL",
|
|
2172
|
+
"SHOW.BAR",
|
|
2173
|
+
"SHOW.CLIPBOARD",
|
|
2174
|
+
"SHOW.DETAIL",
|
|
2175
|
+
"SHOW.DIALOG",
|
|
2176
|
+
"SHOW.INFO",
|
|
2177
|
+
"SHOW.LEVELS",
|
|
2178
|
+
"SHOW.TOOLBAR",
|
|
2179
|
+
"SORT.SPECIAL",
|
|
2180
|
+
"SOUND.NOTE",
|
|
2181
|
+
"SOUND.PLAY",
|
|
2182
|
+
"SPELLING",
|
|
2183
|
+
"SPELLING.CHECK",
|
|
2184
|
+
"SPLIT",
|
|
2185
|
+
"STANDARD.FONT",
|
|
2186
|
+
"STANDARD.WIDTH",
|
|
2187
|
+
"STEP",
|
|
2188
|
+
"STYLE",
|
|
2189
|
+
"SUBSCRIBE.TO",
|
|
2190
|
+
"SUBTOTAL.CREATE",
|
|
2191
|
+
"SUBTOTAL.REMOVE",
|
|
2192
|
+
"SUMMARY.INFO",
|
|
2193
|
+
"TAB.ORDER",
|
|
2194
|
+
"TABLE",
|
|
2195
|
+
"TERMINATE",
|
|
2196
|
+
"TEXT.BOX",
|
|
2197
|
+
"TEXT.TO.COLUMNS",
|
|
2198
|
+
"TEXTREF",
|
|
2199
|
+
"TRACER.CLEAR",
|
|
2200
|
+
"TRACER.DISPLAY",
|
|
2201
|
+
"TRACER.ERROR",
|
|
2202
|
+
"TRACER.NAVIGATE",
|
|
2203
|
+
"TRAVERSE.NOTES",
|
|
2204
|
+
"UNDO",
|
|
2205
|
+
"UNGROUP",
|
|
2206
|
+
"UNGROUP.SHEETS",
|
|
2207
|
+
"UNHIDE",
|
|
2208
|
+
"UNLOCKED.NEXT",
|
|
2209
|
+
"UNLOCKED.PREV",
|
|
2210
|
+
"UNPROTECT.REVISIONS",
|
|
2211
|
+
"UNREGISTER",
|
|
2212
|
+
"UPDATE.LINK",
|
|
2213
|
+
"VBA.INSERT.FILE",
|
|
2214
|
+
"VBA.MAKE.ADDIN",
|
|
2215
|
+
"VBA.PROCEDURE.DEFINITION",
|
|
2216
|
+
"VBAACTIVATE",
|
|
2217
|
+
"VIEW.3D",
|
|
2218
|
+
"VIEW.DEFINE",
|
|
2219
|
+
"VIEW.DELETE",
|
|
2220
|
+
"VIEW.GET",
|
|
2221
|
+
"VIEW.SHOW",
|
|
2222
|
+
"VLINE",
|
|
2223
|
+
"VOLATILE",
|
|
2224
|
+
"VPAGE",
|
|
2225
|
+
"VSCROLL",
|
|
2226
|
+
"WAIT",
|
|
2227
|
+
"WEB.PUBLISH",
|
|
2228
|
+
"WHILE",
|
|
2229
|
+
"WINDOW.MAXIMIZE",
|
|
2230
|
+
"WINDOW.MINIMIZE",
|
|
2231
|
+
"WINDOW.MOVE",
|
|
2232
|
+
"WINDOW.RESTORE",
|
|
2233
|
+
"WINDOW.SIZE",
|
|
2234
|
+
"WINDOW.TITLE",
|
|
2235
|
+
"WINDOWS",
|
|
2236
|
+
"WORKBOOK.ACTIVATE",
|
|
2237
|
+
"WORKBOOK.ADD",
|
|
2238
|
+
"WORKBOOK.COPY",
|
|
2239
|
+
"WORKBOOK.DELETE",
|
|
2240
|
+
"WORKBOOK.HIDE",
|
|
2241
|
+
"WORKBOOK.INSERT",
|
|
2242
|
+
"WORKBOOK.MOVE",
|
|
2243
|
+
"WORKBOOK.NAME",
|
|
2244
|
+
"WORKBOOK.NEW",
|
|
2245
|
+
"WORKBOOK.NEXT",
|
|
2246
|
+
"WORKBOOK.OPTIONS",
|
|
2247
|
+
"WORKBOOK.PREV",
|
|
2248
|
+
"WORKBOOK.PROTECT",
|
|
2249
|
+
"WORKBOOK.SCROLL",
|
|
2250
|
+
"WORKBOOK.SELECT",
|
|
2251
|
+
"WORKBOOK.TAB.SPLIT",
|
|
2252
|
+
"WORKBOOK.UNHIDE",
|
|
2253
|
+
"WORKGROUP",
|
|
2254
|
+
"WORKGROUP.OPTIONS",
|
|
2255
|
+
"WORKSPACE",
|
|
2256
|
+
"ZOOM"
|
|
2257
|
+
]), Qe = "__xludf.DUMMYFUNCTION", Ze = "\"COMPUTED_VALUE\"", Je = (e) => `"${e.replace(/"/g, "\"\"")}"`, et = (e) => {
|
|
2258
|
+
if (null == e) return "\"\"";
|
|
2259
|
+
if ("number" == typeof e) return Number.isFinite(e) ? "" + e : null;
|
|
2260
|
+
if ("boolean" == typeof e) return e ? "TRUE" : "FALSE";
|
|
2261
|
+
if ("string" == typeof e) return Je(e);
|
|
2262
|
+
const t = e;
|
|
2263
|
+
if ("function" == typeof t?.getCode) {
|
|
2264
|
+
const e = t.getCode();
|
|
2265
|
+
return e < 1 ? null : e > 7 ? r.BuiltIn.Value.getLabel() : t.getLabel();
|
|
2266
|
+
}
|
|
2267
|
+
return null;
|
|
2268
|
+
}, tt = (e, t) => {
|
|
2269
|
+
const r = et(t);
|
|
2270
|
+
return null === r ? null : `IFERROR(${Qe}(${Je(e)}),${r})`;
|
|
2271
|
+
}, rt = (e) => {
|
|
2272
|
+
const t = et(e);
|
|
2273
|
+
return null === t ? null : `IFERROR(${Qe}(${Je(Ze)}),${t})`;
|
|
2274
|
+
}, nt = async (e, t) => {
|
|
2275
|
+
const r = /* @__PURE__ */ new Set();
|
|
2276
|
+
if (0 === t.size) return r;
|
|
2277
|
+
const n = e.getCalculation();
|
|
2278
|
+
if (n.getStatus() !== o.Status.Running) return r;
|
|
2279
|
+
const a = n.getFunctions();
|
|
2280
|
+
for (const e of t) {
|
|
2281
|
+
const t = a.getByName(e);
|
|
2282
|
+
if (!t) {
|
|
2283
|
+
ze.has(e.toUpperCase()) && r.add(e.toUpperCase());
|
|
2284
|
+
continue;
|
|
2285
|
+
}
|
|
2286
|
+
if (!t.isBuiltIn()) {
|
|
2287
|
+
r.add(e.toUpperCase());
|
|
2288
|
+
continue;
|
|
2289
|
+
}
|
|
2290
|
+
const n = (await t.getDescriptor()).getCategory();
|
|
2291
|
+
"Sheets" !== n && "SheetXL" !== n || r.add(e.toUpperCase());
|
|
2292
|
+
}
|
|
2293
|
+
return r;
|
|
2294
|
+
}, at = (e) => -1 === e.indexOf("_x") ? e : e.replace(/_x([0-9A-Fa-f]{4})_/g, (e, t) => String.fromCharCode(parseInt(t, 16))), ot = (e) => st(e) ? e.replace(/(_x[0-9A-Fa-f]{4}_)/g, "_x005F$1").replace(/[\x00-\x08\x0B-\x1F]/g, (e) => `_x${e.charCodeAt(0).toString(16).toUpperCase().padStart(4, "0")}_`) : e, st = (e) => {
|
|
2295
|
+
const t = e.length;
|
|
2296
|
+
for (let r = 0; r < t; r++) {
|
|
2297
|
+
const n = e.charCodeAt(r);
|
|
2298
|
+
if (n <= 8 || n >= 11 && n <= 31) return !0;
|
|
2299
|
+
if (95 === n && r + 6 < t && 120 === e.charCodeAt(r + 1) && 95 === e.charCodeAt(r + 6)) {
|
|
2300
|
+
const t = e.slice(r, r + 7);
|
|
2301
|
+
if (/^_x[0-9A-Fa-f]{4}_$/.test(t)) return !0;
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
return !1;
|
|
2305
|
+
}, it = /^\s|\s$/, lt = { "xml:space": "preserve" }, ct = [
|
|
2306
|
+
{
|
|
2307
|
+
key: "sheet",
|
|
2308
|
+
attribute: "sheet",
|
|
2309
|
+
modelDefault: !1,
|
|
2310
|
+
ooxmlDefault: !1
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
key: "objects",
|
|
2314
|
+
attribute: "objects",
|
|
2315
|
+
modelDefault: !1,
|
|
2316
|
+
ooxmlDefault: !1
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
key: "scenarios",
|
|
2320
|
+
attribute: "scenarios",
|
|
2321
|
+
modelDefault: !1,
|
|
2322
|
+
ooxmlDefault: !1
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
key: "formatCells",
|
|
2326
|
+
attribute: "formatCells",
|
|
2327
|
+
modelDefault: !1,
|
|
2328
|
+
ooxmlDefault: !0
|
|
2329
|
+
},
|
|
2330
|
+
{
|
|
2331
|
+
key: "formatColumns",
|
|
2332
|
+
attribute: "formatColumns",
|
|
2333
|
+
modelDefault: !1,
|
|
2334
|
+
ooxmlDefault: !0
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
key: "formatRows",
|
|
2338
|
+
attribute: "formatRows",
|
|
2339
|
+
modelDefault: !1,
|
|
2340
|
+
ooxmlDefault: !0
|
|
2341
|
+
},
|
|
2342
|
+
{
|
|
2343
|
+
key: "insertColumns",
|
|
2344
|
+
attribute: "insertColumns",
|
|
2345
|
+
modelDefault: !1,
|
|
2346
|
+
ooxmlDefault: !0
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
key: "insertRows",
|
|
2350
|
+
attribute: "insertRows",
|
|
2351
|
+
modelDefault: !1,
|
|
2352
|
+
ooxmlDefault: !0
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
key: "insertHyperlinks",
|
|
2356
|
+
attribute: "insertHyperlinks",
|
|
2357
|
+
modelDefault: !1,
|
|
2358
|
+
ooxmlDefault: !0
|
|
2359
|
+
},
|
|
2360
|
+
{
|
|
2361
|
+
key: "deleteColumns",
|
|
2362
|
+
attribute: "deleteColumns",
|
|
2363
|
+
modelDefault: !1,
|
|
2364
|
+
ooxmlDefault: !0
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
key: "deleteRows",
|
|
2368
|
+
attribute: "deleteRows",
|
|
2369
|
+
modelDefault: !1,
|
|
2370
|
+
ooxmlDefault: !0
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
key: "selectLockedCells",
|
|
2374
|
+
attribute: "selectLockedCells",
|
|
2375
|
+
modelDefault: !0,
|
|
2376
|
+
ooxmlDefault: !1
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
key: "sort",
|
|
2380
|
+
attribute: "sort",
|
|
2381
|
+
modelDefault: !1,
|
|
2382
|
+
ooxmlDefault: !0
|
|
2383
|
+
},
|
|
2384
|
+
{
|
|
2385
|
+
key: "autoTable",
|
|
2386
|
+
attribute: "autoFilter",
|
|
2387
|
+
modelDefault: !1,
|
|
2388
|
+
ooxmlDefault: !0
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
key: "pivotTables",
|
|
2392
|
+
attribute: "pivotTables",
|
|
2393
|
+
modelDefault: !1,
|
|
2394
|
+
ooxmlDefault: !0
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
key: "selectUnlockedCells",
|
|
2398
|
+
attribute: "selectUnlockedCells",
|
|
2399
|
+
modelDefault: !0,
|
|
2400
|
+
ooxmlDefault: !1
|
|
2401
|
+
}
|
|
2402
|
+
], ut = [
|
|
2403
|
+
{
|
|
2404
|
+
key: "structure",
|
|
2405
|
+
attribute: "lockStructure",
|
|
2406
|
+
modelDefault: !1,
|
|
2407
|
+
ooxmlDefault: !1
|
|
2408
|
+
},
|
|
2409
|
+
{
|
|
2410
|
+
key: "windows",
|
|
2411
|
+
attribute: "lockWindows",
|
|
2412
|
+
modelDefault: !1,
|
|
2413
|
+
ooxmlDefault: !1
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
key: "revision",
|
|
2417
|
+
attribute: "lockRevision",
|
|
2418
|
+
modelDefault: !0,
|
|
2419
|
+
ooxmlDefault: !1
|
|
2420
|
+
}
|
|
2421
|
+
], pt = (e, t) => {
|
|
2422
|
+
let r = e.ooxmlDefault;
|
|
2423
|
+
return "1" === t || "true" === t || "on" === t ? r = !0 : "0" !== t && "false" !== t && "off" !== t || (r = !1), !r;
|
|
2424
|
+
}, Et = (e, t) => {
|
|
2425
|
+
const r = !(t ?? e.modelDefault);
|
|
2426
|
+
return r === e.ooxmlDefault ? null : r ? "1" : "0";
|
|
2427
|
+
};
|
|
2428
|
+
function ft(e) {
|
|
2429
|
+
if (void 0 === e) return;
|
|
2430
|
+
if (0 === e.trim().length) return e;
|
|
2431
|
+
const t = A(e);
|
|
2432
|
+
return void 0 !== t ? t : "=" + e;
|
|
2433
|
+
}
|
|
2434
|
+
function At(e) {
|
|
2435
|
+
if (null == e) return;
|
|
2436
|
+
if ("number" == typeof e) return String(e);
|
|
2437
|
+
if ("boolean" == typeof e) return e ? "TRUE" : "FALSE";
|
|
2438
|
+
if (r.isError(e)) return e.getLabel();
|
|
2439
|
+
if ("string" == typeof e) return e.startsWith("=") ? e.slice(1) : Tt(e);
|
|
2440
|
+
const t = e;
|
|
2441
|
+
if ("e" === t.t && "number" == typeof t.v) {
|
|
2442
|
+
const e = r.getBuiltInByCode(t.v);
|
|
2443
|
+
if (e) return e.getLabel();
|
|
2444
|
+
}
|
|
2445
|
+
return String(e);
|
|
2446
|
+
}
|
|
2447
|
+
function Tt(e) {
|
|
2448
|
+
return `"${e.split("\"").join("\"\"")}"`;
|
|
2449
|
+
}
|
|
2450
|
+
var St = "aboveAverage", Rt = "beginsWith", dt = "cellIs", gt = "colorScale", mt = "containsBlanks", Ot = "containsErrors", ht = "containsText", It = "dataBar", Nt = "duplicateValues", Ct = "endsWith", Lt = "expression", yt = "iconSet", bt = "notContainsBlanks", xt = "notContainsErrors", vt = "notContainsText", Dt = "timePeriod", Pt = "top10", Mt = "uniqueValues", Ft = s.BuiltInOperatorNames, Bt = {
|
|
2451
|
+
equal: { operator: Ft.EqualTo },
|
|
2452
|
+
notEqual: {
|
|
2453
|
+
operator: Ft.EqualTo,
|
|
2454
|
+
negate: !0
|
|
2455
|
+
},
|
|
2456
|
+
greaterThan: { operator: Ft.GreaterThan },
|
|
2457
|
+
greaterThanOrEqual: { operator: Ft.GreaterThanEqualTo },
|
|
2458
|
+
lessThan: { operator: Ft.LessThan },
|
|
2459
|
+
lessThanOrEqual: { operator: Ft.LessThanEqualTo },
|
|
2460
|
+
between: { operator: Ft.Between },
|
|
2461
|
+
notBetween: {
|
|
2462
|
+
operator: Ft.Between,
|
|
2463
|
+
negate: !0
|
|
2464
|
+
}
|
|
2465
|
+
}, Ut = {
|
|
2466
|
+
[Ft.EqualTo]: {
|
|
2467
|
+
plain: "equal",
|
|
2468
|
+
negated: "notEqual"
|
|
2469
|
+
},
|
|
2470
|
+
[Ft.GreaterThan]: {
|
|
2471
|
+
plain: "greaterThan",
|
|
2472
|
+
negated: ""
|
|
2473
|
+
},
|
|
2474
|
+
[Ft.GreaterThanEqualTo]: {
|
|
2475
|
+
plain: "greaterThanOrEqual",
|
|
2476
|
+
negated: ""
|
|
2477
|
+
},
|
|
2478
|
+
[Ft.LessThan]: {
|
|
2479
|
+
plain: "lessThan",
|
|
2480
|
+
negated: ""
|
|
2481
|
+
},
|
|
2482
|
+
[Ft.LessThanEqualTo]: {
|
|
2483
|
+
plain: "lessThanOrEqual",
|
|
2484
|
+
negated: ""
|
|
2485
|
+
},
|
|
2486
|
+
[Ft.Between]: {
|
|
2487
|
+
plain: "between",
|
|
2488
|
+
negated: "notBetween"
|
|
2489
|
+
}
|
|
2490
|
+
}, wt = /* @__PURE__ */ new Set([
|
|
2491
|
+
"today",
|
|
2492
|
+
"yesterday",
|
|
2493
|
+
"tomorrow",
|
|
2494
|
+
"last7Days",
|
|
2495
|
+
"thisMonth",
|
|
2496
|
+
"lastMonth",
|
|
2497
|
+
"nextMonth",
|
|
2498
|
+
"thisWeek",
|
|
2499
|
+
"lastWeek",
|
|
2500
|
+
"nextWeek"
|
|
2501
|
+
]);
|
|
2502
|
+
function kt(e) {
|
|
2503
|
+
return ft(e);
|
|
2504
|
+
}
|
|
2505
|
+
function Gt(e) {
|
|
2506
|
+
return At(e) ?? "";
|
|
2507
|
+
}
|
|
2508
|
+
function Vt(e, t) {
|
|
2509
|
+
return t ? {
|
|
2510
|
+
operator: Ft.Not,
|
|
2511
|
+
param: e
|
|
2512
|
+
} : e;
|
|
2513
|
+
}
|
|
2514
|
+
function Wt(e, t) {
|
|
2515
|
+
const r = e.type;
|
|
2516
|
+
if (!r) return null;
|
|
2517
|
+
const n = e.formulas ?? [];
|
|
2518
|
+
switch (r) {
|
|
2519
|
+
case gt:
|
|
2520
|
+
case It:
|
|
2521
|
+
case yt: return null;
|
|
2522
|
+
case dt: {
|
|
2523
|
+
const r = e.operator ? Bt[e.operator] : void 0;
|
|
2524
|
+
if (!r) return t?.(`Conditional format operator '${e.operator}' is not a known cellIs operator.`), null;
|
|
2525
|
+
const a = r.operator === Ft.Between ? {
|
|
2526
|
+
from: kt(n[0]),
|
|
2527
|
+
to: kt(n[1])
|
|
2528
|
+
} : kt(n[0]);
|
|
2529
|
+
return Vt({
|
|
2530
|
+
operator: r.operator,
|
|
2531
|
+
param: a
|
|
2532
|
+
}, r.negate);
|
|
2533
|
+
}
|
|
2534
|
+
case Lt: return {
|
|
2535
|
+
operator: Ft.Expression,
|
|
2536
|
+
param: n[0] ?? ""
|
|
2537
|
+
};
|
|
2538
|
+
case ht: return {
|
|
2539
|
+
operator: Ft.TextContains,
|
|
2540
|
+
param: e.text
|
|
2541
|
+
};
|
|
2542
|
+
case vt: return Vt({
|
|
2543
|
+
operator: Ft.TextContains,
|
|
2544
|
+
param: e.text
|
|
2545
|
+
}, !0);
|
|
2546
|
+
case Rt: return {
|
|
2547
|
+
operator: Ft.TextStartsWith,
|
|
2548
|
+
param: e.text
|
|
2549
|
+
};
|
|
2550
|
+
case Ct: return {
|
|
2551
|
+
operator: Ft.TextEndsWith,
|
|
2552
|
+
param: e.text
|
|
2553
|
+
};
|
|
2554
|
+
case mt: return { operator: Ft.Blank };
|
|
2555
|
+
case bt: return Vt({ operator: Ft.Blank }, !0);
|
|
2556
|
+
case Ot: return { operator: Ft.Error };
|
|
2557
|
+
case xt: return Vt({ operator: Ft.Error }, !0);
|
|
2558
|
+
case Mt: return { operator: Ft.Unique };
|
|
2559
|
+
case Nt: return Vt({ operator: Ft.Unique }, !0);
|
|
2560
|
+
case Dt: {
|
|
2561
|
+
const t = {};
|
|
2562
|
+
return e.timePeriod && (t.type = e.timePeriod), {
|
|
2563
|
+
operator: Ft.TimePeriod,
|
|
2564
|
+
param: t
|
|
2565
|
+
};
|
|
2566
|
+
}
|
|
2567
|
+
case Pt: {
|
|
2568
|
+
const t = {
|
|
2569
|
+
top: !e.bottom,
|
|
2570
|
+
percent: e.percent ?? !1
|
|
2571
|
+
};
|
|
2572
|
+
return void 0 !== e.rank && (t.limit = e.rank), {
|
|
2573
|
+
operator: Ft.TopN,
|
|
2574
|
+
param: t
|
|
2575
|
+
};
|
|
2576
|
+
}
|
|
2577
|
+
case St: {
|
|
2578
|
+
const t = e.aboveAverage ?? !0, r = e.equalAverage ?? !1, n = { type: t ? r ? s.AverageType.AboveOrEqual : s.AverageType.Above : r ? s.AverageType.BelowOrEqual : s.AverageType.Below };
|
|
2579
|
+
return void 0 !== e.stdDev && (n.stdDevs = e.stdDev), {
|
|
2580
|
+
operator: Ft.Average,
|
|
2581
|
+
param: n
|
|
2582
|
+
};
|
|
2583
|
+
}
|
|
2584
|
+
default: return t?.(`Conditional format type '${r}' has no condition mapping.`), null;
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
function Ht(e, t, r) {
|
|
2588
|
+
if (!e) return null;
|
|
2589
|
+
const n = e.operator === Ft.Not, a = (n ? e.param : e) ?? {}, o = a.operator, i = a.param;
|
|
2590
|
+
if (!o) return null;
|
|
2591
|
+
const l = Ut[o];
|
|
2592
|
+
if (l) {
|
|
2593
|
+
const e = n ? l.negated : l.plain;
|
|
2594
|
+
if (!e) return r?.(`Conditional format operator 'not(${o})' has no OOXML form.`), null;
|
|
2595
|
+
return {
|
|
2596
|
+
type: dt,
|
|
2597
|
+
operator: e,
|
|
2598
|
+
formulas: o === Ft.Between ? [Gt(i?.from), Gt(i?.to)] : [Gt(i)]
|
|
2599
|
+
};
|
|
2600
|
+
}
|
|
2601
|
+
switch (o) {
|
|
2602
|
+
case Ft.Expression:
|
|
2603
|
+
if (n) break;
|
|
2604
|
+
return {
|
|
2605
|
+
type: Lt,
|
|
2606
|
+
formulas: [null == i ? "" : String(i)]
|
|
2607
|
+
};
|
|
2608
|
+
case Ft.TextContains: {
|
|
2609
|
+
const e = String(i ?? "");
|
|
2610
|
+
return n ? {
|
|
2611
|
+
type: vt,
|
|
2612
|
+
text: e,
|
|
2613
|
+
formulas: [`ISERROR(SEARCH(${Tt(e)},${t}))`]
|
|
2614
|
+
} : {
|
|
2615
|
+
type: ht,
|
|
2616
|
+
text: e,
|
|
2617
|
+
formulas: [`NOT(ISERROR(SEARCH(${Tt(e)},${t})))`]
|
|
2618
|
+
};
|
|
2619
|
+
}
|
|
2620
|
+
case Ft.TextStartsWith: {
|
|
2621
|
+
if (n) break;
|
|
2622
|
+
const e = String(i ?? "");
|
|
2623
|
+
return {
|
|
2624
|
+
type: Rt,
|
|
2625
|
+
text: e,
|
|
2626
|
+
formulas: [`LEFT(${t},LEN(${Tt(e)}))=${Tt(e)}`]
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2629
|
+
case Ft.TextEndsWith: {
|
|
2630
|
+
if (n) break;
|
|
2631
|
+
const e = String(i ?? "");
|
|
2632
|
+
return {
|
|
2633
|
+
type: Ct,
|
|
2634
|
+
text: e,
|
|
2635
|
+
formulas: [`RIGHT(${t},LEN(${Tt(e)}))=${Tt(e)}`]
|
|
2636
|
+
};
|
|
2637
|
+
}
|
|
2638
|
+
case Ft.Blank: return n ? {
|
|
2639
|
+
type: bt,
|
|
2640
|
+
formulas: [`LEN(TRIM(${t}))>0`]
|
|
2641
|
+
} : {
|
|
2642
|
+
type: mt,
|
|
2643
|
+
formulas: [`LEN(TRIM(${t}))=0`]
|
|
2644
|
+
};
|
|
2645
|
+
case Ft.Error: return n ? {
|
|
2646
|
+
type: xt,
|
|
2647
|
+
formulas: [`NOT(ISERROR(${t}))`]
|
|
2648
|
+
} : {
|
|
2649
|
+
type: Ot,
|
|
2650
|
+
formulas: [`ISERROR(${t})`]
|
|
2651
|
+
};
|
|
2652
|
+
case Ft.Unique: return { type: n ? Nt : Mt };
|
|
2653
|
+
case Ft.TimePeriod: {
|
|
2654
|
+
if (n) break;
|
|
2655
|
+
const e = i?.type;
|
|
2656
|
+
return e && !wt.has(e) ? (r?.(`Conditional format time period '${e}' has no OOXML form; rule skipped.`), null) : {
|
|
2657
|
+
type: Dt,
|
|
2658
|
+
timePeriod: e
|
|
2659
|
+
};
|
|
2660
|
+
}
|
|
2661
|
+
case Ft.TopN: {
|
|
2662
|
+
if (n) break;
|
|
2663
|
+
const e = i ?? {};
|
|
2664
|
+
return {
|
|
2665
|
+
type: Pt,
|
|
2666
|
+
bottom: !(e.top ?? 1),
|
|
2667
|
+
percent: e.percent ?? !1,
|
|
2668
|
+
rank: e.limit
|
|
2669
|
+
};
|
|
2670
|
+
}
|
|
2671
|
+
case Ft.Average: {
|
|
2672
|
+
if (n) break;
|
|
2673
|
+
const e = i ?? {}, t = e.type ?? s.AverageType.Above;
|
|
2674
|
+
return {
|
|
2675
|
+
type: St,
|
|
2676
|
+
aboveAverage: t === s.AverageType.Above || t === s.AverageType.AboveOrEqual,
|
|
2677
|
+
equalAverage: t === s.AverageType.AboveOrEqual || t === s.AverageType.BelowOrEqual,
|
|
2678
|
+
stdDev: e.stdDevs
|
|
2679
|
+
};
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
return r?.(`Conditional format operator '${n ? `not(${o})` : o}' has no OOXML form.`), null;
|
|
2683
|
+
}
|
|
2684
|
+
var $t = /* @__PURE__ */ new Set([
|
|
2685
|
+
"today",
|
|
2686
|
+
"yesterday",
|
|
2687
|
+
"tomorrow",
|
|
2688
|
+
"thisWeek",
|
|
2689
|
+
"lastWeek",
|
|
2690
|
+
"nextWeek",
|
|
2691
|
+
"thisMonth",
|
|
2692
|
+
"lastMonth",
|
|
2693
|
+
"nextMonth",
|
|
2694
|
+
"thisQuarter",
|
|
2695
|
+
"lastQuarter",
|
|
2696
|
+
"nextQuarter",
|
|
2697
|
+
"thisYear",
|
|
2698
|
+
"lastYear",
|
|
2699
|
+
"nextYear",
|
|
2700
|
+
"yearToDate",
|
|
2701
|
+
"Q1",
|
|
2702
|
+
"Q2",
|
|
2703
|
+
"Q3",
|
|
2704
|
+
"Q4",
|
|
2705
|
+
"M1",
|
|
2706
|
+
"M2",
|
|
2707
|
+
"M3",
|
|
2708
|
+
"M4",
|
|
2709
|
+
"M5",
|
|
2710
|
+
"M6",
|
|
2711
|
+
"M7",
|
|
2712
|
+
"M8",
|
|
2713
|
+
"M9",
|
|
2714
|
+
"M10",
|
|
2715
|
+
"M11",
|
|
2716
|
+
"M12"
|
|
2717
|
+
]);
|
|
2718
|
+
function Yt(e) {
|
|
2719
|
+
return "aboveAverage" === e || "belowAverage" === e ? {
|
|
2720
|
+
operator: s.BuiltInOperatorNames.Average,
|
|
2721
|
+
param: { type: "aboveAverage" === e ? s.AverageType.Above : s.AverageType.Below }
|
|
2722
|
+
} : {
|
|
2723
|
+
operator: s.BuiltInOperatorNames.TimePeriod,
|
|
2724
|
+
param: { type: e ?? void 0 }
|
|
2725
|
+
};
|
|
2726
|
+
}
|
|
2727
|
+
var Xt = "equal", _t = "notEqual", Kt = "greaterThan", jt = "greaterThanOrEqual", qt = "lessThan", zt = "lessThanOrEqual", Qt = s.BuiltInOperatorNames, Zt = {
|
|
2728
|
+
[Xt]: { operator: Qt.EqualTo },
|
|
2729
|
+
[_t]: {
|
|
2730
|
+
operator: Qt.EqualTo,
|
|
2731
|
+
negate: !0
|
|
2732
|
+
},
|
|
2733
|
+
[Kt]: { operator: Qt.GreaterThan },
|
|
2734
|
+
[jt]: { operator: Qt.GreaterThanEqualTo },
|
|
2735
|
+
[qt]: { operator: Qt.LessThan },
|
|
2736
|
+
[zt]: { operator: Qt.LessThanEqualTo }
|
|
2737
|
+
}, Jt = {
|
|
2738
|
+
[Qt.EqualTo]: {
|
|
2739
|
+
plain: Xt,
|
|
2740
|
+
negated: _t
|
|
2741
|
+
},
|
|
2742
|
+
[Qt.GreaterThan]: {
|
|
2743
|
+
plain: Kt,
|
|
2744
|
+
negated: zt
|
|
2745
|
+
},
|
|
2746
|
+
[Qt.GreaterThanEqualTo]: {
|
|
2747
|
+
plain: jt,
|
|
2748
|
+
negated: qt
|
|
2749
|
+
},
|
|
2750
|
+
[Qt.LessThan]: {
|
|
2751
|
+
plain: qt,
|
|
2752
|
+
negated: jt
|
|
2753
|
+
},
|
|
2754
|
+
[Qt.LessThanEqualTo]: {
|
|
2755
|
+
plain: zt,
|
|
2756
|
+
negated: Kt
|
|
2757
|
+
}
|
|
2758
|
+
}, er = {
|
|
2759
|
+
[Qt.TextStartsWith]: (e) => e + "*",
|
|
2760
|
+
[Qt.TextEndsWith]: (e) => "*" + e,
|
|
2761
|
+
[Qt.TextContains]: (e) => "*" + e + "*"
|
|
2762
|
+
};
|
|
2763
|
+
function tr(e) {
|
|
2764
|
+
if (!e) return !1;
|
|
2765
|
+
const t = e.operator === Qt.Not, r = t ? e.param : e, n = r?.operator;
|
|
2766
|
+
return "string" == typeof n && (void 0 !== Jt[n] || void 0 !== er[n] || (n === Qt.InSet ? null !== rr(r) : n === Qt.Blank ? t : !t && void 0 !== Zt[n]));
|
|
2767
|
+
}
|
|
2768
|
+
function rr(e) {
|
|
2769
|
+
if (!e || e.operator !== Qt.InSet || e.includeBlanks) return null;
|
|
2770
|
+
const t = e.param;
|
|
2771
|
+
if (!t?.byDisplay || t.blank || (t.dateGroups?.length ?? 0) > 0) return null;
|
|
2772
|
+
const r = t.items;
|
|
2773
|
+
return Array.isArray(r) && 1 === r.length && "string" == typeof r[0] ? r[0] : null;
|
|
2774
|
+
}
|
|
2775
|
+
function nr(e) {
|
|
2776
|
+
return e.replace(/[~*?]/g, "~$&");
|
|
2777
|
+
}
|
|
2778
|
+
function ar(e) {
|
|
2779
|
+
if (null == e || "" === e) return e ?? void 0;
|
|
2780
|
+
const t = Number(e);
|
|
2781
|
+
return Number.isFinite(t) ? t : e;
|
|
2782
|
+
}
|
|
2783
|
+
function or(e) {
|
|
2784
|
+
if (null != e) return "boolean" == typeof e ? e ? "TRUE" : "FALSE" : "" + e;
|
|
2785
|
+
}
|
|
2786
|
+
function sr(e, t) {
|
|
2787
|
+
const r = e.val;
|
|
2788
|
+
if (null == r) return null;
|
|
2789
|
+
const n = e.operator ?? Xt, a = Zt[n];
|
|
2790
|
+
if (!a) return t?.(`AutoFilter operator '${n}' has no mapping; the rule is carried but inert.`), {
|
|
2791
|
+
operator: n,
|
|
2792
|
+
param: ar(r)
|
|
2793
|
+
};
|
|
2794
|
+
let o;
|
|
2795
|
+
if (a.operator === Qt.EqualTo) {
|
|
2796
|
+
const e = ((e) => {
|
|
2797
|
+
const t = e.length;
|
|
2798
|
+
let r = "", n = !1, a = !1, o = !1;
|
|
2799
|
+
for (let s = 0; s < t; s++) {
|
|
2800
|
+
const i = e[s];
|
|
2801
|
+
if ("~" === i && s + 1 < t) {
|
|
2802
|
+
const t = e[s + 1];
|
|
2803
|
+
if ("*" === t || "?" === t || "~" === t) {
|
|
2804
|
+
r += t, s++;
|
|
2805
|
+
continue;
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
"*" !== i ? "?" !== i ? r += i : o = !0 : 0 === s ? n = !0 : s === t - 1 ? a = !0 : o = !0;
|
|
2809
|
+
}
|
|
2810
|
+
return "" === r && (n || a) && (o = !0), {
|
|
2811
|
+
text: r,
|
|
2812
|
+
leading: n,
|
|
2813
|
+
trailing: a,
|
|
2814
|
+
other: o
|
|
2815
|
+
};
|
|
2816
|
+
})(r);
|
|
2817
|
+
if (e.other) return t?.(`AutoFilter pattern '${r}' has no operator; the rule is carried but inert.`), {
|
|
2818
|
+
operator: n,
|
|
2819
|
+
param: r
|
|
2820
|
+
};
|
|
2821
|
+
if (e.leading && e.trailing) o = {
|
|
2822
|
+
operator: Qt.TextContains,
|
|
2823
|
+
param: e.text
|
|
2824
|
+
};
|
|
2825
|
+
else if (e.leading) o = {
|
|
2826
|
+
operator: Qt.TextEndsWith,
|
|
2827
|
+
param: e.text
|
|
2828
|
+
};
|
|
2829
|
+
else if (e.trailing) o = {
|
|
2830
|
+
operator: Qt.TextStartsWith,
|
|
2831
|
+
param: e.text
|
|
2832
|
+
};
|
|
2833
|
+
else if ("" === e.text.trim()) {
|
|
2834
|
+
if (o = {
|
|
2835
|
+
operator: Qt.Blank,
|
|
2836
|
+
param: { byDisplay: !0 }
|
|
2837
|
+
}, !a.negate) return {
|
|
2838
|
+
...o,
|
|
2839
|
+
includeBlanks: !0
|
|
2840
|
+
};
|
|
2841
|
+
} else o = {
|
|
2842
|
+
operator: Qt.InSet,
|
|
2843
|
+
param: {
|
|
2844
|
+
items: [e.text],
|
|
2845
|
+
byDisplay: !0
|
|
2846
|
+
}
|
|
2847
|
+
};
|
|
2848
|
+
} else o = {
|
|
2849
|
+
operator: a.operator,
|
|
2850
|
+
param: ar(r)
|
|
2851
|
+
};
|
|
2852
|
+
return a.negate ? {
|
|
2853
|
+
operator: Qt.Not,
|
|
2854
|
+
param: o
|
|
2855
|
+
} : o;
|
|
2856
|
+
}
|
|
2857
|
+
function ir(e) {
|
|
2858
|
+
const t = e?.operator;
|
|
2859
|
+
if (t !== Qt.And && t !== Qt.Or) return e;
|
|
2860
|
+
const r = e.param;
|
|
2861
|
+
if (!Array.isArray(r) || 2 !== r.length) return e;
|
|
2862
|
+
const [n, a] = r, o = n?.param;
|
|
2863
|
+
if ("number" != typeof o || a?.param !== o) return e;
|
|
2864
|
+
const s = [n.operator, a.operator], i = (e, t) => s.includes(e) && s.includes(t) && n.operator !== a.operator;
|
|
2865
|
+
return t === Qt.And && i(Qt.GreaterThanEqualTo, Qt.LessThanEqualTo) ? {
|
|
2866
|
+
operator: Qt.EqualTo,
|
|
2867
|
+
param: o
|
|
2868
|
+
} : t === Qt.Or && i(Qt.LessThan, Qt.GreaterThan) ? {
|
|
2869
|
+
operator: Qt.Not,
|
|
2870
|
+
param: {
|
|
2871
|
+
operator: Qt.EqualTo,
|
|
2872
|
+
param: o
|
|
2873
|
+
}
|
|
2874
|
+
} : e;
|
|
2875
|
+
}
|
|
2876
|
+
function lr(e) {
|
|
2877
|
+
if (!e) return null;
|
|
2878
|
+
const t = e.operator === Qt.Not, r = (t ? e.param : e) ?? {};
|
|
2879
|
+
if (r.operator !== Qt.EqualTo || "number" != typeof r.param) return null;
|
|
2880
|
+
const n = or(r.param);
|
|
2881
|
+
return t ? {
|
|
2882
|
+
and: !1,
|
|
2883
|
+
filters: [{
|
|
2884
|
+
operator: qt,
|
|
2885
|
+
val: n
|
|
2886
|
+
}, {
|
|
2887
|
+
operator: Kt,
|
|
2888
|
+
val: n
|
|
2889
|
+
}]
|
|
2890
|
+
} : {
|
|
2891
|
+
and: !0,
|
|
2892
|
+
filters: [{
|
|
2893
|
+
operator: jt,
|
|
2894
|
+
val: n
|
|
2895
|
+
}, {
|
|
2896
|
+
operator: zt,
|
|
2897
|
+
val: n
|
|
2898
|
+
}]
|
|
2899
|
+
};
|
|
2900
|
+
}
|
|
2901
|
+
function cr(e, t) {
|
|
2902
|
+
if (!e) return null;
|
|
2903
|
+
const r = e.operator === Qt.Not, n = (r ? e.param : e) ?? {}, a = n.operator;
|
|
2904
|
+
if (!a) return null;
|
|
2905
|
+
const o = er[a];
|
|
2906
|
+
if (o) return "string" != typeof n.param || "" === n.param ? (t?.(`AutoFilter operator '${a}' has no text; it was not written.`), null) : {
|
|
2907
|
+
operator: r ? _t : Xt,
|
|
2908
|
+
val: o(nr(n.param))
|
|
2909
|
+
};
|
|
2910
|
+
if (a === Qt.InSet) {
|
|
2911
|
+
const e = rr(n);
|
|
2912
|
+
return null === e ? (t?.("AutoFilter list with more than one item, date groups or blanks has no customFilter form."), null) : {
|
|
2913
|
+
operator: r ? _t : Xt,
|
|
2914
|
+
val: nr(e)
|
|
2915
|
+
};
|
|
2916
|
+
}
|
|
2917
|
+
if (a === Qt.Blank) return r ? {
|
|
2918
|
+
operator: _t,
|
|
2919
|
+
val: " "
|
|
2920
|
+
} : (t?.("AutoFilter blank criterion has no customFilter form; it is the blank attribute of a list."), null);
|
|
2921
|
+
const s = Jt[a];
|
|
2922
|
+
if (!s) return !r && Zt[a] ? {
|
|
2923
|
+
operator: a,
|
|
2924
|
+
val: or(n.param)
|
|
2925
|
+
} : (t?.(`AutoFilter operator '${r ? `not(${a})` : a}' has no OOXML form.`), null);
|
|
2926
|
+
let i = or(n.param);
|
|
2927
|
+
return a === Qt.EqualTo && "string" == typeof n.param && (i = r && "" === n.param ? " " : nr(n.param)), {
|
|
2928
|
+
operator: r ? s.negated : s.plain,
|
|
2929
|
+
val: i
|
|
2930
|
+
};
|
|
2931
|
+
}
|
|
2932
|
+
function ur(e) {
|
|
2933
|
+
if (!e || e.operator !== Qt.EqualTo) return null;
|
|
2934
|
+
const t = e.param;
|
|
2935
|
+
return "string" == typeof t ? t.startsWith("=") ? null : t : "boolean" == typeof t ? or(t) : null;
|
|
2936
|
+
}
|
|
2937
|
+
var pr = "custom", Er = "date", fr = "decimal", Ar = "list", Tr = "none", Sr = "textLength", Rr = "time", dr = "whole", gr = s.BuiltInOperatorNames, mr = s.BuiltInSelectorNames, Or = {
|
|
2938
|
+
[dr]: mr.Whole,
|
|
2939
|
+
[fr]: mr.Number,
|
|
2940
|
+
[Er]: mr.Date,
|
|
2941
|
+
[Rr]: mr.Time,
|
|
2942
|
+
[Sr]: mr.TextLength
|
|
2943
|
+
}, hr = {
|
|
2944
|
+
[mr.Whole]: dr,
|
|
2945
|
+
[mr.Number]: fr,
|
|
2946
|
+
[mr.Date]: Er,
|
|
2947
|
+
[mr.DateTime]: Er,
|
|
2948
|
+
[mr.Time]: Rr,
|
|
2949
|
+
[mr.TextLength]: Sr
|
|
2950
|
+
}, Ir = {
|
|
2951
|
+
between: { operator: gr.Between },
|
|
2952
|
+
notBetween: {
|
|
2953
|
+
operator: gr.Between,
|
|
2954
|
+
negate: !0
|
|
2955
|
+
},
|
|
2956
|
+
equal: { operator: gr.EqualTo },
|
|
2957
|
+
notEqual: {
|
|
2958
|
+
operator: gr.EqualTo,
|
|
2959
|
+
negate: !0
|
|
2960
|
+
},
|
|
2961
|
+
greaterThan: { operator: gr.GreaterThan },
|
|
2962
|
+
greaterThanOrEqual: { operator: gr.GreaterThanEqualTo },
|
|
2963
|
+
lessThan: { operator: gr.LessThan },
|
|
2964
|
+
lessThanOrEqual: { operator: gr.LessThanEqualTo }
|
|
2965
|
+
}, Nr = {
|
|
2966
|
+
[gr.GreaterThan]: gr.After,
|
|
2967
|
+
[gr.GreaterThanEqualTo]: gr.AfterEqualTo,
|
|
2968
|
+
[gr.LessThan]: gr.Before,
|
|
2969
|
+
[gr.LessThanEqualTo]: gr.BeforeEqualTo
|
|
2970
|
+
}, Cr = {
|
|
2971
|
+
[gr.Between]: {
|
|
2972
|
+
plain: "between",
|
|
2973
|
+
negated: "notBetween"
|
|
2974
|
+
},
|
|
2975
|
+
[gr.EqualTo]: {
|
|
2976
|
+
plain: "equal",
|
|
2977
|
+
negated: "notEqual"
|
|
2978
|
+
},
|
|
2979
|
+
[gr.GreaterThan]: {
|
|
2980
|
+
plain: "greaterThan",
|
|
2981
|
+
negated: ""
|
|
2982
|
+
},
|
|
2983
|
+
[gr.GreaterThanEqualTo]: {
|
|
2984
|
+
plain: "greaterThanOrEqual",
|
|
2985
|
+
negated: ""
|
|
2986
|
+
},
|
|
2987
|
+
[gr.LessThan]: {
|
|
2988
|
+
plain: "lessThan",
|
|
2989
|
+
negated: ""
|
|
2990
|
+
},
|
|
2991
|
+
[gr.LessThanEqualTo]: {
|
|
2992
|
+
plain: "lessThanOrEqual",
|
|
2993
|
+
negated: ""
|
|
2994
|
+
},
|
|
2995
|
+
[gr.After]: {
|
|
2996
|
+
plain: "greaterThan",
|
|
2997
|
+
negated: ""
|
|
2998
|
+
},
|
|
2999
|
+
[gr.AfterEqualTo]: {
|
|
3000
|
+
plain: "greaterThanOrEqual",
|
|
3001
|
+
negated: ""
|
|
3002
|
+
},
|
|
3003
|
+
[gr.Before]: {
|
|
3004
|
+
plain: "lessThan",
|
|
3005
|
+
negated: ""
|
|
3006
|
+
},
|
|
3007
|
+
[gr.BeforeEqualTo]: {
|
|
3008
|
+
plain: "lessThanOrEqual",
|
|
3009
|
+
negated: ""
|
|
3010
|
+
}
|
|
3011
|
+
};
|
|
3012
|
+
function Lr(e, t) {
|
|
3013
|
+
return t === Ar || t === pr ? e : ft(e);
|
|
3014
|
+
}
|
|
3015
|
+
function yr(e) {
|
|
3016
|
+
return At(e);
|
|
3017
|
+
}
|
|
3018
|
+
function br(e, t, r) {
|
|
3019
|
+
if ("string" != typeof e || e.length <= 255) return e;
|
|
3020
|
+
let n = 255;
|
|
3021
|
+
const a = e.charCodeAt(n - 1);
|
|
3022
|
+
return a >= 55296 && a <= 56319 && n--, r?.(`DataValidation ${t} is ${e.length} characters; Excel opens no more than 255, so it is cut.`, `xlsx.dv.${t}.length`), e.substring(0, n);
|
|
3023
|
+
}
|
|
3024
|
+
function xr(e, t) {
|
|
3025
|
+
const r = e.type;
|
|
3026
|
+
if (!r || r === Tr) return null;
|
|
3027
|
+
if (r === Ar) return {
|
|
3028
|
+
selector: mr.List,
|
|
3029
|
+
operator: gr.InSet,
|
|
3030
|
+
param: { items: e.formula1 }
|
|
3031
|
+
};
|
|
3032
|
+
if (r === pr) return {
|
|
3033
|
+
operator: gr.Expression,
|
|
3034
|
+
param: e.formula1
|
|
3035
|
+
};
|
|
3036
|
+
const n = Or[r];
|
|
3037
|
+
if (!n) return t?.(`DataValidation type '${r}' has no selector mapping.`), null;
|
|
3038
|
+
const a = e.operator ?? "between", o = Ir[a];
|
|
3039
|
+
if (!o) return t?.(`DataValidation operator '${a}' has no mapping; the rule is carried but inert.`), {
|
|
3040
|
+
selector: n,
|
|
3041
|
+
operator: a,
|
|
3042
|
+
param: e.formula1
|
|
3043
|
+
};
|
|
3044
|
+
const s = o.operator === gr.Between ? {
|
|
3045
|
+
from: e.formula1,
|
|
3046
|
+
to: e.formula2
|
|
3047
|
+
} : e.formula1, i = {
|
|
3048
|
+
operator: (r === Er || r === Rr) && Nr[o.operator] || o.operator,
|
|
3049
|
+
param: s
|
|
3050
|
+
};
|
|
3051
|
+
return o.negate ? {
|
|
3052
|
+
selector: n,
|
|
3053
|
+
operator: gr.Not,
|
|
3054
|
+
param: i
|
|
3055
|
+
} : {
|
|
3056
|
+
selector: n,
|
|
3057
|
+
...i
|
|
3058
|
+
};
|
|
3059
|
+
}
|
|
3060
|
+
function vr(e, t) {
|
|
3061
|
+
if (!e) return null;
|
|
3062
|
+
const r = e.operator === gr.Not, n = (r ? e.param : e) ?? {}, a = n.operator, o = n.param;
|
|
3063
|
+
if (!a) return null;
|
|
3064
|
+
if (!r && (a === gr.InSet || a === Ar)) {
|
|
3065
|
+
const e = "string" == typeof o ? o : Array.isArray(o?.items) ? `"${o.items.join(",").replace(/"/g, "\"\"")}"` : o?.items;
|
|
3066
|
+
return "string" == typeof e && function(e) {
|
|
3067
|
+
const t = e.startsWith("=") ? e.substring(1) : e, r = [];
|
|
3068
|
+
let n = !1;
|
|
3069
|
+
for (let e = 0; e < t.length; e++) {
|
|
3070
|
+
const a = t[e];
|
|
3071
|
+
if ("\"" !== a && "'" !== a) if ("{" !== a) if ("(" !== a) if (")" !== a) if ("," !== a) n = /[A-Za-z0-9_.$!\]]/.test(a);
|
|
3072
|
+
else {
|
|
3073
|
+
if (0 === r.length || !r[r.length - 1]) return !0;
|
|
3074
|
+
n = !1;
|
|
3075
|
+
}
|
|
3076
|
+
else r.pop(), n = !0;
|
|
3077
|
+
else r.push(n), n = !1;
|
|
3078
|
+
else {
|
|
3079
|
+
for (; e < t.length && "}" !== t[e];) e++;
|
|
3080
|
+
n = !1;
|
|
3081
|
+
}
|
|
3082
|
+
else {
|
|
3083
|
+
for (e++; e < t.length;) {
|
|
3084
|
+
if (t[e] === a) {
|
|
3085
|
+
if (t[e + 1] !== a) break;
|
|
3086
|
+
e++;
|
|
3087
|
+
}
|
|
3088
|
+
e++;
|
|
3089
|
+
}
|
|
3090
|
+
n = "'" === a;
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
return !1;
|
|
3094
|
+
}(e) ? (t?.(`DataValidation list source '${e}' is a union, which Excel cannot open; the rule is written without its list.`, "xlsx.dv.listUnion"), null) : {
|
|
3095
|
+
type: Ar,
|
|
3096
|
+
formula1: e
|
|
3097
|
+
};
|
|
3098
|
+
}
|
|
3099
|
+
if (!r && (a === gr.Expression || a === pr)) return {
|
|
3100
|
+
type: pr,
|
|
3101
|
+
formula1: "string" == typeof o ? o : o?.formula ?? o?.formula1
|
|
3102
|
+
};
|
|
3103
|
+
const s = Cr[a];
|
|
3104
|
+
if (!s) return !r && Ir[a] ? {
|
|
3105
|
+
type: Dr(e.selector),
|
|
3106
|
+
operator: a,
|
|
3107
|
+
formula1: yr(o?.from ?? o),
|
|
3108
|
+
formula2: yr(o?.to)
|
|
3109
|
+
} : (t?.(`DataValidation operator '${r ? `not(${a})` : a}' has no OOXML form.`), null);
|
|
3110
|
+
const i = r ? s.negated : s.plain;
|
|
3111
|
+
return i ? {
|
|
3112
|
+
type: Dr(e.selector),
|
|
3113
|
+
operator: i,
|
|
3114
|
+
formula1: yr(a === gr.Between ? o?.from : o),
|
|
3115
|
+
formula2: a === gr.Between ? yr(o?.to) : void 0
|
|
3116
|
+
} : (t?.(`DataValidation operator 'not(${a})' has no OOXML form.`), null);
|
|
3117
|
+
}
|
|
3118
|
+
function Dr(e) {
|
|
3119
|
+
return (e ? hr[e] : void 0) ?? fr;
|
|
3120
|
+
}
|
|
3121
|
+
var Pr = (e) => {
|
|
3122
|
+
const t = {};
|
|
3123
|
+
for (const [r, n] of Object.entries(e)) t[n] = r;
|
|
3124
|
+
return {
|
|
3125
|
+
read: (t) => e[t] ?? t,
|
|
3126
|
+
write: (e) => void 0 === e ? void 0 : t[e] ?? e
|
|
3127
|
+
};
|
|
3128
|
+
}, Mr = Object.freeze({
|
|
3129
|
+
sp: u.Type.Shape,
|
|
3130
|
+
cxnSp: u.Type.Connector,
|
|
3131
|
+
grpSp: u.Type.Group,
|
|
3132
|
+
pic: u.Type.Picture
|
|
3133
|
+
}), Fr = Pr({
|
|
3134
|
+
l: p.ParagraphAlignment.Left,
|
|
3135
|
+
ctr: p.ParagraphAlignment.Center,
|
|
3136
|
+
r: p.ParagraphAlignment.Right,
|
|
3137
|
+
just: p.ParagraphAlignment.Justify,
|
|
3138
|
+
justLow: p.ParagraphAlignment.JustifyLow,
|
|
3139
|
+
dist: p.ParagraphAlignment.Distributed,
|
|
3140
|
+
thaiDist: p.ParagraphAlignment.ThaiDistributed
|
|
3141
|
+
}), Br = Pr({
|
|
3142
|
+
auto: p.FontAlignment.Auto,
|
|
3143
|
+
t: p.FontAlignment.Top,
|
|
3144
|
+
ctr: p.FontAlignment.Center,
|
|
3145
|
+
base: p.FontAlignment.Baseline,
|
|
3146
|
+
b: p.FontAlignment.Bottom
|
|
3147
|
+
}), Ur = Pr({
|
|
3148
|
+
t: E.VerticalAlignment.Top,
|
|
3149
|
+
ctr: E.VerticalAlignment.Center,
|
|
3150
|
+
b: E.VerticalAlignment.Bottom,
|
|
3151
|
+
just: E.VerticalAlignment.Justify,
|
|
3152
|
+
dist: E.VerticalAlignment.Distributed
|
|
3153
|
+
}), wr = Pr({
|
|
3154
|
+
none: p.UnderlineStyle.None,
|
|
3155
|
+
words: p.UnderlineStyle.Words,
|
|
3156
|
+
sng: p.UnderlineStyle.Single,
|
|
3157
|
+
dbl: p.UnderlineStyle.Double,
|
|
3158
|
+
heavy: p.UnderlineStyle.Heavy,
|
|
3159
|
+
dotted: p.UnderlineStyle.Dotted,
|
|
3160
|
+
dottedHeavy: p.UnderlineStyle.DottedHeavy,
|
|
3161
|
+
dash: p.UnderlineStyle.Dash,
|
|
3162
|
+
dashHeavy: p.UnderlineStyle.DashHeavy,
|
|
3163
|
+
dashLong: p.UnderlineStyle.DashLong,
|
|
3164
|
+
dashLongHeavy: p.UnderlineStyle.DashLongHeavy,
|
|
3165
|
+
dotDash: p.UnderlineStyle.DotDash,
|
|
3166
|
+
dotDashHeavy: p.UnderlineStyle.DotDashHeavy,
|
|
3167
|
+
dotDotDash: p.UnderlineStyle.DotDotDash,
|
|
3168
|
+
dotDotDashHeavy: p.UnderlineStyle.DotDotDashHeavy,
|
|
3169
|
+
wavy: p.UnderlineStyle.Wavy,
|
|
3170
|
+
wavyHeavy: p.UnderlineStyle.WavyHeavy,
|
|
3171
|
+
wavyDbl: p.UnderlineStyle.WavyDouble
|
|
3172
|
+
}), kr = Pr({
|
|
3173
|
+
noStrike: p.StrikeStyle.None,
|
|
3174
|
+
sngStrike: p.StrikeStyle.Single,
|
|
3175
|
+
dblStrike: p.StrikeStyle.Double
|
|
3176
|
+
}), Gr = Pr({
|
|
3177
|
+
horz: E.WritingMode.Horizontal,
|
|
3178
|
+
vert: E.WritingMode.Vertical,
|
|
3179
|
+
vert270: E.WritingMode.Vertical270,
|
|
3180
|
+
wordArtVert: E.WritingMode.WordArtVertical,
|
|
3181
|
+
eaVert: E.WritingMode.EastAsianVertical,
|
|
3182
|
+
mongolianVert: E.WritingMode.MongolianVertical,
|
|
3183
|
+
wordArtVertRtl: E.WritingMode.WordArtVerticalRtl
|
|
3184
|
+
}), Vr = Pr({
|
|
3185
|
+
overflow: E.Overflow.Visible,
|
|
3186
|
+
ellipsis: E.Overflow.Ellipsis,
|
|
3187
|
+
clip: E.Overflow.Clip
|
|
3188
|
+
}), Wr = Pr({
|
|
3189
|
+
l: E.TabStopAlignment.Left,
|
|
3190
|
+
ctr: E.TabStopAlignment.Center,
|
|
3191
|
+
r: E.TabStopAlignment.Right,
|
|
3192
|
+
dec: E.TabStopAlignment.Decimal
|
|
3193
|
+
}), Hr = (e) => void 0 === e ? void 0 : String(e > 127 ? e - 256 : e), $r = S({
|
|
3194
|
+
isBlank: () => qr,
|
|
3195
|
+
isNotBlank: () => zr,
|
|
3196
|
+
length: () => Qr,
|
|
3197
|
+
parseRotation: () => Yr,
|
|
3198
|
+
parseValAttrAsBoolean: () => _r,
|
|
3199
|
+
parseValAttrAsFloat: () => jr,
|
|
3200
|
+
parseValAttrAsInteger: () => Kr,
|
|
3201
|
+
parseValAttrAsString: () => Xr
|
|
3202
|
+
}), Yr = (t, r) => {
|
|
3203
|
+
if (!t || !t.hasAttribute("rot")) return;
|
|
3204
|
+
const n = t.getAttribute("rot"), a = e.roundAccurately(je(n), 2);
|
|
3205
|
+
-1e3 !== a && (r.rotation = a);
|
|
3206
|
+
}, Xr = (e, t, r, n, a) => {
|
|
3207
|
+
const o = e.getValAttrAsString(n, t);
|
|
3208
|
+
null !== o && (r[a] = o);
|
|
3209
|
+
}, _r = (e, t, r, n, a = n, o = null) => {
|
|
3210
|
+
const s = e.getValAttrAsBoolean(n, t, o);
|
|
3211
|
+
null !== s && (r[a] = s);
|
|
3212
|
+
}, Kr = (e, t, r, n, a) => {
|
|
3213
|
+
const o = e.getValAttrAsInteger(n, t);
|
|
3214
|
+
null !== o && (r[a] = o);
|
|
3215
|
+
}, jr = (e, t, r, n, a, o = 1) => {
|
|
3216
|
+
const s = e.getValAttrAsFloat(n, t);
|
|
3217
|
+
null !== s && (r[a] = s * o);
|
|
3218
|
+
}, qr = (e) => !e || 0 === e.trim().length, zr = (e) => !qr(e), Qr = (e) => e?.length ?? 0, Zr = (e) => {
|
|
3219
|
+
const t = [], r = e.childNodes;
|
|
3220
|
+
for (let e = 0; e < r.length; e++) {
|
|
3221
|
+
const n = r.item(e);
|
|
3222
|
+
1 === n.nodeType && t.push(n);
|
|
3223
|
+
}
|
|
3224
|
+
return t;
|
|
3225
|
+
}, Jr = (e, t) => Zr(e).find((e) => e.localName === t), en = (e, t) => e ? Zr(e).filter((e) => e.localName === t) : [], tn = (e) => `${e.getAttribute("name") ?? ""} ${(e.getAttribute("fmla") ?? "").trim()}`.trim(), rn = (e) => {
|
|
3226
|
+
const t = Jr(e, "pos");
|
|
3227
|
+
return [t?.getAttribute("x") ?? "0", t?.getAttribute("y") ?? "0"];
|
|
3228
|
+
}, nn = (e, t) => e.getAttribute(t) ?? "_", an = (e, t) => {
|
|
3229
|
+
const r = t.map((t) => nn(e, t));
|
|
3230
|
+
return r.every((e) => "_" === e) ? "" : ` ${r.join(" ")}`;
|
|
3231
|
+
}, on = {
|
|
3232
|
+
moveTo: "M",
|
|
3233
|
+
lnTo: "L",
|
|
3234
|
+
quadBezTo: "Q",
|
|
3235
|
+
cubicBezTo: "C",
|
|
3236
|
+
arcTo: "A",
|
|
3237
|
+
close: "Z"
|
|
3238
|
+
}, sn = (e) => {
|
|
3239
|
+
const t = [];
|
|
3240
|
+
for (const r of Zr(e)) {
|
|
3241
|
+
const e = on[r.localName];
|
|
3242
|
+
if (e) if ("A" === e) t.push(`A ${nn(r, "wR")} ${nn(r, "hR")} ${nn(r, "stAng")} ${nn(r, "swAng")}`);
|
|
3243
|
+
else if ("Z" === e) t.push("Z");
|
|
3244
|
+
else {
|
|
3245
|
+
const n = en(r, "pt").map((e) => `${e.getAttribute("x") ?? "0"} ${e.getAttribute("y") ?? "0"}`);
|
|
3246
|
+
t.push(`${e} ${n.join(" ")}`);
|
|
3247
|
+
}
|
|
3248
|
+
}
|
|
3249
|
+
const r = { d: t.join(" ") }, n = e.getAttribute("fill");
|
|
3250
|
+
n && "norm" !== n && (r.f = n);
|
|
3251
|
+
const a = e.getAttribute("stroke");
|
|
3252
|
+
"0" !== a && "false" !== a || (r.s = 0);
|
|
3253
|
+
const o = e.getAttribute("w"), s = e.getAttribute("h");
|
|
3254
|
+
return null !== o && null !== s && (r.w = Number(o), r.h = Number(s)), r;
|
|
3255
|
+
}, ln = class {
|
|
3256
|
+
visit(e, t, r) {}
|
|
3257
|
+
getStroke(e, t) {
|
|
3258
|
+
const r = e.evaluate("ln", t);
|
|
3259
|
+
return r ? this.parseLn(e, r) : {};
|
|
3260
|
+
}
|
|
3261
|
+
parseLn(e, t) {
|
|
3262
|
+
const r = {};
|
|
3263
|
+
t.hasAttribute("algn") && (r.align = t.getAttribute("algn")), t.hasAttribute("cap") && (r.lineCap = un(t.getAttribute("cap"))), t.hasAttribute("cmpd") && (r.compound = t.getAttribute("cmpd")), t.hasAttribute("w") && (r.width = Ye(t.getAttribute("w")));
|
|
3264
|
+
const n = e.evaluate("miter", t);
|
|
3265
|
+
n && (r.lineJoin = "miter", n.hasAttribute("lim") && (r.miterLimit = parseFloat(n.getAttribute("lim")) / 1e5)), e.evaluate("bevel", t) && (r.lineJoin = "bevel"), e.evaluate("round", t) && (r.lineJoin = "round");
|
|
3266
|
+
const a = e.evaluate("custDash", t);
|
|
3267
|
+
if (a) {
|
|
3268
|
+
const t = e.evaluate("ds", a);
|
|
3269
|
+
if (t && t.length > 0) {
|
|
3270
|
+
const e = [];
|
|
3271
|
+
for (let r = 0; r < t.length; r++) {
|
|
3272
|
+
const n = t.item(r);
|
|
3273
|
+
e.push(Ke(n.getAttribute("d") ?? "")), e.push(Ke(n.getAttribute("sp") ?? ""));
|
|
3274
|
+
}
|
|
3275
|
+
r.dash = e;
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
const o = e.evaluate("prstDash", t);
|
|
3279
|
+
o && o.hasAttribute("val") && (r.dash = o.getAttribute("val")), this.parseEndElement(e, t, r, "headEnd", "head"), this.parseEndElement(e, t, r, "tailEnd", "tail");
|
|
3280
|
+
const s = this.getFill(e, t);
|
|
3281
|
+
s && (r.fill = s);
|
|
3282
|
+
const i = e.evaluate("extLst", t), l = i ? e.serializeElement(i) : null;
|
|
3283
|
+
return l && (r.extLst = l), r;
|
|
3284
|
+
}
|
|
3285
|
+
parseEndElement(e, t, r, n, a) {
|
|
3286
|
+
const o = e.evaluate(n, t);
|
|
3287
|
+
o && (o.hasAttribute("type") && (r[a + "Type"] = o.getAttribute("type")), o.hasAttribute("w") && (r[a + "Width"] = o.getAttribute("w")), o.hasAttribute("len") && (r[a + "Length"] = o.getAttribute("len")));
|
|
3288
|
+
}
|
|
3289
|
+
getEffects(e, t) {
|
|
3290
|
+
const r = e.evaluate("effectLst", t);
|
|
3291
|
+
if (!r) return null;
|
|
3292
|
+
const n = [], a = r.childNodes, o = a.length;
|
|
3293
|
+
for (let t = 0; t < o; t++) {
|
|
3294
|
+
const r = a.item(t);
|
|
3295
|
+
if (1 !== r.nodeType) continue;
|
|
3296
|
+
const o = this.processEffectElement(e, r, r.localName);
|
|
3297
|
+
if (void 0 === o) return;
|
|
3298
|
+
n.push(o);
|
|
3299
|
+
}
|
|
3300
|
+
return n;
|
|
3301
|
+
}
|
|
3302
|
+
processEffectElement(e, t, r) {
|
|
3303
|
+
switch (r) {
|
|
3304
|
+
case "outerShdw": {
|
|
3305
|
+
const r = {
|
|
3306
|
+
type: i.Type.OuterShadow,
|
|
3307
|
+
color: this.processAdjColor(e, t)
|
|
3308
|
+
};
|
|
3309
|
+
return t.hasAttribute("dist") && (r.distance = Ye(t.getAttribute("dist"))), t.hasAttribute("dir") && (r.angle = je(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (r.blur = Ye(t.getAttribute("blurRad"))), t.hasAttribute("algn") && (r.alignment = t.getAttribute("algn")), t.hasAttribute("rotWithShape") && (r.isRotatedWithShape = qe(t.getAttribute("rotWithShape"))), t.hasAttribute("sx") && (r.scaleX = Ke(t.getAttribute("sx"))), t.hasAttribute("sy") && (r.scaleY = Ke(t.getAttribute("sy"))), t.hasAttribute("kx") && (r.skewX = je(t.getAttribute("kx"))), t.hasAttribute("ky") && (r.skewY = je(t.getAttribute("ky"))), r;
|
|
3310
|
+
}
|
|
3311
|
+
case "innerShdw": {
|
|
3312
|
+
const r = {
|
|
3313
|
+
type: i.Type.InnerShadow,
|
|
3314
|
+
color: this.processAdjColor(e, t)
|
|
3315
|
+
};
|
|
3316
|
+
return t.hasAttribute("dist") && (r.distance = Ye(t.getAttribute("dist"))), t.hasAttribute("dir") && (r.angle = je(t.getAttribute("dir"))), t.hasAttribute("blurRad") && (r.blur = Ye(t.getAttribute("blurRad"))), r;
|
|
3317
|
+
}
|
|
3318
|
+
case "prstShdw": {
|
|
3319
|
+
const r = {
|
|
3320
|
+
type: i.Type.PresetShadow,
|
|
3321
|
+
color: this.processAdjColor(e, t),
|
|
3322
|
+
preset: t.getAttribute("prst") ?? void 0
|
|
3323
|
+
};
|
|
3324
|
+
return t.hasAttribute("dist") && (r.distance = Ye(t.getAttribute("dist"))), t.hasAttribute("dir") && (r.angle = je(t.getAttribute("dir"))), r;
|
|
3325
|
+
}
|
|
3326
|
+
case "glow": {
|
|
3327
|
+
const r = {
|
|
3328
|
+
type: i.Type.Glow,
|
|
3329
|
+
color: this.processAdjColor(e, t)
|
|
3330
|
+
};
|
|
3331
|
+
return t.hasAttribute("rad") && (r.radius = Ye(t.getAttribute("rad"))), r;
|
|
3332
|
+
}
|
|
3333
|
+
case "softEdge": {
|
|
3334
|
+
const e = { type: i.Type.SoftEdge };
|
|
3335
|
+
return t.hasAttribute("rad") && (e.radius = Ye(t.getAttribute("rad"))), e;
|
|
3336
|
+
}
|
|
3337
|
+
case "reflection": {
|
|
3338
|
+
const e = { type: i.Type.Reflection };
|
|
3339
|
+
return t.hasAttribute("blurRad") && (e.blur = Ye(t.getAttribute("blurRad"))), t.hasAttribute("dist") && (e.distance = Ye(t.getAttribute("dist"))), t.hasAttribute("dir") && (e.angle = je(t.getAttribute("dir"))), t.hasAttribute("fadeDir") && (e.fadeAngle = je(t.getAttribute("fadeDir"))), t.hasAttribute("stA") && (e.startAlpha = Ke(t.getAttribute("stA"))), t.hasAttribute("stPos") && (e.startPosition = Ke(t.getAttribute("stPos"))), t.hasAttribute("endA") && (e.endAlpha = Ke(t.getAttribute("endA"))), t.hasAttribute("endPos") && (e.endPosition = Ke(t.getAttribute("endPos"))), t.hasAttribute("sx") && (e.scaleX = Ke(t.getAttribute("sx"))), t.hasAttribute("sy") && (e.scaleY = Ke(t.getAttribute("sy"))), t.hasAttribute("kx") && (e.skewX = je(t.getAttribute("kx"))), t.hasAttribute("ky") && (e.skewY = je(t.getAttribute("ky"))), t.hasAttribute("algn") && (e.alignment = t.getAttribute("algn")), t.hasAttribute("rotWithShape") && (e.isRotatedWithShape = qe(t.getAttribute("rotWithShape"))), e;
|
|
3340
|
+
}
|
|
3341
|
+
default: return;
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
getFill(e, t) {
|
|
3345
|
+
if (e.evaluate("noFill", t)) return { type: l.Type.None };
|
|
3346
|
+
const r = e.evaluate("solidFill", t);
|
|
3347
|
+
if (r) {
|
|
3348
|
+
const t = this.processAdjColor(e, r);
|
|
3349
|
+
if (t) return {
|
|
3350
|
+
type: l.Type.Solid,
|
|
3351
|
+
color: t
|
|
3352
|
+
};
|
|
3353
|
+
}
|
|
3354
|
+
const n = e.evaluate("gradFill", t);
|
|
3355
|
+
if (n) return this.processGradFill(e, n);
|
|
3356
|
+
const a = e.evaluate("pattFill", t);
|
|
3357
|
+
if (a) return this.processPatternFill(e, a);
|
|
3358
|
+
const o = e.evaluate("blipFill", t);
|
|
3359
|
+
return o ? this.processImageFill(e, o) : null;
|
|
3360
|
+
}
|
|
3361
|
+
processGradFill(e, t) {
|
|
3362
|
+
const r = { type: l.Type.Gradient };
|
|
3363
|
+
t.hasAttribute("rotWithShape") && (r.isRotatedWithShape = "1" === t.getAttribute("rotWithShape"));
|
|
3364
|
+
const n = e.evaluate("lin", t);
|
|
3365
|
+
n && (r.gradientType = l.GradientType.Linear, n.hasAttribute("ang") && (r.angle = je(n.getAttribute("ang"))), n.hasAttribute("scaled") && (r.scaled = qe(n.getAttribute("scaled"))));
|
|
3366
|
+
const a = {};
|
|
3367
|
+
t.hasAttribute("flip") && (a.mirror = t.getAttribute("flip")), Object.keys(a).length > 0 && (r.tile = a);
|
|
3368
|
+
const o = e.evaluate("path", t);
|
|
3369
|
+
if (o) {
|
|
3370
|
+
o.hasAttribute("path") && (r.gradientType = cn(o.getAttribute("path")));
|
|
3371
|
+
const t = e.evaluate("fillToRect", o);
|
|
3372
|
+
t && (r.focus = this.getRect(t));
|
|
3373
|
+
}
|
|
3374
|
+
const s = e.evaluate("tileRect", t);
|
|
3375
|
+
s && (r.tile || (r.tile = {}), r.tile.bounds = this.getRect(s));
|
|
3376
|
+
const i = [], c = e.evaluate("gsLst/gs", t), u = c ? c.length : 0;
|
|
3377
|
+
for (let t = 0; t < u; t++) {
|
|
3378
|
+
const r = c.item(t), n = {
|
|
3379
|
+
offset: Ke(r.getAttribute("pos") ?? ""),
|
|
3380
|
+
color: this.processAdjColor(e, r)
|
|
3381
|
+
};
|
|
3382
|
+
i.push(n);
|
|
3383
|
+
}
|
|
3384
|
+
return i.length > 0 && (r.stops = i), r;
|
|
3385
|
+
}
|
|
3386
|
+
getRect(e) {
|
|
3387
|
+
const t = {};
|
|
3388
|
+
return e.hasAttribute("t") && (t.t = Ke(e.getAttribute("t"))), e.hasAttribute("l") && (t.l = Ke(e.getAttribute("l"))), e.hasAttribute("b") && (t.b = Ke(e.getAttribute("b"))), e.hasAttribute("r") && (t.r = Ke(e.getAttribute("r"))), 0 === Object.keys(t).length ? null : t;
|
|
3389
|
+
}
|
|
3390
|
+
processImageFill(e, t) {
|
|
3391
|
+
const r = { type: l.Type.Image };
|
|
3392
|
+
if (t.hasAttribute("rotWithShape") && (r.isRotatedWithShape = qe(t.getAttribute("rotWithShape"))), t.hasAttribute("dpi")) {
|
|
3393
|
+
const e = parseFloat(t.getAttribute("dpi"));
|
|
3394
|
+
isNaN(e) || (r.dpi = e);
|
|
3395
|
+
}
|
|
3396
|
+
const n = e.evaluate("blip", t);
|
|
3397
|
+
if (n) {
|
|
3398
|
+
const t = n.getAttribute("r:embed") ?? n.getAttribute("embed") ?? n.getAttribute("r:link") ?? n.getAttribute("link"), a = t ? e.getRef(t, !0) : null;
|
|
3399
|
+
"number" == typeof a ? r.resId = a : e.warn("An image fill names no image; the shape is filled with nothing.", { onceKey: "xlsx.drawing.imageFill.noRel" }), n.hasAttribute("cstate") && (r.compressionState = n.getAttribute("cstate"));
|
|
3400
|
+
const o = n.childNodes;
|
|
3401
|
+
for (let t = 0; t < o.length; t++) {
|
|
3402
|
+
const n = o.item(t);
|
|
3403
|
+
if (1 === n.nodeType) if ("extLst" === n.localName) {
|
|
3404
|
+
const t = e.serializeElement(n);
|
|
3405
|
+
t && (r.extLst = t);
|
|
3406
|
+
} else e.warn(`An image fill applies an effect to its image (${n.localName}), which is not modeled; it was not imported.`, { onceKey: "xlsx.drawing.imageFill.blipEffect" });
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
const a = e.evaluate("srcRect", t);
|
|
3410
|
+
a && (r.sourceRect = this.getRectInsets(a));
|
|
3411
|
+
const o = e.evaluate("stretch", t);
|
|
3412
|
+
if (o) {
|
|
3413
|
+
const t = e.evaluate("fillRect", o);
|
|
3414
|
+
r.stretch = t ? this.getRectInsets(t) : {};
|
|
3415
|
+
}
|
|
3416
|
+
const s = e.evaluate("tile", t);
|
|
3417
|
+
if (s) {
|
|
3418
|
+
const e = {};
|
|
3419
|
+
s.hasAttribute("tx") && (e.offsetX = Xe(s.getAttribute("tx")) ?? 0), s.hasAttribute("ty") && (e.offsetY = Xe(s.getAttribute("ty")) ?? 0), s.hasAttribute("sx") && (e.scaleX = Ke(s.getAttribute("sx"))), s.hasAttribute("sy") && (e.scaleY = Ke(s.getAttribute("sy"))), s.hasAttribute("flip") && (e.flip = s.getAttribute("flip")), s.hasAttribute("algn") && (e.alignment = s.getAttribute("algn")), r.tile = e;
|
|
3420
|
+
}
|
|
3421
|
+
return r;
|
|
3422
|
+
}
|
|
3423
|
+
getRectInsets(e) {
|
|
3424
|
+
const t = {};
|
|
3425
|
+
for (const [r, n] of [
|
|
3426
|
+
["l", "left"],
|
|
3427
|
+
["t", "top"],
|
|
3428
|
+
["r", "right"],
|
|
3429
|
+
["b", "bottom"]
|
|
3430
|
+
]) e.hasAttribute(r) && (t[n] = Ke(e.getAttribute(r)));
|
|
3431
|
+
return t;
|
|
3432
|
+
}
|
|
3433
|
+
processPatternFill(e, t) {
|
|
3434
|
+
const r = { type: l.Type.Pattern };
|
|
3435
|
+
r.patternType = t.getAttribute("prst");
|
|
3436
|
+
const n = e.evaluate("bgClr", t);
|
|
3437
|
+
if (n) {
|
|
3438
|
+
const t = this.processAdjColor(e, n);
|
|
3439
|
+
t && (r.background = t);
|
|
3440
|
+
}
|
|
3441
|
+
const a = e.evaluate("fgClr", t);
|
|
3442
|
+
if (a) {
|
|
3443
|
+
let t = this.processAdjColor(e, a);
|
|
3444
|
+
t && (r.foreground = t);
|
|
3445
|
+
}
|
|
3446
|
+
return r;
|
|
3447
|
+
}
|
|
3448
|
+
processAdjColor(e, t) {
|
|
3449
|
+
const r = e.evaluate("hslClr", t);
|
|
3450
|
+
if (r) return this.processHslClr(e, r);
|
|
3451
|
+
const n = e.evaluate("prstClr", t);
|
|
3452
|
+
if (n) return this.processClrWithValAttribute(e, n);
|
|
3453
|
+
const a = e.evaluate("schemeClr", t);
|
|
3454
|
+
if (a) return this.processClrWithValAttribute(e, a);
|
|
3455
|
+
const o = e.evaluate("sysClr", t);
|
|
3456
|
+
if (o) {
|
|
3457
|
+
let t = this.processClrWithValAttribute(e, o);
|
|
3458
|
+
const r = o.getAttribute("lastClr");
|
|
3459
|
+
return t && r && (t += ` lastClr ${r}`), t;
|
|
3460
|
+
}
|
|
3461
|
+
const s = e.evaluate("scrgbClr", t);
|
|
3462
|
+
if (s) return this.processScrgbClrElement(e, s);
|
|
3463
|
+
const i = e.evaluate("srgbClr", t);
|
|
3464
|
+
return i ? this.processSrgbClrElement(e, i) : null;
|
|
3465
|
+
}
|
|
3466
|
+
processScrgbClrElement(e, t) {
|
|
3467
|
+
let r = "lrgb(" + Ke(t.getAttribute("r") ?? "") + "," + Ke(t.getAttribute("g") ?? "") + "," + Ke(t.getAttribute("b") ?? "") + ")";
|
|
3468
|
+
return r += this.processAdjustments(e, t), r;
|
|
3469
|
+
}
|
|
3470
|
+
processSrgbClrElement(e, t) {
|
|
3471
|
+
let r = t.getAttribute("val");
|
|
3472
|
+
return r += this.processAdjustments(e, t), r;
|
|
3473
|
+
}
|
|
3474
|
+
processHslClr(e, t) {
|
|
3475
|
+
let r = "hsl(" + je(t.getAttribute("hue") ?? "") + "," + Ke(t.getAttribute("sat") ?? "") + "," + Ke(t.getAttribute("lum") ?? "") + ")";
|
|
3476
|
+
return r += this.processAdjustments(e, t), r;
|
|
3477
|
+
}
|
|
3478
|
+
processClrWithValAttribute(e, t) {
|
|
3479
|
+
const r = t.getAttribute("val");
|
|
3480
|
+
if (!r) return null;
|
|
3481
|
+
let n = r;
|
|
3482
|
+
return n += this.processAdjustments(e, t), n;
|
|
3483
|
+
}
|
|
3484
|
+
processAdjustments(e, t) {
|
|
3485
|
+
let r = "";
|
|
3486
|
+
const n = t.childNodes, a = n.length;
|
|
3487
|
+
for (let t = 0; t < a; t++) {
|
|
3488
|
+
const a = n.item(t);
|
|
3489
|
+
if (1 === a.nodeType) {
|
|
3490
|
+
let t = a.localName;
|
|
3491
|
+
r += "hue" === t || "hueOff" === t || "hueMod" === t ? this.processAdjustmentElement(e, a, t, 6e4) : "gray" === t || "comp" === t || "inv" === t || "gamma" === t || "invGamma" === t ? this.processAdjustmentElement(e, a, t, 1) : "alpha" === t || "alphaOff" === t || "alphaMod" === t ? this.processAdjustmentElement(e, a, t, 1e5) : this.processAdjustmentElement(e, a, t);
|
|
3492
|
+
}
|
|
3493
|
+
}
|
|
3494
|
+
return r;
|
|
3495
|
+
}
|
|
3496
|
+
processAdjustmentElement(e, t, r, n = 1e3) {
|
|
3497
|
+
const a = t.getAttribute("val");
|
|
3498
|
+
return a ? ` ${r} ${!a || parseFloat(a) / n}` : ` ${r}`;
|
|
3499
|
+
}
|
|
3500
|
+
}, cn = (e) => "circle" === e ? "radial" : e, un = (e) => {
|
|
3501
|
+
if ("rnd" === e) return "round";
|
|
3502
|
+
if ("flat" === e) return "butt";
|
|
3503
|
+
if ("sq" === e) return "square";
|
|
3504
|
+
throw new Error("Invalid lineCap type: " + e);
|
|
3505
|
+
}, pn = /\/(?:\w+:)?(?:sp|cxnSp)\/(?:\w+:)?spPr$/, En = /\/(?:\w+:)?grpSp\//, fn = class extends ln {
|
|
3506
|
+
visit(e, t, r) {
|
|
3507
|
+
try {
|
|
3508
|
+
const n = e.evaluate("xfrm", t);
|
|
3509
|
+
if (n) {
|
|
3510
|
+
Yr(n, r), "1" === n.getAttribute("flipH") && (r.flipH = !0), "1" === n.getAttribute("flipV") && (r.flipV = !0);
|
|
3511
|
+
const t = {
|
|
3512
|
+
x: 0,
|
|
3513
|
+
y: 0,
|
|
3514
|
+
width: 0,
|
|
3515
|
+
height: 0
|
|
3516
|
+
}, a = e.evaluate("off", n);
|
|
3517
|
+
a && (t.x = Xe(a.getAttribute("x")) ?? 0, t.y = Xe(a.getAttribute("y")) ?? 0);
|
|
3518
|
+
const o = e.evaluate("ext", n);
|
|
3519
|
+
a && (t.width = Xe(o.getAttribute("cx")) ?? 0, t.height = Xe(o.getAttribute("cy")) ?? 0);
|
|
3520
|
+
const s = e.getPath();
|
|
3521
|
+
pn.test(s) && !En.test(s) || (r.bounds = t);
|
|
3522
|
+
}
|
|
3523
|
+
const a = e.evaluate("prstGeom", t);
|
|
3524
|
+
if (a?.hasAttribute("prst")) {
|
|
3525
|
+
const t = a.getAttribute("prst");
|
|
3526
|
+
"rect" !== t && (r.geometry = t);
|
|
3527
|
+
const n = e.evaluate("avLst/gd", a), o = n ? "tagName" in n ? [n] : Array.from(n) : [];
|
|
3528
|
+
let s;
|
|
3529
|
+
for (const e of o) {
|
|
3530
|
+
const t = e.getAttribute("name"), r = /^\s*val\s+(-?\d+(?:\.\d+)?)\s*$/.exec(e.getAttribute("fmla") ?? "");
|
|
3531
|
+
t && r && ((s ??= {})[t] = Number(r[1]));
|
|
3532
|
+
}
|
|
3533
|
+
s && (r.adjustments = s);
|
|
3534
|
+
} else {
|
|
3535
|
+
const n = e.evaluate("custGeom", t);
|
|
3536
|
+
n && (r.geometry = ((e) => {
|
|
3537
|
+
const t = { paths: [] }, r = en(Jr(e, "avLst"), "gd").map(tn);
|
|
3538
|
+
r.length && (t.av = r);
|
|
3539
|
+
const n = en(Jr(e, "gdLst"), "gd").map(tn);
|
|
3540
|
+
n.length && (t.gd = n);
|
|
3541
|
+
const a = Jr(e, "ahLst"), o = a ? Zr(a).map((e) => {
|
|
3542
|
+
const [t, r] = rn(e);
|
|
3543
|
+
return "ahXY" === e.localName ? `xy ${nn(e, "gdRefX")} ${nn(e, "gdRefY")} ${t} ${r}${an(e, [
|
|
3544
|
+
"minX",
|
|
3545
|
+
"maxX",
|
|
3546
|
+
"minY",
|
|
3547
|
+
"maxY"
|
|
3548
|
+
])}` : "ahPolar" === e.localName ? `polar ${nn(e, "gdRefR")} ${nn(e, "gdRefAng")} ${t} ${r}${an(e, [
|
|
3549
|
+
"minR",
|
|
3550
|
+
"maxR",
|
|
3551
|
+
"minAng",
|
|
3552
|
+
"maxAng"
|
|
3553
|
+
])}` : null;
|
|
3554
|
+
}).filter((e) => null !== e) : [];
|
|
3555
|
+
o.length && (t.ah = o);
|
|
3556
|
+
const s = en(Jr(e, "cxnLst"), "cxn").map((e) => {
|
|
3557
|
+
const [t, r] = rn(e);
|
|
3558
|
+
return `${e.getAttribute("ang") ?? "0"} ${t} ${r}`;
|
|
3559
|
+
});
|
|
3560
|
+
s.length && (t.cxn = s);
|
|
3561
|
+
const i = Jr(e, "rect");
|
|
3562
|
+
return i && (t.rect = `${nn(i, "l")} ${nn(i, "t")} ${nn(i, "r")} ${nn(i, "b")}`), t.paths = en(Jr(e, "pathLst"), "path").map(sn), t;
|
|
3563
|
+
})(n));
|
|
3564
|
+
}
|
|
3565
|
+
const o = this.getFill(e, t);
|
|
3566
|
+
o && Object.keys(o).length > 0 && (r.fill = o);
|
|
3567
|
+
const s = this.getStroke(e, t);
|
|
3568
|
+
s && Object.keys(s).length > 0 && (r.stroke = s);
|
|
3569
|
+
const i = this.getEffects(e, t);
|
|
3570
|
+
i ? r.effects = i : void 0 === i && e.warn("A shape states an effect that is not modeled; its effects were not imported.", { onceKey: "xlsx.shape.effects.unmodeled" });
|
|
3571
|
+
const l = e.evaluate("scene3d", t), c = l ? e.serializeElement(l) : null;
|
|
3572
|
+
c && (r.scene3d = c);
|
|
3573
|
+
const u = e.evaluate("sp3d", t), p = u ? e.serializeElement(u) : null;
|
|
3574
|
+
p && (r.shape3d = p);
|
|
3575
|
+
const E = e.evaluate("extLst", t), f = E ? e.serializeElement(E) : null;
|
|
3576
|
+
return f && (r.extLst = {
|
|
3577
|
+
...r.extLst,
|
|
3578
|
+
properties: f
|
|
3579
|
+
}), r;
|
|
3580
|
+
} catch (t) {
|
|
3581
|
+
e.warn(`Unable to read shape properties: ${t?.message ?? t}`, { onceKey: "xlsx.shape.unreadable" });
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
}, An = [
|
|
3585
|
+
["latin", "font"],
|
|
3586
|
+
["ea", "eastAsianFont"],
|
|
3587
|
+
["cs", "complexScriptFont"],
|
|
3588
|
+
["sym", "symbolFont"]
|
|
3589
|
+
], Tn = (e) => {
|
|
3590
|
+
const t = {}, r = e.getAttribute("typeface");
|
|
3591
|
+
r && (r.startsWith("+mj") ? t.scheme = c.Scheme.Major : r.startsWith("+mn") ? t.scheme = c.Scheme.Minor : t.family = r);
|
|
3592
|
+
const n = e.getAttribute("panose");
|
|
3593
|
+
n && (t.panose = n, t.fallbacks = [c.getPanoseFallback(n)]), e.hasAttribute("pitchFamily") && (t.pitch = e.getAttribute("pitchFamily"));
|
|
3594
|
+
const a = e.hasAttribute("charset") ? ((e) => {
|
|
3595
|
+
const t = parseInt(e, 10);
|
|
3596
|
+
return Number.isNaN(t) ? void 0 : (t % 256 + 256) % 256;
|
|
3597
|
+
})(e.getAttribute("charset")) : void 0;
|
|
3598
|
+
return void 0 !== a && (t.charset = a), Object.keys(t).length > 0 ? t : void 0;
|
|
3599
|
+
}, Sn = (e, t) => {
|
|
3600
|
+
const r = {}, n = t.getAttribute("r:id") ?? t.getAttribute("id");
|
|
3601
|
+
if (n) {
|
|
3602
|
+
const t = e.getRelationships().get(n);
|
|
3603
|
+
if (t?.target?.startsWith("#")) r.address = t.target;
|
|
3604
|
+
else {
|
|
3605
|
+
const t = e.getRef(n);
|
|
3606
|
+
"string" == typeof t && (r.address = t);
|
|
3607
|
+
}
|
|
3608
|
+
}
|
|
3609
|
+
return t.hasAttribute("tooltip") && (r.screenTip = t.getAttribute("tooltip")), t.hasAttribute("tgtFrame") && (r.target = t.getAttribute("tgtFrame")), t.hasAttribute("action") && (r.action = t.getAttribute("action")), t.hasAttribute("history") && (r.history = qe(t.getAttribute("history"))), r;
|
|
3610
|
+
}, Rn = class extends ln {
|
|
3611
|
+
constructor(e = "text") {
|
|
3612
|
+
super(), this._jsonKey = e;
|
|
3613
|
+
}
|
|
3614
|
+
getTextPath() {
|
|
3615
|
+
return this._jsonKey;
|
|
3616
|
+
}
|
|
3617
|
+
visit(e, t, r) {
|
|
3618
|
+
let n = e.getFromPath(r, this.getTextPath());
|
|
3619
|
+
return n || (n = {}), this.parseTextElement(e, t, n, !1), Object.keys(n).length > 0 && e.setToPath(r, this.getTextPath(), n), r;
|
|
3620
|
+
}
|
|
3621
|
+
parseTextElement(e, t, r, n) {
|
|
3622
|
+
const a = e.evaluate("p/pPr/defRPr", t) ?? e.evaluate("defRPr", t), o = void 0 !== a?.length ? a.item(0) : a;
|
|
3623
|
+
o && (this.parseTextProperties(e, o, r), new fn().visit(e, o, r));
|
|
3624
|
+
const s = r.runs ?? [], i = e.evaluate("p/r", t) ?? e.evaluate("r", t), l = (t) => {
|
|
3625
|
+
const r = {};
|
|
3626
|
+
let n = e.evaluate("t", t);
|
|
3627
|
+
const a = e.evaluate("rPr", t);
|
|
3628
|
+
a && this.parseTextProperties(e, a, r), n && n.firstChild ? r.text = n.firstChild.textContent ?? "" : t.textContent && (r.text = t.textContent ?? ""), Object.keys(r).length > 0 && s.push(r);
|
|
3629
|
+
};
|
|
3630
|
+
if (void 0 !== i?.length) for (let e = 0; i && e < i.length; e++) l(i.item(e));
|
|
3631
|
+
else l(i || t);
|
|
3632
|
+
s.length > 0 && (r.runs = s);
|
|
3633
|
+
const c = e.evaluate("bodyPr", t);
|
|
3634
|
+
c && Yr(c, r);
|
|
3635
|
+
}
|
|
3636
|
+
parseTextProperties(e, t, r) {
|
|
3637
|
+
if (!t) return;
|
|
3638
|
+
t.hasAttribute("sz") && (r.size = parseFloat(t.getAttribute("sz")) / 100), t.hasAttribute("b") && (r.weight = "1" === t.getAttribute("b") ? 700 : 400), t.hasAttribute("i") && (r.style = "1" === t.getAttribute("i") ? c.Style.Italic : c.Style.Normal), t.hasAttribute("u") && (r.underline = wr.read(t.getAttribute("u"))), t.hasAttribute("strike") && (r.strike = kr.read(t.getAttribute("strike"))), t.hasAttribute("lang") && (r.language = t.getAttribute("lang")), t.hasAttribute("altLang") && (r.alternateLanguage = t.getAttribute("altLang")), t.hasAttribute("kern") && (r.kerning = parseFloat(t.getAttribute("kern")) / 100), t.hasAttribute("spc") && (r.letterSpacing = parseFloat(t.getAttribute("spc")) / 100), t.hasAttribute("baseline") && (r.baseline = Ke(t.getAttribute("baseline"))), t.hasAttribute("cap") && (r.capitals = t.getAttribute("cap")), t.hasAttribute("normalizeH") && (r.normalizeHeight = qe(t.getAttribute("normalizeH")));
|
|
3639
|
+
const n = this.getFill(e, t);
|
|
3640
|
+
n && Object.keys(n).length > 0 && (r.color = n);
|
|
3641
|
+
const a = e.evaluate("ln", t);
|
|
3642
|
+
if (a) {
|
|
3643
|
+
const t = this.parseLn(e, a);
|
|
3644
|
+
t && Object.keys(t).length > 0 && (r.outline = t);
|
|
3645
|
+
}
|
|
3646
|
+
const o = this.getEffects(e, t);
|
|
3647
|
+
o && o.length > 0 && (r.effects = o);
|
|
3648
|
+
const s = e.evaluate("highlight", t);
|
|
3649
|
+
if (s) {
|
|
3650
|
+
const t = this.processAdjColor(e, s);
|
|
3651
|
+
t && (r.highlight = t);
|
|
3652
|
+
}
|
|
3653
|
+
const i = e.evaluate("hlinkClick", t);
|
|
3654
|
+
i && (r.hyperlink = this.readHyperlink(e, i));
|
|
3655
|
+
for (const [n, a] of An) {
|
|
3656
|
+
const o = e.evaluate(n, t);
|
|
3657
|
+
if (!o) continue;
|
|
3658
|
+
const s = Tn(o);
|
|
3659
|
+
s && (r[a] = s);
|
|
3660
|
+
}
|
|
3661
|
+
}
|
|
3662
|
+
readHyperlink(e, t) {
|
|
3663
|
+
return Sn(e, t);
|
|
3664
|
+
}
|
|
3665
|
+
}, dn = /* @__PURE__ */ new Set([
|
|
3666
|
+
"pPr",
|
|
3667
|
+
"rPr",
|
|
3668
|
+
"endParaRPr",
|
|
3669
|
+
"bodyPr",
|
|
3670
|
+
"lstStyle"
|
|
3671
|
+
]), gn = (e) => {
|
|
3672
|
+
const t = [], r = e.childNodes;
|
|
3673
|
+
for (let e = 0; e < r.length; e++) {
|
|
3674
|
+
const n = r.item(e);
|
|
3675
|
+
1 === n.nodeType && t.push(n);
|
|
3676
|
+
}
|
|
3677
|
+
return t;
|
|
3678
|
+
}, mn = (e, t) => gn(e).find((e) => e.localName === t), On = (e) => e.runs.map((e) => e.text ?? "").join(""), hn = (e) => {
|
|
3679
|
+
const t = e.paragraphs.map(On);
|
|
3680
|
+
let r = 0, n = t.length;
|
|
3681
|
+
for (; r < n && "" === t[r].trim();) r++;
|
|
3682
|
+
for (; n > r && "" === t[n - 1].trim();) n--;
|
|
3683
|
+
return t.slice(r, n).join("\n");
|
|
3684
|
+
}, In = {
|
|
3685
|
+
anchor: E.VerticalAlignment.Top,
|
|
3686
|
+
anchorCenter: !1,
|
|
3687
|
+
wrap: "square",
|
|
3688
|
+
vertical: E.WritingMode.Horizontal,
|
|
3689
|
+
upright: !1,
|
|
3690
|
+
rightToLeftColumns: !1,
|
|
3691
|
+
columns: 1,
|
|
3692
|
+
columnSpacing: 0,
|
|
3693
|
+
fromWordArt: !1,
|
|
3694
|
+
forceAntiAlias: !1,
|
|
3695
|
+
compatibleLineSpacing: !1,
|
|
3696
|
+
spaceFirstLastParagraph: !1,
|
|
3697
|
+
autoFit: E.Autofit.None
|
|
3698
|
+
}, Nn = Object.freeze({
|
|
3699
|
+
verticalOverflow: E.Overflow.Visible,
|
|
3700
|
+
horizontalOverflow: E.Overflow.Visible,
|
|
3701
|
+
size: 18
|
|
3702
|
+
}), Cn = {
|
|
3703
|
+
left: Xe("91440") ?? 0,
|
|
3704
|
+
top: Xe("45720") ?? 0,
|
|
3705
|
+
right: Xe("91440") ?? 0,
|
|
3706
|
+
bottom: Xe("45720") ?? 0
|
|
3707
|
+
}, Ln = {
|
|
3708
|
+
align: p.ParagraphAlignment.Left,
|
|
3709
|
+
level: 0,
|
|
3710
|
+
marginLeft: 0,
|
|
3711
|
+
marginRight: 0,
|
|
3712
|
+
indent: 0,
|
|
3713
|
+
rightToLeft: !1,
|
|
3714
|
+
eastAsianLineBreak: !0,
|
|
3715
|
+
latinLineBreak: !1,
|
|
3716
|
+
hangingPunctuation: !0
|
|
3717
|
+
}, yn = {
|
|
3718
|
+
weight: 400,
|
|
3719
|
+
style: c.Style.Normal,
|
|
3720
|
+
underline: p.UnderlineStyle.None,
|
|
3721
|
+
strike: p.StrikeStyle.None,
|
|
3722
|
+
kerning: 0,
|
|
3723
|
+
letterSpacing: 0,
|
|
3724
|
+
baseline: 0,
|
|
3725
|
+
capitals: p.SmallCaps.None,
|
|
3726
|
+
normalizeHeight: !1
|
|
3727
|
+
}, bn = (e, t) => {
|
|
3728
|
+
for (const r of Object.keys(t)) e[r] === t[r] && delete e[r];
|
|
3729
|
+
}, xn = (e, t, r) => {
|
|
3730
|
+
if (void 0 !== f.inheritedTextSize(e, t)) return;
|
|
3731
|
+
const n = r.size ?? Nn.size;
|
|
3732
|
+
n === f.TEXT_DEFAULTS.size ? delete r.size : r.size = n;
|
|
3733
|
+
}, vn = class extends Rn {
|
|
3734
|
+
visit(e, t, r) {
|
|
3735
|
+
return t ? (r.text = this.readTextBody(e, t), r) : r;
|
|
3736
|
+
}
|
|
3737
|
+
readTextBody(e, t) {
|
|
3738
|
+
const r = [];
|
|
3739
|
+
for (const n of gn(t)) "p" === n.localName && r.push(this.readParagraph(e, n));
|
|
3740
|
+
const n = { paragraphs: r }, a = mn(t, "bodyPr");
|
|
3741
|
+
if (a) {
|
|
3742
|
+
Yr(a, n);
|
|
3743
|
+
const t = Mn(a), r = e ? mn(a, "extLst") : null, o = r ? e.serializeElement(r) : null;
|
|
3744
|
+
o && (t.extLst = o), Object.keys(t).length > 0 && (n.body = t);
|
|
3745
|
+
}
|
|
3746
|
+
const o = mn(t, "lstStyle");
|
|
3747
|
+
if (o && e) {
|
|
3748
|
+
const t = this.readListStyle(e, o);
|
|
3749
|
+
t && (n.listStyle = t);
|
|
3750
|
+
}
|
|
3751
|
+
return ((e) => {
|
|
3752
|
+
0 === e.rotation && delete e.rotation;
|
|
3753
|
+
for (const t of ["verticalOverflow", "horizontalOverflow"]) {
|
|
3754
|
+
const r = e.body?.[t] ?? Nn[t];
|
|
3755
|
+
r === f.TEXT_DEFAULTS[t] ? e.body && delete e.body[t] : Object.assign(e.body ??= {}, { [t]: r });
|
|
3756
|
+
}
|
|
3757
|
+
for (const t of e.paragraphs) {
|
|
3758
|
+
for (const r of t.runs) "\n" !== r.text && xn(e, t, r);
|
|
3759
|
+
0 === t.runs.length && (t.endRun ??= {}), t.endRun && xn(e, t, t.endRun);
|
|
3760
|
+
}
|
|
3761
|
+
const t = e.body;
|
|
3762
|
+
t && (bn(t, In), t.insets && (bn(t.insets, Cn), 0 === Object.keys(t.insets).length && delete t.insets), 0 === Object.keys(t).length && delete e.body);
|
|
3763
|
+
for (const t of e.paragraphs) {
|
|
3764
|
+
if (!e.listStyle && (bn(t, Ln), !t.defaultRun)) {
|
|
3765
|
+
for (const e of t.runs) bn(e, yn);
|
|
3766
|
+
t.endRun && bn(t.endRun, yn);
|
|
3767
|
+
}
|
|
3768
|
+
t.endRun && 0 === Object.keys(t.endRun).length && delete t.endRun;
|
|
3769
|
+
}
|
|
3770
|
+
})(n), n;
|
|
3771
|
+
}
|
|
3772
|
+
readParagraph(e, t) {
|
|
3773
|
+
const r = { runs: [] }, n = (t) => {
|
|
3774
|
+
const a = t.localName;
|
|
3775
|
+
if ("pPr" === a) return void Object.assign(r, this.readParagraphProperties(e, t));
|
|
3776
|
+
if ("endParaRPr" === a) {
|
|
3777
|
+
const n = {};
|
|
3778
|
+
e && this.parseTextProperties(e, t, n), Object.keys(n).length > 0 && (r.endRun = n);
|
|
3779
|
+
return;
|
|
3780
|
+
}
|
|
3781
|
+
if (dn.has(a)) return;
|
|
3782
|
+
if ("br" === a) return void r.runs.push({ text: "\n" });
|
|
3783
|
+
if ("r" === a || "fld" === a) {
|
|
3784
|
+
const n = { text: "" };
|
|
3785
|
+
for (const r of gn(t)) "rPr" === r.localName ? e && this.parseTextProperties(e, r, n) : "t" === r.localName && (n.text += r.textContent ?? "");
|
|
3786
|
+
if ("fld" === a) {
|
|
3787
|
+
const e = { id: t.getAttribute("id") ?? "" }, r = t.getAttribute("type");
|
|
3788
|
+
r && (e.type = r), n.field = e;
|
|
3789
|
+
}
|
|
3790
|
+
r.runs.push(n);
|
|
3791
|
+
return;
|
|
3792
|
+
}
|
|
3793
|
+
if ("t" === a) return void r.runs.push({ text: t.textContent ?? "" });
|
|
3794
|
+
const o = "AlternateContent" === a ? ((e) => {
|
|
3795
|
+
const t = mn(e, "Fallback") ?? mn(e, "Choice");
|
|
3796
|
+
return t ? gn(t) : [];
|
|
3797
|
+
})(t) : gn(t);
|
|
3798
|
+
for (const e of o) n(e);
|
|
3799
|
+
};
|
|
3800
|
+
for (const e of gn(t)) n(e);
|
|
3801
|
+
return r;
|
|
3802
|
+
}
|
|
3803
|
+
readParagraphProperties(e, t) {
|
|
3804
|
+
const r = {}, n = (e, n) => {
|
|
3805
|
+
const a = t.getAttribute(e);
|
|
3806
|
+
null !== a && (r[n] = Xe(a) ?? 0);
|
|
3807
|
+
};
|
|
3808
|
+
n("marL", "marginLeft"), n("marR", "marginRight"), n("indent", "indent"), n("defTabSz", "defaultTabSize"), t.hasAttribute("lvl") && (r.level = parseInt(t.getAttribute("lvl"), 10)), t.hasAttribute("algn") && (r.align = Fr.read(t.getAttribute("algn"))), t.hasAttribute("fontAlgn") && (r.fontAlign = Br.read(t.getAttribute("fontAlgn")));
|
|
3809
|
+
const a = (e, n) => {
|
|
3810
|
+
const a = t.getAttribute(e);
|
|
3811
|
+
null !== a && (r[n] = qe(a));
|
|
3812
|
+
};
|
|
3813
|
+
let o;
|
|
3814
|
+
a("rtl", "rightToLeft"), a("eaLnBrk", "eastAsianLineBreak"), a("latinLnBrk", "latinLineBreak"), a("hangingPunct", "hangingPunctuation");
|
|
3815
|
+
const s = () => o ??= {};
|
|
3816
|
+
for (const n of gn(t)) switch (n.localName) {
|
|
3817
|
+
case "lnSpc":
|
|
3818
|
+
r.lineSpacing = Dn(n);
|
|
3819
|
+
break;
|
|
3820
|
+
case "spcBef":
|
|
3821
|
+
r.spaceBefore = Dn(n);
|
|
3822
|
+
break;
|
|
3823
|
+
case "spcAft":
|
|
3824
|
+
r.spaceAfter = Dn(n);
|
|
3825
|
+
break;
|
|
3826
|
+
case "buClrTx":
|
|
3827
|
+
s().colorFollowsText = !0;
|
|
3828
|
+
break;
|
|
3829
|
+
case "buClr": {
|
|
3830
|
+
const t = e ? this.processAdjColor(e, n) : null;
|
|
3831
|
+
t && (s().color = t);
|
|
3832
|
+
break;
|
|
3833
|
+
}
|
|
3834
|
+
case "buSzTx":
|
|
3835
|
+
s().sizeFollowsText = !0;
|
|
3836
|
+
break;
|
|
3837
|
+
case "buSzPct":
|
|
3838
|
+
s().size = { percent: Ke(n.getAttribute("val") ?? "0") };
|
|
3839
|
+
break;
|
|
3840
|
+
case "buSzPts":
|
|
3841
|
+
s().size = { points: parseFloat(n.getAttribute("val") ?? "0") / 100 };
|
|
3842
|
+
break;
|
|
3843
|
+
case "buFontTx":
|
|
3844
|
+
s().fontFollowsText = !0;
|
|
3845
|
+
break;
|
|
3846
|
+
case "buFont": {
|
|
3847
|
+
const e = Tn(n);
|
|
3848
|
+
e && (s().font = e);
|
|
3849
|
+
break;
|
|
3850
|
+
}
|
|
3851
|
+
case "buNone":
|
|
3852
|
+
s().type = "none";
|
|
3853
|
+
break;
|
|
3854
|
+
case "buAutoNum": {
|
|
3855
|
+
const e = s();
|
|
3856
|
+
e.type = "auto";
|
|
3857
|
+
const t = n.getAttribute("type");
|
|
3858
|
+
t && (e.autoType = t), n.hasAttribute("startAt") && (e.startAt = parseInt(n.getAttribute("startAt"), 10));
|
|
3859
|
+
break;
|
|
3860
|
+
}
|
|
3861
|
+
case "buChar": {
|
|
3862
|
+
const e = s();
|
|
3863
|
+
e.type = "char", e.char = n.getAttribute("char") ?? "";
|
|
3864
|
+
break;
|
|
3865
|
+
}
|
|
3866
|
+
case "buBlip":
|
|
3867
|
+
s().type = "image";
|
|
3868
|
+
break;
|
|
3869
|
+
case "tabLst": {
|
|
3870
|
+
const e = [];
|
|
3871
|
+
for (const t of gn(n)) {
|
|
3872
|
+
if ("tab" !== t.localName) continue;
|
|
3873
|
+
const r = { position: Xe(t.getAttribute("pos")) ?? 0 }, n = t.getAttribute("algn");
|
|
3874
|
+
n && (r.align = Wr.read(n)), e.push(r);
|
|
3875
|
+
}
|
|
3876
|
+
r.tabs = e;
|
|
3877
|
+
break;
|
|
3878
|
+
}
|
|
3879
|
+
case "defRPr": {
|
|
3880
|
+
if (!e) break;
|
|
3881
|
+
const t = {};
|
|
3882
|
+
this.parseTextProperties(e, n, t), Object.keys(t).length > 0 && (r.defaultRun = t);
|
|
3883
|
+
break;
|
|
3884
|
+
}
|
|
3885
|
+
}
|
|
3886
|
+
return o && (r.bullet = o), r;
|
|
3887
|
+
}
|
|
3888
|
+
readListStyle(e, t) {
|
|
3889
|
+
const r = {};
|
|
3890
|
+
for (const n of gn(t)) {
|
|
3891
|
+
if ("defPPr" === n.localName) {
|
|
3892
|
+
r.default = this.readParagraphProperties(e, n);
|
|
3893
|
+
continue;
|
|
3894
|
+
}
|
|
3895
|
+
const t = /^lvl([1-9])pPr$/.exec(n.localName);
|
|
3896
|
+
t && ((r.levels ??= [])[parseInt(t[1], 10) - 1] = this.readParagraphProperties(e, n));
|
|
3897
|
+
}
|
|
3898
|
+
return r.default || r.levels ? r : void 0;
|
|
3899
|
+
}
|
|
3900
|
+
}, Dn = (e) => {
|
|
3901
|
+
const t = mn(e, "spcPct");
|
|
3902
|
+
if (t) return { percent: Ke(t.getAttribute("val") ?? "0") };
|
|
3903
|
+
const r = mn(e, "spcPts");
|
|
3904
|
+
return r ? { points: parseFloat(r.getAttribute("val") ?? "0") / 100 } : void 0;
|
|
3905
|
+
}, Pn = (e) => {
|
|
3906
|
+
const t = mn(e, "avLst");
|
|
3907
|
+
if (!t) return;
|
|
3908
|
+
let r;
|
|
3909
|
+
for (const e of gn(t)) {
|
|
3910
|
+
if ("gd" !== e.localName) continue;
|
|
3911
|
+
const t = e.getAttribute("name"), n = /^\s*val\s+(-?\d+(?:\.\d+)?)\s*$/.exec(e.getAttribute("fmla") ?? "");
|
|
3912
|
+
t && n && ((r ??= {})[t] = Number(n[1]));
|
|
3913
|
+
}
|
|
3914
|
+
return r;
|
|
3915
|
+
}, Mn = (e) => {
|
|
3916
|
+
const t = {}, r = (t) => e.getAttribute(t), n = (e, n) => {
|
|
3917
|
+
const a = r(e);
|
|
3918
|
+
null !== a && (t[n] = qe(a));
|
|
3919
|
+
};
|
|
3920
|
+
null !== r("anchor") && (t.anchor = Ur.read(r("anchor"))), n("anchorCtr", "anchorCenter"), null !== r("wrap") && (t.wrap = r("wrap"));
|
|
3921
|
+
const a = {};
|
|
3922
|
+
for (const [e, t] of [
|
|
3923
|
+
["lIns", "left"],
|
|
3924
|
+
["tIns", "top"],
|
|
3925
|
+
["rIns", "right"],
|
|
3926
|
+
["bIns", "bottom"]
|
|
3927
|
+
]) {
|
|
3928
|
+
const n = r(e);
|
|
3929
|
+
null !== n && (a[t] = Xe(n) ?? 0);
|
|
3930
|
+
}
|
|
3931
|
+
Object.keys(a).length > 0 && (t.insets = a), null !== r("vert") && (t.vertical = Gr.read(r("vert"))), null !== r("vertOverflow") && (t.verticalOverflow = Vr.read(r("vertOverflow"))), null !== r("horzOverflow") && (t.horizontalOverflow = Vr.read(r("horzOverflow"))), n("upright", "upright"), n("rtlCol", "rightToLeftColumns"), null !== r("numCol") && (t.columns = parseInt(r("numCol"), 10)), null !== r("spcCol") && (t.columnSpacing = Xe(r("spcCol")) ?? 0), n("fromWordArt", "fromWordArt"), n("forceAA", "forceAntiAlias"), n("compatLnSpc", "compatibleLineSpacing"), n("spcFirstLastPara", "spaceFirstLastParagraph");
|
|
3932
|
+
for (const r of gn(e)) switch (r.localName) {
|
|
3933
|
+
case "noAutofit":
|
|
3934
|
+
t.autoFit = E.Autofit.None;
|
|
3935
|
+
break;
|
|
3936
|
+
case "spAutoFit":
|
|
3937
|
+
t.autoFit = E.Autofit.Shape;
|
|
3938
|
+
break;
|
|
3939
|
+
case "normAutofit":
|
|
3940
|
+
t.autoFit = E.Autofit.Normal, r.hasAttribute("fontScale") && (t.fontScale = Ke(r.getAttribute("fontScale"))), r.hasAttribute("lnSpcReduction") && (t.lineSpacingReduction = Ke(r.getAttribute("lnSpcReduction")));
|
|
3941
|
+
break;
|
|
3942
|
+
case "prstTxWarp": {
|
|
3943
|
+
const e = { preset: r.getAttribute("prst") ?? "textNoShape" }, n = Pn(r);
|
|
3944
|
+
n && (e.adjustments = n), t.warp = e;
|
|
3945
|
+
break;
|
|
3946
|
+
}
|
|
3947
|
+
}
|
|
3948
|
+
return t;
|
|
3949
|
+
}, Fn = "application/vnd.ms-excel.controlproperties+xml", Bn = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp", Un = "http://schemas.microsoft.com/office/drawing/2010/main", wn = {
|
|
3950
|
+
Button: "button",
|
|
3951
|
+
CheckBox: "checkBox",
|
|
3952
|
+
Radio: "optionButton",
|
|
3953
|
+
List: "listBox",
|
|
3954
|
+
Drop: "dropDown",
|
|
3955
|
+
Scroll: "scrollBar",
|
|
3956
|
+
Spin: "spinner",
|
|
3957
|
+
GBox: "groupBox",
|
|
3958
|
+
Label: "label",
|
|
3959
|
+
EditBox: "editBox",
|
|
3960
|
+
Dialog: "dialog"
|
|
3961
|
+
}, kn = {};
|
|
3962
|
+
for (const e in wn) kn[wn[e]] = e;
|
|
3963
|
+
var Gn = "formControl", Vn = /* @__PURE__ */ new Set([...Object.values(wn), Gn]), Wn = (e) => void 0 !== e && Vn.has(e), Hn = /* @__PURE__ */ new Set([
|
|
3964
|
+
"Button",
|
|
3965
|
+
"Checkbox",
|
|
3966
|
+
"Radio",
|
|
3967
|
+
"List",
|
|
3968
|
+
"Drop",
|
|
3969
|
+
"Scroll",
|
|
3970
|
+
"Spin",
|
|
3971
|
+
"GBox",
|
|
3972
|
+
"Label",
|
|
3973
|
+
"EditBox",
|
|
3974
|
+
"Dialog"
|
|
3975
|
+
]), $n = {
|
|
3976
|
+
combo: "combo",
|
|
3977
|
+
comboedit: "comboEdit",
|
|
3978
|
+
simple: "simple"
|
|
3979
|
+
}, Yn = {
|
|
3980
|
+
combo: "combo",
|
|
3981
|
+
comboEdit: "comboedit",
|
|
3982
|
+
simple: "simple"
|
|
3983
|
+
}, Xn = /* @__PURE__ */ new Set([
|
|
3984
|
+
"macro",
|
|
3985
|
+
"linkedCell",
|
|
3986
|
+
"listFillRange"
|
|
3987
|
+
]), _n = (e) => "1" === e || "true" === e, Kn = (e) => {
|
|
3988
|
+
if (void 0 === e) return;
|
|
3989
|
+
const t = Number(e);
|
|
3990
|
+
return isNaN(t) ? void 0 : t;
|
|
3991
|
+
}, jn = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3992
|
+
function qn(e, t, r) {
|
|
3993
|
+
const n = {}, a = {};
|
|
3994
|
+
let o;
|
|
3995
|
+
for (const t in e) {
|
|
3996
|
+
const r = e[t];
|
|
3997
|
+
switch (t) {
|
|
3998
|
+
case "objectType":
|
|
3999
|
+
o = r;
|
|
4000
|
+
break;
|
|
4001
|
+
case "checked":
|
|
4002
|
+
"Checked" === r ? n.checked = !0 : "Mixed" === r && (n.mixed = !0);
|
|
4003
|
+
break;
|
|
4004
|
+
case "fmlaLink":
|
|
4005
|
+
n.linkedCell = r;
|
|
4006
|
+
break;
|
|
4007
|
+
case "fmlaRange":
|
|
4008
|
+
n.listFillRange = r;
|
|
4009
|
+
break;
|
|
4010
|
+
case "val":
|
|
4011
|
+
n.value = Kn(r);
|
|
4012
|
+
break;
|
|
4013
|
+
case "min":
|
|
4014
|
+
n.min = Kn(r);
|
|
4015
|
+
break;
|
|
4016
|
+
case "max":
|
|
4017
|
+
n.max = Kn(r);
|
|
4018
|
+
break;
|
|
4019
|
+
case "inc":
|
|
4020
|
+
n.increment = Kn(r);
|
|
4021
|
+
break;
|
|
4022
|
+
case "page":
|
|
4023
|
+
n.pageIncrement = Kn(r);
|
|
4024
|
+
break;
|
|
4025
|
+
case "horiz":
|
|
4026
|
+
_n(r) && (n.horizontal = !0);
|
|
4027
|
+
break;
|
|
4028
|
+
case "sel": {
|
|
4029
|
+
const e = Kn(r);
|
|
4030
|
+
void 0 !== e && e > 0 && (n.selectedIndex = e - 1);
|
|
4031
|
+
break;
|
|
4032
|
+
}
|
|
4033
|
+
case "dropStyle": {
|
|
4034
|
+
const e = $n[r];
|
|
4035
|
+
e ? n.dropStyle = e : a[t] = r;
|
|
4036
|
+
break;
|
|
4037
|
+
}
|
|
4038
|
+
case "dropLines":
|
|
4039
|
+
n.dropLines = Kn(r);
|
|
4040
|
+
break;
|
|
4041
|
+
default: a[t] = r;
|
|
4042
|
+
}
|
|
4043
|
+
}
|
|
4044
|
+
let s = o ? wn[o] : void 0;
|
|
4045
|
+
return s || (s = Gn, o && (a.objectType = o)), Object.keys(a).length > 0 && (n.formProps = a), t.length > 0 && (n.items = [...t]), r && (n.extLst = r), {
|
|
4046
|
+
type: s,
|
|
4047
|
+
json: n
|
|
4048
|
+
};
|
|
4049
|
+
}
|
|
4050
|
+
function zn(e, t) {
|
|
4051
|
+
const r = t, n = r.formProps, a = [["objectType", kn[e] ?? n?.objectType ?? "Unknown"]], o = (e, t) => {
|
|
4052
|
+
void 0 !== t && a.push([e, t]);
|
|
4053
|
+
};
|
|
4054
|
+
if (r.mixed ? o("checked", "Mixed") : r.checked && o("checked", "Checked"), o("dropLines", r.dropLines), o("dropStyle", r.dropStyle ? Yn[r.dropStyle] : void 0), o("fmlaLink", r.linkedCell), o("fmlaRange", r.listFillRange), r.horizontal && o("horiz", "1"), o("inc", r.increment), o("max", r.max), o("min", r.min), o("page", r.pageIncrement), o("sel", void 0 !== r.selectedIndex ? r.selectedIndex + 1 : void 0), o("val", r.value), n) for (const e in n) "objectType" !== e && o(e, n[e]);
|
|
4055
|
+
let s = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<formControlPr xmlns=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"";
|
|
4056
|
+
for (const [e, t] of a) s += ` ${e}="${jn(String(t))}"`;
|
|
4057
|
+
const i = r.items, l = void 0 !== i && i.length > 0;
|
|
4058
|
+
if (!l && !r.extLst) return s + "/>";
|
|
4059
|
+
if (s += ">", l) {
|
|
4060
|
+
s += "<itemLst>";
|
|
4061
|
+
for (let e = 0; e < i.length; e++) s += `<item val="${jn(i[e])}"/>`;
|
|
4062
|
+
s += "</itemLst>";
|
|
4063
|
+
}
|
|
4064
|
+
return r.extLst && (s += r.extLst), s + "</formControlPr>";
|
|
4065
|
+
}
|
|
4066
|
+
function Qn(e, t) {
|
|
4067
|
+
const r = t, n = {};
|
|
4068
|
+
for (const t in e) {
|
|
4069
|
+
const a = e[t];
|
|
4070
|
+
"macro" === t ? r.macro = a : "linkedCell" === t ? void 0 === r.linkedCell && (r.linkedCell = a) : "listFillRange" === t ? void 0 === r.listFillRange && (r.listFillRange = a) : n[t] = a;
|
|
4071
|
+
}
|
|
4072
|
+
Object.keys(n).length > 0 ? r.props = n : delete r.props;
|
|
4073
|
+
}
|
|
4074
|
+
function Zn(e) {
|
|
4075
|
+
const t = e, r = {}, n = t.props;
|
|
4076
|
+
if (n) for (const e in n) Xn.has(e) || (r[e] = n[e]);
|
|
4077
|
+
return void 0 !== t.macro && (r.macro = t.macro), void 0 !== t.linkedCell && (r.linkedCell = t.linkedCell), void 0 !== t.listFillRange && (r.listFillRange = t.listFillRange), r;
|
|
4078
|
+
}
|
|
4079
|
+
function Jn(e) {
|
|
4080
|
+
const t = {};
|
|
4081
|
+
if (!e) return t;
|
|
4082
|
+
const r = hn(e);
|
|
4083
|
+
"" !== r && (t.caption = r);
|
|
4084
|
+
const n = e.paragraphs;
|
|
4085
|
+
for (let r = 0; r < n.length; r++) {
|
|
4086
|
+
const a = n[r], o = a.runs.find((e) => "" !== e.text && "\n" !== e.text);
|
|
4087
|
+
if (!o) continue;
|
|
4088
|
+
const s = {}, i = o.font?.family;
|
|
4089
|
+
i && (s.name = i), s.size = o.size ?? f.inheritedTextSize(e, a) ?? f.TEXT_DEFAULTS.size, void 0 !== o.weight && o.weight >= 700 && (s.bold = !0), o.style === c.Style.Italic && (s.italic = !0);
|
|
4090
|
+
const l = ea(o.color);
|
|
4091
|
+
l && (s.color = l), t.font = s;
|
|
4092
|
+
break;
|
|
4093
|
+
}
|
|
4094
|
+
return t;
|
|
4095
|
+
}
|
|
4096
|
+
var ea = (e) => {
|
|
4097
|
+
const t = "string" == typeof e ? e : e?.color;
|
|
4098
|
+
if ("string" != typeof t) return;
|
|
4099
|
+
const r = /^#?([0-9A-Fa-f]{6})$/.exec(t);
|
|
4100
|
+
return r ? `#${r[1].toUpperCase()}` : void 0;
|
|
4101
|
+
};
|
|
4102
|
+
function ta(e) {
|
|
4103
|
+
const t = e.movables;
|
|
4104
|
+
if (!t) return;
|
|
4105
|
+
const r = /* @__PURE__ */ new Map(), n = t.length;
|
|
4106
|
+
for (let e = 0; e < n; e++) {
|
|
4107
|
+
const n = t[e].content;
|
|
4108
|
+
if (!Wn(n?.type)) continue;
|
|
4109
|
+
const a = n.json?.shapeId;
|
|
4110
|
+
"number" == typeof a && r.set(a, n.json);
|
|
4111
|
+
}
|
|
4112
|
+
const a = [];
|
|
4113
|
+
for (let e = 0; e < n; e++) {
|
|
4114
|
+
const n = t[e], o = n.content, s = "shape" === o?.type ? o.json : void 0, i = s?.twinOf;
|
|
4115
|
+
if ("number" != typeof i) {
|
|
4116
|
+
a.push(n);
|
|
4117
|
+
continue;
|
|
4118
|
+
}
|
|
4119
|
+
delete s.twinOf;
|
|
4120
|
+
const l = r.get(i);
|
|
4121
|
+
if (!l) {
|
|
4122
|
+
a.push(n);
|
|
4123
|
+
continue;
|
|
4124
|
+
}
|
|
4125
|
+
const c = Jn(o.json.text);
|
|
4126
|
+
void 0 !== c.caption && void 0 === l.caption && (l.caption = c.caption), c.font && void 0 === l.font && (l.font = c.font);
|
|
4127
|
+
}
|
|
4128
|
+
a.length !== n && (e.movables = a);
|
|
4129
|
+
}
|
|
4130
|
+
function ra(e, t, r) {
|
|
4131
|
+
const n = t.shapeId ?? 0, a = "button" === e;
|
|
4132
|
+
let o = `<xdr:sp macro="" textlink=""><xdr:nvSpPr><xdr:cNvPr id="${n}" name="${jn(r ?? "")}" hidden="1"><a:extLst><a:ext uri="{63B3BB69-23CF-44E3-9099-C40C66FF867C}"><a14:compatExt xmlns:a14="${Un}" spid="_x0000_s${n}"/></a:ext></a:extLst></xdr:cNvPr><xdr:cNvSpPr/></xdr:nvSpPr><xdr:spPr bwMode="auto"><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom><a:noFill/>` + (a ? "<a:ln w=\"9525\"><a:miter lim=\"800000\"/><a:headEnd/><a:tailEnd/></a:ln>" : "<a:ln><a:noFill/></a:ln>") + "</xdr:spPr>";
|
|
4133
|
+
const s = t.caption;
|
|
4134
|
+
if (void 0 !== s) {
|
|
4135
|
+
const e = t.font;
|
|
4136
|
+
let r = "<a:rPr lang=\"en-US\"";
|
|
4137
|
+
void 0 !== e?.size && (r += ` sz="${Math.round(100 * e.size)}"`), r += ` b="${e?.bold ? 1 : 0}" i="${e?.italic ? 1 : 0}" u="none" strike="noStrike" baseline="0">`, e?.color && (r += `<a:solidFill><a:srgbClr val="${e.color.replace("#", "").toUpperCase()}"/></a:solidFill>`), e?.name && (r += `<a:latin typeface="${jn(e.name)}"/>`), r += "</a:rPr>", o += "<xdr:txBody><a:bodyPr vertOverflow=\"clip\" wrap=\"square\" lIns=\"27432\" tIns=\"27432\" rIns=\"27432\" bIns=\"27432\" anchor=\"ctr\" upright=\"1\"/><a:lstStyle/>";
|
|
4138
|
+
const n = s.split("\n");
|
|
4139
|
+
for (let e = 0; e < n.length; e++) o += `<a:p><a:pPr algn="${a ? "ctr" : "l"}" rtl="0"><a:defRPr sz="1000"/></a:pPr><a:r>${r}<a:t>${jn(n[e])}</a:t></a:r></a:p>`;
|
|
4140
|
+
o += "</xdr:txBody>";
|
|
4141
|
+
}
|
|
4142
|
+
return o + "</xdr:sp>";
|
|
4143
|
+
}
|
|
4144
|
+
var na = { "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006" }, aa = {
|
|
4145
|
+
"xmlns:a14": Un,
|
|
4146
|
+
Requires: "a14"
|
|
4147
|
+
}, oa = /\s*<v:shape\b[\s\S]*?<\/v:shape>/g, sa = /<x:ClientData\b[^>]*\bObjectType="([^"]*)"/, ia = /\bo:spid="_x0000_s(\d+)"/, la = /\bid="_x0000_s(\d+)"/;
|
|
4148
|
+
function ca(e, t) {
|
|
4149
|
+
return e.replace(oa, (e) => function(e) {
|
|
4150
|
+
const t = sa.exec(e)?.[1];
|
|
4151
|
+
return void 0 !== t && Hn.has(t);
|
|
4152
|
+
}(e) ? t(e, function(e) {
|
|
4153
|
+
const t = ia.exec(e) ?? la.exec(e);
|
|
4154
|
+
return t ? parseInt(t[1], 10) : null;
|
|
4155
|
+
}(e)) ?? "" : e);
|
|
4156
|
+
}
|
|
4157
|
+
var ua = /\s*<v:shape\b[\s\S]*?<\/v:shape>/g, pa = /<x:ClientData\b[^>]*\bObjectType="Note"/, Ea = /<x:Row>\s*(-?\d+)\s*<\/x:Row>/, fa = /<x:Column>\s*(-?\d+)\s*<\/x:Column>/, Aa = /<x:Anchor>([\s\d,-]*)<\/x:Anchor>/, Ta = /<x:Visible\s*(?:\/>|>([^<]*)<\/x:Visible>)/, Sa = /\s*<\/xml>\s*$/, Ra = /^\s*<v:shape\b((?:[^>"']|"[^"]*"|'[^']*')*)>/, da = /([\w:.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g, ga = /<o:idmap\b[^>]*\bdata="([^"]*)"/, ma = /* @__PURE__ */ new Set([
|
|
4158
|
+
"position",
|
|
4159
|
+
"margin-left",
|
|
4160
|
+
"margin-top",
|
|
4161
|
+
"width",
|
|
4162
|
+
"height",
|
|
4163
|
+
"z-index",
|
|
4164
|
+
"visibility"
|
|
4165
|
+
]), Oa = /* @__PURE__ */ new Set([
|
|
4166
|
+
"id",
|
|
4167
|
+
"o:spid",
|
|
4168
|
+
"alt",
|
|
4169
|
+
"style"
|
|
4170
|
+
]);
|
|
4171
|
+
function ha(e) {
|
|
4172
|
+
const t = [];
|
|
4173
|
+
return {
|
|
4174
|
+
rest: e.replace(ua, (e) => {
|
|
4175
|
+
if (!pa.test(e)) return e;
|
|
4176
|
+
const r = Ea.exec(e), n = fa.exec(e);
|
|
4177
|
+
return r && n ? (t.push({
|
|
4178
|
+
xml: e,
|
|
4179
|
+
row: parseInt(r[1], 10),
|
|
4180
|
+
col: parseInt(n[1], 10)
|
|
4181
|
+
}), "") : e;
|
|
4182
|
+
}),
|
|
4183
|
+
notes: t
|
|
4184
|
+
};
|
|
4185
|
+
}
|
|
4186
|
+
var Ia = (e) => e.replace(/"/g, "\"").replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&"), Na = (e) => {
|
|
4187
|
+
const t = [], r = e.split(";");
|
|
4188
|
+
for (let e = 0; e < r.length; e++) {
|
|
4189
|
+
const n = r[e].trim();
|
|
4190
|
+
if (!n) continue;
|
|
4191
|
+
const a = n.substring(0, n.indexOf(":")).trim().toLowerCase();
|
|
4192
|
+
ma.has(a) || t.push(n.replace(/\s+/g, " "));
|
|
4193
|
+
}
|
|
4194
|
+
return t.join(";");
|
|
4195
|
+
}, Ca = (e) => {
|
|
4196
|
+
const t = Ra.exec(e);
|
|
4197
|
+
if (!t) return null;
|
|
4198
|
+
const r = [];
|
|
4199
|
+
let n, a = "", o = null;
|
|
4200
|
+
for (da.lastIndex = 0; null !== (n = da.exec(t[1]));) {
|
|
4201
|
+
const e = n[1], t = n[2] ?? n[3] ?? "";
|
|
4202
|
+
"style" === e ? a = Na(t) : "alt" === e ? o = Ia(t) || null : Oa.has(e) || r.push(n[0].replace(/\s+/g, " "));
|
|
4203
|
+
}
|
|
4204
|
+
return {
|
|
4205
|
+
attributes: r,
|
|
4206
|
+
style: a,
|
|
4207
|
+
alt: o,
|
|
4208
|
+
end: t[0].length
|
|
4209
|
+
};
|
|
4210
|
+
};
|
|
4211
|
+
function La(e) {
|
|
4212
|
+
const t = Ca(e);
|
|
4213
|
+
if (!t) return null;
|
|
4214
|
+
const r = t.attributes.slice();
|
|
4215
|
+
t.style && r.push(`style='${t.style}'`);
|
|
4216
|
+
const n = e.substring(t.end).replace(Aa, "").replace(Ea, "").replace(fa, "").replace(Ta, "").replace(/>\s+</g, "><").replace(/\s+/g, " ").trim();
|
|
4217
|
+
return `<v:shape${r.length > 0 ? " " + r.join(" ") : ""}>${n}`;
|
|
4218
|
+
}
|
|
4219
|
+
var ya = La("<v:shape type=\"#_x0000_t202\" fillcolor=\"infoBackground [80]\" strokecolor=\"none [81]\"\n o:insetmode=\"auto\">\n <v:fill color2=\"infoBackground [80]\"/>\n <v:shadow color=\"none [81]\" obscured=\"t\"/>\n <v:path o:connecttype=\"none\"/>\n <v:textbox style='mso-direction-alt:auto'>\n <div style='text-align:left'></div>\n </v:textbox>\n <x:ClientData ObjectType=\"Note\">\n <x:MoveWithCells/>\n <x:SizeWithCells/>\n <x:AutoFill>False</x:AutoFill>\n </x:ClientData>\n </v:shape>");
|
|
4220
|
+
function ba(e) {
|
|
4221
|
+
let t = null;
|
|
4222
|
+
const r = Aa.exec(e);
|
|
4223
|
+
if (r) {
|
|
4224
|
+
const e = r[1].split(",").map((e) => parseInt(e.trim(), 10));
|
|
4225
|
+
8 !== e.length || e.some((e) => isNaN(e)) || (t = e);
|
|
4226
|
+
}
|
|
4227
|
+
const n = Ta.exec(e), a = !!n && !/^\s*f/i.test(n[1] ?? ""), o = La(e);
|
|
4228
|
+
return {
|
|
4229
|
+
anchor: t,
|
|
4230
|
+
visible: a,
|
|
4231
|
+
alt: Ca(e)?.alt ?? null,
|
|
4232
|
+
xml: null === o || o === ya ? null : o
|
|
4233
|
+
};
|
|
4234
|
+
}
|
|
4235
|
+
var xa = (e) => Math.round(.75 * e * 100) / 100 + "pt";
|
|
4236
|
+
function va(e, t) {
|
|
4237
|
+
const r = (e ? La(e) : null) ?? ya, n = Ca(r), { bounds: a, anchor: o } = t;
|
|
4238
|
+
let s = `position:absolute;margin-left:${xa(a.x)};margin-top:${xa(a.y)};width:${xa(a.width)};height:${xa(a.height)};z-index:${t.zIndex};visibility:${t.visible ? "visible" : "hidden"}`;
|
|
4239
|
+
n.style && (s += `;${n.style}`);
|
|
4240
|
+
const i = n.attributes.slice(), l = i.findIndex((e) => e.startsWith("type="));
|
|
4241
|
+
var c;
|
|
4242
|
+
i.splice(l + 1, 0, `style='${s}'`), t.alt && i.splice(l + 1, 0, `alt="${c = t.alt, c.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """)}"`);
|
|
4243
|
+
let u = r.substring(n.end);
|
|
4244
|
+
const p = `<x:Anchor>${o.join(", ")}</x:Anchor>`, E = `<x:Row>${t.row}</x:Row><x:Column>${t.col}</x:Column>${t.visible ? "<x:Visible/>" : ""}`;
|
|
4245
|
+
return u = u.includes("<x:AutoFill") ? u.replace("<x:AutoFill", `${p}<x:AutoFill`).replace("</x:ClientData>", `${E}</x:ClientData>`) : u.replace("</x:ClientData>", `${p}${E}</x:ClientData>`), `<v:shape id="_x0000_s${t.shapeId}" ${i.join(" ")}>${u}`;
|
|
4246
|
+
}
|
|
4247
|
+
function Da(e) {
|
|
4248
|
+
const t = ga.exec(e), r = t ? parseInt(t[1], 10) : NaN;
|
|
4249
|
+
let n = 1024 * (isNaN(r) || r < 1 ? 1 : r);
|
|
4250
|
+
for (const t of e.matchAll(/\b(?:id|o:spid)="_x0000_s(\d+)"/g)) n = Math.max(n, parseInt(t[1], 10));
|
|
4251
|
+
return n;
|
|
4252
|
+
}
|
|
4253
|
+
function Pa(e, t, r) {
|
|
4254
|
+
const n = e && e.trim() ? e : "<xml xmlns:v=\"urn:schemas-microsoft-com:vml\"\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n xmlns:x=\"urn:schemas-microsoft-com:office:excel\">\n <o:shapelayout v:ext=\"edit\">\n <o:idmap v:ext=\"edit\" data=\"1\"/>\n </o:shapelayout></xml>";
|
|
4255
|
+
if (0 === t.length) return /<v:shape\b/.test(n) ? n : null;
|
|
4256
|
+
let a = void 0 !== r ? ((e, t) => {
|
|
4257
|
+
const r = ga.exec(e);
|
|
4258
|
+
if (!r) return e;
|
|
4259
|
+
const n = /* @__PURE__ */ new Set(), a = r[1].split(",");
|
|
4260
|
+
for (let e = 0; e < a.length; e++) {
|
|
4261
|
+
const t = parseInt(a[e].trim(), 10);
|
|
4262
|
+
isNaN(t) || n.add(t);
|
|
4263
|
+
}
|
|
4264
|
+
const o = n.size > 0 ? Math.min(...n) : 1, s = Math.floor(t / 1024);
|
|
4265
|
+
let i = !1;
|
|
4266
|
+
for (let e = o; e <= s; e++) n.has(e) || (n.add(e), i = !0);
|
|
4267
|
+
if (!i) return e;
|
|
4268
|
+
const l = Array.from(n).sort((e, t) => e - t).join(",");
|
|
4269
|
+
return e.replace(ga, (e) => e.replace(/\bdata="[^"]*"/, `data="${l}"`));
|
|
4270
|
+
})(n, r) : n;
|
|
4271
|
+
const o = Sa.exec(a);
|
|
4272
|
+
if (!o) return null;
|
|
4273
|
+
const s = o[0];
|
|
4274
|
+
return a = a.slice(0, o.index), /<v:shapetype\b[^>]*\bid="_x0000_t202"/.test(a) || (a += "<v:shapetype id=\"_x0000_t202\" coordsize=\"21600,21600\" o:spt=\"202\"\n path=\"m,l,21600r21600,l21600,xe\">\n <v:stroke joinstyle=\"miter\"/>\n <v:path gradientshapeok=\"t\" o:connecttype=\"rect\"/>\n </v:shapetype>"), a + t.join("") + s;
|
|
4275
|
+
}
|
|
4276
|
+
var Ma = "16.0000", Fa = 1048575, Ba = 16383;
|
|
4277
|
+
function Ua(e) {
|
|
4278
|
+
if (!e || "string" != typeof e) return Ma;
|
|
4279
|
+
if ("local" === e || "dev" === e || "development" === e) return "00.0000";
|
|
4280
|
+
const t = e.match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
|
|
4281
|
+
if (!t) return Ma;
|
|
4282
|
+
const r = parseInt(t[1], 10), n = parseInt(t[2] || "0", 10);
|
|
4283
|
+
return r > 99 || n > 9999 ? Ma : `${r.toString()}.${n.toString().padStart(4, "0")}`;
|
|
4284
|
+
}
|
|
4285
|
+
export { lr as $, jr as A, P as At, wr as B, R as Bt, Rn as C, Ve as Ct, $r as D, ve as Dt, ln as E, xe as Et, Br as F, O as Ft, vr as G, b as Gt, Gr as H, y as Ht, Vr as I, g as It, Yt as J, xr as K, Fr as L, C as Lt, Xr as M, U as Mt, Mr as N, h as Nt, Yr as O, k as Ot, Ur as P, m as Pt, or as Q, kr as R, I as Rt, hn as S, ke as St, fn as T, be as Tt, br as U, L as Ut, Hr as V, d as Vt, Lr as W, x as Wt, cr as X, ir as Y, tr as Z, Qn as _, We as _t, Da as a, ut as at, zn as b, Be as bt, va as c, lt as ct, na as d, ot as dt, sr as et, aa as f, Ze as ft, Wn as g, rt as gt, ra as h, tt as ht, Pa as i, ct as it, Kr as j, B as jt, _r as k, w as kt, Fn as l, it as lt, Zn as m, nt as mt, Fa as n, Ht as nt, ba as o, pt as ot, ta as p, Qe as pt, $t as q, Ua as r, Wt as rt, ha as s, Et as st, Ba as t, ur as tt, Bn as u, at as ut, ca as v, qe as vt, Sn as w, Ge as wt, vn as x, Ue as xt, qn as y, Xe as yt, Wr as z, N as zt };
|