@sheetxl/scripting 0.8.0-beta.2 → 0.8.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{DZAweI0sdBfrHzAk.cjs → DDGcQZ4hlpTNheEg.cjs} +198 -198
- package/browser/cjs/{C94szTiUbmNQa9FD.cjs → UzyxN3j4OvoQMXz9.cjs} +1 -1
- package/browser/cjs/index.cjs +1 -1
- package/browser/esm/{SXQ4A1qlBB6JRAEQ.mjs → DaQ0EpmIY8CRghRW.mjs} +1 -1
- package/browser/esm/{DP3uAaeZa0hNHrYJ.mjs → DiwsulR7CwM-KFcK.mjs} +198 -198
- package/browser/esm/index.mjs +1 -1
- package/package.json +3 -3
|
@@ -124,14 +124,14 @@ function nn(e, t, r) {
|
|
|
124
124
|
return Ne(n, r);
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function St(e) {
|
|
128
128
|
return Object.keys(e).concat((function(t) {
|
|
129
129
|
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
|
|
130
130
|
return Object.propertyIsEnumerable.call(t, r);
|
|
131
131
|
}) : [];
|
|
132
132
|
})(e));
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function bt(e, t) {
|
|
135
135
|
try {
|
|
136
136
|
return t in e;
|
|
137
137
|
} catch {
|
|
@@ -140,12 +140,12 @@ function St(e, t) {
|
|
|
140
140
|
}
|
|
141
141
|
function on(e, t, r) {
|
|
142
142
|
let n = {};
|
|
143
|
-
return r.isMergeableObject(e) &&
|
|
143
|
+
return r.isMergeableObject(e) && St(e).forEach(function(o) {
|
|
144
144
|
n[o] = Ne(e[o], r);
|
|
145
|
-
}),
|
|
145
|
+
}), St(t).forEach(function(o) {
|
|
146
146
|
(function(a, l) {
|
|
147
|
-
return
|
|
148
|
-
})(e, o) || (
|
|
147
|
+
return bt(a, l) && !(Object.hasOwnProperty.call(a, l) && Object.propertyIsEnumerable.call(a, l));
|
|
148
|
+
})(e, o) || (bt(e, o) && r.isMergeableObject(t[o]) ? n[o] = (function(a, l) {
|
|
149
149
|
if (!l.customMerge) return Ee;
|
|
150
150
|
let i = l.customMerge(a);
|
|
151
151
|
return typeof i == "function" ? i : Ee;
|
|
@@ -192,7 +192,7 @@ var Qt = he({
|
|
|
192
192
|
isPromiseLike: () => $n,
|
|
193
193
|
isRectInsideRect: () => Rn,
|
|
194
194
|
isRectIntersect: () => lr,
|
|
195
|
-
mergeContentful: () =>
|
|
195
|
+
mergeContentful: () => bn,
|
|
196
196
|
removeEmptyProperties: () => rr,
|
|
197
197
|
removeEqualValues: () => or,
|
|
198
198
|
removeEqualValuesLayered: () => ar,
|
|
@@ -203,7 +203,7 @@ var Qt = he({
|
|
|
203
203
|
subtractRect: () => Nn,
|
|
204
204
|
textToKey: () => un,
|
|
205
205
|
toSafeJSON: () => at,
|
|
206
|
-
transpose: () =>
|
|
206
|
+
transpose: () => Sn,
|
|
207
207
|
uuidV4: () => Ke,
|
|
208
208
|
validEnumValue: () => sn
|
|
209
209
|
}), _e = Object.freeze([]), an = Object.freeze({}), ln = Promise.resolve(), er = (e) => e;
|
|
@@ -315,7 +315,7 @@ function wn(e, t) {
|
|
|
315
315
|
}
|
|
316
316
|
return _e;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Sn(e) {
|
|
319
319
|
if (!e) return e;
|
|
320
320
|
let t = e.length, r = e[0].length, n = [];
|
|
321
321
|
for (let o = 0; o < r; o++) n[o] = Array(t);
|
|
@@ -358,7 +358,7 @@ function ar(e, t, r = nr) {
|
|
|
358
358
|
}
|
|
359
359
|
return l && Object.keys(e).length === 0;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function bn(...e) {
|
|
362
362
|
let t = e.length;
|
|
363
363
|
if (t > 0 && e[t - 1] !== void 0 && !ke(e[t - 1])) return e[t - 1];
|
|
364
364
|
let r = e[0] || {};
|
|
@@ -519,7 +519,7 @@ he({
|
|
|
519
519
|
EmptyRange: () => On,
|
|
520
520
|
EmptyRanges: () => Mn,
|
|
521
521
|
EmptySelection: () => Dn,
|
|
522
|
-
InsertCutShift: () =>
|
|
522
|
+
InsertCutShift: () => be,
|
|
523
523
|
cellToRange: () => jn,
|
|
524
524
|
classifyInsertCut: () => Jn,
|
|
525
525
|
columnFirstCellComparator: () => mr,
|
|
@@ -532,11 +532,11 @@ he({
|
|
|
532
532
|
extendRangeToUnionRanges: () => zn,
|
|
533
533
|
intersectRanges: () => vr,
|
|
534
534
|
isCellWithinRange: () => Pn,
|
|
535
|
-
isEqualCells: () =>
|
|
535
|
+
isEqualCells: () => Sr,
|
|
536
536
|
isEqualRanges: () => dt,
|
|
537
537
|
isEqualRangesArrays: () => Er,
|
|
538
538
|
isEqualSelectionCoords: () => xr,
|
|
539
|
-
isRangeWithinRange: () =>
|
|
539
|
+
isRangeWithinRange: () => br,
|
|
540
540
|
isRangesIntersect: () => ft,
|
|
541
541
|
isRefusedInsertCut: () => Yn,
|
|
542
542
|
isSingleCell: () => Un,
|
|
@@ -597,7 +597,7 @@ function wr(e = ue.Row, t = !1) {
|
|
|
597
597
|
function Fn(e = ue.Row, t = !1) {
|
|
598
598
|
return t ? e === ue.Column ? yr : hr : e === ue.Column ? mr : gr;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Sr(e, t) {
|
|
601
601
|
return e === t || !(!e || !t) && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex && e.scope === t.scope;
|
|
602
602
|
}
|
|
603
603
|
function dt(e, t) {
|
|
@@ -610,7 +610,7 @@ function Pn(e, t) {
|
|
|
610
610
|
let n = e.colIndex;
|
|
611
611
|
return !(n < t.colStart || n > t.colEnd);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function br(e, t) {
|
|
614
614
|
return !(!e || !t) && !(e.rowStart < t.rowStart || e.rowEnd > t.rowEnd) && !(e.colStart < t.colStart || e.colEnd > t.colEnd);
|
|
615
615
|
}
|
|
616
616
|
function ft(e, t) {
|
|
@@ -655,7 +655,7 @@ function it(e, t, r) {
|
|
|
655
655
|
}, i;
|
|
656
656
|
}
|
|
657
657
|
function xr(e, t) {
|
|
658
|
-
return e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!
|
|
658
|
+
return e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!Sr(e.cell, t.cell) && Er(e.ranges, t.ranges);
|
|
659
659
|
}
|
|
660
660
|
function Bn(e, t, r) {
|
|
661
661
|
if (!e || e.length === 0) return null;
|
|
@@ -775,7 +775,7 @@ function Wn(e, t = !1) {
|
|
|
775
775
|
done: (i) => (o &&= (r.push(o), null), i ? Ar(r, 3, i === !0 ? Hn : i, t ? ue.Column : ue.Row, qn) : r)
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
|
-
var
|
|
778
|
+
var be = {
|
|
779
779
|
Close: "close",
|
|
780
780
|
Blank: "blank",
|
|
781
781
|
Inside: "inside",
|
|
@@ -783,10 +783,10 @@ var Se = {
|
|
|
783
783
|
};
|
|
784
784
|
function Jn(e, t, r) {
|
|
785
785
|
let n = r === ue.Row;
|
|
786
|
-
return (n ? e.colStart === t.colStart && e.colEnd === t.colEnd : e.rowStart === t.rowStart && e.rowEnd === t.rowEnd) ? (n ? t.rowStart > e.rowStart && t.rowStart <= e.rowEnd : t.colStart > e.colStart && t.colStart <= e.colEnd) ?
|
|
786
|
+
return (n ? e.colStart === t.colStart && e.colEnd === t.colEnd : e.rowStart === t.rowStart && e.rowEnd === t.rowEnd) ? (n ? t.rowStart > e.rowStart && t.rowStart <= e.rowEnd : t.colStart > e.colStart && t.colStart <= e.colEnd) ? be.Inside : be.Close : (n ? e.rowEnd >= t.rowStart && e.colStart <= t.colEnd && e.colEnd >= t.colStart : e.colEnd >= t.colStart && e.rowStart <= t.rowEnd && e.rowEnd >= t.rowStart) ? be.Tear : be.Blank;
|
|
787
787
|
}
|
|
788
788
|
function Yn(e) {
|
|
789
|
-
return e ===
|
|
789
|
+
return e === be.Inside || e === be.Tear;
|
|
790
790
|
}
|
|
791
791
|
var Y = {
|
|
792
792
|
Up: "up",
|
|
@@ -876,7 +876,7 @@ function Ir(e, t = Y.Right, r, n, o, a = null) {
|
|
|
876
876
|
};
|
|
877
877
|
}
|
|
878
878
|
let g = r(p);
|
|
879
|
-
if (!
|
|
879
|
+
if (!br(g, u)) {
|
|
880
880
|
let I = vr(g, u);
|
|
881
881
|
I && (g = I);
|
|
882
882
|
}
|
|
@@ -1089,15 +1089,15 @@ var mo = (e) => \`Invalid argument: '\${e}'.\`;
|
|
|
1089
1089
|
he({
|
|
1090
1090
|
APP_MIME_TYPE: () => go,
|
|
1091
1091
|
DEFAULT_MIME_TYPE: () => "*/*",
|
|
1092
|
-
JSONStableStringify: () =>
|
|
1092
|
+
JSONStableStringify: () => bo,
|
|
1093
1093
|
arrayBufferToBase64: () => Nr,
|
|
1094
|
-
base64ToArrayBuffer: () =>
|
|
1094
|
+
base64ToArrayBuffer: () => So,
|
|
1095
1095
|
blobToString: () => lt,
|
|
1096
1096
|
isLittleEndian: () => wo,
|
|
1097
1097
|
isNodeBuffer: () => ho,
|
|
1098
1098
|
isSharedArrayBufferSupported: () => yo
|
|
1099
1099
|
});
|
|
1100
|
-
var go = "application/octet-stream", Ae = globalThis.Buffer, ho = (e) => Ae?.isBuffer(e) ?? !1, yo = typeof SharedArrayBuffer == "function" && (globalThis.crossOriginIsolated === void 0 || globalThis.crossOriginIsolated === !0), wo = new Uint8Array(new Uint16Array([1]).buffer)[0] === 1, vt = globalThis.FileReader,
|
|
1100
|
+
var go = "application/octet-stream", Ae = globalThis.Buffer, ho = (e) => Ae?.isBuffer(e) ?? !1, yo = typeof SharedArrayBuffer == "function" && (globalThis.crossOriginIsolated === void 0 || globalThis.crossOriginIsolated === !0), wo = new Uint8Array(new Uint16Array([1]).buffer)[0] === 1, vt = globalThis.FileReader, So = (e) => {
|
|
1101
1101
|
let t = typeof globalThis.atob == "function" ? globalThis.atob(e) : Ae.from(e, "base64").toString("binary"), r = t.length, n = new Uint8Array(r);
|
|
1102
1102
|
for (let o = 0; o < r; o++) n[o] = t.charCodeAt(o);
|
|
1103
1103
|
return n.buffer;
|
|
@@ -1125,7 +1125,7 @@ var go = "application/octet-stream", Ae = globalThis.Buffer, ho = (e) => Ae?.isB
|
|
|
1125
1125
|
} else r(/* @__PURE__ */ Error("Unsupported environment"));
|
|
1126
1126
|
else t("");
|
|
1127
1127
|
});
|
|
1128
|
-
function
|
|
1128
|
+
function bo(e, t) {
|
|
1129
1129
|
t ||= {}, typeof t == "function" && (t = { cmp: t });
|
|
1130
1130
|
let r = typeof t.cycles == "boolean" && t.cycles, n = t.cmp && (o = t.cmp, function(l) {
|
|
1131
1131
|
return function(i, u) {
|
|
@@ -1742,7 +1742,7 @@ function ze(e, t, r, n) {
|
|
|
1742
1742
|
return o;
|
|
1743
1743
|
}
|
|
1744
1744
|
new TextDecoder();
|
|
1745
|
-
var
|
|
1745
|
+
var Do;
|
|
1746
1746
|
(function(e) {
|
|
1747
1747
|
e.MAX_TEXT_LENGTH = 32767;
|
|
1748
1748
|
let t = e.MAX_SIGNIFICANT_DIGITS = 15;
|
|
@@ -1759,8 +1759,8 @@ var Fo;
|
|
|
1759
1759
|
}
|
|
1760
1760
|
return a === null ? r : a.join("");
|
|
1761
1761
|
};
|
|
1762
|
-
})(
|
|
1763
|
-
var Pt, et,
|
|
1762
|
+
})(Do ||= {});
|
|
1763
|
+
var Pt, et, Fo, b, me = {
|
|
1764
1764
|
Number: "number",
|
|
1765
1765
|
String: "string",
|
|
1766
1766
|
Boolean: "boolean",
|
|
@@ -1788,7 +1788,7 @@ var Pt, et, Po, S, me = {
|
|
|
1788
1788
|
Down: "down",
|
|
1789
1789
|
Left: "left",
|
|
1790
1790
|
Right: "right"
|
|
1791
|
-
}, (
|
|
1791
|
+
}, (Fo ||= {}).Aggregate = {
|
|
1792
1792
|
Count: "count",
|
|
1793
1793
|
NumericalCount: "numericalCount",
|
|
1794
1794
|
Sum: "sum",
|
|
@@ -1844,7 +1844,7 @@ var Pt, et, Po, S, me = {
|
|
|
1844
1844
|
super(pe, W), this._label = k, this._code = N, this.details = W;
|
|
1845
1845
|
}
|
|
1846
1846
|
static {
|
|
1847
|
-
this.code =
|
|
1847
|
+
this.code = b.Code.Unknown;
|
|
1848
1848
|
}
|
|
1849
1849
|
get isFormulaError() {
|
|
1850
1850
|
return !0;
|
|
@@ -1871,7 +1871,7 @@ var Pt, et, Po, S, me = {
|
|
|
1871
1871
|
super(t.Parse, r.Parse, N, k);
|
|
1872
1872
|
}
|
|
1873
1873
|
static {
|
|
1874
|
-
this.code =
|
|
1874
|
+
this.code = b.Code.Parse;
|
|
1875
1875
|
}
|
|
1876
1876
|
getDetails() {
|
|
1877
1877
|
let N = this.details;
|
|
@@ -1889,7 +1889,7 @@ var Pt, et, Po, S, me = {
|
|
|
1889
1889
|
super(t.Null, r.Null, N, k);
|
|
1890
1890
|
}
|
|
1891
1891
|
static {
|
|
1892
|
-
this.code =
|
|
1892
|
+
this.code = b.Code.Null;
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
e.Null = a;
|
|
@@ -1898,7 +1898,7 @@ var Pt, et, Po, S, me = {
|
|
|
1898
1898
|
super(t.Div0, r.Div0, N, k);
|
|
1899
1899
|
}
|
|
1900
1900
|
static {
|
|
1901
|
-
this.code =
|
|
1901
|
+
this.code = b.Code.Div0;
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
1904
|
e.Div0 = l;
|
|
@@ -1907,7 +1907,7 @@ var Pt, et, Po, S, me = {
|
|
|
1907
1907
|
super(t.Value, r.Value, N, k);
|
|
1908
1908
|
}
|
|
1909
1909
|
static {
|
|
1910
|
-
this.code =
|
|
1910
|
+
this.code = b.Code.Value;
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
1913
|
e.Value = i;
|
|
@@ -1916,7 +1916,7 @@ var Pt, et, Po, S, me = {
|
|
|
1916
1916
|
super(t.Ref, r.Ref, N, k);
|
|
1917
1917
|
}
|
|
1918
1918
|
static {
|
|
1919
|
-
this.code =
|
|
1919
|
+
this.code = b.Code.Ref;
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
1922
|
e.Ref = u;
|
|
@@ -1925,7 +1925,7 @@ var Pt, et, Po, S, me = {
|
|
|
1925
1925
|
super(t.Name, r.Name, N, k);
|
|
1926
1926
|
}
|
|
1927
1927
|
static {
|
|
1928
|
-
this.code =
|
|
1928
|
+
this.code = b.Code.Name;
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
1931
1931
|
e.Name = p;
|
|
@@ -1934,7 +1934,7 @@ var Pt, et, Po, S, me = {
|
|
|
1934
1934
|
super(t.Num, r.Num, N, k);
|
|
1935
1935
|
}
|
|
1936
1936
|
static {
|
|
1937
|
-
this.code =
|
|
1937
|
+
this.code = b.Code.Num;
|
|
1938
1938
|
}
|
|
1939
1939
|
}
|
|
1940
1940
|
e.Num = h;
|
|
@@ -1943,7 +1943,7 @@ var Pt, et, Po, S, me = {
|
|
|
1943
1943
|
super(t.NA, r.NA, N, k);
|
|
1944
1944
|
}
|
|
1945
1945
|
static {
|
|
1946
|
-
this.code =
|
|
1946
|
+
this.code = b.Code.NA;
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
1949
|
e.NA = c;
|
|
@@ -1952,7 +1952,7 @@ var Pt, et, Po, S, me = {
|
|
|
1952
1952
|
super(t.GettingData, r.GettingData, N, k);
|
|
1953
1953
|
}
|
|
1954
1954
|
static {
|
|
1955
|
-
this.code =
|
|
1955
|
+
this.code = b.Code.GettingData;
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
1958
|
e.GettingData = g;
|
|
@@ -1961,7 +1961,7 @@ var Pt, et, Po, S, me = {
|
|
|
1961
1961
|
super(t.Spill, r.Spill, N, k);
|
|
1962
1962
|
}
|
|
1963
1963
|
static {
|
|
1964
|
-
this.code =
|
|
1964
|
+
this.code = b.Code.Spill;
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
1967
|
e.Spill = T;
|
|
@@ -1970,7 +1970,7 @@ var Pt, et, Po, S, me = {
|
|
|
1970
1970
|
super(t.Connect, r.Connect, N, k);
|
|
1971
1971
|
}
|
|
1972
1972
|
static {
|
|
1973
|
-
this.code =
|
|
1973
|
+
this.code = b.Code.Connect;
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
1976
|
e.Connect = I;
|
|
@@ -1979,7 +1979,7 @@ var Pt, et, Po, S, me = {
|
|
|
1979
1979
|
super(t.Blocked, r.Blocked, N, k);
|
|
1980
1980
|
}
|
|
1981
1981
|
static {
|
|
1982
|
-
this.code =
|
|
1982
|
+
this.code = b.Code.Blocked;
|
|
1983
1983
|
}
|
|
1984
1984
|
}
|
|
1985
1985
|
e.Blocked = M;
|
|
@@ -1988,7 +1988,7 @@ var Pt, et, Po, S, me = {
|
|
|
1988
1988
|
super(t.Unknown, r.Unknown, N, k);
|
|
1989
1989
|
}
|
|
1990
1990
|
static {
|
|
1991
|
-
this.code =
|
|
1991
|
+
this.code = b.Code.Unknown;
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
1994
|
e.Unknown = q;
|
|
@@ -1997,7 +1997,7 @@ var Pt, et, Po, S, me = {
|
|
|
1997
1997
|
super(t.Field, r.Field, N, k);
|
|
1998
1998
|
}
|
|
1999
1999
|
static {
|
|
2000
|
-
this.code =
|
|
2000
|
+
this.code = b.Code.Field;
|
|
2001
2001
|
}
|
|
2002
2002
|
}
|
|
2003
2003
|
e.Field = v;
|
|
@@ -2006,7 +2006,7 @@ var Pt, et, Po, S, me = {
|
|
|
2006
2006
|
super(t.Calc, r.Calc, N, k);
|
|
2007
2007
|
}
|
|
2008
2008
|
static {
|
|
2009
|
-
this.code =
|
|
2009
|
+
this.code = b.Code.Calc;
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
2012
|
e.Calc = C;
|
|
@@ -2015,7 +2015,7 @@ var Pt, et, Po, S, me = {
|
|
|
2015
2015
|
super(t.Busy, r.Busy, N, k);
|
|
2016
2016
|
}
|
|
2017
2017
|
static {
|
|
2018
|
-
this.code =
|
|
2018
|
+
this.code = b.Code.Busy;
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
2021
2021
|
e.Busy = R;
|
|
@@ -2024,7 +2024,7 @@ var Pt, et, Po, S, me = {
|
|
|
2024
2024
|
super(t.Python, r.Python, N, k);
|
|
2025
2025
|
}
|
|
2026
2026
|
static {
|
|
2027
|
-
this.code =
|
|
2027
|
+
this.code = b.Code.Python;
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
e.Python = U;
|
|
@@ -2033,13 +2033,13 @@ var Pt, et, Po, S, me = {
|
|
|
2033
2033
|
super(t.Timeout, r.Timeout, N, k);
|
|
2034
2034
|
}
|
|
2035
2035
|
static {
|
|
2036
|
-
this.code =
|
|
2036
|
+
this.code = b.Code.Timeout;
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
2039
2039
|
e.Timeout = Z;
|
|
2040
|
-
})(
|
|
2040
|
+
})(b ||= {});
|
|
2041
2041
|
var te = {};
|
|
2042
|
-
te[
|
|
2042
|
+
te[b.Code.Parse] = b.Parse, te[b.Code.Null] = b.Null, te[b.Code.Div0] = b.Div0, te[b.Code.Value] = b.Value, te[b.Code.Ref] = b.Ref, te[b.Code.Name] = b.Name, te[b.Code.Num] = b.Num, te[b.Code.NA] = b.NA, te[b.Code.GettingData] = b.GettingData, te[b.Code.Spill] = b.Spill, te[b.Code.Connect] = b.Connect, te[b.Code.Blocked] = b.Blocked, te[b.Code.Unknown] = b.Unknown, te[b.Code.Field] = b.Field, te[b.Code.Calc] = b.Calc, te[b.Code.Busy] = b.Busy, te[b.Code.Python] = b.Python, te[b.Code.Timeout] = b.Timeout;
|
|
2043
2043
|
var Fr = /* @__PURE__ */ new Map(), Pr = /* @__PURE__ */ new Map(), Ur = /* @__PURE__ */ new Map(), jr = /* @__PURE__ */ new Map(), Bt = Object.keys(te);
|
|
2044
2044
|
for (let e = 0; e < Bt.length; e++) {
|
|
2045
2045
|
let t = te[Bt[e]], r = new t();
|
|
@@ -2048,32 +2048,32 @@ for (let e = 0; e < Bt.length; e++) {
|
|
|
2048
2048
|
(function(e) {
|
|
2049
2049
|
let t = e.getBuiltInByCode = (r) => Pr.get(r);
|
|
2050
2050
|
e.BuiltIn = {
|
|
2051
|
-
Parse: t(
|
|
2052
|
-
Null: t(
|
|
2053
|
-
Div0: t(
|
|
2054
|
-
Value: t(
|
|
2055
|
-
Ref: t(
|
|
2056
|
-
Name: t(
|
|
2057
|
-
Num: t(
|
|
2058
|
-
NA: t(
|
|
2059
|
-
GettingData: t(
|
|
2060
|
-
Spill: t(
|
|
2061
|
-
Connect: t(
|
|
2062
|
-
Blocked: t(
|
|
2063
|
-
Unknown: t(
|
|
2064
|
-
Field: t(
|
|
2065
|
-
Calc: t(
|
|
2066
|
-
Busy: t(
|
|
2067
|
-
Python: t(
|
|
2068
|
-
Timeout: t(
|
|
2051
|
+
Parse: t(b.Code.Parse),
|
|
2052
|
+
Null: t(b.Code.Null),
|
|
2053
|
+
Div0: t(b.Code.Div0),
|
|
2054
|
+
Value: t(b.Code.Value),
|
|
2055
|
+
Ref: t(b.Code.Ref),
|
|
2056
|
+
Name: t(b.Code.Name),
|
|
2057
|
+
Num: t(b.Code.Num),
|
|
2058
|
+
NA: t(b.Code.NA),
|
|
2059
|
+
GettingData: t(b.Code.GettingData),
|
|
2060
|
+
Spill: t(b.Code.Spill),
|
|
2061
|
+
Connect: t(b.Code.Connect),
|
|
2062
|
+
Blocked: t(b.Code.Blocked),
|
|
2063
|
+
Unknown: t(b.Code.Unknown),
|
|
2064
|
+
Field: t(b.Code.Field),
|
|
2065
|
+
Calc: t(b.Code.Calc),
|
|
2066
|
+
Busy: t(b.Code.Busy),
|
|
2067
|
+
Python: t(b.Code.Python),
|
|
2068
|
+
Timeout: t(b.Code.Timeout)
|
|
2069
2069
|
}, e.newTypedError = (r, n, o) => {
|
|
2070
2070
|
let a;
|
|
2071
|
-
return a = typeof r == "string" ? Ur.get(r) : jr.get(r), a ||=
|
|
2071
|
+
return a = typeof r == "string" ? Ur.get(r) : jr.get(r), a ||= b.Unknown, new a(n, o);
|
|
2072
2072
|
}, e.getBuiltInByLabel = (r) => Fr.get(r), e.isError = function(r, n) {
|
|
2073
2073
|
return !!r && r.isFormulaError === !0 && (n === void 0 || r.getCode() === n);
|
|
2074
2074
|
};
|
|
2075
|
-
})(
|
|
2076
|
-
var
|
|
2075
|
+
})(b ||= {});
|
|
2076
|
+
var Po = class {
|
|
2077
2077
|
createRange(e, t, r) {
|
|
2078
2078
|
throw new oe();
|
|
2079
2079
|
}
|
|
@@ -2114,7 +2114,7 @@ var Uo = class {
|
|
|
2114
2114
|
return Kr;
|
|
2115
2115
|
}
|
|
2116
2116
|
isValidDate(e, t) {
|
|
2117
|
-
return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]" ? !isNaN(e.getTime()) : !t && typeof e == "number" && !(e < 0 || e >
|
|
2117
|
+
return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]" ? !isNaN(e.getTime()) : !t && typeof e == "number" && !(e < 0 || e > jo);
|
|
2118
2118
|
}
|
|
2119
2119
|
getRow() {
|
|
2120
2120
|
return 0;
|
|
@@ -2165,7 +2165,7 @@ var Uo = class {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
parseAsLiteral(e) {
|
|
2167
2167
|
let t = e.toUpperCase();
|
|
2168
|
-
return t === "TRUE" || t !== "FALSE" &&
|
|
2168
|
+
return t === "TRUE" || t !== "FALSE" && b.getBuiltInByLabel(t);
|
|
2169
2169
|
}
|
|
2170
2170
|
toText(e) {
|
|
2171
2171
|
return typeof e == "string" ? e : e == null ? "" : typeof e == "boolean" ? e ? "TRUE" : "FALSE" : e?.isFormulaError ? e.getLabel() : String(e);
|
|
@@ -2176,7 +2176,7 @@ var Uo = class {
|
|
|
2176
2176
|
return n === o ? e < t ? -1 : +(e > t) : n < o ? -1 : 1;
|
|
2177
2177
|
}
|
|
2178
2178
|
getRuntime() {
|
|
2179
|
-
return
|
|
2179
|
+
return Uo;
|
|
2180
2180
|
}
|
|
2181
2181
|
getArgs() {
|
|
2182
2182
|
throw new oe(Br);
|
|
@@ -2198,7 +2198,7 @@ var Uo = class {
|
|
|
2198
2198
|
rowStart: 0,
|
|
2199
2199
|
colEnd: 2 ** 14 - 1,
|
|
2200
2200
|
rowEnd: 2 ** 20 - 1
|
|
2201
|
-
}),
|
|
2201
|
+
}), Uo = {
|
|
2202
2202
|
isDate1904: () => !1,
|
|
2203
2203
|
getLocale: () => zt.tag,
|
|
2204
2204
|
getLocaleProfile: () => zt,
|
|
@@ -2210,7 +2210,7 @@ var Uo = class {
|
|
|
2210
2210
|
getOS: () => "unknown",
|
|
2211
2211
|
getUser: () => "unidentified",
|
|
2212
2212
|
getDescription: () => "Stubbed Formula Context"
|
|
2213
|
-
},
|
|
2213
|
+
}, jo = 2958465, Pe = new Po(), Bo = class {
|
|
2214
2214
|
constructor() {
|
|
2215
2215
|
this._scope = Pe, this._argsFn = null;
|
|
2216
2216
|
}
|
|
@@ -2427,7 +2427,7 @@ var Uo = class {
|
|
|
2427
2427
|
numeric: !0
|
|
2428
2428
|
})
|
|
2429
2429
|
});
|
|
2430
|
-
new
|
|
2430
|
+
new Bo();
|
|
2431
2431
|
const w = Object.freeze({
|
|
2432
2432
|
/** Exported function has no body. */
|
|
2433
2433
|
NoBody: "SXL1001",
|
|
@@ -2513,7 +2513,7 @@ const w = Object.freeze({
|
|
|
2513
2513
|
EnumDuplicateValue: "SXL9004",
|
|
2514
2514
|
/** An enum member has no doc comment. */
|
|
2515
2515
|
EnumMemberUndocumented: "SXL9005"
|
|
2516
|
-
}),
|
|
2516
|
+
}), Ko = [
|
|
2517
2517
|
{
|
|
2518
2518
|
name: "param",
|
|
2519
2519
|
group: "jsdoc",
|
|
@@ -2571,38 +2571,38 @@ const w = Object.freeze({
|
|
|
2571
2571
|
group: "jsdoc",
|
|
2572
2572
|
description: "Reference a related function or link."
|
|
2573
2573
|
}
|
|
2574
|
-
],
|
|
2574
|
+
], zo = (() => {
|
|
2575
2575
|
const e = /* @__PURE__ */ new Map();
|
|
2576
|
-
for (const t of
|
|
2576
|
+
for (const t of Ko) if (e.set(t.name, t), t.aliases) for (const r of t.aliases) e.set(r, t);
|
|
2577
2577
|
return e;
|
|
2578
2578
|
})();
|
|
2579
|
-
function
|
|
2579
|
+
function Vo(e) {
|
|
2580
2580
|
if (!e) return;
|
|
2581
2581
|
const t = (e.startsWith("@") ? e.slice(1) : e).toLowerCase();
|
|
2582
|
-
return
|
|
2582
|
+
return zo.get(t);
|
|
2583
2583
|
}
|
|
2584
|
-
function
|
|
2585
|
-
return
|
|
2584
|
+
function Xo(e) {
|
|
2585
|
+
return Vo(e)?.standalone === !0;
|
|
2586
2586
|
}
|
|
2587
2587
|
const ct = /* @__PURE__ */ new Map([["IReferenceRange", "p"], ["IRange", "r"]]), tt = new Set(Object.values(jt).filter((e) => e !== jt.Omitted)), mt = /* @__PURE__ */ new Map([
|
|
2588
2588
|
["IWorkbook", "workbook"],
|
|
2589
2589
|
["ISheet", "sheet"],
|
|
2590
2590
|
["ICellRanges", "ranges"],
|
|
2591
2591
|
["ICellRange", "range"]
|
|
2592
|
-
]),
|
|
2592
|
+
]), Go = Array.from(mt.keys()), gt = (e, t) => {
|
|
2593
2593
|
Array.from(t.keys()).forEach((r) => {
|
|
2594
2594
|
const n = t.get(r);
|
|
2595
2595
|
t.set(\`\${e}.\${r}\`, n);
|
|
2596
2596
|
});
|
|
2597
|
-
},
|
|
2597
|
+
}, qo = /* @__PURE__ */ new Map([
|
|
2598
2598
|
["Scalar", "*"],
|
|
2599
2599
|
["Lambda", "l"],
|
|
2600
2600
|
["FormulaError.Known", me.Error],
|
|
2601
2601
|
["Date", Ut.Date],
|
|
2602
2602
|
["IRichData", Ut.RichData]
|
|
2603
|
-
]), zr = /* @__PURE__ */ new Map([["Repeating", "repeating"]]),
|
|
2604
|
-
if (
|
|
2605
|
-
const t =
|
|
2603
|
+
]), zr = /* @__PURE__ */ new Map([["Repeating", "repeating"]]), Ho = /* @__PURE__ */ new Set(["Flatten", "SheetXL.Flatten"]), Vr = /* @__PURE__ */ new Set(["AcceptError"]), Xr = /* @__PURE__ */ new Set(["Omittable"]), Gr = /* @__PURE__ */ new Set(["NoLift"]), qr = /* @__PURE__ */ new Set(["NoFilter"]), Hr = /* @__PURE__ */ new Set(["Lazy"]), ut = /* @__PURE__ */ new Set(["ReportType"]), Vt = 255, Wo = /^[a-zA-Z_-][a-zA-Z0-9_.-]*$/, Jo = /^([a-z]{1,3})([0-9]+)$/i, Yo = /^r[0-9]*c[0-9]*$/i, Zo = (e) => {
|
|
2604
|
+
if (Yo.test(e)) return !0;
|
|
2605
|
+
const t = Jo.exec(e);
|
|
2606
2606
|
if (!t) return !1;
|
|
2607
2607
|
let r = 0;
|
|
2608
2608
|
for (const o of t[1].toUpperCase()) r = r * 26 + (o.charCodeAt(0) - 64);
|
|
@@ -2621,12 +2621,12 @@ Gr.add(\`\${le}.NoLift\`);
|
|
|
2621
2621
|
qr.add(\`\${le}.NoFilter\`);
|
|
2622
2622
|
Hr.add(\`\${le}.Lazy\`);
|
|
2623
2623
|
ut.add(\`\${le}.ReportType\`);
|
|
2624
|
-
const
|
|
2624
|
+
const Qo = /* @__PURE__ */ new Map([
|
|
2625
2625
|
["Promise", () => ({ async: !0 })],
|
|
2626
2626
|
["Observable", () => ({ stream: !0 })],
|
|
2627
2627
|
["Volatile", () => ({ volatile: !0 })],
|
|
2628
2628
|
[\`\${le}.Volatile\`, () => ({ volatile: !0 })]
|
|
2629
|
-
]), Xt = "__scriptContext__", Gt = "script",
|
|
2629
|
+
]), Xt = "__scriptContext__", Gt = "script", ea = /* @__PURE__ */ new Set([
|
|
2630
2630
|
"IScript.ScriptContext",
|
|
2631
2631
|
\`\${le}.IScript.ScriptContext\`,
|
|
2632
2632
|
"ScriptContext"
|
|
@@ -2667,7 +2667,7 @@ const ea = /* @__PURE__ */ new Map([
|
|
|
2667
2667
|
\`).map((n) => n.trim()).filter(Boolean).join(" ")).filter(Boolean).join(\`
|
|
2668
2668
|
\`).trim();
|
|
2669
2669
|
};
|
|
2670
|
-
function
|
|
2670
|
+
function ta(e, t, r, n) {
|
|
2671
2671
|
const o = n?.builtInNames?.length ? new Set(n.builtInNames.map((s) => s.toUpperCase())) : null, a = [], l = /* @__PURE__ */ new Map(), i = [];
|
|
2672
2672
|
let u = null;
|
|
2673
2673
|
const p = (s) => {
|
|
@@ -2740,9 +2740,9 @@ function ra(e, t, r, n) {
|
|
|
2740
2740
|
return;
|
|
2741
2741
|
}
|
|
2742
2742
|
if (!E || !(E.flags & e.SymbolFlags.Type)) {
|
|
2743
|
-
const
|
|
2744
|
-
if (!(E ? (E.flags & e.SymbolFlags.Variable) !== 0 : t.statements.some((x) => e.isVariableStatement(x) && x.declarationList.declarations.some((K) => e.isIdentifier(K.name) && K.name.text ===
|
|
2745
|
-
c(s, w.EnumMissingAlias, \`'\${
|
|
2743
|
+
const S = d.getText();
|
|
2744
|
+
if (!(E ? (E.flags & e.SymbolFlags.Variable) !== 0 : t.statements.some((x) => e.isVariableStatement(x) && x.declarationList.declarations.some((K) => e.isIdentifier(K.name) && K.name.text === S)))) return null;
|
|
2745
|
+
c(s, w.EnumMissingAlias, \`'\${S}' is a value, not a type: '\${f}'. Pair the object with a same-name type — 'type \${S} = typeof \${S}[keyof typeof \${S}];' — or declare it as 'enum \${S} { … }'.\`);
|
|
2746
2746
|
return;
|
|
2747
2747
|
}
|
|
2748
2748
|
const m = q.get(E);
|
|
@@ -2758,27 +2758,27 @@ function ra(e, t, r, n) {
|
|
|
2758
2758
|
}
|
|
2759
2759
|
j = !0;
|
|
2760
2760
|
let m = !1;
|
|
2761
|
-
if (E.exports?.forEach((
|
|
2762
|
-
const x =
|
|
2761
|
+
if (E.exports?.forEach((S) => {
|
|
2762
|
+
const x = S.valueDeclaration;
|
|
2763
2763
|
if (!x || !e.isEnumMember(x)) return;
|
|
2764
2764
|
const K = r.getConstantValue(x);
|
|
2765
2765
|
if (K === void 0) {
|
|
2766
|
-
c(x, w.EnumMemberNotConstant, \`'\${E.name}.\${
|
|
2766
|
+
c(x, w.EnumMemberNotConstant, \`'\${E.name}.\${S.name}' is not a constant number or string. A formula passes the VALUE, so every member needs one that can be read at compile time.\`), m = !0;
|
|
2767
2767
|
return;
|
|
2768
2768
|
}
|
|
2769
2769
|
L.push([
|
|
2770
|
-
P(
|
|
2770
|
+
P(S, !0),
|
|
2771
2771
|
K,
|
|
2772
2772
|
x,
|
|
2773
|
-
$e(
|
|
2774
|
-
N(
|
|
2773
|
+
$e(S.getDocumentationComment(r)),
|
|
2774
|
+
N(S)
|
|
2775
2775
|
]);
|
|
2776
2776
|
}), m) {
|
|
2777
2777
|
R.add(E);
|
|
2778
2778
|
return;
|
|
2779
2779
|
}
|
|
2780
2780
|
} else {
|
|
2781
|
-
const m = r.getTypeFromTypeNode(s),
|
|
2781
|
+
const m = r.getTypeFromTypeNode(s), S = e.TypeFlags.Null | e.TypeFlags.Undefined | e.TypeFlags.Void, x = (m.isUnion() ? m.types : [m]).filter((D) => !(D.flags & S)), K = [];
|
|
2782
2782
|
for (const D of x) {
|
|
2783
2783
|
if (!(D.flags & (e.TypeFlags.NumberLiteral | e.TypeFlags.StringLiteral))) return E && q.set(E, null), null;
|
|
2784
2784
|
K.push(D.value);
|
|
@@ -2825,23 +2825,23 @@ function ra(e, t, r, n) {
|
|
|
2825
2825
|
if (F) return F;
|
|
2826
2826
|
if (j) {
|
|
2827
2827
|
const m = /* @__PURE__ */ new Map();
|
|
2828
|
-
for (const [
|
|
2829
|
-
const J = K?.name?.getText() ??
|
|
2828
|
+
for (const [S, x, K, re] of L) {
|
|
2829
|
+
const J = K?.name?.getText() ?? S, ee = m.get(x);
|
|
2830
2830
|
ee !== void 0 ? h(K ?? s, w.EnumDuplicateValue, "warning", \`'\${A}.\${J}' has the same value as '\${A}.\${ee}' (\${JSON.stringify(x)}). A formula passes the value, so the two cannot be told apart.\`) : m.set(x, J), re === "" && h(K ?? s, w.EnumMemberUndocumented, "warning", \`'\${A}.\${J}' is missing a description. Add a doc comment above the member — it is what the argument dropdown shows.\`);
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
2833
|
const V = {
|
|
2834
2834
|
id: A,
|
|
2835
2835
|
type: O ? me.Number : me.String,
|
|
2836
|
-
members: L.map(([m,
|
|
2836
|
+
members: L.map(([m, S, , , x]) => x ? [
|
|
2837
2837
|
m,
|
|
2838
|
-
|
|
2838
|
+
S,
|
|
2839
2839
|
x
|
|
2840
|
-
] : [m,
|
|
2840
|
+
] : [m, S])
|
|
2841
2841
|
};
|
|
2842
2842
|
E ? q.set(E, V) : v.set(A, V);
|
|
2843
2843
|
const z = E ? $e(E.getDocumentationComment(r)) : "", B = {};
|
|
2844
|
-
for (const [m, , ,
|
|
2844
|
+
for (const [m, , , S] of L) S && (B[m] = { description: S });
|
|
2845
2845
|
if (z || Object.keys(B).length > 0) {
|
|
2846
2846
|
const m = {};
|
|
2847
2847
|
z && (m.summary = z), Object.keys(B).length > 0 && (m.members = B), C.set(V, m);
|
|
@@ -2895,8 +2895,8 @@ function ra(e, t, r, n) {
|
|
|
2895
2895
|
if (!(m.kind !== e.SyntaxKind.TypeReference || m.typeArguments?.length)) return ct.get(ve(m));
|
|
2896
2896
|
}, B = F.findIndex((m) => z(m) !== void 0);
|
|
2897
2897
|
if (B >= 0 && z(F[1 - B]) === void 0) {
|
|
2898
|
-
const m = {},
|
|
2899
|
-
if (W(F[1 - B], m, d, y, E, L, !1), m.scalar && !m.range && m.lambda == null && E.count ===
|
|
2898
|
+
const m = {}, S = E.count;
|
|
2899
|
+
if (W(F[1 - B], m, d, y, E, L, !1), m.scalar && !m.range && m.lambda == null && E.count === S) {
|
|
2900
2900
|
f.range = z(F[B]), f.scalar = m.scalar, f.valueOrRange = !0;
|
|
2901
2901
|
const x = m.enum;
|
|
2902
2902
|
x && (f.enum = x);
|
|
@@ -2951,8 +2951,8 @@ function ra(e, t, r, n) {
|
|
|
2951
2951
|
c(s, w.InvalidReturnType, \`'\${A}' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
2952
2952
|
return;
|
|
2953
2953
|
}
|
|
2954
|
-
const
|
|
2955
|
-
if (
|
|
2954
|
+
const S = f;
|
|
2955
|
+
if (S.acceptError) {
|
|
2956
2956
|
c(s, w.InvalidParamType, \`'\${m}' declares 'AcceptError' more than once.\`);
|
|
2957
2957
|
return;
|
|
2958
2958
|
}
|
|
@@ -2961,7 +2961,7 @@ function ra(e, t, r, n) {
|
|
|
2961
2961
|
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
2962
2962
|
return;
|
|
2963
2963
|
}
|
|
2964
|
-
return
|
|
2964
|
+
return S.acceptError = !0, W(x[0], f, d, y, E, L, j, O);
|
|
2965
2965
|
}
|
|
2966
2966
|
if (ut.has(A)) {
|
|
2967
2967
|
const m = f.name ?? g(s);
|
|
@@ -2969,12 +2969,12 @@ function ra(e, t, r, n) {
|
|
|
2969
2969
|
c(s, w.InvalidReturnType, \`'ReportType' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
2970
2970
|
return;
|
|
2971
2971
|
}
|
|
2972
|
-
const
|
|
2973
|
-
if (!
|
|
2972
|
+
const S = s.typeArguments;
|
|
2973
|
+
if (!S || S.length !== 1) {
|
|
2974
2974
|
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
2975
2975
|
return;
|
|
2976
2976
|
}
|
|
2977
|
-
return f.reportType = !0, W(
|
|
2977
|
+
return f.reportType = !0, W(S[0], f, d, y, E, L, j, O);
|
|
2978
2978
|
}
|
|
2979
2979
|
if (Gr.has(A)) {
|
|
2980
2980
|
const m = f.name ?? g(s);
|
|
@@ -2982,15 +2982,15 @@ function ra(e, t, r, n) {
|
|
|
2982
2982
|
c(s, w.InvalidReturnType, \`'NoLift' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
2983
2983
|
return;
|
|
2984
2984
|
}
|
|
2985
|
-
const
|
|
2986
|
-
if (!
|
|
2985
|
+
const S = s.typeArguments;
|
|
2986
|
+
if (!S || S.length !== 1) {
|
|
2987
2987
|
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
2988
2988
|
return;
|
|
2989
2989
|
}
|
|
2990
2990
|
const x = f;
|
|
2991
2991
|
x.noLift = !0;
|
|
2992
2992
|
const K = E.count;
|
|
2993
|
-
W(
|
|
2993
|
+
W(S[0], f, d, y, E, L, j, O), (x.range || x.lambda != null || x.repeating || E.count !== K) && c(s, w.InvalidParamType, \`'\${m}': 'NoLift' applies to a SCALAR parameter only - a range, list, repeating or lambda slot never lifts.\`);
|
|
2994
2994
|
return;
|
|
2995
2995
|
}
|
|
2996
2996
|
if (qr.has(A)) {
|
|
@@ -2999,15 +2999,15 @@ function ra(e, t, r, n) {
|
|
|
2999
2999
|
c(s, w.InvalidReturnType, \`'NoFilter' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
3000
3000
|
return;
|
|
3001
3001
|
}
|
|
3002
|
-
const
|
|
3003
|
-
if (!
|
|
3002
|
+
const S = s.typeArguments;
|
|
3003
|
+
if (!S || S.length !== 1) {
|
|
3004
3004
|
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
3005
3005
|
return;
|
|
3006
3006
|
}
|
|
3007
3007
|
const x = f;
|
|
3008
3008
|
x.noFilter = !0;
|
|
3009
3009
|
const K = E.count;
|
|
3010
|
-
if (W(
|
|
3010
|
+
if (W(S[0], f, d, y, E, L, j, O), x.range || x.lambda != null || E.count !== K) {
|
|
3011
3011
|
c(s, w.InvalidParamType, \`'\${m}': 'NoFilter' applies to a SCALAR slot only - a range, list or lambda slot has no members to coerce.\`);
|
|
3012
3012
|
return;
|
|
3013
3013
|
}
|
|
@@ -3027,22 +3027,22 @@ function ra(e, t, r, n) {
|
|
|
3027
3027
|
c(s, w.InvalidReturnType, \`'Omittable' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
3028
3028
|
return;
|
|
3029
3029
|
}
|
|
3030
|
-
const
|
|
3031
|
-
if (!
|
|
3030
|
+
const S = s.typeArguments;
|
|
3031
|
+
if (!S || S.length < 1 || S.length > 2) {
|
|
3032
3032
|
c(s, w.GenericArity, \`'\${A}' must be typed with 1 or 2 types: '\${m}'.\`);
|
|
3033
3033
|
return;
|
|
3034
3034
|
}
|
|
3035
3035
|
const x = f;
|
|
3036
|
-
if (x.omittable = !0,
|
|
3037
|
-
const J = qt(e,
|
|
3036
|
+
if (x.omittable = !0, S.length === 2) {
|
|
3037
|
+
const J = qt(e, S[1]);
|
|
3038
3038
|
if (J === void 0) {
|
|
3039
3039
|
c(s, w.InvalidParamType, \`'\${m}' declares '\${A}' with a second type that is not a literal value. Use a number, string, boolean or null - the engine substitutes it for an omitted argument.\`);
|
|
3040
3040
|
return;
|
|
3041
3041
|
}
|
|
3042
3042
|
x.omittedValue = J;
|
|
3043
3043
|
}
|
|
3044
|
-
const K = W(
|
|
3045
|
-
return x.enum && re !== void 0 && re !== null && !x.enum.members.some(([, J]) => J === re) && c(
|
|
3044
|
+
const K = W(S[0], f, d, y, E, L, j, O), re = x.omittedValue;
|
|
3045
|
+
return x.enum && re !== void 0 && re !== null && !x.enum.members.some(([, J]) => J === re) && c(S[1], w.EnumOmittedValue, \`'\${m}': \${JSON.stringify(re)} is not a member of '\${x.enum.id}'. An omitted argument must mean a member (\${x.enum.members.map(([, J]) => JSON.stringify(J)).join(", ")}) or null.\`), K;
|
|
3046
3046
|
}
|
|
3047
3047
|
if (Hr.has(A)) {
|
|
3048
3048
|
const m = f.name ?? g(s);
|
|
@@ -3050,8 +3050,8 @@ function ra(e, t, r, n) {
|
|
|
3050
3050
|
c(s, w.InvalidReturnType, \`'Lazy' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
3051
3051
|
return;
|
|
3052
3052
|
}
|
|
3053
|
-
const
|
|
3054
|
-
if (
|
|
3053
|
+
const S = f;
|
|
3054
|
+
if (S.lazy) {
|
|
3055
3055
|
c(s, w.InvalidParamType, \`'\${m}' declares 'Lazy' more than once.\`);
|
|
3056
3056
|
return;
|
|
3057
3057
|
}
|
|
@@ -3060,29 +3060,29 @@ function ra(e, t, r, n) {
|
|
|
3060
3060
|
c(s, w.GenericArity, \`'\${A}' must be typed with 1 or 2 types: '\${m}'.\`);
|
|
3061
3061
|
return;
|
|
3062
3062
|
}
|
|
3063
|
-
if (
|
|
3063
|
+
if (S.lazy = !0, x.length === 2) {
|
|
3064
3064
|
const K = qt(e, x[1]);
|
|
3065
3065
|
if (K === void 0) {
|
|
3066
3066
|
c(s, w.InvalidParamType, \`'\${m}' declares '\${A}' with a second type that is not a literal value. Use a number, string, boolean or null - the engine substitutes it for an absent argument.\`);
|
|
3067
3067
|
return;
|
|
3068
3068
|
}
|
|
3069
|
-
|
|
3069
|
+
S.optional = !0, S.defaultValue = K;
|
|
3070
3070
|
}
|
|
3071
|
-
W(x[0], f, d, y, E, L, j, O),
|
|
3071
|
+
W(x[0], f, d, y, E, L, j, O), S.enum ? (c(s, w.EnumPosition, \`'\${m}': 'Lazy' cannot hold the enum '\${S.enum.id}'. The argument may never be evaluated, so there is no point at which it could be checked against the members.\`), delete S.enum) : S.lambda != null ? c(s, w.InvalidParamType, \`'\${m}': 'Lazy' cannot be combined with a Lambda parameter - a callable slot is already the body's to call, or not.\`) : S.repeating && c(s, w.InvalidParamType, \`'\${m}': 'Lazy' applies to a VALUE, not to a repeating group - mark the group's slots instead.\`);
|
|
3072
3072
|
return;
|
|
3073
3073
|
}
|
|
3074
|
-
if (
|
|
3074
|
+
if (Ho.has(A)) {
|
|
3075
3075
|
const m = f.name ?? g(s);
|
|
3076
3076
|
if (!y) {
|
|
3077
3077
|
c(s, w.InvalidReturnType, \`'Flatten' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
3078
3078
|
return;
|
|
3079
3079
|
}
|
|
3080
|
-
const
|
|
3081
|
-
if (!
|
|
3080
|
+
const S = s.typeArguments;
|
|
3081
|
+
if (!S || S.length !== 1) {
|
|
3082
3082
|
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
3083
3083
|
return;
|
|
3084
3084
|
}
|
|
3085
|
-
return E.count++, W(
|
|
3085
|
+
return E.count++, W(S[0], f, d, y, E, L);
|
|
3086
3086
|
}
|
|
3087
3087
|
if (zr.get(A) === "repeating") {
|
|
3088
3088
|
const m = f.name ?? g(s);
|
|
@@ -3094,7 +3094,7 @@ function ra(e, t, r, n) {
|
|
|
3094
3094
|
c(s, w.RepeatingPosition, \`'Repeating' cannot be nested inside another type: '\${m}'.\`);
|
|
3095
3095
|
return;
|
|
3096
3096
|
}
|
|
3097
|
-
const
|
|
3097
|
+
const S = f, x = s.typeArguments;
|
|
3098
3098
|
if (!x || x.length < 1 || x.length > 2) {
|
|
3099
3099
|
c(s, w.GenericArity, \`'\${A}' must be typed with 1 type, optionally followed by a maximum argument count: '\${m}'.\`);
|
|
3100
3100
|
return;
|
|
@@ -3115,31 +3115,31 @@ function ra(e, t, r, n) {
|
|
|
3115
3115
|
}
|
|
3116
3116
|
return W(x[0], f, d, y, E, L, j);
|
|
3117
3117
|
}
|
|
3118
|
-
const re =
|
|
3119
|
-
delete
|
|
3118
|
+
const re = S.acceptError;
|
|
3119
|
+
delete S.acceptError;
|
|
3120
3120
|
const J = pe(x[0], m ?? "parameter", d, re);
|
|
3121
|
-
J && (
|
|
3121
|
+
J && (S.repeating = J);
|
|
3122
3122
|
return;
|
|
3123
3123
|
}
|
|
3124
3124
|
const F = ct.get(A);
|
|
3125
3125
|
let V = !1;
|
|
3126
3126
|
F && (f.range = F, V = !0);
|
|
3127
|
-
const z =
|
|
3127
|
+
const z = qo.get(A);
|
|
3128
3128
|
if (z && (f.scalar = z), z !== void 0 && (V = !0), I(s, A, f, d, y)) return;
|
|
3129
3129
|
if (y) {
|
|
3130
3130
|
if (A === "Volatile" || A === \`\${le}.Volatile\`) {
|
|
3131
3131
|
c(s, w.InvalidParamType, \`'Volatile' is not a valid parameter type: '\${g(s)}'. It describes the function's RESULT, so it belongs on the return type.\`);
|
|
3132
3132
|
return;
|
|
3133
3133
|
}
|
|
3134
|
-
if (
|
|
3134
|
+
if (ea.has(A)) return Xt;
|
|
3135
3135
|
const m = mt.get(A);
|
|
3136
3136
|
if (m) return m;
|
|
3137
3137
|
} else {
|
|
3138
|
-
const m =
|
|
3138
|
+
const m = Qo.get(A);
|
|
3139
3139
|
if (m) {
|
|
3140
|
-
const
|
|
3140
|
+
const S = Object.assign(f, m());
|
|
3141
3141
|
let x = 0;
|
|
3142
|
-
if (
|
|
3142
|
+
if (S.async && x++, S.stream && x++, x > 1) {
|
|
3143
3143
|
c(s, w.MultipleModifiers, \`'\${A}' cannot have multiple modifiers: '\${g(s)}'.\`);
|
|
3144
3144
|
return;
|
|
3145
3145
|
}
|
|
@@ -3155,9 +3155,9 @@ function ra(e, t, r, n) {
|
|
|
3155
3155
|
}
|
|
3156
3156
|
}
|
|
3157
3157
|
if (!V) {
|
|
3158
|
-
const m = "number, string, boolean, Scalar, Lambda, Date, FormulaError.Known, IRichData, IRange, IReferenceRange (and arrays of these; optionally wrapped in AcceptError<T>, or grouped with Repeating<T>)",
|
|
3158
|
+
const m = "number, string, boolean, Scalar, Lambda, Date, FormulaError.Known, IRichData, IRange, IReferenceRange (and arrays of these; optionally wrapped in AcceptError<T>, or grouped with Repeating<T>)", S = "number, string, boolean, Scalar, Date, FormulaError.Known, IRichData, IRange, Promise<T>, Observable<T>, Volatile<T> (and arrays of these)";
|
|
3159
3159
|
let x;
|
|
3160
|
-
y ? L ? x = \`'\${A}' is not a valid first parameter: '\${g(s)}'. The first parameter is EITHER a macro target (making this a macro) OR a calculation input (making this a calculation function). Allowed: \${
|
|
3160
|
+
y ? L ? x = \`'\${A}' is not a valid first parameter: '\${g(s)}'. The first parameter is EITHER a macro target (making this a macro) OR a calculation input (making this a calculation function). Allowed: \${Go.join(", ")} (macro target); \${m} (calculation input).\` : x = \`'\${A}' is not a valid parameter type: '\${g(s)}'. Allowed: \${m}.\` : x = \`'\${A}' is not a valid return type: '\${g(s)}'. Allowed: \${S}.\`, c(s, y ? w.InvalidParamType : w.InvalidReturnType, x);
|
|
3161
3161
|
return;
|
|
3162
3162
|
}
|
|
3163
3163
|
const B = s.typeArguments;
|
|
@@ -3166,10 +3166,10 @@ function ra(e, t, r, n) {
|
|
|
3166
3166
|
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${g(s)}'.\`);
|
|
3167
3167
|
return;
|
|
3168
3168
|
}
|
|
3169
|
-
const m = B[0],
|
|
3170
|
-
|
|
3169
|
+
const m = B[0], S = y && e.isTypeReferenceNode(m) && ut.has(ve(m)), x = f.reportType;
|
|
3170
|
+
S && U.add(f), T(m, f, d, y), S && x === void 0 && delete f.reportType;
|
|
3171
3171
|
const K = f.enum;
|
|
3172
|
-
K && !
|
|
3172
|
+
K && !S && (c(B[0], w.EnumPosition, \`'\${A}' cannot hold the enum '\${K.id}': '\${g(s)}'. The members of a range reach the body as they are, so nothing checks them against the enum. Take the enum as a value, or type the range by its scalar ('\${A}<\${K.type}>').\`), delete f.enum);
|
|
3173
3173
|
}
|
|
3174
3174
|
} else s.kind === e.SyntaxKind.FunctionType && M(s, f, d, y);
|
|
3175
3175
|
}, Ge = (s) => (e.getCombinedModifierFlags(s) & e.ModifierFlags.Export) !== 0, qe = (s) => (e.getCombinedModifierFlags(s) & e.ModifierFlags.Default) !== 0;
|
|
@@ -3195,7 +3195,7 @@ function ra(e, t, r, n) {
|
|
|
3195
3195
|
const O = {};
|
|
3196
3196
|
qe(s) && (O.default = !0, u = f), d.parameters = [];
|
|
3197
3197
|
const A = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Set();
|
|
3198
|
-
let z = null, B = null, m = null,
|
|
3198
|
+
let z = null, B = null, m = null, S = 0, x = !1, K = 0;
|
|
3199
3199
|
for (let D = 0; D < s.parameters.length; D++) {
|
|
3200
3200
|
const _ = s.parameters[D], $ = {};
|
|
3201
3201
|
$.name = _.name?.getText();
|
|
@@ -3261,13 +3261,13 @@ function ra(e, t, r, n) {
|
|
|
3261
3261
|
c(_, w.RepeatingOptional, \`'\${d.name}' parameter '\${m}' is optional and precedes the repeating group '\${$.name}'. Every parameter outside a group must be required.\`);
|
|
3262
3262
|
return;
|
|
3263
3263
|
}
|
|
3264
|
-
B = $.name,
|
|
3264
|
+
B = $.name, S = X.length, x = X[X.length - 1].optional === !0;
|
|
3265
3265
|
} else if (B !== null && $.rest) {
|
|
3266
3266
|
c(_, w.RepeatingOptional, \`'\${d.name}' parameter '\${$.name}' is a rest parameter and follows the repeating group '\${B}'. Two variadic tails would make the argument count ambiguous.\`);
|
|
3267
3267
|
return;
|
|
3268
3268
|
} else if (B !== null && ye) {
|
|
3269
|
-
if (K >=
|
|
3270
|
-
c(_, w.RepeatingOptional,
|
|
3269
|
+
if (K >= S - 1) {
|
|
3270
|
+
c(_, w.RepeatingOptional, S === 1 ? \`'\${d.name}' parameter '\${$.name}' is optional and follows the period-1 repeating group '\${B}'. One more argument is indistinguishable from one more repetition — make it required, or give the group a period.\` : \`'\${d.name}' has \${K + 1} optional parameters after the repeating group '\${B}', which has period \${S}. At most \${S - 1} may be optional, or the argument count no longer decides the parse.\`);
|
|
3271
3271
|
return;
|
|
3272
3272
|
}
|
|
3273
3273
|
if (x) {
|
|
@@ -3325,7 +3325,7 @@ function ra(e, t, r, n) {
|
|
|
3325
3325
|
if (!X) continue;
|
|
3326
3326
|
X = X.toLowerCase();
|
|
3327
3327
|
let G = ae.comment;
|
|
3328
|
-
const Me =
|
|
3328
|
+
const Me = Xo(X);
|
|
3329
3329
|
if (typeof G != "string" && !Me) {
|
|
3330
3330
|
X === "returnkind" && c(ae, w.UnknownReturnKind, \`'@returnKind' needs a value kind. Known: \${[...tt].map((Q) => \`'\${Q}'\`).join(", ")}.\`);
|
|
3331
3331
|
continue;
|
|
@@ -3337,7 +3337,7 @@ function ra(e, t, r, n) {
|
|
|
3337
3337
|
const Q = /\\{@link(code|plain)?\\s+([^}|]+)(?:\\s*\\|\\s*([^}]+))?\\}/g;
|
|
3338
3338
|
let se, He = G, ce = [];
|
|
3339
3339
|
for (; (se = Q.exec(G)) !== null;) {
|
|
3340
|
-
const [we,
|
|
3340
|
+
const [we, Ta, Zr, ht] = se, Qr = [Zr.trim()];
|
|
3341
3341
|
ht && Qr.push(ht.trim());
|
|
3342
3342
|
}
|
|
3343
3343
|
G = He, ce.length > 0 && X === "see" && (y.links || (y.links = []), y.links.push(...ce));
|
|
@@ -3371,12 +3371,12 @@ function ra(e, t, r, n) {
|
|
|
3371
3371
|
}
|
|
3372
3372
|
Object.keys(d.returnType).length === 0 && delete d.returnType, Object.keys(O).length > 0 && (d.behavior = O), y.summary || h(s.name ?? s, w.MissingSummary, "warning", \`'\${f}': missing a description. Add a JSDoc comment above the function.\`);
|
|
3373
3373
|
const J = !d.context, ee = J && y.name || f;
|
|
3374
|
-
if (J && !
|
|
3374
|
+
if (J && !Wo.test(ee)) {
|
|
3375
3375
|
const D = y.name ? \`'@name \${y.name}'\` : \`'\${ee}'\`;
|
|
3376
3376
|
c(s.name ?? s, w.InvalidName, \`'\${f}': \${D} cannot be called from a formula. A function name starts with a letter or '_', and continues with letters, digits, '_' or '.'.\` + (y.name ? "" : " Add an '@name' tag to register it under another name."));
|
|
3377
3377
|
return;
|
|
3378
3378
|
}
|
|
3379
|
-
if (J && !n?.isBuiltIn &&
|
|
3379
|
+
if (J && !n?.isBuiltIn && Zo(ee)) {
|
|
3380
3380
|
const D = y.name ? \`'@name \${y.name}'\` : \`'\${ee}'\`;
|
|
3381
3381
|
c(s.name ?? s, w.InvalidName, \`'\${f}': \${D} cannot be called from a formula. It reads as a cell address.\` + (y.name ? "" : " Add an '@name' tag to register it under another name."));
|
|
3382
3382
|
return;
|
|
@@ -3413,8 +3413,8 @@ function ra(e, t, r, n) {
|
|
|
3413
3413
|
};
|
|
3414
3414
|
}
|
|
3415
3415
|
const Ve = "__SHEETXL";
|
|
3416
|
-
var
|
|
3417
|
-
async function
|
|
3416
|
+
var ra = /* @__PURE__ */ Zt({ initialize: () => na });
|
|
3417
|
+
async function na() {
|
|
3418
3418
|
return Te || (Te = new Promise(async (e, t) => {
|
|
3419
3419
|
try {
|
|
3420
3420
|
const r = "0.20.2", n = \`https://esm.sh/esbuild-wasm@\${r}\`, o = \`https://esm.sh/esbuild-wasm@\${r}/esbuild.wasm\`, a = (await import(
|
|
@@ -3431,11 +3431,11 @@ async function oa() {
|
|
|
3431
3431
|
}
|
|
3432
3432
|
}), Te);
|
|
3433
3433
|
}
|
|
3434
|
-
var Te,
|
|
3434
|
+
var Te, oa = Yt((() => {
|
|
3435
3435
|
Te = null;
|
|
3436
3436
|
}));
|
|
3437
3437
|
let xe = null, Ue = null;
|
|
3438
|
-
async function
|
|
3438
|
+
async function aa() {
|
|
3439
3439
|
if (xe) return xe;
|
|
3440
3440
|
if (Ue) {
|
|
3441
3441
|
if (await Ue, !xe) throw new Error("ESBuild initialization promise resolved, but instance is not available.");
|
|
@@ -3446,16 +3446,16 @@ async function ia() {
|
|
|
3446
3446
|
e = r, t = n;
|
|
3447
3447
|
});
|
|
3448
3448
|
try {
|
|
3449
|
-
const { initialize: r } = await Promise.resolve().then(() => (
|
|
3449
|
+
const { initialize: r } = await Promise.resolve().then(() => (oa(), ra));
|
|
3450
3450
|
return xe = await r(), e(), xe;
|
|
3451
3451
|
} catch (r) {
|
|
3452
3452
|
throw console.error("Failed to import or initialize esbuild:", r), Ue = null, t(r), r;
|
|
3453
3453
|
}
|
|
3454
3454
|
}
|
|
3455
|
-
const
|
|
3456
|
-
async function
|
|
3455
|
+
const ia = { compilerOptions: { target: "esnext" } };
|
|
3456
|
+
async function la(e, t, r = "/script.js", n = Ve) {
|
|
3457
3457
|
try {
|
|
3458
|
-
const o = await
|
|
3458
|
+
const o = await aa(), a = "@sheetxl/primitives", l = \`
|
|
3459
3459
|
export const FormulaContext = globalThis.\${n}?.FormulaContext;
|
|
3460
3460
|
export const ScalarType = globalThis.\${n}?.ScalarType;
|
|
3461
3461
|
export const Observable = globalThis.\${n}?.Observable;
|
|
@@ -3495,7 +3495,7 @@ async function sa(e, t, r = "/script.js", n = Ve) {
|
|
|
3495
3495
|
}
|
|
3496
3496
|
}],
|
|
3497
3497
|
sourcemap: "inline",
|
|
3498
|
-
tsconfigRaw:
|
|
3498
|
+
tsconfigRaw: ia,
|
|
3499
3499
|
minify: !0,
|
|
3500
3500
|
platform: "neutral"
|
|
3501
3501
|
});
|
|
@@ -3506,7 +3506,7 @@ async function sa(e, t, r = "/script.js", n = Ve) {
|
|
|
3506
3506
|
throw console.error("esbuild bundling process failed:", o), o;
|
|
3507
3507
|
}
|
|
3508
3508
|
}
|
|
3509
|
-
function
|
|
3509
|
+
function sa(e, t, r) {
|
|
3510
3510
|
return (n) => {
|
|
3511
3511
|
const o = n.factory, a = () => o.createExpressionStatement(o.createCallChain(o.createPropertyAccessExpression(o.createIdentifier(Ve), "checkRun"), o.createToken(e.SyntaxKind.QuestionDotToken), void 0, [o.createStringLiteral(t), o.createNumericLiteral(r)])), l = (c) => {
|
|
3512
3512
|
const g = c.statements;
|
|
@@ -3537,16 +3537,16 @@ function ca(e, t, r) {
|
|
|
3537
3537
|
return (c) => e.visitNode(c, h);
|
|
3538
3538
|
};
|
|
3539
3539
|
}
|
|
3540
|
-
const
|
|
3541
|
-
function
|
|
3540
|
+
const ca = /* @__PURE__ */ new Set(["TS2339", "TS2551"]), ua = "TS2774";
|
|
3541
|
+
function da(e, t, r) {
|
|
3542
3542
|
let n = null;
|
|
3543
3543
|
const o = (a) => {
|
|
3544
3544
|
r < a.getStart(t) || r >= a.end || (a.getStart(t) === r && (n = a), e.forEachChild(a, o));
|
|
3545
3545
|
};
|
|
3546
3546
|
return e.forEachChild(t, o), n;
|
|
3547
3547
|
}
|
|
3548
|
-
const
|
|
3549
|
-
function
|
|
3548
|
+
const fa = (e, t) => t.kind === e.SyntaxKind.NullKeyword || e.isIdentifier(t) && t.text === "undefined";
|
|
3549
|
+
function pa(e, t) {
|
|
3550
3550
|
const r = t.parent;
|
|
3551
3551
|
if (!r || !e.isPropertyAccessExpression(r) || r.name !== t) return !1;
|
|
3552
3552
|
let n = r, o = r.parent;
|
|
@@ -3560,20 +3560,20 @@ function ma(e, t) {
|
|
|
3560
3560
|
if (e.isBinaryExpression(o)) {
|
|
3561
3561
|
const a = o.operatorToken.kind, l = e.SyntaxKind;
|
|
3562
3562
|
if (a === l.AmpersandAmpersandToken || a === l.BarBarToken || a === l.QuestionQuestionToken) return o.left === n;
|
|
3563
|
-
if (a === l.EqualsEqualsEqualsToken || a === l.ExclamationEqualsEqualsToken || a === l.EqualsEqualsToken || a === l.ExclamationEqualsToken) return
|
|
3563
|
+
if (a === l.EqualsEqualsEqualsToken || a === l.ExclamationEqualsEqualsToken || a === l.EqualsEqualsToken || a === l.ExclamationEqualsToken) return fa(e, o.left === n ? o.right : o.left);
|
|
3564
3564
|
}
|
|
3565
3565
|
return !1;
|
|
3566
3566
|
}
|
|
3567
|
-
function
|
|
3567
|
+
function ma(e, t, r) {
|
|
3568
3568
|
const n = [];
|
|
3569
3569
|
for (const o of r) if (o.code !== w.MissingType) if (o.severity !== "error") n.push(o);
|
|
3570
|
-
else if (o.code ===
|
|
3570
|
+
else if (o.code === ua) n.push({
|
|
3571
3571
|
...o,
|
|
3572
3572
|
severity: "warning"
|
|
3573
3573
|
});
|
|
3574
|
-
else if (
|
|
3575
|
-
const a =
|
|
3576
|
-
n.push(a &&
|
|
3574
|
+
else if (ca.has(o.code)) {
|
|
3575
|
+
const a = da(e, t, o.start);
|
|
3576
|
+
n.push(a && pa(e, a) ? {
|
|
3577
3577
|
...o,
|
|
3578
3578
|
severity: "warning",
|
|
3579
3579
|
message: \`\${o.message} Read as a probe, it is undefined.\`
|
|
@@ -3583,10 +3583,10 @@ function ga(e, t, r) {
|
|
|
3583
3583
|
}
|
|
3584
3584
|
const Ht = "//# sourceMappingURL";
|
|
3585
3585
|
var Wr = /* @__PURE__ */ Zt({
|
|
3586
|
-
initialize: () =>
|
|
3587
|
-
readLibFile: () =>
|
|
3586
|
+
initialize: () => ga,
|
|
3587
|
+
readLibFile: () => ha
|
|
3588
3588
|
});
|
|
3589
|
-
async function
|
|
3589
|
+
async function ga() {
|
|
3590
3590
|
return Ce || (Ce = new Promise(async (e, t) => {
|
|
3591
3591
|
let r = null;
|
|
3592
3592
|
try {
|
|
@@ -3601,11 +3601,11 @@ async function ha() {
|
|
|
3601
3601
|
r || (console.log("use script fallback"), Ce = null), e(r);
|
|
3602
3602
|
}), Ce);
|
|
3603
3603
|
}
|
|
3604
|
-
function
|
|
3604
|
+
function ha(e, t) {}
|
|
3605
3605
|
var Ce, Jr = Yt((() => {
|
|
3606
3606
|
Ce = null;
|
|
3607
3607
|
}));
|
|
3608
|
-
const
|
|
3608
|
+
const ya = \`
|
|
3609
3609
|
/**
|
|
3610
3610
|
* Represents the completion of an asynchronous operation
|
|
3611
3611
|
*/
|
|
@@ -3618,20 +3618,20 @@ interface Promise<T> {
|
|
|
3618
3618
|
*/
|
|
3619
3619
|
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
|
3620
3620
|
}
|
|
3621
|
-
\`,
|
|
3621
|
+
\`, wa = \`
|
|
3622
3622
|
interface FirstTest {
|
|
3623
3623
|
isTrue?: boolean;
|
|
3624
3624
|
}
|
|
3625
|
-
\`, Sa = async () =>
|
|
3625
|
+
\`, Sa = async () => wa;
|
|
3626
3626
|
let je = null;
|
|
3627
|
-
const rt = "sheetxl.d.ts", Wt = "sheetxl-modules.d.ts",
|
|
3628
|
-
\`,
|
|
3627
|
+
const rt = "sheetxl.d.ts", Wt = "sheetxl-modules.d.ts", ba = \`declare module '@sheetxl/primitives' { export = SheetXL; }
|
|
3628
|
+
\`, Ea = [
|
|
3629
3629
|
"lib.webworker.d.ts",
|
|
3630
3630
|
"lib.es2020.d.ts",
|
|
3631
3631
|
"lib.esnext.asynciterable.d.ts"
|
|
3632
3632
|
], Jt = /* @__PURE__ */ new Map();
|
|
3633
3633
|
let nt = null, ot = null;
|
|
3634
|
-
async function
|
|
3634
|
+
async function va() {
|
|
3635
3635
|
return ot || (ot = Promise.resolve().then(() => (Jr(), Wr)).then(async (e) => {
|
|
3636
3636
|
const t = await Yr();
|
|
3637
3637
|
return e.readLibFile(t, "lib.es5.d.ts") !== void 0 ? e.readLibFile : null;
|
|
@@ -3649,7 +3649,7 @@ async function Yr() {
|
|
|
3649
3649
|
je = null;
|
|
3650
3650
|
}
|
|
3651
3651
|
}
|
|
3652
|
-
async function
|
|
3652
|
+
async function xa(e) {
|
|
3653
3653
|
const t = e?.source ?? null;
|
|
3654
3654
|
if (!t) return {
|
|
3655
3655
|
module: null,
|
|
@@ -3658,7 +3658,7 @@ async function Ta(e) {
|
|
|
3658
3658
|
const r = (e.disableBundle || e.declarationsOnly) ?? !1, [n, o, a] = await Promise.all([
|
|
3659
3659
|
Sa(),
|
|
3660
3660
|
Yr(),
|
|
3661
|
-
e.ambientTypes ?
|
|
3661
|
+
e.ambientTypes ? va() : null
|
|
3662
3662
|
]), l = a ? e.ambientTypes ?? null : null;
|
|
3663
3663
|
let i = "";
|
|
3664
3664
|
const u = {
|
|
@@ -3674,18 +3674,18 @@ async function Ta(e) {
|
|
|
3674
3674
|
emitDeclarationOnly: !1,
|
|
3675
3675
|
target: o.ScriptTarget.ES2020,
|
|
3676
3676
|
...l ? {
|
|
3677
|
-
lib:
|
|
3677
|
+
lib: Ea,
|
|
3678
3678
|
skipLibCheck: !0,
|
|
3679
3679
|
strict: !0
|
|
3680
3680
|
} : {},
|
|
3681
3681
|
...l && e.lenient ? { noImplicitAny: !1 } : {}
|
|
3682
3682
|
}, p = "script", h = \`\${p}.ts\`, c = "lib.d.ts", g = "global.d.ts", T = {
|
|
3683
3683
|
[h]: t,
|
|
3684
|
-
[c]:
|
|
3684
|
+
[c]: ya,
|
|
3685
3685
|
[g]: n,
|
|
3686
3686
|
...l ? {
|
|
3687
3687
|
[rt]: l,
|
|
3688
|
-
[Wt]:
|
|
3688
|
+
[Wt]: ba
|
|
3689
3689
|
} : {}
|
|
3690
3690
|
}, I = (d) => T[d] ?? (a && d.startsWith("lib.") ? a(o, d) : void 0), M = {
|
|
3691
3691
|
getSourceFile: (d, y, E, L) => {
|
|
@@ -3720,7 +3720,7 @@ async function Ta(e) {
|
|
|
3720
3720
|
g,
|
|
3721
3721
|
...l ? [rt, Wt] : []
|
|
3722
3722
|
], u, M), v = q.getTypeChecker(), C = q.getSourceFile(h), R = e.runGuard;
|
|
3723
|
-
q.emit(void 0, void 0, void 0, void 0, R ? { before: [
|
|
3723
|
+
q.emit(void 0, void 0, void 0, void 0, R ? { before: [sa(o, R.key, R.timeoutMs)] } : void 0), i = T[\`\${p}.js\`] ?? "";
|
|
3724
3724
|
const U = (d) => ({
|
|
3725
3725
|
start: d.start ?? 0,
|
|
3726
3726
|
length: d.length ?? 0,
|
|
@@ -3728,7 +3728,7 @@ async function Ta(e) {
|
|
|
3728
3728
|
code: \`TS\${d.code}\`,
|
|
3729
3729
|
message: o.flattenDiagnosticMessageText(d.messageText, \`
|
|
3730
3730
|
\`)
|
|
3731
|
-
}), Z = q.getSyntacticDiagnostics(C).map(U), P = l ? q.getSemanticDiagnostics(C).filter((d) => d.category === o.DiagnosticCategory.Error || d.category === o.DiagnosticCategory.Warning).map(U) : [], N =
|
|
3731
|
+
}), Z = q.getSyntacticDiagnostics(C).map(U), P = l ? q.getSemanticDiagnostics(C).filter((d) => d.category === o.DiagnosticCategory.Error || d.category === o.DiagnosticCategory.Warning).map(U) : [], N = ta(o, C, v, {
|
|
3732
3732
|
builtInNames: e.builtInNames,
|
|
3733
3733
|
isBuiltIn: e.isBuiltIn,
|
|
3734
3734
|
lenient: !!l && e.lenient
|
|
@@ -3738,13 +3738,13 @@ async function Ta(e) {
|
|
|
3738
3738
|
...P,
|
|
3739
3739
|
...N.diagnostics
|
|
3740
3740
|
];
|
|
3741
|
-
l && e.lenient && (k =
|
|
3741
|
+
l && e.lenient && (k = ma(o, C, k));
|
|
3742
3742
|
const pe = N.functions, W = N.autoRun, Ge = k.some((d) => d.severity === "error"), qe = \`\${Qt.uuidV4()}-script\`;
|
|
3743
3743
|
let s = null;
|
|
3744
3744
|
if (Ge) i = "";
|
|
3745
3745
|
else {
|
|
3746
3746
|
try {
|
|
3747
|
-
r || (i = await
|
|
3747
|
+
r || (i = await la(o, i, p));
|
|
3748
3748
|
} catch {
|
|
3749
3749
|
console.warn("Error bundling script");
|
|
3750
3750
|
}
|
|
@@ -3766,7 +3766,7 @@ async function Ta(e) {
|
|
|
3766
3766
|
self.addEventListener("message", async (e) => {
|
|
3767
3767
|
const { id: t, params: r } = e.data;
|
|
3768
3768
|
try {
|
|
3769
|
-
const n = await
|
|
3769
|
+
const n = await xa(r);
|
|
3770
3770
|
self.postMessage({
|
|
3771
3771
|
id: t,
|
|
3772
3772
|
result: n,
|