@univerjs/engine-formula 0.10.2 → 0.10.3

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/es/index.js CHANGED
@@ -1,10 +1,10 @@
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 yt, isFormulaId as Pt, Rectangle as Za, cellToRange as ec, Inject as ye, UniverInstanceType as cr, BooleanNumber as qi, LocaleService as tc, LocaleType as Sr, numfmt as dt, BuildTextUtils as rc, isRealNum as Q, CellValueType as Rt, 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 sr, 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 lr, BehaviorSubject as Xi, distinctUntilChanged as Zi, combineLatest as gc, map as dc, Observable as Cc, shareReplay as _c } from "rxjs";
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 Rt, isFormulaId as xt, Rectangle as Za, cellToRange as ec, Inject as ye, UniverInstanceType as lr, BooleanNumber as qi, LocaleService as tc, LocaleType as ht, numfmt as Ct, 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 fr, 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
- var er = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(er || {}), xt = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(xt || {}), ct = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ct || {});
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) {
9
9
  for (let n = 0, s = i.length; n < s; n++) {
10
10
  const o = i[n];
@@ -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 Rr = new Set(Object.values(m)), za = [...new Set(Object.values(m).map((i) => i.length))];
20
+ const pr = 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
- ]), Dt = new Set(sn.keys()), yc = /* @__PURE__ */ new Set([
36
+ ]), Lt = new Set(sn.keys()), yc = /* @__PURE__ */ new Set([
37
37
  "=",
38
38
  "<>",
39
39
  ">",
@@ -117,7 +117,7 @@ const Oc = /* @__PURE__ */ new Set([
117
117
  function Mc(i) {
118
118
  return Oc.has(i);
119
119
  }
120
- const Ji = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Ji), wc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$", oa = "\\s*?:\\s*?", dn = "[A-Za-z]+", Cn = "[1-9][0-9]*", pr = `'?(${Ji})?(${wc})?'?`, ws = `\\${Tt}?${dn}\\${Tt}?${Cn}`, Sc = `^(${Me.AT})?${pr}${ws}${oa}${ws}$`, ei = new RegExp(Sc), Dc = `^${pr}\\s*?${ws}(${tt.POUND})?$`, ti = new RegExp(Dc), Lc = `^${pr}\\${Tt}?${Cn}${oa}\\${Tt}?${Cn}$`, ri = new RegExp(Lc), Pc = `^${pr}\\${Tt}?${dn}${oa}\\${Tt}?${dn}$`, ni = new RegExp(Pc), xc = `^${pr}\\s*?\\${Tt}?${Cn}$`, si = new RegExp(xc), jc = `^${pr}\\s*?\\${Tt}?${dn}$`, ai = new RegExp(jc), Uc = "{.*?}", ii = new RegExp(Uc, "g");
120
+ const Ji = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Ji), wc = "((?![\\[\\]\\/?*\\\\]).)*!", Bt = "$", oa = "\\s*?:\\s*?", dn = "[A-Za-z]+", Cn = "[1-9][0-9]*", Vr = `'?(${Ji})?(${wc})?'?`, ws = `\\${Bt}?${dn}\\${Bt}?${Cn}`, Sc = `^(${Me.AT})?${Vr}${ws}${oa}${ws}$`, ei = new RegExp(Sc), Dc = `^${Vr}\\s*?${ws}(${tt.POUND})?$`, ti = new RegExp(Dc), Lc = `^${Vr}\\${Bt}?${Cn}${oa}\\${Bt}?${Cn}$`, ri = new RegExp(Lc), Pc = `^${Vr}\\${Bt}?${dn}${oa}\\${Bt}?${dn}$`, ni = new RegExp(Pc), xc = `^${Vr}\\s*?\\${Bt}?${Cn}$`, si = new RegExp(xc), jc = `^${Vr}\\s*?\\${Bt}?${dn}$`, ai = new RegExp(jc), Uc = "{.*?}", ii = new RegExp(Uc, "g");
121
121
  function Ir(i) {
122
122
  return ti.lastIndex = 0, ti.test(i);
123
123
  }
@@ -201,7 +201,7 @@ function oi(i = we.NONE) {
201
201
  columnAbsoluteString: e
202
202
  };
203
203
  }
204
- function Bt(i) {
204
+ function It(i) {
205
205
  const {
206
206
  startColumn: a,
207
207
  startRow: e,
@@ -223,14 +223,14 @@ function Bt(i) {
223
223
  return l === f ? l : `${l}:${f}`;
224
224
  }
225
225
  function Yc(i, a) {
226
- return `${io(i)}!${Bt(a)}`;
226
+ return `${io(i)}!${It(a)}`;
227
227
  }
228
228
  function Hc(i, a, e) {
229
- return Ls(i) || Ls(a) ? `'[${Ps(i)}]${Ps(a)}'!${Bt(e)}` : `[${i}]${a}!${Bt(e)}`;
229
+ return Ls(i) || Ls(a) ? `'[${Ps(i)}]${Ps(a)}'!${It(e)}` : `[${i}]${a}!${It(e)}`;
230
230
  }
231
231
  function Ds(i) {
232
232
  const { unitId: a, sheetName: e, range: t } = i;
233
- return a != null && a.length > 0 && e != null && e.length > 0 ? Hc(a, e, t) : e != null && e.length > 0 ? Yc(e, t) : Bt(t);
233
+ return a != null && a.length > 0 && e != null && e.length > 0 ? Hc(a, e, t) : e != null && e.length > 0 ? Yc(e, t) : It(t);
234
234
  }
235
235
  function hs(i) {
236
236
  const a = Number.parseInt(i.replace(kc, "")) - 1, e = qe.ABCatNum(i.replace($c, "")), t = on(i);
@@ -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 lr());
360
+ A(this, "_update$", new fr());
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 lr());
372
+ A(this, "_currentRange$", new fr());
373
373
  A(this, "currentRange$", this._currentRange$.asObservable());
374
- A(this, "_focusRange$", new lr());
374
+ A(this, "_focusRange$", new fr());
375
375
  A(this, "focusRange$", this._focusRange$.asObservable());
376
376
  this._univerInstanceService = a;
377
377
  }
@@ -394,7 +394,7 @@ let xs = class extends Ne {
394
394
  return this._currentRange;
395
395
  }
396
396
  getCurrentRangeForString() {
397
- return Bt(this._currentRange.range);
397
+ return It(this._currentRange.range);
398
398
  }
399
399
  registerDefinedNames(a, e) {
400
400
  this._definedNameMap[a] = e, this._updateCache(a), this._update();
@@ -451,10 +451,10 @@ let xs = class extends Ne {
451
451
  xs = Zc([
452
452
  zc(0, Yn)
453
453
  ], xs);
454
- const Vr = Ze("univer.formula.defined-names.service"), Zb = (i, a) => {
454
+ const Nr = Ze("univer.formula.defined-names.service"), Zb = (i, a) => {
455
455
  const { unitId: e, id: t } = a;
456
456
  return {
457
- ...i.get(Vr).getValueById(e, t),
457
+ ...i.get(Nr).getValueById(e, t),
458
458
  unitId: e
459
459
  };
460
460
  }, ca = {
@@ -463,7 +463,7 @@ const Vr = Ze("univer.formula.defined-names.service"), Zb = (i, a) => {
463
463
  handler: (i, a) => {
464
464
  if (a == null)
465
465
  return !1;
466
- const e = i.get(Vr), { id: t, unitId: r, name: n, formulaOrRefString: s, comment: o, hidden: u, localSheetId: c } = a;
466
+ const e = i.get(Nr), { id: t, unitId: r, name: n, formulaOrRefString: s, comment: o, hidden: u, localSheetId: c } = a;
467
467
  return e.registerDefinedName(r, {
468
468
  id: t,
469
469
  name: n.trim(),
@@ -479,7 +479,7 @@ const Vr = Ze("univer.formula.defined-names.service"), Zb = (i, a) => {
479
479
  handler: (i, a) => {
480
480
  if (a == null)
481
481
  return !1;
482
- const e = i.get(Vr), { unitId: t, id: r } = a;
482
+ const e = i.get(Nr), { unitId: t, id: r } = a;
483
483
  return e.removeDefinedName(t, r), !0;
484
484
  }
485
485
  }, la = {
@@ -531,7 +531,7 @@ const Vr = Ze("univer.formula.defined-names.service"), Zb = (i, a) => {
531
531
  type: Ie.MUTATION,
532
532
  handler: () => !0
533
533
  };
534
- class Nt {
534
+ class Ot {
535
535
  constructor(a) {
536
536
  A(this, "_cache");
537
537
  this._cache = new Zu(a);
@@ -557,8 +557,8 @@ class Nt {
557
557
  return a.length <= 64 ? a : zu(a).toString();
558
558
  }
559
559
  }
560
- const ht = "P_1", Ut = "R_1", mr = "L_1", Fr = "LR_1", mo = "LO_1", tl = "LET", xr = "LAMBDA", rl = "CUBE", nl = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), js = new Nt(1e5);
561
- function gr(i) {
560
+ const mt = "P_1", vt = "R_1", gr = "L_1", Fr = "LR_1", mo = "LO_1", tl = "LET", xr = "LAMBDA", rl = "CUBE", nl = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), js = new Ot(1e5);
561
+ function dr(i) {
562
562
  const a = js.get(i);
563
563
  if (a)
564
564
  return a;
@@ -578,7 +578,7 @@ function ci(i) {
578
578
  class ae {
579
579
  constructor() {
580
580
  A(this, "_parent");
581
- A(this, "_token", Ut);
581
+ A(this, "_token", vt);
582
582
  A(this, "_children", []);
583
583
  A(this, "_lambdaId");
584
584
  A(this, "_functionDefinitionPrivacyVar");
@@ -682,7 +682,7 @@ class ae {
682
682
  return r;
683
683
  }
684
684
  }
685
- const go = 2e3, ms = new Nt(go), gs = new Nt(go);
685
+ const go = 2e3, ms = new Ot(go), gs = new Ot(go);
686
686
  class ga extends Ne {
687
687
  constructor() {
688
688
  super(...arguments);
@@ -752,7 +752,7 @@ class ga extends Ne {
752
752
  let s = n.getParent(), o = n;
753
753
  for (; s; ) {
754
754
  const u = s.getToken();
755
- if (u !== ht && !an(u) && s.getStartIndex() !== -1) {
755
+ if (u !== mt && !an(u) && s.getStartIndex() !== -1) {
756
756
  const c = s.getChildren().indexOf(o);
757
757
  return {
758
758
  functionName: u,
@@ -779,7 +779,7 @@ class ga extends Ne {
779
779
  let u = o.getParent(), c = 0;
780
780
  for (s[1] === K.OPEN_BRACKET && c++; u; ) {
781
781
  const l = u.getToken();
782
- l !== ht && l !== K.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== xr && (t === 0 ? c += 1 : t--), u = u.getParent();
782
+ l !== mt && l !== K.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== xr && (t === 0 ? c += 1 : t--), u = u.getParent();
783
783
  }
784
784
  return c;
785
785
  }
@@ -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 = gr(f);
805
+ const { token: f, endIndex: h } = l, d = dr(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 = gr(f), { sheetName: d, unitId: _ } = h;
841
+ const { token: f } = l, h = dr(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 || Dt.has(e) || fs.has(e) || e === Me.AT || e === K.COMMA || e === K.COLON || e === K.OPEN_BRACKET);
868
+ return !!(e instanceof ae || Lt.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) {
@@ -977,7 +977,7 @@ class ga extends Ne {
977
977
  if (h && !d)
978
978
  return h;
979
979
  }
980
- this._resetCurrentLexerNode(), this._currentLexerNode.setToken(Ut);
980
+ this._resetCurrentLexerNode(), this._currentLexerNode.setToken(vt);
981
981
  const s = [];
982
982
  let o = this._nodeMaker(e, s);
983
983
  if (o === m.VALUE || s.length === 0)
@@ -987,7 +987,7 @@ class ga extends Ne {
987
987
  const { hasDefinedName: h, sequenceString: d, definedNames: _ } = r(s);
988
988
  u = h, c = d, l = _;
989
989
  }
990
- if (u && (this._resetCurrentLexerNode(), this._currentLexerNode.setToken(Ut), o = this._nodeMaker(`=${c}`), o === m.VALUE))
990
+ if (u && (this._resetCurrentLexerNode(), this._currentLexerNode.setToken(vt), o = this._nodeMaker(`=${c}`), o === m.VALUE))
991
991
  return o;
992
992
  const f = this._getTopNode(this._currentLexerNode);
993
993
  if (f && (this._currentLexerNode = f), t) {
@@ -1013,7 +1013,7 @@ class ga extends Ne {
1013
1013
  const f = l.trim();
1014
1014
  if (f === "")
1015
1015
  continue;
1016
- if (Dt.has(f)) {
1016
+ if (Lt.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 : Dt.has(e);
1079
+ return e == null || e instanceof ae ? !1 : Lt.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 (Dt.has(t) || t === K.OPEN_BRACKET)
1086
+ if (Lt.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() === mr) {
1183
+ if (e && e.getToken() === gr) {
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 !!Dt.has(e);
1287
+ return !!Lt.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 (Rr.has(s))
1314
+ if (pr.has(s))
1315
1315
  return s;
1316
1316
  }
1317
1317
  }
@@ -1351,7 +1351,7 @@ class ga extends Ne {
1351
1351
  return m.VALUE;
1352
1352
  this._addSequenceArray(t, c, u), u++, this._addSequenceArray(t, l, u), u++, this._closeBracket();
1353
1353
  continue;
1354
- } else l && this._newAndPushCurrentLexerNode(ht, u);
1354
+ } else l && this._newAndPushCurrentLexerNode(mt, u);
1355
1355
  } else
1356
1356
  this._pushNodeToChildren(c), this._openBracket(
1357
1357
  0
@@ -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(mr, u, !0), this._openLambda();
1370
+ this._newAndPushCurrentLexerNode(gr, u, !0), this._openLambda();
1371
1371
  } else if (!this._setAncestorCurrentLexerNode() && u !== o - 1)
1372
1372
  return m.VALUE;
1373
1373
  } else
@@ -1408,12 +1408,12 @@ class ga extends Ne {
1408
1408
  if (l === 1 || l == null) {
1409
1409
  if (this._pushNodeToChildren(this._segment), this._resetSegment(), !this._setParentCurrentLexerNode() && u !== o - 1 && l != null)
1410
1410
  return m.VALUE;
1411
- this._newAndPushCurrentLexerNode(ht, u);
1411
+ this._newAndPushCurrentLexerNode(mt, u);
1412
1412
  } else {
1413
1413
  const f = new ae();
1414
1414
  f.setToken(rl);
1415
1415
  const h = new ae();
1416
- h.setToken(ht), h.changeToParent(f);
1416
+ h.setToken(mt), h.changeToParent(f);
1417
1417
  const d = this._currentLexerNode.getParent();
1418
1418
  if (d && d.getToken() === K.COLON) {
1419
1419
  const _ = d.getParent();
@@ -1425,15 +1425,15 @@ class ga extends Ne {
1425
1425
  this._changeCurrentBracket(
1426
1426
  1
1427
1427
  /* FUNCTION */
1428
- ), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(ht, u);
1428
+ ), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(mt, u);
1429
1429
  }
1430
1430
  } else if (c === K.COLON && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isBracesClose() && this.isSquareBracketClose()) {
1431
1431
  const l = new ae();
1432
1432
  l.setToken(c);
1433
1433
  const f = new ae();
1434
- f.setToken(ht), f.setParent(l);
1434
+ f.setToken(mt), f.setParent(l);
1435
1435
  const h = new ae();
1436
- h.setToken(ht), h.setParent(l), l.getChildren().push(f, h);
1436
+ h.setToken(mt), h.setParent(l), l.getChildren().push(f, h);
1437
1437
  let d = l, _ = 0;
1438
1438
  if (this._segmentCount() > 0) {
1439
1439
  let C, E, b = 0;
@@ -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 (Dt.has(c) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
1461
+ } else if (Lt.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 && Dt.has(c + f)) {
1482
+ if (f && Lt.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 = yt(o), l = Pt(u), f = i.getValue(r, n), h = (f == null ? void 0 : f.f) || "", d = (f == null ? void 0 : f.si) || "";
1517
+ const o = (s == null ? void 0 : s.f) || "", u = (s == null ? void 0 : s.si) || "", c = Rt(o), l = xt(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 (yt(h) && Pt(d)) {
1520
+ if (Rt(h) && xt(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 dr = class extends Ne {
1561
+ let Cr = class extends Ne {
1562
1562
  constructor(a, e) {
1563
1563
  super();
1564
1564
  A(this, "_arrayFormulaRange", {});
@@ -1618,7 +1618,7 @@ let dr = class extends Ne {
1618
1618
  });
1619
1619
  }
1620
1620
  getFormulaData() {
1621
- const a = {}, e = this._univerInstanceService.getAllUnitsForType(cr.UNIVER_SHEET);
1621
+ const a = {}, e = this._univerInstanceService.getAllUnitsForType(lr.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 dr = 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(cr.UNIVER_SHEET), e = {}, t = {}, r = {};
1676
+ const a = this._univerInstanceService.getAllUnitsForType(lr.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 dr = class extends Ne {
1702
1702
  * For formulas that are sensitive to hidden rows.
1703
1703
  */
1704
1704
  getHiddenRowsFiltered() {
1705
- const a = this._univerInstanceService.getAllUnitsForType(cr.UNIVER_SHEET), e = {};
1705
+ const a = this._univerInstanceService.getAllUnitsForType(lr.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 dr = 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 (Pt(C)) {
1732
+ if (xt(C)) {
1733
1733
  const E = n == null ? void 0 : n[C], b = s.get(C);
1734
- if (E && !yt(_)) {
1734
+ if (E && !Rt(_)) {
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 dr = class extends Ne {
1775
1775
  if (u == null)
1776
1776
  return null;
1777
1777
  const { f: c, si: l } = u;
1778
- if (yt(c))
1778
+ if (Rt(c))
1779
1779
  return c;
1780
- if (Pt(l)) {
1780
+ if (xt(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 (yt(C) && l === E)
1786
+ if (Rt(C) && l === E)
1787
1787
  return f = this._lexerTreeBuilder.moveFormulaRefOffset(
1788
1788
  C,
1789
1789
  e - d,
@@ -1813,7 +1813,7 @@ let dr = 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 = yt(_ == null ? void 0 : _.f) || Pt(_ == null ? void 0 : _.si), E = (_ == null ? void 0 : _.v) === void 0;
1816
+ const d = Number(h), _ = u.getCellRaw(f, d), C = Rt(_ == null ? void 0 : _.f) || xt(_ == 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 dr = class extends Ne {
1851
1851
  if (c == null)
1852
1852
  return !0;
1853
1853
  const { f: l, si: f } = c;
1854
- yt(l) && Pt(f) && (t[f] = { f: l, r: o, c: u });
1854
+ Rt(l) && xt(f) && (t[f] = { f: l, r: o, c: u });
1855
1855
  }), t;
1856
1856
  }
1857
1857
  };
1858
- dr = ul([
1858
+ Cr = ul([
1859
1859
  li(0, Yn),
1860
1860
  li(1, ye(ga))
1861
- ], dr);
1861
+ ], Cr);
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 = yt(l), d = Pt(f);
1866
+ const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "", h = Rt(l), d = xt(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 (Pt(f) && !yt(l)) {
1878
+ if (xt(f) && !Rt(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;
@@ -1983,7 +1983,7 @@ const cl = class Us {
1983
1983
  return a < e;
1984
1984
  }
1985
1985
  }, je = 0, Ae = 1;
1986
- class Gt {
1986
+ class Qt {
1987
1987
  constructor(a = void 0, e = void 0, t = null, r = null, n = null, s = Ae) {
1988
1988
  if (this.left = t, this.right = r, this.parent = n, this.color = s, this.item = { key: a, value: e }, a && a instanceof Array && a.length === 2 && !Number.isNaN(a[0]) && !Number.isNaN(a[1])) {
1989
1989
  let [o, u] = a;
@@ -2040,7 +2040,7 @@ class da {
2040
2040
  * Construct new empty instance of IntervalTree
2041
2041
  */
2042
2042
  constructor() {
2043
- this.root = null, this.nil_node = new Gt();
2043
+ this.root = null, this.nil_node = new Qt();
2044
2044
  }
2045
2045
  /**
2046
2046
  * Returns number of items stored in the interval tree
@@ -2100,7 +2100,7 @@ class da {
2100
2100
  */
2101
2101
  insert(a, e = a) {
2102
2102
  if (a === void 0) return;
2103
- let t = new Gt(a, e, this.nil_node, this.nil_node, null, je);
2103
+ let t = new Qt(a, e, this.nil_node, this.nil_node, null, je);
2104
2104
  return this.tree_insert(t), this.recalc_max(t), t;
2105
2105
  }
2106
2106
  /**
@@ -2110,7 +2110,7 @@ class da {
2110
2110
  * @returns {boolean} true if item {key, value} exist in the tree, false otherwise
2111
2111
  */
2112
2112
  exist(a, e = a) {
2113
- let t = new Gt(a, e);
2113
+ let t = new Qt(a, e);
2114
2114
  return !!this.tree_search(this.root, t);
2115
2115
  }
2116
2116
  /**
@@ -2120,7 +2120,7 @@ class da {
2120
2120
  * @returns {boolean} true if item {key, value} deleted, false if not found
2121
2121
  */
2122
2122
  remove(a, e = a) {
2123
- let t = new Gt(a, e), r = this.tree_search(this.root, t);
2123
+ let t = new Qt(a, e), r = this.tree_search(this.root, t);
2124
2124
  return r && this.tree_delete(r), r;
2125
2125
  }
2126
2126
  /**
@@ -2131,7 +2131,7 @@ class da {
2131
2131
  * @returns {Array}
2132
2132
  */
2133
2133
  search(a, e = (t, r) => t === r ? r.output() : t) {
2134
- let t = new Gt(a), r = [];
2134
+ let t = new Qt(a), r = [];
2135
2135
  return this.tree_search_interval(this.root, t, r), r.map((n) => e(n.item.value, n.item.key));
2136
2136
  }
2137
2137
  /**
@@ -2140,7 +2140,7 @@ class da {
2140
2140
  * @returns {boolean}
2141
2141
  */
2142
2142
  intersect_any(a) {
2143
- let e = new Gt(a);
2143
+ let e = new Qt(a);
2144
2144
  return this.tree_find_any_interval(this.root, e);
2145
2145
  }
2146
2146
  /**
@@ -2166,7 +2166,7 @@ class da {
2166
2166
  */
2167
2167
  *iterate(a, e = (t, r) => t === r ? r.output() : t) {
2168
2168
  let t;
2169
- for (a ? t = this.tree_search_nearest_forward(this.root, new Gt(a)) : this.root && (t = this.local_minimum(this.root)); t; )
2169
+ for (a ? t = this.tree_search_nearest_forward(this.root, new Qt(a)) : this.root && (t = this.local_minimum(this.root)); t; )
2170
2170
  yield e(t.item.value, t.item.key), t = this.tree_successor(t);
2171
2171
  }
2172
2172
  recalc_max(a) {
@@ -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(cr.UNIVER_SHEET), { id: e, sheetOrder: t } = a.getSnapshot();
2511
+ const a = this._univerInstanceService.getCurrentUnitForType(lr.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(cr.UNIVER_SHEET), e = a == null ? void 0 : a.getActiveSheet();
2628
+ const a = this._univerInstanceService.getCurrentUnitForType(lr.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,10 +2648,10 @@ let vs = class extends Ne {
2648
2648
  vs = ml([
2649
2649
  Xr(0, Yn),
2650
2650
  Xr(1, ye(tc)),
2651
- Xr(2, ye(dr)),
2651
+ Xr(2, ye(Cr)),
2652
2652
  Xr(3, ye(_o))
2653
2653
  ], vs);
2654
- const kt = Ze(
2654
+ const $t = Ze(
2655
2655
  "univer.formula.current-data.service"
2656
2656
  );
2657
2657
  var gl = Object.getOwnPropertyDescriptor, dl = (i, a, e, t) => {
@@ -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 Cr = class extends Ne {
2662
+ let _r = 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 Cr = class extends Ne {
2722
2722
  };
2723
2723
  }
2724
2724
  };
2725
- Cr = dl([
2726
- ds(0, Vr),
2725
+ _r = dl([
2726
+ ds(0, Nr),
2727
2727
  ds(1, ye(ga)),
2728
- ds(2, kt)
2729
- ], Cr);
2728
+ ds(2, $t)
2729
+ ], _r);
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 Nt(1e5);
2805
+ const Ts = new Ot(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 = dt.getFormatInfo(i).type || "unknown";
2819
+ const a = Ct.getFormatInfo(i).type || "unknown";
2820
2820
  return _l[a];
2821
2821
  }
2822
2822
  function bl(i) {
@@ -2831,12 +2831,17 @@ function Zr(i, a, e) {
2831
2831
  return e === X.PLUS || e === X.MINUS ? t === 4 && r === 4 || t === 11 && r === 11 ? "" : a : e === X.MULTIPLY || e === X.DIVIDED ? t === 6 && r === 6 || t === 7 && r === 7 || t === 8 && r === 8 || t === 9 && r === 9 ? a : "" : i || a;
2832
2832
  }
2833
2833
  const yl = /* @__PURE__ */ new Map([
2834
- [Sr.EN_US, "$"],
2834
+ [ht.EN_US, "$"],
2835
2835
  // [LocaleType.JA_JP, '¥'],
2836
- [Sr.RU_RU, "₽"],
2837
- [Sr.VI_VN, "₫"],
2838
- [Sr.ZH_CN, "¥"],
2839
- [Sr.ZH_TW, "NT$"]
2836
+ [ht.RU_RU, "₽"],
2837
+ [ht.VI_VN, "₫"],
2838
+ [ht.ZH_CN, "¥"],
2839
+ [ht.ZH_TW, "NT$"],
2840
+ [ht.FR_FR, "€"],
2841
+ [ht.FA_IR, "﷼"],
2842
+ [ht.KO_KR, "₩"],
2843
+ [ht.ES_ES, "€"],
2844
+ [ht.CA_ES, "€"]
2840
2845
  ]);
2841
2846
  function gi(i) {
2842
2847
  return yl.get(i) || "$";
@@ -2848,9 +2853,9 @@ function ze(i, a = 2) {
2848
2853
  return e > 0 && (t = `.${"0".repeat(e)}`), `"${gi(i)}"#,##0${t}_);[Red]("${gi(i)}"#,##0${t})`;
2849
2854
  }
2850
2855
  function Rl(i, a, e = 2) {
2851
- return dt.format(ze(i, e), a);
2856
+ return Ct.format(ze(i, e), a);
2852
2857
  }
2853
- const _a = new Nt(1e5);
2858
+ const _a = new Ot(1e5);
2854
2859
  function pl(i) {
2855
2860
  let a = i;
2856
2861
  a.startsWith('"') && a.endsWith('"') && (a = a.slice(1, -1));
@@ -2861,13 +2866,13 @@ function pl(i) {
2861
2866
  value: e.value,
2862
2867
  pattern: e.pattern
2863
2868
  };
2864
- const t = dt.parseNumber(a);
2869
+ const t = Ct.parseNumber(a);
2865
2870
  if (t && t.z)
2866
2871
  return Cs(a, t.v, t.z);
2867
- const r = dt.parseDate(a);
2872
+ const r = Ct.parseDate(a);
2868
2873
  if (r && r.z)
2869
2874
  return Cs(a, r.v, r.z);
2870
- const n = dt.parseTime(a);
2875
+ const n = Ct.parseTime(a);
2871
2876
  return n && n.z ? Cs(a, n.v, n.z) : {
2872
2877
  isNumberPattern: !1
2873
2878
  };
@@ -2923,7 +2928,7 @@ class Hn {
2923
2928
  return !1;
2924
2929
  }
2925
2930
  }
2926
- class $t extends Hn {
2931
+ class Yt extends Hn {
2927
2932
  constructor(e) {
2928
2933
  super();
2929
2934
  A(this, "_customData");
@@ -3221,8 +3226,8 @@ class $t extends Hn {
3221
3226
  return g.create(m.VALUE);
3222
3227
  }
3223
3228
  }
3224
- const Nl = 1e3, Bs = new Nt(Nl);
3225
- class g extends $t {
3229
+ const Nl = 1e3, Bs = new Ot(Nl);
3230
+ class g extends Yt {
3226
3231
  constructor(a, e = "") {
3227
3232
  super(a), this._errorType = a, this._errorContent = e;
3228
3233
  }
@@ -3262,7 +3267,7 @@ function Ol(i) {
3262
3267
  }
3263
3268
  return (a = i == null ? void 0 : i.v) != null ? a : 0;
3264
3269
  }
3265
- var Wt = /* @__PURE__ */ ((i) => (i[i.MIN = 0] = "MIN", i[i.MAX = 1] = "MAX", i))(Wt || {}), Le = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.MIN = 1] = "MIN", i[i.MAX = 2] = "MAX", i))(Le || {});
3270
+ 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 || {});
3266
3271
  function An() {
3267
3272
  return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
3268
3273
  }
@@ -3345,7 +3350,7 @@ function Aa(i) {
3345
3350
  * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
3346
3351
  * MIT Licence
3347
3352
  */
3348
- var ur = 9e15, Yt = 1e9, ks = "0123456789abcdef", En = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", bn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", $s = {
3353
+ var cr = 9e15, Ht = 1e9, ks = "0123456789abcdef", En = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", bn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", $s = {
3349
3354
  // These values must be integers within the stated ranges (inclusive).
3350
3355
  // Most of these values can be changed at run-time using the `Decimal.config` method.
3351
3356
  // The maximum number of significant digits of the result of a calculation or base conversion.
@@ -3394,16 +3399,16 @@ var ur = 9e15, Yt = 1e9, ks = "0123456789abcdef", En = "2.3025850929940456840179
3394
3399
  // 0 to EXP_LIMIT
3395
3400
  // The minimum exponent value, beneath which underflow to zero occurs.
3396
3401
  // JavaScript numbers: -324 (5e-324)
3397
- minE: -ur,
3402
+ minE: -cr,
3398
3403
  // -1 to -EXP_LIMIT
3399
3404
  // The maximum exponent value, above which overflow to Infinity occurs.
3400
3405
  // JavaScript numbers: 308 (1.7976931348623157e+308)
3401
- maxE: ur,
3406
+ maxE: cr,
3402
3407
  // 1 to EXP_LIMIT
3403
3408
  // Whether to use cryptographically-secure random number generation, if available.
3404
3409
  crypto: !1
3405
3410
  // true/false
3406
- }, Eo, pt, oe = !0, Gn = "[DecimalError] ", It = 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
+ }, Eo, Vt, 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 };
3407
3412
  I.absoluteValue = I.abs = function() {
3408
3413
  var i = new this.constructor(this);
3409
3414
  return i.s < 0 && (i.s = 1), J(i);
@@ -3414,7 +3419,7 @@ I.ceil = function() {
3414
3419
  I.clampedTo = I.clamp = function(i, a) {
3415
3420
  var e, t = this, r = t.constructor;
3416
3421
  if (i = new r(i), a = new r(a), !i.s || !a.s) return new r(NaN);
3417
- if (i.gt(a)) throw Error(It + a);
3422
+ if (i.gt(a)) throw Error(Ft + a);
3418
3423
  return e = t.cmp(i), e < 0 ? i : t.cmp(a) > 0 ? a : new r(t);
3419
3424
  };
3420
3425
  I.comparedTo = I.cmp = function(i) {
@@ -3430,7 +3435,7 @@ I.comparedTo = I.cmp = function(i) {
3430
3435
  };
3431
3436
  I.cosine = I.cos = function() {
3432
3437
  var i, a, e = this, t = e.constructor;
3433
- 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(pt == 2 || pt == 3 ? e.neg() : e, i, a, !0)) : new t(1) : new t(NaN);
3438
+ 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(Vt == 2 || Vt == 3 ? e.neg() : e, i, a, !0)) : new t(1) : new t(NaN);
3434
3439
  };
3435
3440
  I.cubeRoot = I.cbrt = function() {
3436
3441
  var i, a, e, t, r, n, s, o, u, c, l = this, f = l.constructor;
@@ -3481,7 +3486,7 @@ I.hyperbolicCosine = I.cosh = function() {
3481
3486
  var i, a, e, t, r, n = this, s = n.constructor, o = new s(1);
3482
3487
  if (!n.isFinite()) return new s(n.s ? 1 / 0 : NaN);
3483
3488
  if (n.isZero()) return o;
3484
- 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 = _r(s, 1, n.times(a), new s(1), !0);
3489
+ 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 = Ar(s, 1, n.times(a), new s(1), !0);
3485
3490
  for (var u, c = i, l = new s(8); c--; )
3486
3491
  u = n.times(n), n = o.minus(u.times(l.minus(u.times(l))));
3487
3492
  return J(n, s.precision = e, s.rounding = t, !0);
@@ -3490,9 +3495,9 @@ I.hyperbolicSine = I.sinh = function() {
3490
3495
  var i, a, e, t, r = this, n = r.constructor;
3491
3496
  if (!r.isFinite() || r.isZero()) return new n(r);
3492
3497
  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)
3493
- r = _r(n, 2, r, r, !0);
3498
+ r = Ar(n, 2, r, r, !0);
3494
3499
  else {
3495
- i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / Wn(5, i)), r = _r(n, 2, r, r, !0);
3500
+ i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / Wn(5, i)), r = Ar(n, 2, r, r, !0);
3496
3501
  for (var s, o = new n(5), u = new n(16), c = new n(20); i--; )
3497
3502
  s = r.times(r), r = r.times(o.plus(s.times(u.times(s).plus(c))));
3498
3503
  }
@@ -3504,7 +3509,7 @@ I.hyperbolicTangent = I.tanh = function() {
3504
3509
  };
3505
3510
  I.inverseCosine = I.acos = function() {
3506
3511
  var i = this, a = i.constructor, e = i.abs().cmp(1), t = a.precision, r = a.rounding;
3507
- return e !== -1 ? e === 0 ? i.isNeg() ? gt(a, t, r) : new a(0) : new a(NaN) : i.isZero() ? gt(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
+ return e !== -1 ? e === 0 ? i.isNeg() ? dt(a, t, r) : new a(0) : new a(NaN) : i.isZero() ? dt(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));
3508
3513
  };
3509
3514
  I.inverseHyperbolicCosine = I.acosh = function() {
3510
3515
  var i, a, e = this, t = e.constructor;
@@ -3520,7 +3525,7 @@ I.inverseHyperbolicTangent = I.atanh = function() {
3520
3525
  };
3521
3526
  I.inverseSine = I.asin = function() {
3522
3527
  var i, a, e, t, r = this, n = r.constructor;
3523
- return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = gt(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
+ return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = dt(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)));
3524
3529
  };
3525
3530
  I.inverseTangent = I.atan = function() {
3526
3531
  var i, a, e, t, r, n, s, o, u, c = this, l = c.constructor, f = l.precision, h = l.rounding;
@@ -3528,11 +3533,11 @@ I.inverseTangent = I.atan = function() {
3528
3533
  if (c.isZero())
3529
3534
  return new l(c);
3530
3535
  if (c.abs().eq(1) && f + 4 <= Ys)
3531
- return s = gt(l, f + 4, h).times(0.25), s.s = c.s, s;
3536
+ return s = dt(l, f + 4, h).times(0.25), s.s = c.s, s;
3532
3537
  } else {
3533
3538
  if (!c.s) return new l(NaN);
3534
3539
  if (f + 4 <= Ys)
3535
- return s = gt(l, f + 4, h).times(0.5), s.s = c.s, s;
3540
+ return s = dt(l, f + 4, h).times(0.5), s.s = c.s, s;
3536
3541
  }
3537
3542
  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));
3538
3543
  for (oe = !1, a = Math.ceil(o / te), t = 1, u = c.times(c), s = new l(c), r = c; i !== -1; )
@@ -3580,9 +3585,9 @@ I.logarithm = I.log = function(i) {
3580
3585
  for (r = e[0]; r % 10 === 0; ) r /= 10;
3581
3586
  n = r !== 1;
3582
3587
  }
3583
- if (oe = !1, o = f + d, s = jt(c, o), t = a ? yn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), jr(u.d, r = f, h))
3588
+ if (oe = !1, o = f + d, s = Ut(c, o), t = a ? yn(l, o + 10) : Ut(i, o), u = Ve(s, t, o, 1), jr(u.d, r = f, h))
3584
3589
  do
3585
- if (o += 10, s = jt(c, o), t = a ? yn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), !n) {
3590
+ if (o += 10, s = Ut(c, o), t = a ? yn(l, o + 10) : Ut(i, o), u = Ve(s, t, o, 1), !n) {
3586
3591
  +Ue(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = J(u, f + 1, 0));
3587
3592
  break;
3588
3593
  }
@@ -3632,7 +3637,7 @@ I.naturalExponential = I.exp = function() {
3632
3637
  return Hs(this);
3633
3638
  };
3634
3639
  I.naturalLogarithm = I.ln = function() {
3635
- return jt(this);
3640
+ return Ut(this);
3636
3641
  };
3637
3642
  I.negated = I.neg = function() {
3638
3643
  var i = new this.constructor(this);
@@ -3657,7 +3662,7 @@ I.plus = I.add = function(i) {
3657
3662
  };
3658
3663
  I.precision = I.sd = function(i) {
3659
3664
  var a, e = this;
3660
- if (i !== void 0 && i !== !!i && i !== 1 && i !== 0) throw Error(It + i);
3665
+ if (i !== void 0 && i !== !!i && i !== 1 && i !== 0) throw Error(Ft + i);
3661
3666
  return e.d ? (a = Vo(e.d), i && e.e + 1 > a && (a = e.e + 1)) : a = NaN, a;
3662
3667
  };
3663
3668
  I.round = function() {
@@ -3666,7 +3671,7 @@ I.round = function() {
3666
3671
  };
3667
3672
  I.sine = I.sin = function() {
3668
3673
  var i, a, e = this, t = e.constructor;
3669
- 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(pt > 2 ? e.neg() : e, i, a, !0)) : new t(NaN);
3674
+ 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(Vt > 2 ? e.neg() : e, i, a, !0)) : new t(NaN);
3670
3675
  };
3671
3676
  I.squareRoot = I.sqrt = function() {
3672
3677
  var i, a, e, t, r, n, s = this, o = s.d, u = s.e, c = s.s, l = s.constructor;
@@ -3688,7 +3693,7 @@ I.squareRoot = I.sqrt = function() {
3688
3693
  };
3689
3694
  I.tangent = I.tan = function() {
3690
3695
  var i, a, e = this, t = e.constructor;
3691
- 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(pt == 2 || pt == 4 ? e.neg() : e, i, a, !0)) : new t(NaN);
3696
+ 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(Vt == 2 || Vt == 4 ? e.neg() : e, i, a, !0)) : new t(NaN);
3692
3697
  };
3693
3698
  I.times = I.mul = function(i) {
3694
3699
  var a, e, t, r, n, s, o, u, c, l = this, f = l.constructor, h = l.d, d = (i = new f(i)).d;
@@ -3708,15 +3713,15 @@ I.toBinary = function(i, a) {
3708
3713
  };
3709
3714
  I.toDecimalPlaces = I.toDP = function(i, a) {
3710
3715
  var e = this, t = e.constructor;
3711
- return e = new t(e), i === void 0 ? e : (He(i, 0, Yt), a === void 0 ? a = t.rounding : He(a, 0, 8), J(e, i + e.e + 1, a));
3716
+ return e = new t(e), i === void 0 ? e : (He(i, 0, Ht), a === void 0 ? a = t.rounding : He(a, 0, 8), J(e, i + e.e + 1, a));
3712
3717
  };
3713
3718
  I.toExponential = function(i, a) {
3714
3719
  var e, t = this, r = t.constructor;
3715
- return i === void 0 ? e = _t(t, !0) : (He(i, 0, Yt), a === void 0 ? a = r.rounding : He(a, 0, 8), t = J(new r(t), i + 1, a), e = _t(t, !0, i + 1)), t.isNeg() && !t.isZero() ? "-" + e : e;
3720
+ return i === void 0 ? e = At(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 = At(t, !0, i + 1)), t.isNeg() && !t.isZero() ? "-" + e : e;
3716
3721
  };
3717
3722
  I.toFixed = function(i, a) {
3718
3723
  var e, t, r = this, n = r.constructor;
3719
- return i === void 0 ? e = _t(r) : (He(i, 0, Yt), a === void 0 ? a = n.rounding : He(a, 0, 8), t = J(new n(r), i + r.e + 1, a), e = _t(t, !1, i + t.e + 1)), r.isNeg() && !r.isZero() ? "-" + e : e;
3724
+ return i === void 0 ? e = At(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 = At(t, !1, i + t.e + 1)), r.isNeg() && !r.isZero() ? "-" + e : e;
3720
3725
  };
3721
3726
  I.toFraction = function(i) {
3722
3727
  var a, e, t, r, n, s, o, u, c, l, f, h, d = this, _ = d.d, C = d.constructor;
@@ -3724,7 +3729,7 @@ I.toFraction = function(i) {
3724
3729
  if (c = e = new C(1), t = u = new C(0), a = new C(t), n = a.e = Vo(_) - d.e - 1, s = n % te, a.d[0] = Pe(10, s < 0 ? te + s : s), i == null)
3725
3730
  i = n > 0 ? a : c;
3726
3731
  else {
3727
- if (o = new C(i), !o.isInt() || o.lt(c)) throw Error(It + o);
3732
+ if (o = new C(i), !o.isInt() || o.lt(c)) throw Error(Ft + o);
3728
3733
  i = o.gt(a) ? n > 0 ? a : c : o;
3729
3734
  }
3730
3735
  for (oe = !1, o = new C(Ue(_)), l = C.precision, C.precision = n = _.length * te * 2; f = Ve(o, a, 0, 1, 1), r = e.plus(f.times(t)), r.cmp(i) != 1; )
@@ -3764,33 +3769,33 @@ I.toPower = I.pow = function(i) {
3764
3769
  if ((i.d[a] & 1) == 0 && (s = 1), o.e == 0 && o.d[0] == 1 && o.d.length == 1)
3765
3770
  return o.s = s, o;
3766
3771
  }
3767
- return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Be(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (oe = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = Hs(i.times(jt(o, t + e)), t), r.d && (r = J(r, t + 5, 1), jr(r.d, t, n) && (a = t + 10, r = J(Hs(i.times(jt(o, a + e)), a), a + 5, 1), +Ue(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = J(r, t + 1, 0)))), r.s = s, oe = !0, u.rounding = n, J(r, t, n));
3772
+ return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Be(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (oe = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = Hs(i.times(Ut(o, t + e)), t), r.d && (r = J(r, t + 5, 1), jr(r.d, t, n) && (a = t + 10, r = J(Hs(i.times(Ut(o, a + e)), a), a + 5, 1), +Ue(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = J(r, t + 1, 0)))), r.s = s, oe = !0, u.rounding = n, J(r, t, n));
3768
3773
  };
3769
3774
  I.toPrecision = function(i, a) {
3770
3775
  var e, t = this, r = t.constructor;
3771
- return i === void 0 ? e = _t(t, t.e <= r.toExpNeg || t.e >= r.toExpPos) : (He(i, 1, Yt), a === void 0 ? a = r.rounding : He(a, 0, 8), t = J(new r(t), i, a), e = _t(t, i <= t.e || t.e <= r.toExpNeg, i)), t.isNeg() && !t.isZero() ? "-" + e : e;
3776
+ return i === void 0 ? e = At(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 = At(t, i <= t.e || t.e <= r.toExpNeg, i)), t.isNeg() && !t.isZero() ? "-" + e : e;
3772
3777
  };
3773
3778
  I.toSignificantDigits = I.toSD = function(i, a) {
3774
3779
  var e = this, t = e.constructor;
3775
- return i === void 0 ? (i = t.precision, a = t.rounding) : (He(i, 1, Yt), a === void 0 ? a = t.rounding : He(a, 0, 8)), J(new t(e), i, a);
3780
+ 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);
3776
3781
  };
3777
3782
  I.toString = function() {
3778
- var i = this, a = i.constructor, e = _t(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
3783
+ var i = this, a = i.constructor, e = At(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
3779
3784
  return i.isNeg() && !i.isZero() ? "-" + e : e;
3780
3785
  };
3781
3786
  I.truncated = I.trunc = function() {
3782
3787
  return J(new this.constructor(this), this.e + 1, 1);
3783
3788
  };
3784
3789
  I.valueOf = I.toJSON = function() {
3785
- var i = this, a = i.constructor, e = _t(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
3790
+ var i = this, a = i.constructor, e = At(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
3786
3791
  return i.isNeg() ? "-" + e : e;
3787
3792
  };
3788
3793
  function Ue(i) {
3789
3794
  var a, e, t, r = i.length - 1, n = "", s = i[0];
3790
3795
  if (r > 0) {
3791
3796
  for (n += s, a = 1; a < r; a++)
3792
- t = i[a] + "", e = te - t.length, e && (n += Lt(e)), n += t;
3793
- s = i[a], t = s + "", e = te - t.length, e && (n += Lt(e));
3797
+ t = i[a] + "", e = te - t.length, e && (n += Pt(e)), n += t;
3798
+ s = i[a], t = s + "", e = te - t.length, e && (n += Pt(e));
3794
3799
  } else if (s === 0)
3795
3800
  return "0";
3796
3801
  for (; s % 10 === 0; ) s /= 10;
@@ -3798,7 +3803,7 @@ function Ue(i) {
3798
3803
  }
3799
3804
  function He(i, a, e) {
3800
3805
  if (i !== ~~i || i < a || i > e)
3801
- throw Error(It + i);
3806
+ throw Error(Ft + i);
3802
3807
  }
3803
3808
  function jr(i, a, e, t) {
3804
3809
  var r, n, s, o;
@@ -3816,7 +3821,7 @@ function ln(i, a, e) {
3816
3821
  function Ul(i, a) {
3817
3822
  var e, t, r;
3818
3823
  if (a.isZero()) return a;
3819
- 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 = _r(i, 1, a.times(r), new i(1));
3824
+ 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 = Ar(i, 1, a.times(r), new i(1));
3820
3825
  for (var n = e; n--; ) {
3821
3826
  var s = a.times(a);
3822
3827
  a = s.times(s).minus(s).times(8).plus(1);
@@ -3848,17 +3853,17 @@ var Ve = /* @__PURE__ */ function() {
3848
3853
  for (; !t[0] && t.length > 1; ) t.shift();
3849
3854
  }
3850
3855
  return function(t, r, n, s, o, u) {
3851
- var c, l, f, h, d, _, C, E, b, R, p, N, M, w, S, D, L, U, x, F, W = t.constructor, ne = t.s == r.s ? 1 : -1, z = t.d, G = r.d;
3856
+ var c, l, f, h, d, _, C, E, b, R, p, N, M, w, S, D, L, U, x, F, Q = t.constructor, ne = t.s == r.s ? 1 : -1, z = t.d, G = r.d;
3852
3857
  if (!z || !z[0] || !G || !G[0])
3853
- return new W(
3858
+ return new Q(
3854
3859
  // Return NaN if either NaN, or both Infinity or 0.
3855
3860
  !t.s || !r.s || (z ? G && z[0] == G[0] : !G) ? NaN : (
3856
3861
  // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
3857
3862
  z && z[0] == 0 || !G ? ne * 0 : ne / 0
3858
3863
  )
3859
3864
  );
3860
- for (u ? (d = 1, l = t.e - r.e) : (u = lt, d = te, l = Be(t.e / d) - Be(r.e / d)), x = G.length, L = z.length, b = new W(ne), R = b.d = [], f = 0; G[f] == (z[f] || 0); f++) ;
3861
- if (G[f] > (z[f] || 0) && l--, n == null ? (w = n = W.precision, s = W.rounding) : o ? w = n + (t.e - r.e) + 1 : w = n, w < 0)
3865
+ for (u ? (d = 1, l = t.e - r.e) : (u = lt, d = te, l = Be(t.e / d) - Be(r.e / d)), x = G.length, L = z.length, b = new Q(ne), R = b.d = [], f = 0; G[f] == (z[f] || 0); f++) ;
3866
+ if (G[f] > (z[f] || 0) && l--, n == null ? (w = n = Q.precision, s = Q.rounding) : o ? w = n + (t.e - r.e) + 1 : w = n, w < 0)
3862
3867
  R.push(1), _ = !0;
3863
3868
  else {
3864
3869
  if (w = w / d + 2 | 0, f = 0, x == 1) {
@@ -3919,10 +3924,10 @@ function J(i, a, e, t) {
3919
3924
  }
3920
3925
  return oe && (i.e > d.maxE ? (i.d = null, i.e = NaN) : i.e < d.minE && (i.e = 0, i.d = [0])), i;
3921
3926
  }
3922
- function _t(i, a, e) {
3927
+ function At(i, a, e) {
3923
3928
  if (!i.isFinite()) return Mo(i);
3924
3929
  var t, r = i.e, n = Ue(i.d), s = n.length;
3925
- return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) + Lt(t) : s > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (i.e < 0 ? "e" : "e+") + i.e) : r < 0 ? (n = "0." + Lt(-r - 1) + n, e && (t = e - s) > 0 && (n += Lt(t))) : r >= s ? (n += Lt(r + 1 - s), e && (t = e - r - 1) > 0 && (n = n + "." + Lt(t))) : ((t = r + 1) < s && (n = n.slice(0, t) + "." + n.slice(t)), e && (t = e - s) > 0 && (r + 1 === s && (n += "."), n += Lt(t))), n;
3930
+ return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) + Pt(t) : s > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (i.e < 0 ? "e" : "e+") + i.e) : r < 0 ? (n = "0." + Pt(-r - 1) + n, e && (t = e - s) > 0 && (n += Pt(t))) : r >= s ? (n += Pt(r + 1 - s), e && (t = e - r - 1) > 0 && (n = n + "." + Pt(t))) : ((t = r + 1) < s && (n = n.slice(0, t) + "." + n.slice(t)), e && (t = e - s) > 0 && (r + 1 === s && (n += "."), n += Pt(t))), n;
3926
3931
  }
3927
3932
  function Qn(i, a) {
3928
3933
  var e = i[0];
@@ -3934,7 +3939,7 @@ function yn(i, a, e) {
3934
3939
  throw oe = !0, e && (i.precision = e), Error(bo);
3935
3940
  return J(new i(En), a, 1, !0);
3936
3941
  }
3937
- function gt(i, a, e) {
3942
+ function dt(i, a, e) {
3938
3943
  if (a > Ys) throw Error(bo);
3939
3944
  return J(new i(bn), a, e, !0);
3940
3945
  }
@@ -3946,7 +3951,7 @@ function Vo(i) {
3946
3951
  }
3947
3952
  return e;
3948
3953
  }
3949
- function Lt(i) {
3954
+ function Pt(i) {
3950
3955
  for (var a = ""; i--; ) a += "0";
3951
3956
  return a;
3952
3957
  }
@@ -3994,7 +3999,7 @@ function Hs(i, a) {
3994
3999
  s = o;
3995
4000
  }
3996
4001
  }
3997
- function jt(i, a) {
4002
+ function Ut(i, a) {
3998
4003
  var e, t, r, n, s, o, u, c, l, f, h, d = 1, _ = 10, C = i, E = C.d, b = C.constructor, R = b.rounding, p = b.precision;
3999
4004
  if (C.s < 0 || !E || !E[0] || !C.e && E[0] == 1 && E.length == 1)
4000
4005
  return new b(E && !E[0] ? -1 / 0 : C.s != 1 ? NaN : E ? 0 : C);
@@ -4003,7 +4008,7 @@ function jt(i, a) {
4003
4008
  C = C.times(i), e = Ue(C.d), t = e.charAt(0), d++;
4004
4009
  n = C.e, t > 1 ? (C = new b("0." + e), n++) : C = new b(t + "." + e.slice(1));
4005
4010
  } else
4006
- return c = yn(b, l + 2, p).times(n + ""), C = jt(new b(t + "." + e.slice(1)), l - _).plus(c), b.precision = p, a == null ? J(C, p, R, oe = !0) : C;
4011
+ return c = yn(b, l + 2, p).times(n + ""), C = Ut(new b(t + "." + e.slice(1)), l - _).plus(c), b.precision = p, a == null ? J(C, p, R, oe = !0) : C;
4007
4012
  for (f = C, u = s = C = Ve(C.minus(1), C.plus(1), l, 1), h = J(C.times(C), l, 1), r = 3; ; ) {
4008
4013
  if (s = J(s.times(h), l, 1), c = u.plus(Ve(s, new b(r), l, 1)), Ue(c.d).slice(0, l) === Ue(u.d).slice(0, l))
4009
4014
  if (u = u.times(2), n !== 0 && (u = u.plus(yn(b, l + 2, p).times(n + ""))), u = Ve(u, new b(d), l, 1), a == null)
@@ -4048,20 +4053,20 @@ function vl(i, a) {
4048
4053
  else if (Pl.test(a))
4049
4054
  e = 8;
4050
4055
  else
4051
- throw Error(It + a);
4056
+ throw Error(Ft + a);
4052
4057
  for (n = a.search(/p/i), n > 0 ? (u = +a.slice(n + 1), a = a.substring(2, n)) : a = a.slice(2), n = a.indexOf("."), s = n >= 0, t = i.constructor, s && (a = a.replace(".", ""), o = a.length, n = o - n, r = No(t, new t(e), n, n * 2)), c = ln(a, e, lt), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
4053
4058
  return n < 0 ? new t(i.s * 0) : (i.e = Qn(c, l), i.d = c, oe = !1, s && (i = Ve(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Pe(2, u) : P.pow(2, u))), oe = !0, i);
4054
4059
  }
4055
4060
  function Tl(i, a) {
4056
4061
  var e, t = a.d.length;
4057
4062
  if (t < 3)
4058
- return a.isZero() ? a : _r(i, 2, a, a);
4059
- e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / Wn(5, e)), a = _r(i, 2, a, a);
4063
+ return a.isZero() ? a : Ar(i, 2, a, a);
4064
+ e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / Wn(5, e)), a = Ar(i, 2, a, a);
4060
4065
  for (var r, n = new i(5), s = new i(16), o = new i(20); e--; )
4061
4066
  r = a.times(a), a = a.times(n.plus(r.times(s.times(r).minus(o))));
4062
4067
  return a;
4063
4068
  }
4064
- function _r(i, a, e, t, r) {
4069
+ function Ar(i, a, e, t, r) {
4065
4070
  var n, s, o, u, c = i.precision, l = Math.ceil(c / te);
4066
4071
  for (oe = !1, u = e.times(e), o = new i(t); ; ) {
4067
4072
  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) {
@@ -4077,24 +4082,24 @@ function Wn(i, a) {
4077
4082
  return e;
4078
4083
  }
4079
4084
  function wo(i, a) {
4080
- var e, t = a.s < 0, r = gt(i, i.precision, 1), n = r.times(0.5);
4085
+ var e, t = a.s < 0, r = dt(i, i.precision, 1), n = r.times(0.5);
4081
4086
  if (a = a.abs(), a.lte(n))
4082
- return pt = t ? 4 : 1, a;
4087
+ return Vt = t ? 4 : 1, a;
4083
4088
  if (e = a.divToInt(r), e.isZero())
4084
- pt = t ? 3 : 2;
4089
+ Vt = t ? 3 : 2;
4085
4090
  else {
4086
4091
  if (a = a.minus(e.times(r)), a.lte(n))
4087
- return pt = Ci(e) ? t ? 2 : 3 : t ? 4 : 1, a;
4088
- pt = Ci(e) ? t ? 1 : 4 : t ? 3 : 2;
4092
+ return Vt = Ci(e) ? t ? 2 : 3 : t ? 4 : 1, a;
4093
+ Vt = Ci(e) ? t ? 1 : 4 : t ? 3 : 2;
4089
4094
  }
4090
4095
  return a.minus(r).abs();
4091
4096
  }
4092
4097
  function Ea(i, a, e, t) {
4093
4098
  var r, n, s, o, u, c, l, f, h, d = i.constructor, _ = e !== void 0;
4094
- if (_ ? (He(e, 1, Yt), t === void 0 ? t = d.rounding : He(t, 0, 8)) : (e = d.precision, t = d.rounding), !i.isFinite())
4099
+ if (_ ? (He(e, 1, Ht), t === void 0 ? t = d.rounding : He(t, 0, 8)) : (e = d.precision, t = d.rounding), !i.isFinite())
4095
4100
  l = Mo(i);
4096
4101
  else {
4097
- for (l = _t(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(_t(h), 10, r), h.e = h.d.length), f = ln(l, 10, r), n = u = f.length; f[--u] == 0; ) f.pop();
4102
+ for (l = At(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(At(h), 10, r), h.e = h.d.length), f = ln(l, 10, r), n = u = f.length; f[--u] == 0; ) f.pop();
4098
4103
  if (!f[0])
4099
4104
  l = _ ? "0p+0" : "0";
4100
4105
  else {
@@ -4153,7 +4158,7 @@ function Gl(i) {
4153
4158
  function Ql(i, a) {
4154
4159
  i = new this(i), a = new this(a);
4155
4160
  var e, t = this.precision, r = this.rounding, n = t + 4;
4156
- return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = gt(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? gt(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = gt(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 = gt(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
+ return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = dt(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? dt(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = dt(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 = dt(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;
4157
4162
  }
4158
4163
  function Wl(i) {
4159
4164
  return new this(i).cbrt();
@@ -4169,21 +4174,21 @@ function Xl(i) {
4169
4174
  var a, e, t, r = i.defaults === !0, n = [
4170
4175
  "precision",
4171
4176
  1,
4172
- Yt,
4177
+ Ht,
4173
4178
  "rounding",
4174
4179
  0,
4175
4180
  8,
4176
4181
  "toExpNeg",
4177
- -ur,
4182
+ -cr,
4178
4183
  0,
4179
4184
  "toExpPos",
4180
4185
  0,
4181
- ur,
4186
+ cr,
4182
4187
  "maxE",
4183
4188
  0,
4184
- ur,
4189
+ cr,
4185
4190
  "minE",
4186
- -ur,
4191
+ -cr,
4187
4192
  0,
4188
4193
  "modulo",
4189
4194
  0,
@@ -4192,7 +4197,7 @@ function Xl(i) {
4192
4197
  for (a = 0; a < n.length; a += 3)
4193
4198
  if (e = n[a], r && (this[e] = $s[e]), (t = i[e]) !== void 0)
4194
4199
  if (Be(t) === t && t >= n[a + 1] && t <= n[a + 2]) this[e] = t;
4195
- else throw Error(It + e + ": " + t);
4200
+ else throw Error(Ft + e + ": " + t);
4196
4201
  if (e = "crypto", r && (this[e] = $s[e]), (t = i[e]) !== void 0)
4197
4202
  if (t === !0 || t === !1 || t === 0 || t === 1)
4198
4203
  if (t)
@@ -4203,7 +4208,7 @@ function Xl(i) {
4203
4208
  else
4204
4209
  this[e] = !1;
4205
4210
  else
4206
- throw Error(It + e + ": " + t);
4211
+ throw Error(Ft + e + ": " + t);
4207
4212
  return this;
4208
4213
  }
4209
4214
  function Zl(i) {
@@ -4241,7 +4246,7 @@ function So(i) {
4241
4246
  return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), po.test(n) ? fn(c, n) : vl(c, n);
4242
4247
  if (u === "bigint")
4243
4248
  return n < 0 ? (n = -n, c.s = -1) : c.s = 1, fn(c, n.toString());
4244
- throw Error(It + n);
4249
+ throw Error(Ft + n);
4245
4250
  }
4246
4251
  if (r.prototype = I, r.ROUND_UP = 0, r.ROUND_DOWN = 1, r.ROUND_CEIL = 2, r.ROUND_FLOOR = 3, r.ROUND_HALF_UP = 4, r.ROUND_HALF_DOWN = 5, r.ROUND_HALF_EVEN = 6, r.ROUND_HALF_CEIL = 7, r.ROUND_HALF_FLOOR = 8, r.EUCLID = 9, r.config = r.set = Xl, r.clone = So, r.isDecimal = Ai, r.abs = Bl, r.acos = Il, r.acosh = Fl, r.add = kl, r.asin = $l, r.asinh = Yl, r.atan = Hl, r.atanh = Gl, r.atan2 = Ql, r.cbrt = Wl, r.ceil = ql, r.clamp = Kl, r.cos = Zl, r.cosh = zl, r.div = Jl, r.exp = ef, r.floor = tf, r.hypot = rf, r.ln = nf, r.log = sf, r.log10 = of, r.log2 = af, r.max = uf, r.min = cf, r.mod = lf, r.mul = ff, r.pow = hf, r.random = mf, r.round = gf, r.sign = df, r.sin = Cf, r.sinh = _f, r.sqrt = Af, r.sub = Ef, r.sum = bf, r.tan = yf, r.tanh = Rf, r.trunc = pf, i === void 0 && (i = {}), i && i.defaults !== !0)
4247
4252
  for (t = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], a = 0; a < t.length; ) i.hasOwnProperty(e = t[a++]) || (i[e] = this[e]);
@@ -4300,7 +4305,7 @@ function hf(i, a) {
4300
4305
  }
4301
4306
  function mf(i) {
4302
4307
  var a, e, t, r, n = 0, s = new this(1), o = [];
4303
- if (i === void 0 ? i = this.precision : He(i, 1, Yt), t = Math.ceil(i / te), this.crypto)
4308
+ if (i === void 0 ? i = this.precision : He(i, 1, Ht), t = Math.ceil(i / te), this.crypto)
4304
4309
  if (crypto.getRandomValues)
4305
4310
  for (a = crypto.getRandomValues(new Uint32Array(t)); n < t; )
4306
4311
  r = a[n], r >= 429e7 ? a[n] = crypto.getRandomValues(new Uint32Array(1))[0] : o[n++] = r % 1e7;
@@ -4366,7 +4371,7 @@ function Nf(i, a) {
4366
4371
  const e = i - a;
4367
4372
  return Number.isSafeInteger(e) ? e : new P(i).sub(a).toNumber();
4368
4373
  }
4369
- function Nr(i, a) {
4374
+ function Or(i, a) {
4370
4375
  const e = i * a;
4371
4376
  return Number.isSafeInteger(e) ? e : new P(i).mul(a).toNumber();
4372
4377
  }
@@ -4374,20 +4379,20 @@ function Of(i, a) {
4374
4379
  const e = i / a;
4375
4380
  return Number.isSafeInteger(e) ? e : new P(i).div(a).toNumber();
4376
4381
  }
4377
- function vt(i, a) {
4382
+ function Tt(i, a) {
4378
4383
  const e = 10 ** Math.trunc(a), t = qn(i, e);
4379
- return Math.round(Nr(i, e) + t) / e;
4384
+ return Math.round(Or(i, e) + t) / e;
4380
4385
  }
4381
4386
  function Ke(i, a) {
4382
4387
  const e = 10 ** Math.trunc(a), t = qn(i, e);
4383
- return Math.floor(Nr(i, e) + t) / e;
4388
+ return Math.floor(Or(i, e) + t) / e;
4384
4389
  }
4385
4390
  function Ye(i, a) {
4386
4391
  const e = 10 ** Math.trunc(a), t = qn(i, e);
4387
- return Math.ceil(Nr(i, e) - t) / e;
4392
+ return Math.ceil(Or(i, e) - t) / e;
4388
4393
  }
4389
4394
  function qn(i, a) {
4390
- return Number.EPSILON * Math.max(1, Math.abs(Nr(i, a)));
4395
+ return Number.EPSILON * Math.max(1, Math.abs(Or(i, a)));
4391
4396
  }
4392
4397
  function Ei(i, a) {
4393
4398
  return i - a * Math.floor(i / a);
@@ -4426,7 +4431,7 @@ function ba(i, a = 12, e = 1e-10) {
4426
4431
  function jf(i) {
4427
4432
  return i - Math.trunc(i);
4428
4433
  }
4429
- const $n = class $n extends $t {
4434
+ const $n = class $n extends Yt {
4430
4435
  static create() {
4431
4436
  return this._instance = this._instance || new $n(0), this._instance;
4432
4437
  }
@@ -4550,14 +4555,14 @@ const $n = class $n extends $t {
4550
4555
  };
4551
4556
  A($n, "_instance");
4552
4557
  let ue = $n;
4553
- const qt = class qt extends $t {
4558
+ const Kt = class Kt extends Yt {
4554
4559
  constructor(e) {
4555
4560
  super(e);
4556
4561
  A(this, "_value", !1);
4557
4562
  this._value = e;
4558
4563
  }
4559
4564
  static create(e) {
4560
- return e ? (this._instanceTrue = this._instanceTrue || new qt(!0), this._instanceTrue) : (this._instanceFalse = this._instanceFalse || new qt(!1), this._instanceFalse);
4565
+ return e ? (this._instanceTrue = this._instanceTrue || new Kt(!0), this._instanceTrue) : (this._instanceFalse = this._instanceFalse || new Kt(!1), this._instanceFalse);
4561
4566
  }
4562
4567
  getValue() {
4563
4568
  return this._value;
@@ -4599,7 +4604,7 @@ const qt = class qt extends $t {
4599
4604
  const n = y.create(e ? 1 : 0);
4600
4605
  return this._convertToNumber().compare(n, t);
4601
4606
  }
4602
- return qt.create(r);
4607
+ return Kt.create(r);
4603
4608
  }
4604
4609
  _compareString(e) {
4605
4610
  switch (e) {
@@ -4700,9 +4705,9 @@ const qt = class qt extends $t {
4700
4705
  return this;
4701
4706
  }
4702
4707
  };
4703
- A(qt, "_instanceTrue"), A(qt, "_instanceFalse");
4704
- let T = qt;
4705
- class y extends $t {
4708
+ A(Kt, "_instanceTrue"), A(Kt, "_instanceFalse");
4709
+ let T = Kt;
4710
+ class y extends Yt {
4706
4711
  constructor(e) {
4707
4712
  super(e);
4708
4713
  A(this, "_value", 0);
@@ -4831,7 +4836,7 @@ class y extends $t {
4831
4836
  return g.create(m.VALUE);
4832
4837
  if (!Number.isFinite(t) || !Number.isFinite(r))
4833
4838
  return g.create(m.NUM);
4834
- const n = Nr(t, r);
4839
+ const n = Or(t, r);
4835
4840
  return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
4836
4841
  }
4837
4842
  dividedBy(e) {
@@ -5065,10 +5070,10 @@ class y extends $t {
5065
5070
  if (typeof r == "number") {
5066
5071
  if (!Number.isFinite(t) || !Number.isFinite(r))
5067
5072
  return g.create(m.NUM);
5068
- const n = t < 0 ? -vt(Math.abs(t), r) : vt(t, r);
5073
+ const n = t < 0 ? -Tt(Math.abs(t), r) : Tt(t, r);
5069
5074
  return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
5070
5075
  }
5071
- return typeof r == "boolean" ? y.create(vt(t, r ? 1 : 0)) : this;
5076
+ return typeof r == "boolean" ? y.create(Tt(t, r ? 1 : 0)) : this;
5072
5077
  }
5073
5078
  floor(e) {
5074
5079
  if (e.isArray())
@@ -5129,8 +5134,8 @@ class y extends $t {
5129
5134
  return n;
5130
5135
  }
5131
5136
  }
5132
- const Uf = 1e5, Gs = new Nt(Uf);
5133
- class j extends $t {
5137
+ const Uf = 1e5, Gs = new Ot(Uf);
5138
+ class j extends Yt {
5134
5139
  constructor(e) {
5135
5140
  super(e);
5136
5141
  A(this, "_value");
@@ -5249,7 +5254,7 @@ function Kn(i) {
5249
5254
  let a = !1;
5250
5255
  if (typeof i == "string") {
5251
5256
  const e = i.toLocaleUpperCase();
5252
- e === er.TRUE ? a = !0 : e === er.FALSE && (a = !1);
5257
+ e === tr.TRUE ? a = !0 : e === tr.FALSE && (a = !1);
5253
5258
  } else
5254
5259
  i === 1 ? a = !0 : a = !1;
5255
5260
  return T.create(a);
@@ -5265,7 +5270,7 @@ function Xn(i, a = "") {
5265
5270
  } else {
5266
5271
  if (typeof i == "number")
5267
5272
  return Number.isFinite(i) ? y.create(i, a) : g.create(m.NUM);
5268
- if (Q(i))
5273
+ if (W(i))
5269
5274
  return y.create(Number(i), a);
5270
5275
  }
5271
5276
  return g.create(m.VALUE);
@@ -5273,17 +5278,17 @@ function Xn(i, a = "") {
5273
5278
  function Tf(i) {
5274
5279
  return "";
5275
5280
  }
5276
- function Do(i = []) {
5277
- const a = [];
5278
- for (let e = 0; e < i.length; e++) {
5279
- const t = i[e];
5280
- a[e] == null && (a[e] = []);
5281
- for (let r = 0; r < t.length; r++) {
5282
- const n = t[r];
5283
- a[e][r] = Vt.create(n);
5281
+ function Do(i = [], a = !1) {
5282
+ const e = [];
5283
+ for (let t = 0; t < i.length; t++) {
5284
+ const r = i[t];
5285
+ e[t] == null && (e[t] = []);
5286
+ for (let n = 0; n < r.length; n++) {
5287
+ const s = r[n];
5288
+ e[t][n] = Nt.create(s, a);
5284
5289
  }
5285
5290
  }
5286
- return a;
5291
+ return e;
5287
5292
  }
5288
5293
  function Bf(i = []) {
5289
5294
  const a = [];
@@ -5297,7 +5302,7 @@ function Bf(i = []) {
5297
5302
  }
5298
5303
  return a;
5299
5304
  }
5300
- class q extends $t {
5305
+ class q extends Yt {
5301
5306
  constructor(e) {
5302
5307
  super(typeof e == "string" ? e : Tf());
5303
5308
  A(this, "_values", []);
@@ -5596,7 +5601,7 @@ class q extends $t {
5596
5601
  if (o != null)
5597
5602
  return c;
5598
5603
  }
5599
- binarySearch(e, t = Wt.MIN, r = Le.MIN) {
5604
+ binarySearch(e, t = qt.MIN, r = Le.MIN) {
5600
5605
  if (e.isError())
5601
5606
  return;
5602
5607
  const { stringArray: n, stringPosition: s, numberArray: o, numberPosition: u } = this.flattenPosition();
@@ -5613,14 +5618,14 @@ class q extends $t {
5613
5618
  * @param matchType
5614
5619
  * @returns
5615
5620
  */
5616
- _binarySearch(e, t, r, n = Wt.MIN, s = Le.MIN) {
5621
+ _binarySearch(e, t, r, n = qt.MIN, s = Le.MIN) {
5617
5622
  const o = An(), u = Number(e.getValue()), c = !Number.isNaN(u);
5618
5623
  let l = 0, f = t.length - 1, h = -1, d = -1, _ = -1;
5619
5624
  for (; l <= f; ) {
5620
5625
  const C = Math.floor((l + f) / 2), E = t[C];
5621
5626
  let b;
5622
5627
  if (E.isNull())
5623
- b = n === Wt.MIN ? 1 : -1;
5628
+ b = n === qt.MIN ? 1 : -1;
5624
5629
  else {
5625
5630
  const R = E.getValue();
5626
5631
  if (c) {
@@ -5629,7 +5634,7 @@ class q extends $t {
5629
5634
  } else
5630
5635
  b = o(R.toString().toLocaleLowerCase(), e.getValue().toString().toLocaleLowerCase());
5631
5636
  }
5632
- if (n === Wt.MAX && (b = -b), b === 0) {
5637
+ if (n === qt.MAX && (b = -b), b === 0) {
5633
5638
  h = C;
5634
5639
  break;
5635
5640
  }
@@ -5638,9 +5643,9 @@ class q extends $t {
5638
5643
  if (s === Le.NORMAL)
5639
5644
  return h !== -1 ? r[h] : void 0;
5640
5645
  if (s === Le.MIN)
5641
- return h !== -1 ? r[h] : n === Wt.MIN ? r[d] : r[_];
5646
+ return h !== -1 ? r[h] : n === qt.MIN ? r[d] : r[_];
5642
5647
  if (s === Le.MAX)
5643
- return h !== -1 ? r[h] : n === Wt.MIN ? r[_] : r[d];
5648
+ return h !== -1 ? r[h] : n === qt.MIN ? r[_] : r[d];
5644
5649
  }
5645
5650
  sum() {
5646
5651
  let e = y.create(0);
@@ -6048,7 +6053,7 @@ class q extends $t {
6048
6053
  );
6049
6054
  C != null && C.forEach((E, b) => {
6050
6055
  let R = ue.create();
6051
- Rr.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
+ pr.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));
6052
6057
  let p;
6053
6058
  R.isError() ? p = R : e.isError() ? p = e : p = R.compare(e, s, o), (p.isError() || p.getValue() === !0) && E.forEach((N) => {
6054
6059
  N >= f && N <= f + u - 1 && (r[N - f] == null && (r[N - f] = []), r[N - f][t] = p);
@@ -6251,7 +6256,7 @@ class q extends $t {
6251
6256
  const f = [];
6252
6257
  for (let h = 0; h < l; h++) {
6253
6258
  const d = c[h].trim();
6254
- f.push(Vt.create(d));
6259
+ f.push(Nt.create(d));
6255
6260
  }
6256
6261
  n.push(f);
6257
6262
  }
@@ -6271,7 +6276,7 @@ class q extends $t {
6271
6276
  return q.create(o);
6272
6277
  }
6273
6278
  }
6274
- class Vt {
6279
+ class Nt {
6275
6280
  static create(a, e = !1) {
6276
6281
  if (a == null)
6277
6282
  return ue.create();
@@ -6279,11 +6284,11 @@ class Vt {
6279
6284
  return T.create(a);
6280
6285
  if (typeof a == "string") {
6281
6286
  const t = a.toLocaleUpperCase().trim();
6282
- if (Rr.has(t))
6287
+ if (pr.has(t))
6283
6288
  return g.create(t);
6284
- if (t === er.TRUE || t === er.FALSE)
6289
+ if (t === tr.TRUE || t === tr.FALSE)
6285
6290
  return Kn(a);
6286
- if (Q(a))
6291
+ if (W(a))
6287
6292
  return y.create(Number(a));
6288
6293
  if (!e) {
6289
6294
  const { isNumberPattern: n, value: s, pattern: o } = pl(a);
@@ -6300,7 +6305,7 @@ function If(i) {
6300
6305
  const a = i.trim();
6301
6306
  return a.startsWith('"') && a.endsWith('"');
6302
6307
  }
6303
- const Ff = 1e4, Rn = new Nt(Ff);
6308
+ const Ff = 1e4, Rn = new Ot(Ff);
6304
6309
  class Zn extends Hn {
6305
6310
  constructor(e) {
6306
6311
  super();
@@ -6540,13 +6545,13 @@ class Zn extends Hn {
6540
6545
  }
6541
6546
  getCellValueObject(e) {
6542
6547
  const t = Ol(e);
6543
- if (Rr.has(t))
6548
+ if (pr.has(t))
6544
6549
  return g.create(t);
6545
- if (e.t === Rt.NUMBER) {
6550
+ if (e.t === pt.NUMBER) {
6546
6551
  const r = this._getPatternByCell(e);
6547
6552
  return nc(r) ? j.create(t.toString()) : Xn(t, r);
6548
6553
  }
6549
- return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ? Kn(t) : Vt.create(t);
6554
+ return e.t === pt.STRING || e.t === pt.FORCE_STRING ? j.create(t.toString()) : e.t === pt.BOOLEAN ? Kn(t) : Nt.create(t);
6550
6555
  }
6551
6556
  _getPatternByCell(e) {
6552
6557
  var n;
@@ -6711,7 +6716,7 @@ class pn extends Zn {
6711
6716
  class ya extends Zn {
6712
6717
  constructor(a) {
6713
6718
  super(a);
6714
- const e = gr(a);
6719
+ const e = dr(a);
6715
6720
  this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName), this.setRangeData(e.range);
6716
6721
  }
6717
6722
  isCell() {
@@ -6750,7 +6755,7 @@ class ya extends Zn {
6750
6755
  class Ra extends Zn {
6751
6756
  constructor(a) {
6752
6757
  super(a);
6753
- const e = gr(a);
6758
+ const e = dr(a);
6754
6759
  this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName);
6755
6760
  const t = {
6756
6761
  ...e.range,
@@ -6781,7 +6786,7 @@ class Ra extends Zn {
6781
6786
  class pa extends Zn {
6782
6787
  constructor(a) {
6783
6788
  super(a);
6784
- const e = gr(a);
6789
+ const e = dr(a);
6785
6790
  this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName);
6786
6791
  const t = {
6787
6792
  ...e.range,
@@ -6838,9 +6843,9 @@ function O(i, a, e, t) {
6838
6843
  }
6839
6844
  s.push(u);
6840
6845
  }
6841
- return Or(s, i, a);
6846
+ return Mr(s, i, a);
6842
6847
  }
6843
- function Or(i, a, e, t = "", r = "") {
6848
+ function Mr(i, a, e, t = "", r = "") {
6844
6849
  const n = {
6845
6850
  calculateValueList: i,
6846
6851
  rowCount: a,
@@ -6864,9 +6869,9 @@ function Va(i) {
6864
6869
  for (const e of a)
6865
6870
  if (i.startsWith(e)) {
6866
6871
  const t = i.substring(e.length);
6867
- return [e, Vt.create(t)];
6872
+ return [e, Nt.create(t)];
6868
6873
  }
6869
- return [k.EQUALS, Vt.create(i)];
6874
+ return [k.EQUALS, Nt.create(i)];
6870
6875
  }
6871
6876
  function zn(i, a, e, t) {
6872
6877
  if (!e)
@@ -6911,7 +6916,7 @@ function Gf(i) {
6911
6916
  if (i.isError())
6912
6917
  return {
6913
6918
  v: i.getErrorType(),
6914
- t: Rt.STRING,
6919
+ t: pt.STRING,
6915
6920
  ...e,
6916
6921
  ...t
6917
6922
  };
@@ -6919,17 +6924,17 @@ function Gf(i) {
6919
6924
  const r = i, n = r.getValue();
6920
6925
  return r.isNumber() ? {
6921
6926
  v: n,
6922
- t: Rt.NUMBER,
6927
+ t: pt.NUMBER,
6923
6928
  ...e,
6924
6929
  ...t
6925
6930
  } : r.isBoolean() ? {
6926
6931
  v: n ? 1 : 0,
6927
- t: Rt.BOOLEAN,
6932
+ t: pt.BOOLEAN,
6928
6933
  ...e,
6929
6934
  ...t
6930
6935
  } : r.isString() ? {
6931
6936
  v: n,
6932
- t: Rt.STRING,
6937
+ t: pt.STRING,
6933
6938
  ...e,
6934
6939
  ...t
6935
6940
  } : r.isNull() ? {
@@ -6938,13 +6943,13 @@ function Gf(i) {
6938
6943
  ...t
6939
6944
  } : {
6940
6945
  v: n,
6941
- t: Rt.STRING,
6946
+ t: pt.STRING,
6942
6947
  ...e,
6943
6948
  ...t
6944
6949
  };
6945
6950
  }
6946
6951
  }
6947
- function Mr(i) {
6952
+ function wr(i) {
6948
6953
  let a = 0, e = 0;
6949
6954
  return i.forEach((t, r) => {
6950
6955
  if (r % 2 === 1)
@@ -7054,13 +7059,13 @@ let Qs = class extends Ne {
7054
7059
  };
7055
7060
  let e = i;
7056
7061
  if (i.startsWith("#") && so(i.slice(1))) {
7057
- const { unitId: t, sheetName: r, range: n } = Pr(i.slice(1)), s = this._univerInstanceService.getCurrentUnitOfType(cr.UNIVER_SHEET);
7062
+ const { unitId: t, sheetName: r, range: n } = Pr(i.slice(1)), s = this._univerInstanceService.getCurrentUnitOfType(lr.UNIVER_SHEET);
7058
7063
  if (t === "" || t === s.getUnitId())
7059
7064
  if (r === "")
7060
- e = `#gid=${s.getActiveSheet().getSheetId()}&range=${Bt(n)}`;
7065
+ e = `#gid=${s.getActiveSheet().getSheetId()}&range=${It(n)}`;
7061
7066
  else {
7062
7067
  const o = s.getSheetBySheetName(r);
7063
- o && (e = `#gid=${o.getSheetId()}&range=${Bt(n)}`);
7068
+ o && (e = `#gid=${o.getSheetId()}&range=${It(n)}`);
7064
7069
  }
7065
7070
  } else qe.isLegalUrl(i) && (e = qe.normalizeUrl(i));
7066
7071
  return {
@@ -7279,11 +7284,11 @@ let Ws = class extends Ne {
7279
7284
  const S = this._currentConfigService.getUnitData();
7280
7285
  E.iterator((D, L, U) => {
7281
7286
  var ne, z;
7282
- const x = L - b + e, F = U - R + t, W = (z = (ne = S[o]) == null ? void 0 : ne[s]) == null ? void 0 : z.cellData.getValue(x, F);
7287
+ const x = L - b + e, F = U - R + t, Q = (z = (ne = S[o]) == null ? void 0 : ne[s]) == null ? void 0 : z.cellData.getValue(x, F);
7283
7288
  if (L === b && U === R)
7284
7289
  _.setValue(e, t, w);
7285
- else if (W != null)
7286
- W.v == null && (W.v = ""), _.setValue(x, F, W);
7290
+ else if (Q != null)
7291
+ Q.v == null && (Q.v = ""), _.setValue(x, F, Q);
7287
7292
  else {
7288
7293
  if (this._isInOtherArrayFormulaRange(o, s, e, t, x, F))
7289
7294
  return !0;
@@ -7443,12 +7448,12 @@ let Ws = class extends Ne {
7443
7448
  }
7444
7449
  };
7445
7450
  Ws = Jf([
7446
- pi(0, kt),
7451
+ pi(0, $t),
7447
7452
  pi(1, Lo)
7448
7453
  ], Ws);
7449
- const Ot = Ze("univer.formula.runtime.service");
7454
+ const Mt = Ze("univer.formula.runtime.service");
7450
7455
  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 || {});
7451
- const At = /* @__PURE__ */ new Map([
7456
+ const Et = /* @__PURE__ */ new Map([
7452
7457
  [1, 7],
7453
7458
  [2, 9],
7454
7459
  [3, 8],
@@ -7531,7 +7536,7 @@ class Ge {
7531
7536
  setNotEmpty(a = !0) {
7532
7537
  }
7533
7538
  async executeAsync() {
7534
- return Promise.resolve(xt.SUCCESS);
7539
+ return Promise.resolve(jt.SUCCESS);
7535
7540
  }
7536
7541
  serialize() {
7537
7542
  const a = this.getToken(), e = this.getChildren(), t = [], r = e.length;
@@ -7572,8 +7577,8 @@ class xe extends Ge {
7572
7577
  return this._errorValueObject;
7573
7578
  }
7574
7579
  }
7575
- const Et = 100;
7576
- class bt {
7580
+ const bt = 100;
7581
+ class yt {
7577
7582
  get zIndex() {
7578
7583
  return 0;
7579
7584
  }
@@ -7598,24 +7603,24 @@ class qs extends Ge {
7598
7603
  e == null ? this.setValue(g.create(m.VALUE)) : this.setValue(e.getValue());
7599
7604
  }
7600
7605
  }
7601
- class Po extends bt {
7606
+ class Po extends yt {
7602
7607
  get zIndex() {
7603
- return At.get(ie.ROOT) || Et;
7608
+ return Et.get(ie.ROOT) || bt;
7604
7609
  }
7605
7610
  checkAndCreateNodeType(a) {
7606
7611
  if (!(a instanceof ae))
7607
7612
  return;
7608
- if (a.getToken() === Ut)
7609
- return new qs(Ut);
7613
+ if (a.getToken() === vt)
7614
+ return new qs(vt);
7610
7615
  }
7611
7616
  }
7612
- const eh = 5e3, Ur = new Nt(eh);
7617
+ const eh = 5e3, Ur = new Ot(eh);
7613
7618
  function Vi(i, a, e, t, r) {
7614
7619
  let n = Ur.get(`${i}${a}`);
7615
7620
  if (n && !xo(n, r))
7616
7621
  return n;
7617
7622
  const s = e.treeBuilder(a);
7618
- if (Rr.has(s))
7623
+ if (pr.has(s))
7619
7624
  return xe.create(s);
7620
7625
  if (n = t.parse(s), n == null)
7621
7626
  throw new Error("astNode is null");
@@ -7636,7 +7641,7 @@ function xo(i, a) {
7636
7641
  function th(i, a, e) {
7637
7642
  return !!(a != null && xo(a, e));
7638
7643
  }
7639
- const Ht = Ze("univer.formula-function.service");
7644
+ const Gt = Ze("univer.formula-function.service");
7640
7645
  class rh extends Ne {
7641
7646
  constructor() {
7642
7647
  super(...arguments);
@@ -7733,12 +7738,12 @@ class Vn extends Ge {
7733
7738
  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);
7734
7739
  }
7735
7740
  }
7736
- let Nn = class extends bt {
7741
+ let Nn = class extends yt {
7737
7742
  constructor(i, a) {
7738
7743
  super(), this._functionService = i, this._runtimeService = a;
7739
7744
  }
7740
7745
  get zIndex() {
7741
- return At.get(ie.PREFIX) || Et;
7746
+ return Et.get(ie.PREFIX) || bt;
7742
7747
  }
7743
7748
  checkAndCreateNodeType(i) {
7744
7749
  if (!(i instanceof ae))
@@ -7755,8 +7760,8 @@ let Nn = class extends bt {
7755
7760
  }
7756
7761
  };
7757
7762
  Nn = sh([
7758
- Ni(0, Ht),
7759
- Ni(1, Ot)
7763
+ Ni(0, Gt),
7764
+ Ni(1, Mt)
7760
7765
  ], Nn);
7761
7766
  new RegExp(Me.MINUS, "g");
7762
7767
  new RegExp(Me.AT, "g");
@@ -7774,7 +7779,7 @@ var ah = Object.getOwnPropertyDescriptor, ih = (i, a, e, t) => {
7774
7779
  for (var r = t > 1 ? void 0 : t ? ah(a, e) : a, n = i.length - 1, s; n >= 0; n--)
7775
7780
  (s = i[n]) && (r = s(r) || r);
7776
7781
  return r;
7777
- }, ir = (i, a) => (e, t) => a(e, t, i);
7782
+ }, or = (i, a) => (e, t) => a(e, t, i);
7778
7783
  class oh extends Ge {
7779
7784
  constructor(a, e, t, r, n, s) {
7780
7785
  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);
@@ -7791,7 +7796,7 @@ class oh extends Ge {
7791
7796
  }
7792
7797
  const r = await this._calculateAsync(a);
7793
7798
  let n;
7794
- return r.isAsyncObject() || r.isAsyncArrayObject() ? n = await r.getValue() : n = r, this._setRefData(n), this.setValue(n), Promise.resolve(xt.SUCCESS);
7799
+ return r.isAsyncObject() || r.isAsyncArrayObject() ? n = await r.getValue() : n = r, this._setRefData(n), this.setValue(n), Promise.resolve(jt.SUCCESS);
7795
7800
  }
7796
7801
  execute() {
7797
7802
  const a = [], e = this.getChildren(), t = e.length;
@@ -7841,7 +7846,7 @@ class oh extends Ge {
7841
7846
  _handleCustomResult(a) {
7842
7847
  var t;
7843
7848
  if (typeof a != "object" || a == null)
7844
- return Vt.create(a);
7849
+ return Nt.create(a);
7845
7850
  const e = Do(a);
7846
7851
  return q.create({
7847
7852
  calculateValueList: e,
@@ -7931,18 +7936,18 @@ class uh extends Ge {
7931
7936
  return ie.FUNCTION;
7932
7937
  }
7933
7938
  async executeAsync() {
7934
- return this.setValue(g.create(m.NAME)), Promise.resolve(xt.SUCCESS);
7939
+ return this.setValue(g.create(m.NAME)), Promise.resolve(jt.SUCCESS);
7935
7940
  }
7936
7941
  execute() {
7937
7942
  this.setValue(g.create(m.NAME));
7938
7943
  }
7939
7944
  }
7940
- let On = class extends bt {
7945
+ let On = class extends yt {
7941
7946
  constructor(i, a, e, t, r, n) {
7942
7947
  super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
7943
7948
  }
7944
7949
  get zIndex() {
7945
- return At.get(ie.FUNCTION) || Et;
7950
+ return Et.get(ie.FUNCTION) || bt;
7946
7951
  }
7947
7952
  create(i) {
7948
7953
  const a = this._functionService.getExecutor(i);
@@ -7973,19 +7978,19 @@ let On = class extends bt {
7973
7978
  }
7974
7979
  };
7975
7980
  On = ih([
7976
- ir(0, Ht),
7977
- ir(1, kt),
7978
- ir(2, Ot),
7979
- ir(3, Vr),
7980
- ir(4, ye(Ki)),
7981
- ir(5, ye(dr))
7981
+ or(0, Gt),
7982
+ or(1, $t),
7983
+ or(2, Mt),
7984
+ or(3, Nr),
7985
+ or(4, ye(Ki)),
7986
+ or(5, ye(Cr))
7982
7987
  ], On);
7983
7988
  var ch = Object.getOwnPropertyDescriptor, lh = (i, a, e, t) => {
7984
7989
  for (var r = t > 1 ? void 0 : t ? ch(a, e) : a, n = i.length - 1, s; n >= 0; n--)
7985
7990
  (s = i[n]) && (r = s(r) || r);
7986
7991
  return r;
7987
7992
  }, fh = (i, a) => (e, t) => a(e, t, i);
7988
- let Ar = class extends Ne {
7993
+ let Er = class extends Ne {
7989
7994
  constructor(i) {
7990
7995
  super(), this._runtimeService = i;
7991
7996
  }
@@ -8027,7 +8032,7 @@ let Ar = class extends Ne {
8027
8032
  }
8028
8033
  async _executeAsync(i, a = 0, e = 0) {
8029
8034
  if (this._runtimeService.isStopExecution())
8030
- return Promise.resolve(xt.ERROR);
8035
+ return Promise.resolve(jt.ERROR);
8031
8036
  const t = i.getChildren(), r = t.length;
8032
8037
  for (let n = 0; n < r; n++) {
8033
8038
  const s = t[n];
@@ -8037,11 +8042,11 @@ let Ar = class extends Ne {
8037
8042
  }
8038
8043
  await this._executeAsync(s, a, e);
8039
8044
  }
8040
- return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.nodeType === ie.FUNCTION && i.isAsync() ? await i.executeAsync() : i.execute(), Promise.resolve(xt.SUCCESS);
8045
+ return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.nodeType === ie.FUNCTION && i.isAsync() ? await i.executeAsync() : i.execute(), Promise.resolve(jt.SUCCESS);
8041
8046
  }
8042
8047
  _execute(i, a = 0, e = 0) {
8043
8048
  if (this._runtimeService.isStopExecution())
8044
- return xt.ERROR;
8049
+ return jt.ERROR;
8045
8050
  const t = i.getChildren(), r = t.length;
8046
8051
  for (let n = 0; n < r; n++) {
8047
8052
  const s = t[n];
@@ -8051,14 +8056,14 @@ let Ar = class extends Ne {
8051
8056
  }
8052
8057
  this._execute(s, a, e);
8053
8058
  }
8054
- return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.execute(), xt.SUCCESS;
8059
+ return i.nodeType === ie.REFERENCE && i.setRefOffset(a, e), i.execute(), jt.SUCCESS;
8055
8060
  }
8056
8061
  };
8057
- Ar = lh([
8058
- fh(0, Ot)
8059
- ], Ar);
8062
+ Er = lh([
8063
+ fh(0, Mt)
8064
+ ], Er);
8060
8065
  function Uo(i) {
8061
- return i instanceof ae ? i.getToken() === mr : !1;
8066
+ return i instanceof ae ? i.getToken() === gr : !1;
8062
8067
  }
8063
8068
  function hh(i) {
8064
8069
  return i instanceof ae ? i.getToken() === mo : !1;
@@ -8103,7 +8108,7 @@ function vo(i) {
8103
8108
  const r = e.get(t);
8104
8109
  return r == null && i.getValue() ? i : vo(r);
8105
8110
  }
8106
- class Oa extends $t {
8111
+ class Oa extends Yt {
8107
8112
  constructor(e, t, r) {
8108
8113
  super(0);
8109
8114
  A(this, "_lambdaPrivacyValueMap", /* @__PURE__ */ new Map());
@@ -8137,7 +8142,7 @@ class Oa extends $t {
8137
8142
  * @param variants
8138
8143
  */
8139
8144
  executeCustom(...e) {
8140
- const t = e.map((r) => Vt.create(r));
8145
+ const t = e.map((r) => Nt.create(r));
8141
8146
  return this.execute(...t);
8142
8147
  }
8143
8148
  _setLambdaNodeValue(e) {
@@ -8214,12 +8219,12 @@ class Ch extends Ge {
8214
8219
  // return Promise.resolve(AstNodePromiseType.SUCCESS);
8215
8220
  // }
8216
8221
  }
8217
- let Mn = class extends bt {
8222
+ let Mn = class extends yt {
8218
8223
  constructor(i, a) {
8219
8224
  super(), this._runtimeService = i, this._interpreter = a;
8220
8225
  }
8221
8226
  get zIndex() {
8222
- return At.get(ie.LAMBDA) || Et;
8227
+ return Et.get(ie.LAMBDA) || bt;
8223
8228
  }
8224
8229
  create(i) {
8225
8230
  const a = i.getChildren(), e = a[0];
@@ -8227,7 +8232,7 @@ let Mn = class extends bt {
8227
8232
  const r = a[a.length - 1];
8228
8233
  if (!(e instanceof ae && r instanceof ae))
8229
8234
  return xe.create(m.NAME);
8230
- if (e.getToken() === mr) {
8235
+ if (e.getToken() === gr) {
8231
8236
  const o = e.getChildren();
8232
8237
  if (t.length !== o.length)
8233
8238
  return xe.create(m.VALUE);
@@ -8253,8 +8258,8 @@ let Mn = class extends bt {
8253
8258
  }
8254
8259
  };
8255
8260
  Mn = dh([
8256
- Mi(0, Ot),
8257
- Mi(1, ye(Ar))
8261
+ Mi(0, Mt),
8262
+ Mi(1, ye(Er))
8258
8263
  ], Mn);
8259
8264
  function To(i) {
8260
8265
  if (!i)
@@ -8288,9 +8293,9 @@ class _h extends Ge {
8288
8293
  }
8289
8294
  }
8290
8295
  }
8291
- class Bo extends bt {
8296
+ class Bo extends yt {
8292
8297
  get zIndex() {
8293
- return At.get(ie.LAMBDA_PARAMETER) || Et;
8298
+ return Et.get(ie.LAMBDA_PARAMETER) || bt;
8294
8299
  }
8295
8300
  create(a) {
8296
8301
  const e = a.getFunctionDefinitionPrivacyVar(), t = a.getLambdaParameter();
@@ -8342,12 +8347,12 @@ class Rh extends Ge {
8342
8347
  );
8343
8348
  }
8344
8349
  }
8345
- let wn = class extends bt {
8350
+ let wn = class extends yt {
8346
8351
  constructor(i) {
8347
8352
  super(), this._functionService = i;
8348
8353
  }
8349
8354
  get zIndex() {
8350
- return At.get(ie.OPERATOR) || Et;
8355
+ return Et.get(ie.OPERATOR) || bt;
8351
8356
  }
8352
8357
  create(i) {
8353
8358
  let a = "";
@@ -8360,12 +8365,12 @@ let wn = class extends bt {
8360
8365
  if (i instanceof ae)
8361
8366
  return;
8362
8367
  const a = i.trim();
8363
- if (!(a.charAt(0) === '"' && a.charAt(a.length - 1) === '"') && Dt.has(a))
8368
+ if (!(a.charAt(0) === '"' && a.charAt(a.length - 1) === '"') && Lt.has(a))
8364
8369
  return this.create(a);
8365
8370
  }
8366
8371
  };
8367
8372
  wn = bh([
8368
- yh(0, Ht)
8373
+ yh(0, Gt)
8369
8374
  ], wn);
8370
8375
  var ph = Object.getOwnPropertyDescriptor, Vh = (i, a, e, t) => {
8371
8376
  for (var r = t > 1 ? void 0 : t ? ph(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -8398,12 +8403,12 @@ class Es extends Ge {
8398
8403
  };
8399
8404
  }
8400
8405
  }
8401
- let Sn = class extends bt {
8406
+ let Sn = class extends yt {
8402
8407
  constructor(i, a, e) {
8403
8408
  super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e;
8404
8409
  }
8405
8410
  get zIndex() {
8406
- return At.get(ie.REFERENCE) || Et;
8411
+ return Et.get(ie.REFERENCE) || bt;
8407
8412
  }
8408
8413
  checkAndCreateNodeType(i) {
8409
8414
  var l, f;
@@ -8422,9 +8427,9 @@ let Sn = class extends bt {
8422
8427
  }
8423
8428
  };
8424
8429
  Sn = Vh([
8425
- As(0, kt),
8426
- As(1, Ot),
8427
- As(2, Ht)
8430
+ As(0, $t),
8431
+ As(1, Mt),
8432
+ As(2, Gt)
8428
8433
  ], Sn);
8429
8434
  var Nh = Object.getOwnPropertyDescriptor, Oh = (i, a, e, t) => {
8430
8435
  for (var r = t > 1 ? void 0 : t ? Nh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -8464,12 +8469,12 @@ class wi extends Ge {
8464
8469
  return o && this._lexer.treeBuilder(o), g.create(m.VALUE);
8465
8470
  }
8466
8471
  }
8467
- let Dn = class extends bt {
8472
+ let Dn = class extends yt {
8468
8473
  constructor(i, a, e) {
8469
8474
  super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
8470
8475
  }
8471
8476
  get zIndex() {
8472
- return At.get(ie.SUFFIX) || Et;
8477
+ return Et.get(ie.SUFFIX) || bt;
8473
8478
  }
8474
8479
  checkAndCreateNodeType(i) {
8475
8480
  if (!(i instanceof ae))
@@ -8486,9 +8491,9 @@ let Dn = class extends bt {
8486
8491
  }
8487
8492
  };
8488
8493
  Dn = Oh([
8489
- bs(0, Ht),
8490
- bs(1, ye(Cr)),
8491
- bs(2, kt)
8494
+ bs(0, Gt),
8495
+ bs(1, ye(_r)),
8496
+ bs(2, $t)
8492
8497
  ], Dn);
8493
8498
  var Mh = Object.getOwnPropertyDescriptor, wh = (i, a, e, t) => {
8494
8499
  for (var r = t > 1 ? void 0 : t ? Mh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -8513,12 +8518,12 @@ class Dh extends Ge {
8513
8518
  return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e, qf(a, e));
8514
8519
  }
8515
8520
  }
8516
- let Ln = class extends bt {
8521
+ let Ln = class extends yt {
8517
8522
  constructor(i) {
8518
8523
  super(), this._functionService = i;
8519
8524
  }
8520
8525
  get zIndex() {
8521
- return At.get(ie.UNION) || Et;
8526
+ return Et.get(ie.UNION) || bt;
8522
8527
  }
8523
8528
  create(i) {
8524
8529
  return new Dh(i);
@@ -8532,7 +8537,7 @@ let Ln = class extends bt {
8532
8537
  }
8533
8538
  };
8534
8539
  Ln = wh([
8535
- Sh(0, Ht)
8540
+ Sh(0, Gt)
8536
8541
  ], Ln);
8537
8542
  class Lh extends Ge {
8538
8543
  constructor(a) {
@@ -8544,24 +8549,24 @@ class Lh extends Ge {
8544
8549
  execute() {
8545
8550
  var e;
8546
8551
  const a = ((e = this.getParent()) == null ? void 0 : e.nodeType) === ie.FUNCTION && this.getParent().isFunctionExecutorArgumentsIgnoreNumberPattern();
8547
- this.setValue(Vt.create(this.getToken(), a));
8552
+ this.setValue(Nt.create(this.getToken(), a));
8548
8553
  }
8549
8554
  }
8550
- class Io extends bt {
8555
+ class Io extends yt {
8551
8556
  get zIndex() {
8552
- return At.get(ie.VALUE) || Et;
8557
+ return Et.get(ie.VALUE) || bt;
8553
8558
  }
8554
8559
  _checkValueNode(a) {
8555
8560
  if (Number.isNaN(Number(a))) {
8556
8561
  const e = a.trim(), t = e.charAt(0), r = e.charAt(e.length - 1);
8557
- if (Rr.has(e))
8562
+ if (pr.has(e))
8558
8563
  return this.create(e);
8559
8564
  if (t === '"' && r === '"')
8560
8565
  return this.create(e);
8561
8566
  if (t === "{" && r === "}")
8562
8567
  return this.create(e);
8563
8568
  const n = e.toUpperCase();
8564
- if (n === er.TRUE || n === er.FALSE)
8569
+ if (n === tr.TRUE || n === tr.FALSE)
8565
8570
  return this.create(n);
8566
8571
  } else
8567
8572
  return this.create(a);
@@ -8591,13 +8596,13 @@ let vr = class extends Ne {
8591
8596
  }), this._astNodeFactoryList = [];
8592
8597
  }
8593
8598
  parse(a) {
8594
- const e = new qs(Ut), t = this._parse(a, e);
8599
+ const e = new qs(vt), t = this._parse(a, e);
8595
8600
  return a.hasDefinedNames() && (t == null || t.setDefinedNames(a.getDefinedNames())), t;
8596
8601
  }
8597
8602
  _lambdaParameterHandler(a, e) {
8598
8603
  if (e.getLambdaId == null)
8599
8604
  return xe.create(m.VALUE);
8600
- const t = e.getLambdaId(), r = new qs(Ut), n = this._runtimeService.getFunctionDefinitionPrivacyVar(t);
8605
+ const t = e.getLambdaId(), r = new qs(vt), n = this._runtimeService.getFunctionDefinitionPrivacyVar(t);
8601
8606
  if (!n)
8602
8607
  return !1;
8603
8608
  const s = [...n.keys()], o = a.getChildren(), u = o.length;
@@ -8619,7 +8624,7 @@ let vr = class extends Ne {
8619
8624
  const r = new ae();
8620
8625
  r.setToken(xr);
8621
8626
  const n = new ae();
8622
- n.setToken(mr);
8627
+ n.setToken(gr);
8623
8628
  const s = [...e];
8624
8629
  for (let u = 0; u < t; u++) {
8625
8630
  const c = s[u];
@@ -8641,11 +8646,11 @@ let vr = class extends Ne {
8641
8646
  const f = this._changeLetToLambda(a);
8642
8647
  return f != null ? this._parse(f, e) : xe.create(m.ERROR);
8643
8648
  }
8644
- if (o === ht) {
8649
+ if (o === mt) {
8645
8650
  if (s = e, r === 0)
8646
- return new Ah(Ut).setParent(e), s;
8651
+ return new Ah(vt).setParent(e), s;
8647
8652
  } else {
8648
- if (o === mr) {
8653
+ if (o === gr) {
8649
8654
  let f = this._lambdaParameterHandler(a, e);
8650
8655
  return f === !1 && (f = xe.create(m.ERROR)), f;
8651
8656
  }
@@ -8662,7 +8667,7 @@ let vr = class extends Ne {
8662
8667
  continue;
8663
8668
  let d = null;
8664
8669
  if (h instanceof ae) {
8665
- if (h.getToken() === ht && h.getChildren().length === 0) {
8670
+ if (h.getToken() === mt && h.getChildren().length === 0) {
8666
8671
  const _ = (l = h.getParent()) == null ? void 0 : l.getChildren();
8667
8672
  if (_ && _.length === 1)
8668
8673
  return xe.create(m.NAME);
@@ -8752,7 +8757,7 @@ let vr = class extends Ne {
8752
8757
  }
8753
8758
  };
8754
8759
  vr = xh([
8755
- ut(0, Ot),
8760
+ ut(0, Mt),
8756
8761
  ut(1, ye(Po)),
8757
8762
  ut(2, ye(On)),
8758
8763
  ut(3, ye(Mn)),
@@ -9116,7 +9121,7 @@ class vh extends Ne {
9116
9121
  super(...arguments);
9117
9122
  A(this, "_referenceExecutorMap", /* @__PURE__ */ new Map());
9118
9123
  // unitId -> subUnitId -> featureId -> IFeatureCalculationManagerParam
9119
- A(this, "_onChanged$", new lr());
9124
+ A(this, "_onChanged$", new fr());
9120
9125
  A(this, "onChanged$", this._onChanged$.asObservable());
9121
9126
  }
9122
9127
  dispose() {
@@ -9514,8 +9519,8 @@ var Bh = Object.getOwnPropertyDescriptor, Ih = (i, a, e, t) => {
9514
9519
  for (var r = t > 1 ? void 0 : t ? Bh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
9515
9520
  (s = i[n]) && (r = s(r) || r);
9516
9521
  return r;
9517
- }, St = (i, a) => (e, t) => a(e, t, i);
9518
- function or(i) {
9522
+ }, Dt = (i, a) => (e, t) => a(e, t, i);
9523
+ function ur(i) {
9519
9524
  return i.getLastTreeId() || 0;
9520
9525
  }
9521
9526
  const Xs = Ze("engine-formula.dependency-generator");
@@ -9556,7 +9561,7 @@ let Zs = class extends Ne {
9556
9561
  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 });
9557
9562
  if (C.length > 0) {
9558
9563
  let E = this._getExistTreeList({ unitId: l, subUnitId: f, featureId: c }, a);
9559
- E == null && (E = this._getFeatureFormulaTree(c, or(this._dependencyManagerService), u), a.push(E)), E.parents = /* @__PURE__ */ new Set(), C.forEach((b) => {
9564
+ E == null && (E = this._getFeatureFormulaTree(c, ur(this._dependencyManagerService), u), a.push(E)), E.parents = /* @__PURE__ */ new Set(), C.forEach((b) => {
9560
9565
  b.hasChildren(E.treeId) || b.pushChildren(E);
9561
9566
  }), t = !0;
9562
9567
  }
@@ -9704,7 +9709,7 @@ let Zs = class extends Ne {
9704
9709
  });
9705
9710
  }
9706
9711
  _getFeatureFormulaTree(a, e, t) {
9707
- const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || or(this._dependencyManagerService), c = new ys(u);
9712
+ const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || ur(this._dependencyManagerService), c = new ys(u);
9708
9713
  c.unitId = r, c.subUnitId = n, c.rangeList = s, c.getDirtyData = o;
9709
9714
  const l = o(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), f = this._convertDirtyRangesToUnitRange(l.dirtyRanges);
9710
9715
  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;
@@ -9724,18 +9729,18 @@ let Zs = class extends Ne {
9724
9729
  const f = this._dependencyManagerService.hasOtherFormulaDataMainData(l), h = u[l], { f: d, ranges: _ } = h;
9725
9730
  let C = !1;
9726
9731
  f && (C = !0);
9727
- 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)) || or(this._dependencyManagerService), M = new ys(N);
9732
+ 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)) || ur(this._dependencyManagerService), M = new ys(N);
9728
9733
  for (let w = 0; w < _.length; w++) {
9729
9734
  const S = _[w], { startRow: D, startColumn: L, endRow: U, endColumn: x } = S;
9730
9735
  for (let F = D; F <= U; F++)
9731
- for (let W = L; W <= x; W++) {
9732
- const ne = W - R, z = F - b;
9736
+ for (let Q = L; Q <= x; Q++) {
9737
+ const ne = Q - R, z = F - b;
9733
9738
  if (ne === 0 && z === 0) {
9734
9739
  M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type = Ks.OTHER_FORMULA, M.isCache = C, t.push(M), this._dependencyManagerService.addOtherFormulaDependency(r, o, l, M), this._dependencyManagerService.addFormulaDependencyByDefinedName(M);
9735
9740
  continue;
9736
9741
  }
9737
9742
  const G = new Si();
9738
- G.treeId = (p == null ? void 0 : p.getValue(ne, z)) || or(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
+ G.treeId = (p == null ? void 0 : p.getValue(ne, z)) || ur(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);
9739
9744
  }
9740
9745
  }
9741
9746
  this._dependencyManagerService.addOtherFormulaDependencyMainData(l);
@@ -9785,12 +9790,12 @@ let Zs = class extends Ne {
9785
9790
  }
9786
9791
  }
9787
9792
  _createFDtree(a, e, t, r, n, s) {
9788
- const { f: o, x: u = 0, y: c = 0 } = s, l = new ys(or(this._dependencyManagerService)), f = n[a][e], h = Vi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
9793
+ const { f: o, x: u = 0, y: c = 0 } = s, l = new ys(ur(this._dependencyManagerService)), f = n[a][e], h = Vi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
9789
9794
  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;
9790
9795
  }
9791
9796
  _createVirtualFDtree(a, e) {
9792
9797
  const { x: t = 0, y: r = 0 } = e, n = new Si();
9793
- return n.treeId = or(this._dependencyManagerService), n.refTree = a, n.refOffsetX = t, n.refOffsetY = r, n;
9798
+ return n.treeId = ur(this._dependencyManagerService), n.refTree = a, n.refOffsetX = t, n.refOffsetY = r, n;
9794
9799
  }
9795
9800
  /**
9796
9801
  * Break down the dirty areas into ranges for subsequent matching.
@@ -10111,27 +10116,27 @@ let Zs = class extends Ne {
10111
10116
  }
10112
10117
  };
10113
10118
  Zs = Ih([
10114
- St(0, kt),
10115
- St(1, Ot),
10116
- St(2, Ma),
10117
- St(3, Tr),
10118
- St(4, ye(Ar)),
10119
- St(5, ye(vr)),
10120
- St(6, ye(Cr)),
10121
- St(7, es)
10119
+ Dt(0, $t),
10120
+ Dt(1, Mt),
10121
+ Dt(2, Ma),
10122
+ Dt(3, Tr),
10123
+ Dt(4, ye(Er)),
10124
+ Dt(5, ye(vr)),
10125
+ Dt(6, ye(_r)),
10126
+ Dt(7, es)
10122
10127
  ], Zs);
10123
10128
  var Fh = Object.getOwnPropertyDescriptor, kh = (i, a, e, t) => {
10124
10129
  for (var r = t > 1 ? void 0 : t ? Fh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
10125
10130
  (s = i[n]) && (r = s(r) || r);
10126
10131
  return r;
10127
- }, Qt = (i, a) => (e, t) => a(e, t, i);
10132
+ }, Wt = (i, a) => (e, t) => a(e, t, i);
10128
10133
  const $h = 500, zs = Ze("engine-formula.calculate-formula.service");
10129
10134
  let Js = class extends Ne {
10130
10135
  constructor(a, e, t, r, n, s, o) {
10131
10136
  super();
10132
- A(this, "_executionInProgressListener$", new lr());
10137
+ A(this, "_executionInProgressListener$", new fr());
10133
10138
  A(this, "executionInProgressListener$", this._executionInProgressListener$.asObservable());
10134
- A(this, "_executionCompleteListener$", new lr());
10139
+ A(this, "_executionCompleteListener$", new fr());
10135
10140
  A(this, "executionCompleteListener$", this._executionCompleteListener$.asObservable());
10136
10141
  A(this, "_executeLock", new uc());
10137
10142
  this._configService = a, this._lexer = e, this._currentConfigService = t, this._runtimeService = r, this._formulaDependencyGenerator = n, this._interpreter = s, this._astTreeBuilder = o;
@@ -10251,13 +10256,13 @@ let Js = class extends Ne {
10251
10256
  }
10252
10257
  };
10253
10258
  Js = kh([
10254
- Qt(0, ia),
10255
- Qt(1, ye(Cr)),
10256
- Qt(2, kt),
10257
- Qt(3, Ot),
10258
- Qt(4, Xs),
10259
- Qt(5, ye(Ar)),
10260
- Qt(6, ye(vr))
10259
+ Wt(0, ia),
10260
+ Wt(1, ye(_r)),
10261
+ Wt(2, $t),
10262
+ Wt(3, Mt),
10263
+ Wt(4, Xs),
10264
+ Wt(5, ye(Er)),
10265
+ Wt(6, ye(vr))
10261
10266
  ], Js);
10262
10267
  var Yh = Object.getOwnPropertyDescriptor, Hh = (i, a, e, t) => {
10263
10268
  for (var r = t > 1 ? void 0 : t ? Yh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -10369,9 +10374,9 @@ let Pn = class extends Ne {
10369
10374
  }
10370
10375
  };
10371
10376
  Pn = Hh([
10372
- Rs(0, sr),
10377
+ Rs(0, ar),
10373
10378
  Rs(1, zs),
10374
- Rs(2, ye(dr))
10379
+ Rs(2, ye(Cr))
10375
10380
  ], Pn);
10376
10381
  const Di = /[\[\]]/g;
10377
10382
  function Li(i, a) {
@@ -10437,7 +10442,7 @@ function zr(i, a = we.ALL, e) {
10437
10442
  return `[${i}]`;
10438
10443
  }
10439
10444
  }
10440
- function Xt(i) {
10445
+ function Zt(i) {
10441
10446
  let a = i;
10442
10447
  if (i.isArray()) {
10443
10448
  const e = i.getRowCount(), t = i.getColumnCount();
@@ -10449,7 +10454,7 @@ function Xt(i) {
10449
10454
  }
10450
10455
  function Yr(...i) {
10451
10456
  for (let a = 0; a < i.length; a++) {
10452
- const e = Xt(i[a]);
10457
+ const e = Zt(i[a]);
10453
10458
  if (e.isError())
10454
10459
  return {
10455
10460
  isError: !0,
@@ -10464,7 +10469,7 @@ function Yr(...i) {
10464
10469
  }
10465
10470
  function H(...i) {
10466
10471
  for (let a = 0; a < i.length; a++) {
10467
- const e = Xt(i[a]);
10472
+ const e = Zt(i[a]);
10468
10473
  if (e.isError())
10469
10474
  return {
10470
10475
  isError: !0,
@@ -10495,7 +10500,7 @@ function Fe(...i) {
10495
10500
  isError: !0,
10496
10501
  errorObject: g.create(m.NA)
10497
10502
  };
10498
- if (e = Xt(i[a]), e.isError())
10503
+ if (e = Zt(i[a]), e.isError())
10499
10504
  return {
10500
10505
  isError: !0,
10501
10506
  errorObject: e
@@ -10786,7 +10791,7 @@ class V {
10786
10791
  } else
10787
10792
  t[0].push(n);
10788
10793
  }
10789
- return Or(t, 1, t[0].length);
10794
+ return Mr(t, 1, t[0].length);
10790
10795
  }
10791
10796
  _includingLogicalValuesAndText(a) {
10792
10797
  if (a.isBoolean() && (a = Hf(a)), a.isString()) {
@@ -10867,7 +10872,7 @@ const Kh = [
10867
10872
  [Wh, ea.ARRAY_CONSTRAIN],
10868
10873
  [qh, ea.FLATTEN]
10869
10874
  ];
10870
- var Er;
10875
+ var br;
10871
10876
  ((i) => {
10872
10877
  const a = 0.636619772;
10873
10878
  function e(n, s) {
@@ -11006,7 +11011,7 @@ var Er;
11006
11011
  }
11007
11012
  return r(o, l, 2, 1);
11008
11013
  })();
11009
- })(Er || (Er = {}));
11014
+ })(br || (br = {}));
11010
11015
  function wa(i) {
11011
11016
  return /^[01]{1,10}$/.test(i);
11012
11017
  }
@@ -11016,7 +11021,7 @@ function Sa(i) {
11016
11021
  function Da(i) {
11017
11022
  return /^[0-9A-Fa-f]{1,10}$/.test(i);
11018
11023
  }
11019
- function Zt(i) {
11024
+ function zt(i) {
11020
11025
  if (i === 0)
11021
11026
  return 0;
11022
11027
  const a = [
@@ -11060,7 +11065,7 @@ function Zt(i) {
11060
11065
  return t ? c - 1 : 1 - c;
11061
11066
  }
11062
11067
  function La(i) {
11063
- return 1 - Zt(i);
11068
+ return 1 - zt(i);
11064
11069
  }
11065
11070
  function Xh(i) {
11066
11071
  if (i >= 2)
@@ -11075,7 +11080,7 @@ function Xh(i) {
11075
11080
  }
11076
11081
  return i < 1 ? t : -t;
11077
11082
  }
11078
- function fr(i, a = 1) {
11083
+ function hr(i, a = 1) {
11079
11084
  let e = Math.floor(i);
11080
11085
  if (i < 0)
11081
11086
  return Number.NaN;
@@ -11084,7 +11089,7 @@ function fr(i, a = 1) {
11084
11089
  t *= e, e -= a;
11085
11090
  return t;
11086
11091
  }
11087
- function zt(i, a) {
11092
+ function Jt(i, a) {
11088
11093
  const e = Math.min(i - a, a);
11089
11094
  let t = 1;
11090
11095
  for (let r = 1; r <= e && Number.isFinite(t); r++)
@@ -11133,12 +11138,12 @@ function Jh(i) {
11133
11138
  }
11134
11139
  return e;
11135
11140
  }
11136
- function hr(i, a) {
11141
+ function mr(i, a) {
11137
11142
  return i.map((e) => a[0].map(
11138
11143
  (t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
11139
11144
  ));
11140
11145
  }
11141
- function mt(i) {
11146
+ function gt(i) {
11142
11147
  return i[0].map((a, e) => i.map((t) => t[e]));
11143
11148
  }
11144
11149
  function em(i) {
@@ -11146,7 +11151,7 @@ function em(i) {
11146
11151
  return a ? null : tm(e, t);
11147
11152
  }
11148
11153
  function ko(i) {
11149
- const a = mt(i), e = a.length, t = a[0].length;
11154
+ const a = gt(i), e = a.length, t = a[0].length;
11150
11155
  let r = !0, n = !1;
11151
11156
  const s = ra(e, t, 0), o = new Array(t).fill(0).map((u, c) => c);
11152
11157
  for (let u = 0; u < t; u++) {
@@ -11224,13 +11229,13 @@ function rm(i) {
11224
11229
  const a = nm(i);
11225
11230
  if (!a)
11226
11231
  return null;
11227
- const { matrixU: e, matrixS: t, matrixV: r } = a, n = mt(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
+ const { matrixU: e, matrixS: t, matrixV: r } = a, n = gt(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];
11228
11233
  for (let u = 0; u < t.length; u++)
11229
11234
  Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
11230
- return hr(r, hr(s, n));
11235
+ return mr(r, mr(s, n));
11231
11236
  }
11232
11237
  function nm(i) {
11233
- const a = mt(i), e = a.length, t = a[0].length;
11238
+ const a = gt(i), e = a.length, t = a[0].length;
11234
11239
  if (e < t)
11235
11240
  return null;
11236
11241
  const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
@@ -11496,7 +11501,7 @@ function Yo(i, a, e) {
11496
11501
  return t;
11497
11502
  }
11498
11503
  function va(i, a, e) {
11499
- return e === 0 || e === 1 ? a * e === i ? 1 : 0 : zt(a, i) * e ** i * (1 - e) ** (a - i);
11504
+ return e === 0 || e === 1 ? a * e === i ? 1 : 0 : Jt(a, i) * e ** i * (1 - e) ** (a - i);
11500
11505
  }
11501
11506
  function Ta(i, a) {
11502
11507
  return i <= 0 ? 0 : Ia(a / 2, i / 2);
@@ -11667,10 +11672,10 @@ function gm(i, a, e, t) {
11667
11672
  return r;
11668
11673
  }
11669
11674
  function Fa(i, a, e, t) {
11670
- return a - i > t - e ? 0 : zt(e, i) * zt(t - e, a - i) / zt(t, a);
11675
+ return a - i > t - e ? 0 : Jt(e, i) * Jt(t - e, a - i) / Jt(t, a);
11671
11676
  }
11672
11677
  function qo(i, a, e) {
11673
- return i < 0 ? 0 : 0.5 + 0.5 * Zt((Math.log(i) - a) / Math.sqrt(2 * e * e));
11678
+ return i < 0 ? 0 : 0.5 + 0.5 * zt((Math.log(i) - a) / Math.sqrt(2 * e * e));
11674
11679
  }
11675
11680
  function dm(i, a, e) {
11676
11681
  return i <= 0 ? 0 : Math.exp(-Math.log(i) - 0.5 * Math.log(2 * Math.PI) - Math.log(e) - (Math.log(i) - a) ** 2 / (2 * e * e));
@@ -11687,10 +11692,10 @@ function _m(i, a, e) {
11687
11692
  return t;
11688
11693
  }
11689
11694
  function ka(i, a, e) {
11690
- return i < 0 ? 0 : zt(i + a - 1, a - 1) * e ** a * (1 - e) ** i;
11695
+ return i < 0 ? 0 : Jt(i + a - 1, a - 1) * e ** a * (1 - e) ** i;
11691
11696
  }
11692
11697
  function Hr(i, a, e) {
11693
- return 0.5 * (1 + Zt((i - a) / Math.sqrt(2 * e * e)));
11698
+ return 0.5 * (1 + zt((i - a) / Math.sqrt(2 * e * e)));
11694
11699
  }
11695
11700
  function Ko(i, a, e) {
11696
11701
  return Math.exp(-0.5 * Math.log(2 * Math.PI) - Math.log(e) - (i - a) ** 2 / (2 * e * e));
@@ -11705,7 +11710,7 @@ function Am(i, a) {
11705
11710
  return e;
11706
11711
  }
11707
11712
  function Xo(i, a) {
11708
- return Math.exp(-a) * a ** i / fr(i);
11713
+ return Math.exp(-a) * a ** i / hr(i);
11709
11714
  }
11710
11715
  function Gr(i, a) {
11711
11716
  const e = 0.5 * ts(a / (i ** 2 + a), a / 2, 0.5);
@@ -11743,7 +11748,7 @@ function rt(i, a, e, t, r) {
11743
11748
  if (d.isNull() || _.isNull() || d.isBoolean() || _.isBoolean())
11744
11749
  continue;
11745
11750
  const C = d.getValue(), E = _.getValue();
11746
- !Q(C) || !Q(E) || (n.push(+C), s.push(+E), o = !1);
11751
+ !W(C) || !W(E) || (n.push(+C), s.push(+E), o = !1);
11747
11752
  }
11748
11753
  return {
11749
11754
  isError: !1,
@@ -11774,7 +11779,7 @@ function ss(i, a, e) {
11774
11779
  errorObject: null
11775
11780
  };
11776
11781
  }
11777
- function Ct(i) {
11782
+ function _t(i) {
11778
11783
  const a = i.isArray() ? i.getRowCount() : 1, e = i.isArray() ? i.getColumnCount() : 1, t = [];
11779
11784
  for (let r = 0; r < a; r++) {
11780
11785
  t[r] = [];
@@ -11864,13 +11869,13 @@ function os(i, a, e, t, r) {
11864
11869
  let s = i;
11865
11870
  r && (s = i.map((C) => C.map((E) => Math.log(E))));
11866
11871
  let o = a, u = e;
11867
- n && (s = mt(s), o = mt(o), u = mt(u)), t && (o = o.map((C) => [...C, 1]));
11868
- const c = mt(o), l = hr(c, o), f = hr(c, s);
11872
+ n && (s = gt(s), o = gt(o), u = gt(u)), t && (o = o.map((C) => [...C, 1]));
11873
+ const c = gt(o), l = mr(c, o), f = mr(c, s);
11869
11874
  let h = em(l);
11870
11875
  if (!h && (h = rm(l), !h))
11871
11876
  return g.create(m.NA);
11872
- let d = hr(h, f);
11873
- t || d.push([0]), d = mt(d);
11877
+ let d = mr(h, f);
11878
+ t || d.push([0]), d = gt(d);
11874
11879
  const _ = d[0].pop();
11875
11880
  if (d[0].reverse(), d[0].push(_), r)
11876
11881
  for (let C = 0; C < d[0].length; C++)
@@ -12349,7 +12354,7 @@ class uu extends V {
12349
12354
  if (d.isNull() || d.isBoolean())
12350
12355
  continue;
12351
12356
  const _ = d.getValue();
12352
- Q(_) && (o.push(+_), u += +_);
12357
+ W(_) && (o.push(+_), u += +_);
12353
12358
  }
12354
12359
  if (o.length <= 1)
12355
12360
  return {
@@ -12500,7 +12505,7 @@ class hu extends V {
12500
12505
  if (h.isNull() || h.isBoolean() || h.isString())
12501
12506
  continue;
12502
12507
  const d = h.getValue();
12503
- Q(d) && (t[+d] ? (t[+d].count++, t[+d].count > n && (n = t[+d].count)) : t[+d] = { count: 1, order: r++ });
12508
+ W(d) && (t[+d] ? (t[+d].count++, t[+d].count > n && (n = t[+d].count)) : t[+d] = { count: 1, order: r++ });
12504
12509
  }
12505
12510
  }
12506
12511
  return r === 0 || n === 1 ? new g(m.NA) : this._getResult(t, n);
@@ -12639,7 +12644,7 @@ class Cu extends V {
12639
12644
  if (u.isNull() || u.isBoolean() || u.isString())
12640
12645
  continue;
12641
12646
  const c = u.getValue();
12642
- Q(c) && n.push(+c);
12647
+ W(c) && n.push(+c);
12643
12648
  }
12644
12649
  return n.length === 0 ? g.create(m.NUM) : n.sort((s, o) => s - o);
12645
12650
  }
@@ -12692,7 +12697,7 @@ class _u extends V {
12692
12697
  if (u.isNull() || u.isBoolean())
12693
12698
  continue;
12694
12699
  const c = u.getValue();
12695
- Q(c) && n.push(+c);
12700
+ W(c) && n.push(+c);
12696
12701
  }
12697
12702
  return n.sort((s, o) => s - o);
12698
12703
  }
@@ -12768,7 +12773,7 @@ class Eu extends V {
12768
12773
  if (u.isNull() || u.isBoolean())
12769
12774
  continue;
12770
12775
  const c = u.getValue();
12771
- Q(c) && n.push(+c);
12776
+ W(c) && n.push(+c);
12772
12777
  }
12773
12778
  return n.length === 0 ? g.create(m.NUM) : n.sort((s, o) => s - o);
12774
12779
  }
@@ -13134,7 +13139,7 @@ class Mu extends V {
13134
13139
  if (u.isNull() || u.isBoolean() || u.isString())
13135
13140
  continue;
13136
13141
  const c = u.getValue();
13137
- Q(c) && t.push(+c);
13142
+ W(c) && t.push(+c);
13138
13143
  }
13139
13144
  return t;
13140
13145
  }
@@ -13473,7 +13478,7 @@ function nt(i) {
13473
13478
  continue;
13474
13479
  }
13475
13480
  let u = `${o.getValue()}`;
13476
- if (o.isBoolean() && (u = u.toLocaleUpperCase()), o.isNumber() || Q(u)) {
13481
+ if (o.isBoolean() && (u = u.toLocaleUpperCase()), o.isNumber() || W(u)) {
13477
13482
  n.push(+u);
13478
13483
  continue;
13479
13484
  }
@@ -13504,7 +13509,7 @@ function st(i, a) {
13504
13509
  };
13505
13510
  const n = i.isArray() ? i.get(0, 0) : i;
13506
13511
  let s = `${n.getValue()}`;
13507
- if (n.isNull() ? s = 0 : n.isBoolean() ? s = n.getValue() ? 1 : 0 : (n.isNumber() || Q(s)) && (s = Math.floor(+s)), typeof s == "number") {
13512
+ if (n.isNull() ? s = 0 : n.isBoolean() ? s = n.getValue() ? 1 : 0 : (n.isNumber() || W(s)) && (s = Math.floor(+s)), typeof s == "number") {
13508
13513
  if (s < 1 || s > a[0].length)
13509
13514
  return {
13510
13515
  isError: !0,
@@ -13552,7 +13557,7 @@ function at(i) {
13552
13557
  n.push(o.getValue() ? 1 : 0);
13553
13558
  continue;
13554
13559
  }
13555
- if (o.isNumber() || Q(u)) {
13560
+ if (o.isNumber() || W(u)) {
13556
13561
  n.push(+u);
13557
13562
  continue;
13558
13563
  }
@@ -13590,7 +13595,7 @@ function it(i, a, e) {
13590
13595
  break;
13591
13596
  }
13592
13597
  const [d, _] = Va(`${l}`);
13593
- if (!Vt.create(`${h}`).compare(_, d).getValue()) {
13598
+ if (!Nt.create(`${h}`).compare(_, d).getValue()) {
13594
13599
  u = !1;
13595
13600
  break;
13596
13601
  }
@@ -13966,16 +13971,16 @@ function Ha(i) {
13966
13971
  return i.replace(/\//g, "-").split("-").map((c) => c.padStart(2, "0")).join("-") === o;
13967
13972
  }
13968
13973
  function xn(i) {
13969
- return dt.parseDate(i);
13974
+ return Ct.parseDate(i);
13970
13975
  }
13971
13976
  function qm(i) {
13972
- return dt.parseValue(i);
13977
+ return Ct.parseValue(i);
13973
13978
  }
13974
13979
  function jn(i) {
13975
- return dt.parseTime(i);
13980
+ return Ct.parseTime(i);
13976
13981
  }
13977
13982
  function Ga(i) {
13978
- return dt.getFormatInfo(i).isDate;
13983
+ return Ct.getFormatInfo(i).isDate;
13979
13984
  }
13980
13985
  const wu = {
13981
13986
  1: [6, 0],
@@ -14029,7 +14034,7 @@ function Un(i, a, e = 1, t) {
14029
14034
  const f = o + l;
14030
14035
  if (t && t.length > 0 && t.some((d) => Math.floor(d) === f))
14031
14036
  continue;
14032
- const h = tr(f);
14037
+ const h = rr(f);
14033
14038
  r.includes(h) || u++;
14034
14039
  }
14035
14040
  return s >= n ? u : -u;
@@ -14045,7 +14050,7 @@ function vn(i, a, e = 1, t) {
14045
14050
  o++;
14046
14051
  continue;
14047
14052
  }
14048
- const l = tr(c);
14053
+ const l = rr(c);
14049
14054
  if (r.includes(l)) {
14050
14055
  o++;
14051
14056
  continue;
@@ -14064,7 +14069,7 @@ function $(i) {
14064
14069
  e = xn(`${a}`).v;
14065
14070
  else if (jn(`${a}`))
14066
14071
  e = jn(`${a}`).v;
14067
- else if (Q(a))
14072
+ else if (W(a))
14068
14073
  e = +a;
14069
14074
  else
14070
14075
  return g.create(m.VALUE);
@@ -14074,7 +14079,7 @@ function $(i) {
14074
14079
  return e < 0 || e > 2958465 ? g.create(m.NUM) : e;
14075
14080
  }
14076
14081
  }
14077
- function tr(i) {
14082
+ function rr(i) {
14078
14083
  const a = Math.floor(i) === 60;
14079
14084
  let e = re(i);
14080
14085
  const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())).getTime(), r = new Date(Date.UTC(1900, 1, 28)).getTime();
@@ -14169,13 +14174,13 @@ function Du(i, a) {
14169
14174
  return -1;
14170
14175
  }
14171
14176
  }
14172
- function br(i, a, e) {
14177
+ function yr(i, a, e) {
14173
14178
  return Wr(i, a) === e;
14174
14179
  }
14175
- function yr(i, a) {
14180
+ function Rr(i, a) {
14176
14181
  let e = i.getUTCFullYear(), t = i.getUTCMonth();
14177
14182
  const r = i.getUTCDate();
14178
- return br(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
+ return yr(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;
14179
14184
  }
14180
14185
  class rg extends V {
14181
14186
  constructor() {
@@ -14273,10 +14278,15 @@ class sg extends V {
14273
14278
  A(this, "minParams", 1);
14274
14279
  A(this, "maxParams", 1);
14275
14280
  }
14281
+ isArgumentsIgnoreNumberPattern() {
14282
+ return !0;
14283
+ }
14276
14284
  calculate(e) {
14277
- return e.isError() ? e : e.isArray() ? e.map((t) => this._handleSingleObject(t)) : this._handleSingleObject(e);
14285
+ return e.isArray() ? e.mapValue((t) => this._handleSingleObject(t)) : this._handleSingleObject(e);
14278
14286
  }
14279
14287
  _handleSingleObject(e) {
14288
+ if (e.isError())
14289
+ return e;
14280
14290
  if (e.isString()) {
14281
14291
  const t = `${e.getValue()}`;
14282
14292
  let r = xn(t);
@@ -14569,8 +14579,8 @@ class hg extends V {
14569
14579
  if (typeof t != "number")
14570
14580
  return t;
14571
14581
  const r = re(t), n = t > 0 ? r.getUTCFullYear() : 1900;
14572
- let s = new Date(Date.UTC(n, 0, 1)), o = Re(s), u = tr(o), c;
14573
- u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u), t < c && (s = new Date(Date.UTC(n - 1, 0, 1)), o = Re(s), u = tr(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
14582
+ let s = new Date(Date.UTC(n, 0, 1)), o = Re(s), u = rr(o), c;
14583
+ u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u), t < c && (s = new Date(Date.UTC(n - 1, 0, 1)), o = Re(s), u = rr(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
14574
14584
  const l = Math.ceil((t - c + 1) / 7);
14575
14585
  return y.create(l);
14576
14586
  }
@@ -14838,10 +14848,15 @@ class bg extends V {
14838
14848
  A(this, "minParams", 1);
14839
14849
  A(this, "maxParams", 1);
14840
14850
  }
14851
+ isArgumentsIgnoreNumberPattern() {
14852
+ return !0;
14853
+ }
14841
14854
  calculate(e) {
14842
- return e.isError() ? e : e.isArray() ? e.map((t) => this._handleSingleObject(t)) : this._handleSingleObject(e);
14855
+ return e.isArray() ? e.mapValue((t) => this._handleSingleObject(t)) : this._handleSingleObject(e);
14843
14856
  }
14844
14857
  _handleSingleObject(e) {
14858
+ if (e.isError())
14859
+ return e;
14845
14860
  if (e.isString()) {
14846
14861
  const t = `${e.getValue()}`, r = qm(t);
14847
14862
  if (r) {
@@ -14946,7 +14961,7 @@ class pg extends V {
14946
14961
  const s = Math.floor(+r.getValue());
14947
14962
  if (!this._returnTypeMap[s])
14948
14963
  return g.create(m.NUM);
14949
- const o = tr(n), u = this._returnTypeMap[s][o];
14964
+ const o = rr(n), u = this._returnTypeMap[s][o];
14950
14965
  return y.create(u);
14951
14966
  }
14952
14967
  }
@@ -14998,9 +15013,9 @@ class Vg extends V {
14998
15013
  }
14999
15014
  _getResult(e, t) {
15000
15015
  const r = re(e), n = e > 0 ? r.getUTCFullYear() : 1900;
15001
- let s = new Date(Date.UTC(n, 0, 1)), o = Re(s), u = tr(o), c;
15016
+ let s = new Date(Date.UTC(n, 0, 1)), o = Re(s), u = rr(o), c;
15002
15017
  if (t === 21)
15003
- u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u), e < c && (s = new Date(Date.UTC(n - 1, 0, 1)), o = Re(s), u = tr(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
15018
+ u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u), e < c && (s = new Date(Date.UTC(n - 1, 0, 1)), o = Re(s), u = rr(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
15004
15019
  else {
15005
15020
  const f = this._returnTypeMap[t];
15006
15021
  u < f ? c = o - (u + 7 - f) : c = o - (u - f);
@@ -15182,13 +15197,13 @@ class wg extends V {
15182
15197
  }
15183
15198
  calculate(e, t, r) {
15184
15199
  let n = r != null ? r : y.create(0);
15185
- const s = Xt(e);
15200
+ const s = Zt(e);
15186
15201
  if (s.isError())
15187
15202
  return s;
15188
- const o = Xt(t);
15203
+ const o = Zt(t);
15189
15204
  if (o.isError())
15190
15205
  return o;
15191
- if (n = Xt(n), n.isError())
15206
+ if (n = Zt(n), n.isError())
15192
15207
  return n;
15193
15208
  if (s.isBoolean() || o.isBoolean() || n.isBoolean())
15194
15209
  return g.create(m.VALUE);
@@ -15253,7 +15268,7 @@ class Dg extends V {
15253
15268
  return g.create(m.VALUE);
15254
15269
  if (l < 0)
15255
15270
  return g.create(m.NUM);
15256
- const f = Er.besseli(c, l);
15271
+ const f = br.besseli(c, l);
15257
15272
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
15258
15273
  }
15259
15274
  }
@@ -15274,7 +15289,7 @@ class Lg extends V {
15274
15289
  return g.create(m.VALUE);
15275
15290
  if (l < 0)
15276
15291
  return g.create(m.NUM);
15277
- const f = Er.besselj(c, l);
15292
+ const f = br.besselj(c, l);
15278
15293
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
15279
15294
  }
15280
15295
  }
@@ -15295,7 +15310,7 @@ class Pg extends V {
15295
15310
  return g.create(m.VALUE);
15296
15311
  if (l < 0)
15297
15312
  return g.create(m.NUM);
15298
- const f = Er.besselk(c, l);
15313
+ const f = br.besselk(c, l);
15299
15314
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
15300
15315
  }
15301
15316
  }
@@ -15316,7 +15331,7 @@ class xg extends V {
15316
15331
  return g.create(m.VALUE);
15317
15332
  if (l < 0)
15318
15333
  return g.create(m.NUM);
15319
- const f = Er.bessely(c, l);
15334
+ const f = br.bessely(c, l);
15320
15335
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
15321
15336
  }
15322
15337
  }
@@ -16371,7 +16386,7 @@ class qg extends V {
16371
16386
  const [u, c] = o, l = +u.getValue(), f = +c.getValue();
16372
16387
  if (Number.isNaN(l) || Number.isNaN(f))
16373
16388
  return g.create(m.VALUE);
16374
- r = Zt(f) - Zt(l);
16389
+ r = zt(f) - zt(l);
16375
16390
  } else {
16376
16391
  const { isError: n, errorObject: s, variants: o } = H(e);
16377
16392
  if (n)
@@ -16379,7 +16394,7 @@ class qg extends V {
16379
16394
  const [u] = o, c = +u.getValue();
16380
16395
  if (Number.isNaN(c))
16381
16396
  return g.create(m.VALUE);
16382
- r = Zt(c);
16397
+ r = zt(c);
16383
16398
  }
16384
16399
  return y.create(r);
16385
16400
  }
@@ -16397,7 +16412,7 @@ class Kg extends V {
16397
16412
  const [s] = n, o = +s.getValue();
16398
16413
  if (Number.isNaN(o))
16399
16414
  return g.create(m.VALUE);
16400
- const u = Zt(o);
16415
+ const u = zt(o);
16401
16416
  return y.create(u);
16402
16417
  }
16403
16418
  }
@@ -16620,7 +16635,7 @@ class a1 extends V {
16620
16635
  if (u.isError())
16621
16636
  return g.create(m.NUM);
16622
16637
  const c = u.Conjugate();
16623
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16638
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16624
16639
  }
16625
16640
  }
16626
16641
  class i1 extends V {
@@ -16637,7 +16652,7 @@ class i1 extends V {
16637
16652
  if (u.isError())
16638
16653
  return g.create(m.NUM);
16639
16654
  const c = u.Cos();
16640
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16655
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16641
16656
  }
16642
16657
  }
16643
16658
  class o1 extends V {
@@ -16654,7 +16669,7 @@ class o1 extends V {
16654
16669
  if (u.isError())
16655
16670
  return g.create(m.NUM);
16656
16671
  const c = u.Cosh();
16657
- return u.isError() ? g.create(m.NUM) : typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16672
+ return u.isError() ? g.create(m.NUM) : typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16658
16673
  }
16659
16674
  }
16660
16675
  class u1 extends V {
@@ -16671,7 +16686,7 @@ class u1 extends V {
16671
16686
  if (u.isError() || u.getRealNum() === 0 && u.getINum() === 0)
16672
16687
  return g.create(m.NUM);
16673
16688
  const c = u.Cot();
16674
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16689
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16675
16690
  }
16676
16691
  }
16677
16692
  class c1 extends V {
@@ -16688,7 +16703,7 @@ class c1 extends V {
16688
16703
  if (u.isError() || u.getRealNum() === 0 && u.getINum() === 0)
16689
16704
  return g.create(m.NUM);
16690
16705
  const c = u.Coth();
16691
- return u.isError() ? g.create(m.NUM) : typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16706
+ return u.isError() ? g.create(m.NUM) : typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16692
16707
  }
16693
16708
  }
16694
16709
  class l1 extends V {
@@ -16705,7 +16720,7 @@ class l1 extends V {
16705
16720
  if (u.isError() || u.getRealNum() === 0 && u.getINum() === 0)
16706
16721
  return g.create(m.NUM);
16707
16722
  const c = u.Csc();
16708
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16723
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16709
16724
  }
16710
16725
  }
16711
16726
  class f1 extends V {
@@ -16722,7 +16737,7 @@ class f1 extends V {
16722
16737
  if (u.isError() || u.getRealNum() === 0 && u.getINum() === 0)
16723
16738
  return g.create(m.NUM);
16724
16739
  const c = u.Csch();
16725
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16740
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16726
16741
  }
16727
16742
  }
16728
16743
  class h1 extends V {
@@ -16741,7 +16756,7 @@ class h1 extends V {
16741
16756
  if (f.isError() || h.isError() || f.isDifferentSuffixes(h) || h.getRealNum() === 0 && h.getINum() === 0)
16742
16757
  return g.create(m.NUM);
16743
16758
  const d = f.Div(h);
16744
- return typeof d == "number" || Q(d) ? y.create(+d) : j.create(d);
16759
+ return typeof d == "number" || W(d) ? y.create(+d) : j.create(d);
16745
16760
  }
16746
16761
  }
16747
16762
  class m1 extends V {
@@ -16758,7 +16773,7 @@ class m1 extends V {
16758
16773
  if (u.isError())
16759
16774
  return g.create(m.NUM);
16760
16775
  const c = u.Exp();
16761
- return u.isError() ? g.create(m.NUM) : typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16776
+ return u.isError() ? g.create(m.NUM) : typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16762
16777
  }
16763
16778
  }
16764
16779
  class g1 extends V {
@@ -16775,7 +16790,7 @@ class g1 extends V {
16775
16790
  if (u.isError() || u.getRealNum() === 0 && u.getINum() === 0)
16776
16791
  return g.create(m.NUM);
16777
16792
  const c = u.Ln();
16778
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16793
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16779
16794
  }
16780
16795
  }
16781
16796
  class d1 extends V {
@@ -16803,7 +16818,7 @@ class d1 extends V {
16803
16818
  if (C.isError() || C.getRealNum() === 0 && C.getINum() === 0 || _ <= 0)
16804
16819
  return g.create(m.NUM);
16805
16820
  const E = C.Log(_);
16806
- return C.isError() ? g.create(m.NUM) : typeof E == "number" || Q(E) ? y.create(+E) : j.create(E);
16821
+ return C.isError() ? g.create(m.NUM) : typeof E == "number" || W(E) ? y.create(+E) : j.create(E);
16807
16822
  }
16808
16823
  }
16809
16824
  class C1 extends V {
@@ -16820,7 +16835,7 @@ class C1 extends V {
16820
16835
  if (u.isError() || u.getRealNum() === 0 && u.getINum() === 0)
16821
16836
  return g.create(m.NUM);
16822
16837
  const c = u.Log(2);
16823
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16838
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16824
16839
  }
16825
16840
  }
16826
16841
  class _1 extends V {
@@ -16837,7 +16852,7 @@ class _1 extends V {
16837
16852
  if (u.isError() || u.getRealNum() === 0 && u.getINum() === 0)
16838
16853
  return g.create(m.NUM);
16839
16854
  const c = u.Log(10);
16840
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16855
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16841
16856
  }
16842
16857
  }
16843
16858
  class A1 extends V {
@@ -16859,7 +16874,7 @@ class A1 extends V {
16859
16874
  if (Number.isNaN(f))
16860
16875
  return g.create(m.VALUE);
16861
16876
  const h = l.Power(f);
16862
- return l.isError() ? g.create(m.NUM) : typeof h == "number" || Q(h) ? y.create(+h) : j.create(h);
16877
+ return l.isError() ? g.create(m.NUM) : typeof h == "number" || W(h) ? y.create(+h) : j.create(h);
16863
16878
  }
16864
16879
  }
16865
16880
  class E1 extends V {
@@ -16884,7 +16899,7 @@ class E1 extends V {
16884
16899
  } else
16885
16900
  t = this._handleSingleObject(n, t);
16886
16901
  }
16887
- return t instanceof g ? t : typeof t == "number" || Q(t) ? y.create(+t) : j.create(t);
16902
+ return t instanceof g ? t : typeof t == "number" || W(t) ? y.create(+t) : j.create(t);
16888
16903
  }
16889
16904
  _handleSingleObject(e, t) {
16890
16905
  let r = t;
@@ -16940,7 +16955,7 @@ class y1 extends V {
16940
16955
  if (u.isError())
16941
16956
  return g.create(m.NUM);
16942
16957
  const c = u.Sec();
16943
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16958
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16944
16959
  }
16945
16960
  }
16946
16961
  class R1 extends V {
@@ -16957,7 +16972,7 @@ class R1 extends V {
16957
16972
  if (u.isError())
16958
16973
  return g.create(m.NUM);
16959
16974
  const c = u.Sech();
16960
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16975
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16961
16976
  }
16962
16977
  }
16963
16978
  class p1 extends V {
@@ -16974,7 +16989,7 @@ class p1 extends V {
16974
16989
  if (u.isError())
16975
16990
  return g.create(m.NUM);
16976
16991
  const c = u.Sin();
16977
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
16992
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16978
16993
  }
16979
16994
  }
16980
16995
  class V1 extends V {
@@ -16991,7 +17006,7 @@ class V1 extends V {
16991
17006
  if (u.isError())
16992
17007
  return g.create(m.NUM);
16993
17008
  const c = u.Sinh();
16994
- return u.isError() ? g.create(m.NUM) : typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
17009
+ return u.isError() ? g.create(m.NUM) : typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
16995
17010
  }
16996
17011
  }
16997
17012
  class N1 extends V {
@@ -17010,7 +17025,7 @@ class N1 extends V {
17010
17025
  if (u.getRealNum() === 0 && u.getINum() === 0)
17011
17026
  return y.create(0);
17012
17027
  const c = u.Sqrt();
17013
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
17028
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
17014
17029
  }
17015
17030
  }
17016
17031
  class O1 extends V {
@@ -17029,7 +17044,7 @@ class O1 extends V {
17029
17044
  if (f.isError() || h.isError() || f.isDifferentSuffixes(h))
17030
17045
  return g.create(m.NUM);
17031
17046
  const d = f.Sub(h);
17032
- return typeof d == "number" || Q(d) ? y.create(+d) : j.create(d);
17047
+ return typeof d == "number" || W(d) ? y.create(+d) : j.create(d);
17033
17048
  }
17034
17049
  }
17035
17050
  class M1 extends V {
@@ -17054,7 +17069,7 @@ class M1 extends V {
17054
17069
  } else
17055
17070
  t = this._handleSingleObject(n, t);
17056
17071
  }
17057
- return t instanceof g ? t : typeof t == "number" || Q(t) ? y.create(+t) : j.create(t);
17072
+ return t instanceof g ? t : typeof t == "number" || W(t) ? y.create(+t) : j.create(t);
17058
17073
  }
17059
17074
  _handleSingleObject(e, t) {
17060
17075
  let r = t;
@@ -17093,7 +17108,7 @@ class w1 extends V {
17093
17108
  if (u.isError())
17094
17109
  return g.create(m.NUM);
17095
17110
  const c = u.Tan();
17096
- return typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
17111
+ return typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
17097
17112
  }
17098
17113
  }
17099
17114
  class S1 extends V {
@@ -17110,7 +17125,7 @@ class S1 extends V {
17110
17125
  if (u.isError())
17111
17126
  return g.create(m.NUM);
17112
17127
  const c = u.Tanh();
17113
- return u.isError() ? g.create(m.NUM) : typeof c == "number" || Q(c) ? y.create(+c) : j.create(c);
17128
+ return u.isError() ? g.create(m.NUM) : typeof c == "number" || W(c) ? y.create(+c) : j.create(c);
17114
17129
  }
17115
17130
  }
17116
17131
  class D1 extends V {
@@ -17270,15 +17285,15 @@ const x1 = [
17270
17285
  ];
17271
17286
  var ee = /* @__PURE__ */ ((i) => (i.ACCRINT = "ACCRINT", i.ACCRINTM = "ACCRINTM", i.AMORDEGRC = "AMORDEGRC", i.AMORLINC = "AMORLINC", i.COUPDAYBS = "COUPDAYBS", i.COUPDAYS = "COUPDAYS", i.COUPDAYSNC = "COUPDAYSNC", i.COUPNCD = "COUPNCD", i.COUPNUM = "COUPNUM", i.COUPPCD = "COUPPCD", i.CUMIPMT = "CUMIPMT", i.CUMPRINC = "CUMPRINC", i.DB = "DB", i.DDB = "DDB", i.DISC = "DISC", i.DOLLARDE = "DOLLARDE", i.DOLLARFR = "DOLLARFR", i.DURATION = "DURATION", i.EFFECT = "EFFECT", i.FV = "FV", i.FVSCHEDULE = "FVSCHEDULE", i.INTRATE = "INTRATE", i.IPMT = "IPMT", i.IRR = "IRR", i.ISPMT = "ISPMT", i.MDURATION = "MDURATION", i.MIRR = "MIRR", i.NOMINAL = "NOMINAL", i.NPER = "NPER", i.NPV = "NPV", i.ODDFPRICE = "ODDFPRICE", i.ODDFYIELD = "ODDFYIELD", i.ODDLPRICE = "ODDLPRICE", i.ODDLYIELD = "ODDLYIELD", i.PDURATION = "PDURATION", i.PMT = "PMT", i.PPMT = "PPMT", i.PRICE = "PRICE", i.PRICEDISC = "PRICEDISC", i.PRICEMAT = "PRICEMAT", i.PV = "PV", i.RATE = "RATE", i.RECEIVED = "RECEIVED", i.RRI = "RRI", i.SLN = "SLN", i.SYD = "SYD", i.TBILLEQ = "TBILLEQ", i.TBILLPRICE = "TBILLPRICE", i.TBILLYIELD = "TBILLYIELD", i.VDB = "VDB", i.XIRR = "XIRR", i.XNPV = "XNPV", i.YIELD = "YIELD", i.YIELDDISC = "YIELDDISC", i.YIELDMAT = "YIELDMAT", i))(ee || {});
17272
17287
  function cs(i, a, e, t) {
17273
- const r = Ft(i, a, e), { days: n } = _e(r, i, t);
17288
+ const r = kt(i, a, e), { days: n } = _e(r, i, t);
17274
17289
  return n;
17275
17290
  }
17276
17291
  function Xe(i, a, e, t) {
17277
17292
  let r;
17278
17293
  if (t === 1) {
17279
- const n = Ft(i, a, e);
17294
+ const n = kt(i, a, e);
17280
17295
  let s = re(n);
17281
- s = yr(s, 12 / e);
17296
+ s = Rr(s, 12 / e);
17282
17297
  const o = Re(s);
17283
17298
  n < 0 && e === 1 ? r = 365 : r = o - n;
17284
17299
  } else t === 3 ? r = 365 / e : r = 360 / e;
@@ -17288,26 +17303,26 @@ function Lu(i, a, e) {
17288
17303
  const t = re(i);
17289
17304
  let r = re(a);
17290
17305
  for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
17291
- r = yr(r, -12 / e);
17292
- return r = yr(r, 12 / e), Re(r);
17306
+ r = Rr(r, -12 / e);
17307
+ return r = Rr(r, 12 / e), Re(r);
17293
17308
  }
17294
- function rr(i, a, e) {
17309
+ function nr(i, a, e) {
17295
17310
  let t = 0;
17296
17311
  const r = re(i);
17297
17312
  let n = re(a);
17298
17313
  for (; n > r; )
17299
- n = yr(n, -12 / e), t++;
17314
+ n = Rr(n, -12 / e), t++;
17300
17315
  return t;
17301
17316
  }
17302
- function Ft(i, a, e) {
17317
+ function kt(i, a, e) {
17303
17318
  const t = re(i);
17304
17319
  let r = re(a);
17305
17320
  for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
17306
- r = yr(r, -12 / e);
17321
+ r = Rr(r, -12 / e);
17307
17322
  return Re(r);
17308
17323
  }
17309
17324
  function Pu(i, a, e, t, r, n) {
17310
- const s = cs(i, a, r, n), o = Xe(i, a, r, n), u = rr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
17325
+ const s = cs(i, a, r, n), o = Xe(i, a, r, n), u = nr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
17311
17326
  let h = 0, d = 0;
17312
17327
  for (let E = 1; E <= u; E++) {
17313
17328
  const b = E + c, R = f / l ** b;
@@ -17326,7 +17341,7 @@ function qr(i, a, e, t, r) {
17326
17341
  }
17327
17342
  return -n;
17328
17343
  }
17329
- function nr(i, a, e, t, r) {
17344
+ function sr(i, a, e, t, r) {
17330
17345
  let n;
17331
17346
  if (i === 0)
17332
17347
  n = t + e * a;
@@ -17340,7 +17355,7 @@ function nr(i, a, e, t, r) {
17340
17355
  }
17341
17356
  function xu(i, a, e, t, r, n) {
17342
17357
  const s = qr(i, e, t, r, n);
17343
- return (a === 1 ? n === 1 ? 0 : -t : n === 1 ? nr(i, a - 2, s, t, 1) - s : nr(i, a - 1, s, t, 0)) * i;
17358
+ return (a === 1 ? n === 1 ? 0 : -t : n === 1 ? sr(i, a - 2, s, t, 1) - s : sr(i, a - 1, s, t, 0)) * i;
17344
17359
  }
17345
17360
  function ju(i, a) {
17346
17361
  let e = 0;
@@ -17349,7 +17364,7 @@ function ju(i, a) {
17349
17364
  return e;
17350
17365
  }
17351
17366
  function Uu(i, a, e, t, r, n, s, o, u) {
17352
- const c = Kt(e, t, u), l = Xe(i, t, o, u);
17367
+ const c = Xt(e, t, u), l = Xe(i, t, o, u);
17353
17368
  return c < l ? j1(
17354
17369
  i,
17355
17370
  a,
@@ -17377,31 +17392,31 @@ function Uu(i, a, e, t, r, n, s, o, u) {
17377
17392
  }
17378
17393
  function j1(i, a, e, t, r, n, s, o, u, c, l) {
17379
17394
  let f = 0;
17380
- const h = rr(i, a, o), d = Kt(i, t, u);
17395
+ const h = nr(i, a, o), d = Xt(i, t, u);
17381
17396
  f += s / (1 + n / o) ** (h - 1 + d / l), f += 100 * r / o * c / l / (1 + n / o) ** (d / l);
17382
17397
  for (let C = 2; C <= h; C++)
17383
17398
  f += 100 * r / o / (1 + n / o) ** (C - 1 + d / l);
17384
- const _ = Kt(e, i, u);
17399
+ const _ = Xt(e, i, u);
17385
17400
  return f -= 100 * r / o * _ / l, f;
17386
17401
  }
17387
17402
  function U1(i, a, e, t, r, n, s, o, u, c) {
17388
17403
  let l = 0;
17389
- const f = rr(t, a, o), h = v1(t, i, 12 / o);
17404
+ const f = nr(t, a, o), h = v1(t, i, 12 / o);
17390
17405
  let d;
17391
17406
  if (u === 2 || u === 3) {
17392
17407
  const R = Lu(i, t, o);
17393
- d = Kt(i, R, u);
17408
+ d = Xt(i, R, u);
17394
17409
  } else {
17395
- const R = Ft(i, t, o), { days: p } = _e(R, i, u);
17410
+ const R = kt(i, t, o), { days: p } = _e(R, i, u);
17396
17411
  d = c - p;
17397
17412
  }
17398
17413
  l += s / (1 + n / o) ** (f + h + d / c);
17399
- const _ = rr(e, t, o);
17414
+ const _ = nr(e, t, o);
17400
17415
  let C = t, E = 0, b = 0;
17401
17416
  for (let R = _; R >= 1; R--) {
17402
- const p = Jt(C, -12 / o, !1), N = u === 1 ? Kt(p, C, u) : c, M = R > 1 ? N : Kt(e, C, u);
17417
+ const p = er(C, -12 / o, !1), N = u === 1 ? Xt(p, C, u) : c, M = R > 1 ? N : Xt(e, C, u);
17403
17418
  E += M / N;
17404
- const w = e > p ? e : p, S = i < C ? i : C, D = Kt(w, S, u);
17419
+ const w = e > p ? e : p, S = i < C ? i : C, D = Xt(w, S, u);
17405
17420
  b += D / N, C = p;
17406
17421
  }
17407
17422
  l += 100 * r / o * E / (1 + n / o) ** (h + d / c);
@@ -17409,30 +17424,30 @@ function U1(i, a, e, t, r, n, s, o, u, c) {
17409
17424
  l += 100 * r / o / (1 + n / o) ** (R + h + d / c);
17410
17425
  return l -= 100 * r / o * b, l;
17411
17426
  }
17412
- function Kt(i, a, e) {
17427
+ function Xt(i, a, e) {
17413
17428
  const { days: t } = _e(i, a, e);
17414
17429
  return i < a ? t : 0;
17415
17430
  }
17416
17431
  function vu(i, a, e) {
17417
- const t = re(i), r = t.getUTCFullYear(), n = t.getUTCMonth(), s = t.getUTCDate(), o = br(r, n, s), u = re(a), c = u.getUTCFullYear(), l = u.getUTCMonth(), f = u.getUTCDate(), h = br(c, l, f);
17432
+ const t = re(i), r = t.getUTCFullYear(), n = t.getUTCMonth(), s = t.getUTCDate(), o = yr(r, n, s), u = re(a), c = u.getUTCFullYear(), l = u.getUTCMonth(), f = u.getUTCDate(), h = yr(c, l, f);
17418
17433
  return !(s !== f && !(o && h) || Math.abs((c - r) * 12 + (l - n)) % (12 / e) !== 0);
17419
17434
  }
17420
- function wr(i, a, e) {
17421
- return Ft(i, a, e) >= 0;
17435
+ function Sr(i, a, e) {
17436
+ return kt(i, a, e) >= 0;
17422
17437
  }
17423
- function Jt(i, a, e) {
17438
+ function er(i, a, e) {
17424
17439
  let t = re(i);
17425
- if (t = yr(t, a), e) {
17440
+ if (t = Rr(t, a), e) {
17426
17441
  const r = t.getUTCFullYear(), n = t.getUTCMonth(), s = Wr(r, n);
17427
17442
  t.setUTCDate(s);
17428
17443
  }
17429
17444
  return Re(t);
17430
17445
  }
17431
17446
  function v1(i, a, e, t) {
17432
- 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 = br(s, o, u), d = !h && o !== 1 && u > 28 && u < Wr(s, o) ? br(c, l, f) : h, _ = Jt(a, 0, d);
17433
- let C = 1 + +(a < _), E = Jt(_, e, d);
17447
+ 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 = yr(s, o, u), d = !h && o !== 1 && u > 28 && u < Wr(s, o) ? yr(c, l, f) : h, _ = er(a, 0, d);
17448
+ let C = 1 + +(a < _), E = er(_, e, d);
17434
17449
  for (; !(e > 0 ? E >= a : E <= a); )
17435
- E = Jt(E, e, d), C++;
17450
+ E = er(E, e, d), C++;
17436
17451
  return C;
17437
17452
  }
17438
17453
  function Qa(i, a) {
@@ -17472,7 +17487,7 @@ function T1(i, a) {
17472
17487
  return C;
17473
17488
  }
17474
17489
  function gn(i, a, e, t, r, n, s) {
17475
- const o = rr(i, a, n), u = Xe(i, a, n, s), c = cs(i, a, n, s);
17490
+ const o = nr(i, a, n), u = Xe(i, a, n, s), c = cs(i, a, n, s);
17476
17491
  if (o === 1) {
17477
17492
  const h = u - c, d = 100 * e / n + r, _ = t / n * h / u + 1, C = 100 * e / n * c / u;
17478
17493
  return d / _ - C;
@@ -17509,19 +17524,19 @@ class B1 extends V {
17509
17524
  const D = $(b);
17510
17525
  if (typeof D != "number")
17511
17526
  return D;
17512
- const L = +R.getValue(), U = +p.getValue(), x = Math.floor(+N.getValue()), F = Math.floor(+M.getValue()), W = +f.getValue();
17513
- return Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(W) ? g.create(m.VALUE) : L <= 0 || U <= 0 || ![1, 2, 4].includes(x) || F < 0 || F > 4 || Math.floor(w) >= Math.floor(D) ? g.create(m.NUM) : this._getResult(w, S, D, L, U, x, F, W);
17527
+ const L = +R.getValue(), U = +p.getValue(), x = Math.floor(+N.getValue()), F = Math.floor(+M.getValue()), Q = +f.getValue();
17528
+ return Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(Q) ? g.create(m.VALUE) : L <= 0 || U <= 0 || ![1, 2, 4].includes(x) || F < 0 || F > 4 || Math.floor(w) >= Math.floor(D) ? g.create(m.NUM) : this._getResult(w, S, D, L, U, x, F, Q);
17514
17529
  }
17515
17530
  _getResult(e, t, r, n, s, o, u, c) {
17516
- let l = Ft(e, t, o);
17531
+ let l = kt(e, t, o);
17517
17532
  if (l <= 0)
17518
17533
  return y.create(0);
17519
- l = Ft(r, t, o);
17520
- const f = 12 / o, h = re(t), d = h.getUTCFullYear(), _ = h.getUTCMonth(), C = h.getUTCDate(), E = br(d, _, C);
17521
- let b = Jt(t, -f, E);
17534
+ l = kt(r, t, o);
17535
+ const f = 12 / o, h = re(t), d = h.getUTCFullYear(), _ = h.getUTCMonth(), C = h.getUTCDate(), E = yr(d, _, C);
17536
+ let b = er(t, -f, E);
17522
17537
  if (r > t && c)
17523
17538
  for (b = t; b < r; )
17524
- b = Jt(b, f, E);
17539
+ b = er(b, f, E);
17525
17540
  let R = e > b ? e : b, { days: p } = _e(R, r, u);
17526
17541
  if (l >= e) {
17527
17542
  const { days: L } = _e(R, r, u ? 4 : 0);
@@ -17530,7 +17545,7 @@ class B1 extends V {
17530
17545
  r < R && (p = -p);
17531
17546
  let N = Xe(b, t, o, u), M = p / N, w = b, S = e;
17532
17547
  for (; w > e; ) {
17533
- S = w, w = Jt(w, -f, E), R = e > w ? e : w;
17548
+ S = w, w = er(w, -f, E), R = e > w ? e : w;
17534
17549
  const { days: L } = _e(R, S, u);
17535
17550
  if (u === 0)
17536
17551
  S >= R || e <= w ? p = L : p = -L, N = Xe(w, S, o, u);
@@ -17725,9 +17740,9 @@ class G1 extends V {
17725
17740
  const E = Math.floor(+h.getValue()), b = Math.floor(+d.getValue());
17726
17741
  if (Number.isNaN(E) || Number.isNaN(b))
17727
17742
  return g.create(m.VALUE);
17728
- if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C) || Ft(_, C, E) < 0)
17743
+ if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C) || kt(_, C, E) < 0)
17729
17744
  return g.create(m.NUM);
17730
- const p = rr(_, C, E);
17745
+ const p = nr(_, C, E);
17731
17746
  return y.create(p);
17732
17747
  }
17733
17748
  }
@@ -17752,7 +17767,7 @@ class Q1 extends V {
17752
17767
  return g.create(m.VALUE);
17753
17768
  if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C))
17754
17769
  return g.create(m.NUM);
17755
- let R = Ft(_, C, E);
17770
+ let R = kt(_, C, E);
17756
17771
  return R < 0 && (R = 0), y.create(R);
17757
17772
  }
17758
17773
  }
@@ -17775,7 +17790,7 @@ class W1 extends V {
17775
17790
  l === 1 && (o === 0 && (c = -r), l++);
17776
17791
  let f = !1;
17777
17792
  for (let h = l; h <= s; h++) {
17778
- const d = o === 1 ? nr(e, h - 2, u, r, 1) : nr(e, h - 1, u, r, 0);
17793
+ const d = o === 1 ? sr(e, h - 2, u, r, 1) : sr(e, h - 1, u, r, 0);
17779
17794
  if (d === 0) {
17780
17795
  f = !0;
17781
17796
  break;
@@ -17803,7 +17818,7 @@ class q1 extends V {
17803
17818
  let c = 0, l = Math.ceil(n);
17804
17819
  l === 1 && (c = o === 0 ? u + r * e : u, l++);
17805
17820
  for (let f = l; f <= s; f++)
17806
- c += o === 1 ? u - (nr(e, f - 2, u, r, 1) - u) * e : u - nr(e, f - 1, u, r, 0) * e;
17821
+ c += o === 1 ? u - (sr(e, f - 2, u, r, 1) - u) * e : u - sr(e, f - 1, u, r, 0) * e;
17807
17822
  return y.create(c);
17808
17823
  }
17809
17824
  }
@@ -17833,8 +17848,8 @@ class K1 extends V {
17833
17848
  const p = f.get(b, R), N = h.get(b, R), M = d.get(b, R), w = _.get(b, R), { isError: S, errorObject: D, variants: L } = B(E, p, N, M, w);
17834
17849
  if (S)
17835
17850
  return D;
17836
- const [U, x, F, W, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +F.getValue();
17837
- let de = +W.getValue();
17851
+ const [U, x, F, Q, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +F.getValue();
17852
+ let de = +Q.getValue();
17838
17853
  const Ee = Math.floor(+ne.getValue());
17839
17854
  return z < 0 || G < 0 || ge <= 0 || de <= 0 || Math.floor(de) > Math.floor(ge) || Ee < 1 || Ee > 12 ? g.create(m.NUM) : (de < 1 && (de = 1), de = Math.floor(de), this._getResult(z, G, ge, de, Ee, b, R));
17840
17855
  });
@@ -17876,7 +17891,7 @@ class X1 extends V {
17876
17891
  const p = f.get(b, R), N = h.get(b, R), M = d.get(b, R), w = _.get(b, R), { isError: S, errorObject: D, variants: L } = B(E, p, N, M, w);
17877
17892
  if (S)
17878
17893
  return D;
17879
- const [U, x, F, W, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +F.getValue(), de = +W.getValue(), Ee = +ne.getValue();
17894
+ const [U, x, F, Q, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
17880
17895
  if (z < 0 || G < 0 || ge <= 0 || de <= 0 || de > ge || Ee <= 0)
17881
17896
  return g.create(m.NUM);
17882
17897
  const pe = na(z, G, ge, de, Ee);
@@ -18030,7 +18045,7 @@ class r0 extends V {
18030
18045
  const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
18031
18046
  if (D)
18032
18047
  return L;
18033
- const [x, F, W, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +W.getValue(), Ee = +ne.getValue(), pe = +z.getValue(), me = nr(G, ge, de, Ee, pe ? 1 : 0);
18048
+ const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue(), me = sr(G, ge, de, Ee, pe ? 1 : 0);
18034
18049
  return Number.isNaN(me) || !Number.isFinite(me) ? g.create(m.NUM) : R === 0 && p === 0 ? y.create(me, ze(this.getLocale())) : y.create(me);
18035
18050
  });
18036
18051
  return c === 1 && l === 1 ? E.get(0, 0) : E;
@@ -18120,13 +18135,13 @@ class a0 extends V {
18120
18135
  u.isArray() ? u.getColumnCount() : 1,
18121
18136
  c.isArray() ? c.getColumnCount() : 1
18122
18137
  ), h = O(l, f, e, g.create(m.NA)), d = O(l, f, t, g.create(m.NA)), _ = O(l, f, r, g.create(m.NA)), C = O(l, f, n, g.create(m.NA)), E = O(l, f, u, g.create(m.NA)), b = O(l, f, c, g.create(m.NA)), R = h.map((p, N, M) => {
18123
- 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: W } = B(p, w, S, D, L, U);
18138
+ 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);
18124
18139
  if (x)
18125
18140
  return F;
18126
- const [ne, z, G, ge, de, Ee] = W, pe = +ne.getValue(), me = +z.getValue(), ke = +G.getValue(), Mt = +ge.getValue(), ar = +de.getValue(), wt = +Ee.getValue();
18141
+ const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ke = +G.getValue(), wt = +ge.getValue(), ir = +de.getValue(), St = +Ee.getValue();
18127
18142
  if (me < 1 || Math.floor(me) > Math.ceil(ke))
18128
18143
  return g.create(m.NUM);
18129
- const ot = xu(pe, me, ke, Mt, ar, wt ? 1 : 0);
18144
+ const ot = xu(pe, me, ke, wt, ir, St ? 1 : 0);
18130
18145
  return Number.isNaN(ot) || !Number.isFinite(ot) ? g.create(m.NUM) : N === 0 && M === 0 ? y.create(ot, ze(this.getLocale())) : y.create(ot);
18131
18146
  });
18132
18147
  return l === 1 && f === 1 ? R.get(0, 0) : R;
@@ -18212,10 +18227,10 @@ class o0 extends V {
18212
18227
  const E = c.get(_, C), b = l.get(_, C), R = f.get(_, C), { isError: p, errorObject: N, variants: M } = B(d, E, b, R);
18213
18228
  if (p)
18214
18229
  return N;
18215
- const [w, S, D, L] = M, U = +w.getValue(), x = +S.getValue(), F = +D.getValue(), W = +L.getValue();
18230
+ const [w, S, D, L] = M, U = +w.getValue(), x = +S.getValue(), F = +D.getValue(), Q = +L.getValue();
18216
18231
  if (F === 0)
18217
18232
  return g.create(m.DIV_BY_ZERO);
18218
- const ne = W * U * (x / F - 1);
18233
+ const ne = Q * U * (x / F - 1);
18219
18234
  return y.create(ne);
18220
18235
  });
18221
18236
  return s === 1 && o === 1 ? h.get(0, 0) : h;
@@ -18380,7 +18395,7 @@ class f0 extends V {
18380
18395
  const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
18381
18396
  if (D)
18382
18397
  return L;
18383
- const [x, F, W, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +W.getValue(), Ee = +ne.getValue();
18398
+ const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
18384
18399
  let pe = +z.getValue();
18385
18400
  if (pe = pe ? 1 : 0, G === 0 && ge === 0)
18386
18401
  return g.create(m.DIV_BY_ZERO);
@@ -18388,8 +18403,8 @@ class f0 extends V {
18388
18403
  if (G === 0)
18389
18404
  me = -(de + Ee) / ge;
18390
18405
  else {
18391
- const ke = ge * (1 + G * pe) - Ee * G, Mt = de * G + ge * (1 + G * pe);
18392
- me = Math.log(ke / Mt) / Math.log(1 + G);
18406
+ const ke = ge * (1 + G * pe) - Ee * G, wt = de * G + ge * (1 + G * pe);
18407
+ me = Math.log(ke / wt) / Math.log(1 + G);
18393
18408
  }
18394
18409
  return Number.isNaN(me) || !Number.isFinite(me) ? g.create(m.NUM) : y.create(me);
18395
18410
  });
@@ -18484,16 +18499,16 @@ class m0 extends V {
18484
18499
  const x = $(R);
18485
18500
  if (typeof x != "number")
18486
18501
  return x;
18487
- const F = +p.getValue(), W = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
18488
- if (Number.isNaN(F) || Number.isNaN(W) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G))
18502
+ const F = +p.getValue(), Q = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
18503
+ if (Number.isNaN(F) || Number.isNaN(Q) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G))
18489
18504
  return g.create(m.VALUE);
18490
- if (F < 0 || W < 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z))
18505
+ if (F < 0 || Q < 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z))
18491
18506
  return g.create(m.NUM);
18492
- const ge = Uu(D, L, U, x, F, W, ne, z, G);
18507
+ const ge = Uu(D, L, U, x, F, Q, ne, z, G);
18493
18508
  return y.create(ge);
18494
18509
  }
18495
18510
  _validDate(e, t, r, n, s) {
18496
- return this._getDateCorrectOrder(e, t, r, n) && vu(e, t, s) && wr(n, e, s);
18511
+ return this._getDateCorrectOrder(e, t, r, n) && vu(e, t, s) && Sr(n, e, s);
18497
18512
  }
18498
18513
  _getDateCorrectOrder(e, t, r, n) {
18499
18514
  return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Math.floor(r) > Math.floor(n);
@@ -18523,11 +18538,11 @@ class g0 extends V {
18523
18538
  const x = $(R);
18524
18539
  if (typeof x != "number")
18525
18540
  return x;
18526
- const F = +p.getValue(), W = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
18527
- return Number.isNaN(F) || Number.isNaN(W) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G) ? g.create(m.VALUE) : F < 0 || W <= 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z) ? g.create(m.NUM) : this._getResult(D, L, U, x, F, W, ne, z, G);
18541
+ const F = +p.getValue(), Q = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
18542
+ return Number.isNaN(F) || Number.isNaN(Q) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G) ? g.create(m.VALUE) : F < 0 || Q <= 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z) ? g.create(m.NUM) : this._getResult(D, L, U, x, F, Q, ne, z, G);
18528
18543
  }
18529
18544
  _validDate(e, t, r, n, s) {
18530
- return this._getDateCorrectOrder(e, t, r, n) && vu(e, t, s) && wr(n, e, s);
18545
+ return this._getDateCorrectOrder(e, t, r, n) && vu(e, t, s) && Sr(n, e, s);
18531
18546
  }
18532
18547
  _getDateCorrectOrder(e, t, r, n) {
18533
18548
  return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Math.floor(r) > Math.floor(n);
@@ -18562,16 +18577,16 @@ class d0 extends V {
18562
18577
  const D = $(E);
18563
18578
  if (typeof D != "number")
18564
18579
  return D;
18565
- const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), F = Math.floor(+N.getValue()), W = Math.floor(+M.getValue());
18566
- if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(W))
18580
+ const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), F = Math.floor(+N.getValue()), Q = Math.floor(+M.getValue());
18581
+ if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(Q))
18567
18582
  return g.create(m.VALUE);
18568
- if (L < 0 || U < 0 || x <= 0 || ![1, 2, 4].includes(F) || W < 0 || W > 4 || !this._validDate(S, w, D, F))
18583
+ if (L < 0 || U < 0 || x <= 0 || ![1, 2, 4].includes(F) || Q < 0 || Q > 4 || !this._validDate(S, w, D, F))
18569
18584
  return g.create(m.NUM);
18570
- const ne = this._getResult(w, S, D, L, U, x, F, W);
18585
+ const ne = this._getResult(w, S, D, L, U, x, F, Q);
18571
18586
  return y.create(ne);
18572
18587
  }
18573
18588
  _validDate(e, t, r, n) {
18574
- return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && wr(r, e, n);
18589
+ return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Sr(r, e, n);
18575
18590
  }
18576
18591
  _getResult(e, t, r, n, s, o, u, c) {
18577
18592
  const l = this._getCoupDate(t, r, u), f = this._getFrac(r, e, l, u, c), h = this._getFrac(r, t, l, u, c), d = this._getFrac(e, t, l, u, c);
@@ -18625,16 +18640,16 @@ class C0 extends V {
18625
18640
  const D = $(E);
18626
18641
  if (typeof D != "number")
18627
18642
  return D;
18628
- const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), F = Math.floor(+N.getValue()), W = Math.floor(+M.getValue());
18629
- if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(W))
18643
+ const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), F = Math.floor(+N.getValue()), Q = Math.floor(+M.getValue());
18644
+ if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(F) || Number.isNaN(Q))
18630
18645
  return g.create(m.VALUE);
18631
- if (L < 0 || U <= 0 || x <= 0 || ![1, 2, 4].includes(F) || W < 0 || W > 4 || !this._validDate(S, w, D, F))
18646
+ if (L < 0 || U <= 0 || x <= 0 || ![1, 2, 4].includes(F) || Q < 0 || Q > 4 || !this._validDate(S, w, D, F))
18632
18647
  return g.create(m.NUM);
18633
- const ne = this._getResult(w, S, D, L, U, x, F, W);
18648
+ const ne = this._getResult(w, S, D, L, U, x, F, Q);
18634
18649
  return y.create(ne);
18635
18650
  }
18636
18651
  _validDate(e, t, r, n) {
18637
- return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && wr(r, e, n);
18652
+ return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Sr(r, e, n);
18638
18653
  }
18639
18654
  _getResult(e, t, r, n, s, o, u, c) {
18640
18655
  const l = this._getCoupDate(t, r, u), f = this._getFrac(r, e, l, u, c), h = this._getFrac(r, t, l, u, c), d = this._getFrac(e, t, l, u, c);
@@ -18719,7 +18734,7 @@ class A0 extends V {
18719
18734
  const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
18720
18735
  if (D)
18721
18736
  return L;
18722
- const [x, F, W, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +W.getValue(), Ee = +ne.getValue(), pe = +z.getValue();
18737
+ const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue();
18723
18738
  if (G <= -1)
18724
18739
  return g.create(m.NUM);
18725
18740
  const me = qr(G, ge, de, Ee, pe ? 1 : 0);
@@ -18751,13 +18766,13 @@ class E0 extends V {
18751
18766
  u.isArray() ? u.getColumnCount() : 1,
18752
18767
  c.isArray() ? c.getColumnCount() : 1
18753
18768
  ), h = O(l, f, e, g.create(m.NA)), d = O(l, f, t, g.create(m.NA)), _ = O(l, f, r, g.create(m.NA)), C = O(l, f, n, g.create(m.NA)), E = O(l, f, u, g.create(m.NA)), b = O(l, f, c, g.create(m.NA)), R = h.map((p, N, M) => {
18754
- 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: W } = B(p, w, S, D, L, U);
18769
+ 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);
18755
18770
  if (x)
18756
18771
  return F;
18757
- const [ne, z, G, ge, de, Ee] = W, pe = +ne.getValue(), me = +z.getValue(), ke = +G.getValue(), Mt = +ge.getValue(), ar = +de.getValue(), wt = +Ee.getValue();
18772
+ const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ke = +G.getValue(), wt = +ge.getValue(), ir = +de.getValue(), St = +Ee.getValue();
18758
18773
  if (me < 1 || Math.floor(me) > Math.ceil(ke) || me - ke >= 1)
18759
18774
  return g.create(m.NUM);
18760
- const ot = qr(pe, ke, Mt, ar, wt ? 1 : 0) - xu(pe, me, ke, Mt, ar, wt ? 1 : 0);
18775
+ const ot = qr(pe, ke, wt, ir, St ? 1 : 0) - xu(pe, me, ke, wt, ir, St ? 1 : 0);
18761
18776
  return Number.isNaN(ot) || !Number.isFinite(ot) ? g.create(m.NUM) : N === 0 && M === 0 ? y.create(ot, ze(this.getLocale())) : y.create(ot);
18762
18777
  });
18763
18778
  return l === 1 && f === 1 ? R.get(0, 0) : R;
@@ -18784,7 +18799,7 @@ class b0 extends V {
18784
18799
  const w = +C.getValue(), S = +E.getValue(), D = +b.getValue(), L = Math.floor(+R.getValue()), U = Math.floor(+p.getValue());
18785
18800
  if (Number.isNaN(w) || Number.isNaN(S) || Number.isNaN(D) || Number.isNaN(L) || Number.isNaN(U))
18786
18801
  return g.create(m.VALUE);
18787
- if (w < 0 || S < 0 || D <= 0 || ![1, 2, 4].includes(L) || U < 0 || U > 4 || N >= M || !wr(N, M, L))
18802
+ if (w < 0 || S < 0 || D <= 0 || ![1, 2, 4].includes(L) || U < 0 || U > 4 || N >= M || !Sr(N, M, L))
18788
18803
  return g.create(m.NUM);
18789
18804
  const x = gn(N, M, w, S, D, L, U);
18790
18805
  return y.create(x);
@@ -18844,8 +18859,8 @@ class R0 extends V {
18844
18859
  const D = this._getDateCorrectOrder(p, R, N);
18845
18860
  if (M < 0 || w < 0 || S < 0 || S > 4 || !D)
18846
18861
  return g.create(m.NUM);
18847
- const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: F } = _e(N, R, S), W = (100 + x / L * M * 100) / (1 + U / L * w) - F / L * M * 100;
18848
- return y.create(W);
18862
+ const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: F } = _e(N, R, S), Q = (100 + x / L * M * 100) / (1 + U / L * w) - F / L * M * 100;
18863
+ return y.create(Q);
18849
18864
  }
18850
18865
  _getDateCorrectOrder(e, t, r) {
18851
18866
  return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r);
@@ -18875,7 +18890,7 @@ class p0 extends V {
18875
18890
  const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
18876
18891
  if (D)
18877
18892
  return L;
18878
- const [x, F, W, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +W.getValue(), Ee = +ne.getValue();
18893
+ const [x, F, Q, ne, z] = U, G = +x.getValue(), ge = +F.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
18879
18894
  let pe = +z.getValue();
18880
18895
  pe = pe ? 1 : 0;
18881
18896
  const me = G === 0 ? -de * ge - Ee : ((1 - (1 + G) ** ge) / G * de * (1 + G * pe) - Ee) / (1 + G) ** ge;
@@ -18906,13 +18921,13 @@ class V0 extends V {
18906
18921
  c.isArray() ? c.getColumnCount() : 1,
18907
18922
  l.isArray() ? l.getColumnCount() : 1
18908
18923
  ), d = O(f, h, e, g.create(m.NA)), _ = O(f, h, t, g.create(m.NA)), C = O(f, h, r, g.create(m.NA)), E = O(f, h, u, g.create(m.NA)), b = O(f, h, c, g.create(m.NA)), R = O(f, h, l, g.create(m.NA)), p = d.map((N, M, w) => {
18909
- 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: W, variants: ne } = B(N, S, D, L, U, x);
18924
+ 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);
18910
18925
  if (F)
18911
- return W;
18912
- const [z, G, ge, de, Ee, pe] = ne, me = +z.getValue(), ke = +G.getValue(), Mt = +ge.getValue(), ar = +de.getValue();
18913
- let wt = +Ee.getValue();
18926
+ return Q;
18927
+ const [z, G, ge, de, Ee, pe] = ne, me = +z.getValue(), ke = +G.getValue(), wt = +ge.getValue(), ir = +de.getValue();
18928
+ let St = +Ee.getValue();
18914
18929
  const ot = +pe.getValue();
18915
- return wt = wt ? 1 : 0, me <= 0 || ke >= 0 ? g.create(m.NUM) : this._getResult(me, ke, Mt, ar, wt, ot, M, w);
18930
+ return St = St ? 1 : 0, me <= 0 || ke >= 0 ? g.create(m.NUM) : this._getResult(me, ke, wt, ir, St, ot, M, w);
18916
18931
  });
18917
18932
  return f === 1 && h === 1 ? p.get(0, 0) : p;
18918
18933
  }
@@ -19200,7 +19215,7 @@ class P0 extends V {
19200
19215
  const C = t.get(d, _), E = r.get(d, _), b = n.get(d, _), R = s.get(d, _), p = o.get(d, _), N = u.get(d, _), { isError: M, errorObject: w, variants: S } = B(h, C, E, b, R, p, N);
19201
19216
  if (M)
19202
19217
  return w;
19203
- const [D, L, U, x, F, W, ne] = S, z = +D.getValue(), G = +L.getValue(), ge = +U.getValue(), de = +x.getValue(), Ee = +F.getValue(), pe = +W.getValue(), me = +ne.getValue();
19218
+ const [D, L, U, x, F, Q, ne] = S, z = +D.getValue(), G = +L.getValue(), ge = +U.getValue(), de = +x.getValue(), Ee = +F.getValue(), pe = +Q.getValue(), me = +ne.getValue();
19204
19219
  if (z < 0 || G < 0 || ge < 0 || de < 0 || Ee < 0 || Ee > ge || de > Ee || pe < 0)
19205
19220
  return g.create(m.NUM);
19206
19221
  if (ge === 0 && de === 0 && Ee === 0)
@@ -19324,7 +19339,7 @@ class x0 extends V {
19324
19339
  };
19325
19340
  } else {
19326
19341
  const r = e.getValue();
19327
- return e.isBoolean() || e.isString() && !Q(r) ? {
19342
+ return e.isBoolean() || e.isString() && !W(r) ? {
19328
19343
  isError: !0,
19329
19344
  errorObejct: g.create(m.VALUE)
19330
19345
  } : {
@@ -19360,7 +19375,7 @@ class x0 extends V {
19360
19375
  };
19361
19376
  } else {
19362
19377
  const r = e.getValue();
19363
- return e.isBoolean() || e.isString() && !Q(r) ? {
19378
+ return e.isBoolean() || e.isString() && !W(r) ? {
19364
19379
  isError: !0,
19365
19380
  errorObejct: g.create(m.VALUE)
19366
19381
  } : +r < 0 ? {
@@ -19457,21 +19472,28 @@ class j0 extends V {
19457
19472
  }), r ? {
19458
19473
  isError: r,
19459
19474
  errorObejct: n
19460
- } : t.length <= 1 ? {
19461
- isError: !0,
19462
- errorObejct: g.create(m.NA)
19463
19475
  } : {
19464
19476
  isError: r,
19465
19477
  _values: t
19466
19478
  };
19467
19479
  } else {
19468
- const r = e.getValue();
19469
- return e.isNull() || e.isBoolean() || e.isString() && !Q(r) ? {
19480
+ if (e.isError())
19481
+ return {
19482
+ isError: !0,
19483
+ errorObejct: e
19484
+ };
19485
+ if (e.isNull() || e.isBoolean())
19486
+ return {
19487
+ isError: !0,
19488
+ errorObejct: g.create(m.VALUE)
19489
+ };
19490
+ const r = +e.getValue();
19491
+ return Number.isNaN(r) ? {
19470
19492
  isError: !0,
19471
19493
  errorObejct: g.create(m.VALUE)
19472
19494
  } : {
19473
- isError: !0,
19474
- errorObejct: g.create(m.NA)
19495
+ isError: !1,
19496
+ _values: [r]
19475
19497
  };
19476
19498
  }
19477
19499
  }
@@ -19494,24 +19516,31 @@ class j0 extends V {
19494
19516
  }), r ? {
19495
19517
  isError: r,
19496
19518
  errorObejct: n
19497
- } : t.length <= 1 ? {
19498
- isError: !0,
19499
- errorObejct: g.create(m.NA)
19500
19519
  } : {
19501
19520
  isError: r,
19502
19521
  _dates: t
19503
19522
  };
19504
19523
  } else {
19505
- const r = e.getValue();
19506
- return e.isNull() || e.isBoolean() || e.isString() && !Q(r) ? {
19524
+ if (e.isError())
19525
+ return {
19526
+ isError: !0,
19527
+ errorObejct: e
19528
+ };
19529
+ if (e.isNull() || e.isBoolean())
19530
+ return {
19531
+ isError: !0,
19532
+ errorObejct: g.create(m.VALUE)
19533
+ };
19534
+ const r = +e.getValue();
19535
+ return Number.isNaN(r) ? {
19507
19536
  isError: !0,
19508
19537
  errorObejct: g.create(m.VALUE)
19509
19538
  } : +r < 0 ? {
19510
19539
  isError: !0,
19511
19540
  errorObejct: g.create(m.NUM)
19512
19541
  } : {
19513
- isError: !0,
19514
- errorObejct: g.create(m.NA)
19542
+ isError: !1,
19543
+ _dates: [Math.floor(r)]
19515
19544
  };
19516
19545
  }
19517
19546
  }
@@ -19537,13 +19566,13 @@ class U0 extends V {
19537
19566
  const w = +C.getValue(), S = +E.getValue(), D = +b.getValue(), L = Math.floor(+R.getValue()), U = Math.floor(+p.getValue());
19538
19567
  if (Number.isNaN(w) || Number.isNaN(S) || Number.isNaN(D) || Number.isNaN(L) || Number.isNaN(U))
19539
19568
  return g.create(m.VALUE);
19540
- if (w < 0 || S <= 0 || D <= 0 || ![1, 2, 4].includes(L) || U < 0 || U > 4 || N >= M || !wr(N, M, L))
19569
+ if (w < 0 || S <= 0 || D <= 0 || ![1, 2, 4].includes(L) || U < 0 || U > 4 || N >= M || !Sr(N, M, L))
19541
19570
  return g.create(m.NUM);
19542
19571
  const x = this._getResult(N, M, w, S, D, L, U);
19543
19572
  return y.create(x);
19544
19573
  }
19545
19574
  _getResult(e, t, r, n, s, o, u) {
19546
- if (rr(e, t, o) > 1) {
19575
+ if (nr(e, t, o) > 1) {
19547
19576
  let E = r || 0.01, b = gn(e, t, r, E, s, o, u), R = b - n;
19548
19577
  for (let p = 0; p < 100 && Math.abs(R) > 1e-7; p++)
19549
19578
  b = gn(e, t, r, 1.01 * E, s, o, u), E += -R / (b - n - R) * E * 0.01, R = gn(e, t, r, E, s, o, u) - n;
@@ -19607,8 +19636,8 @@ class T0 extends V {
19607
19636
  const D = this._getDateCorrectOrder(p, R, N);
19608
19637
  if (M < 0 || w <= 0 || S < 0 || S > 4 || !D)
19609
19638
  return g.create(m.NUM);
19610
- const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: F } = _e(N, R, S), W = ((1 + x / L * M) / (w / 100 + F / L * M) - 1) / (U / L);
19611
- return y.create(W);
19639
+ const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: F } = _e(N, R, S), Q = ((1 + x / L * M) / (w / 100 + F / L * M) - 1) / (U / L);
19640
+ return y.create(Q);
19612
19641
  }
19613
19642
  _getDateCorrectOrder(e, t, r) {
19614
19643
  return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r);
@@ -20879,7 +20908,7 @@ class Sd extends V {
20879
20908
  endColumn: u,
20880
20909
  startAbsoluteRefType: l,
20881
20910
  endAbsoluteRefType: l
20882
- }, C = n && !f ? Qh(_) : Bt(_);
20911
+ }, C = n && !f ? Qh(_) : It(_);
20883
20912
  return j.create(d !== "" ? `${d}!${C}` : C);
20884
20913
  }
20885
20914
  }
@@ -21547,7 +21576,7 @@ class Gd extends V {
21547
21576
  return this._setDefault(new pa(n));
21548
21577
  if (to(n))
21549
21578
  return this._setDefault(new Ra(n));
21550
- const s = gr(n), { range: o, sheetName: u, unitId: c } = s;
21579
+ const s = dr(n), { range: o, sheetName: u, unitId: c } = s;
21551
21580
  if (Number.isNaN(o.startRow) || o.endRow + 1 > 1048576 || Number.isNaN(o.startColumn) || o.endColumn + 1 > 16384)
21552
21581
  return g.create(m.REF);
21553
21582
  const l = new pn(o);
@@ -21908,7 +21937,7 @@ class zd extends V {
21908
21937
  }
21909
21938
  calculate(e, ...t) {
21910
21939
  t.length === 1 && t.push(y.create(1));
21911
- const r = this._getVariantsError(e, ...t), { maxRowLength: n, maxColumnLength: s } = Mr(t);
21940
+ const r = this._getVariantsError(e, ...t), { maxRowLength: n, maxColumnLength: s } = wr(t);
21912
21941
  if (r.isError()) {
21913
21942
  const c = O(n, s, r);
21914
21943
  return n === 1 && s === 1 ? c.get(0, 0) : c;
@@ -22376,7 +22405,7 @@ class nC extends V {
22376
22405
  return e.forEach((r) => {
22377
22406
  const n = r.r, s = r.valueObject;
22378
22407
  let o = s.getValue();
22379
- if (s.isNull() ? o = null : s.isString() && Q(o) && (o = +o), !t.has(o))
22408
+ if (s.isNull() ? o = null : s.isString() && W(o) && (o = +o), !t.has(o))
22380
22409
  t.set(o, [n]);
22381
22410
  else {
22382
22411
  const u = t.get(o);
@@ -22427,7 +22456,7 @@ class sC extends V {
22427
22456
  if (d.isError())
22428
22457
  return u = d, !1;
22429
22458
  c[f] === void 0 && (c[f] = []), c[f][h] = d;
22430
- }), u || Or(c, c.length, c[0].length, this.unitId || "", this.subUnitId || "");
22459
+ }), u || Mr(c, c.length, c[0].length, this.unitId || "", this.subUnitId || "");
22431
22460
  }
22432
22461
  _handleNonArrayColIndexNum(e, t, r, n) {
22433
22462
  const s = Math.max(
@@ -23153,7 +23182,7 @@ class OC extends V {
23153
23182
  const _ = Math.floor(+h.getValue()), C = Math.floor(+d.getValue());
23154
23183
  if (_ < 0 || C < 0 || _ < C)
23155
23184
  return g.create(m.NUM);
23156
- const E = zt(_, C);
23185
+ const E = Jt(_, C);
23157
23186
  return Number.isNaN(E) || !Number.isFinite(E) ? g.create(m.NUM) : y.create(E);
23158
23187
  });
23159
23188
  return r === 1 && n === 1 ? u.get(0, 0) : u;
@@ -23181,7 +23210,7 @@ class MC extends V {
23181
23210
  const _ = Math.floor(+h.getValue()), C = Math.floor(+d.getValue());
23182
23211
  if (_ < 0 || C < 0 || _ === 0 && _ < C)
23183
23212
  return g.create(m.NUM);
23184
- const E = zt(_ + C - 1, _ - 1);
23213
+ const E = Jt(_ + C - 1, _ - 1);
23185
23214
  return Number.isNaN(E) || !Number.isFinite(E) ? g.create(m.NUM) : y.create(E);
23186
23215
  });
23187
23216
  return r === 1 && n === 1 ? u.get(0, 0) : u;
@@ -23298,7 +23327,7 @@ class jC extends V {
23298
23327
  if (h.isString() && (h = h.convertToNumberObjectValue()), h.isError())
23299
23328
  return h;
23300
23329
  const d = `${c.getValue()}`, _ = Math.floor(+h.getValue());
23301
- if (Q(d) && (+d < 0 || +d >= 2 ** 53 || !Number.isInteger(+d)) || d.toLocaleLowerCase() === "true" || d.toLocaleLowerCase() === "false" || _ < 2 || _ > 36)
23330
+ if (W(d) && (+d < 0 || +d >= 2 ** 53 || !Number.isInteger(+d)) || d.toLocaleLowerCase() === "true" || d.toLocaleLowerCase() === "false" || _ < 2 || _ > 36)
23302
23331
  return g.create(m.NUM);
23303
23332
  if (d.replace(/\s/g, "") === "")
23304
23333
  return y.create(0);
@@ -23382,7 +23411,7 @@ class BC extends V {
23382
23411
  let t = e;
23383
23412
  if (t.isString() && (t = t.convertToNumberObjectValue()), t.isError())
23384
23413
  return t;
23385
- const r = Math.floor(+t.getValue()), n = fr(r);
23414
+ const r = Math.floor(+t.getValue()), n = hr(r);
23386
23415
  return Number.isNaN(n) || !Number.isFinite(n) ? g.create(m.NUM) : y.create(n);
23387
23416
  }
23388
23417
  }
@@ -23406,7 +23435,7 @@ class IC extends V {
23406
23435
  let t = e;
23407
23436
  if (t.isString() && (t = t.convertToNumberObjectValue()), t.isError())
23408
23437
  return t;
23409
- const r = Math.floor(+t.getValue()), n = fr(r, 2);
23438
+ const r = Math.floor(+t.getValue()), n = hr(r, 2);
23410
23439
  return Number.isNaN(n) || !Number.isFinite(n) ? g.create(m.NUM) : y.create(n);
23411
23440
  }
23412
23441
  }
@@ -23773,7 +23802,7 @@ class ZC extends V {
23773
23802
  return u;
23774
23803
  if (c instanceof g)
23775
23804
  return c;
23776
- const l = hr(u, c);
23805
+ const l = mr(u, c);
23777
23806
  return q.createByArray(l);
23778
23807
  }
23779
23808
  _getMatrix(e, t, r) {
@@ -23844,7 +23873,7 @@ class JC extends V {
23844
23873
  return y.create(0);
23845
23874
  if (s > 0 && o < 0 || s < 0 && o > 0)
23846
23875
  return g.create(m.NUM);
23847
- const u = vt(s / o, 0) * o;
23876
+ const u = Tt(s / o, 0) * o;
23848
23877
  return y.create(u);
23849
23878
  }
23850
23879
  }
@@ -23869,7 +23898,7 @@ class e_ extends V {
23869
23898
  return u = !0, c = h, !1;
23870
23899
  if (t += d, t > 170)
23871
23900
  return u = !0, c = g.create(m.NUM), !1;
23872
- r *= fr(d);
23901
+ r *= hr(d);
23873
23902
  }), u)
23874
23903
  return c;
23875
23904
  } else {
@@ -23878,10 +23907,10 @@ class e_ extends V {
23878
23907
  return c;
23879
23908
  if (t += l, t > 170)
23880
23909
  return g.create(m.NUM);
23881
- r *= fr(l);
23910
+ r *= hr(l);
23882
23911
  }
23883
23912
  }
23884
- const n = fr(t) / r;
23913
+ const n = hr(t) / r;
23885
23914
  return y.create(n);
23886
23915
  }
23887
23916
  _handleSingleObject(e) {
@@ -24787,7 +24816,7 @@ class N_ extends V {
24787
24816
  }), C != null && C.isError())
24788
24817
  return C;
24789
24818
  }
24790
- return Or(r, 1, r[0].length);
24819
+ return Mr(r, 1, r[0].length);
24791
24820
  }
24792
24821
  _isRowHidden(e, t) {
24793
24822
  const r = e[t];
@@ -24866,7 +24895,7 @@ class w_ extends V {
24866
24895
  return e;
24867
24896
  if (!e.isArray() || t.length < 2 || t.length % 2 !== 0 || t.some((u, c) => c % 2 === 0 && !u.isArray()))
24868
24897
  return g.create(m.VALUE);
24869
- const { maxRowLength: r, maxColumnLength: n } = Mr(t), s = kr(t, e, r, n);
24898
+ const { maxRowLength: r, maxColumnLength: n } = wr(t), s = kr(t, e, r, n);
24870
24899
  if (s)
24871
24900
  return s;
24872
24901
  const o = $r(t, r, n, !0);
@@ -24913,8 +24942,7 @@ class S_ extends V {
24913
24942
  let C = t[c];
24914
24943
  if (t[c].isArray() && (C = t[c].get(h, _)), C.isError())
24915
24944
  return C;
24916
- const E = C.getValue();
24917
- !E || !Q(E) ? d.push(0) : d.push(+E * o[h][_]);
24945
+ C.isNumber() ? d.push(C.getValue() * o[h][_]) : d.push(0);
24918
24946
  }
24919
24947
  o[h] = d;
24920
24948
  }
@@ -24944,8 +24972,7 @@ class S_ extends V {
24944
24972
  const c = r.get(s, u);
24945
24973
  if (c.isError())
24946
24974
  return c;
24947
- const l = c.getValue();
24948
- !l || !Q(l) ? o.push(0) : o.push(+l);
24975
+ c.isNumber() ? o.push(c.getValue()) : o.push(0);
24949
24976
  }
24950
24977
  n.push(o);
24951
24978
  }
@@ -25025,7 +25052,7 @@ class L_ extends V {
25025
25052
  if (r.isNull() || n.isNull())
25026
25053
  return g.create(m.VALUE);
25027
25054
  const s = +r.getValue(), o = +n.getValue();
25028
- if (r.isString() && !Q(s) || r.isBoolean() || n.isString() && !Q(o) || n.isBoolean())
25055
+ if (r.isString() && !W(s) || r.isBoolean() || n.isString() && !W(o) || n.isBoolean())
25029
25056
  return g.create(m.DIV_BY_ZERO);
25030
25057
  const u = s ** 2 - o ** 2;
25031
25058
  return y.create(u);
@@ -25077,7 +25104,7 @@ class P_ extends V {
25077
25104
  if (r.isNull() || n.isNull())
25078
25105
  return g.create(m.VALUE);
25079
25106
  const s = +r.getValue(), o = +n.getValue();
25080
- if (r.isString() && !Q(s) || r.isBoolean() || n.isString() && !Q(o) || n.isBoolean())
25107
+ if (r.isString() && !W(s) || r.isBoolean() || n.isString() && !W(o) || n.isBoolean())
25081
25108
  return g.create(m.DIV_BY_ZERO);
25082
25109
  const u = s ** 2 + o ** 2;
25083
25110
  return y.create(u);
@@ -25129,7 +25156,7 @@ class x_ extends V {
25129
25156
  if (r.isNull() || n.isNull())
25130
25157
  return g.create(m.VALUE);
25131
25158
  const s = +r.getValue(), o = +n.getValue();
25132
- if (r.isString() && !Q(s) || r.isBoolean() || n.isString() && !Q(o) || n.isBoolean())
25159
+ if (r.isString() && !W(s) || r.isBoolean() || n.isString() && !W(o) || n.isBoolean())
25133
25160
  return g.create(m.DIV_BY_ZERO);
25134
25161
  const u = (s - o) ** 2;
25135
25162
  return y.create(u);
@@ -25176,7 +25203,7 @@ class v_ extends V {
25176
25203
  return _;
25177
25204
  if (d.isString() && (d = d.convertToNumberObjectValue()), d.isError())
25178
25205
  return d;
25179
- const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R = qn(C, b), p = Math.trunc(Nr(C, b) + R) / b;
25206
+ const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R = qn(C, b), p = Math.trunc(Or(C, b) + R) / b;
25180
25207
  return y.create(p);
25181
25208
  });
25182
25209
  return n === 1 && s === 1 ? c.get(0, 0) : c;
@@ -25278,7 +25305,7 @@ class B_ extends V {
25278
25305
  return e.isError() ? e : t.isError() ? t : e.compare(t, this._compareType);
25279
25306
  }
25280
25307
  }
25281
- class Wa extends $t {
25308
+ class Wa extends Yt {
25282
25309
  constructor(e) {
25283
25310
  super("");
25284
25311
  A(this, "_values", []);
@@ -25453,7 +25480,7 @@ function Q_(i) {
25453
25480
  if (t != null && t.isError())
25454
25481
  return e = t, !1;
25455
25482
  t != null && t.isNumber() && a[0].push(t);
25456
- }), e || Or(a, 1, a[0].length);
25483
+ }), e || Mr(a, 1, a[0].length);
25457
25484
  }
25458
25485
  class W_ extends V {
25459
25486
  constructor() {
@@ -25575,7 +25602,7 @@ class X_ extends V {
25575
25602
  if (r != null && r.isError())
25576
25603
  return r;
25577
25604
  let n = e;
25578
- n.isReferenceObject() && (n = n.toArrayValueObject()), n.isArray() || (n = Or([[n]], 1, 1));
25605
+ n.isReferenceObject() && (n = n.toArrayValueObject()), n.isArray() || (n = Mr([[n]], 1, 1));
25579
25606
  let s = t;
25580
25607
  return s.isReferenceObject() && (s = s.toArrayValueObject()), r && !(r != null && r.isReferenceObject()) ? g.create(m.NA) : (s = s, s.isArray() ? s.map((o) => this._handleSingleObject(n, o, r)) : this._handleSingleObject(n, s, r));
25581
25608
  }
@@ -25622,7 +25649,7 @@ class Z_ extends V {
25622
25649
  return g.create(m.NA);
25623
25650
  if (!e.isArray() || t.length % 2 !== 0 || t.some((u, c) => c % 2 === 0 && !u.isArray()))
25624
25651
  return g.create(m.VALUE);
25625
- const { maxRowLength: r, maxColumnLength: n } = Mr(t), s = kr(t, e, r, n);
25652
+ const { maxRowLength: r, maxColumnLength: n } = wr(t), s = kr(t, e, r, n);
25626
25653
  if (s)
25627
25654
  return s;
25628
25655
  const o = $r(t, r, n, !0);
@@ -25958,7 +25985,7 @@ class uA extends V {
25958
25985
  calculate(...e) {
25959
25986
  if (e.length % 2 !== 0 || e.some((o, u) => u % 2 === 0 && !o.isArray()))
25960
25987
  return g.create(m.VALUE);
25961
- const { maxRowLength: t, maxColumnLength: r } = Mr(e), n = kr(e, e[0], t, r);
25988
+ const { maxRowLength: t, maxColumnLength: r } = wr(e), n = kr(e, e[0], t, r);
25962
25989
  if (n)
25963
25990
  return n;
25964
25991
  const s = $r(e, t, r, !0);
@@ -26079,7 +26106,7 @@ class fA extends V {
26079
26106
  if (e.isNull() || e.isBoolean())
26080
26107
  return ue.create();
26081
26108
  const t = e.getValue();
26082
- return Q(t) ? y.create(+t) : ue.create();
26109
+ return W(t) ? y.create(+t) : ue.create();
26083
26110
  }
26084
26111
  }
26085
26112
  class hA extends V {
@@ -26274,7 +26301,7 @@ class CA extends V {
26274
26301
  if (c.isNull() || c.isBoolean())
26275
26302
  continue;
26276
26303
  const l = c.getValue();
26277
- Q(l) && r.push(+l);
26304
+ W(l) && r.push(+l);
26278
26305
  }
26279
26306
  return {
26280
26307
  isError: !1,
@@ -26395,7 +26422,7 @@ class EA extends V {
26395
26422
  if (f != null && f.isNull() || f != null && f.isBoolean())
26396
26423
  return !0;
26397
26424
  const h = f.getValue();
26398
- if (!Q(h))
26425
+ if (!W(h))
26399
26426
  return !0;
26400
26427
  +h <= 0 && (n = !0), t *= +h, r++;
26401
26428
  }), c)
@@ -26411,7 +26438,7 @@ class EA extends V {
26411
26438
  if (u.isNull() || u.isBoolean())
26412
26439
  continue;
26413
26440
  const c = u.getValue();
26414
- if (!Q(c))
26441
+ if (!W(c))
26415
26442
  continue;
26416
26443
  +c <= 0 && (n = !0), t *= +c, r++;
26417
26444
  }
@@ -26432,7 +26459,7 @@ class bA extends V {
26432
26459
  const { isError: s, errorObject: o } = ss(e, t, r);
26433
26460
  if (s)
26434
26461
  return o;
26435
- const u = Ct(e);
26462
+ const u = _t(e);
26436
26463
  if (u instanceof g)
26437
26464
  return u;
26438
26465
  const c = this._getKnownXsValues(u, t);
@@ -26463,17 +26490,17 @@ class bA extends V {
26463
26490
  _ *= u[0][l - 2 - C] ** c[d][C];
26464
26491
  h[d].push(_);
26465
26492
  }
26466
- return s && (h = mt(h)), q.createByArray(h);
26493
+ return s && (h = gt(h)), q.createByArray(h);
26467
26494
  }
26468
26495
  _getResultBySimpleVariables(e, t, r, n) {
26469
26496
  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));
26470
26497
  return q.createByArray(l);
26471
26498
  }
26472
26499
  _getKnownXsValues(e, t) {
26473
- return !t || t.isNull() ? as(e.length, e[0].length) : Ct(t);
26500
+ return !t || t.isNull() ? as(e.length, e[0].length) : _t(t);
26474
26501
  }
26475
26502
  _getNewXsValues(e, t) {
26476
- return !t || t.isNull() ? e : Ct(t);
26503
+ return !t || t.isNull() ? e : _t(t);
26477
26504
  }
26478
26505
  }
26479
26506
  class yA extends V {
@@ -26494,7 +26521,7 @@ class yA extends V {
26494
26521
  if (f != null && f.isNull() || f != null && f.isBoolean())
26495
26522
  return !0;
26496
26523
  const h = f.getValue();
26497
- if (!Q(h))
26524
+ if (!W(h))
26498
26525
  return !0;
26499
26526
  +h <= 0 && (n = !0), t += 1 / +h, r++;
26500
26527
  }), c)
@@ -26510,7 +26537,7 @@ class yA extends V {
26510
26537
  if (u.isNull() || u.isBoolean())
26511
26538
  continue;
26512
26539
  const c = u.getValue();
26513
- if (!Q(c))
26540
+ if (!W(c))
26514
26541
  continue;
26515
26542
  +c <= 0 && (n = !0), t += 1 / +c, r++;
26516
26543
  }
@@ -26624,7 +26651,7 @@ class VA extends V {
26624
26651
  if (f.isNull() || f.isBoolean())
26625
26652
  continue;
26626
26653
  const h = f.getValue();
26627
- Q(h) && (t.push(+h), r += +h);
26654
+ W(h) && (t.push(+h), r += +h);
26628
26655
  }
26629
26656
  }
26630
26657
  return t.length <= 3 ? g.create(m.DIV_BY_ZERO) : this._getResult(t, r);
@@ -26678,7 +26705,7 @@ class NA extends V {
26678
26705
  if (u.isNull() || u.isBoolean() || u.isString())
26679
26706
  continue;
26680
26707
  const c = u.getValue();
26681
- Q(c) && n.push(+c);
26708
+ W(c) && n.push(+c);
26682
26709
  }
26683
26710
  return n.length === 0 ? g.create(m.NUM) : n.sort((s, o) => o - s);
26684
26711
  }
@@ -26693,7 +26720,7 @@ class OA extends V {
26693
26720
  const { isError: s, errorObject: o } = ss(e, t);
26694
26721
  if (s)
26695
26722
  return o;
26696
- const u = Ct(e);
26723
+ const u = _t(e);
26697
26724
  if (u instanceof g)
26698
26725
  return u;
26699
26726
  const c = this._getKnownXsValues(u, t);
@@ -26722,8 +26749,8 @@ class OA extends V {
26722
26749
  const f = e.flat(), h = f.length, d = r ? f.reduce((x, F) => x + F, 0) / h : 0, _ = c.length, C = h - _, E = o[0].length, b = new Array(E - 2).fill(m.NA), R = o[0][E - 1], p = [];
26723
26750
  for (let x = 0; x < u.length; x++) {
26724
26751
  let F = R;
26725
- for (let W = E - 2; W >= 0; W--)
26726
- F += o[0][E - 2 - W] * u[x][W];
26752
+ for (let Q = E - 2; Q >= 0; Q--)
26753
+ F += o[0][E - 2 - Q] * u[x][Q];
26727
26754
  p.push(F);
26728
26755
  }
26729
26756
  let N = 0, M = 0;
@@ -26800,7 +26827,7 @@ class OA extends V {
26800
26827
  return q.createByArray(l);
26801
26828
  }
26802
26829
  _getKnownXsValues(e, t) {
26803
- return !t || t.isNull() ? as(e.length, e[0].length) : Ct(t);
26830
+ return !t || t.isNull() ? as(e.length, e[0].length) : _t(t);
26804
26831
  }
26805
26832
  }
26806
26833
  class MA extends V {
@@ -26813,7 +26840,7 @@ class MA extends V {
26813
26840
  const { isError: s, errorObject: o } = ss(e, t);
26814
26841
  if (s)
26815
26842
  return o;
26816
- const u = Ct(e);
26843
+ const u = _t(e);
26817
26844
  if (u instanceof g)
26818
26845
  return u;
26819
26846
  const c = this._getKnownXsValues(u, t);
@@ -26840,12 +26867,12 @@ class MA extends V {
26840
26867
  const { coefficients: o, Y: u, X: c, XTXInverse: l } = s;
26841
26868
  let f = [];
26842
26869
  if (n) {
26843
- const h = u.flat(), d = h.length, _ = r ? h.reduce((F, W) => F + W, 0) / d : 0, C = l.length, E = d - C, b = o[0].length, R = new Array(b - 2).fill(m.NA), p = o[0][b - 1], N = [];
26870
+ const h = u.flat(), d = h.length, _ = r ? h.reduce((F, Q) => F + Q, 0) / d : 0, C = l.length, E = d - C, b = o[0].length, R = new Array(b - 2).fill(m.NA), p = o[0][b - 1], N = [];
26844
26871
  for (let F = 0; F < c.length; F++) {
26845
- let W = p;
26872
+ let Q = p;
26846
26873
  for (let ne = b - 2; ne >= 0; ne--)
26847
- W *= o[0][b - 2 - ne] ** c[F][ne];
26848
- N.push(Math.log(W));
26874
+ Q *= o[0][b - 2 - ne] ** c[F][ne];
26875
+ N.push(Math.log(Q));
26849
26876
  }
26850
26877
  let M = 0, w = 0;
26851
26878
  for (let F = 0; F < d; F++)
@@ -26853,8 +26880,8 @@ class MA extends V {
26853
26880
  Number.isFinite(w) || (w = 0);
26854
26881
  const S = M - w, D = M === 0 ? 0 : S / M, L = [];
26855
26882
  for (let F = C - 1; F >= 0; F--) {
26856
- const W = E > 0 ? Math.sqrt(w / E * l[F][F]) : 0;
26857
- L.push(W);
26883
+ const Q = E > 0 ? Math.sqrt(w / E * l[F][F]) : 0;
26884
+ L.push(Q);
26858
26885
  }
26859
26886
  if (r) {
26860
26887
  const F = L.shift();
@@ -26920,7 +26947,7 @@ class MA extends V {
26920
26947
  return q.createByArray(f);
26921
26948
  }
26922
26949
  _getKnownXsValues(e, t) {
26923
- return !t || t.isNull() ? as(e.length, e[0].length) : Ct(t);
26950
+ return !t || t.isNull() ? as(e.length, e[0].length) : _t(t);
26924
26951
  }
26925
26952
  }
26926
26953
  class wA extends V {
@@ -26967,7 +26994,7 @@ class SA extends V {
26967
26994
  const r = this._getRangeValues(e);
26968
26995
  if (r instanceof g)
26969
26996
  return r;
26970
- const n = Xt(t);
26997
+ const n = Zt(t);
26971
26998
  if (n.isError())
26972
26999
  return n;
26973
27000
  const { isError: s, errorObject: o, variants: u } = B(n);
@@ -27062,7 +27089,7 @@ class PA extends V {
27062
27089
  return g.create(m.NA);
27063
27090
  if (!e.isArray() || t.length % 2 !== 0 || t.some((u, c) => c % 2 === 0 && !u.isArray()))
27064
27091
  return g.create(m.VALUE);
27065
- const { maxRowLength: r, maxColumnLength: n } = Mr(t), s = kr(t, e, r, n);
27092
+ const { maxRowLength: r, maxColumnLength: n } = wr(t), s = kr(t, e, r, n);
27066
27093
  if (s)
27067
27094
  return s;
27068
27095
  const o = $r(t, r, n, !0);
@@ -27102,7 +27129,7 @@ class xA extends V {
27102
27129
  if (u != null && u.isNull() || u != null && u.isBoolean())
27103
27130
  return !0;
27104
27131
  const c = u.getValue();
27105
- if (!Q(c))
27132
+ if (!W(c))
27106
27133
  return !0;
27107
27134
  t.push(+c);
27108
27135
  }), s)
@@ -27118,7 +27145,7 @@ class xA extends V {
27118
27145
  return o;
27119
27146
  }
27120
27147
  const s = n.getValue();
27121
- if (!Q(s))
27148
+ if (!W(s))
27122
27149
  continue;
27123
27150
  t.push(+s);
27124
27151
  }
@@ -27202,7 +27229,7 @@ class vA extends V {
27202
27229
  return g.create(m.NA);
27203
27230
  if (!e.isArray() || t.length % 2 !== 0 || t.some((u, c) => c % 2 === 0 && !u.isArray()))
27204
27231
  return g.create(m.VALUE);
27205
- const { maxRowLength: r, maxColumnLength: n } = Mr(t), s = kr(t, e, r, n);
27232
+ const { maxRowLength: r, maxColumnLength: n } = wr(t), s = kr(t, e, r, n);
27206
27233
  if (s)
27207
27234
  return s;
27208
27235
  const o = $r(t, r, n, !0);
@@ -27251,7 +27278,7 @@ class TA extends V {
27251
27278
  if (h.isNull() || h.isBoolean() || h.isString())
27252
27279
  continue;
27253
27280
  const d = h.getValue();
27254
- Q(d) && (t[+d] ? (t[+d].count++, t[+d].count > n && (n = t[+d].count)) : t[+d] = { count: 1, order: r++ });
27281
+ W(d) && (t[+d] ? (t[+d].count++, t[+d].count > n && (n = t[+d].count)) : t[+d] = { count: 1, order: r++ });
27255
27282
  }
27256
27283
  }
27257
27284
  return r === 0 || n === 1 ? new g(m.NA) : this._getResult(t, n);
@@ -27410,7 +27437,7 @@ class kA extends V {
27410
27437
  if (u.isNull() || u.isBoolean() || u.isString())
27411
27438
  continue;
27412
27439
  const c = u.getValue();
27413
- Q(c) && n.push(+c);
27440
+ W(c) && n.push(+c);
27414
27441
  }
27415
27442
  return n.length === 0 ? g.create(m.NUM) : n.sort((s, o) => s - o);
27416
27443
  }
@@ -27463,7 +27490,7 @@ class $A extends V {
27463
27490
  if (u.isNull() || u.isBoolean())
27464
27491
  continue;
27465
27492
  const c = u.getValue();
27466
- Q(c) && n.push(+c);
27493
+ W(c) && n.push(+c);
27467
27494
  }
27468
27495
  return n.sort((s, o) => s - o);
27469
27496
  }
@@ -27695,7 +27722,7 @@ class WA extends V {
27695
27722
  if (u.isNull() || u.isBoolean())
27696
27723
  continue;
27697
27724
  const c = u.getValue();
27698
- Q(c) && n.push(+c);
27725
+ W(c) && n.push(+c);
27699
27726
  }
27700
27727
  return n.length === 0 ? g.create(m.NUM) : n.sort((s, o) => s - o);
27701
27728
  }
@@ -27905,7 +27932,7 @@ class ZA extends V {
27905
27932
  if (f.isNull() || f.isBoolean())
27906
27933
  continue;
27907
27934
  const h = f.getValue();
27908
- Q(h) && (t.push(+h), r += +h);
27935
+ W(h) && (t.push(+h), r += +h);
27909
27936
  }
27910
27937
  }
27911
27938
  return t.length <= 2 ? g.create(m.DIV_BY_ZERO) : this._getResult(t, r);
@@ -27952,7 +27979,7 @@ class zA extends V {
27952
27979
  if (f.isNull() || f.isBoolean())
27953
27980
  continue;
27954
27981
  const h = f.getValue();
27955
- Q(h) && (t.push(+h), r += +h);
27982
+ W(h) && (t.push(+h), r += +h);
27956
27983
  }
27957
27984
  }
27958
27985
  return t.length <= 2 ? g.create(m.DIV_BY_ZERO) : this._getResult(t, r);
@@ -28054,7 +28081,7 @@ class eE extends V {
28054
28081
  if (u.isNull() || u.isBoolean() || u.isString())
28055
28082
  continue;
28056
28083
  const c = u.getValue();
28057
- Q(c) && n.push(+c);
28084
+ W(c) && n.push(+c);
28058
28085
  }
28059
28086
  return n.length === 0 ? g.create(m.NUM) : n.sort((s, o) => s - o);
28060
28087
  }
@@ -28295,7 +28322,7 @@ class cE extends V {
28295
28322
  const { isError: s, errorObject: o } = ss(e, t, r);
28296
28323
  if (s)
28297
28324
  return o;
28298
- const u = Ct(e);
28325
+ const u = _t(e);
28299
28326
  if (u instanceof g)
28300
28327
  return u;
28301
28328
  const c = this._getKnownXsValues(u, t);
@@ -28326,7 +28353,7 @@ class cE extends V {
28326
28353
  _ += u[0][l - 2 - C] * c[d][C];
28327
28354
  h[d].push(_);
28328
28355
  }
28329
- return s && (h = mt(h)), q.createByArray(h);
28356
+ return s && (h = gt(h)), q.createByArray(h);
28330
28357
  }
28331
28358
  _getResultBySimpleVariables(e, t, r, n) {
28332
28359
  const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = is(o, s, n, !1);
@@ -28336,10 +28363,10 @@ class cE extends V {
28336
28363
  return q.createByArray(l);
28337
28364
  }
28338
28365
  _getKnownXsValues(e, t) {
28339
- return !t || t.isNull() ? as(e.length, e[0].length) : Ct(t);
28366
+ return !t || t.isNull() ? as(e.length, e[0].length) : _t(t);
28340
28367
  }
28341
28368
  _getNewXsValues(e, t) {
28342
- return !t || t.isNull() ? e : Ct(t);
28369
+ return !t || t.isNull() ? e : _t(t);
28343
28370
  }
28344
28371
  }
28345
28372
  class lE extends V {
@@ -28378,7 +28405,7 @@ class lE extends V {
28378
28405
  if (u.isNull() || u.isBoolean())
28379
28406
  continue;
28380
28407
  const c = u.getValue();
28381
- Q(c) && n.push(+c);
28408
+ W(c) && n.push(+c);
28382
28409
  }
28383
28410
  return n.length === 0 ? g.create(m.NUM) : n.sort((s, o) => s - o);
28384
28411
  }
@@ -28821,7 +28848,7 @@ class VE extends V {
28821
28848
  let c = +o.getValue(), l = Math.trunc(+u.getValue());
28822
28849
  if (l > 127)
28823
28850
  return g.create(m.VALUE);
28824
- l < 0 && (`${c}`.length < Math.abs(l) ? c = 0 : c = c < 0 ? -vt(Math.abs(c), l) : vt(c, l), l = 0);
28851
+ l < 0 && (`${c}`.length < Math.abs(l) ? c = 0 : c = c < 0 ? -Tt(Math.abs(c), l) : Tt(c, l), l = 0);
28825
28852
  const f = Rl(this.getLocale(), c, l);
28826
28853
  return j.create(f);
28827
28854
  }
@@ -28858,7 +28885,7 @@ class NE extends V {
28858
28885
  return T.create(s);
28859
28886
  }
28860
28887
  }
28861
- const qa = (i, a) => dt.format(i, a, { throws: !1 }), Se = (i) => {
28888
+ const qa = (i, a) => Ct.format(i, a, { throws: !1 }), Se = (i) => {
28862
28889
  let a = `${i.getValue()}`;
28863
28890
  return i.isNull() && (a = ""), i.isBoolean() && (a = a.toLocaleUpperCase()), i.isNumber() && (i.getPattern() !== "" ? a = qa(i.getPattern(), +i.getValue()) : a = `${ba(+i.getValue())}`), a;
28864
28891
  };
@@ -29000,7 +29027,7 @@ class SE extends V {
29000
29027
  const d = +l.getValue();
29001
29028
  if (h > 127)
29002
29029
  return g.create(m.VALUE);
29003
- h < 0 && (`${f}`.length < Math.abs(h) ? f = 0 : f = f < 0 ? -vt(Math.abs(f), h) : vt(f, h), h = 0);
29030
+ h < 0 && (`${f}`.length < Math.abs(h) ? f = 0 : f = f < 0 ? -Tt(Math.abs(f), h) : Tt(f, h), h = 0);
29004
29031
  let _ = d ? "###0" : "#,##0";
29005
29032
  h > 0 && (_ += `.${"0".repeat(h)}`);
29006
29033
  const C = qa(_, f);
@@ -29271,6 +29298,9 @@ class kE extends V {
29271
29298
  A(this, "minParams", 1);
29272
29299
  A(this, "maxParams", 3);
29273
29300
  }
29301
+ isArgumentsIgnoreNumberPattern() {
29302
+ return !0;
29303
+ }
29274
29304
  calculate(e, t, r) {
29275
29305
  const n = t != null ? t : j.create("."), s = Math.max(
29276
29306
  e.isArray() ? e.getRowCount() : 1,
@@ -29312,13 +29342,13 @@ class kE extends V {
29312
29342
  c = c.slice(0, -1), f++;
29313
29343
  f > 0 ? l = +c / 100 ** f : l = +c;
29314
29344
  } else {
29315
- if (!Q(c))
29345
+ if (!W(c))
29316
29346
  return g.create(m.VALUE);
29317
29347
  let f = u[1], h = 0;
29318
29348
  for (; f.endsWith("%"); )
29319
29349
  f = f.slice(0, -1), h++;
29320
29350
  const d = `${c}.${f}`;
29321
- if (!Q(d))
29351
+ if (!W(d))
29322
29352
  return g.create(m.VALUE);
29323
29353
  h > 0 ? l = +d / 100 ** h : l = +d;
29324
29354
  }
@@ -30205,7 +30235,7 @@ class ub extends V {
30205
30235
  return c;
30206
30236
  let d = c.getValue();
30207
30237
  if (c.isNull() && (d = 0), c.isString()) {
30208
- if (!Q(d))
30238
+ if (!W(d))
30209
30239
  return c;
30210
30240
  d = Number(d);
30211
30241
  }
@@ -30960,7 +30990,7 @@ let sa = class extends Ne {
30960
30990
  }
30961
30991
  };
30962
30992
  sa = Mb([
30963
- Yi(0, sr),
30993
+ Yi(0, ar),
30964
30994
  Yi(1, ye(qu))
30965
30995
  ], sa);
30966
30996
  var wb = Object.getOwnPropertyDescriptor, Sb = (i, a, e, t) => {
@@ -31025,8 +31055,8 @@ let Tn = class extends Ne {
31025
31055
  }
31026
31056
  };
31027
31057
  Tn = Sb([
31028
- rn(0, sr),
31029
- rn(1, Ht),
31058
+ rn(0, ar),
31059
+ rn(1, Gt),
31030
31060
  rn(2, ia),
31031
31061
  rn(3, fc(Ac))
31032
31062
  ], Tn);
@@ -31112,7 +31142,7 @@ let Bn = class extends Ne {
31112
31142
  }
31113
31143
  };
31114
31144
  Bn = Lb([
31115
- nn(0, sr),
31145
+ nn(0, ar),
31116
31146
  nn(1, Tr),
31117
31147
  nn(1, es),
31118
31148
  nn(2, Tr)
@@ -31150,7 +31180,7 @@ let In = class extends Ne {
31150
31180
  }
31151
31181
  };
31152
31182
  In = xb([
31153
- Hi(0, sr),
31183
+ Hi(0, ar),
31154
31184
  Hi(1, Tr)
31155
31185
  ], In);
31156
31186
  var jb = Object.getOwnPropertyDescriptor, Ub = (i, a, e, t) => {
@@ -31188,7 +31218,7 @@ let Fn = class extends Ne {
31188
31218
  }
31189
31219
  };
31190
31220
  Fn = Ub([
31191
- Ns(0, sr),
31221
+ Ns(0, ar),
31192
31222
  Ns(1, Ma),
31193
31223
  Ns(2, es)
31194
31224
  ], Fn);
@@ -31231,7 +31261,7 @@ let kn = class extends Ne {
31231
31261
  }
31232
31262
  };
31233
31263
  kn = Tb([
31234
- Gi(0, sr),
31264
+ Gi(0, ar),
31235
31265
  Gi(1, Qu)
31236
31266
  ], kn);
31237
31267
  class Bb extends Ne {
@@ -31303,15 +31333,15 @@ let Wi = (Os = class extends hc {
31303
31333
  _initialize() {
31304
31334
  const i = !this._config.notExecuteFormula, a = [
31305
31335
  // Services
31306
- [Ht, { useClass: rh }],
31307
- [Vr, { useClass: xs }],
31336
+ [Gt, { useClass: rh }],
31337
+ [Nr, { useClass: xs }],
31308
31338
  [Ib, { useClass: Bb }],
31309
31339
  [Lo, { useClass: Qs }],
31310
31340
  [_o, { useClass: fl }],
31311
31341
  [Qu, { useClass: pb }],
31312
31342
  [qu],
31313
31343
  // Models
31314
- [dr],
31344
+ [Cr],
31315
31345
  // Engine
31316
31346
  [ga],
31317
31347
  //Controllers
@@ -31322,8 +31352,8 @@ let Wi = (Os = class extends hc {
31322
31352
  i && a.push(
31323
31353
  // Services
31324
31354
  [Ma, { useClass: Th }],
31325
- [Ot, { useClass: Ws }],
31326
- [kt, { useClass: vs }],
31355
+ [Mt, { useClass: Ws }],
31356
+ [$t, { useClass: vs }],
31327
31357
  [Tr, { useClass: vh }],
31328
31358
  //Controller
31329
31359
  [Pn],
@@ -31331,9 +31361,9 @@ let Wi = (Os = class extends hc {
31331
31361
  [Bn],
31332
31362
  [In],
31333
31363
  // Calculation engine
31334
- [Ar],
31364
+ [Er],
31335
31365
  [vr],
31336
- [Cr],
31366
+ [_r],
31337
31367
  // AstNode factory
31338
31368
  [Po],
31339
31369
  [On],
@@ -31370,8 +31400,8 @@ export {
31370
31400
  kf as AsyncObject,
31371
31401
  V as BaseFunction,
31372
31402
  Zn as BaseReferenceObject,
31373
- $t as BaseValueObject,
31374
- er as BooleanValue,
31403
+ Yt as BaseValueObject,
31404
+ tr as BooleanValue,
31375
31405
  T as BooleanValueObject,
31376
31406
  Pn as CalculateController,
31377
31407
  Js as CalculateFormulaService,
@@ -31382,7 +31412,7 @@ export {
31382
31412
  Uh as DependencyManagerService,
31383
31413
  zb as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
31384
31414
  Ca as ENGINE_FORMULA_PLUGIN_CONFIG_KEY,
31385
- Rr as ERROR_TYPE_SET,
31415
+ pr as ERROR_TYPE_SET,
31386
31416
  m as ErrorType,
31387
31417
  g as ErrorValueObject,
31388
31418
  ea as FUNCTION_NAMES_ARRAY,
@@ -31402,7 +31432,7 @@ export {
31402
31432
  Wu as FUNCTION_NAMES_WEB,
31403
31433
  vh as FeatureCalculationManagerService,
31404
31434
  vs as FormulaCurrentConfigService,
31405
- dr as FormulaDataModel,
31435
+ Cr as FormulaDataModel,
31406
31436
  Zs as FormulaDependencyGenerator,
31407
31437
  ys as FormulaDependencyTree,
31408
31438
  Ks as FormulaDependencyTreeType,
@@ -31417,22 +31447,22 @@ export {
31417
31447
  Qs as HyperlinkEngineFormulaService,
31418
31448
  Ib as IActiveDirtyManagerService,
31419
31449
  zs as ICalculateFormulaService,
31420
- Vr as IDefinedNamesService,
31450
+ Nr as IDefinedNamesService,
31421
31451
  es as IDependencyManagerService,
31422
31452
  Tr as IFeatureCalculationManagerService,
31423
- kt as IFormulaCurrentConfigService,
31453
+ $t as IFormulaCurrentConfigService,
31424
31454
  Xs as IFormulaDependencyGenerator,
31425
- Ot as IFormulaRuntimeService,
31426
- Ht as IFunctionService,
31455
+ Mt as IFormulaRuntimeService,
31456
+ Gt as IFunctionService,
31427
31457
  Lo as IHyperlinkEngineFormulaService,
31428
31458
  Ma as IOtherFormulaManagerService,
31429
31459
  _o as ISheetRowFilteredService,
31430
31460
  Qu as ISuperTableService,
31431
- Ar as Interpreter,
31461
+ Er as Interpreter,
31432
31462
  Mn as LambdaNodeFactory,
31433
31463
  Bo as LambdaParameterNodeFactory,
31434
31464
  Oa as LambdaValueObjectObject,
31435
- Cr as Lexer,
31465
+ _r as Lexer,
31436
31466
  ae as LexerNode,
31437
31467
  ga as LexerTreeBuilder,
31438
31468
  ue as NullValueObject,
@@ -31466,12 +31496,12 @@ export {
31466
31496
  Ln as UnionNodeFactory,
31467
31497
  Wi as UniverFormulaEnginePlugin,
31468
31498
  Io as ValueNodeFactory,
31469
- Vt as ValueObjectFactory,
31499
+ Nt as ValueObjectFactory,
31470
31500
  k as compareToken,
31471
31501
  Bc as convertUnitDataToRuntime,
31472
31502
  Gh as deserializeRangeForR1C1,
31473
31503
  Pr as deserializeRangeWithSheet,
31474
- gr as deserializeRangeWithSheetWithCache,
31504
+ dr as deserializeRangeWithSheetWithCache,
31475
31505
  Kh as functionArray,
31476
31506
  Sm as functionCompatibility,
31477
31507
  Dm as functionCube,
@@ -31490,7 +31520,7 @@ export {
31490
31520
  Nb as functionWeb,
31491
31521
  Vi as generateAstNode,
31492
31522
  Oi as generateExecuteAstNodeData,
31493
- or as generateRandomDependencyTreeId,
31523
+ ur as generateRandomDependencyTreeId,
31494
31524
  ci as generateStringWithSequence,
31495
31525
  Kb as getAbsoluteRefTypeWitString,
31496
31526
  on as getAbsoluteRefTypeWithSingleString,
@@ -31510,7 +31540,7 @@ export {
31510
31540
  Wb as normalizeSheetName,
31511
31541
  X as operatorToken,
31512
31542
  $e as sequenceNodeType,
31513
- Bt as serializeRange,
31543
+ It as serializeRange,
31514
31544
  Ds as serializeRangeToRefString,
31515
31545
  Yc as serializeRangeWithSheet,
31516
31546
  Hc as serializeRangeWithSpreadsheet,