@univerjs/engine-formula 0.10.6 → 0.10.7
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/lib/cjs/index.js +2 -2
- package/lib/es/index.js +269 -265
- package/lib/index.js +269 -265
- package/lib/types/basics/error-type.d.ts +13 -0
- package/lib/types/engine/utils/cell.d.ts +7 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/umd/index.js +2 -2
- package/package.json +5 -5
package/lib/es/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Ku = Object.defineProperty;
|
|
2
2
|
var Xu = (i, a, e) => a in i ? Ku(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
|
|
3
3
|
var A = (i, a, e) => Xu(i, typeof a != "symbol" ? a + "" : a, e);
|
|
4
|
-
import { ObjectMatrix as Ce, CommandType as Ie, RANGE_TYPE as et, AbsoluteRefType as we, Tools as qe, createIdentifier as Ze, Disposable as Ne, IUniverInstanceService as Yn, LRUMap as Zu, hashAlgorithm as zu, moveRangeByOffset as aa, isValidRange as Ju, isFormulaString as
|
|
5
|
-
import { Subject as
|
|
4
|
+
import { ObjectMatrix as Ce, CommandType as Ie, RANGE_TYPE as et, AbsoluteRefType as we, Tools as qe, createIdentifier as Ze, Disposable as Ne, IUniverInstanceService as Yn, LRUMap as Zu, hashAlgorithm as zu, moveRangeByOffset as aa, isValidRange as Ju, isFormulaString as gt, isFormulaId as Vt, Rectangle as Za, cellToRange as ec, Inject as ye, UniverInstanceType as fr, BooleanNumber as qi, LocaleService as tc, LocaleType as ht, numfmt as _t, BuildTextUtils as rc, isRealNum as W, CellValueType as pt, isTextFormat as nc, RichTextBuilder as sc, toDisposable as ac, Injector as Ki, generateRandomId as ic, sortRules as oc, RTree as Ms, IConfigService as ia, AsyncLock as uc, requestImmediateMacroTask as cc, ICommandService as ar, DataStreamTreeTokenType as ve, DisposableCollection as lc, Optional as fc, Plugin as hc, merge as mc, touchDependencies as ls } from "@univerjs/core";
|
|
5
|
+
import { Subject as hr, BehaviorSubject as Xi, distinctUntilChanged as Zi, combineLatest as gc, map as dc, Observable as Cc, shareReplay as _c } from "rxjs";
|
|
6
6
|
import { DataSyncPrimaryController as Ac } from "@univerjs/rpc";
|
|
7
7
|
var tr = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(tr || {}), jt = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(jt || {}), ct = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ct || {});
|
|
8
8
|
function Ec(i, a, e, t, r) {
|
|
@@ -17,7 +17,7 @@ function Ec(i, a, e, t, r) {
|
|
|
17
17
|
return !1;
|
|
18
18
|
}
|
|
19
19
|
var m = /* @__PURE__ */ ((i) => (i.DIV_BY_ZERO = "#DIV/0!", i.NAME = "#NAME?", i.VALUE = "#VALUE!", i.NUM = "#NUM!", i.NA = "#N/A", i.CYCLE = "#CYCLE!", i.REF = "#REF!", i.SPILL = "#SPILL!", i.CALC = "#CALC!", i.ERROR = "#ERROR!", i.CONNECT = "#GETTING_DATA", i.NULL = "#NULL!", i))(m || {});
|
|
20
|
-
const
|
|
20
|
+
const ir = new Set(Object.values(m)), za = [...new Set(Object.values(m).map((i) => i.length))];
|
|
21
21
|
var bc = /* @__PURE__ */ ((i) => (i[i.Financial = 0] = "Financial", i[i.Date = 1] = "Date", i[i.Math = 2] = "Math", i[i.Statistical = 3] = "Statistical", i[i.Lookup = 4] = "Lookup", i[i.Database = 5] = "Database", i[i.Text = 6] = "Text", i[i.Logical = 7] = "Logical", i[i.Information = 8] = "Information", i[i.Engineering = 9] = "Engineering", i[i.Cube = 10] = "Cube", i[i.Compatibility = 11] = "Compatibility", i[i.Web = 12] = "Web", i[i.Array = 13] = "Array", i[i.Univer = 14] = "Univer", i[i.User = 15] = "User", i[i.DefinedName = 16] = "DefinedName", i))(bc || {}), X = /* @__PURE__ */ ((i) => (i.PLUS = "+", i.MINUS = "-", i.MULTIPLY = "*", i.DIVIDED = "/", i.CONCATENATE = "&", i.POWER = "^", i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(X || {}), k = /* @__PURE__ */ ((i) => (i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(k || {});
|
|
22
22
|
const sn = /* @__PURE__ */ new Map([
|
|
23
23
|
["<>", 4],
|
|
@@ -33,7 +33,7 @@ const sn = /* @__PURE__ */ new Map([
|
|
|
33
33
|
["*", 1],
|
|
34
34
|
["^", 0]
|
|
35
35
|
// ^
|
|
36
|
-
]),
|
|
36
|
+
]), Pt = new Set(sn.keys()), yc = /* @__PURE__ */ new Set([
|
|
37
37
|
"=",
|
|
38
38
|
"<>",
|
|
39
39
|
">",
|
|
@@ -357,7 +357,7 @@ let xs = class extends Ne {
|
|
|
357
357
|
A(this, "_definedNameMap", {});
|
|
358
358
|
A(this, "_nameCacheMap", {});
|
|
359
359
|
// Cache for name-to-definition mapping
|
|
360
|
-
A(this, "_update$", new
|
|
360
|
+
A(this, "_update$", new hr());
|
|
361
361
|
A(this, "update$", this._update$.asObservable());
|
|
362
362
|
A(this, "_currentRange", {
|
|
363
363
|
unitId: "",
|
|
@@ -369,9 +369,9 @@ let xs = class extends Ne {
|
|
|
369
369
|
endColumn: 0
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
|
-
A(this, "_currentRange$", new
|
|
372
|
+
A(this, "_currentRange$", new hr());
|
|
373
373
|
A(this, "currentRange$", this._currentRange$.asObservable());
|
|
374
|
-
A(this, "_focusRange$", new
|
|
374
|
+
A(this, "_focusRange$", new hr());
|
|
375
375
|
A(this, "focusRange$", this._focusRange$.asObservable());
|
|
376
376
|
this._univerInstanceService = a;
|
|
377
377
|
}
|
|
@@ -531,7 +531,7 @@ const Nr = Ze("univer.formula.defined-names.service"), Zb = (i, a) => {
|
|
|
531
531
|
type: Ie.MUTATION,
|
|
532
532
|
handler: () => !0
|
|
533
533
|
};
|
|
534
|
-
class
|
|
534
|
+
class Mt {
|
|
535
535
|
constructor(a) {
|
|
536
536
|
A(this, "_cache");
|
|
537
537
|
this._cache = new Zu(a);
|
|
@@ -557,8 +557,8 @@ class Ot {
|
|
|
557
557
|
return a.length <= 64 ? a : zu(a).toString();
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
const mt = "P_1", vt = "R_1",
|
|
561
|
-
function
|
|
560
|
+
const mt = "P_1", vt = "R_1", dr = "L_1", Fr = "LR_1", mo = "LO_1", tl = "LET", xr = "LAMBDA", rl = "CUBE", nl = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), js = new Mt(1e5);
|
|
561
|
+
function Cr(i) {
|
|
562
562
|
const a = js.get(i);
|
|
563
563
|
if (a)
|
|
564
564
|
return a;
|
|
@@ -682,7 +682,7 @@ class ae {
|
|
|
682
682
|
return r;
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
const go = 2e3, ms = new
|
|
685
|
+
const go = 2e3, ms = new Mt(go), gs = new Mt(go);
|
|
686
686
|
class ga extends Ne {
|
|
687
687
|
constructor() {
|
|
688
688
|
super(...arguments);
|
|
@@ -802,7 +802,7 @@ class ga extends Ne {
|
|
|
802
802
|
for (let u = 0, c = s.length; u < c; u++) {
|
|
803
803
|
const l = s[u];
|
|
804
804
|
if (typeof l != "string" && l.nodeType === $e.REFERENCE) {
|
|
805
|
-
const { token: f, endIndex: h } = l, d =
|
|
805
|
+
const { token: f, endIndex: h } = l, d = Cr(f);
|
|
806
806
|
if (d == null)
|
|
807
807
|
continue;
|
|
808
808
|
const { range: _, sheetName: C, unitId: E } = d, b = {
|
|
@@ -838,7 +838,7 @@ class ga extends Ne {
|
|
|
838
838
|
o.push(l);
|
|
839
839
|
continue;
|
|
840
840
|
}
|
|
841
|
-
const { token: f } = l, h =
|
|
841
|
+
const { token: f } = l, h = Cr(f), { sheetName: d, unitId: _ } = h;
|
|
842
842
|
let C = h.range;
|
|
843
843
|
if (!n && C.startAbsoluteRefType === we.ALL && C.endAbsoluteRefType === we.ALL) {
|
|
844
844
|
o.push(l);
|
|
@@ -865,7 +865,7 @@ class ga extends Ne {
|
|
|
865
865
|
if (this._currentLexerNode.getChildren().length === 0)
|
|
866
866
|
return !0;
|
|
867
867
|
const e = this._currentLexerNode.getChildren()[0];
|
|
868
|
-
return !!(e instanceof ae ||
|
|
868
|
+
return !!(e instanceof ae || Pt.has(e) || fs.has(e) || e === Me.AT || e === K.COMMA || e === K.COLON || e === K.OPEN_BRACKET);
|
|
869
869
|
}
|
|
870
870
|
// eslint-disable-next-line complexity
|
|
871
871
|
getSequenceNode(e) {
|
|
@@ -1013,7 +1013,7 @@ class ga extends Ne {
|
|
|
1013
1013
|
const f = l.trim();
|
|
1014
1014
|
if (f === "")
|
|
1015
1015
|
continue;
|
|
1016
|
-
if (
|
|
1016
|
+
if (Pt.has(f)) {
|
|
1017
1017
|
if (f === X.PLUS && this._deletePlusForPreNode(t[c - 1]))
|
|
1018
1018
|
continue;
|
|
1019
1019
|
if (f !== X.PLUS && f !== X.MINUS && this._deletePlusForPreNode(t[c - 1]))
|
|
@@ -1076,14 +1076,14 @@ class ga extends Ne {
|
|
|
1076
1076
|
return e === K.OPEN_BRACKET;
|
|
1077
1077
|
}
|
|
1078
1078
|
_checkOperator(e) {
|
|
1079
|
-
return e == null || e instanceof ae ? !1 :
|
|
1079
|
+
return e == null || e instanceof ae ? !1 : Pt.has(e);
|
|
1080
1080
|
}
|
|
1081
1081
|
_deletePlusForPreNode(e) {
|
|
1082
1082
|
if (e == null)
|
|
1083
1083
|
return !0;
|
|
1084
1084
|
if (!(e instanceof ae)) {
|
|
1085
1085
|
const t = e.trim();
|
|
1086
|
-
if (
|
|
1086
|
+
if (Pt.has(t) || t === K.OPEN_BRACKET)
|
|
1087
1087
|
return !0;
|
|
1088
1088
|
}
|
|
1089
1089
|
return !1;
|
|
@@ -1180,7 +1180,7 @@ class ga extends Ne {
|
|
|
1180
1180
|
var r, n, s, o, u, c;
|
|
1181
1181
|
const e = (r = this._currentLexerNode) == null ? void 0 : r.getParent();
|
|
1182
1182
|
let t = !1;
|
|
1183
|
-
if (e && e.getToken() ===
|
|
1183
|
+
if (e && e.getToken() === dr) {
|
|
1184
1184
|
if ((n = e == null ? void 0 : e.getParent()) != null && n.getParent()) {
|
|
1185
1185
|
const l = (o = (s = this._currentLexerNode.getParent()) == null ? void 0 : s.getParent()) == null ? void 0 : o.getParent();
|
|
1186
1186
|
l && (this._currentLexerNode = l), t = !0;
|
|
@@ -1284,7 +1284,7 @@ class ga extends Ne {
|
|
|
1284
1284
|
return !!(this._isOperatorToken(e) || this._unexpectedEndingTokenExcludeOperator(e));
|
|
1285
1285
|
}
|
|
1286
1286
|
_isOperatorToken(e) {
|
|
1287
|
-
return !!
|
|
1287
|
+
return !!Pt.has(e);
|
|
1288
1288
|
}
|
|
1289
1289
|
_getSequenceArray(e) {
|
|
1290
1290
|
const t = [];
|
|
@@ -1311,7 +1311,7 @@ class ga extends Ne {
|
|
|
1311
1311
|
_findErrorObject(e, t) {
|
|
1312
1312
|
for (let r = 0; r < za.length; r++) {
|
|
1313
1313
|
const n = za[r], s = t.slice(e, e + n).join("").toUpperCase();
|
|
1314
|
-
if (
|
|
1314
|
+
if (ir.has(s))
|
|
1315
1315
|
return s;
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
@@ -1367,7 +1367,7 @@ class ga extends Ne {
|
|
|
1367
1367
|
if (f && f === K.OPEN_BRACKET) {
|
|
1368
1368
|
if (!this._setParentCurrentLexerNode() && u !== o - 1)
|
|
1369
1369
|
return m.VALUE;
|
|
1370
|
-
this._newAndPushCurrentLexerNode(
|
|
1370
|
+
this._newAndPushCurrentLexerNode(dr, u, !0), this._openLambda();
|
|
1371
1371
|
} else if (!this._setAncestorCurrentLexerNode() && u !== o - 1)
|
|
1372
1372
|
return m.VALUE;
|
|
1373
1373
|
} else
|
|
@@ -1458,7 +1458,7 @@ class ga extends Ne {
|
|
|
1458
1458
|
l.setToken(c);
|
|
1459
1459
|
const f = this._getLastChildCurrent();
|
|
1460
1460
|
f instanceof ae ? f.changeToParent(l) : f !== !1 && (l.getChildren().push(f), this._removeLastChild()), this._pushNodeToChildren(l), l.setParent(this._currentLexerNode), this._resetSegment();
|
|
1461
|
-
} else if (
|
|
1461
|
+
} else if (Pt.has(c) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
|
|
1462
1462
|
let l = this._segment.trim();
|
|
1463
1463
|
if (c === X.MINUS && l === "") {
|
|
1464
1464
|
const f = this._findPreviousToken(s, u - 1) || "", h = this._findNextToken(s, u + 1) || "";
|
|
@@ -1479,7 +1479,7 @@ class ga extends Ne {
|
|
|
1479
1479
|
} else this._segment.length > 0 && l === "" ? l = this._segment : (this._pushNodeToChildren(this._segment), l = "");
|
|
1480
1480
|
if (c === X.LESS_THAN || c === X.GREATER_THAN) {
|
|
1481
1481
|
const f = s[u + 1];
|
|
1482
|
-
if (f &&
|
|
1482
|
+
if (f && Pt.has(c + f)) {
|
|
1483
1483
|
this._pushNodeToChildren(l + c + f), this._resetSegment(), this._addSequenceArray(t, c, u), u++, this._addSequenceArray(t, f, u), u++;
|
|
1484
1484
|
continue;
|
|
1485
1485
|
} else
|
|
@@ -1514,10 +1514,10 @@ class ga extends Ne {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
1516
|
function al(i, a, e, t, r, n, s) {
|
|
1517
|
-
const o = (s == null ? void 0 : s.f) || "", u = (s == null ? void 0 : s.si) || "", c =
|
|
1517
|
+
const o = (s == null ? void 0 : s.f) || "", u = (s == null ? void 0 : s.si) || "", c = gt(o), l = Vt(u), f = i.getValue(r, n), h = (f == null ? void 0 : f.f) || "", d = (f == null ? void 0 : f.si) || "";
|
|
1518
1518
|
function _() {
|
|
1519
1519
|
var C;
|
|
1520
|
-
if (
|
|
1520
|
+
if (gt(h) && Vt(d)) {
|
|
1521
1521
|
const E = (C = e == null ? void 0 : e[d]) == null ? void 0 : C.f;
|
|
1522
1522
|
E ? t.set(d, E) : t.set(d, h);
|
|
1523
1523
|
}
|
|
@@ -1558,7 +1558,7 @@ var ol = Object.getOwnPropertyDescriptor, ul = (i, a, e, t) => {
|
|
|
1558
1558
|
(s = i[n]) && (r = s(r) || r);
|
|
1559
1559
|
return r;
|
|
1560
1560
|
}, li = (i, a) => (e, t) => a(e, t, i);
|
|
1561
|
-
let
|
|
1561
|
+
let _r = class extends Ne {
|
|
1562
1562
|
constructor(a, e) {
|
|
1563
1563
|
super();
|
|
1564
1564
|
A(this, "_arrayFormulaRange", {});
|
|
@@ -1618,7 +1618,7 @@ let Cr = class extends Ne {
|
|
|
1618
1618
|
});
|
|
1619
1619
|
}
|
|
1620
1620
|
getFormulaData() {
|
|
1621
|
-
const a = {}, e = this._univerInstanceService.getAllUnitsForType(
|
|
1621
|
+
const a = {}, e = this._univerInstanceService.getAllUnitsForType(fr.UNIVER_SHEET);
|
|
1622
1622
|
return e.length === 0 || e.forEach((t) => {
|
|
1623
1623
|
const r = t.getUnitId();
|
|
1624
1624
|
a[r] = {}, t.getSheets().forEach((s) => {
|
|
@@ -1673,7 +1673,7 @@ let Cr = class extends Ne {
|
|
|
1673
1673
|
s.getValue(t, r) && (s.realDeleteValue(t, r), this._arrayFormulaRange[a] && (this._arrayFormulaRange[a][e] = s.getData()));
|
|
1674
1674
|
}
|
|
1675
1675
|
getCalculateData() {
|
|
1676
|
-
const a = this._univerInstanceService.getAllUnitsForType(
|
|
1676
|
+
const a = this._univerInstanceService.getAllUnitsForType(fr.UNIVER_SHEET), e = {}, t = {}, r = {};
|
|
1677
1677
|
for (const n of a) {
|
|
1678
1678
|
const s = n.getUnitId(), o = n.getSheets(), u = {}, c = {};
|
|
1679
1679
|
for (const l of o) {
|
|
@@ -1702,7 +1702,7 @@ let Cr = class extends Ne {
|
|
|
1702
1702
|
* For formulas that are sensitive to hidden rows.
|
|
1703
1703
|
*/
|
|
1704
1704
|
getHiddenRowsFiltered() {
|
|
1705
|
-
const a = this._univerInstanceService.getAllUnitsForType(
|
|
1705
|
+
const a = this._univerInstanceService.getAllUnitsForType(fr.UNIVER_SHEET), e = {};
|
|
1706
1706
|
for (const t of a) {
|
|
1707
1707
|
const r = t.getUnitId(), n = t.getSheets();
|
|
1708
1708
|
e[r] = {};
|
|
@@ -1729,9 +1729,9 @@ let Cr = class extends Ne {
|
|
|
1729
1729
|
al(c, l, n, s, f, h, d);
|
|
1730
1730
|
}), c.forValue((f, h, d) => {
|
|
1731
1731
|
const _ = (d == null ? void 0 : d.f) || "", C = (d == null ? void 0 : d.si) || "";
|
|
1732
|
-
if (
|
|
1732
|
+
if (Vt(C)) {
|
|
1733
1733
|
const E = n == null ? void 0 : n[C], b = s.get(C);
|
|
1734
|
-
if (E && !
|
|
1734
|
+
if (E && !gt(_)) {
|
|
1735
1735
|
const R = E.f, p = h - E.c, N = f - E.r;
|
|
1736
1736
|
c.setValue(f, h, { f: R, si: C, x: p, y: N }), l.setValue(f, h, { f: R, si: C, x: p, y: N });
|
|
1737
1737
|
} else if (typeof b == "string") {
|
|
@@ -1775,15 +1775,15 @@ let Cr = class extends Ne {
|
|
|
1775
1775
|
if (u == null)
|
|
1776
1776
|
return null;
|
|
1777
1777
|
const { f: c, si: l } = u;
|
|
1778
|
-
if (
|
|
1778
|
+
if (gt(c))
|
|
1779
1779
|
return c;
|
|
1780
|
-
if (
|
|
1780
|
+
if (Vt(l)) {
|
|
1781
1781
|
let f = null;
|
|
1782
1782
|
return o.forValue((h, d, _) => {
|
|
1783
1783
|
if (_ == null)
|
|
1784
1784
|
return !0;
|
|
1785
1785
|
const { f: C, si: E } = _;
|
|
1786
|
-
if (
|
|
1786
|
+
if (gt(C) && l === E)
|
|
1787
1787
|
return f = this._lexerTreeBuilder.moveFormulaRefOffset(
|
|
1788
1788
|
C,
|
|
1789
1789
|
e - d,
|
|
@@ -1813,7 +1813,7 @@ let Cr = class extends Ne {
|
|
|
1813
1813
|
for (const l of Object.keys(o)) {
|
|
1814
1814
|
const f = Number(l);
|
|
1815
1815
|
for (const h in o[f]) {
|
|
1816
|
-
const d = Number(h), _ = u.getCellRaw(f, d), C =
|
|
1816
|
+
const d = Number(h), _ = u.getCellRaw(f, d), C = gt(_ == null ? void 0 : _.f) || Vt(_ == null ? void 0 : _.si), E = (_ == null ? void 0 : _.v) === void 0;
|
|
1817
1817
|
if (!(C && E)) continue;
|
|
1818
1818
|
c[d] || (c[d] = []);
|
|
1819
1819
|
const b = c[d].slice(-1)[0];
|
|
@@ -1851,19 +1851,19 @@ let Cr = class extends Ne {
|
|
|
1851
1851
|
if (c == null)
|
|
1852
1852
|
return !0;
|
|
1853
1853
|
const { f: l, si: f } = c;
|
|
1854
|
-
|
|
1854
|
+
gt(l) && Vt(f) && (t[f] = { f: l, r: o, c: u });
|
|
1855
1855
|
}), t;
|
|
1856
1856
|
}
|
|
1857
1857
|
};
|
|
1858
|
-
|
|
1858
|
+
_r = ul([
|
|
1859
1859
|
li(0, Yn),
|
|
1860
1860
|
li(1, ye(ga))
|
|
1861
|
-
],
|
|
1861
|
+
], _r);
|
|
1862
1862
|
function fi(i, a, e, t) {
|
|
1863
1863
|
i[a] || (i[a] = {}), i[a][e] || (i[a][e] = {});
|
|
1864
1864
|
const r = /* @__PURE__ */ new Map(), n = new Ce(i[a][e]);
|
|
1865
1865
|
t.forValue((o, u, c) => {
|
|
1866
|
-
const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "", h =
|
|
1866
|
+
const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "", h = gt(l), d = Vt(f);
|
|
1867
1867
|
h && d ? (n.setValue(o, u, {
|
|
1868
1868
|
f: l,
|
|
1869
1869
|
si: f
|
|
@@ -1875,7 +1875,7 @@ function fi(i, a, e, t) {
|
|
|
1875
1875
|
});
|
|
1876
1876
|
}), n.forValue((o, u, c) => {
|
|
1877
1877
|
const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "";
|
|
1878
|
-
if (
|
|
1878
|
+
if (Vt(f) && !gt(l)) {
|
|
1879
1879
|
const h = r.get(f);
|
|
1880
1880
|
if (h) {
|
|
1881
1881
|
const d = h.f, _ = u - h.c, C = o - h.r;
|
|
@@ -2508,7 +2508,7 @@ let vs = class extends Ne {
|
|
|
2508
2508
|
return this._localeService.getCurrentLocale();
|
|
2509
2509
|
}
|
|
2510
2510
|
getSheetsInfo() {
|
|
2511
|
-
const a = this._univerInstanceService.getCurrentUnitForType(
|
|
2511
|
+
const a = this._univerInstanceService.getCurrentUnitForType(fr.UNIVER_SHEET), { id: e, sheetOrder: t } = a.getSnapshot();
|
|
2512
2512
|
return {
|
|
2513
2513
|
sheetOrder: t,
|
|
2514
2514
|
sheetNameMap: this._sheetIdToNameMap[e]
|
|
@@ -2625,7 +2625,7 @@ let vs = class extends Ne {
|
|
|
2625
2625
|
});
|
|
2626
2626
|
}
|
|
2627
2627
|
_loadSheetData() {
|
|
2628
|
-
const a = this._univerInstanceService.getCurrentUnitForType(
|
|
2628
|
+
const a = this._univerInstanceService.getCurrentUnitForType(fr.UNIVER_SHEET), e = a == null ? void 0 : a.getActiveSheet();
|
|
2629
2629
|
return this._executeUnitId = a == null ? void 0 : a.getUnitId(), this._executeSubUnitId = e == null ? void 0 : e.getSheetId(), this._formulaDataModel.getCalculateData();
|
|
2630
2630
|
}
|
|
2631
2631
|
/**
|
|
@@ -2648,7 +2648,7 @@ let vs = class extends Ne {
|
|
|
2648
2648
|
vs = ml([
|
|
2649
2649
|
Xr(0, Yn),
|
|
2650
2650
|
Xr(1, ye(tc)),
|
|
2651
|
-
Xr(2, ye(
|
|
2651
|
+
Xr(2, ye(_r)),
|
|
2652
2652
|
Xr(3, ye(_o))
|
|
2653
2653
|
], vs);
|
|
2654
2654
|
const $t = Ze(
|
|
@@ -2659,7 +2659,7 @@ var gl = Object.getOwnPropertyDescriptor, dl = (i, a, e, t) => {
|
|
|
2659
2659
|
(s = i[n]) && (r = s(r) || r);
|
|
2660
2660
|
return r;
|
|
2661
2661
|
}, ds = (i, a) => (e, t) => a(e, t, i);
|
|
2662
|
-
let
|
|
2662
|
+
let Ar = class extends Ne {
|
|
2663
2663
|
constructor(i, a, e) {
|
|
2664
2664
|
super(), this._definedNamesService = i, this._lexerTreeBuilder = a, this._formulaCurrentConfigService = e;
|
|
2665
2665
|
}
|
|
@@ -2722,11 +2722,11 @@ let _r = class extends Ne {
|
|
|
2722
2722
|
};
|
|
2723
2723
|
}
|
|
2724
2724
|
};
|
|
2725
|
-
|
|
2725
|
+
Ar = dl([
|
|
2726
2726
|
ds(0, Nr),
|
|
2727
2727
|
ds(1, ye(ga)),
|
|
2728
2728
|
ds(2, $t)
|
|
2729
|
-
],
|
|
2729
|
+
], Ar);
|
|
2730
2730
|
function cn(i) {
|
|
2731
2731
|
if (i == null)
|
|
2732
2732
|
return !0;
|
|
@@ -2802,7 +2802,7 @@ function Jb(i, a, e) {
|
|
|
2802
2802
|
const o = n || s;
|
|
2803
2803
|
return r.n.pattern = o, a;
|
|
2804
2804
|
}
|
|
2805
|
-
const Ts = new
|
|
2805
|
+
const Ts = new Mt(1e5);
|
|
2806
2806
|
function mi(i) {
|
|
2807
2807
|
const a = Ts.get(i);
|
|
2808
2808
|
if (a !== void 0)
|
|
@@ -2816,7 +2816,7 @@ function Al() {
|
|
|
2816
2816
|
function El(i) {
|
|
2817
2817
|
if (bl(i))
|
|
2818
2818
|
return 3;
|
|
2819
|
-
const a =
|
|
2819
|
+
const a = _t.getFormatInfo(i).type || "unknown";
|
|
2820
2820
|
return _l[a];
|
|
2821
2821
|
}
|
|
2822
2822
|
function bl(i) {
|
|
@@ -2852,9 +2852,9 @@ function ze(i, a = 2) {
|
|
|
2852
2852
|
return e > 0 && (t = `.${"0".repeat(e)}`), `"${gi(i)}"#,##0${t}_);[Red]("${gi(i)}"#,##0${t})`;
|
|
2853
2853
|
}
|
|
2854
2854
|
function Rl(i, a, e = 2) {
|
|
2855
|
-
return
|
|
2855
|
+
return _t.format(ze(i, e), a);
|
|
2856
2856
|
}
|
|
2857
|
-
const _a = new
|
|
2857
|
+
const _a = new Mt(1e5);
|
|
2858
2858
|
function pl(i) {
|
|
2859
2859
|
let a = i;
|
|
2860
2860
|
a.startsWith('"') && a.endsWith('"') && (a = a.slice(1, -1));
|
|
@@ -2865,13 +2865,13 @@ function pl(i) {
|
|
|
2865
2865
|
value: e.value,
|
|
2866
2866
|
pattern: e.pattern
|
|
2867
2867
|
};
|
|
2868
|
-
const t =
|
|
2868
|
+
const t = _t.parseNumber(a);
|
|
2869
2869
|
if (t && t.z)
|
|
2870
2870
|
return Cs(a, t.v, t.z);
|
|
2871
|
-
const r =
|
|
2871
|
+
const r = _t.parseDate(a);
|
|
2872
2872
|
if (r && r.z)
|
|
2873
2873
|
return Cs(a, r.v, r.z);
|
|
2874
|
-
const n =
|
|
2874
|
+
const n = _t.parseTime(a);
|
|
2875
2875
|
return n && n.z ? Cs(a, n.v, n.z) : {
|
|
2876
2876
|
isNumberPattern: !1
|
|
2877
2877
|
};
|
|
@@ -3225,7 +3225,7 @@ class Yt extends Hn {
|
|
|
3225
3225
|
return g.create(m.VALUE);
|
|
3226
3226
|
}
|
|
3227
3227
|
}
|
|
3228
|
-
const Nl = 1e3, Bs = new
|
|
3228
|
+
const Nl = 1e3, Bs = new Mt(Nl);
|
|
3229
3229
|
class g extends Yt {
|
|
3230
3230
|
constructor(a, e = "") {
|
|
3231
3231
|
super(a), this._errorType = a, this._errorContent = e;
|
|
@@ -3266,6 +3266,9 @@ function Ol(i) {
|
|
|
3266
3266
|
}
|
|
3267
3267
|
return (a = i == null ? void 0 : i.v) != null ? a : 0;
|
|
3268
3268
|
}
|
|
3269
|
+
function ey(i, a = !1) {
|
|
3270
|
+
return !a && !(gt(i == null ? void 0 : i.f) || Vt(i == null ? void 0 : i.si)) ? null : typeof (i == null ? void 0 : i.v) == "string" && ir.has(i.v) ? i.v : null;
|
|
3271
|
+
}
|
|
3269
3272
|
var qt = /* @__PURE__ */ ((i) => (i[i.MIN = 0] = "MIN", i[i.MAX = 1] = "MAX", i))(qt || {}), Le = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.MIN = 1] = "MIN", i[i.MAX = 2] = "MAX", i))(Le || {});
|
|
3270
3273
|
function An() {
|
|
3271
3274
|
return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
|
|
@@ -3349,7 +3352,7 @@ function Aa(i) {
|
|
|
3349
3352
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
3350
3353
|
* MIT Licence
|
|
3351
3354
|
*/
|
|
3352
|
-
var
|
|
3355
|
+
var lr = 9e15, Ht = 1e9, ks = "0123456789abcdef", En = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", bn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", $s = {
|
|
3353
3356
|
// These values must be integers within the stated ranges (inclusive).
|
|
3354
3357
|
// Most of these values can be changed at run-time using the `Decimal.config` method.
|
|
3355
3358
|
// The maximum number of significant digits of the result of a calculation or base conversion.
|
|
@@ -3398,16 +3401,16 @@ var cr = 9e15, Ht = 1e9, ks = "0123456789abcdef", En = "2.3025850929940456840179
|
|
|
3398
3401
|
// 0 to EXP_LIMIT
|
|
3399
3402
|
// The minimum exponent value, beneath which underflow to zero occurs.
|
|
3400
3403
|
// JavaScript numbers: -324 (5e-324)
|
|
3401
|
-
minE: -
|
|
3404
|
+
minE: -lr,
|
|
3402
3405
|
// -1 to -EXP_LIMIT
|
|
3403
3406
|
// The maximum exponent value, above which overflow to Infinity occurs.
|
|
3404
3407
|
// JavaScript numbers: 308 (1.7976931348623157e+308)
|
|
3405
|
-
maxE:
|
|
3408
|
+
maxE: lr,
|
|
3406
3409
|
// 1 to EXP_LIMIT
|
|
3407
3410
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
3408
3411
|
crypto: !1
|
|
3409
3412
|
// true/false
|
|
3410
|
-
}, Eo,
|
|
3413
|
+
}, Eo, Nt, oe = !0, Gn = "[DecimalError] ", Ft = Gn + "Invalid argument: ", bo = Gn + "Precision limit exceeded", yo = Gn + "crypto unavailable", Ro = "[object Decimal]", Be = Math.floor, Pe = Math.pow, Dl = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Ll = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Pl = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, po = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, lt = 1e7, te = 7, xl = 9007199254740991, jl = En.length - 1, Ys = bn.length - 1, I = { toStringTag: Ro };
|
|
3411
3414
|
I.absoluteValue = I.abs = function() {
|
|
3412
3415
|
var i = new this.constructor(this);
|
|
3413
3416
|
return i.s < 0 && (i.s = 1), J(i);
|
|
@@ -3434,7 +3437,7 @@ I.comparedTo = I.cmp = function(i) {
|
|
|
3434
3437
|
};
|
|
3435
3438
|
I.cosine = I.cos = function() {
|
|
3436
3439
|
var i, a, e = this, t = e.constructor;
|
|
3437
|
-
return e.d ? e.d[0] ? (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = Ul(t, wo(t, e)), t.precision = i, t.rounding = a, J(
|
|
3440
|
+
return e.d ? e.d[0] ? (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = Ul(t, wo(t, e)), t.precision = i, t.rounding = a, J(Nt == 2 || Nt == 3 ? e.neg() : e, i, a, !0)) : new t(1) : new t(NaN);
|
|
3438
3441
|
};
|
|
3439
3442
|
I.cubeRoot = I.cbrt = function() {
|
|
3440
3443
|
var i, a, e, t, r, n, s, o, u, c, l = this, f = l.constructor;
|
|
@@ -3485,7 +3488,7 @@ I.hyperbolicCosine = I.cosh = function() {
|
|
|
3485
3488
|
var i, a, e, t, r, n = this, s = n.constructor, o = new s(1);
|
|
3486
3489
|
if (!n.isFinite()) return new s(n.s ? 1 / 0 : NaN);
|
|
3487
3490
|
if (n.isZero()) return o;
|
|
3488
|
-
e = s.precision, t = s.rounding, s.precision = e + Math.max(n.e, n.sd()) + 4, s.rounding = 1, r = n.d.length, r < 32 ? (i = Math.ceil(r / 3), a = (1 / Wn(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n =
|
|
3491
|
+
e = s.precision, t = s.rounding, s.precision = e + Math.max(n.e, n.sd()) + 4, s.rounding = 1, r = n.d.length, r < 32 ? (i = Math.ceil(r / 3), a = (1 / Wn(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = Er(s, 1, n.times(a), new s(1), !0);
|
|
3489
3492
|
for (var u, c = i, l = new s(8); c--; )
|
|
3490
3493
|
u = n.times(n), n = o.minus(u.times(l.minus(u.times(l))));
|
|
3491
3494
|
return J(n, s.precision = e, s.rounding = t, !0);
|
|
@@ -3494,9 +3497,9 @@ I.hyperbolicSine = I.sinh = function() {
|
|
|
3494
3497
|
var i, a, e, t, r = this, n = r.constructor;
|
|
3495
3498
|
if (!r.isFinite() || r.isZero()) return new n(r);
|
|
3496
3499
|
if (a = n.precision, e = n.rounding, n.precision = a + Math.max(r.e, r.sd()) + 4, n.rounding = 1, t = r.d.length, t < 3)
|
|
3497
|
-
r =
|
|
3500
|
+
r = Er(n, 2, r, r, !0);
|
|
3498
3501
|
else {
|
|
3499
|
-
i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / Wn(5, i)), r =
|
|
3502
|
+
i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / Wn(5, i)), r = Er(n, 2, r, r, !0);
|
|
3500
3503
|
for (var s, o = new n(5), u = new n(16), c = new n(20); i--; )
|
|
3501
3504
|
s = r.times(r), r = r.times(o.plus(s.times(u.times(s).plus(c))));
|
|
3502
3505
|
}
|
|
@@ -3508,7 +3511,7 @@ I.hyperbolicTangent = I.tanh = function() {
|
|
|
3508
3511
|
};
|
|
3509
3512
|
I.inverseCosine = I.acos = function() {
|
|
3510
3513
|
var i = this, a = i.constructor, e = i.abs().cmp(1), t = a.precision, r = a.rounding;
|
|
3511
|
-
return e !== -1 ? e === 0 ? i.isNeg() ?
|
|
3514
|
+
return e !== -1 ? e === 0 ? i.isNeg() ? Ct(a, t, r) : new a(0) : new a(NaN) : i.isZero() ? Ct(a, t + 4, r).times(0.5) : (a.precision = t + 6, a.rounding = 1, i = new a(1).minus(i).div(i.plus(1)).sqrt().atan(), a.precision = t, a.rounding = r, i.times(2));
|
|
3512
3515
|
};
|
|
3513
3516
|
I.inverseHyperbolicCosine = I.acosh = function() {
|
|
3514
3517
|
var i, a, e = this, t = e.constructor;
|
|
@@ -3524,7 +3527,7 @@ I.inverseHyperbolicTangent = I.atanh = function() {
|
|
|
3524
3527
|
};
|
|
3525
3528
|
I.inverseSine = I.asin = function() {
|
|
3526
3529
|
var i, a, e, t, r = this, n = r.constructor;
|
|
3527
|
-
return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i =
|
|
3530
|
+
return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = Ct(n, e + 4, t).times(0.5), i.s = r.s, i) : new n(NaN) : (n.precision = e + 6, n.rounding = 1, r = r.div(new n(1).minus(r.times(r)).sqrt().plus(1)).atan(), n.precision = e, n.rounding = t, r.times(2)));
|
|
3528
3531
|
};
|
|
3529
3532
|
I.inverseTangent = I.atan = function() {
|
|
3530
3533
|
var i, a, e, t, r, n, s, o, u, c = this, l = c.constructor, f = l.precision, h = l.rounding;
|
|
@@ -3532,11 +3535,11 @@ I.inverseTangent = I.atan = function() {
|
|
|
3532
3535
|
if (c.isZero())
|
|
3533
3536
|
return new l(c);
|
|
3534
3537
|
if (c.abs().eq(1) && f + 4 <= Ys)
|
|
3535
|
-
return s =
|
|
3538
|
+
return s = Ct(l, f + 4, h).times(0.25), s.s = c.s, s;
|
|
3536
3539
|
} else {
|
|
3537
3540
|
if (!c.s) return new l(NaN);
|
|
3538
3541
|
if (f + 4 <= Ys)
|
|
3539
|
-
return s =
|
|
3542
|
+
return s = Ct(l, f + 4, h).times(0.5), s.s = c.s, s;
|
|
3540
3543
|
}
|
|
3541
3544
|
for (l.precision = o = f + 10, l.rounding = 1, e = Math.min(28, o / te + 2 | 0), i = e; i; --i) c = c.div(c.times(c).plus(1).sqrt().plus(1));
|
|
3542
3545
|
for (oe = !1, a = Math.ceil(o / te), t = 1, u = c.times(c), s = new l(c), r = c; i !== -1; )
|
|
@@ -3670,7 +3673,7 @@ I.round = function() {
|
|
|
3670
3673
|
};
|
|
3671
3674
|
I.sine = I.sin = function() {
|
|
3672
3675
|
var i, a, e = this, t = e.constructor;
|
|
3673
|
-
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = Tl(t, wo(t, e)), t.precision = i, t.rounding = a, J(
|
|
3676
|
+
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + Math.max(e.e, e.sd()) + te, t.rounding = 1, e = Tl(t, wo(t, e)), t.precision = i, t.rounding = a, J(Nt > 2 ? e.neg() : e, i, a, !0)) : new t(NaN);
|
|
3674
3677
|
};
|
|
3675
3678
|
I.squareRoot = I.sqrt = function() {
|
|
3676
3679
|
var i, a, e, t, r, n, s = this, o = s.d, u = s.e, c = s.s, l = s.constructor;
|
|
@@ -3692,7 +3695,7 @@ I.squareRoot = I.sqrt = function() {
|
|
|
3692
3695
|
};
|
|
3693
3696
|
I.tangent = I.tan = function() {
|
|
3694
3697
|
var i, a, e = this, t = e.constructor;
|
|
3695
|
-
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + 10, t.rounding = 1, e = e.sin(), e.s = 1, e = Ve(e, new t(1).minus(e.times(e)).sqrt(), i + 10, 0), t.precision = i, t.rounding = a, J(
|
|
3698
|
+
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + 10, t.rounding = 1, e = e.sin(), e.s = 1, e = Ve(e, new t(1).minus(e.times(e)).sqrt(), i + 10, 0), t.precision = i, t.rounding = a, J(Nt == 2 || Nt == 4 ? e.neg() : e, i, a, !0)) : new t(NaN);
|
|
3696
3699
|
};
|
|
3697
3700
|
I.times = I.mul = function(i) {
|
|
3698
3701
|
var a, e, t, r, n, s, o, u, c, l = this, f = l.constructor, h = l.d, d = (i = new f(i)).d;
|
|
@@ -3716,11 +3719,11 @@ I.toDecimalPlaces = I.toDP = function(i, a) {
|
|
|
3716
3719
|
};
|
|
3717
3720
|
I.toExponential = function(i, a) {
|
|
3718
3721
|
var e, t = this, r = t.constructor;
|
|
3719
|
-
return i === void 0 ? e =
|
|
3722
|
+
return i === void 0 ? e = Et(t, !0) : (He(i, 0, Ht), a === void 0 ? a = r.rounding : He(a, 0, 8), t = J(new r(t), i + 1, a), e = Et(t, !0, i + 1)), t.isNeg() && !t.isZero() ? "-" + e : e;
|
|
3720
3723
|
};
|
|
3721
3724
|
I.toFixed = function(i, a) {
|
|
3722
3725
|
var e, t, r = this, n = r.constructor;
|
|
3723
|
-
return i === void 0 ? e =
|
|
3726
|
+
return i === void 0 ? e = Et(r) : (He(i, 0, Ht), a === void 0 ? a = n.rounding : He(a, 0, 8), t = J(new n(r), i + r.e + 1, a), e = Et(t, !1, i + t.e + 1)), r.isNeg() && !r.isZero() ? "-" + e : e;
|
|
3724
3727
|
};
|
|
3725
3728
|
I.toFraction = function(i) {
|
|
3726
3729
|
var a, e, t, r, n, s, o, u, c, l, f, h, d = this, _ = d.d, C = d.constructor;
|
|
@@ -3772,29 +3775,29 @@ I.toPower = I.pow = function(i) {
|
|
|
3772
3775
|
};
|
|
3773
3776
|
I.toPrecision = function(i, a) {
|
|
3774
3777
|
var e, t = this, r = t.constructor;
|
|
3775
|
-
return i === void 0 ? e =
|
|
3778
|
+
return i === void 0 ? e = Et(t, t.e <= r.toExpNeg || t.e >= r.toExpPos) : (He(i, 1, Ht), a === void 0 ? a = r.rounding : He(a, 0, 8), t = J(new r(t), i, a), e = Et(t, i <= t.e || t.e <= r.toExpNeg, i)), t.isNeg() && !t.isZero() ? "-" + e : e;
|
|
3776
3779
|
};
|
|
3777
3780
|
I.toSignificantDigits = I.toSD = function(i, a) {
|
|
3778
3781
|
var e = this, t = e.constructor;
|
|
3779
3782
|
return i === void 0 ? (i = t.precision, a = t.rounding) : (He(i, 1, Ht), a === void 0 ? a = t.rounding : He(a, 0, 8)), J(new t(e), i, a);
|
|
3780
3783
|
};
|
|
3781
3784
|
I.toString = function() {
|
|
3782
|
-
var i = this, a = i.constructor, e =
|
|
3785
|
+
var i = this, a = i.constructor, e = Et(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
|
|
3783
3786
|
return i.isNeg() && !i.isZero() ? "-" + e : e;
|
|
3784
3787
|
};
|
|
3785
3788
|
I.truncated = I.trunc = function() {
|
|
3786
3789
|
return J(new this.constructor(this), this.e + 1, 1);
|
|
3787
3790
|
};
|
|
3788
3791
|
I.valueOf = I.toJSON = function() {
|
|
3789
|
-
var i = this, a = i.constructor, e =
|
|
3792
|
+
var i = this, a = i.constructor, e = Et(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
|
|
3790
3793
|
return i.isNeg() ? "-" + e : e;
|
|
3791
3794
|
};
|
|
3792
3795
|
function Ue(i) {
|
|
3793
3796
|
var a, e, t, r = i.length - 1, n = "", s = i[0];
|
|
3794
3797
|
if (r > 0) {
|
|
3795
3798
|
for (n += s, a = 1; a < r; a++)
|
|
3796
|
-
t = i[a] + "", e = te - t.length, e && (n +=
|
|
3797
|
-
s = i[a], t = s + "", e = te - t.length, e && (n +=
|
|
3799
|
+
t = i[a] + "", e = te - t.length, e && (n += xt(e)), n += t;
|
|
3800
|
+
s = i[a], t = s + "", e = te - t.length, e && (n += xt(e));
|
|
3798
3801
|
} else if (s === 0)
|
|
3799
3802
|
return "0";
|
|
3800
3803
|
for (; s % 10 === 0; ) s /= 10;
|
|
@@ -3820,7 +3823,7 @@ function ln(i, a, e) {
|
|
|
3820
3823
|
function Ul(i, a) {
|
|
3821
3824
|
var e, t, r;
|
|
3822
3825
|
if (a.isZero()) return a;
|
|
3823
|
-
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / Wn(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a =
|
|
3826
|
+
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / Wn(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Er(i, 1, a.times(r), new i(1));
|
|
3824
3827
|
for (var n = e; n--; ) {
|
|
3825
3828
|
var s = a.times(a);
|
|
3826
3829
|
a = s.times(s).minus(s).times(8).plus(1);
|
|
@@ -3923,10 +3926,10 @@ function J(i, a, e, t) {
|
|
|
3923
3926
|
}
|
|
3924
3927
|
return oe && (i.e > d.maxE ? (i.d = null, i.e = NaN) : i.e < d.minE && (i.e = 0, i.d = [0])), i;
|
|
3925
3928
|
}
|
|
3926
|
-
function
|
|
3929
|
+
function Et(i, a, e) {
|
|
3927
3930
|
if (!i.isFinite()) return Mo(i);
|
|
3928
3931
|
var t, r = i.e, n = Ue(i.d), s = n.length;
|
|
3929
|
-
return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) +
|
|
3932
|
+
return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) + xt(t) : s > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (i.e < 0 ? "e" : "e+") + i.e) : r < 0 ? (n = "0." + xt(-r - 1) + n, e && (t = e - s) > 0 && (n += xt(t))) : r >= s ? (n += xt(r + 1 - s), e && (t = e - r - 1) > 0 && (n = n + "." + xt(t))) : ((t = r + 1) < s && (n = n.slice(0, t) + "." + n.slice(t)), e && (t = e - s) > 0 && (r + 1 === s && (n += "."), n += xt(t))), n;
|
|
3930
3933
|
}
|
|
3931
3934
|
function Qn(i, a) {
|
|
3932
3935
|
var e = i[0];
|
|
@@ -3938,7 +3941,7 @@ function yn(i, a, e) {
|
|
|
3938
3941
|
throw oe = !0, e && (i.precision = e), Error(bo);
|
|
3939
3942
|
return J(new i(En), a, 1, !0);
|
|
3940
3943
|
}
|
|
3941
|
-
function
|
|
3944
|
+
function Ct(i, a, e) {
|
|
3942
3945
|
if (a > Ys) throw Error(bo);
|
|
3943
3946
|
return J(new i(bn), a, e, !0);
|
|
3944
3947
|
}
|
|
@@ -3950,7 +3953,7 @@ function Vo(i) {
|
|
|
3950
3953
|
}
|
|
3951
3954
|
return e;
|
|
3952
3955
|
}
|
|
3953
|
-
function
|
|
3956
|
+
function xt(i) {
|
|
3954
3957
|
for (var a = ""; i--; ) a += "0";
|
|
3955
3958
|
return a;
|
|
3956
3959
|
}
|
|
@@ -4059,13 +4062,13 @@ function vl(i, a) {
|
|
|
4059
4062
|
function Tl(i, a) {
|
|
4060
4063
|
var e, t = a.d.length;
|
|
4061
4064
|
if (t < 3)
|
|
4062
|
-
return a.isZero() ? a :
|
|
4063
|
-
e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / Wn(5, e)), a =
|
|
4065
|
+
return a.isZero() ? a : Er(i, 2, a, a);
|
|
4066
|
+
e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / Wn(5, e)), a = Er(i, 2, a, a);
|
|
4064
4067
|
for (var r, n = new i(5), s = new i(16), o = new i(20); e--; )
|
|
4065
4068
|
r = a.times(a), a = a.times(n.plus(r.times(s.times(r).minus(o))));
|
|
4066
4069
|
return a;
|
|
4067
4070
|
}
|
|
4068
|
-
function
|
|
4071
|
+
function Er(i, a, e, t, r) {
|
|
4069
4072
|
var n, s, o, u, c = i.precision, l = Math.ceil(c / te);
|
|
4070
4073
|
for (oe = !1, u = e.times(e), o = new i(t); ; ) {
|
|
4071
4074
|
if (s = Ve(o.times(u), new i(a++ * a++), c, 1), o = r ? t.plus(s) : t.minus(s), t = Ve(s.times(u), new i(a++ * a++), c, 1), s = o.plus(t), s.d[l] !== void 0) {
|
|
@@ -4081,15 +4084,15 @@ function Wn(i, a) {
|
|
|
4081
4084
|
return e;
|
|
4082
4085
|
}
|
|
4083
4086
|
function wo(i, a) {
|
|
4084
|
-
var e, t = a.s < 0, r =
|
|
4087
|
+
var e, t = a.s < 0, r = Ct(i, i.precision, 1), n = r.times(0.5);
|
|
4085
4088
|
if (a = a.abs(), a.lte(n))
|
|
4086
|
-
return
|
|
4089
|
+
return Nt = t ? 4 : 1, a;
|
|
4087
4090
|
if (e = a.divToInt(r), e.isZero())
|
|
4088
|
-
|
|
4091
|
+
Nt = t ? 3 : 2;
|
|
4089
4092
|
else {
|
|
4090
4093
|
if (a = a.minus(e.times(r)), a.lte(n))
|
|
4091
|
-
return
|
|
4092
|
-
|
|
4094
|
+
return Nt = Ci(e) ? t ? 2 : 3 : t ? 4 : 1, a;
|
|
4095
|
+
Nt = Ci(e) ? t ? 1 : 4 : t ? 3 : 2;
|
|
4093
4096
|
}
|
|
4094
4097
|
return a.minus(r).abs();
|
|
4095
4098
|
}
|
|
@@ -4098,7 +4101,7 @@ function Ea(i, a, e, t) {
|
|
|
4098
4101
|
if (_ ? (He(e, 1, Ht), t === void 0 ? t = d.rounding : He(t, 0, 8)) : (e = d.precision, t = d.rounding), !i.isFinite())
|
|
4099
4102
|
l = Mo(i);
|
|
4100
4103
|
else {
|
|
4101
|
-
for (l =
|
|
4104
|
+
for (l = Et(i), s = l.indexOf("."), _ ? (r = 2, a == 16 ? e = e * 4 - 3 : a == 8 && (e = e * 3 - 2)) : r = a, s >= 0 && (l = l.replace(".", ""), h = new d(1), h.e = l.length - s, h.d = ln(Et(h), 10, r), h.e = h.d.length), f = ln(l, 10, r), n = u = f.length; f[--u] == 0; ) f.pop();
|
|
4102
4105
|
if (!f[0])
|
|
4103
4106
|
l = _ ? "0p+0" : "0";
|
|
4104
4107
|
else {
|
|
@@ -4157,7 +4160,7 @@ function Gl(i) {
|
|
|
4157
4160
|
function Ql(i, a) {
|
|
4158
4161
|
i = new this(i), a = new this(a);
|
|
4159
4162
|
var e, t = this.precision, r = this.rounding, n = t + 4;
|
|
4160
|
-
return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e =
|
|
4163
|
+
return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = Ct(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? Ct(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = Ct(this, n, 1).times(0.5), e.s = i.s) : a.s < 0 ? (this.precision = n, this.rounding = 1, e = this.atan(Ve(i, a, n, 1)), a = Ct(this, n, 1), this.precision = t, this.rounding = r, e = i.s < 0 ? e.minus(a) : e.plus(a)) : e = this.atan(Ve(i, a, n, 1)), e;
|
|
4161
4164
|
}
|
|
4162
4165
|
function Wl(i) {
|
|
4163
4166
|
return new this(i).cbrt();
|
|
@@ -4178,16 +4181,16 @@ function Xl(i) {
|
|
|
4178
4181
|
0,
|
|
4179
4182
|
8,
|
|
4180
4183
|
"toExpNeg",
|
|
4181
|
-
-
|
|
4184
|
+
-lr,
|
|
4182
4185
|
0,
|
|
4183
4186
|
"toExpPos",
|
|
4184
4187
|
0,
|
|
4185
|
-
|
|
4188
|
+
lr,
|
|
4186
4189
|
"maxE",
|
|
4187
4190
|
0,
|
|
4188
|
-
|
|
4191
|
+
lr,
|
|
4189
4192
|
"minE",
|
|
4190
|
-
-
|
|
4193
|
+
-lr,
|
|
4191
4194
|
0,
|
|
4192
4195
|
"modulo",
|
|
4193
4196
|
0,
|
|
@@ -5133,7 +5136,7 @@ class y extends Yt {
|
|
|
5133
5136
|
return n;
|
|
5134
5137
|
}
|
|
5135
5138
|
}
|
|
5136
|
-
const Uf = 1e5, Gs = new
|
|
5139
|
+
const Uf = 1e5, Gs = new Mt(Uf);
|
|
5137
5140
|
class j extends Yt {
|
|
5138
5141
|
constructor(e) {
|
|
5139
5142
|
super(e);
|
|
@@ -5284,7 +5287,7 @@ function Do(i = [], a = !1) {
|
|
|
5284
5287
|
e[t] == null && (e[t] = []);
|
|
5285
5288
|
for (let n = 0; n < r.length; n++) {
|
|
5286
5289
|
const s = r[n];
|
|
5287
|
-
e[t][n] =
|
|
5290
|
+
e[t][n] = Ot.create(s, a);
|
|
5288
5291
|
}
|
|
5289
5292
|
}
|
|
5290
5293
|
return e;
|
|
@@ -6052,7 +6055,7 @@ class q extends Yt {
|
|
|
6052
6055
|
);
|
|
6053
6056
|
C != null && C.forEach((E, b) => {
|
|
6054
6057
|
let R = ue.create();
|
|
6055
|
-
|
|
6058
|
+
ir.has(b) ? R = g.create(b) : typeof b == "string" ? R = j.create(b) : typeof b == "number" ? R = y.create(b) : typeof b == "boolean" && (R = T.create(b));
|
|
6056
6059
|
let p;
|
|
6057
6060
|
R.isError() ? p = R : e.isError() ? p = e : p = R.compare(e, s, o), (p.isError() || p.getValue() === !0) && E.forEach((N) => {
|
|
6058
6061
|
N >= f && N <= f + u - 1 && (r[N - f] == null && (r[N - f] = []), r[N - f][t] = p);
|
|
@@ -6255,7 +6258,7 @@ class q extends Yt {
|
|
|
6255
6258
|
const f = [];
|
|
6256
6259
|
for (let h = 0; h < l; h++) {
|
|
6257
6260
|
const d = c[h].trim();
|
|
6258
|
-
f.push(
|
|
6261
|
+
f.push(Ot.create(d));
|
|
6259
6262
|
}
|
|
6260
6263
|
n.push(f);
|
|
6261
6264
|
}
|
|
@@ -6275,7 +6278,7 @@ class q extends Yt {
|
|
|
6275
6278
|
return q.create(o);
|
|
6276
6279
|
}
|
|
6277
6280
|
}
|
|
6278
|
-
class
|
|
6281
|
+
class Ot {
|
|
6279
6282
|
static create(a, e = !1) {
|
|
6280
6283
|
if (a == null)
|
|
6281
6284
|
return ue.create();
|
|
@@ -6283,7 +6286,7 @@ class Nt {
|
|
|
6283
6286
|
return T.create(a);
|
|
6284
6287
|
if (typeof a == "string") {
|
|
6285
6288
|
const t = a.toLocaleUpperCase().trim();
|
|
6286
|
-
if (
|
|
6289
|
+
if (ir.has(t))
|
|
6287
6290
|
return g.create(t);
|
|
6288
6291
|
if (t === tr.TRUE || t === tr.FALSE)
|
|
6289
6292
|
return Kn(a);
|
|
@@ -6304,7 +6307,7 @@ function If(i) {
|
|
|
6304
6307
|
const a = i.trim();
|
|
6305
6308
|
return a.startsWith('"') && a.endsWith('"');
|
|
6306
6309
|
}
|
|
6307
|
-
const Ff = 1e4, Rn = new
|
|
6310
|
+
const Ff = 1e4, Rn = new Mt(Ff);
|
|
6308
6311
|
class Zn extends Hn {
|
|
6309
6312
|
constructor(e) {
|
|
6310
6313
|
super();
|
|
@@ -6544,13 +6547,13 @@ class Zn extends Hn {
|
|
|
6544
6547
|
}
|
|
6545
6548
|
getCellValueObject(e) {
|
|
6546
6549
|
const t = Ol(e);
|
|
6547
|
-
if (
|
|
6550
|
+
if (ir.has(t))
|
|
6548
6551
|
return g.create(t);
|
|
6549
6552
|
if (e.t === pt.NUMBER) {
|
|
6550
6553
|
const r = this._getPatternByCell(e);
|
|
6551
6554
|
return nc(r) ? j.create(t.toString()) : Xn(t, r);
|
|
6552
6555
|
}
|
|
6553
|
-
return e.t === pt.STRING || e.t === pt.FORCE_STRING ? j.create(t.toString()) : e.t === pt.BOOLEAN ? Kn(t) :
|
|
6556
|
+
return e.t === pt.STRING || e.t === pt.FORCE_STRING ? j.create(t.toString()) : e.t === pt.BOOLEAN ? Kn(t) : Ot.create(t);
|
|
6554
6557
|
}
|
|
6555
6558
|
_getPatternByCell(e) {
|
|
6556
6559
|
var n;
|
|
@@ -6715,7 +6718,7 @@ class pn extends Zn {
|
|
|
6715
6718
|
class ya extends Zn {
|
|
6716
6719
|
constructor(a) {
|
|
6717
6720
|
super(a);
|
|
6718
|
-
const e =
|
|
6721
|
+
const e = Cr(a);
|
|
6719
6722
|
this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName), this.setRangeData(e.range);
|
|
6720
6723
|
}
|
|
6721
6724
|
isCell() {
|
|
@@ -6754,7 +6757,7 @@ class ya extends Zn {
|
|
|
6754
6757
|
class Ra extends Zn {
|
|
6755
6758
|
constructor(a) {
|
|
6756
6759
|
super(a);
|
|
6757
|
-
const e =
|
|
6760
|
+
const e = Cr(a);
|
|
6758
6761
|
this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName);
|
|
6759
6762
|
const t = {
|
|
6760
6763
|
...e.range,
|
|
@@ -6785,7 +6788,7 @@ class Ra extends Zn {
|
|
|
6785
6788
|
class pa extends Zn {
|
|
6786
6789
|
constructor(a) {
|
|
6787
6790
|
super(a);
|
|
6788
|
-
const e =
|
|
6791
|
+
const e = Cr(a);
|
|
6789
6792
|
this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName);
|
|
6790
6793
|
const t = {
|
|
6791
6794
|
...e.range,
|
|
@@ -6868,9 +6871,9 @@ function Va(i) {
|
|
|
6868
6871
|
for (const e of a)
|
|
6869
6872
|
if (i.startsWith(e)) {
|
|
6870
6873
|
const t = i.substring(e.length);
|
|
6871
|
-
return [e,
|
|
6874
|
+
return [e, Ot.create(t)];
|
|
6872
6875
|
}
|
|
6873
|
-
return [k.EQUALS,
|
|
6876
|
+
return [k.EQUALS, Ot.create(i)];
|
|
6874
6877
|
}
|
|
6875
6878
|
function zn(i, a, e, t) {
|
|
6876
6879
|
if (!e)
|
|
@@ -7058,7 +7061,7 @@ let Qs = class extends Ne {
|
|
|
7058
7061
|
};
|
|
7059
7062
|
let e = i;
|
|
7060
7063
|
if (i.startsWith("#") && so(i.slice(1))) {
|
|
7061
|
-
const { unitId: t, sheetName: r, range: n } = Pr(i.slice(1)), s = this._univerInstanceService.getCurrentUnitOfType(
|
|
7064
|
+
const { unitId: t, sheetName: r, range: n } = Pr(i.slice(1)), s = this._univerInstanceService.getCurrentUnitOfType(fr.UNIVER_SHEET);
|
|
7062
7065
|
if (t === "" || t === s.getUnitId())
|
|
7063
7066
|
if (r === "")
|
|
7064
7067
|
e = `#gid=${s.getActiveSheet().getSheetId()}&range=${It(n)}`;
|
|
@@ -7450,9 +7453,9 @@ Ws = Jf([
|
|
|
7450
7453
|
pi(0, $t),
|
|
7451
7454
|
pi(1, Lo)
|
|
7452
7455
|
], Ws);
|
|
7453
|
-
const
|
|
7456
|
+
const wt = Ze("univer.formula.runtime.service");
|
|
7454
7457
|
var ie = /* @__PURE__ */ ((i) => (i[i.REFERENCE = 1] = "REFERENCE", i[i.VALUE = 2] = "VALUE", i[i.OPERATOR = 3] = "OPERATOR", i[i.FUNCTION = 4] = "FUNCTION", i[i.LAMBDA = 5] = "LAMBDA", i[i.LAMBDA_PARAMETER = 6] = "LAMBDA_PARAMETER", i[i.ERROR = 7] = "ERROR", i[i.BASE = 8] = "BASE", i[i.ROOT = 9] = "ROOT", i[i.UNION = 10] = "UNION", i[i.PREFIX = 11] = "PREFIX", i[i.SUFFIX = 12] = "SUFFIX", i[i.NULL = 13] = "NULL", i))(ie || {});
|
|
7455
|
-
const
|
|
7458
|
+
const bt = /* @__PURE__ */ new Map([
|
|
7456
7459
|
[1, 7],
|
|
7457
7460
|
[2, 9],
|
|
7458
7461
|
[3, 8],
|
|
@@ -7576,8 +7579,8 @@ class xe extends Ge {
|
|
|
7576
7579
|
return this._errorValueObject;
|
|
7577
7580
|
}
|
|
7578
7581
|
}
|
|
7579
|
-
const
|
|
7580
|
-
class
|
|
7582
|
+
const yt = 100;
|
|
7583
|
+
class Rt {
|
|
7581
7584
|
get zIndex() {
|
|
7582
7585
|
return 0;
|
|
7583
7586
|
}
|
|
@@ -7602,9 +7605,9 @@ class qs extends Ge {
|
|
|
7602
7605
|
e == null ? this.setValue(g.create(m.VALUE)) : this.setValue(e.getValue());
|
|
7603
7606
|
}
|
|
7604
7607
|
}
|
|
7605
|
-
class Po extends
|
|
7608
|
+
class Po extends Rt {
|
|
7606
7609
|
get zIndex() {
|
|
7607
|
-
return
|
|
7610
|
+
return bt.get(ie.ROOT) || yt;
|
|
7608
7611
|
}
|
|
7609
7612
|
checkAndCreateNodeType(a) {
|
|
7610
7613
|
if (!(a instanceof ae))
|
|
@@ -7613,13 +7616,13 @@ class Po extends yt {
|
|
|
7613
7616
|
return new qs(vt);
|
|
7614
7617
|
}
|
|
7615
7618
|
}
|
|
7616
|
-
const eh = 5e3, Ur = new
|
|
7619
|
+
const eh = 5e3, Ur = new Mt(eh);
|
|
7617
7620
|
function Vi(i, a, e, t, r) {
|
|
7618
7621
|
let n = Ur.get(`${i}${a}`);
|
|
7619
7622
|
if (n && !xo(n, r))
|
|
7620
7623
|
return n;
|
|
7621
7624
|
const s = e.treeBuilder(a);
|
|
7622
|
-
if (
|
|
7625
|
+
if (ir.has(s))
|
|
7623
7626
|
return xe.create(s);
|
|
7624
7627
|
if (n = t.parse(s), n == null)
|
|
7625
7628
|
throw new Error("astNode is null");
|
|
@@ -7737,12 +7740,12 @@ class Vn extends Ge {
|
|
|
7737
7740
|
return l !== u && c !== o || o === c && u === l ? g.create(m.VALUE) : c === o && n >= u && n <= l ? e.getCellByColumn(n) : u === l && r >= o && r <= c ? e.getCellByRow(r) : e.isTable() ? e.getCellByPosition(r) : g.create(m.VALUE);
|
|
7738
7741
|
}
|
|
7739
7742
|
}
|
|
7740
|
-
let Nn = class extends
|
|
7743
|
+
let Nn = class extends Rt {
|
|
7741
7744
|
constructor(i, a) {
|
|
7742
7745
|
super(), this._functionService = i, this._runtimeService = a;
|
|
7743
7746
|
}
|
|
7744
7747
|
get zIndex() {
|
|
7745
|
-
return
|
|
7748
|
+
return bt.get(ie.PREFIX) || yt;
|
|
7746
7749
|
}
|
|
7747
7750
|
checkAndCreateNodeType(i) {
|
|
7748
7751
|
if (!(i instanceof ae))
|
|
@@ -7760,7 +7763,7 @@ let Nn = class extends yt {
|
|
|
7760
7763
|
};
|
|
7761
7764
|
Nn = sh([
|
|
7762
7765
|
Ni(0, Gt),
|
|
7763
|
-
Ni(1,
|
|
7766
|
+
Ni(1, wt)
|
|
7764
7767
|
], Nn);
|
|
7765
7768
|
new RegExp(Me.MINUS, "g");
|
|
7766
7769
|
new RegExp(Me.AT, "g");
|
|
@@ -7778,7 +7781,7 @@ var ah = Object.getOwnPropertyDescriptor, ih = (i, a, e, t) => {
|
|
|
7778
7781
|
for (var r = t > 1 ? void 0 : t ? ah(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7779
7782
|
(s = i[n]) && (r = s(r) || r);
|
|
7780
7783
|
return r;
|
|
7781
|
-
},
|
|
7784
|
+
}, ur = (i, a) => (e, t) => a(e, t, i);
|
|
7782
7785
|
class oh extends Ge {
|
|
7783
7786
|
constructor(a, e, t, r, n, s) {
|
|
7784
7787
|
super(a), this._functionExecutor = e, this._currentConfigService = t, this._runtimeService = r, this._definedNamesService = n, this._formulaDataModel = s, this._functionExecutor.isAsync() && this.setAsync(), this._functionExecutor.isAddress() && this.setAddress(), this._functionExecutor.needsLocale && this._setLocale(), this._functionExecutor.needsSheetsInfo && this._setSheetsInfo(), this._functionExecutor.needsFormulaDataModel && this._functionExecutor.setFormulaDataModel(this._formulaDataModel);
|
|
@@ -7845,7 +7848,7 @@ class oh extends Ge {
|
|
|
7845
7848
|
_handleCustomResult(a) {
|
|
7846
7849
|
var t;
|
|
7847
7850
|
if (typeof a != "object" || a == null)
|
|
7848
|
-
return
|
|
7851
|
+
return Ot.create(a);
|
|
7849
7852
|
const e = Do(a);
|
|
7850
7853
|
return q.create({
|
|
7851
7854
|
calculateValueList: e,
|
|
@@ -7941,12 +7944,12 @@ class uh extends Ge {
|
|
|
7941
7944
|
this.setValue(g.create(m.NAME));
|
|
7942
7945
|
}
|
|
7943
7946
|
}
|
|
7944
|
-
let On = class extends
|
|
7947
|
+
let On = class extends Rt {
|
|
7945
7948
|
constructor(i, a, e, t, r, n) {
|
|
7946
7949
|
super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
|
|
7947
7950
|
}
|
|
7948
7951
|
get zIndex() {
|
|
7949
|
-
return
|
|
7952
|
+
return bt.get(ie.FUNCTION) || yt;
|
|
7950
7953
|
}
|
|
7951
7954
|
create(i) {
|
|
7952
7955
|
const a = this._functionService.getExecutor(i);
|
|
@@ -7977,19 +7980,19 @@ let On = class extends yt {
|
|
|
7977
7980
|
}
|
|
7978
7981
|
};
|
|
7979
7982
|
On = ih([
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7983
|
+
ur(0, Gt),
|
|
7984
|
+
ur(1, $t),
|
|
7985
|
+
ur(2, wt),
|
|
7986
|
+
ur(3, Nr),
|
|
7987
|
+
ur(4, ye(Ki)),
|
|
7988
|
+
ur(5, ye(_r))
|
|
7986
7989
|
], On);
|
|
7987
7990
|
var ch = Object.getOwnPropertyDescriptor, lh = (i, a, e, t) => {
|
|
7988
7991
|
for (var r = t > 1 ? void 0 : t ? ch(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7989
7992
|
(s = i[n]) && (r = s(r) || r);
|
|
7990
7993
|
return r;
|
|
7991
7994
|
}, fh = (i, a) => (e, t) => a(e, t, i);
|
|
7992
|
-
let
|
|
7995
|
+
let br = class extends Ne {
|
|
7993
7996
|
constructor(i) {
|
|
7994
7997
|
super(), this._runtimeService = i;
|
|
7995
7998
|
}
|
|
@@ -8058,11 +8061,11 @@ let Er = class extends Ne {
|
|
|
8058
8061
|
return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.execute(), jt.SUCCESS;
|
|
8059
8062
|
}
|
|
8060
8063
|
};
|
|
8061
|
-
|
|
8062
|
-
fh(0,
|
|
8063
|
-
],
|
|
8064
|
+
br = lh([
|
|
8065
|
+
fh(0, wt)
|
|
8066
|
+
], br);
|
|
8064
8067
|
function Uo(i) {
|
|
8065
|
-
return i instanceof ae ? i.getToken() ===
|
|
8068
|
+
return i instanceof ae ? i.getToken() === dr : !1;
|
|
8066
8069
|
}
|
|
8067
8070
|
function hh(i) {
|
|
8068
8071
|
return i instanceof ae ? i.getToken() === mo : !1;
|
|
@@ -8141,7 +8144,7 @@ class Oa extends Yt {
|
|
|
8141
8144
|
* @param variants
|
|
8142
8145
|
*/
|
|
8143
8146
|
executeCustom(...e) {
|
|
8144
|
-
const t = e.map((r) =>
|
|
8147
|
+
const t = e.map((r) => Ot.create(r));
|
|
8145
8148
|
return this.execute(...t);
|
|
8146
8149
|
}
|
|
8147
8150
|
_setLambdaNodeValue(e) {
|
|
@@ -8218,12 +8221,12 @@ class Ch extends Ge {
|
|
|
8218
8221
|
// return Promise.resolve(AstNodePromiseType.SUCCESS);
|
|
8219
8222
|
// }
|
|
8220
8223
|
}
|
|
8221
|
-
let Mn = class extends
|
|
8224
|
+
let Mn = class extends Rt {
|
|
8222
8225
|
constructor(i, a) {
|
|
8223
8226
|
super(), this._runtimeService = i, this._interpreter = a;
|
|
8224
8227
|
}
|
|
8225
8228
|
get zIndex() {
|
|
8226
|
-
return
|
|
8229
|
+
return bt.get(ie.LAMBDA) || yt;
|
|
8227
8230
|
}
|
|
8228
8231
|
create(i) {
|
|
8229
8232
|
const a = i.getChildren(), e = a[0];
|
|
@@ -8231,7 +8234,7 @@ let Mn = class extends yt {
|
|
|
8231
8234
|
const r = a[a.length - 1];
|
|
8232
8235
|
if (!(e instanceof ae && r instanceof ae))
|
|
8233
8236
|
return xe.create(m.NAME);
|
|
8234
|
-
if (e.getToken() ===
|
|
8237
|
+
if (e.getToken() === dr) {
|
|
8235
8238
|
const o = e.getChildren();
|
|
8236
8239
|
if (t.length !== o.length)
|
|
8237
8240
|
return xe.create(m.VALUE);
|
|
@@ -8257,8 +8260,8 @@ let Mn = class extends yt {
|
|
|
8257
8260
|
}
|
|
8258
8261
|
};
|
|
8259
8262
|
Mn = dh([
|
|
8260
|
-
Mi(0,
|
|
8261
|
-
Mi(1, ye(
|
|
8263
|
+
Mi(0, wt),
|
|
8264
|
+
Mi(1, ye(br))
|
|
8262
8265
|
], Mn);
|
|
8263
8266
|
function To(i) {
|
|
8264
8267
|
if (!i)
|
|
@@ -8292,9 +8295,9 @@ class _h extends Ge {
|
|
|
8292
8295
|
}
|
|
8293
8296
|
}
|
|
8294
8297
|
}
|
|
8295
|
-
class Bo extends
|
|
8298
|
+
class Bo extends Rt {
|
|
8296
8299
|
get zIndex() {
|
|
8297
|
-
return
|
|
8300
|
+
return bt.get(ie.LAMBDA_PARAMETER) || yt;
|
|
8298
8301
|
}
|
|
8299
8302
|
create(a) {
|
|
8300
8303
|
const e = a.getFunctionDefinitionPrivacyVar(), t = a.getLambdaParameter();
|
|
@@ -8346,12 +8349,12 @@ class Rh extends Ge {
|
|
|
8346
8349
|
);
|
|
8347
8350
|
}
|
|
8348
8351
|
}
|
|
8349
|
-
let wn = class extends
|
|
8352
|
+
let wn = class extends Rt {
|
|
8350
8353
|
constructor(i) {
|
|
8351
8354
|
super(), this._functionService = i;
|
|
8352
8355
|
}
|
|
8353
8356
|
get zIndex() {
|
|
8354
|
-
return
|
|
8357
|
+
return bt.get(ie.OPERATOR) || yt;
|
|
8355
8358
|
}
|
|
8356
8359
|
create(i) {
|
|
8357
8360
|
let a = "";
|
|
@@ -8364,7 +8367,7 @@ let wn = class extends yt {
|
|
|
8364
8367
|
if (i instanceof ae)
|
|
8365
8368
|
return;
|
|
8366
8369
|
const a = i.trim();
|
|
8367
|
-
if (!(a.charAt(0) === '"' && a.charAt(a.length - 1) === '"') &&
|
|
8370
|
+
if (!(a.charAt(0) === '"' && a.charAt(a.length - 1) === '"') && Pt.has(a))
|
|
8368
8371
|
return this.create(a);
|
|
8369
8372
|
}
|
|
8370
8373
|
};
|
|
@@ -8402,12 +8405,12 @@ class Es extends Ge {
|
|
|
8402
8405
|
};
|
|
8403
8406
|
}
|
|
8404
8407
|
}
|
|
8405
|
-
let Sn = class extends
|
|
8408
|
+
let Sn = class extends Rt {
|
|
8406
8409
|
constructor(i, a, e) {
|
|
8407
8410
|
super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e;
|
|
8408
8411
|
}
|
|
8409
8412
|
get zIndex() {
|
|
8410
|
-
return
|
|
8413
|
+
return bt.get(ie.REFERENCE) || yt;
|
|
8411
8414
|
}
|
|
8412
8415
|
checkAndCreateNodeType(i) {
|
|
8413
8416
|
var l, f;
|
|
@@ -8427,7 +8430,7 @@ let Sn = class extends yt {
|
|
|
8427
8430
|
};
|
|
8428
8431
|
Sn = Vh([
|
|
8429
8432
|
As(0, $t),
|
|
8430
|
-
As(1,
|
|
8433
|
+
As(1, wt),
|
|
8431
8434
|
As(2, Gt)
|
|
8432
8435
|
], Sn);
|
|
8433
8436
|
var Nh = Object.getOwnPropertyDescriptor, Oh = (i, a, e, t) => {
|
|
@@ -8468,12 +8471,12 @@ class wi extends Ge {
|
|
|
8468
8471
|
return o && this._lexer.treeBuilder(o), g.create(m.VALUE);
|
|
8469
8472
|
}
|
|
8470
8473
|
}
|
|
8471
|
-
let Dn = class extends
|
|
8474
|
+
let Dn = class extends Rt {
|
|
8472
8475
|
constructor(i, a, e) {
|
|
8473
8476
|
super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
|
|
8474
8477
|
}
|
|
8475
8478
|
get zIndex() {
|
|
8476
|
-
return
|
|
8479
|
+
return bt.get(ie.SUFFIX) || yt;
|
|
8477
8480
|
}
|
|
8478
8481
|
checkAndCreateNodeType(i) {
|
|
8479
8482
|
if (!(i instanceof ae))
|
|
@@ -8491,7 +8494,7 @@ let Dn = class extends yt {
|
|
|
8491
8494
|
};
|
|
8492
8495
|
Dn = Oh([
|
|
8493
8496
|
bs(0, Gt),
|
|
8494
|
-
bs(1, ye(
|
|
8497
|
+
bs(1, ye(Ar)),
|
|
8495
8498
|
bs(2, $t)
|
|
8496
8499
|
], Dn);
|
|
8497
8500
|
var Mh = Object.getOwnPropertyDescriptor, wh = (i, a, e, t) => {
|
|
@@ -8517,12 +8520,12 @@ class Dh extends Ge {
|
|
|
8517
8520
|
return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e, qf(a, e));
|
|
8518
8521
|
}
|
|
8519
8522
|
}
|
|
8520
|
-
let Ln = class extends
|
|
8523
|
+
let Ln = class extends Rt {
|
|
8521
8524
|
constructor(i) {
|
|
8522
8525
|
super(), this._functionService = i;
|
|
8523
8526
|
}
|
|
8524
8527
|
get zIndex() {
|
|
8525
|
-
return
|
|
8528
|
+
return bt.get(ie.UNION) || yt;
|
|
8526
8529
|
}
|
|
8527
8530
|
create(i) {
|
|
8528
8531
|
return new Dh(i);
|
|
@@ -8548,17 +8551,17 @@ class Lh extends Ge {
|
|
|
8548
8551
|
execute() {
|
|
8549
8552
|
var e;
|
|
8550
8553
|
const a = ((e = this.getParent()) == null ? void 0 : e.nodeType) === ie.FUNCTION && this.getParent().isFunctionExecutorArgumentsIgnoreNumberPattern();
|
|
8551
|
-
this.setValue(
|
|
8554
|
+
this.setValue(Ot.create(this.getToken(), a));
|
|
8552
8555
|
}
|
|
8553
8556
|
}
|
|
8554
|
-
class Io extends
|
|
8557
|
+
class Io extends Rt {
|
|
8555
8558
|
get zIndex() {
|
|
8556
|
-
return
|
|
8559
|
+
return bt.get(ie.VALUE) || yt;
|
|
8557
8560
|
}
|
|
8558
8561
|
_checkValueNode(a) {
|
|
8559
8562
|
if (Number.isNaN(Number(a))) {
|
|
8560
8563
|
const e = a.trim(), t = e.charAt(0), r = e.charAt(e.length - 1);
|
|
8561
|
-
if (
|
|
8564
|
+
if (ir.has(e))
|
|
8562
8565
|
return this.create(e);
|
|
8563
8566
|
if (t === '"' && r === '"')
|
|
8564
8567
|
return this.create(e);
|
|
@@ -8623,7 +8626,7 @@ let vr = class extends Ne {
|
|
|
8623
8626
|
const r = new ae();
|
|
8624
8627
|
r.setToken(xr);
|
|
8625
8628
|
const n = new ae();
|
|
8626
|
-
n.setToken(
|
|
8629
|
+
n.setToken(dr);
|
|
8627
8630
|
const s = [...e];
|
|
8628
8631
|
for (let u = 0; u < t; u++) {
|
|
8629
8632
|
const c = s[u];
|
|
@@ -8649,7 +8652,7 @@ let vr = class extends Ne {
|
|
|
8649
8652
|
if (s = e, r === 0)
|
|
8650
8653
|
return new Ah(vt).setParent(e), s;
|
|
8651
8654
|
} else {
|
|
8652
|
-
if (o ===
|
|
8655
|
+
if (o === dr) {
|
|
8653
8656
|
let f = this._lambdaParameterHandler(a, e);
|
|
8654
8657
|
return f === !1 && (f = xe.create(m.ERROR)), f;
|
|
8655
8658
|
}
|
|
@@ -8756,7 +8759,7 @@ let vr = class extends Ne {
|
|
|
8756
8759
|
}
|
|
8757
8760
|
};
|
|
8758
8761
|
vr = xh([
|
|
8759
|
-
ut(0,
|
|
8762
|
+
ut(0, wt),
|
|
8760
8763
|
ut(1, ye(Po)),
|
|
8761
8764
|
ut(2, ye(On)),
|
|
8762
8765
|
ut(3, ye(Mn)),
|
|
@@ -9120,7 +9123,7 @@ class vh extends Ne {
|
|
|
9120
9123
|
super(...arguments);
|
|
9121
9124
|
A(this, "_referenceExecutorMap", /* @__PURE__ */ new Map());
|
|
9122
9125
|
// unitId -> subUnitId -> featureId -> IFeatureCalculationManagerParam
|
|
9123
|
-
A(this, "_onChanged$", new
|
|
9126
|
+
A(this, "_onChanged$", new hr());
|
|
9124
9127
|
A(this, "onChanged$", this._onChanged$.asObservable());
|
|
9125
9128
|
}
|
|
9126
9129
|
dispose() {
|
|
@@ -9518,8 +9521,8 @@ var Bh = Object.getOwnPropertyDescriptor, Ih = (i, a, e, t) => {
|
|
|
9518
9521
|
for (var r = t > 1 ? void 0 : t ? Bh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
9519
9522
|
(s = i[n]) && (r = s(r) || r);
|
|
9520
9523
|
return r;
|
|
9521
|
-
},
|
|
9522
|
-
function
|
|
9524
|
+
}, Lt = (i, a) => (e, t) => a(e, t, i);
|
|
9525
|
+
function cr(i) {
|
|
9523
9526
|
return i.getLastTreeId() || 0;
|
|
9524
9527
|
}
|
|
9525
9528
|
const Xs = Ze("engine-formula.dependency-generator");
|
|
@@ -9560,7 +9563,7 @@ let Zs = class extends Ne {
|
|
|
9560
9563
|
const { unitId: l, subUnitId: f, getDirtyData: h } = u, d = h(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), _ = this._convertDirtyRangesToUnitRange(d.dirtyRanges), C = this._intersectFeatureCalculation(_, a, { unitId: l, subUnitId: f, featureId: c });
|
|
9561
9564
|
if (C.length > 0) {
|
|
9562
9565
|
let E = this._getExistTreeList({ unitId: l, subUnitId: f, featureId: c }, a);
|
|
9563
|
-
E == null && (E = this._getFeatureFormulaTree(c,
|
|
9566
|
+
E == null && (E = this._getFeatureFormulaTree(c, cr(this._dependencyManagerService), u), a.push(E)), E.parents = /* @__PURE__ */ new Set(), C.forEach((b) => {
|
|
9564
9567
|
b.hasChildren(E.treeId) || b.pushChildren(E);
|
|
9565
9568
|
}), t = !0;
|
|
9566
9569
|
}
|
|
@@ -9708,7 +9711,7 @@ let Zs = class extends Ne {
|
|
|
9708
9711
|
});
|
|
9709
9712
|
}
|
|
9710
9713
|
_getFeatureFormulaTree(a, e, t) {
|
|
9711
|
-
const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e ||
|
|
9714
|
+
const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || cr(this._dependencyManagerService), c = new ys(u);
|
|
9712
9715
|
c.unitId = r, c.subUnitId = n, c.rangeList = s, c.getDirtyData = o;
|
|
9713
9716
|
const l = o(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), f = this._convertDirtyRangesToUnitRange(l.dirtyRanges);
|
|
9714
9717
|
return c.featureDirtyRanges = f, c.featureId = a, c.type = Ks.FEATURE_FORMULA, this._dependencyManagerService.addFeatureFormulaDependency(r, n, a, c), this._dependencyManagerService.getFeatureFormulaDependency(t.unitId, t.subUnitId, a) && (c.isCache = !0), c;
|
|
@@ -9728,7 +9731,7 @@ let Zs = class extends Ne {
|
|
|
9728
9731
|
const f = this._dependencyManagerService.hasOtherFormulaDataMainData(l), h = u[l], { f: d, ranges: _ } = h;
|
|
9729
9732
|
let C = !1;
|
|
9730
9733
|
f && (C = !0);
|
|
9731
|
-
const E = Vi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) ||
|
|
9734
|
+
const E = Vi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || cr(this._dependencyManagerService), M = new ys(N);
|
|
9732
9735
|
for (let w = 0; w < _.length; w++) {
|
|
9733
9736
|
const S = _[w], { startRow: D, startColumn: L, endRow: U, endColumn: x } = S;
|
|
9734
9737
|
for (let F = D; F <= U; F++)
|
|
@@ -9739,7 +9742,7 @@ let Zs = class extends Ne {
|
|
|
9739
9742
|
continue;
|
|
9740
9743
|
}
|
|
9741
9744
|
const G = new Si();
|
|
9742
|
-
G.treeId = (p == null ? void 0 : p.getValue(ne, z)) ||
|
|
9745
|
+
G.treeId = (p == null ? void 0 : p.getValue(ne, z)) || cr(this._dependencyManagerService), G.refTree = M, G.refOffsetX = ne, G.refOffsetY = z, G.isCache = C, this._dependencyManagerService.addOtherFormulaDependency(r, o, l, G), this._dependencyManagerService.addFormulaDependencyByDefinedName(G), t.push(G);
|
|
9743
9746
|
}
|
|
9744
9747
|
}
|
|
9745
9748
|
this._dependencyManagerService.addOtherFormulaDependencyMainData(l);
|
|
@@ -9789,12 +9792,12 @@ let Zs = class extends Ne {
|
|
|
9789
9792
|
}
|
|
9790
9793
|
}
|
|
9791
9794
|
_createFDtree(a, e, t, r, n, s) {
|
|
9792
|
-
const { f: o, x: u = 0, y: c = 0 } = s, l = new ys(
|
|
9795
|
+
const { f: o, x: u = 0, y: c = 0 } = s, l = new ys(cr(this._dependencyManagerService)), f = n[a][e], h = Vi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
|
|
9793
9796
|
return l.node = h, l.formula = o, l.unitId = a, l.subUnitId = e, l.row = t, l.column = r, l.rowCount = f.rowCount, l.columnCount = f.columnCount, l;
|
|
9794
9797
|
}
|
|
9795
9798
|
_createVirtualFDtree(a, e) {
|
|
9796
9799
|
const { x: t = 0, y: r = 0 } = e, n = new Si();
|
|
9797
|
-
return n.treeId =
|
|
9800
|
+
return n.treeId = cr(this._dependencyManagerService), n.refTree = a, n.refOffsetX = t, n.refOffsetY = r, n;
|
|
9798
9801
|
}
|
|
9799
9802
|
/**
|
|
9800
9803
|
* Break down the dirty areas into ranges for subsequent matching.
|
|
@@ -10115,14 +10118,14 @@ let Zs = class extends Ne {
|
|
|
10115
10118
|
}
|
|
10116
10119
|
};
|
|
10117
10120
|
Zs = Ih([
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10121
|
+
Lt(0, $t),
|
|
10122
|
+
Lt(1, wt),
|
|
10123
|
+
Lt(2, Ma),
|
|
10124
|
+
Lt(3, Tr),
|
|
10125
|
+
Lt(4, ye(br)),
|
|
10126
|
+
Lt(5, ye(vr)),
|
|
10127
|
+
Lt(6, ye(Ar)),
|
|
10128
|
+
Lt(7, es)
|
|
10126
10129
|
], Zs);
|
|
10127
10130
|
var Fh = Object.getOwnPropertyDescriptor, kh = (i, a, e, t) => {
|
|
10128
10131
|
for (var r = t > 1 ? void 0 : t ? Fh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
@@ -10133,9 +10136,9 @@ const $h = 500, zs = Ze("engine-formula.calculate-formula.service");
|
|
|
10133
10136
|
let Js = class extends Ne {
|
|
10134
10137
|
constructor(a, e, t, r, n, s, o) {
|
|
10135
10138
|
super();
|
|
10136
|
-
A(this, "_executionInProgressListener$", new
|
|
10139
|
+
A(this, "_executionInProgressListener$", new hr());
|
|
10137
10140
|
A(this, "executionInProgressListener$", this._executionInProgressListener$.asObservable());
|
|
10138
|
-
A(this, "_executionCompleteListener$", new
|
|
10141
|
+
A(this, "_executionCompleteListener$", new hr());
|
|
10139
10142
|
A(this, "executionCompleteListener$", this._executionCompleteListener$.asObservable());
|
|
10140
10143
|
A(this, "_executeLock", new uc());
|
|
10141
10144
|
this._configService = a, this._lexer = e, this._currentConfigService = t, this._runtimeService = r, this._formulaDependencyGenerator = n, this._interpreter = s, this._astTreeBuilder = o;
|
|
@@ -10256,11 +10259,11 @@ let Js = class extends Ne {
|
|
|
10256
10259
|
};
|
|
10257
10260
|
Js = kh([
|
|
10258
10261
|
Wt(0, ia),
|
|
10259
|
-
Wt(1, ye(
|
|
10262
|
+
Wt(1, ye(Ar)),
|
|
10260
10263
|
Wt(2, $t),
|
|
10261
|
-
Wt(3,
|
|
10264
|
+
Wt(3, wt),
|
|
10262
10265
|
Wt(4, Xs),
|
|
10263
|
-
Wt(5, ye(
|
|
10266
|
+
Wt(5, ye(br)),
|
|
10264
10267
|
Wt(6, ye(vr))
|
|
10265
10268
|
], Js);
|
|
10266
10269
|
var Yh = Object.getOwnPropertyDescriptor, Hh = (i, a, e, t) => {
|
|
@@ -10375,7 +10378,7 @@ let Pn = class extends Ne {
|
|
|
10375
10378
|
Pn = Hh([
|
|
10376
10379
|
Rs(0, ar),
|
|
10377
10380
|
Rs(1, zs),
|
|
10378
|
-
Rs(2, ye(
|
|
10381
|
+
Rs(2, ye(_r))
|
|
10379
10382
|
], Pn);
|
|
10380
10383
|
const Di = /[\[\]]/g;
|
|
10381
10384
|
function Li(i, a) {
|
|
@@ -10871,7 +10874,7 @@ const Kh = [
|
|
|
10871
10874
|
[Wh, ea.ARRAY_CONSTRAIN],
|
|
10872
10875
|
[qh, ea.FLATTEN]
|
|
10873
10876
|
];
|
|
10874
|
-
var
|
|
10877
|
+
var yr;
|
|
10875
10878
|
((i) => {
|
|
10876
10879
|
const a = 0.636619772;
|
|
10877
10880
|
function e(n, s) {
|
|
@@ -11010,7 +11013,7 @@ var br;
|
|
|
11010
11013
|
}
|
|
11011
11014
|
return r(o, l, 2, 1);
|
|
11012
11015
|
})();
|
|
11013
|
-
})(
|
|
11016
|
+
})(yr || (yr = {}));
|
|
11014
11017
|
function wa(i) {
|
|
11015
11018
|
return /^[01]{1,10}$/.test(i);
|
|
11016
11019
|
}
|
|
@@ -11079,7 +11082,7 @@ function Xh(i) {
|
|
|
11079
11082
|
}
|
|
11080
11083
|
return i < 1 ? t : -t;
|
|
11081
11084
|
}
|
|
11082
|
-
function
|
|
11085
|
+
function mr(i, a = 1) {
|
|
11083
11086
|
let e = Math.floor(i);
|
|
11084
11087
|
if (i < 0)
|
|
11085
11088
|
return Number.NaN;
|
|
@@ -11137,12 +11140,12 @@ function Jh(i) {
|
|
|
11137
11140
|
}
|
|
11138
11141
|
return e;
|
|
11139
11142
|
}
|
|
11140
|
-
function
|
|
11143
|
+
function gr(i, a) {
|
|
11141
11144
|
return i.map((e) => a[0].map(
|
|
11142
11145
|
(t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
|
|
11143
11146
|
));
|
|
11144
11147
|
}
|
|
11145
|
-
function
|
|
11148
|
+
function dt(i) {
|
|
11146
11149
|
return i[0].map((a, e) => i.map((t) => t[e]));
|
|
11147
11150
|
}
|
|
11148
11151
|
function em(i) {
|
|
@@ -11150,7 +11153,7 @@ function em(i) {
|
|
|
11150
11153
|
return a ? null : tm(e, t);
|
|
11151
11154
|
}
|
|
11152
11155
|
function ko(i) {
|
|
11153
|
-
const a =
|
|
11156
|
+
const a = dt(i), e = a.length, t = a[0].length;
|
|
11154
11157
|
let r = !0, n = !1;
|
|
11155
11158
|
const s = ra(e, t, 0), o = new Array(t).fill(0).map((u, c) => c);
|
|
11156
11159
|
for (let u = 0; u < t; u++) {
|
|
@@ -11228,13 +11231,13 @@ function rm(i) {
|
|
|
11228
11231
|
const a = nm(i);
|
|
11229
11232
|
if (!a)
|
|
11230
11233
|
return null;
|
|
11231
|
-
const { matrixU: e, matrixS: t, matrixV: r } = a, n =
|
|
11234
|
+
const { matrixU: e, matrixS: t, matrixV: r } = a, n = dt(e), s = Array.from({ length: t.length }, () => new Array(i[0].length).fill(0)), o = Math.max(i.length, i[0].length) * Number.EPSILON * t[0];
|
|
11232
11235
|
for (let u = 0; u < t.length; u++)
|
|
11233
11236
|
Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
|
|
11234
|
-
return
|
|
11237
|
+
return gr(r, gr(s, n));
|
|
11235
11238
|
}
|
|
11236
11239
|
function nm(i) {
|
|
11237
|
-
const a =
|
|
11240
|
+
const a = dt(i), e = a.length, t = a[0].length;
|
|
11238
11241
|
if (e < t)
|
|
11239
11242
|
return null;
|
|
11240
11243
|
const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
|
|
@@ -11709,7 +11712,7 @@ function Am(i, a) {
|
|
|
11709
11712
|
return e;
|
|
11710
11713
|
}
|
|
11711
11714
|
function Xo(i, a) {
|
|
11712
|
-
return Math.exp(-a) * a ** i /
|
|
11715
|
+
return Math.exp(-a) * a ** i / mr(i);
|
|
11713
11716
|
}
|
|
11714
11717
|
function Gr(i, a) {
|
|
11715
11718
|
const e = 0.5 * ts(a / (i ** 2 + a), a / 2, 0.5);
|
|
@@ -11778,7 +11781,7 @@ function ss(i, a, e) {
|
|
|
11778
11781
|
errorObject: null
|
|
11779
11782
|
};
|
|
11780
11783
|
}
|
|
11781
|
-
function
|
|
11784
|
+
function At(i) {
|
|
11782
11785
|
const a = i.isArray() ? i.getRowCount() : 1, e = i.isArray() ? i.getColumnCount() : 1, t = [];
|
|
11783
11786
|
for (let r = 0; r < a; r++) {
|
|
11784
11787
|
t[r] = [];
|
|
@@ -11868,13 +11871,13 @@ function os(i, a, e, t, r) {
|
|
|
11868
11871
|
let s = i;
|
|
11869
11872
|
r && (s = i.map((C) => C.map((E) => Math.log(E))));
|
|
11870
11873
|
let o = a, u = e;
|
|
11871
|
-
n && (s =
|
|
11872
|
-
const c =
|
|
11874
|
+
n && (s = dt(s), o = dt(o), u = dt(u)), t && (o = o.map((C) => [...C, 1]));
|
|
11875
|
+
const c = dt(o), l = gr(c, o), f = gr(c, s);
|
|
11873
11876
|
let h = em(l);
|
|
11874
11877
|
if (!h && (h = rm(l), !h))
|
|
11875
11878
|
return g.create(m.NA);
|
|
11876
|
-
let d =
|
|
11877
|
-
t || d.push([0]), d =
|
|
11879
|
+
let d = gr(h, f);
|
|
11880
|
+
t || d.push([0]), d = dt(d);
|
|
11878
11881
|
const _ = d[0].pop();
|
|
11879
11882
|
if (d[0].reverse(), d[0].push(_), r)
|
|
11880
11883
|
for (let C = 0; C < d[0].length; C++)
|
|
@@ -13448,7 +13451,7 @@ class Pm extends V {
|
|
|
13448
13451
|
return !0;
|
|
13449
13452
|
}
|
|
13450
13453
|
}
|
|
13451
|
-
class
|
|
13454
|
+
class ty extends Pm {
|
|
13452
13455
|
isAsync() {
|
|
13453
13456
|
return !0;
|
|
13454
13457
|
}
|
|
@@ -13594,7 +13597,7 @@ function it(i, a, e) {
|
|
|
13594
13597
|
break;
|
|
13595
13598
|
}
|
|
13596
13599
|
const [d, _] = Va(`${l}`);
|
|
13597
|
-
if (!
|
|
13600
|
+
if (!Ot.create(`${h}`).compare(_, d).getValue()) {
|
|
13598
13601
|
u = !1;
|
|
13599
13602
|
break;
|
|
13600
13603
|
}
|
|
@@ -13970,16 +13973,16 @@ function Ha(i) {
|
|
|
13970
13973
|
return i.replace(/\//g, "-").split("-").map((c) => c.padStart(2, "0")).join("-") === o;
|
|
13971
13974
|
}
|
|
13972
13975
|
function xn(i) {
|
|
13973
|
-
return
|
|
13976
|
+
return _t.parseDate(i);
|
|
13974
13977
|
}
|
|
13975
13978
|
function qm(i) {
|
|
13976
|
-
return
|
|
13979
|
+
return _t.parseValue(i);
|
|
13977
13980
|
}
|
|
13978
13981
|
function jn(i) {
|
|
13979
|
-
return
|
|
13982
|
+
return _t.parseTime(i);
|
|
13980
13983
|
}
|
|
13981
13984
|
function Ga(i) {
|
|
13982
|
-
return
|
|
13985
|
+
return _t.getFormatInfo(i).isDate;
|
|
13983
13986
|
}
|
|
13984
13987
|
const wu = {
|
|
13985
13988
|
1: [6, 0],
|
|
@@ -14173,13 +14176,13 @@ function Du(i, a) {
|
|
|
14173
14176
|
return -1;
|
|
14174
14177
|
}
|
|
14175
14178
|
}
|
|
14176
|
-
function
|
|
14179
|
+
function Rr(i, a, e) {
|
|
14177
14180
|
return Wr(i, a) === e;
|
|
14178
14181
|
}
|
|
14179
|
-
function
|
|
14182
|
+
function pr(i, a) {
|
|
14180
14183
|
let e = i.getUTCFullYear(), t = i.getUTCMonth();
|
|
14181
14184
|
const r = i.getUTCDate();
|
|
14182
|
-
return
|
|
14185
|
+
return Rr(e, t, r) ? (i.setUTCDate(1), i.setUTCMonth(i.getUTCMonth() + a), e = i.getUTCFullYear(), t = i.getUTCMonth(), i.setUTCDate(Wr(e, t))) : i.setUTCMonth(i.getUTCMonth() + a), i;
|
|
14183
14186
|
}
|
|
14184
14187
|
class rg extends V {
|
|
14185
14188
|
constructor() {
|
|
@@ -15267,7 +15270,7 @@ class Dg extends V {
|
|
|
15267
15270
|
return g.create(m.VALUE);
|
|
15268
15271
|
if (l < 0)
|
|
15269
15272
|
return g.create(m.NUM);
|
|
15270
|
-
const f =
|
|
15273
|
+
const f = yr.besseli(c, l);
|
|
15271
15274
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
|
|
15272
15275
|
}
|
|
15273
15276
|
}
|
|
@@ -15288,7 +15291,7 @@ class Lg extends V {
|
|
|
15288
15291
|
return g.create(m.VALUE);
|
|
15289
15292
|
if (l < 0)
|
|
15290
15293
|
return g.create(m.NUM);
|
|
15291
|
-
const f =
|
|
15294
|
+
const f = yr.besselj(c, l);
|
|
15292
15295
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
|
|
15293
15296
|
}
|
|
15294
15297
|
}
|
|
@@ -15309,7 +15312,7 @@ class Pg extends V {
|
|
|
15309
15312
|
return g.create(m.VALUE);
|
|
15310
15313
|
if (l < 0)
|
|
15311
15314
|
return g.create(m.NUM);
|
|
15312
|
-
const f =
|
|
15315
|
+
const f = yr.besselk(c, l);
|
|
15313
15316
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
|
|
15314
15317
|
}
|
|
15315
15318
|
}
|
|
@@ -15330,7 +15333,7 @@ class xg extends V {
|
|
|
15330
15333
|
return g.create(m.VALUE);
|
|
15331
15334
|
if (l < 0)
|
|
15332
15335
|
return g.create(m.NUM);
|
|
15333
|
-
const f =
|
|
15336
|
+
const f = yr.bessely(c, l);
|
|
15334
15337
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
|
|
15335
15338
|
}
|
|
15336
15339
|
}
|
|
@@ -17292,7 +17295,7 @@ function Xe(i, a, e, t) {
|
|
|
17292
17295
|
if (t === 1) {
|
|
17293
17296
|
const n = kt(i, a, e);
|
|
17294
17297
|
let s = re(n);
|
|
17295
|
-
s =
|
|
17298
|
+
s = pr(s, 12 / e);
|
|
17296
17299
|
const o = Re(s);
|
|
17297
17300
|
n < 0 && e === 1 ? r = 365 : r = o - n;
|
|
17298
17301
|
} else t === 3 ? r = 365 / e : r = 360 / e;
|
|
@@ -17302,22 +17305,22 @@ function Lu(i, a, e) {
|
|
|
17302
17305
|
const t = re(i);
|
|
17303
17306
|
let r = re(a);
|
|
17304
17307
|
for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
|
|
17305
|
-
r =
|
|
17306
|
-
return r =
|
|
17308
|
+
r = pr(r, -12 / e);
|
|
17309
|
+
return r = pr(r, 12 / e), Re(r);
|
|
17307
17310
|
}
|
|
17308
17311
|
function nr(i, a, e) {
|
|
17309
17312
|
let t = 0;
|
|
17310
17313
|
const r = re(i);
|
|
17311
17314
|
let n = re(a);
|
|
17312
17315
|
for (; n > r; )
|
|
17313
|
-
n =
|
|
17316
|
+
n = pr(n, -12 / e), t++;
|
|
17314
17317
|
return t;
|
|
17315
17318
|
}
|
|
17316
17319
|
function kt(i, a, e) {
|
|
17317
17320
|
const t = re(i);
|
|
17318
17321
|
let r = re(a);
|
|
17319
17322
|
for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
|
|
17320
|
-
r =
|
|
17323
|
+
r = pr(r, -12 / e);
|
|
17321
17324
|
return Re(r);
|
|
17322
17325
|
}
|
|
17323
17326
|
function Pu(i, a, e, t, r, n) {
|
|
@@ -17428,7 +17431,7 @@ function Xt(i, a, e) {
|
|
|
17428
17431
|
return i < a ? t : 0;
|
|
17429
17432
|
}
|
|
17430
17433
|
function vu(i, a, e) {
|
|
17431
|
-
const t = re(i), r = t.getUTCFullYear(), n = t.getUTCMonth(), s = t.getUTCDate(), o =
|
|
17434
|
+
const t = re(i), r = t.getUTCFullYear(), n = t.getUTCMonth(), s = t.getUTCDate(), o = Rr(r, n, s), u = re(a), c = u.getUTCFullYear(), l = u.getUTCMonth(), f = u.getUTCDate(), h = Rr(c, l, f);
|
|
17432
17435
|
return !(s !== f && !(o && h) || Math.abs((c - r) * 12 + (l - n)) % (12 / e) !== 0);
|
|
17433
17436
|
}
|
|
17434
17437
|
function Sr(i, a, e) {
|
|
@@ -17436,14 +17439,14 @@ function Sr(i, a, e) {
|
|
|
17436
17439
|
}
|
|
17437
17440
|
function er(i, a, e) {
|
|
17438
17441
|
let t = re(i);
|
|
17439
|
-
if (t =
|
|
17442
|
+
if (t = pr(t, a), e) {
|
|
17440
17443
|
const r = t.getUTCFullYear(), n = t.getUTCMonth(), s = Wr(r, n);
|
|
17441
17444
|
t.setUTCDate(s);
|
|
17442
17445
|
}
|
|
17443
17446
|
return Re(t);
|
|
17444
17447
|
}
|
|
17445
17448
|
function v1(i, a, e, t) {
|
|
17446
|
-
const r = re(i), n = re(a), s = r.getUTCFullYear(), o = r.getUTCMonth(), u = r.getUTCDate(), c = n.getUTCFullYear(), l = n.getUTCMonth(), f = n.getUTCDate(), h =
|
|
17449
|
+
const r = re(i), n = re(a), s = r.getUTCFullYear(), o = r.getUTCMonth(), u = r.getUTCDate(), c = n.getUTCFullYear(), l = n.getUTCMonth(), f = n.getUTCDate(), h = Rr(s, o, u), d = !h && o !== 1 && u > 28 && u < Wr(s, o) ? Rr(c, l, f) : h, _ = er(a, 0, d);
|
|
17447
17450
|
let C = 1 + +(a < _), E = er(_, e, d);
|
|
17448
17451
|
for (; !(e > 0 ? E >= a : E <= a); )
|
|
17449
17452
|
E = er(E, e, d), C++;
|
|
@@ -17531,7 +17534,7 @@ class B1 extends V {
|
|
|
17531
17534
|
if (l <= 0)
|
|
17532
17535
|
return y.create(0);
|
|
17533
17536
|
l = kt(r, t, o);
|
|
17534
|
-
const f = 12 / o, h = re(t), d = h.getUTCFullYear(), _ = h.getUTCMonth(), C = h.getUTCDate(), E =
|
|
17537
|
+
const f = 12 / o, h = re(t), d = h.getUTCFullYear(), _ = h.getUTCMonth(), C = h.getUTCDate(), E = Rr(d, _, C);
|
|
17535
17538
|
let b = er(t, -f, E);
|
|
17536
17539
|
if (r > t && c)
|
|
17537
17540
|
for (b = t; b < r; )
|
|
@@ -18137,10 +18140,10 @@ class a0 extends V {
|
|
|
18137
18140
|
const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: F, variants: Q } = B(p, w, S, D, L, U);
|
|
18138
18141
|
if (x)
|
|
18139
18142
|
return F;
|
|
18140
|
-
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ke = +G.getValue(),
|
|
18143
|
+
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ke = +G.getValue(), St = +ge.getValue(), or = +de.getValue(), Dt = +Ee.getValue();
|
|
18141
18144
|
if (me < 1 || Math.floor(me) > Math.ceil(ke))
|
|
18142
18145
|
return g.create(m.NUM);
|
|
18143
|
-
const ot = xu(pe, me, ke,
|
|
18146
|
+
const ot = xu(pe, me, ke, St, or, Dt ? 1 : 0);
|
|
18144
18147
|
return Number.isNaN(ot) || !Number.isFinite(ot) ? g.create(m.NUM) : N === 0 && M === 0 ? y.create(ot, ze(this.getLocale())) : y.create(ot);
|
|
18145
18148
|
});
|
|
18146
18149
|
return l === 1 && f === 1 ? R.get(0, 0) : R;
|
|
@@ -18402,8 +18405,8 @@ class f0 extends V {
|
|
|
18402
18405
|
if (G === 0)
|
|
18403
18406
|
me = -(de + Ee) / ge;
|
|
18404
18407
|
else {
|
|
18405
|
-
const ke = ge * (1 + G * pe) - Ee * G,
|
|
18406
|
-
me = Math.log(ke /
|
|
18408
|
+
const ke = ge * (1 + G * pe) - Ee * G, St = de * G + ge * (1 + G * pe);
|
|
18409
|
+
me = Math.log(ke / St) / Math.log(1 + G);
|
|
18407
18410
|
}
|
|
18408
18411
|
return Number.isNaN(me) || !Number.isFinite(me) ? g.create(m.NUM) : y.create(me);
|
|
18409
18412
|
});
|
|
@@ -18768,10 +18771,10 @@ class E0 extends V {
|
|
|
18768
18771
|
const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: F, variants: Q } = B(p, w, S, D, L, U);
|
|
18769
18772
|
if (x)
|
|
18770
18773
|
return F;
|
|
18771
|
-
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ke = +G.getValue(),
|
|
18774
|
+
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ke = +G.getValue(), St = +ge.getValue(), or = +de.getValue(), Dt = +Ee.getValue();
|
|
18772
18775
|
if (me < 1 || Math.floor(me) > Math.ceil(ke) || me - ke >= 1)
|
|
18773
18776
|
return g.create(m.NUM);
|
|
18774
|
-
const ot = qr(pe, ke,
|
|
18777
|
+
const ot = qr(pe, ke, St, or, Dt ? 1 : 0) - xu(pe, me, ke, St, or, Dt ? 1 : 0);
|
|
18775
18778
|
return Number.isNaN(ot) || !Number.isFinite(ot) ? g.create(m.NUM) : N === 0 && M === 0 ? y.create(ot, ze(this.getLocale())) : y.create(ot);
|
|
18776
18779
|
});
|
|
18777
18780
|
return l === 1 && f === 1 ? R.get(0, 0) : R;
|
|
@@ -18923,10 +18926,10 @@ class V0 extends V {
|
|
|
18923
18926
|
const S = _.get(M, w), D = C.get(M, w), L = E.get(M, w), U = b.get(M, w), x = R.get(M, w), { isError: F, errorObject: Q, variants: ne } = B(N, S, D, L, U, x);
|
|
18924
18927
|
if (F)
|
|
18925
18928
|
return Q;
|
|
18926
|
-
const [z, G, ge, de, Ee, pe] = ne, me = +z.getValue(), ke = +G.getValue(),
|
|
18927
|
-
let
|
|
18929
|
+
const [z, G, ge, de, Ee, pe] = ne, me = +z.getValue(), ke = +G.getValue(), St = +ge.getValue(), or = +de.getValue();
|
|
18930
|
+
let Dt = +Ee.getValue();
|
|
18928
18931
|
const ot = +pe.getValue();
|
|
18929
|
-
return
|
|
18932
|
+
return Dt = Dt ? 1 : 0, me <= 0 || ke >= 0 ? g.create(m.NUM) : this._getResult(me, ke, St, or, Dt, ot, M, w);
|
|
18930
18933
|
});
|
|
18931
18934
|
return f === 1 && h === 1 ? p.get(0, 0) : p;
|
|
18932
18935
|
}
|
|
@@ -21575,7 +21578,7 @@ class Gd extends V {
|
|
|
21575
21578
|
return this._setDefault(new pa(n));
|
|
21576
21579
|
if (to(n))
|
|
21577
21580
|
return this._setDefault(new Ra(n));
|
|
21578
|
-
const s =
|
|
21581
|
+
const s = Cr(n), { range: o, sheetName: u, unitId: c } = s;
|
|
21579
21582
|
if (Number.isNaN(o.startRow) || o.endRow + 1 > 1048576 || Number.isNaN(o.startColumn) || o.endColumn + 1 > 16384)
|
|
21580
21583
|
return g.create(m.REF);
|
|
21581
21584
|
const l = new pn(o);
|
|
@@ -23410,7 +23413,7 @@ class BC extends V {
|
|
|
23410
23413
|
let t = e;
|
|
23411
23414
|
if (t.isString() && (t = t.convertToNumberObjectValue()), t.isError())
|
|
23412
23415
|
return t;
|
|
23413
|
-
const r = Math.floor(+t.getValue()), n =
|
|
23416
|
+
const r = Math.floor(+t.getValue()), n = mr(r);
|
|
23414
23417
|
return Number.isNaN(n) || !Number.isFinite(n) ? g.create(m.NUM) : y.create(n);
|
|
23415
23418
|
}
|
|
23416
23419
|
}
|
|
@@ -23434,7 +23437,7 @@ class IC extends V {
|
|
|
23434
23437
|
let t = e;
|
|
23435
23438
|
if (t.isString() && (t = t.convertToNumberObjectValue()), t.isError())
|
|
23436
23439
|
return t;
|
|
23437
|
-
const r = Math.floor(+t.getValue()), n =
|
|
23440
|
+
const r = Math.floor(+t.getValue()), n = mr(r, 2);
|
|
23438
23441
|
return Number.isNaN(n) || !Number.isFinite(n) ? g.create(m.NUM) : y.create(n);
|
|
23439
23442
|
}
|
|
23440
23443
|
}
|
|
@@ -23801,7 +23804,7 @@ class ZC extends V {
|
|
|
23801
23804
|
return u;
|
|
23802
23805
|
if (c instanceof g)
|
|
23803
23806
|
return c;
|
|
23804
|
-
const l =
|
|
23807
|
+
const l = gr(u, c);
|
|
23805
23808
|
return q.createByArray(l);
|
|
23806
23809
|
}
|
|
23807
23810
|
_getMatrix(e, t, r) {
|
|
@@ -23897,7 +23900,7 @@ class e_ extends V {
|
|
|
23897
23900
|
return u = !0, c = h, !1;
|
|
23898
23901
|
if (t += d, t > 170)
|
|
23899
23902
|
return u = !0, c = g.create(m.NUM), !1;
|
|
23900
|
-
r *=
|
|
23903
|
+
r *= mr(d);
|
|
23901
23904
|
}), u)
|
|
23902
23905
|
return c;
|
|
23903
23906
|
} else {
|
|
@@ -23906,10 +23909,10 @@ class e_ extends V {
|
|
|
23906
23909
|
return c;
|
|
23907
23910
|
if (t += l, t > 170)
|
|
23908
23911
|
return g.create(m.NUM);
|
|
23909
|
-
r *=
|
|
23912
|
+
r *= mr(l);
|
|
23910
23913
|
}
|
|
23911
23914
|
}
|
|
23912
|
-
const n =
|
|
23915
|
+
const n = mr(t) / r;
|
|
23913
23916
|
return y.create(n);
|
|
23914
23917
|
}
|
|
23915
23918
|
_handleSingleObject(e) {
|
|
@@ -26458,7 +26461,7 @@ class bA extends V {
|
|
|
26458
26461
|
const { isError: s, errorObject: o } = ss(e, t, r);
|
|
26459
26462
|
if (s)
|
|
26460
26463
|
return o;
|
|
26461
|
-
const u =
|
|
26464
|
+
const u = At(e);
|
|
26462
26465
|
if (u instanceof g)
|
|
26463
26466
|
return u;
|
|
26464
26467
|
const c = this._getKnownXsValues(u, t);
|
|
@@ -26489,17 +26492,17 @@ class bA extends V {
|
|
|
26489
26492
|
_ *= u[0][l - 2 - C] ** c[d][C];
|
|
26490
26493
|
h[d].push(_);
|
|
26491
26494
|
}
|
|
26492
|
-
return s && (h =
|
|
26495
|
+
return s && (h = dt(h)), q.createByArray(h);
|
|
26493
26496
|
}
|
|
26494
26497
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
26495
26498
|
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = is(o, s, n, !0), l = r.map((f) => f.map((h) => c * u ** h));
|
|
26496
26499
|
return q.createByArray(l);
|
|
26497
26500
|
}
|
|
26498
26501
|
_getKnownXsValues(e, t) {
|
|
26499
|
-
return !t || t.isNull() ? as(e.length, e[0].length) :
|
|
26502
|
+
return !t || t.isNull() ? as(e.length, e[0].length) : At(t);
|
|
26500
26503
|
}
|
|
26501
26504
|
_getNewXsValues(e, t) {
|
|
26502
|
-
return !t || t.isNull() ? e :
|
|
26505
|
+
return !t || t.isNull() ? e : At(t);
|
|
26503
26506
|
}
|
|
26504
26507
|
}
|
|
26505
26508
|
class yA extends V {
|
|
@@ -26719,7 +26722,7 @@ class OA extends V {
|
|
|
26719
26722
|
const { isError: s, errorObject: o } = ss(e, t);
|
|
26720
26723
|
if (s)
|
|
26721
26724
|
return o;
|
|
26722
|
-
const u =
|
|
26725
|
+
const u = At(e);
|
|
26723
26726
|
if (u instanceof g)
|
|
26724
26727
|
return u;
|
|
26725
26728
|
const c = this._getKnownXsValues(u, t);
|
|
@@ -26826,7 +26829,7 @@ class OA extends V {
|
|
|
26826
26829
|
return q.createByArray(l);
|
|
26827
26830
|
}
|
|
26828
26831
|
_getKnownXsValues(e, t) {
|
|
26829
|
-
return !t || t.isNull() ? as(e.length, e[0].length) :
|
|
26832
|
+
return !t || t.isNull() ? as(e.length, e[0].length) : At(t);
|
|
26830
26833
|
}
|
|
26831
26834
|
}
|
|
26832
26835
|
class MA extends V {
|
|
@@ -26839,7 +26842,7 @@ class MA extends V {
|
|
|
26839
26842
|
const { isError: s, errorObject: o } = ss(e, t);
|
|
26840
26843
|
if (s)
|
|
26841
26844
|
return o;
|
|
26842
|
-
const u =
|
|
26845
|
+
const u = At(e);
|
|
26843
26846
|
if (u instanceof g)
|
|
26844
26847
|
return u;
|
|
26845
26848
|
const c = this._getKnownXsValues(u, t);
|
|
@@ -26946,7 +26949,7 @@ class MA extends V {
|
|
|
26946
26949
|
return q.createByArray(f);
|
|
26947
26950
|
}
|
|
26948
26951
|
_getKnownXsValues(e, t) {
|
|
26949
|
-
return !t || t.isNull() ? as(e.length, e[0].length) :
|
|
26952
|
+
return !t || t.isNull() ? as(e.length, e[0].length) : At(t);
|
|
26950
26953
|
}
|
|
26951
26954
|
}
|
|
26952
26955
|
class wA extends V {
|
|
@@ -28321,7 +28324,7 @@ class cE extends V {
|
|
|
28321
28324
|
const { isError: s, errorObject: o } = ss(e, t, r);
|
|
28322
28325
|
if (s)
|
|
28323
28326
|
return o;
|
|
28324
|
-
const u =
|
|
28327
|
+
const u = At(e);
|
|
28325
28328
|
if (u instanceof g)
|
|
28326
28329
|
return u;
|
|
28327
28330
|
const c = this._getKnownXsValues(u, t);
|
|
@@ -28352,7 +28355,7 @@ class cE extends V {
|
|
|
28352
28355
|
_ += u[0][l - 2 - C] * c[d][C];
|
|
28353
28356
|
h[d].push(_);
|
|
28354
28357
|
}
|
|
28355
|
-
return s && (h =
|
|
28358
|
+
return s && (h = dt(h)), q.createByArray(h);
|
|
28356
28359
|
}
|
|
28357
28360
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
28358
28361
|
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = is(o, s, n, !1);
|
|
@@ -28362,10 +28365,10 @@ class cE extends V {
|
|
|
28362
28365
|
return q.createByArray(l);
|
|
28363
28366
|
}
|
|
28364
28367
|
_getKnownXsValues(e, t) {
|
|
28365
|
-
return !t || t.isNull() ? as(e.length, e[0].length) :
|
|
28368
|
+
return !t || t.isNull() ? as(e.length, e[0].length) : At(t);
|
|
28366
28369
|
}
|
|
28367
28370
|
_getNewXsValues(e, t) {
|
|
28368
|
-
return !t || t.isNull() ? e :
|
|
28371
|
+
return !t || t.isNull() ? e : At(t);
|
|
28369
28372
|
}
|
|
28370
28373
|
}
|
|
28371
28374
|
class lE extends V {
|
|
@@ -28884,7 +28887,7 @@ class NE extends V {
|
|
|
28884
28887
|
return T.create(s);
|
|
28885
28888
|
}
|
|
28886
28889
|
}
|
|
28887
|
-
const qa = (i, a) =>
|
|
28890
|
+
const qa = (i, a) => _t.format(i, a, { throws: !1 }), Se = (i) => {
|
|
28888
28891
|
let a = `${i.getValue()}`;
|
|
28889
28892
|
return i.isNull() && (a = ""), i.isBoolean() && (a = a.toLocaleUpperCase()), i.isNumber() && (i.getPattern() !== "" ? a = qa(i.getPattern(), +i.getValue()) : a = `${ba(+i.getValue())}`), a;
|
|
28890
28893
|
};
|
|
@@ -30891,7 +30894,7 @@ const Qu = Ze("univer.formula.super-table.service");
|
|
|
30891
30894
|
function $i(i) {
|
|
30892
30895
|
return i.map((a) => a.map((e) => typeof e == "number" ? ba(e) : e));
|
|
30893
30896
|
}
|
|
30894
|
-
function
|
|
30897
|
+
function ny(i, a = !1) {
|
|
30895
30898
|
if (i.isReferenceObject()) {
|
|
30896
30899
|
const e = i.toArrayValueObject().toValue();
|
|
30897
30900
|
return a ? $i(e) : e;
|
|
@@ -31340,7 +31343,7 @@ let Wi = (Os = class extends hc {
|
|
|
31340
31343
|
[Qu, { useClass: pb }],
|
|
31341
31344
|
[qu],
|
|
31342
31345
|
// Models
|
|
31343
|
-
[
|
|
31346
|
+
[_r],
|
|
31344
31347
|
// Engine
|
|
31345
31348
|
[ga],
|
|
31346
31349
|
//Controllers
|
|
@@ -31351,7 +31354,7 @@ let Wi = (Os = class extends hc {
|
|
|
31351
31354
|
i && a.push(
|
|
31352
31355
|
// Services
|
|
31353
31356
|
[Ma, { useClass: Th }],
|
|
31354
|
-
[
|
|
31357
|
+
[wt, { useClass: Ws }],
|
|
31355
31358
|
[$t, { useClass: vs }],
|
|
31356
31359
|
[Tr, { useClass: vh }],
|
|
31357
31360
|
//Controller
|
|
@@ -31360,9 +31363,9 @@ let Wi = (Os = class extends hc {
|
|
|
31360
31363
|
[Bn],
|
|
31361
31364
|
[In],
|
|
31362
31365
|
// Calculation engine
|
|
31363
|
-
[
|
|
31366
|
+
[br],
|
|
31364
31367
|
[vr],
|
|
31365
|
-
[
|
|
31368
|
+
[Ar],
|
|
31366
31369
|
// AstNode factory
|
|
31367
31370
|
[Po],
|
|
31368
31371
|
[On],
|
|
@@ -31395,7 +31398,7 @@ export {
|
|
|
31395
31398
|
Po as AstRootNodeFactory,
|
|
31396
31399
|
vr as AstTreeBuilder,
|
|
31397
31400
|
$f as AsyncArrayObject,
|
|
31398
|
-
|
|
31401
|
+
ty as AsyncCustomFunction,
|
|
31399
31402
|
kf as AsyncObject,
|
|
31400
31403
|
V as BaseFunction,
|
|
31401
31404
|
Zn as BaseReferenceObject,
|
|
@@ -31411,7 +31414,7 @@ export {
|
|
|
31411
31414
|
Uh as DependencyManagerService,
|
|
31412
31415
|
zb as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
|
|
31413
31416
|
Ca as ENGINE_FORMULA_PLUGIN_CONFIG_KEY,
|
|
31414
|
-
|
|
31417
|
+
ir as ERROR_TYPE_SET,
|
|
31415
31418
|
m as ErrorType,
|
|
31416
31419
|
g as ErrorValueObject,
|
|
31417
31420
|
ea as FUNCTION_NAMES_ARRAY,
|
|
@@ -31431,7 +31434,7 @@ export {
|
|
|
31431
31434
|
Wu as FUNCTION_NAMES_WEB,
|
|
31432
31435
|
vh as FeatureCalculationManagerService,
|
|
31433
31436
|
vs as FormulaCurrentConfigService,
|
|
31434
|
-
|
|
31437
|
+
_r as FormulaDataModel,
|
|
31435
31438
|
Zs as FormulaDependencyGenerator,
|
|
31436
31439
|
ys as FormulaDependencyTree,
|
|
31437
31440
|
Ks as FormulaDependencyTreeType,
|
|
@@ -31451,17 +31454,17 @@ export {
|
|
|
31451
31454
|
Tr as IFeatureCalculationManagerService,
|
|
31452
31455
|
$t as IFormulaCurrentConfigService,
|
|
31453
31456
|
Xs as IFormulaDependencyGenerator,
|
|
31454
|
-
|
|
31457
|
+
wt as IFormulaRuntimeService,
|
|
31455
31458
|
Gt as IFunctionService,
|
|
31456
31459
|
Lo as IHyperlinkEngineFormulaService,
|
|
31457
31460
|
Ma as IOtherFormulaManagerService,
|
|
31458
31461
|
_o as ISheetRowFilteredService,
|
|
31459
31462
|
Qu as ISuperTableService,
|
|
31460
|
-
|
|
31463
|
+
br as Interpreter,
|
|
31461
31464
|
Mn as LambdaNodeFactory,
|
|
31462
31465
|
Bo as LambdaParameterNodeFactory,
|
|
31463
31466
|
Oa as LambdaValueObjectObject,
|
|
31464
|
-
|
|
31467
|
+
Ar as Lexer,
|
|
31465
31468
|
ae as LexerNode,
|
|
31466
31469
|
ga as LexerTreeBuilder,
|
|
31467
31470
|
ue as NullValueObject,
|
|
@@ -31495,12 +31498,13 @@ export {
|
|
|
31495
31498
|
Ln as UnionNodeFactory,
|
|
31496
31499
|
Wi as UniverFormulaEnginePlugin,
|
|
31497
31500
|
Io as ValueNodeFactory,
|
|
31498
|
-
|
|
31501
|
+
Ot as ValueObjectFactory,
|
|
31499
31502
|
k as compareToken,
|
|
31500
31503
|
Bc as convertUnitDataToRuntime,
|
|
31501
31504
|
Gh as deserializeRangeForR1C1,
|
|
31502
31505
|
Pr as deserializeRangeWithSheet,
|
|
31503
|
-
|
|
31506
|
+
Cr as deserializeRangeWithSheetWithCache,
|
|
31507
|
+
ey as extractFormulaError,
|
|
31504
31508
|
Kh as functionArray,
|
|
31505
31509
|
Sm as functionCompatibility,
|
|
31506
31510
|
Dm as functionCube,
|
|
@@ -31519,11 +31523,11 @@ export {
|
|
|
31519
31523
|
Nb as functionWeb,
|
|
31520
31524
|
Vi as generateAstNode,
|
|
31521
31525
|
Oi as generateExecuteAstNodeData,
|
|
31522
|
-
|
|
31526
|
+
cr as generateRandomDependencyTreeId,
|
|
31523
31527
|
ci as generateStringWithSequence,
|
|
31524
31528
|
Kb as getAbsoluteRefTypeWitString,
|
|
31525
31529
|
on as getAbsoluteRefTypeWithSingleString,
|
|
31526
|
-
|
|
31530
|
+
ny as getObjectValue,
|
|
31527
31531
|
Xb as getRangeWithRefsString,
|
|
31528
31532
|
Jb as handleNumfmtInCell,
|
|
31529
31533
|
ua as handleRefStringInfo,
|