@sheetxl/formulas-extended 0.7.28-beta.4 → 0.8.0-beta.1

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.
Files changed (34) hide show
  1. package/browser/cjs/index.cjs +1 -1
  2. package/browser/esm/{CsrMSYiKGo3-I_Qk.mjs → B1VmvhXuEn7zaTB9.mjs} +1 -1
  3. package/browser/esm/{BybuwnuafVL8RdTx.mjs → BFnDPCjxJcoIItFa.mjs} +1 -1
  4. package/{node/esm/CN-pAKHIFQkkdFFB.mjs → browser/esm/BRwwvGaJ6HvkxjFC.mjs} +1 -1
  5. package/browser/esm/{XATNfSb9mKkYP5Fr.mjs → Bma3CN4_Nec6_4n7.mjs} +1 -1
  6. package/browser/esm/{BKnXVC21NesUzU9t.mjs → BuGemmv84T8m0wqw.mjs} +1 -1
  7. package/{node/esm/ffkoQUSdLhFyILRL.mjs → browser/esm/COqdI1LYTHd9oLA6.mjs} +1 -1
  8. package/{node/esm/y9VKeU12ARR9HmtI.mjs → browser/esm/CnVJ8GAsshRjRGA-.mjs} +1 -1
  9. package/browser/esm/{CShl-IMQIPnBMVpb.mjs → CwoMEzOtRihuYUTr.mjs} +1 -1
  10. package/browser/esm/{DnFUggiR6cNYknMt.mjs → DY3kG36QGyDbrANO.mjs} +1 -1
  11. package/browser/esm/{fhXUc-E6MSehd9Ep.mjs → DodhOXkSzelSxHmB.mjs} +1 -1
  12. package/browser/esm/{DxiRpwBhgWoK5Erd.mjs → DpoZ7h1ScIJvbOY9.mjs} +1 -1
  13. package/{node/esm/C2TyRseZg5dWtMq1.mjs → browser/esm/Dy6UD7hQRBsT0WNp.mjs} +1 -1
  14. package/browser/esm/index.mjs +425 -342
  15. package/{node/esm/DoS1jziW_TXjkH37.mjs → browser/esm/srpVt74r2zbvm1N0.mjs} +1 -1
  16. package/browser/esm/{DsJzZKURvUm7apNu.mjs → vu0NRDeeTbEHPMYS.mjs} +1 -1
  17. package/node/esm/{CsrMSYiKGo3-I_Qk.mjs → B1VmvhXuEn7zaTB9.mjs} +1 -1
  18. package/node/esm/{v9tvQuvQYcFQ0zOs.mjs → BQyZVLTMNFLbjVap.mjs} +1 -1
  19. package/{browser/esm/CN-pAKHIFQkkdFFB.mjs → node/esm/BRwwvGaJ6HvkxjFC.mjs} +1 -1
  20. package/node/esm/{XATNfSb9mKkYP5Fr.mjs → Bma3CN4_Nec6_4n7.mjs} +1 -1
  21. package/node/esm/{BKnXVC21NesUzU9t.mjs → BuGemmv84T8m0wqw.mjs} +1 -1
  22. package/{browser/esm/ffkoQUSdLhFyILRL.mjs → node/esm/COqdI1LYTHd9oLA6.mjs} +1 -1
  23. package/{browser/esm/y9VKeU12ARR9HmtI.mjs → node/esm/CnVJ8GAsshRjRGA-.mjs} +1 -1
  24. package/node/esm/{CShl-IMQIPnBMVpb.mjs → CwoMEzOtRihuYUTr.mjs} +1 -1
  25. package/node/esm/{fhXUc-E6MSehd9Ep.mjs → DodhOXkSzelSxHmB.mjs} +1 -1
  26. package/node/esm/{DxiRpwBhgWoK5Erd.mjs → DpoZ7h1ScIJvbOY9.mjs} +1 -1
  27. package/{browser/esm/C2TyRseZg5dWtMq1.mjs → node/esm/Dy6UD7hQRBsT0WNp.mjs} +1 -1
  28. package/node/esm/{C21UeAwlG4Qkfu1Z.mjs → LAkTk93odAfpvx50.mjs} +1 -1
  29. package/node/esm/index.mjs +872 -788
  30. package/{browser/esm/DoS1jziW_TXjkH37.mjs → node/esm/srpVt74r2zbvm1N0.mjs} +1 -1
  31. package/node/esm/{DsJzZKURvUm7apNu.mjs → vu0NRDeeTbEHPMYS.mjs} +1 -1
  32. package/package.json +3 -3
  33. package/types/src/_utils/Consts.d.ts +2 -2
  34. package/types/src/financial/Financial.d.ts +11 -6
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.7.28-beta.4
2
+ * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.1
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -12,8 +12,8 @@ var a = Object.defineProperty, o = (t, n) => {
12
12
  enumerable: !0
13
13
  });
14
14
  return n || a(e, Symbol.toStringTag, { value: "Module" }), e;
15
- }, i = o({
16
- CUBEKPIMEMBER: () => s,
15
+ }, s = o({
16
+ CUBEKPIMEMBER: () => i,
17
17
  CUBEMEMBER: () => u,
18
18
  CUBEMEMBERPROPERTY: () => l,
19
19
  CUBERANKEDMEMBER: () => f,
@@ -21,7 +21,7 @@ var a = Object.defineProperty, o = (t, n) => {
21
21
  CUBESETCOUNT: () => m,
22
22
  CUBEVALUE: () => h
23
23
  });
24
- function s(t, e, r, a) {
24
+ function i(t, e, r, a) {
25
25
  throw n.BuiltIn.NA;
26
26
  }
27
27
  function u(t, e, r) {
@@ -75,31 +75,31 @@ function N(t) {
75
75
  function D(t, n) {
76
76
  return N(t) ? M[n] : p[n];
77
77
  }
78
- function d(t, n, e) {
78
+ function g(t, n, e) {
79
79
  return D(t, n) === e;
80
80
  }
81
- function g(t, n) {
81
+ function d(t, n) {
82
82
  return Math.trunc(t) - Math.trunc(n);
83
83
  }
84
- function y(n, e) {
84
+ function b(n, e) {
85
85
  const r = t.fromSerialDate(n, !0), a = t.fromSerialDate(e, !0), o = a.getFullYear() - r.getFullYear();
86
86
  if (o > 1) return !0;
87
87
  if (o < 1) return !1;
88
- const i = a.getMonth() - r.getMonth();
89
- return i > 0 || !(i < 0) && a.getDate() > r.getDate();
88
+ const s = a.getMonth() - r.getMonth();
89
+ return s > 0 || !(s < 0) && a.getDate() > r.getDate();
90
90
  }
91
- function b(t, n) {
92
- if (d(t.getFullYear(), t.getMonth(), t.getDate())) {
91
+ function y(t, n) {
92
+ if (g(t.getFullYear(), t.getMonth(), t.getDate())) {
93
93
  t.setDate(1), t.setMonth(t.getMonth() + n);
94
94
  const e = t.getFullYear(), r = t.getMonth();
95
95
  t.setDate(D(e, r));
96
96
  } else t.setMonth(t.getMonth() + n);
97
97
  return t;
98
98
  }
99
- function E(t) {
99
+ function v(t) {
100
100
  return !(t < 0 || t > 4);
101
101
  }
102
- function v(n) {
102
+ function E(n) {
103
103
  return t.getDateParts(Math.max(0, Math.floor(n)));
104
104
  }
105
105
  function R(t, n, e, r, a, o) {
@@ -108,12 +108,12 @@ function R(t, n, e, r, a, o) {
108
108
  function I(n, e, r) {
109
109
  switch (r) {
110
110
  case 0: return function(t, n) {
111
- const e = v(t), r = v(n), a = e.year, o = e.month;
112
- let i = e.day, s = r.year, u = r.month, l = r.day, f = !1;
113
- 2 === o ? i === (N(a) ? 29 : 28) && (i = 30, f = !0) : 31 === i && (i = 30);
114
- 31 !== l || f || (i < 30 ? (12 === u ? (s += 1, u = 1) : u += 1, l = 1) : l = 30);
111
+ const e = E(t), r = E(n), a = e.year, o = e.month;
112
+ let s = e.day, i = r.year, u = r.month, l = r.day, f = !1;
113
+ 2 === o ? s === (N(a) ? 29 : 28) && (s = 30, f = !0) : 31 === s && (s = 30);
114
+ 31 !== l || f || (s < 30 ? (12 === u ? (i += 1, u = 1) : u += 1, l = 1) : l = 30);
115
115
  return {
116
- days: Math.abs(R(a, o, i, s, u, l)),
116
+ days: Math.abs(R(a, o, s, i, u, l)),
117
117
  yearDays: 360
118
118
  };
119
119
  }(n, e);
@@ -122,13 +122,13 @@ function I(n, e, r) {
122
122
  days: 0,
123
123
  yearDays: 365
124
124
  };
125
- const r = v(n), a = v(e), o = r.year, i = a.year, s = Math.abs(e - n), u = Math.abs(i - o), l = u + 1, f = i < o ? i : o, c = i < o ? o : i;
125
+ const r = E(n), a = E(e), o = r.year, s = a.year, i = Math.abs(e - n), u = Math.abs(s - o), l = u + 1, f = s < o ? s : o, c = s < o ? o : s;
126
126
  let m, h = t.getSerialDate(f, 1, 1);
127
127
  1900 === f && (h += 1);
128
128
  if (0 === u) m = t.getSerialDate(f, 12, 31) - h + 1;
129
129
  else if (1 === u) {
130
- const r = Math.min(n, e), a = Math.max(n, e), o = v(r), i = v(a), s = i.month - o.month;
131
- if (s > 0 || 0 === s && i.day > o.day) m = (t.getSerialDate(c + 1, 1, 1) - h) / l;
130
+ const r = Math.min(n, e), a = Math.max(n, e), o = E(r), s = E(a), i = s.month - o.month;
131
+ if (i > 0 || 0 === i && s.day > o.day) m = (t.getSerialDate(c + 1, 1, 1) - h) / l;
132
132
  else {
133
133
  m = 365;
134
134
  for (const n of [f, c]) if (N(n)) {
@@ -141,7 +141,7 @@ function I(n, e, r) {
141
141
  }
142
142
  } else m = (t.getSerialDate(c + 1, 1, 1) - h) / l;
143
143
  return {
144
- days: s,
144
+ days: i,
145
145
  yearDays: m
146
146
  };
147
147
  }(n, e);
@@ -155,7 +155,7 @@ function I(n, e, r) {
155
155
  yearDays: 365
156
156
  };
157
157
  case 4: return function(t, n) {
158
- const e = v(t), r = v(n);
158
+ const e = E(t), r = E(n);
159
159
  let a = e.day, o = r.day;
160
160
  31 === a && (a = 30);
161
161
  31 === o && (o = 30);
@@ -174,86 +174,86 @@ function C(t, n) {
174
174
  const e = t.getMonth(), r = t.getDate();
175
175
  return r === new Date(t.getFullYear(), e + 1, 0).getDate() ? new Date(n, e + 1, 0) : new Date(n, e, r);
176
176
  }
177
- function T(n, e, r) {
177
+ function x(n, e, r) {
178
178
  const a = t.fromSerialDate(n, !0);
179
179
  let o = t.fromSerialDate(e, !0);
180
- const i = 12 / r;
181
- for (o = C(o, a.getFullYear()), o > a && (o = C(o, o.getFullYear() - 1)); o <= a;) o = b(o, i);
182
- return o = b(o, -i), o;
180
+ const s = 12 / r;
181
+ for (o = C(o, a.getFullYear()), o > a && (o = C(o, o.getFullYear() - 1)); o <= a;) o = y(o, s);
182
+ return o = y(o, -s), o;
183
183
  }
184
- function x(n, e, r) {
185
- return t.toSerialDate(T(n, e, r), !0);
184
+ function T(n, e, r) {
185
+ return t.toSerialDate(x(n, e, r), !0);
186
186
  }
187
187
  function A(n, e, r) {
188
- const a = b(T(n, e, r), 12 / r);
188
+ const a = y(x(n, e, r), 12 / r);
189
189
  return t.toSerialDate(a, !0);
190
190
  }
191
191
  function w(t, n, e, r) {
192
- return S(x(t, n, e), t, r);
192
+ return S(T(t, n, e), t, r);
193
193
  }
194
194
  function V(n, e, r, a) {
195
195
  if (3 === a) return 365 / r;
196
196
  if (1 !== a) return 360 / r;
197
- const o = x(n, e, r), i = b(t.fromSerialDate(o, !0), 12 / r), s = t.toSerialDate(i, !0);
198
- return o < 0 && 1 === r ? 365 : s - o;
197
+ const o = T(n, e, r), s = y(t.fromSerialDate(o, !0), 12 / r), i = t.toSerialDate(s, !0);
198
+ return o < 0 && 1 === r ? 365 : i - o;
199
199
  }
200
200
  function B(n, e, r) {
201
201
  const a = t.fromSerialDate(n, !0);
202
202
  let o = t.fromSerialDate(e, !0);
203
- const i = 12 / r;
204
- let s = 0;
205
- for (; o > a;) o = b(o, -i), s++;
206
- return s;
203
+ const s = 12 / r;
204
+ let i = 0;
205
+ for (; o > a;) o = y(o, -s), i++;
206
+ return i;
207
207
  }
208
- function O(n, e, r) {
208
+ function F(n, e, r) {
209
209
  let a = t.fromSerialDate(n, !0);
210
- if (a = b(a, e), r) {
210
+ if (a = y(a, e), r) {
211
211
  const t = a.getFullYear(), n = a.getMonth();
212
212
  a.setDate(D(t, n));
213
213
  }
214
214
  return t.toSerialDate(a, !0);
215
215
  }
216
- function P(n, e, r, a, o, i, s, u, l) {
216
+ function O(n, e, r, a, o, s, i, u, l) {
217
217
  const f = S(r, a, l), c = V(n, a, u, l);
218
- return f < c ? function(t, n, e, r, a, o, i, s, u, l, f) {
219
- const c = B(t, n, s), m = S(t, r, u), h = S(e, t, u), M = o / s, p = 100 * a / s, N = p * l / f;
220
- let D = i / (1 + M) ** (c - 1 + m / f);
218
+ return f < c ? function(t, n, e, r, a, o, s, i, u, l, f) {
219
+ const c = B(t, n, i), m = S(t, r, u), h = S(e, t, u), M = o / i, p = 100 * a / i, N = p * l / f;
220
+ let D = s / (1 + M) ** (c - 1 + m / f);
221
221
  D += N / (1 + M) ** (m / f);
222
222
  for (let t = 2; t <= c; t++) D += p / (1 + M) ** (t - 1 + m / f);
223
223
  return D -= p * h / f, D;
224
- }(n, e, r, a, o, i, s, u, l, f, c) : function(n, e, r, a, o, i, s, u, l, f) {
224
+ }(n, e, r, a, o, s, i, u, l, f, c) : function(n, e, r, a, o, s, i, u, l, f) {
225
225
  const c = B(a, e, u), m = function(n, e, r, a) {
226
- const o = t.fromSerialDate(n, !0), i = t.fromSerialDate(e, !0), s = o.getFullYear(), u = o.getMonth(), l = o.getDate(), f = i.getFullYear(), c = i.getMonth(), m = i.getDate(), h = d(s, u, l) || 1 !== u && l > 28 && l < D(s, u) && d(f, c, m), M = O(e, 0, h);
227
- let p = (a ? 1 : 0) + (e < M ? 1 : 0), N = O(M, r, h);
228
- for (; r > 0 ? N < e : N > e;) N = O(N, r, h), p++;
226
+ const o = t.fromSerialDate(n, !0), s = t.fromSerialDate(e, !0), i = o.getFullYear(), u = o.getMonth(), l = o.getDate(), f = s.getFullYear(), c = s.getMonth(), m = s.getDate(), h = g(i, u, l) || 1 !== u && l > 28 && l < D(i, u) && g(f, c, m), M = F(e, 0, h);
227
+ let p = (a ? 1 : 0) + (e < M ? 1 : 0), N = F(M, r, h);
228
+ for (; r > 0 ? N < e : N > e;) N = F(N, r, h), p++;
229
229
  return p;
230
230
  }(a, n, 12 / u, !0);
231
231
  let h;
232
- h = 2 === l || 3 === l ? S(n, A(n, a, u), l) : f - S(x(n, a, u), n, l);
233
- const M = i / u, p = 100 * o / u;
234
- let N = s / (1 + M) ** (c + m + h / f);
235
- const g = B(r, a, u);
236
- let y = a, E = 0, v = 0;
237
- for (let e = g; e >= 1; e--) {
238
- const a = t.fromSerialDate(y, !0), o = t.toSerialDate(b(a, -12 / u), !0), i = 1 === l ? S(o, y, l) : f;
239
- E += (e > 1 ? i : S(r, y, l)) / i;
240
- const s = Math.max(r, o), c = Math.min(n, y);
241
- v += (s < c ? S(s, c, l) : 0) / i, y = o;
232
+ h = 2 === l || 3 === l ? S(n, A(n, a, u), l) : f - S(T(n, a, u), n, l);
233
+ const M = s / u, p = 100 * o / u;
234
+ let N = i / (1 + M) ** (c + m + h / f);
235
+ const d = B(r, a, u);
236
+ let b = a, v = 0, E = 0;
237
+ for (let e = d; e >= 1; e--) {
238
+ const a = t.fromSerialDate(b, !0), o = t.toSerialDate(y(a, -12 / u), !0), s = 1 === l ? S(o, b, l) : f;
239
+ v += (e > 1 ? s : S(r, b, l)) / s;
240
+ const i = Math.max(r, o), c = Math.min(n, b);
241
+ E += (i < c ? S(i, c, l) : 0) / s, b = o;
242
242
  }
243
- N += p * E / (1 + M) ** (m + h / f);
243
+ N += p * v / (1 + M) ** (m + h / f);
244
244
  for (let t = 1; t <= c; t++) N += p / (1 + M) ** (t + m + h / f);
245
- return N -= p * v, N;
246
- }(n, e, r, a, o, i, s, u, l, c);
247
- }
248
- function F(t, n, e, r, a, o, i) {
249
- const s = B(t, n, o), u = V(t, n, o, i), l = w(t, n, o, i), f = u - l, c = 100 * e / o, m = r / o;
250
- if (1 === s) return (c + a) / (m * f / u + 1) - c * l / u;
251
- let h = a / (1 + m) ** (s - 1 + f / u);
252
- for (let t = 1; t <= s; t++) h += c / (1 + m) ** (t - 1 + f / u);
245
+ return N -= p * E, N;
246
+ }(n, e, r, a, o, s, i, u, l, c);
247
+ }
248
+ function P(t, n, e, r, a, o, s) {
249
+ const i = B(t, n, o), u = V(t, n, o, s), l = w(t, n, o, s), f = u - l, c = 100 * e / o, m = r / o;
250
+ if (1 === i) return (c + a) / (m * f / u + 1) - c * l / u;
251
+ let h = a / (1 + m) ** (i - 1 + f / u);
252
+ for (let t = 1; t <= i; t++) h += c / (1 + m) ** (t - 1 + f / u);
253
253
  return h -= c * l / u, h;
254
254
  }
255
- function Y(t, n, e, r, a, o) {
256
- const i = w(t, n, a, o), s = V(t, n, a, o), u = B(t, n, a), l = (s - i) / s - 1, f = 1 + r / a, c = 100 * e / a;
255
+ function L(t, n, e, r, a, o) {
256
+ const s = w(t, n, a, o), i = V(t, n, a, o), u = B(t, n, a), l = (i - s) / i - 1, f = 1 + r / a, c = 100 * e / a;
257
257
  let m = 0, h = 0;
258
258
  for (let t = 1; t <= u; t++) {
259
259
  const n = t + l, e = c / f ** n;
@@ -262,29 +262,29 @@ function Y(t, n, e, r, a, o) {
262
262
  const M = u + l, p = 100 / f ** M;
263
263
  return m += M * p, h += p, m / h / a;
264
264
  }
265
- function L(t, n, e, r, a) {
266
- const o = Math.min(a / e, 1), i = 1 === o && 1 !== r ? 0 : t * (1 - o) ** (r - 1), s = t * (1 - o) ** r, u = s < n ? i - n : i - s;
265
+ function Y(t, n, e, r, a) {
266
+ const o = Math.min(a / e, 1), s = 1 === o && 1 !== r ? 0 : t * (1 - o) ** (r - 1), i = t * (1 - o) ** r, u = i < n ? s - n : s - i;
267
267
  return Math.max(u, 0);
268
268
  }
269
269
  function U(t, n, e) {
270
- return x(t, n, e) >= 0;
270
+ return T(t, n, e) >= 0;
271
271
  }
272
272
  function k(t) {
273
273
  return !(t < 1 || t > 4 || 3 === t);
274
274
  }
275
275
  var q = o({ ACCRINT: () => X });
276
- function X(e, r, a, o, i, s, u = 0, l = !0) {
277
- if (e = Math.trunc(e), r = Math.trunc(r), a = Math.trunc(a), s = Math.trunc(s), u = Math.trunc(u), !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a)) return n.BuiltIn.Value;
278
- if (!k(s) || !E(u) || o <= 0 || i <= 0 || e >= a) return NaN;
276
+ function X(e, r, a, o, s, i, u = 0, l = !0) {
277
+ if (e = Math.trunc(e), r = Math.trunc(r), a = Math.trunc(a), i = Math.trunc(i), u = Math.trunc(u), !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a)) return n.BuiltIn.Value;
278
+ if (!k(i) || !v(u) || o <= 0 || s <= 0 || e >= a) return NaN;
279
279
  const f = function(t, n, e, r, a, o = !0) {
280
- const i = Math.ceil(r * (Math.abs(n - t) + Math.abs(n - e)) / 365) + 6;
281
- let s = 0;
282
- for (let e = 1; e <= i; e++) if (j(n, r, -e) <= t) {
283
- s = e;
280
+ const s = Math.ceil(r * (Math.abs(n - t) + Math.abs(n - e)) / 365) + 6;
281
+ let i = 0;
282
+ for (let e = 1; e <= s; e++) if (j(n, r, -e) <= t) {
283
+ i = e;
284
284
  break;
285
285
  }
286
286
  const u = [];
287
- for (let t = -s; u.length <= 600; t++) {
287
+ for (let t = -i; u.length <= 600; t++) {
288
288
  const a = j(n, r, t);
289
289
  if (u.push(a), a >= e) break;
290
290
  }
@@ -294,22 +294,22 @@ function X(e, r, a, o, i, s, u = 0, l = !0) {
294
294
  t > 0 && (l = n - u[t - 1]);
295
295
  }
296
296
  let f = 0;
297
- for (let i = 0; i + 1 < u.length; i++) {
298
- const s = u[i], c = u[i + 1];
297
+ for (let s = 0; s + 1 < u.length; s++) {
298
+ const i = u[s], c = u[s + 1];
299
299
  if (c <= t) continue;
300
- if (s >= e) break;
301
- const m = Math.max(s, t), h = Math.min(c, e);
302
- if (m === s && h === c && (0 === a || 4 === a || o)) {
300
+ if (i >= e) break;
301
+ const m = Math.max(i, t), h = Math.min(c, e);
302
+ if (m === i && h === c && (0 === a || 4 === a || o)) {
303
303
  f += 1;
304
304
  continue;
305
305
  }
306
306
  let M, p;
307
307
  switch (a) {
308
308
  case 0:
309
- M = m - s === 1 && c < n ? h - m : I(m, h, 0).days, p = 360 / r;
309
+ M = m - i === 1 && c < n ? h - m : I(m, h, 0).days, p = 360 / r;
310
310
  break;
311
311
  case 1:
312
- M = h - m, p = null !== l ? l : c - s;
312
+ M = h - m, p = null !== l ? l : c - i;
313
313
  break;
314
314
  case 2:
315
315
  M = h - m, p = 360 / r;
@@ -323,36 +323,36 @@ function X(e, r, a, o, i, s, u = 0, l = !0) {
323
323
  p > 0 && (f += M / p);
324
324
  }
325
325
  return f;
326
- }(e, r, a, s, u, l);
327
- return i * (o / s) * f;
326
+ }(e, r, a, i, u, l);
327
+ return s * (o / i) * f;
328
328
  }
329
329
  function j(n, e, r) {
330
330
  const a = Math.round(r * (12 / e)), o = t.fromSerialDate(n, !0);
331
- return b(o, a), t.toSerialDate(o, !0);
331
+ return y(o, a), t.toSerialDate(o, !0);
332
332
  }
333
333
  var _ = o({ AMORDEGRC: () => G });
334
- function G(n, e, r, a, o, i, s = 0) {
335
- if (s = Math.floor(s), !t.isValidDate(e) || !t.isValidDate(r) || n <= 0 || a < 0 || n < a || o < 0 || i <= 0 || 0 !== s && 1 !== s && 3 !== s || Math.floor(e) > Math.floor(r)) return NaN;
336
- const u = 1 / i, l = i * ((f = u) < 5 ? 1.5 : f <= 6 ? 2 : 2.5);
334
+ function G(n, e, r, a, o, s, i = 0) {
335
+ if (i = Math.floor(i), !t.isValidDate(e) || !t.isValidDate(r) || n <= 0 || a < 0 || n < a || o < 0 || s <= 0 || 0 !== i && 1 !== i && 3 !== i || Math.floor(e) > Math.floor(r)) return NaN;
336
+ const u = 1 / s, l = s * ((f = u) < 5 ? 1.5 : f <= 6 ? 2 : 2.5);
337
337
  var f;
338
- const { days: c, yearDays: m } = I(e, r, s), h = c / m;
339
- return function(t, n, e, r, a, o, i) {
340
- const s = Math.ceil(r), u = Math.floor(t * e * o);
341
- if (0 === i) return u;
338
+ const { days: c, yearDays: m } = I(e, r, i), h = c / m;
339
+ return function(t, n, e, r, a, o, s) {
340
+ const i = Math.ceil(r), u = Math.floor(t * e * o);
341
+ if (0 === s) return u;
342
342
  const l = t - Math.floor(t * e * a);
343
343
  if (r < 3) {
344
- const t = s - 1;
345
- return t <= 0 ? l > n ? l : 0 : i <= t ? Math.ceil(l / t) : 0;
344
+ const t = i - 1;
345
+ return t <= 0 ? l > n ? l : 0 : s <= t ? Math.ceil(l / t) : 0;
346
346
  }
347
347
  let f = l;
348
- for (let t = 1; t <= i; t++) {
348
+ for (let t = 1; t <= s; t++) {
349
349
  if (f <= n) return 0;
350
- const r = f * e, a = s - t, o = a > 0 ? f / a : 0, u = Math.floor(Math.max(r, o));
351
- if (t === i) return u;
350
+ const r = f * e, a = i - t, o = a > 0 ? f / a : 0, u = Math.floor(Math.max(r, o));
351
+ if (t === s) return u;
352
352
  f -= u;
353
353
  }
354
354
  return 0;
355
- }(n, a, l, u, h, 1 === s && u >= 3 ? c / 365 : h, o > 1 ? Math.floor(o) : Math.ceil(o));
355
+ }(n, a, l, u, h, 1 === i && u >= 3 ? c / 365 : h, o > 1 ? Math.floor(o) : Math.ceil(o));
356
356
  }
357
357
  function z(n) {
358
358
  if (null === n) return 0;
@@ -363,53 +363,55 @@ function z(n) {
363
363
  }
364
364
  return t.parseAsSerialDate(n);
365
365
  }
366
- var H = o({
367
- DATEDIF: () => K,
368
- DAYS360: () => W,
369
- YEARFRAC: () => Q
366
+ function H(n) {
367
+ return null === n ? 0 : t.parseAsNumber(n);
368
+ }
369
+ var K = o({
370
+ DATEDIF: () => Q,
371
+ DAYS360: () => $,
372
+ YEARFRAC: () => W
370
373
  });
371
- function K(n, e, r) {
372
- const a = t.getDateParts(n), o = t.getDateParts(e), i = Math.trunc(n), s = Math.trunc(e);
374
+ function Q(n, e, r) {
375
+ const a = t.getDateParts(n), o = t.getDateParts(e), s = Math.trunc(n), i = Math.trunc(e);
373
376
  if (r = r.toLowerCase(), n > e) return NaN;
374
377
  const u = o.year - a.year, l = o.month - a.month, f = o.day - a.day;
375
378
  let c;
376
379
  switch (r) {
377
380
  case "y": return c = l < 0 || 0 === l && f < 0 ? -1 : 0, c + u;
378
381
  case "m": return c = f < 0 ? -1 : 0, 12 * u + l + c;
379
- case "d": return s - i;
380
- case "md": return s - t.getSerialDate(o.year, o.month + (f < 0 ? -1 : 0), a.day);
382
+ case "d": return i - s;
383
+ case "md": return i - t.getSerialDate(o.year, o.month + (f < 0 ? -1 : 0), a.day);
381
384
  case "ym": return c = f < 0 ? -1 : 0, (c + 12 * u + l) % 12;
382
- case "yd": return s - t.getSerialDate(o.year - (l < 0 || 0 === l && f < 0 ? 1 : 0), a.month, a.day);
385
+ case "yd": return i - t.getSerialDate(o.year - (l < 0 || 0 === l && f < 0 ? 1 : 0), a.month, a.day);
383
386
  }
384
387
  return NaN;
385
388
  }
386
- function Q(n, e, r = 0) {
389
+ function W(n, e, r = 0) {
387
390
  let a = z(n), o = z(e);
388
- const i = null === (s = r) ? 0 : t.parseAsNumber(s);
389
- var s;
390
- if (!t.isValidDate(a) || !t.isValidDate(o) || !E(i)) return NaN;
391
+ const s = H(r);
392
+ if (!t.isValidDate(a) || !t.isValidDate(o) || !v(s)) return NaN;
391
393
  if (a > o) {
392
394
  const t = a;
393
395
  a = o, o = t;
394
396
  }
395
- const { days: u, yearDays: l } = I(a, o, i);
396
- return u / l;
397
+ const { days: i, yearDays: u } = I(a, o, s);
398
+ return i / u;
397
399
  }
398
- function W(t, n, e = !1) {
400
+ function $(t, n, e = !1) {
399
401
  return e ? (n >= t ? 1 : -1) * I(t, n, 4).days : function(t, n) {
400
- const e = v(t), r = v(n), a = e.year, o = e.month;
401
- let i = e.day, s = r.year, u = r.month, l = r.day;
402
- if (2 === o ? 3 === v(t + 1).month && (i = 30) : 31 === i && (i = 30), 31 === l) if (i < 30) {
403
- const t = v(n + 1);
404
- s = t.year, u = t.month, l = t.day;
402
+ const e = E(t), r = E(n), a = e.year, o = e.month;
403
+ let s = e.day, i = r.year, u = r.month, l = r.day;
404
+ if (2 === o ? 3 === E(t + 1).month && (s = 30) : 31 === s && (s = 30), 31 === l) if (s < 30) {
405
+ const t = E(n + 1);
406
+ i = t.year, u = t.month, l = t.day;
405
407
  } else l = 30;
406
- return R(a, o, i, s, u, l);
408
+ return R(a, o, s, i, u, l);
407
409
  }(t, n);
408
410
  }
409
- var $ = (t) => {
411
+ var Z = (t) => {
410
412
  const n = t.getLocaleProfile().currencySymbol;
411
413
  return `${n}#,##0.00_);[Red](${n}#,##0.00)`;
412
- }, Z = (t, e) => {
414
+ }, J = (t, e) => {
413
415
  if (0 === t) {
414
416
  if (e < 0) throw n.BuiltIn.Div0;
415
417
  if (0 === e) return NaN;
@@ -418,43 +420,43 @@ var $ = (t) => {
418
420
  let r = Math.abs(e), a = 1, o = t;
419
421
  for (; r > 0;) r % 2 == 1 && (a *= o), o *= o, r = Math.floor(r / 2);
420
422
  return e < 0 ? 1 / a : a;
421
- }, J = o({
422
- COUPDAYS: () => tt,
423
- CUMIPMT: () => nt,
424
- CUMPRINC: () => rt,
425
- DB: () => at,
426
- DDB: () => ot,
427
- DISC: () => it,
428
- DOLLARDE: () => st,
429
- DOLLARFR: () => ut,
430
- EFFECT: () => lt,
431
- FV: () => ft,
432
- FVSCHEDULE: () => ct,
433
- IPMT: () => mt,
434
- IRR: () => ht,
435
- ISPMT: () => Mt,
436
- MIRR: () => pt,
437
- NOMINAL: () => Nt,
438
- NPER: () => Dt,
439
- NPV: () => dt,
440
- PDURATION: () => gt,
441
- PMT: () => yt,
442
- PPMT: () => bt,
443
- PRICEDISC: () => Et,
444
- PV: () => vt,
445
- RATE: () => Rt,
446
- RRI: () => St,
447
- SLN: () => Ct,
448
- STOCKHISTORY: () => Tt,
449
- SYD: () => xt,
450
- TBILLEQ: () => At,
451
- TBILLPRICE: () => wt,
452
- TBILLYIELD: () => Vt,
453
- XIRR: () => Bt,
454
- XNPV: () => Ot
423
+ }, tt = o({
424
+ COUPDAYS: () => nt,
425
+ CUMIPMT: () => et,
426
+ CUMPRINC: () => st,
427
+ DB: () => it,
428
+ DDB: () => ut,
429
+ DISC: () => lt,
430
+ DOLLARDE: () => ft,
431
+ DOLLARFR: () => ct,
432
+ EFFECT: () => mt,
433
+ FV: () => ht,
434
+ FVSCHEDULE: () => Mt,
435
+ IPMT: () => pt,
436
+ IRR: () => Nt,
437
+ ISPMT: () => Dt,
438
+ MIRR: () => gt,
439
+ NOMINAL: () => dt,
440
+ NPER: () => bt,
441
+ NPV: () => yt,
442
+ PDURATION: () => vt,
443
+ PMT: () => Et,
444
+ PPMT: () => Rt,
445
+ PRICEDISC: () => It,
446
+ PV: () => St,
447
+ RATE: () => Ct,
448
+ RRI: () => Tt,
449
+ SLN: () => At,
450
+ STOCKHISTORY: () => wt,
451
+ SYD: () => Vt,
452
+ TBILLEQ: () => Bt,
453
+ TBILLPRICE: () => Ft,
454
+ TBILLYIELD: () => Ot,
455
+ XIRR: () => Pt,
456
+ XNPV: () => Lt
455
457
  });
456
- function tt(n, e, r, a = 0) {
457
- if (!t.isValidDate(n) || !t.isValidDate(e) || !k(r) || !E(a) || n >= e) return NaN;
458
+ function nt(n, e, r, a = 0) {
459
+ if (!t.isValidDate(n) || !t.isValidDate(e) || !k(r) || !v(a) || n >= e) return NaN;
458
460
  if (1 === a) {
459
461
  const a = function(t, n, e) {
460
462
  const r = new Date(n);
@@ -465,7 +467,7 @@ function tt(n, e, r, a = 0) {
465
467
  }
466
468
  return r;
467
469
  }(t.fromSerialDate(n), t.fromSerialDate(e), r), o = new Date(a);
468
- return o.setMonth(o.getMonth() + Math.round(12 / r)), K(t.toSerialDate(a), t.toSerialDate(o), "D");
470
+ return o.setMonth(o.getMonth() + Math.round(12 / r)), Q(t.toSerialDate(a), t.toSerialDate(o), "D");
469
471
  }
470
472
  let o;
471
473
  switch (a) {
@@ -481,19 +483,29 @@ function tt(n, e, r, a = 0) {
481
483
  }
482
484
  return o / r;
483
485
  }
484
- function nt(t, n, e, r, a, o) {
485
- const i = et(t, n, e, r, a, o);
486
- if (!i) return NaN;
487
- const s = i.count * i.payment - i.principal;
488
- return Number.isFinite(s) ? s : NaN;
489
- }
490
- var et = (t, n, e, r, a, o) => {
486
+ function et(t, n, e, r, a, o) {
487
+ const s = ot(...at(t, n, e, r, a, o));
488
+ if (!s) return NaN;
489
+ const i = s.count * s.payment - s.principal;
490
+ return Number.isFinite(i) ? i : NaN;
491
+ }
492
+ var rt = (t) => {
493
+ if (void 0 === t) throw n.BuiltIn.NA;
494
+ return H(t);
495
+ }, at = (t, n, e, r, a, o) => [
496
+ rt(t),
497
+ rt(n),
498
+ rt(e),
499
+ rt(r),
500
+ rt(a),
501
+ rt(o)
502
+ ], ot = (t, n, e, r, a, o) => {
491
503
  if (t <= 0 || n <= 0 || e <= 0 || r < 1 || r > a || a > n || 0 !== o && 1 !== o) return null;
492
- const i = yt(t, n, e, 0, o);
493
- if (!Number.isFinite(i)) return null;
494
- const s = Math.ceil(r), u = Math.floor(a), l = u - s + 1;
504
+ const s = Et(t, n, e, 0, o);
505
+ if (!Number.isFinite(s)) return null;
506
+ const i = Math.ceil(r), u = Math.floor(a), l = u - i + 1;
495
507
  if (l <= 0) return {
496
- payment: i,
508
+ payment: s,
497
509
  principal: 0,
498
510
  count: 0
499
511
  };
@@ -502,104 +514,109 @@ var et = (t, n, e, r, a, o) => {
502
514
  return Number.isFinite(a) ? a : -e * (Math.exp((r - n) * f) - Math.exp((t - n - 1) * f)) / c;
503
515
  };
504
516
  if (!o) return {
505
- payment: i,
506
- principal: m(s, u),
517
+ payment: s,
518
+ principal: m(i, u),
507
519
  count: l
508
520
  };
509
- let h = s <= 1 ? i : 0;
510
- const M = Math.max(s, 2);
521
+ let h = i <= 1 ? s : 0;
522
+ const M = Math.max(i, 2);
511
523
  return M <= u && (h += m(M, u) / (1 + t)), {
512
- payment: i,
524
+ payment: s,
513
525
  principal: h,
514
526
  count: l
515
527
  };
516
528
  };
517
- function rt(t, n, e, r, a, o) {
518
- const i = et(t, n, e, r, a, o);
519
- return i ? i.principal : NaN;
529
+ function st(t, n, e, r, a, o) {
530
+ const s = ot(...at(t, n, e, r, a, o));
531
+ return s ? s.principal : NaN;
520
532
  }
521
- function at(n, e, r, a, o = 12) {
533
+ function it(n, e, r, a, o = 12) {
522
534
  if (n < 0 || e < 0 || r <= 0 || a < 0) return NaN;
523
535
  if (o < 1 || o > 12) return NaN;
524
536
  if (12 === o && a > r || a > r + 1) return NaN;
525
537
  if (0 === n) return 0;
526
- t.formatResults($(t.getRuntime()));
527
- const i = Math.round(1e3 * (1 - Math.pow(e / n, 1 / r))) / 1e3, s = n * i * o / 12;
528
- if (1 === a) return s;
529
- let u = n - s;
530
- for (let t = 2; t < a; t++) u -= u * i;
531
- return a === r + 1 ? u * i * (12 - o) / 12 : u * i;
532
- }
533
- function ot(t, n, e, r, a = 2) {
538
+ t.formatResults(Z(t.getRuntime()));
539
+ const s = Math.round(1e3 * (1 - Math.pow(e / n, 1 / r))) / 1e3, i = n * s * o / 12;
540
+ if (1 === a) return i;
541
+ let u = n - i;
542
+ for (let t = 2; t < a; t++) u -= u * s;
543
+ return a === r + 1 ? u * s * (12 - o) / 12 : u * s;
544
+ }
545
+ function ut(t, n, e, r, a = 2) {
534
546
  if (t < 0 || n < 0 || e < 0 || r < 0 || a <= 0) return NaN;
535
547
  if (r > e) return NaN;
536
548
  if (n >= t) return 0;
537
- let o = 0, i = 0;
538
- for (let s = 1; s <= r; s++) i = Math.min(a / e * (t - o), t - n - o), o += i;
539
- return i;
549
+ let o = 0, s = 0;
550
+ for (let i = 1; i <= r; i++) s = Math.min(a / e * (t - o), t - n - o), o += s;
551
+ return s;
540
552
  }
541
- function it(n, e, r, a, o = 0) {
542
- if (!t.isValidDate(n) || !t.isValidDate(e) || !E(o) || r <= 0 || a <= 0 || n >= e) return NaN;
543
- let i, s;
553
+ function lt(n, e, r, a, o = 0) {
554
+ if (!t.isValidDate(n) || !t.isValidDate(e) || !v(o) || r <= 0 || a <= 0 || n >= e) return NaN;
555
+ let s, i;
544
556
  switch (o) {
545
557
  case 0:
546
- i = 360, s = W(n, e, !1);
558
+ s = 360, i = $(n, e, !1);
547
559
  break;
548
560
  case 1:
549
561
  case 3:
550
- i = 365, s = K(n, e, "D");
562
+ s = 365, i = Q(n, e, "D");
551
563
  break;
552
564
  case 2:
553
- i = 360, s = K(n, e, "D");
565
+ s = 360, i = Q(n, e, "D");
554
566
  break;
555
567
  case 4:
556
- i = 360, s = W(n, e, !0);
568
+ s = 360, i = $(n, e, !0);
557
569
  break;
558
570
  default: return NaN;
559
571
  }
560
- return (a - r) / a * i / s;
572
+ return (a - r) / a * s / i;
561
573
  }
562
- function st(t, e) {
574
+ function ft(t, e) {
563
575
  if ((e = Math.trunc(e)) < 0) return NaN;
564
576
  if (0 === e) throw n.BuiltIn.Div0;
565
577
  if (1 === e) return t;
566
- const r = t < 0 ? -1 : 1, a = Math.abs(t), o = Math.trunc(a), i = a - o;
567
- return r * (o + Math.round(i * Math.pow(10, Math.ceil(Math.log10(e)))) / e);
578
+ const r = t < 0 ? -1 : 1, a = Math.abs(t), o = Math.trunc(a), s = a - o;
579
+ return r * (o + Math.round(s * Math.pow(10, Math.ceil(Math.log10(e)))) / e);
568
580
  }
569
- function ut(t, e) {
581
+ function ct(t, e) {
570
582
  if ((e = Math.trunc(e)) < 0) return NaN;
571
583
  if (0 === e) throw n.BuiltIn.Div0;
572
584
  if (1 === e) return t;
573
- const r = t < 0 ? -1 : 1, a = Math.abs(t), o = Math.trunc(a), i = a - o, s = Math.ceil(Math.log10(e));
574
- return r * (o + i * e / Math.pow(10, s));
575
- }
576
- function lt(t, n) {
577
- if (n = Math.trunc(n), t <= 0 || n < 1) return NaN;
578
- const e = Z(1 + t / n, n) - 1;
579
- return Number.isFinite(e) ? e : NaN;
580
- }
581
- function ft(n, e, r, a = 0, o = 0) {
582
- if (t.formatResults($(t.getRuntime())), 0 === n) return -(a + r * e);
583
- const i = Z(1 + n, e);
584
- return -(a * i + (i - 1) / n * (1 + n * (o ? 1 : 0)) * r);
585
- }
586
- function ct(t, e) {
587
- let r = t;
588
- for (const t of e.values()) if (null != t) {
585
+ const r = t < 0 ? -1 : 1, a = Math.abs(t), o = Math.trunc(a), s = a - o, i = Math.ceil(Math.log10(e));
586
+ return r * (o + s * e / Math.pow(10, i));
587
+ }
588
+ function mt(t, n) {
589
+ const e = rt(t), r = Math.trunc(rt(n));
590
+ if (e <= 0 || r < 1) return NaN;
591
+ const a = J(1 + e / r, r) - 1;
592
+ return Number.isFinite(a) ? a : NaN;
593
+ }
594
+ function ht(n, e, r, a = 0, o = 0) {
595
+ if (t.formatResults(Z(t.getRuntime())), 0 === n) return -(a + r * e);
596
+ const s = J(1 + n, e);
597
+ return -(a * s + (s - 1) / n * (1 + n * (o ? 1 : 0)) * r);
598
+ }
599
+ function Mt(e, r) {
600
+ if (void 0 === e || void 0 === r) throw n.BuiltIn.NA;
601
+ let a = rt(e);
602
+ const o = t.getArgs().getRawAt(1), s = o, i = !0 === s?.isIRange, u = i && 1 === s.size && !0 === s.isIReferenceRange;
603
+ if (!i || u) a *= 1 + rt(i ? s.getValueAt(0, 0) ?? null : o);
604
+ else for (const t of r.values()) if (null != t) {
605
+ if (n.isError(t)) throw t;
589
606
  if ("number" != typeof t) throw n.BuiltIn.Value;
590
- r *= 1 + t;
607
+ a *= 1 + t;
591
608
  }
592
- return Number.isFinite(r) ? r : 0;
609
+ return Number.isFinite(a) ? a : 0;
593
610
  }
594
- function mt(n, e, r, a, o = 0, i = 0) {
611
+ function pt(n, e, r, a, o = 0, s = 0) {
595
612
  if (e < 1 || e - 1 >= r) return NaN;
596
- if (t.formatResults($(t.getRuntime())), 1 === e && i) return 0;
613
+ if (t.formatResults(Z(t.getRuntime())), 1 === e && s) return 0;
597
614
  if (0 === n) return 0;
598
615
  if (n <= -1) return NaN;
599
- const s = Math.log1p(n), u = e - 1, l = -n * (a * -Math.expm1((u - r) * s) - o * (u * s < 700 ? Math.exp(-r * s) * Math.expm1(u * s) : Math.exp((u - r) * s) - Math.exp(-r * s))) / -Math.expm1(-r * s);
600
- return i ? l / (1 + n) : l;
616
+ const i = Math.log1p(n), u = e - 1, l = -n * (a * -Math.expm1((u - r) * i) - o * (u * i < 700 ? Math.exp(-r * i) * Math.expm1(u * i) : Math.exp((u - r) * i) - Math.exp(-r * i))) / -Math.expm1(-r * i);
617
+ return s ? l / (1 + n) : l;
601
618
  }
602
- function ht(t, n = .1) {
619
+ function Nt(t, n = .1) {
603
620
  const e = t.some((t) => t > 0), r = t.some((t) => t < 0);
604
621
  if (!e || !r) return NaN;
605
622
  const a = (n) => {
@@ -610,115 +627,116 @@ function ht(t, n = .1) {
610
627
  };
611
628
  let o = n;
612
629
  for (let t = 0; t < 20; t++) {
613
- const t = a(o), n = o - t / ((a(o + Pt) - t) / Pt);
614
- if (Math.abs(n - o) < Pt) return n;
630
+ const t = a(o), n = o - t / ((a(o + Yt) - t) / Yt);
631
+ if (Math.abs(n - o) < Yt) return n;
615
632
  o = n, o <= -1 && (o = -.9999999);
616
633
  }
617
634
  return NaN;
618
635
  }
619
- function Mt(t, e, r, a) {
636
+ function Dt(t, e, r, a) {
620
637
  if (0 === r) throw n.BuiltIn.Div0;
621
638
  const o = a * (e - r) * t / r;
622
639
  return Number.isFinite(o) ? o : NaN;
623
640
  }
624
- function pt(e, r, a) {
641
+ function gt(e, r, a) {
625
642
  const o = e.length;
626
643
  if (!e.some((t) => t < 0)) throw n.BuiltIn.Div0;
627
- let i = 0;
644
+ let s = 0;
628
645
  for (let t = 0; t < o; t++) {
629
646
  const n = e[t];
630
- n < 0 && (i += n / Math.pow(1 + r, t));
647
+ n < 0 && (s += n / Math.pow(1 + r, t));
631
648
  }
632
- let s = 0;
649
+ let i = 0;
633
650
  for (let t = 0; t < o; t++) {
634
651
  const n = e[t];
635
- n > 0 && (s += n * Math.pow(1 + a, o - 1 - t));
652
+ n > 0 && (i += n * Math.pow(1 + a, o - 1 - t));
636
653
  }
637
- return t.formatResults("0%"), Math.pow(-s / i, 1 / (o - 1)) - 1;
654
+ return t.formatResults("0%"), Math.pow(-i / s, 1 / (o - 1)) - 1;
638
655
  }
639
- function Nt(t, n) {
640
- if (n = Math.trunc(n), t <= 0 || n < 1) return NaN;
641
- const e = (Z(t + 1, 1 / n) - 1) * n;
642
- return Number.isFinite(e) ? e : NaN;
656
+ function dt(t, n) {
657
+ const e = rt(t), r = Math.trunc(rt(n));
658
+ if (e <= 0 || r < 1) return NaN;
659
+ const a = (J(e + 1, 1 / r) - 1) * r;
660
+ return Number.isFinite(a) ? a : NaN;
643
661
  }
644
- function Dt(t, e, r, a = 0, o = 0) {
662
+ function bt(t, e, r, a = 0, o = 0) {
645
663
  if (0 === t) {
646
664
  if (0 === e) throw n.BuiltIn.Div0;
647
665
  return (-r - a) / e;
648
666
  }
649
667
  if (t <= -1) return NaN;
650
- const i = Math.log(1 + t);
651
- if (0 === i) throw n.BuiltIn.Div0;
652
- return o && (e *= 1 + t), Math.log((e - a * t) / (r * t + e)) / i;
668
+ const s = Math.log(1 + t);
669
+ if (0 === s) throw n.BuiltIn.Div0;
670
+ return o && (e *= 1 + t), Math.log((e - a * t) / (r * t + e)) / s;
653
671
  }
654
- function dt(t, e) {
672
+ function yt(t, e) {
655
673
  const r = [];
656
674
  for (const t of e) for (const n of t.values()) r.push(n);
657
675
  const a = r.length, o = 1 + t;
658
676
  if (0 === o) throw n.BuiltIn.Div0;
659
- if (!Number.isFinite(Z(o, a - 1))) throw n.BuiltIn.Div0;
660
- let i = 0;
661
- for (let t = a - 1; t >= 0; t--) i += r[t], i /= o;
662
- return i;
677
+ if (!Number.isFinite(J(o, a - 1))) throw n.BuiltIn.Div0;
678
+ let s = 0;
679
+ for (let t = a - 1; t >= 0; t--) s += r[t], s /= o;
680
+ return s;
663
681
  }
664
- function gt(t, e, r) {
682
+ function vt(t, e, r) {
665
683
  if (t <= 0 || e <= 0 || r <= 0) return NaN;
666
684
  const a = Math.log(1 + t);
667
685
  if (0 === a) throw n.BuiltIn.Div0;
668
686
  return (Math.log(r) - Math.log(e)) / a;
669
687
  }
670
- function yt(n, e, r, a = 0, o = 0) {
688
+ function Et(n, e, r, a = 0, o = 0) {
671
689
  if (0 === e) return NaN;
672
- if (t.formatResults($(t.getRuntime())), 0 === n) return (-r - a) / e;
690
+ if (t.formatResults(Z(t.getRuntime())), 0 === n) return (-r - a) / e;
673
691
  if (n <= -1) return NaN;
674
- const i = e * Math.log1p(n), s = (r / -Math.expm1(-i) + a / Math.expm1(i)) * n;
675
- return -(o ? s / (1 + n) : s);
692
+ const s = e * Math.log1p(n), i = (r / -Math.expm1(-s) + a / Math.expm1(s)) * n;
693
+ return -(o ? i / (1 + n) : i);
676
694
  }
677
- function bt(n, e, r, a, o = 0, i = 0) {
695
+ function Rt(n, e, r, a, o = 0, s = 0) {
678
696
  if (e < 1 || e - 1 >= r) return NaN;
679
- if (t.formatResults($(t.getRuntime())), 0 === n) return -(a + o) / r;
697
+ if (t.formatResults(Z(t.getRuntime())), 0 === n) return -(a + o) / r;
680
698
  if (n <= -1) return NaN;
681
- const s = Math.log1p(n), u = -Math.expm1(-r * s);
682
- if (i && 1 === e) return -n * (a + o * Math.exp(-r * s)) / (u * (1 + n));
683
- const l = i ? e - 2 : e - 1;
684
- return -(a + o) * (n * Math.exp((l - r) * s)) / u;
685
- }
686
- function Et(n, e, r, a, o = 0) {
687
- if (!t.isValidDate(n) || !t.isValidDate(e) || !E(o) || r <= 0 || a <= 0 || n >= e) return NaN;
688
- let i, s;
699
+ const i = Math.log1p(n), u = -Math.expm1(-r * i);
700
+ if (s && 1 === e) return -n * (a + o * Math.exp(-r * i)) / (u * (1 + n));
701
+ const l = s ? e - 2 : e - 1;
702
+ return -(a + o) * (n * Math.exp((l - r) * i)) / u;
703
+ }
704
+ function It(n, e, r, a, o = 0) {
705
+ if (!t.isValidDate(n) || !t.isValidDate(e) || !v(o) || r <= 0 || a <= 0 || n >= e) return NaN;
706
+ let s, i;
689
707
  switch (o) {
690
708
  case 0:
691
- i = 360, s = W(n, e, !1);
709
+ s = 360, i = $(n, e, !1);
692
710
  break;
693
711
  case 1:
694
712
  case 3:
695
- i = 365, s = K(n, e, "D");
713
+ s = 365, i = Q(n, e, "D");
696
714
  break;
697
715
  case 2:
698
- i = 360, s = K(n, e, "D");
716
+ s = 360, i = Q(n, e, "D");
699
717
  break;
700
718
  case 4:
701
- i = 360, s = W(n, e, !0);
719
+ s = 360, i = $(n, e, !0);
702
720
  break;
703
721
  default: return NaN;
704
722
  }
705
- return a - r * a * s / i;
723
+ return a - r * a * i / s;
706
724
  }
707
- function vt(e, r, a, o = 0, i = 0) {
708
- if (t.formatResults($(t.getRuntime())), 0 === e) return -(o + a * r);
709
- const s = Z(1 + e, r);
710
- if (0 === s) throw n.BuiltIn.Div0;
711
- return -(o + (s - 1) / e * (1 + e * (i ? 1 : 0)) * a) / s;
725
+ function St(e, r, a, o = 0, s = 0) {
726
+ if (t.formatResults(Z(t.getRuntime())), 0 === e) return -(o + a * r);
727
+ const i = J(1 + e, r);
728
+ if (0 === i) throw n.BuiltIn.Div0;
729
+ return -(o + (i - 1) / e * (1 + e * (s ? 1 : 0)) * a) / i;
712
730
  }
713
- function Rt(t, e, r, a = 0, o = 0, i = .1) {
714
- if (i <= -1) throw n.BuiltIn.Value;
715
- const s = o ? 1 : 0, u = (n) => {
731
+ function Ct(t, e, r, a = 0, o = 0, s = .1) {
732
+ if (s <= -1) throw n.BuiltIn.Value;
733
+ const i = o ? 1 : 0, u = (n) => {
716
734
  if (0 === n) return r + e * t + a;
717
- const o = Z(1 + n, t);
718
- return r * o + (o - 1) / n * (1 + n * s) * e + a;
735
+ const o = J(1 + n, t);
736
+ return r * o + (o - 1) / n * (1 + n * i) * e + a;
719
737
  };
720
- let l = i, f = u(l), c = f > 0 ? i - .001 : i + .001, m = u(c);
721
- for (let t = 0; t < It; t++) {
738
+ let l = s, f = u(l), c = f > 0 ? s - .001 : s + .001, m = u(c);
739
+ for (let t = 0; t < xt; t++) {
722
740
  const t = c - m * (c - l) / (m - f);
723
741
  if (!Number.isFinite(t)) return NaN;
724
742
  const n = u(t);
@@ -728,18 +746,18 @@ function Rt(t, e, r, a = 0, o = 0, i = .1) {
728
746
  }
729
747
  return NaN;
730
748
  }
731
- var It = 200;
732
- function St(t, n, e) {
749
+ var xt = 200;
750
+ function Tt(t, n, e) {
733
751
  if (t <= 0 || e < 0 && n > 0 || e > 0 && n < 0) return NaN;
734
752
  if (0 === n) return 0 === e ? 0 : NaN;
735
- const r = Z(e / n, 1 / t) - 1;
753
+ const r = J(e / n, 1 / t) - 1;
736
754
  return Number.isFinite(r) ? r : NaN;
737
755
  }
738
- function Ct(t, e, r) {
756
+ function At(t, e, r) {
739
757
  if (0 === r) throw n.BuiltIn.Div0;
740
758
  return (t - e) / r;
741
759
  }
742
- function Tt(e, r, a, o = 0, i = 1, s = [
760
+ function wt(e, r, a, o = 0, s = 1, i = [
743
761
  0,
744
762
  1,
745
763
  2,
@@ -749,194 +767,176 @@ function Tt(e, r, a, o = 0, i = 1, s = [
749
767
  const u = a ?? r;
750
768
  if (!t.isValidDate(r) || !t.isValidDate(u)) throw n.BuiltIn.Num;
751
769
  }
752
- function xt(t, n, e, r) {
770
+ function Vt(t, n, e, r) {
753
771
  return r > e ? NaN : (t - n) * (e - r + 1) * 2 / (e * (e + 1));
754
772
  }
755
- function At(n, e, r) {
756
- if (n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || y(n, e)) return NaN;
773
+ function Bt(n, e, r) {
774
+ if (n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || b(n, e)) return NaN;
757
775
  const a = 360 - r * (e - n);
758
776
  return 0 === a ? 0 : a < 0 ? NaN : 365 * r / a;
759
777
  }
760
- function wt(n, e, r) {
761
- if (n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || y(n, e)) return NaN;
778
+ function Ft(n, e, r) {
779
+ if (n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || b(n, e)) return NaN;
762
780
  const a = 360 - r * (e - n);
763
781
  return 0 === a ? 0 : a < 0 ? NaN : 100 * (1 - r * (e - n) / 360);
764
782
  }
765
- function Vt(n, e, r) {
766
- return n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || y(n, e) ? NaN : 360 * (100 - r) / (r * (e - n));
783
+ function Ot(n, e, r) {
784
+ return n = Math.round(n), e = Math.round(e), !t.isValidDate(n) || !t.isValidDate(e) || n >= e || b(n, e) ? NaN : 360 * (100 - r) / (r * (e - n));
767
785
  }
768
- function Bt(t, e, r = .1) {
769
- const a = t.flatten({
770
- includeEmpty: !0,
771
- onError: "value"
772
- }), o = e.flatten({
773
- includeEmpty: !0,
774
- onError: "value"
775
- });
776
- if (a.length !== o.length) return NaN;
777
- const i = [], s = [];
778
- for (let t = 0; t < a.length; t++) {
779
- const e = a[t], r = o[t];
780
- if (null !== e) {
781
- if (null === r) return NaN;
782
- if (n.isError(e) || n.isError(r)) return n.BuiltIn.Value;
783
- if ("number" != typeof r || isNaN(r)) return n.BuiltIn.Value;
784
- i.push(e), s.push(r);
785
- }
786
+ function Pt(t, e, r = .1) {
787
+ const a = t.flatten({ onError: "value" }), o = e.flatten({ onError: "value" });
788
+ if (a.getRowCount() !== o.getRowCount()) return NaN;
789
+ const s = [], i = [];
790
+ for (const [[t, e]] of a.alignValues([o])) if (null !== t) {
791
+ if (null === e) return NaN;
792
+ if (n.isError(t) || n.isError(e)) return n.BuiltIn.Value;
793
+ if ("number" != typeof e || isNaN(e)) return n.BuiltIn.Value;
794
+ s.push(t), i.push(e);
786
795
  }
787
- const u = i.some((t) => t > 0), l = i.some((t) => t < 0);
796
+ const u = s.some((t) => t > 0), l = s.some((t) => t < 0);
788
797
  if (!u || !l) return NaN;
789
- const f = s[0], c = s.map((t) => g(t, f) / 365), m = (t) => {
798
+ const f = i[0], c = i.map((t) => d(t, f) / 365), m = (t) => {
790
799
  const n = 1 + t;
791
800
  let e = 0;
792
- for (let t = 0; t < i.length; t++) e += i[t] / Math.pow(n, c[t]);
801
+ for (let t = 0; t < s.length; t++) e += s[t] / Math.pow(n, c[t]);
793
802
  return e;
794
803
  };
795
804
  let h = r;
796
805
  for (let t = 0; t < 20; t++) {
797
- const t = m(h), n = (m(h + Pt) - t) / Pt;
798
- if (Math.abs(n) < Pt) break;
806
+ const t = m(h), n = (m(h + Yt) - t) / Yt;
807
+ if (Math.abs(n) < Yt) break;
799
808
  const e = h - t / n;
800
- if (Math.abs(e - h) < Pt) return e;
809
+ if (Math.abs(e - h) < Yt) return e;
801
810
  h = e, h <= -1 && (h = -.9999999);
802
811
  }
803
812
  return NaN;
804
813
  }
805
- function Ot(t, e, r) {
814
+ function Lt(t, e, r) {
806
815
  if (t <= 0) return NaN;
807
- const a = e.flatten({
808
- includeEmpty: !0,
809
- onError: "value"
810
- }), o = r.flatten({
811
- includeEmpty: !0,
812
- onError: "value"
813
- });
814
- if (a.length !== o.length) return NaN;
815
- if (0 === a.length) return NaN;
816
- const i = [], s = [];
817
- for (let t = 0; t < a.length; t++) {
818
- const e = a[t], r = o[t];
819
- if (null !== e || null !== r) {
820
- if (null === e || null === r) return NaN;
821
- if (n.isError(e) || n.isError(r)) return n.BuiltIn.Value;
822
- if ("number" != typeof e) return NaN;
823
- if ("number" != typeof r) return n.BuiltIn.Value;
824
- i.push(e), s.push(r);
825
- }
826
- }
827
- for (let t = 1; t < s.length; t++) if (s[t] < s[t - 1]) return NaN;
816
+ const a = e.flatten({ onError: "value" }), o = r.flatten({ onError: "value" });
817
+ if (a.getRowCount() !== o.getRowCount()) return NaN;
818
+ if (0 === a.getRowCount()) return NaN;
819
+ const s = [], i = [];
820
+ for (const [[t, e]] of a.alignValues([o])) {
821
+ if (null === t || null === e) return NaN;
822
+ if (n.isError(t) || n.isError(e)) return n.BuiltIn.Value;
823
+ if ("number" != typeof t) return NaN;
824
+ if ("number" != typeof e) return n.BuiltIn.Value;
825
+ s.push(t), i.push(e);
826
+ }
827
+ for (let t = 1; t < i.length; t++) if (i[t] < i[t - 1]) return NaN;
828
828
  let u = 0;
829
- const l = s[0];
830
- for (let n = 0; n < i.length; n++) u += i[n] / Math.pow(1 + t, g(s[n], l) / 365);
829
+ const l = i[0];
830
+ for (let n = 0; n < s.length; n++) u += s[n] / Math.pow(1 + t, d(i[n], l) / 365);
831
831
  return u;
832
832
  }
833
- var Pt = 1e-7;
834
- var Ft = o({
835
- ACCRINTM: () => Yt,
836
- AMORLINC: () => jt,
837
- INTRATE: () => Lt,
838
- PRICEMAT: () => qt,
839
- RECEIVED: () => Ut,
840
- YIELDDISC: () => kt,
841
- YIELDMAT: () => Xt
833
+ var Yt = 1e-7;
834
+ var Ut = o({
835
+ ACCRINTM: () => kt,
836
+ AMORLINC: () => zt,
837
+ INTRATE: () => qt,
838
+ PRICEMAT: () => _t,
839
+ RECEIVED: () => Xt,
840
+ YIELDDISC: () => jt,
841
+ YIELDMAT: () => Gt
842
842
  });
843
- function Yt(n, e, r, a, o = 0) {
844
- if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || !E(o) || r <= 0 || a <= 0) return NaN;
843
+ function kt(n, e, r, a, o = 0) {
844
+ if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || !v(o) || r <= 0 || a <= 0) return NaN;
845
845
  if (Math.floor(n) > Math.floor(e)) return NaN;
846
846
  if (Math.floor(n) === Math.floor(e)) return 0;
847
- const { days: i, yearDays: s } = I(n, e, o);
848
- return a * r * i / s;
847
+ const { days: s, yearDays: i } = I(n, e, o);
848
+ return a * r * s / i;
849
849
  }
850
- function Lt(n, e, r, a, o = 0) {
851
- if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || !E(o) || r <= 0 || a <= 0 || Math.floor(n) >= Math.floor(e)) return NaN;
852
- const { days: i, yearDays: s } = I(n, e, o);
853
- return (a - r) / r * (s / i);
850
+ function qt(n, e, r, a, o = 0) {
851
+ if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || !v(o) || r <= 0 || a <= 0 || Math.floor(n) >= Math.floor(e)) return NaN;
852
+ const { days: s, yearDays: i } = I(n, e, o);
853
+ return (a - r) / r * (i / s);
854
854
  }
855
- function Ut(n, e, r, a, o = 0) {
856
- if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || r <= 0 || a <= 0 || !E(o) || Math.floor(n) >= Math.floor(e)) return NaN;
857
- const { days: i, yearDays: s } = I(n, e, o), u = r / (1 - a * i / s);
855
+ function Xt(n, e, r, a, o = 0) {
856
+ if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || r <= 0 || a <= 0 || !v(o) || Math.floor(n) >= Math.floor(e)) return NaN;
857
+ const { days: s, yearDays: i } = I(n, e, o), u = r / (1 - a * s / i);
858
858
  return u < 0 ? NaN : u;
859
859
  }
860
- function kt(n, e, r, a, o = 0) {
861
- if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || r <= 0 || a <= 0 || !E(o) || Math.floor(n) >= Math.floor(e)) return NaN;
862
- const { days: i, yearDays: s } = I(n, e, o);
863
- return (a / r - 1) / (i / s);
864
- }
865
- function qt(n, e, r, a, o, i = 0) {
866
- if (i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o < 0 || !E(i) || !_t(r, n, e)) return NaN;
867
- const { yearDays: s } = I(r, n, i), { days: u } = I(n, e, i), { days: l } = I(r, e, i), { days: f } = I(r, n, i);
868
- return (100 + l / s * a * 100) / (1 + u / s * o) - f / s * a * 100;
869
- }
870
- function Xt(n, e, r, a, o, i = 0) {
871
- if (i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o <= 0 || !E(i) || !_t(r, n, e)) return NaN;
872
- const { yearDays: s } = I(r, n, i), { days: u } = I(n, e, i), { days: l } = I(r, e, i), { days: f } = I(r, n, i);
873
- return ((1 + l / s * a) / (o / 100 + f / s * a) - 1) / (u / s);
874
- }
875
- function jt(n, e, r, a, o, i, s = 0) {
876
- if (s = Math.floor(s), n <= 0 || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || n < a || o < 0 || i <= 0 || Math.floor(e) > Math.floor(r) || ![
860
+ function jt(n, e, r, a, o = 0) {
861
+ if (o = Math.floor(o), !t.isValidDate(n) || !t.isValidDate(e) || r <= 0 || a <= 0 || !v(o) || Math.floor(n) >= Math.floor(e)) return NaN;
862
+ const { days: s, yearDays: i } = I(n, e, o);
863
+ return (a / r - 1) / (s / i);
864
+ }
865
+ function _t(n, e, r, a, o, s = 0) {
866
+ if (s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o < 0 || !v(s) || !Ht(r, n, e)) return NaN;
867
+ const { yearDays: i } = I(r, n, s), { days: u } = I(n, e, s), { days: l } = I(r, e, s), { days: f } = I(r, n, s);
868
+ return (100 + l / i * a * 100) / (1 + u / i * o) - f / i * a * 100;
869
+ }
870
+ function Gt(n, e, r, a, o, s = 0) {
871
+ if (s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o <= 0 || !v(s) || !Ht(r, n, e)) return NaN;
872
+ const { yearDays: i } = I(r, n, s), { days: u } = I(n, e, s), { days: l } = I(r, e, s), { days: f } = I(r, n, s);
873
+ return ((1 + l / i * a) / (o / 100 + f / i * a) - 1) / (u / i);
874
+ }
875
+ function zt(n, e, r, a, o, s, i = 0) {
876
+ if (i = Math.floor(i), n <= 0 || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || n < a || o < 0 || s <= 0 || Math.floor(e) > Math.floor(r) || ![
877
877
  0,
878
878
  1,
879
879
  3,
880
880
  4
881
- ].includes(s)) return NaN;
881
+ ].includes(i)) return NaN;
882
882
  o = o > 1 ? Math.floor(o) : Math.ceil(o);
883
- const u = n - a, l = n * i, { days: f, yearDays: c } = I(e, r, s), m = f / c, h = Math.ceil(u / l - m);
883
+ const u = n - a, l = n * s, { days: f, yearDays: c } = I(e, r, i), m = f / c, h = Math.ceil(u / l - m);
884
884
  return h < 0 ? 0 : 0 === o ? l * m : o === h ? u - l * (m + o - 1) : o > h ? 0 : l;
885
885
  }
886
- function _t(t, n, e) {
886
+ function Ht(t, n, e) {
887
887
  return Math.floor(e) > Math.floor(n) && Math.floor(n) > Math.floor(t);
888
888
  }
889
- var Gt = o({
890
- COUPDAYBS: () => zt,
891
- COUPDAYS: () => Ht,
892
- COUPDAYSNC: () => Kt,
893
- COUPNCD: () => Qt,
894
- COUPNUM: () => $t,
895
- COUPPCD: () => Wt
889
+ var Kt = o({
890
+ COUPDAYBS: () => Qt,
891
+ COUPDAYS: () => Wt,
892
+ COUPDAYSNC: () => $t,
893
+ COUPNCD: () => Zt,
894
+ COUPNUM: () => tn,
895
+ COUPPCD: () => Jt
896
896
  });
897
- function zt(n, e, r, a = 0) {
898
- return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Zt(n, e, r, a) ? w(n, e, r, a) : NaN;
897
+ function Qt(n, e, r, a = 0) {
898
+ return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a) ? w(n, e, r, a) : NaN;
899
899
  }
900
- function Ht(n, e, r, a = 0) {
901
- return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Zt(n, e, r, a) ? V(n, e, r, a) : NaN;
900
+ function Wt(n, e, r, a = 0) {
901
+ return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a) ? V(n, e, r, a) : NaN;
902
902
  }
903
- function Kt(n, e, r, a = 0) {
904
- if (r = Math.floor(r), a = Math.floor(a), !(t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Zt(n, e, r, a))) return NaN;
903
+ function $t(n, e, r, a = 0) {
904
+ if (r = Math.floor(r), a = Math.floor(a), !(t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a))) return NaN;
905
905
  const { days: o } = I(n, A(n, e, r), a);
906
906
  return o;
907
907
  }
908
- function Qt(n, e, r, a = 0) {
909
- return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && !(n >= e) && Zt(n, e, r, a) ? (t.formatResults("Short Date"), A(n, e, r)) : NaN;
908
+ function Zt(n, e, r, a = 0) {
909
+ return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && !(n >= e) && nn(n, e, r, a) ? (t.formatResults("Short Date"), A(n, e, r)) : NaN;
910
910
  }
911
- function Wt(n, e, r, a = 0) {
912
- if (r = Math.floor(r), a = Math.floor(a), !(t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Zt(n, e, r, a))) return NaN;
911
+ function Jt(n, e, r, a = 0) {
912
+ if (r = Math.floor(r), a = Math.floor(a), !(t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a))) return NaN;
913
913
  t.formatResults("d-mmm-yy");
914
- const o = x(n, e, r);
914
+ const o = T(n, e, r);
915
915
  return o < 0 ? 0 : o;
916
916
  }
917
- function $t(n, e, r, a = 0) {
918
- return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && E(a) && Zt(n, e, r, a) ? x(n, e, r) < 0 ? NaN : B(n, e, r) : NaN;
917
+ function tn(n, e, r, a = 0) {
918
+ return r = Math.floor(r), a = Math.floor(a), t.isValidDate(n) && t.isValidDate(e) && k(r) && v(a) && nn(n, e, r, a) ? T(n, e, r) < 0 ? NaN : B(n, e, r) : NaN;
919
919
  }
920
- function Zt(t, n, e, r) {
921
- return k(e) && E(r) && Math.floor(t) < Math.floor(n);
920
+ function nn(t, n, e, r) {
921
+ return k(e) && v(r) && Math.floor(t) < Math.floor(n);
922
922
  }
923
- function Jt(t, n) {
923
+ function en(t, n) {
924
924
  const e = 1e-7;
925
925
  let r = t, a = 1, o = 0;
926
926
  for (; a > e && o < 500;) {
927
- const t = (n(r + e) - n(r - e)) / 2e-7, i = r - n(r) / t;
928
- a = Math.abs(i - r), r = i, o++;
927
+ const t = (n(r + e) - n(r - e)) / 2e-7, s = r - n(r) / t;
928
+ a = Math.abs(s - r), r = s, o++;
929
929
  }
930
930
  return Number.isNaN(r) || !Number.isFinite(r) || 500 === o ? function(t, n) {
931
- const e = 1e-7, r = 60, a = 60, o = 1.6, i = -1, s = Number.MAX_VALUE;
932
- if (t <= i || t >= s) return NaN;
933
- let u, l, f = Math.max(t - .01, -.9999999), c = Math.min(t + .01, s - e), m = !1;
931
+ const e = 1e-7, r = 60, a = 60, o = 1.6, s = -1, i = Number.MAX_VALUE;
932
+ if (t <= s || t >= i) return NaN;
933
+ let u, l, f = Math.max(t - .01, -.9999999), c = Math.min(t + .01, i - e), m = !1;
934
934
  for (let t = 0; t < r; t++) {
935
935
  if (u = n(f), l = n(c), u * l <= 0) {
936
936
  m = !0;
937
937
  break;
938
938
  }
939
- f = Math.max(f + o * (f - c), -.9999999), c = Math.min(c + o * (c - f), s - e);
939
+ f = Math.max(f + o * (f - c), -.9999999), c = Math.min(c + o * (c - f), i - e);
940
940
  }
941
941
  if (!m) return NaN;
942
942
  u = n(f);
@@ -947,71 +947,71 @@ function Jt(t, n) {
947
947
  return h;
948
948
  }(t, n) : r;
949
949
  }
950
- var tn = o({
951
- DURATION: () => en,
952
- MDURATION: () => rn,
953
- PRICE: () => nn,
954
- YIELD: () => an
950
+ var rn = o({
951
+ DURATION: () => on,
952
+ MDURATION: () => sn,
953
+ PRICE: () => an,
954
+ YIELD: () => un
955
955
  });
956
- function nn(n, e, r, a, o, i, s = 0) {
957
- return i = Math.floor(i), s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || o <= 0 || !k(i) || !E(s) || Math.floor(n) >= Math.floor(e) || !U(n, e, i) ? NaN : F(n, e, r, a, o, i, s);
956
+ function an(n, e, r, a, o, s, i = 0) {
957
+ return s = Math.floor(s), i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || o <= 0 || !k(s) || !v(i) || Math.floor(n) >= Math.floor(e) || !U(n, e, s) ? NaN : P(n, e, r, a, o, s, i);
958
958
  }
959
- function en(n, e, r, a, o, i = 0) {
960
- return o = Math.floor(o), i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || !k(o) || !E(i) || Math.floor(n) >= Math.floor(e) || n <= 0 || e <= 366 ? NaN : Y(n, e, r, a, o, i);
959
+ function on(n, e, r, a, o, s = 0) {
960
+ return o = Math.floor(o), s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || !k(o) || !v(s) || Math.floor(n) >= Math.floor(e) || n <= 0 || e <= 366 ? NaN : L(n, e, r, a, o, s);
961
961
  }
962
- function rn(n, e, r, a, o, i = 0) {
963
- return o = Math.floor(o), i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || !k(o) || !E(i) || Math.floor(n) >= Math.floor(e) || n <= 0 || e <= 366 ? NaN : Y(n, e, r, a, o, i) / (1 + a / o);
962
+ function sn(n, e, r, a, o, s = 0) {
963
+ return o = Math.floor(o), s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a < 0 || !k(o) || !v(s) || Math.floor(n) >= Math.floor(e) || n <= 0 || e <= 366 ? NaN : L(n, e, r, a, o, s) / (1 + a / o);
964
964
  }
965
- function an(n, e, r, a, o, i, s = 0) {
966
- if (i = Math.floor(i), s = Math.floor(s), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a <= 0 || o <= 0 || !k(i) || !E(s) || Math.floor(n) >= Math.floor(e) || !U(n, e, i)) return NaN;
967
- if (B(n, e, i) > 1) {
968
- const t = Jt(r || .01, (t) => F(n, e, r, t, o, i, s) - a);
965
+ function un(n, e, r, a, o, s, i = 0) {
966
+ if (s = Math.floor(s), i = Math.floor(i), !t.isValidDate(n) || !t.isValidDate(e) || r < 0 || a <= 0 || o <= 0 || !k(s) || !v(i) || Math.floor(n) >= Math.floor(e) || !U(n, e, s)) return NaN;
967
+ if (B(n, e, s) > 1) {
968
+ const t = en(r || .01, (t) => P(n, e, r, t, o, s, i) - a);
969
969
  return Number.isNaN(t) ? NaN : t;
970
970
  }
971
- const u = w(n, e, i, s), l = V(n, e, i, s), { days: f } = I(n, e, s), c = a / 100 + u / l * (r / i);
972
- return (o / 100 + r / i - c) / c * i * (l / f);
971
+ const u = w(n, e, s, i), l = V(n, e, s, i), { days: f } = I(n, e, i), c = a / 100 + u / l * (r / s);
972
+ return (o / 100 + r / s - c) / c * s * (l / f);
973
973
  }
974
- var on = o({
975
- ODDFPRICE: () => sn,
976
- ODDFYIELD: () => un,
977
- ODDLPRICE: () => ln,
978
- ODDLYIELD: () => fn
974
+ var ln = o({
975
+ ODDFPRICE: () => fn,
976
+ ODDFYIELD: () => cn,
977
+ ODDLPRICE: () => mn,
978
+ ODDLYIELD: () => hn
979
979
  });
980
- function sn(n, e, r, a, o, i, s, u, l = 0) {
981
- return u = Math.floor(u), l = Math.floor(l), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a) || o < 0 || i < 0 || s <= 0 || !k(u) || !E(l) || !hn(n, e, r, a, u) ? NaN : P(n, e, r, a, o, i, s, u, l);
980
+ function fn(n, e, r, a, o, s, i, u, l = 0) {
981
+ return u = Math.floor(u), l = Math.floor(l), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a) || o < 0 || s < 0 || i <= 0 || !k(u) || !v(l) || !Nn(n, e, r, a, u) ? NaN : O(n, e, r, a, o, s, i, u, l);
982
982
  }
983
- function un(n, e, r, a, o, i, s, u, l = 0) {
984
- if (u = Math.floor(u), l = Math.floor(l), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a) || o < 0 || i <= 0 || s <= 0 || !k(u) || !E(l) || !hn(n, e, r, a, u)) return NaN;
985
- const { days: f } = I(n, e, l), c = Jt((o * f * 100 - (i - 100)) / (.25 * (i - 100) * (1 + 2 * f) + 100 * f), (t) => i - P(n, e, r, a, o, t, s, u, l));
983
+ function cn(n, e, r, a, o, s, i, u, l = 0) {
984
+ if (u = Math.floor(u), l = Math.floor(l), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || !t.isValidDate(a) || o < 0 || s <= 0 || i <= 0 || !k(u) || !v(l) || !Nn(n, e, r, a, u)) return NaN;
985
+ const { days: f } = I(n, e, l), c = en((o * f * 100 - (s - 100)) / (.25 * (s - 100) * (1 + 2 * f) + 100 * f), (t) => s - O(n, e, r, a, o, t, i, u, l));
986
986
  return Number.isNaN(c) ? NaN : c;
987
987
  }
988
- function ln(n, e, r, a, o, i, s, u = 0) {
989
- return s = Math.floor(s), u = Math.floor(u), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o < 0 || i <= 0 || !k(s) || !E(u) || !Mn(n, e, r, s) ? NaN : function(t, n, e, r, a, o, i, s) {
990
- const { fAi: u, fDCi: l, fDSCi: f } = cn(t, n, e, i, s);
991
- return (o * i + 100 * r * (l - u * (1 + a * f / i))) / (a * f + i);
992
- }(n, e, r, a, o, i, s, u);
988
+ function mn(n, e, r, a, o, s, i, u = 0) {
989
+ return i = Math.floor(i), u = Math.floor(u), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o < 0 || s <= 0 || !k(i) || !v(u) || !Dn(n, e, r, i) ? NaN : function(t, n, e, r, a, o, s, i) {
990
+ const { fAi: u, fDCi: l, fDSCi: f } = Mn(t, n, e, s, i);
991
+ return (o * s + 100 * r * (l - u * (1 + a * f / s))) / (a * f + s);
992
+ }(n, e, r, a, o, s, i, u);
993
993
  }
994
- function fn(n, e, r, a, o, i, s, u = 0) {
995
- if (s = Math.floor(s), u = Math.floor(u), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o <= 0 || i <= 0 || !k(s) || !E(u) || !Mn(n, e, r, s)) return NaN;
996
- const { fAi: l, fDCi: f, fDSCi: c } = cn(n, e, r, s, u);
997
- return (s * (i - o) + 100 * a * (f - l)) / (c * o + 100 * a * l * c / s);
994
+ function hn(n, e, r, a, o, s, i, u = 0) {
995
+ if (i = Math.floor(i), u = Math.floor(u), !t.isValidDate(n) || !t.isValidDate(e) || !t.isValidDate(r) || a < 0 || o <= 0 || s <= 0 || !k(i) || !v(u) || !Dn(n, e, r, i)) return NaN;
996
+ const { fAi: l, fDCi: f, fDSCi: c } = Mn(n, e, r, i, u);
997
+ return (i * (s - o) + 100 * a * (f - l)) / (c * o + 100 * a * l * c / i);
998
998
  }
999
- function cn(n, e, r, a, o) {
1000
- const i = function(n, e, r) {
1001
- const a = t.fromSerialDate(n, !0), o = t.fromSerialDate(e, !0), i = 12 / r;
999
+ function Mn(n, e, r, a, o) {
1000
+ const s = function(n, e, r) {
1001
+ const a = t.fromSerialDate(n, !0), o = t.fromSerialDate(e, !0), s = 12 / r;
1002
1002
  o.setFullYear(a.getFullYear()), o > a && o.setFullYear(o.getFullYear() - 1);
1003
- for (; o < a;) o.setMonth(o.getMonth() + i);
1003
+ for (; o < a;) o.setMonth(o.getMonth() + s);
1004
1004
  return t.toSerialDate(o, !0);
1005
1005
  }(e, r, a);
1006
1006
  return {
1007
- fAi: mn(r, n, i, a, o),
1008
- fDCi: mn(r, e, i, a, o),
1009
- fDSCi: mn(n, e, i, a, o)
1007
+ fAi: pn(r, n, s, a, o),
1008
+ fDCi: pn(r, e, s, a, o),
1009
+ fDSCi: pn(n, e, s, a, o)
1010
1010
  };
1011
1011
  }
1012
- function mn(n, e, r, a, o) {
1013
- const i = t.fromSerialDate(n, !0), s = t.fromSerialDate(e, !0), u = 12 / a, l = t.fromSerialDate(r, !0);
1014
- for (l.setFullYear(i.getFullYear()), l < i && l.setFullYear(l.getFullYear() + 1); l > i;) l.setMonth(l.getMonth() - u);
1012
+ function pn(n, e, r, a, o) {
1013
+ const s = t.fromSerialDate(n, !0), i = t.fromSerialDate(e, !0), u = 12 / a, l = t.fromSerialDate(r, !0);
1014
+ for (l.setFullYear(s.getFullYear()), l < s && l.setFullYear(l.getFullYear() + 1); l > s;) l.setMonth(l.getMonth() - u);
1015
1015
  let f = t.toSerialDate(l, !0);
1016
1016
  l.setMonth(l.getMonth() + u);
1017
1017
  let c = t.toSerialDate(l, !0);
@@ -1023,128 +1023,125 @@ function mn(n, e, r, a, o) {
1023
1023
  const { days: h } = I(n, c, o);
1024
1024
  let M = h / m(o, f, c);
1025
1025
  const p = t.fromSerialDate(c, !0), N = t.fromSerialDate(c, !0);
1026
- for (N.setMonth(N.getMonth() + u); N < s;) p.setMonth(p.getMonth() + u), N.setMonth(N.getMonth() + u), M += 1;
1026
+ for (N.setMonth(N.getMonth() + u); N < i;) p.setMonth(p.getMonth() + u), N.setMonth(N.getMonth() + u), M += 1;
1027
1027
  f = t.toSerialDate(p, !0), c = t.toSerialDate(N, !0);
1028
1028
  const { days: D } = I(f, e, o);
1029
1029
  return M += D / m(o, f, c), M;
1030
1030
  }
1031
- function hn(n, e, r, a, o) {
1031
+ function Nn(n, e, r, a, o) {
1032
1032
  return Math.floor(e) > Math.floor(a) && Math.floor(a) > Math.floor(n) && Math.floor(n) > Math.floor(r) && function(n, e, r) {
1033
- const a = t.fromSerialDate(n, !0), o = t.fromSerialDate(e, !0), i = d(a.getFullYear(), a.getMonth(), a.getDate()), s = d(o.getFullYear(), o.getMonth(), o.getDate());
1034
- return !!(a.getDate() === o.getDate() || i && s) && Math.abs(12 * (o.getFullYear() - a.getFullYear()) + (o.getMonth() - a.getMonth())) % (12 / r) == 0;
1033
+ const a = t.fromSerialDate(n, !0), o = t.fromSerialDate(e, !0), s = g(a.getFullYear(), a.getMonth(), a.getDate()), i = g(o.getFullYear(), o.getMonth(), o.getDate());
1034
+ return !!(a.getDate() === o.getDate() || s && i) && Math.abs(12 * (o.getFullYear() - a.getFullYear()) + (o.getMonth() - a.getMonth())) % (12 / r) == 0;
1035
1035
  }(e, a, o) && U(r, e, o);
1036
1036
  }
1037
- function Mn(t, n, e, r) {
1037
+ function Dn(t, n, e, r) {
1038
1038
  return Math.floor(n) > Math.floor(t) && Math.floor(t) > Math.floor(e) && U(e, n, r);
1039
1039
  }
1040
- var pn = o({ VDB: () => Nn });
1041
- function Nn(e, r, a, o, i, s = 2, u = !1) {
1042
- if (!t.isValidDate(o) || !t.isValidDate(i) || e < 0 || r < 0 || a < 0 || o < 0 || i < 0 || i > a || o > i || s < 0) return NaN;
1043
- if (0 === a && 0 === o && 0 === i) throw n.BuiltIn.Div0;
1040
+ var gn = o({ VDB: () => dn });
1041
+ function dn(e, r, a, o, s, i = 2, u = !1) {
1042
+ if (!t.isValidDate(o) || !t.isValidDate(s) || e < 0 || r < 0 || a < 0 || o < 0 || s < 0 || s > a || o > s || i < 0) return NaN;
1043
+ if (0 === a && 0 === o && 0 === s) throw n.BuiltIn.Div0;
1044
1044
  if (e < r) {
1045
1045
  if (o >= 1 || u) return 0;
1046
- const t = r - e, n = i - o;
1046
+ const t = r - e, n = s - o;
1047
1047
  return -(n >= 1 ? t : t * n);
1048
1048
  }
1049
1049
  return u ? function(t, n, e, r, a, o) {
1050
- const i = Math.floor(r) + 1, s = Math.ceil(a);
1050
+ const s = Math.floor(r) + 1, i = Math.ceil(a);
1051
1051
  let u = 0;
1052
- for (let l = i; l <= s; l++) {
1053
- let f = L(t, n, e, l, o);
1054
- l === i ? f *= Math.min(a, i) - r : l === s && (f *= a - (s - 1)), u += f;
1052
+ for (let l = s; l <= i; l++) {
1053
+ let f = Y(t, n, e, l, o);
1054
+ l === s ? f *= Math.min(a, s) - r : l === i && (f *= a - (i - 1)), u += f;
1055
1055
  }
1056
1056
  return u;
1057
- }(e, r, a, o, i, s) : function(t, n, e, r, a, o) {
1058
- const i = Math.ceil(a);
1059
- let s = t, u = !1, l = 0, f = 0;
1060
- for (let c = 1; c <= i && !(s <= n); c++) {
1061
- let i;
1062
- if (u) i = l;
1057
+ }(e, r, a, o, s, i) : function(t, n, e, r, a, o) {
1058
+ const s = Math.ceil(a);
1059
+ let i = t, u = !1, l = 0, f = 0;
1060
+ for (let c = 1; c <= s && !(i <= n); c++) {
1061
+ let s;
1062
+ if (u) s = l;
1063
1063
  else {
1064
- const r = L(t, n, e, c, o), a = e - (c - 1), f = a > 0 ? (s - n) / a : 0;
1065
- f > r ? (l = f, u = !0, i = f) : i = r;
1064
+ const r = Y(t, n, e, c, o), a = e - (c - 1), f = a > 0 ? (i - n) / a : 0;
1065
+ f > r ? (l = f, u = !0, s = f) : s = r;
1066
1066
  }
1067
- i = Math.min(i, s - n);
1067
+ s = Math.min(s, i - n);
1068
1068
  const m = Math.max(c - 1, r);
1069
- f += i * Math.max(0, Math.min(c, a) - m), s -= i;
1069
+ f += s * Math.max(0, Math.min(c, a) - m), i -= s;
1070
1070
  }
1071
1071
  return f;
1072
- }(e, r, a, o, i, s);
1072
+ }(e, r, a, o, s, i);
1073
1073
  }
1074
- var Dn = Object.freeze({ includeEmpty: !0 }), dn = (Object.freeze({ axis: e.Axis.Column }), Object.freeze({ axis: e.Axis.Row }), Object.freeze({
1075
- type: r.Number,
1076
- axis: e.Axis.Column
1077
- })), gn = o({
1074
+ var bn = o({
1078
1075
  FORECAST_ETS: () => yn,
1079
- FORECAST_ETS_CONFINT: () => bn,
1076
+ FORECAST_ETS_CONFINT: () => vn,
1080
1077
  FORECAST_ETS_SEASONALITY: () => En,
1081
- FORECAST_ETS_STAT: () => vn
1078
+ FORECAST_ETS_STAT: () => Rn
1082
1079
  });
1083
- function yn(t, e, r, a = 1, o = 1, i = 1) {
1084
- const s = In(e, r, o, i);
1085
- if (n.isError(s)) return s;
1086
- const { values: u, stepSize: l, lastTime: f, firstTime: c } = s, m = Math.round((t - f) / l), h = Tn(u, a);
1080
+ function yn(t, e, r, a = 1, o = 1, s = 1) {
1081
+ const i = Sn(e, r, o, s);
1082
+ if (n.isError(i)) return i;
1083
+ const { values: u, stepSize: l, lastTime: f, firstTime: c } = i, m = Math.round((t - f) / l), h = Tn(u, a);
1087
1084
  if (n.isError(h)) return h;
1088
- const { alpha: M, beta: p, gamma: N, period: D, b0: d } = h, { L: g, T: y, S: b, finalIndex: E } = Cn(u, M, p, N, D, d).finalState;
1089
- let v = g + m * y;
1090
- return D > 1 && (v += b[(E + m) % D]), v;
1085
+ const { alpha: M, beta: p, gamma: N, period: D, b0: g } = h, { L: d, T: b, S: y, finalIndex: v } = xn(u, M, p, N, D, g).finalState;
1086
+ let E = d + m * b;
1087
+ return D > 1 && (E += y[(v + m) % D]), E;
1091
1088
  }
1092
- function bn(e, r, a, o = .95, i = 1, s = 1, u = 1) {
1089
+ function vn(e, r, a, o = .95, s = 1, i = 1, u = 1) {
1093
1090
  if (o < 0 || o >= 1) return n.BuiltIn.Num;
1094
- const l = In(r, a, s, u);
1091
+ const l = Sn(r, a, i, u);
1095
1092
  if (n.isError(l)) return l;
1096
1093
  const { values: f, stepSize: c, lastTime: m } = l;
1097
1094
  if (f.length < 4) return 0;
1098
- const h = Math.round((e - m) / c), M = Tn(f, i);
1095
+ const h = Math.round((e - m) / c), M = Tn(f, s);
1099
1096
  if (n.isError(M)) return M;
1100
- const { alpha: p, beta: N, gamma: D, period: d, b0: g } = M, y = function(t, n, e, r, a, o) {
1101
- const i = t.length;
1102
- let s, u;
1097
+ const { alpha: p, beta: N, gamma: D, period: g, b0: d } = M, b = function(t, n, e, r, a, o) {
1098
+ const s = t.length;
1099
+ let i, u;
1103
1100
  const l = new Array(Math.max(1, a)).fill(0);
1104
- if (a > 1 && i >= 2 * a) {
1101
+ if (a > 1 && s >= 2 * a) {
1105
1102
  let n = 0, e = 0;
1106
1103
  for (let e = 0; e < a; e++) n += t[e];
1107
1104
  for (let n = a; n < 2 * a; n++) e += t[n];
1108
- s = n / a, u = (e - n) / (a * a);
1105
+ i = n / a, u = (e - n) / (a * a);
1109
1106
  const r = n / a;
1110
1107
  for (let n = 0; n < a; n++) l[n] = t[n] - r;
1111
- } else s = t[0], u = void 0 !== o ? o : a > 1 && a < i ? (t[a] - t[0]) / a : 0;
1108
+ } else i = t[0], u = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1112
1109
  let f = 0;
1113
- for (let o = 0; o < i; o++) {
1114
- const i = a > 1 ? o % a : 0, c = a > 1 ? l[i] : 0, m = s + u + c, h = t[o] - m;
1110
+ for (let o = 0; o < s; o++) {
1111
+ const s = a > 1 ? o % a : 0, c = a > 1 ? l[s] : 0, m = i + u + c, h = t[o] - m;
1115
1112
  f += h * h;
1116
- const M = n * (t[o] - c) + (1 - n) * (s + u), p = e * (M - s) + (1 - e) * u;
1117
- a > 1 && (l[i] = r * (t[o] - M) + (1 - r) * c), s = M, u = p;
1113
+ const M = n * (t[o] - c) + (1 - n) * (i + u), p = e * (M - i) + (1 - e) * u;
1114
+ a > 1 && (l[s] = r * (t[o] - M) + (1 - r) * c), i = M, u = p;
1118
1115
  }
1119
- return Math.sqrt(f / i);
1120
- }(f, p, N, D, d, g), b = function(t, n, e, r) {
1116
+ return Math.sqrt(f / s);
1117
+ }(f, p, N, D, g, d), y = function(t, n, e, r) {
1121
1118
  const a = Math.abs(r);
1122
1119
  if (0 === a) return 0;
1123
- let o = 0, i = 1;
1120
+ let o = 0, s = 1;
1124
1121
  for (let r = 1; r <= a; r++) {
1125
- o += i * i;
1126
- i = i + t + (e > 1 && r % e === 0 ? n : 0);
1122
+ o += s * s;
1123
+ s = s + t + (e > 1 && r % e === 0 ? n : 0);
1127
1124
  }
1128
1125
  return o;
1129
- }(p, D, d, h);
1126
+ }(p, D, g, h);
1130
1127
  return function(n) {
1131
1128
  const e = (1 + n) / 2, r = t.getFunction("NORM.S.INV");
1132
1129
  if (r) return r.execute(e);
1133
1130
  const a = Math.sqrt(-2 * Math.log(1 - e));
1134
1131
  return a - (2.515517 + .802853 * a + .010328 * a * a) / (1 + 1.432788 * a + .189269 * a * a + .001308 * a * a * a);
1135
- }(o) * y * Math.sqrt(b);
1132
+ }(o) * b * Math.sqrt(y);
1136
1133
  }
1137
1134
  function En(t, e, r = 1, a = 1) {
1138
- const o = In(t, e, r, a);
1135
+ const o = Sn(t, e, r, a);
1139
1136
  if (n.isError(o)) return o === n.BuiltIn.NA ? o : 0;
1140
- const { values: i } = o;
1141
- return i.length < 4 ? 0 : Sn(i);
1137
+ const { values: s } = o;
1138
+ return s.length < 4 ? 0 : Cn(s);
1142
1139
  }
1143
- function vn(t, e, r, a = 1, o = 1, i = 1) {
1140
+ function Rn(t, e, r, a = 1, o = 1, s = 1) {
1144
1141
  if (r < 1 || r > 8) return n.BuiltIn.Num;
1145
- const s = In(t, e, o, i);
1146
- if (n.isError(s)) return s;
1147
- const { values: u, stepSize: l } = s;
1142
+ const i = Sn(t, e, o, s);
1143
+ if (n.isError(i)) return i;
1144
+ const { values: u, stepSize: l } = i;
1148
1145
  if (8 === r) return l;
1149
1146
  const f = Tn(u, a);
1150
1147
  if (n.isError(f)) return f;
@@ -1155,31 +1152,31 @@ function vn(t, e, r, a = 1, o = 1, i = 1) {
1155
1152
  case 3: return h;
1156
1153
  default: {
1157
1154
  const t = function(t, n, e, r, a, o) {
1158
- const i = t.length;
1159
- let s, u;
1155
+ const s = t.length;
1156
+ let i, u;
1160
1157
  const l = new Array(Math.max(1, a)).fill(0);
1161
- if (a > 1 && i >= 2 * a) {
1158
+ if (a > 1 && s >= 2 * a) {
1162
1159
  let n = 0, e = 0;
1163
1160
  for (let e = 0; e < a; e++) n += t[e];
1164
1161
  for (let n = a; n < 2 * a; n++) e += t[n];
1165
- s = n / a, u = (e - n) / (a * a);
1162
+ i = n / a, u = (e - n) / (a * a);
1166
1163
  const r = n / a;
1167
1164
  for (let n = 0; n < a; n++) l[n] = t[n] - r;
1168
- } else s = t[0], u = void 0 !== o ? o : a > 1 && a < i ? (t[a] - t[0]) / a : 0;
1165
+ } else i = t[0], u = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1169
1166
  let f = 0, c = 0, m = 0, h = 0;
1170
- for (let n = 1; n < i; n++) h += Math.abs(t[n] - t[n - 1]);
1171
- const M = h / (i - 1);
1172
- for (let o = 0; o < i; o++) {
1173
- const i = t[o], h = a > 1 ? o % a : 0, M = a > 1 ? l[h] : 0, p = s + u + M, N = i - p;
1174
- f += Math.abs(N), c += N * N, m += Math.abs(N) / ((Math.abs(i) + Math.abs(p)) / 2 || 1);
1175
- const D = n * (i - M) + (1 - n) * (s + u), d = e * (D - s) + (1 - e) * u;
1176
- a > 1 && (l[h] = r * (i - D) + (1 - r) * M), s = D, u = d;
1167
+ for (let n = 1; n < s; n++) h += Math.abs(t[n] - t[n - 1]);
1168
+ const M = h / (s - 1);
1169
+ for (let o = 0; o < s; o++) {
1170
+ const s = t[o], h = a > 1 ? o % a : 0, M = a > 1 ? l[h] : 0, p = i + u + M, N = s - p;
1171
+ f += Math.abs(N), c += N * N, m += Math.abs(N) / ((Math.abs(s) + Math.abs(p)) / 2 || 1);
1172
+ const D = n * (s - M) + (1 - n) * (i + u), g = e * (D - i) + (1 - e) * u;
1173
+ a > 1 && (l[h] = r * (s - D) + (1 - r) * M), i = D, u = g;
1177
1174
  }
1178
1175
  return {
1179
- mae: f / i,
1180
- rmse: Math.sqrt(c / i),
1181
- smape: m / i,
1182
- mase: 0 === M ? 0 : f / i / M
1176
+ mae: f / s,
1177
+ rmse: Math.sqrt(c / s),
1178
+ smape: m / s,
1179
+ mase: 0 === M ? 0 : f / s / M
1183
1180
  };
1184
1181
  }(u, c, m, h, M, p);
1185
1182
  if (4 === r) return t.mase;
@@ -1190,7 +1187,7 @@ function vn(t, e, r, a = 1, o = 1, i = 1) {
1190
1187
  }
1191
1188
  return n.BuiltIn.Num;
1192
1189
  }
1193
- function Rn(t, e) {
1190
+ function In(t, e) {
1194
1191
  if (1 === t.length) return t[0].value;
1195
1192
  const r = t.map((t) => t.value);
1196
1193
  switch (e) {
@@ -1207,21 +1204,24 @@ function Rn(t, e) {
1207
1204
  default: return n.BuiltIn.Num;
1208
1205
  }
1209
1206
  }
1210
- function In(t, e, r, a) {
1207
+ function Sn(t, e, r, a) {
1211
1208
  if (r < 0 || r > 1) return n.BuiltIn.Num;
1212
- const o = t.flatten(Dn), i = e.flatten(Dn);
1213
- if (o.length !== i.length) return n.BuiltIn.NA;
1214
- if (o.length < 2) return n.BuiltIn.Num;
1215
- const s = i.map((t, n) => ({
1216
- time: t,
1217
- value: o[n]
1218
- })).sort((t, n) => t.time - n.time), u = [];
1219
- let l = [s[0]];
1220
- for (let t = 1; t < s.length; t++) {
1221
- const e = s[t];
1222
- if (e.time === s[t - 1].time) l.push(e);
1209
+ const o = t.flatten(), s = e.flatten();
1210
+ if (o.getRowCount() !== s.getRowCount()) return n.BuiltIn.NA;
1211
+ if (o.getRowCount() < 2) return n.BuiltIn.Num;
1212
+ const i = [];
1213
+ for (const [[t, n]] of o.alignValues([s])) "number" == typeof t && "number" == typeof n && i.push({
1214
+ time: n,
1215
+ value: t
1216
+ });
1217
+ if (i.sort((t, n) => t.time - n.time), i.length < 2) return n.BuiltIn.Num;
1218
+ const u = [];
1219
+ let l = [i[0]];
1220
+ for (let t = 1; t < i.length; t++) {
1221
+ const e = i[t];
1222
+ if (e.time === i[t - 1].time) l.push(e);
1223
1223
  else {
1224
- const t = Rn(l, a);
1224
+ const t = In(l, a);
1225
1225
  if (n.isError(t)) return t;
1226
1226
  u.push({
1227
1227
  time: l[0].time,
@@ -1229,7 +1229,7 @@ function In(t, e, r, a) {
1229
1229
  }), l = [e];
1230
1230
  }
1231
1231
  }
1232
- const f = Rn(l, a);
1232
+ const f = In(l, a);
1233
1233
  if (n.isError(f)) return f;
1234
1234
  if (u.push({
1235
1235
  time: l[0].time,
@@ -1260,7 +1260,7 @@ function In(t, e, r, a) {
1260
1260
  firstTime: u[0].time
1261
1261
  };
1262
1262
  }
1263
- function Sn(t) {
1263
+ function Cn(t) {
1264
1264
  const n = t.length;
1265
1265
  if (n < 4) return 0;
1266
1266
  const e = t.reduce((t, n) => t + n, 0) / n;
@@ -1268,44 +1268,44 @@ function Sn(t) {
1268
1268
  for (let a = 0; a < n; a++) r += Math.pow(t[a] - e, 2);
1269
1269
  if (0 === r) return 0;
1270
1270
  let a = -Infinity, o = 0;
1271
- const i = Math.min(Math.floor(n / 2), 24);
1272
- for (let s = 2; s <= i; s++) {
1273
- let i = 0;
1274
- for (let r = 0; r < n - s; r++) i += (t[r] - e) * (t[r + s] - e);
1275
- const u = i / r;
1276
- u > a && u > .3 && (a = u, o = s);
1271
+ const s = Math.min(Math.floor(n / 2), 24);
1272
+ for (let i = 2; i <= s; i++) {
1273
+ let s = 0;
1274
+ for (let r = 0; r < n - i; r++) s += (t[r] - e) * (t[r + i] - e);
1275
+ const u = s / r;
1276
+ u > a && u > .3 && (a = u, o = i);
1277
1277
  }
1278
1278
  return o;
1279
1279
  }
1280
- function Cn(t, n, e, r, a, o) {
1281
- const i = t.length;
1282
- let s, u;
1283
- if (a > 1 && i >= 2 * a) {
1280
+ function xn(t, n, e, r, a, o) {
1281
+ const s = t.length;
1282
+ let i, u;
1283
+ if (a > 1 && s >= 2 * a) {
1284
1284
  let n = 0, e = 0;
1285
1285
  for (let e = 0; e < a; e++) n += t[e];
1286
1286
  for (let n = a; n < 2 * a; n++) e += t[n];
1287
- s = n / a, u = (e - n) / (a * a);
1288
- } else s = t[0], u = void 0 !== o ? o : a > 1 && a < i ? (t[a] - t[0]) / a : 0;
1287
+ i = n / a, u = (e - n) / (a * a);
1288
+ } else i = t[0], u = void 0 !== o ? o : a > 1 && a < s ? (t[a] - t[0]) / a : 0;
1289
1289
  const l = new Array(Math.max(1, a)).fill(0);
1290
- if (a > 1 && i >= a) {
1290
+ if (a > 1 && s >= a) {
1291
1291
  const n = l.length > 0 ? (() => {
1292
1292
  let n = 0;
1293
1293
  for (let e = 0; e < a; e++) n += t[e];
1294
1294
  return n / a;
1295
- })() : s;
1295
+ })() : i;
1296
1296
  for (let e = 0; e < a; e++) l[e] = t[e] - n;
1297
1297
  }
1298
1298
  let f = 0, c = 0;
1299
- for (let o = 0; o < i; o++) {
1300
- const i = t[o], m = a > 1 ? o % a : 0, h = a > 1 ? l[m] : 0, M = i - (s + u + h);
1299
+ for (let o = 0; o < s; o++) {
1300
+ const s = t[o], m = a > 1 ? o % a : 0, h = a > 1 ? l[m] : 0, M = s - (i + u + h);
1301
1301
  f += M * M;
1302
- const p = n * (i - h) + (1 - n) * (s + u), N = e * (p - s) + (1 - e) * u;
1303
- a > 1 && (l[m] = r * (i - p) + (1 - r) * h), s = p, u = N, c = m;
1302
+ const p = n * (s - h) + (1 - n) * (i + u), N = e * (p - i) + (1 - e) * u;
1303
+ a > 1 && (l[m] = r * (s - p) + (1 - r) * h), i = p, u = N, c = m;
1304
1304
  }
1305
1305
  return {
1306
- mse: f / i,
1306
+ mse: f / s,
1307
1307
  finalState: {
1308
- L: s,
1308
+ L: i,
1309
1309
  T: u,
1310
1310
  S: l,
1311
1311
  finalIndex: c
@@ -1315,7 +1315,7 @@ function Cn(t, n, e, r, a, o) {
1315
1315
  function Tn(t, e) {
1316
1316
  let r = 1;
1317
1317
  if (0 === e) r = 1;
1318
- else if (1 === e) r = Sn(t), r <= 1 && (r = 1);
1318
+ else if (1 === e) r = Cn(t), r <= 1 && (r = 1);
1319
1319
  else {
1320
1320
  if (!(e > 1)) return n.BuiltIn.Num;
1321
1321
  r = Math.floor(e);
@@ -1323,9 +1323,9 @@ function Tn(t, e) {
1323
1323
  if (r > 1 && t.length < 2 * r) return n.BuiltIn.Num;
1324
1324
  const a = t.length;
1325
1325
  if (1 === r) {
1326
- const n = Math.max(1, Math.floor(a / 4)), e = An((n) => {
1326
+ const n = Math.max(1, Math.floor(a / 4)), e = wn((n) => {
1327
1327
  const e = Math.max(.001, Math.min(.999, n[0])), r = Math.max(.001, Math.min(.999, n[1])), a = n[2];
1328
- return Cn(t, e, r, 0, 1, a).mse;
1328
+ return xn(t, e, r, 0, 1, a).mse;
1329
1329
  }, [
1330
1330
  .9,
1331
1331
  .1,
@@ -1339,7 +1339,7 @@ function Tn(t, e) {
1339
1339
  b0: e[2]
1340
1340
  };
1341
1341
  }
1342
- const o = An((n) => Cn(t, Math.max(.001, Math.min(.999, n[0])), Math.max(.001, Math.min(.999, n[1])), Math.max(.001, Math.min(.999, n[2])), r).mse, [
1342
+ const o = wn((n) => xn(t, Math.max(.001, Math.min(.999, n[0])), Math.max(.001, Math.min(.999, n[1])), Math.max(.001, Math.min(.999, n[2])), r).mse, [
1343
1343
  .9,
1344
1344
  .1,
1345
1345
  .1
@@ -1352,11 +1352,11 @@ function Tn(t, e) {
1352
1352
  b0: 0
1353
1353
  };
1354
1354
  }
1355
- function xn(t, n, e, r, a) {
1355
+ function An(t, n, e, r, a) {
1356
1356
  for (let o = 0; o < t.length; ++o) t[o] = n * e[o] + r * a[o];
1357
1357
  }
1358
- function An(t, n, e) {
1359
- const r = (e = e || {}).maxIterations || 200 * n.length, a = e.nonZeroDelta || 1.05, o = e.zeroDelta || .001, i = e.minErrorDelta || 1e-6, s = e.minTolerance || 1e-5, u = void 0 !== e.rho ? e.rho : 1, l = void 0 !== e.chi ? e.chi : 2, f = void 0 !== e.psi ? e.psi : -.5, c = void 0 !== e.sigma ? e.sigma : .5;
1358
+ function wn(t, n, e) {
1359
+ const r = (e = e || {}).maxIterations || 200 * n.length, a = e.nonZeroDelta || 1.05, o = e.zeroDelta || .001, s = e.minErrorDelta || 1e-6, i = e.minTolerance || 1e-5, u = void 0 !== e.rho ? e.rho : 1, l = void 0 !== e.chi ? e.chi : 2, f = void 0 !== e.psi ? e.psi : -.5, c = void 0 !== e.sigma ? e.sigma : .5;
1360
1360
  let m;
1361
1361
  const h = n.length, M = new Array(h + 1);
1362
1362
  M[0] = n, M[0].fx = t(n), M[0].id = 0;
@@ -1368,7 +1368,7 @@ function An(t, n, e) {
1368
1368
  for (let n = 0; n < t.length; n++) M[h][n] = t[n];
1369
1369
  M[h].fx = t.fx;
1370
1370
  }
1371
- const N = (t, n) => t.fx - n.fx, D = n.slice(), d = n.slice(), g = n.slice(), y = n.slice();
1371
+ const N = (t, n) => t.fx - n.fx, D = n.slice(), g = n.slice(), d = n.slice(), b = n.slice();
1372
1372
  for (let n = 0; n < r; ++n) {
1373
1373
  if (M.sort(N), e.history) {
1374
1374
  const t = M.map((t) => {
@@ -1383,39 +1383,42 @@ function An(t, n, e) {
1383
1383
  }
1384
1384
  m = 0;
1385
1385
  for (let t = 0; t < h; ++t) m = Math.max(m, Math.abs(M[0][t] - M[1][t]));
1386
- if (Math.abs(M[0].fx - M[h].fx) < i && m < s) break;
1386
+ if (Math.abs(M[0].fx - M[h].fx) < s && m < i) break;
1387
1387
  for (let t = 0; t < h; ++t) {
1388
1388
  D[t] = 0;
1389
1389
  for (let n = 0; n < h; ++n) D[t] += M[n][t];
1390
1390
  D[t] /= h;
1391
1391
  }
1392
1392
  const n = M[h];
1393
- if (xn(d, 1 + u, D, -u, n), d.fx = t(d), d.fx < M[0].fx) xn(y, 1 + l, D, -l, n), y.fx = t(y), p(y.fx < d.fx ? y : d);
1394
- else if (d.fx >= M[h - 1].fx) {
1393
+ if (An(g, 1 + u, D, -u, n), g.fx = t(g), g.fx < M[0].fx) An(b, 1 + l, D, -l, n), b.fx = t(b), p(b.fx < g.fx ? b : g);
1394
+ else if (g.fx >= M[h - 1].fx) {
1395
1395
  let e = !1;
1396
- if (d.fx > n.fx ? (xn(g, 1 + f, D, -f, n), g.fx = t(g), g.fx < n.fx ? p(g) : e = !0) : (xn(g, 1 - f * u, D, f * u, n), g.fx = t(g), g.fx < d.fx ? p(g) : e = !0), e) {
1396
+ if (g.fx > n.fx ? (An(d, 1 + f, D, -f, n), d.fx = t(d), d.fx < n.fx ? p(d) : e = !0) : (An(d, 1 - f * u, D, f * u, n), d.fx = t(d), d.fx < g.fx ? p(d) : e = !0), e) {
1397
1397
  if (c >= 1) break;
1398
- for (let n = 1; n < M.length; ++n) xn(M[n], 1 - c, M[0], c, M[n]), M[n].fx = t(M[n]);
1398
+ for (let n = 1; n < M.length; ++n) An(M[n], 1 - c, M[0], c, M[n]), M[n].fx = t(M[n]);
1399
1399
  }
1400
- } else p(d);
1400
+ } else p(g);
1401
1401
  }
1402
1402
  return M.sort(N), {
1403
1403
  fx: M[0].fx,
1404
1404
  x: M[0]
1405
1405
  };
1406
1406
  }
1407
- var wn = (t, e) => {
1407
+ var Vn = Object.freeze({ includeEmpty: !0 }), Bn = (Object.freeze({ axis: e.Axis.Column }), Object.freeze({ axis: e.Axis.Row }), Object.freeze({
1408
+ type: r.Number,
1409
+ axis: e.Axis.Row
1410
+ })), Fn = (t, e) => {
1408
1411
  const r = t.getRowCount(), a = t.getColumnCount(), o = r * a;
1409
1412
  if (0 === o) throw n.BuiltIn.Value;
1410
- const i = Fn(t, o), s = 1 === r && a > 1, u = r > 1 && a > 1;
1413
+ const s = Un(t, o), i = 1 === r && a > 1, u = r > 1 && a > 1;
1411
1414
  if (!e || 0 === e.size) {
1412
1415
  const t = new Array(o);
1413
1416
  for (let n = 0; n < o; n++) t[n] = [n + 1];
1414
1417
  return {
1415
- ys: i,
1418
+ ys: s,
1416
1419
  xs: t,
1417
1420
  k: 1,
1418
- isRowOriented: s,
1421
+ isRowOriented: i,
1419
1422
  isRectangularY: u,
1420
1423
  yRows: r,
1421
1424
  yCols: a
@@ -1424,44 +1427,44 @@ var wn = (t, e) => {
1424
1427
  const l = e.getRowCount(), f = e.getColumnCount();
1425
1428
  if (u) {
1426
1429
  if (l !== r || f !== a) throw n.BuiltIn.Ref;
1427
- const t = Fn(e, o), c = new Array(o);
1430
+ const t = Un(e, o), c = new Array(o);
1428
1431
  for (let n = 0; n < o; n++) c[n] = [t[n]];
1429
1432
  return {
1430
- ys: i,
1433
+ ys: s,
1431
1434
  xs: c,
1432
1435
  k: 1,
1433
- isRowOriented: s,
1436
+ isRowOriented: i,
1434
1437
  isRectangularY: u,
1435
1438
  yRows: r,
1436
1439
  yCols: a
1437
1440
  };
1438
1441
  }
1439
- if ((s ? f : l) !== o) throw n.BuiltIn.Ref;
1440
- const c = s ? l : f;
1442
+ if ((i ? f : l) !== o) throw n.BuiltIn.Ref;
1443
+ const c = i ? l : f;
1441
1444
  return {
1442
- ys: i,
1443
- xs: Yn(e, o, c, s),
1445
+ ys: s,
1446
+ xs: kn(e, o, c, i),
1444
1447
  k: c,
1445
- isRowOriented: s,
1448
+ isRowOriented: i,
1446
1449
  isRectangularY: u,
1447
1450
  yRows: r,
1448
1451
  yCols: a
1449
1452
  };
1450
- }, Vn = (t) => {
1453
+ }, On = (t) => {
1451
1454
  const e = new Array(t.length);
1452
1455
  for (let r = 0; r < t.length; r++) {
1453
1456
  if (t[r] <= 0) throw n.BuiltIn.Num;
1454
1457
  e[r] = Math.log(t[r]);
1455
1458
  }
1456
1459
  return e;
1457
- }, Bn = (t, e, r) => {
1458
- let a, o, i;
1460
+ }, Pn = (t, e, r) => {
1461
+ let a, o, s;
1459
1462
  if (e && e.size > 0) {
1460
1463
  const r = ((t, e) => {
1461
1464
  const r = t.getRowCount(), a = t.getColumnCount(), o = r * a;
1462
1465
  if (0 === o) throw n.BuiltIn.Ref;
1463
1466
  if (1 === e.k) {
1464
- const n = Fn(t, o), e = new Array(o);
1467
+ const n = Un(t, o), e = new Array(o);
1465
1468
  for (let t = 0; t < o; t++) e[t] = [n[t]];
1466
1469
  return {
1467
1470
  xs: e,
@@ -1469,48 +1472,48 @@ var wn = (t, e) => {
1469
1472
  cols: a
1470
1473
  };
1471
1474
  }
1472
- const i = e.isRowOriented ? a : r;
1475
+ const s = e.isRowOriented ? a : r;
1473
1476
  if ((e.isRowOriented ? r : a) !== e.k) throw n.BuiltIn.Ref;
1474
1477
  return {
1475
- xs: Yn(t, i, e.k, e.isRowOriented),
1476
- rows: e.isRowOriented ? 1 : i,
1477
- cols: e.isRowOriented ? i : 1
1478
+ xs: kn(t, s, e.k, e.isRowOriented),
1479
+ rows: e.isRowOriented ? 1 : s,
1480
+ cols: e.isRowOriented ? s : 1
1478
1481
  };
1479
1482
  })(e, t);
1480
- a = r.xs, o = r.rows, i = r.cols;
1481
- } else a = t.xs, o = t.yRows, i = t.yCols;
1482
- const s = new Array(o);
1483
+ a = r.xs, o = r.rows, s = r.cols;
1484
+ } else a = t.xs, o = t.yRows, s = t.yCols;
1485
+ const i = new Array(o);
1483
1486
  let u = 0;
1484
1487
  for (let t = 0; t < o; t++) {
1485
- const n = new Array(i);
1486
- for (let t = 0; t < i; t++) n[t] = r(a[u++]);
1487
- s[t] = n;
1488
+ const n = new Array(s);
1489
+ for (let t = 0; t < s; t++) n[t] = r(a[u++]);
1490
+ i[t] = n;
1488
1491
  }
1489
- return s;
1490
- }, On = (t, n, e) => {
1491
- const r = t.length, a = n.length > 0 ? n[0].length : 0, o = [], i = [];
1492
- e && (o.push(new Array(r).fill(1)), i.push(a));
1492
+ return i;
1493
+ }, Ln = (t, n, e) => {
1494
+ const r = t.length, a = n.length > 0 ? n[0].length : 0, o = [], s = [];
1495
+ e && (o.push(new Array(r).fill(1)), s.push(a));
1493
1496
  for (let t = a - 1; t >= 0; t--) {
1494
1497
  const e = new Array(r);
1495
1498
  for (let a = 0; a < r; a++) e[a] = n[a][t];
1496
- o.push(e), i.push(a - 1 - t);
1499
+ o.push(e), s.push(a - 1 - t);
1497
1500
  }
1498
- const s = [], u = [], l = [];
1501
+ const i = [], u = [], l = [];
1499
1502
  for (let t = 0; t < o.length; t++) {
1500
- const n = o[t].slice(), e = Math.sqrt(Ln(n, n)), a = new Array(u.length).fill(0);
1503
+ const n = o[t].slice(), e = Math.sqrt(qn(n, n)), a = new Array(u.length).fill(0);
1501
1504
  for (let t = 0; t < 2; t++) for (let t = 0; t < u.length; t++) {
1502
- const e = Ln(u[t], n);
1505
+ const e = qn(u[t], n);
1503
1506
  for (let a = 0; a < r; a++) n[a] -= e * u[t][a];
1504
1507
  a[t] += e;
1505
1508
  }
1506
- const i = Math.sqrt(Ln(n, n));
1507
- if (!(i <= 1e-10 * (e || 1))) {
1508
- for (let t = 0; t < r; t++) n[t] /= i;
1509
- a.push(i), u.push(n), l.push(a), s.push(t);
1509
+ const s = Math.sqrt(qn(n, n));
1510
+ if (!(s <= 1e-10 * (e || 1))) {
1511
+ for (let t = 0; t < r; t++) n[t] /= s;
1512
+ a.push(s), u.push(n), l.push(a), i.push(t);
1510
1513
  }
1511
1514
  }
1512
- const f = s.length, c = new Array(f);
1513
- for (let n = 0; n < f; n++) c[n] = Ln(u[n], t);
1515
+ const f = i.length, c = new Array(f);
1516
+ for (let n = 0; n < f; n++) c[n] = qn(u[n], t);
1514
1517
  const m = new Array(f).fill(0);
1515
1518
  for (let t = f - 1; t >= 0; t--) {
1516
1519
  let n = c[t];
@@ -1528,7 +1531,7 @@ var wn = (t, e) => {
1528
1531
  }
1529
1532
  const M = new Array(a + 1).fill(0), p = new Array(a + 1).fill(0);
1530
1533
  for (let t = 0; t < f; t++) {
1531
- const n = i[s[t]];
1534
+ const n = s[i[t]];
1532
1535
  M[n] = m[t];
1533
1536
  let e = 0;
1534
1537
  for (let n = t; n < f; n++) e += h[t][n] * h[t][n];
@@ -1544,160 +1547,166 @@ var wn = (t, e) => {
1544
1547
  const r = t[e] - N(n[e] ?? []);
1545
1548
  D += r * r;
1546
1549
  }
1547
- let d = 0;
1550
+ let g = 0;
1548
1551
  if (e) {
1549
1552
  let n = 0;
1550
1553
  for (let e = 0; e < r; e++) n += t[e];
1551
1554
  n /= r;
1552
- for (let e = 0; e < r; e++) d += (t[e] - n) * (t[e] - n);
1553
- } else for (let n = 0; n < r; n++) d += t[n] * t[n];
1554
- const g = d - D, y = e ? f - 1 : f, b = r - y - (e ? 1 : 0), E = b > 0 ? D / b : 0, v = b > 0 ? Math.sqrt(E) : 0, R = new Array(a + 1).fill(0);
1555
- for (let t = 0; t <= a; t++) R[t] = v * Math.sqrt(Math.max(p[t], 0));
1555
+ for (let e = 0; e < r; e++) g += (t[e] - n) * (t[e] - n);
1556
+ } else for (let n = 0; n < r; n++) g += t[n] * t[n];
1557
+ const d = g - D, b = e ? f - 1 : f, y = r - b - (e ? 1 : 0), v = y > 0 ? D / y : 0, E = y > 0 ? Math.sqrt(v) : 0, R = new Array(a + 1).fill(0);
1558
+ for (let t = 0; t <= a; t++) R[t] = E * Math.sqrt(Math.max(p[t], 0));
1556
1559
  return {
1557
1560
  coefficients: M,
1558
1561
  standardErrors: R,
1559
- kEffective: y,
1560
- df: b,
1561
- sey: v,
1562
- r2: 0 === d ? 1 : g / d,
1563
- f: b > 0 && y > 0 && 0 !== E ? g / y / E : null,
1564
- ssReg: g,
1562
+ kEffective: b,
1563
+ df: y,
1564
+ sey: E,
1565
+ r2: 0 === g ? 1 : d / g,
1566
+ f: y > 0 && b > 0 && 0 !== v ? d / b / v : null,
1567
+ ssReg: d,
1565
1568
  ssResid: D,
1566
1569
  predict: N
1567
1570
  };
1568
- }, Pn = (t, e, r) => {
1569
- const a = e.length, o = n.BuiltIn.NA, i = (t, n) => {
1571
+ }, Yn = (t, e, r) => {
1572
+ const a = e.length, o = n.BuiltIn.NA, s = (t, n) => {
1570
1573
  const e = new Array(a).fill(o);
1571
1574
  return e[0] = t, a > 1 && (e[1] = n), e;
1572
- }, s = t.standardErrors.slice();
1573
- return r || (s[a - 1] = o), [
1575
+ }, i = t.standardErrors.slice();
1576
+ return r || (i[a - 1] = o), [
1574
1577
  e.slice(),
1575
- s,
1576
- i(t.r2, t.sey),
1577
- i(t.f ?? n.BuiltIn.Num, t.df),
1578
- i(t.ssReg, t.ssResid)
1578
+ i,
1579
+ s(t.r2, t.sey),
1580
+ s(t.f ?? n.BuiltIn.Num, t.df),
1581
+ s(t.ssReg, t.ssResid)
1579
1582
  ];
1580
- }, Fn = (t, e) => {
1583
+ }, Un = (t, e) => {
1581
1584
  const r = new Array(e);
1582
1585
  let a = 0;
1583
- for (const e of t.values(Dn)) {
1586
+ for (const e of t.values(Vn)) {
1584
1587
  if ("number" != typeof e) throw n.BuiltIn.Value;
1585
1588
  r[a++] = e;
1586
1589
  }
1587
1590
  return r;
1588
- }, Yn = (t, n, e, r) => {
1589
- const a = Fn(t, n * e), o = new Array(n);
1591
+ }, kn = (t, n, e, r) => {
1592
+ const a = Un(t, n * e), o = new Array(n);
1590
1593
  for (let t = 0; t < n; t++) {
1591
- const i = new Array(e);
1592
- for (let o = 0; o < e; o++) i[o] = r ? a[o * n + t] : a[t * e + o];
1593
- o[t] = i;
1594
+ const s = new Array(e);
1595
+ for (let o = 0; o < e; o++) s[o] = r ? a[o * n + t] : a[t * e + o];
1596
+ o[t] = s;
1594
1597
  }
1595
1598
  return o;
1596
- }, Ln = (t, n) => {
1599
+ }, qn = (t, n) => {
1597
1600
  let e = 0;
1598
1601
  for (let r = 0; r < t.length; r++) e += t[r] * n[r];
1599
1602
  return e;
1600
- }, Un = o({
1601
- GROWTH: () => jn,
1602
- LINEST: () => kn,
1603
- LOGEST: () => qn,
1604
- TREND: () => Xn
1603
+ }, Xn = o({
1604
+ GROWTH: () => zn,
1605
+ LINEST: () => jn,
1606
+ LOGEST: () => _n,
1607
+ TREND: () => Gn
1605
1608
  });
1606
- function kn(t, n, e = !0, r = !1) {
1607
- const a = wn(t, n), o = On(a.ys, a.xs, e), i = o.coefficients;
1608
- return r ? Pn(o, i, e) : [i.slice()];
1609
+ function jn(t, n, e = !0, r = !1) {
1610
+ const a = Fn(t, n), o = Ln(a.ys, a.xs, e), s = o.coefficients;
1611
+ return r ? Yn(o, s, e) : [s.slice()];
1609
1612
  }
1610
- function qn(t, n, e = !0, r = !1) {
1611
- const a = wn(t, n), o = On(Vn(a.ys), a.xs, e), i = o.coefficients.map(Math.exp);
1612
- return r ? Pn(o, i, e) : [i];
1613
+ function _n(t, n, e = !0, r = !1) {
1614
+ const a = Fn(t, n), o = Ln(On(a.ys), a.xs, e), s = o.coefficients.map(Math.exp);
1615
+ return r ? Yn(o, s, e) : [s];
1613
1616
  }
1614
- function Xn(t, n, e, r = !0) {
1615
- const a = wn(t, n);
1616
- return Bn(a, e, On(a.ys, a.xs, r).predict);
1617
+ function Gn(t, n, e, r = !0) {
1618
+ const a = Fn(t, n);
1619
+ return Pn(a, e, Ln(a.ys, a.xs, r).predict);
1617
1620
  }
1618
- function jn(t, n, e, r = !0) {
1619
- const a = wn(t, n);
1620
- return Bn(a, e, On(Vn(a.ys), a.xs, r).predict).map((t) => t.map(Math.exp));
1621
+ function zn(t, n, e, r = !0) {
1622
+ const a = Fn(t, n);
1623
+ return Pn(a, e, Ln(On(a.ys), a.xs, r).predict).map((t) => t.map(Math.exp));
1621
1624
  }
1622
- var _n = o({
1623
- TTEST: () => Gn,
1624
- T_TEST: () => zn
1625
+ var Hn = o({
1626
+ TTEST: () => Kn,
1627
+ T_TEST: () => Qn
1625
1628
  });
1626
- function Gn(t, n, e, r) {
1627
- return zn(t, n, e, r);
1629
+ function Kn(t, n, e, r) {
1630
+ return Qn(t, n, e, r);
1628
1631
  }
1629
- function zn(t, e, r, a) {
1632
+ function Qn(t, e, r, a) {
1630
1633
  if (r = Math.floor(r), a = Math.floor(a), ![1, 2].includes(r) || ![
1631
1634
  1,
1632
1635
  2,
1633
1636
  3
1634
1637
  ].includes(a)) return NaN;
1635
- const o = t.getShape(), i = e.getShape(), s = o.rows * o.columns, u = i.rows * i.columns;
1636
- if (1 === a && s !== u) return n.BuiltIn.NA;
1637
- const l = t.flatten(dn), f = e.flatten(dn);
1638
- if (null === l || null === f) return n.BuiltIn.Value;
1639
- if (l.length < 2 || f.length < 2) throw n.BuiltIn.Div0;
1640
- if (1 === a && l.length !== f.length) return n.BuiltIn.NA;
1641
- const c = 1 === a ? function(t, n) {
1642
- const e = t.length;
1643
- let r = 0, a = 0, o = 0;
1644
- for (let i = 0; i < e; i++) r += t[i], a += n[i], o += (t[i] - n[i]) ** 2;
1645
- const i = r - a, s = e * o - i ** 2;
1646
- return 0 === s ? { error: !0 } : {
1647
- x: Math.abs(i) * Math.sqrt((e - 1) / s),
1648
- df: e - 1
1649
- };
1650
- }(l, f) : 2 === a ? function(t, n) {
1651
- const e = t.length, r = n.length;
1652
- let a = 0, o = 0, i = 0, s = 0;
1653
- for (const n of t) a += n, o += n * n;
1654
- for (const t of n) i += t, s += t * t;
1655
- const u = o - a ** 2 / e, l = s - i ** 2 / r, f = Math.sqrt(u + l);
1656
- if (0 === f) return { error: !0 };
1657
- const c = e + r - 2;
1658
- return {
1659
- x: Math.abs(a / e - i / r) / f * Math.sqrt(e * r * c / (e + r)),
1660
- df: c
1661
- };
1662
- }(l, f) : function(t, n) {
1663
- const e = t.length, r = n.length;
1664
- let a = 0, o = 0, i = 0, s = 0;
1665
- for (const n of t) a += n, o += n * n;
1666
- for (const t of n) i += t, s += t * t;
1667
- const u = (o - a ** 2 / e) / (e * (e - 1)), l = (s - i ** 2 / r) / (r * (r - 1));
1668
- if (u + l === 0) return { error: !0 };
1669
- const f = Math.abs(a / e - i / r) / Math.sqrt(u + l), c = u / (u + l);
1670
- return {
1671
- x: f,
1672
- df: 1 / (c ** 2 / (e - 1) + (1 - c) ** 2 / (r - 1))
1673
- };
1674
- }(l, f);
1675
- if ("error" in c) throw n.BuiltIn.Div0;
1638
+ const o = t.getShape(), s = e.getShape(), i = o.rows * o.columns, u = s.rows * s.columns;
1639
+ if (1 === a && i !== u) return n.BuiltIn.NA;
1640
+ let l;
1641
+ if (1 === a) {
1642
+ const r = [], a = [], o = t.flatten(Bn).alignValues([e.flatten(Bn)]);
1643
+ for (const [[t, n]] of o) null !== t && null !== n && (r.push(t), a.push(n));
1644
+ if (r.length < 2) throw n.BuiltIn.Div0;
1645
+ l = function(t, n) {
1646
+ const e = t.length;
1647
+ let r = 0, a = 0, o = 0;
1648
+ for (let s = 0; s < e; s++) r += t[s], a += n[s], o += (t[s] - n[s]) ** 2;
1649
+ const s = r - a, i = e * o - s ** 2;
1650
+ return 0 === i ? { error: !0 } : {
1651
+ x: Math.abs(s) * Math.sqrt((e - 1) / i),
1652
+ df: e - 1
1653
+ };
1654
+ }(r, a);
1655
+ } else {
1656
+ const r = t.getValuesFlat(Bn), o = e.getValuesFlat(Bn);
1657
+ if (r.length < 2 || o.length < 2) throw n.BuiltIn.Div0;
1658
+ l = 2 === a ? function(t, n) {
1659
+ const e = t.length, r = n.length;
1660
+ let a = 0, o = 0, s = 0, i = 0;
1661
+ for (const n of t) a += n, o += n * n;
1662
+ for (const t of n) s += t, i += t * t;
1663
+ const u = o - a ** 2 / e, l = i - s ** 2 / r, f = Math.sqrt(u + l);
1664
+ if (0 === f) return { error: !0 };
1665
+ const c = e + r - 2;
1666
+ return {
1667
+ x: Math.abs(a / e - s / r) / f * Math.sqrt(e * r * c / (e + r)),
1668
+ df: c
1669
+ };
1670
+ }(r, o) : function(t, n) {
1671
+ const e = t.length, r = n.length;
1672
+ let a = 0, o = 0, s = 0, i = 0;
1673
+ for (const n of t) a += n, o += n * n;
1674
+ for (const t of n) s += t, i += t * t;
1675
+ const u = (o - a ** 2 / e) / (e * (e - 1)), l = (i - s ** 2 / r) / (r * (r - 1));
1676
+ if (u + l === 0) return { error: !0 };
1677
+ const f = Math.abs(a / e - s / r) / Math.sqrt(u + l), c = u / (u + l);
1678
+ return {
1679
+ x: f,
1680
+ df: 1 / (c ** 2 / (e - 1) + (1 - c) ** 2 / (r - 1))
1681
+ };
1682
+ }(r, o);
1683
+ }
1684
+ if ("error" in l) throw n.BuiltIn.Div0;
1676
1685
  return function(t, n) {
1677
1686
  const e = .5 * function(t, n, e) {
1678
1687
  if (e <= 0) return 0;
1679
1688
  if (e >= 1) return 1;
1680
- const r = Kn(t) + Kn(n) - Kn(t + n), a = Math.exp(Math.log(e) * t + Math.log(1 - e) * n - r);
1681
- return e < (t + 1) / (t + n + 2) ? a * Hn(t, n, e) / t : 1 - a * Hn(n, t, 1 - e) / n;
1689
+ const r = $n(t) + $n(n) - $n(t + n), a = Math.exp(Math.log(e) * t + Math.log(1 - e) * n - r);
1690
+ return e < (t + 1) / (t + n + 2) ? a * Wn(t, n, e) / t : 1 - a * Wn(n, t, 1 - e) / n;
1682
1691
  }(n / 2, .5, n / (n + t * t));
1683
1692
  return t >= 0 ? 1 - e : e;
1684
- }(-c.x, c.df) * r;
1693
+ }(-l.x, l.df) * r;
1685
1694
  }
1686
- function Hn(t, n, e) {
1687
- const r = 1e-30, a = t + n, o = t + 1, i = t - 1;
1688
- let s = 1, u = 1 - a * e / o;
1695
+ function Wn(t, n, e) {
1696
+ const r = 1e-30, a = t + n, o = t + 1, s = t - 1;
1697
+ let i = 1, u = 1 - a * e / o;
1689
1698
  Math.abs(u) < r && (u = r), u = 1 / u;
1690
1699
  let l = u;
1691
1700
  for (let f = 1; f <= 200; f++) {
1692
1701
  const c = 2 * f;
1693
- let m = f * (n - f) * e / ((i + c) * (t + c));
1694
- u = 1 + m * u, Math.abs(u) < r && (u = r), s = 1 + m / s, Math.abs(s) < r && (s = r), u = 1 / u, l *= u * s, m = -(t + f) * (a + f) * e / ((t + c) * (o + c)), u = 1 + m * u, Math.abs(u) < r && (u = r), s = 1 + m / s, Math.abs(s) < r && (s = r), u = 1 / u;
1695
- const h = u * s;
1696
- if (l *= h, Math.abs(h - 1) < 3e-7) break;
1702
+ let m = f * (n - f) * e / ((s + c) * (t + c));
1703
+ u = 1 + m * u, Math.abs(u) < r && (u = r), i = 1 + m / i, Math.abs(i) < r && (i = r), u = 1 / u, l *= u * i, m = -(t + f) * (a + f) * e / ((t + c) * (o + c)), u = 1 + m * u, Math.abs(u) < r && (u = r), i = 1 + m / i, Math.abs(i) < r && (i = r), u = 1 / u;
1704
+ const h = u * i;
1705
+ if (l *= h, Math.abs(h - 1) < 3e-16) break;
1697
1706
  }
1698
1707
  return l;
1699
1708
  }
1700
- function Kn(t) {
1709
+ function $n(t) {
1701
1710
  const n = [
1702
1711
  .9999999999998099,
1703
1712
  676.5203681218851,
@@ -1709,34 +1718,34 @@ function Kn(t) {
1709
1718
  9984369578019572e-21,
1710
1719
  1.5056327351493116e-7
1711
1720
  ];
1712
- if (t < .5) return Math.log(Math.PI / Math.sin(Math.PI * t)) - Kn(1 - t);
1721
+ if (t < .5) return Math.log(Math.PI / Math.sin(Math.PI * t)) - $n(1 - t);
1713
1722
  t--;
1714
1723
  let e = n[0];
1715
1724
  for (let r = 1; r < 9; r++) e += n[r] / (t + r);
1716
1725
  const r = t + 7.5;
1717
1726
  return .5 * Math.log(2 * Math.PI) + (t + .5) * Math.log(r) - r + Math.log(e);
1718
1727
  }
1719
- var Qn = o({
1720
- REGEXEXTRACT: () => Wn,
1721
- REGEXMATCH: () => $n,
1722
- REGEXREPLACE: () => Zn,
1723
- REGEXTEST: () => Jn
1728
+ var Zn = o({
1729
+ REGEXEXTRACT: () => Jn,
1730
+ REGEXMATCH: () => te,
1731
+ REGEXREPLACE: () => ne,
1732
+ REGEXTEST: () => ee
1724
1733
  });
1725
- function Wn(e, r, a = 0, o = !1) {
1726
- const i = te(r, o);
1727
- if (n.isError(i)) return i;
1734
+ function Jn(e, r, a = 0, o = !1) {
1735
+ const s = re(r, o);
1736
+ if (n.isError(s)) return s;
1728
1737
  if (0 === a) {
1729
- const r = e.match(i);
1738
+ const r = e.match(s);
1730
1739
  return r ? t.createRange().replace([[r[0]]]) : t.createRange().replace([[n.BuiltIn.NA]]);
1731
1740
  }
1732
1741
  if (1 === a) {
1733
- const r = new RegExp(i.source, i.flags + "g"), a = [...e.matchAll(r)];
1742
+ const r = new RegExp(s.source, s.flags + "g"), a = [...e.matchAll(r)];
1734
1743
  if (0 === a.length) return t.createRange().replace([[n.BuiltIn.NA]]);
1735
1744
  const o = a.map((t) => t[0]);
1736
1745
  return t.createRange().replace([o]);
1737
1746
  }
1738
1747
  if (2 === a) {
1739
- const r = e.match(i);
1748
+ const r = e.match(s);
1740
1749
  if (!r) return t.createRange().replace([[n.BuiltIn.NA]]);
1741
1750
  if (1 === r.length) return n.BuiltIn.Value;
1742
1751
  const a = r.slice(1).map((t) => t ?? n.BuiltIn.NA);
@@ -1744,24 +1753,24 @@ function Wn(e, r, a = 0, o = !1) {
1744
1753
  }
1745
1754
  return n.BuiltIn.Value;
1746
1755
  }
1747
- function $n(t, e, r = !1) {
1748
- const a = te(e, r);
1756
+ function te(t, e, r = !1) {
1757
+ const a = re(e, r);
1749
1758
  return n.isError(a) ? a : a.test(t);
1750
1759
  }
1751
- function Zn(t, e, r, a = 0, o = !1) {
1752
- const i = te(e, o);
1753
- if (n.isError(i)) return i;
1760
+ function ne(t, e, r, a = 0, o = !1) {
1761
+ const s = re(e, o);
1762
+ if (n.isError(s)) return s;
1754
1763
  if (0 === a) {
1755
- const n = new RegExp(i.source, i.flags + "g");
1764
+ const n = new RegExp(s.source, s.flags + "g");
1756
1765
  return t.replace(n, r);
1757
1766
  }
1758
- let s = 0, u = t;
1759
- const l = new RegExp(i.source, i.flags);
1767
+ let i = 0, u = t;
1768
+ const l = new RegExp(s.source, s.flags);
1760
1769
  let f = 0;
1761
1770
  for (; f <= u.length;) {
1762
1771
  const t = u.slice(f).match(l);
1763
1772
  if (!t || void 0 === t.index) break;
1764
- if (s++, s === a) {
1773
+ if (i++, i === a) {
1765
1774
  const n = f + t.index;
1766
1775
  u = u.slice(0, n) + t[0].replace(l, r) + u.slice(n + t[0].length);
1767
1776
  break;
@@ -1770,18 +1779,18 @@ function Zn(t, e, r, a = 0, o = !1) {
1770
1779
  }
1771
1780
  return u;
1772
1781
  }
1773
- function Jn(t, e, r = !1) {
1774
- const a = te(e, r);
1782
+ function ee(t, e, r = !1) {
1783
+ const a = re(e, r);
1775
1784
  return n.isError(a) ? a : a.test(t);
1776
1785
  }
1777
- function te(t, e) {
1786
+ function re(t, e) {
1778
1787
  try {
1779
1788
  return new RegExp(t, e ? "i" : "");
1780
1789
  } catch {
1781
1790
  return n.BuiltIn.Value;
1782
1791
  }
1783
1792
  }
1784
- var ne = {
1793
+ var ae = {
1785
1794
  CUBEKPIMEMBER: {
1786
1795
  p: [
1787
1796
  {
@@ -1898,7 +1907,7 @@ var ne = {
1898
1907
  }],
1899
1908
  r: { s: "string" }
1900
1909
  }
1901
- }, ee = { ACCRINT: {
1910
+ }, oe = { ACCRINT: {
1902
1911
  p: [
1903
1912
  { n: "issue" },
1904
1913
  { n: "firstInterest" },
@@ -1919,7 +1928,7 @@ var ne = {
1919
1928
  }
1920
1929
  ],
1921
1930
  r: { s: "number" }
1922
- } }, re = { AMORDEGRC: {
1931
+ } }, se = { AMORDEGRC: {
1923
1932
  p: [
1924
1933
  { n: "cost" },
1925
1934
  { n: "datePurchased" },
@@ -1934,7 +1943,7 @@ var ne = {
1934
1943
  }
1935
1944
  ],
1936
1945
  r: { s: "number" }
1937
- } }, ae = {
1946
+ } }, ie = {
1938
1947
  DATEDIF: {
1939
1948
  p: [
1940
1949
  { n: "startDate" },
@@ -1978,7 +1987,7 @@ var ne = {
1978
1987
  ],
1979
1988
  r: { s: "number" }
1980
1989
  }
1981
- }, oe = {
1990
+ }, ue = {
1982
1991
  COUPDAYS: {
1983
1992
  p: [
1984
1993
  { n: "settlement" },
@@ -1993,24 +2002,74 @@ var ne = {
1993
2002
  r: { s: "number" }
1994
2003
  },
1995
2004
  CUMIPMT: {
2005
+ x: ["noReferenceLift", "noMemberFilter"],
1996
2006
  p: [
1997
- { n: "rate" },
1998
- { n: "nper" },
1999
- { n: "pv" },
2000
- { n: "startPeriod" },
2001
- { n: "endPeriod" },
2002
- { n: "type" }
2007
+ {
2008
+ n: "rate",
2009
+ s: "*",
2010
+ u: 1
2011
+ },
2012
+ {
2013
+ n: "nper",
2014
+ s: "*",
2015
+ u: 1
2016
+ },
2017
+ {
2018
+ n: "pv",
2019
+ s: "*",
2020
+ u: 1
2021
+ },
2022
+ {
2023
+ n: "startPeriod",
2024
+ s: "*",
2025
+ u: 1
2026
+ },
2027
+ {
2028
+ n: "endPeriod",
2029
+ s: "*",
2030
+ u: 1
2031
+ },
2032
+ {
2033
+ n: "type",
2034
+ s: "*",
2035
+ u: 1
2036
+ }
2003
2037
  ],
2004
2038
  r: { s: "number" }
2005
2039
  },
2006
2040
  CUMPRINC: {
2041
+ x: ["noReferenceLift", "noMemberFilter"],
2007
2042
  p: [
2008
- { n: "rate" },
2009
- { n: "nper" },
2010
- { n: "pv" },
2011
- { n: "startPeriod" },
2012
- { n: "endPeriod" },
2013
- { n: "type" }
2043
+ {
2044
+ n: "rate",
2045
+ s: "*",
2046
+ u: 1
2047
+ },
2048
+ {
2049
+ n: "nper",
2050
+ s: "*",
2051
+ u: 1
2052
+ },
2053
+ {
2054
+ n: "pv",
2055
+ s: "*",
2056
+ u: 1
2057
+ },
2058
+ {
2059
+ n: "startPeriod",
2060
+ s: "*",
2061
+ u: 1
2062
+ },
2063
+ {
2064
+ n: "endPeriod",
2065
+ s: "*",
2066
+ u: 1
2067
+ },
2068
+ {
2069
+ n: "type",
2070
+ s: "*",
2071
+ u: 1
2072
+ }
2014
2073
  ],
2015
2074
  r: { s: "number" }
2016
2075
  },
@@ -2065,7 +2124,16 @@ var ne = {
2065
2124
  r: { s: "number" }
2066
2125
  },
2067
2126
  EFFECT: {
2068
- p: [{ n: "nominalRate" }, { n: "npery" }],
2127
+ x: ["noReferenceLift", "noMemberFilter"],
2128
+ p: [{
2129
+ n: "nominalRate",
2130
+ s: "*",
2131
+ u: 1
2132
+ }, {
2133
+ n: "npery",
2134
+ s: "*",
2135
+ u: 1
2136
+ }],
2069
2137
  r: { s: "number" }
2070
2138
  },
2071
2139
  FV: {
@@ -2088,9 +2156,16 @@ var ne = {
2088
2156
  r: { s: "number" }
2089
2157
  },
2090
2158
  FVSCHEDULE: {
2091
- p: [{ n: "principal" }, {
2159
+ x: ["noReferenceLift", "noMemberFilter"],
2160
+ p: [{
2161
+ n: "principal",
2162
+ s: "*",
2163
+ u: 1
2164
+ }, {
2092
2165
  n: "schedule",
2093
- r: "r"
2166
+ r: "r",
2167
+ o: "accept",
2168
+ u: 1
2094
2169
  }],
2095
2170
  r: { s: "number" }
2096
2171
  },
@@ -2145,7 +2220,16 @@ var ne = {
2145
2220
  r: { s: "number" }
2146
2221
  },
2147
2222
  NOMINAL: {
2148
- p: [{ n: "effectiveRate" }, { n: "npery" }],
2223
+ x: ["noReferenceLift", "noMemberFilter"],
2224
+ p: [{
2225
+ n: "effectiveRate",
2226
+ s: "*",
2227
+ u: 1
2228
+ }, {
2229
+ n: "npery",
2230
+ s: "*",
2231
+ u: 1
2232
+ }],
2149
2233
  r: { s: "number" }
2150
2234
  },
2151
2235
  NPER: {
@@ -2387,7 +2471,7 @@ var ne = {
2387
2471
  ],
2388
2472
  r: { s: "*" }
2389
2473
  }
2390
- }, ie = {
2474
+ }, le = {
2391
2475
  ACCRINTM: {
2392
2476
  p: [
2393
2477
  { n: "issue" },
@@ -2490,7 +2574,7 @@ var ne = {
2490
2574
  ],
2491
2575
  r: { s: "number" }
2492
2576
  }
2493
- }, se = {
2577
+ }, fe = {
2494
2578
  COUPDAYBS: {
2495
2579
  p: [
2496
2580
  { n: "settlement" },
@@ -2569,7 +2653,7 @@ var ne = {
2569
2653
  ],
2570
2654
  r: { s: "number" }
2571
2655
  }
2572
- }, ue = {
2656
+ }, ce = {
2573
2657
  PRICE: {
2574
2658
  p: [
2575
2659
  { n: "settlement" },
@@ -2632,7 +2716,7 @@ var ne = {
2632
2716
  ],
2633
2717
  r: { s: "number" }
2634
2718
  }
2635
- }, le = {
2719
+ }, me = {
2636
2720
  ODDFPRICE: {
2637
2721
  p: [
2638
2722
  { n: "settlement" },
@@ -2703,7 +2787,7 @@ var ne = {
2703
2787
  ],
2704
2788
  r: { s: "number" }
2705
2789
  }
2706
- }, fe = { VDB: {
2790
+ }, he = { VDB: {
2707
2791
  p: [
2708
2792
  { n: "cost" },
2709
2793
  { n: "salvage" },
@@ -2723,7 +2807,7 @@ var ne = {
2723
2807
  }
2724
2808
  ],
2725
2809
  r: { s: "number" }
2726
- } }, ce = {
2810
+ } }, Me = {
2727
2811
  "FORECAST.ETS": {
2728
2812
  fn: "FORECAST_ETS",
2729
2813
  p: [
@@ -2843,7 +2927,7 @@ var ne = {
2843
2927
  ],
2844
2928
  r: { s: "*" }
2845
2929
  }
2846
- }, me = {
2930
+ }, pe = {
2847
2931
  LINEST: {
2848
2932
  p: [
2849
2933
  {
@@ -2968,7 +3052,7 @@ var ne = {
2968
3052
  r: "m"
2969
3053
  }
2970
3054
  }
2971
- }, he = {
3055
+ }, Ne = {
2972
3056
  TTEST: {
2973
3057
  p: [
2974
3058
  {
@@ -3004,7 +3088,7 @@ var ne = {
3004
3088
  ],
3005
3089
  r: { s: "number" }
3006
3090
  }
3007
- }, Me = {
3091
+ }, De = {
3008
3092
  REGEXEXTRACT: {
3009
3093
  p: [
3010
3094
  {
@@ -3095,5 +3179,5 @@ var ne = {
3095
3179
  ],
3096
3180
  r: { s: "*" }
3097
3181
  }
3098
- }, pe = () => import("./BKnXVC21NesUzU9t.mjs"), Ne = () => import("./CShl-IMQIPnBMVpb.mjs"), De = () => import("./y9VKeU12ARR9HmtI.mjs"), de = () => import("./CN-pAKHIFQkkdFFB.mjs"), ge = () => import("./C2TyRseZg5dWtMq1.mjs"), ye = () => import("./fhXUc-E6MSehd9Ep.mjs"), be = () => import("./XATNfSb9mKkYP5Fr.mjs"), Ee = () => import("./CsrMSYiKGo3-I_Qk.mjs"), ve = () => import("./DsJzZKURvUm7apNu.mjs"), Re = () => import("./ffkoQUSdLhFyILRL.mjs"), Ie = () => import("./DxiRpwBhgWoK5Erd.mjs"), Se = () => import("./v9tvQuvQYcFQ0zOs.mjs"), Ce = () => import("./C21UeAwlG4Qkfu1Z.mjs"), Te = () => import("./DoS1jziW_TXjkH37.mjs"), xe = (t, n, e) => (e || (e = /* @__PURE__ */ new Map()), n(e, t, i, ne, pe, "Cube"), n(e, t, q, ee, Ne, "Financial"), n(e, t, _, re, De, "Financial"), n(e, t, H, ae, de, "Financial"), n(e, t, J, oe, ge, "Financial"), n(e, t, Ft, ie, ye, "Financial"), n(e, t, Gt, se, be, "Financial"), n(e, t, tn, ue, Ee, "Financial"), n(e, t, on, le, ve, "Financial"), n(e, t, pn, fe, Re, "Financial"), n(e, t, gn, ce, Ie, "Statistical"), n(e, t, Un, me, Se, "Statistical"), n(e, t, _n, he, Ce, "Statistical"), n(e, t, Qn, Me, Te, "Text"), e);
3099
- export { xe as default };
3182
+ }, ge = () => import("./BuGemmv84T8m0wqw.mjs"), de = () => import("./CwoMEzOtRihuYUTr.mjs"), be = () => import("./CnVJ8GAsshRjRGA-.mjs"), ye = () => import("./BRwwvGaJ6HvkxjFC.mjs"), ve = () => import("./Dy6UD7hQRBsT0WNp.mjs"), Ee = () => import("./DodhOXkSzelSxHmB.mjs"), Re = () => import("./Bma3CN4_Nec6_4n7.mjs"), Ie = () => import("./B1VmvhXuEn7zaTB9.mjs"), Se = () => import("./vu0NRDeeTbEHPMYS.mjs"), Ce = () => import("./COqdI1LYTHd9oLA6.mjs"), xe = () => import("./DpoZ7h1ScIJvbOY9.mjs"), Te = () => import("./BQyZVLTMNFLbjVap.mjs"), Ae = () => import("./LAkTk93odAfpvx50.mjs"), we = () => import("./srpVt74r2zbvm1N0.mjs"), Ve = (t, n, e) => (e || (e = /* @__PURE__ */ new Map()), n(e, t, s, ae, ge, "Cube"), n(e, t, q, oe, de, "Financial"), n(e, t, _, se, be, "Financial"), n(e, t, K, ie, ye, "Financial"), n(e, t, tt, ue, ve, "Financial"), n(e, t, Ut, le, Ee, "Financial"), n(e, t, Kt, fe, Re, "Financial"), n(e, t, rn, ce, Ie, "Financial"), n(e, t, ln, me, Se, "Financial"), n(e, t, gn, he, Ce, "Financial"), n(e, t, bn, Me, xe, "Statistical"), n(e, t, Xn, pe, Te, "Statistical"), n(e, t, Hn, Ne, Ae, "Statistical"), n(e, t, Zn, De, we, "Text"), e);
3183
+ export { Ve as default };