@univerjs/sheets-formula 0.5.4 → 0.5.5-nightly.202501201336
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +198 -198
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Ha = Object.defineProperty;
|
|
2
2
|
var Ya = (n, e, a) => e in n ? Ha(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a;
|
|
3
3
|
var X = (n, e, a) => Ya(n, typeof e != "symbol" ? e + "" : e, a);
|
|
4
|
-
import { CommandType as ma, ICommandService as de, ObjectMatrix as w, Tools as Ne, Rectangle as De, cellToRange as fa, Direction as He, isFormulaString as be, isFormulaId as ca, getIntersectRange as Ve, RANGE_TYPE as Y, Inject as W, Disposable as te, UniverInstanceType as ee, IUniverInstanceService as xe, LifecycleService as wa, LocaleService as Ot, ILogService as Xa, IConfigService as _e, Injector as at, createIdentifier as Mt, toDisposable as se, moveRangeByOffset as Et, DisposableCollection as Ye, AbsoluteRefType as we, Optional as Wa, Dimension as Bt, InterceptorEffectEnum as Ka, CellValueType as vt, DependentOn as la, Plugin as sa, merge as pa, touchDependencies as qe, isNodeEnv as Vt } from "@univerjs/core";
|
|
5
|
-
import { SetRangeValuesCommand as
|
|
6
|
-
import { sequenceNodeType as J, deserializeRangeWithSheetWithCache as pe, serializeRangeToRefString as nt, ErrorType as j, LexerTreeBuilder as yt, generateStringWithSequence as Xe, SetDefinedNameMutation as Me, IDefinedNamesService as qt, SetFormulaCalculationResultMutation as
|
|
7
|
-
import { Subject as aa, BehaviorSubject as ya, bufferWhen as
|
|
8
|
-
import { IRPCChannelService as qa, fromModule as
|
|
9
|
-
const
|
|
4
|
+
import { CommandType as ma, ICommandService as de, ObjectMatrix as w, Tools as Ne, Rectangle as De, cellToRange as fa, Direction as He, isFormulaString as be, isFormulaId as ca, getIntersectRange as Ve, RANGE_TYPE as Y, Inject as W, Disposable as te, UniverInstanceType as ee, IUniverInstanceService as xe, LifecycleService as wa, LocaleService as Ot, ILogService as Xa, IConfigService as _e, Injector as at, createIdentifier as Mt, toDisposable as se, moveRangeByOffset as Et, DisposableCollection as Ye, AbsoluteRefType as we, Optional as Wa, Dimension as Bt, InterceptorEffectEnum as Ka, CellValueType as vt, isRealNum as Qa, DependentOn as la, Plugin as sa, merge as pa, touchDependencies as qe, isNodeEnv as Vt } from "@univerjs/core";
|
|
5
|
+
import { SetRangeValuesCommand as ka, SetRangeValuesMutation as ie, handleMoveRange as da, EffectRefRangId as G, runRefRangeMutations as H, handleMoveRows as La, handleMoveCols as Pa, handleInsertRow as Ta, handleInsertCol as Ea, handleIRemoveRow as Ia, handleIRemoveCol as Na, handleDeleteRangeMoveLeft as Ra, handleDeleteRangeMoveUp as Aa, handleInsertRangeMoveDown as Sa, handleInsertRangeMoveRight as Ca, RemoveDefinedNameCommand as Da, SetDefinedNameCommand as ba, RemoveSheetCommand as $a, SetWorksheetNameCommand as ja, DeleteRangeMoveLeftCommand as za, DeleteRangeMoveUpCommand as Za, RemoveColCommand as Ja, RemoveRowCommand as en, InsertRangeMoveDownCommand as tn, InsertRangeMoveRightCommand as an, InsertColCommand as nn, InsertRowCommand as rn, MoveColsCommand as on, MoveRowsCommand as un, MoveRangeCommand as mn, SheetInterceptorService as xt, SetStyleCommand as _t, SetBorderCommand as Oa, ClearSelectionFormatCommand as Ma, RemoveSheetMutation as It, InsertSheetMutation as Nt, RefRangeService as fn, handleDefaultRangeChangeWithEffectRefCommands as Gt, getSeparateEffectedRangesOnCommand as cn, handleCommonDefaultRangeChangeWithEffectRefCommands as ln, MoveRangeMutation as Ht, MoveRowsMutation as Yt, MoveColsMutation as wt, ReorderRangeMutation as Xt, RemoveRowMutation as Wt, RemoveColMutation as Kt, InsertColMutation as Qt, InsertRowMutation as kt, INTERCEPTOR_POINT as sn, SetWorksheetActiveOperation as pn, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as mt, UniverSheetsPlugin as dn } from "@univerjs/sheets";
|
|
6
|
+
import { sequenceNodeType as J, deserializeRangeWithSheetWithCache as pe, serializeRangeToRefString as nt, ErrorType as j, LexerTreeBuilder as yt, generateStringWithSequence as Xe, SetDefinedNameMutation as Me, IDefinedNamesService as qt, SetFormulaCalculationResultMutation as Ln, RemoveOtherFormulaMutation as Pn, IActiveDirtyManagerService as gt, SetOtherFormulaMutation as Tn, FormulaDataModel as it, SetFormulaCalculationStartMutation as Se, SetFormulaCalculationStopMutation as $t, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as jt, SetFormulaCalculationNotificationMutation as En, FormulaExecuteStageType as ge, FormulaExecutedStateType as Re, SetFormulaDataMutation as he, SetArrayFormulaDataMutation as Rt, initSheetFormulaData as zt, FUNCTION_NAMES_ARRAY as Zt, FunctionType as t, FUNCTION_NAMES_COMPATIBILITY as _, FUNCTION_NAMES_CUBE as ce, FUNCTION_NAMES_DATABASE as $, FUNCTION_NAMES_DATE as B, FUNCTION_NAMES_ENGINEERING as A, FUNCTION_NAMES_FINANCIAL as C, FUNCTION_NAMES_INFORMATION as v, FUNCTION_NAMES_LOGICAL as K, FUNCTION_NAMES_LOOKUP as y, FUNCTION_NAMES_MATH as T, FUNCTION_NAMES_STATISTICAL as l, FUNCTION_NAMES_TEXT as D, FUNCTION_NAMES_WEB as ft, isReferenceStrings as In, functionArray as Nn, functionCompatibility as Rn, functionCube as An, functionDatabase as Sn, functionDate as Cn, functionEngineering as Dn, functionFinancial as bn, functionInformation as On, functionLogical as Mn, functionLookup as xn, functionMath as _n, functionMeta as yn, functionStatistical as qn, functionText as gn, functionUniver as hn, functionWeb as Un, IFunctionService as ht, serializeRangeWithSpreadsheet as Jt, serializeRangeWithSheet as ea, serializeRange as ta, CustomFunction as At, AsyncCustomFunction as xa, RemoveDefinedNameMutation as St, stripErrorMargin as Fn, UniverFormulaEnginePlugin as _a } from "@univerjs/engine-formula";
|
|
7
|
+
import { Subject as aa, BehaviorSubject as ya, bufferWhen as Bn, filter as na, map as vn } from "rxjs";
|
|
8
|
+
import { IRPCChannelService as qa, fromModule as Vn, toModule as Gn } from "@univerjs/rpc";
|
|
9
|
+
const Hn = {
|
|
10
10
|
id: "formula.command.insert-function",
|
|
11
11
|
type: ma.COMMAND,
|
|
12
12
|
handler: async (n, e) => {
|
|
@@ -27,7 +27,7 @@ const Gn = {
|
|
|
27
27
|
const o = {
|
|
28
28
|
value: r.getData()
|
|
29
29
|
};
|
|
30
|
-
return i.executeCommand(
|
|
30
|
+
return i.executeCommand(ka.id, o);
|
|
31
31
|
}
|
|
32
32
|
}, Ge = {
|
|
33
33
|
type: ma.MUTATION,
|
|
@@ -36,7 +36,7 @@ const Gn = {
|
|
|
36
36
|
return !0;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
function
|
|
39
|
+
function Yn(n, e, a) {
|
|
40
40
|
var i;
|
|
41
41
|
return n == null || n[e] == null || ((i = n[e]) == null ? void 0 : i[a]) == null;
|
|
42
42
|
}
|
|
@@ -55,18 +55,18 @@ function ct(n, e, a) {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
var q = /* @__PURE__ */ ((n) => (n[n.MoveRange = 0] = "MoveRange", n[n.MoveRows = 1] = "MoveRows", n[n.MoveCols = 2] = "MoveCols", n[n.InsertRow = 3] = "InsertRow", n[n.InsertColumn = 4] = "InsertColumn", n[n.RemoveRow = 5] = "RemoveRow", n[n.RemoveColumn = 6] = "RemoveColumn", n[n.DeleteMoveLeft = 7] = "DeleteMoveLeft", n[n.DeleteMoveUp = 8] = "DeleteMoveUp", n[n.InsertMoveDown = 9] = "InsertMoveDown", n[n.InsertMoveRight = 10] = "InsertMoveRight", n[n.SetName = 11] = "SetName", n[n.RemoveSheet = 12] = "RemoveSheet", n[n.SetDefinedName = 13] = "SetDefinedName", n[n.RemoveDefinedName = 14] = "RemoveDefinedName", n))(q || {});
|
|
58
|
-
const
|
|
58
|
+
const wn = [
|
|
59
59
|
11,
|
|
60
60
|
12,
|
|
61
61
|
13,
|
|
62
62
|
14
|
|
63
63
|
/* RemoveDefinedName */
|
|
64
64
|
];
|
|
65
|
-
function
|
|
65
|
+
function Xn(n, e, a) {
|
|
66
66
|
const { type: i } = a;
|
|
67
|
-
return
|
|
67
|
+
return wn.includes(i) ? Wn(n, e) : Kn(n, e, a);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Wn(n, e) {
|
|
70
70
|
const a = [], i = [];
|
|
71
71
|
return Object.keys(e).forEach((r) => {
|
|
72
72
|
const o = e[r], u = n[r];
|
|
@@ -105,8 +105,8 @@ function Xn(n, e) {
|
|
|
105
105
|
redos: i
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
const { redoFormulaData: i, undoFormulaData: r } =
|
|
108
|
+
function Kn(n, e, a) {
|
|
109
|
+
const { redoFormulaData: i, undoFormulaData: r } = Qn(n, e, a);
|
|
110
110
|
if (Ne.diffValue(i, r))
|
|
111
111
|
return {
|
|
112
112
|
undos: [],
|
|
@@ -146,10 +146,10 @@ function Wn(n, e, a) {
|
|
|
146
146
|
redos: o
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Qn(n, e, a) {
|
|
150
150
|
const i = {}, r = {}, { type: o, unitId: u, sheetId: m, range: f, from: s, to: p } = a;
|
|
151
151
|
return (/* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(e)])).forEach((L) => {
|
|
152
|
-
if (
|
|
152
|
+
if (Yn(n, L, m))
|
|
153
153
|
return;
|
|
154
154
|
(/* @__PURE__ */ new Set([
|
|
155
155
|
...Object.keys(n[L] || {}),
|
|
@@ -158,8 +158,8 @@ function Kn(n, e, a) {
|
|
|
158
158
|
var F, U;
|
|
159
159
|
const S = (F = n[L]) == null ? void 0 : F[I], c = (U = e[L]) == null ? void 0 : U[I], N = new w(S || {}), R = new w(c || {});
|
|
160
160
|
let P = [];
|
|
161
|
-
L !== u || I !== m ? P =
|
|
162
|
-
const O =
|
|
161
|
+
L !== u || I !== m ? P = $n(R) : P = kn(N, o, s, p, f);
|
|
162
|
+
const O = fi(P, N, R), M = ci(P, N);
|
|
163
163
|
i[L] || (i[L] = {}), r[L] || (r[L] = {}), i[L][I] = {
|
|
164
164
|
...i[L][I],
|
|
165
165
|
...O
|
|
@@ -173,7 +173,7 @@ function Kn(n, e, a) {
|
|
|
173
173
|
undoFormulaData: r
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function kn(n, e, a, i, r) {
|
|
177
177
|
const o = [];
|
|
178
178
|
return n.forValue((u, m, f) => {
|
|
179
179
|
if (f == null || !ga(f)) return !0;
|
|
@@ -185,15 +185,15 @@ function Qn(n, e, a, i, r) {
|
|
|
185
185
|
2
|
|
186
186
|
/* MoveCols */
|
|
187
187
|
].includes(e))
|
|
188
|
-
p =
|
|
188
|
+
p = jn(e, a, i, s);
|
|
189
189
|
else if (r != null) {
|
|
190
|
-
const L =
|
|
190
|
+
const L = zn(e, r, s);
|
|
191
191
|
p = L.newCell, d = L.isReverse;
|
|
192
192
|
}
|
|
193
193
|
d ? o.unshift({ oldCell: s, newCell: p }) : o.push({ oldCell: s, newCell: p });
|
|
194
194
|
}), o;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function $n(n) {
|
|
197
197
|
const e = [];
|
|
198
198
|
return n.forValue((a, i, r) => {
|
|
199
199
|
if (r == null || !ga(r)) return !0;
|
|
@@ -201,51 +201,51 @@ function kn(n) {
|
|
|
201
201
|
e.push({ oldCell: o, newCell: o });
|
|
202
202
|
}), e;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function jn(n, e, a, i) {
|
|
205
205
|
if (e == null || a == null)
|
|
206
206
|
return null;
|
|
207
207
|
switch (n) {
|
|
208
208
|
case 0:
|
|
209
|
-
return zn(e, a, i);
|
|
210
|
-
case 1:
|
|
211
209
|
return Zn(e, a, i);
|
|
212
|
-
case
|
|
210
|
+
case 1:
|
|
213
211
|
return Jn(e, a, i);
|
|
212
|
+
case 2:
|
|
213
|
+
return ei(e, a, i);
|
|
214
214
|
default:
|
|
215
215
|
return null;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function zn(n, e, a) {
|
|
219
219
|
let i = null, r = !1;
|
|
220
220
|
switch (n) {
|
|
221
221
|
case 3:
|
|
222
|
-
i =
|
|
222
|
+
i = ti(e, a), r = !0;
|
|
223
223
|
break;
|
|
224
224
|
case 4:
|
|
225
|
-
i =
|
|
225
|
+
i = ai(e, a), r = !0;
|
|
226
226
|
break;
|
|
227
227
|
case 5:
|
|
228
|
-
i =
|
|
228
|
+
i = ni(e, a);
|
|
229
229
|
break;
|
|
230
230
|
case 6:
|
|
231
|
-
i =
|
|
231
|
+
i = ii(e, a);
|
|
232
232
|
break;
|
|
233
233
|
case 7:
|
|
234
|
-
i =
|
|
234
|
+
i = ri(e, a);
|
|
235
235
|
break;
|
|
236
236
|
case 8:
|
|
237
|
-
i =
|
|
237
|
+
i = oi(e, a);
|
|
238
238
|
break;
|
|
239
239
|
case 9:
|
|
240
|
-
i =
|
|
240
|
+
i = ui(e, a), r = !0;
|
|
241
241
|
break;
|
|
242
242
|
case 10:
|
|
243
|
-
i =
|
|
243
|
+
i = mi(e, a), r = !0;
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
246
246
|
return { newCell: i, isReverse: r };
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Zn(n, e, a) {
|
|
249
249
|
const i = da(
|
|
250
250
|
{
|
|
251
251
|
id: G.MoveRangeCommandId,
|
|
@@ -255,7 +255,7 @@ function zn(n, e, a) {
|
|
|
255
255
|
);
|
|
256
256
|
return H(i, a);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Jn(n, e, a) {
|
|
259
259
|
const i = La(
|
|
260
260
|
{
|
|
261
261
|
id: G.MoveRowsCommandId,
|
|
@@ -265,7 +265,7 @@ function Zn(n, e, a) {
|
|
|
265
265
|
);
|
|
266
266
|
return H(i, a);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function ei(n, e, a) {
|
|
269
269
|
const i = Pa(
|
|
270
270
|
{
|
|
271
271
|
id: G.MoveColsCommandId,
|
|
@@ -275,7 +275,7 @@ function Jn(n, e, a) {
|
|
|
275
275
|
);
|
|
276
276
|
return H(i, a);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function ti(n, e) {
|
|
279
279
|
const a = Ta(
|
|
280
280
|
{
|
|
281
281
|
id: G.InsertRowCommandId,
|
|
@@ -285,7 +285,7 @@ function ei(n, e) {
|
|
|
285
285
|
);
|
|
286
286
|
return H(a, e);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function ai(n, e) {
|
|
289
289
|
const a = Ea(
|
|
290
290
|
{
|
|
291
291
|
id: G.InsertColCommandId,
|
|
@@ -295,7 +295,7 @@ function ti(n, e) {
|
|
|
295
295
|
);
|
|
296
296
|
return H(a, e);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function ni(n, e) {
|
|
299
299
|
const a = Ia(
|
|
300
300
|
{
|
|
301
301
|
id: G.RemoveRowCommandId,
|
|
@@ -305,7 +305,7 @@ function ai(n, e) {
|
|
|
305
305
|
);
|
|
306
306
|
return H(a, e);
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function ii(n, e) {
|
|
309
309
|
const a = Na(
|
|
310
310
|
{
|
|
311
311
|
id: G.RemoveColCommandId,
|
|
@@ -315,7 +315,7 @@ function ni(n, e) {
|
|
|
315
315
|
);
|
|
316
316
|
return H(a, e);
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function ri(n, e) {
|
|
319
319
|
const a = Ra(
|
|
320
320
|
{
|
|
321
321
|
id: G.DeleteRangeMoveLeftCommandId,
|
|
@@ -325,7 +325,7 @@ function ii(n, e) {
|
|
|
325
325
|
);
|
|
326
326
|
return H(a, e);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function oi(n, e) {
|
|
329
329
|
const a = Aa(
|
|
330
330
|
{
|
|
331
331
|
id: G.DeleteRangeMoveUpCommandId,
|
|
@@ -335,7 +335,7 @@ function ri(n, e) {
|
|
|
335
335
|
);
|
|
336
336
|
return H(a, e);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function ui(n, e) {
|
|
339
339
|
const a = Sa(
|
|
340
340
|
{
|
|
341
341
|
id: G.InsertRangeMoveDownCommandId,
|
|
@@ -345,7 +345,7 @@ function oi(n, e) {
|
|
|
345
345
|
);
|
|
346
346
|
return H(a, e);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function mi(n, e) {
|
|
349
349
|
const a = Ca(
|
|
350
350
|
{
|
|
351
351
|
id: G.InsertRangeMoveRightCommandId,
|
|
@@ -355,7 +355,7 @@ function ui(n, e) {
|
|
|
355
355
|
);
|
|
356
356
|
return H(a, e);
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function fi(n, e, a) {
|
|
359
359
|
const i = new w({});
|
|
360
360
|
return n.forEach((r) => {
|
|
361
361
|
const { oldCell: o, newCell: u } = r, { startRow: m, startColumn: f } = o, s = a.getValue(m, f) || e.getValue(m, f), p = rt(s);
|
|
@@ -365,7 +365,7 @@ function mi(n, e, a) {
|
|
|
365
365
|
}
|
|
366
366
|
}), i.getMatrix();
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function ci(n, e) {
|
|
369
369
|
const a = new w({});
|
|
370
370
|
return n.reverse().forEach((i) => {
|
|
371
371
|
const { oldCell: r, newCell: o } = i, { startRow: u, startColumn: m } = r, f = e.getValue(u, m), s = rt(f);
|
|
@@ -388,7 +388,7 @@ function rt(n) {
|
|
|
388
388
|
const m = {};
|
|
389
389
|
return u && (m.si = a), o && i === 0 && r === 0 && (m.f = e), m.f === void 0 && (m.f = null), m.si === void 0 && (m.si = null), m;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function li(n) {
|
|
392
392
|
const e = new w({});
|
|
393
393
|
return new w(n).forValue((i, r, o) => {
|
|
394
394
|
const u = rt(o);
|
|
@@ -726,50 +726,50 @@ function Ba(n, e) {
|
|
|
726
726
|
const { id: a } = e;
|
|
727
727
|
let i = null;
|
|
728
728
|
switch (a) {
|
|
729
|
+
case mn.id:
|
|
730
|
+
i = si(e, n);
|
|
731
|
+
break;
|
|
729
732
|
case un.id:
|
|
730
|
-
i =
|
|
733
|
+
i = pi(e, n);
|
|
731
734
|
break;
|
|
732
735
|
case on.id:
|
|
733
|
-
i =
|
|
736
|
+
i = di(e, n);
|
|
734
737
|
break;
|
|
735
738
|
case rn.id:
|
|
736
|
-
i =
|
|
739
|
+
i = Li(e);
|
|
737
740
|
break;
|
|
738
741
|
case nn.id:
|
|
739
|
-
i =
|
|
742
|
+
i = Pi(e);
|
|
740
743
|
break;
|
|
741
744
|
case an.id:
|
|
742
|
-
i =
|
|
745
|
+
i = Ti(e, n);
|
|
743
746
|
break;
|
|
744
747
|
case tn.id:
|
|
745
|
-
i =
|
|
748
|
+
i = Ei(e, n);
|
|
746
749
|
break;
|
|
747
750
|
case en.id:
|
|
748
|
-
i =
|
|
751
|
+
i = Ii(e, n);
|
|
749
752
|
break;
|
|
750
753
|
case Ja.id:
|
|
751
|
-
i =
|
|
754
|
+
i = Ni(e, n);
|
|
752
755
|
break;
|
|
753
756
|
case Za.id:
|
|
754
|
-
i =
|
|
757
|
+
i = Ri(e, n);
|
|
755
758
|
break;
|
|
756
759
|
case za.id:
|
|
757
|
-
i =
|
|
760
|
+
i = Ai(e, n);
|
|
758
761
|
break;
|
|
759
762
|
case ja.id:
|
|
760
|
-
i =
|
|
763
|
+
i = Si(e, n);
|
|
761
764
|
break;
|
|
762
765
|
case $a.id:
|
|
763
|
-
i =
|
|
764
|
-
break;
|
|
765
|
-
case ka.id:
|
|
766
|
-
i = Si(e, n);
|
|
766
|
+
i = Ci(e, n);
|
|
767
767
|
break;
|
|
768
768
|
case ba.id:
|
|
769
|
-
i =
|
|
769
|
+
i = Di(e, n);
|
|
770
770
|
break;
|
|
771
771
|
case Da.id:
|
|
772
|
-
i =
|
|
772
|
+
i = bi(e, n);
|
|
773
773
|
break;
|
|
774
774
|
}
|
|
775
775
|
return i;
|
|
@@ -782,7 +782,7 @@ function Z(n) {
|
|
|
782
782
|
sheetId: a
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function si(n, e) {
|
|
786
786
|
const { params: a } = n;
|
|
787
787
|
if (!a) return null;
|
|
788
788
|
const { fromRange: i, toRange: r } = a;
|
|
@@ -796,7 +796,7 @@ function li(n, e) {
|
|
|
796
796
|
sheetId: u
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function pi(n, e) {
|
|
800
800
|
const { params: a } = n;
|
|
801
801
|
if (!a) return null;
|
|
802
802
|
const {
|
|
@@ -825,7 +825,7 @@ function si(n, e) {
|
|
|
825
825
|
sheetId: s
|
|
826
826
|
};
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function di(n, e) {
|
|
829
829
|
const { params: a } = n;
|
|
830
830
|
if (!a) return null;
|
|
831
831
|
const {
|
|
@@ -854,7 +854,7 @@ function pi(n, e) {
|
|
|
854
854
|
sheetId: s
|
|
855
855
|
};
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function Li(n) {
|
|
858
858
|
const { params: e } = n;
|
|
859
859
|
if (!e) return null;
|
|
860
860
|
const { range: a, unitId: i, subUnitId: r } = e;
|
|
@@ -865,7 +865,7 @@ function di(n) {
|
|
|
865
865
|
sheetId: r
|
|
866
866
|
};
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Pi(n) {
|
|
869
869
|
const { params: e } = n;
|
|
870
870
|
if (!e) return null;
|
|
871
871
|
const { range: a, unitId: i, subUnitId: r } = e;
|
|
@@ -876,7 +876,7 @@ function Li(n) {
|
|
|
876
876
|
sheetId: r
|
|
877
877
|
};
|
|
878
878
|
}
|
|
879
|
-
function
|
|
879
|
+
function Ti(n, e) {
|
|
880
880
|
const { params: a } = n;
|
|
881
881
|
if (!a) return null;
|
|
882
882
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -887,7 +887,7 @@ function Pi(n, e) {
|
|
|
887
887
|
sheetId: o
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Ei(n, e) {
|
|
891
891
|
const { params: a } = n;
|
|
892
892
|
if (!a) return null;
|
|
893
893
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -898,7 +898,7 @@ function Ti(n, e) {
|
|
|
898
898
|
sheetId: o
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Ii(n, e) {
|
|
902
902
|
const { params: a } = n;
|
|
903
903
|
if (!a) return null;
|
|
904
904
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -909,7 +909,7 @@ function Ei(n, e) {
|
|
|
909
909
|
sheetId: o
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function Ni(n, e) {
|
|
913
913
|
const { params: a } = n;
|
|
914
914
|
if (!a) return null;
|
|
915
915
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -920,7 +920,7 @@ function Ii(n, e) {
|
|
|
920
920
|
sheetId: o
|
|
921
921
|
};
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function Ri(n, e) {
|
|
924
924
|
const { params: a } = n;
|
|
925
925
|
if (!a) return null;
|
|
926
926
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -931,7 +931,7 @@ function Ni(n, e) {
|
|
|
931
931
|
sheetId: o
|
|
932
932
|
};
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Ai(n, e) {
|
|
935
935
|
const { params: a } = n;
|
|
936
936
|
if (!a) return null;
|
|
937
937
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -942,7 +942,7 @@ function Ri(n, e) {
|
|
|
942
942
|
sheetId: o
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function Si(n, e) {
|
|
946
946
|
const { params: a } = n;
|
|
947
947
|
if (!a) return null;
|
|
948
948
|
const { unitId: i, subUnitId: r, name: o } = a, { unitId: u, sheetId: m } = Z(e);
|
|
@@ -953,7 +953,7 @@ function Ai(n, e) {
|
|
|
953
953
|
sheetName: o
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Ci(n, e) {
|
|
957
957
|
const { params: a } = n;
|
|
958
958
|
if (!a) return null;
|
|
959
959
|
const { unitId: i, subUnitId: r } = a, { unitId: o, sheetId: u } = Z(e);
|
|
@@ -963,7 +963,7 @@ function Si(n, e) {
|
|
|
963
963
|
sheetId: r || u
|
|
964
964
|
};
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Di(n, e) {
|
|
967
967
|
const { params: a } = n;
|
|
968
968
|
if (!a) return null;
|
|
969
969
|
const { unitId: i, name: r, id: o } = a, { sheetId: u } = Z(e);
|
|
@@ -975,7 +975,7 @@ function Ci(n, e) {
|
|
|
975
975
|
definedNameId: o
|
|
976
976
|
};
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function bi(n, e) {
|
|
979
979
|
const { params: a } = n;
|
|
980
980
|
if (!a) return null;
|
|
981
981
|
const { unitId: i, name: r, id: o } = a, { sheetId: u } = Z(e);
|
|
@@ -987,10 +987,10 @@ function Di(n, e) {
|
|
|
987
987
|
definedNameId: o
|
|
988
988
|
};
|
|
989
989
|
}
|
|
990
|
-
var
|
|
991
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
990
|
+
var Oi = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, xi = (n, e, a, i) => {
|
|
991
|
+
for (var r = i > 1 ? void 0 : i ? Mi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
992
992
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
993
|
-
return i && r &&
|
|
993
|
+
return i && r && Oi(e, a, r), r;
|
|
994
994
|
}, Ue = (n, e) => (a, i) => e(a, i, n);
|
|
995
995
|
let We = class extends te {
|
|
996
996
|
constructor(n, e, a, i) {
|
|
@@ -1108,16 +1108,16 @@ let We = class extends te {
|
|
|
1108
1108
|
return ((o = this._definedNamesService.getWorksheetByRef(e, i)) == null ? void 0 : o.getSheetId()) === a ? j.REF : null;
|
|
1109
1109
|
}
|
|
1110
1110
|
};
|
|
1111
|
-
We =
|
|
1111
|
+
We = xi([
|
|
1112
1112
|
Ue(0, qt),
|
|
1113
1113
|
Ue(1, xe),
|
|
1114
1114
|
Ue(2, W(xt)),
|
|
1115
1115
|
Ue(3, W(yt))
|
|
1116
1116
|
], We);
|
|
1117
|
-
var Ce = /* @__PURE__ */ ((n) => (n[n.NOT_REGISTER = 1] = "NOT_REGISTER", n[n.SUCCESS = 2] = "SUCCESS", n[n.WAIT = 3] = "WAIT", n[n.ERROR = 4] = "ERROR", n))(Ce || {}),
|
|
1118
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1117
|
+
var Ce = /* @__PURE__ */ ((n) => (n[n.NOT_REGISTER = 1] = "NOT_REGISTER", n[n.SUCCESS = 2] = "SUCCESS", n[n.WAIT = 3] = "WAIT", n[n.ERROR = 4] = "ERROR", n))(Ce || {}), _i = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, qi = (n, e, a, i) => {
|
|
1118
|
+
for (var r = i > 1 ? void 0 : i ? yi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1119
1119
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1120
|
-
return i && r &&
|
|
1120
|
+
return i && r && _i(e, a, r), r;
|
|
1121
1121
|
}, pt = (n, e) => (a, i) => e(a, i, n);
|
|
1122
1122
|
let Ke = class extends te {
|
|
1123
1123
|
constructor(e, a, i) {
|
|
@@ -1169,7 +1169,7 @@ let Ke = class extends te {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
1171
|
};
|
|
1172
|
-
this._commandService.executeCommand(
|
|
1172
|
+
this._commandService.executeCommand(Tn.id, s).then(() => {
|
|
1173
1173
|
this._commandService.executeCommand(
|
|
1174
1174
|
Ge.id,
|
|
1175
1175
|
{ [i]: { [r]: { [u]: !0 } } }
|
|
@@ -1177,14 +1177,14 @@ let Ke = class extends te {
|
|
|
1177
1177
|
});
|
|
1178
1178
|
};
|
|
1179
1179
|
this.disposeWithMe(
|
|
1180
|
-
this._formulaChangeWithRange$.pipe(
|
|
1180
|
+
this._formulaChangeWithRange$.pipe(Bn(() => this.calculateStarted$.pipe(na((a) => a)))).subscribe((a) => a.forEach(e))
|
|
1181
1181
|
), this.disposeWithMe(
|
|
1182
1182
|
this._formulaChangeWithRange$.pipe(na(() => this.calculateStarted$.getValue())).subscribe(e)
|
|
1183
1183
|
);
|
|
1184
1184
|
}
|
|
1185
1185
|
_initFormulaCalculationResultChange() {
|
|
1186
1186
|
this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
|
|
1187
|
-
if (e.id ===
|
|
1187
|
+
if (e.id === Ln.id) {
|
|
1188
1188
|
const a = e.params, { unitOtherData: i } = a, r = {};
|
|
1189
1189
|
for (const o in i) {
|
|
1190
1190
|
const u = i[o], m = {};
|
|
@@ -1235,7 +1235,7 @@ let Ke = class extends te {
|
|
|
1235
1235
|
subUnitId: a,
|
|
1236
1236
|
formulaIdList: i
|
|
1237
1237
|
};
|
|
1238
|
-
this._commandService.executeCommand(
|
|
1238
|
+
this._commandService.executeCommand(Pn.id, r);
|
|
1239
1239
|
const o = this._ensureCacheMap(e, a);
|
|
1240
1240
|
i.forEach((u) => o.delete(u));
|
|
1241
1241
|
}
|
|
@@ -1251,18 +1251,18 @@ let Ke = class extends te {
|
|
|
1251
1251
|
return this._ensureCacheMap(e, a).get(i);
|
|
1252
1252
|
}
|
|
1253
1253
|
};
|
|
1254
|
-
Ke =
|
|
1254
|
+
Ke = qi([
|
|
1255
1255
|
pt(0, de),
|
|
1256
1256
|
pt(1, gt),
|
|
1257
1257
|
pt(2, W(wa))
|
|
1258
1258
|
], Ke);
|
|
1259
1259
|
const ot = "sheets-formula.base.config";
|
|
1260
1260
|
var ne = /* @__PURE__ */ ((n) => (n[n.FORCED = 0] = "FORCED", n[n.WHEN_EMPTY = 1] = "WHEN_EMPTY", n[n.NO_CALCULATION = 2] = "NO_CALCULATION", n))(ne || {});
|
|
1261
|
-
const ia = {},
|
|
1262
|
-
var
|
|
1263
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1261
|
+
const ia = {}, gi = "sheets-formula.remote.config", ra = {};
|
|
1262
|
+
var hi = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, Fi = (n, e, a, i) => {
|
|
1263
|
+
for (var r = i > 1 ? void 0 : i ? Ui(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1264
1264
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1265
|
-
return i && r &&
|
|
1265
|
+
return i && r && hi(e, a, r), r;
|
|
1266
1266
|
}, le = (n, e) => (a, i) => e(a, i, n);
|
|
1267
1267
|
const oa = { done: 0, count: 0 }, dt = { onlyLocal: !0 };
|
|
1268
1268
|
let Oe = class extends te {
|
|
@@ -1422,7 +1422,7 @@ let Oe = class extends te {
|
|
|
1422
1422
|
const { forceCalculation: o = !1 } = i.params;
|
|
1423
1423
|
o && (this._forceCalculating = !0);
|
|
1424
1424
|
} else i.id === $t.id && this.clearProgress();
|
|
1425
|
-
if (i.id !==
|
|
1425
|
+
if (i.id !== En.id)
|
|
1426
1426
|
return;
|
|
1427
1427
|
const r = i.params;
|
|
1428
1428
|
if (r.stageInfo != null) {
|
|
@@ -1506,7 +1506,7 @@ let Oe = class extends te {
|
|
|
1506
1506
|
};
|
|
1507
1507
|
}
|
|
1508
1508
|
};
|
|
1509
|
-
Oe =
|
|
1509
|
+
Oe = Fi([
|
|
1510
1510
|
le(0, de),
|
|
1511
1511
|
le(1, gt),
|
|
1512
1512
|
le(2, Xa),
|
|
@@ -1515,10 +1515,10 @@ Oe = Ui([
|
|
|
1515
1515
|
le(5, W(Ot)),
|
|
1516
1516
|
le(6, W(Ke))
|
|
1517
1517
|
], Oe);
|
|
1518
|
-
var
|
|
1519
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1518
|
+
var Bi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, Vi = (n, e, a, i) => {
|
|
1519
|
+
for (var r = i > 1 ? void 0 : i ? vi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1520
1520
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1521
|
-
return i && r &&
|
|
1521
|
+
return i && r && Bi(e, a, r), r;
|
|
1522
1522
|
}, me = (n, e) => (a, i) => e(a, i, n);
|
|
1523
1523
|
let Qe = class extends te {
|
|
1524
1524
|
constructor(n, e, a, i, r, o, u, m) {
|
|
@@ -1544,7 +1544,7 @@ let Qe = class extends te {
|
|
|
1544
1544
|
this._handleSetRangeValuesMutation(a);
|
|
1545
1545
|
}
|
|
1546
1546
|
})
|
|
1547
|
-
), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(ee.UNIVER_SHEET).subscribe((n) => this._handleWorkbookAdded(n))), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(ee.UNIVER_SHEET).pipe(
|
|
1547
|
+
), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(ee.UNIVER_SHEET).subscribe((n) => this._handleWorkbookAdded(n))), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(ee.UNIVER_SHEET).pipe(vn((n) => n.getUnitId())).subscribe((n) => this._handleWorkbookDisposed(n)));
|
|
1548
1548
|
}
|
|
1549
1549
|
_handleSetRangeValuesMutation(n) {
|
|
1550
1550
|
const { subUnitId: e, unitId: a, cellValue: i } = n;
|
|
@@ -1560,7 +1560,7 @@ let Qe = class extends te {
|
|
|
1560
1560
|
{
|
|
1561
1561
|
unitId: a,
|
|
1562
1562
|
subUnitId: e,
|
|
1563
|
-
cellValue:
|
|
1563
|
+
cellValue: li(r)
|
|
1564
1564
|
},
|
|
1565
1565
|
{
|
|
1566
1566
|
onlyLocal: !0,
|
|
@@ -1656,7 +1656,7 @@ let Qe = class extends te {
|
|
|
1656
1656
|
r,
|
|
1657
1657
|
i,
|
|
1658
1658
|
a
|
|
1659
|
-
), { undos: u, redos: m } =
|
|
1659
|
+
), { undos: u, redos: m } = Xn(r, o, a);
|
|
1660
1660
|
return {
|
|
1661
1661
|
undos: u,
|
|
1662
1662
|
redos: m
|
|
@@ -1772,7 +1772,7 @@ let Qe = class extends te {
|
|
|
1772
1772
|
return { newFormulaData: o };
|
|
1773
1773
|
}
|
|
1774
1774
|
};
|
|
1775
|
-
Qe =
|
|
1775
|
+
Qe = Vi([
|
|
1776
1776
|
me(0, xe),
|
|
1777
1777
|
me(1, de),
|
|
1778
1778
|
me(2, W(yt)),
|
|
@@ -1782,7 +1782,7 @@ Qe = vi([
|
|
|
1782
1782
|
me(6, _e),
|
|
1783
1783
|
me(7, W(at))
|
|
1784
1784
|
], Qe);
|
|
1785
|
-
const
|
|
1785
|
+
const Gi = [
|
|
1786
1786
|
{
|
|
1787
1787
|
functionName: Zt.ARRAY_CONSTRAIN,
|
|
1788
1788
|
functionType: t.Array,
|
|
@@ -1834,7 +1834,7 @@ const Vi = [
|
|
|
1834
1834
|
}
|
|
1835
1835
|
]
|
|
1836
1836
|
}
|
|
1837
|
-
],
|
|
1837
|
+
], Hi = [
|
|
1838
1838
|
{
|
|
1839
1839
|
functionName: _.BETADIST,
|
|
1840
1840
|
functionType: t.Compatibility,
|
|
@@ -2888,7 +2888,7 @@ const Vi = [
|
|
|
2888
2888
|
}
|
|
2889
2889
|
]
|
|
2890
2890
|
}
|
|
2891
|
-
],
|
|
2891
|
+
], Yi = [
|
|
2892
2892
|
{
|
|
2893
2893
|
functionName: ce.CUBEKPIMEMBER,
|
|
2894
2894
|
functionType: t.Cube,
|
|
@@ -3043,7 +3043,7 @@ const Vi = [
|
|
|
3043
3043
|
}
|
|
3044
3044
|
]
|
|
3045
3045
|
}
|
|
3046
|
-
],
|
|
3046
|
+
], wi = [
|
|
3047
3047
|
{
|
|
3048
3048
|
functionName: $.DAVERAGE,
|
|
3049
3049
|
functionType: t.Database,
|
|
@@ -3392,7 +3392,7 @@ const Vi = [
|
|
|
3392
3392
|
}
|
|
3393
3393
|
]
|
|
3394
3394
|
}
|
|
3395
|
-
],
|
|
3395
|
+
], Xi = [
|
|
3396
3396
|
{
|
|
3397
3397
|
functionName: B.DATE,
|
|
3398
3398
|
functionType: t.Date,
|
|
@@ -3964,7 +3964,7 @@ const Vi = [
|
|
|
3964
3964
|
}
|
|
3965
3965
|
]
|
|
3966
3966
|
}
|
|
3967
|
-
],
|
|
3967
|
+
], Wi = [
|
|
3968
3968
|
{
|
|
3969
3969
|
functionName: A.BESSELI,
|
|
3970
3970
|
functionType: t.Engineering,
|
|
@@ -5037,7 +5037,7 @@ const Vi = [
|
|
|
5037
5037
|
}
|
|
5038
5038
|
]
|
|
5039
5039
|
}
|
|
5040
|
-
],
|
|
5040
|
+
], Ki = [
|
|
5041
5041
|
{
|
|
5042
5042
|
functionName: C.ACCRINT,
|
|
5043
5043
|
functionType: t.Financial,
|
|
@@ -7298,7 +7298,7 @@ const Vi = [
|
|
|
7298
7298
|
}
|
|
7299
7299
|
]
|
|
7300
7300
|
}
|
|
7301
|
-
],
|
|
7301
|
+
], Qi = [
|
|
7302
7302
|
{
|
|
7303
7303
|
functionName: v.CELL,
|
|
7304
7304
|
functionType: t.Information,
|
|
@@ -7707,7 +7707,7 @@ const Vi = [
|
|
|
7707
7707
|
}
|
|
7708
7708
|
]
|
|
7709
7709
|
}
|
|
7710
|
-
],
|
|
7710
|
+
], ki = [
|
|
7711
7711
|
{
|
|
7712
7712
|
functionName: K.AND,
|
|
7713
7713
|
functionType: t.Logical,
|
|
@@ -8181,7 +8181,7 @@ const Vi = [
|
|
|
8181
8181
|
}
|
|
8182
8182
|
]
|
|
8183
8183
|
}
|
|
8184
|
-
],
|
|
8184
|
+
], $i = [
|
|
8185
8185
|
{
|
|
8186
8186
|
functionName: y.ADDRESS,
|
|
8187
8187
|
functionType: t.Lookup,
|
|
@@ -9213,7 +9213,7 @@ const Vi = [
|
|
|
9213
9213
|
}
|
|
9214
9214
|
]
|
|
9215
9215
|
}
|
|
9216
|
-
],
|
|
9216
|
+
], ji = [
|
|
9217
9217
|
{
|
|
9218
9218
|
functionName: T.ABS,
|
|
9219
9219
|
functionType: t.Math,
|
|
@@ -10851,7 +10851,7 @@ const Vi = [
|
|
|
10851
10851
|
}
|
|
10852
10852
|
]
|
|
10853
10853
|
}
|
|
10854
|
-
],
|
|
10854
|
+
], zi = [
|
|
10855
10855
|
{
|
|
10856
10856
|
functionName: l.AVEDEV,
|
|
10857
10857
|
functionType: t.Statistical,
|
|
@@ -13793,7 +13793,7 @@ const Vi = [
|
|
|
13793
13793
|
}
|
|
13794
13794
|
]
|
|
13795
13795
|
}
|
|
13796
|
-
],
|
|
13796
|
+
], Zi = [
|
|
13797
13797
|
{
|
|
13798
13798
|
functionName: D.ASC,
|
|
13799
13799
|
functionType: t.Text,
|
|
@@ -14985,7 +14985,7 @@ const Vi = [
|
|
|
14985
14985
|
}
|
|
14986
14986
|
]
|
|
14987
14987
|
}
|
|
14988
|
-
],
|
|
14988
|
+
], Ji = [], er = [
|
|
14989
14989
|
{
|
|
14990
14990
|
functionName: ft.ENCODEURL,
|
|
14991
14991
|
functionType: t.Web,
|
|
@@ -15045,31 +15045,31 @@ const Vi = [
|
|
|
15045
15045
|
}
|
|
15046
15046
|
]
|
|
15047
15047
|
}
|
|
15048
|
-
],
|
|
15049
|
-
...
|
|
15050
|
-
...
|
|
15051
|
-
...$i,
|
|
15048
|
+
], tr = [
|
|
15049
|
+
...Ki,
|
|
15050
|
+
...Xi,
|
|
15052
15051
|
...ji,
|
|
15053
|
-
...ki,
|
|
15054
|
-
...Yi,
|
|
15055
15052
|
...zi,
|
|
15053
|
+
...$i,
|
|
15054
|
+
...wi,
|
|
15055
|
+
...Zi,
|
|
15056
|
+
...ki,
|
|
15056
15057
|
...Qi,
|
|
15057
|
-
...
|
|
15058
|
-
...
|
|
15058
|
+
...Wi,
|
|
15059
|
+
...Yi,
|
|
15059
15060
|
...Hi,
|
|
15061
|
+
...er,
|
|
15060
15062
|
...Gi,
|
|
15061
|
-
...Ji
|
|
15062
|
-
...Vi,
|
|
15063
|
-
...Zi
|
|
15063
|
+
...Ji
|
|
15064
15064
|
];
|
|
15065
|
-
function
|
|
15065
|
+
function ar(n, e) {
|
|
15066
15066
|
let a = "";
|
|
15067
15067
|
return n.aliasFunctionName ? (a = e.t(n.aliasFunctionName), a === n.aliasFunctionName && (a = n.functionName)) : a = n.functionName, a;
|
|
15068
15068
|
}
|
|
15069
|
-
var
|
|
15070
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15069
|
+
var nr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, rr = (n, e, a, i) => {
|
|
15070
|
+
for (var r = i > 1 ? void 0 : i ? ir(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15071
15071
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15072
|
-
return i && r &&
|
|
15072
|
+
return i && r && nr(e, a, r), r;
|
|
15073
15073
|
}, Lt = (n, e) => (a, i) => e(a, i, n);
|
|
15074
15074
|
const Ut = Mt("formula.description-service");
|
|
15075
15075
|
let Ct = class {
|
|
@@ -15130,7 +15130,7 @@ let Ct = class {
|
|
|
15130
15130
|
if (e.length === 0)
|
|
15131
15131
|
return !1;
|
|
15132
15132
|
const a = e[0].description;
|
|
15133
|
-
return !
|
|
15133
|
+
return !In(a);
|
|
15134
15134
|
}
|
|
15135
15135
|
_initialize() {
|
|
15136
15136
|
this._localeService.localeChanged$.subscribe(() => {
|
|
@@ -15140,7 +15140,6 @@ let Ct = class {
|
|
|
15140
15140
|
_initDescription() {
|
|
15141
15141
|
var i;
|
|
15142
15142
|
const n = [
|
|
15143
|
-
...In,
|
|
15144
15143
|
...Nn,
|
|
15145
15144
|
...Rn,
|
|
15146
15145
|
...An,
|
|
@@ -15155,13 +15154,14 @@ let Ct = class {
|
|
|
15155
15154
|
...yn,
|
|
15156
15155
|
...qn,
|
|
15157
15156
|
...gn,
|
|
15158
|
-
...hn
|
|
15159
|
-
|
|
15157
|
+
...hn,
|
|
15158
|
+
...Un
|
|
15159
|
+
].map((r) => r[1]), e = tr.filter((r) => n.includes(r.functionName)), a = this._configService.getConfig(ot);
|
|
15160
15160
|
this._descriptions = e.concat((i = a == null ? void 0 : a.description) != null ? i : []);
|
|
15161
15161
|
}
|
|
15162
15162
|
_registerDescriptions() {
|
|
15163
15163
|
const n = this._localeService, e = this._descriptions.map((a) => ({
|
|
15164
|
-
functionName:
|
|
15164
|
+
functionName: ar(a, n),
|
|
15165
15165
|
functionType: a.functionType,
|
|
15166
15166
|
description: n.t(a.description),
|
|
15167
15167
|
abstract: n.t(a.abstract),
|
|
@@ -15176,15 +15176,15 @@ let Ct = class {
|
|
|
15176
15176
|
this._functionService.registerDescriptions(...e);
|
|
15177
15177
|
}
|
|
15178
15178
|
};
|
|
15179
|
-
Ct =
|
|
15179
|
+
Ct = rr([
|
|
15180
15180
|
Lt(0, ht),
|
|
15181
15181
|
Lt(1, W(Ot)),
|
|
15182
15182
|
Lt(2, _e)
|
|
15183
15183
|
], Ct);
|
|
15184
|
-
var
|
|
15185
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15184
|
+
var or = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, mr = (n, e, a, i) => {
|
|
15185
|
+
for (var r = i > 1 ? void 0 : i ? ur(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15186
15186
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15187
|
-
return i && r &&
|
|
15187
|
+
return i && r && or(e, a, r), r;
|
|
15188
15188
|
}, Fe = (n, e) => (a, i) => e(a, i, n);
|
|
15189
15189
|
function ua(n, e, a, i) {
|
|
15190
15190
|
const r = n.sequenceNodesBuilder(e);
|
|
@@ -15299,7 +15299,7 @@ let Dt = class extends te {
|
|
|
15299
15299
|
// eslint-disable-next-line max-lines-per-function
|
|
15300
15300
|
registerRangeFormula(n, e, a, i, r) {
|
|
15301
15301
|
const o = new Ye(), u = i.map((f) => this._getFormulaDependcy(n, e, f, a)), m = (f) => {
|
|
15302
|
-
const s = a[0].startRow, p = a[0].startColumn, d = [{ unitId: n, subUnitId: e, ranges: a }, ...u.flat()], L = [], E =
|
|
15302
|
+
const s = a[0].startRow, p = a[0].startColumn, d = [{ unitId: n, subUnitId: e, ranges: a }, ...u.flat()], L = [], E = cn(this._injector, f);
|
|
15303
15303
|
for (const { unitId: I, subUnitId: S, ranges: c } of d)
|
|
15304
15304
|
if (I === E.unitId && S === E.subUnitId) {
|
|
15305
15305
|
const N = [], R = c[0].startRow, P = c[0].startColumn, O = R - s, M = P - p;
|
|
@@ -15321,7 +15321,7 @@ let Dt = class extends te {
|
|
|
15321
15321
|
S.sort((O, M) => O.startRow - M.startRow || O.startColumn - M.startColumn);
|
|
15322
15322
|
const c = /* @__PURE__ */ new Map();
|
|
15323
15323
|
for (let O = 0; O < I.length; O++) {
|
|
15324
|
-
const M = I[O], F = M.startRow, U = M.startColumn, g = F - s, x = U - p, h =
|
|
15324
|
+
const M = I[O], F = M.startRow, U = M.startColumn, g = F - s, x = U - p, h = ln(M, f).sort((Q, oe) => Q.startRow - oe.startRow || Q.startColumn - oe.startColumn);
|
|
15325
15325
|
if (!h.length)
|
|
15326
15326
|
continue;
|
|
15327
15327
|
const V = h[0].startRow, k = h[0].startColumn, b = V - s, Le = k - p, ae = [];
|
|
@@ -15385,51 +15385,51 @@ let Dt = class extends te {
|
|
|
15385
15385
|
}), o;
|
|
15386
15386
|
}
|
|
15387
15387
|
};
|
|
15388
|
-
Dt =
|
|
15389
|
-
Fe(0, W(
|
|
15388
|
+
Dt = mr([
|
|
15389
|
+
Fe(0, W(fn)),
|
|
15390
15390
|
Fe(1, W(yt)),
|
|
15391
15391
|
Fe(2, xe),
|
|
15392
15392
|
Fe(3, W(at))
|
|
15393
15393
|
], Dt);
|
|
15394
|
-
var
|
|
15395
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15394
|
+
var fr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, lr = (n, e, a, i) => {
|
|
15395
|
+
for (var r = i > 1 ? void 0 : i ? cr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15396
15396
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15397
|
-
return i && r &&
|
|
15398
|
-
},
|
|
15397
|
+
return i && r && fr(e, a, r), r;
|
|
15398
|
+
}, sr = (n, e) => (a, i) => e(a, i, n);
|
|
15399
15399
|
const Ft = "sheets-formula.remote-register-function.service", va = Mt(Ft);
|
|
15400
15400
|
let ke = class {
|
|
15401
15401
|
constructor(n) {
|
|
15402
15402
|
this._functionService = n;
|
|
15403
15403
|
}
|
|
15404
15404
|
async registerFunctions(n) {
|
|
15405
|
-
const e = n.map(([a, i]) =>
|
|
15405
|
+
const e = n.map(([a, i]) => pr(a, i));
|
|
15406
15406
|
this._functionService.registerExecutors(...e);
|
|
15407
15407
|
}
|
|
15408
15408
|
async registerAsyncFunctions(n) {
|
|
15409
|
-
const e = n.map(([a, i]) =>
|
|
15409
|
+
const e = n.map(([a, i]) => dr(a, i));
|
|
15410
15410
|
this._functionService.registerExecutors(...e);
|
|
15411
15411
|
}
|
|
15412
15412
|
async unregisterFunctions(n) {
|
|
15413
15413
|
this._functionService.unregisterDescriptions(...n);
|
|
15414
15414
|
}
|
|
15415
15415
|
};
|
|
15416
|
-
ke =
|
|
15417
|
-
|
|
15416
|
+
ke = lr([
|
|
15417
|
+
sr(0, ht)
|
|
15418
15418
|
], ke);
|
|
15419
|
-
function
|
|
15419
|
+
function pr(n, e) {
|
|
15420
15420
|
const a = new At(e), i = new Function(`return ${n}`)();
|
|
15421
15421
|
return a.calculateCustom = i, a;
|
|
15422
15422
|
}
|
|
15423
|
-
function
|
|
15423
|
+
function dr(n, e) {
|
|
15424
15424
|
const a = new xa(e), i = new Function(`return ${n}`)();
|
|
15425
15425
|
return a.calculateCustom = i, a;
|
|
15426
15426
|
}
|
|
15427
|
-
var
|
|
15428
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15427
|
+
var Lr = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, Tr = (n, e, a, i) => {
|
|
15428
|
+
for (var r = i > 1 ? void 0 : i ? Pr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15429
15429
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15430
|
-
return i && r &&
|
|
15430
|
+
return i && r && Lr(e, a, r), r;
|
|
15431
15431
|
}, Be = (n, e) => (a, i) => e(a, i, n);
|
|
15432
|
-
const
|
|
15432
|
+
const Er = Mt(
|
|
15433
15433
|
"sheets-formula.register-function-service"
|
|
15434
15434
|
);
|
|
15435
15435
|
let bt = class extends te {
|
|
@@ -15490,17 +15490,17 @@ let bt = class extends te {
|
|
|
15490
15490
|
return this._remoteRegisterFunctionService.registerFunctions(a), se(() => this._remoteRegisterFunctionService.unregisterFunctions(e));
|
|
15491
15491
|
}
|
|
15492
15492
|
};
|
|
15493
|
-
bt =
|
|
15493
|
+
bt = Tr([
|
|
15494
15494
|
Be(0, W(Ot)),
|
|
15495
15495
|
Be(1, W(Ut)),
|
|
15496
15496
|
Be(2, ht),
|
|
15497
15497
|
Be(3, Wa(va))
|
|
15498
15498
|
], bt);
|
|
15499
|
-
const
|
|
15500
|
-
var
|
|
15501
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15499
|
+
const Ir = "SHEETS_FORMULA_PLUGIN";
|
|
15500
|
+
var Nr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, Ar = (n, e, a, i) => {
|
|
15501
|
+
for (var r = i > 1 ? void 0 : i ? Rr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15502
15502
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15503
|
-
return i && r &&
|
|
15503
|
+
return i && r && Nr(e, a, r), r;
|
|
15504
15504
|
}, Pt = (n, e) => (a, i) => e(a, i, n);
|
|
15505
15505
|
let $e = class extends te {
|
|
15506
15506
|
constructor(n, e, a) {
|
|
@@ -15778,15 +15778,15 @@ let $e = class extends te {
|
|
|
15778
15778
|
return i;
|
|
15779
15779
|
}
|
|
15780
15780
|
};
|
|
15781
|
-
$e =
|
|
15781
|
+
$e = Ar([
|
|
15782
15782
|
Pt(0, gt),
|
|
15783
15783
|
Pt(1, xe),
|
|
15784
15784
|
Pt(2, W(it))
|
|
15785
15785
|
], $e);
|
|
15786
|
-
var
|
|
15787
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15786
|
+
var Sr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, Dr = (n, e, a, i) => {
|
|
15787
|
+
for (var r = i > 1 ? void 0 : i ? Cr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15788
15788
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15789
|
-
return i && r &&
|
|
15789
|
+
return i && r && Sr(e, a, r), r;
|
|
15790
15790
|
}, Tt = (n, e) => (a, i) => e(a, i, n);
|
|
15791
15791
|
let je = class extends te {
|
|
15792
15792
|
constructor(n, e, a) {
|
|
@@ -15810,7 +15810,7 @@ let je = class extends te {
|
|
|
15810
15810
|
}
|
|
15811
15811
|
_initInterceptorCellContent() {
|
|
15812
15812
|
this.disposeWithMe(
|
|
15813
|
-
this._sheetInterceptorService.intercept(
|
|
15813
|
+
this._sheetInterceptorService.intercept(sn.CELL_CONTENT, {
|
|
15814
15814
|
priority: 100,
|
|
15815
15815
|
effect: Ka.Value,
|
|
15816
15816
|
handler: (n, e, a) => {
|
|
@@ -15821,9 +15821,9 @@ let je = class extends te {
|
|
|
15821
15821
|
v: 0,
|
|
15822
15822
|
// Default value for empty cell
|
|
15823
15823
|
t: vt.NUMBER
|
|
15824
|
-
}) : (n == null ? void 0 : n.t) === vt.NUMBER &&
|
|
15824
|
+
}) : (n == null ? void 0 : n.t) === vt.NUMBER && n.v !== void 0 && n.v !== null && Qa(n.v) ? a({
|
|
15825
15825
|
...n,
|
|
15826
|
-
v:
|
|
15826
|
+
v: Fn(Number(n.v))
|
|
15827
15827
|
}) : a({
|
|
15828
15828
|
...n,
|
|
15829
15829
|
v: f.v,
|
|
@@ -15834,15 +15834,15 @@ let je = class extends te {
|
|
|
15834
15834
|
);
|
|
15835
15835
|
}
|
|
15836
15836
|
};
|
|
15837
|
-
je =
|
|
15837
|
+
je = Dr([
|
|
15838
15838
|
Tt(0, de),
|
|
15839
15839
|
Tt(1, W(xt)),
|
|
15840
15840
|
Tt(2, W(it))
|
|
15841
15841
|
], je);
|
|
15842
|
-
var
|
|
15843
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15842
|
+
var br = Object.defineProperty, Or = Object.getOwnPropertyDescriptor, Mr = (n, e, a, i) => {
|
|
15843
|
+
for (var r = i > 1 ? void 0 : i ? Or(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15844
15844
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15845
|
-
return i && r &&
|
|
15845
|
+
return i && r && br(e, a, r), r;
|
|
15846
15846
|
}, ve = (n, e) => (a, i) => e(a, i, n);
|
|
15847
15847
|
let ze = class extends te {
|
|
15848
15848
|
constructor(e, a, i, r) {
|
|
@@ -15871,7 +15871,7 @@ let ze = class extends te {
|
|
|
15871
15871
|
this.disposeWithMe(
|
|
15872
15872
|
this._commandService.onCommandExecuted((e, a) => {
|
|
15873
15873
|
if (!(a != null && a.fromCollab)) {
|
|
15874
|
-
if (e.id ===
|
|
15874
|
+
if (e.id === pn.id)
|
|
15875
15875
|
this._unregisterDescriptionsForNotInSheetId(), this._registerDescriptions();
|
|
15876
15876
|
else if (e.id === Me.id) {
|
|
15877
15877
|
const i = e.params;
|
|
@@ -15956,33 +15956,33 @@ let ze = class extends te {
|
|
|
15956
15956
|
}), this._descriptionService.unregisterDescriptions(r);
|
|
15957
15957
|
}
|
|
15958
15958
|
};
|
|
15959
|
-
ze =
|
|
15959
|
+
ze = Mr([
|
|
15960
15960
|
ve(0, Ut),
|
|
15961
15961
|
ve(1, qt),
|
|
15962
15962
|
ve(2, xe),
|
|
15963
15963
|
ve(3, de)
|
|
15964
15964
|
], ze);
|
|
15965
|
-
var
|
|
15966
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15965
|
+
var xr = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, yr = (n, e, a, i) => {
|
|
15966
|
+
for (var r = i > 1 ? void 0 : i ? _r(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15967
15967
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15968
|
-
return i && r &&
|
|
15969
|
-
},
|
|
15968
|
+
return i && r && xr(e, a, r), r;
|
|
15969
|
+
}, qr = (n, e) => (a, i) => e(a, i, n);
|
|
15970
15970
|
let Ze = class extends te {
|
|
15971
15971
|
constructor(n) {
|
|
15972
15972
|
super(), this._commandService = n, [
|
|
15973
|
-
|
|
15973
|
+
Hn,
|
|
15974
15974
|
Ge
|
|
15975
15975
|
].forEach((e) => this._commandService.registerCommand(e));
|
|
15976
15976
|
}
|
|
15977
15977
|
};
|
|
15978
|
-
Ze =
|
|
15979
|
-
|
|
15978
|
+
Ze = yr([
|
|
15979
|
+
qr(0, de)
|
|
15980
15980
|
], Ze);
|
|
15981
|
-
var Va = Object.defineProperty,
|
|
15982
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15981
|
+
var Va = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, hr = (n, e, a) => e in n ? Va(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a, Ga = (n, e, a, i) => {
|
|
15982
|
+
for (var r = i > 1 ? void 0 : i ? gr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15983
15983
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15984
15984
|
return i && r && Va(e, a, r), r;
|
|
15985
|
-
}, Je = (n, e) => (a, i) => e(a, i, n), ut = (n, e, a) =>
|
|
15985
|
+
}, Je = (n, e) => (a, i) => e(a, i, n), ut = (n, e, a) => hr(n, typeof e != "symbol" ? e + "" : e, a);
|
|
15986
15986
|
let et = class extends sa {
|
|
15987
15987
|
constructor(n = ra, e, a) {
|
|
15988
15988
|
super(), this._config = n, this._injector = e, this._configService = a;
|
|
@@ -15991,12 +15991,12 @@ let et = class extends sa {
|
|
|
15991
15991
|
ra,
|
|
15992
15992
|
this._config
|
|
15993
15993
|
);
|
|
15994
|
-
this._configService.setConfig(
|
|
15994
|
+
this._configService.setConfig(gi, i);
|
|
15995
15995
|
}
|
|
15996
15996
|
onStarting() {
|
|
15997
15997
|
this._injector.add([ke]), this._injector.get(qa).registerChannel(
|
|
15998
15998
|
Ft,
|
|
15999
|
-
|
|
15999
|
+
Vn(this._injector.get(ke))
|
|
16000
16000
|
);
|
|
16001
16001
|
}
|
|
16002
16002
|
};
|
|
@@ -16019,7 +16019,7 @@ let tt = class extends sa {
|
|
|
16019
16019
|
}
|
|
16020
16020
|
onStarting() {
|
|
16021
16021
|
const n = this._injector, e = [
|
|
16022
|
-
[
|
|
16022
|
+
[Er, { useClass: bt }],
|
|
16023
16023
|
[Ut, { useClass: Ct }],
|
|
16024
16024
|
[Ze],
|
|
16025
16025
|
[Dt],
|
|
@@ -16034,7 +16034,7 @@ let tt = class extends sa {
|
|
|
16034
16034
|
if (this._config.notExecuteFormula) {
|
|
16035
16035
|
const a = n.get(qa);
|
|
16036
16036
|
e.push([va, {
|
|
16037
|
-
useFactory: () =>
|
|
16037
|
+
useFactory: () => Gn(a.requestChannel(Ft))
|
|
16038
16038
|
}]);
|
|
16039
16039
|
}
|
|
16040
16040
|
e.forEach((a) => n.add(a));
|
|
@@ -16058,10 +16058,10 @@ let tt = class extends sa {
|
|
|
16058
16058
|
]);
|
|
16059
16059
|
}
|
|
16060
16060
|
};
|
|
16061
|
-
ut(tt, "pluginName",
|
|
16061
|
+
ut(tt, "pluginName", Ir);
|
|
16062
16062
|
ut(tt, "type", ee.UNIVER_SHEET);
|
|
16063
16063
|
tt = Ga([
|
|
16064
|
-
la(_a,
|
|
16064
|
+
la(_a, dn),
|
|
16065
16065
|
Je(1, W(at)),
|
|
16066
16066
|
Je(2, _e)
|
|
16067
16067
|
], tt);
|
|
@@ -16070,9 +16070,9 @@ export {
|
|
|
16070
16070
|
Ct as DescriptionService,
|
|
16071
16071
|
Dt as FormulaRefRangeService,
|
|
16072
16072
|
Ut as IDescriptionService,
|
|
16073
|
-
|
|
16073
|
+
Er as IRegisterFunctionService,
|
|
16074
16074
|
va as IRemoteRegisterFunctionService,
|
|
16075
|
-
|
|
16075
|
+
Hn as InsertFunctionCommand,
|
|
16076
16076
|
Ge as OtherFormulaMarkDirty,
|
|
16077
16077
|
ot as PLUGIN_CONFIG_KEY_BASE,
|
|
16078
16078
|
bt as RegisterFunctionService,
|