@univerjs/sheets 0.10.12 → 0.10.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/facade.js CHANGED
@@ -1,39 +1,39 @@
1
- var tt = Object.defineProperty;
2
- var nt = (r, e, t) => e in r ? tt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var E = (r, e, t) => nt(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { Inject as l, Injector as x, ICommandService as m, IPermissionService as ue, IAuthzIoService as Ve, LocaleService as He, generateRandomId as Oe, Rectangle as P, cellToRange as rt, RANGE_TYPE as k, HorizontalAlign as T, VerticalAlign as A, TextStyleValue as we, RichTextValue as M, BooleanNumber as g, WrapStrategy as L, DEFAULT_STYLES as ke, covertCellValue as re, covertCellValues as Se, Dimension as N, isNullCell as D, ILogService as je, Direction as H, ObjectMatrix as J, IResourceLoaderService as st, IUniverInstanceService as se, mergeWorksheetSnapshotWithDefault as Ce, Tools as ve, UndoCommand as ot, RedoCommand as it, toDisposable as Le, UniverInstanceType as U, CanceledError as f } from "@univerjs/core";
5
- import { FBase as le, FBaseInitialable as ge, FUniver as ze, FEnum as at, FEventName as ht } from "@univerjs/core/facade";
6
- import { WorksheetProtectionRuleModel as Ge, RangeProtectionRuleModel as $e, WorksheetProtectionPointModel as qe, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as V, SetDefinedNameCommand as oe, RemoveDefinedNameCommand as dt, PermissionPointsDefinitions as ct, WorkbookEditablePermission as Ke, UnitObject as W, AddWorksheetProtectionMutation as ut, DeleteWorksheetProtectionMutation as lt, getAllWorksheetPermissionPoint as gt, getAllWorksheetPermissionPointByPointPanel as fe, SetWorksheetPermissionPointsMutation as mt, AddRangeProtectionMutation as _t, DeleteRangeProtectionMutation as wt, SetRangeProtectionMutation as kt, WorksheetEditPermission as St, WorksheetViewPermission as Ct, SetBorderBasicCommand as vt, SetStyleCommand as b, SetTextRotationCommand as ft, SetRangeValuesCommand as B, SetTextWrapCommand as ie, SetVerticalTextAlignCommand as It, SetHorizontalTextAlignCommand as Rt, addMergeCellsUtil as Q, getAddMergeMutationRangeByType as Ie, RemoveWorksheetMergeCommand as bt, getPrimaryForRange as z, SetSelectionsOperation as me, SplitTextToColumnsCommand as pt, SetWorksheetRangeThemeStyleCommand as Et, DeleteWorksheetRangeThemeStyleCommand as yt, SheetRangeThemeService as Ye, ClearSelectionAllCommand as Je, ClearSelectionContentCommand as Qe, ClearSelectionFormatCommand as Xe, InsertRangeMoveDownCommand as Ut, InsertRangeMoveRightCommand as Pt, DeleteRangeMoveUpCommand as xt, DeleteRangeMoveLeftCommand as Mt, getNextPrimaryCell as Nt, SheetsSelectionsService as Ze, SetWorksheetDefaultStyleMutation as Tt, SetColDataCommand as Re, SetRowDataCommand as be, copyRangeStyles as O, InsertRowByRangeCommand as pe, RemoveRowByRangeCommand as At, MoveRowsCommand as Dt, SetRowHiddenCommand as Ee, SetSpecificRowsVisibleCommand as ye, SetWorksheetRowIsAutoHeightMutation as Wt, SetRowHeightCommand as Ue, SetWorksheetRowIsAutoHeightCommand as X, InsertColByRangeCommand as Pe, RemoveColByRangeCommand as Bt, MoveColsCommand as Ft, SetColHiddenCommand as xe, SetSpecificColsVisibleCommand as Me, SetColWidthCommand as Vt, SetFrozenCommand as Z, CancelFrozenCommand as Ht, ToggleGridlinesCommand as ae, SetGridlinesColorCommand as he, SetTabColorCommand as Ot, SetRangeValuesMutation as Ne, SetWorksheetHideCommand as jt, SetWorksheetShowCommand as Lt, SetWorksheetNameCommand as de, AppendRowCommand as zt, SetWorksheetRowCountCommand as Gt, SetWorksheetColumnCountCommand as $t, SetWorkbookNameCommand as qt, InsertSheetCommand as G, SetWorksheetActiveOperation as F, RemoveSheetCommand as ce, CopySheetCommand as Kt, SetWorksheetOrderCommand as Yt, RegisterWorksheetRangeThemeStyleCommand as Jt, UnregisterWorksheetRangeThemeStyleCommand as Qt, RangeThemeStyle as Xt, SetWorksheetOrderMutation as Te, SetTabColorMutation as Ae, SetWorksheetHideMutation as De, COMMAND_LISTENER_VALUE_CHANGE as Zt, getValueChangedEffectedRange as en, SheetsFreezeSyncController as tn, SheetValueChangeType as nn, SheetSkeletonChangeType as rn, SplitDelimiterEnum as sn } from "@univerjs/sheets";
7
- import { IDefinedNamesService as et, serializeRange as _e, FormulaDataModel as on, serializeRangeWithSheet as an, deserializeRangeWithSheet as hn } from "@univerjs/engine-formula";
8
- var dn = Object.getOwnPropertyDescriptor, cn = (r, e, t, n) => {
9
- for (var s = n > 1 ? void 0 : n ? dn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
10
- (i = r[o]) && (s = i(s) || s);
11
- return s;
12
- }, I = (r, e) => (t, n) => e(t, n, r);
13
- function un(r, e, t) {
14
- const n = t.getDefinedNameMap(r);
1
+ var rt = Object.defineProperty;
2
+ var st = (a, e, t) => e in a ? rt(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var b = (a, e, t) => st(a, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Inject as g, Injector as M, ICommandService as _, IPermissionService as ge, IAuthzIoService as Oe, LocaleService as je, generateRandomId as Le, Rectangle as x, cellToRange as ot, HorizontalAlign as A, VerticalAlign as D, RANGE_TYPE as w, TextStyleValue as Se, RichTextValue as N, BooleanNumber as m, WrapStrategy as G, DEFAULT_STYLES as Ce, covertCellValue as oe, covertCellValues as ve, Dimension as T, isNullCell as B, Direction as j, ObjectMatrix as X, ILogService as ze, mergeWorksheetSnapshotWithDefault as fe, Tools as Ie, UndoCommand as it, RedoCommand as at, toDisposable as Ge, UniverInstanceType as P, IResourceLoaderService as ht, IUniverInstanceService as ie, CanceledError as f } from "@univerjs/core";
5
+ import { FBase as me, FBaseInitialable as _e, FUniver as $e, FEnum as dt, FEventName as ct } from "@univerjs/core/facade";
6
+ import { WorksheetProtectionRuleModel as qe, RangeProtectionRuleModel as Ke, WorksheetProtectionPointModel as Ye, SetDefinedNameCommand as ae, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as O, RemoveDefinedNameCommand as ut, WorkbookPermissionService as lt, PermissionPointsDefinitions as gt, WorkbookEditablePermission as Je, UnitObject as F, AddWorksheetProtectionMutation as mt, DeleteWorksheetProtectionMutation as _t, getAllWorksheetPermissionPoint as kt, getAllWorksheetPermissionPointByPointPanel as Re, SetWorksheetPermissionPointsMutation as wt, AddRangeProtectionMutation as St, DeleteRangeProtectionMutation as Ct, SetRangeProtectionMutation as vt, WorksheetEditPermission as ft, WorksheetViewPermission as It, SetBorderBasicCommand as Rt, SetStyleCommand as p, SetTextRotationCommand as bt, SetRangeValuesCommand as V, SetTextWrapCommand as he, SetVerticalTextAlignCommand as pt, SetHorizontalTextAlignCommand as Et, addMergeCellsUtil as Z, getAddMergeMutationRangeByType as be, RemoveWorksheetMergeCommand as yt, getPrimaryForRange as $, SetSelectionsOperation as ke, SplitTextToColumnsCommand as Ut, SetWorksheetRangeThemeStyleCommand as Pt, DeleteWorksheetRangeThemeStyleCommand as xt, SheetRangeThemeService as Qe, ClearSelectionAllCommand as Xe, ClearSelectionContentCommand as Ze, ClearSelectionFormatCommand as et, InsertRangeMoveDownCommand as Mt, InsertRangeMoveRightCommand as Nt, DeleteRangeMoveUpCommand as Tt, DeleteRangeMoveLeftCommand as At, getNextPrimaryCell as Dt, SetWorksheetDefaultStyleMutation as Wt, SetColDataCommand as pe, SetRowDataCommand as Ee, copyRangeStyles as L, InsertRowByRangeCommand as ye, RemoveRowByRangeCommand as Bt, MoveRowsCommand as Ft, SetRowHiddenCommand as Ue, SetSpecificRowsVisibleCommand as Pe, SetWorksheetRowIsAutoHeightMutation as Vt, SetRowHeightCommand as xe, SetWorksheetRowIsAutoHeightCommand as ee, InsertColByRangeCommand as Me, RemoveColByRangeCommand as Ht, MoveColsCommand as Ot, SetColHiddenCommand as Ne, SetSpecificColsVisibleCommand as Te, SetColWidthCommand as jt, SetFrozenCommand as te, CancelFrozenCommand as Lt, ToggleGridlinesCommand as de, SetGridlinesColorCommand as ce, SetTabColorCommand as zt, SetRangeValuesMutation as Ae, SetWorksheetHideCommand as Gt, SetWorksheetShowCommand as $t, SetWorksheetNameCommand as ue, AppendRowCommand as qt, SetWorksheetRowCountCommand as Kt, SetWorksheetColumnCountCommand as Yt, SheetsSelectionsService as tt, SetWorkbookNameCommand as Jt, InsertSheetCommand as q, SetWorksheetActiveOperation as H, RemoveSheetCommand as le, CopySheetCommand as Qt, SetWorksheetOrderCommand as Xt, RegisterWorksheetRangeThemeStyleCommand as Zt, UnregisterWorksheetRangeThemeStyleCommand as en, RangeThemeStyle as tn, SetWorksheetOrderMutation as De, SetTabColorMutation as We, SetWorksheetHideMutation as Be, COMMAND_LISTENER_VALUE_CHANGE as nn, getValueChangedEffectedRange as rn, SheetsFreezeSyncController as sn, SheetValueChangeType as on, SheetSkeletonChangeType as an, SplitDelimiterEnum as hn } from "@univerjs/sheets";
7
+ import { IDefinedNamesService as nt, serializeRange as we, serializeRangeWithSheet as dn, FormulaDataModel as cn, deserializeRangeWithSheet as un } from "@univerjs/engine-formula";
8
+ var ln = Object.getOwnPropertyDescriptor, gn = (a, e, t, n) => {
9
+ for (var r = n > 1 ? void 0 : n ? ln(e, t) : e, s = a.length - 1, o; s >= 0; s--)
10
+ (o = a[s]) && (r = o(r) || r);
11
+ return r;
12
+ }, I = (a, e) => (t, n) => e(t, n, a);
13
+ function mn(a, e, t) {
14
+ const n = t.getDefinedNameMap(a);
15
15
  if (n == null)
16
16
  return e.t("definedName.defaultName") + 1;
17
- const o = Array.from(Object.values(n)).length + 1, i = e.t("definedName.defaultName") + o;
18
- if (t.getValueByName(r, i) == null)
19
- return i;
20
- let a = o + 1;
17
+ const s = Array.from(Object.values(n)).length + 1, o = e.t("definedName.defaultName") + s;
18
+ if (t.getValueByName(a, o) == null)
19
+ return o;
20
+ let i = s + 1;
21
21
  for (; ; ) {
22
- const h = e.t("definedName.defaultName") + a;
23
- if (t.getValueByName(r, h) == null)
22
+ const h = e.t("definedName.defaultName") + i;
23
+ if (t.getValueByName(a, h) == null)
24
24
  return h;
25
- a++;
25
+ i++;
26
26
  }
27
27
  }
28
- class Y {
28
+ class Q {
29
29
  constructor() {
30
- E(this, "_definedNameParam");
30
+ b(this, "_definedNameParam");
31
31
  this._definedNameParam = {
32
- id: Oe(10),
32
+ id: Le(10),
33
33
  unitId: "",
34
34
  name: "",
35
35
  formulaOrRefString: "",
36
- localSheetId: V
36
+ localSheetId: O
37
37
  };
38
38
  }
39
39
  /**
@@ -104,12 +104,12 @@ class Y {
104
104
  * fWorkbook.insertDefinedNameBuilder(definedNameBuilder);
105
105
  * ```
106
106
  */
107
- setRefByRange(e, t, n, s) {
108
- return this._definedNameParam.formulaOrRefString = _e({
107
+ setRefByRange(e, t, n, r) {
108
+ return this._definedNameParam.formulaOrRefString = we({
109
109
  startRow: e,
110
110
  endRow: e + (n != null ? n : 1) - 1,
111
111
  startColumn: t,
112
- endColumn: t + (s != null ? s : 1) - 1
112
+ endColumn: t + (r != null ? r : 1) - 1
113
113
  }), this;
114
114
  }
115
115
  /**
@@ -168,7 +168,7 @@ class Y {
168
168
  * ```
169
169
  */
170
170
  setScopeToWorkbook() {
171
- return this._definedNameParam.localSheetId = V, this;
171
+ return this._definedNameParam.localSheetId = O, this;
172
172
  }
173
173
  /**
174
174
  * Sets the hidden status of the defined name builder.
@@ -228,12 +228,12 @@ class Y {
228
228
  return this._definedNameParam = e, this;
229
229
  }
230
230
  }
231
- let $ = class extends le {
232
- constructor(r, e, t, n, s, o, i, a, h, d) {
233
- super(), this._definedNameParam = r, this._injector = e, this._commandService = t, this._permissionService = n, this._worksheetProtectionRuleModel = s, this._rangeProtectionRuleModel = o, this._worksheetProtectionPointRuleModel = i, this._authzIoService = a, this._localeService = h, this._definedNamesService = d;
231
+ let K = class extends me {
232
+ constructor(a, e, t, n, r, s, o, i, h, d) {
233
+ super(), this._definedNameParam = a, this._injector = e, this._commandService = t, this._permissionService = n, this._worksheetProtectionRuleModel = r, this._rangeProtectionRuleModel = s, this._worksheetProtectionPointRuleModel = o, this._authzIoService = i, this._localeService = h, this._definedNamesService = d;
234
234
  }
235
235
  _apply() {
236
- this._definedNameParam.name === "" && (this._definedNameParam.name = un(this._definedNameParam.unitId, this._localeService, this._definedNamesService)), this._commandService.syncExecuteCommand(oe.id, this._definedNameParam);
236
+ this._definedNameParam.name === "" && (this._definedNameParam.name = mn(this._definedNameParam.unitId, this._localeService, this._definedNamesService)), this._commandService.syncExecuteCommand(ae.id, this._definedNameParam);
237
237
  }
238
238
  /**
239
239
  * Gets the name of the defined name.
@@ -258,8 +258,8 @@ let $ = class extends le {
258
258
  * definedName?.setName('NewDefinedName');
259
259
  * ```
260
260
  */
261
- setName(r) {
262
- this._definedNameParam.name = r, this._apply();
261
+ setName(a) {
262
+ this._definedNameParam.name = a, this._apply();
263
263
  }
264
264
  /**
265
265
  * Sets the formula of the defined name.
@@ -271,8 +271,8 @@ let $ = class extends le {
271
271
  * definedName?.setFormula('SUM(Sheet1!$A$1)');
272
272
  * ```
273
273
  */
274
- setFormula(r) {
275
- this._definedNameParam.formulaOrRefString = `=${r}`, this._apply();
274
+ setFormula(a) {
275
+ this._definedNameParam.formulaOrRefString = `=${a}`, this._apply();
276
276
  }
277
277
  /**
278
278
  * Sets the reference of the defined name.
@@ -284,8 +284,8 @@ let $ = class extends le {
284
284
  * definedName?.setRef('Sheet1!$A$1');
285
285
  * ```
286
286
  */
287
- setRef(r) {
288
- this._definedNameParam.formulaOrRefString = r, this._apply();
287
+ setRef(a) {
288
+ this._definedNameParam.formulaOrRefString = a, this._apply();
289
289
  }
290
290
  /**
291
291
  * Gets the formula or reference string of the defined name.
@@ -313,10 +313,10 @@ let $ = class extends le {
313
313
  * definedName?.setRefByRange(1, 3, 2, 5); // D2:H3
314
314
  * ```
315
315
  */
316
- setRefByRange(r, e, t, n) {
317
- this._definedNameParam.formulaOrRefString = _e({
318
- startRow: r,
319
- endRow: r + (t != null ? t : 1) - 1,
316
+ setRefByRange(a, e, t, n) {
317
+ this._definedNameParam.formulaOrRefString = we({
318
+ startRow: a,
319
+ endRow: a + (t != null ? t : 1) - 1,
320
320
  startColumn: e,
321
321
  endColumn: e + (n != null ? n : 1) - 1
322
322
  }), this._apply();
@@ -344,8 +344,8 @@ let $ = class extends le {
344
344
  * definedName?.setComment('This is a comment');
345
345
  * ```
346
346
  */
347
- setComment(r) {
348
- this._definedNameParam.comment = r, this._apply();
347
+ setComment(a) {
348
+ this._definedNameParam.comment = a, this._apply();
349
349
  }
350
350
  /**
351
351
  * Sets the scope of the defined name to the worksheet.
@@ -360,8 +360,8 @@ let $ = class extends le {
360
360
  * definedName?.setScopeToWorksheet(sheets[1]);
361
361
  * ```
362
362
  */
363
- setScopeToWorksheet(r) {
364
- this._definedNameParam.localSheetId = r.getSheetId(), this._apply();
363
+ setScopeToWorksheet(a) {
364
+ this._definedNameParam.localSheetId = a.getSheetId(), this._apply();
365
365
  }
366
366
  /**
367
367
  * Sets the scope of the defined name to the workbook.
@@ -373,7 +373,7 @@ let $ = class extends le {
373
373
  * ```
374
374
  */
375
375
  setScopeToWorkbook() {
376
- this._definedNameParam.localSheetId = V, this._apply();
376
+ this._definedNameParam.localSheetId = O, this._apply();
377
377
  }
378
378
  /**
379
379
  * Sets the hidden status of the defined name.
@@ -385,8 +385,8 @@ let $ = class extends le {
385
385
  * definedName?.setHidden(true);
386
386
  * ```
387
387
  */
388
- setHidden(r) {
389
- this._definedNameParam.hidden = r, this._apply();
388
+ setHidden(a) {
389
+ this._definedNameParam.hidden = a, this._apply();
390
390
  }
391
391
  /**
392
392
  * Deletes the defined name.
@@ -398,7 +398,7 @@ let $ = class extends le {
398
398
  * ```
399
399
  */
400
400
  delete() {
401
- this._commandService.syncExecuteCommand(dt.id, this._definedNameParam);
401
+ this._commandService.syncExecuteCommand(ut.id, this._definedNameParam);
402
402
  }
403
403
  /**
404
404
  * Gets the local sheet id of the defined name.
@@ -424,7 +424,7 @@ let $ = class extends le {
424
424
  * ```
425
425
  */
426
426
  isWorkbookScope() {
427
- return this._definedNameParam.localSheetId === V;
427
+ return this._definedNameParam.localSheetId === O;
428
428
  }
429
429
  /**
430
430
  * Converts the defined name to a defined name builder.
@@ -443,42 +443,46 @@ let $ = class extends le {
443
443
  * ```
444
444
  */
445
445
  toBuilder() {
446
- const r = this._injector.createInstance(Y);
447
- return r.load(this._definedNameParam), r;
446
+ const a = this._injector.createInstance(Q);
447
+ return a.load(this._definedNameParam), a;
448
448
  }
449
449
  };
450
- $ = cn([
451
- I(1, l(x)),
452
- I(2, m),
453
- I(3, ue),
454
- I(4, l(Ge)),
455
- I(5, l($e)),
456
- I(6, l(qe)),
457
- I(7, l(Ve)),
458
- I(8, l(He)),
459
- I(9, et)
460
- ], $);
461
- var ln = Object.getOwnPropertyDescriptor, gn = (r, e, t, n) => {
462
- for (var s = n > 1 ? void 0 : n ? ln(e, t) : e, o = r.length - 1, i; o >= 0; o--)
463
- (i = r[o]) && (s = i(s) || s);
464
- return s;
465
- }, y = (r, e) => (t, n) => e(t, n, r);
466
- let q = class extends le {
467
- constructor(e, t, n, s, o, i, a) {
450
+ K = gn([
451
+ I(1, g(M)),
452
+ I(2, _),
453
+ I(3, ge),
454
+ I(4, g(qe)),
455
+ I(5, g(Ke)),
456
+ I(6, g(Ye)),
457
+ I(7, g(Oe)),
458
+ I(8, g(je)),
459
+ I(9, nt)
460
+ ], K);
461
+ var _n = Object.getOwnPropertyDescriptor, kn = (a, e, t, n) => {
462
+ for (var r = n > 1 ? void 0 : n ? _n(e, t) : e, s = a.length - 1, o; s >= 0; s--)
463
+ (o = a[s]) && (r = o(r) || r);
464
+ return r;
465
+ }, E = (a, e) => (t, n) => e(t, n, a);
466
+ let Y = class extends me {
467
+ constructor(e, t, n, r, s, o, i, h) {
468
468
  super();
469
469
  /**
470
470
  * Permission point definition, can read the point constructor want to modify from here
471
471
  */
472
- E(this, "permissionPointsDefinition", ct);
472
+ b(this, "permissionPointsDefinition", gt);
473
473
  /**
474
474
  * An observable object used to monitor permission change events within a range, thereby triggering corresponding subsequent processing.
475
475
  */
476
- E(this, "rangeRuleChangedAfterAuth$");
476
+ b(this, "rangeRuleChangedAfterAuth$");
477
477
  /**
478
478
  * An observable object used to monitor permission change events within a worksheet, thereby triggering corresponding subsequent processing.
479
479
  */
480
- E(this, "sheetRuleChangedAfterAuth$");
481
- this._injector = e, this._commandService = t, this._permissionService = n, this._worksheetProtectionRuleModel = s, this._rangeProtectionRuleModel = o, this._worksheetProtectionPointRuleModel = i, this._authzIoService = a, this.rangeRuleChangedAfterAuth$ = this._rangeProtectionRuleModel.ruleRefresh$, this.sheetRuleChangedAfterAuth$ = this._worksheetProtectionRuleModel.ruleRefresh$;
480
+ b(this, "sheetRuleChangedAfterAuth$");
481
+ /**
482
+ * An observable object used to monitor the initialization state changes of unit permissions.
483
+ */
484
+ b(this, "unitPermissionInitStateChange$");
485
+ this._injector = e, this._commandService = t, this._permissionService = n, this._worksheetProtectionRuleModel = r, this._rangeProtectionRuleModel = s, this._worksheetProtectionPointRuleModel = o, this._workbookPermissionService = i, this._authzIoService = h, this.rangeRuleChangedAfterAuth$ = this._rangeProtectionRuleModel.ruleRefresh$, this.sheetRuleChangedAfterAuth$ = this._worksheetProtectionRuleModel.ruleRefresh$, this.unitPermissionInitStateChange$ = this._workbookPermissionService.unitPermissionInitStateChange$;
482
486
  }
483
487
  /**
484
488
  * Configures a specific permission point for a workbook.
@@ -497,8 +501,8 @@ let q = class extends le {
497
501
  * ```
498
502
  */
499
503
  setWorkbookPermissionPoint(e, t, n) {
500
- const s = new t(e);
501
- this._permissionService.getPermissionPoint(s.id) || this._permissionService.addPermissionPoint(s), this._permissionService.updatePermissionPoint(s.id, n);
504
+ const r = new t(e);
505
+ this._permissionService.getPermissionPoint(r.id) || this._permissionService.addPermissionPoint(r), this._permissionService.updatePermissionPoint(r.id, n);
502
506
  }
503
507
  /**
504
508
  * Check if a specific permission point is enabled for a workbook.
@@ -516,9 +520,9 @@ let q = class extends le {
516
520
  * ```
517
521
  */
518
522
  checkWorkbookPermissionPoint(e, t) {
519
- const n = new t(e), s = this._permissionService.getPermissionPoint(n.id);
520
- if (s)
521
- return s.value;
523
+ const n = new t(e), r = this._permissionService.getPermissionPoint(n.id);
524
+ if (r)
525
+ return r.value;
522
526
  }
523
527
  /**
524
528
  * This function is used to set whether the workbook can be edited
@@ -534,7 +538,7 @@ let q = class extends le {
534
538
  * ```
535
539
  */
536
540
  setWorkbookEditPermission(e, t) {
537
- this.setWorkbookPermissionPoint(e, Ke, t);
541
+ this.setWorkbookPermissionPoint(e, Je, t);
538
542
  }
539
543
  /**
540
544
  * This function is used to add a base permission for a worksheet.
@@ -561,8 +565,8 @@ let q = class extends le {
561
565
  async addWorksheetBasePermission(e, t) {
562
566
  if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).length > 0)
563
567
  throw new Error("sheet protection cannot intersect with range protection");
564
- const s = await this._authzIoService.create({
565
- objectType: W.Worksheet,
568
+ const r = await this._authzIoService.create({
569
+ objectType: F.Worksheet,
566
570
  worksheetObject: {
567
571
  collaborators: [],
568
572
  unitID: e,
@@ -571,17 +575,17 @@ let q = class extends le {
571
575
  scope: void 0
572
576
  }
573
577
  });
574
- if (this._commandService.syncExecuteCommand(ut.id, {
578
+ if (this._commandService.syncExecuteCommand(mt.id, {
575
579
  unitId: e,
576
580
  subUnitId: t,
577
581
  rule: {
578
- permissionId: s,
579
- unitType: W.Worksheet,
582
+ permissionId: r,
583
+ unitType: F.Worksheet,
580
584
  unitId: e,
581
585
  subUnitId: t
582
586
  }
583
587
  }))
584
- return s;
588
+ return r;
585
589
  }
586
590
  /**
587
591
  * Delete the entire table protection set for the worksheet and reset the point permissions of the worksheet to true
@@ -599,12 +603,12 @@ let q = class extends le {
599
603
  * ```
600
604
  */
601
605
  removeWorksheetPermission(e, t) {
602
- this._commandService.syncExecuteCommand(lt.id, {
606
+ this._commandService.syncExecuteCommand(_t.id, {
603
607
  unitId: e,
604
608
  subUnitId: t
605
- }), [...gt(), ...fe()].forEach((n) => {
606
- const s = new n(e, t);
607
- this._permissionService.updatePermissionPoint(s.id, !0);
609
+ }), [...kt(), ...Re()].forEach((n) => {
610
+ const r = new n(e, t);
611
+ this._permissionService.updatePermissionPoint(r.id, !0);
608
612
  }), this._worksheetProtectionPointRuleModel.deleteRule(e, t);
609
613
  }
610
614
  /**
@@ -629,21 +633,21 @@ let q = class extends le {
629
633
  * permission.setWorksheetPermissionPoint(unitId, subUnitId, permission.permissionPointsDefinition.WorksheetEditPermission, false);
630
634
  * ```
631
635
  */
632
- async setWorksheetPermissionPoint(e, t, n, s) {
633
- const o = this._worksheetProtectionRuleModel.getRule(e, t);
634
- let i;
635
- if (n === St || n === Ct)
636
- if (o)
637
- i = o.permissionId;
636
+ async setWorksheetPermissionPoint(e, t, n, r) {
637
+ const s = this._worksheetProtectionRuleModel.getRule(e, t);
638
+ let o;
639
+ if (n === ft || n === It)
640
+ if (s)
641
+ o = s.permissionId;
638
642
  else {
639
643
  if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).length > 0)
640
644
  throw new Error("sheet protection cannot intersect with range protection");
641
- i = await this.addWorksheetBasePermission(e, t);
645
+ o = await this.addWorksheetBasePermission(e, t);
642
646
  }
643
647
  else {
644
648
  const c = this._worksheetProtectionPointRuleModel.getRule(e, t);
645
- c ? i = c.permissionId : (i = await this._authzIoService.create({
646
- objectType: W.Worksheet,
649
+ c ? o = c.permissionId : (o = await this._authzIoService.create({
650
+ objectType: F.Worksheet,
647
651
  worksheetObject: {
648
652
  collaborators: [],
649
653
  unitID: e,
@@ -651,10 +655,10 @@ let q = class extends le {
651
655
  name: "",
652
656
  scope: void 0
653
657
  }
654
- }), this._commandService.syncExecuteCommand(mt.id, { unitId: e, subUnitId: t, rule: { unitId: e, subUnitId: t, permissionId: i } }));
658
+ }), this._commandService.syncExecuteCommand(wt.id, { unitId: e, subUnitId: t, rule: { unitId: e, subUnitId: t, permissionId: o } }));
655
659
  }
656
660
  const h = new n(e, t);
657
- return this._permissionService.getPermissionPoint(h.id) || this._permissionService.addPermissionPoint(h), this._permissionService.updatePermissionPoint(h.id, s), i;
661
+ return this._permissionService.getPermissionPoint(h.id) || this._permissionService.addPermissionPoint(h), this._permissionService.updatePermissionPoint(h.id, r), o;
658
662
  }
659
663
  /**
660
664
  * Check if a specific permission point is enabled for a worksheet.
@@ -676,9 +680,9 @@ let q = class extends le {
676
680
  * ```
677
681
  */
678
682
  checkWorksheetPermissionPoint(e, t, n) {
679
- const s = new n(e, t), o = this._permissionService.getPermissionPoint(s.id);
680
- if (o)
681
- return o.value;
683
+ const r = new n(e, t), s = this._permissionService.getPermissionPoint(r.id);
684
+ if (s)
685
+ return s.value;
682
686
  }
683
687
  /**
684
688
  * Adds a range protection to the worksheet.
@@ -707,34 +711,34 @@ let q = class extends le {
707
711
  * ```
708
712
  */
709
713
  async addRangeBaseProtection(e, t, n) {
710
- const s = await this._authzIoService.create({
711
- objectType: W.SelectRange,
714
+ const r = await this._authzIoService.create({
715
+ objectType: F.SelectRange,
712
716
  selectRangeObject: {
713
717
  collaborators: [],
714
718
  unitID: e,
715
719
  name: "",
716
720
  scope: void 0
717
721
  }
718
- }), o = `ruleId_${Oe(6)}`;
722
+ }), s = `ruleId_${Le(6)}`;
719
723
  if (this._worksheetProtectionRuleModel.getRule(e, t))
720
724
  throw new Error("sheet protection cannot intersect with range protection");
721
- if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).some((c) => c.ranges.some((u) => n.some((w) => P.intersects(w.getRange(), u)))))
725
+ if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).some((c) => c.ranges.some((l) => n.some((u) => x.intersects(u.getRange(), l)))))
722
726
  throw new Error("range protection cannot intersect");
723
- if (this._commandService.syncExecuteCommand(_t.id, {
727
+ if (this._commandService.syncExecuteCommand(St.id, {
724
728
  unitId: e,
725
729
  subUnitId: t,
726
730
  rules: [{
727
- permissionId: s,
728
- unitType: W.SelectRange,
731
+ permissionId: r,
732
+ unitType: F.SelectRange,
729
733
  unitId: e,
730
734
  subUnitId: t,
731
735
  ranges: n.map((c) => c.getRange()),
732
- id: o
736
+ id: s
733
737
  }]
734
738
  }))
735
739
  return {
736
- permissionId: s,
737
- ruleId: o
740
+ permissionId: r,
741
+ ruleId: s
738
742
  };
739
743
  }
740
744
  /**
@@ -759,13 +763,13 @@ let q = class extends le {
759
763
  * ```
760
764
  */
761
765
  removeRangeProtection(e, t, n) {
762
- this._commandService.syncExecuteCommand(wt.id, {
766
+ this._commandService.syncExecuteCommand(Ct.id, {
763
767
  unitId: e,
764
768
  subUnitId: t,
765
769
  ruleIds: n
766
- }) && this._rangeProtectionRuleModel.getSubunitRuleList(e, t).length === 0 && (this._worksheetProtectionPointRuleModel.deleteRule(e, t), [...fe()].forEach((i) => {
767
- const a = new i(e, t);
768
- this._permissionService.updatePermissionPoint(a.id, a.value);
770
+ }) && this._rangeProtectionRuleModel.getSubunitRuleList(e, t).length === 0 && (this._worksheetProtectionPointRuleModel.deleteRule(e, t), [...Re()].forEach((o) => {
771
+ const i = new o(e, t);
772
+ this._permissionService.updatePermissionPoint(i.id, i.value);
769
773
  }));
770
774
  }
771
775
  /**
@@ -795,9 +799,9 @@ let q = class extends le {
795
799
  * permission.setRangeProtectionPermissionPoint(unitId,subUnitId,permissionId, permission.permissionPointsDefinition.RangeProtectionPermissionEditPoint, false);
796
800
  * ```
797
801
  */
798
- setRangeProtectionPermissionPoint(e, t, n, s, o) {
799
- const i = new s(e, t, n);
800
- this._permissionService.getPermissionPoint(i.id) || this._permissionService.addPermissionPoint(i), this._permissionService.updatePermissionPoint(i.id, o);
802
+ setRangeProtectionPermissionPoint(e, t, n, r, s) {
803
+ const o = new r(e, t, n);
804
+ this._permissionService.getPermissionPoint(o.id) || this._permissionService.addPermissionPoint(o), this._permissionService.updatePermissionPoint(o.id, s);
801
805
  }
802
806
  /**
803
807
  * Sets the ranges for range protection in a worksheet.
@@ -826,18 +830,18 @@ let q = class extends le {
826
830
  * permission.setRangeProtectionRanges(unitId, subUnitId, ruleId, [newRange]);
827
831
  * ```
828
832
  */
829
- setRangeProtectionRanges(e, t, n, s) {
830
- const o = this._rangeProtectionRuleModel.getRule(e, t, n);
831
- if (o) {
832
- if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).filter((h) => h.id !== n).some((h) => h.ranges.some((d) => s.some((c) => P.intersects(c.getRange(), d)))))
833
+ setRangeProtectionRanges(e, t, n, r) {
834
+ const s = this._rangeProtectionRuleModel.getRule(e, t, n);
835
+ if (s) {
836
+ if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).filter((h) => h.id !== n).some((h) => h.ranges.some((d) => r.some((c) => x.intersects(c.getRange(), d)))))
833
837
  throw new Error("range protection cannot intersect");
834
- this._commandService.syncExecuteCommand(kt.id, {
838
+ this._commandService.syncExecuteCommand(vt.id, {
835
839
  unitId: e,
836
840
  subUnitId: t,
837
841
  ruleId: n,
838
842
  rule: {
839
- ...o,
840
- ranges: s.map((h) => h.getRange())
843
+ ...s,
844
+ ranges: r.map((h) => h.getRange())
841
845
  }
842
846
  });
843
847
  }
@@ -879,98 +883,106 @@ let q = class extends le {
879
883
  * }
880
884
  * ```
881
885
  */
882
- getPermissionInfoWithCell(e, t, n, s) {
883
- const o = rt(n, s), i = this._rangeProtectionRuleModel.getSubunitRuleList(e, t).find((a) => a.ranges.some((d) => P.intersects(o, d)));
884
- if (i)
886
+ getPermissionInfoWithCell(e, t, n, r) {
887
+ const s = ot(n, r), o = this._rangeProtectionRuleModel.getSubunitRuleList(e, t).find((i) => i.ranges.some((d) => x.intersects(s, d)));
888
+ if (o)
885
889
  return {
886
- permissionId: i.permissionId,
887
- ruleId: i.id
890
+ permissionId: o.permissionId,
891
+ ruleId: o.id
888
892
  };
889
893
  }
890
894
  };
891
- q = gn([
892
- y(0, l(x)),
893
- y(1, m),
894
- y(2, ue),
895
- y(3, l(Ge)),
896
- y(4, l($e)),
897
- y(5, l(qe)),
898
- y(6, l(Ve))
899
- ], q);
900
- function mn(r) {
901
- switch (r) {
895
+ Y = kn([
896
+ E(0, g(M)),
897
+ E(1, _),
898
+ E(2, ge),
899
+ E(3, g(qe)),
900
+ E(4, g(Ke)),
901
+ E(5, g(Ye)),
902
+ E(6, g(lt)),
903
+ E(7, g(Oe))
904
+ ], Y);
905
+ function wn(a) {
906
+ switch (a) {
902
907
  case "left":
903
- return T.LEFT;
908
+ return A.LEFT;
904
909
  case "center":
905
- return T.CENTER;
910
+ return A.CENTER;
906
911
  case "normal":
907
- return T.RIGHT;
912
+ return A.RIGHT;
908
913
  default:
909
- throw new Error(`Invalid horizontal alignment: ${r}`);
914
+ throw new Error(`Invalid horizontal alignment: ${a}`);
910
915
  }
911
916
  }
912
- function We(r) {
913
- switch (r) {
914
- case T.LEFT:
917
+ function Fe(a) {
918
+ switch (a) {
919
+ case A.LEFT:
915
920
  return "left";
916
- case T.CENTER:
921
+ case A.CENTER:
917
922
  return "center";
918
- case T.RIGHT:
923
+ case A.RIGHT:
919
924
  return "normal";
920
925
  default:
921
926
  return "general";
922
927
  }
923
928
  }
924
- function _n(r) {
925
- switch (r) {
929
+ function Sn(a) {
930
+ switch (a) {
926
931
  case "top":
927
- return A.TOP;
932
+ return D.TOP;
928
933
  case "middle":
929
- return A.MIDDLE;
934
+ return D.MIDDLE;
930
935
  case "bottom":
931
- return A.BOTTOM;
936
+ return D.BOTTOM;
932
937
  default:
933
- throw new Error(`Invalid vertical alignment: ${r}`);
938
+ throw new Error(`Invalid vertical alignment: ${a}`);
934
939
  }
935
940
  }
936
- function Be(r) {
937
- switch (r) {
938
- case A.TOP:
941
+ function Ve(a) {
942
+ switch (a) {
943
+ case D.TOP:
939
944
  return "top";
940
- case A.MIDDLE:
945
+ case D.MIDDLE:
941
946
  return "middle";
942
- case A.BOTTOM:
947
+ case D.BOTTOM:
943
948
  return "bottom";
944
949
  default:
945
950
  return "general";
946
951
  }
947
952
  }
948
- function ee(r, e) {
953
+ function ne(a, e) {
949
954
  return {
950
- startRow: r.startRow,
951
- endRow: r.endRow,
955
+ startRow: a.startRow,
956
+ endRow: a.endRow,
952
957
  startColumn: 0,
953
958
  endColumn: e.getColumnCount() - 1,
954
- rangeType: k.ROW
959
+ rangeType: w.ROW
955
960
  };
956
961
  }
957
- function te(r, e) {
962
+ function re(a, e) {
958
963
  return {
959
964
  startRow: 0,
960
965
  endRow: e.getRowCount() - 1,
961
- startColumn: r.startColumn,
962
- endColumn: r.endColumn,
963
- rangeType: k.COLUMN
966
+ startColumn: a.startColumn,
967
+ endColumn: a.endColumn,
968
+ rangeType: w.COLUMN
964
969
  };
965
970
  }
966
- var wn = Object.getOwnPropertyDescriptor, kn = (r, e, t, n) => {
967
- for (var s = n > 1 ? void 0 : n ? wn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
968
- (i = r[o]) && (s = i(s) || s);
969
- return s;
970
- }, ne = (r, e) => (t, n) => e(t, n, r);
971
- let _ = class extends ge {
972
- constructor(r, e, t, n, s, o) {
973
- super(n), this._workbook = r, this._worksheet = e, this._range = t, this._injector = n, this._commandService = s, this._formulaDataModel = o;
971
+ var Cn = Object.getOwnPropertyDescriptor, vn = (a, e, t, n) => {
972
+ for (var r = n > 1 ? void 0 : n ? Cn(e, t) : e, s = a.length - 1, o; s >= 0; s--)
973
+ (o = a[s]) && (r = o(r) || r);
974
+ return r;
975
+ }, se = (a, e) => (t, n) => e(t, n, a), W;
976
+ let k = (W = class extends _e {
977
+ constructor(e, t, n, r, s, o) {
978
+ super(r), this._workbook = e, this._worksheet = t, this._range = n, this._injector = r, this._commandService = s, this._formulaDataModel = o, this._runInitializers(
979
+ this._injector,
980
+ this._workbook,
981
+ this._worksheet,
982
+ this._range,
983
+ this._commandService,
984
+ this._formulaDataModel
985
+ );
974
986
  }
975
987
  /**
976
988
  * Get the unit ID of the current workbook
@@ -1129,8 +1141,8 @@ let _ = class extends ge {
1129
1141
  * ```
1130
1142
  */
1131
1143
  isMerged() {
1132
- const { startColumn: r, startRow: e, endColumn: t, endRow: n } = this._range;
1133
- return this._worksheet.getMergedCellRange(e, r, n, t).some((o) => P.equals(o, this._range));
1144
+ const { startColumn: e, startRow: t, endColumn: n, endRow: r } = this._range;
1145
+ return this._worksheet.getMergedCellRange(t, e, r, n).some((o) => x.equals(o, this._range));
1134
1146
  }
1135
1147
  /**
1136
1148
  * Return first cell style data in this range. Please note that if there are row styles, col styles and (or)
@@ -1150,8 +1162,8 @@ let _ = class extends ge {
1150
1162
  * console.log(fRange.getCellStyleData());
1151
1163
  * ```
1152
1164
  */
1153
- getCellStyleData(r = "row") {
1154
- return r !== "cell" ? this._worksheet.getComposedCellStyle(this._range.startRow, this._range.startColumn, r === "row") : this._worksheet.getCellStyle(this._range.startRow, this._range.startColumn);
1165
+ getCellStyleData(e = "row") {
1166
+ return e !== "cell" ? this._worksheet.getComposedCellStyle(this._range.startRow, this._range.startColumn, e === "row") : this._worksheet.getCellStyle(this._range.startRow, this._range.startColumn);
1155
1167
  }
1156
1168
  /**
1157
1169
  * Get the font family of the cell.
@@ -1170,9 +1182,9 @@ let _ = class extends ge {
1170
1182
  * console.log(fRange.getFontFamily());
1171
1183
  * ```
1172
1184
  */
1173
- getFontFamily(r = "row") {
1174
- var e, t;
1175
- return (t = (e = this.getCellStyleData(r)) == null ? void 0 : e.ff) != null ? t : null;
1185
+ getFontFamily(e = "row") {
1186
+ var t, n;
1187
+ return (n = (t = this.getCellStyleData(e)) == null ? void 0 : t.ff) != null ? n : null;
1176
1188
  }
1177
1189
  /**
1178
1190
  * Get the font size of the cell.
@@ -1191,9 +1203,9 @@ let _ = class extends ge {
1191
1203
  * console.log(fRange.getFontSize());
1192
1204
  * ```
1193
1205
  */
1194
- getFontSize(r = "row") {
1195
- var e, t;
1196
- return (t = (e = this.getCellStyleData(r)) == null ? void 0 : e.fs) != null ? t : null;
1206
+ getFontSize(e = "row") {
1207
+ var t, n;
1208
+ return (n = (t = this.getCellStyleData(e)) == null ? void 0 : t.fs) != null ? n : null;
1197
1209
  }
1198
1210
  /**
1199
1211
  * Return first cell style in this range.
@@ -1212,9 +1224,9 @@ let _ = class extends ge {
1212
1224
  * console.log(fRange.getCellStyle());
1213
1225
  * ```
1214
1226
  */
1215
- getCellStyle(r = "row") {
1216
- const e = this.getCellStyleData(r);
1217
- return e ? we.create(e) : null;
1227
+ getCellStyle(e = "row") {
1228
+ const t = this.getCellStyleData(e);
1229
+ return t ? Se.create(t) : null;
1218
1230
  }
1219
1231
  /**
1220
1232
  * Returns the cell styles for the cells in the range.
@@ -1233,16 +1245,16 @@ let _ = class extends ge {
1233
1245
  * console.log(fRange.getCellStyles());
1234
1246
  * ```
1235
1247
  */
1236
- getCellStyles(r = "row") {
1237
- return this.getCellDatas().map((t, n) => t.map((s, o) => {
1248
+ getCellStyles(e = "row") {
1249
+ return this.getCellDatas().map((n, r) => n.map((s, o) => {
1238
1250
  if (!s) return null;
1239
- const i = r !== "cell" ? this._worksheet.getComposedCellStyle(n + this._range.startRow, o + this._range.startColumn, r === "row") : this._worksheet.getCellStyle(n + this._range.startRow, o + this._range.startColumn);
1240
- return i ? we.create(i) : null;
1251
+ const i = e !== "cell" ? this._worksheet.getComposedCellStyle(r + this._range.startRow, o + this._range.startColumn, e === "row") : this._worksheet.getCellStyle(r + this._range.startRow, o + this._range.startColumn);
1252
+ return i ? Se.create(i) : null;
1241
1253
  }));
1242
1254
  }
1243
- getValue(r) {
1244
- var e, t;
1245
- return r ? this.getValueAndRichTextValue() : (t = (e = this._worksheet.getCell(this._range.startRow, this._range.startColumn)) == null ? void 0 : e.v) != null ? t : null;
1255
+ getValue(e) {
1256
+ var t, n;
1257
+ return e ? this.getValueAndRichTextValue() : (n = (t = this._worksheet.getCell(this._range.startRow, this._range.startColumn)) == null ? void 0 : t.v) != null ? n : null;
1246
1258
  }
1247
1259
  /**
1248
1260
  * Returns the raw value of the top-left cell in the range. Empty cells return `null`.
@@ -1264,9 +1276,9 @@ let _ = class extends ge {
1264
1276
  * ```
1265
1277
  */
1266
1278
  getRawValue() {
1267
- var e, t;
1268
- const r = this._worksheet.getCellMatrix().getValue(this._range.startRow, this._range.startColumn);
1269
- return r != null && r.p && ((e = r.p.body) != null && e.dataStream) ? r.p.body.dataStream : (t = r == null ? void 0 : r.v) != null ? t : null;
1279
+ var t, n;
1280
+ const e = this._worksheet.getCellMatrix().getValue(this._range.startRow, this._range.startColumn);
1281
+ return e != null && e.p && ((t = e.p.body) != null && t.dataStream) ? e.p.body.dataStream : (n = e == null ? void 0 : e.v) != null ? n : null;
1270
1282
  }
1271
1283
  /**
1272
1284
  * Returns the displayed value of the top-left cell in the range. The value is a String. Empty cells return an empty string.
@@ -1288,20 +1300,20 @@ let _ = class extends ge {
1288
1300
  * ```
1289
1301
  */
1290
1302
  getDisplayValue() {
1291
- var e, t, n;
1292
- const r = this._worksheet.getCell(this._range.startRow, this._range.startColumn);
1293
- return r != null && r.p && ((e = r.p.body) != null && e.dataStream) ? r.p.body.dataStream : (n = (t = r == null ? void 0 : r.v) == null ? void 0 : t.toString()) != null ? n : "";
1303
+ var t, n, r;
1304
+ const e = this._worksheet.getCell(this._range.startRow, this._range.startColumn);
1305
+ return e != null && e.p && ((t = e.p.body) != null && t.dataStream) ? e.p.body.dataStream : (r = (n = e == null ? void 0 : e.v) == null ? void 0 : n.toString()) != null ? r : "";
1294
1306
  }
1295
- getValues(r) {
1296
- var i, a;
1297
- if (r)
1307
+ getValues(e) {
1308
+ var i, h;
1309
+ if (e)
1298
1310
  return this.getValueAndRichTextValues();
1299
- const { startRow: e, endRow: t, startColumn: n, endColumn: s } = this._range, o = [];
1300
- for (let h = e; h <= t; h++) {
1301
- const d = [];
1302
- for (let c = n; c <= s; c++)
1303
- d.push((a = (i = this._worksheet.getCell(h, c)) == null ? void 0 : i.v) != null ? a : null);
1304
- o.push(d);
1311
+ const { startRow: t, endRow: n, startColumn: r, endColumn: s } = this._range, o = [];
1312
+ for (let d = t; d <= n; d++) {
1313
+ const c = [];
1314
+ for (let l = r; l <= s; l++)
1315
+ c.push((h = (i = this._worksheet.getCell(d, l)) == null ? void 0 : i.v) != null ? h : null);
1316
+ o.push(c);
1305
1317
  }
1306
1318
  return o;
1307
1319
  }
@@ -1348,15 +1360,15 @@ let _ = class extends ge {
1348
1360
  * ```
1349
1361
  */
1350
1362
  getRawValues() {
1351
- var i, a;
1352
- const r = this._worksheet.getCellMatrix(), { startRow: e, endRow: t, startColumn: n, endColumn: s } = this._range, o = [];
1353
- for (let h = e; h <= t; h++) {
1354
- const d = [];
1355
- for (let c = n; c <= s; c++) {
1356
- const u = r.getValue(h, c);
1357
- u != null && u.p && ((i = u.p.body) != null && i.dataStream) ? d.push(u.p.body.dataStream) : d.push((a = u == null ? void 0 : u.v) != null ? a : null);
1363
+ var i, h;
1364
+ const e = this._worksheet.getCellMatrix(), { startRow: t, endRow: n, startColumn: r, endColumn: s } = this._range, o = [];
1365
+ for (let d = t; d <= n; d++) {
1366
+ const c = [];
1367
+ for (let l = r; l <= s; l++) {
1368
+ const u = e.getValue(d, l);
1369
+ u != null && u.p && ((i = u.p.body) != null && i.dataStream) ? c.push(u.p.body.dataStream) : c.push((h = u == null ? void 0 : u.v) != null ? h : null);
1358
1370
  }
1359
- o.push(d);
1371
+ o.push(c);
1360
1372
  }
1361
1373
  return o;
1362
1374
  }
@@ -1403,15 +1415,15 @@ let _ = class extends ge {
1403
1415
  * ```
1404
1416
  */
1405
1417
  getDisplayValues() {
1406
- var o, i, a;
1407
- const { startRow: r, endRow: e, startColumn: t, endColumn: n } = this._range, s = [];
1408
- for (let h = r; h <= e; h++) {
1409
- const d = [];
1410
- for (let c = t; c <= n; c++) {
1411
- const u = this._worksheet.getCell(h, c);
1412
- u != null && u.p && ((o = u.p.body) != null && o.dataStream) ? d.push(u.p.body.dataStream) : d.push((a = (i = u == null ? void 0 : u.v) == null ? void 0 : i.toString()) != null ? a : "");
1418
+ var o, i, h;
1419
+ const { startRow: e, endRow: t, startColumn: n, endColumn: r } = this._range, s = [];
1420
+ for (let d = e; d <= t; d++) {
1421
+ const c = [];
1422
+ for (let l = n; l <= r; l++) {
1423
+ const u = this._worksheet.getCell(d, l);
1424
+ u != null && u.p && ((o = u.p.body) != null && o.dataStream) ? c.push(u.p.body.dataStream) : c.push((h = (i = u == null ? void 0 : u.v) == null ? void 0 : i.toString()) != null ? h : "");
1413
1425
  }
1414
- s.push(d);
1426
+ s.push(c);
1415
1427
  }
1416
1428
  return s;
1417
1429
  }
@@ -1427,8 +1439,8 @@ let _ = class extends ge {
1427
1439
  * ```
1428
1440
  */
1429
1441
  getCellData() {
1430
- var r;
1431
- return (r = this._worksheet.getCell(this._range.startRow, this._range.startColumn)) != null ? r : null;
1442
+ var e;
1443
+ return (e = this._worksheet.getCell(this._range.startRow, this._range.startColumn)) != null ? e : null;
1432
1444
  }
1433
1445
  /**
1434
1446
  * Alias for getCellDataGrid.
@@ -1456,11 +1468,11 @@ let _ = class extends ge {
1456
1468
  * ```
1457
1469
  */
1458
1470
  getCellDataGrid() {
1459
- const { startRow: r, endRow: e, startColumn: t, endColumn: n } = this._range, s = [];
1460
- for (let o = r; o <= e; o++) {
1471
+ const { startRow: e, endRow: t, startColumn: n, endColumn: r } = this._range, s = [];
1472
+ for (let o = e; o <= t; o++) {
1461
1473
  const i = [];
1462
- for (let a = t; a <= n; a++)
1463
- i.push(this._worksheet.getCellRaw(o, a));
1474
+ for (let h = n; h <= r; h++)
1475
+ i.push(this._worksheet.getCellRaw(o, h));
1464
1476
  s.push(i);
1465
1477
  }
1466
1478
  return s;
@@ -1479,8 +1491,8 @@ let _ = class extends ge {
1479
1491
  * ```
1480
1492
  */
1481
1493
  getRichTextValue() {
1482
- const r = this.getCellData();
1483
- return r != null && r.p ? new M(r.p) : null;
1494
+ const e = this.getCellData();
1495
+ return e != null && e.p ? new N(e.p) : null;
1484
1496
  }
1485
1497
  /**
1486
1498
  * Returns the rich text value for the cells in the range.
@@ -1496,7 +1508,7 @@ let _ = class extends ge {
1496
1508
  * ```
1497
1509
  */
1498
1510
  getRichTextValues() {
1499
- return this.getCellDataGrid().map((e) => e.map((t) => t != null && t.p ? new M(t.p) : null));
1511
+ return this.getCellDataGrid().map((t) => t.map((n) => n != null && n.p ? new N(n.p) : null));
1500
1512
  }
1501
1513
  /**
1502
1514
  * Returns the value and rich text value for the cell at the start of this range.
@@ -1512,8 +1524,8 @@ let _ = class extends ge {
1512
1524
  * ```
1513
1525
  */
1514
1526
  getValueAndRichTextValue() {
1515
- const r = this.getCellData();
1516
- return r != null && r.p ? new M(r.p) : r == null ? void 0 : r.v;
1527
+ const e = this.getCellData();
1528
+ return e != null && e.p ? new N(e.p) : e == null ? void 0 : e.v;
1517
1529
  }
1518
1530
  /**
1519
1531
  * Returns the value and rich text value for the cells in the range.
@@ -1527,7 +1539,7 @@ let _ = class extends ge {
1527
1539
  * ```
1528
1540
  */
1529
1541
  getValueAndRichTextValues() {
1530
- return this.getCellDatas().map((e) => e.map((t) => t != null && t.p ? new M(t.p) : t == null ? void 0 : t.v));
1542
+ return this.getCellDatas().map((t) => t.map((n) => n != null && n.p ? new N(n.p) : n == null ? void 0 : n.v));
1531
1543
  }
1532
1544
  /**
1533
1545
  * Returns the formula (A1 notation) of the top-left cell in the range, or an empty string if the cell is empty or doesn't contain a formula.
@@ -1541,13 +1553,13 @@ let _ = class extends ge {
1541
1553
  * ```
1542
1554
  */
1543
1555
  getFormula() {
1544
- var r;
1545
- return (r = this._formulaDataModel.getFormulaStringByCell(
1556
+ var e;
1557
+ return (e = this._formulaDataModel.getFormulaStringByCell(
1546
1558
  this._range.startRow,
1547
1559
  this._range.startColumn,
1548
1560
  this._worksheet.getSheetId(),
1549
1561
  this._workbook.getUnitId()
1550
- )) != null ? r : "";
1562
+ )) != null ? e : "";
1551
1563
  }
1552
1564
  /**
1553
1565
  * Returns the formulas (A1 notation) for the cells in the range. Entries in the 2D array are empty strings for cells with no formula.
@@ -1561,16 +1573,16 @@ let _ = class extends ge {
1561
1573
  * ```
1562
1574
  */
1563
1575
  getFormulas() {
1564
- const r = [], { startRow: e, endRow: t, startColumn: n, endColumn: s } = this._range, o = this._worksheet.getSheetId(), i = this._workbook.getUnitId();
1565
- for (let a = e; a <= t; a++) {
1566
- const h = [];
1567
- for (let d = n; d <= s; d++) {
1568
- const c = this._formulaDataModel.getFormulaStringByCell(a, d, o, i);
1569
- h.push(c || "");
1576
+ const e = [], { startRow: t, endRow: n, startColumn: r, endColumn: s } = this._range, o = this._worksheet.getSheetId(), i = this._workbook.getUnitId();
1577
+ for (let h = t; h <= n; h++) {
1578
+ const d = [];
1579
+ for (let c = r; c <= s; c++) {
1580
+ const l = this._formulaDataModel.getFormulaStringByCell(h, c, o, i);
1581
+ d.push(l || "");
1570
1582
  }
1571
- r.push(h);
1583
+ e.push(d);
1572
1584
  }
1573
- return r;
1585
+ return e;
1574
1586
  }
1575
1587
  /**
1576
1588
  * Gets whether text wrapping is enabled for top-left cell in the range.
@@ -1584,7 +1596,7 @@ let _ = class extends ge {
1584
1596
  * ```
1585
1597
  */
1586
1598
  getWrap() {
1587
- return this._worksheet.getRange(this._range).getWrap() === g.TRUE;
1599
+ return this._worksheet.getRange(this._range).getWrap() === m.TRUE;
1588
1600
  }
1589
1601
  /**
1590
1602
  * Gets whether text wrapping is enabled for cells in the range.
@@ -1597,10 +1609,10 @@ let _ = class extends ge {
1597
1609
  * console.log(fRange.getWraps());
1598
1610
  */
1599
1611
  getWraps() {
1600
- const r = this.getCellDatas(), e = this._workbook.getStyles();
1601
- return r.map((t) => t.map((n) => {
1612
+ const e = this.getCellDatas(), t = this._workbook.getStyles();
1613
+ return e.map((n) => n.map((r) => {
1602
1614
  var s;
1603
- return ((s = e.getStyleByCell(n)) == null ? void 0 : s.tb) === L.WRAP;
1615
+ return ((s = t.getStyleByCell(r)) == null ? void 0 : s.tb) === G.WRAP;
1604
1616
  }));
1605
1617
  }
1606
1618
  /**
@@ -1629,8 +1641,8 @@ let _ = class extends ge {
1629
1641
  * ```
1630
1642
  */
1631
1643
  getHorizontalAlignment() {
1632
- const r = this._worksheet.getRange(this._range).getHorizontalAlignment();
1633
- return We(r);
1644
+ const e = this._worksheet.getRange(this._range).getHorizontalAlignment();
1645
+ return Fe(e);
1634
1646
  }
1635
1647
  /**
1636
1648
  * Returns the horizontal alignments of the cells in the range.
@@ -1644,7 +1656,7 @@ let _ = class extends ge {
1644
1656
  * ```
1645
1657
  */
1646
1658
  getHorizontalAlignments() {
1647
- return this._worksheet.getRange(this._range).getHorizontalAlignments().map((e) => e.map((t) => We(t)));
1659
+ return this._worksheet.getRange(this._range).getHorizontalAlignments().map((t) => t.map((n) => Fe(n)));
1648
1660
  }
1649
1661
  /**
1650
1662
  * Returns the vertical alignment (top/middle/bottom) of the top-left cell in the range.
@@ -1658,7 +1670,7 @@ let _ = class extends ge {
1658
1670
  * ```
1659
1671
  */
1660
1672
  getVerticalAlignment() {
1661
- return Be(this._worksheet.getRange(this._range).getVerticalAlignment());
1673
+ return Ve(this._worksheet.getRange(this._range).getVerticalAlignment());
1662
1674
  }
1663
1675
  /**
1664
1676
  * Returns the vertical alignments of the cells in the range.
@@ -1672,7 +1684,7 @@ let _ = class extends ge {
1672
1684
  * ```
1673
1685
  */
1674
1686
  getVerticalAlignments() {
1675
- return this._worksheet.getRange(this._range).getVerticalAlignments().map((e) => e.map((t) => Be(t)));
1687
+ return this._worksheet.getRange(this._range).getVerticalAlignments().map((t) => t.map((n) => Ve(n)));
1676
1688
  }
1677
1689
  /**
1678
1690
  * Set custom meta data for first cell in current range.
@@ -1686,9 +1698,9 @@ let _ = class extends ge {
1686
1698
  * console.log(fRange.getCustomMetaData());
1687
1699
  * ```
1688
1700
  */
1689
- setCustomMetaData(r) {
1701
+ setCustomMetaData(e) {
1690
1702
  return this.setValue({
1691
- custom: r
1703
+ custom: e
1692
1704
  });
1693
1705
  }
1694
1706
  /**
@@ -1706,8 +1718,8 @@ let _ = class extends ge {
1706
1718
  * console.log(fRange.getCustomMetaDatas());
1707
1719
  * ```
1708
1720
  */
1709
- setCustomMetaDatas(r) {
1710
- return this.setValues(r.map((e) => e.map((t) => ({ custom: t }))));
1721
+ setCustomMetaDatas(e) {
1722
+ return this.setValues(e.map((t) => t.map((n) => ({ custom: n }))));
1711
1723
  }
1712
1724
  /**
1713
1725
  * Returns the custom meta data for the cell at the start of this range.
@@ -1721,9 +1733,9 @@ let _ = class extends ge {
1721
1733
  * ```
1722
1734
  */
1723
1735
  getCustomMetaData() {
1724
- var e;
1725
- const r = this.getCellData();
1726
- return (e = r == null ? void 0 : r.custom) != null ? e : null;
1736
+ var t;
1737
+ const e = this.getCellData();
1738
+ return (t = e == null ? void 0 : e.custom) != null ? t : null;
1727
1739
  }
1728
1740
  /**
1729
1741
  * Returns the custom meta data for the cells in the range.
@@ -1737,9 +1749,9 @@ let _ = class extends ge {
1737
1749
  * ```
1738
1750
  */
1739
1751
  getCustomMetaDatas() {
1740
- return this.getCellDataGrid().map((e) => e.map((t) => {
1741
- var n;
1742
- return (n = t == null ? void 0 : t.custom) != null ? n : null;
1752
+ return this.getCellDataGrid().map((t) => t.map((n) => {
1753
+ var r;
1754
+ return (r = n == null ? void 0 : n.custom) != null ? r : null;
1743
1755
  }));
1744
1756
  }
1745
1757
  /**
@@ -1756,15 +1768,15 @@ let _ = class extends ge {
1756
1768
  * fRange.setBorder(univerAPI.Enum.BorderType.ALL, univerAPI.Enum.BorderStyleTypes.THIN, '#ff0000');
1757
1769
  * ```
1758
1770
  */
1759
- setBorder(r, e, t) {
1760
- return this._commandService.syncExecuteCommand(vt.id, {
1771
+ setBorder(e, t, n) {
1772
+ return this._commandService.syncExecuteCommand(Rt.id, {
1761
1773
  unitId: this._workbook.getUnitId(),
1762
1774
  subUnitId: this._worksheet.getSheetId(),
1763
1775
  ranges: [this._range],
1764
1776
  value: {
1765
- type: r,
1766
- style: e,
1767
- color: t
1777
+ type: e,
1778
+ style: t,
1779
+ color: n
1768
1780
  }
1769
1781
  }), this;
1770
1782
  }
@@ -1781,9 +1793,9 @@ let _ = class extends ge {
1781
1793
  * ```
1782
1794
  */
1783
1795
  getBackground() {
1784
- var e, t;
1785
- const r = this.getCellStyle();
1786
- return (t = (e = r == null ? void 0 : r.background) == null ? void 0 : e.rgb) != null ? t : ke.bg.rgb;
1796
+ var t, n;
1797
+ const e = this.getCellStyle();
1798
+ return (n = (t = e == null ? void 0 : e.background) == null ? void 0 : t.rgb) != null ? n : Ce.bg.rgb;
1787
1799
  }
1788
1800
  /**
1789
1801
  * Returns the background colors of the cells in the range.
@@ -1797,9 +1809,9 @@ let _ = class extends ge {
1797
1809
  * ```
1798
1810
  */
1799
1811
  getBackgrounds() {
1800
- return this.getCellStyles().map((e) => e.map((t) => {
1801
- var n, s;
1802
- return (s = (n = t == null ? void 0 : t.background) == null ? void 0 : n.rgb) != null ? s : ke.bg.rgb;
1812
+ return this.getCellStyles().map((t) => t.map((n) => {
1813
+ var r, s;
1814
+ return (s = (r = n == null ? void 0 : n.background) == null ? void 0 : r.rgb) != null ? s : Ce.bg.rgb;
1803
1815
  }));
1804
1816
  }
1805
1817
  /**
@@ -1814,15 +1826,15 @@ let _ = class extends ge {
1814
1826
  * fRange.setBackgroundColor('red');
1815
1827
  * ```
1816
1828
  */
1817
- setBackgroundColor(r) {
1818
- return this._commandService.syncExecuteCommand(b.id, {
1829
+ setBackgroundColor(e) {
1830
+ return this._commandService.syncExecuteCommand(p.id, {
1819
1831
  unitId: this._workbook.getUnitId(),
1820
1832
  subUnitId: this._worksheet.getSheetId(),
1821
1833
  range: this._range,
1822
1834
  style: {
1823
1835
  type: "bg",
1824
1836
  value: {
1825
- rgb: r
1837
+ rgb: e
1826
1838
  }
1827
1839
  }
1828
1840
  }), this;
@@ -1839,8 +1851,8 @@ let _ = class extends ge {
1839
1851
  * fRange.setBackground('red');
1840
1852
  * ```
1841
1853
  */
1842
- setBackground(r) {
1843
- return this.setBackgroundColor(r), this;
1854
+ setBackground(e) {
1855
+ return this.setBackgroundColor(e), this;
1844
1856
  }
1845
1857
  /**
1846
1858
  * Set rotation for text in current range.
@@ -1854,12 +1866,12 @@ let _ = class extends ge {
1854
1866
  * fRange.setTextRotation(45);
1855
1867
  * ```
1856
1868
  */
1857
- setTextRotation(r) {
1858
- return this._commandService.syncExecuteCommand(ft.id, {
1869
+ setTextRotation(e) {
1870
+ return this._commandService.syncExecuteCommand(bt.id, {
1859
1871
  unitId: this._workbook.getUnitId(),
1860
1872
  subUnitId: this._worksheet.getSheetId(),
1861
1873
  range: this._range,
1862
- value: r
1874
+ value: e
1863
1875
  }), this;
1864
1876
  }
1865
1877
  /**
@@ -1876,15 +1888,15 @@ let _ = class extends ge {
1876
1888
  * fRange.setValue({ v: 234, s: { bg: { rgb: '#ff0000' } } });
1877
1889
  * ```
1878
1890
  */
1879
- setValue(r) {
1880
- const e = re(r);
1881
- if (!e)
1891
+ setValue(e) {
1892
+ const t = oe(e);
1893
+ if (!t)
1882
1894
  throw new Error("Invalid value");
1883
- return this._commandService.syncExecuteCommand(B.id, {
1895
+ return this._commandService.syncExecuteCommand(V.id, {
1884
1896
  unitId: this._workbook.getUnitId(),
1885
1897
  subUnitId: this._worksheet.getSheetId(),
1886
1898
  range: this._range,
1887
- value: e
1899
+ value: t
1888
1900
  }), this;
1889
1901
  }
1890
1902
  /**
@@ -1901,11 +1913,11 @@ let _ = class extends ge {
1901
1913
  * fRange.setValueForCell({ v: 234, s: { bg: { rgb: '#ff0000' } } });
1902
1914
  * ```
1903
1915
  */
1904
- setValueForCell(r) {
1905
- const e = re(r);
1906
- if (!e)
1916
+ setValueForCell(e) {
1917
+ const t = oe(e);
1918
+ if (!t)
1907
1919
  throw new Error("Invalid value");
1908
- return this._commandService.syncExecuteCommand(B.id, {
1920
+ return this._commandService.syncExecuteCommand(V.id, {
1909
1921
  unitId: this._workbook.getUnitId(),
1910
1922
  subUnitId: this._worksheet.getSheetId(),
1911
1923
  range: {
@@ -1914,7 +1926,7 @@ let _ = class extends ge {
1914
1926
  endColumn: this._range.startColumn,
1915
1927
  endRow: this._range.startRow
1916
1928
  },
1917
- value: e
1929
+ value: t
1918
1930
  }), this;
1919
1931
  }
1920
1932
  /**
@@ -1937,8 +1949,8 @@ let _ = class extends ge {
1937
1949
  * console.log(fRange.getValue(true).toPlainText()); // Hello World
1938
1950
  * ```
1939
1951
  */
1940
- setRichTextValueForCell(r) {
1941
- const e = r instanceof M ? r.getData() : r, t = {
1952
+ setRichTextValueForCell(e) {
1953
+ const t = e instanceof N ? e.getData() : e, n = {
1942
1954
  unitId: this._workbook.getUnitId(),
1943
1955
  subUnitId: this._worksheet.getSheetId(),
1944
1956
  range: {
@@ -1947,9 +1959,9 @@ let _ = class extends ge {
1947
1959
  endColumn: this._range.startColumn,
1948
1960
  endRow: this._range.startRow
1949
1961
  },
1950
- value: { p: e }
1962
+ value: { p: t }
1951
1963
  };
1952
- return this._commandService.syncExecuteCommand(B.id, t), this;
1964
+ return this._commandService.syncExecuteCommand(V.id, n), this;
1953
1965
  }
1954
1966
  /**
1955
1967
  * Set the rich text value for the cells in the range.
@@ -1974,14 +1986,14 @@ let _ = class extends ge {
1974
1986
  * console.log(fRange.getValue(true).toPlainText()); // Hello World
1975
1987
  * ```
1976
1988
  */
1977
- setRichTextValues(r) {
1978
- const e = r.map((s) => s.map((o) => o && { p: o instanceof M ? o.getData() : o })), t = Se(e, this._range), n = {
1989
+ setRichTextValues(e) {
1990
+ const t = e.map((s) => s.map((o) => o && { p: o instanceof N ? o.getData() : o })), n = ve(t, this._range), r = {
1979
1991
  unitId: this._workbook.getUnitId(),
1980
1992
  subUnitId: this._worksheet.getSheetId(),
1981
1993
  range: this._range,
1982
- value: t
1994
+ value: n
1983
1995
  };
1984
- return this._commandService.syncExecuteCommand(B.id, n), this;
1996
+ return this._commandService.syncExecuteCommand(V.id, r), this;
1985
1997
  }
1986
1998
  /**
1987
1999
  * Set the cell wrap of the given range.
@@ -1997,12 +2009,12 @@ let _ = class extends ge {
1997
2009
  * console.log(fRange.getWrap());
1998
2010
  * ```
1999
2011
  */
2000
- setWrap(r) {
2001
- return this._commandService.syncExecuteCommand(ie.id, {
2012
+ setWrap(e) {
2013
+ return this._commandService.syncExecuteCommand(he.id, {
2002
2014
  unitId: this._workbook.getUnitId(),
2003
2015
  subUnitId: this._worksheet.getSheetId(),
2004
2016
  range: this._range,
2005
- value: r ? L.WRAP : L.UNSPECIFIED
2017
+ value: e ? G.WRAP : G.UNSPECIFIED
2006
2018
  }), this;
2007
2019
  }
2008
2020
  /**
@@ -2018,12 +2030,12 @@ let _ = class extends ge {
2018
2030
  * console.log(fRange.getWrapStrategy());
2019
2031
  * ```
2020
2032
  */
2021
- setWrapStrategy(r) {
2022
- return this._commandService.syncExecuteCommand(ie.id, {
2033
+ setWrapStrategy(e) {
2034
+ return this._commandService.syncExecuteCommand(he.id, {
2023
2035
  unitId: this._workbook.getUnitId(),
2024
2036
  subUnitId: this._worksheet.getSheetId(),
2025
2037
  range: this._range,
2026
- value: r
2038
+ value: e
2027
2039
  }), this;
2028
2040
  }
2029
2041
  /**
@@ -2038,12 +2050,12 @@ let _ = class extends ge {
2038
2050
  * fRange.setVerticalAlignment('top');
2039
2051
  * ```
2040
2052
  */
2041
- setVerticalAlignment(r) {
2042
- return this._commandService.syncExecuteCommand(It.id, {
2053
+ setVerticalAlignment(e) {
2054
+ return this._commandService.syncExecuteCommand(pt.id, {
2043
2055
  unitId: this._workbook.getUnitId(),
2044
2056
  subUnitId: this._worksheet.getSheetId(),
2045
2057
  range: this._range,
2046
- value: _n(r)
2058
+ value: Sn(e)
2047
2059
  }), this;
2048
2060
  }
2049
2061
  /**
@@ -2058,12 +2070,12 @@ let _ = class extends ge {
2058
2070
  * fRange.setHorizontalAlignment('left');
2059
2071
  * ```
2060
2072
  */
2061
- setHorizontalAlignment(r) {
2062
- return this._commandService.syncExecuteCommand(Rt.id, {
2073
+ setHorizontalAlignment(e) {
2074
+ return this._commandService.syncExecuteCommand(Et.id, {
2063
2075
  unitId: this._workbook.getUnitId(),
2064
2076
  subUnitId: this._worksheet.getSheetId(),
2065
2077
  range: this._range,
2066
- value: mn(r)
2078
+ value: wn(e)
2067
2079
  }), this;
2068
2080
  }
2069
2081
  /**
@@ -2081,13 +2093,13 @@ let _ = class extends ge {
2081
2093
  * ]);
2082
2094
  * ```
2083
2095
  */
2084
- setValues(r) {
2085
- const e = Se(r, this._range);
2086
- return this._commandService.syncExecuteCommand(B.id, {
2096
+ setValues(e) {
2097
+ const t = ve(e, this._range);
2098
+ return this._commandService.syncExecuteCommand(V.id, {
2087
2099
  unitId: this._workbook.getUnitId(),
2088
2100
  subUnitId: this._worksheet.getSheetId(),
2089
2101
  range: this._range,
2090
- value: e
2102
+ value: t
2091
2103
  }), this;
2092
2104
  }
2093
2105
  /**
@@ -2102,26 +2114,26 @@ let _ = class extends ge {
2102
2114
  * fRange.setFontWeight('bold');
2103
2115
  * ```
2104
2116
  */
2105
- setFontWeight(r) {
2106
- let e;
2107
- if (r === "bold")
2108
- e = g.TRUE;
2109
- else if (r === "normal")
2110
- e = g.FALSE;
2111
- else if (r === null)
2112
- e = null;
2117
+ setFontWeight(e) {
2118
+ let t;
2119
+ if (e === "bold")
2120
+ t = m.TRUE;
2121
+ else if (e === "normal")
2122
+ t = m.FALSE;
2123
+ else if (e === null)
2124
+ t = null;
2113
2125
  else
2114
2126
  throw new Error("Invalid fontWeight");
2115
- const t = {
2127
+ const n = {
2116
2128
  type: "bl",
2117
- value: e
2118
- }, n = {
2129
+ value: t
2130
+ }, r = {
2119
2131
  unitId: this._workbook.getUnitId(),
2120
2132
  subUnitId: this._worksheet.getSheetId(),
2121
2133
  range: this._range,
2122
- style: t
2134
+ style: n
2123
2135
  };
2124
- return this._commandService.syncExecuteCommand(b.id, n), this;
2136
+ return this._commandService.syncExecuteCommand(p.id, r), this;
2125
2137
  }
2126
2138
  /**
2127
2139
  * Sets the font style for the given range ('italic' or 'normal').
@@ -2135,26 +2147,26 @@ let _ = class extends ge {
2135
2147
  * fRange.setFontStyle('italic');
2136
2148
  * ```
2137
2149
  */
2138
- setFontStyle(r) {
2139
- let e;
2140
- if (r === "italic")
2141
- e = g.TRUE;
2142
- else if (r === "normal")
2143
- e = g.FALSE;
2144
- else if (r === null)
2145
- e = null;
2150
+ setFontStyle(e) {
2151
+ let t;
2152
+ if (e === "italic")
2153
+ t = m.TRUE;
2154
+ else if (e === "normal")
2155
+ t = m.FALSE;
2156
+ else if (e === null)
2157
+ t = null;
2146
2158
  else
2147
2159
  throw new Error("Invalid fontStyle");
2148
- const t = {
2160
+ const n = {
2149
2161
  type: "it",
2150
- value: e
2151
- }, n = {
2162
+ value: t
2163
+ }, r = {
2152
2164
  unitId: this._workbook.getUnitId(),
2153
2165
  subUnitId: this._worksheet.getSheetId(),
2154
2166
  range: this._range,
2155
- style: t
2167
+ style: n
2156
2168
  };
2157
- return this._commandService.syncExecuteCommand(b.id, n), this;
2169
+ return this._commandService.syncExecuteCommand(p.id, r), this;
2158
2170
  }
2159
2171
  /**
2160
2172
  * Sets the font line style of the given range ('underline', 'line-through', or 'none').
@@ -2168,22 +2180,22 @@ let _ = class extends ge {
2168
2180
  * fRange.setFontLine('underline');
2169
2181
  * ```
2170
2182
  */
2171
- setFontLine(r) {
2172
- if (r === "underline")
2183
+ setFontLine(e) {
2184
+ if (e === "underline")
2173
2185
  this._setFontUnderline({
2174
- s: g.TRUE
2186
+ s: m.TRUE
2175
2187
  });
2176
- else if (r === "line-through")
2188
+ else if (e === "line-through")
2177
2189
  this._setFontStrikethrough({
2178
- s: g.TRUE
2190
+ s: m.TRUE
2179
2191
  });
2180
- else if (r === "none")
2192
+ else if (e === "none")
2181
2193
  this._setFontUnderline({
2182
- s: g.FALSE
2194
+ s: m.FALSE
2183
2195
  }), this._setFontStrikethrough({
2184
- s: g.FALSE
2196
+ s: m.FALSE
2185
2197
  });
2186
- else if (r === null)
2198
+ else if (e === null)
2187
2199
  this._setFontUnderline(null), this._setFontStrikethrough(null);
2188
2200
  else
2189
2201
  throw new Error("Invalid fontLine");
@@ -2194,34 +2206,34 @@ let _ = class extends ge {
2194
2206
  * @param {ITextDecoration|null} value The font underline style of the given ITextDecoration; a null value resets the font underline style
2195
2207
  * @returns {void}
2196
2208
  */
2197
- _setFontUnderline(r) {
2198
- const e = {
2209
+ _setFontUnderline(e) {
2210
+ const t = {
2199
2211
  type: "ul",
2200
- value: r
2201
- }, t = {
2212
+ value: e
2213
+ }, n = {
2202
2214
  unitId: this._workbook.getUnitId(),
2203
2215
  subUnitId: this._worksheet.getSheetId(),
2204
2216
  range: this._range,
2205
- style: e
2217
+ style: t
2206
2218
  };
2207
- this._commandService.syncExecuteCommand(b.id, t);
2219
+ this._commandService.syncExecuteCommand(p.id, n);
2208
2220
  }
2209
2221
  /**
2210
2222
  * Sets the font strikethrough style of the given ITextDecoration
2211
2223
  * @param {ITextDecoration|null} value The font strikethrough style of the given ITextDecoration; a null value resets the font strikethrough style
2212
2224
  * @returns {void}
2213
2225
  */
2214
- _setFontStrikethrough(r) {
2215
- const e = {
2226
+ _setFontStrikethrough(e) {
2227
+ const t = {
2216
2228
  type: "st",
2217
- value: r
2218
- }, t = {
2229
+ value: e
2230
+ }, n = {
2219
2231
  unitId: this._workbook.getUnitId(),
2220
2232
  subUnitId: this._worksheet.getSheetId(),
2221
2233
  range: this._range,
2222
- style: e
2234
+ style: t
2223
2235
  };
2224
- this._commandService.syncExecuteCommand(b.id, t);
2236
+ this._commandService.syncExecuteCommand(p.id, n);
2225
2237
  }
2226
2238
  /**
2227
2239
  * Sets the font family, such as "Arial" or "Helvetica".
@@ -2235,17 +2247,17 @@ let _ = class extends ge {
2235
2247
  * fRange.setFontFamily('Arial');
2236
2248
  * ```
2237
2249
  */
2238
- setFontFamily(r) {
2239
- const e = {
2250
+ setFontFamily(e) {
2251
+ const t = {
2240
2252
  type: "ff",
2241
- value: r
2242
- }, t = {
2253
+ value: e
2254
+ }, n = {
2243
2255
  unitId: this._workbook.getUnitId(),
2244
2256
  subUnitId: this._worksheet.getSheetId(),
2245
2257
  range: this._range,
2246
- style: e
2258
+ style: t
2247
2259
  };
2248
- return this._commandService.syncExecuteCommand(b.id, t), this;
2260
+ return this._commandService.syncExecuteCommand(p.id, n), this;
2249
2261
  }
2250
2262
  /**
2251
2263
  * Sets the font size, with the size being the point size to use.
@@ -2259,17 +2271,17 @@ let _ = class extends ge {
2259
2271
  * fRange.setFontSize(24);
2260
2272
  * ```
2261
2273
  */
2262
- setFontSize(r) {
2263
- const e = {
2274
+ setFontSize(e) {
2275
+ const t = {
2264
2276
  type: "fs",
2265
- value: r
2266
- }, t = {
2277
+ value: e
2278
+ }, n = {
2267
2279
  unitId: this._workbook.getUnitId(),
2268
2280
  subUnitId: this._worksheet.getSheetId(),
2269
2281
  range: this._range,
2270
- style: e
2282
+ style: t
2271
2283
  };
2272
- return this._commandService.syncExecuteCommand(b.id, t), this;
2284
+ return this._commandService.syncExecuteCommand(p.id, n), this;
2273
2285
  }
2274
2286
  /**
2275
2287
  * Sets the font color in CSS notation (such as '#ffffff' or 'white').
@@ -2283,17 +2295,17 @@ let _ = class extends ge {
2283
2295
  * fRange.setFontColor('#ff0000');
2284
2296
  * ```
2285
2297
  */
2286
- setFontColor(r) {
2287
- const t = {
2298
+ setFontColor(e) {
2299
+ const n = {
2288
2300
  type: "cl",
2289
- value: r === null ? null : { rgb: r }
2290
- }, n = {
2301
+ value: e === null ? null : { rgb: e }
2302
+ }, r = {
2291
2303
  unitId: this._workbook.getUnitId(),
2292
2304
  subUnitId: this._worksheet.getSheetId(),
2293
2305
  range: this._range,
2294
- style: t
2306
+ style: n
2295
2307
  };
2296
- return this._commandService.syncExecuteCommand(b.id, n), this;
2308
+ return this._commandService.syncExecuteCommand(p.id, r), this;
2297
2309
  }
2298
2310
  // #endregion editing
2299
2311
  //#region Merge cell
@@ -2310,9 +2322,9 @@ let _ = class extends ge {
2310
2322
  * console.log(fRange.isMerged());
2311
2323
  * ```
2312
2324
  */
2313
- merge(r = !0) {
2314
- const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId();
2315
- return Q(this._injector, e, t, [this._range], r), this;
2325
+ merge(e = !0) {
2326
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
2327
+ return Z(this._injector, t, n, [this._range], e), this;
2316
2328
  }
2317
2329
  /**
2318
2330
  * Merges cells in a range horizontally.
@@ -2332,9 +2344,9 @@ let _ = class extends ge {
2332
2344
  * });
2333
2345
  * ```
2334
2346
  */
2335
- mergeAcross(r = !0) {
2336
- const e = Ie([this._range], N.ROWS), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
2337
- return Q(this._injector, t, n, e, r), this;
2347
+ mergeAcross(e = !0) {
2348
+ const t = be([this._range], T.ROWS), n = this._workbook.getUnitId(), r = this._worksheet.getSheetId();
2349
+ return Z(this._injector, n, r, t, e), this;
2338
2350
  }
2339
2351
  /**
2340
2352
  * Merges cells in a range vertically.
@@ -2354,9 +2366,9 @@ let _ = class extends ge {
2354
2366
  * });
2355
2367
  * ```
2356
2368
  */
2357
- mergeVertically(r = !0) {
2358
- const e = Ie([this._range], N.COLUMNS), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
2359
- return Q(this._injector, t, n, e, r), this;
2369
+ mergeVertically(e = !0) {
2370
+ const t = be([this._range], T.COLUMNS), n = this._workbook.getUnitId(), r = this._worksheet.getSheetId();
2371
+ return Z(this._injector, n, r, t, e), this;
2360
2372
  }
2361
2373
  /**
2362
2374
  * Returns true if cells in the current range overlap a merged cell.
@@ -2372,8 +2384,8 @@ let _ = class extends ge {
2372
2384
  * ```
2373
2385
  */
2374
2386
  isPartOfMerge() {
2375
- const { startRow: r, startColumn: e, endRow: t, endColumn: n } = this._range;
2376
- return this._worksheet.getMergedCellRange(r, e, t, n).length > 0;
2387
+ const { startRow: e, startColumn: t, endRow: n, endColumn: r } = this._range;
2388
+ return this._worksheet.getMergedCellRange(e, t, n, r).length > 0;
2377
2389
  }
2378
2390
  /**
2379
2391
  * Break all horizontally- or vertically-merged cells contained within the range list into individual cells again.
@@ -2391,7 +2403,7 @@ let _ = class extends ge {
2391
2403
  * ```
2392
2404
  */
2393
2405
  breakApart() {
2394
- return this._commandService.syncExecuteCommand(bt.id, { ranges: [this._range] }), this;
2406
+ return this._commandService.syncExecuteCommand(yt.id, { ranges: [this._range] }), this;
2395
2407
  }
2396
2408
  //#endregion
2397
2409
  /**
@@ -2409,10 +2421,10 @@ let _ = class extends ge {
2409
2421
  * });
2410
2422
  * ```
2411
2423
  */
2412
- forEach(r) {
2413
- const { startColumn: e, startRow: t, endColumn: n, endRow: s } = this._range;
2414
- this._worksheet.getMatrixWithMergedCells(t, e, s, n).forValue((o, i, a) => {
2415
- r(o, i, a);
2424
+ forEach(e) {
2425
+ const { startColumn: t, startRow: n, endColumn: r, endRow: s } = this._range;
2426
+ this._worksheet.getMatrixWithMergedCells(n, t, s, r).forValue((o, i, h) => {
2427
+ e(o, i, h);
2416
2428
  });
2417
2429
  }
2418
2430
  /**
@@ -2447,13 +2459,13 @@ let _ = class extends ge {
2447
2459
  * console.log(fRange.getA1Notation(true, univerAPI.Enum.AbsoluteRefType.ALL, univerAPI.Enum.AbsoluteRefType.ALL)); // Sheet1!$A$1:$B$2
2448
2460
  * ```
2449
2461
  */
2450
- getA1Notation(r, e, t) {
2451
- const n = {
2462
+ getA1Notation(e, t, n) {
2463
+ const r = {
2452
2464
  ...this._range,
2453
- startAbsoluteRefType: e,
2454
- endAbsoluteRefType: t
2465
+ startAbsoluteRefType: t,
2466
+ endAbsoluteRefType: n
2455
2467
  };
2456
- return r ? an(this._worksheet.getName(), n) : _e(n);
2468
+ return e ? dn(this._worksheet.getName(), r) : we(r);
2457
2469
  }
2458
2470
  /**
2459
2471
  * Sets the specified range as the active range, with the top left cell in the range as the current cell.
@@ -2502,24 +2514,24 @@ let _ = class extends ge {
2502
2514
  * ```
2503
2515
  */
2504
2516
  activateAsCurrentCell() {
2505
- const r = this._worksheet.getMergedCell(this._range.startRow, this._range.startColumn);
2506
- if (r && P.equals(r, this._range) || !r && this._range.startRow === this._range.endRow && this._range.startColumn === this._range.endColumn) {
2507
- const n = this._injector.createInstance(C, this._workbook).getActiveRange();
2508
- if (!n || n.getUnitId() !== this.getUnitId() || n.getSheetId() !== this.getSheetId())
2517
+ const e = this._worksheet.getMergedCell(this._range.startRow, this._range.startColumn);
2518
+ if (e && x.equals(e, this._range) || !e && this._range.startRow === this._range.endRow && this._range.startColumn === this._range.endColumn) {
2519
+ const r = this._injector.createInstance(C, this._workbook).getActiveRange();
2520
+ if (!r || r.getUnitId() !== this.getUnitId() || r.getSheetId() !== this.getSheetId())
2509
2521
  return this.activate();
2510
- if (P.contains(n.getRange(), this._range)) {
2522
+ if (x.contains(r.getRange(), this._range)) {
2511
2523
  const s = {
2512
2524
  unitId: this.getUnitId(),
2513
2525
  subUnitId: this.getSheetId(),
2514
2526
  selections: [
2515
2527
  {
2516
- range: n.getRange(),
2517
- primary: z(this.getRange(), this._worksheet),
2528
+ range: r.getRange(),
2529
+ primary: $(this.getRange(), this._worksheet),
2518
2530
  style: null
2519
2531
  }
2520
2532
  ]
2521
2533
  };
2522
- return this._commandService.syncExecuteCommand(me.id, s), this;
2534
+ return this._commandService.syncExecuteCommand(ke.id, s), this;
2523
2535
  }
2524
2536
  return this.activate();
2525
2537
  } else
@@ -2559,14 +2571,14 @@ let _ = class extends ge {
2559
2571
  * fRange.splitTextToColumns(true, univerAPI.Enum.SplitDelimiterType.Custom, '#');
2560
2572
  * ```
2561
2573
  */
2562
- splitTextToColumns(r, e, t) {
2563
- this._commandService.syncExecuteCommand(pt.id, {
2574
+ splitTextToColumns(e, t, n) {
2575
+ this._commandService.syncExecuteCommand(Ut.id, {
2564
2576
  unitId: this._workbook.getUnitId(),
2565
2577
  subUnitId: this._worksheet.getSheetId(),
2566
2578
  range: this._range,
2567
- delimiter: e,
2568
- customDelimiter: t,
2569
- treatMultipleDelimitersAsOne: r
2579
+ delimiter: t,
2580
+ customDelimiter: n,
2581
+ treatMultipleDelimitersAsOne: e
2570
2582
  });
2571
2583
  }
2572
2584
  /**
@@ -2580,16 +2592,16 @@ let _ = class extends ge {
2580
2592
  * fRange.useThemeStyle('default');
2581
2593
  * ```
2582
2594
  */
2583
- useThemeStyle(r) {
2584
- if (r == null) {
2585
- const e = this.getUsedThemeStyle();
2586
- e && this.removeThemeStyle(e);
2595
+ useThemeStyle(e) {
2596
+ if (e == null) {
2597
+ const t = this.getUsedThemeStyle();
2598
+ t && this.removeThemeStyle(t);
2587
2599
  } else
2588
- this._commandService.syncExecuteCommand(Et.id, {
2600
+ this._commandService.syncExecuteCommand(Pt.id, {
2589
2601
  unitId: this._workbook.getUnitId(),
2590
2602
  subUnitId: this._worksheet.getSheetId(),
2591
2603
  range: this._range,
2592
- themeName: r
2604
+ themeName: e
2593
2605
  });
2594
2606
  }
2595
2607
  /**
@@ -2603,12 +2615,12 @@ let _ = class extends ge {
2603
2615
  * fRange.removeThemeStyle('default');
2604
2616
  * ```
2605
2617
  */
2606
- removeThemeStyle(r) {
2607
- this._commandService.syncExecuteCommand(yt.id, {
2618
+ removeThemeStyle(e) {
2619
+ this._commandService.syncExecuteCommand(xt.id, {
2608
2620
  unitId: this._workbook.getUnitId(),
2609
2621
  subUnitId: this._worksheet.getSheetId(),
2610
2622
  range: this._range,
2611
- themeName: r
2623
+ themeName: e
2612
2624
  });
2613
2625
  }
2614
2626
  /**
@@ -2625,7 +2637,7 @@ let _ = class extends ge {
2625
2637
  * ```
2626
2638
  */
2627
2639
  getUsedThemeStyle() {
2628
- return this._injector.get(Ye).getAppliedRangeThemeStyle({
2640
+ return this._injector.get(Qe).getAppliedRangeThemeStyle({
2629
2641
  unitId: this._workbook.getUnitId(),
2630
2642
  subUnitId: this._worksheet.getSheetId(),
2631
2643
  range: this._range
@@ -2650,12 +2662,12 @@ let _ = class extends ge {
2650
2662
  * fRange.clear({ contentsOnly: true });
2651
2663
  * ```
2652
2664
  */
2653
- clear(r) {
2654
- return r && r.contentsOnly && !r.formatOnly ? this.clearContent() : r && r.formatOnly && !r.contentsOnly ? this.clearFormat() : (this._commandService.syncExecuteCommand(Je.id, {
2665
+ clear(e) {
2666
+ return e && e.contentsOnly && !e.formatOnly ? this.clearContent() : e && e.formatOnly && !e.contentsOnly ? this.clearFormat() : (this._commandService.syncExecuteCommand(Xe.id, {
2655
2667
  unitId: this._workbook.getUnitId(),
2656
2668
  subUnitId: this._worksheet.getSheetId(),
2657
2669
  ranges: [this._range],
2658
- options: r
2670
+ options: e
2659
2671
  }), this);
2660
2672
  }
2661
2673
  /**
@@ -2672,7 +2684,7 @@ let _ = class extends ge {
2672
2684
  * ```
2673
2685
  */
2674
2686
  clearContent() {
2675
- return this._commandService.syncExecuteCommand(Qe.id, {
2687
+ return this._commandService.syncExecuteCommand(Ze.id, {
2676
2688
  unitId: this._workbook.getUnitId(),
2677
2689
  subUnitId: this._worksheet.getSheetId(),
2678
2690
  ranges: [this._range]
@@ -2691,7 +2703,7 @@ let _ = class extends ge {
2691
2703
  * ```
2692
2704
  */
2693
2705
  clearFormat() {
2694
- return this._commandService.syncExecuteCommand(Xe.id, {
2706
+ return this._commandService.syncExecuteCommand(et.id, {
2695
2707
  unitId: this._workbook.getUnitId(),
2696
2708
  subUnitId: this._worksheet.getSheetId(),
2697
2709
  ranges: [this._range]
@@ -2752,10 +2764,10 @@ let _ = class extends ge {
2752
2764
  * console.log(fWorksheet.getRange('A1:D5').getValues()); // [[null, null, 3, 4], [null, null, 4, 5], [1, 2, 5, 6], [2, 3, 6, 7], [3, 4, 7, 8]]
2753
2765
  * ```
2754
2766
  */
2755
- insertCells(r) {
2756
- r === N.ROWS ? this._commandService.executeCommand(Ut.id, {
2767
+ insertCells(e) {
2768
+ e === T.ROWS ? this._commandService.executeCommand(Mt.id, {
2757
2769
  range: this._range
2758
- }) : this._commandService.executeCommand(Pt.id, {
2770
+ }) : this._commandService.executeCommand(Nt.id, {
2759
2771
  range: this._range
2760
2772
  });
2761
2773
  }
@@ -2814,10 +2826,10 @@ let _ = class extends ge {
2814
2826
  * console.log(fWorksheet.getRange('A1:D5').getValues()); // [[3, 4, 3, 4], [4, 5, 4, 5], [5, 6, 5, 6], [null, null, 6, 7], [null, null, 7, 8]]
2815
2827
  * ```
2816
2828
  */
2817
- deleteCells(r) {
2818
- r === N.ROWS ? this._commandService.executeCommand(xt.id, {
2829
+ deleteCells(e) {
2830
+ e === T.ROWS ? this._commandService.executeCommand(Tt.id, {
2819
2831
  range: this._range
2820
- }) : this._commandService.executeCommand(Mt.id, {
2832
+ }) : this._commandService.executeCommand(At.id, {
2821
2833
  range: this._range
2822
2834
  });
2823
2835
  }
@@ -2858,25 +2870,25 @@ let _ = class extends ge {
2858
2870
  * ```
2859
2871
  */
2860
2872
  // eslint-disable-next-line complexity
2861
- getDataRegion(r) {
2862
- const { startRow: e, startColumn: t, endRow: n, endColumn: s } = this._range, o = this._worksheet.getMaxRows(), i = this._worksheet.getMaxColumns(), a = this._worksheet.getCellMatrix();
2863
- let h = e, d = t, c = n, u = s;
2864
- if (r !== N.COLUMNS) {
2865
- let w = !1, p = !1;
2866
- for (let v = t; v <= s && (e > 0 && !D(a.getValue(e - 1, v)) && (w = !0), n < o - 1 && !D(a.getValue(n + 1, v)) && (p = !0), !(w && p)); v++)
2873
+ getDataRegion(e) {
2874
+ const { startRow: t, startColumn: n, endRow: r, endColumn: s } = this._range, o = this._worksheet.getMaxRows(), i = this._worksheet.getMaxColumns(), h = this._worksheet.getCellMatrix();
2875
+ let d = t, c = n, l = r, u = s;
2876
+ if (e !== T.COLUMNS) {
2877
+ let y = !1, U = !1;
2878
+ for (let v = n; v <= s && (t > 0 && !B(h.getValue(t - 1, v)) && (y = !0), r < o - 1 && !B(h.getValue(r + 1, v)) && (U = !0), !(y && U)); v++)
2867
2879
  ;
2868
- w && (h = e - 1), p && (c = n + 1);
2880
+ y && (d = t - 1), U && (l = r + 1);
2869
2881
  }
2870
- if (r !== N.ROWS) {
2871
- let w = !1, p = !1;
2872
- for (let v = e; v <= n && (t > 0 && !D(a.getValue(v, t - 1)) && (w = !0), s < i - 1 && !D(a.getValue(v, s + 1)) && (p = !0), !(w && p)); v++)
2882
+ if (e !== T.ROWS) {
2883
+ let y = !1, U = !1;
2884
+ for (let v = t; v <= r && (n > 0 && !B(h.getValue(v, n - 1)) && (y = !0), s < i - 1 && !B(h.getValue(v, s + 1)) && (U = !0), !(y && U)); v++)
2873
2885
  ;
2874
- w && (d = t - 1), p && (u = s + 1);
2886
+ y && (c = n - 1), U && (u = s + 1);
2875
2887
  }
2876
- return this._injector.createInstance(_, this._workbook, this._worksheet, {
2877
- startRow: h,
2878
- startColumn: d,
2879
- endRow: c,
2888
+ return this._injector.createInstance(k, this._workbook, this._worksheet, {
2889
+ startRow: d,
2890
+ startColumn: c,
2891
+ endRow: l,
2880
2892
  endColumn: u
2881
2893
  });
2882
2894
  }
@@ -2897,11 +2909,11 @@ let _ = class extends ge {
2897
2909
  * ```
2898
2910
  */
2899
2911
  isBlank() {
2900
- const r = this._worksheet.getCellMatrix(), { startRow: e, startColumn: t, endRow: n, endColumn: s } = this._range;
2912
+ const e = this._worksheet.getCellMatrix(), { startRow: t, startColumn: n, endRow: r, endColumn: s } = this._range;
2901
2913
  let o = !0;
2902
- for (let i = e; i <= n; i++) {
2903
- for (let a = t; a <= s; a++)
2904
- if (!D(r.getValue(i, a))) {
2914
+ for (let i = t; i <= r; i++) {
2915
+ for (let h = n; h <= s; h++)
2916
+ if (!B(e.getValue(i, h))) {
2905
2917
  o = !1;
2906
2918
  break;
2907
2919
  }
@@ -2929,14 +2941,14 @@ let _ = class extends ge {
2929
2941
  * console.log(newRange.getA1Notation()); // B2:D4
2930
2942
  * ```
2931
2943
  */
2932
- offset(r, e, t, n) {
2933
- const { startRow: s, startColumn: o, endRow: i, endColumn: a } = this._range, h = s + r, d = o + e, c = t ? h + t - 1 : i + r, u = n ? d + n - 1 : a + e;
2934
- if (h < 0 || d < 0 || c < 0 || u < 0)
2944
+ offset(e, t, n, r) {
2945
+ const { startRow: s, startColumn: o, endRow: i, endColumn: h } = this._range, d = s + e, c = o + t, l = n ? d + n - 1 : i + e, u = r ? c + r - 1 : h + t;
2946
+ if (d < 0 || c < 0 || l < 0 || u < 0)
2935
2947
  throw new Error("The row or column index is out of range");
2936
- return this._injector.createInstance(_, this._workbook, this._worksheet, {
2937
- startRow: h,
2938
- startColumn: d,
2939
- endRow: c,
2948
+ return this._injector.createInstance(k, this._workbook, this._worksheet, {
2949
+ startRow: d,
2950
+ startColumn: c,
2951
+ endRow: l,
2940
2952
  endColumn: u
2941
2953
  });
2942
2954
  }
@@ -2953,9 +2965,9 @@ let _ = class extends ge {
2953
2965
  * console.log(fRange.getFormula()); // '=SUM(A2:A5)'
2954
2966
  * ```
2955
2967
  */
2956
- setFormula(r) {
2968
+ setFormula(e) {
2957
2969
  return this.setValue({
2958
- f: r
2970
+ f: e
2959
2971
  });
2960
2972
  }
2961
2973
  /**
@@ -2974,23 +2986,23 @@ let _ = class extends ge {
2974
2986
  * console.log(fRange.getFormulas()); // [['=SUM(A2:A5)', '=SUM(B2:B5)'], ['=SUM(A6:A9)', '=SUM(B6:B9)']]
2975
2987
  * ```
2976
2988
  */
2977
- setFormulas(r) {
2978
- return this.setValues(r.map((e) => e.map((t) => ({ f: t }))));
2989
+ setFormulas(e) {
2990
+ return this.setValues(e.map((t) => t.map((n) => ({ f: n }))));
2979
2991
  }
2980
- };
2981
- _ = kn([
2982
- ne(3, l(x)),
2983
- ne(4, m),
2984
- ne(5, l(on))
2985
- ], _);
2986
- var Sn = Object.getOwnPropertyDescriptor, Cn = (r, e, t, n) => {
2987
- for (var s = n > 1 ? void 0 : n ? Sn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
2988
- (i = r[o]) && (s = i(s) || s);
2989
- return s;
2990
- }, vn = (r, e) => (t, n) => e(t, n, r);
2991
- let K = class {
2992
- constructor(r, e, t, n) {
2993
- this._workbook = r, this._worksheet = e, this._selections = t, this._injector = n;
2992
+ }, W._enableManualInit(), W);
2993
+ k = vn([
2994
+ se(3, g(M)),
2995
+ se(4, _),
2996
+ se(5, g(cn))
2997
+ ], k);
2998
+ var fn = Object.getOwnPropertyDescriptor, In = (a, e, t, n) => {
2999
+ for (var r = n > 1 ? void 0 : n ? fn(e, t) : e, s = a.length - 1, o; s >= 0; s--)
3000
+ (o = a[s]) && (r = o(r) || r);
3001
+ return r;
3002
+ }, Rn = (a, e) => (t, n) => e(t, n, a);
3003
+ let J = class {
3004
+ constructor(a, e, t, n) {
3005
+ this._workbook = a, this._worksheet = e, this._selections = t, this._injector = n;
2994
3006
  }
2995
3007
  /**
2996
3008
  * Represents the active selection in the sheet. Which means the selection contains the active cell.
@@ -3006,8 +3018,8 @@ let K = class {
3006
3018
  * ```
3007
3019
  */
3008
3020
  getActiveRange() {
3009
- const r = this._selections.find((e) => !!e.primary);
3010
- return r ? this._injector.createInstance(_, this._workbook, this._worksheet, r.range) : null;
3021
+ const a = this._selections.find((e) => !!e.primary);
3022
+ return a ? this._injector.createInstance(k, this._workbook, this._worksheet, a.range) : null;
3011
3023
  }
3012
3024
  /**
3013
3025
  * Represents the active selection list in the sheet.
@@ -3024,7 +3036,7 @@ let K = class {
3024
3036
  * ```
3025
3037
  */
3026
3038
  getActiveRangeList() {
3027
- return this._selections.map((r) => this._injector.createInstance(_, this._workbook, this._worksheet, r.range));
3039
+ return this._selections.map((a) => this._injector.createInstance(k, this._workbook, this._worksheet, a.range));
3028
3040
  }
3029
3041
  /**
3030
3042
  * Represents the current select cell in the sheet.
@@ -3043,8 +3055,8 @@ let K = class {
3043
3055
  * ```
3044
3056
  */
3045
3057
  getCurrentCell() {
3046
- const r = this._selections.find((e) => !!e.primary);
3047
- return r ? r.primary : null;
3058
+ const a = this._selections.find((e) => !!e.primary);
3059
+ return a ? a.primary : null;
3048
3060
  }
3049
3061
  /**
3050
3062
  * Returns the active sheet in the spreadsheet.
@@ -3059,8 +3071,8 @@ let K = class {
3059
3071
  * ```
3060
3072
  */
3061
3073
  getActiveSheet() {
3062
- const r = this._injector.createInstance(C, this._workbook);
3063
- return this._injector.createInstance(S, r, this._workbook, this._worksheet);
3074
+ const a = this._injector.createInstance(C, this._workbook);
3075
+ return this._injector.createInstance(S, a, this._workbook, this._worksheet);
3064
3076
  }
3065
3077
  /**
3066
3078
  * Update the primary cell in the selection. if the primary cell not exists in selections, add it to the selections and clear the old selections.
@@ -3083,31 +3095,31 @@ let K = class {
3083
3095
  * console.log(`actualRow: ${actualRow}, actualColumn: ${actualColumn}`); // actualRow: 10, actualColumn: 1
3084
3096
  * ```
3085
3097
  */
3086
- updatePrimaryCell(r) {
3087
- const e = this._injector.get(m);
3098
+ updatePrimaryCell(a) {
3099
+ const e = this._injector.get(_);
3088
3100
  let t = [], n = !1;
3089
- for (const { range: o, style: i } of this._selections)
3090
- P.contains(o, r.getRange()) ? (t.push({
3091
- range: o,
3092
- primary: z(r.getRange(), this._worksheet),
3093
- style: i
3101
+ for (const { range: s, style: o } of this._selections)
3102
+ x.contains(s, a.getRange()) ? (t.push({
3103
+ range: s,
3104
+ primary: $(a.getRange(), this._worksheet),
3105
+ style: o
3094
3106
  }), n = !0) : t.push({
3095
- range: o,
3107
+ range: s,
3096
3108
  primary: null,
3097
- style: i
3109
+ style: o
3098
3110
  });
3099
3111
  n || (t = [
3100
3112
  {
3101
- range: r.getRange(),
3102
- primary: z(r.getRange(), this._worksheet)
3113
+ range: a.getRange(),
3114
+ primary: $(a.getRange(), this._worksheet)
3103
3115
  }
3104
3116
  ]);
3105
- const s = {
3117
+ const r = {
3106
3118
  unitId: this._workbook.getUnitId(),
3107
3119
  subUnitId: this._worksheet.getSheetId(),
3108
3120
  selections: t
3109
3121
  };
3110
- return e.syncExecuteCommand(me.id, s), new K(this._workbook, this._worksheet, t, this._injector);
3122
+ return e.syncExecuteCommand(ke.id, r), new J(this._workbook, this._worksheet, t, this._injector);
3111
3123
  }
3112
3124
  /**
3113
3125
  * Get the next primary cell in the specified direction. If the primary cell not exists in selections, return null.
@@ -3134,22 +3146,22 @@ let K = class {
3134
3146
  * console.log(nextCell2?.getA1Notation()); // A2
3135
3147
  * ```
3136
3148
  */
3137
- getNextDataRange(r) {
3149
+ getNextDataRange(a) {
3138
3150
  if (!this._selections.find((n) => !!n.primary))
3139
3151
  return null;
3140
- const t = Nt(this._selections.concat(), r, this._worksheet);
3141
- return t ? this._injector.createInstance(_, this._workbook, this._worksheet, t) : null;
3152
+ const t = Dt(this._selections.concat(), a, this._worksheet);
3153
+ return t ? this._injector.createInstance(k, this._workbook, this._worksheet, t) : null;
3142
3154
  }
3143
3155
  };
3144
- K = Cn([
3145
- vn(3, l(x))
3146
- ], K);
3147
- var fn = Object.getOwnPropertyDescriptor, In = (r, e, t, n) => {
3148
- for (var s = n > 1 ? void 0 : n ? fn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
3149
- (i = r[o]) && (s = i(s) || s);
3150
- return s;
3151
- }, j = (r, e) => (t, n) => e(t, n, r);
3152
- let S = class extends ge {
3156
+ J = In([
3157
+ Rn(3, g(M))
3158
+ ], J);
3159
+ var bn = Object.getOwnPropertyDescriptor, pn = (a, e, t, n) => {
3160
+ for (var r = n > 1 ? void 0 : n ? bn(e, t) : e, s = a.length - 1, o; s >= 0; s--)
3161
+ (o = a[s]) && (r = o(r) || r);
3162
+ return r;
3163
+ }, z = (a, e) => (t, n) => e(t, n, a);
3164
+ let S = class extends _e {
3153
3165
  /**
3154
3166
  * Creates a new worksheet facade instance
3155
3167
  * @param {FWorkbook} _fWorkbook - The facade workbook instance
@@ -3160,8 +3172,8 @@ let S = class extends ge {
3160
3172
  * @param {ILogService} _logService - The log service
3161
3173
  * @param {ICommandService} _commandService - The command service
3162
3174
  */
3163
- constructor(e, t, n, s, o, i, a) {
3164
- super(s);
3175
+ constructor(e, t, n, r, s, o, i) {
3176
+ super(r);
3165
3177
  /**
3166
3178
  * Sets the active selection region for this sheet.
3167
3179
  * @param range - The range to set as the active selection
@@ -3172,8 +3184,8 @@ let S = class extends ge {
3172
3184
  * fWorkSheet.setActiveSelection(fWorkSheet.getRange('A10:B10'));
3173
3185
  * ```
3174
3186
  */
3175
- E(this, "setActiveSelection", this.setActiveRange);
3176
- this._fWorkbook = e, this._workbook = t, this._worksheet = n, this._injector = s, this._selectionManagerService = o, this._logService = i, this._commandService = a;
3187
+ b(this, "setActiveSelection", this.setActiveRange);
3188
+ this._fWorkbook = e, this._workbook = t, this._worksheet = n, this._injector = r, this._selectionManagerService = s, this._logService = o, this._commandService = i;
3177
3189
  }
3178
3190
  dispose() {
3179
3191
  super.dispose(), delete this._fWorkbook, delete this._workbook, delete this._worksheet;
@@ -3255,7 +3267,7 @@ let S = class extends ge {
3255
3267
  */
3256
3268
  getSelection() {
3257
3269
  const e = this._selectionManagerService.getCurrentSelections();
3258
- return e ? this._injector.createInstance(K, this._workbook, this._worksheet, e) : null;
3270
+ return e ? this._injector.createInstance(J, this._workbook, this._worksheet, e) : null;
3259
3271
  }
3260
3272
  // #region rows
3261
3273
  // #region default style
@@ -3324,7 +3336,7 @@ let S = class extends ge {
3324
3336
  */
3325
3337
  setDefaultStyle(e) {
3326
3338
  const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
3327
- return this._commandService.syncExecuteCommand(Tt.id, {
3339
+ return this._commandService.syncExecuteCommand(Wt.id, {
3328
3340
  unitId: t,
3329
3341
  subUnitId: n,
3330
3342
  defaultStyle: e
@@ -3345,16 +3357,16 @@ let S = class extends ge {
3345
3357
  * ```
3346
3358
  */
3347
3359
  setColumnDefaultStyle(e, t) {
3348
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = {
3360
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = {
3349
3361
  unitId: n,
3350
- subUnitId: s,
3362
+ subUnitId: r,
3351
3363
  columnData: {
3352
3364
  [e]: {
3353
3365
  s: t
3354
3366
  }
3355
3367
  }
3356
3368
  };
3357
- return this._commandService.syncExecuteCommand(Re.id, o), this;
3369
+ return this._commandService.syncExecuteCommand(pe.id, s), this;
3358
3370
  }
3359
3371
  /**
3360
3372
  * Set the default style of the worksheet column
@@ -3371,49 +3383,49 @@ let S = class extends ge {
3371
3383
  * ```
3372
3384
  */
3373
3385
  setRowDefaultStyle(e, t) {
3374
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = {
3386
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = {
3375
3387
  unitId: n,
3376
- subUnitId: s,
3388
+ subUnitId: r,
3377
3389
  rowData: {
3378
3390
  [e]: {
3379
3391
  s: t
3380
3392
  }
3381
3393
  }
3382
3394
  };
3383
- return this._commandService.syncExecuteCommand(be.id, o), this;
3395
+ return this._commandService.syncExecuteCommand(Ee.id, s), this;
3384
3396
  }
3385
- getRange(e, t, n, s) {
3386
- let o, i;
3397
+ getRange(e, t, n, r) {
3398
+ let s, o;
3387
3399
  if (typeof e == "object")
3388
- o = e, i = this._worksheet;
3400
+ s = e, o = this._worksheet;
3389
3401
  else if (typeof e == "string") {
3390
- const { range: a, sheetName: h } = hn(e), d = h ? this._workbook.getSheetBySheetName(h) : this._worksheet;
3402
+ const { range: i, sheetName: h } = un(e), d = h ? this._workbook.getSheetBySheetName(h) : this._worksheet;
3391
3403
  if (!d)
3392
3404
  throw new Error("Range not found");
3393
- i = d, o = {
3394
- ...a,
3405
+ o = d, s = {
3406
+ ...i,
3395
3407
  unitId: this._workbook.getUnitId(),
3396
- sheetId: i.getSheetId(),
3408
+ sheetId: o.getSheetId(),
3397
3409
  // Use the current range instead of the future actual range to match Apps Script behavior.
3398
3410
  // Users can create the latest range in real time when needed.
3399
- rangeType: k.NORMAL,
3400
- startRow: a.rangeType === k.COLUMN ? 0 : a.startRow,
3401
- endRow: a.rangeType === k.COLUMN ? i.getMaxRows() - 1 : a.endRow,
3402
- startColumn: a.rangeType === k.ROW ? 0 : a.startColumn,
3403
- endColumn: a.rangeType === k.ROW ? i.getMaxColumns() - 1 : a.endColumn
3411
+ rangeType: w.NORMAL,
3412
+ startRow: i.rangeType === w.COLUMN ? 0 : i.startRow,
3413
+ endRow: i.rangeType === w.COLUMN ? o.getMaxRows() - 1 : i.endRow,
3414
+ startColumn: i.rangeType === w.ROW ? 0 : i.startColumn,
3415
+ endColumn: i.rangeType === w.ROW ? o.getMaxColumns() - 1 : i.endColumn
3404
3416
  };
3405
3417
  } else if (typeof e == "number" && t !== void 0)
3406
- i = this._worksheet, o = {
3418
+ o = this._worksheet, s = {
3407
3419
  startRow: e,
3408
3420
  endRow: e + (n != null ? n : 1) - 1,
3409
3421
  startColumn: t,
3410
- endColumn: t + (s != null ? s : 1) - 1,
3422
+ endColumn: t + (r != null ? r : 1) - 1,
3411
3423
  unitId: this._workbook.getUnitId(),
3412
3424
  sheetId: this._worksheet.getSheetId()
3413
3425
  };
3414
3426
  else
3415
3427
  throw new Error("Invalid range specification");
3416
- return this._injector.createInstance(_, this._workbook, i, o);
3428
+ return this._injector.createInstance(k, this._workbook, o, s);
3417
3429
  }
3418
3430
  /**
3419
3431
  * Returns the current number of columns in the sheet, regardless of content.
@@ -3505,14 +3517,14 @@ let S = class extends ge {
3505
3517
  * ```
3506
3518
  */
3507
3519
  insertRowsAfter(e, t) {
3508
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.DOWN, i = e + 1, a = e + t, h = 0, d = this._worksheet.getColumnCount() - 1, c = O(this._worksheet, i, a, h, d, !0, e);
3509
- return this._commandService.syncExecuteCommand(pe.id, {
3520
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = j.DOWN, o = e + 1, i = e + t, h = 0, d = this._worksheet.getColumnCount() - 1, c = L(this._worksheet, o, i, h, d, !0, e);
3521
+ return this._commandService.syncExecuteCommand(ye.id, {
3510
3522
  unitId: n,
3511
- subUnitId: s,
3512
- direction: o,
3523
+ subUnitId: r,
3524
+ direction: s,
3513
3525
  range: {
3514
- startRow: i,
3515
- endRow: a,
3526
+ startRow: o,
3527
+ endRow: i,
3516
3528
  startColumn: h,
3517
3529
  endColumn: d
3518
3530
  },
@@ -3534,14 +3546,14 @@ let S = class extends ge {
3534
3546
  * ```
3535
3547
  */
3536
3548
  insertRowsBefore(e, t) {
3537
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.UP, i = e, a = e + t - 1, h = 0, d = this._worksheet.getColumnCount() - 1, c = O(this._worksheet, i, a, h, d, !0, e - 1);
3538
- return this._commandService.syncExecuteCommand(pe.id, {
3549
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = j.UP, o = e, i = e + t - 1, h = 0, d = this._worksheet.getColumnCount() - 1, c = L(this._worksheet, o, i, h, d, !0, e - 1);
3550
+ return this._commandService.syncExecuteCommand(ye.id, {
3539
3551
  unitId: n,
3540
- subUnitId: s,
3541
- direction: o,
3552
+ subUnitId: r,
3553
+ direction: s,
3542
3554
  range: {
3543
- startRow: i,
3544
- endRow: a,
3555
+ startRow: o,
3556
+ endRow: i,
3545
3557
  startColumn: h,
3546
3558
  endColumn: d
3547
3559
  },
@@ -3585,7 +3597,7 @@ let S = class extends ge {
3585
3597
  startColumn: 0,
3586
3598
  endColumn: this._worksheet.getColumnCount() - 1
3587
3599
  };
3588
- return this._commandService.syncExecuteCommand(At.id, {
3600
+ return this._commandService.syncExecuteCommand(Bt.id, {
3589
3601
  range: n,
3590
3602
  unitId: this._workbook.getUnitId(),
3591
3603
  subUnitId: this._worksheet.getSheetId()
@@ -3608,18 +3620,18 @@ let S = class extends ge {
3608
3620
  * ```
3609
3621
  */
3610
3622
  moveRows(e, t) {
3611
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = ee(e.getRange(), this._worksheet), i = o, a = {
3623
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = ne(e.getRange(), this._worksheet), o = s, i = {
3612
3624
  startRow: t,
3613
3625
  endRow: t,
3614
- startColumn: o.startColumn,
3615
- endColumn: o.endColumn
3626
+ startColumn: s.startColumn,
3627
+ endColumn: s.endColumn
3616
3628
  };
3617
- return this._commandService.syncExecuteCommand(Dt.id, {
3629
+ return this._commandService.syncExecuteCommand(Ft.id, {
3618
3630
  unitId: n,
3619
- subUnitId: s,
3620
- range: o,
3621
- fromRange: i,
3622
- toRange: a
3631
+ subUnitId: r,
3632
+ range: s,
3633
+ fromRange: o,
3634
+ toRange: i
3623
3635
  }), this;
3624
3636
  }
3625
3637
  /**
@@ -3638,11 +3650,11 @@ let S = class extends ge {
3638
3650
  * ```
3639
3651
  */
3640
3652
  hideRow(e) {
3641
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = ee(e.getRange(), this._worksheet);
3642
- return this._commandService.syncExecuteCommand(Ee.id, {
3653
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), r = ne(e.getRange(), this._worksheet);
3654
+ return this._commandService.syncExecuteCommand(Ue.id, {
3643
3655
  unitId: t,
3644
3656
  subUnitId: n,
3645
- ranges: [s]
3657
+ ranges: [r]
3646
3658
  }), this;
3647
3659
  }
3648
3660
  /**
@@ -3660,17 +3672,17 @@ let S = class extends ge {
3660
3672
  * ```
3661
3673
  */
3662
3674
  hideRows(e, t = 1) {
3663
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = {
3675
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = {
3664
3676
  startRow: e,
3665
3677
  endRow: e + t - 1,
3666
3678
  startColumn: 0,
3667
3679
  endColumn: this._worksheet.getColumnCount() - 1,
3668
- rangeType: k.ROW
3680
+ rangeType: w.ROW
3669
3681
  };
3670
- return this._commandService.syncExecuteCommand(Ee.id, {
3682
+ return this._commandService.syncExecuteCommand(Ue.id, {
3671
3683
  unitId: n,
3672
- subUnitId: s,
3673
- ranges: [o]
3684
+ subUnitId: r,
3685
+ ranges: [s]
3674
3686
  }), this;
3675
3687
  }
3676
3688
  /**
@@ -3689,11 +3701,11 @@ let S = class extends ge {
3689
3701
  * ```
3690
3702
  */
3691
3703
  unhideRow(e) {
3692
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = ee(e.getRange(), this._worksheet);
3693
- return this._commandService.syncExecuteCommand(ye.id, {
3704
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), r = ne(e.getRange(), this._worksheet);
3705
+ return this._commandService.syncExecuteCommand(Pe.id, {
3694
3706
  unitId: t,
3695
3707
  subUnitId: n,
3696
- ranges: [s]
3708
+ ranges: [r]
3697
3709
  }), this;
3698
3710
  }
3699
3711
  /**
@@ -3711,17 +3723,17 @@ let S = class extends ge {
3711
3723
  * ```
3712
3724
  */
3713
3725
  showRows(e, t = 1) {
3714
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = {
3726
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = {
3715
3727
  startRow: e,
3716
3728
  endRow: e + t - 1,
3717
3729
  startColumn: 0,
3718
3730
  endColumn: this._worksheet.getColumnCount() - 1,
3719
- rangeType: k.ROW
3731
+ rangeType: w.ROW
3720
3732
  };
3721
- return this._commandService.syncExecuteCommand(ye.id, {
3733
+ return this._commandService.syncExecuteCommand(Pe.id, {
3722
3734
  unitId: n,
3723
- subUnitId: s,
3724
- ranges: [o]
3735
+ subUnitId: r,
3736
+ ranges: [s]
3725
3737
  }), this;
3726
3738
  }
3727
3739
  /**
@@ -3752,22 +3764,22 @@ let S = class extends ge {
3752
3764
  * fWorkSheet.autoFitRow(24);
3753
3765
  * ```
3754
3766
  */
3755
- autoFitRow(e, t = g.TRUE) {
3756
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = [{
3767
+ autoFitRow(e, t = m.TRUE) {
3768
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = [{
3757
3769
  startRow: e,
3758
3770
  endRow: e,
3759
3771
  startColumn: 0,
3760
3772
  endColumn: this._worksheet.getColumnCount() - 1
3761
3773
  }];
3762
- return this._commandService.syncExecuteCommand(ie.id, {
3774
+ return this._commandService.syncExecuteCommand(he.id, {
3763
3775
  unitId: this._workbook.getUnitId(),
3764
3776
  subUnitId: this._worksheet.getSheetId(),
3765
- range: o[0],
3766
- value: L.WRAP
3767
- }), this._commandService.syncExecuteCommand(Wt.id, {
3777
+ range: s[0],
3778
+ value: G.WRAP
3779
+ }), this._commandService.syncExecuteCommand(Vt.id, {
3768
3780
  unitId: n,
3769
- subUnitId: s,
3770
- ranges: o,
3781
+ subUnitId: r,
3782
+ ranges: s,
3771
3783
  autoHeightInfo: t
3772
3784
  }), this;
3773
3785
  }
@@ -3786,25 +3798,25 @@ let S = class extends ge {
3786
3798
  */
3787
3799
  setRowHeights(e, t, n) {
3788
3800
  var d;
3789
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), i = this._worksheet.getRowManager(), a = [], h = [];
3801
+ const r = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = this._worksheet.getRowManager(), i = [], h = [];
3790
3802
  for (let c = e; c < e + t; c++) {
3791
- const u = ((d = i.getRow(c)) == null ? void 0 : d.ah) || this._worksheet.getConfig().defaultRowHeight, w = {
3803
+ const l = ((d = o.getRow(c)) == null ? void 0 : d.ah) || this._worksheet.getConfig().defaultRowHeight, u = {
3792
3804
  startRow: c,
3793
3805
  endRow: c,
3794
3806
  startColumn: 0,
3795
3807
  endColumn: this._worksheet.getColumnCount() - 1
3796
3808
  };
3797
- n <= u ? a.push(w) : h.push(w);
3809
+ n <= l ? i.push(u) : h.push(u);
3798
3810
  }
3799
- return h.length > 0 && this._commandService.syncExecuteCommand(Ue.id, {
3800
- unitId: s,
3801
- subUnitId: o,
3811
+ return h.length > 0 && this._commandService.syncExecuteCommand(xe.id, {
3812
+ unitId: r,
3813
+ subUnitId: s,
3802
3814
  ranges: h,
3803
3815
  value: n
3804
- }), a.length > 0 && this._commandService.syncExecuteCommand(X.id, {
3805
- unitId: s,
3806
- subUnitId: o,
3807
- ranges: a
3816
+ }), i.length > 0 && this._commandService.syncExecuteCommand(ee.id, {
3817
+ unitId: r,
3818
+ subUnitId: s,
3819
+ ranges: i
3808
3820
  }), this;
3809
3821
  }
3810
3822
  /**
@@ -3839,7 +3851,7 @@ let S = class extends ge {
3839
3851
  * ```
3840
3852
  */
3841
3853
  setRowAutoHeight(e, t) {
3842
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = [
3854
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = [
3843
3855
  {
3844
3856
  startRow: e,
3845
3857
  endRow: e + t - 1,
@@ -3847,10 +3859,10 @@ let S = class extends ge {
3847
3859
  endColumn: this._worksheet.getColumnCount() - 1
3848
3860
  }
3849
3861
  ];
3850
- return this._commandService.syncExecuteCommand(X.id, {
3862
+ return this._commandService.syncExecuteCommand(ee.id, {
3851
3863
  unitId: n,
3852
- subUnitId: s,
3853
- ranges: o
3864
+ subUnitId: r,
3865
+ ranges: s
3854
3866
  }), this;
3855
3867
  }
3856
3868
  /**
@@ -3869,7 +3881,7 @@ let S = class extends ge {
3869
3881
  */
3870
3882
  setRangesAutoHeight(e) {
3871
3883
  const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
3872
- return this._commandService.syncExecuteCommand(X.id, {
3884
+ return this._commandService.syncExecuteCommand(ee.id, {
3873
3885
  unitId: t,
3874
3886
  subUnitId: n,
3875
3887
  ranges: e
@@ -3888,7 +3900,7 @@ let S = class extends ge {
3888
3900
  * ```
3889
3901
  */
3890
3902
  setRowHeightsForced(e, t, n) {
3891
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), i = [
3903
+ const r = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = [
3892
3904
  {
3893
3905
  startRow: e,
3894
3906
  endRow: e + t - 1,
@@ -3896,10 +3908,10 @@ let S = class extends ge {
3896
3908
  endColumn: this._worksheet.getColumnCount() - 1
3897
3909
  }
3898
3910
  ];
3899
- return this._commandService.syncExecuteCommand(Ue.id, {
3900
- unitId: s,
3901
- subUnitId: o,
3902
- ranges: i,
3911
+ return this._commandService.syncExecuteCommand(xe.id, {
3912
+ unitId: r,
3913
+ subUnitId: s,
3914
+ ranges: o,
3903
3915
  value: n
3904
3916
  }), this;
3905
3917
  }
@@ -3915,17 +3927,17 @@ let S = class extends ge {
3915
3927
  * ```
3916
3928
  */
3917
3929
  setRowCustom(e) {
3918
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = {};
3919
- for (const [i, a] of Object.entries(e))
3920
- s[Number(i)] = {
3921
- custom: a
3930
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), r = {};
3931
+ for (const [o, i] of Object.entries(e))
3932
+ r[Number(o)] = {
3933
+ custom: i
3922
3934
  };
3923
- const o = {
3935
+ const s = {
3924
3936
  unitId: t,
3925
3937
  subUnitId: n,
3926
- rowData: s
3938
+ rowData: r
3927
3939
  };
3928
- return this._commandService.syncExecuteCommand(be.id, o), this;
3940
+ return this._commandService.syncExecuteCommand(Ee.id, s), this;
3929
3941
  }
3930
3942
  // #region Column
3931
3943
  /**
@@ -3992,14 +4004,14 @@ let S = class extends ge {
3992
4004
  * ```
3993
4005
  */
3994
4006
  insertColumnsAfter(e, t) {
3995
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.RIGHT, i = 0, a = this._worksheet.getRowCount() - 1, h = e + 1, d = e + t, c = O(this._worksheet, i, a, h, d, !1, e);
3996
- return this._commandService.syncExecuteCommand(Pe.id, {
4007
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = j.RIGHT, o = 0, i = this._worksheet.getRowCount() - 1, h = e + 1, d = e + t, c = L(this._worksheet, o, i, h, d, !1, e);
4008
+ return this._commandService.syncExecuteCommand(Me.id, {
3997
4009
  unitId: n,
3998
- subUnitId: s,
3999
- direction: o,
4010
+ subUnitId: r,
4011
+ direction: s,
4000
4012
  range: {
4001
- startRow: i,
4002
- endRow: a,
4013
+ startRow: o,
4014
+ endRow: i,
4003
4015
  startColumn: h,
4004
4016
  endColumn: d
4005
4017
  },
@@ -4021,14 +4033,14 @@ let S = class extends ge {
4021
4033
  * ```
4022
4034
  */
4023
4035
  insertColumnsBefore(e, t) {
4024
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.LEFT, i = 0, a = this._worksheet.getRowCount() - 1, h = e, d = e + t - 1, c = O(this._worksheet, i, a, h, d, !1, e - 1);
4025
- return this._commandService.syncExecuteCommand(Pe.id, {
4036
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = j.LEFT, o = 0, i = this._worksheet.getRowCount() - 1, h = e, d = e + t - 1, c = L(this._worksheet, o, i, h, d, !1, e - 1);
4037
+ return this._commandService.syncExecuteCommand(Me.id, {
4026
4038
  unitId: n,
4027
- subUnitId: s,
4028
- direction: o,
4039
+ subUnitId: r,
4040
+ direction: s,
4029
4041
  range: {
4030
- startRow: i,
4031
- endRow: a,
4042
+ startRow: o,
4043
+ endRow: i,
4032
4044
  startColumn: h,
4033
4045
  endColumn: d
4034
4046
  },
@@ -4072,7 +4084,7 @@ let S = class extends ge {
4072
4084
  startColumn: e,
4073
4085
  endColumn: e + t - 1
4074
4086
  };
4075
- return this._commandService.syncExecuteCommand(Bt.id, {
4087
+ return this._commandService.syncExecuteCommand(Ht.id, {
4076
4088
  range: n,
4077
4089
  unitId: this._workbook.getUnitId(),
4078
4090
  subUnitId: this._worksheet.getSheetId()
@@ -4095,18 +4107,18 @@ let S = class extends ge {
4095
4107
  * ```
4096
4108
  */
4097
4109
  moveColumns(e, t) {
4098
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = te(e.getRange(), this._worksheet), i = o, a = {
4110
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = re(e.getRange(), this._worksheet), o = s, i = {
4099
4111
  startRow: 0,
4100
4112
  endRow: this._worksheet.getRowCount() - 1,
4101
4113
  startColumn: t,
4102
4114
  endColumn: t
4103
4115
  };
4104
- return this._commandService.syncExecuteCommand(Ft.id, {
4116
+ return this._commandService.syncExecuteCommand(Ot.id, {
4105
4117
  unitId: n,
4106
- subUnitId: s,
4107
- range: o,
4108
- fromRange: i,
4109
- toRange: a
4118
+ subUnitId: r,
4119
+ range: s,
4120
+ fromRange: o,
4121
+ toRange: i
4110
4122
  }), this;
4111
4123
  }
4112
4124
  /**
@@ -4125,11 +4137,11 @@ let S = class extends ge {
4125
4137
  * ```
4126
4138
  */
4127
4139
  hideColumn(e) {
4128
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = te(e.getRange(), this._worksheet);
4129
- return this._commandService.syncExecuteCommand(xe.id, {
4140
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), r = re(e.getRange(), this._worksheet);
4141
+ return this._commandService.syncExecuteCommand(Ne.id, {
4130
4142
  unitId: t,
4131
4143
  subUnitId: n,
4132
- ranges: [s]
4144
+ ranges: [r]
4133
4145
  }), this;
4134
4146
  }
4135
4147
  /**
@@ -4147,17 +4159,17 @@ let S = class extends ge {
4147
4159
  * ```
4148
4160
  */
4149
4161
  hideColumns(e, t = 1) {
4150
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = {
4162
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = {
4151
4163
  startRow: 0,
4152
4164
  endRow: this._worksheet.getRowCount() - 1,
4153
4165
  startColumn: e,
4154
4166
  endColumn: e + t - 1,
4155
- rangeType: k.COLUMN
4167
+ rangeType: w.COLUMN
4156
4168
  };
4157
- return this._commandService.syncExecuteCommand(xe.id, {
4169
+ return this._commandService.syncExecuteCommand(Ne.id, {
4158
4170
  unitId: n,
4159
- subUnitId: s,
4160
- ranges: [o]
4171
+ subUnitId: r,
4172
+ ranges: [s]
4161
4173
  }), this;
4162
4174
  }
4163
4175
  /**
@@ -4176,11 +4188,11 @@ let S = class extends ge {
4176
4188
  * ```
4177
4189
  */
4178
4190
  unhideColumn(e) {
4179
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = te(e.getRange(), this._worksheet);
4180
- return this._commandService.syncExecuteCommand(Me.id, {
4191
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), r = re(e.getRange(), this._worksheet);
4192
+ return this._commandService.syncExecuteCommand(Te.id, {
4181
4193
  unitId: t,
4182
4194
  subUnitId: n,
4183
- ranges: [s]
4195
+ ranges: [r]
4184
4196
  }), this;
4185
4197
  }
4186
4198
  /**
@@ -4198,17 +4210,17 @@ let S = class extends ge {
4198
4210
  * ```
4199
4211
  */
4200
4212
  showColumns(e, t = 1) {
4201
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = {
4213
+ const n = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), s = {
4202
4214
  startRow: 0,
4203
4215
  endRow: this._worksheet.getRowCount() - 1,
4204
4216
  startColumn: e,
4205
4217
  endColumn: e + t - 1,
4206
- rangeType: k.COLUMN
4218
+ rangeType: w.COLUMN
4207
4219
  };
4208
- return this._commandService.syncExecuteCommand(Me.id, {
4220
+ return this._commandService.syncExecuteCommand(Te.id, {
4209
4221
  unitId: n,
4210
- subUnitId: s,
4211
- ranges: [o]
4222
+ subUnitId: r,
4223
+ ranges: [s]
4212
4224
  }), this;
4213
4225
  }
4214
4226
  /**
@@ -4240,7 +4252,7 @@ let S = class extends ge {
4240
4252
  * ```
4241
4253
  */
4242
4254
  setColumnWidths(e, t, n) {
4243
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), i = [
4255
+ const r = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = [
4244
4256
  {
4245
4257
  startColumn: e,
4246
4258
  endColumn: e + t - 1,
@@ -4248,10 +4260,10 @@ let S = class extends ge {
4248
4260
  endRow: this._worksheet.getRowCount() - 1
4249
4261
  }
4250
4262
  ];
4251
- return this._commandService.syncExecuteCommand(Vt.id, {
4252
- unitId: s,
4253
- subUnitId: o,
4254
- ranges: i,
4263
+ return this._commandService.syncExecuteCommand(jt.id, {
4264
+ unitId: r,
4265
+ subUnitId: s,
4266
+ ranges: o,
4255
4267
  value: n
4256
4268
  }), this;
4257
4269
  }
@@ -4290,17 +4302,17 @@ let S = class extends ge {
4290
4302
  * ```
4291
4303
  */
4292
4304
  setColumnCustom(e) {
4293
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = {};
4294
- for (const [i, a] of Object.entries(e))
4295
- s[Number(i)] = {
4296
- custom: a
4305
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), r = {};
4306
+ for (const [o, i] of Object.entries(e))
4307
+ r[Number(o)] = {
4308
+ custom: i
4297
4309
  };
4298
- const o = {
4310
+ const s = {
4299
4311
  unitId: t,
4300
4312
  subUnitId: n,
4301
- columnData: s
4313
+ columnData: r
4302
4314
  };
4303
- return this._commandService.syncExecuteCommand(Re.id, o), this;
4315
+ return this._commandService.syncExecuteCommand(pe.id, s), this;
4304
4316
  }
4305
4317
  // #region merge cells
4306
4318
  /**
@@ -4318,7 +4330,7 @@ let S = class extends ge {
4318
4330
  * ```
4319
4331
  */
4320
4332
  getMergeData() {
4321
- return this._worksheet.getMergeData().map((e) => this._injector.createInstance(_, this._workbook, this._worksheet, e));
4333
+ return this._worksheet.getMergeData().map((e) => this._injector.createInstance(k, this._workbook, this._worksheet, e));
4322
4334
  }
4323
4335
  /**
4324
4336
  * Get all merged cells in the current sheet
@@ -4335,7 +4347,7 @@ let S = class extends ge {
4335
4347
  * ```
4336
4348
  */
4337
4349
  getMergedRanges() {
4338
- return this._worksheet.getSnapshot().mergeData.map((t) => this._injector.createInstance(_, this._workbook, this._worksheet, t));
4350
+ return this._worksheet.getSnapshot().mergeData.map((t) => this._injector.createInstance(k, this._workbook, this._worksheet, t));
4339
4351
  }
4340
4352
  /**
4341
4353
  * Get the merged cell data of the specified row and column.
@@ -4352,9 +4364,9 @@ let S = class extends ge {
4352
4364
  * ```
4353
4365
  */
4354
4366
  getCellMergeData(e, t) {
4355
- const s = this._worksheet.getMergedCell(e, t);
4356
- if (s)
4357
- return this._injector.createInstance(_, this._workbook, this._worksheet, s);
4367
+ const r = this._worksheet.getMergedCell(e, t);
4368
+ if (r)
4369
+ return this._injector.createInstance(k, this._workbook, this._worksheet, r);
4358
4370
  }
4359
4371
  // #endregion
4360
4372
  /**
@@ -4420,7 +4432,7 @@ let S = class extends ge {
4420
4432
  * ```
4421
4433
  */
4422
4434
  setFreeze(e) {
4423
- return this._logService.warn("setFreeze is deprecated, use setFrozenRows and setFrozenColumns instead"), this._commandService.syncExecuteCommand(Z.id, {
4435
+ return this._logService.warn("setFreeze is deprecated, use setFrozenRows and setFrozenColumns instead"), this._commandService.syncExecuteCommand(te.id, {
4424
4436
  ...e,
4425
4437
  unitId: this._workbook.getUnitId(),
4426
4438
  subUnitId: this.getSheetId()
@@ -4437,7 +4449,7 @@ let S = class extends ge {
4437
4449
  * ```
4438
4450
  */
4439
4451
  cancelFreeze() {
4440
- return this._commandService.syncExecuteCommand(Ht.id, {
4452
+ return this._commandService.syncExecuteCommand(Lt.id, {
4441
4453
  unitId: this._workbook.getUnitId(),
4442
4454
  subUnitId: this.getSheetId()
4443
4455
  }), this;
@@ -4466,10 +4478,10 @@ let S = class extends ge {
4466
4478
  xSplit: n
4467
4479
  });
4468
4480
  } else if (arguments.length === 2) {
4469
- let [n = 0, s = 0] = e;
4470
- n > s && ([n, s] = [s, n]), this._commandService.syncExecuteCommand(Z.id, {
4471
- startColumn: s + 1,
4472
- xSplit: s - n + 1,
4481
+ let [n = 0, r = 0] = e;
4482
+ n > r && ([n, r] = [r, n]), this._commandService.syncExecuteCommand(te.id, {
4483
+ startColumn: r + 1,
4484
+ xSplit: r - n + 1,
4473
4485
  startRow: t.startRow,
4474
4486
  ySplit: t.ySplit,
4475
4487
  unitId: this._workbook.getUnitId(),
@@ -4488,10 +4500,10 @@ let S = class extends ge {
4488
4500
  ySplit: n
4489
4501
  });
4490
4502
  } else if (arguments.length === 2) {
4491
- let [n = 0, s = 0] = e;
4492
- n > s && ([n, s] = [s, n]), this._commandService.syncExecuteCommand(Z.id, {
4493
- startRow: s + 1,
4494
- ySplit: s - n + 1,
4503
+ let [n = 0, r = 0] = e;
4504
+ n > r && ([n, r] = [r, n]), this._commandService.syncExecuteCommand(te.id, {
4505
+ startRow: r + 1,
4506
+ ySplit: r - n + 1,
4495
4507
  startColumn: t.startColumn,
4496
4508
  xSplit: t.xSplit,
4497
4509
  unitId: this._workbook.getUnitId(),
@@ -4579,7 +4591,7 @@ let S = class extends ge {
4579
4591
  * ```
4580
4592
  */
4581
4593
  hasHiddenGridLines() {
4582
- return this._worksheet.getConfig().showGridlines === g.FALSE;
4594
+ return this._worksheet.getConfig().showGridlines === m.FALSE;
4583
4595
  }
4584
4596
  /**
4585
4597
  * Hides or reveals the sheet gridlines.
@@ -4593,10 +4605,10 @@ let S = class extends ge {
4593
4605
  * ```
4594
4606
  */
4595
4607
  setHiddenGridlines(e) {
4596
- return this._commandService.syncExecuteCommand(ae.id, {
4608
+ return this._commandService.syncExecuteCommand(de.id, {
4597
4609
  unitId: this._workbook.getUnitId(),
4598
4610
  subUnitId: this._worksheet.getSheetId(),
4599
- showGridlines: e ? g.FALSE : g.TRUE
4611
+ showGridlines: e ? m.FALSE : m.TRUE
4600
4612
  }), this;
4601
4613
  }
4602
4614
  /**
@@ -4611,7 +4623,7 @@ let S = class extends ge {
4611
4623
  * ```
4612
4624
  */
4613
4625
  setGridLinesColor(e) {
4614
- return this._commandService.syncExecuteCommand(he.id, {
4626
+ return this._commandService.syncExecuteCommand(ce.id, {
4615
4627
  unitId: this._workbook.getUnitId(),
4616
4628
  subUnitId: this._worksheet.getSheetId(),
4617
4629
  color: e
@@ -4644,7 +4656,7 @@ let S = class extends ge {
4644
4656
  * ```
4645
4657
  */
4646
4658
  setTabColor(e) {
4647
- return this._commandService.syncExecuteCommand(Ot.id, {
4659
+ return this._commandService.syncExecuteCommand(zt.id, {
4648
4660
  unitId: this._workbook.getUnitId(),
4649
4661
  subUnitId: this._worksheet.getSheetId(),
4650
4662
  value: e
@@ -4669,10 +4681,10 @@ let S = class extends ge {
4669
4681
  * @deprecated use `univerAPI.addEvent(univerAPI.Event.SheetValueChanged, (params) => {})` instead
4670
4682
  */
4671
4683
  onCellDataChange(e) {
4672
- return this._injector.get(m).onCommandExecuted((n) => {
4673
- if (n.id === Ne.id) {
4674
- const s = n.params;
4675
- s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new J(s.cellValue));
4684
+ return this._injector.get(_).onCommandExecuted((n) => {
4685
+ if (n.id === Ae.id) {
4686
+ const r = n.params;
4687
+ r.unitId === this._workbook.getUnitId() && r.subUnitId === this._worksheet.getSheetId() && r.cellValue && e(new X(r.cellValue));
4676
4688
  }
4677
4689
  });
4678
4690
  }
@@ -4680,10 +4692,10 @@ let S = class extends ge {
4680
4692
  * @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeSheetEditEnd, (params) => {})` instead
4681
4693
  */
4682
4694
  onBeforeCellDataChange(e) {
4683
- return this._injector.get(m).beforeCommandExecuted((n) => {
4684
- if (n.id === Ne.id) {
4685
- const s = n.params;
4686
- s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new J(s.cellValue));
4695
+ return this._injector.get(_).beforeCommandExecuted((n) => {
4696
+ if (n.id === Ae.id) {
4697
+ const r = n.params;
4698
+ r.unitId === this._workbook.getUnitId() && r.subUnitId === this._worksheet.getSheetId() && r.cellValue && e(new X(r.cellValue));
4687
4699
  }
4688
4700
  });
4689
4701
  }
@@ -4699,10 +4711,10 @@ let S = class extends ge {
4699
4711
  * ```
4700
4712
  */
4701
4713
  hideSheet() {
4702
- const e = this._injector.get(m);
4703
- if (this._workbook.getSheets().filter((o) => o.isSheetHidden() !== g.TRUE).length <= 1)
4714
+ const e = this._injector.get(_);
4715
+ if (this._workbook.getSheets().filter((s) => s.isSheetHidden() !== m.TRUE).length <= 1)
4704
4716
  throw new Error("Cannot hide the only visible sheet");
4705
- return e.syncExecuteCommand(jt.id, {
4717
+ return e.syncExecuteCommand(Gt.id, {
4706
4718
  unitId: this._workbook.getUnitId(),
4707
4719
  subUnitId: this._worksheet.getSheetId()
4708
4720
  }), this;
@@ -4719,7 +4731,7 @@ let S = class extends ge {
4719
4731
  * ```
4720
4732
  */
4721
4733
  showSheet() {
4722
- return this._injector.get(m).syncExecuteCommand(Lt.id, {
4734
+ return this._injector.get(_).syncExecuteCommand($t.id, {
4723
4735
  unitId: this._workbook.getUnitId(),
4724
4736
  subUnitId: this._worksheet.getSheetId()
4725
4737
  }), this;
@@ -4736,7 +4748,7 @@ let S = class extends ge {
4736
4748
  * ```
4737
4749
  */
4738
4750
  isSheetHidden() {
4739
- return this._worksheet.isSheetHidden() === g.TRUE;
4751
+ return this._worksheet.isSheetHidden() === m.TRUE;
4740
4752
  }
4741
4753
  /**
4742
4754
  * Sets the sheet name.
@@ -4751,7 +4763,7 @@ let S = class extends ge {
4751
4763
  * ```
4752
4764
  */
4753
4765
  setName(e) {
4754
- return this._commandService.syncExecuteCommand(de.id, {
4766
+ return this._commandService.syncExecuteCommand(ue.id, {
4755
4767
  unitId: this._workbook.getUnitId(),
4756
4768
  subUnitId: this._worksheet.getSheetId(),
4757
4769
  name: e
@@ -4807,16 +4819,16 @@ let S = class extends ge {
4807
4819
  return this.clearContents();
4808
4820
  if (e && e.formatOnly && !e.contentsOnly)
4809
4821
  return this.clearFormats();
4810
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = this._injector.get(m), o = {
4822
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), r = this._injector.get(_), s = {
4811
4823
  startRow: 0,
4812
4824
  endRow: this._worksheet.getRowCount() - 1,
4813
4825
  startColumn: 0,
4814
4826
  endColumn: this._worksheet.getColumnCount() - 1
4815
4827
  };
4816
- return s.syncExecuteCommand(Je.id, {
4828
+ return r.syncExecuteCommand(Xe.id, {
4817
4829
  unitId: t,
4818
4830
  subUnitId: n,
4819
- ranges: [o],
4831
+ ranges: [s],
4820
4832
  options: e
4821
4833
  }), this;
4822
4834
  }
@@ -4832,16 +4844,16 @@ let S = class extends ge {
4832
4844
  * ```
4833
4845
  */
4834
4846
  clearContents() {
4835
- const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(m), s = {
4847
+ const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(_), r = {
4836
4848
  startRow: 0,
4837
4849
  endRow: this._worksheet.getRowCount() - 1,
4838
4850
  startColumn: 0,
4839
4851
  endColumn: this._worksheet.getColumnCount() - 1
4840
4852
  };
4841
- return n.syncExecuteCommand(Qe.id, {
4853
+ return n.syncExecuteCommand(Ze.id, {
4842
4854
  unitId: e,
4843
4855
  subUnitId: t,
4844
- ranges: [s]
4856
+ ranges: [r]
4845
4857
  }), this;
4846
4858
  }
4847
4859
  /**
@@ -4856,16 +4868,16 @@ let S = class extends ge {
4856
4868
  * ```
4857
4869
  */
4858
4870
  clearFormats() {
4859
- const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(m), s = {
4871
+ const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(_), r = {
4860
4872
  startRow: 0,
4861
4873
  endRow: this._worksheet.getRowCount() - 1,
4862
4874
  startColumn: 0,
4863
4875
  endColumn: this._worksheet.getColumnCount() - 1
4864
4876
  };
4865
- return n.syncExecuteCommand(Xe.id, {
4877
+ return n.syncExecuteCommand(et.id, {
4866
4878
  unitId: e,
4867
4879
  subUnitId: t,
4868
- ranges: [s]
4880
+ ranges: [r]
4869
4881
  }), this;
4870
4882
  }
4871
4883
  /**
@@ -4961,8 +4973,8 @@ let S = class extends ge {
4961
4973
  * ```
4962
4974
  */
4963
4975
  insertDefinedName(e, t) {
4964
- const s = this._injector.createInstance(Y).setName(e).setRef(t).build();
4965
- s.localSheetId = this.getSheetId(), this._fWorkbook.insertDefinedNameBuilder(s);
4976
+ const r = this._injector.createInstance(Q).setName(e).setRef(t).build();
4977
+ r.localSheetId = this.getSheetId(), this._fWorkbook.insertDefinedNameBuilder(r);
4966
4978
  }
4967
4979
  /**
4968
4980
  * Get all the defined names in the worksheet.
@@ -5080,17 +5092,17 @@ let S = class extends ge {
5080
5092
  * ```
5081
5093
  */
5082
5094
  appendRow(e) {
5083
- const t = this._worksheet.getCellMatrix().hasValue(), n = this._worksheet.getLastRowWithContent(), s = this._worksheet.getRowCount(), o = this._worksheet.getColumnCount(), i = t ? n + 1 : n, a = new J();
5095
+ const t = this._worksheet.getCellMatrix().hasValue(), n = this._worksheet.getLastRowWithContent(), r = this._worksheet.getRowCount(), s = this._worksheet.getColumnCount(), o = t ? n + 1 : n, i = new X();
5084
5096
  for (let h = 0; h < e.length; h++)
5085
- a.setValue(i, h, re(e[h]));
5086
- return this._commandService.syncExecuteCommand(zt.id, {
5097
+ i.setValue(o, h, oe(e[h]));
5098
+ return this._commandService.syncExecuteCommand(qt.id, {
5087
5099
  unitId: this._workbook.getUnitId(),
5088
5100
  subUnitId: this._worksheet.getSheetId(),
5089
- cellValue: a.getMatrix(),
5090
- insertRowNums: i > s - 1 ? 1 : 0,
5091
- insertColumnNums: e.length > o ? e.length - o : 0,
5092
- maxRows: s,
5093
- maxColumns: o
5101
+ cellValue: i.getMatrix(),
5102
+ insertRowNums: o > r - 1 ? 1 : 0,
5103
+ insertColumnNums: e.length > s ? e.length - s : 0,
5104
+ maxRows: r,
5105
+ maxColumns: s
5094
5106
  }), this;
5095
5107
  }
5096
5108
  /**
@@ -5107,7 +5119,7 @@ let S = class extends ge {
5107
5119
  * ```
5108
5120
  */
5109
5121
  setRowCount(e) {
5110
- return this._commandService.syncExecuteCommand(Gt.id, {
5122
+ return this._commandService.syncExecuteCommand(Kt.id, {
5111
5123
  unitId: this._workbook.getUnitId(),
5112
5124
  subUnitId: this._worksheet.getSheetId(),
5113
5125
  rowCount: e
@@ -5127,29 +5139,29 @@ let S = class extends ge {
5127
5139
  * ```
5128
5140
  */
5129
5141
  setColumnCount(e) {
5130
- return this._commandService.syncExecuteCommand($t.id, {
5142
+ return this._commandService.syncExecuteCommand(Yt.id, {
5131
5143
  unitId: this._workbook.getUnitId(),
5132
5144
  subUnitId: this._worksheet.getSheetId(),
5133
5145
  columnCount: e
5134
5146
  }), this;
5135
5147
  }
5136
5148
  };
5137
- S = In([
5138
- j(3, l(x)),
5139
- j(4, l(Ze)),
5140
- j(5, l(je)),
5141
- j(6, m)
5149
+ S = pn([
5150
+ z(3, g(M)),
5151
+ z(4, g(tt)),
5152
+ z(5, g(ze)),
5153
+ z(6, _)
5142
5154
  ], S);
5143
- var Rn = Object.getOwnPropertyDescriptor, bn = (r, e, t, n) => {
5144
- for (var s = n > 1 ? void 0 : n ? Rn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
5145
- (i = r[o]) && (s = i(s) || s);
5146
- return s;
5147
- }, R = (r, e) => (t, n) => e(t, n, r);
5148
- let C = class extends ge {
5149
- constructor(e, t, n, s, o, i, a, h, d, c) {
5155
+ var En = Object.getOwnPropertyDescriptor, yn = (a, e, t, n) => {
5156
+ for (var r = n > 1 ? void 0 : n ? En(e, t) : e, s = a.length - 1, o; s >= 0; s--)
5157
+ (o = a[s]) && (r = o(r) || r);
5158
+ return r;
5159
+ }, R = (a, e) => (t, n) => e(t, n, a);
5160
+ let C = class extends _e {
5161
+ constructor(e, t, n, r, s, o, i, h, d, c) {
5150
5162
  super(t);
5151
- E(this, "id");
5152
- this._workbook = e, this._injector = t, this._resourceLoaderService = n, this._selectionManagerService = s, this._univerInstanceService = o, this._commandService = i, this._permissionService = a, this._logService = h, this._localeService = d, this._definedNamesService = c, this.id = this._workbook.getUnitId();
5163
+ b(this, "id");
5164
+ this._workbook = e, this._injector = t, this._resourceLoaderService = n, this._selectionManagerService = r, this._univerInstanceService = s, this._commandService = o, this._permissionService = i, this._logService = h, this._localeService = d, this._definedNamesService = c, this.id = this._workbook.getUnitId();
5153
5165
  }
5154
5166
  /**
5155
5167
  * Get the Workbook instance.
@@ -5207,7 +5219,7 @@ let C = class extends ge {
5207
5219
  * ```
5208
5220
  */
5209
5221
  setName(e) {
5210
- return this._commandService.syncExecuteCommand(qt.id, {
5222
+ return this._commandService.syncExecuteCommand(Jt.id, {
5211
5223
  unitId: this._workbook.getUnitId(),
5212
5224
  name: e
5213
5225
  }), this;
@@ -5305,23 +5317,23 @@ let C = class extends ge {
5305
5317
  * console.log(newSheetWithData);
5306
5318
  * ```
5307
5319
  */
5308
- create(e, t, n, s) {
5320
+ create(e, t, n, r) {
5309
5321
  var h, d, c;
5310
- const o = Ce(ve.deepClone((h = s == null ? void 0 : s.sheet) != null ? h : {}));
5311
- o.name = e, o.rowCount = t, o.columnCount = n, o.id = (d = s == null ? void 0 : s.sheet) == null ? void 0 : d.id;
5312
- const i = (c = s == null ? void 0 : s.index) != null ? c : this._workbook.getSheets().length;
5313
- this._commandService.syncExecuteCommand(G.id, {
5322
+ const s = fe(Ie.deepClone((h = r == null ? void 0 : r.sheet) != null ? h : {}));
5323
+ s.name = e, s.rowCount = t, s.columnCount = n, s.id = (d = r == null ? void 0 : r.sheet) == null ? void 0 : d.id;
5324
+ const o = (c = r == null ? void 0 : r.index) != null ? c : this._workbook.getSheets().length;
5325
+ this._commandService.syncExecuteCommand(q.id, {
5314
5326
  unitId: this.id,
5315
- index: i,
5316
- sheet: o
5317
- }), this._commandService.syncExecuteCommand(F.id, {
5327
+ index: o,
5328
+ sheet: s
5329
+ }), this._commandService.syncExecuteCommand(H.id, {
5318
5330
  unitId: this.id,
5319
- subUnitId: this._workbook.getSheets()[i].getSheetId()
5331
+ subUnitId: this._workbook.getSheets()[o].getSheetId()
5320
5332
  });
5321
- const a = this._workbook.getActiveSheet();
5322
- if (!a)
5333
+ const i = this._workbook.getActiveSheet();
5334
+ if (!i)
5323
5335
  throw new Error("No active sheet found");
5324
- return this._injector.createInstance(S, this, this._workbook, a);
5336
+ return this._injector.createInstance(S, this, this._workbook, i);
5325
5337
  }
5326
5338
  /**
5327
5339
  * Get a worksheet by sheet id.
@@ -5368,7 +5380,7 @@ let C = class extends ge {
5368
5380
  * ```
5369
5381
  */
5370
5382
  setActiveSheet(e) {
5371
- return this._commandService.syncExecuteCommand(F.id, {
5383
+ return this._commandService.syncExecuteCommand(H.id, {
5372
5384
  unitId: this.id,
5373
5385
  subUnitId: typeof e == "string" ? e : e.getSheetId()
5374
5386
  }), typeof e == "string" ? this.getSheetBySheetId(e) : e;
@@ -5413,22 +5425,22 @@ let C = class extends ge {
5413
5425
  * ```
5414
5426
  */
5415
5427
  insertSheet(e, t) {
5416
- var i, a, h;
5417
- const n = Ce(ve.deepClone((i = t == null ? void 0 : t.sheet) != null ? i : {}));
5418
- n.name = e, n.id = (a = t == null ? void 0 : t.sheet) == null ? void 0 : a.id;
5419
- const s = (h = t == null ? void 0 : t.index) != null ? h : this._workbook.getSheets().length;
5420
- this._commandService.syncExecuteCommand(G.id, {
5428
+ var o, i, h;
5429
+ const n = fe(Ie.deepClone((o = t == null ? void 0 : t.sheet) != null ? o : {}));
5430
+ n.name = e, n.id = (i = t == null ? void 0 : t.sheet) == null ? void 0 : i.id;
5431
+ const r = (h = t == null ? void 0 : t.index) != null ? h : this._workbook.getSheets().length;
5432
+ this._commandService.syncExecuteCommand(q.id, {
5421
5433
  unitId: this.id,
5422
- index: s,
5434
+ index: r,
5423
5435
  sheet: n
5424
- }), this._commandService.syncExecuteCommand(F.id, {
5436
+ }), this._commandService.syncExecuteCommand(H.id, {
5425
5437
  unitId: this.id,
5426
- subUnitId: this._workbook.getSheets()[s].getSheetId()
5438
+ subUnitId: this._workbook.getSheets()[r].getSheetId()
5427
5439
  });
5428
- const o = this._workbook.getActiveSheet();
5429
- if (!o)
5440
+ const s = this._workbook.getActiveSheet();
5441
+ if (!s)
5430
5442
  throw new Error("No active sheet found");
5431
- return this._injector.createInstance(S, this, this._workbook, o);
5443
+ return this._injector.createInstance(S, this, this._workbook, s);
5432
5444
  }
5433
5445
  /**
5434
5446
  * Deletes the specified worksheet.
@@ -5447,7 +5459,7 @@ let C = class extends ge {
5447
5459
  */
5448
5460
  deleteSheet(e) {
5449
5461
  const t = this.id, n = typeof e == "string" ? e : e.getSheetId();
5450
- return this._commandService.syncExecuteCommand(ce.id, {
5462
+ return this._commandService.syncExecuteCommand(le.id, {
5451
5463
  unitId: t,
5452
5464
  subUnitId: n
5453
5465
  });
@@ -5464,7 +5476,7 @@ let C = class extends ge {
5464
5476
  * ```
5465
5477
  */
5466
5478
  undo() {
5467
- return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(ot.id), this;
5479
+ return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(it.id), this;
5468
5480
  }
5469
5481
  /**
5470
5482
  * Redo the last undone action.
@@ -5477,7 +5489,7 @@ let C = class extends ge {
5477
5489
  * ```
5478
5490
  */
5479
5491
  redo() {
5480
- return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(it.id), this;
5492
+ return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(at.id), this;
5481
5493
  }
5482
5494
  /**
5483
5495
  * Callback for command execution.
@@ -5546,9 +5558,9 @@ let C = class extends ge {
5546
5558
  * ```
5547
5559
  */
5548
5560
  onSelectionChange(e) {
5549
- return Le(
5561
+ return Ge(
5550
5562
  this._selectionManagerService.selectionMoveEnd$.subscribe((t) => {
5551
- this._univerInstanceService.getCurrentUnitForType(U.UNIVER_SHEET).getUnitId() === this.id && (t != null && t.length ? e(t.map((n) => n.range)) : e([]));
5563
+ this._univerInstanceService.getCurrentUnitForType(P.UNIVER_SHEET).getUnitId() === this.id && (t != null && t.length ? e(t.map((n) => n.range)) : e([]));
5552
5564
  })
5553
5565
  );
5554
5566
  }
@@ -5564,7 +5576,7 @@ let C = class extends ge {
5564
5576
  * ```
5565
5577
  */
5566
5578
  setEditable(e) {
5567
- const t = new Ke(this._workbook.getUnitId());
5579
+ const t = new Je(this._workbook.getUnitId());
5568
5580
  return this._permissionService.getPermissionPoint(t.id) || this._permissionService.addPermissionPoint(t), this._permissionService.updatePermissionPoint(t.id, e), this;
5569
5581
  }
5570
5582
  /**
@@ -5579,16 +5591,16 @@ let C = class extends ge {
5579
5591
  * ```
5580
5592
  */
5581
5593
  setActiveRange(e) {
5582
- const t = this.getActiveSheet(), n = e.getRange().sheetId || t.getSheetId(), s = n ? this._workbook.getSheetBySheetId(n) : this._workbook.getActiveSheet(!0);
5583
- if (!s)
5594
+ const t = this.getActiveSheet(), n = e.getRange().sheetId || t.getSheetId(), r = n ? this._workbook.getSheetBySheetId(n) : this._workbook.getActiveSheet(!0);
5595
+ if (!r)
5584
5596
  throw new Error("No active sheet found");
5585
- s.getSheetId() !== t.getSheetId() && this.setActiveSheet(this._injector.createInstance(S, this, this._workbook, s));
5586
- const o = {
5597
+ r.getSheetId() !== t.getSheetId() && this.setActiveSheet(this._injector.createInstance(S, this, this._workbook, r));
5598
+ const s = {
5587
5599
  unitId: this.getId(),
5588
5600
  subUnitId: n,
5589
- selections: [e].map((i) => ({ range: i.getRange(), primary: z(i.getRange(), s), style: null }))
5601
+ selections: [e].map((o) => ({ range: o.getRange(), primary: $(o.getRange(), r), style: null }))
5590
5602
  };
5591
- return this._commandService.syncExecuteCommand(me.id, o), this;
5603
+ return this._commandService.syncExecuteCommand(ke.id, s), this;
5592
5604
  }
5593
5605
  /**
5594
5606
  * Returns the selected range in the active sheet, or null if there is no active range.
@@ -5602,8 +5614,8 @@ let C = class extends ge {
5602
5614
  */
5603
5615
  // could sheet have no active range ?
5604
5616
  getActiveRange() {
5605
- const e = this._workbook.getActiveSheet(), n = this._selectionManagerService.getCurrentSelections().find((s) => !!s.primary);
5606
- return n ? this._injector.createInstance(_, this._workbook, e, n.range) : null;
5617
+ const e = this._workbook.getActiveSheet(), n = this._selectionManagerService.getCurrentSelections().find((r) => !!r.primary);
5618
+ return n ? this._injector.createInstance(k, this._workbook, e, n.range) : null;
5607
5619
  }
5608
5620
  /**
5609
5621
  * Returns the active cell in this spreadsheet.
@@ -5615,14 +5627,14 @@ let C = class extends ge {
5615
5627
  * ```
5616
5628
  */
5617
5629
  getActiveCell() {
5618
- const e = this._workbook.getActiveSheet(), n = this._selectionManagerService.getCurrentSelections().find((o) => !!o.primary);
5630
+ const e = this._workbook.getActiveSheet(), n = this._selectionManagerService.getCurrentSelections().find((s) => !!s.primary);
5619
5631
  if (!n)
5620
5632
  return null;
5621
- const s = {
5633
+ const r = {
5622
5634
  ...n.primary,
5623
- rangeType: k.NORMAL
5635
+ rangeType: w.NORMAL
5624
5636
  };
5625
- return this._injector.createInstance(_, this._workbook, e, s);
5637
+ return this._injector.createInstance(k, this._workbook, e, r);
5626
5638
  }
5627
5639
  /**
5628
5640
  * Deletes the currently active sheet.
@@ -5651,7 +5663,7 @@ let C = class extends ge {
5651
5663
  * ```
5652
5664
  */
5653
5665
  duplicateSheet(e) {
5654
- return this._commandService.syncExecuteCommand(Kt.id, {
5666
+ return this._commandService.syncExecuteCommand(Qt.id, {
5655
5667
  unitId: e.getWorkbook().getUnitId(),
5656
5668
  subUnitId: e.getSheetId()
5657
5669
  }), this._injector.createInstance(S, this, this._workbook, this._workbook.getActiveSheet());
@@ -5747,7 +5759,7 @@ let C = class extends ge {
5747
5759
  */
5748
5760
  moveSheet(e, t) {
5749
5761
  let n = t;
5750
- return n < 0 ? n = 0 : n > this._workbook.getSheets().length - 1 && (n = this._workbook.getSheets().length - 1), this._commandService.syncExecuteCommand(Yt.id, {
5762
+ return n < 0 ? n = 0 : n > this._workbook.getSheets().length - 1 && (n = this._workbook.getSheets().length - 1), this._commandService.syncExecuteCommand(Xt.id, {
5751
5763
  unitId: e.getWorkbook().getUnitId(),
5752
5764
  order: n,
5753
5765
  subUnitId: e.getSheetId()
@@ -5779,7 +5791,7 @@ let C = class extends ge {
5779
5791
  * ```
5780
5792
  */
5781
5793
  getPermission() {
5782
- return this._injector.createInstance(q);
5794
+ return this._injector.createInstance(Y);
5783
5795
  }
5784
5796
  /**
5785
5797
  * Get the defined name by name.
@@ -5799,7 +5811,7 @@ let C = class extends ge {
5799
5811
  */
5800
5812
  getDefinedName(e) {
5801
5813
  const t = this._definedNamesService.getValueByName(this.id, e);
5802
- return t ? this._injector.createInstance($, { ...t, unitId: this.id }) : null;
5814
+ return t ? this._injector.createInstance(K, { ...t, unitId: this.id }) : null;
5803
5815
  }
5804
5816
  /**
5805
5817
  * Get all the defined names in the workbook.
@@ -5814,7 +5826,7 @@ let C = class extends ge {
5814
5826
  */
5815
5827
  getDefinedNames() {
5816
5828
  const e = this._definedNamesService.getDefinedNameMap(this.id);
5817
- return e ? Object.values(e).map((t) => this._injector.createInstance($, { ...t, unitId: this.id })) : [];
5829
+ return e ? Object.values(e).map((t) => this._injector.createInstance(K, { ...t, unitId: this.id })) : [];
5818
5830
  }
5819
5831
  /**
5820
5832
  * Insert a defined name.
@@ -5829,8 +5841,8 @@ let C = class extends ge {
5829
5841
  * ```
5830
5842
  */
5831
5843
  insertDefinedName(e, t) {
5832
- const s = this._injector.createInstance(Y).setName(e).setRef(t).build();
5833
- return s.localSheetId = V, this.insertDefinedNameBuilder(s), this;
5844
+ const r = this._injector.createInstance(Q).setName(e).setRef(t).build();
5845
+ return r.localSheetId = O, this.insertDefinedNameBuilder(r), this;
5834
5846
  }
5835
5847
  /**
5836
5848
  * Delete the defined name with the given name.
@@ -5864,7 +5876,7 @@ let C = class extends ge {
5864
5876
  * ```
5865
5877
  */
5866
5878
  insertDefinedNameBuilder(e) {
5867
- e.unitId = this.getId(), this._commandService.syncExecuteCommand(oe.id, e);
5879
+ e.unitId = this.getId(), this._commandService.syncExecuteCommand(ae.id, e);
5868
5880
  }
5869
5881
  /**
5870
5882
  * Update the defined name with the given name.
@@ -5888,7 +5900,7 @@ let C = class extends ge {
5888
5900
  * ```
5889
5901
  */
5890
5902
  updateDefinedNameBuilder(e) {
5891
- this._commandService.syncExecuteCommand(oe.id, e);
5903
+ this._commandService.syncExecuteCommand(ae.id, e);
5892
5904
  }
5893
5905
  /**
5894
5906
  * Gets the registered range themes.
@@ -5902,7 +5914,7 @@ let C = class extends ge {
5902
5914
  * ```
5903
5915
  */
5904
5916
  getRegisteredRangeThemes() {
5905
- return this._injector.get(Ye).getRegisteredRangeThemes();
5917
+ return this._injector.get(Qe).getRegisteredRangeThemes();
5906
5918
  }
5907
5919
  /**
5908
5920
  * Register a custom range theme style.
@@ -5922,7 +5934,7 @@ let C = class extends ge {
5922
5934
  * ```
5923
5935
  */
5924
5936
  registerRangeTheme(e) {
5925
- this._commandService.syncExecuteCommand(Jt.id, {
5937
+ this._commandService.syncExecuteCommand(Zt.id, {
5926
5938
  unitId: this.getId(),
5927
5939
  rangeThemeStyle: e
5928
5940
  });
@@ -5938,7 +5950,7 @@ let C = class extends ge {
5938
5950
  * ```
5939
5951
  */
5940
5952
  unregisterRangeTheme(e) {
5941
- this._commandService.syncExecuteCommand(Qt.id, {
5953
+ this._commandService.syncExecuteCommand(en.id, {
5942
5954
  unitId: this.getId(),
5943
5955
  themeName: e
5944
5956
  });
@@ -5962,7 +5974,7 @@ let C = class extends ge {
5962
5974
  * ```
5963
5975
  */
5964
5976
  createRangeThemeStyle(e, t) {
5965
- return new Xt(e, t);
5977
+ return new tn(e, t);
5966
5978
  }
5967
5979
  /**
5968
5980
  * Set custom metadata of workbook
@@ -6067,43 +6079,43 @@ let C = class extends ge {
6067
6079
  this._workbook.removeStyles(e);
6068
6080
  }
6069
6081
  };
6070
- C = bn([
6071
- R(1, l(x)),
6072
- R(2, l(st)),
6073
- R(3, l(Ze)),
6074
- R(4, se),
6075
- R(5, m),
6076
- R(6, ue),
6077
- R(7, je),
6078
- R(8, l(He)),
6079
- R(9, et)
6082
+ C = yn([
6083
+ R(1, g(M)),
6084
+ R(2, g(ht)),
6085
+ R(3, g(tt)),
6086
+ R(4, ie),
6087
+ R(5, _),
6088
+ R(6, ge),
6089
+ R(7, ze),
6090
+ R(8, g(je)),
6091
+ R(9, nt)
6080
6092
  ], C);
6081
- class pn extends ze {
6093
+ class Un extends $e {
6082
6094
  getCommandSheetTarget(e) {
6083
- var o;
6095
+ var s;
6084
6096
  const t = e.params;
6085
6097
  if (!t) return this.getActiveSheet();
6086
- const n = t.unitId ? this.getUniverSheet(t.unitId) : (o = this.getActiveWorkbook) == null ? void 0 : o.call(this);
6098
+ const n = t.unitId ? this.getUniverSheet(t.unitId) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
6087
6099
  if (!n)
6088
6100
  return;
6089
- const s = n.getSheetBySheetId(t.subUnitId || t.sheetId) || n.getActiveSheet();
6090
- if (s)
6091
- return { workbook: n, worksheet: s };
6101
+ const r = n.getSheetBySheetId(t.subUnitId || t.sheetId) || n.getActiveSheet();
6102
+ if (r)
6103
+ return { workbook: n, worksheet: r };
6092
6104
  }
6093
6105
  getSheetTarget(e, t) {
6094
6106
  const n = this.getUniverSheet(e);
6095
6107
  if (!n)
6096
6108
  return;
6097
- const s = n.getSheetBySheetId(t);
6098
- if (s)
6099
- return { workbook: n, worksheet: s };
6109
+ const r = n.getSheetBySheetId(t);
6110
+ if (r)
6111
+ return { workbook: n, worksheet: r };
6100
6112
  }
6101
6113
  _initWorkbookEvent(e) {
6102
- const t = e.get(se);
6114
+ const t = e.get(ie);
6103
6115
  this.registerEventHandler(
6104
6116
  this.Event.WorkbookDisposed,
6105
6117
  () => t.unitDisposed$.subscribe((n) => {
6106
- n.type === U.UNIVER_SHEET && this.fireEvent(this.Event.WorkbookDisposed, {
6118
+ n.type === P.UNIVER_SHEET && this.fireEvent(this.Event.WorkbookDisposed, {
6107
6119
  unitId: n.getUnitId(),
6108
6120
  unitType: n.type,
6109
6121
  snapshot: n.getSnapshot()
@@ -6112,13 +6124,13 @@ class pn extends ze {
6112
6124
  ), this.registerEventHandler(
6113
6125
  this.Event.WorkbookCreated,
6114
6126
  () => t.unitAdded$.subscribe((n) => {
6115
- if (n.type === U.UNIVER_SHEET) {
6116
- const s = n, o = e.createInstance(C, s);
6127
+ if (n.type === P.UNIVER_SHEET) {
6128
+ const r = n, s = e.createInstance(C, r);
6117
6129
  this.fireEvent(this.Event.WorkbookCreated, {
6118
6130
  unitId: n.getUnitId(),
6119
6131
  type: n.type,
6120
- workbook: o,
6121
- unit: o
6132
+ workbook: s,
6133
+ unit: s
6122
6134
  });
6123
6135
  }
6124
6136
  })
@@ -6129,18 +6141,18 @@ class pn extends ze {
6129
6141
  */
6130
6142
  // eslint-disable-next-line max-lines-per-function
6131
6143
  _initialize(e) {
6132
- const t = e.get(m);
6144
+ const t = e.get(_);
6133
6145
  this.registerEventHandler(
6134
6146
  this.Event.BeforeSheetCreate,
6135
6147
  () => t.beforeCommandExecuted((n) => {
6136
- var s;
6137
- if (n.id === G.id) {
6138
- const o = n.params, { unitId: i, index: a, sheet: h } = o || {}, d = i ? this.getUniverSheet(i) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
6148
+ var r;
6149
+ if (n.id === q.id) {
6150
+ const s = n.params, { unitId: o, index: i, sheet: h } = s || {}, d = o ? this.getUniverSheet(o) : (r = this.getActiveWorkbook) == null ? void 0 : r.call(this);
6139
6151
  if (!d)
6140
6152
  return;
6141
6153
  const c = {
6142
6154
  workbook: d,
6143
- index: a,
6155
+ index: i,
6144
6156
  sheet: h
6145
6157
  };
6146
6158
  if (this.fireEvent(this.Event.BeforeSheetCreate, c), c.cancel)
@@ -6150,14 +6162,14 @@ class pn extends ze {
6150
6162
  ), this.registerEventHandler(
6151
6163
  this.Event.BeforeActiveSheetChange,
6152
6164
  () => t.beforeCommandExecuted((n) => {
6153
- var s;
6154
- if (n.id === F.id) {
6155
- const { subUnitId: o, unitId: i } = n.params, a = i ? this.getUniverSheet(i) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
6156
- if (!a || !o) return;
6157
- const h = a.getSheetBySheetId(o), d = a.getActiveSheet();
6165
+ var r;
6166
+ if (n.id === H.id) {
6167
+ const { subUnitId: s, unitId: o } = n.params, i = o ? this.getUniverSheet(o) : (r = this.getActiveWorkbook) == null ? void 0 : r.call(this);
6168
+ if (!i || !s) return;
6169
+ const h = i.getSheetBySheetId(s), d = i.getActiveSheet();
6158
6170
  if (!h || !d) return;
6159
6171
  const c = {
6160
- workbook: a,
6172
+ workbook: i,
6161
6173
  activeSheet: h,
6162
6174
  oldActiveSheet: d
6163
6175
  };
@@ -6168,141 +6180,141 @@ class pn extends ze {
6168
6180
  ), this.registerEventHandler(
6169
6181
  this.Event.BeforeSheetDelete,
6170
6182
  () => t.beforeCommandExecuted((n) => {
6171
- if (n.id === ce.id) {
6172
- const s = this.getCommandSheetTarget(n);
6173
- if (!s) return;
6174
- const { workbook: o, worksheet: i } = s, a = {
6175
- workbook: o,
6176
- worksheet: i
6183
+ if (n.id === le.id) {
6184
+ const r = this.getCommandSheetTarget(n);
6185
+ if (!r) return;
6186
+ const { workbook: s, worksheet: o } = r, i = {
6187
+ workbook: s,
6188
+ worksheet: o
6177
6189
  };
6178
- if (this.fireEvent(this.Event.BeforeSheetDelete, a), a.cancel)
6190
+ if (this.fireEvent(this.Event.BeforeSheetDelete, i), i.cancel)
6179
6191
  throw new f();
6180
6192
  }
6181
6193
  })
6182
6194
  ), this.registerEventHandler(
6183
6195
  this.Event.BeforeSheetMove,
6184
6196
  () => t.beforeCommandExecuted((n) => {
6185
- if (n.id === Te.id) {
6186
- const { fromOrder: s, toOrder: o } = n.params, i = this.getCommandSheetTarget(n);
6187
- if (!i) return;
6188
- const a = {
6189
- workbook: i.workbook,
6190
- worksheet: i.worksheet,
6191
- newIndex: o,
6192
- oldIndex: s
6197
+ if (n.id === De.id) {
6198
+ const { fromOrder: r, toOrder: s } = n.params, o = this.getCommandSheetTarget(n);
6199
+ if (!o) return;
6200
+ const i = {
6201
+ workbook: o.workbook,
6202
+ worksheet: o.worksheet,
6203
+ newIndex: s,
6204
+ oldIndex: r
6193
6205
  };
6194
- if (this.fireEvent(this.Event.BeforeSheetMove, a), a.cancel)
6206
+ if (this.fireEvent(this.Event.BeforeSheetMove, i), i.cancel)
6195
6207
  throw new f();
6196
6208
  }
6197
6209
  })
6198
6210
  ), this.registerEventHandler(
6199
6211
  this.Event.BeforeSheetNameChange,
6200
6212
  () => t.beforeCommandExecuted((n) => {
6201
- if (n.id === de.id) {
6202
- const { name: s } = n.params, o = this.getCommandSheetTarget(n);
6203
- if (!o) return;
6204
- const i = {
6205
- workbook: o.workbook,
6206
- worksheet: o.worksheet,
6207
- newName: s,
6208
- oldName: o.worksheet.getSheetName()
6213
+ if (n.id === ue.id) {
6214
+ const { name: r } = n.params, s = this.getCommandSheetTarget(n);
6215
+ if (!s) return;
6216
+ const o = {
6217
+ workbook: s.workbook,
6218
+ worksheet: s.worksheet,
6219
+ newName: r,
6220
+ oldName: s.worksheet.getSheetName()
6209
6221
  };
6210
- if (this.fireEvent(this.Event.BeforeSheetNameChange, i), i.cancel)
6222
+ if (this.fireEvent(this.Event.BeforeSheetNameChange, o), o.cancel)
6211
6223
  throw new f();
6212
6224
  }
6213
6225
  })
6214
6226
  ), this.registerEventHandler(
6215
6227
  this.Event.BeforeSheetTabColorChange,
6216
6228
  () => t.beforeCommandExecuted((n) => {
6217
- if (n.id === Ae.id) {
6218
- const { color: s } = n.params, o = this.getCommandSheetTarget(n);
6219
- if (!o) return;
6220
- const i = {
6221
- workbook: o.workbook,
6222
- worksheet: o.worksheet,
6223
- newColor: s,
6224
- oldColor: o.worksheet.getTabColor()
6229
+ if (n.id === We.id) {
6230
+ const { color: r } = n.params, s = this.getCommandSheetTarget(n);
6231
+ if (!s) return;
6232
+ const o = {
6233
+ workbook: s.workbook,
6234
+ worksheet: s.worksheet,
6235
+ newColor: r,
6236
+ oldColor: s.worksheet.getTabColor()
6225
6237
  };
6226
- if (this.fireEvent(this.Event.BeforeSheetTabColorChange, i), i.cancel)
6238
+ if (this.fireEvent(this.Event.BeforeSheetTabColorChange, o), o.cancel)
6227
6239
  throw new f();
6228
6240
  }
6229
6241
  })
6230
6242
  ), this.registerEventHandler(
6231
6243
  this.Event.BeforeSheetHideChange,
6232
6244
  () => t.beforeCommandExecuted((n) => {
6233
- if (n.id === De.id) {
6234
- const { hidden: s } = n.params, o = this.getCommandSheetTarget(n);
6235
- if (!o) return;
6236
- const i = {
6237
- workbook: o.workbook,
6238
- worksheet: o.worksheet,
6239
- hidden: !!s
6245
+ if (n.id === Be.id) {
6246
+ const { hidden: r } = n.params, s = this.getCommandSheetTarget(n);
6247
+ if (!s) return;
6248
+ const o = {
6249
+ workbook: s.workbook,
6250
+ worksheet: s.worksheet,
6251
+ hidden: !!r
6240
6252
  };
6241
- if (this.fireEvent(this.Event.BeforeSheetHideChange, i), i.cancel)
6253
+ if (this.fireEvent(this.Event.BeforeSheetHideChange, o), o.cancel)
6242
6254
  throw new f();
6243
6255
  }
6244
6256
  })
6245
6257
  ), this.registerEventHandler(
6246
6258
  this.Event.BeforeGridlineColorChange,
6247
6259
  () => t.beforeCommandExecuted((n) => {
6248
- var s;
6249
- if (n.id === he.id) {
6250
- const o = this.getCommandSheetTarget(n);
6251
- if (!o) return;
6252
- const i = {
6253
- ...o,
6254
- color: (s = n.params) == null ? void 0 : s.color
6260
+ var r;
6261
+ if (n.id === ce.id) {
6262
+ const s = this.getCommandSheetTarget(n);
6263
+ if (!s) return;
6264
+ const o = {
6265
+ ...s,
6266
+ color: (r = n.params) == null ? void 0 : r.color
6255
6267
  };
6256
- if (this.fireEvent(this.Event.BeforeGridlineColorChange, i), i.cancel)
6268
+ if (this.fireEvent(this.Event.BeforeGridlineColorChange, o), o.cancel)
6257
6269
  throw new f();
6258
6270
  }
6259
6271
  })
6260
6272
  ), this.registerEventHandler(
6261
6273
  this.Event.BeforeGridlineEnableChange,
6262
6274
  () => t.beforeCommandExecuted((n) => {
6263
- var s;
6264
- if (n.id === ae.id) {
6265
- const o = this.getCommandSheetTarget(n);
6266
- if (!o) return;
6267
- const i = {
6268
- ...o,
6269
- enabled: !!((s = n.params) != null && s.showGridlines)
6275
+ var r;
6276
+ if (n.id === de.id) {
6277
+ const s = this.getCommandSheetTarget(n);
6278
+ if (!s) return;
6279
+ const o = {
6280
+ ...s,
6281
+ enabled: !!((r = n.params) != null && r.showGridlines)
6270
6282
  };
6271
- if (this.fireEvent(this.Event.BeforeGridlineEnableChange, i), i.cancel)
6283
+ if (this.fireEvent(this.Event.BeforeGridlineEnableChange, o), o.cancel)
6272
6284
  throw new f();
6273
6285
  }
6274
6286
  })
6275
6287
  ), this.registerEventHandler(
6276
6288
  this.Event.SheetValueChanged,
6277
6289
  () => t.onCommandExecuted((n) => {
6278
- if (Zt.indexOf(n.id) > -1) {
6290
+ if (nn.indexOf(n.id) > -1) {
6279
6291
  if (!this.getActiveSheet()) return;
6280
- const o = en(n).map(
6281
- (i) => {
6282
- var a, h;
6283
- return (h = (a = this.getWorkbook(i.unitId)) == null ? void 0 : a.getSheetBySheetId(i.subUnitId)) == null ? void 0 : h.getRange(i.range);
6292
+ const s = rn(n).map(
6293
+ (o) => {
6294
+ var i, h;
6295
+ return (h = (i = this.getWorkbook(o.unitId)) == null ? void 0 : i.getSheetBySheetId(o.subUnitId)) == null ? void 0 : h.getRange(o.range);
6284
6296
  }
6285
6297
  ).filter(Boolean);
6286
- if (!o.length) return;
6298
+ if (!s.length) return;
6287
6299
  this.fireEvent(this.Event.SheetValueChanged, {
6288
6300
  payload: n,
6289
- effectedRanges: o
6301
+ effectedRanges: s
6290
6302
  });
6291
6303
  }
6292
6304
  })
6293
6305
  ), this.registerEventHandler(
6294
6306
  this.Event.SheetCreated,
6295
6307
  () => t.onCommandExecuted((n) => {
6296
- var s;
6297
- if (n.id === G.id) {
6298
- const o = n.params, { unitId: i } = o || {}, a = i ? this.getUniverSheet(i) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
6299
- if (!a)
6308
+ var r;
6309
+ if (n.id === q.id) {
6310
+ const s = n.params, { unitId: o } = s || {}, i = o ? this.getUniverSheet(o) : (r = this.getActiveWorkbook) == null ? void 0 : r.call(this);
6311
+ if (!i)
6300
6312
  return;
6301
- const h = a.getActiveSheet();
6313
+ const h = i.getActiveSheet();
6302
6314
  if (!h)
6303
6315
  return;
6304
6316
  const d = {
6305
- workbook: a,
6317
+ workbook: i,
6306
6318
  worksheet: h
6307
6319
  };
6308
6320
  this.fireEvent(
@@ -6314,107 +6326,107 @@ class pn extends ze {
6314
6326
  ), this.registerEventHandler(
6315
6327
  this.Event.ActiveSheetChanged,
6316
6328
  () => t.onCommandExecuted((n) => {
6317
- if (n.id === F.id) {
6318
- const s = this.getActiveSheet();
6319
- if (!s) return;
6320
- const { workbook: o, worksheet: i } = s;
6321
- this._fireActiveSheetChanged(o, i);
6329
+ if (n.id === H.id) {
6330
+ const r = this.getActiveSheet();
6331
+ if (!r) return;
6332
+ const { workbook: s, worksheet: o } = r;
6333
+ this._fireActiveSheetChanged(s, o);
6322
6334
  }
6323
6335
  })
6324
6336
  ), this.registerEventHandler(
6325
6337
  this.Event.SheetDeleted,
6326
6338
  () => t.onCommandExecuted((n) => {
6327
- var s;
6328
- if (n.id === ce.id) {
6329
- const { subUnitId: o, unitId: i } = n.params, a = i ? this.getUniverSheet(i) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
6330
- if (!a || !o) return;
6331
- this._fireSheetDeleted(a, o);
6339
+ var r;
6340
+ if (n.id === le.id) {
6341
+ const { subUnitId: s, unitId: o } = n.params, i = o ? this.getUniverSheet(o) : (r = this.getActiveWorkbook) == null ? void 0 : r.call(this);
6342
+ if (!i || !s) return;
6343
+ this._fireSheetDeleted(i, s);
6332
6344
  }
6333
6345
  })
6334
6346
  ), this.registerEventHandler(
6335
6347
  this.Event.SheetMoved,
6336
6348
  () => t.onCommandExecuted((n) => {
6337
- if (n.id === Te.id) {
6338
- const { toOrder: s } = n.params, o = this.getCommandSheetTarget(n);
6339
- if (!o) return;
6340
- this._fireSheetMoved(o.workbook, o.worksheet, s);
6349
+ if (n.id === De.id) {
6350
+ const { toOrder: r } = n.params, s = this.getCommandSheetTarget(n);
6351
+ if (!s) return;
6352
+ this._fireSheetMoved(s.workbook, s.worksheet, r);
6341
6353
  }
6342
6354
  })
6343
6355
  ), this.registerEventHandler(
6344
6356
  this.Event.SheetNameChanged,
6345
6357
  () => t.onCommandExecuted((n) => {
6346
- if (n.id === de.id) {
6347
- const { name: s } = n.params, o = this.getCommandSheetTarget(n);
6348
- if (!o) return;
6349
- this._fireSheetNameChanged(o.workbook, o.worksheet, s);
6358
+ if (n.id === ue.id) {
6359
+ const { name: r } = n.params, s = this.getCommandSheetTarget(n);
6360
+ if (!s) return;
6361
+ this._fireSheetNameChanged(s.workbook, s.worksheet, r);
6350
6362
  }
6351
6363
  })
6352
6364
  ), this.registerEventHandler(
6353
6365
  this.Event.SheetTabColorChanged,
6354
6366
  () => t.onCommandExecuted((n) => {
6355
- if (n.id === Ae.id) {
6356
- const { color: s } = n.params, o = this.getCommandSheetTarget(n);
6357
- if (!o) return;
6358
- this._fireSheetTabColorChanged(o.workbook, o.worksheet, s);
6367
+ if (n.id === We.id) {
6368
+ const { color: r } = n.params, s = this.getCommandSheetTarget(n);
6369
+ if (!s) return;
6370
+ this._fireSheetTabColorChanged(s.workbook, s.worksheet, r);
6359
6371
  }
6360
6372
  })
6361
6373
  ), this.registerEventHandler(
6362
6374
  this.Event.SheetHideChanged,
6363
6375
  () => t.onCommandExecuted((n) => {
6364
- if (n.id === De.id) {
6365
- const { hidden: s } = n.params, o = this.getCommandSheetTarget(n);
6366
- if (!o) return;
6367
- this._fireSheetHideChanged(o.workbook, o.worksheet, !!s);
6376
+ if (n.id === Be.id) {
6377
+ const { hidden: r } = n.params, s = this.getCommandSheetTarget(n);
6378
+ if (!s) return;
6379
+ this._fireSheetHideChanged(s.workbook, s.worksheet, !!r);
6368
6380
  }
6369
6381
  })
6370
6382
  ), this.registerEventHandler(
6371
6383
  this.Event.GridlineChanged,
6372
6384
  () => t.onCommandExecuted((n) => {
6373
- if (n.id === he.id || n.id === ae.id) {
6374
- const s = this.getCommandSheetTarget(n);
6375
- if (!s) return;
6385
+ if (n.id === ce.id || n.id === de.id) {
6386
+ const r = this.getCommandSheetTarget(n);
6387
+ if (!r) return;
6376
6388
  this.fireEvent(this.Event.GridlineChanged, {
6377
- ...s,
6378
- enabled: !s.worksheet.hasHiddenGridLines(),
6379
- color: s.worksheet.getGridLinesColor()
6389
+ ...r,
6390
+ enabled: !r.worksheet.hasHiddenGridLines(),
6391
+ color: r.worksheet.getGridLinesColor()
6380
6392
  });
6381
6393
  }
6382
6394
  })
6383
6395
  ), this._initWorkbookEvent(e);
6384
6396
  }
6385
6397
  createUniverSheet(e, t) {
6386
- const s = this._injector.get(se).createUnit(U.UNIVER_SHEET, e, t);
6387
- return this._injector.createInstance(C, s);
6398
+ const r = this._injector.get(ie).createUnit(P.UNIVER_SHEET, e, t);
6399
+ return this._injector.createInstance(C, r);
6388
6400
  }
6389
6401
  createWorkbook(e, t) {
6390
6402
  return this.createUniverSheet(e, t);
6391
6403
  }
6392
6404
  getActiveWorkbook() {
6393
- const e = this._univerInstanceService.getCurrentUnitForType(U.UNIVER_SHEET);
6405
+ const e = this._univerInstanceService.getCurrentUnitForType(P.UNIVER_SHEET);
6394
6406
  return e ? this._injector.createInstance(C, e) : null;
6395
6407
  }
6396
6408
  getActiveUniverSheet() {
6397
6409
  return this.getActiveWorkbook();
6398
6410
  }
6399
6411
  getUniverSheet(e) {
6400
- const t = this._univerInstanceService.getUnit(e, U.UNIVER_SHEET);
6412
+ const t = this._univerInstanceService.getUnit(e, P.UNIVER_SHEET);
6401
6413
  return t ? this._injector.createInstance(C, t) : null;
6402
6414
  }
6403
6415
  getWorkbook(e) {
6404
6416
  return this.getUniverSheet(e);
6405
6417
  }
6406
6418
  getPermission() {
6407
- return this._injector.createInstance(q);
6419
+ return this._injector.createInstance(Y);
6408
6420
  }
6409
6421
  onUniverSheetCreated(e) {
6410
- const t = this._univerInstanceService.getTypeOfUnitAdded$(U.UNIVER_SHEET).subscribe((n) => {
6411
- const s = this._injector.createInstance(C, n);
6412
- e(s);
6422
+ const t = this._univerInstanceService.getTypeOfUnitAdded$(P.UNIVER_SHEET).subscribe((n) => {
6423
+ const r = this._injector.createInstance(C, n);
6424
+ e(r);
6413
6425
  });
6414
- return Le(t);
6426
+ return Ge(t);
6415
6427
  }
6416
6428
  newDefinedName() {
6417
- return this._injector.createInstance(Y);
6429
+ return this._injector.createInstance(Q);
6418
6430
  }
6419
6431
  getActiveSheet() {
6420
6432
  const e = this.getActiveWorkbook();
@@ -6424,7 +6436,7 @@ class pn extends ze {
6424
6436
  return t ? { workbook: e, worksheet: t } : null;
6425
6437
  }
6426
6438
  setFreezeSync(e) {
6427
- this._injector.get(tn).setEnabled(e);
6439
+ this._injector.get(sn).setEnabled(e);
6428
6440
  }
6429
6441
  _fireActiveSheetChanged(e, t) {
6430
6442
  this.fireEvent(this.Event.ActiveSheetChanged, {
@@ -6467,20 +6479,20 @@ class pn extends ze {
6467
6479
  });
6468
6480
  }
6469
6481
  }
6470
- ze.extend(pn);
6471
- class En {
6482
+ $e.extend(Un);
6483
+ class Pn {
6472
6484
  get SheetValueChangeType() {
6473
- return nn;
6485
+ return on;
6474
6486
  }
6475
6487
  get SheetSkeletonChangeType() {
6476
- return rn;
6488
+ return an;
6477
6489
  }
6478
6490
  get SplitDelimiterType() {
6479
- return sn;
6491
+ return hn;
6480
6492
  }
6481
6493
  }
6482
- at.extend(En);
6483
- class yn {
6494
+ dt.extend(Pn);
6495
+ class xn {
6484
6496
  get SheetCreated() {
6485
6497
  return "SheetCreated";
6486
6498
  }
@@ -6542,27 +6554,27 @@ class yn {
6542
6554
  return "SheetValueChanged";
6543
6555
  }
6544
6556
  }
6545
- ht.extend(yn);
6546
- var Un = Object.getOwnPropertyDescriptor, Pn = (r, e, t, n) => {
6547
- for (var s = n > 1 ? void 0 : n ? Un(e, t) : e, o = r.length - 1, i; o >= 0; o--)
6548
- (i = r[o]) && (s = i(s) || s);
6549
- return s;
6550
- }, xn = (r, e) => (t, n) => e(t, n, r);
6551
- let Fe = class extends le {
6552
- constructor(r) {
6553
- super(), this._injector = r;
6557
+ ct.extend(xn);
6558
+ var Mn = Object.getOwnPropertyDescriptor, Nn = (a, e, t, n) => {
6559
+ for (var r = n > 1 ? void 0 : n ? Mn(e, t) : e, s = a.length - 1, o; s >= 0; s--)
6560
+ (o = a[s]) && (r = o(r) || r);
6561
+ return r;
6562
+ }, Tn = (a, e) => (t, n) => e(t, n, a);
6563
+ let He = class extends me {
6564
+ constructor(a) {
6565
+ super(), this._injector = a;
6554
6566
  }
6555
6567
  };
6556
- Fe = Pn([
6557
- xn(0, l(x))
6558
- ], Fe);
6568
+ He = Nn([
6569
+ Tn(0, g(M))
6570
+ ], He);
6559
6571
  export {
6560
- q as FPermission,
6561
- _ as FRange,
6562
- K as FSelection,
6563
- yn as FSheetEventName,
6564
- Fe as FSheetHooks,
6565
- En as FSheetsEnum,
6572
+ Y as FPermission,
6573
+ k as FRange,
6574
+ J as FSelection,
6575
+ xn as FSheetEventName,
6576
+ He as FSheetHooks,
6577
+ Pn as FSheetsEnum,
6566
6578
  C as FWorkbook,
6567
6579
  S as FWorksheet
6568
6580
  };