@univerjs/engine-formula 0.15.1 → 0.15.2-insiders.20260122-b1556b1

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 kc = Object.defineProperty;
2
2
  var $c = (i, a, e) => a in i ? kc(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
3
3
  var A = (i, a, e) => $c(i, typeof a != "symbol" ? a + "" : a, e);
4
- import { LRUMap as Yc, hashAlgorithm as Hc, isRealNum as q, numfmt as yt, ObjectMatrix as me, CommandType as be, RANGE_TYPE as rt, AbsoluteRefType as Pe, Tools as Ge, createIdentifier as Je, Disposable as Se, IUniverInstanceService as ts, moveRangeByOffset as Ra, isValidRange as Gc, isFormulaString as At, isFormulaId as Lt, Rectangle as fi, cellToRange as Wc, Inject as Re, UniverInstanceType as Ar, BooleanNumber as Ao, LocaleService as Qc, BuildTextUtils as qc, LocaleType as Ct, getNumfmtParseValueFilter as ya, CellValueType as wt, isTextFormat as Xc, RichTextBuilder as Kc, toDisposable as Zc, Injector as Eo, generateRandomId as Ro, sortRules as zc, RTree as Fs, IConfigService as ba, AsyncLock as Jc, requestImmediateMacroTask as el, ICommandService as lr, DataStreamTreeTokenType as Be, DisposableCollection as tl, Optional as rl, LifecycleService as nl, Plugin as sl, merge as al, touchDependencies as ps } from "@univerjs/core";
4
+ import { LRUMap as Yc, hashAlgorithm as Hc, isRealNum as q, numfmt as bt, ObjectMatrix as me, CommandType as be, RANGE_TYPE as rt, AbsoluteRefType as Pe, Tools as Ge, createIdentifier as Je, Disposable as Se, IUniverInstanceService as Kr, moveRangeByOffset as Ra, isValidRange as Gc, isFormulaString as Et, isFormulaId as Lt, Rectangle as fi, cellToRange as Wc, Inject as _e, UniverInstanceType as rr, BooleanNumber as Ao, LocaleService as Qc, BuildTextUtils as qc, LocaleType as Ct, getNumfmtParseValueFilter as ya, CellValueType as wt, isTextFormat as Xc, RichTextBuilder as Kc, toDisposable as Zc, Injector as Eo, generateRandomId as Ro, sortRules as zc, RTree as Fs, IConfigService as ba, AsyncLock as Jc, requestImmediateMacroTask as el, ICommandService as mr, DataStreamTreeTokenType as Be, DisposableCollection as tl, Optional as rl, LifecycleService as nl, Plugin as sl, merge as al, touchDependencies as ps } from "@univerjs/core";
5
5
  import { Subject as xt, BehaviorSubject as pa, distinctUntilChanged as yo, combineLatest as il, map as ol, Observable as ul, shareReplay as cl, bufferWhen as ll, filter as mi } from "rxjs";
6
6
  import { DataSyncPrimaryController as fl } from "@univerjs/rpc";
7
- var ir = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(ir || {}), Ft = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(Ft || {}), we = /* @__PURE__ */ ((i) => (i.ALL = "#All", i.DATA = "#Data", i.HEADERS = "#Headers", i.TOTALS = "#Totals", i.THIS_ROW = "#This Row", i))(we || {}), ft = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ft || {});
7
+ var ur = /* @__PURE__ */ ((i) => (i.FALSE = "FALSE", i.TRUE = "TRUE", i))(ur || {}), Ft = /* @__PURE__ */ ((i) => (i[i.SUCCESS = 0] = "SUCCESS", i[i.ERROR = 1] = "ERROR", i))(Ft || {}), we = /* @__PURE__ */ ((i) => (i.ALL = "#All", i.DATA = "#Data", i.HEADERS = "#Headers", i.TOTALS = "#Totals", i.THIS_ROW = "#This Row", i))(we || {}), ft = /* @__PURE__ */ ((i) => (i[i.FRONT = 0] = "FRONT", i[i.BACK = 1] = "BACK", i))(ft || {});
8
8
  class Ut {
9
9
  constructor(a) {
10
10
  A(this, "_cache");
@@ -32,7 +32,7 @@ class Ut {
32
32
  }
33
33
  }
34
34
  var h = /* @__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))(h || {});
35
- const fr = new Set(Object.values(h)), hi = [...new Set(Object.values(h).map((i) => i.length))];
35
+ const hr = new Set(Object.values(h)), hi = [...new Set(Object.values(h).map((i) => i.length))];
36
36
  class rs {
37
37
  constructor() {
38
38
  A(this, "pattern", "");
@@ -72,7 +72,7 @@ class rs {
72
72
  }
73
73
  }
74
74
  var Z = /* @__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))(Z || {}), Y = /* @__PURE__ */ ((i) => (i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(Y || {});
75
- const En = /* @__PURE__ */ new Map([
75
+ const Rn = /* @__PURE__ */ new Map([
76
76
  ["<>", 4],
77
77
  ["<", 4],
78
78
  [">=", 4],
@@ -86,7 +86,7 @@ const En = /* @__PURE__ */ new Map([
86
86
  ["*", 1],
87
87
  ["^", 0]
88
88
  // ^
89
- ]), Dt = new Set(En.keys()), ml = /* @__PURE__ */ new Set([
89
+ ]), Dt = new Set(Rn.keys()), ml = /* @__PURE__ */ new Set([
90
90
  "=",
91
91
  "<>",
92
92
  ">",
@@ -441,7 +441,7 @@ function Ne(i) {
441
441
  let r = (t - a.getTime()) / (1e3 * 3600 * 24);
442
442
  return t > e.getTime() && (r += 1), Math.floor(r) + 1;
443
443
  }
444
- function Kr(i) {
444
+ function Zr(i) {
445
445
  const a = new Date(Date.UTC(1900, 0, 1, 0, 0, 0)), e = new Date(Date.UTC(1900, 1, 28, 0, 0, 0));
446
446
  let r = (i.getTime() - a.getTime()) / (1e3 * 3600 * 24);
447
447
  return i > e && (r += 1), r + 1;
@@ -465,14 +465,14 @@ function Oa(i) {
465
465
  const r = t.getFullYear(), n = (t.getMonth() + 1).toString().padStart(2, "0"), s = t.getDate().toString().padStart(2, "0"), o = `${r}-${n}-${s}`;
466
466
  return i.replace(/\//g, "-").split("-").map((c) => c.padStart(2, "0")).join("-") === o;
467
467
  }
468
- function Sn(i) {
469
- return yt.parseDate(i);
470
- }
471
468
  function Dn(i) {
472
- return yt.parseTime(i);
469
+ return bt.parseDate(i);
470
+ }
471
+ function wn(i) {
472
+ return bt.parseTime(i);
473
473
  }
474
474
  function Ma(i) {
475
- return yt.getFormatInfo(i).isDate;
475
+ return bt.getFormatInfo(i).isDate;
476
476
  }
477
477
  const bo = {
478
478
  1: [6, 0],
@@ -504,11 +504,11 @@ const bo = {
504
504
  17: [6]
505
505
  // Saturday only
506
506
  };
507
- function Br(i) {
507
+ function kr(i) {
508
508
  return !!(typeof i == "string" && /^[0|1]{7}/.test(i) || bo[Number(i)]);
509
509
  }
510
510
  function po(i) {
511
- if (!Br(i))
511
+ if (!kr(i))
512
512
  return [];
513
513
  if (typeof i == "string" && /^[0|1]{7}/.test(i)) {
514
514
  const a = [];
@@ -518,7 +518,7 @@ function po(i) {
518
518
  }
519
519
  return bo[Number(i)] || [];
520
520
  }
521
- function wn(i, a, e = 1, t) {
521
+ function Ln(i, a, e = 1, t) {
522
522
  const r = po(e), n = Math.floor(i), s = Math.floor(a), o = s > n ? n : s;
523
523
  let u = 0;
524
524
  const c = Math.abs(Math.floor(a) - Math.floor(i)) + 1;
@@ -526,12 +526,12 @@ function wn(i, a, e = 1, t) {
526
526
  const f = o + l;
527
527
  if (t && t.length > 0 && t.some((d) => Math.floor(d) === f))
528
528
  continue;
529
- const m = or(f);
529
+ const m = cr(f);
530
530
  r.includes(m) || u++;
531
531
  }
532
532
  return s >= n ? u : -u;
533
533
  }
534
- function Ln(i, a, e = 1, t) {
534
+ function Pn(i, a, e = 1, t) {
535
535
  const r = po(e), n = Math.floor(i);
536
536
  let s = n, o = Math.abs(a);
537
537
  for (let u = 1; u <= o; u++) {
@@ -542,7 +542,7 @@ function Ln(i, a, e = 1, t) {
542
542
  o++;
543
543
  continue;
544
544
  }
545
- const l = or(c);
545
+ const l = cr(c);
546
546
  if (r.includes(l)) {
547
547
  o++;
548
548
  continue;
@@ -557,27 +557,27 @@ function H(i) {
557
557
  const a = i.getValue();
558
558
  if (i.isString()) {
559
559
  let e;
560
- if (Sn(`${a}`))
561
- e = Sn(`${a}`).v;
562
- else if (Dn(`${a}`))
560
+ if (Dn(`${a}`))
563
561
  e = Dn(`${a}`).v;
562
+ else if (wn(`${a}`))
563
+ e = wn(`${a}`).v;
564
564
  else if (q(a))
565
565
  e = +a;
566
566
  else
567
567
  return g.create(h.VALUE);
568
- return e instanceof Date && (e = Kr(e)), +e < 0 || +e > 2958465 ? g.create(h.NUM) : +e;
568
+ return e instanceof Date && (e = Zr(e)), +e < 0 || +e > 2958465 ? g.create(h.NUM) : +e;
569
569
  } else {
570
570
  const e = +i.getValue();
571
571
  return e < 0 || e > 2958465 ? g.create(h.NUM) : e;
572
572
  }
573
573
  }
574
- function or(i) {
574
+ function cr(i) {
575
575
  const a = Math.floor(i) === 60;
576
576
  let e = ae(i);
577
577
  const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())).getTime(), r = new Date(Date.UTC(1900, 1, 28)).getTime();
578
578
  return !a && t <= r && (e = new Date(t - 24 * 3600 * 1e3)), new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())).getUTCDay();
579
579
  }
580
- function _e(i, a, e) {
580
+ function Ae(i, a, e) {
581
581
  switch (e) {
582
582
  case 0:
583
583
  return _l(i, a);
@@ -646,7 +646,7 @@ function yl(i) {
646
646
  return i % 4 === 0 && i % 100 !== 0 || i % 400 === 0 || i === 1900;
647
647
  }
648
648
  const bl = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], pl = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
649
- function Zr(i, a) {
649
+ function zr(i, a) {
650
650
  return Rl(i) ? bl[a] : pl[a];
651
651
  }
652
652
  function ns(i) {
@@ -666,13 +666,13 @@ function No(i, a) {
666
666
  return -1;
667
667
  }
668
668
  }
669
- function br(i, a, e) {
670
- return Zr(i, a) === e;
669
+ function pr(i, a, e) {
670
+ return zr(i, a) === e;
671
671
  }
672
- function pr(i, a) {
672
+ function Nr(i, a) {
673
673
  let e = i.getUTCFullYear(), t = i.getUTCMonth();
674
674
  const r = i.getUTCDate();
675
- return br(e, t, r) ? (i.setUTCDate(1), i.setUTCMonth(i.getUTCMonth() + a), e = i.getUTCFullYear(), t = i.getUTCMonth(), i.setUTCDate(Zr(e, t))) : i.setUTCMonth(i.getUTCMonth() + a), i;
675
+ return pr(e, t, r) ? (i.setUTCDate(1), i.setUTCMonth(i.getUTCMonth() + a), e = i.getUTCFullYear(), t = i.getUTCMonth(), i.setUTCDate(zr(e, t))) : i.setUTCMonth(i.getUTCMonth() + a), i;
676
676
  }
677
677
  function Nl(i, a, e, t, r) {
678
678
  for (let n = 0, s = i.length; n < s; n++) {
@@ -693,7 +693,7 @@ const Vo = [
693
693
  ...Object.values(nt),
694
694
  ...Object.values(Le)
695
695
  ];
696
- function Rn(i) {
696
+ function yn(i) {
697
697
  return Vo.includes(i);
698
698
  }
699
699
  function Ol(i) {
@@ -706,7 +706,7 @@ function rb(i) {
706
706
  return i[0] === "'" && i[i.length - 1] === "'" ? i.substring(1, i.length - 1) : i;
707
707
  }
708
708
  function nb(i) {
709
- return Rn(i) && i !== X.CLOSE_BRACES && i !== X.CLOSE_BRACKET && i !== X.SINGLE_QUOTATION && i !== X.DOUBLE_QUOTATION || i === " ";
709
+ return yn(i) && i !== X.CLOSE_BRACES && i !== X.CLOSE_BRACKET && i !== X.SINGLE_QUOTATION && i !== X.DOUBLE_QUOTATION || i === " ";
710
710
  }
711
711
  const Ml = /* @__PURE__ */ new Set([
712
712
  Z.PLUS,
@@ -754,8 +754,8 @@ const Dl = /* @__PURE__ */ new Set([
754
754
  function wl(i) {
755
755
  return Dl.has(i);
756
756
  }
757
- const Lr = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', gi = new RegExp(Lr), Ll = "((?![\\[\\]\\/?*\\\\]).)*!", Yt = "$", ss = "\\s*?:\\s*?", Pn = "[A-Za-z]+", xn = "[1-9][0-9]*", Pr = `'?(${Lr})?(${Ll})?'?`, ks = `\\${Yt}?${Pn}\\${Yt}?${xn}`, Pl = `^(${Le.AT})?${Pr}${ks}${ss}${ks}$`, di = new RegExp(Pl), xl = `^${Pr}\\s*?${ks}(${nt.POUND})?$`, Ci = new RegExp(xl), jl = `^${Pr}\\${Yt}?${xn}${ss}\\${Yt}?${xn}$`, _i = new RegExp(jl), Ul = `^${Pr}\\${Yt}?${Pn}${ss}\\${Yt}?${Pn}$`, Ai = new RegExp(Ul), Tl = `^${Pr}\\s*?\\${Yt}?${xn}$`, Ei = new RegExp(Tl), vl = `^${Pr}\\s*?\\${Yt}?${Pn}$`, Ri = new RegExp(vl), kr = "((?![~!@#$%^&*()_+<>?:,./;’,。、‘:“《》?~!@#¥%……()【】\\[\\]\\/\\\\]).)+", Oo = "\\[#.+\\]\\s*?,\\s*?", jn = "\\[((?<!#).)*\\]", yi = `${jn}${ss}${jn}`, Il = `^(${Lr})?${kr}$`, Fl = `^(${Lr})?${kr}(${jn}|\\[${Oo}${jn}\\])+$`, Bl = `^(${Lr})?${kr}(\\[${yi}\\])?$|^${kr}(\\[${Oo}${yi}\\])?$`, kl = `^(${Lr})?${kr}\\[\\s*#([^\\]]+)\\s*\\]$`, bi = new RegExp(Il), pi = new RegExp(Fl), Ni = new RegExp(Bl), Vi = new RegExp(kl), $l = "{.*?}", Oi = new RegExp($l, "g");
758
- function zr(i) {
757
+ const Pr = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', gi = new RegExp(Pr), Ll = "((?![\\[\\]\\/?*\\\\]).)*!", Yt = "$", ss = "\\s*?:\\s*?", xn = "[A-Za-z]+", jn = "[1-9][0-9]*", xr = `'?(${Pr})?(${Ll})?'?`, ks = `\\${Yt}?${xn}\\${Yt}?${jn}`, Pl = `^(${Le.AT})?${xr}${ks}${ss}${ks}$`, di = new RegExp(Pl), xl = `^${xr}\\s*?${ks}(${nt.POUND})?$`, Ci = new RegExp(xl), jl = `^${xr}\\${Yt}?${jn}${ss}\\${Yt}?${jn}$`, _i = new RegExp(jl), Ul = `^${xr}\\${Yt}?${xn}${ss}\\${Yt}?${xn}$`, Ai = new RegExp(Ul), Tl = `^${xr}\\s*?\\${Yt}?${jn}$`, Ei = new RegExp(Tl), vl = `^${xr}\\s*?\\${Yt}?${xn}$`, Ri = new RegExp(vl), $r = "((?![~!@#$%^&*()_+<>?:,./;’,。、‘:“《》?~!@#¥%……()【】\\[\\]\\/\\\\]).)+", Oo = "\\[#.+\\]\\s*?,\\s*?", Un = "\\[((?<!#).)*\\]", yi = `${Un}${ss}${Un}`, Il = `^(${Pr})?${$r}$`, Fl = `^(${Pr})?${$r}(${Un}|\\[${Oo}${Un}\\])+$`, Bl = `^(${Pr})?${$r}(\\[${yi}\\])?$|^${$r}(\\[${Oo}${yi}\\])?$`, kl = `^(${Pr})?${$r}\\[\\s*#([^\\]]+)\\s*\\]$`, bi = new RegExp(Il), pi = new RegExp(Fl), Ni = new RegExp(Bl), Vi = new RegExp(kl), $l = "{.*?}", Oi = new RegExp($l, "g");
758
+ function Jr(i) {
759
759
  return Ci.lastIndex = 0, Ci.test(i);
760
760
  }
761
761
  function Yl(i) {
@@ -789,7 +789,7 @@ function ql(i) {
789
789
  return Oi.lastIndex = 0, Oi.test(i);
790
790
  }
791
791
  function Lo(i) {
792
- return zr(i) || Yl(i) || Mo(i) || So(i);
792
+ return Jr(i) || Yl(i) || Mo(i) || So(i);
793
793
  }
794
794
  function Mi(i) {
795
795
  const a = {};
@@ -819,7 +819,7 @@ function Xl(i) {
819
819
  }
820
820
  return a;
821
821
  }
822
- const _t = "P_1", kt = "R_1", Nr = "L_1", Jr = "LR_1", Po = "LO_1", Kl = "LET", $r = "LAMBDA", Zl = "CUBE", zl = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), cn = {
822
+ const At = "P_1", kt = "R_1", Vr = "L_1", en = "LR_1", Po = "LO_1", Kl = "LET", Yr = "LAMBDA", Zl = "CUBE", zl = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), ln = {
823
823
  type: be.MUTATION,
824
824
  id: "sheet.mutation.data-validation-formula-mark-dirty",
825
825
  handler() {
@@ -834,7 +834,7 @@ const _t = "P_1", kt = "R_1", Nr = "L_1", Jr = "LR_1", Po = "LO_1", Kl = "LET",
834
834
  type: be.MUTATION,
835
835
  handler: (i, a) => !0
836
836
  }, ef = /[^0-9]/g, tf = /[^A-Za-z]/g;
837
- function yn(i) {
837
+ function bn(i) {
838
838
  let a = i[0] === "$";
839
839
  const e = i.substring(1);
840
840
  let t = e.indexOf("$") > -1;
@@ -845,9 +845,9 @@ function sb(i) {
845
845
  a.length > 1 && (i = a[a.length - 1]);
846
846
  const e = i.split(":");
847
847
  return e.length > 1 ? {
848
- startAbsoluteRefType: yn(e[0]),
849
- endAbsoluteRefType: yn(e[1])
850
- } : { startAbsoluteRefType: yn(e[0]) };
848
+ startAbsoluteRefType: bn(e[0]),
849
+ endAbsoluteRefType: bn(e[1])
850
+ } : { startAbsoluteRefType: bn(e[0]) };
851
851
  }
852
852
  function Si(i = Pe.NONE) {
853
853
  let a = "", e = "";
@@ -888,7 +888,7 @@ function Ys(i) {
888
888
  return a != null && a.length > 0 && e != null && e.length > 0 ? nf(a, e, t) : e != null && e.length > 0 ? rf(e, t) : Ht(t);
889
889
  }
890
890
  function Vs(i) {
891
- const a = Number.parseInt(i.replace(ef, "")) - 1, e = Ge.ABCatNum(i.replace(tf, "")), t = yn(i);
891
+ const a = Number.parseInt(i.replace(ef, "")) - 1, e = Ge.ABCatNum(i.replace(tf, "")), t = bn(i);
892
892
  return {
893
893
  row: a,
894
894
  column: e,
@@ -907,7 +907,7 @@ function Sa(i) {
907
907
  unitId: e
908
908
  };
909
909
  }
910
- function Yr(i) {
910
+ function Hr(i) {
911
911
  const { refBody: a, sheetName: e, unitId: t } = Sa(i), r = a.indexOf(":");
912
912
  if (r === -1) {
913
913
  const _ = Vs(a), C = _.row, E = _.column, R = _.absoluteRefType;
@@ -941,11 +941,11 @@ function Yr(i) {
941
941
  };
942
942
  }
943
943
  const sf = ["LOG10"];
944
- function bn(i) {
944
+ function pn(i) {
945
945
  const a = xo(i);
946
946
  if (!Lo(a) || sf.includes(a.toUpperCase().trim()))
947
947
  return !1;
948
- const { range: e } = Yr(a);
948
+ const { range: e } = Hr(a);
949
949
  return !(e.endColumn >= 16384);
950
950
  }
951
951
  function xo(i) {
@@ -966,7 +966,7 @@ function xo(i) {
966
966
  function ab(i, a) {
967
967
  const e = (i == null ? void 0 : i.split(",")) || [];
968
968
  return i === "" || e.length === 0 ? [] : af(i) ? e.map((n) => {
969
- const s = Yr(n);
969
+ const s = Hr(n);
970
970
  return {
971
971
  unitId: s.unitId,
972
972
  sheetId: a(s.sheetName),
@@ -976,7 +976,7 @@ function ab(i, a) {
976
976
  }) : [];
977
977
  }
978
978
  function af(i) {
979
- return ((i == null ? void 0 : i.split(",")) || []).every((e) => bn(e.trim()));
979
+ return ((i == null ? void 0 : i.split(",")) || []).every((e) => pn(e.trim()));
980
980
  }
981
981
  function Hs(i) {
982
982
  return i.length === 0 ? !1 : !!(Ol(i) || of(i) || uf(i) || cf(i) || /[\s!$%^&*()+\-=\[\]{};':"\\|,.<>\/?()]/.test(i));
@@ -1122,12 +1122,12 @@ let Ws = class extends Se {
1122
1122
  }
1123
1123
  };
1124
1124
  Ws = mf([
1125
- hf(0, ts)
1125
+ hf(0, Kr)
1126
1126
  ], Ws);
1127
- const xr = Je("univer.formula.defined-names.service"), ib = (i, a) => {
1127
+ const jr = Je("univer.formula.defined-names.service"), ib = (i, a) => {
1128
1128
  const { unitId: e, id: t } = a;
1129
1129
  return {
1130
- ...i.get(xr).getValueById(e, t),
1130
+ ...i.get(jr).getValueById(e, t),
1131
1131
  unitId: e
1132
1132
  };
1133
1133
  }, Uo = {
@@ -1136,7 +1136,7 @@ const xr = Je("univer.formula.defined-names.service"), ib = (i, a) => {
1136
1136
  handler: (i, a) => {
1137
1137
  if (a == null)
1138
1138
  return !1;
1139
- const e = i.get(xr), { id: t, unitId: r, name: n, formulaOrRefString: s, comment: o, hidden: u, localSheetId: c, formulaOrRefStringWithPrefix: l } = a;
1139
+ const e = i.get(jr), { id: t, unitId: r, name: n, formulaOrRefString: s, comment: o, hidden: u, localSheetId: c, formulaOrRefStringWithPrefix: l } = a;
1140
1140
  return e.registerDefinedName(r, {
1141
1141
  id: t,
1142
1142
  name: n.trim(),
@@ -1153,7 +1153,7 @@ const xr = Je("univer.formula.defined-names.service"), ib = (i, a) => {
1153
1153
  handler: (i, a) => {
1154
1154
  if (a == null)
1155
1155
  return !1;
1156
- const e = i.get(xr), { unitId: t, id: r } = a;
1156
+ const e = i.get(jr), { unitId: t, id: r } = a;
1157
1157
  return e.removeDefinedName(t, r), !0;
1158
1158
  }
1159
1159
  }, Da = {
@@ -1184,7 +1184,7 @@ const xr = Je("univer.formula.defined-names.service"), ib = (i, a) => {
1184
1184
  id: "formula.mutation.set-formula-calculation-stop",
1185
1185
  type: be.MUTATION,
1186
1186
  handler: () => !0
1187
- }, Un = {
1187
+ }, Tn = {
1188
1188
  id: "formula.mutation.set-formula-calculation-notification",
1189
1189
  type: be.MUTATION,
1190
1190
  handler: () => !0
@@ -1284,34 +1284,34 @@ class Cf extends Se {
1284
1284
  this._update$.next(null);
1285
1285
  }
1286
1286
  }
1287
- const en = Je("univer.formula.super-table.service"), _f = {
1287
+ const tn = Je("univer.formula.super-table.service"), _f = {
1288
1288
  id: "formula.mutation.set-super-table",
1289
1289
  type: be.MUTATION,
1290
1290
  handler: (i, a) => {
1291
1291
  const { unitId: e, tableName: t, reference: r } = a;
1292
- return i.get(en).registerTable(e, t, r), !0;
1292
+ return i.get(tn).registerTable(e, t, r), !0;
1293
1293
  }
1294
1294
  }, Af = {
1295
1295
  id: "formula.mutation.remove-super-table",
1296
1296
  type: be.MUTATION,
1297
1297
  handler: (i, a) => {
1298
1298
  const { unitId: e, tableName: t } = a;
1299
- return i.get(en).remove(e, t), !0;
1299
+ return i.get(tn).remove(e, t), !0;
1300
1300
  }
1301
1301
  }, Ef = {
1302
1302
  id: "formula.mutation.set-super-table-option",
1303
1303
  type: be.MUTATION,
1304
1304
  handler: (i, a) => {
1305
1305
  const { tableOption: e, tableOptionType: t } = a;
1306
- return i.get(en).registerTableOptionMap(e, t), !0;
1306
+ return i.get(tn).registerTableOptionMap(e, t), !0;
1307
1307
  }
1308
1308
  }, qs = new Ut(1e5);
1309
- function Vr(i) {
1309
+ function Or(i) {
1310
1310
  const a = qs.get(i);
1311
1311
  if (a)
1312
1312
  return a;
1313
- const e = Yr(i);
1314
- return qs.set(i, e), Yr(i);
1313
+ const e = Hr(i);
1314
+ return qs.set(i, e), Hr(i);
1315
1315
  }
1316
1316
  function Rf() {
1317
1317
  qs.clear();
@@ -1431,7 +1431,7 @@ class ie {
1431
1431
  }
1432
1432
  }
1433
1433
  const Xo = 2e3, Os = new Ut(Xo), Ms = new Ut(Xo);
1434
- class Hr extends Se {
1434
+ class Gr extends Se {
1435
1435
  constructor() {
1436
1436
  super(...arguments);
1437
1437
  A(this, "_currentLexerNode", new ie());
@@ -1500,7 +1500,7 @@ class Hr extends Se {
1500
1500
  let s = n.getParent(), o = n;
1501
1501
  for (; s; ) {
1502
1502
  const u = s.getToken();
1503
- if (u !== _t && !Rn(u) && s.getStartIndex() !== -1) {
1503
+ if (u !== At && !yn(u) && s.getStartIndex() !== -1) {
1504
1504
  const c = s.getChildren().indexOf(o);
1505
1505
  return {
1506
1506
  functionName: u,
@@ -1527,7 +1527,7 @@ class Hr extends Se {
1527
1527
  let u = o.getParent(), c = 0;
1528
1528
  for (s[1] === X.OPEN_BRACKET && c++; u; ) {
1529
1529
  const l = u.getToken();
1530
- l !== _t && l !== X.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== $r && (t === 0 ? c += 1 : t--), u = u.getParent();
1530
+ l !== At && l !== X.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== Yr && (t === 0 ? c += 1 : t--), u = u.getParent();
1531
1531
  }
1532
1532
  return c;
1533
1533
  }
@@ -1550,7 +1550,7 @@ class Hr extends Se {
1550
1550
  for (let u = 0, c = s.length; u < c; u++) {
1551
1551
  const l = s[u];
1552
1552
  if (typeof l != "string" && l.nodeType === He.REFERENCE) {
1553
- const { token: f, endIndex: m } = l, d = Vr(f);
1553
+ const { token: f, endIndex: m } = l, d = Or(f);
1554
1554
  if (d == null)
1555
1555
  continue;
1556
1556
  const { range: _, sheetName: C, unitId: E } = d, R = {
@@ -1586,7 +1586,7 @@ class Hr extends Se {
1586
1586
  o.push(l);
1587
1587
  continue;
1588
1588
  }
1589
- const { token: f } = l, m = Vr(f), { sheetName: d, unitId: _ } = m;
1589
+ const { token: f } = l, m = Or(f), { sheetName: d, unitId: _ } = m;
1590
1590
  let C = m.range;
1591
1591
  if (!n && C.startAbsoluteRefType === Pe.ALL && C.endAbsoluteRefType === Pe.ALL) {
1592
1592
  o.push(l);
@@ -1638,12 +1638,12 @@ class Hr extends Se {
1638
1638
  const m = n - f.length;
1639
1639
  let d = n - 1;
1640
1640
  const _ = n - 1;
1641
- if (n === s - 1 && this._isLastMergeString(l) && (f += l, d += 1), f === "" || En.has(f)) {
1641
+ if (n === s - 1 && this._isLastMergeString(l) && (f += l, d += 1), f === "" || Rn.has(f)) {
1642
1642
  t.push(l);
1643
1643
  continue;
1644
1644
  }
1645
1645
  const C = f.trim(), E = xo(C);
1646
- r === !0 && C[C.length - 1] === X.DOUBLE_QUOTATION && C[0] !== X.OPEN_BRACES ? (r = !1, this._processPushSequenceNode(t, He.STRING, f, m, d, _)) : zr(E) && bn(E) ? this._processPushSequenceNode(t, He.REFERENCE, f, m, d, _) : Ge.isStringNumber(C) ? this._processPushSequenceNode(t, He.NUMBER, f, m, d, _) : C.length > 0 && this._processPushSequenceNode(t, He.FUNCTION, f, m, d, _), (n !== s - 1 || !this._isLastMergeString(l)) && t.push(l);
1646
+ r === !0 && C[C.length - 1] === X.DOUBLE_QUOTATION && C[0] !== X.OPEN_BRACES ? (r = !1, this._processPushSequenceNode(t, He.STRING, f, m, d, _)) : Jr(E) && pn(E) ? this._processPushSequenceNode(t, He.REFERENCE, f, m, d, _) : Ge.isStringNumber(C) ? this._processPushSequenceNode(t, He.NUMBER, f, m, d, _) : C.length > 0 && this._processPushSequenceNode(t, He.FUNCTION, f, m, d, _), (n !== s - 1 || !this._isLastMergeString(l)) && t.push(l);
1647
1647
  }
1648
1648
  return this._mergeSequenceNodeReference(t);
1649
1649
  }
@@ -1663,7 +1663,7 @@ class Hr extends Se {
1663
1663
  return this._nodeMaker(e, void 0, t);
1664
1664
  }
1665
1665
  _isLastMergeString(e) {
1666
- return e === X.DOUBLE_QUOTATION || Ge.isStringNumber(e) || !Rn(e);
1666
+ return e === X.DOUBLE_QUOTATION || Ge.isStringNumber(e) || !yn(e);
1667
1667
  }
1668
1668
  /**
1669
1669
  * Merge array and handle ref operations
@@ -1683,7 +1683,7 @@ class Hr extends Se {
1683
1683
  t.push(s);
1684
1684
  } else {
1685
1685
  const o = e[n + 1], u = e[n + 2];
1686
- o === X.COLON && typeof s != "string" && u != null && typeof u != "string" && bn((s.token + o + u.token).trim()) && (s.nodeType = He.REFERENCE, s.token += o + u.token, s.endIndex = u.endIndex, n += 2), t.push(s);
1686
+ o === X.COLON && typeof s != "string" && u != null && typeof u != "string" && pn((s.token + o + u.token).trim()) && (s.nodeType = He.REFERENCE, s.token += o + u.token, s.endIndex = u.endIndex, n += 2), t.push(s);
1687
1687
  }
1688
1688
  n++;
1689
1689
  }
@@ -1699,7 +1699,7 @@ class Hr extends Se {
1699
1699
  const s = r.token.match(/^(\s*([-@+]\s*)+)(.*)$/);
1700
1700
  if (s) {
1701
1701
  const o = s[1], u = s[3];
1702
- if (bn(u.trim())) {
1702
+ if (pn(u.trim())) {
1703
1703
  const c = o.length, l = r.startIndex, f = r.startIndex + c - 1, m = {
1704
1704
  nodeType: He.NORMAL,
1705
1705
  // Use appropriate nodeType for operators
@@ -1868,7 +1868,7 @@ class Hr extends Se {
1868
1868
  const m = (u = s[s.length - 1]) == null ? void 0 : u.trim();
1869
1869
  if (!m || m === X.OPEN_BRACKET)
1870
1870
  break;
1871
- const d = En.get(m), _ = En.get(f);
1871
+ const d = Rn.get(m), _ = Rn.get(f);
1872
1872
  if (d === void 0 || _ === void 0)
1873
1873
  break;
1874
1874
  if (_ >= d)
@@ -2026,7 +2026,7 @@ class Hr extends Se {
2026
2026
  var r, n, s, o, u, c;
2027
2027
  const e = (r = this._currentLexerNode) == null ? void 0 : r.getParent();
2028
2028
  let t = !1;
2029
- if (e && e.getToken() === Nr) {
2029
+ if (e && e.getToken() === Vr) {
2030
2030
  if ((n = e == null ? void 0 : e.getParent()) != null && n.getParent()) {
2031
2031
  const l = (o = (s = this._currentLexerNode.getParent()) == null ? void 0 : s.getParent()) == null ? void 0 : o.getParent();
2032
2032
  l && (this._currentLexerNode = l), t = !0;
@@ -2149,7 +2149,7 @@ class Hr extends Se {
2149
2149
  let s = r[++n];
2150
2150
  for (; s === " "; )
2151
2151
  s = r[++n];
2152
- return !!Rn(s);
2152
+ return !!yn(s);
2153
2153
  }
2154
2154
  _checkIfErrorObject(e, t) {
2155
2155
  return !!this._findErrorObject(e, t);
@@ -2157,7 +2157,7 @@ class Hr extends Se {
2157
2157
  _findErrorObject(e, t) {
2158
2158
  for (let r = 0; r < hi.length; r++) {
2159
2159
  const n = hi[r], s = t.slice(e, e + n).join("").toUpperCase();
2160
- if (fr.has(s))
2160
+ if (hr.has(s))
2161
2161
  return s;
2162
2162
  }
2163
2163
  }
@@ -2197,7 +2197,7 @@ class Hr extends Se {
2197
2197
  return h.VALUE;
2198
2198
  this._addSequenceArray(t, c, u), u++, this._addSequenceArray(t, l, u), u++, this._closeBracket();
2199
2199
  continue;
2200
- } else l && this._newAndPushCurrentLexerNode(_t, u);
2200
+ } else l && this._newAndPushCurrentLexerNode(At, u);
2201
2201
  } else
2202
2202
  this._pushNodeToChildren(c), this._openBracket(
2203
2203
  0
@@ -2213,7 +2213,7 @@ class Hr extends Se {
2213
2213
  if (f && f === X.OPEN_BRACKET) {
2214
2214
  if (!this._setParentCurrentLexerNode() && u !== o - 1)
2215
2215
  return h.VALUE;
2216
- this._newAndPushCurrentLexerNode(Nr, u, !0), this._openLambda();
2216
+ this._newAndPushCurrentLexerNode(Vr, u, !0), this._openLambda();
2217
2217
  } else if (!this._setAncestorCurrentLexerNode() && u !== o - 1)
2218
2218
  return h.VALUE;
2219
2219
  } else
@@ -2254,12 +2254,12 @@ class Hr extends Se {
2254
2254
  if (l === 1 || l == null) {
2255
2255
  if (this._pushNodeToChildren(this._segment), this._resetSegment(), !this._setParentCurrentLexerNode() && u !== o - 1 && l != null)
2256
2256
  return h.VALUE;
2257
- this._newAndPushCurrentLexerNode(_t, u);
2257
+ this._newAndPushCurrentLexerNode(At, u);
2258
2258
  } else {
2259
2259
  const f = new ie();
2260
2260
  f.setToken(Zl);
2261
2261
  const m = new ie();
2262
- m.setToken(_t), m.changeToParent(f);
2262
+ m.setToken(At), m.changeToParent(f);
2263
2263
  const d = this._currentLexerNode.getParent();
2264
2264
  if (d && d.getToken() === X.COLON) {
2265
2265
  const _ = d.getParent();
@@ -2271,15 +2271,15 @@ class Hr extends Se {
2271
2271
  this._changeCurrentBracket(
2272
2272
  1
2273
2273
  /* FUNCTION */
2274
- ), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(_t, u);
2274
+ ), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(At, u);
2275
2275
  }
2276
2276
  } else if (c === X.COLON && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isBracesClose() && this.isSquareBracketClose()) {
2277
2277
  const l = new ie();
2278
2278
  l.setToken(c);
2279
2279
  const f = new ie();
2280
- f.setToken(_t), f.setParent(l);
2280
+ f.setToken(At), f.setParent(l);
2281
2281
  const m = new ie();
2282
- m.setToken(_t), m.setParent(l), l.getChildren().push(f, m);
2282
+ m.setToken(At), m.setParent(l), l.getChildren().push(f, m);
2283
2283
  let d = l, _ = 0;
2284
2284
  if (this._segmentCount() > 0) {
2285
2285
  let C, E, R = 0;
@@ -2371,28 +2371,28 @@ class Hr extends Se {
2371
2371
  }
2372
2372
  }
2373
2373
  function yf(i, a, e, t, r, n, s) {
2374
- const o = (s == null ? void 0 : s.f) || "", u = (s == null ? void 0 : s.si) || "", c = At(o), l = Lt(u), f = i.getValue(r, n), m = (f == null ? void 0 : f.f) || "", d = (f == null ? void 0 : f.si) || "";
2375
- function _() {
2376
- var C;
2377
- if (At(m) && Lt(d)) {
2378
- const E = (C = e == null ? void 0 : e[d]) == null ? void 0 : C.f;
2379
- E ? t.set(d, E) : t.set(d, m);
2374
+ const o = (s == null ? void 0 : s.f) || "", u = (s == null ? void 0 : s.si) || "", c = Et(o), l = Lt(u), f = i.getValue(r, n), m = (f == null ? void 0 : f.f) || "", d = (f == null ? void 0 : f.si) || "", _ = (f == null ? void 0 : f.x) || 0, C = (f == null ? void 0 : f.y) || 0;
2375
+ function E() {
2376
+ var R;
2377
+ if (Et(m) && Lt(d) && _ === 0 && C === 0) {
2378
+ const y = (R = e == null ? void 0 : e[d]) == null ? void 0 : R.f;
2379
+ y ? t.set(d, y) : t.set(d, m);
2380
2380
  }
2381
2381
  }
2382
- c && l ? (d !== u && _(), i.setValue(r, n, {
2382
+ c && l ? (d !== u && E(), i.setValue(r, n, {
2383
2383
  f: o,
2384
2384
  si: u
2385
2385
  }), e[u] = { f: o, r, c: n }, a.setValue(r, n, {
2386
2386
  f: o,
2387
2387
  si: u
2388
- })) : c && !l ? (m !== o && _(), i.setValue(r, n, {
2388
+ })) : c && !l ? (m !== o && E(), i.setValue(r, n, {
2389
2389
  f: o
2390
2390
  }), a.setValue(r, n, {
2391
2391
  f: o
2392
- })) : !c && l ? (d !== u && _(), i.setValue(r, n, {
2392
+ })) : !c && l ? (d !== u && E(), i.setValue(r, n, {
2393
2393
  f: "",
2394
2394
  si: u
2395
- })) : !c && !l && i.getValue(r, n) && (_(), i.realDeleteValue(r, n), a.setValue(r, n, null));
2395
+ })) : !c && !l && i.getValue(r, n) && (E(), i.realDeleteValue(r, n), a.setValue(r, n, null));
2396
2396
  }
2397
2397
  function bf(i, a, e, t) {
2398
2398
  const r = i == null ? void 0 : i.getValue(e, t);
@@ -2415,7 +2415,7 @@ var pf = Object.getOwnPropertyDescriptor, Nf = (i, a, e, t) => {
2415
2415
  (s = i[n]) && (r = s(r) || r);
2416
2416
  return r;
2417
2417
  }, Li = (i, a) => (e, t) => a(e, t, i);
2418
- let Or = class extends Se {
2418
+ let Mr = class extends Se {
2419
2419
  constructor(a, e) {
2420
2420
  super();
2421
2421
  A(this, "_arrayFormulaRange", {});
@@ -2476,7 +2476,7 @@ let Or = class extends Se {
2476
2476
  });
2477
2477
  }
2478
2478
  getFormulaData() {
2479
- const a = {}, e = this._univerInstanceService.getAllUnitsForType(Ar.UNIVER_SHEET);
2479
+ const a = {}, e = this._univerInstanceService.getAllUnitsForType(rr.UNIVER_SHEET);
2480
2480
  return e.length === 0 || e.forEach((t) => {
2481
2481
  const r = t.getUnitId();
2482
2482
  a[r] = {}, t.getSheets().forEach((s) => {
@@ -2552,7 +2552,7 @@ let Or = class extends Se {
2552
2552
  s.getValue(t, r) && (s.realDeleteValue(t, r), this._arrayFormulaRange[a] && (this._arrayFormulaRange[a][e] = s.getData()));
2553
2553
  }
2554
2554
  getCalculateData() {
2555
- const a = this._univerInstanceService.getAllUnitsForType(Ar.UNIVER_SHEET), e = {}, t = {}, r = {};
2555
+ const a = this._univerInstanceService.getAllUnitsForType(rr.UNIVER_SHEET), e = {}, t = {}, r = {};
2556
2556
  for (const n of a) {
2557
2557
  const s = n.getUnitId(), o = n.getSheets(), u = {}, c = {};
2558
2558
  for (const l of o) {
@@ -2581,7 +2581,7 @@ let Or = class extends Se {
2581
2581
  * For formulas that are sensitive to hidden rows.
2582
2582
  */
2583
2583
  getHiddenRowsFiltered() {
2584
- const a = this._univerInstanceService.getAllUnitsForType(Ar.UNIVER_SHEET), e = {};
2584
+ const a = this._univerInstanceService.getAllUnitsForType(rr.UNIVER_SHEET), e = {};
2585
2585
  for (const t of a) {
2586
2586
  const r = t.getUnitId(), n = t.getSheets();
2587
2587
  e[r] = {};
@@ -2610,7 +2610,7 @@ let Or = class extends Se {
2610
2610
  const _ = (d == null ? void 0 : d.f) || "", C = (d == null ? void 0 : d.si) || "";
2611
2611
  if (Lt(C)) {
2612
2612
  const E = n == null ? void 0 : n[C], R = s.get(C);
2613
- if (E && !At(_)) {
2613
+ if (E && !Et(_)) {
2614
2614
  const y = E.f, p = m - E.c, V = f - E.r;
2615
2615
  c.setValue(f, m, { f: y, si: C, x: p, y: V }), l.setValue(f, m, { f: y, si: C, x: p, y: V });
2616
2616
  } else if (typeof R == "string") {
@@ -2663,7 +2663,7 @@ let Or = class extends Se {
2663
2663
  if (u == null)
2664
2664
  return null;
2665
2665
  const { f: c, si: l } = u;
2666
- if (At(c))
2666
+ if (Et(c))
2667
2667
  return c;
2668
2668
  if (Lt(l)) {
2669
2669
  let f = null;
@@ -2671,7 +2671,7 @@ let Or = class extends Se {
2671
2671
  if (_ == null)
2672
2672
  return !0;
2673
2673
  const { f: C, si: E } = _;
2674
- if (At(C) && l === E)
2674
+ if (Et(C) && l === E)
2675
2675
  return f = this._lexerTreeBuilder.moveFormulaRefOffset(
2676
2676
  C,
2677
2677
  e - d,
@@ -2701,7 +2701,7 @@ let Or = class extends Se {
2701
2701
  for (const l of Object.keys(o)) {
2702
2702
  const f = Number(l);
2703
2703
  for (const m in o[f]) {
2704
- const d = Number(m), _ = u.getCellRaw(f, d), C = At(_ == null ? void 0 : _.f) || Lt(_ == null ? void 0 : _.si), E = (_ == null ? void 0 : _.v) === void 0;
2704
+ const d = Number(m), _ = u.getCellRaw(f, d), C = Et(_ == null ? void 0 : _.f) || Lt(_ == null ? void 0 : _.si), E = (_ == null ? void 0 : _.v) === void 0;
2705
2705
  if (!(C && E)) continue;
2706
2706
  c[d] || (c[d] = []);
2707
2707
  const R = c[d].slice(-1)[0];
@@ -2739,19 +2739,19 @@ let Or = class extends Se {
2739
2739
  if (c == null)
2740
2740
  return !0;
2741
2741
  const { f: l, si: f } = c;
2742
- At(l) && Lt(f) && (t[f] = { f: l, r: o, c: u });
2742
+ Et(l) && Lt(f) && (t[f] = { f: l, r: o, c: u });
2743
2743
  }), t;
2744
2744
  }
2745
2745
  };
2746
- Or = Nf([
2747
- Li(0, ts),
2748
- Li(1, Re(Hr))
2749
- ], Or);
2746
+ Mr = Nf([
2747
+ Li(0, Kr),
2748
+ Li(1, _e(Gr))
2749
+ ], Mr);
2750
2750
  function Pi(i, a, e, t) {
2751
2751
  i[a] || (i[a] = {}), i[a][e] || (i[a][e] = {});
2752
2752
  const r = /* @__PURE__ */ new Map(), n = new me(i[a][e]);
2753
2753
  t.forValue((o, u, c) => {
2754
- const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "", m = At(l), d = Lt(f);
2754
+ const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "", m = Et(l), d = Lt(f);
2755
2755
  m && d ? (n.setValue(o, u, {
2756
2756
  f: l,
2757
2757
  si: f
@@ -2763,7 +2763,7 @@ function Pi(i, a, e, t) {
2763
2763
  });
2764
2764
  }), n.forValue((o, u, c) => {
2765
2765
  const l = (c == null ? void 0 : c.f) || "", f = (c == null ? void 0 : c.si) || "";
2766
- if (Lt(f) && !At(l)) {
2766
+ if (Lt(f) && !Et(l)) {
2767
2767
  const m = r.get(f);
2768
2768
  if (m) {
2769
2769
  const d = m.f, _ = u - m.c, C = o - m.r;
@@ -3314,7 +3314,7 @@ var Sf = Object.getOwnPropertyDescriptor, Df = (i, a, e, t) => {
3314
3314
  for (var r = t > 1 ? void 0 : t ? Sf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
3315
3315
  (s = i[n]) && (r = s(r) || r);
3316
3316
  return r;
3317
- }, ln = (i, a) => (e, t) => a(e, t, i);
3317
+ }, fn = (i, a) => (e, t) => a(e, t, i);
3318
3318
  let Zs = class extends Se {
3319
3319
  constructor(a, e, t, r) {
3320
3320
  super();
@@ -3404,7 +3404,7 @@ let Zs = class extends Se {
3404
3404
  return this._localeService.getCurrentLocale();
3405
3405
  }
3406
3406
  getSheetsInfo() {
3407
- const a = this._univerInstanceService.getCurrentUnitForType(Ar.UNIVER_SHEET), { id: e, sheetOrder: t } = a.getSnapshot();
3407
+ const a = this._univerInstanceService.getCurrentUnitForType(rr.UNIVER_SHEET), { id: e, sheetOrder: t } = a.getSnapshot();
3408
3408
  return {
3409
3409
  sheetOrder: t,
3410
3410
  sheetNameMap: this._sheetIdToNameMap[e]
@@ -3525,7 +3525,7 @@ let Zs = class extends Se {
3525
3525
  });
3526
3526
  }
3527
3527
  _loadSheetData() {
3528
- const a = this._univerInstanceService.getCurrentUnitForType(Ar.UNIVER_SHEET), e = a == null ? void 0 : a.getActiveSheet();
3528
+ const a = this._univerInstanceService.getCurrentUnitForType(rr.UNIVER_SHEET), e = a == null ? void 0 : a.getActiveSheet();
3529
3529
  return this._executeUnitId = a == null ? void 0 : a.getUnitId(), this._executeSubUnitId = e == null ? void 0 : e.getSheetId(), this._formulaDataModel.getCalculateData();
3530
3530
  }
3531
3531
  /**
@@ -3546,10 +3546,10 @@ let Zs = class extends Se {
3546
3546
  }
3547
3547
  };
3548
3548
  Zs = Df([
3549
- ln(0, ts),
3550
- ln(1, Re(Qc)),
3551
- ln(2, Re(Or)),
3552
- ln(3, Re(Zo))
3549
+ fn(0, Kr),
3550
+ fn(1, _e(Qc)),
3551
+ fn(2, _e(Mr)),
3552
+ fn(3, _e(Zo))
3553
3553
  ], Zs);
3554
3554
  const qt = Je(
3555
3555
  "univer.formula.current-data.service"
@@ -3559,7 +3559,7 @@ var wf = Object.getOwnPropertyDescriptor, Lf = (i, a, e, t) => {
3559
3559
  (s = i[n]) && (r = s(r) || r);
3560
3560
  return r;
3561
3561
  }, Ss = (i, a) => (e, t) => a(e, t, i);
3562
- let Mr = class extends Se {
3562
+ let Sr = class extends Se {
3563
3563
  constructor(i, a, e) {
3564
3564
  super(), this._definedNamesService = i, this._lexerTreeBuilder = a, this._formulaCurrentConfigService = e;
3565
3565
  }
@@ -3579,12 +3579,12 @@ let Mr = class extends Se {
3579
3579
  return !0;
3580
3580
  }
3581
3581
  };
3582
- Mr = Lf([
3583
- Ss(0, xr),
3584
- Ss(1, Re(Hr)),
3582
+ Sr = Lf([
3583
+ Ss(0, jr),
3584
+ Ss(1, _e(Gr)),
3585
3585
  Ss(2, qt)
3586
- ], Mr);
3587
- function pn(i) {
3586
+ ], Sr);
3587
+ function Nn(i) {
3588
3588
  if (i == null)
3589
3589
  return !0;
3590
3590
  const { v: a, f: e, si: t, p: r } = i;
@@ -3604,7 +3604,7 @@ function Pf(i) {
3604
3604
  return (a = i == null ? void 0 : i.v) != null ? a : 0;
3605
3605
  }
3606
3606
  function cb(i, a = !1) {
3607
- return !a && !(At(i == null ? void 0 : i.f) || Lt(i == null ? void 0 : i.si)) ? null : typeof (i == null ? void 0 : i.v) == "string" && fr.has(i.v) ? i.v : null;
3607
+ return !a && !(Et(i == null ? void 0 : i.f) || Lt(i == null ? void 0 : i.si)) ? null : typeof (i == null ? void 0 : i.v) == "string" && hr.has(i.v) ? i.v : null;
3608
3608
  }
3609
3609
  function zo(i, a, e, t, r) {
3610
3610
  var s;
@@ -3619,7 +3619,7 @@ function zo(i, a, e, t, r) {
3619
3619
  }
3620
3620
  }
3621
3621
  var Jt = /* @__PURE__ */ ((i) => (i[i.MIN = 0] = "MIN", i[i.MAX = 1] = "MAX", i))(Jt || {}), je = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.MIN = 1] = "MIN", i[i.MAX = 2] = "MAX", i))(je || {});
3622
- function Tn() {
3622
+ function vn() {
3623
3623
  return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
3624
3624
  }
3625
3625
  function Jo(i) {
@@ -3741,13 +3741,13 @@ function vf() {
3741
3741
  function If(i) {
3742
3742
  if (Ff(i))
3743
3743
  return 3;
3744
- const a = yt.getFormatInfo(i).type || "unknown";
3744
+ const a = bt.getFormatInfo(i).type || "unknown";
3745
3745
  return Tf[a];
3746
3746
  }
3747
3747
  function Ff(i) {
3748
3748
  return !!Uf.find((a) => i.includes(a)) && i.startsWith("_(");
3749
3749
  }
3750
- function fn(i, a, e) {
3750
+ function mn(i, a, e) {
3751
3751
  if (i === "")
3752
3752
  return a;
3753
3753
  if (a === "")
@@ -3777,7 +3777,7 @@ function et(i, a = 2) {
3777
3777
  return e > 0 && (t = `.${"0".repeat(e)}`), `"${Ti(i)}"#,##0${t}_);[Red]("${Ti(i)}"#,##0${t})`;
3778
3778
  }
3779
3779
  function kf(i, a, e = 2) {
3780
- return yt.format(et(i, e), a);
3780
+ return bt.format(et(i, e), a);
3781
3781
  }
3782
3782
  const ja = new Ut(1e5);
3783
3783
  function $f(i) {
@@ -3790,13 +3790,13 @@ function $f(i) {
3790
3790
  value: e.value,
3791
3791
  pattern: e.pattern
3792
3792
  };
3793
- const t = yt.parseNumber(a);
3793
+ const t = bt.parseNumber(a);
3794
3794
  if (t && t.z)
3795
3795
  return ws(a, t.v, t.z);
3796
- const r = yt.parseDate(a);
3796
+ const r = bt.parseDate(a);
3797
3797
  if (r && r.z)
3798
3798
  return ws(a, r.v, r.z);
3799
- const n = yt.parseTime(a);
3799
+ const n = bt.parseTime(a);
3800
3800
  return n && n.z ? ws(a, n.v, n.z) : {
3801
3801
  isNumberPattern: !1
3802
3802
  };
@@ -3838,7 +3838,7 @@ function Ua(i) {
3838
3838
  }
3839
3839
  return a;
3840
3840
  }
3841
- var _r = 9e15, Xt = 1e9, ta = "0123456789abcdef", vn = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", In = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", ra = {
3841
+ var Er = 9e15, Xt = 1e9, ta = "0123456789abcdef", In = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", Fn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", ra = {
3842
3842
  // These values must be integers within the stated ranges (inclusive).
3843
3843
  // Most of these values can be changed at run-time using the `Decimal.config` method.
3844
3844
  // The maximum number of significant digits of the result of a calculation or base conversion.
@@ -3887,16 +3887,16 @@ var _r = 9e15, Xt = 1e9, ta = "0123456789abcdef", vn = "2.3025850929940456840179
3887
3887
  // 0 to EXP_LIMIT
3888
3888
  // The minimum exponent value, beneath which underflow to zero occurs.
3889
3889
  // JavaScript numbers: -324 (5e-324)
3890
- minE: -_r,
3890
+ minE: -Er,
3891
3891
  // -1 to -EXP_LIMIT
3892
3892
  // The maximum exponent value, above which overflow to Infinity occurs.
3893
3893
  // JavaScript numbers: 308 (1.7976931348623157e+308)
3894
- maxE: _r,
3894
+ maxE: Er,
3895
3895
  // 1 to EXP_LIMIT
3896
3896
  // Whether to use cryptographically-secure random number generation, if available.
3897
3897
  crypto: !1
3898
3898
  // true/false
3899
- }, eu, Pt, ue = !0, os = "[DecimalError] ", Gt = os + "Invalid argument: ", tu = os + "Precision limit exceeded", ru = os + "crypto unavailable", nu = "[object Decimal]", $e = Math.floor, Ue = Math.pow, Hf = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Gf = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Wf = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, su = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ht = 1e7, se = 7, Qf = 9007199254740991, qf = vn.length - 1, na = In.length - 1, F = { toStringTag: nu };
3899
+ }, eu, Pt, ue = !0, os = "[DecimalError] ", Gt = os + "Invalid argument: ", tu = os + "Precision limit exceeded", ru = os + "crypto unavailable", nu = "[object Decimal]", $e = Math.floor, Ue = Math.pow, Hf = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Gf = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Wf = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, su = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ht = 1e7, se = 7, Qf = 9007199254740991, qf = In.length - 1, na = Fn.length - 1, F = { toStringTag: nu };
3900
3900
  F.absoluteValue = F.abs = function() {
3901
3901
  var i = new this.constructor(this);
3902
3902
  return i.s < 0 && (i.s = 1), te(i);
@@ -3974,7 +3974,7 @@ F.hyperbolicCosine = F.cosh = function() {
3974
3974
  var i, a, e, t, r, n = this, s = n.constructor, o = new s(1);
3975
3975
  if (!n.isFinite()) return new s(n.s ? 1 / 0 : NaN);
3976
3976
  if (n.isZero()) return o;
3977
- 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 / cs(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = Sr(s, 1, n.times(a), new s(1), !0);
3977
+ 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 / cs(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = Dr(s, 1, n.times(a), new s(1), !0);
3978
3978
  for (var u, c = i, l = new s(8); c--; )
3979
3979
  u = n.times(n), n = o.minus(u.times(l.minus(u.times(l))));
3980
3980
  return te(n, s.precision = e, s.rounding = t, !0);
@@ -3983,9 +3983,9 @@ F.hyperbolicSine = F.sinh = function() {
3983
3983
  var i, a, e, t, r = this, n = r.constructor;
3984
3984
  if (!r.isFinite() || r.isZero()) return new n(r);
3985
3985
  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)
3986
- r = Sr(n, 2, r, r, !0);
3986
+ r = Dr(n, 2, r, r, !0);
3987
3987
  else {
3988
- i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / cs(5, i)), r = Sr(n, 2, r, r, !0);
3988
+ i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / cs(5, i)), r = Dr(n, 2, r, r, !0);
3989
3989
  for (var s, o = new n(5), u = new n(16), c = new n(20); i--; )
3990
3990
  s = r.times(r), r = r.times(o.plus(s.times(u.times(s).plus(c))));
3991
3991
  }
@@ -3997,7 +3997,7 @@ F.hyperbolicTangent = F.tanh = function() {
3997
3997
  };
3998
3998
  F.inverseCosine = F.acos = function() {
3999
3999
  var i = this, a = i.constructor, e = i.abs().cmp(1), t = a.precision, r = a.rounding;
4000
- return e !== -1 ? e === 0 ? i.isNeg() ? Rt(a, t, r) : new a(0) : new a(NaN) : i.isZero() ? Rt(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));
4000
+ return e !== -1 ? e === 0 ? i.isNeg() ? yt(a, t, r) : new a(0) : new a(NaN) : i.isZero() ? yt(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));
4001
4001
  };
4002
4002
  F.inverseHyperbolicCosine = F.acosh = function() {
4003
4003
  var i, a, e = this, t = e.constructor;
@@ -4013,7 +4013,7 @@ F.inverseHyperbolicTangent = F.atanh = function() {
4013
4013
  };
4014
4014
  F.inverseSine = F.asin = function() {
4015
4015
  var i, a, e, t, r = this, n = r.constructor;
4016
- return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = Rt(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)));
4016
+ return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = yt(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)));
4017
4017
  };
4018
4018
  F.inverseTangent = F.atan = function() {
4019
4019
  var i, a, e, t, r, n, s, o, u, c = this, l = c.constructor, f = l.precision, m = l.rounding;
@@ -4021,11 +4021,11 @@ F.inverseTangent = F.atan = function() {
4021
4021
  if (c.isZero())
4022
4022
  return new l(c);
4023
4023
  if (c.abs().eq(1) && f + 4 <= na)
4024
- return s = Rt(l, f + 4, m).times(0.25), s.s = c.s, s;
4024
+ return s = yt(l, f + 4, m).times(0.25), s.s = c.s, s;
4025
4025
  } else {
4026
4026
  if (!c.s) return new l(NaN);
4027
4027
  if (f + 4 <= na)
4028
- return s = Rt(l, f + 4, m).times(0.5), s.s = c.s, s;
4028
+ return s = yt(l, f + 4, m).times(0.5), s.s = c.s, s;
4029
4029
  }
4030
4030
  for (l.precision = o = f + 10, l.rounding = 1, e = Math.min(28, o / se + 2 | 0), i = e; i; --i) c = c.div(c.times(c).plus(1).sqrt().plus(1));
4031
4031
  for (ue = !1, a = Math.ceil(o / se), t = 1, u = c.times(c), s = new l(c), r = c; i !== -1; )
@@ -4073,13 +4073,13 @@ F.logarithm = F.log = function(i) {
4073
4073
  for (r = e[0]; r % 10 === 0; ) r /= 10;
4074
4074
  n = r !== 1;
4075
4075
  }
4076
- if (ue = !1, o = f + d, s = Bt(c, o), t = a ? Fn(l, o + 10) : Bt(i, o), u = Me(s, t, o, 1), Gr(u.d, r = f, m))
4076
+ if (ue = !1, o = f + d, s = Bt(c, o), t = a ? Bn(l, o + 10) : Bt(i, o), u = Me(s, t, o, 1), Wr(u.d, r = f, m))
4077
4077
  do
4078
- if (o += 10, s = Bt(c, o), t = a ? Fn(l, o + 10) : Bt(i, o), u = Me(s, t, o, 1), !n) {
4078
+ if (o += 10, s = Bt(c, o), t = a ? Bn(l, o + 10) : Bt(i, o), u = Me(s, t, o, 1), !n) {
4079
4079
  +Ie(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = te(u, f + 1, 0));
4080
4080
  break;
4081
4081
  }
4082
- while (Gr(u.d, r += 10, m));
4082
+ while (Wr(u.d, r += 10, m));
4083
4083
  return ue = !0, te(u, f, m);
4084
4084
  };
4085
4085
  F.minus = F.sub = function(i) {
@@ -4205,11 +4205,11 @@ F.toDecimalPlaces = F.toDP = function(i, a) {
4205
4205
  };
4206
4206
  F.toExponential = function(i, a) {
4207
4207
  var e, t = this, r = t.constructor;
4208
- return i === void 0 ? e = pt(t, !0) : (Qe(i, 0, Xt), a === void 0 ? a = r.rounding : Qe(a, 0, 8), t = te(new r(t), i + 1, a), e = pt(t, !0, i + 1)), t.isNeg() && !t.isZero() ? "-" + e : e;
4208
+ return i === void 0 ? e = Nt(t, !0) : (Qe(i, 0, Xt), a === void 0 ? a = r.rounding : Qe(a, 0, 8), t = te(new r(t), i + 1, a), e = Nt(t, !0, i + 1)), t.isNeg() && !t.isZero() ? "-" + e : e;
4209
4209
  };
4210
4210
  F.toFixed = function(i, a) {
4211
4211
  var e, t, r = this, n = r.constructor;
4212
- return i === void 0 ? e = pt(r) : (Qe(i, 0, Xt), a === void 0 ? a = n.rounding : Qe(a, 0, 8), t = te(new n(r), i + r.e + 1, a), e = pt(t, !1, i + t.e + 1)), r.isNeg() && !r.isZero() ? "-" + e : e;
4212
+ return i === void 0 ? e = Nt(r) : (Qe(i, 0, Xt), a === void 0 ? a = n.rounding : Qe(a, 0, 8), t = te(new n(r), i + r.e + 1, a), e = Nt(t, !1, i + t.e + 1)), r.isNeg() && !r.isZero() ? "-" + e : e;
4213
4213
  };
4214
4214
  F.toFraction = function(i) {
4215
4215
  var a, e, t, r, n, s, o, u, c, l, f, m, d = this, _ = d.d, C = d.constructor;
@@ -4257,25 +4257,25 @@ F.toPower = F.pow = function(i) {
4257
4257
  if ((i.d[a] & 1) == 0 && (s = 1), o.e == 0 && o.d[0] == 1 && o.d.length == 1)
4258
4258
  return o.s = s, o;
4259
4259
  }
4260
- return e = Ue(+o, c), a = e == 0 || !isFinite(e) ? $e(c * (Math.log("0." + Ie(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) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = sa(i.times(Bt(o, t + e)), t), r.d && (r = te(r, t + 5, 1), Gr(r.d, t, n) && (a = t + 10, r = te(sa(i.times(Bt(o, a + e)), a), a + 5, 1), +Ie(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = te(r, t + 1, 0)))), r.s = s, ue = !0, u.rounding = n, te(r, t, n));
4260
+ return e = Ue(+o, c), a = e == 0 || !isFinite(e) ? $e(c * (Math.log("0." + Ie(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) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = sa(i.times(Bt(o, t + e)), t), r.d && (r = te(r, t + 5, 1), Wr(r.d, t, n) && (a = t + 10, r = te(sa(i.times(Bt(o, a + e)), a), a + 5, 1), +Ie(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = te(r, t + 1, 0)))), r.s = s, ue = !0, u.rounding = n, te(r, t, n));
4261
4261
  };
4262
4262
  F.toPrecision = function(i, a) {
4263
4263
  var e, t = this, r = t.constructor;
4264
- return i === void 0 ? e = pt(t, t.e <= r.toExpNeg || t.e >= r.toExpPos) : (Qe(i, 1, Xt), a === void 0 ? a = r.rounding : Qe(a, 0, 8), t = te(new r(t), i, a), e = pt(t, i <= t.e || t.e <= r.toExpNeg, i)), t.isNeg() && !t.isZero() ? "-" + e : e;
4264
+ return i === void 0 ? e = Nt(t, t.e <= r.toExpNeg || t.e >= r.toExpPos) : (Qe(i, 1, Xt), a === void 0 ? a = r.rounding : Qe(a, 0, 8), t = te(new r(t), i, a), e = Nt(t, i <= t.e || t.e <= r.toExpNeg, i)), t.isNeg() && !t.isZero() ? "-" + e : e;
4265
4265
  };
4266
4266
  F.toSignificantDigits = F.toSD = function(i, a) {
4267
4267
  var e = this, t = e.constructor;
4268
4268
  return i === void 0 ? (i = t.precision, a = t.rounding) : (Qe(i, 1, Xt), a === void 0 ? a = t.rounding : Qe(a, 0, 8)), te(new t(e), i, a);
4269
4269
  };
4270
4270
  F.toString = function() {
4271
- var i = this, a = i.constructor, e = pt(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
4271
+ var i = this, a = i.constructor, e = Nt(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
4272
4272
  return i.isNeg() && !i.isZero() ? "-" + e : e;
4273
4273
  };
4274
4274
  F.truncated = F.trunc = function() {
4275
4275
  return te(new this.constructor(this), this.e + 1, 1);
4276
4276
  };
4277
4277
  F.valueOf = F.toJSON = function() {
4278
- var i = this, a = i.constructor, e = pt(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
4278
+ var i = this, a = i.constructor, e = Nt(i, i.e <= a.toExpNeg || i.e >= a.toExpPos);
4279
4279
  return i.isNeg() ? "-" + e : e;
4280
4280
  };
4281
4281
  function Ie(i) {
@@ -4293,12 +4293,12 @@ function Qe(i, a, e) {
4293
4293
  if (i !== ~~i || i < a || i > e)
4294
4294
  throw Error(Gt + i);
4295
4295
  }
4296
- function Gr(i, a, e, t) {
4296
+ function Wr(i, a, e, t) {
4297
4297
  var r, n, s, o;
4298
4298
  for (n = i[0]; n >= 10; n /= 10) --a;
4299
4299
  return --a < 0 ? (a += se, r = 0) : (r = Math.ceil((a + 1) / se), a %= se), n = Ue(10, se - a), o = i[r] % n | 0, t == null ? a < 3 ? (a == 0 ? o = o / 100 | 0 : a == 1 && (o = o / 10 | 0), s = e < 4 && o == 99999 || e > 3 && o == 49999 || o == 5e4 || o == 0) : s = (e < 4 && o + 1 == n || e > 3 && o + 1 == n / 2) && (i[r + 1] / n / 100 | 0) == Ue(10, a - 2) - 1 || (o == n / 2 || o == 0) && (i[r + 1] / n / 100 | 0) == 0 : a < 4 ? (a == 0 ? o = o / 1e3 | 0 : a == 1 ? o = o / 100 | 0 : a == 2 && (o = o / 10 | 0), s = (t || e < 4) && o == 9999 || !t && e > 3 && o == 4999) : s = ((t || e < 4) && o + 1 == n || !t && e > 3 && o + 1 == n / 2) && (i[r + 1] / n / 1e3 | 0) == Ue(10, a - 3) - 1, s;
4300
4300
  }
4301
- function Nn(i, a, e) {
4301
+ function Vn(i, a, e) {
4302
4302
  for (var t, r = [0], n, s = 0, o = i.length; s < o; ) {
4303
4303
  for (n = r.length; n--; ) r[n] *= a;
4304
4304
  for (r[0] += ta.indexOf(i.charAt(s++)), t = 0; t < r.length; t++)
@@ -4309,7 +4309,7 @@ function Nn(i, a, e) {
4309
4309
  function Xf(i, a) {
4310
4310
  var e, t, r;
4311
4311
  if (a.isZero()) return a;
4312
- t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / cs(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Sr(i, 1, a.times(r), new i(1));
4312
+ t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / cs(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Dr(i, 1, a.times(r), new i(1));
4313
4313
  for (var n = e; n--; ) {
4314
4314
  var s = a.times(a);
4315
4315
  a = s.times(s).minus(s).times(8).plus(1);
@@ -4412,7 +4412,7 @@ function te(i, a, e, t) {
4412
4412
  }
4413
4413
  return ue && (i.e > d.maxE ? (i.d = null, i.e = NaN) : i.e < d.minE && (i.e = 0, i.d = [0])), i;
4414
4414
  }
4415
- function pt(i, a, e) {
4415
+ function Nt(i, a, e) {
4416
4416
  if (!i.isFinite()) return uu(i);
4417
4417
  var t, r = i.e, n = Ie(i.d), s = n.length;
4418
4418
  return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) + It(t) : s > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (i.e < 0 ? "e" : "e+") + i.e) : r < 0 ? (n = "0." + It(-r - 1) + n, e && (t = e - s) > 0 && (n += It(t))) : r >= s ? (n += It(r + 1 - s), e && (t = e - r - 1) > 0 && (n = n + "." + It(t))) : ((t = r + 1) < s && (n = n.slice(0, t) + "." + n.slice(t)), e && (t = e - s) > 0 && (r + 1 === s && (n += "."), n += It(t))), n;
@@ -4422,14 +4422,14 @@ function us(i, a) {
4422
4422
  for (a *= se; e >= 10; e /= 10) a++;
4423
4423
  return a;
4424
4424
  }
4425
- function Fn(i, a, e) {
4425
+ function Bn(i, a, e) {
4426
4426
  if (a > qf)
4427
4427
  throw ue = !0, e && (i.precision = e), Error(tu);
4428
- return te(new i(vn), a, 1, !0);
4428
+ return te(new i(In), a, 1, !0);
4429
4429
  }
4430
- function Rt(i, a, e) {
4430
+ function yt(i, a, e) {
4431
4431
  if (a > na) throw Error(tu);
4432
- return te(new i(In), a, e, !0);
4432
+ return te(new i(Fn), a, e, !0);
4433
4433
  }
4434
4434
  function au(i) {
4435
4435
  var a = i.length - 1, e = a * se + 1;
@@ -4477,7 +4477,7 @@ function sa(i, a) {
4477
4477
  if (n = te(n.times(i), u, 1), e = e.times(++l), o = s.plus(Me(n, e, u, 1)), Ie(o.d).slice(0, u) === Ie(s.d).slice(0, u)) {
4478
4478
  for (r = f; r--; ) s = te(s.times(s), u, 1);
4479
4479
  if (a == null)
4480
- if (c < 3 && Gr(s.d, u - t, d, c))
4480
+ if (c < 3 && Wr(s.d, u - t, d, c))
4481
4481
  m.precision = u += 10, e = n = o = new m(1), l = 0, c++;
4482
4482
  else
4483
4483
  return te(s, m.precision = _, d, ue = !0);
@@ -4496,11 +4496,11 @@ function Bt(i, a) {
4496
4496
  C = C.times(i), e = Ie(C.d), t = e.charAt(0), d++;
4497
4497
  n = C.e, t > 1 ? (C = new R("0." + e), n++) : C = new R(t + "." + e.slice(1));
4498
4498
  } else
4499
- return c = Fn(R, l + 2, p).times(n + ""), C = Bt(new R(t + "." + e.slice(1)), l - _).plus(c), R.precision = p, a == null ? te(C, p, y, ue = !0) : C;
4499
+ return c = Bn(R, l + 2, p).times(n + ""), C = Bt(new R(t + "." + e.slice(1)), l - _).plus(c), R.precision = p, a == null ? te(C, p, y, ue = !0) : C;
4500
4500
  for (f = C, u = s = C = Me(C.minus(1), C.plus(1), l, 1), m = te(C.times(C), l, 1), r = 3; ; ) {
4501
4501
  if (s = te(s.times(m), l, 1), c = u.plus(Me(s, new R(r), l, 1)), Ie(c.d).slice(0, l) === Ie(u.d).slice(0, l))
4502
- if (u = u.times(2), n !== 0 && (u = u.plus(Fn(R, l + 2, p).times(n + ""))), u = Me(u, new R(d), l, 1), a == null)
4503
- if (Gr(u.d, l - _, y, o))
4502
+ if (u = u.times(2), n !== 0 && (u = u.plus(Bn(R, l + 2, p).times(n + ""))), u = Me(u, new R(d), l, 1), a == null)
4503
+ if (Wr(u.d, l - _, y, o))
4504
4504
  R.precision = l += _, c = s = C = Me(f.minus(1), f.plus(1), l, 1), m = te(C.times(C), l, 1), r = o = 1;
4505
4505
  else
4506
4506
  return te(u, R.precision = p, y, ue = !0);
@@ -4512,7 +4512,7 @@ function Bt(i, a) {
4512
4512
  function uu(i) {
4513
4513
  return String(i.s * i.s / 0);
4514
4514
  }
4515
- function Vn(i, a) {
4515
+ function On(i, a) {
4516
4516
  var e, t, r;
4517
4517
  for ((e = a.indexOf(".")) > -1 && (a = a.replace(".", "")), (t = a.search(/e/i)) > 0 ? (e < 0 && (e = t), e += +a.slice(t + 1), a = a.substring(0, t)) : e < 0 && (e = a.length), t = 0; a.charCodeAt(t) === 48; t++) ;
4518
4518
  for (r = a.length; a.charCodeAt(r - 1) === 48; --r) ;
@@ -4531,7 +4531,7 @@ function Vn(i, a) {
4531
4531
  function Kf(i, a) {
4532
4532
  var e, t, r, n, s, o, u, c, l;
4533
4533
  if (a.indexOf("_") > -1) {
4534
- if (a = a.replace(/(\d)_(?=\d)/g, "$1"), su.test(a)) return Vn(i, a);
4534
+ if (a = a.replace(/(\d)_(?=\d)/g, "$1"), su.test(a)) return On(i, a);
4535
4535
  } else if (a === "Infinity" || a === "NaN")
4536
4536
  return +a || (i.s = NaN), i.e = NaN, i.d = null, i;
4537
4537
  if (Gf.test(a))
@@ -4542,19 +4542,19 @@ function Kf(i, a) {
4542
4542
  e = 8;
4543
4543
  else
4544
4544
  throw Error(Gt + a);
4545
- 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 = iu(t, new t(e), n, n * 2)), c = Nn(a, e, ht), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
4545
+ 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 = iu(t, new t(e), n, n * 2)), c = Vn(a, e, ht), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
4546
4546
  return n < 0 ? new t(i.s * 0) : (i.e = us(c, l), i.d = c, ue = !1, s && (i = Me(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Ue(2, u) : x.pow(2, u))), ue = !0, i);
4547
4547
  }
4548
4548
  function Zf(i, a) {
4549
4549
  var e, t = a.d.length;
4550
4550
  if (t < 3)
4551
- return a.isZero() ? a : Sr(i, 2, a, a);
4552
- e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / cs(5, e)), a = Sr(i, 2, a, a);
4551
+ return a.isZero() ? a : Dr(i, 2, a, a);
4552
+ e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / cs(5, e)), a = Dr(i, 2, a, a);
4553
4553
  for (var r, n = new i(5), s = new i(16), o = new i(20); e--; )
4554
4554
  r = a.times(a), a = a.times(n.plus(r.times(s.times(r).minus(o))));
4555
4555
  return a;
4556
4556
  }
4557
- function Sr(i, a, e, t, r) {
4557
+ function Dr(i, a, e, t, r) {
4558
4558
  var n, s, o, u, c = i.precision, l = Math.ceil(c / se);
4559
4559
  for (ue = !1, u = e.times(e), o = new i(t); ; ) {
4560
4560
  if (s = Me(o.times(u), new i(a++ * a++), c, 1), o = r ? t.plus(s) : t.minus(s), t = Me(s.times(u), new i(a++ * a++), c, 1), s = o.plus(t), s.d[l] !== void 0) {
@@ -4570,7 +4570,7 @@ function cs(i, a) {
4570
4570
  return e;
4571
4571
  }
4572
4572
  function cu(i, a) {
4573
- var e, t = a.s < 0, r = Rt(i, i.precision, 1), n = r.times(0.5);
4573
+ var e, t = a.s < 0, r = yt(i, i.precision, 1), n = r.times(0.5);
4574
4574
  if (a = a.abs(), a.lte(n))
4575
4575
  return Pt = t ? 4 : 1, a;
4576
4576
  if (e = a.divToInt(r), e.isZero())
@@ -4587,7 +4587,7 @@ function Ta(i, a, e, t) {
4587
4587
  if (_ ? (Qe(e, 1, Xt), t === void 0 ? t = d.rounding : Qe(t, 0, 8)) : (e = d.precision, t = d.rounding), !i.isFinite())
4588
4588
  l = uu(i);
4589
4589
  else {
4590
- for (l = pt(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(".", ""), m = new d(1), m.e = l.length - s, m.d = Nn(pt(m), 10, r), m.e = m.d.length), f = Nn(l, 10, r), n = u = f.length; f[--u] == 0; ) f.pop();
4590
+ for (l = Nt(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(".", ""), m = new d(1), m.e = l.length - s, m.d = Vn(Nt(m), 10, r), m.e = m.d.length), f = Vn(l, 10, r), n = u = f.length; f[--u] == 0; ) f.pop();
4591
4591
  if (!f[0])
4592
4592
  l = _ ? "0p+0" : "0";
4593
4593
  else {
@@ -4600,7 +4600,7 @@ function Ta(i, a, e, t) {
4600
4600
  if (u > 1)
4601
4601
  if (a == 16 || a == 8) {
4602
4602
  for (s = a == 16 ? 4 : 3, --u; u % s; u++) l += "0";
4603
- for (f = Nn(l, r, a), u = f.length; !f[u - 1]; --u) ;
4603
+ for (f = Vn(l, r, a), u = f.length; !f[u - 1]; --u) ;
4604
4604
  for (s = 1, l = "1."; s < u; s++) l += ta.charAt(f[s]);
4605
4605
  } else
4606
4606
  l = l.charAt(0) + "." + l.slice(1);
@@ -4646,7 +4646,7 @@ function am(i) {
4646
4646
  function im(i, a) {
4647
4647
  i = new this(i), a = new this(a);
4648
4648
  var e, t = this.precision, r = this.rounding, n = t + 4;
4649
- return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = Rt(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? Rt(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = Rt(this, n, 1).times(0.5), e.s = i.s) : a.s < 0 ? (this.precision = n, this.rounding = 1, e = this.atan(Me(i, a, n, 1)), a = Rt(this, n, 1), this.precision = t, this.rounding = r, e = i.s < 0 ? e.minus(a) : e.plus(a)) : e = this.atan(Me(i, a, n, 1)), e;
4649
+ return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = yt(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? yt(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = yt(this, n, 1).times(0.5), e.s = i.s) : a.s < 0 ? (this.precision = n, this.rounding = 1, e = this.atan(Me(i, a, n, 1)), a = yt(this, n, 1), this.precision = t, this.rounding = r, e = i.s < 0 ? e.minus(a) : e.plus(a)) : e = this.atan(Me(i, a, n, 1)), e;
4650
4650
  }
4651
4651
  function om(i) {
4652
4652
  return new this(i).cbrt();
@@ -4667,16 +4667,16 @@ function lm(i) {
4667
4667
  0,
4668
4668
  8,
4669
4669
  "toExpNeg",
4670
- -_r,
4670
+ -Er,
4671
4671
  0,
4672
4672
  "toExpPos",
4673
4673
  0,
4674
- _r,
4674
+ Er,
4675
4675
  "maxE",
4676
4676
  0,
4677
- _r,
4677
+ Er,
4678
4678
  "minE",
4679
- -_r,
4679
+ -Er,
4680
4680
  0,
4681
4681
  "modulo",
4682
4682
  0,
@@ -4728,12 +4728,12 @@ function lu(i) {
4728
4728
  n || (c.s = NaN), c.e = NaN, c.d = null;
4729
4729
  return;
4730
4730
  }
4731
- return Vn(c, n.toString());
4731
+ return On(c, n.toString());
4732
4732
  }
4733
4733
  if (u === "string")
4734
- return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), su.test(n) ? Vn(c, n) : Kf(c, n);
4734
+ return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), su.test(n) ? On(c, n) : Kf(c, n);
4735
4735
  if (u === "bigint")
4736
- return n < 0 ? (n = -n, c.s = -1) : c.s = 1, Vn(c, n.toString());
4736
+ return n < 0 ? (n = -n, c.s = -1) : c.s = 1, On(c, n.toString());
4737
4737
  throw Error(Gt + n);
4738
4738
  }
4739
4739
  if (r.prototype = F, 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 = lm, r.clone = lu, r.isDecimal = Fi, r.abs = zf, r.acos = Jf, r.acosh = em, r.add = tm, r.asin = rm, r.asinh = nm, r.atan = sm, r.atanh = am, r.atan2 = im, r.cbrt = om, r.ceil = um, r.clamp = cm, r.cos = fm, r.cosh = mm, r.div = hm, r.exp = gm, r.floor = dm, r.hypot = Cm, r.ln = _m, r.log = Am, r.log10 = Rm, r.log2 = Em, r.max = ym, r.min = bm, r.mod = pm, r.mul = Nm, r.pow = Vm, r.random = Om, r.round = Mm, r.sign = Sm, r.sin = Dm, r.sinh = wm, r.sqrt = Lm, r.sub = Pm, r.sum = xm, r.tan = jm, r.tanh = Um, r.trunc = Tm, i === void 0 && (i = {}), i && i.defaults !== !0)
@@ -4849,8 +4849,8 @@ function Tm(i) {
4849
4849
  F[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = F.toString;
4850
4850
  F[Symbol.toStringTag] = "Decimal";
4851
4851
  var x = F.constructor = lu(ra);
4852
- vn = new x(vn);
4853
4852
  In = new x(In);
4853
+ Fn = new x(Fn);
4854
4854
  function vm(i, a) {
4855
4855
  const e = i + a;
4856
4856
  return Number.isSafeInteger(e) ? e : new x(i).add(a).toNumber();
@@ -4859,7 +4859,7 @@ function Im(i, a) {
4859
4859
  const e = i - a;
4860
4860
  return Number.isSafeInteger(e) ? e : new x(i).sub(a).toNumber();
4861
4861
  }
4862
- function jr(i, a) {
4862
+ function Ur(i, a) {
4863
4863
  const e = i * a;
4864
4864
  return Number.isSafeInteger(e) ? e : new x(i).mul(a).toNumber();
4865
4865
  }
@@ -4869,18 +4869,18 @@ function Fm(i, a) {
4869
4869
  }
4870
4870
  function $t(i, a) {
4871
4871
  const e = 10 ** Math.trunc(a), t = ls(i, e);
4872
- return Math.round(jr(i, e) + t) / e;
4872
+ return Math.round(Ur(i, e) + t) / e;
4873
4873
  }
4874
4874
  function Ze(i, a) {
4875
4875
  const e = 10 ** Math.trunc(a), t = ls(i, e);
4876
- return Math.floor(jr(i, e) + t) / e;
4876
+ return Math.floor(Ur(i, e) + t) / e;
4877
4877
  }
4878
4878
  function We(i, a) {
4879
4879
  const e = 10 ** Math.trunc(a), t = ls(i, e);
4880
- return Math.ceil(jr(i, e) - t) / e;
4880
+ return Math.ceil(Ur(i, e) - t) / e;
4881
4881
  }
4882
4882
  function ls(i, a) {
4883
- return Number.EPSILON * Math.max(1, Math.abs(jr(i, a)));
4883
+ return Number.EPSILON * Math.max(1, Math.abs(Ur(i, a)));
4884
4884
  }
4885
4885
  function Bi(i, a) {
4886
4886
  return i - a * Math.floor(i / a);
@@ -4919,9 +4919,9 @@ function va(i, a = 12, e = 1e-10) {
4919
4919
  function Qm(i) {
4920
4920
  return i - Math.trunc(i);
4921
4921
  }
4922
- const es = class es extends Qt {
4922
+ const ts = class ts extends Qt {
4923
4923
  static create() {
4924
- return this._instance = this._instance || new es(0), this._instance;
4924
+ return this._instance = this._instance || new ts(0), this._instance;
4925
4925
  }
4926
4926
  isNull() {
4927
4927
  return !0;
@@ -5041,8 +5041,8 @@ const es = class es extends Qt {
5041
5041
  return v.create(!1);
5042
5042
  }
5043
5043
  };
5044
- A(es, "_instance");
5045
- let ce = es;
5044
+ A(ts, "_instance");
5045
+ let ce = ts;
5046
5046
  const er = class er extends Qt {
5047
5047
  constructor(e) {
5048
5048
  super(e);
@@ -5187,7 +5187,7 @@ const er = class er extends Qt {
5187
5187
  return this._convertToNumber().ceil(e);
5188
5188
  }
5189
5189
  convertToNumberObjectValue() {
5190
- return Wr(this.getValue());
5190
+ return Qr(this.getValue());
5191
5191
  }
5192
5192
  convertToBooleanObjectValue() {
5193
5193
  return this;
@@ -5228,7 +5228,7 @@ class b extends Qt {
5228
5228
  let r = this.plusBy(t.getValue());
5229
5229
  if (r.isError())
5230
5230
  return r;
5231
- const n = fn(this.getPattern(), t.getPattern(), Z.PLUS);
5231
+ const n = mn(this.getPattern(), t.getPattern(), Z.PLUS);
5232
5232
  return r = b.create(Number(r.getValue()), n), r;
5233
5233
  }
5234
5234
  equalZero() {
@@ -5244,7 +5244,7 @@ class b extends Qt {
5244
5244
  let r = this.minusBy(t.getValue());
5245
5245
  if (r.isError())
5246
5246
  return r;
5247
- const n = fn(this.getPattern(), t.getPattern(), Z.MINUS);
5247
+ const n = mn(this.getPattern(), t.getPattern(), Z.MINUS);
5248
5248
  return r = b.create(Number(r.getValue()), n), r;
5249
5249
  }
5250
5250
  multiply(e) {
@@ -5255,7 +5255,7 @@ class b extends Qt {
5255
5255
  let r = this.multiplyBy(t.getValue());
5256
5256
  if (r.isError())
5257
5257
  return r;
5258
- const n = fn(this.getPattern(), t.getPattern(), Z.MULTIPLY);
5258
+ const n = mn(this.getPattern(), t.getPattern(), Z.MULTIPLY);
5259
5259
  return r = b.create(Number(r.getValue()), n), r;
5260
5260
  }
5261
5261
  divided(e) {
@@ -5268,7 +5268,7 @@ class b extends Qt {
5268
5268
  let r = this.dividedBy(t.getValue());
5269
5269
  if (r.isError())
5270
5270
  return r;
5271
- const n = fn(this.getPattern(), t.getPattern(), Z.DIVIDED);
5271
+ const n = mn(this.getPattern(), t.getPattern(), Z.DIVIDED);
5272
5272
  return r = b.create(Number(r.getValue()), n), r;
5273
5273
  }
5274
5274
  mod(e) {
@@ -5301,7 +5301,7 @@ class b extends Qt {
5301
5301
  }
5302
5302
  isDateFormat() {
5303
5303
  const e = this.getPattern();
5304
- return yt.isDateFormat(e);
5304
+ return bt.isDateFormat(e);
5305
5305
  }
5306
5306
  compare(e, t) {
5307
5307
  if (e.isArray())
@@ -5339,7 +5339,7 @@ class b extends Qt {
5339
5339
  return g.create(h.VALUE);
5340
5340
  if (!Number.isFinite(t) || !Number.isFinite(r))
5341
5341
  return g.create(h.NUM);
5342
- const n = jr(t, r);
5342
+ const n = Ur(t, r);
5343
5343
  return Number.isFinite(n) ? b.create(n) : g.create(h.NUM);
5344
5344
  }
5345
5345
  dividedBy(e) {
@@ -5750,7 +5750,7 @@ class U extends Qt {
5750
5750
  }
5751
5751
  convertToNumberObjectValue() {
5752
5752
  const e = this.getValue(), t = ya(e);
5753
- return t && t.z ? Wr(t.v, t.z) : Wr(e);
5753
+ return t && t.z ? Qr(t.v, t.z) : Qr(e);
5754
5754
  }
5755
5755
  convertToBooleanObjectValue() {
5756
5756
  return v.create(!0);
@@ -5766,7 +5766,7 @@ function fs(i) {
5766
5766
  let a = !1;
5767
5767
  if (typeof i == "string") {
5768
5768
  const e = i.toLocaleUpperCase();
5769
- e === ir.TRUE ? a = !0 : e === ir.FALSE && (a = !1);
5769
+ e === ur.TRUE ? a = !0 : e === ur.FALSE && (a = !1);
5770
5770
  } else
5771
5771
  i === 1 ? a = !0 : a = !1;
5772
5772
  return v.create(a);
@@ -5775,7 +5775,7 @@ function Xm(i) {
5775
5775
  let a = i.toString();
5776
5776
  return a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.slice(1, -1), a = a.replace(/""/g, '"')), U.create(a);
5777
5777
  }
5778
- function Wr(i, a = "") {
5778
+ function Qr(i, a = "") {
5779
5779
  if (typeof i == "boolean") {
5780
5780
  let e = 0;
5781
5781
  return i && (e = 1), b.create(e, a);
@@ -6133,7 +6133,7 @@ class K extends Qt {
6133
6133
  * @returns
6134
6134
  */
6135
6135
  _binarySearch(e, t, r, n = Jt.MIN, s = je.MIN) {
6136
- const o = Tn(), u = Number(e.getValue()), c = !Number.isNaN(u);
6136
+ const o = vn(), u = Number(e.getValue()), c = !Number.isNaN(u);
6137
6137
  let l = 0, f = t.length - 1, m = -1, d = -1, _ = -1;
6138
6138
  for (; l <= f; ) {
6139
6139
  const C = Math.floor((l + f) / 2), E = t[C];
@@ -6487,7 +6487,7 @@ class K extends Qt {
6487
6487
  this._flattenCache = null, this._sliceCache.clear();
6488
6488
  }
6489
6489
  _sort(e) {
6490
- const t = Tn();
6490
+ const t = vn();
6491
6491
  return (r, n) => {
6492
6492
  const s = r[e], o = n[e];
6493
6493
  return s == null ? 1 : o == null ? -1 : s.isError() && s.isError() ? 0 : s.isError() ? 1 : o.isError() ? -1 : t(
@@ -6572,7 +6572,7 @@ class K extends Qt {
6572
6572
  );
6573
6573
  C != null && C.forEach((E, R) => {
6574
6574
  let y = ce.create();
6575
- fr.has(R) ? y = g.create(R) : typeof R == "string" ? y = U.create(R) : typeof R == "number" ? y = b.create(R) : typeof R == "boolean" && (y = v.create(R));
6575
+ hr.has(R) ? y = g.create(R) : typeof R == "string" ? y = U.create(R) : typeof R == "number" ? y = b.create(R) : typeof R == "boolean" && (y = v.create(R));
6576
6576
  let p;
6577
6577
  y.isError() ? p = y : e.isError() ? p = e : p = y.compare(e, s, o), E.forEach((V) => {
6578
6578
  V >= f && V <= f + u - 1 && (r[V - f] == null && (r[V - f] = []), r[V - f][t] = p);
@@ -6803,9 +6803,9 @@ class jt {
6803
6803
  return v.create(a);
6804
6804
  if (typeof a == "string") {
6805
6805
  const t = a.toLocaleUpperCase().trim();
6806
- if (fr.has(t))
6806
+ if (hr.has(t))
6807
6807
  return g.create(t);
6808
- if (t === ir.TRUE || t === ir.FALSE)
6808
+ if (t === ur.TRUE || t === ur.FALSE)
6809
6809
  return fs(a);
6810
6810
  if (q(a))
6811
6811
  return b.create(Number(a));
@@ -6817,15 +6817,15 @@ class jt {
6817
6817
  const r = a.replace(/\n/g, "").replace(/\r/g, "");
6818
6818
  return !zm(r) && ql(r) ? K.create(r) : Xm(a);
6819
6819
  }
6820
- return typeof a == "number" ? Wr(a) : g.create(h.VALUE);
6820
+ return typeof a == "number" ? Qr(a) : g.create(h.VALUE);
6821
6821
  }
6822
6822
  }
6823
6823
  function zm(i) {
6824
6824
  const a = i.trim();
6825
6825
  return a.startsWith('"') && a.endsWith('"');
6826
6826
  }
6827
- const Jm = 1e4, Er = new Ut(Jm);
6828
- class Ur extends rs {
6827
+ const Jm = 1e4, Rr = new Ut(Jm);
6828
+ class Tr extends rs {
6829
6829
  constructor(e) {
6830
6830
  super();
6831
6831
  A(this, "_forcedSheetId", "");
@@ -6892,7 +6892,7 @@ class Ur extends rs {
6892
6892
  return e(g.create(h.REF), c, l);
6893
6893
  const f = this.getCellData(c, l);
6894
6894
  let m = !1;
6895
- if (pn(f)) {
6895
+ if (Nn(f)) {
6896
6896
  m = e(null, c, l);
6897
6897
  continue;
6898
6898
  }
@@ -7071,11 +7071,11 @@ class Ur extends rs {
7071
7071
  }
7072
7072
  getCellValueObject(e) {
7073
7073
  const t = Pf(e);
7074
- if (fr.has(t))
7074
+ if (hr.has(t))
7075
7075
  return g.create(t);
7076
7076
  if (e.t === wt.NUMBER) {
7077
7077
  const r = this._getPatternByCell(e);
7078
- return Xc(r) ? U.create(t.toString()) : Wr(t, r);
7078
+ return Xc(r) ? U.create(t.toString()) : Qr(t, r);
7079
7079
  }
7080
7080
  return e.t === wt.STRING || e.t === wt.FORCE_STRING ? U.create(t.toString()) : e.t === wt.BOOLEAN ? fs(t) : jt.create(t);
7081
7081
  }
@@ -7155,7 +7155,7 @@ class Ur extends rs {
7155
7155
  }
7156
7156
  toArrayValueObject(e = !0) {
7157
7157
  var _;
7158
- const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u = Er.get(o);
7158
+ const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u = Rr.get(o);
7159
7159
  if (u && e)
7160
7160
  return u;
7161
7161
  const c = r - t + 1, l = s - n + 1;
@@ -7175,7 +7175,7 @@ class Ur extends rs {
7175
7175
  row: t,
7176
7176
  column: n
7177
7177
  }, d = K.create(m);
7178
- return e && Er.set(o, d), d;
7178
+ return e && Rr.set(o, d), d;
7179
7179
  }
7180
7180
  toUnitRange() {
7181
7181
  return {
@@ -7241,7 +7241,7 @@ class th extends rs {
7241
7241
  return K.create(e);
7242
7242
  }
7243
7243
  }
7244
- class Bn extends Ur {
7244
+ class kn extends Tr {
7245
7245
  constructor(a, e, t) {
7246
7246
  super(""), this.setRangeData(a), e && this.setForcedSheetIdDirect(e), t && this.setForcedUnitIdDirect(t);
7247
7247
  }
@@ -7249,10 +7249,10 @@ class Bn extends Ur {
7249
7249
  return !0;
7250
7250
  }
7251
7251
  }
7252
- class Ia extends Ur {
7252
+ class Ia extends Tr {
7253
7253
  constructor(a) {
7254
7254
  super(a);
7255
- const e = Vr(a);
7255
+ const e = Or(a);
7256
7256
  this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName), this.setRangeData(e.range);
7257
7257
  }
7258
7258
  isCell() {
@@ -7274,7 +7274,7 @@ class Ia extends Ur {
7274
7274
  return t > n ? (o.startRow = n, o.endRow = t) : (o.startRow = t, o.endRow = n), r > s ? (o.startColumn = s, o.endColumn = r) : (o.startColumn = r, o.endColumn = s), a.startAbsoluteRefType && (o.startAbsoluteRefType = a.startAbsoluteRefType), e.startAbsoluteRefType && (o.endAbsoluteRefType = e.startAbsoluteRefType), o;
7275
7275
  }
7276
7276
  _createRange(a) {
7277
- const e = new Bn(
7277
+ const e = new kn(
7278
7278
  a,
7279
7279
  this.getForcedSheetId(),
7280
7280
  this.getForcedUnitId()
@@ -7288,10 +7288,10 @@ class Ia extends Ur {
7288
7288
  return s && e.setForcedUnitIdDirect(s), e;
7289
7289
  }
7290
7290
  }
7291
- class Fa extends Ur {
7291
+ class Fa extends Tr {
7292
7292
  constructor(a) {
7293
7293
  super(a);
7294
- const e = Vr(a);
7294
+ const e = Or(a);
7295
7295
  this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName);
7296
7296
  const t = {
7297
7297
  ...e.range,
@@ -7319,10 +7319,10 @@ class Fa extends Ur {
7319
7319
  return n > s ? t.endColumn = n : (t.startColumn = n, t.endColumn = s), r.startAbsoluteRefType && (t.endAbsoluteRefType = r.startAbsoluteRefType), t.rangeType = rt.COLUMN, this.setToken(`${this.getToken()}${X.COLON}${e.getToken()}`), this;
7320
7320
  }
7321
7321
  }
7322
- class Ba extends Ur {
7322
+ class Ba extends Tr {
7323
7323
  constructor(a) {
7324
7324
  super(a);
7325
- const e = Vr(a);
7325
+ const e = Or(a);
7326
7326
  this.setForcedUnitIdDirect(e.unitId), this.setForcedSheetName(e.sheetName);
7327
7327
  const t = {
7328
7328
  ...e.range,
@@ -7496,7 +7496,7 @@ function ah(i) {
7496
7496
  a = Math.max(a, 1), e = Math.max(e, 1);
7497
7497
  }), { maxRowLength: a, maxColumnLength: e };
7498
7498
  }
7499
- function tn(i, a) {
7499
+ function rn(i, a) {
7500
7500
  if (i.length === 0 || i.length % 2 !== 0)
7501
7501
  return {
7502
7502
  isError: !0,
@@ -7554,7 +7554,7 @@ function tn(i, a) {
7554
7554
  function ia(i) {
7555
7555
  return i.isArray() ? i : K.createByArray([[i.getValue()]]);
7556
7556
  }
7557
- function rn(i, a, e, t = !1) {
7557
+ function nn(i, a, e, t = !1) {
7558
7558
  const r = [];
7559
7559
  for (let n = 0; n < i.length; n++) {
7560
7560
  if (n % 2 === 1) continue;
@@ -7605,7 +7605,7 @@ function ih(i, a) {
7605
7605
  const e = i.isString() && i.getValue() === "", t = a.isString() && a.getValue() === "";
7606
7606
  return !!((e || i.isNull()) && (t || a.isNull()) || i.isString() && !e && a.isString() && !t);
7607
7607
  }
7608
- var Ir = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(Ir || {});
7608
+ var Fr = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(Fr || {});
7609
7609
  function oh(i, a) {
7610
7610
  let e;
7611
7611
  switch (a) {
@@ -7641,7 +7641,7 @@ let oa = class extends Se {
7641
7641
  };
7642
7642
  let e = i;
7643
7643
  if (i.startsWith("#") && Lo(i.slice(1))) {
7644
- const { unitId: t, sheetName: r, range: n } = Yr(i.slice(1)), s = this._univerInstanceService.getCurrentUnitOfType(Ar.UNIVER_SHEET);
7644
+ const { unitId: t, sheetName: r, range: n } = Hr(i.slice(1)), s = this._univerInstanceService.getCurrentUnitOfType(rr.UNIVER_SHEET);
7645
7645
  if (t === "" || t === s.getUnitId())
7646
7646
  if (r === "")
7647
7647
  e = `#gid=${s.getActiveSheet().getSheetId()}&range=${Ht(n)}`;
@@ -7656,7 +7656,7 @@ let oa = class extends Se {
7656
7656
  }
7657
7657
  };
7658
7658
  oa = lh([
7659
- fh(0, ts)
7659
+ fh(0, Kr)
7660
7660
  ], oa);
7661
7661
  const mu = Je(
7662
7662
  "univer.formula.hyperlink-engine-formula.service"
@@ -7665,7 +7665,7 @@ var mh = Object.getOwnPropertyDescriptor, hh = (i, a, e, t) => {
7665
7665
  for (var r = t > 1 ? void 0 : t ? mh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
7666
7666
  (s = i[n]) && (r = s(r) || r);
7667
7667
  return r;
7668
- }, Hi = (i, a) => (e, t) => a(e, t, i), tt = /* @__PURE__ */ ((i) => (i[i.IDLE = 0] = "IDLE", i[i.START = 1] = "START", i[i.START_DEPENDENCY = 2] = "START_DEPENDENCY", i[i.START_CALCULATION = 3] = "START_CALCULATION", i[i.CURRENTLY_CALCULATING = 4] = "CURRENTLY_CALCULATING", i[i.START_DEPENDENCY_ARRAY_FORMULA = 5] = "START_DEPENDENCY_ARRAY_FORMULA", i[i.START_CALCULATION_ARRAY_FORMULA = 6] = "START_CALCULATION_ARRAY_FORMULA", i[i.CURRENTLY_CALCULATING_ARRAY_FORMULA = 7] = "CURRENTLY_CALCULATING_ARRAY_FORMULA", i[i.CALCULATION_COMPLETED = 8] = "CALCULATION_COMPLETED", i))(tt || {}), Fr = /* @__PURE__ */ ((i) => (i[i.INITIAL = 0] = "INITIAL", i[i.STOP_EXECUTION = 1] = "STOP_EXECUTION", i[i.NOT_EXECUTED = 2] = "NOT_EXECUTED", i[i.SUCCESS = 3] = "SUCCESS", i))(Fr || {});
7668
+ }, Hi = (i, a) => (e, t) => a(e, t, i), tt = /* @__PURE__ */ ((i) => (i[i.IDLE = 0] = "IDLE", i[i.START = 1] = "START", i[i.START_DEPENDENCY = 2] = "START_DEPENDENCY", i[i.START_CALCULATION = 3] = "START_CALCULATION", i[i.CURRENTLY_CALCULATING = 4] = "CURRENTLY_CALCULATING", i[i.START_DEPENDENCY_ARRAY_FORMULA = 5] = "START_DEPENDENCY_ARRAY_FORMULA", i[i.START_CALCULATION_ARRAY_FORMULA = 6] = "START_CALCULATION_ARRAY_FORMULA", i[i.CURRENTLY_CALCULATING_ARRAY_FORMULA = 7] = "CURRENTLY_CALCULATING_ARRAY_FORMULA", i[i.CALCULATION_COMPLETED = 8] = "CALCULATION_COMPLETED", i))(tt || {}), Br = /* @__PURE__ */ ((i) => (i[i.INITIAL = 0] = "INITIAL", i[i.STOP_EXECUTION = 1] = "STOP_EXECUTION", i[i.NOT_EXECUTED = 2] = "NOT_EXECUTED", i[i.SUCCESS = 3] = "SUCCESS", i))(Br || {});
7669
7669
  let ua = class extends Se {
7670
7670
  constructor(a, e) {
7671
7671
  super();
@@ -8002,7 +8002,7 @@ let ua = class extends Se {
8002
8002
  };
8003
8003
  }
8004
8004
  clearArrayObjectCache() {
8005
- Er.clear();
8005
+ Rr.clear();
8006
8006
  }
8007
8007
  // eslint-disable-next-line complexity
8008
8008
  _checkIfArrayFormulaRangeHasData(a, e, t, r, n) {
@@ -8019,7 +8019,7 @@ let ua = class extends Se {
8019
8019
  w
8020
8020
  );
8021
8021
  const T = (S = (M = (V = l == null ? void 0 : l[a]) == null ? void 0 : V[e]) == null ? void 0 : M.cellData) == null ? void 0 : S.getValue(D, w), j = this._getRuntimeFeatureCellValue(D, w, e, a);
8022
- if (!pn(L) || this._isInOtherArrayFormulaRange(a, e, t, r, D, w) || !pn(T) || !pn(j))
8022
+ if (!Nn(L) || this._isInOtherArrayFormulaRange(a, e, t, r, D, w) || !Nn(T) || !Nn(j))
8023
8023
  return !0;
8024
8024
  }
8025
8025
  return !1;
@@ -8072,9 +8072,9 @@ ua = hh([
8072
8072
  Hi(0, qt),
8073
8073
  Hi(1, mu)
8074
8074
  ], ua);
8075
- const Nt = Je("univer.formula.runtime.service");
8075
+ const Vt = Je("univer.formula.runtime.service");
8076
8076
  var oe = /* @__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))(oe || {});
8077
- const Vt = /* @__PURE__ */ new Map([
8077
+ const Ot = /* @__PURE__ */ new Map([
8078
8078
  [1, 7],
8079
8079
  [2, 9],
8080
8080
  [3, 8],
@@ -8203,8 +8203,8 @@ class Te extends qe {
8203
8203
  return this._errorValueObject;
8204
8204
  }
8205
8205
  }
8206
- const Ot = 100;
8207
- class Mt {
8206
+ const Mt = 100;
8207
+ class St {
8208
8208
  get zIndex() {
8209
8209
  return 0;
8210
8210
  }
@@ -8229,9 +8229,9 @@ class ca extends qe {
8229
8229
  e == null ? this.setValue(g.create(h.VALUE)) : this.setValue(e.getValue());
8230
8230
  }
8231
8231
  }
8232
- class hu extends Mt {
8232
+ class hu extends St {
8233
8233
  get zIndex() {
8234
- return Vt.get(oe.ROOT) || Ot;
8234
+ return Ot.get(oe.ROOT) || Mt;
8235
8235
  }
8236
8236
  checkAndCreateNodeType(a) {
8237
8237
  if (!(a instanceof ie))
@@ -8240,13 +8240,13 @@ class hu extends Mt {
8240
8240
  return new ca(kt);
8241
8241
  }
8242
8242
  }
8243
- const gh = 5e3, Qr = new Ut(gh);
8243
+ const gh = 5e3, nr = new Ut(gh);
8244
8244
  function Gi(i, a, e, t, r) {
8245
- let n = Qr.get(`${i}${a}`);
8245
+ let n = nr.get(`${i}${a}`);
8246
8246
  if (n && !gu(n, r))
8247
8247
  return n;
8248
8248
  const s = e.treeBuilder(a);
8249
- return fr.has(s) ? Te.create(s) : (n = t.parse(s), n == null ? (console.error("generateAstNode astNode is null"), Te.create(s)) : (Qr.set(`${i}${a}`, n), n));
8249
+ return hr.has(s) ? Te.create(s) : (n = t.parse(s), n == null ? (console.error("generateAstNode astNode is null"), Te.create(s)) : (nr.set(`${i}${a}`, n), n));
8250
8250
  }
8251
8251
  function gu(i, a) {
8252
8252
  const e = a.getDirtyDefinedNameMap(), t = a.getExecuteUnitId();
@@ -8322,9 +8322,9 @@ class Ch extends Se {
8322
8322
  }
8323
8323
  }
8324
8324
  deleteFormulaAstCacheKey(...e) {
8325
- Qr.forEach((t, r) => {
8325
+ nr.forEach((t, r) => {
8326
8326
  e.forEach((n) => {
8327
- r.includes(n) && Qr.delete(r);
8327
+ r.includes(n) && nr.delete(r);
8328
8328
  });
8329
8329
  });
8330
8330
  }
@@ -8334,7 +8334,7 @@ var ke = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED",
8334
8334
  (s = i[n]) && (r = s(r) || r);
8335
8335
  return r;
8336
8336
  }, Wi = (i, a) => (e, t) => a(e, t, i);
8337
- class kn extends qe {
8337
+ class $n extends qe {
8338
8338
  constructor(a, e, t) {
8339
8339
  super(e), this._runtimeService = a, this._operatorString = e, this._functionExecutor = t;
8340
8340
  }
@@ -8362,12 +8362,12 @@ class kn extends qe {
8362
8362
  return l !== u && c !== o || o === c && u === l ? g.create(h.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(h.VALUE);
8363
8363
  }
8364
8364
  }
8365
- let $n = class extends Mt {
8365
+ let Yn = class extends St {
8366
8366
  constructor(i, a) {
8367
8367
  super(), this._functionService = i, this._runtimeService = a;
8368
8368
  }
8369
8369
  get zIndex() {
8370
- return Vt.get(oe.PREFIX) || Ot;
8370
+ return Ot.get(oe.PREFIX) || Mt;
8371
8371
  }
8372
8372
  checkAndCreateNodeType(i) {
8373
8373
  if (!(i instanceof ie))
@@ -8378,30 +8378,30 @@ let $n = class extends Mt {
8378
8378
  let t = "";
8379
8379
  if (e === Le.MINUS)
8380
8380
  t = ke.MINUS;
8381
- else return e === Le.AT ? new kn(this._runtimeService, e) : void 0;
8381
+ else return e === Le.AT ? new $n(this._runtimeService, e) : void 0;
8382
8382
  const r = this._functionService.getExecutor(t);
8383
- return r ? new kn(this._runtimeService, e, r) : (console.error(`No function ${a}`), Te.create(h.NAME));
8383
+ return r ? new $n(this._runtimeService, e, r) : (console.error(`No function ${a}`), Te.create(h.NAME));
8384
8384
  }
8385
8385
  };
8386
- $n = Ah([
8386
+ Yn = Ah([
8387
8387
  Wi(0, Kt),
8388
- Wi(1, Nt)
8389
- ], $n);
8388
+ Wi(1, Vt)
8389
+ ], Yn);
8390
8390
  function du(i, a, e) {
8391
8391
  let t, r, n = i;
8392
8392
  const s = n[0];
8393
8393
  let o = 0;
8394
8394
  if (s === Le.MINUS) {
8395
8395
  const u = a.getExecutor(ke.MINUS);
8396
- t = new kn(e, Le.MINUS, u), o++;
8397
- } else s === Le.AT && (r = new kn(e, Le.AT), t && r.setParent(t), o++);
8396
+ t = new $n(e, Le.MINUS, u), o++;
8397
+ } else s === Le.AT && (r = new $n(e, Le.AT), t && r.setParent(t), o++);
8398
8398
  return o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
8399
8399
  }
8400
8400
  var Eh = Object.getOwnPropertyDescriptor, Rh = (i, a, e, t) => {
8401
8401
  for (var r = t > 1 ? void 0 : t ? Eh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
8402
8402
  (s = i[n]) && (r = s(r) || r);
8403
8403
  return r;
8404
- }, hr = (i, a) => (e, t) => a(e, t, i);
8404
+ }, dr = (i, a) => (e, t) => a(e, t, i);
8405
8405
  class yh extends qe {
8406
8406
  constructor(a, e, t, r, n, s) {
8407
8407
  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);
@@ -8573,12 +8573,12 @@ class bh extends qe {
8573
8573
  this.setValue(g.create(h.NAME));
8574
8574
  }
8575
8575
  }
8576
- let Yn = class extends Mt {
8576
+ let Hn = class extends St {
8577
8577
  constructor(i, a, e, t, r, n) {
8578
8578
  super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
8579
8579
  }
8580
8580
  get zIndex() {
8581
- return Vt.get(oe.FUNCTION) || Ot;
8581
+ return Ot.get(oe.FUNCTION) || Mt;
8582
8582
  }
8583
8583
  create(i) {
8584
8584
  const a = this._functionService.getExecutor(i);
@@ -8608,20 +8608,20 @@ let Yn = class extends Mt {
8608
8608
  return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken()) === X.COLON;
8609
8609
  }
8610
8610
  };
8611
- Yn = Rh([
8612
- hr(0, Kt),
8613
- hr(1, qt),
8614
- hr(2, Nt),
8615
- hr(3, xr),
8616
- hr(4, Re(Eo)),
8617
- hr(5, Re(Or))
8618
- ], Yn);
8611
+ Hn = Rh([
8612
+ dr(0, Kt),
8613
+ dr(1, qt),
8614
+ dr(2, Vt),
8615
+ dr(3, jr),
8616
+ dr(4, _e(Eo)),
8617
+ dr(5, _e(Mr))
8618
+ ], Hn);
8619
8619
  var ph = Object.getOwnPropertyDescriptor, Nh = (i, a, e, t) => {
8620
8620
  for (var r = t > 1 ? void 0 : t ? ph(a, e) : a, n = i.length - 1, s; n >= 0; n--)
8621
8621
  (s = i[n]) && (r = s(r) || r);
8622
8622
  return r;
8623
8623
  }, Vh = (i, a) => (e, t) => a(e, t, i);
8624
- let Dr = class extends Se {
8624
+ let wr = class extends Se {
8625
8625
  constructor(i) {
8626
8626
  super(), this._runtimeService = i;
8627
8627
  }
@@ -8667,7 +8667,7 @@ let Dr = class extends Se {
8667
8667
  const t = i.getChildren(), r = t.length;
8668
8668
  for (let n = 0; n < r; n++) {
8669
8669
  const s = t[n];
8670
- if (s.getToken().toUpperCase() === $r && s.isEmptyParamFunction()) {
8670
+ if (s.getToken().toUpperCase() === Yr && s.isEmptyParamFunction()) {
8671
8671
  s.execute();
8672
8672
  continue;
8673
8673
  }
@@ -8681,7 +8681,7 @@ let Dr = class extends Se {
8681
8681
  const t = i.getChildren(), r = t.length;
8682
8682
  for (let n = 0; n < r; n++) {
8683
8683
  const s = t[n];
8684
- if (s.getToken().toUpperCase() === $r && s.isEmptyParamFunction()) {
8684
+ if (s.getToken().toUpperCase() === Yr && s.isEmptyParamFunction()) {
8685
8685
  s.execute();
8686
8686
  continue;
8687
8687
  }
@@ -8690,11 +8690,11 @@ let Dr = class extends Se {
8690
8690
  return i.nodeType === oe.REFERENCE && i.setRefOffset(a, e), i.execute(), Ft.SUCCESS;
8691
8691
  }
8692
8692
  };
8693
- Dr = Nh([
8694
- Vh(0, Nt)
8695
- ], Dr);
8693
+ wr = Nh([
8694
+ Vh(0, Vt)
8695
+ ], wr);
8696
8696
  function Cu(i) {
8697
- return i instanceof ie ? i.getToken() === Nr : !1;
8697
+ return i instanceof ie ? i.getToken() === Vr : !1;
8698
8698
  }
8699
8699
  function Oh(i) {
8700
8700
  return i instanceof ie ? i.getToken() === Po : !1;
@@ -8710,7 +8710,7 @@ function $a(i, a, e) {
8710
8710
  const u = o.trim();
8711
8711
  if (e.has(u)) {
8712
8712
  const c = new ie();
8713
- c.setToken(Jr), c.setLambdaId(a), c.setLambdaPrivacyVar(e), c.setLambdaParameter(u), t[s] = c;
8713
+ c.setToken(en), c.setLambdaId(a), c.setLambdaPrivacyVar(e), c.setLambdaParameter(u), t[s] = c;
8714
8714
  }
8715
8715
  }
8716
8716
  }
@@ -8731,7 +8731,7 @@ function Qi(i, a = 0, e = 0) {
8731
8731
  function _u(i) {
8732
8732
  if (!i)
8733
8733
  return;
8734
- if (i.getToken() !== Jr)
8734
+ if (i.getToken() !== en)
8735
8735
  return i;
8736
8736
  const a = i, e = a.getCurrentLambdaPrivacyVar(), t = a.getLambdaParameter();
8737
8737
  if (!e)
@@ -8782,7 +8782,7 @@ class Ya extends Qt {
8782
8782
  const t = e.getChildren(), r = t.length;
8783
8783
  for (let n = 0; n < r; n++) {
8784
8784
  const s = t[n];
8785
- if (s.getToken() === Jr) {
8785
+ if (s.getToken() === en) {
8786
8786
  const u = s.getLambdaParameter(), c = this._lambdaPrivacyValueMap.get(u);
8787
8787
  if (c)
8788
8788
  s.setValue(c);
@@ -8851,12 +8851,12 @@ class wh extends qe {
8851
8851
  // return Promise.resolve(AstNodePromiseType.SUCCESS);
8852
8852
  // }
8853
8853
  }
8854
- let Hn = class extends Mt {
8854
+ let Gn = class extends St {
8855
8855
  constructor(i, a) {
8856
8856
  super(), this._runtimeService = i, this._interpreter = a;
8857
8857
  }
8858
8858
  get zIndex() {
8859
- return Vt.get(oe.LAMBDA) || Ot;
8859
+ return Ot.get(oe.LAMBDA) || Mt;
8860
8860
  }
8861
8861
  create(i) {
8862
8862
  const a = i.getChildren(), e = a[0];
@@ -8864,7 +8864,7 @@ let Hn = class extends Mt {
8864
8864
  const r = a[a.length - 1];
8865
8865
  if (!(e instanceof ie && r instanceof ie))
8866
8866
  return Te.create(h.NAME);
8867
- if (e.getToken() === Nr) {
8867
+ if (e.getToken() === Vr) {
8868
8868
  const o = e.getChildren();
8869
8869
  if (t.length !== o.length)
8870
8870
  return Te.create(h.VALUE);
@@ -8882,21 +8882,21 @@ let Hn = class extends Mt {
8882
8882
  return this._runtimeService.registerFunctionDefinitionPrivacyVar(n, s), this._updateLambdaStatement(r, n, s), new wh(i.getToken(), n, this._interpreter, [...s.keys()], this._runtimeService);
8883
8883
  }
8884
8884
  checkAndCreateNodeType(i) {
8885
- if (!(!(i instanceof ie) || i.getToken().trim().toUpperCase() !== $r))
8885
+ if (!(!(i instanceof ie) || i.getToken().trim().toUpperCase() !== Yr))
8886
8886
  return this.create(i);
8887
8887
  }
8888
8888
  _updateLambdaStatement(i, a, e) {
8889
8889
  $a(i, a, e);
8890
8890
  }
8891
8891
  };
8892
- Hn = Dh([
8893
- qi(0, Nt),
8894
- qi(1, Re(Dr))
8895
- ], Hn);
8892
+ Gn = Dh([
8893
+ qi(0, Vt),
8894
+ qi(1, _e(wr))
8895
+ ], Gn);
8896
8896
  function Au(i) {
8897
8897
  if (!i)
8898
8898
  return;
8899
- if (i.getToken() !== Jr)
8899
+ if (i.getToken() !== en)
8900
8900
  return i;
8901
8901
  const a = i, e = a.getCurrentLambdaPrivacyVar(), t = a.getLambdaParameter();
8902
8902
  if (e)
@@ -8925,16 +8925,16 @@ class Lh extends qe {
8925
8925
  }
8926
8926
  }
8927
8927
  }
8928
- class Eu extends Mt {
8928
+ class Eu extends St {
8929
8929
  get zIndex() {
8930
- return Vt.get(oe.LAMBDA_PARAMETER) || Ot;
8930
+ return Ot.get(oe.LAMBDA_PARAMETER) || Mt;
8931
8931
  }
8932
8932
  create(a) {
8933
8933
  const e = a.getFunctionDefinitionPrivacyVar(), t = a.getLambdaParameter();
8934
8934
  return e ? new Lh(a.getToken(), t, e) : new Te(h.NAME);
8935
8935
  }
8936
8936
  checkAndCreateNodeType(a) {
8937
- if (!(!(a instanceof ie) || a.getToken().trim() !== Jr))
8937
+ if (!(!(a instanceof ie) || a.getToken().trim() !== en))
8938
8938
  return this.create(a);
8939
8939
  }
8940
8940
  }
@@ -8988,12 +8988,12 @@ class Uh extends qe {
8988
8988
  e <= 1 && t <= 1 || this._runtimeService.setUnitArrayFormulaEmbeddedMap();
8989
8989
  }
8990
8990
  }
8991
- let Gn = class extends Mt {
8991
+ let Wn = class extends St {
8992
8992
  constructor(i, a) {
8993
8993
  super(), this._functionService = i, this._runtimeService = a;
8994
8994
  }
8995
8995
  get zIndex() {
8996
- return Vt.get(oe.OPERATOR) || Ot;
8996
+ return Ot.get(oe.OPERATOR) || Mt;
8997
8997
  }
8998
8998
  create(i) {
8999
8999
  let a = "";
@@ -9010,11 +9010,11 @@ let Gn = class extends Mt {
9010
9010
  return this.create(a);
9011
9011
  }
9012
9012
  };
9013
- Gn = jh([
9013
+ Wn = jh([
9014
9014
  Xi(0, Kt),
9015
- Xi(1, Nt)
9016
- ], Gn);
9017
- class Th extends Ur {
9015
+ Xi(1, Vt)
9016
+ ], Wn);
9017
+ class Th extends Tr {
9018
9018
  constructor(e, t, r, n) {
9019
9019
  super(e);
9020
9020
  A(this, "_isCurrentRowForRange", !1);
@@ -9202,7 +9202,7 @@ var vh = Object.getOwnPropertyDescriptor, Ih = (i, a, e, t) => {
9202
9202
  for (var r = t > 1 ? void 0 : t ? vh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
9203
9203
  (s = i[n]) && (r = s(r) || r);
9204
9204
  return r;
9205
- }, mn = (i, a) => (e, t) => a(e, t, i);
9205
+ }, hn = (i, a) => (e, t) => a(e, t, i);
9206
9206
  class Ki extends qe {
9207
9207
  constructor(e, t, r, n, s = !1, o) {
9208
9208
  super(r);
@@ -9231,12 +9231,12 @@ class Ki extends qe {
9231
9231
  };
9232
9232
  }
9233
9233
  }
9234
- let Wn = class extends Mt {
9234
+ let Qn = class extends St {
9235
9235
  constructor(i, a, e, t) {
9236
9236
  super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e, this._superTableService = t;
9237
9237
  }
9238
9238
  get zIndex() {
9239
- return Vt.get(oe.REFERENCE) || Ot;
9239
+ return Ot.get(oe.REFERENCE) || Mt;
9240
9240
  }
9241
9241
  checkAndCreateNodeType(i) {
9242
9242
  var u, c;
@@ -9259,10 +9259,10 @@ let Wn = class extends Mt {
9259
9259
  const r = this._currentConfigService, n = this._formulaRuntimeService, s = (_) => new Ki(r, n, i, _, e), o = this._getTableMap();
9260
9260
  if ((d = o == null ? void 0 : o.has(i)) != null ? d : !1)
9261
9261
  return this._getTableReferenceNode(i, a, e, !0);
9262
- if (zr(i))
9263
- return s(Ir.CELL);
9262
+ if (Jr(i))
9263
+ return s(Fr.CELL);
9264
9264
  const l = a && this._checkParentIsUnionOperator(t);
9265
- return l && Do(i) ? s(Ir.ROW) : l && wo(i) ? s(Ir.COLUMN) : this._getTableReferenceNode(i, a, e, !1);
9265
+ return l && Do(i) ? s(Fr.ROW) : l && wo(i) ? s(Fr.COLUMN) : this._getTableReferenceNode(i, a, e, !1);
9266
9266
  }
9267
9267
  _getTableReferenceNode(i, a, e, t = !1) {
9268
9268
  if (!this._checkTokenIsTableReference(i) && !t)
@@ -9274,7 +9274,7 @@ let Wn = class extends Mt {
9274
9274
  this._currentConfigService,
9275
9275
  this._formulaRuntimeService,
9276
9276
  i,
9277
- Ir.COLUMN,
9277
+ Fr.COLUMN,
9278
9278
  e,
9279
9279
  new Th(i, u, o, c)
9280
9280
  );
@@ -9288,12 +9288,12 @@ let Wn = class extends Mt {
9288
9288
  return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken().trim()) === X.COLON;
9289
9289
  }
9290
9290
  };
9291
- Wn = Ih([
9292
- mn(0, qt),
9293
- mn(1, Nt),
9294
- mn(2, Kt),
9295
- mn(3, en)
9296
- ], Wn);
9291
+ Qn = Ih([
9292
+ hn(0, qt),
9293
+ hn(1, Vt),
9294
+ hn(2, Kt),
9295
+ hn(3, tn)
9296
+ ], Qn);
9297
9297
  var Fh = Object.getOwnPropertyDescriptor, Bh = (i, a, e, t) => {
9298
9298
  for (var r = t > 1 ? void 0 : t ? Fh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
9299
9299
  (s = i[n]) && (r = s(r) || r);
@@ -9332,12 +9332,12 @@ class Zi extends qe {
9332
9332
  return o && this._lexer.treeBuilder(o), g.create(h.VALUE);
9333
9333
  }
9334
9334
  }
9335
- let Qn = class extends Mt {
9335
+ let qn = class extends St {
9336
9336
  constructor(i, a, e) {
9337
9337
  super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
9338
9338
  }
9339
9339
  get zIndex() {
9340
- return Vt.get(oe.SUFFIX) || Ot;
9340
+ return Ot.get(oe.SUFFIX) || Mt;
9341
9341
  }
9342
9342
  checkAndCreateNodeType(i) {
9343
9343
  if (!(i instanceof ie))
@@ -9353,11 +9353,11 @@ let Qn = class extends Mt {
9353
9353
  return t ? new Zi(this._currentConfigService, this._lexer, a, t) : (console.error(`No function ${i}`), Te.create(h.NAME));
9354
9354
  }
9355
9355
  };
9356
- Qn = Bh([
9356
+ qn = Bh([
9357
9357
  Ls(0, Kt),
9358
- Ls(1, Re(Mr)),
9358
+ Ls(1, _e(Sr)),
9359
9359
  Ls(2, qt)
9360
- ], Qn);
9360
+ ], qn);
9361
9361
  var kh = Object.getOwnPropertyDescriptor, $h = (i, a, e, t) => {
9362
9362
  for (var r = t > 1 ? void 0 : t ? kh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
9363
9363
  (s = i[n]) && (r = s(r) || r);
@@ -9383,12 +9383,12 @@ class Hh extends qe {
9383
9383
  return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(h.REF) : (a = a, e = e, uh(a, e));
9384
9384
  }
9385
9385
  }
9386
- let qn = class extends Mt {
9386
+ let Xn = class extends St {
9387
9387
  constructor(i) {
9388
9388
  super(), this._functionService = i;
9389
9389
  }
9390
9390
  get zIndex() {
9391
- return Vt.get(oe.UNION) || Ot;
9391
+ return Ot.get(oe.UNION) || Mt;
9392
9392
  }
9393
9393
  create(i) {
9394
9394
  return new Hh(i);
@@ -9401,9 +9401,9 @@ let qn = class extends Mt {
9401
9401
  return this.create(e);
9402
9402
  }
9403
9403
  };
9404
- qn = $h([
9404
+ Xn = $h([
9405
9405
  Yh(0, Kt)
9406
- ], qn);
9406
+ ], Xn);
9407
9407
  class Gh extends qe {
9408
9408
  constructor(a) {
9409
9409
  super(a);
@@ -9418,21 +9418,21 @@ class Gh extends qe {
9418
9418
  (a == null ? void 0 : a.nodeType) === oe.FUNCTION && (e = (r = (t = a.isFunctionExecutorArgumentsIgnoreNumberPattern) == null ? void 0 : t.call(a)) != null ? r : !0), this.setValue(jt.create(this.getToken(), e));
9419
9419
  }
9420
9420
  }
9421
- class Ru extends Mt {
9421
+ class Ru extends St {
9422
9422
  get zIndex() {
9423
- return Vt.get(oe.VALUE) || Ot;
9423
+ return Ot.get(oe.VALUE) || Mt;
9424
9424
  }
9425
9425
  _checkValueNode(a) {
9426
9426
  if (Number.isNaN(Number(a))) {
9427
9427
  const e = a.trim(), t = e.charAt(0), r = e.charAt(e.length - 1);
9428
- if (fr.has(e))
9428
+ if (hr.has(e))
9429
9429
  return this.create(e);
9430
9430
  if (t === '"' && r === '"')
9431
9431
  return this.create(e);
9432
9432
  if (t === "{" && r === "}")
9433
9433
  return this.create(e);
9434
9434
  const n = e.toUpperCase();
9435
- if (n === ir.TRUE || n === ir.FALSE)
9435
+ if (n === ur.TRUE || n === ur.FALSE)
9436
9436
  return this.create(n);
9437
9437
  } else
9438
9438
  return this.create(a);
@@ -9488,9 +9488,9 @@ let qr = class extends Se {
9488
9488
  if (t % 2 !== 1 || t === 0)
9489
9489
  return;
9490
9490
  const r = new ie();
9491
- r.setToken($r);
9491
+ r.setToken(Yr);
9492
9492
  const n = new ie();
9493
- n.setToken(Nr);
9493
+ n.setToken(Vr);
9494
9494
  const s = [...e];
9495
9495
  for (let u = 0; u < t; u++) {
9496
9496
  const c = s[u];
@@ -9512,11 +9512,11 @@ let qr = class extends Se {
9512
9512
  const f = this._changeLetToLambda(a);
9513
9513
  return f != null ? this._parse(f, e) : Te.create(h.ERROR);
9514
9514
  }
9515
- if (o === _t) {
9515
+ if (o === At) {
9516
9516
  if (s = e, r === 0)
9517
9517
  return new Ph(kt).setParent(e), s;
9518
9518
  } else {
9519
- if (o === Nr) {
9519
+ if (o === Vr) {
9520
9520
  let f = this._lambdaParameterHandler(a, e);
9521
9521
  return f === !1 && (f = Te.create(h.ERROR)), f;
9522
9522
  }
@@ -9533,7 +9533,7 @@ let qr = class extends Se {
9533
9533
  continue;
9534
9534
  let d = null;
9535
9535
  if (m instanceof ie) {
9536
- if (m.getToken() === _t && m.getChildren().length === 0) {
9536
+ if (m.getToken() === At && m.getChildren().length === 0) {
9537
9537
  const _ = (l = m.getParent()) == null ? void 0 : l.getChildren();
9538
9538
  if (_ && _.length === 1)
9539
9539
  return Te.create(h.NAME);
@@ -9623,17 +9623,17 @@ let qr = class extends Se {
9623
9623
  }
9624
9624
  };
9625
9625
  qr = Qh([
9626
- lt(0, Nt),
9627
- lt(1, Re(hu)),
9628
- lt(2, Re(Yn)),
9629
- lt(3, Re(Hn)),
9630
- lt(4, Re(Eu)),
9631
- lt(5, Re(Gn)),
9632
- lt(6, Re($n)),
9633
- lt(7, Re(Wn)),
9634
- lt(8, Re(Qn)),
9635
- lt(9, Re(qn)),
9636
- lt(10, Re(Ru))
9626
+ lt(0, Vt),
9627
+ lt(1, _e(hu)),
9628
+ lt(2, _e(Hn)),
9629
+ lt(3, _e(Gn)),
9630
+ lt(4, _e(Eu)),
9631
+ lt(5, _e(Wn)),
9632
+ lt(6, _e(Yn)),
9633
+ lt(7, _e(Qn)),
9634
+ lt(8, _e(qn)),
9635
+ lt(9, _e(Xn)),
9636
+ lt(10, _e(Ru))
9637
9637
  ], qr);
9638
9638
  class qh extends Se {
9639
9639
  constructor() {
@@ -10111,7 +10111,7 @@ class Zh extends Se {
10111
10111
  const Ha = Je(
10112
10112
  "univer.formula.other-formula-manager.service"
10113
10113
  );
10114
- var dr = /* @__PURE__ */ ((i) => (i[i.NORMAL_FORMULA = 0] = "NORMAL_FORMULA", i[i.OTHER_FORMULA = 1] = "OTHER_FORMULA", i[i.FEATURE_FORMULA = 2] = "FEATURE_FORMULA", i))(dr || {});
10114
+ var _r = /* @__PURE__ */ ((i) => (i[i.NORMAL_FORMULA = 0] = "NORMAL_FORMULA", i[i.OTHER_FORMULA = 1] = "OTHER_FORMULA", i[i.FEATURE_FORMULA = 2] = "FEATURE_FORMULA", i))(_r || {});
10115
10115
  class yu {
10116
10116
  constructor() {
10117
10117
  A(this, "_state", 0);
@@ -10457,22 +10457,34 @@ var zh = Object.getOwnPropertyDescriptor, Jh = (i, a, e, t) => {
10457
10457
  for (var r = t > 1 ? void 0 : t ? zh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
10458
10458
  (s = i[n]) && (r = s(r) || r);
10459
10459
  return r;
10460
- }, St = (i, a) => (e, t) => a(e, t, i);
10461
- function gr(i) {
10460
+ }, _t = (i, a) => (e, t) => a(e, t, i);
10461
+ function Cr(i) {
10462
10462
  return i.getLastTreeId() || 0;
10463
10463
  }
10464
10464
  const la = Je("engine-formula.dependency-generator");
10465
10465
  let fa = class extends Se {
10466
- constructor(a, e, t, r, n, s, o, u, c) {
10466
+ constructor(a, e, t, r, n, s, o, u, c, l) {
10467
10467
  super();
10468
10468
  A(this, "_updateRangeFlattenCache", /* @__PURE__ */ new Map());
10469
10469
  A(this, "_dependencyRTreeCacheForAddressFunction", new Fs());
10470
10470
  A(this, "_executedAddressFunctionNodeIds", /* @__PURE__ */ new Set());
10471
10471
  A(this, "_formulaDependencyTreeModel", /* @__PURE__ */ new Map());
10472
- this._currentConfigService = a, this._runtimeService = e, this._otherFormulaManagerService = t, this._featureCalculationManagerService = r, this._interpreter = n, this._astTreeBuilder = s, this._lexer = o, this._dependencyManagerService = u, this._lexerTreeBuilder = c;
10472
+ this._currentConfigService = a, this._runtimeService = e, this._otherFormulaManagerService = t, this._featureCalculationManagerService = r, this._univerInstanceService = n, this._interpreter = s, this._astTreeBuilder = o, this._lexer = u, this._dependencyManagerService = c, this._lexerTreeBuilder = l, this._initUnitDispose();
10473
10473
  }
10474
10474
  dispose() {
10475
- this._updateRangeFlattenCache.clear(), this._dependencyRTreeCacheForAddressFunction.clear(), Qr.clear();
10475
+ super.dispose(), this._updateRangeFlattenCache.clear(), this._dependencyRTreeCacheForAddressFunction.clear(), nr.clear();
10476
+ }
10477
+ _initUnitDispose() {
10478
+ this.disposeWithMe(
10479
+ this._univerInstanceService.getTypeOfUnitDisposed$(rr.UNIVER_SHEET).subscribe((a) => {
10480
+ this._disposeByUnitId(a.getUnitId());
10481
+ })
10482
+ );
10483
+ }
10484
+ _disposeByUnitId(a) {
10485
+ nr.forEach((e, t) => {
10486
+ t.startsWith(a) && nr.delete(t);
10487
+ });
10476
10488
  }
10477
10489
  async generate(a = !1) {
10478
10490
  this._updateRangeFlatten();
@@ -10504,7 +10516,7 @@ let fa = class extends Se {
10504
10516
  const { unitId: l, subUnitId: f, getDirtyData: m } = u, d = m(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), _ = this._convertDirtyRangesToUnitRange(d.dirtyRanges), C = this._intersectFeatureCalculation(_, a, { unitId: l, subUnitId: f, featureId: c });
10505
10517
  if (C.length > 0) {
10506
10518
  let E = this._getExistTreeList({ unitId: l, subUnitId: f, featureId: c }, a);
10507
- E == null && (E = this._getFeatureFormulaTree(c, gr(this._dependencyManagerService), u), a.push(E)), E.parents = /* @__PURE__ */ new Set(), C.forEach((R) => {
10519
+ E == null && (E = this._getFeatureFormulaTree(c, Cr(this._dependencyManagerService), u), a.push(E)), E.parents = /* @__PURE__ */ new Set(), C.forEach((R) => {
10508
10520
  R.hasChildren(E.treeId) || R.pushChildren(E);
10509
10521
  }), t = !0;
10510
10522
  }
@@ -10652,10 +10664,10 @@ let fa = class extends Se {
10652
10664
  });
10653
10665
  }
10654
10666
  _getFeatureFormulaTree(a, e, t) {
10655
- const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || gr(this._dependencyManagerService), c = new Ps(u);
10667
+ const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || Cr(this._dependencyManagerService), c = new Ps(u);
10656
10668
  c.unitId = r, c.subUnitId = n, c.rangeList = s, c.getDirtyData = o;
10657
10669
  const l = o(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), f = this._convertDirtyRangesToUnitRange(l.dirtyRanges);
10658
- return c.featureDirtyRanges = f, c.featureId = a, c.type = dr.FEATURE_FORMULA, this._dependencyManagerService.addFeatureFormulaDependency(r, n, a, c), this._dependencyManagerService.getFeatureFormulaDependency(t.unitId, t.subUnitId, a) && (c.isCache = !0), c;
10670
+ return c.featureDirtyRanges = f, c.featureId = a, c.type = _r.FEATURE_FORMULA, this._dependencyManagerService.addFeatureFormulaDependency(r, n, a, c), this._dependencyManagerService.getFeatureFormulaDependency(t.unitId, t.subUnitId, a) && (c.isCache = !0), c;
10659
10671
  }
10660
10672
  _registerOtherFormulas(a, e, t) {
10661
10673
  for (const r of e) {
@@ -10672,18 +10684,18 @@ let fa = class extends Se {
10672
10684
  const f = this._dependencyManagerService.hasOtherFormulaDataMainData(l), m = u[l], { f: d, ranges: _ } = m;
10673
10685
  let C = !1;
10674
10686
  f && (C = !0);
10675
- const E = Gi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: R, firstColumn: y } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), V = (p == null ? void 0 : p.getValue(0, 0)) || gr(this._dependencyManagerService), M = new Ps(V);
10687
+ const E = Gi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: R, firstColumn: y } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), V = (p == null ? void 0 : p.getValue(0, 0)) || Cr(this._dependencyManagerService), M = new Ps(V);
10676
10688
  for (let S = 0; S < _.length; S++) {
10677
10689
  const D = _[S], { startRow: w, startColumn: L, endRow: T, endColumn: j } = D;
10678
10690
  for (let k = w; k <= T; k++)
10679
10691
  for (let G = L; G <= j; G++) {
10680
10692
  const ne = G - y, z = k - R;
10681
10693
  if (ne === 0 && z === 0) {
10682
- M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type = dr.OTHER_FORMULA, M.isCache = C, t.push(M), this._dependencyManagerService.addOtherFormulaDependency(r, o, l, M), this._dependencyManagerService.addFormulaDependencyByDefinedName(M);
10694
+ M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type = _r.OTHER_FORMULA, M.isCache = C, t.push(M), this._dependencyManagerService.addOtherFormulaDependency(r, o, l, M), this._dependencyManagerService.addFormulaDependencyByDefinedName(M);
10683
10695
  continue;
10684
10696
  }
10685
10697
  const $ = new zi();
10686
- $.treeId = (p == null ? void 0 : p.getValue(ne, z)) || gr(this._dependencyManagerService), $.refTree = M, $.refOffsetX = ne, $.refOffsetY = z, $.isCache = C, $.type = dr.OTHER_FORMULA, this._dependencyManagerService.addOtherFormulaDependency(r, o, l, $), this._dependencyManagerService.addFormulaDependencyByDefinedName($), t.push($);
10698
+ $.treeId = (p == null ? void 0 : p.getValue(ne, z)) || Cr(this._dependencyManagerService), $.refTree = M, $.refOffsetX = ne, $.refOffsetY = z, $.isCache = C, $.type = _r.OTHER_FORMULA, this._dependencyManagerService.addOtherFormulaDependency(r, o, l, $), this._dependencyManagerService.addFormulaDependencyByDefinedName($), t.push($);
10687
10699
  }
10688
10700
  }
10689
10701
  this._dependencyManagerService.addOtherFormulaDependencyMainData(l);
@@ -10733,12 +10745,12 @@ let fa = class extends Se {
10733
10745
  }
10734
10746
  }
10735
10747
  _createFDtree(a, e, t, r, n, s) {
10736
- const { f: o, x: u = 0, y: c = 0 } = s, l = new Ps(gr(this._dependencyManagerService)), f = n[a][e], m = Gi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
10748
+ const { f: o, x: u = 0, y: c = 0 } = s, l = new Ps(Cr(this._dependencyManagerService)), f = n[a][e], m = Gi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
10737
10749
  return l.node = m, l.formula = o, l.unitId = a, l.subUnitId = e, l.row = t, l.column = r, l.rowCount = f.rowCount, l.columnCount = f.columnCount, l;
10738
10750
  }
10739
10751
  _createVirtualFDtree(a, e) {
10740
10752
  const { x: t = 0, y: r = 0 } = e, n = new zi();
10741
- return n.treeId = gr(this._dependencyManagerService), n.refTree = a, n.refOffsetX = t, n.refOffsetY = r, n;
10753
+ return n.treeId = Cr(this._dependencyManagerService), n.refTree = a, n.refOffsetX = t, n.refOffsetY = r, n;
10742
10754
  }
10743
10755
  /**
10744
10756
  * Break down the dirty areas into ranges for subsequent matching.
@@ -11107,7 +11119,7 @@ let fa = class extends Se {
11107
11119
  const e = [];
11108
11120
  for (const r of a) {
11109
11121
  const n = r.type;
11110
- if (r.isVirtual && (n === dr.FEATURE_FORMULA || n === dr.OTHER_FORMULA))
11122
+ if (r.isVirtual && (n === _r.FEATURE_FORMULA || n === _r.OTHER_FORMULA))
11111
11123
  continue;
11112
11124
  const s = this._getFormulaDependencyTreeModel(r);
11113
11125
  e.push(s);
@@ -11210,15 +11222,16 @@ let fa = class extends Se {
11210
11222
  }
11211
11223
  };
11212
11224
  fa = Jh([
11213
- St(0, qt),
11214
- St(1, Nt),
11215
- St(2, Ha),
11216
- St(3, Xr),
11217
- St(4, Re(Dr)),
11218
- St(5, Re(qr)),
11219
- St(6, Re(Mr)),
11220
- St(7, gs),
11221
- St(8, Re(Hr))
11225
+ _t(0, qt),
11226
+ _t(1, Vt),
11227
+ _t(2, Ha),
11228
+ _t(3, Xr),
11229
+ _t(4, _e(Kr)),
11230
+ _t(5, _e(wr)),
11231
+ _t(6, _e(qr)),
11232
+ _t(7, _e(Sr)),
11233
+ _t(8, gs),
11234
+ _t(9, _e(Gr))
11222
11235
  ], fa);
11223
11236
  var eg = Object.getOwnPropertyDescriptor, tg = (i, a, e, t) => {
11224
11237
  for (var r = t > 1 ? void 0 : t ? eg(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -11238,7 +11251,7 @@ let ha = class extends Se {
11238
11251
  this._configService = a, this._lexer = e, this._currentConfigService = t, this._runtimeService = r, this._formulaDependencyGenerator = n, this._interpreter = s, this._astTreeBuilder = o;
11239
11252
  }
11240
11253
  dispose() {
11241
- super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), Er.clear(), Ke.clear(), Bs.clear(), aa.clear();
11254
+ super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), Rr.clear(), Ke.clear(), Bs.clear(), aa.clear();
11242
11255
  }
11243
11256
  /**
11244
11257
  * Stop the execution of the formula.
@@ -11263,7 +11276,7 @@ let ha = class extends Se {
11263
11276
  this._runtimeService.setFormulaExecuteStage(tt.START), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._currentConfigService.load(a), this._runtimeService.reset();
11264
11277
  const e = a.maxIteration || Ko;
11265
11278
  this._isCalculateTreeModel = a.isCalculateTreeModel || !1, this._executeLock.acquire("FORMULA_EXECUTION_LOCK", async () => {
11266
- for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._executeStep(), Er.clear(), !!this._runtimeService.isCycleDependency()); t++)
11279
+ for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._executeStep(), Rr.clear(), !!this._runtimeService.isCycleDependency()); t++)
11267
11280
  ;
11268
11281
  this._runtimeService.setFormulaExecuteStage(tt.CALCULATION_COMPLETED), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._executionCompleteListener$.next(this._runtimeService.getAllRuntimeData()), Ke.clear(), this._runtimeService.reset();
11269
11282
  });
@@ -11276,7 +11289,7 @@ let ha = class extends Se {
11276
11289
  e,
11277
11290
  t
11278
11291
  );
11279
- return r == null || r.length === 0 || (Er.clear(), this._currentConfigService.loadDirtyRangesAndExcludedCell(r, n), await this._apply(!0)), !0;
11292
+ return r == null || r.length === 0 || (Rr.clear(), this._currentConfigService.loadDirtyRangesAndExcludedCell(r, n), await this._apply(!0)), !0;
11280
11293
  }
11281
11294
  _getArrayFormulaDirtyRangeAndExcludedRange(a, e) {
11282
11295
  const t = [], r = {};
@@ -11453,19 +11466,19 @@ let ha = class extends Se {
11453
11466
  };
11454
11467
  ha = tg([
11455
11468
  zt(0, ba),
11456
- zt(1, Re(Mr)),
11469
+ zt(1, _e(Sr)),
11457
11470
  zt(2, qt),
11458
- zt(3, Nt),
11471
+ zt(3, Vt),
11459
11472
  zt(4, la),
11460
- zt(5, Re(Dr)),
11461
- zt(6, Re(qr))
11473
+ zt(5, _e(wr)),
11474
+ zt(6, _e(qr))
11462
11475
  ], ha);
11463
11476
  var ng = Object.getOwnPropertyDescriptor, sg = (i, a, e, t) => {
11464
11477
  for (var r = t > 1 ? void 0 : t ? ng(a, e) : a, n = i.length - 1, s; n >= 0; n--)
11465
11478
  (s = i[n]) && (r = s(r) || r);
11466
11479
  return r;
11467
11480
  }, xs = (i, a) => (e, t) => a(e, t, i);
11468
- let Xn = class extends Se {
11481
+ let Kn = class extends Se {
11469
11482
  constructor(i, a, e) {
11470
11483
  super(), this._commandService = i, this._calculateFormulaService = a, this._formulaDataModel = e, this._initialize();
11471
11484
  }
@@ -11587,19 +11600,19 @@ let Xn = class extends Se {
11587
11600
  this._calculateFormulaService.executionCompleteListener$.subscribe((i) => {
11588
11601
  const a = i.functionsExecutedState;
11589
11602
  switch (a) {
11590
- case Fr.NOT_EXECUTED:
11603
+ case Br.NOT_EXECUTED:
11591
11604
  this._applyTreeResult(i);
11592
11605
  break;
11593
- case Fr.STOP_EXECUTION:
11606
+ case Br.STOP_EXECUTION:
11594
11607
  break;
11595
- case Fr.SUCCESS:
11608
+ case Br.SUCCESS:
11596
11609
  this._applyResult(i);
11597
11610
  break;
11598
- case Fr.INITIAL:
11611
+ case Br.INITIAL:
11599
11612
  break;
11600
11613
  }
11601
11614
  this._commandService.executeCommand(
11602
- Un.id,
11615
+ Tn.id,
11603
11616
  {
11604
11617
  functionsExecutedState: a
11605
11618
  },
@@ -11609,7 +11622,7 @@ let Xn = class extends Se {
11609
11622
  );
11610
11623
  }), this._calculateFormulaService.executionInProgressListener$.subscribe((i) => {
11611
11624
  this._commandService.executeCommand(
11612
- Un.id,
11625
+ Tn.id,
11613
11626
  {
11614
11627
  stageInfo: i
11615
11628
  },
@@ -11667,11 +11680,11 @@ let Xn = class extends Se {
11667
11680
  );
11668
11681
  }
11669
11682
  };
11670
- Xn = sg([
11671
- xs(0, lr),
11683
+ Kn = sg([
11684
+ xs(0, mr),
11672
11685
  xs(1, ma),
11673
- xs(2, Re(Or))
11674
- ], Xn);
11686
+ xs(2, _e(Mr))
11687
+ ], Kn);
11675
11688
  const eo = /[\[\]]/g;
11676
11689
  function to(i, a) {
11677
11690
  if (eo.test(i)) {
@@ -11721,10 +11734,10 @@ function ag(i, a = 0, e = 0) {
11721
11734
  };
11722
11735
  }
11723
11736
  function ig(i) {
11724
- const a = hn(i.startRow, i.startAbsoluteRefType, !0), e = hn(i.startColumn, i.startAbsoluteRefType, !1), t = hn(i.endRow, i.endAbsoluteRefType, !0), r = hn(i.endColumn, i.endAbsoluteRefType, !1);
11737
+ const a = gn(i.startRow, i.startAbsoluteRefType, !0), e = gn(i.startColumn, i.startAbsoluteRefType, !1), t = gn(i.endRow, i.endAbsoluteRefType, !0), r = gn(i.endColumn, i.endAbsoluteRefType, !1);
11725
11738
  return a === t && e === r ? `R${a}C${e}` : `R${a}C${e}:R${t}C${r}`;
11726
11739
  }
11727
- function hn(i, a = Pe.ALL, e) {
11740
+ function gn(i, a = Pe.ALL, e) {
11728
11741
  switch (i += 1, a) {
11729
11742
  case Pe.ALL:
11730
11743
  return `${i}`;
@@ -11736,7 +11749,7 @@ function hn(i, a = Pe.ALL, e) {
11736
11749
  return `[${i}]`;
11737
11750
  }
11738
11751
  }
11739
- function rr(i) {
11752
+ function sr(i) {
11740
11753
  let a = i;
11741
11754
  if (i.isArray()) {
11742
11755
  const e = i.getRowCount(), t = i.getColumnCount();
@@ -11746,9 +11759,9 @@ function rr(i) {
11746
11759
  }
11747
11760
  return a.isError(), a;
11748
11761
  }
11749
- function nn(...i) {
11762
+ function sn(...i) {
11750
11763
  for (let a = 0; a < i.length; a++) {
11751
- const e = rr(i[a]);
11764
+ const e = sr(i[a]);
11752
11765
  if (e.isError())
11753
11766
  return {
11754
11767
  isError: !0,
@@ -11763,7 +11776,7 @@ function nn(...i) {
11763
11776
  }
11764
11777
  function W(...i) {
11765
11778
  for (let a = 0; a < i.length; a++) {
11766
- const e = rr(i[a]);
11779
+ const e = sr(i[a]);
11767
11780
  if (e.isError())
11768
11781
  return {
11769
11782
  isError: !0,
@@ -11794,7 +11807,7 @@ function Ye(...i) {
11794
11807
  isError: !0,
11795
11808
  errorObject: g.create(h.NA)
11796
11809
  };
11797
- if (e = rr(i[a]), e.isError())
11810
+ if (e = sr(i[a]), e.isError())
11798
11811
  return {
11799
11812
  isError: !0,
11800
11813
  errorObject: e
@@ -12101,7 +12114,7 @@ class N {
12101
12114
  range: e
12102
12115
  });
12103
12116
  let u;
12104
- return zr(o) ? u = new Ia(o) : Do(o) ? u = new Ba(o) : wo(o) ? u = new Fa(o) : u = new Bn(e, r, t), this._setReferenceDefault(a, u);
12117
+ return Jr(o) ? u = new Ia(o) : Do(o) ? u = new Ba(o) : wo(o) ? u = new Fa(o) : u = new kn(e, r, t), this._setReferenceDefault(a, u);
12105
12118
  }
12106
12119
  _setReferenceDefault(a, e) {
12107
12120
  if (this.unitId == null || this.subUnitId == null)
@@ -12122,7 +12135,7 @@ class og extends N {
12122
12135
  calculate(e, t, r) {
12123
12136
  if (e.isError())
12124
12137
  return e;
12125
- const { isError: n, errorObject: s, variants: o } = nn(t, r);
12138
+ const { isError: n, errorObject: s, variants: o } = sn(t, r);
12126
12139
  if (n)
12127
12140
  return s;
12128
12141
  const { isError: u, errorObject: c, variants: l } = I(...o);
@@ -12172,7 +12185,7 @@ const cg = [
12172
12185
  [og, ga.ARRAY_CONSTRAIN],
12173
12186
  [ug, ga.FLATTEN]
12174
12187
  ];
12175
- var wr;
12188
+ var Lr;
12176
12189
  ((i) => {
12177
12190
  const a = 0.636619772;
12178
12191
  function e(n, s) {
@@ -12311,7 +12324,7 @@ var wr;
12311
12324
  }
12312
12325
  return r(o, l, 2, 1);
12313
12326
  })();
12314
- })(wr || (wr = {}));
12327
+ })(Lr || (Lr = {}));
12315
12328
  function Ga(i) {
12316
12329
  return /^[01]{1,10}$/.test(i);
12317
12330
  }
@@ -12321,7 +12334,7 @@ function Wa(i) {
12321
12334
  function Qa(i) {
12322
12335
  return /^[0-9A-Fa-f]{1,10}$/.test(i);
12323
12336
  }
12324
- function nr(i) {
12337
+ function ar(i) {
12325
12338
  if (i === 0)
12326
12339
  return 0;
12327
12340
  const a = [
@@ -12365,7 +12378,7 @@ function nr(i) {
12365
12378
  return t ? c - 1 : 1 - c;
12366
12379
  }
12367
12380
  function qa(i) {
12368
- return 1 - nr(i);
12381
+ return 1 - ar(i);
12369
12382
  }
12370
12383
  function lg(i) {
12371
12384
  if (i >= 2)
@@ -12380,7 +12393,7 @@ function lg(i) {
12380
12393
  }
12381
12394
  return i < 1 ? t : -t;
12382
12395
  }
12383
- function Rr(i, a = 1) {
12396
+ function yr(i, a = 1) {
12384
12397
  let e = Math.floor(i);
12385
12398
  if (i < 0)
12386
12399
  return Number.NaN;
@@ -12389,7 +12402,7 @@ function Rr(i, a = 1) {
12389
12402
  t *= e, e -= a;
12390
12403
  return t;
12391
12404
  }
12392
- function sr(i, a) {
12405
+ function ir(i, a) {
12393
12406
  const e = Math.min(i - a, a);
12394
12407
  let t = 1;
12395
12408
  for (let r = 1; r <= e && Number.isFinite(t); r++)
@@ -12438,12 +12451,12 @@ function hg(i) {
12438
12451
  }
12439
12452
  return e;
12440
12453
  }
12441
- function yr(i, a) {
12454
+ function br(i, a) {
12442
12455
  return i.map((e) => a[0].map(
12443
12456
  (t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
12444
12457
  ));
12445
12458
  }
12446
- function Et(i) {
12459
+ function Rt(i) {
12447
12460
  return i[0].map((a, e) => i.map((t) => t[e]));
12448
12461
  }
12449
12462
  function gg(i) {
@@ -12451,7 +12464,7 @@ function gg(i) {
12451
12464
  return a ? null : dg(e, t);
12452
12465
  }
12453
12466
  function bu(i) {
12454
- const a = Et(i), e = a.length, t = a[0].length;
12467
+ const a = Rt(i), e = a.length, t = a[0].length;
12455
12468
  let r = !0, n = !1;
12456
12469
  const s = Ca(e, t, 0), o = new Array(t).fill(0).map((u, c) => c);
12457
12470
  for (let u = 0; u < t; u++) {
@@ -12529,13 +12542,13 @@ function Cg(i) {
12529
12542
  const a = _g(i);
12530
12543
  if (!a)
12531
12544
  return null;
12532
- const { matrixU: e, matrixS: t, matrixV: r } = a, n = Et(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];
12545
+ const { matrixU: e, matrixS: t, matrixV: r } = a, n = Rt(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];
12533
12546
  for (let u = 0; u < t.length; u++)
12534
12547
  Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
12535
- return yr(r, yr(s, n));
12548
+ return br(r, br(s, n));
12536
12549
  }
12537
12550
  function _g(i) {
12538
- const a = Et(i), e = a.length, t = a[0].length;
12551
+ const a = Rt(i), e = a.length, t = a[0].length;
12539
12552
  if (e < t)
12540
12553
  return null;
12541
12554
  const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
@@ -12620,7 +12633,7 @@ function _g(i) {
12620
12633
  if (!R) {
12621
12634
  let S = 0, D = 1;
12622
12635
  for (let w = y; w < C + 1 && (m = D * r[w], d = n[w], r[w] *= S, !(Math.abs(m) <= o)); w++) {
12623
- _ = gn(m, d), n[w] = _, S = d / _, D = -m / _;
12636
+ _ = dn(m, d), n[w] = _, S = d / _, D = -m / _;
12624
12637
  for (let L = 0; L < e; L++) {
12625
12638
  const T = a[L][y - 1], j = a[L][w];
12626
12639
  a[L][y - 1] = T * S + j * D, a[L][w] = -T * D + j * S;
@@ -12638,16 +12651,16 @@ function _g(i) {
12638
12651
  if (E >= 49)
12639
12652
  return null;
12640
12653
  let p = n[y];
12641
- m = ((n[C - 1] - n[C]) * (n[C - 1] + n[C]) + (r[C - 1] - r[C]) * (r[C - 1] + r[C])) / (2 * r[C] * n[C - 1]), _ = gn(m, 1), m < 0 ? m = ((p - n[C]) * (p + n[C]) + r[C] * (n[C - 1] / (m - _) - r[C])) / p : m = ((p - n[C]) * (p + n[C]) + r[C] * (n[C - 1] / (m + _) - r[C])) / p;
12654
+ m = ((n[C - 1] - n[C]) * (n[C - 1] + n[C]) + (r[C - 1] - r[C]) * (r[C - 1] + r[C])) / (2 * r[C] * n[C - 1]), _ = dn(m, 1), m < 0 ? m = ((p - n[C]) * (p + n[C]) + r[C] * (n[C - 1] / (m - _) - r[C])) / p : m = ((p - n[C]) * (p + n[C]) + r[C] * (n[C - 1] / (m + _) - r[C])) / p;
12642
12655
  let V = 1, M = 1;
12643
12656
  for (let S = y + 1; S < C + 1; S++) {
12644
12657
  let D = r[S], w = n[S];
12645
- d = M * D, D *= V, _ = gn(m, d), r[S - 1] = _, V = m / _, M = d / _, m = p * V + D * M, d = w * M, D = -p * M + D * V, w *= V;
12658
+ d = M * D, D *= V, _ = dn(m, d), r[S - 1] = _, V = m / _, M = d / _, m = p * V + D * M, d = w * M, D = -p * M + D * V, w *= V;
12646
12659
  for (let L = 0; L < t; L++) {
12647
12660
  const T = s[L][S - 1], j = s[L][S];
12648
12661
  s[L][S - 1] = T * V + j * M, s[L][S] = -T * M + j * V;
12649
12662
  }
12650
- _ = gn(m, d), n[S - 1] = _, V = m / _, M = d / _, m = V * D + M * w, p = -M * D + V * w;
12663
+ _ = dn(m, d), n[S - 1] = _, V = m / _, M = d / _, m = V * D + M * w, p = -M * D + V * w;
12651
12664
  for (let L = 0; L < e; L++) {
12652
12665
  const T = a[L][S - 1], j = a[L][S];
12653
12666
  a[L][S - 1] = T * V + j * M, a[L][S] = -T * M + j * V;
@@ -12678,7 +12691,7 @@ function _g(i) {
12678
12691
  matrixV: s
12679
12692
  };
12680
12693
  }
12681
- function gn(i, a) {
12694
+ function dn(i, a) {
12682
12695
  let e = 0;
12683
12696
  return Math.abs(i) > Math.abs(a) ? (e = a / i, Math.abs(i) * Math.sqrt(1 + e * e)) : a !== 0 ? (e = i / a, Math.abs(a) * Math.sqrt(1 + e * e)) : 0;
12684
12697
  }
@@ -12694,7 +12707,7 @@ function no(i, a, e, t, r) {
12694
12707
  n += i[t][s] * i[r][s];
12695
12708
  return n;
12696
12709
  }
12697
- const dn = /* @__PURE__ */ new Map([
12710
+ const Cn = /* @__PURE__ */ new Map([
12698
12711
  ["I", 1],
12699
12712
  ["V", 5],
12700
12713
  ["X", 10],
@@ -12783,7 +12796,7 @@ function so(i, a, e) {
12783
12796
  return o;
12784
12797
  }
12785
12798
  function Za(i, a) {
12786
- return i + a > 170 ? Math.exp(za(i, a)) : On(i) * On(a) / On(i + a);
12799
+ return i + a > 170 ? Math.exp(za(i, a)) : Mn(i) * Mn(a) / Mn(i + a);
12787
12800
  }
12788
12801
  function za(i, a) {
12789
12802
  return gt(i) + gt(a) - gt(i + a);
@@ -12801,7 +12814,7 @@ function Nu(i, a, e) {
12801
12814
  return t;
12802
12815
  }
12803
12816
  function Ja(i, a, e) {
12804
- return e === 0 || e === 1 ? a * e === i ? 1 : 0 : sr(a, i) * e ** i * (1 - e) ** (a - i);
12817
+ return e === 0 || e === 1 ? a * e === i ? 1 : 0 : ir(a, i) * e ** i * (1 - e) ** (a - i);
12805
12818
  }
12806
12819
  function ei(i, a) {
12807
12820
  return i <= 0 ? 0 : ri(a / 2, i / 2);
@@ -12848,7 +12861,7 @@ function Mu(i, a, e) {
12848
12861
  const l = u / c;
12849
12862
  return s - l * o + l * i;
12850
12863
  }
12851
- function On(i) {
12864
+ function Mn(i) {
12852
12865
  const a = [
12853
12866
  -1.716185138865495,
12854
12867
  24.76565080557592,
@@ -12972,10 +12985,10 @@ function Sg(i, a, e, t) {
12972
12985
  return r;
12973
12986
  }
12974
12987
  function ni(i, a, e, t) {
12975
- return a - i > t - e ? 0 : sr(e, i) * sr(t - e, a - i) / sr(t, a);
12988
+ return a - i > t - e ? 0 : ir(e, i) * ir(t - e, a - i) / ir(t, a);
12976
12989
  }
12977
12990
  function Du(i, a, e) {
12978
- return i < 0 ? 0 : 0.5 + 0.5 * nr((Math.log(i) - a) / Math.sqrt(2 * e * e));
12991
+ return i < 0 ? 0 : 0.5 + 0.5 * ar((Math.log(i) - a) / Math.sqrt(2 * e * e));
12979
12992
  }
12980
12993
  function Dg(i, a, e) {
12981
12994
  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));
@@ -12992,10 +13005,10 @@ function Lg(i, a, e) {
12992
13005
  return t;
12993
13006
  }
12994
13007
  function si(i, a, e) {
12995
- return i < 0 ? 0 : sr(i + a - 1, a - 1) * e ** a * (1 - e) ** i;
13008
+ return i < 0 ? 0 : ir(i + a - 1, a - 1) * e ** a * (1 - e) ** i;
12996
13009
  }
12997
- function sn(i, a, e) {
12998
- return 0.5 * (1 + nr((i - a) / Math.sqrt(2 * e * e)));
13010
+ function an(i, a, e) {
13011
+ return 0.5 * (1 + ar((i - a) / Math.sqrt(2 * e * e)));
12999
13012
  }
13000
13013
  function wu(i, a, e) {
13001
13014
  return Math.exp(-0.5 * Math.log(2 * Math.PI) - Math.log(e) - (i - a) ** 2 / (2 * e * e));
@@ -13010,9 +13023,9 @@ function Pg(i, a) {
13010
13023
  return e;
13011
13024
  }
13012
13025
  function Lu(i, a) {
13013
- return Math.exp(-a) * a ** i / Rr(i);
13026
+ return Math.exp(-a) * a ** i / yr(i);
13014
13027
  }
13015
- function an(i, a) {
13028
+ function on(i, a) {
13016
13029
  const e = 0.5 * ds(a / (i ** 2 + a), a / 2, 0.5);
13017
13030
  return i < 0 ? e : 1 - e;
13018
13031
  }
@@ -13079,7 +13092,7 @@ function As(i, a, e) {
13079
13092
  errorObject: null
13080
13093
  };
13081
13094
  }
13082
- function bt(i) {
13095
+ function pt(i) {
13083
13096
  const a = i.isArray() ? i.getRowCount() : 1, e = i.isArray() ? i.getColumnCount() : 1, t = [];
13084
13097
  for (let r = 0; r < a; r++) {
13085
13098
  t[r] = [];
@@ -13169,13 +13182,13 @@ function ys(i, a, e, t, r) {
13169
13182
  let s = i;
13170
13183
  r && (s = i.map((C) => C.map((E) => Math.log(E))));
13171
13184
  let o = a, u = e;
13172
- n && (s = Et(s), o = Et(o), u = Et(u)), t && (o = o.map((C) => [...C, 1]));
13173
- const c = Et(o), l = yr(c, o), f = yr(c, s);
13185
+ n && (s = Rt(s), o = Rt(o), u = Rt(u)), t && (o = o.map((C) => [...C, 1]));
13186
+ const c = Rt(o), l = br(c, o), f = br(c, s);
13174
13187
  let m = gg(l);
13175
13188
  if (!m && (m = Cg(l), !m))
13176
13189
  return g.create(h.NA);
13177
- let d = yr(m, f);
13178
- t || d.push([0]), d = Et(d);
13190
+ let d = br(m, f);
13191
+ t || d.push([0]), d = Rt(d);
13179
13192
  const _ = d[0].pop();
13180
13193
  if (d[0].reverse(), d[0].push(_), r)
13181
13194
  for (let C = 0; C < d[0].length; C++)
@@ -13292,7 +13305,7 @@ function Tu(i, a) {
13292
13305
  return g.create(h.VALUE);
13293
13306
  }
13294
13307
  }
13295
- function mr(i, a, e) {
13308
+ function gr(i, a, e) {
13296
13309
  var o, u;
13297
13310
  const { ignoreRowHidden: t = !1, ignoreErrorValues: r = !1, ignoreNested: n = !1 } = a != null ? a : {}, s = [];
13298
13311
  if (i.isReferenceObject()) {
@@ -14054,7 +14067,7 @@ class ic extends N {
14054
14067
  if (C <= 0)
14055
14068
  return g.create(h.NUM);
14056
14069
  let R;
14057
- return E ? R = sn(d, _, C) : R = wu(d, _, C), b.create(R);
14070
+ return E ? R = an(d, _, C) : R = wu(d, _, C), b.create(R);
14058
14071
  }
14059
14072
  }
14060
14073
  class oc extends N {
@@ -14120,7 +14133,7 @@ class cc extends N {
14120
14133
  A(this, "maxParams", 2);
14121
14134
  }
14122
14135
  calculate(e, t) {
14123
- const r = mr(e);
14136
+ const r = gr(e);
14124
14137
  if (t.isArray()) {
14125
14138
  const n = t.mapValue((s) => this._handleSingleObject(r, s));
14126
14139
  return n.getRowCount() === 1 && n.getColumnCount() === 1 ? n.get(0, 0) : n;
@@ -14229,7 +14242,7 @@ class mc extends N {
14229
14242
  A(this, "maxParams", 2);
14230
14243
  }
14231
14244
  calculate(e, t) {
14232
- const r = mr(e);
14245
+ const r = gr(e);
14233
14246
  if (t.isArray()) {
14234
14247
  const n = t.mapValue((s) => this._handleSingleObject(r, s));
14235
14248
  return n.getRowCount() === 1 && n.getColumnCount() === 1 ? n.get(0, 0) : n;
@@ -14341,7 +14354,7 @@ class Cc extends N {
14341
14354
  const { isError: s, errorObject: o, x: u, degFreedom: c } = this._getTDistParamByArrayValues(e, t, n);
14342
14355
  if (s)
14343
14356
  return o;
14344
- let l = an(-u, c);
14357
+ let l = on(-u, c);
14345
14358
  return r === 2 && (l *= 2), Number.isNaN(l) || !Number.isFinite(l) ? g.create(h.NUM) : b.create(l);
14346
14359
  }
14347
14360
  _getArrayValues(e) {
@@ -14594,7 +14607,7 @@ class Rc extends N {
14594
14607
  }
14595
14608
  if (d <= 0)
14596
14609
  return g.create(h.NUM);
14597
- const _ = (f / l - c) / (d / Math.sqrt(l)), C = 1 - sn(_, 0, 1);
14610
+ const _ = (f / l - c) / (d / Math.sqrt(l)), C = 1 - an(_, 0, 1);
14598
14611
  return Number.isNaN(C) || !Number.isFinite(C) ? g.create(h.NUM) : b.create(C);
14599
14612
  }
14600
14613
  _getArrayValues(e) {
@@ -14776,7 +14789,7 @@ class Bg extends N {
14776
14789
  const { isError: t, errorObject: r, variants: n } = I(e);
14777
14790
  if (t)
14778
14791
  return r;
14779
- const [s] = n, o = +s.getValue(), u = sn(o, 0, 1);
14792
+ const [s] = n, o = +s.getValue(), u = an(o, 0, 1);
14780
14793
  return b.create(u);
14781
14794
  }
14782
14795
  }
@@ -14867,7 +14880,7 @@ class $g extends N {
14867
14880
  const [u, c, l] = o, f = +u.getValue(), m = Math.floor(+c.getValue()), d = Math.floor(+l.getValue());
14868
14881
  if (f < 0 || m < 1 || m > 10 ** 10 || d < 1 || d > 2)
14869
14882
  return g.create(h.NUM);
14870
- let _ = an(-f, m);
14883
+ let _ = on(-f, m);
14871
14884
  return d === 2 && (_ *= 2), Number.isNaN(_) || !Number.isFinite(_) ? g.create(h.NUM) : b.create(_);
14872
14885
  }
14873
14886
  }
@@ -15481,7 +15494,7 @@ class od extends N {
15481
15494
  _ = Math.floor(t) - Math.floor(e);
15482
15495
  break;
15483
15496
  case "MD":
15484
- _ = m - u, m < u && (C = new Date(Date.UTC(l, f - 1, 0)), _ += Zr(C.getUTCFullYear(), C.getUTCMonth()));
15497
+ _ = m - u, m < u && (C = new Date(Date.UTC(l, f - 1, 0)), _ += zr(C.getUTCFullYear(), C.getUTCMonth()));
15485
15498
  break;
15486
15499
  case "YM":
15487
15500
  _ = f - o, (f < o || f === o && m < u) && (_ += 12), m < u && (_ -= 1);
@@ -15512,11 +15525,11 @@ class ud extends N {
15512
15525
  return e;
15513
15526
  if (e.isString()) {
15514
15527
  const t = `${e.getValue()}`;
15515
- let r = Sn(t);
15516
- if (r === null && (r = Dn(t)), r) {
15528
+ let r = Dn(t);
15529
+ if (r === null && (r = wn(t)), r) {
15517
15530
  let { v: n, z: s } = r;
15518
15531
  if (s && Ma(s))
15519
- return n instanceof Date && (n = Kr(n)), b.create(Math.trunc(+n));
15532
+ return n instanceof Date && (n = Zr(n)), b.create(Math.trunc(+n));
15520
15533
  }
15521
15534
  }
15522
15535
  return g.create(h.VALUE);
@@ -15622,7 +15635,7 @@ class fd extends N {
15622
15635
  return y;
15623
15636
  if (E.isString() && (E = E.convertToNumberObjectValue()), E.isError())
15624
15637
  return E;
15625
- const p = +E.getValue(), { days: V } = _e(R, y, p ? 4 : 0), M = y >= R ? V : -V;
15638
+ const p = +E.getValue(), { days: V } = Ae(R, y, p ? 4 : 0), M = y >= R ? V : -V;
15626
15639
  return b.create(M);
15627
15640
  });
15628
15641
  return s === 1 && o === 1 ? f.get(0, 0) : f;
@@ -15724,7 +15737,7 @@ class gd extends N {
15724
15737
  const R = 25569 + l / 864e5;
15725
15738
  return b.create(R);
15726
15739
  } else {
15727
- const R = Kr(E);
15740
+ const R = Zr(E);
15728
15741
  return b.create(R, "yyyy-MM-dd AM/PM hh:mm:ss");
15729
15742
  }
15730
15743
  }
@@ -15768,7 +15781,7 @@ class gd extends N {
15768
15781
  };
15769
15782
  }
15770
15783
  }
15771
- var Ae = /* @__PURE__ */ ((i) => (i.DATE = "DATE", i.DATEDIF = "DATEDIF", i.DATEVALUE = "DATEVALUE", i.DAY = "DAY", i.DAYS = "DAYS", i.DAYS360 = "DAYS360", i.EDATE = "EDATE", i.EOMONTH = "EOMONTH", i.EPOCHTODATE = "EPOCHTODATE", i.HOUR = "HOUR", i.ISOWEEKNUM = "ISOWEEKNUM", i.MINUTE = "MINUTE", i.MONTH = "MONTH", i.NETWORKDAYS = "NETWORKDAYS", i.NETWORKDAYS_INTL = "NETWORKDAYS.INTL", i.NOW = "NOW", i.SECOND = "SECOND", i.TIME = "TIME", i.TIMEVALUE = "TIMEVALUE", i.TO_DATE = "TO_DATE", i.TODAY = "TODAY", i.WEEKDAY = "WEEKDAY", i.WEEKNUM = "WEEKNUM", i.WORKDAY = "WORKDAY", i.WORKDAY_INTL = "WORKDAY.INTL", i.YEAR = "YEAR", i.YEARFRAC = "YEARFRAC", i))(Ae || {});
15784
+ var Ee = /* @__PURE__ */ ((i) => (i.DATE = "DATE", i.DATEDIF = "DATEDIF", i.DATEVALUE = "DATEVALUE", i.DAY = "DAY", i.DAYS = "DAYS", i.DAYS360 = "DAYS360", i.EDATE = "EDATE", i.EOMONTH = "EOMONTH", i.EPOCHTODATE = "EPOCHTODATE", i.HOUR = "HOUR", i.ISOWEEKNUM = "ISOWEEKNUM", i.MINUTE = "MINUTE", i.MONTH = "MONTH", i.NETWORKDAYS = "NETWORKDAYS", i.NETWORKDAYS_INTL = "NETWORKDAYS.INTL", i.NOW = "NOW", i.SECOND = "SECOND", i.TIME = "TIME", i.TIMEVALUE = "TIMEVALUE", i.TO_DATE = "TO_DATE", i.TODAY = "TODAY", i.WEEKDAY = "WEEKDAY", i.WEEKNUM = "WEEKNUM", i.WORKDAY = "WORKDAY", i.WORKDAY_INTL = "WORKDAY.INTL", i.YEAR = "YEAR", i.YEARFRAC = "YEARFRAC", i))(Ee || {});
15772
15785
  class dd extends N {
15773
15786
  constructor() {
15774
15787
  super(...arguments);
@@ -15802,8 +15815,8 @@ class Cd extends N {
15802
15815
  if (typeof t != "number")
15803
15816
  return t;
15804
15817
  const r = ae(t), n = t > 0 ? r.getUTCFullYear() : 1900;
15805
- let s = new Date(Date.UTC(n, 0, 1)), o = Ne(s), u = or(o), c;
15806
- 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 = Ne(s), u = or(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
15818
+ let s = new Date(Date.UTC(n, 0, 1)), o = Ne(s), u = cr(o), c;
15819
+ 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 = Ne(s), u = cr(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
15807
15820
  const l = Math.ceil((t - c + 1) / 7);
15808
15821
  return b.create(l);
15809
15822
  }
@@ -15893,7 +15906,7 @@ class Ed extends N {
15893
15906
  return u;
15894
15907
  if (r)
15895
15908
  return this._getResultByHolidays(o, u, r);
15896
- const c = wn(o, u);
15909
+ const c = Ln(o, u);
15897
15910
  return b.create(c);
15898
15911
  }
15899
15912
  _getResultByHolidays(e, t, r) {
@@ -15918,7 +15931,7 @@ class Ed extends N {
15918
15931
  return o;
15919
15932
  n.push(o);
15920
15933
  }
15921
- const s = wn(e, t, 1, n);
15934
+ const s = Ln(e, t, 1, n);
15922
15935
  return b.create(s);
15923
15936
  }
15924
15937
  }
@@ -15951,9 +15964,9 @@ class Rd extends N {
15951
15964
  return o;
15952
15965
  let u = 1;
15953
15966
  if (r) {
15954
- if (u = r.getValue(), r.isBoolean() && (u = +u), r.isString() && !Br(u))
15967
+ if (u = r.getValue(), r.isBoolean() && (u = +u), r.isString() && !kr(u))
15955
15968
  return g.create(h.VALUE);
15956
- if (!Br(u))
15969
+ if (!kr(u))
15957
15970
  return g.create(h.NUM);
15958
15971
  }
15959
15972
  if (s.isBoolean() || o.isBoolean())
@@ -15966,7 +15979,7 @@ class Rd extends N {
15966
15979
  return l;
15967
15980
  if (n)
15968
15981
  return this._getResultByHolidays(c, l, u, n);
15969
- const f = wn(c, l, u);
15982
+ const f = Ln(c, l, u);
15970
15983
  return b.create(f);
15971
15984
  }
15972
15985
  _getResultByHolidays(e, t, r, n) {
@@ -15991,7 +16004,7 @@ class Rd extends N {
15991
16004
  return u;
15992
16005
  s.push(u);
15993
16006
  }
15994
- const o = wn(e, t, r, s);
16007
+ const o = Ln(e, t, r, s);
15995
16008
  return b.create(o);
15996
16009
  }
15997
16010
  }
@@ -16002,7 +16015,7 @@ class yd extends N {
16002
16015
  A(this, "maxParams", 0);
16003
16016
  }
16004
16017
  calculate() {
16005
- const e = /* @__PURE__ */ new Date(), t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds())), r = Kr(t);
16018
+ const e = /* @__PURE__ */ new Date(), t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds())), r = Zr(t);
16006
16019
  return b.create(r, dl);
16007
16020
  }
16008
16021
  }
@@ -16085,7 +16098,7 @@ class Nd extends N {
16085
16098
  if (r) {
16086
16099
  let { v: n, z: s } = r;
16087
16100
  if (s && Ma(s))
16088
- return n instanceof Date && (n = Kr(n)), b.create(Qm(+n));
16101
+ return n instanceof Date && (n = Zr(n)), b.create(Qm(+n));
16089
16102
  }
16090
16103
  }
16091
16104
  return g.create(h.VALUE);
@@ -16184,7 +16197,7 @@ class Md extends N {
16184
16197
  const s = Math.floor(+r.getValue());
16185
16198
  if (!this._returnTypeMap[s])
16186
16199
  return g.create(h.NUM);
16187
- const o = or(n), u = this._returnTypeMap[s][o];
16200
+ const o = cr(n), u = this._returnTypeMap[s][o];
16188
16201
  return b.create(u);
16189
16202
  }
16190
16203
  }
@@ -16236,9 +16249,9 @@ class Sd extends N {
16236
16249
  }
16237
16250
  _getResult(e, t) {
16238
16251
  const r = ae(e), n = e > 0 ? r.getUTCFullYear() : 1900;
16239
- let s = new Date(Date.UTC(n, 0, 1)), o = Ne(s), u = or(o), c;
16252
+ let s = new Date(Date.UTC(n, 0, 1)), o = Ne(s), u = cr(o), c;
16240
16253
  if (t === 21)
16241
- 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 = Ne(s), u = or(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
16254
+ 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 = Ne(s), u = cr(o), u < 1 ? c = o + 1 : u <= 4 ? c = o - (u - 1) : c = o + (11 - u));
16242
16255
  else {
16243
16256
  const f = this._returnTypeMap[t];
16244
16257
  u < f ? c = o - (u + 7 - f) : c = o - (u - f);
@@ -16283,7 +16296,7 @@ class Dd extends N {
16283
16296
  return g.create(h.VALUE);
16284
16297
  if (r)
16285
16298
  return this._getResultByHolidays(o, u, r);
16286
- const c = Ln(o, u);
16299
+ const c = Pn(o, u);
16287
16300
  return typeof c != "number" ? c : b.create(c);
16288
16301
  }
16289
16302
  _getResultByHolidays(e, t, r) {
@@ -16308,7 +16321,7 @@ class Dd extends N {
16308
16321
  return o;
16309
16322
  n.push(o);
16310
16323
  }
16311
- const s = Ln(e, t, 1, n);
16324
+ const s = Pn(e, t, 1, n);
16312
16325
  return typeof s != "number" ? s : b.create(s);
16313
16326
  }
16314
16327
  }
@@ -16337,13 +16350,13 @@ class wd extends N {
16337
16350
  if (Number.isNaN(l))
16338
16351
  return g.create(h.VALUE);
16339
16352
  let f = s.getValue();
16340
- if (s.isBoolean() && (f = +f), s.isString() && (!Br(f) || f === "1111111"))
16353
+ if (s.isBoolean() && (f = +f), s.isString() && (!kr(f) || f === "1111111"))
16341
16354
  return g.create(h.VALUE);
16342
- if (!Br(f))
16355
+ if (!kr(f))
16343
16356
  return g.create(h.NUM);
16344
16357
  if (n)
16345
16358
  return this._getResultByHolidays(c, l, f, n);
16346
- const m = Ln(c, l, f);
16359
+ const m = Pn(c, l, f);
16347
16360
  return typeof m != "number" ? m : b.create(m);
16348
16361
  }
16349
16362
  _checkArrayError(e) {
@@ -16378,7 +16391,7 @@ class wd extends N {
16378
16391
  return u;
16379
16392
  s.push(u);
16380
16393
  }
16381
- const o = Ln(e, t, r, s);
16394
+ const o = Pn(e, t, r, s);
16382
16395
  return typeof o != "number" ? o : b.create(o);
16383
16396
  }
16384
16397
  }
@@ -16420,13 +16433,13 @@ class Pd extends N {
16420
16433
  }
16421
16434
  calculate(e, t, r) {
16422
16435
  let n = r != null ? r : b.create(0);
16423
- const s = rr(e);
16436
+ const s = sr(e);
16424
16437
  if (s.isError())
16425
16438
  return s;
16426
- const o = rr(t);
16439
+ const o = sr(t);
16427
16440
  if (o.isError())
16428
16441
  return o;
16429
- if (n = rr(n), n.isError())
16442
+ if (n = sr(n), n.isError())
16430
16443
  return n;
16431
16444
  if (s.isBoolean() || o.isBoolean() || n.isBoolean())
16432
16445
  return g.create(h.VALUE);
@@ -16441,38 +16454,38 @@ class Pd extends N {
16441
16454
  return g.create(h.VALUE);
16442
16455
  if (l < 0 || l > 4)
16443
16456
  return g.create(h.NUM);
16444
- const { days: f, yearDays: m } = _e(u, c, l), d = f / m;
16457
+ const { days: f, yearDays: m } = Ae(u, c, l), d = f / m;
16445
16458
  return b.create(d);
16446
16459
  }
16447
16460
  }
16448
16461
  const xd = [
16449
- [id, Ae.DATE],
16450
- [od, Ae.DATEDIF],
16451
- [ud, Ae.DATEVALUE],
16452
- [cd, Ae.DAY],
16453
- [ld, Ae.DAYS],
16454
- [fd, Ae.DAYS360],
16455
- [md, Ae.EDATE],
16456
- [hd, Ae.EOMONTH],
16457
- [gd, Ae.EPOCHTODATE],
16458
- [dd, Ae.HOUR],
16459
- [Cd, Ae.ISOWEEKNUM],
16460
- [_d, Ae.MINUTE],
16461
- [Ad, Ae.MONTH],
16462
- [Ed, Ae.NETWORKDAYS],
16463
- [Rd, Ae.NETWORKDAYS_INTL],
16464
- [yd, Ae.NOW],
16465
- [bd, Ae.SECOND],
16466
- [pd, Ae.TIME],
16467
- [Nd, Ae.TIMEVALUE],
16468
- [Vd, Ae.TO_DATE],
16469
- [Od, Ae.TODAY],
16470
- [Md, Ae.WEEKDAY],
16471
- [Sd, Ae.WEEKNUM],
16472
- [Dd, Ae.WORKDAY],
16473
- [wd, Ae.WORKDAY_INTL],
16474
- [Ld, Ae.YEAR],
16475
- [Pd, Ae.YEARFRAC]
16462
+ [id, Ee.DATE],
16463
+ [od, Ee.DATEDIF],
16464
+ [ud, Ee.DATEVALUE],
16465
+ [cd, Ee.DAY],
16466
+ [ld, Ee.DAYS],
16467
+ [fd, Ee.DAYS360],
16468
+ [md, Ee.EDATE],
16469
+ [hd, Ee.EOMONTH],
16470
+ [gd, Ee.EPOCHTODATE],
16471
+ [dd, Ee.HOUR],
16472
+ [Cd, Ee.ISOWEEKNUM],
16473
+ [_d, Ee.MINUTE],
16474
+ [Ad, Ee.MONTH],
16475
+ [Ed, Ee.NETWORKDAYS],
16476
+ [Rd, Ee.NETWORKDAYS_INTL],
16477
+ [yd, Ee.NOW],
16478
+ [bd, Ee.SECOND],
16479
+ [pd, Ee.TIME],
16480
+ [Nd, Ee.TIMEVALUE],
16481
+ [Vd, Ee.TO_DATE],
16482
+ [Od, Ee.TODAY],
16483
+ [Md, Ee.WEEKDAY],
16484
+ [Sd, Ee.WEEKNUM],
16485
+ [Dd, Ee.WORKDAY],
16486
+ [wd, Ee.WORKDAY_INTL],
16487
+ [Ld, Ee.YEAR],
16488
+ [Pd, Ee.YEARFRAC]
16476
16489
  ];
16477
16490
  class jd extends N {
16478
16491
  constructor() {
@@ -16491,7 +16504,7 @@ class jd extends N {
16491
16504
  return g.create(h.VALUE);
16492
16505
  if (l < 0)
16493
16506
  return g.create(h.NUM);
16494
- const f = wr.besseli(c, l);
16507
+ const f = Lr.besseli(c, l);
16495
16508
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
16496
16509
  }
16497
16510
  }
@@ -16512,7 +16525,7 @@ class Ud extends N {
16512
16525
  return g.create(h.VALUE);
16513
16526
  if (l < 0)
16514
16527
  return g.create(h.NUM);
16515
- const f = wr.besselj(c, l);
16528
+ const f = Lr.besselj(c, l);
16516
16529
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
16517
16530
  }
16518
16531
  }
@@ -16533,7 +16546,7 @@ class Td extends N {
16533
16546
  return g.create(h.VALUE);
16534
16547
  if (l < 0)
16535
16548
  return g.create(h.NUM);
16536
- const f = wr.besselk(c, l);
16549
+ const f = Lr.besselk(c, l);
16537
16550
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
16538
16551
  }
16539
16552
  }
@@ -16554,7 +16567,7 @@ class vd extends N {
16554
16567
  return g.create(h.VALUE);
16555
16568
  if (l < 0)
16556
16569
  return g.create(h.NUM);
16557
- const f = wr.bessely(c, l);
16570
+ const f = Lr.bessely(c, l);
16558
16571
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
16559
16572
  }
16560
16573
  }
@@ -17609,7 +17622,7 @@ class zd extends N {
17609
17622
  const [u, c] = o, l = +u.getValue(), f = +c.getValue();
17610
17623
  if (Number.isNaN(l) || Number.isNaN(f))
17611
17624
  return g.create(h.VALUE);
17612
- r = nr(f) - nr(l);
17625
+ r = ar(f) - ar(l);
17613
17626
  } else {
17614
17627
  const { isError: n, errorObject: s, variants: o } = W(e);
17615
17628
  if (n)
@@ -17617,7 +17630,7 @@ class zd extends N {
17617
17630
  const [u] = o, c = +u.getValue();
17618
17631
  if (Number.isNaN(c))
17619
17632
  return g.create(h.VALUE);
17620
- r = nr(c);
17633
+ r = ar(c);
17621
17634
  }
17622
17635
  return b.create(r);
17623
17636
  }
@@ -17635,7 +17648,7 @@ class Jd extends N {
17635
17648
  const [s] = n, o = +s.getValue();
17636
17649
  if (Number.isNaN(o))
17637
17650
  return g.create(h.VALUE);
17638
- const u = nr(o);
17651
+ const u = ar(o);
17639
17652
  return b.create(u);
17640
17653
  }
17641
17654
  }
@@ -18508,7 +18521,7 @@ const v1 = [
18508
18521
  ];
18509
18522
  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 || {});
18510
18523
  function bs(i, a, e, t) {
18511
- const r = Wt(i, a, e), { days: n } = _e(r, i, t);
18524
+ const r = Wt(i, a, e), { days: n } = Ae(r, i, t);
18512
18525
  return n;
18513
18526
  }
18514
18527
  function ze(i, a, e, t) {
@@ -18516,7 +18529,7 @@ function ze(i, a, e, t) {
18516
18529
  if (t === 1) {
18517
18530
  const n = Wt(i, a, e);
18518
18531
  let s = ae(n);
18519
- s = pr(s, 12 / e);
18532
+ s = Nr(s, 12 / e);
18520
18533
  const o = Ne(s);
18521
18534
  n < 0 && e === 1 ? r = 365 : r = o - n;
18522
18535
  } else t === 3 ? r = 365 / e : r = 360 / e;
@@ -18526,26 +18539,26 @@ function yc(i, a, e) {
18526
18539
  const t = ae(i);
18527
18540
  let r = ae(a);
18528
18541
  for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
18529
- r = pr(r, -12 / e);
18530
- return r = pr(r, 12 / e), Ne(r);
18542
+ r = Nr(r, -12 / e);
18543
+ return r = Nr(r, 12 / e), Ne(r);
18531
18544
  }
18532
- function ur(i, a, e) {
18545
+ function lr(i, a, e) {
18533
18546
  let t = 0;
18534
18547
  const r = ae(i);
18535
18548
  let n = ae(a);
18536
18549
  for (; n > r; )
18537
- n = pr(n, -12 / e), t++;
18550
+ n = Nr(n, -12 / e), t++;
18538
18551
  return t;
18539
18552
  }
18540
18553
  function Wt(i, a, e) {
18541
18554
  const t = ae(i);
18542
18555
  let r = ae(a);
18543
18556
  for (r.setUTCFullYear(t.getUTCFullYear()), r < t && r.setUTCFullYear(r.getUTCFullYear() + 1); r > t; )
18544
- r = pr(r, -12 / e);
18557
+ r = Nr(r, -12 / e);
18545
18558
  return Ne(r);
18546
18559
  }
18547
18560
  function bc(i, a, e, t, r, n) {
18548
- const s = bs(i, a, r, n), o = ze(i, a, r, n), u = ur(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
18561
+ const s = bs(i, a, r, n), o = ze(i, a, r, n), u = lr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
18549
18562
  let m = 0, d = 0;
18550
18563
  for (let E = 1; E <= u; E++) {
18551
18564
  const R = E + c, y = f / l ** R;
@@ -18554,7 +18567,7 @@ function bc(i, a, e, t, r, n) {
18554
18567
  const _ = u + c, C = 100 / l ** _;
18555
18568
  return m += _ * C, d += C, m / d / r;
18556
18569
  }
18557
- function on(i, a, e, t, r) {
18570
+ function un(i, a, e, t, r) {
18558
18571
  let n;
18559
18572
  if (i === 0)
18560
18573
  n = (e + t) / a;
@@ -18564,7 +18577,7 @@ function on(i, a, e, t, r) {
18564
18577
  }
18565
18578
  return -n;
18566
18579
  }
18567
- function cr(i, a, e, t, r) {
18580
+ function fr(i, a, e, t, r) {
18568
18581
  let n;
18569
18582
  if (i === 0)
18570
18583
  n = t + e * a;
@@ -18577,8 +18590,8 @@ function cr(i, a, e, t, r) {
18577
18590
  return -n;
18578
18591
  }
18579
18592
  function pc(i, a, e, t, r, n) {
18580
- const s = on(i, e, t, r, n);
18581
- return (a === 1 ? n === 1 ? 0 : -t : n === 1 ? cr(i, a - 2, s, t, 1) - s : cr(i, a - 1, s, t, 0)) * i;
18593
+ const s = un(i, e, t, r, n);
18594
+ return (a === 1 ? n === 1 ? 0 : -t : n === 1 ? fr(i, a - 2, s, t, 1) - s : fr(i, a - 1, s, t, 0)) * i;
18582
18595
  }
18583
18596
  function Nc(i, a) {
18584
18597
  let e = 0;
@@ -18615,7 +18628,7 @@ function Vc(i, a, e, t, r, n, s, o, u) {
18615
18628
  }
18616
18629
  function I1(i, a, e, t, r, n, s, o, u, c, l) {
18617
18630
  let f = 0;
18618
- const m = ur(i, a, o), d = tr(i, t, u);
18631
+ const m = lr(i, a, o), d = tr(i, t, u);
18619
18632
  f += s / (1 + n / o) ** (m - 1 + d / l), f += 100 * r / o * c / l / (1 + n / o) ** (d / l);
18620
18633
  for (let C = 2; C <= m; C++)
18621
18634
  f += 100 * r / o / (1 + n / o) ** (C - 1 + d / l);
@@ -18624,20 +18637,20 @@ function I1(i, a, e, t, r, n, s, o, u, c, l) {
18624
18637
  }
18625
18638
  function F1(i, a, e, t, r, n, s, o, u, c) {
18626
18639
  let l = 0;
18627
- const f = ur(t, a, o), m = B1(t, i, 12 / o);
18640
+ const f = lr(t, a, o), m = B1(t, i, 12 / o);
18628
18641
  let d;
18629
18642
  if (u === 2 || u === 3) {
18630
18643
  const y = yc(i, t, o);
18631
18644
  d = tr(i, y, u);
18632
18645
  } else {
18633
- const y = Wt(i, t, o), { days: p } = _e(y, i, u);
18646
+ const y = Wt(i, t, o), { days: p } = Ae(y, i, u);
18634
18647
  d = c - p;
18635
18648
  }
18636
18649
  l += s / (1 + n / o) ** (f + m + d / c);
18637
- const _ = ur(e, t, o);
18650
+ const _ = lr(e, t, o);
18638
18651
  let C = t, E = 0, R = 0;
18639
18652
  for (let y = _; y >= 1; y--) {
18640
- const p = ar(C, -12 / o, !1), V = u === 1 ? tr(p, C, u) : c, M = y > 1 ? V : tr(e, C, u);
18653
+ const p = or(C, -12 / o, !1), V = u === 1 ? tr(p, C, u) : c, M = y > 1 ? V : tr(e, C, u);
18641
18654
  E += M / V;
18642
18655
  const S = e > p ? e : p, D = i < C ? i : C, w = tr(S, D, u);
18643
18656
  R += w / V, C = p;
@@ -18648,29 +18661,29 @@ function F1(i, a, e, t, r, n, s, o, u, c) {
18648
18661
  return l -= 100 * r / o * R, l;
18649
18662
  }
18650
18663
  function tr(i, a, e) {
18651
- const { days: t } = _e(i, a, e);
18664
+ const { days: t } = Ae(i, a, e);
18652
18665
  return i < a ? t : 0;
18653
18666
  }
18654
18667
  function Oc(i, a, e) {
18655
- const t = ae(i), r = t.getUTCFullYear(), n = t.getUTCMonth(), s = t.getUTCDate(), o = br(r, n, s), u = ae(a), c = u.getUTCFullYear(), l = u.getUTCMonth(), f = u.getUTCDate(), m = br(c, l, f);
18668
+ const t = ae(i), r = t.getUTCFullYear(), n = t.getUTCMonth(), s = t.getUTCDate(), o = pr(r, n, s), u = ae(a), c = u.getUTCFullYear(), l = u.getUTCMonth(), f = u.getUTCDate(), m = pr(c, l, f);
18656
18669
  return !(s !== f && !(o && m) || Math.abs((c - r) * 12 + (l - n)) % (12 / e) !== 0);
18657
18670
  }
18658
- function Tr(i, a, e) {
18671
+ function vr(i, a, e) {
18659
18672
  return Wt(i, a, e) >= 0;
18660
18673
  }
18661
- function ar(i, a, e) {
18674
+ function or(i, a, e) {
18662
18675
  let t = ae(i);
18663
- if (t = pr(t, a), e) {
18664
- const r = t.getUTCFullYear(), n = t.getUTCMonth(), s = Zr(r, n);
18676
+ if (t = Nr(t, a), e) {
18677
+ const r = t.getUTCFullYear(), n = t.getUTCMonth(), s = zr(r, n);
18665
18678
  t.setUTCDate(s);
18666
18679
  }
18667
18680
  return Ne(t);
18668
18681
  }
18669
18682
  function B1(i, a, e, t) {
18670
- const r = ae(i), n = ae(a), s = r.getUTCFullYear(), o = r.getUTCMonth(), u = r.getUTCDate(), c = n.getUTCFullYear(), l = n.getUTCMonth(), f = n.getUTCDate(), m = br(s, o, u), d = !m && o !== 1 && u > 28 && u < Zr(s, o) ? br(c, l, f) : m, _ = ar(a, 0, d);
18671
- let C = 1 + +(a < _), E = ar(_, e, d);
18683
+ const r = ae(i), n = ae(a), s = r.getUTCFullYear(), o = r.getUTCMonth(), u = r.getUTCDate(), c = n.getUTCFullYear(), l = n.getUTCMonth(), f = n.getUTCDate(), m = pr(s, o, u), d = !m && o !== 1 && u > 28 && u < zr(s, o) ? pr(c, l, f) : m, _ = or(a, 0, d);
18684
+ let C = 1 + +(a < _), E = or(_, e, d);
18672
18685
  for (; !(e > 0 ? E >= a : E <= a); )
18673
- E = ar(E, e, d), C++;
18686
+ E = or(E, e, d), C++;
18674
18687
  return C;
18675
18688
  }
18676
18689
  function ai(i, a) {
@@ -18709,8 +18722,8 @@ function k1(i, a) {
18709
18722
  while (Math.abs(_) > 1e-7 && f < 60);
18710
18723
  return C;
18711
18724
  }
18712
- function Mn(i, a, e, t, r, n, s) {
18713
- const o = ur(i, a, n), u = ze(i, a, n, s), c = bs(i, a, n, s);
18725
+ function Sn(i, a, e, t, r, n, s) {
18726
+ const o = lr(i, a, n), u = ze(i, a, n, s), c = bs(i, a, n, s);
18714
18727
  if (o === 1) {
18715
18728
  const m = u - c, d = 100 * e / n + r, _ = t / n * m / u + 1, C = 100 * e / n * c / u;
18716
18729
  return d / _ - C;
@@ -18755,27 +18768,27 @@ class $1 extends N {
18755
18768
  if (l <= 0)
18756
18769
  return b.create(0);
18757
18770
  l = Wt(r, t, o);
18758
- const f = 12 / o, m = ae(t), d = m.getUTCFullYear(), _ = m.getUTCMonth(), C = m.getUTCDate(), E = br(d, _, C);
18759
- let R = ar(t, -f, E);
18771
+ const f = 12 / o, m = ae(t), d = m.getUTCFullYear(), _ = m.getUTCMonth(), C = m.getUTCDate(), E = pr(d, _, C);
18772
+ let R = or(t, -f, E);
18760
18773
  if (r > t && c)
18761
18774
  for (R = t; R < r; )
18762
- R = ar(R, f, E);
18763
- let y = e > R ? e : R, { days: p } = _e(y, r, u);
18775
+ R = or(R, f, E);
18776
+ let y = e > R ? e : R, { days: p } = Ae(y, r, u);
18764
18777
  if (l >= e) {
18765
- const { days: L } = _e(y, r, u ? 4 : 0);
18778
+ const { days: L } = Ae(y, r, u ? 4 : 0);
18766
18779
  p = L;
18767
18780
  }
18768
18781
  r < y && (p = -p);
18769
18782
  let V = ze(R, t, o, u), M = p / V, S = R, D = e;
18770
18783
  for (; S > e; ) {
18771
- D = S, S = ar(S, -f, E), y = e > S ? e : S;
18772
- const { days: L } = _e(y, D, u);
18784
+ D = S, S = or(S, -f, E), y = e > S ? e : S;
18785
+ const { days: L } = Ae(y, D, u);
18773
18786
  if (u === 0)
18774
18787
  D >= y || e <= S ? p = L : p = -L, V = ze(S, D, o, u);
18775
18788
  else if (p = D < y ? -L : L, u === 3)
18776
18789
  V = 365 / o;
18777
18790
  else {
18778
- const { days: T } = _e(S, D, u);
18791
+ const { days: T } = Ae(S, D, u);
18779
18792
  V = D < S ? -T : T;
18780
18793
  }
18781
18794
  M += e <= S ? c ? 1 : 0 : p / V;
@@ -18807,7 +18820,7 @@ class Y1 extends N {
18807
18820
  return g.create(h.NUM);
18808
18821
  if (Math.floor(E) === Math.floor(R))
18809
18822
  return b.create(0);
18810
- const { days: M, yearDays: S } = _e(E, R, V), D = p * y * M / S;
18823
+ const { days: M, yearDays: S } = Ae(E, R, V), D = p * y * M / S;
18811
18824
  return b.create(D);
18812
18825
  }
18813
18826
  }
@@ -18833,7 +18846,7 @@ class H1 extends N {
18833
18846
  return Number.isNaN(S) || Number.isNaN(D) || Number.isNaN(w) || Number.isNaN(L) || Number.isNaN(T) ? g.create(h.VALUE) : S <= 0 || D < 0 || S < D || Math.floor(V) > Math.floor(M) || w < 0 || L <= 0 || ![0, 1, 3, 4].includes(T) ? g.create(h.NUM) : (w > 1 ? w = Math.floor(w) : w = Math.ceil(w), this._getResult(S, V, M, D, w, L, T));
18834
18847
  }
18835
18848
  _getResult(e, t, r, n, s, o, u) {
18836
- const c = e - n, l = e * o, { days: f, yearDays: m } = _e(t, r, u), d = f / m, _ = Math.ceil(c / l - d);
18849
+ const c = e - n, l = e * o, { days: f, yearDays: m } = Ae(t, r, u), d = f / m, _ = Math.ceil(c / l - d);
18837
18850
  if (_ < 0)
18838
18851
  return b.create(0);
18839
18852
  let C = l;
@@ -18915,7 +18928,7 @@ class Q1 extends N {
18915
18928
  for (p.setUTCFullYear(y.getUTCFullYear()), p < y && p.setUTCFullYear(p.getUTCFullYear() + 1); p > y; )
18916
18929
  p.setUTCMonth(p.getUTCMonth() - 12 / E);
18917
18930
  p.setUTCMonth(p.getUTCMonth() + 12 / E);
18918
- const V = Ne(p), { days: M } = _e(_, V, R);
18931
+ const V = Ne(p), { days: M } = Ae(_, V, R);
18919
18932
  return b.create(M);
18920
18933
  }
18921
18934
  }
@@ -18965,7 +18978,7 @@ class X1 extends N {
18965
18978
  return g.create(h.VALUE);
18966
18979
  if (![1, 2, 4].includes(E) || R < 0 || R > 4 || Math.floor(_) >= Math.floor(C) || Wt(_, C, E) < 0)
18967
18980
  return g.create(h.NUM);
18968
- const p = ur(_, C, E);
18981
+ const p = lr(_, C, E);
18969
18982
  return b.create(p);
18970
18983
  }
18971
18984
  }
@@ -19008,12 +19021,12 @@ class Z1 extends N {
19008
19021
  return Number.isNaN(R) || Number.isNaN(y) || Number.isNaN(p) || Number.isNaN(V) || Number.isNaN(M) || Number.isNaN(S) ? g.create(h.VALUE) : R <= 0 || y <= 0 || p <= 0 || V < 1 || M < 1 || V > M || V > y || M > y || ![0, 1].includes(S) ? g.create(h.NUM) : Math.trunc(V) !== V && Math.trunc(M) !== M && Math.trunc(V) === Math.trunc(M) ? b.create(0) : this._getResult(R, y, p, V, M, S);
19009
19022
  }
19010
19023
  _getResult(e, t, r, n, s, o) {
19011
- const u = on(e, t, r, 0, o);
19024
+ const u = un(e, t, r, 0, o);
19012
19025
  let c = 0, l = Math.ceil(n);
19013
19026
  l === 1 && (o === 0 && (c = -r), l++);
19014
19027
  let f = !1;
19015
19028
  for (let m = l; m <= s; m++) {
19016
- const d = o === 1 ? cr(e, m - 2, u, r, 1) : cr(e, m - 1, u, r, 0);
19029
+ const d = o === 1 ? fr(e, m - 2, u, r, 1) : fr(e, m - 1, u, r, 0);
19017
19030
  if (d === 0) {
19018
19031
  f = !0;
19019
19032
  break;
@@ -19037,11 +19050,11 @@ class z1 extends N {
19037
19050
  return Number.isNaN(R) || Number.isNaN(y) || Number.isNaN(p) || Number.isNaN(V) || Number.isNaN(M) || Number.isNaN(S) ? g.create(h.VALUE) : R <= 0 || y <= 0 || p <= 0 || V < 1 || M < 1 || V > M || ![0, 1].includes(S) ? g.create(h.NUM) : Math.trunc(V) !== V && Math.trunc(M) !== M && Math.trunc(V) === Math.trunc(M) ? b.create(0) : this._getResult(R, y, p, V, M, S);
19038
19051
  }
19039
19052
  _getResult(e, t, r, n, s, o) {
19040
- const u = on(e, t, r, 0, o);
19053
+ const u = un(e, t, r, 0, o);
19041
19054
  let c = 0, l = Math.ceil(n);
19042
19055
  l === 1 && (c = o === 0 ? u + r * e : u, l++);
19043
19056
  for (let f = l; f <= s; f++)
19044
- c += o === 1 ? u - (cr(e, f - 2, u, r, 1) - u) * e : u - cr(e, f - 1, u, r, 0) * e;
19057
+ c += o === 1 ? u - (fr(e, f - 2, u, r, 1) - u) * e : u - fr(e, f - 1, u, r, 0) * e;
19045
19058
  return b.create(c);
19046
19059
  }
19047
19060
  }
@@ -19144,7 +19157,7 @@ class t0 extends N {
19144
19157
  return g.create(h.VALUE);
19145
19158
  if (y <= 0 || p <= 0 || V < 0 || V > 4 || Math.floor(E) >= Math.floor(R))
19146
19159
  return g.create(h.NUM);
19147
- const { days: M, yearDays: S } = _e(E, R, V), D = (p - y) / p * (S / M);
19160
+ const { days: M, yearDays: S } = Ae(E, R, V), D = (p - y) / p * (S / M);
19148
19161
  return b.create(D);
19149
19162
  }
19150
19163
  }
@@ -19268,7 +19281,7 @@ class i0 extends N {
19268
19281
  const V = m.get(y, p), M = d.get(y, p), S = _.get(y, p), D = C.get(y, p), { isError: w, errorObject: L, variants: T } = I(R, V, M, S, D);
19269
19282
  if (w)
19270
19283
  return L;
19271
- const [j, k, G, ne, z] = T, $ = +j.getValue(), de = +k.getValue(), Ce = +G.getValue(), pe = +ne.getValue(), Ve = +z.getValue(), ge = cr($, de, Ce, pe, Ve ? 1 : 0);
19284
+ const [j, k, G, ne, z] = T, $ = +j.getValue(), de = +k.getValue(), Ce = +G.getValue(), pe = +ne.getValue(), Ve = +z.getValue(), ge = fr($, de, Ce, pe, Ve ? 1 : 0);
19272
19285
  return Number.isNaN(ge) || !Number.isFinite(ge) ? g.create(h.NUM) : y === 0 && p === 0 ? b.create(ge, et(this.getLocale())) : b.create(ge);
19273
19286
  });
19274
19287
  return c === 1 && l === 1 ? E.get(0, 0) : E;
@@ -19331,7 +19344,7 @@ class u0 extends N {
19331
19344
  return g.create(h.VALUE);
19332
19345
  if (y <= 0 || p <= 0 || V < 0 || V > 4 || Math.floor(E) >= Math.floor(R))
19333
19346
  return g.create(h.NUM);
19334
- const { days: M, yearDays: S } = _e(E, R, V), D = (p - y) / y * (S / M);
19347
+ const { days: M, yearDays: S } = Ae(E, R, V), D = (p - y) / y * (S / M);
19335
19348
  return b.create(D);
19336
19349
  }
19337
19350
  }
@@ -19731,7 +19744,7 @@ class _0 extends N {
19731
19744
  return b.create(de);
19732
19745
  }
19733
19746
  _validDate(e, t, r, n, s) {
19734
- return this._getDateCorrectOrder(e, t, r, n) && Oc(e, t, s) && Tr(n, e, s);
19747
+ return this._getDateCorrectOrder(e, t, r, n) && Oc(e, t, s) && vr(n, e, s);
19735
19748
  }
19736
19749
  _getDateCorrectOrder(e, t, r, n) {
19737
19750
  return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Math.floor(r) > Math.floor(n);
@@ -19765,13 +19778,13 @@ class A0 extends N {
19765
19778
  return Number.isNaN(k) || Number.isNaN(G) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN($) ? g.create(h.VALUE) : k < 0 || G <= 0 || ne <= 0 || ![1, 2, 4].includes(z) || $ < 0 || $ > 4 || !this._validDate(L, j, w, T, z) ? g.create(h.NUM) : this._getResult(w, L, T, j, k, G, ne, z, $);
19766
19779
  }
19767
19780
  _validDate(e, t, r, n, s) {
19768
- return this._getDateCorrectOrder(e, t, r, n) && Oc(e, t, s) && Tr(n, e, s);
19781
+ return this._getDateCorrectOrder(e, t, r, n) && Oc(e, t, s) && vr(n, e, s);
19769
19782
  }
19770
19783
  _getDateCorrectOrder(e, t, r, n) {
19771
19784
  return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Math.floor(r) > Math.floor(n);
19772
19785
  }
19773
19786
  _getResult(e, t, r, n, s, o, u, c, l) {
19774
- const { days: f } = _e(e, t, l), m = (s * f * 100 - (o - 100)) / ((o - 100) * 0.25 * (1 + 2 * f) + f * 100);
19787
+ const { days: f } = Ae(e, t, l), m = (s * f * 100 - (o - 100)) / ((o - 100) * 0.25 * (1 + 2 * f) + f * 100);
19775
19788
  function d(C) {
19776
19789
  return o - Vc(e, t, r, n, s, C, u, c, l);
19777
19790
  }
@@ -19809,7 +19822,7 @@ class E0 extends N {
19809
19822
  return b.create(ne);
19810
19823
  }
19811
19824
  _validDate(e, t, r, n) {
19812
- return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Tr(r, e, n);
19825
+ return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && vr(r, e, n);
19813
19826
  }
19814
19827
  _getResult(e, t, r, n, s, o, u, c) {
19815
19828
  const l = this._getCoupDate(t, r, u), f = this._getFrac(r, e, l, u, c), m = this._getFrac(r, t, l, u, c), d = this._getFrac(e, t, l, u, c);
@@ -19829,16 +19842,16 @@ class E0 extends N {
19829
19842
  c.setUTCMonth(c.getUTCMonth() + 12 / n);
19830
19843
  let f = Ne(c);
19831
19844
  if (f >= t) {
19832
- const { days: p } = _e(e, t, s), V = ze(l, f, n, s);
19845
+ const { days: p } = Ae(e, t, s), V = ze(l, f, n, s);
19833
19846
  return p / V;
19834
19847
  }
19835
- const { days: m } = _e(e, f, s), d = ze(l, f, n, s);
19848
+ const { days: m } = Ae(e, f, s), d = ze(l, f, n, s);
19836
19849
  let _ = m / d;
19837
19850
  const C = ae(f), E = ae(f);
19838
19851
  for (E.setUTCMonth(E.getUTCMonth() + 12 / n); E < u; )
19839
19852
  C.setUTCMonth(C.getUTCMonth() + 12 / n), E.setUTCMonth(E.getUTCMonth() + 12 / n), _ += 1;
19840
19853
  l = Ne(C), f = Ne(E);
19841
- const { days: R } = _e(l, t, s), y = ze(l, f, n, s);
19854
+ const { days: R } = Ae(l, t, s), y = ze(l, f, n, s);
19842
19855
  return _ += R / y, _;
19843
19856
  }
19844
19857
  }
@@ -19872,7 +19885,7 @@ class R0 extends N {
19872
19885
  return b.create(ne);
19873
19886
  }
19874
19887
  _validDate(e, t, r, n) {
19875
- return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && Tr(r, e, n);
19888
+ return Math.floor(e) > Math.floor(t) && Math.floor(t) > Math.floor(r) && vr(r, e, n);
19876
19889
  }
19877
19890
  _getResult(e, t, r, n, s, o, u, c) {
19878
19891
  const l = this._getCoupDate(t, r, u), f = this._getFrac(r, e, l, u, c), m = this._getFrac(r, t, l, u, c), d = this._getFrac(e, t, l, u, c);
@@ -19892,16 +19905,16 @@ class R0 extends N {
19892
19905
  c.setUTCMonth(c.getUTCMonth() + 12 / n);
19893
19906
  let f = Ne(c);
19894
19907
  if (f >= t) {
19895
- const { days: p } = _e(e, t, s), V = ze(l, f, n, s);
19908
+ const { days: p } = Ae(e, t, s), V = ze(l, f, n, s);
19896
19909
  return p / V;
19897
19910
  }
19898
- const { days: m } = _e(e, f, s), d = ze(l, f, n, s);
19911
+ const { days: m } = Ae(e, f, s), d = ze(l, f, n, s);
19899
19912
  let _ = m / d;
19900
19913
  const C = ae(f), E = ae(f);
19901
19914
  for (E.setUTCMonth(E.getUTCMonth() + 12 / n); E < u; )
19902
19915
  C.setUTCMonth(C.getUTCMonth() + 12 / n), E.setUTCMonth(E.getUTCMonth() + 12 / n), _ += 1;
19903
19916
  l = Ne(C), f = Ne(E);
19904
- const { days: R } = _e(l, t, s), y = ze(l, f, n, s);
19917
+ const { days: R } = Ae(l, t, s), y = ze(l, f, n, s);
19905
19918
  return _ += R / y, _;
19906
19919
  }
19907
19920
  }
@@ -19960,7 +19973,7 @@ class b0 extends N {
19960
19973
  const [j, k, G, ne, z] = T, $ = +j.getValue(), de = +k.getValue(), Ce = +G.getValue(), pe = +ne.getValue(), Ve = +z.getValue();
19961
19974
  if ($ <= -1)
19962
19975
  return g.create(h.NUM);
19963
- const ge = on($, de, Ce, pe, Ve ? 1 : 0);
19976
+ const ge = un($, de, Ce, pe, Ve ? 1 : 0);
19964
19977
  return Number.isNaN(ge) || !Number.isFinite(ge) ? g.create(h.NUM) : y === 0 && p === 0 ? b.create(ge, et(this.getLocale())) : b.create(ge);
19965
19978
  });
19966
19979
  return c === 1 && l === 1 ? E.get(0, 0) : E;
@@ -19995,7 +20008,7 @@ class p0 extends N {
19995
20008
  const [ne, z, $, de, Ce, pe] = G, Ve = +ne.getValue(), ge = +z.getValue(), Fe = +$.getValue(), dt = +de.getValue(), Tt = +Ce.getValue(), vt = +pe.getValue();
19996
20009
  if (ge < 1 || Math.floor(ge) > Math.ceil(Fe) || ge - Fe >= 1)
19997
20010
  return g.create(h.NUM);
19998
- const ct = on(Ve, Fe, dt, Tt, vt ? 1 : 0) - pc(Ve, ge, Fe, dt, Tt, vt ? 1 : 0);
20011
+ const ct = un(Ve, Fe, dt, Tt, vt ? 1 : 0) - pc(Ve, ge, Fe, dt, Tt, vt ? 1 : 0);
19999
20012
  return Number.isNaN(ct) || !Number.isFinite(ct) ? g.create(h.NUM) : V === 0 && M === 0 ? b.create(ct, et(this.getLocale())) : b.create(ct);
20000
20013
  });
20001
20014
  return l === 1 && f === 1 ? y.get(0, 0) : y;
@@ -20022,9 +20035,9 @@ class N0 extends N {
20022
20035
  const S = +C.getValue(), D = +E.getValue(), w = +R.getValue(), L = Math.floor(+y.getValue()), T = Math.floor(+p.getValue());
20023
20036
  if (Number.isNaN(S) || Number.isNaN(D) || Number.isNaN(w) || Number.isNaN(L) || Number.isNaN(T))
20024
20037
  return g.create(h.VALUE);
20025
- if (S < 0 || D < 0 || w <= 0 || ![1, 2, 4].includes(L) || T < 0 || T > 4 || V >= M || !Tr(V, M, L))
20038
+ if (S < 0 || D < 0 || w <= 0 || ![1, 2, 4].includes(L) || T < 0 || T > 4 || V >= M || !vr(V, M, L))
20026
20039
  return g.create(h.NUM);
20027
- const j = Mn(V, M, S, D, w, L, T);
20040
+ const j = Sn(V, M, S, D, w, L, T);
20028
20041
  return b.create(j);
20029
20042
  }
20030
20043
  }
@@ -20051,7 +20064,7 @@ class V0 extends N {
20051
20064
  return g.create(h.VALUE);
20052
20065
  if (y <= 0 || p <= 0 || V < 0 || V > 4 || E >= R)
20053
20066
  return g.create(h.NUM);
20054
- const { days: M, yearDays: S } = _e(E, R, V), D = p - y * p * M / S;
20067
+ const { days: M, yearDays: S } = Ae(E, R, V), D = p - y * p * M / S;
20055
20068
  return b.create(D);
20056
20069
  }
20057
20070
  }
@@ -20082,7 +20095,7 @@ class O0 extends N {
20082
20095
  const w = this._getDateCorrectOrder(p, y, V);
20083
20096
  if (M < 0 || S < 0 || D < 0 || D > 4 || !w)
20084
20097
  return g.create(h.NUM);
20085
- const L = No(y, D), { days: T } = _e(y, p, D), { days: j } = _e(V, p, D), { days: k } = _e(V, y, D), G = (100 + j / L * M * 100) / (1 + T / L * S) - k / L * M * 100;
20098
+ const L = No(y, D), { days: T } = Ae(y, p, D), { days: j } = Ae(V, p, D), { days: k } = Ae(V, y, D), G = (100 + j / L * M * 100) / (1 + T / L * S) - k / L * M * 100;
20086
20099
  return b.create(G);
20087
20100
  }
20088
20101
  _getDateCorrectOrder(e, t, r) {
@@ -20225,7 +20238,7 @@ class D0 extends N {
20225
20238
  return g.create(h.VALUE);
20226
20239
  if (y <= 0 || p <= 0 || V < 0 || V > 4 || E >= R)
20227
20240
  return g.create(h.NUM);
20228
- const { days: M, yearDays: S } = _e(E, R, V), D = y / (1 - p * M / S);
20241
+ const { days: M, yearDays: S } = Ae(E, R, V), D = y / (1 - p * M / S);
20229
20242
  return D < 0 ? g.create(h.NUM) : b.create(D);
20230
20243
  }
20231
20244
  }
@@ -20816,19 +20829,19 @@ class F0 extends N {
20816
20829
  const S = +C.getValue(), D = +E.getValue(), w = +R.getValue(), L = Math.floor(+y.getValue()), T = Math.floor(+p.getValue());
20817
20830
  if (Number.isNaN(S) || Number.isNaN(D) || Number.isNaN(w) || Number.isNaN(L) || Number.isNaN(T))
20818
20831
  return g.create(h.VALUE);
20819
- if (S < 0 || D <= 0 || w <= 0 || ![1, 2, 4].includes(L) || T < 0 || T > 4 || V >= M || !Tr(V, M, L))
20832
+ if (S < 0 || D <= 0 || w <= 0 || ![1, 2, 4].includes(L) || T < 0 || T > 4 || V >= M || !vr(V, M, L))
20820
20833
  return g.create(h.NUM);
20821
20834
  const j = this._getResult(V, M, S, D, w, L, T);
20822
20835
  return b.create(j);
20823
20836
  }
20824
20837
  _getResult(e, t, r, n, s, o, u) {
20825
- if (ur(e, t, o) > 1) {
20826
- let E = r || 0.01, R = Mn(e, t, r, E, s, o, u), y = R - n;
20838
+ if (lr(e, t, o) > 1) {
20839
+ let E = r || 0.01, R = Sn(e, t, r, E, s, o, u), y = R - n;
20827
20840
  for (let p = 0; p < 100 && Math.abs(y) > 1e-7; p++)
20828
- R = Mn(e, t, r, 1.01 * E, s, o, u), E += -y / (R - n - y) * E * 0.01, y = Mn(e, t, r, E, s, o, u) - n;
20841
+ R = Sn(e, t, r, 1.01 * E, s, o, u), E += -y / (R - n - y) * E * 0.01, y = Sn(e, t, r, E, s, o, u) - n;
20829
20842
  return E;
20830
20843
  }
20831
- const l = bs(e, t, o, u), f = ze(e, t, o, u), { days: m } = _e(e, t, u), d = n / 100 + l / f * r / o;
20844
+ const l = bs(e, t, o, u), f = ze(e, t, o, u), { days: m } = Ae(e, t, u), d = n / 100 + l / f * r / o;
20832
20845
  return (s / 100 + r / o - d) / d * o * f / m;
20833
20846
  }
20834
20847
  }
@@ -20855,7 +20868,7 @@ class B0 extends N {
20855
20868
  return g.create(h.VALUE);
20856
20869
  if (y <= 0 || p <= 0 || V < 0 || V > 4 || E >= R)
20857
20870
  return g.create(h.NUM);
20858
- const { days: M, yearDays: S } = _e(E, R, V), D = (p / y - 1) / (M / S);
20871
+ const { days: M, yearDays: S } = Ae(E, R, V), D = (p / y - 1) / (M / S);
20859
20872
  return b.create(D);
20860
20873
  }
20861
20874
  }
@@ -20886,7 +20899,7 @@ class k0 extends N {
20886
20899
  const w = this._getDateCorrectOrder(p, y, V);
20887
20900
  if (M < 0 || S <= 0 || D < 0 || D > 4 || !w)
20888
20901
  return g.create(h.NUM);
20889
- const L = No(y, D), { days: T } = _e(y, p, D), { days: j } = _e(V, p, D), { days: k } = _e(V, y, D), G = ((1 + j / L * M) / (S / 100 + k / L * M) - 1) / (T / L);
20902
+ const L = No(y, D), { days: T } = Ae(y, p, D), { days: j } = Ae(V, p, D), { days: k } = Ae(V, y, D), G = ((1 + j / L * M) / (S / 100 + k / L * M) - 1) / (T / L);
20890
20903
  return b.create(G);
20891
20904
  }
20892
20905
  _getDateCorrectOrder(e, t, r) {
@@ -21053,7 +21066,7 @@ class G0 extends N {
21053
21066
  A(this, "maxParams", 5);
21054
21067
  }
21055
21068
  calculate(e, t, r, n, s) {
21056
- const o = n != null ? n : v.create(!0), u = s != null ? s : v.create(!0), { isError: c, errorObject: l, variants: f } = nn(e, t, r, o, u);
21069
+ const o = n != null ? n : v.create(!0), u = s != null ? s : v.create(!0), { isError: c, errorObject: l, variants: f } = sn(e, t, r, o, u);
21057
21070
  if (c)
21058
21071
  return l;
21059
21072
  const [m, d, _, C, E] = f;
@@ -21089,7 +21102,7 @@ class Q0 extends N {
21089
21102
  return g.create(h.VALUE);
21090
21103
  t = t.get(0, 0);
21091
21104
  }
21092
- return t.isError() ? t : t.isNumber() && t.getPattern() !== "" ? v.create(Ma(t.getPattern())) : t.isString() && (Sn(`${t.getValue()}`) || Dn(`${t.getValue()}`)) ? v.create(!0) : v.create(!1);
21105
+ return t.isError() ? t : t.isNumber() && t.getPattern() !== "" ? v.create(Ma(t.getPattern())) : t.isString() && (Dn(`${t.getValue()}`) || wn(`${t.getValue()}`)) ? v.create(!0) : v.create(!1);
21093
21106
  }
21094
21107
  }
21095
21108
  class q0 extends N {
@@ -21589,7 +21602,7 @@ class CC extends N {
21589
21602
  return v.create(!1);
21590
21603
  }
21591
21604
  }
21592
- var Ee = /* @__PURE__ */ ((i) => (i.AND = "AND", i.BYCOL = "BYCOL", i.BYROW = "BYROW", i.FALSE = "FALSE", i.IF = "IF", i.IFERROR = "IFERROR", i.IFNA = "IFNA", i.IFS = "IFS", i.LAMBDA = "LAMBDA", i.LET = "LET", i.MAKEARRAY = "MAKEARRAY", i.MAP = "MAP", i.NOT = "NOT", i.OR = "OR", i.REDUCE = "REDUCE", i.SCAN = "SCAN", i.SWITCH = "SWITCH", i.TRUE = "TRUE", i.XOR = "XOR", i))(Ee || {});
21605
+ var Re = /* @__PURE__ */ ((i) => (i.AND = "AND", i.BYCOL = "BYCOL", i.BYROW = "BYROW", i.FALSE = "FALSE", i.IF = "IF", i.IFERROR = "IFERROR", i.IFNA = "IFNA", i.IFS = "IFS", i.LAMBDA = "LAMBDA", i.LET = "LET", i.MAKEARRAY = "MAKEARRAY", i.MAP = "MAP", i.NOT = "NOT", i.OR = "OR", i.REDUCE = "REDUCE", i.SCAN = "SCAN", i.SWITCH = "SWITCH", i.TRUE = "TRUE", i.XOR = "XOR", i))(Re || {});
21593
21606
  class _C extends N {
21594
21607
  constructor() {
21595
21608
  super(...arguments);
@@ -22086,25 +22099,25 @@ class LC extends N {
22086
22099
  }
22087
22100
  }
22088
22101
  const PC = [
22089
- [hC, Ee.AND],
22090
- [gC, Ee.BYCOL],
22091
- [dC, Ee.BYROW],
22092
- [CC, Ee.FALSE],
22093
- [_C, Ee.IF],
22094
- [AC, Ee.IFERROR],
22095
- [EC, Ee.IFNA],
22096
- [RC, Ee.IFS],
22097
- [yC, Ee.LAMBDA],
22098
- [bC, Ee.LET],
22099
- [pC, Ee.MAKEARRAY],
22100
- [NC, Ee.MAP],
22101
- [VC, Ee.NOT],
22102
- [OC, Ee.OR],
22103
- [MC, Ee.REDUCE],
22104
- [SC, Ee.SCAN],
22105
- [DC, Ee.SWITCH],
22106
- [wC, Ee.TRUE],
22107
- [LC, Ee.XOR]
22102
+ [hC, Re.AND],
22103
+ [gC, Re.BYCOL],
22104
+ [dC, Re.BYROW],
22105
+ [CC, Re.FALSE],
22106
+ [_C, Re.IF],
22107
+ [AC, Re.IFERROR],
22108
+ [EC, Re.IFNA],
22109
+ [RC, Re.IFS],
22110
+ [yC, Re.LAMBDA],
22111
+ [bC, Re.LET],
22112
+ [pC, Re.MAKEARRAY],
22113
+ [NC, Re.MAP],
22114
+ [VC, Re.NOT],
22115
+ [OC, Re.OR],
22116
+ [MC, Re.REDUCE],
22117
+ [SC, Re.SCAN],
22118
+ [DC, Re.SWITCH],
22119
+ [wC, Re.TRUE],
22120
+ [LC, Re.XOR]
22108
22121
  ];
22109
22122
  class xC extends N {
22110
22123
  constructor() {
@@ -22882,19 +22895,19 @@ class KC extends N {
22882
22895
  return g.create(h.REF);
22883
22896
  const n = this._convertToDefinedName(r);
22884
22897
  if (t === 0) {
22885
- const f = ag(n), { range: m, sheetName: d, unitId: _ } = f, C = new Bn(m);
22898
+ const f = ag(n), { range: m, sheetName: d, unitId: _ } = f, C = new kn(m);
22886
22899
  return C.setForcedUnitIdDirect(_), C.setForcedSheetName(d), this._setDefault(C);
22887
22900
  }
22888
- if (zr(n))
22901
+ if (Jr(n))
22889
22902
  return this._setDefault(new Ia(n));
22890
22903
  if (Mo(n))
22891
22904
  return this._setDefault(new Ba(n));
22892
22905
  if (So(n))
22893
22906
  return this._setDefault(new Fa(n));
22894
- const s = Vr(n), { range: o, sheetName: u, unitId: c } = s;
22907
+ const s = Or(n), { range: o, sheetName: u, unitId: c } = s;
22895
22908
  if (Number.isNaN(o.startRow) || o.endRow + 1 > 1048576 || Number.isNaN(o.startColumn) || o.endColumn + 1 > 16384)
22896
22909
  return g.create(h.REF);
22897
- const l = new Bn(o);
22910
+ const l = new kn(o);
22898
22911
  return l.setForcedUnitIdDirect(c), l.setForcedSheetName(u), this._setDefault(l);
22899
22912
  }
22900
22913
  _setDefault(e) {
@@ -22985,7 +22998,7 @@ class zC extends N {
22985
22998
  }
22986
22999
  }
22987
23000
  }
22988
- class JC extends Ur {
23001
+ class JC extends Tr {
22989
23002
  constructor(e, t = []) {
22990
23003
  super(e);
22991
23004
  /**
@@ -23439,7 +23452,7 @@ class n_ extends N {
23439
23452
  }
23440
23453
  }
23441
23454
  _sort(e, t = 1) {
23442
- const r = Tn();
23455
+ const r = vn();
23443
23456
  return t === 1 ? this._sortAsc(e, r) : this._sortDesc(e, r);
23444
23457
  }
23445
23458
  _sortAsc(e, t) {
@@ -23604,7 +23617,7 @@ class s_ extends N {
23604
23617
  return n;
23605
23618
  }
23606
23619
  _sort(e, t) {
23607
- const r = Tn();
23620
+ const r = vn();
23608
23621
  return (n, s) => {
23609
23622
  let o = n[e], u = s[e], c = this._compare(o, u, t[0], r);
23610
23623
  if (c === 0 && t.length > 1) {
@@ -24606,7 +24619,7 @@ class p_ extends N {
24606
24619
  return g.create(h.VALUE);
24607
24620
  s = s.get(0, 0);
24608
24621
  }
24609
- const o = mr(r, t, this._formulaDataModel);
24622
+ const o = gr(r, t, this._formulaDataModel);
24610
24623
  if (!Array.isArray(o))
24611
24624
  return o;
24612
24625
  const u = +s.getValue();
@@ -24656,7 +24669,7 @@ class N_ extends N {
24656
24669
  r && (t = t.slice(1));
24657
24670
  let n = 0;
24658
24671
  for (let s = 0; s < t.length; s++) {
24659
- const o = dn.get(t[s]) || 0, u = dn.get(t[s + 1]) || 0, c = dn.get(t[s + 2]) || 0, l = dn.get(t[s + 3]) || 0;
24672
+ const o = Cn.get(t[s]) || 0, u = Cn.get(t[s + 1]) || 0, c = Cn.get(t[s + 2]) || 0, l = Cn.get(t[s + 3]) || 0;
24660
24673
  if (!o || c >= u && c > o || o === u && o === c && o === l || o === u / 2)
24661
24674
  return g.create(h.VALUE);
24662
24675
  o < u ? n -= o : n += o;
@@ -24893,7 +24906,7 @@ class j_ extends N {
24893
24906
  const _ = Math.floor(+m.getValue()), C = Math.floor(+d.getValue());
24894
24907
  if (_ < 0 || C < 0 || _ < C)
24895
24908
  return g.create(h.NUM);
24896
- const E = sr(_, C);
24909
+ const E = ir(_, C);
24897
24910
  return Number.isNaN(E) || !Number.isFinite(E) ? g.create(h.NUM) : b.create(E);
24898
24911
  });
24899
24912
  return r === 1 && n === 1 ? u.get(0, 0) : u;
@@ -24921,7 +24934,7 @@ class U_ extends N {
24921
24934
  const _ = Math.floor(+m.getValue()), C = Math.floor(+d.getValue());
24922
24935
  if (_ < 0 || C < 0 || _ === 0 && _ < C)
24923
24936
  return g.create(h.NUM);
24924
- const E = sr(_ + C - 1, _ - 1);
24937
+ const E = ir(_ + C - 1, _ - 1);
24925
24938
  return Number.isNaN(E) || !Number.isFinite(E) ? g.create(h.NUM) : b.create(E);
24926
24939
  });
24927
24940
  return r === 1 && n === 1 ? u.get(0, 0) : u;
@@ -25122,7 +25135,7 @@ class W_ extends N {
25122
25135
  let t = e;
25123
25136
  if (t.isString() && (t = t.convertToNumberObjectValue()), t.isError())
25124
25137
  return t;
25125
- const r = Math.floor(+t.getValue()), n = Rr(r);
25138
+ const r = Math.floor(+t.getValue()), n = yr(r);
25126
25139
  return Number.isNaN(n) || !Number.isFinite(n) ? g.create(h.NUM) : b.create(n);
25127
25140
  }
25128
25141
  }
@@ -25146,7 +25159,7 @@ class Q_ extends N {
25146
25159
  let t = e;
25147
25160
  if (t.isString() && (t = t.convertToNumberObjectValue()), t.isError())
25148
25161
  return t;
25149
- const r = Math.floor(+t.getValue()), n = Rr(r, 2);
25162
+ const r = Math.floor(+t.getValue()), n = yr(r, 2);
25150
25163
  return Number.isNaN(n) || !Number.isFinite(n) ? g.create(h.NUM) : b.create(n);
25151
25164
  }
25152
25165
  }
@@ -25513,7 +25526,7 @@ class aA extends N {
25513
25526
  return u;
25514
25527
  if (c instanceof g)
25515
25528
  return c;
25516
- const l = yr(u, c);
25529
+ const l = br(u, c);
25517
25530
  return K.createByArray(l);
25518
25531
  }
25519
25532
  _getMatrix(e, t, r) {
@@ -25609,7 +25622,7 @@ class uA extends N {
25609
25622
  return u = !0, c = m, !1;
25610
25623
  if (t += d, t > 170)
25611
25624
  return u = !0, c = g.create(h.NUM), !1;
25612
- r *= Rr(d);
25625
+ r *= yr(d);
25613
25626
  }), u)
25614
25627
  return c;
25615
25628
  } else {
@@ -25618,10 +25631,10 @@ class uA extends N {
25618
25631
  return c;
25619
25632
  if (t += l, t > 170)
25620
25633
  return g.create(h.NUM);
25621
- r *= Rr(l);
25634
+ r *= yr(l);
25622
25635
  }
25623
25636
  }
25624
- const n = Rr(t) / r;
25637
+ const n = yr(t) / r;
25625
25638
  return b.create(n);
25626
25639
  }
25627
25640
  _handleSingleObject(e) {
@@ -26506,12 +26519,12 @@ class vA extends N {
26506
26519
  criteriaMaxColumnLength: u,
26507
26520
  targetRange: c,
26508
26521
  variants: l
26509
- } = tn(t, e);
26522
+ } = rn(t, e);
26510
26523
  if (r)
26511
26524
  return n;
26512
26525
  if (s)
26513
26526
  return o === 1 && u === 1 ? g.create(h.VALUE) : O(o, u, g.create(h.VALUE));
26514
- const f = rn(l, o, u, !0);
26527
+ const f = nn(l, o, u, !0);
26515
26528
  return this._aggregateResults(c, f);
26516
26529
  }
26517
26530
  _aggregateResults(e, t) {
@@ -26849,7 +26862,7 @@ class GA extends N {
26849
26862
  return _;
26850
26863
  if (d.isString() && (d = d.convertToNumberObjectValue()), d.isError())
26851
26864
  return d;
26852
- const C = +_.getValue(), E = +d.getValue(), R = 10 ** Math.trunc(E), y = ls(C, R), p = Math.trunc(jr(C, R) + y) / R;
26865
+ const C = +_.getValue(), E = +d.getValue(), R = 10 ** Math.trunc(E), y = ls(C, R), p = Math.trunc(Ur(C, R) + y) / R;
26853
26866
  return b.create(p);
26854
26867
  });
26855
26868
  return n === 1 && s === 1 ? c.get(0, 0) : c;
@@ -27143,10 +27156,10 @@ const hb = /* @__PURE__ */ new Set([
27143
27156
  Oe.SHEET,
27144
27157
  Oe.SHEETS,
27145
27158
  // Logical extensions
27146
- Ee.IFNA,
27147
- Ee.IFS,
27148
- Ee.SWITCH,
27149
- Ee.XOR,
27159
+ Re.IFNA,
27160
+ Re.IFS,
27161
+ Re.SWITCH,
27162
+ Re.XOR,
27150
27163
  // Statistical and text extensions
27151
27164
  P.BETA_DIST,
27152
27165
  P.BETA_INV,
@@ -27222,16 +27235,16 @@ const hb = /* @__PURE__ */ new Set([
27222
27235
  J.UNICODE,
27223
27236
  J.VALUETOTEXT,
27224
27237
  // Date & time
27225
- Ae.DAYS,
27226
- Ae.ISOWEEKNUM,
27238
+ Ee.DAYS,
27239
+ Ee.ISOWEEKNUM,
27227
27240
  ee.PDURATION,
27228
27241
  ee.RRI,
27229
- Ee.BYCOL,
27230
- Ee.BYROW,
27231
- Ee.MAKEARRAY,
27232
- Ee.MAP,
27233
- Ee.REDUCE,
27234
- Ee.SCAN
27242
+ Re.BYCOL,
27243
+ Re.BYROW,
27244
+ Re.MAKEARRAY,
27245
+ Re.MAP,
27246
+ Re.REDUCE,
27247
+ Re.SCAN
27235
27248
  ]);
27236
27249
  class eE extends N {
27237
27250
  constructor() {
@@ -27437,12 +27450,12 @@ class iE extends N {
27437
27450
  criteriaMaxColumnLength: u,
27438
27451
  targetRange: c,
27439
27452
  variants: l
27440
- } = tn(t, e);
27453
+ } = rn(t, e);
27441
27454
  if (r)
27442
27455
  return n;
27443
27456
  if (s)
27444
27457
  return o === 1 && u === 1 ? g.create(h.VALUE) : O(o, u, g.create(h.VALUE));
27445
- const f = rn(l, o, u, !0);
27458
+ const f = nn(l, o, u, !0);
27446
27459
  return this._aggregateResults(c, f);
27447
27460
  }
27448
27461
  _aggregateResults(e, t) {
@@ -27790,12 +27803,12 @@ class _E extends N {
27790
27803
  criteriaMaxRowLength: s,
27791
27804
  criteriaMaxColumnLength: o,
27792
27805
  variants: u
27793
- } = tn(e);
27806
+ } = rn(e);
27794
27807
  if (t)
27795
27808
  return r;
27796
27809
  if (n)
27797
27810
  return s === 1 && o === 1 ? g.create(h.VALUE) : O(s, o, g.create(h.VALUE));
27798
- const c = rn(u, s, o, !0);
27811
+ const c = nn(u, s, o, !0);
27799
27812
  return this._aggregateResults(c);
27800
27813
  }
27801
27814
  _aggregateResults(e) {
@@ -28161,7 +28174,7 @@ class OE extends N {
28161
28174
  const [s] = n, o = +s.getValue();
28162
28175
  if (o === 0 || o < 0 && o % 1 === 0)
28163
28176
  return g.create(h.NUM);
28164
- const u = On(o);
28177
+ const u = Mn(o);
28165
28178
  return Number.isNaN(u) || !Number.isFinite(u) ? g.create(h.NUM) : b.create(u);
28166
28179
  }
28167
28180
  }
@@ -28206,7 +28219,7 @@ class ME extends N {
28206
28219
  const { isError: t, errorObject: r, variants: n } = I(e);
28207
28220
  if (t)
28208
28221
  return r;
28209
- const [s] = n, o = +s.getValue(), u = sn(o, 0, 1) - 0.5;
28222
+ const [s] = n, o = +s.getValue(), u = an(o, 0, 1) - 0.5;
28210
28223
  return b.create(u);
28211
28224
  }
28212
28225
  }
@@ -28265,7 +28278,7 @@ class DE extends N {
28265
28278
  const { isError: s, errorObject: o } = As(e, t, r);
28266
28279
  if (s)
28267
28280
  return o;
28268
- const u = bt(e);
28281
+ const u = pt(e);
28269
28282
  if (u instanceof g)
28270
28283
  return u;
28271
28284
  const c = this._getKnownXsValues(u, t);
@@ -28296,17 +28309,17 @@ class DE extends N {
28296
28309
  _ *= u[0][l - 2 - C] ** c[d][C];
28297
28310
  m[d].push(_);
28298
28311
  }
28299
- return s && (m = Et(m)), K.createByArray(m);
28312
+ return s && (m = Rt(m)), K.createByArray(m);
28300
28313
  }
28301
28314
  _getResultBySimpleVariables(e, t, r, n) {
28302
28315
  const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = Rs(o, s, n, !0), l = r.map((f) => f.map((m) => c * u ** m));
28303
28316
  return K.createByArray(l);
28304
28317
  }
28305
28318
  _getKnownXsValues(e, t) {
28306
- return !t || t.isNull() ? Es(e.length, e[0].length) : bt(t);
28319
+ return !t || t.isNull() ? Es(e.length, e[0].length) : pt(t);
28307
28320
  }
28308
28321
  _getNewXsValues(e, t) {
28309
- return !t || t.isNull() ? e : bt(t);
28322
+ return !t || t.isNull() ? e : pt(t);
28310
28323
  }
28311
28324
  }
28312
28325
  class wE extends N {
@@ -28484,7 +28497,7 @@ class jE extends N {
28484
28497
  A(this, "maxParams", 2);
28485
28498
  }
28486
28499
  calculate(e, t) {
28487
- const r = mr(e);
28500
+ const r = gr(e);
28488
28501
  if (t.isArray()) {
28489
28502
  const n = t.mapValue((s) => this._handleSingleObject(r, s));
28490
28503
  return n.getRowCount() === 1 && n.getColumnCount() === 1 ? n.get(0, 0) : n;
@@ -28511,7 +28524,7 @@ class UE extends N {
28511
28524
  const { isError: s, errorObject: o } = As(e, t);
28512
28525
  if (s)
28513
28526
  return o;
28514
- const u = bt(e);
28527
+ const u = pt(e);
28515
28528
  if (u instanceof g)
28516
28529
  return u;
28517
28530
  const c = this._getKnownXsValues(u, t);
@@ -28618,7 +28631,7 @@ class UE extends N {
28618
28631
  return K.createByArray(l);
28619
28632
  }
28620
28633
  _getKnownXsValues(e, t) {
28621
- return !t || t.isNull() ? Es(e.length, e[0].length) : bt(t);
28634
+ return !t || t.isNull() ? Es(e.length, e[0].length) : pt(t);
28622
28635
  }
28623
28636
  }
28624
28637
  class TE extends N {
@@ -28631,7 +28644,7 @@ class TE extends N {
28631
28644
  const { isError: s, errorObject: o } = As(e, t);
28632
28645
  if (s)
28633
28646
  return o;
28634
- const u = bt(e);
28647
+ const u = pt(e);
28635
28648
  if (u instanceof g)
28636
28649
  return u;
28637
28650
  const c = this._getKnownXsValues(u, t);
@@ -28738,7 +28751,7 @@ class TE extends N {
28738
28751
  return K.createByArray(f);
28739
28752
  }
28740
28753
  _getKnownXsValues(e, t) {
28741
- return !t || t.isNull() ? Es(e.length, e[0].length) : bt(t);
28754
+ return !t || t.isNull() ? Es(e.length, e[0].length) : pt(t);
28742
28755
  }
28743
28756
  }
28744
28757
  class vE extends N {
@@ -28785,7 +28798,7 @@ class IE extends N {
28785
28798
  const r = this._getRangeValues(e);
28786
28799
  if (r instanceof g)
28787
28800
  return r;
28788
- const n = rr(t);
28801
+ const n = sr(t);
28789
28802
  if (n.isError())
28790
28803
  return n;
28791
28804
  const { isError: s, errorObject: o, variants: u } = I(n);
@@ -28885,12 +28898,12 @@ class kE extends N {
28885
28898
  criteriaMaxColumnLength: u,
28886
28899
  targetRange: c,
28887
28900
  variants: l
28888
- } = tn(t, e);
28901
+ } = rn(t, e);
28889
28902
  if (r)
28890
28903
  return n;
28891
28904
  if (s)
28892
28905
  return o === 1 && u === 1 ? g.create(h.VALUE) : O(o, u, g.create(h.VALUE));
28893
- const f = rn(l, o, u, !0);
28906
+ const f = nn(l, o, u, !0);
28894
28907
  return this._aggregateResults(c, f);
28895
28908
  }
28896
28909
  _aggregateResults(e, t) {
@@ -29022,12 +29035,12 @@ class GE extends N {
29022
29035
  criteriaMaxColumnLength: u,
29023
29036
  targetRange: c,
29024
29037
  variants: l
29025
- } = tn(t, e);
29038
+ } = rn(t, e);
29026
29039
  if (r)
29027
29040
  return n;
29028
29041
  if (s)
29029
29042
  return o === 1 && u === 1 ? g.create(h.VALUE) : O(o, u, g.create(h.VALUE));
29030
- const f = rn(l, o, u, !0);
29043
+ const f = nn(l, o, u, !0);
29031
29044
  return this._aggregateResults(c, f);
29032
29045
  }
29033
29046
  _aggregateResults(e, t) {
@@ -29142,7 +29155,7 @@ class qE extends N {
29142
29155
  return n;
29143
29156
  const [o, u] = s, c = +o.getValue(), l = +u.getValue();
29144
29157
  let f;
29145
- return l ? f = sn(c, 0, 1) : f = wu(c, 0, 1), b.create(f);
29158
+ return l ? f = an(c, 0, 1) : f = wu(c, 0, 1), b.create(f);
29146
29159
  }
29147
29160
  }
29148
29161
  class XE extends N {
@@ -29200,7 +29213,7 @@ class KE extends N {
29200
29213
  A(this, "maxParams", 2);
29201
29214
  }
29202
29215
  calculate(e, t) {
29203
- const r = mr(e);
29216
+ const r = gr(e);
29204
29217
  if (t.isArray()) {
29205
29218
  const n = t.mapValue((s) => this._handleSingleObject(r, s));
29206
29219
  return n.getRowCount() === 1 && n.getColumnCount() === 1 ? n.get(0, 0) : n;
@@ -29462,7 +29475,7 @@ class rR extends N {
29462
29475
  A(this, "maxParams", 2);
29463
29476
  }
29464
29477
  calculate(e, t) {
29465
- const r = mr(e);
29478
+ const r = gr(e);
29466
29479
  if (t.isArray()) {
29467
29480
  const n = t.mapValue((s) => this._handleSingleObject(r, s));
29468
29481
  return n.getRowCount() === 1 && n.getColumnCount() === 1 ? n.get(0, 0) : n;
@@ -29806,7 +29819,7 @@ class cR extends N {
29806
29819
  A(this, "maxParams", 2);
29807
29820
  }
29808
29821
  calculate(e, t) {
29809
- const r = mr(e);
29822
+ const r = gr(e);
29810
29823
  if (t.isArray()) {
29811
29824
  const n = t.mapValue((s) => this._handleSingleObject(r, s));
29812
29825
  return n.getRowCount() === 1 && n.getColumnCount() === 1 ? n.get(0, 0) : n;
@@ -29956,7 +29969,7 @@ class gR extends N {
29956
29969
  if (m < 1)
29957
29970
  return g.create(h.NUM);
29958
29971
  let _;
29959
- return d ? _ = an(f, m) : _ = xg(f, m), Number.isNaN(_) || !Number.isFinite(_) ? g.create(h.NUM) : b.create(_);
29972
+ return d ? _ = on(f, m) : _ = xg(f, m), Number.isNaN(_) || !Number.isFinite(_) ? g.create(h.NUM) : b.create(_);
29960
29973
  }
29961
29974
  }
29962
29975
  class dR extends N {
@@ -29985,7 +29998,7 @@ class dR extends N {
29985
29998
  const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
29986
29999
  if (c < 0 || l < 1 || l > 10 ** 10)
29987
30000
  return g.create(h.NUM);
29988
- const f = an(-c, l) * 2;
30001
+ const f = on(-c, l) * 2;
29989
30002
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
29990
30003
  }
29991
30004
  }
@@ -30015,7 +30028,7 @@ class CR extends N {
30015
30028
  const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
30016
30029
  if (l < 1 || l > 10 ** 10)
30017
30030
  return g.create(h.NUM);
30018
- const f = an(-c, l);
30031
+ const f = on(-c, l);
30019
30032
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(h.NUM) : b.create(f);
30020
30033
  }
30021
30034
  }
@@ -30059,7 +30072,7 @@ class AR extends N {
30059
30072
  const { isError: s, errorObject: o } = As(e, t, r);
30060
30073
  if (s)
30061
30074
  return o;
30062
- const u = bt(e);
30075
+ const u = pt(e);
30063
30076
  if (u instanceof g)
30064
30077
  return u;
30065
30078
  const c = this._getKnownXsValues(u, t);
@@ -30090,7 +30103,7 @@ class AR extends N {
30090
30103
  _ += u[0][l - 2 - C] * c[d][C];
30091
30104
  m[d].push(_);
30092
30105
  }
30093
- return s && (m = Et(m)), K.createByArray(m);
30106
+ return s && (m = Rt(m)), K.createByArray(m);
30094
30107
  }
30095
30108
  _getResultBySimpleVariables(e, t, r, n) {
30096
30109
  const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = Rs(o, s, n, !1);
@@ -30100,10 +30113,10 @@ class AR extends N {
30100
30113
  return K.createByArray(l);
30101
30114
  }
30102
30115
  _getKnownXsValues(e, t) {
30103
- return !t || t.isNull() ? Es(e.length, e[0].length) : bt(t);
30116
+ return !t || t.isNull() ? Es(e.length, e[0].length) : pt(t);
30104
30117
  }
30105
30118
  _getNewXsValues(e, t) {
30106
- return !t || t.isNull() ? e : bt(t);
30119
+ return !t || t.isNull() ? e : pt(t);
30107
30120
  }
30108
30121
  }
30109
30122
  class ER extends N {
@@ -30622,7 +30635,7 @@ class jR extends N {
30622
30635
  return v.create(s);
30623
30636
  }
30624
30637
  }
30625
- const ui = (i, a) => yt.format(i, a, { throws: !1 }), xe = (i) => {
30638
+ const ui = (i, a) => bt.format(i, a, { throws: !1 }), xe = (i) => {
30626
30639
  let a = `${i.getValue()}`;
30627
30640
  return i.isNull() && (a = ""), i.isBoolean() && (a = a.toLocaleUpperCase()), i.isNumber() && (i.getPattern() !== "" ? a = ui(i.getPattern(), +i.getValue()) : a = `${va(+i.getValue())}`), a;
30628
30641
  };
@@ -30663,10 +30676,10 @@ class UR extends N {
30663
30676
  function ci(i) {
30664
30677
  let a = 0;
30665
30678
  for (let e = 0; e < i.length; e++)
30666
- a += un(i, e);
30679
+ a += cn(i, e);
30667
30680
  return a;
30668
30681
  }
30669
- function un(i, a, e = "ltr") {
30682
+ function cn(i, a, e = "ltr") {
30670
30683
  return TR(i, a, e) > 255 ? 2 : 1;
30671
30684
  }
30672
30685
  function co(i) {
@@ -30835,7 +30848,7 @@ class BR extends N {
30835
30848
  return U.create("");
30836
30849
  let l = 0, f = 0, m = "";
30837
30850
  for (; f < c && l < r.length; )
30838
- f += un(r, l), m += r.charAt(l), l++;
30851
+ f += cn(r, l), m += r.charAt(l), l++;
30839
30852
  return U.create(m);
30840
30853
  }
30841
30854
  }
@@ -30969,11 +30982,11 @@ class GR extends N {
30969
30982
  n = n.substring(f - 1);
30970
30983
  let d = 0, _ = 0, C = "";
30971
30984
  for (; _ < m && d < n.length; )
30972
- _ += un(n, d), C += n.charAt(d), d++;
30985
+ _ += cn(n, d), C += n.charAt(d), d++;
30973
30986
  return U.create(C);
30974
30987
  }
30975
30988
  }
30976
- const vr = ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"], Cn = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], WR = ["", "十", "百", "千"], QR = ["", "拾", "佰", "仟"], qR = ["", "万", "亿", "兆"];
30989
+ const Ir = ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"], _n = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], WR = ["", "十", "百", "千"], QR = ["", "拾", "佰", "仟"], qR = ["", "万", "亿", "兆"];
30977
30990
  class XR extends N {
30978
30991
  constructor() {
30979
30992
  super(...arguments);
@@ -31011,19 +31024,19 @@ class XR extends N {
31011
31024
  for (let m = 0; m < c; m++) {
31012
31025
  const d = Number(u[m]);
31013
31026
  if (c === 1 && d === 0) {
31014
- l += o === 2 ? Cn[0] : vr[0];
31027
+ l += o === 2 ? _n[0] : Ir[0];
31015
31028
  break;
31016
31029
  }
31017
31030
  if (o === 3) {
31018
- l += vr[d];
31031
+ l += Ir[d];
31019
31032
  continue;
31020
31033
  }
31021
31034
  const _ = c - m - 1, C = _ % 4, E = Math.trunc(_ / 4);
31022
31035
  if (c >= 17 && E > 2) {
31023
- if (l += o === 1 ? vr[d] : Cn[d], E > 3)
31036
+ if (l += o === 1 ? Ir[d] : _n[d], E > 3)
31024
31037
  continue;
31025
31038
  } else
31026
- d === 0 ? f = C !== 0 : (f && (l += o === 1 ? vr[0] : Cn[0], f = !1), l += o === 1 ? vr[d] + WR[C] : Cn[d] + QR[C]);
31039
+ d === 0 ? f = C !== 0 : (f && (l += o === 1 ? Ir[0] : _n[0], f = !1), l += o === 1 ? Ir[d] + WR[C] : _n[d] + QR[C]);
31027
31040
  C === 0 && E > 0 && u.slice(Math.max(0, m - 3), m + 1) !== "0000" && (l += qR[E]);
31028
31041
  }
31029
31042
  return U.create(l);
@@ -31575,7 +31588,7 @@ class iy extends N {
31575
31588
  A(this, "maxParams", 2);
31576
31589
  }
31577
31590
  calculate(e, t) {
31578
- const { isError: r, errorObject: n, variants: s } = nn(e, t);
31591
+ const { isError: r, errorObject: n, variants: s } = sn(e, t);
31579
31592
  if (r)
31580
31593
  return n;
31581
31594
  const [o, u] = s;
@@ -31611,7 +31624,7 @@ class oy extends N {
31611
31624
  A(this, "maxParams", 2);
31612
31625
  }
31613
31626
  calculate(e, t) {
31614
- const { isError: r, errorObject: n, variants: s } = nn(e, t);
31627
+ const { isError: r, errorObject: n, variants: s } = sn(e, t);
31615
31628
  if (r)
31616
31629
  return n;
31617
31630
  const [o, u] = s;
@@ -31630,7 +31643,7 @@ class uy extends N {
31630
31643
  A(this, "maxParams", 3);
31631
31644
  }
31632
31645
  calculate(e, t, r) {
31633
- const { isError: n, errorObject: s, variants: o } = nn(e, t, r);
31646
+ const { isError: n, errorObject: s, variants: o } = sn(e, t, r);
31634
31647
  if (n)
31635
31648
  return s;
31636
31649
  const [u, c, l] = o;
@@ -31717,7 +31730,7 @@ class ly extends N {
31717
31730
  d = d.substring(f - 1);
31718
31731
  let E = 0, R = 0;
31719
31732
  for (; R < m && E < d.length; )
31720
- R += un(d, E), E++;
31733
+ R += cn(d, E), E++;
31721
31734
  return C += _ + d.substring(E), U.create(C);
31722
31735
  }
31723
31736
  }
@@ -31818,7 +31831,7 @@ class hy extends N {
31818
31831
  return U.create("");
31819
31832
  let l = r.length - 1, f = 0, m = "";
31820
31833
  for (; f < c && l >= 0; )
31821
- f += un(r, l, "rtl"), m = r.charAt(l) + m, l--;
31834
+ f += cn(r, l, "rtl"), m = r.charAt(l) + m, l--;
31822
31835
  return U.create(m);
31823
31836
  }
31824
31837
  }
@@ -32698,7 +32711,7 @@ let Aa = class extends Se {
32698
32711
  super();
32699
32712
  A(this, "_computingCompleted$", new ul((a) => {
32700
32713
  this._commandService.onCommandExecuted((e) => {
32701
- if (e.id !== Un.id) return;
32714
+ if (e.id !== Tn.id) return;
32702
32715
  const t = e.params;
32703
32716
  if (t.stageInfo)
32704
32717
  return a.next(
@@ -32715,15 +32728,15 @@ let Aa = class extends Se {
32715
32728
  }
32716
32729
  };
32717
32730
  Aa = Ty([
32718
- ho(0, lr),
32719
- ho(1, Re(vc))
32731
+ ho(0, mr),
32732
+ ho(1, _e(vc))
32720
32733
  ], Aa);
32721
32734
  var vy = Object.getOwnPropertyDescriptor, Iy = (i, a, e, t) => {
32722
32735
  for (var r = t > 1 ? void 0 : t ? vy(a, e) : a, n = i.length - 1, s; n >= 0; n--)
32723
32736
  (s = i[n]) && (r = s(r) || r);
32724
32737
  return r;
32725
- }, _n = (i, a) => (e, t) => a(e, t, i);
32726
- let Kn = class extends Se {
32738
+ }, An = (i, a) => (e, t) => a(e, t, i);
32739
+ let Zn = class extends Se {
32727
32740
  constructor(i, a, e, t) {
32728
32741
  super(), this._commandService = i, this._functionService = a, this._configService = e, this._dataSyncPrimaryController = t, this._initialize();
32729
32742
  }
@@ -32742,7 +32755,7 @@ let Kn = class extends Se {
32742
32755
  Yo,
32743
32756
  Ho,
32744
32757
  Fo,
32745
- Un,
32758
+ Tn,
32746
32759
  La,
32747
32760
  Go,
32748
32761
  Wo,
@@ -32791,18 +32804,18 @@ let Kn = class extends Se {
32791
32804
  this._functionService.registerExecutors(...a);
32792
32805
  }
32793
32806
  };
32794
- Kn = Iy([
32795
- _n(0, lr),
32796
- _n(1, Kt),
32797
- _n(2, ba),
32798
- _n(3, rl(fl))
32799
- ], Kn);
32807
+ Zn = Iy([
32808
+ An(0, mr),
32809
+ An(1, Kt),
32810
+ An(2, ba),
32811
+ An(3, rl(fl))
32812
+ ], Zn);
32800
32813
  var Fy = Object.getOwnPropertyDescriptor, By = (i, a, e, t) => {
32801
32814
  for (var r = t > 1 ? void 0 : t ? Fy(a, e) : a, n = i.length - 1, s; n >= 0; n--)
32802
32815
  (s = i[n]) && (r = s(r) || r);
32803
32816
  return r;
32804
- }, An = (i, a) => (e, t) => a(e, t, i);
32805
- let Zn = class extends Se {
32817
+ }, En = (i, a) => (e, t) => a(e, t, i);
32818
+ let zn = class extends Se {
32806
32819
  constructor(i, a, e) {
32807
32820
  super(), this._commandService = i, this._dependencyManagerService = a, this._featureCalculationManagerService = e, this._initialize();
32808
32821
  }
@@ -32878,18 +32891,18 @@ let Zn = class extends Se {
32878
32891
  this._dependencyManagerService.removeFormulaDependencyByDefinedName(e, t);
32879
32892
  }
32880
32893
  };
32881
- Zn = By([
32882
- An(0, lr),
32883
- An(1, Xr),
32884
- An(1, gs),
32885
- An(2, Xr)
32886
- ], Zn);
32894
+ zn = By([
32895
+ En(0, mr),
32896
+ En(1, Xr),
32897
+ En(1, gs),
32898
+ En(2, Xr)
32899
+ ], zn);
32887
32900
  var ky = Object.getOwnPropertyDescriptor, $y = (i, a, e, t) => {
32888
32901
  for (var r = t > 1 ? void 0 : t ? ky(a, e) : a, n = i.length - 1, s; n >= 0; n--)
32889
32902
  (s = i[n]) && (r = s(r) || r);
32890
32903
  return r;
32891
32904
  }, go = (i, a) => (e, t) => a(e, t, i);
32892
- let zn = class extends Se {
32905
+ let Jn = class extends Se {
32893
32906
  constructor(i, a) {
32894
32907
  super(), this._commandService = i, this._featureCalculationManagerService = a, this._initialize();
32895
32908
  }
@@ -32916,16 +32929,16 @@ let zn = class extends Se {
32916
32929
  );
32917
32930
  }
32918
32931
  };
32919
- zn = $y([
32920
- go(0, lr),
32932
+ Jn = $y([
32933
+ go(0, mr),
32921
32934
  go(1, Xr)
32922
- ], zn);
32935
+ ], Jn);
32923
32936
  var Yy = Object.getOwnPropertyDescriptor, Hy = (i, a, e, t) => {
32924
32937
  for (var r = t > 1 ? void 0 : t ? Yy(a, e) : a, n = i.length - 1, s; n >= 0; n--)
32925
32938
  (s = i[n]) && (r = s(r) || r);
32926
32939
  return r;
32927
32940
  }, Ts = (i, a) => (e, t) => a(e, t, i);
32928
- let Jn = class extends Se {
32941
+ let es = class extends Se {
32929
32942
  constructor(i, a, e) {
32930
32943
  super(), this._commandService = i, this._otherFormulaManagerService = a, this._dependencyManagerService = e, this._initialize();
32931
32944
  }
@@ -32954,11 +32967,11 @@ let Jn = class extends Se {
32954
32967
  );
32955
32968
  }
32956
32969
  };
32957
- Jn = Hy([
32958
- Ts(0, lr),
32970
+ es = Hy([
32971
+ Ts(0, mr),
32959
32972
  Ts(1, Ha),
32960
32973
  Ts(2, gs)
32961
- ], Jn);
32974
+ ], es);
32962
32975
  class Gy extends Se {
32963
32976
  constructor() {
32964
32977
  super(...arguments);
@@ -32986,7 +32999,7 @@ class Gy extends Se {
32986
32999
  const Ic = Je(
32987
33000
  "univer.formula.active-dirty-manager.service"
32988
33001
  );
32989
- var Cr = /* @__PURE__ */ ((i) => (i[i.NOT_REGISTER = 1] = "NOT_REGISTER", i[i.SUCCESS = 2] = "SUCCESS", i[i.WAIT = 3] = "WAIT", i[i.ERROR = 4] = "ERROR", i))(Cr || {}), Wy = Object.getOwnPropertyDescriptor, Qy = (i, a, e, t) => {
33002
+ var Ar = /* @__PURE__ */ ((i) => (i[i.NOT_REGISTER = 1] = "NOT_REGISTER", i[i.SUCCESS = 2] = "SUCCESS", i[i.WAIT = 3] = "WAIT", i[i.ERROR = 4] = "ERROR", i))(Ar || {}), Wy = Object.getOwnPropertyDescriptor, Qy = (i, a, e, t) => {
32990
33003
  for (var r = t > 1 ? void 0 : t ? Wy(a, e) : a, n = i.length - 1, s; n >= 0; n--)
32991
33004
  (s = i[n]) && (r = s(r) || r);
32992
33005
  return r;
@@ -33017,9 +33030,9 @@ let Ea = class extends Se {
33017
33030
  }
33018
33031
  _initFormulaRegister() {
33019
33032
  this._activeDirtyManagerService.register(
33020
- cn.id,
33033
+ ln.id,
33021
33034
  {
33022
- commandId: cn.id,
33035
+ commandId: ln.id,
33023
33036
  getDirtyData(e) {
33024
33037
  return {
33025
33038
  dirtyUnitOtherFormulaMap: e.params
@@ -33043,7 +33056,7 @@ let Ea = class extends Se {
33043
33056
  };
33044
33057
  this._commandService.executeCommand(as.id, c).then(() => {
33045
33058
  this._commandService.executeCommand(
33046
- cn.id,
33059
+ ln.id,
33047
33060
  { [t]: { [r]: { [s]: !0 } } }
33048
33061
  );
33049
33062
  });
@@ -33074,7 +33087,7 @@ let Ea = class extends Se {
33074
33087
  const C = new me(d), E = new me(_.result);
33075
33088
  C.forValue((R, y, p) => {
33076
33089
  E.setValue(R, y, p);
33077
- }), _.status = Cr.SUCCESS, _.callbacks.forEach((R) => {
33090
+ }), _.status = Ar.SUCCESS, _.callbacks.forEach((R) => {
33078
33091
  R(d);
33079
33092
  }), _.callbacks.clear(), f.push(_);
33080
33093
  }
@@ -33089,7 +33102,7 @@ let Ea = class extends Se {
33089
33102
  const u = this._createFormulaId(a, e, s, o);
33090
33103
  return this._ensureCacheMap(a, e).set(u, {
33091
33104
  result: void 0,
33092
- status: Cr.WAIT,
33105
+ status: Ar.WAIT,
33093
33106
  formulaId: u,
33094
33107
  callbacks: /* @__PURE__ */ new Set(),
33095
33108
  extra: n
@@ -33113,7 +33126,7 @@ let Ea = class extends Se {
33113
33126
  }
33114
33127
  getFormulaValue(a, e, t) {
33115
33128
  const r = this._ensureCacheMap(a, e), n = r.get(t);
33116
- return n ? n.status === Cr.SUCCESS || n.status === Cr.ERROR ? Promise.resolve(n) : new Promise((s) => {
33129
+ return n ? n.status === Ar.SUCCESS || n.status === Ar.ERROR ? Promise.resolve(n) : new Promise((s) => {
33117
33130
  n.callbacks.add(() => {
33118
33131
  s(r.get(t));
33119
33132
  });
@@ -33124,16 +33137,16 @@ let Ea = class extends Se {
33124
33137
  }
33125
33138
  markFormulaDirty(a, e, t) {
33126
33139
  const r = this.getFormulaValueSync(a, e, t);
33127
- r && (r.status = Cr.WAIT, this._commandService.executeCommand(
33128
- cn.id,
33140
+ r && (r.status = Ar.WAIT, this._commandService.executeCommand(
33141
+ ln.id,
33129
33142
  { [a]: { [e]: { [t]: !0 } } }
33130
33143
  ));
33131
33144
  }
33132
33145
  };
33133
33146
  Ea = Qy([
33134
- vs(0, lr),
33147
+ vs(0, mr),
33135
33148
  vs(1, Ic),
33136
- vs(2, Re(nl))
33149
+ vs(2, _e(nl))
33137
33150
  ], Ea);
33138
33151
  var Xy = Object.getOwnPropertyDescriptor, Ky = (i, a, e, t) => {
33139
33152
  for (var r = t > 1 ? void 0 : t ? Xy(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -33158,13 +33171,13 @@ let _o = (Is = class extends sl {
33158
33171
  onReady() {
33159
33172
  var i;
33160
33173
  ps(this._injector, [
33161
- [Kn]
33174
+ [Zn]
33162
33175
  // [SetSuperTableController],
33163
33176
  ]), (i = this._config) != null && i.notExecuteFormula || ps(this._injector, [
33177
+ [es],
33164
33178
  [Jn],
33165
33179
  [zn],
33166
- [Zn],
33167
- [Xn]
33180
+ [Kn]
33168
33181
  ]);
33169
33182
  }
33170
33183
  onRendered() {
@@ -33178,51 +33191,51 @@ let _o = (Is = class extends sl {
33178
33191
  const i = !this._config.notExecuteFormula, a = [
33179
33192
  // Services
33180
33193
  [Kt, { useClass: Ch }],
33181
- [xr, { useClass: Ws }],
33194
+ [jr, { useClass: Ws }],
33182
33195
  [Ic, { useClass: Gy }],
33183
33196
  [Ea],
33184
33197
  [mu, { useClass: oa }],
33185
33198
  [Zo, { useClass: Mf }],
33186
- [en, { useClass: Cf }],
33199
+ [tn, { useClass: Cf }],
33187
33200
  [vc],
33188
33201
  // Models
33189
- [Or],
33202
+ [Mr],
33190
33203
  //Controllers
33191
- [Kn],
33204
+ [Zn],
33192
33205
  // [SetSuperTableController],
33193
33206
  [Aa]
33194
33207
  ];
33195
33208
  i && a.push(
33196
33209
  // Services
33197
33210
  [Ha, { useClass: Zh }],
33198
- [Nt, { useClass: ua }],
33211
+ [Vt, { useClass: ua }],
33199
33212
  [qt, { useClass: Zs }],
33200
33213
  [Xr, { useClass: Kh }],
33201
33214
  //Controller
33202
- [Xn],
33203
- [Jn],
33204
- [Zn],
33215
+ [Kn],
33216
+ [es],
33205
33217
  [zn],
33218
+ [Jn],
33206
33219
  // Calculation engine
33207
- [Dr],
33220
+ [wr],
33208
33221
  [qr],
33209
- [Mr],
33222
+ [Sr],
33210
33223
  // AstNode factory
33211
33224
  [hu],
33212
- [Yn],
33213
33225
  [Hn],
33214
- [Eu],
33215
33226
  [Gn],
33216
- [$n],
33227
+ [Eu],
33217
33228
  [Wn],
33229
+ [Yn],
33218
33230
  [Qn],
33219
33231
  [qn],
33232
+ [Xn],
33220
33233
  [Ru]
33221
33234
  ), a.forEach((e) => this._injector.add(e));
33222
33235
  }
33223
33236
  _initializeWithOverride() {
33224
33237
  var i;
33225
- this._injector.add([Hr, { useClass: Hr }]), (i = this._config) != null && i.notExecuteFormula || [
33238
+ this._injector.add([Gr, { useClass: Gr }]), (i = this._config) != null && i.notExecuteFormula || [
33226
33239
  [ma, { useClass: ha }],
33227
33240
  [gs, { useClass: Xh }],
33228
33241
  [la, { useClass: fa }]
@@ -33230,7 +33243,7 @@ let _o = (Is = class extends sl {
33230
33243
  }
33231
33244
  }, A(Is, "pluginName", Zy), Is);
33232
33245
  _o = Ky([
33233
- Co(1, Re(Eo)),
33246
+ Co(1, _e(Eo)),
33234
33247
  Co(2, ba)
33235
33248
  ], _o);
33236
33249
  export {
@@ -33242,18 +33255,18 @@ export {
33242
33255
  fb as AsyncCustomFunction,
33243
33256
  eh as AsyncObject,
33244
33257
  N as BaseFunction,
33245
- Ur as BaseReferenceObject,
33258
+ Tr as BaseReferenceObject,
33246
33259
  Qt as BaseValueObject,
33247
- ir as BooleanValue,
33260
+ ur as BooleanValue,
33248
33261
  v as BooleanValueObject,
33249
- Xn as CalculateController,
33262
+ Kn as CalculateController,
33250
33263
  ha as CalculateFormulaService,
33251
33264
  Wg as CustomFunction,
33252
33265
  rg as DEFAULT_INTERVAL_COUNT,
33253
- $r as DEFAULT_TOKEN_LAMBDA_FUNCTION_NAME,
33266
+ Yr as DEFAULT_TOKEN_LAMBDA_FUNCTION_NAME,
33254
33267
  Kl as DEFAULT_TOKEN_LET_FUNCTION_NAME,
33255
- Nr as DEFAULT_TOKEN_TYPE_LAMBDA_PARAMETER,
33256
- _t as DEFAULT_TOKEN_TYPE_PARAMETER,
33268
+ Vr as DEFAULT_TOKEN_TYPE_LAMBDA_PARAMETER,
33269
+ At as DEFAULT_TOKEN_TYPE_PARAMETER,
33257
33270
  kt as DEFAULT_TOKEN_TYPE_ROOT,
33258
33271
  Ws as DefinedNamesService,
33259
33272
  qh as DependencyManagerBaseService,
@@ -33261,18 +33274,18 @@ export {
33261
33274
  ob as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
33262
33275
  xa as ENGINE_FORMULA_PLUGIN_CONFIG_KEY,
33263
33276
  ub as ENGINE_FORMULA_RETURN_DEPENDENCY_TREE,
33264
- fr as ERROR_TYPE_SET,
33277
+ hr as ERROR_TYPE_SET,
33265
33278
  h as ErrorType,
33266
33279
  g as ErrorValueObject,
33267
33280
  ga as FUNCTION_NAMES_ARRAY,
33268
33281
  fe as FUNCTION_NAMES_COMPATIBILITY,
33269
33282
  Gg as FUNCTION_NAMES_CUBE,
33270
33283
  Xe as FUNCTION_NAMES_DATABASE,
33271
- Ae as FUNCTION_NAMES_DATE,
33284
+ Ee as FUNCTION_NAMES_DATE,
33272
33285
  Q as FUNCTION_NAMES_ENGINEERING,
33273
33286
  ee as FUNCTION_NAMES_FINANCIAL,
33274
33287
  Oe as FUNCTION_NAMES_INFORMATION,
33275
- Ee as FUNCTION_NAMES_LOGICAL,
33288
+ Re as FUNCTION_NAMES_LOGICAL,
33276
33289
  re as FUNCTION_NAMES_LOOKUP,
33277
33290
  B as FUNCTION_NAMES_MATH,
33278
33291
  P as FUNCTION_NAMES_STATISTICAL,
@@ -33281,52 +33294,52 @@ export {
33281
33294
  oi as FUNCTION_NAMES_WEB,
33282
33295
  Kh as FeatureCalculationManagerService,
33283
33296
  Zs as FormulaCurrentConfigService,
33284
- Or as FormulaDataModel,
33297
+ Mr as FormulaDataModel,
33285
33298
  fa as FormulaDependencyGenerator,
33286
33299
  Ps as FormulaDependencyTree,
33287
33300
  Ji as FormulaDependencyTreeModel,
33288
- dr as FormulaDependencyTreeType,
33301
+ _r as FormulaDependencyTreeType,
33289
33302
  zi as FormulaDependencyTreeVirtual,
33290
33303
  tt as FormulaExecuteStageType,
33291
- Fr as FormulaExecutedStateType,
33292
- Cr as FormulaResultStatus,
33304
+ Br as FormulaExecutedStateType,
33305
+ Ar as FormulaResultStatus,
33293
33306
  ua as FormulaRuntimeService,
33294
- Yn as FunctionNodeFactory,
33307
+ Hn as FunctionNodeFactory,
33295
33308
  Ch as FunctionService,
33296
33309
  Vl as FunctionType,
33297
33310
  vc as GlobalComputingStatusService,
33298
33311
  oa as HyperlinkEngineFormulaService,
33299
33312
  Ic as IActiveDirtyManagerService,
33300
33313
  ma as ICalculateFormulaService,
33301
- xr as IDefinedNamesService,
33314
+ jr as IDefinedNamesService,
33302
33315
  gs as IDependencyManagerService,
33303
33316
  Xr as IFeatureCalculationManagerService,
33304
33317
  qt as IFormulaCurrentConfigService,
33305
33318
  la as IFormulaDependencyGenerator,
33306
- Nt as IFormulaRuntimeService,
33319
+ Vt as IFormulaRuntimeService,
33307
33320
  Kt as IFunctionService,
33308
33321
  mu as IHyperlinkEngineFormulaService,
33309
33322
  Ha as IOtherFormulaManagerService,
33310
33323
  Zo as ISheetRowFilteredService,
33311
- en as ISuperTableService,
33312
- Dr as Interpreter,
33313
- Hn as LambdaNodeFactory,
33324
+ tn as ISuperTableService,
33325
+ wr as Interpreter,
33326
+ Gn as LambdaNodeFactory,
33314
33327
  Eu as LambdaParameterNodeFactory,
33315
33328
  Ya as LambdaValueObjectObject,
33316
- Mr as Lexer,
33329
+ Sr as Lexer,
33317
33330
  ie as LexerNode,
33318
- Hr as LexerTreeBuilder,
33331
+ Gr as LexerTreeBuilder,
33319
33332
  hb as NEW_EXCEL_FUNCTIONS,
33320
33333
  ce as NullValueObject,
33321
33334
  b as NumberValueObject,
33322
33335
  Dt as OPERATOR_TOKEN_SET,
33323
- Gn as OperatorNodeFactory,
33336
+ Wn as OperatorNodeFactory,
33324
33337
  qy as OtherFormulaBizType,
33325
33338
  Zh as OtherFormulaManagerService,
33326
- cn as OtherFormulaMarkDirty,
33327
- $n as PrefixNodeFactory,
33328
- Bn as RangeReferenceObject,
33329
- Wn as ReferenceNodeFactory,
33339
+ ln as OtherFormulaMarkDirty,
33340
+ Yn as PrefixNodeFactory,
33341
+ kn as RangeReferenceObject,
33342
+ Qn as ReferenceNodeFactory,
33330
33343
  Jl as RegisterFunctionMutation,
33331
33344
  Ea as RegisterOtherFormulaService,
33332
33345
  gf as RemoveDefinedNameMutation,
@@ -33340,7 +33353,7 @@ export {
33340
33353
  Uo as SetDefinedNameMutation,
33341
33354
  ib as SetDefinedNameMutationFactory,
33342
33355
  Da as SetFeatureCalculationMutation,
33343
- Un as SetFormulaCalculationNotificationMutation,
33356
+ Tn as SetFormulaCalculationNotificationMutation,
33344
33357
  La as SetFormulaCalculationResultMutation,
33345
33358
  To as SetFormulaCalculationStartMutation,
33346
33359
  Fo as SetFormulaCalculationStopMutation,
@@ -33360,17 +33373,17 @@ export {
33360
33373
  df as SetTriggerFormulaCalculationStartMutation,
33361
33374
  Mf as SheetRowFilteredService,
33362
33375
  U as StringValueObject,
33363
- Qn as SuffixNodeFactory,
33376
+ qn as SuffixNodeFactory,
33364
33377
  Cf as SuperTableService,
33365
- qn as UnionNodeFactory,
33378
+ Xn as UnionNodeFactory,
33366
33379
  _o as UniverFormulaEnginePlugin,
33367
33380
  Ru as ValueNodeFactory,
33368
33381
  jt as ValueObjectFactory,
33369
33382
  Y as compareToken,
33370
33383
  Mi as convertUnitDataToRuntime,
33371
33384
  ag as deserializeRangeForR1C1,
33372
- Yr as deserializeRangeWithSheet,
33373
- Vr as deserializeRangeWithSheetWithCache,
33385
+ Hr as deserializeRangeWithSheet,
33386
+ Or as deserializeRangeWithSheetWithCache,
33374
33387
  Ne as excelDateSerial,
33375
33388
  cb as extractFormulaError,
33376
33389
  cg as functionArray,
@@ -33391,20 +33404,20 @@ export {
33391
33404
  jy as functionWeb,
33392
33405
  Gi as generateAstNode,
33393
33406
  Qi as generateExecuteAstNodeData,
33394
- gr as generateRandomDependencyTreeId,
33407
+ Cr as generateRandomDependencyTreeId,
33395
33408
  wi as generateStringWithSequence,
33396
33409
  sb as getAbsoluteRefTypeWitString,
33397
- yn as getAbsoluteRefTypeWithSingleString,
33410
+ bn as getAbsoluteRefTypeWithSingleString,
33398
33411
  gb as getObjectValue,
33399
33412
  ab as getRangeWithRefsString,
33400
33413
  lb as handleNumfmtInCell,
33401
33414
  Sa as handleRefStringInfo,
33402
33415
  Ol as includeFormulaLexerToken,
33403
33416
  Pi as initSheetFormulaData,
33404
- Rn as isFormulaLexerToken,
33417
+ yn as isFormulaLexerToken,
33405
33418
  Nl as isInDirtyRange,
33406
33419
  Lo as isReferenceString,
33407
- bn as isReferenceStringWithEffectiveColumn,
33420
+ pn as isReferenceStringWithEffectiveColumn,
33408
33421
  af as isReferenceStrings,
33409
33422
  nb as matchRefDrawToken,
33410
33423
  X as matchToken,