@univerjs/sheets 0.10.9 → 0.10.10

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/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var mi = Object.defineProperty;
2
2
  var fi = (n, e, t) => e in n ? mi(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var R = (n, e, t) => fi(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { CellValueType as re, isTextFormat as ho, isRealNum as To, isBooleanString as Us, willLoseNumericPrecision as Ri, CommandType as v, IUniverInstanceService as M, Tools as A, createInterceptorKey as ht, Disposable as le, UniverInstanceType as j, InterceptorEffectEnum as he, InterceptorManager as Po, toDisposable as Ee, remove as Be, composeInterceptors as Ci, DisposableCollection as Zt, BooleanNumber as te, HorizontalAlign as Oo, BorderStyleTypes as ks, Inject as W, IResourceManagerService as fn, RTree as pi, generateRandomId as yt, insertMatrixArray as kn, ObjectMatrix as q, Rectangle as O, moveMatrixArray as Ts, sliceMatrixArray as Ps, concatMatrixArray as Os, spliceArray as Ns, Range as X, normalizeTextRuns as Si, isSafeNumeric as wi, RANGE_TYPE as B, createRowColIter as Ii, ICommandService as E, IUndoRedoService as V, RxDisposable as Ds, sequenceExecute as L, selectionToArray as vi, createIdentifier as No, IContextService as As, ErrorService as xt, LocaleService as tt, cellToRange as xs, PermissionStatus as Y, IPermissionService as Ye, isICellData as Ws, mapObjectMatrix as Mi, Dimension as Re, getArrayLength as $s, Direction as pe, Injector as no, queryObjectMatrix as nt, CellModeEnum as _i, mergeWorksheetSnapshotWithDefault as yi, BorderType as de, FontWeight as bi, FontItalic as Ei, ILogService as Vs, DocumentDataModel as Ui, BuildTextUtils as ki, TextX as Ti, CustomCommandExecutionError as Pi, IAuthzIoService as Oi, UserManagerService as Ni, LRUMap as Di, IConfigService as Ls, Optional as Ai, isDefaultFormat as xi, DependentOn as Wi, Plugin as $i, merge as Vi, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE as Li, AUTO_HEIGHT_FOR_MERGED_CELLS as Hi, registerDependencies as Fi, mergeOverrideWithDependencies as Bi, touchDependencies as In } from "@univerjs/core";
5
- import { Subject as ke, BehaviorSubject as ut, merge as Ft, shareReplay as ji, takeUntil as vo, switchMap as Xe, of as Vt, distinctUntilChanged as Gi, skip as Hs, map as Mo, first as zi, filter as es } from "rxjs";
6
- import { SetDefinedNameMutation as Qt, RemoveDefinedNameMutation as Tn, SetDefinedNameMutationFactory as Ki, IDefinedNamesService as Fs, LexerTreeBuilder as Ji, operatorToken as Yi, deserializeRangeWithSheet as qi, sequenceNodeType as Xi, deserializeRangeWithSheetWithCache as Zi, SetFormulaCalculationResultMutation as Qi, handleNumfmtInCell as ea, stripErrorMargin as ta, UniverFormulaEnginePlugin as na } from "@univerjs/engine-formula";
4
+ import { CellValueType as re, isTextFormat as go, isRealNum as To, isBooleanString as Us, willLoseNumericPrecision as Ri, CommandType as v, IUniverInstanceService as M, Tools as A, createInterceptorKey as ht, Disposable as le, UniverInstanceType as B, InterceptorEffectEnum as he, InterceptorManager as Po, toDisposable as Ee, remove as Be, composeInterceptors as Ci, DisposableCollection as Zt, BooleanNumber as te, HorizontalAlign as Oo, BorderStyleTypes as ks, Inject as $, IResourceManagerService as fn, RTree as pi, generateRandomId as yt, insertMatrixArray as Tn, ObjectMatrix as q, Rectangle as O, moveMatrixArray as Ts, sliceMatrixArray as Ps, concatMatrixArray as Os, spliceArray as Ns, Range as X, normalizeTextRuns as Si, isSafeNumeric as wi, RANGE_TYPE as j, createRowColIter as Ii, ICommandService as E, IUndoRedoService as V, RxDisposable as Ds, sequenceExecute as L, selectionToArray as vi, createIdentifier as No, IContextService as As, ErrorService as xt, LocaleService as tt, cellToRange as xs, PermissionStatus as Y, IPermissionService as Ye, isICellData as $s, mapObjectMatrix as Mi, Dimension as Re, getArrayLength as Ws, Direction as pe, Injector as oo, queryObjectMatrix as nt, CellModeEnum as _i, mergeWorksheetSnapshotWithDefault as yi, BorderType as de, FontWeight as bi, FontItalic as Ei, ILogService as Vs, DocumentDataModel as Ui, BuildTextUtils as ki, TextX as Ti, CustomCommandExecutionError as Pi, IAuthzIoService as Oi, UserManagerService as Ni, LRUMap as Di, IConfigService as Ls, Optional as Ai, isDefaultFormat as xi, DependentOn as $i, Plugin as Wi, merge as Vi, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE as Li, AUTO_HEIGHT_FOR_MERGED_CELLS as Hi, registerDependencies as Fi, mergeOverrideWithDependencies as Bi, touchDependencies as In } from "@univerjs/core";
5
+ import { Subject as ke, BehaviorSubject as ut, merge as Ft, shareReplay as ji, takeUntil as bn, switchMap as Xe, of as Vt, distinctUntilChanged as Gi, skip as Hs, map as Mo, first as zi, filter as es } from "rxjs";
6
+ import { SetDefinedNameMutation as Qt, RemoveDefinedNameMutation as Pn, SetDefinedNameMutationFactory as Ki, IDefinedNamesService as Fs, LexerTreeBuilder as Ji, operatorToken as Yi, deserializeRangeWithSheet as qi, sequenceNodeType as Xi, deserializeRangeWithSheetWithCache as Zi, SetFormulaCalculationResultMutation as Qi, handleNumfmtInCell as ea, stripErrorMargin as ta, UniverFormulaEnginePlugin as na } from "@univerjs/engine-formula";
7
7
  import { takeUntil as ts, filter as ns, map as oa } from "rxjs/operators";
8
8
  import { DataSyncPrimaryController as sa } from "@univerjs/rpc";
9
9
  function ra(n, e, t) {
@@ -12,7 +12,7 @@ function ra(n, e, t) {
12
12
  if (e.v === null) return null;
13
13
  const o = n.getStyleByCell(e), s = n.getStyleByCell(t);
14
14
  if (t.t === re.FORCE_STRING) {
15
- if (!ho((r = s == null ? void 0 : s.n) == null ? void 0 : r.pattern) && e.v !== void 0) {
15
+ if (!go((r = s == null ? void 0 : s.n) == null ? void 0 : r.pattern) && e.v !== void 0) {
16
16
  if (To(e.v))
17
17
  return re.NUMBER;
18
18
  if (Us(`${e.v}`))
@@ -20,7 +20,7 @@ function ra(n, e, t) {
20
20
  }
21
21
  return re.FORCE_STRING;
22
22
  }
23
- return ia(o) ? ho((i = o == null ? void 0 : o.n) == null ? void 0 : i.pattern) ? re.STRING : os(e, t) : ho((a = s == null ? void 0 : s.n) == null ? void 0 : a.pattern) ? re.STRING : os(e, t);
23
+ return ia(o) ? go((i = o == null ? void 0 : o.n) == null ? void 0 : i.pattern) ? re.STRING : os(e, t) : go((a = s == null ? void 0 : s.n) == null ? void 0 : a.pattern) ? re.STRING : os(e, t);
24
24
  }
25
25
  function os(n, e) {
26
26
  return n.v !== void 0 ? ss(n.v, n.t) : ss(e.v, e.t);
@@ -65,7 +65,7 @@ var ca = Object.getOwnPropertyDescriptor, da = (n, e, t, o) => {
65
65
  (i = n[r]) && (s = i(s) || s);
66
66
  return s;
67
67
  }, ha = (n, e) => (t, o) => e(t, o, n);
68
- const is = ht("BEFORE_CELL_EDIT"), go = ht("AFTER_CELL_EDIT"), mo = ht("VALIDATE_CELL");
68
+ const is = ht("BEFORE_CELL_EDIT"), mo = ht("AFTER_CELL_EDIT"), fo = ht("VALIDATE_CELL");
69
69
  let z = class extends le {
70
70
  /** @ignore */
71
71
  constructor(e) {
@@ -82,24 +82,24 @@ let z = class extends le {
82
82
  R(this, "_composedInterceptorByKey", /* @__PURE__ */ new Map());
83
83
  R(this, "writeCellInterceptor", new Po({
84
84
  BEFORE_CELL_EDIT: is,
85
- AFTER_CELL_EDIT: go,
86
- VALIDATE_CELL: mo
85
+ AFTER_CELL_EDIT: mo,
86
+ VALIDATE_CELL: fo
87
87
  }));
88
- this._univerInstanceService = e, this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(j.UNIVER_SHEET).subscribe((t) => {
88
+ this._univerInstanceService = e, this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(B.UNIVER_SHEET).subscribe((t) => {
89
89
  this._interceptWorkbook(t);
90
- })), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(j.UNIVER_SHEET).subscribe(
90
+ })), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(B.UNIVER_SHEET).subscribe(
91
91
  (t) => this._disposeWorkbookInterceptor(t)
92
92
  )), this.intercept(at.CELL_CONTENT, {
93
93
  priority: -1,
94
94
  effect: he.Style | he.Value,
95
95
  handler: (t) => t
96
- }), this.disposeWithMe(this.writeCellInterceptor.intercept(go, {
96
+ }), this.disposeWithMe(this.writeCellInterceptor.intercept(mo, {
97
97
  priority: -1,
98
98
  handler: (t) => t
99
99
  })), this.disposeWithMe(this.writeCellInterceptor.intercept(is, {
100
100
  priority: -1,
101
101
  handler: (t) => t
102
- })), this.disposeWithMe(this.writeCellInterceptor.intercept(mo, {
102
+ })), this.disposeWithMe(this.writeCellInterceptor.intercept(fo, {
103
103
  priority: -1,
104
104
  handler: (t) => t
105
105
  }));
@@ -249,7 +249,7 @@ let z = class extends le {
249
249
  col: s,
250
250
  origin: A.deepClone(r)
251
251
  };
252
- return this.writeCellInterceptor.fetchThroughInterceptors(go)(r, i);
252
+ return this.writeCellInterceptor.fetchThroughInterceptors(mo)(r, i);
253
253
  }
254
254
  // #endregion
255
255
  onValidateCell(e, t, o, s) {
@@ -261,7 +261,7 @@ let z = class extends le {
261
261
  row: o,
262
262
  col: s
263
263
  };
264
- return this.writeCellInterceptor.fetchThroughInterceptors(mo)(Promise.resolve(!0), r);
264
+ return this.writeCellInterceptor.fetchThroughInterceptors(fo)(Promise.resolve(!0), r);
265
265
  }
266
266
  intercept(e, t) {
267
267
  const o = e;
@@ -838,7 +838,7 @@ var Ea = Object.getOwnPropertyDescriptor, Ua = (n, e, t, o) => {
838
838
  for (var s = o > 1 ? void 0 : o ? Ea(e, t) : e, r = n.length - 1, i; r >= 0; r--)
839
839
  (i = n[r]) && (s = i(s) || s);
840
840
  return s;
841
- }, fo = (n, e) => (t, o) => e(t, o, n);
841
+ }, Ro = (n, e) => (t, o) => e(t, o, n);
842
842
  const ka = "SHEET_RANGE_THEME_MODEL_PLUGIN";
843
843
  let Ie = class extends le {
844
844
  constructor(e, t, o) {
@@ -1049,7 +1049,7 @@ let Ie = class extends le {
1049
1049
  return {};
1050
1050
  }
1051
1051
  },
1052
- businesses: [j.UNIVER_SHEET],
1052
+ businesses: [B.UNIVER_SHEET],
1053
1053
  pluginName: ka,
1054
1054
  onLoad: (e, t) => {
1055
1055
  this.fromJSON(e, t);
@@ -1064,19 +1064,19 @@ let Ie = class extends le {
1064
1064
  }
1065
1065
  };
1066
1066
  Ie = Ua([
1067
- fo(0, W(z)),
1068
- fo(1, W(fn)),
1069
- fo(2, W(M))
1067
+ Ro(0, $(z)),
1068
+ Ro(1, $(fn)),
1069
+ Ro(2, $(M))
1070
1070
  ], Ie);
1071
1071
  function Gs(n, e) {
1072
- const { unitId: t } = e, o = t ? n.getUnit(t, j.UNIVER_SHEET) : n.getCurrentUnitOfType(j.UNIVER_SHEET);
1072
+ const { unitId: t } = e, o = t ? n.getUnit(t, B.UNIVER_SHEET) : n.getCurrentUnitOfType(B.UNIVER_SHEET);
1073
1073
  return o ? {
1074
1074
  workbook: o,
1075
1075
  unitId: o.getUnitId()
1076
1076
  } : null;
1077
1077
  }
1078
1078
  function P(n, e = {}) {
1079
- const { unitId: t, subUnitId: o } = e, s = t ? n.getUnit(t, j.UNIVER_SHEET) : n.getCurrentUnitOfType(j.UNIVER_SHEET);
1079
+ const { unitId: t, subUnitId: o } = e, s = t ? n.getUnit(t, B.UNIVER_SHEET) : n.getCurrentUnitOfType(B.UNIVER_SHEET);
1080
1080
  if (!s) return null;
1081
1081
  const r = o ? s.getSheetBySheetId(o) : s.getActiveSheet(!0);
1082
1082
  return r ? {
@@ -1087,7 +1087,7 @@ function P(n, e = {}) {
1087
1087
  } : null;
1088
1088
  }
1089
1089
  function qe(n, e) {
1090
- const { unitId: t, subUnitId: o } = e, s = n.getUnit(t, j.UNIVER_SHEET);
1090
+ const { unitId: t, subUnitId: o } = e, s = n.getUnit(t, B.UNIVER_SHEET);
1091
1091
  if (!s) return null;
1092
1092
  const r = s.getSheetBySheetId(o);
1093
1093
  return r ? {
@@ -1155,10 +1155,10 @@ const en = {
1155
1155
  hd: 0
1156
1156
  }, d = s.startRow, h = s.endRow - s.startRow + 1;
1157
1157
  for (let f = d; f < d + h; f++)
1158
- r ? kn(f, (m = r[f - s.startRow]) != null ? m : c, l) : kn(f, c, l);
1158
+ r ? Tn(f, (m = r[f - s.startRow]) != null ? m : c, l) : Tn(f, c, l);
1159
1159
  return u.setRowCount(u.getRowCount() + h), u.getCellMatrix().insertRows(s.startRow, h), !0;
1160
1160
  }
1161
- }, oo = (n, e) => {
1161
+ }, so = (n, e) => {
1162
1162
  if (n.get(M).getUniverSheetInstance(e.unitId) == null)
1163
1163
  throw new Error("universheet is null error!");
1164
1164
  return {
@@ -1182,7 +1182,7 @@ const en = {
1182
1182
  w: h,
1183
1183
  hd: 0
1184
1184
  };
1185
- a ? kn(f, (m = a[f - i.startColumn]) != null ? m : C, l) : kn(f, C, l);
1185
+ a ? Tn(f, (m = a[f - i.startColumn]) != null ? m : C, l) : Tn(f, C, l);
1186
1186
  }
1187
1187
  return s.setColumnCount(s.getColumnCount() + i.endColumn - i.startColumn + 1), s.getCellMatrix().insertColumns(i.startColumn, d), !0;
1188
1188
  }
@@ -1193,7 +1193,7 @@ const en = {
1193
1193
  const { from: t, to: o } = e;
1194
1194
  if (!t || !o)
1195
1195
  return !1;
1196
- const r = n.get(M).getCurrentUnitForType(j.UNIVER_SHEET);
1196
+ const r = n.get(M).getCurrentUnitForType(B.UNIVER_SHEET);
1197
1197
  if (!r)
1198
1198
  return !1;
1199
1199
  const i = r.getSheetBySheetId(e.from.subUnitId), a = r.getSheetBySheetId(e.to.subUnitId);
@@ -1370,7 +1370,7 @@ const dt = {
1370
1370
  ...n,
1371
1371
  order: t
1372
1372
  };
1373
- }, Pn = {
1373
+ }, On = {
1374
1374
  id: "sheet.mutation.reorder-range",
1375
1375
  type: v.MUTATION,
1376
1376
  handler: (n, e) => {
@@ -1390,7 +1390,7 @@ const dt = {
1390
1390
  }), !0;
1391
1391
  }
1392
1392
  };
1393
- function Wa(n, e) {
1393
+ function $a(n, e) {
1394
1394
  if (n == null)
1395
1395
  return n;
1396
1396
  const t = A.deepClone(n);
@@ -1399,7 +1399,7 @@ function Wa(n, e) {
1399
1399
  const o = {};
1400
1400
  return "h" in e && (o.h = t.h), "ia" in e && (o.ia = t.ia), "ah" in e && (o.ah = t.ah), "hd" in e && (o.hd = t.hd), "s" in e && (o.s = t.s), "custom" in e && (o.custom = t.custom), o;
1401
1401
  }
1402
- function $a(n, e) {
1402
+ function Wa(n, e) {
1403
1403
  if (n == null)
1404
1404
  return n;
1405
1405
  const t = A.deepClone(n);
@@ -1412,7 +1412,7 @@ const Va = (n, e) => {
1412
1412
  const { unitId: t, subUnitId: o, columnData: s } = n, r = {}, i = e.getColumnManager();
1413
1413
  for (const a in s) {
1414
1414
  const u = s[a], l = i.getColumn(Number(a));
1415
- r[a] = $a(l, u);
1415
+ r[a] = Wa(l, u);
1416
1416
  }
1417
1417
  return {
1418
1418
  unitId: t,
@@ -1501,7 +1501,7 @@ function Fa(n, e, t) {
1501
1501
  var i;
1502
1502
  const o = n.getStyleByCell(e);
1503
1503
  o == null && delete e.s, typeof t.s == "string" && (t.s = n.get(t.s));
1504
- const s = bn(o, t.s ? t.s : null);
1504
+ const s = En(o, t.s ? t.s : null);
1505
1505
  s && (A.removeNull(s), Object.entries(s).forEach(([a, u]) => {
1506
1506
  typeof u == "object" && u !== null && Object.keys(u).length === 0 && delete s[a];
1507
1507
  })), A.isEmptyObject(s) ? delete e.s : e.s = n.setValue(s);
@@ -1524,7 +1524,7 @@ function ja(n, e) {
1524
1524
  t in n || (n[t] = null);
1525
1525
  return n;
1526
1526
  }
1527
- function bn(n, e, t = !1) {
1527
+ function En(n, e, t = !1) {
1528
1528
  if (e === null) return e;
1529
1529
  if (e === void 0) return n;
1530
1530
  const o = A.deepClone(n) || {};
@@ -1548,10 +1548,10 @@ function Ga(n, e) {
1548
1548
  const h = {
1549
1549
  st: t,
1550
1550
  ed: u
1551
- }, g = bn({}, e, !0);
1551
+ }, g = En({}, e, !0);
1552
1552
  g && A.removeNull(g), A.isEmptyObject(g) || (h.ts = g), o.push(h);
1553
1553
  }
1554
- const d = bn(c, e, !0);
1554
+ const d = En(c, e, !0);
1555
1555
  d && A.removeNull(d), A.isEmptyObject(d) ? delete a.ts : a.ts = d, o.push(a), t = zs(s, l);
1556
1556
  }
1557
1557
  const r = n.body.dataStream.endsWith(`\r
@@ -1560,7 +1560,7 @@ function Ga(n, e) {
1560
1560
  const a = {
1561
1561
  st: t,
1562
1562
  ed: r
1563
- }, u = bn({}, e, !0);
1563
+ }, u = En({}, e, !0);
1564
1564
  u && A.removeNull(u), A.isEmptyObject(u) || (a.ts = u), o.push(a);
1565
1565
  }
1566
1566
  n.body.textRuns = Si(o);
@@ -1646,7 +1646,7 @@ const Xa = (n, e) => {
1646
1646
  const { unitId: t, subUnitId: o, rowData: s } = n, r = {}, i = e.getRowManager();
1647
1647
  for (const a in s) {
1648
1648
  const u = s[a], l = i.getRow(Number(a));
1649
- r[a] = Wa(l, u);
1649
+ r[a] = $a(l, u);
1650
1650
  }
1651
1651
  return {
1652
1652
  unitId: t,
@@ -1850,7 +1850,7 @@ const Xa = (n, e) => {
1850
1850
  typeof o == "number" ? a.setRowHeight(c, o) : A.isDefine(o[c]) && a.setRowHeight(c, o[c]);
1851
1851
  return !0;
1852
1852
  }
1853
- }, $e = {
1853
+ }, We = {
1854
1854
  id: "sheet.mutation.set-worksheet-row-is-auto-height",
1855
1855
  type: v.MUTATION,
1856
1856
  handler: (n, e) => {
@@ -1903,7 +1903,7 @@ const Xa = (n, e) => {
1903
1903
  var ou = /* @__PURE__ */ ((n) => (n.SET_WORKSHEET_ROW_HEIGHT = "sheet.mutation.set-worksheet-row-height", n.SET_WORKSHEET_ROW_IS_AUTO_HEIGHT = "sheet.mutation.set-worksheet-row-is-auto-height", n.SET_WORKSHEET_ROW_AUTO_HEIGHT = "sheet.mutation.set-worksheet-row-auto-height", n.SET_WORKSHEET_COL_WIDTH = "sheet.mutation.set-worksheet-col-width", n.SET_WORKSHEET_ACTIVE = "sheet.operation.set-worksheet-active", n.MOVE_ROWS = "sheet.mutation.move-rows", n.MOVE_COLUMNS = "sheet.mutation.move-columns", n.SET_COL_HIDDEN = "sheet.mutation.set-col-hidden", n.SET_COL_VISIBLE = "sheet.mutation.set-col-visible", n.SET_ROW_HIDDEN = "sheet.mutation.set-row-hidden", n.SET_ROW_VISIBLE = "sheet.mutation.set-row-visible", n.INSERT_COL = "sheet.mutation.insert-col", n.INSERT_ROW = "sheet.mutation.insert-row", n.REMOVE_COL = "sheet.mutation.remove-col", n.REMOVE_ROW = "sheet.mutation.remove-rows", n.TOGGLE_GRIDLINES = "sheet.mutation.toggle-gridlines", n.SET_GRIDLINES_COLOR = "sheet.mutation.set-gridlines-color", n))(ou || {}), su = /* @__PURE__ */ ((n) => (n.SET_RANGE_VALUES = "sheet.mutation.set-range-values", n.MOVE_RANGE = "sheet.mutation.move-range", n.REMOVE_WORKSHEET_MERGE = "sheet.mutation.remove-worksheet-merge", n.ADD_WORKSHEET_MERGE = "sheet.mutation.add-worksheet-merge", n.REORDER_RANGE = "sheet.mutation.reorder-range", n.SET_WORKSHEET_DEFAULT_STYLE = "sheet.mutation.set-worksheet-default-style", n.SET_ROW_DATA = "sheet.mutation.set-row-data", n.SET_COL_DATA = "sheet.mutation.set-col-data", n.SET_WORKSHEET_RANGE_THEME_STYLE = "sheet.mutation.set-worksheet-range-theme-style", n.DELETE_WORKSHEET_RANGE_THEME_STYLE = "sheet.mutation.delete-worksheet-range-theme-style", n))(su || {});
1904
1904
  const uh = [
1905
1905
  Ze.id,
1906
- $e.id,
1906
+ We.id,
1907
1907
  Ys.id,
1908
1908
  lt.id,
1909
1909
  Rn.id,
@@ -1926,7 +1926,7 @@ const uh = [
1926
1926
  pt.id,
1927
1927
  oe.id,
1928
1928
  ne.id,
1929
- Pn.id,
1929
+ On.id,
1930
1930
  Kt.id,
1931
1931
  Gt.id,
1932
1932
  Bt.id,
@@ -2036,7 +2036,7 @@ function dh(n, e) {
2036
2036
  subUnitId: t.subUnitId,
2037
2037
  range: {
2038
2038
  ...o,
2039
- rangeType: B.ROW
2039
+ rangeType: j.ROW
2040
2040
  }
2041
2041
  }));
2042
2042
  }
@@ -2051,7 +2051,7 @@ function dh(n, e) {
2051
2051
  endRow: o.row,
2052
2052
  startColumn: 0,
2053
2053
  endColumn: e - 1,
2054
- rangeType: B.ROW
2054
+ rangeType: j.ROW
2055
2055
  }
2056
2056
  }));
2057
2057
  }
@@ -2062,7 +2062,7 @@ function dh(n, e) {
2062
2062
  subUnitId: t.subUnitId,
2063
2063
  range: {
2064
2064
  ...o,
2065
- rangeType: B.COLUMN
2065
+ rangeType: j.COLUMN
2066
2066
  }
2067
2067
  }));
2068
2068
  }
@@ -2087,7 +2087,7 @@ function dh(n, e) {
2087
2087
  subUnitId: t.subUnitId,
2088
2088
  range: {
2089
2089
  ...o,
2090
- rangeType: B.COLUMN
2090
+ rangeType: j.COLUMN
2091
2091
  }
2092
2092
  }));
2093
2093
  }
@@ -2099,7 +2099,7 @@ function dh(n, e) {
2099
2099
  subUnitId: t.subUnitId,
2100
2100
  range: {
2101
2101
  ...o,
2102
- rangeType: B.ROW
2102
+ rangeType: j.ROW
2103
2103
  }
2104
2104
  }));
2105
2105
  }
@@ -2110,7 +2110,7 @@ function dh(n, e) {
2110
2110
  subUnitId: t.subUnitId,
2111
2111
  range: {
2112
2112
  ...t.range,
2113
- rangeType: B.COLUMN
2113
+ rangeType: j.COLUMN
2114
2114
  }
2115
2115
  }];
2116
2116
  }
@@ -2121,7 +2121,7 @@ function dh(n, e) {
2121
2121
  subUnitId: t.subUnitId,
2122
2122
  range: {
2123
2123
  ...t.range,
2124
- rangeType: B.ROW
2124
+ rangeType: j.ROW
2125
2125
  }
2126
2126
  }];
2127
2127
  }
@@ -2132,7 +2132,7 @@ function dh(n, e) {
2132
2132
  subUnitId: t.subUnitId,
2133
2133
  range: {
2134
2134
  ...t.range,
2135
- rangeType: B.COLUMN
2135
+ rangeType: j.COLUMN
2136
2136
  }
2137
2137
  }];
2138
2138
  }
@@ -2143,7 +2143,7 @@ function dh(n, e) {
2143
2143
  subUnitId: t.subUnitId,
2144
2144
  range: {
2145
2145
  ...t.range,
2146
- rangeType: B.ROW
2146
+ rangeType: j.ROW
2147
2147
  }
2148
2148
  }];
2149
2149
  }
@@ -2157,7 +2157,7 @@ function dh(n, e) {
2157
2157
  function ls(n) {
2158
2158
  return n == null ? !1 : n.v !== void 0 && n.v !== null && n.v !== "" || n.p !== void 0;
2159
2159
  }
2160
- function so(n, e) {
2160
+ function ro(n, e) {
2161
2161
  return n && n.spanAnchor ? ls(e.getValue(n.spanAnchor.startRow, n.spanAnchor.startColumn)) : ls(n);
2162
2162
  }
2163
2163
  function ru(n, e, t, o, s) {
@@ -2182,7 +2182,7 @@ function iu(n, e, t, o) {
2182
2182
  let a = null, u = !1;
2183
2183
  for (let l = s; l <= i; l++) {
2184
2184
  const c = e.getValue(l, r - t);
2185
- if (u = u || so(c, e), !o && u)
2185
+ if (u = u || ro(c, e), !o && u)
2186
2186
  break;
2187
2187
  c && c.spanAnchor && (a ? a = {
2188
2188
  startRow: Math.min(c.spanAnchor.startRow, a.startRow),
@@ -2211,7 +2211,7 @@ function au(n, e, t, o) {
2211
2211
  let a = null, u = !1;
2212
2212
  for (let l = s; l <= i; l++) {
2213
2213
  const c = e.getValue(l, r + t);
2214
- if (u = u || so(c, e), !o && u)
2214
+ if (u = u || ro(c, e), !o && u)
2215
2215
  break;
2216
2216
  c && c.spanAnchor && (a ? a = {
2217
2217
  startRow: Math.min(c.spanAnchor.startRow, a.startRow),
@@ -2240,7 +2240,7 @@ function uu(n, e, t, o) {
2240
2240
  let a = null, u = !1;
2241
2241
  for (let l = r; l <= i; l++) {
2242
2242
  const c = e.getValue(s - t, l);
2243
- if (u = u || so(c, e), !o && u)
2243
+ if (u = u || ro(c, e), !o && u)
2244
2244
  break;
2245
2245
  c && c.spanAnchor && (a ? a = {
2246
2246
  startRow: Math.min(c.spanAnchor.startRow, a.startRow),
@@ -2269,7 +2269,7 @@ function lu(n, e, t, o) {
2269
2269
  let a = null, u = !1;
2270
2270
  for (let l = s; l <= r; l++) {
2271
2271
  const c = e.getValue(i + t, l);
2272
- if (u = u || so(c, e), !o && u)
2272
+ if (u = u || ro(c, e), !o && u)
2273
2273
  break;
2274
2274
  c && c.spanAnchor && (a ? a = {
2275
2275
  startRow: Math.min(c.spanAnchor.startRow, a.startRow),
@@ -2592,7 +2592,7 @@ function yu(n) {
2592
2592
  }), e.clone();
2593
2593
  }
2594
2594
  function bu(n, e, t, o) {
2595
- const s = e.get(M), r = t ? s.getUnit(t, j.UNIVER_SHEET) : s.getCurrentUnitForType(j.UNIVER_SHEET), i = o ? r == null ? void 0 : r.getSheetBySheetId(o) : r == null ? void 0 : r.getActiveSheet();
2595
+ const s = e.get(M), r = t ? s.getUnit(t, B.UNIVER_SHEET) : s.getCurrentUnitForType(B.UNIVER_SHEET), i = o ? r == null ? void 0 : r.getSheetBySheetId(o) : r == null ? void 0 : r.getActiveSheet();
2596
2596
  if (!i)
2597
2597
  return null;
2598
2598
  const { startRow: a, endRow: u, startColumn: l, endColumn: c } = n, d = [], h = [];
@@ -2605,7 +2605,7 @@ function bu(n, e, t, o) {
2605
2605
  cols: h
2606
2606
  };
2607
2607
  }
2608
- function ro(n, e, t, o) {
2608
+ function io(n, e, t, o) {
2609
2609
  const s = [], r = [];
2610
2610
  for (const h of n) {
2611
2611
  const g = bu(h, e, t, o);
@@ -2878,6 +2878,10 @@ var Pu = Object.getOwnPropertyDescriptor, Ou = (n, e, t, o) => {
2878
2878
  let G = class extends Ds {
2879
2879
  constructor(e) {
2880
2880
  super();
2881
+ /**
2882
+ * Cache cell styles for current selections, key is `${row}_${column}`.
2883
+ */
2884
+ R(this, "_cellStylesCache", /* @__PURE__ */ new Map());
2881
2885
  /**
2882
2886
  * Selection Events, usually triggered when pointerdown in spreadsheet by selection render service after selectionModel has updated.
2883
2887
  */
@@ -2902,7 +2906,7 @@ let G = class extends Ds {
2902
2906
  this._instanceSrv = e, this._init();
2903
2907
  }
2904
2908
  get _currentSelectionPos() {
2905
- const e = this._instanceSrv.getCurrentUnitForType(j.UNIVER_SHEET);
2909
+ const e = this._instanceSrv.getCurrentUnitForType(B.UNIVER_SHEET);
2906
2910
  if (!e) return null;
2907
2911
  const t = e.getActiveSheet();
2908
2912
  return { unitId: e.getUnitId(), sheetId: t.getSheetId() };
@@ -2911,12 +2915,14 @@ let G = class extends Ds {
2911
2915
  return this._currentSelectionPos;
2912
2916
  }
2913
2917
  _init() {
2914
- const e = this._instanceSrv.getCurrentTypeOfUnit$(j.UNIVER_SHEET).pipe(ji(1), vo(this.dispose$));
2918
+ const e = this._instanceSrv.getCurrentTypeOfUnit$(B.UNIVER_SHEET).pipe(ji(1), bn(this.dispose$));
2915
2919
  this.selectionMoveStart$ = e.pipe(Xe((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionMoveStart$ : Vt())), this.selectionMoving$ = e.pipe(Xe((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionMoving$ : Vt())), this.selectionMoveEnd$ = e.pipe(Xe((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionMoveEnd$ : Vt([]))), this.selectionSet$ = e.pipe(Xe((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionSet$ : Vt([]))), this.selectionChanged$ = e.pipe(Xe((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionChanged$ : Vt([]))).pipe(
2916
2920
  Gi((t, o) => t.length !== o.length ? !1 : t.length === 0 && o.length === 0 ? !0 : t.every((s, r) => JSON.stringify(s) === JSON.stringify(o[r]))),
2917
2921
  Hs(1)
2918
- ), this._instanceSrv.getTypeOfUnitDisposed$(j.UNIVER_SHEET).pipe(vo(this.dispose$)).subscribe((t) => {
2922
+ ), this._instanceSrv.getTypeOfUnitDisposed$(B.UNIVER_SHEET).pipe(bn(this.dispose$)).subscribe((t) => {
2919
2923
  this._removeWorkbookSelection(t.getUnitId());
2924
+ }), this.selectionChanged$.pipe(bn(this.dispose$)).subscribe(() => {
2925
+ this._cellStylesCache.clear();
2920
2926
  });
2921
2927
  }
2922
2928
  /**
@@ -3000,6 +3006,42 @@ let G = class extends Ds {
3000
3006
  _removeWorkbookSelection(e) {
3001
3007
  this._workbookSelections.delete(e);
3002
3008
  }
3009
+ /**
3010
+ * This method is used to get the common value of a specific cell style property in the current selections.
3011
+ * Used to determine the state related to color panels in the toolbar.
3012
+ * Because in Excel, only the color panels need to show the common color of the current selections, other properties based on the current selection primary cell.
3013
+ * Now only handles text color, fill color, border style, border color.
3014
+ */
3015
+ getCellStylesProperty(e) {
3016
+ var r;
3017
+ const t = (r = this._instanceSrv.getCurrentUnitForType(B.UNIVER_SHEET)) == null ? void 0 : r.getActiveSheet(), o = this.getCurrentSelections();
3018
+ if (!t || o.length === 0)
3019
+ return {
3020
+ isAllValuesSame: !1,
3021
+ value: null
3022
+ };
3023
+ let s = null;
3024
+ for (let i = 0; i < o.length; i++) {
3025
+ const a = o[i], { startRow: u, endRow: l, startColumn: c, endColumn: d } = a.range;
3026
+ for (let h = u; h <= l; h++)
3027
+ for (let g = c; g <= d; g++) {
3028
+ const m = `${h}_${g}`;
3029
+ let f;
3030
+ this._cellStylesCache.has(m) ? f = this._cellStylesCache.get(m) : (f = t.getComposedCellStyle(h, g), this._cellStylesCache.set(m, f));
3031
+ const C = f[e];
3032
+ if (s != null && !A.diffValue(s, C))
3033
+ return {
3034
+ isAllValuesSame: !1,
3035
+ value: null
3036
+ };
3037
+ s = C;
3038
+ }
3039
+ }
3040
+ return {
3041
+ isAllValuesSame: !0,
3042
+ value: s
3043
+ };
3044
+ }
3003
3045
  };
3004
3046
  G = Ou([
3005
3047
  Nu(0, M)
@@ -3009,14 +3051,14 @@ const wh = "DISABLE_NORMAL_SELECTIONS", Ih = "SELECTIONS_ENABLED", Du = "REF_SEL
3009
3051
  type: v.COMMAND,
3010
3052
  handler: (n, e) => {
3011
3053
  var I;
3012
- const t = n.get(M), o = n.get(E), s = n.get(G), r = n.get(V), i = n.get(z), a = t.getCurrentUnitForType(j.UNIVER_SHEET);
3054
+ const t = n.get(M), o = n.get(E), s = n.get(G), r = n.get(V), i = n.get(z), a = t.getCurrentUnitForType(B.UNIVER_SHEET);
3013
3055
  if (!a) return !1;
3014
3056
  const u = (e == null ? void 0 : e.unitId) || a.getUnitId(), l = a.getActiveSheet();
3015
3057
  if (!l) return !1;
3016
3058
  const c = (e == null ? void 0 : e.subUnitId) || l.getSheetId(), d = (e == null ? void 0 : e.ranges) || ((I = s.getCurrentSelections()) == null ? void 0 : I.map((S) => S.range));
3017
3059
  if (!(d != null && d.length))
3018
3060
  return !1;
3019
- const h = ro(d, n, u, c), g = [], m = [], f = {
3061
+ const h = io(d, n, u, c), g = [], m = [], f = {
3020
3062
  subUnitId: c,
3021
3063
  unitId: u,
3022
3064
  cellValue: Zs(h)
@@ -3040,19 +3082,19 @@ const wh = "DISABLE_NORMAL_SELECTIONS", Ih = "SELECTIONS_ENABLED", Du = "REF_SEL
3040
3082
  redoMutations: g
3041
3083
  }), !0) : !1;
3042
3084
  }
3043
- }, Wo = {
3085
+ }, $o = {
3044
3086
  id: "sheet.command.clear-selection-format",
3045
3087
  type: v.COMMAND,
3046
3088
  handler: (n, e) => {
3047
3089
  var I;
3048
- const t = n.get(M), o = n.get(E), s = n.get(G), r = n.get(V), i = n.get(z), a = t.getCurrentUnitForType(j.UNIVER_SHEET);
3090
+ const t = n.get(M), o = n.get(E), s = n.get(G), r = n.get(V), i = n.get(z), a = t.getCurrentUnitForType(B.UNIVER_SHEET);
3049
3091
  if (!a) return !1;
3050
3092
  const u = (e == null ? void 0 : e.unitId) || a.getUnitId(), l = a.getActiveSheet();
3051
3093
  if (!l) return !1;
3052
3094
  const c = (e == null ? void 0 : e.subUnitId) || l.getSheetId(), d = (e == null ? void 0 : e.ranges) || ((I = s.getCurrentSelections()) == null ? void 0 : I.map((S) => S.range));
3053
3095
  if (!(d != null && d.length))
3054
3096
  return !1;
3055
- const h = ro(d, n, u, c), g = [], m = [], f = {
3097
+ const h = io(d, n, u, c), g = [], m = [], f = {
3056
3098
  subUnitId: c,
3057
3099
  unitId: u,
3058
3100
  cellValue: yu(h)
@@ -3067,7 +3109,7 @@ const wh = "DISABLE_NORMAL_SELECTIONS", Ih = "SELECTIONS_ENABLED", Du = "REF_SEL
3067
3109
  id: ee.id,
3068
3110
  params: C
3069
3111
  });
3070
- const p = i.onCommandExecute({ id: Wo.id });
3112
+ const p = i.onCommandExecute({ id: $o.id });
3071
3113
  return g.push(...p.redos), m.unshift(...p.undos), L(g, o) ? (r.pushUndoRedo({
3072
3114
  // If there are multiple mutations that form an encapsulated project, they must be encapsulated in the same undo redo element.
3073
3115
  // Hooks can be used to hook the code of external controllers to add new actions.
@@ -3077,7 +3119,7 @@ const wh = "DISABLE_NORMAL_SELECTIONS", Ih = "SELECTIONS_ENABLED", Du = "REF_SEL
3077
3119
  }), !0) : !1;
3078
3120
  }
3079
3121
  };
3080
- function io(n, e, t = !0) {
3122
+ function ao(n, e, t = !0) {
3081
3123
  const o = e.getMatrixWithMergedCells(...vi(n)), s = [];
3082
3124
  if (o.forValue((i, a, u) => {
3083
3125
  if (u.colSpan !== void 0 && u.rowSpan !== void 0) {
@@ -3092,7 +3134,7 @@ function io(n, e, t = !0) {
3092
3134
  }), s.length === 0)
3093
3135
  return n;
3094
3136
  const r = O.union(n, ...s);
3095
- return t ? io(r, e, t) : r;
3137
+ return t ? ao(r, e, t) : r;
3096
3138
  }
3097
3139
  function vh(n, e, t) {
3098
3140
  let o = null;
@@ -3105,7 +3147,7 @@ function vh(n, e, t) {
3105
3147
  isMergedMainCell: a.rowSpan !== void 0 && a.colSpan !== void 0,
3106
3148
  endRow: r + (a.rowSpan !== void 0 ? a.rowSpan - 1 : 0),
3107
3149
  endColumn: i + (a.colSpan !== void 0 ? a.colSpan - 1 : 0),
3108
- rangeType: B.NORMAL
3150
+ rangeType: j.NORMAL
3109
3151
  }, !1)), o || {
3110
3152
  actualColumn: e,
3111
3153
  actualRow: n,
@@ -3115,7 +3157,7 @@ function vh(n, e, t) {
3115
3157
  endColumn: e,
3116
3158
  isMerged: !1,
3117
3159
  isMergedMainCell: !1,
3118
- rangeType: B.NORMAL
3160
+ rangeType: j.NORMAL
3119
3161
  };
3120
3162
  }
3121
3163
  function Mh(n, e, t) {
@@ -3128,7 +3170,7 @@ function ve(n, e) {
3128
3170
  ...s,
3129
3171
  actualRow: t,
3130
3172
  actualColumn: o,
3131
- rangeType: B.NORMAL,
3173
+ rangeType: j.NORMAL,
3132
3174
  isMerged: !0,
3133
3175
  isMergedMainCell: !0
3134
3176
  } : {
@@ -3138,7 +3180,7 @@ function ve(n, e) {
3138
3180
  endColumn: n.startColumn,
3139
3181
  actualRow: t,
3140
3182
  actualColumn: o,
3141
- rangeType: B.NORMAL,
3183
+ rangeType: j.NORMAL,
3142
3184
  isMerged: !1,
3143
3185
  isMergedMainCell: !1
3144
3186
  };
@@ -3182,33 +3224,33 @@ function mt(n, e, t, o, s, r, i) {
3182
3224
  }
3183
3225
  return a;
3184
3226
  }
3185
- var xu = Object.getOwnPropertyDescriptor, Wu = (n, e, t, o) => {
3227
+ var xu = Object.getOwnPropertyDescriptor, $u = (n, e, t, o) => {
3186
3228
  for (var s = o > 1 ? void 0 : o ? xu(e, t) : e, r = n.length - 1, i; r >= 0; r--)
3187
3229
  (i = n[r]) && (s = i(s) || s);
3188
3230
  return s;
3189
- }, $u = (n, e) => (t, o) => e(t, o, n);
3231
+ }, Wu = (n, e) => (t, o) => e(t, o, n);
3190
3232
  const Vu = No("sheets-formula.ref-selections.service");
3191
3233
  let hs = class extends G {
3192
3234
  constructor(n) {
3193
3235
  super(n);
3194
3236
  }
3195
3237
  _init() {
3196
- const n = this._getAliveWorkbooks$().pipe(vo(this.dispose$));
3238
+ const n = this._getAliveWorkbooks$().pipe(bn(this.dispose$));
3197
3239
  this.selectionMoveStart$ = n.pipe(Xe((e) => Ft(...e.map((t) => t.selectionMoveStart$)))), this.selectionMoving$ = n.pipe(Xe((e) => Ft(...e.map((t) => t.selectionMoving$)))), this.selectionMoveEnd$ = n.pipe(Xe((e) => Ft(...e.map((t) => t.selectionMoveEnd$)))), this.selectionSet$ = n.pipe(Xe((e) => Ft(...e.map((t) => t.selectionSet$))));
3198
3240
  }
3199
3241
  _getAliveWorkbooks$() {
3200
- const n = this._instanceSrv.getAllUnitsForType(j.UNIVER_SHEET);
3242
+ const n = this._instanceSrv.getAllUnitsForType(B.UNIVER_SHEET);
3201
3243
  n.forEach((t) => this._ensureWorkbookSelection(t.getUnitId()));
3202
3244
  const e = new ut(n);
3203
- return this.disposeWithMe(this._instanceSrv.getTypeOfUnitAdded$(j.UNIVER_SHEET).subscribe((t) => {
3245
+ return this.disposeWithMe(this._instanceSrv.getTypeOfUnitAdded$(B.UNIVER_SHEET).subscribe((t) => {
3204
3246
  this._ensureWorkbookSelection(t.getUnitId()), e.next([...e.getValue(), t]);
3205
- })), this.disposeWithMe(this._instanceSrv.getTypeOfUnitDisposed$(j.UNIVER_SHEET).subscribe((t) => {
3247
+ })), this.disposeWithMe(this._instanceSrv.getTypeOfUnitDisposed$(B.UNIVER_SHEET).subscribe((t) => {
3206
3248
  this._removeWorkbookSelection(t.getUnitId()), e.next(e.getValue().filter((o) => o !== t));
3207
3249
  })), e.pipe(Mo((t) => t.map((o) => this._ensureWorkbookSelection(o.getUnitId()))));
3208
3250
  }
3209
3251
  };
3210
- hs = Wu([
3211
- $u(0, M)
3252
+ hs = $u([
3253
+ Wu(0, M)
3212
3254
  ], hs);
3213
3255
  function Lu(n, e) {
3214
3256
  const o = n.get(As).getContextValue(Du);
@@ -3249,7 +3291,7 @@ const ie = {
3249
3291
  const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(xt), i = n.get(tt), a = n.get(z), u = P(s);
3250
3292
  if (!u || !await a.beforeCommandExecute({ id: Mt.id, params: e }))
3251
3293
  return !1;
3252
- const { worksheet: c, subUnitId: d, unitId: h } = u, g = $o(
3294
+ const { worksheet: c, subUnitId: d, unitId: h } = u, g = Wo(
3253
3295
  n,
3254
3296
  { unitId: h, subUnitId: d, range: e.fromRange },
3255
3297
  { subUnitId: d, range: e.toRange }
@@ -3304,10 +3346,10 @@ const ie = {
3304
3346
  return !1;
3305
3347
  }
3306
3348
  };
3307
- function $o(n, e, t, o = !1) {
3349
+ function Wo(n, e, t, o = !1) {
3308
3350
  const s = [], r = [], { range: i, subUnitId: a, unitId: u } = e, { range: l, subUnitId: c } = t, h = n.get(M).getUniverSheetInstance(u), g = h == null ? void 0 : h.getSheetBySheetId(c), m = h == null ? void 0 : h.getSheetBySheetId(a), f = g == null ? void 0 : g.getCellMatrix(), C = m == null ? void 0 : m.getCellMatrix();
3309
3351
  if (g && m && f && C) {
3310
- const p = io(l, g, !1);
3352
+ const p = ao(l, g, !1);
3311
3353
  if (!O.equals(l, p) && !o)
3312
3354
  return null;
3313
3355
  const w = new q(), I = new q(), S = new q();
@@ -3366,7 +3408,7 @@ function Fu(n, e, t) {
3366
3408
  }
3367
3409
  return i;
3368
3410
  }
3369
- var On = /* @__PURE__ */ ((n) => (n[n.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", n[n.UNIVER_DOC = 1] = "UNIVER_DOC", n[n.UNIVER_SHEET = 2] = "UNIVER_SHEET", n[n.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", n[n.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(On || {}), _ = /* @__PURE__ */ ((n) => (n[n.View = 0] = "View", n[n.Edit = 1] = "Edit", n[n.ManageCollaborator = 2] = "ManageCollaborator", n[n.Print = 3] = "Print", n[n.Duplicate = 4] = "Duplicate", n[n.Comment = 5] = "Comment", n[n.Copy = 6] = "Copy", n[n.Share = 7] = "Share", n[n.Export = 8] = "Export", n[n.MoveWorksheet = 9] = "MoveWorksheet", n[n.DeleteWorksheet = 10] = "DeleteWorksheet", n[n.HideWorksheet = 11] = "HideWorksheet", n[n.RenameWorksheet = 12] = "RenameWorksheet", n[n.CreateWorksheet = 13] = "CreateWorksheet", n[n.SetWorksheetStyle = 14] = "SetWorksheetStyle", n[n.EditWorksheetCell = 15] = "EditWorksheetCell", n[n.InsertHyperlink = 16] = "InsertHyperlink", n[n.Sort = 17] = "Sort", n[n.Filter = 18] = "Filter", n[n.PivotTable = 19] = "PivotTable", n[n.FloatImg = 20] = "FloatImg", n[n.History = 21] = "History", n[n.RwHgtClWdt = 22] = "RwHgtClWdt", n[n.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", n[n.ViewFilter = 24] = "ViewFilter", n[n.MoveSheet = 25] = "MoveSheet", n[n.DeleteSheet = 26] = "DeleteSheet", n[n.HideSheet = 27] = "HideSheet", n[n.CopySheet = 28] = "CopySheet", n[n.RenameSheet = 29] = "RenameSheet", n[n.CreateSheet = 30] = "CreateSheet", n[n.SelectProtectedCells = 31] = "SelectProtectedCells", n[n.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", n[n.SetCellStyle = 33] = "SetCellStyle", n[n.SetCellValue = 34] = "SetCellValue", n[n.SetRowStyle = 35] = "SetRowStyle", n[n.SetColumnStyle = 36] = "SetColumnStyle", n[n.InsertRow = 37] = "InsertRow", n[n.InsertColumn = 38] = "InsertColumn", n[n.DeleteRow = 39] = "DeleteRow", n[n.DeleteColumn = 40] = "DeleteColumn", n[n.EditExtraObject = 41] = "EditExtraObject", n[n.Delete = 42] = "Delete", n[n.RecoverHistory = 43] = "RecoverHistory", n[n.ViewHistory = 44] = "ViewHistory", n[n.CreatePermissionObject = 45] = "CreatePermissionObject", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(_ || {}), x = /* @__PURE__ */ ((n) => (n[n.Unkonwn = 0] = "Unkonwn", n[n.Workbook = 1] = "Workbook", n[n.Worksheet = 2] = "Worksheet", n[n.SelectRange = 3] = "SelectRange", n[n.Document = 4] = "Document", n[n.Slide = 5] = "Slide", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(x || {});
3411
+ var Nn = /* @__PURE__ */ ((n) => (n[n.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", n[n.UNIVER_DOC = 1] = "UNIVER_DOC", n[n.UNIVER_SHEET = 2] = "UNIVER_SHEET", n[n.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", n[n.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(Nn || {}), _ = /* @__PURE__ */ ((n) => (n[n.View = 0] = "View", n[n.Edit = 1] = "Edit", n[n.ManageCollaborator = 2] = "ManageCollaborator", n[n.Print = 3] = "Print", n[n.Duplicate = 4] = "Duplicate", n[n.Comment = 5] = "Comment", n[n.Copy = 6] = "Copy", n[n.Share = 7] = "Share", n[n.Export = 8] = "Export", n[n.MoveWorksheet = 9] = "MoveWorksheet", n[n.DeleteWorksheet = 10] = "DeleteWorksheet", n[n.HideWorksheet = 11] = "HideWorksheet", n[n.RenameWorksheet = 12] = "RenameWorksheet", n[n.CreateWorksheet = 13] = "CreateWorksheet", n[n.SetWorksheetStyle = 14] = "SetWorksheetStyle", n[n.EditWorksheetCell = 15] = "EditWorksheetCell", n[n.InsertHyperlink = 16] = "InsertHyperlink", n[n.Sort = 17] = "Sort", n[n.Filter = 18] = "Filter", n[n.PivotTable = 19] = "PivotTable", n[n.FloatImg = 20] = "FloatImg", n[n.History = 21] = "History", n[n.RwHgtClWdt = 22] = "RwHgtClWdt", n[n.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", n[n.ViewFilter = 24] = "ViewFilter", n[n.MoveSheet = 25] = "MoveSheet", n[n.DeleteSheet = 26] = "DeleteSheet", n[n.HideSheet = 27] = "HideSheet", n[n.CopySheet = 28] = "CopySheet", n[n.RenameSheet = 29] = "RenameSheet", n[n.CreateSheet = 30] = "CreateSheet", n[n.SelectProtectedCells = 31] = "SelectProtectedCells", n[n.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", n[n.SetCellStyle = 33] = "SetCellStyle", n[n.SetCellValue = 34] = "SetCellValue", n[n.SetRowStyle = 35] = "SetRowStyle", n[n.SetColumnStyle = 36] = "SetColumnStyle", n[n.InsertRow = 37] = "InsertRow", n[n.InsertColumn = 38] = "InsertColumn", n[n.DeleteRow = 39] = "DeleteRow", n[n.DeleteColumn = 40] = "DeleteColumn", n[n.EditExtraObject = 41] = "EditExtraObject", n[n.Delete = 42] = "Delete", n[n.RecoverHistory = 43] = "RecoverHistory", n[n.ViewHistory = 44] = "ViewHistory", n[n.CreatePermissionObject = 45] = "CreatePermissionObject", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(_ || {}), x = /* @__PURE__ */ ((n) => (n[n.Unkonwn = 0] = "Unkonwn", n[n.Workbook = 1] = "Workbook", n[n.Worksheet = 2] = "Worksheet", n[n.SelectRange = 3] = "SelectRange", n[n.Document = 4] = "Document", n[n.Slide = 5] = "Slide", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(x || {});
3370
3412
  class Ae {
3371
3413
  constructor(e, t, o) {
3372
3414
  R(this, "type", x.SelectRange);
@@ -3773,7 +3815,7 @@ class Mr {
3773
3815
  this.unitId = e, this.subUnitId = t, this.id = `${this.type}.${_.SetCellStyle}_${e}_${t}`;
3774
3816
  }
3775
3817
  }
3776
- class Nn {
3818
+ class Dn {
3777
3819
  constructor(e, t) {
3778
3820
  R(this, "value", !0);
3779
3821
  R(this, "type", x.Worksheet);
@@ -3813,7 +3855,7 @@ class _r {
3813
3855
  this.unitId = e, this.subUnitId = t, this.id = `${this.type}.${_.Sort}_${e}_${t}`;
3814
3856
  }
3815
3857
  }
3816
- class ao {
3858
+ class uo {
3817
3859
  constructor(e, t) {
3818
3860
  R(this, "value", !0);
3819
3861
  R(this, "type", x.Worksheet);
@@ -3841,7 +3883,7 @@ const Cn = {
3841
3883
  for (let Se = 0; Se <= se - J; Se++)
3842
3884
  p.setValue(ue + K, Se + J, g[ue][Se]);
3843
3885
  }
3844
- else if (Ws(g))
3886
+ else if ($s(g))
3845
3887
  for (let F = 0; F < C.length; F++) {
3846
3888
  const { startRow: K, startColumn: J, endRow: ae, endColumn: se } = C[F];
3847
3889
  for (let ue = K; ue <= ae; ue++)
@@ -3893,7 +3935,7 @@ function yr(n, e) {
3893
3935
  const b = Math.min(i.endRow, m.endRow);
3894
3936
  let N = 0;
3895
3937
  for (let T = i.startRow; T <= b; T++) {
3896
- const U = g.getRow(T), D = U ? $s(U) - 1 : 0;
3938
+ const U = g.getRow(T), D = U ? Ws(U) - 1 : 0;
3897
3939
  N = Math.max(N, D);
3898
3940
  }
3899
3941
  I = {
@@ -3925,7 +3967,7 @@ function yr(n, e) {
3925
3967
  endColumn: b
3926
3968
  };
3927
3969
  }
3928
- const y = $o(
3970
+ const y = Wo(
3929
3971
  n,
3930
3972
  { unitId: s, subUnitId: r, range: I },
3931
3973
  { subUnitId: r, range: S },
@@ -3980,7 +4022,7 @@ function br(n, e) {
3980
4022
  const I = Math.min(i.endRow, g.endRow);
3981
4023
  let S = 0;
3982
4024
  for (let b = i.startRow; b <= I; b++) {
3983
- const N = h.getRow(b), k = N ? $s(N) - 1 : 0;
4025
+ const N = h.getRow(b), k = N ? Ws(N) - 1 : 0;
3984
4026
  S = Math.max(S, k);
3985
4027
  }
3986
4028
  p = {
@@ -4014,7 +4056,7 @@ function br(n, e) {
4014
4056
  };
4015
4057
  }
4016
4058
  if (p && w) {
4017
- const I = $o(
4059
+ const I = Wo(
4018
4060
  n,
4019
4061
  { unitId: s, subUnitId: r, range: p },
4020
4062
  { subUnitId: r, range: w },
@@ -4254,7 +4296,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4254
4296
  id: He.id,
4255
4297
  params: se
4256
4298
  });
4257
- const ue = oo(
4299
+ const ue = so(
4258
4300
  n,
4259
4301
  se
4260
4302
  );
@@ -4319,7 +4361,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4319
4361
  const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(z), i = P(s, e);
4320
4362
  if (!i) return !1;
4321
4363
  const { workbook: a, worksheet: u } = i, { range: l, direction: c, unitId: d, subUnitId: h, cellValue: g } = e, { startRow: m, endRow: f } = l;
4322
- l.rangeType = B.ROW;
4364
+ l.rangeType = j.ROW;
4323
4365
  const C = c === pe.UP ? m : m - 1, p = u.getRowHeight(C), w = {
4324
4366
  unitId: d,
4325
4367
  subUnitId: h,
@@ -4408,7 +4450,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4408
4450
  endRow: d,
4409
4451
  startColumn: h,
4410
4452
  endColumn: g,
4411
- rangeType: B.ROW
4453
+ rangeType: j.ROW
4412
4454
  },
4413
4455
  // copy styles from the row below
4414
4456
  cellValue: mt(i, c, d, h, g, !0, o.endRow)
@@ -4437,7 +4479,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4437
4479
  endRow: h,
4438
4480
  startColumn: g,
4439
4481
  endColumn: m,
4440
- rangeType: B.ROW
4482
+ rangeType: j.ROW
4441
4483
  },
4442
4484
  // copy styles from the row above
4443
4485
  cellValue: f
@@ -4466,7 +4508,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4466
4508
  endRow: h,
4467
4509
  startColumn: g,
4468
4510
  endColumn: m,
4469
- rangeType: B.ROW
4511
+ rangeType: j.ROW
4470
4512
  },
4471
4513
  // copy styles from the row below
4472
4514
  cellValue: mt(a, d, h, g, m, !0, s.endRow)
@@ -4495,7 +4537,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4495
4537
  handler: (n, e) => {
4496
4538
  var N, k, T, U;
4497
4539
  const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(z), { range: i, direction: a, subUnitId: u, unitId: l, cellValue: c } = e, { startColumn: d, endColumn: h } = e.range;
4498
- i.rangeType = B.COLUMN;
4540
+ i.rangeType = j.COLUMN;
4499
4541
  const g = s.getUniverSheetInstance(e.unitId), m = g.getSheetBySheetId(e.subUnitId), f = a === pe.LEFT ? d : d - 1, C = m.getColumnWidth(f), p = {
4500
4542
  unitId: l,
4501
4543
  subUnitId: u,
@@ -4504,7 +4546,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4504
4546
  w: C,
4505
4547
  hd: te.FALSE
4506
4548
  }))
4507
- }, w = oo(
4549
+ }, w = so(
4508
4550
  n,
4509
4551
  p
4510
4552
  ), I = [{ id: He.id, params: p }], S = [{ id: Te.id, params: w }];
@@ -4554,7 +4596,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4554
4596
  endColumn: h,
4555
4597
  startRow: g,
4556
4598
  endRow: m,
4557
- rangeType: B.COLUMN
4599
+ rangeType: j.COLUMN
4558
4600
  },
4559
4601
  // copy styles from the column before
4560
4602
  cellValue: mt(a, g, m, d, h, !1, d - 1)
@@ -4609,7 +4651,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4609
4651
  endColumn: h,
4610
4652
  startRow: g,
4611
4653
  endRow: m,
4612
- rangeType: B.COLUMN
4654
+ rangeType: j.COLUMN
4613
4655
  },
4614
4656
  // copy styles from the column before
4615
4657
  cellValue: mt(a, g, m, d, h, !1, d - 1)
@@ -4643,7 +4685,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4643
4685
  };
4644
4686
  return n.get(E).executeCommand(Je.id, f);
4645
4687
  }
4646
- }, Dn = "sheet.command.remove-row", Nr = {
4688
+ }, An = "sheet.command.remove-row", Nr = {
4647
4689
  type: v.COMMAND,
4648
4690
  id: "sheet.command.remove-row-by-range",
4649
4691
  handler: (n, e) => {
@@ -4652,7 +4694,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4652
4694
  return !1;
4653
4695
  const t = n.get(M), o = P(t, e);
4654
4696
  if (!o) return !1;
4655
- const { workbook: s, worksheet: r } = o, i = n.get(z), { range: a, unitId: u, subUnitId: l } = e, c = ro([a], n, u, l).reverse(), d = [], h = [];
4697
+ const { workbook: s, worksheet: r } = o, i = n.get(z), { range: a, unitId: u, subUnitId: l } = e, c = io([a], n, u, l).reverse(), d = [], h = [];
4656
4698
  c.forEach((I) => {
4657
4699
  const S = [], y = [], b = {
4658
4700
  unitId: u,
@@ -4669,7 +4711,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4669
4711
  y.push({ id: Fe.id, params: b }), S.push({ id: Le.id, params: N }), S.push({ id: ee.id, params: T }), h.push(...y), d.unshift(...S);
4670
4712
  });
4671
4713
  const g = i.onCommandExecute({
4672
- id: Dn,
4714
+ id: An,
4673
4715
  params: { range: a }
4674
4716
  }), m = n.get(E);
4675
4717
  if (L(
@@ -4682,7 +4724,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4682
4724
  m
4683
4725
  ).result) {
4684
4726
  const I = i.afterCommandExecute({
4685
- id: Dn,
4727
+ id: An,
4686
4728
  params: { range: a }
4687
4729
  });
4688
4730
  return L(I.redos, m), n.get(V).pushUndoRedo({
@@ -4703,9 +4745,9 @@ const Er = "sheet.command.delete-range-move-left", St = {
4703
4745
  }
4704
4746
  return !1;
4705
4747
  }
4706
- }, uo = {
4748
+ }, lo = {
4707
4749
  type: v.COMMAND,
4708
- id: Dn,
4750
+ id: An,
4709
4751
  handler: async (n, e) => {
4710
4752
  var h;
4711
4753
  const t = n.get(G), o = n.get(z), s = n.get(E);
@@ -4719,7 +4761,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4719
4761
  startColumn: 0,
4720
4762
  endColumn: Math.max(u.getMaxColumns() - 1, 0)
4721
4763
  }, await o.beforeCommandExecute({
4722
- id: uo.id,
4764
+ id: lo.id,
4723
4765
  params: { range: r }
4724
4766
  }) ? s.syncExecuteCommand(Nr.id, {
4725
4767
  range: r,
@@ -4727,7 +4769,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4727
4769
  subUnitId: l
4728
4770
  }) : !1;
4729
4771
  }
4730
- }, An = "sheet.command.remove-col", Dr = {
4772
+ }, xn = "sheet.command.remove-col", Dr = {
4731
4773
  type: v.COMMAND,
4732
4774
  id: "sheet.command.remove-col-by-range",
4733
4775
  handler: (n, e) => {
@@ -4745,7 +4787,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4745
4787
  subUnitId: l,
4746
4788
  cellValue: h.getMatrix()
4747
4789
  }, m = i.onCommandExecute({
4748
- id: An,
4790
+ id: xn,
4749
4791
  params: { range: a }
4750
4792
  }), f = n.get(E);
4751
4793
  if (L(
@@ -4758,7 +4800,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4758
4800
  f
4759
4801
  ).result) {
4760
4802
  const S = i.afterCommandExecute({
4761
- id: An,
4803
+ id: xn,
4762
4804
  params: { range: a }
4763
4805
  });
4764
4806
  return L(S.redos, f), n.get(V).pushUndoRedo({
@@ -4780,9 +4822,9 @@ const Er = "sheet.command.delete-range-move-left", St = {
4780
4822
  }
4781
4823
  return !1;
4782
4824
  }
4783
- }, lo = {
4825
+ }, co = {
4784
4826
  type: v.COMMAND,
4785
- id: An,
4827
+ id: xn,
4786
4828
  handler: async (n, e) => {
4787
4829
  var h;
4788
4830
  const t = n.get(G), o = n.get(z), s = n.get(E);
@@ -4796,7 +4838,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4796
4838
  startRow: 0,
4797
4839
  endRow: Math.max(u.getMaxRows() - 1, 0)
4798
4840
  }, await o.beforeCommandExecute({
4799
- id: lo.id,
4841
+ id: co.id,
4800
4842
  params: { range: r }
4801
4843
  }) ? s.syncExecuteCommand(Dr.id, {
4802
4844
  range: r,
@@ -4814,7 +4856,7 @@ const Er = "sheet.command.delete-range-move-left", St = {
4814
4856
  sheet: u,
4815
4857
  unitId: s
4816
4858
  };
4817
- }, Wt = {
4859
+ }, $t = {
4818
4860
  id: "sheet.mutation.remove-sheet",
4819
4861
  type: v.MUTATION,
4820
4862
  handler: (n, e) => {
@@ -4838,14 +4880,14 @@ const Ar = "sheet.command.move-rows", rn = {
4838
4880
  fromRange: { startRow: o },
4839
4881
  toRange: { startRow: s },
4840
4882
  range: r
4841
- } = e, i = r ? [Wr(r)] : t.getCurrentSelections(), a = i == null ? void 0 : i.filter(
4842
- (K) => K.range.rangeType === B.ROW && K.range.startRow <= o && o <= K.range.endRow
4883
+ } = e, i = r ? [$r(r)] : t.getCurrentSelections(), a = i == null ? void 0 : i.filter(
4884
+ (K) => K.range.rangeType === j.ROW && K.range.startRow <= o && o <= K.range.endRow
4843
4885
  );
4844
4886
  if ((a == null ? void 0 : a.length) !== 1)
4845
4887
  return !1;
4846
4888
  const u = n.get(z), l = n.get(M), c = P(l, e);
4847
4889
  if (!c) return !1;
4848
- const { workbook: d, worksheet: h } = c, g = d.getUnitId(), m = h.getSheetId(), f = n.get(xt), C = n.get(tt), p = a[0].range, w = a[0].primary, I = io(p, h, !1);
4890
+ const { workbook: d, worksheet: h } = c, g = d.getUnitId(), m = h.getSheetId(), f = n.get(xt), C = n.get(tt), p = a[0].range, w = a[0].primary, I = ao(p, h, !1);
4849
4891
  if (!O.equals(p, I))
4850
4892
  return f.emit(C.t("sheets.info.partOfCell")), !1;
4851
4893
  if (rl(s, h))
@@ -4911,14 +4953,14 @@ const Ar = "sheet.command.move-rows", rn = {
4911
4953
  fromRange: { startColumn: o },
4912
4954
  toRange: { startColumn: s },
4913
4955
  range: r
4914
- } = e, i = r ? [Wr(r)] : t.getCurrentSelections(), a = i == null ? void 0 : i.filter(
4915
- (K) => K.range.rangeType === B.COLUMN && K.range.startColumn <= o && o <= K.range.endColumn
4956
+ } = e, i = r ? [$r(r)] : t.getCurrentSelections(), a = i == null ? void 0 : i.filter(
4957
+ (K) => K.range.rangeType === j.COLUMN && K.range.startColumn <= o && o <= K.range.endColumn
4916
4958
  );
4917
4959
  if ((a == null ? void 0 : a.length) !== 1)
4918
4960
  return !1;
4919
4961
  const u = n.get(z), l = n.get(M), c = P(l, e);
4920
4962
  if (!c) return !1;
4921
- const { workbook: d, worksheet: h } = c, g = d.getUnitId(), m = h.getSheetId(), f = n.get(xt), C = n.get(tt), p = a[0].range, w = a[0].primary, I = io(p, h, !1);
4963
+ const { workbook: d, worksheet: h } = c, g = d.getUnitId(), m = h.getSheetId(), f = n.get(xt), C = n.get(tt), p = a[0].range, w = a[0].primary, I = ao(p, h, !1);
4922
4964
  if (!O.equals(p, I))
4923
4965
  return f.emit(C.t("sheets.info.partOfCell")), !1;
4924
4966
  if (il(s, h))
@@ -4971,7 +5013,7 @@ const Ar = "sheet.command.move-rows", rn = {
4971
5013
  return !1;
4972
5014
  }
4973
5015
  };
4974
- function Wr(n) {
5016
+ function $r(n) {
4975
5017
  return {
4976
5018
  range: n,
4977
5019
  primary: null,
@@ -5003,7 +5045,7 @@ let et = class extends le {
5003
5045
  }
5004
5046
  };
5005
5047
  et = ul([
5006
- ll(0, W(no))
5048
+ ll(0, $(oo))
5007
5049
  ], et);
5008
5050
  function Go(n, e) {
5009
5051
  const t = new q();
@@ -5048,13 +5090,13 @@ function pn(n, e) {
5048
5090
  }
5049
5091
  return { suitableRanges: s, remainingRanges: r };
5050
5092
  }
5051
- const $r = "sheet.command.reorder-range", _o = {
5052
- id: $r,
5093
+ const Wr = "sheet.command.reorder-range", _o = {
5094
+ id: Wr,
5053
5095
  type: v.COMMAND,
5054
5096
  handler: (n, e) => {
5055
5097
  var I, S;
5056
5098
  const { subUnitId: t, unitId: o, range: s, order: r } = e, i = n.get(E), a = {
5057
- id: Pn.id,
5099
+ id: On.id,
5058
5100
  params: {
5059
5101
  unitId: o,
5060
5102
  subUnitId: t,
@@ -5062,7 +5104,7 @@ const $r = "sheet.command.reorder-range", _o = {
5062
5104
  range: s
5063
5105
  }
5064
5106
  }, u = {
5065
- id: Pn.id,
5107
+ id: On.id,
5066
5108
  params: xa(a.params)
5067
5109
  }, l = n.get(z), c = l.onCommandExecute({ id: _o.id, params: e }), d = [
5068
5110
  ...(I = c.preRedos) != null ? I : [],
@@ -5085,34 +5127,34 @@ const $r = "sheet.command.reorder-range", _o = {
5085
5127
  redoMutations: [...d, ...w.redos, ...p]
5086
5128
  }), !0) : !1;
5087
5129
  }
5088
- }, $ = {
5130
+ }, W = {
5089
5131
  MoveRangeCommandId: Qs,
5090
5132
  InsertRowCommandId: kr,
5091
5133
  InsertColCommandId: Pr,
5092
- RemoveColCommandId: An,
5093
- RemoveRowCommandId: Dn,
5134
+ RemoveColCommandId: xn,
5135
+ RemoveRowCommandId: An,
5094
5136
  DeleteRangeMoveLeftCommandId: Er,
5095
5137
  DeleteRangeMoveUpCommandId: Ur,
5096
5138
  InsertRangeMoveDownCommandId: Yu,
5097
5139
  InsertRangeMoveRightCommandId: jo,
5098
5140
  MoveColsCommandId: xr,
5099
5141
  MoveRowsCommandId: Ar,
5100
- ReorderRangeCommandId: $r
5142
+ ReorderRangeCommandId: Wr
5101
5143
  };
5102
5144
  var Q = /* @__PURE__ */ ((n) => (n[n.Set = 0] = "Set", n[n.Delete = 1] = "Delete", n[n.HorizontalMove = 2] = "HorizontalMove", n[n.VerticalMove = 3] = "VerticalMove", n[n.Unknown = 4] = "Unknown", n))(Q || {});
5103
5145
  const vn = Number.MAX_SAFE_INTEGER, ze = (n) => {
5104
5146
  const e = { ...n }, t = Number.isNaN(e.startRow) && Number.isNaN(e.endRow) && !Number.isNaN(e.startColumn) && !Number.isNaN(e.endColumn), o = Number.isNaN(e.startColumn) && Number.isNaN(e.endColumn) && !Number.isNaN(e.startRow) && !Number.isNaN(e.endRow);
5105
- return (e.rangeType === B.COLUMN || t) && (e.startRow = 0, e.endRow = vn), (e.rangeType === B.ROW || o) && (e.startColumn = 0, e.endColumn = vn), e.rangeType === B.ALL && (e.startColumn = 0, e.endColumn = vn, e.startRow = 0, e.endRow = vn), e;
5147
+ return (e.rangeType === j.COLUMN || t) && (e.startRow = 0, e.endRow = vn), (e.rangeType === j.ROW || o) && (e.startColumn = 0, e.endColumn = vn), e.rangeType === j.ALL && (e.startColumn = 0, e.endColumn = vn, e.startRow = 0, e.endRow = vn), e;
5106
5148
  }, Ue = (n) => {
5107
5149
  let e = n.rangeType;
5108
- return n.rangeType === B.COLUMN ? e = B.ROW : n.rangeType === B.ROW && (e = B.COLUMN), {
5150
+ return n.rangeType === j.COLUMN ? e = j.ROW : n.rangeType === j.ROW && (e = j.COLUMN), {
5109
5151
  startRow: n.startColumn,
5110
5152
  endRow: n.endColumn,
5111
5153
  startColumn: n.startRow,
5112
5154
  endColumn: n.endRow,
5113
5155
  rangeType: e
5114
5156
  };
5115
- }, xn = (n, e, t) => {
5157
+ }, $n = (n, e, t) => {
5116
5158
  const o = { ...t }, s = { ...e }, r = (f, C) => {
5117
5159
  const p = Math.max(f.start, C.start), w = Math.min(f.end, C.end);
5118
5160
  return w < p ? null : { start: p, end: w };
@@ -5146,7 +5188,7 @@ const vn = Number.MAX_SAFE_INTEGER, ze = (n) => {
5146
5188
  const { fromRange: t, toRange: o } = n.params || {};
5147
5189
  if (!o || !t)
5148
5190
  return [];
5149
- const s = ze(t), r = ze(o), i = ze(e), a = xn(
5191
+ const s = ze(t), r = ze(o), i = ze(e), a = $n(
5150
5192
  { start: s.startRow, end: s.endRow },
5151
5193
  { start: r.startRow, end: r.endRow },
5152
5194
  { start: i.startRow, end: i.endRow }
@@ -5192,7 +5234,7 @@ const vn = Number.MAX_SAFE_INTEGER, ze = (n) => {
5192
5234
  const { fromRange: t, toRange: o } = n.params || {};
5193
5235
  if (!o || !t)
5194
5236
  return [];
5195
- const s = ze(t), r = ze(o), i = ze(e), a = xn(
5237
+ const s = ze(t), r = ze(o), i = ze(e), a = $n(
5196
5238
  { start: s.startColumn, end: s.endColumn },
5197
5239
  { start: r.startColumn, end: r.endColumn },
5198
5240
  { start: i.startColumn, end: i.endColumn }
@@ -5648,51 +5690,51 @@ const Sl = (n, e) => {
5648
5690
  }, gs = (n, e) => {
5649
5691
  let t = [];
5650
5692
  switch (e.id) {
5651
- case $.DeleteRangeMoveLeftCommandId: {
5693
+ case W.DeleteRangeMoveLeftCommandId: {
5652
5694
  t = yl(e, n);
5653
5695
  break;
5654
5696
  }
5655
- case $.DeleteRangeMoveUpCommandId: {
5697
+ case W.DeleteRangeMoveUpCommandId: {
5656
5698
  t = El(e, n);
5657
5699
  break;
5658
5700
  }
5659
- case $.InsertColCommandId: {
5701
+ case W.InsertColCommandId: {
5660
5702
  t = wl(e, n);
5661
5703
  break;
5662
5704
  }
5663
- case $.InsertRangeMoveDownCommandId: {
5705
+ case W.InsertRangeMoveDownCommandId: {
5664
5706
  t = Il(e, n);
5665
5707
  break;
5666
5708
  }
5667
- case $.InsertRangeMoveRightCommandId: {
5709
+ case W.InsertRangeMoveRightCommandId: {
5668
5710
  t = Ml(e, n);
5669
5711
  break;
5670
5712
  }
5671
- case $.InsertRowCommandId: {
5713
+ case W.InsertRowCommandId: {
5672
5714
  t = Sl(e, n);
5673
5715
  break;
5674
5716
  }
5675
- case $.MoveColsCommandId: {
5717
+ case W.MoveColsCommandId: {
5676
5718
  t = Lr(e, n);
5677
5719
  break;
5678
5720
  }
5679
- case $.MoveRangeCommandId: {
5721
+ case W.MoveRangeCommandId: {
5680
5722
  t = ml(e, n);
5681
5723
  break;
5682
5724
  }
5683
- case $.MoveRowsCommandId: {
5725
+ case W.MoveRowsCommandId: {
5684
5726
  t = Vr(e, n);
5685
5727
  break;
5686
5728
  }
5687
- case $.RemoveColCommandId: {
5729
+ case W.RemoveColCommandId: {
5688
5730
  t = Hr(e, n);
5689
5731
  break;
5690
5732
  }
5691
- case $.RemoveRowCommandId: {
5733
+ case W.RemoveRowCommandId: {
5692
5734
  t = Rl(e, n);
5693
5735
  break;
5694
5736
  }
5695
- case $.ReorderRangeCommandId: {
5737
+ case W.ReorderRangeCommandId: {
5696
5738
  t = Cl(e, n);
5697
5739
  break;
5698
5740
  }
@@ -5701,31 +5743,31 @@ const Sl = (n, e) => {
5701
5743
  }, kh = (n, e, t) => [St.id, wt.id].includes(e.id) || Fr(e, t).some((r) => O.intersects(r, n)) ? gs(n, e) : n, ms = (n, e) => {
5702
5744
  let t = [];
5703
5745
  switch (e.id) {
5704
- case $.DeleteRangeMoveLeftCommandId:
5746
+ case W.DeleteRangeMoveLeftCommandId:
5705
5747
  return bl(e, n);
5706
- case $.DeleteRangeMoveUpCommandId:
5748
+ case W.DeleteRangeMoveUpCommandId:
5707
5749
  return Ul(e, n);
5708
- case $.InsertRangeMoveDownCommandId:
5750
+ case W.InsertRangeMoveDownCommandId:
5709
5751
  return vl(e, n);
5710
- case $.InsertRangeMoveRightCommandId:
5752
+ case W.InsertRangeMoveRightCommandId:
5711
5753
  return _l(e, n);
5712
- case $.InsertColCommandId:
5754
+ case W.InsertColCommandId:
5713
5755
  return Pl(e, n);
5714
- case $.InsertRowCommandId:
5756
+ case W.InsertRowCommandId:
5715
5757
  return Tl(e, n);
5716
- case $.MoveColsCommandId:
5758
+ case W.MoveColsCommandId:
5717
5759
  return gl(e, n);
5718
- case $.MoveRangeCommandId:
5760
+ case W.MoveRangeCommandId:
5719
5761
  return fl(e, n);
5720
- case $.MoveRowsCommandId:
5762
+ case W.MoveRowsCommandId:
5721
5763
  return dl(e, n);
5722
- case $.ReorderRangeCommandId:
5764
+ case W.ReorderRangeCommandId:
5723
5765
  return hl(e, n);
5724
- case $.RemoveColCommandId: {
5766
+ case W.RemoveColCommandId: {
5725
5767
  t = Hr(e, n);
5726
5768
  break;
5727
5769
  }
5728
- case $.RemoveRowCommandId:
5770
+ case W.RemoveRowCommandId:
5729
5771
  return kl(e.params, n);
5730
5772
  }
5731
5773
  const o = Pt(t, n);
@@ -5739,18 +5781,18 @@ function Ol(n, e) {
5739
5781
  type: Q.Unknown
5740
5782
  };
5741
5783
  switch (t) {
5742
- case Wt.id:
5784
+ case $t.id:
5743
5785
  s.type = Q.Delete;
5744
5786
  break;
5745
5787
  case ct.id:
5746
- s = xn(
5788
+ s = $n(
5747
5789
  { start: o.sourceRange.startRow, end: o.sourceRange.endRow },
5748
5790
  { start: o.targetRange.startRow, end: o.targetRange.endRow },
5749
5791
  { start: n.startRow, end: n.endRow }
5750
5792
  ), s.type = Q.VerticalMove;
5751
5793
  break;
5752
5794
  case dt.id:
5753
- s = xn(
5795
+ s = $n(
5754
5796
  { start: o.sourceRange.startColumn, end: o.sourceRange.endColumn },
5755
5797
  { start: o.targetRange.startColumn, end: o.targetRange.endColumn },
5756
5798
  { start: n.startColumn, end: n.endColumn }
@@ -5785,7 +5827,7 @@ function Fr(n, e) {
5785
5827
  var o, s, r, i, a, u;
5786
5828
  const { selectionManagerService: t } = e;
5787
5829
  switch (n.id) {
5788
- case $.MoveColsCommandId: {
5830
+ case W.MoveColsCommandId: {
5789
5831
  const l = n.params;
5790
5832
  return [
5791
5833
  l.fromRange,
@@ -5796,7 +5838,7 @@ function Fr(n, e) {
5796
5838
  }
5797
5839
  ];
5798
5840
  }
5799
- case $.MoveRowsCommandId: {
5841
+ case W.MoveRowsCommandId: {
5800
5842
  const l = n.params;
5801
5843
  return [
5802
5844
  l.fromRange,
@@ -5807,11 +5849,11 @@ function Fr(n, e) {
5807
5849
  }
5808
5850
  ];
5809
5851
  }
5810
- case $.MoveRangeCommandId: {
5852
+ case W.MoveRangeCommandId: {
5811
5853
  const l = n;
5812
5854
  return [l.params.fromRange, l.params.toRange];
5813
5855
  }
5814
- case $.InsertRowCommandId: {
5856
+ case W.InsertRowCommandId: {
5815
5857
  const c = n.params.range;
5816
5858
  return [
5817
5859
  {
@@ -5821,7 +5863,7 @@ function Fr(n, e) {
5821
5863
  }
5822
5864
  ];
5823
5865
  }
5824
- case $.InsertColCommandId: {
5866
+ case W.InsertColCommandId: {
5825
5867
  const c = n.params.range;
5826
5868
  return [
5827
5869
  {
@@ -5831,21 +5873,21 @@ function Fr(n, e) {
5831
5873
  }
5832
5874
  ];
5833
5875
  }
5834
- case $.RemoveRowCommandId:
5876
+ case W.RemoveRowCommandId:
5835
5877
  return [n.params.range];
5836
- case $.RemoveColCommandId:
5878
+ case W.RemoveColCommandId:
5837
5879
  return [n.params.range];
5838
- case $.DeleteRangeMoveUpCommandId:
5839
- case $.InsertRangeMoveDownCommandId: {
5880
+ case W.DeleteRangeMoveUpCommandId:
5881
+ case W.InsertRangeMoveDownCommandId: {
5840
5882
  const c = ((o = n.params) == null ? void 0 : o.range) || ((r = (s = t.getCurrentSelections()) == null ? void 0 : s.map((d) => d.range)) == null ? void 0 : r[0]);
5841
5883
  return c ? [c] : [];
5842
5884
  }
5843
- case $.DeleteRangeMoveLeftCommandId:
5844
- case $.InsertRangeMoveRightCommandId: {
5885
+ case W.DeleteRangeMoveLeftCommandId:
5886
+ case W.InsertRangeMoveRightCommandId: {
5845
5887
  const c = ((i = n.params) == null ? void 0 : i.range) || ((u = (a = t.getCurrentSelections()) == null ? void 0 : a.map((d) => d.range)) == null ? void 0 : u[0]);
5846
5888
  return c ? [c] : [];
5847
5889
  }
5848
- case $.ReorderRangeCommandId: {
5890
+ case W.ReorderRangeCommandId: {
5849
5891
  const l = n, { range: c, order: d } = l.params, h = [];
5850
5892
  for (let g = c.startRow; g <= c.endRow; g++)
5851
5893
  g in d && h.push({
@@ -5916,7 +5958,7 @@ function Ph(n, e) {
5916
5958
  var s, r, i, a, u, l;
5917
5959
  const t = n.get(M), o = n.get(G);
5918
5960
  switch (e.id) {
5919
- case $.MoveColsCommandId: {
5961
+ case W.MoveColsCommandId: {
5920
5962
  const c = e.params, d = P(t, {
5921
5963
  unitId: c.unitId,
5922
5964
  subUnitId: c.subUnitId
@@ -5934,7 +5976,7 @@ function Ph(n, e) {
5934
5976
  ]
5935
5977
  };
5936
5978
  }
5937
- case $.MoveRowsCommandId: {
5979
+ case W.MoveRowsCommandId: {
5938
5980
  const c = e.params, d = P(t, {
5939
5981
  unitId: c.unitId,
5940
5982
  subUnitId: c.subUnitId
@@ -5952,7 +5994,7 @@ function Ph(n, e) {
5952
5994
  ]
5953
5995
  };
5954
5996
  }
5955
- case $.MoveRangeCommandId: {
5997
+ case W.MoveRangeCommandId: {
5956
5998
  const c = e.params, d = P(t);
5957
5999
  return {
5958
6000
  unitId: d.unitId,
@@ -5960,7 +6002,7 @@ function Ph(n, e) {
5960
6002
  ranges: [c.fromRange, c.toRange]
5961
6003
  };
5962
6004
  }
5963
- case $.InsertRowCommandId: {
6005
+ case W.InsertRowCommandId: {
5964
6006
  const c = e.params, d = c.range;
5965
6007
  return {
5966
6008
  unitId: c.unitId,
@@ -5979,7 +6021,7 @@ function Ph(n, e) {
5979
6021
  ]
5980
6022
  };
5981
6023
  }
5982
- case $.InsertColCommandId: {
6024
+ case W.InsertColCommandId: {
5983
6025
  const c = e.params, d = c.range;
5984
6026
  return {
5985
6027
  unitId: c.unitId,
@@ -5998,7 +6040,7 @@ function Ph(n, e) {
5998
6040
  ]
5999
6041
  };
6000
6042
  }
6001
- case $.RemoveRowCommandId: {
6043
+ case W.RemoveRowCommandId: {
6002
6044
  const d = e.params.range, h = P(t);
6003
6045
  return {
6004
6046
  unitId: h.unitId,
@@ -6013,7 +6055,7 @@ function Ph(n, e) {
6013
6055
  ]
6014
6056
  };
6015
6057
  }
6016
- case $.RemoveColCommandId: {
6058
+ case W.RemoveColCommandId: {
6017
6059
  const d = e.params.range, h = P(t);
6018
6060
  return {
6019
6061
  unitId: h.unitId,
@@ -6028,8 +6070,8 @@ function Ph(n, e) {
6028
6070
  ]
6029
6071
  };
6030
6072
  }
6031
- case $.DeleteRangeMoveUpCommandId:
6032
- case $.InsertRangeMoveDownCommandId: {
6073
+ case W.DeleteRangeMoveUpCommandId:
6074
+ case W.InsertRangeMoveDownCommandId: {
6033
6075
  const c = e, d = P(t), h = ((s = c.params) == null ? void 0 : s.range) || ((i = (r = o.getCurrentSelections()) == null ? void 0 : r.map((g) => g.range)) == null ? void 0 : i[0]);
6034
6076
  return h ? {
6035
6077
  unitId: d.unitId,
@@ -6048,8 +6090,8 @@ function Ph(n, e) {
6048
6090
  ranges: []
6049
6091
  };
6050
6092
  }
6051
- case $.DeleteRangeMoveLeftCommandId:
6052
- case $.InsertRangeMoveRightCommandId: {
6093
+ case W.DeleteRangeMoveLeftCommandId:
6094
+ case W.InsertRangeMoveRightCommandId: {
6053
6095
  const d = ((a = e.params) == null ? void 0 : a.range) || ((l = (u = o.getCurrentSelections()) == null ? void 0 : u.map((g) => g.range)) == null ? void 0 : l[0]), h = P(t);
6054
6096
  return d ? {
6055
6097
  unitId: h.unitId,
@@ -6068,7 +6110,7 @@ function Ph(n, e) {
6068
6110
  ranges: []
6069
6111
  };
6070
6112
  }
6071
- case $.ReorderRangeCommandId: {
6113
+ case W.ReorderRangeCommandId: {
6072
6114
  const c = e, { range: d, order: h } = c.params, g = [];
6073
6115
  for (let f = d.startRow; f <= d.endRow; f++)
6074
6116
  f in h && g.push({
@@ -6091,8 +6133,8 @@ var Dl = Object.getOwnPropertyDescriptor, Al = (n, e, t, o) => {
6091
6133
  (i = n[r]) && (s = i(s) || s);
6092
6134
  return s;
6093
6135
  }, Mn = (n, e) => (t, o) => e(t, o, n);
6094
- const xl = ht("MERGE_REDO"), Wl = ht("MERGE_UNDO"), fs = Math.floor(Number.MAX_SAFE_INTEGER / 10);
6095
- class $l extends le {
6136
+ const xl = ht("MERGE_REDO"), $l = ht("MERGE_UNDO"), fs = Math.floor(Number.MAX_SAFE_INTEGER / 10);
6137
+ class Wl extends le {
6096
6138
  constructor(e, t, o, s, r = !1) {
6097
6139
  super(), this._unitId = e, this._subUnitId = t, this._range = o, this._callback = s, this._skipIntersects = r;
6098
6140
  }
@@ -6109,7 +6151,7 @@ class $l extends le {
6109
6151
  if (!this._range)
6110
6152
  return;
6111
6153
  if (this._skipIntersects) {
6112
- if (e.id === Wt.id)
6154
+ if (e.id === $t.id)
6113
6155
  return;
6114
6156
  const i = Nl(e);
6115
6157
  if (i != null && i.some((a) => O.intersects(a, this._range)))
@@ -6125,7 +6167,7 @@ class $l extends le {
6125
6167
  let Ot = class extends le {
6126
6168
  constructor(e, t, o, s) {
6127
6169
  super();
6128
- R(this, "interceptor", new Po({ MERGE_REDO: xl, MERGE_UNDO: Wl }));
6170
+ R(this, "interceptor", new Po({ MERGE_REDO: xl, MERGE_UNDO: $l }));
6129
6171
  R(this, "_watchRanges", /* @__PURE__ */ new Set());
6130
6172
  R(this, "_refRangeManagerMap", /* @__PURE__ */ new Map());
6131
6173
  R(this, "_serializer", Vl());
@@ -6134,12 +6176,12 @@ let Ot = class extends le {
6134
6176
  this._sheetInterceptorService.interceptCommand({
6135
6177
  // eslint-disable-next-line max-lines-per-function
6136
6178
  getMutations: (e) => {
6137
- const t = this._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET).getActiveSheet(), o = Rs(this._univerInstanceService), s = Cs(this._univerInstanceService);
6179
+ const t = this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getActiveSheet(), o = Rs(this._univerInstanceService), s = Cs(this._univerInstanceService);
6138
6180
  if (!t || !o || !s)
6139
6181
  return { redos: [], undos: [], preRedos: [], preUndos: [] };
6140
6182
  const a = ((() => {
6141
6183
  switch (e.id) {
6142
- case $.MoveColsCommandId: {
6184
+ case W.MoveColsCommandId: {
6143
6185
  const h = e.params, g = Math.min(h.fromRange.startColumn, h.toRange.startColumn);
6144
6186
  return this._checkRange(
6145
6187
  [{ ...h.fromRange, startColumn: g, endColumn: t.getColumnCount() - 1 }],
@@ -6147,7 +6189,7 @@ let Ot = class extends le {
6147
6189
  s
6148
6190
  );
6149
6191
  }
6150
- case $.MoveRowsCommandId: {
6192
+ case W.MoveRowsCommandId: {
6151
6193
  const h = e.params, g = Math.min(h.fromRange.startRow, h.toRange.startRow);
6152
6194
  return this._checkRange(
6153
6195
  [{ ...h.fromRange, startRow: g, endRow: t.getRowCount() - 1 }],
@@ -6155,7 +6197,7 @@ let Ot = class extends le {
6155
6197
  s
6156
6198
  );
6157
6199
  }
6158
- case $.MoveRangeCommandId: {
6200
+ case W.MoveRangeCommandId: {
6159
6201
  const h = e;
6160
6202
  return this._checkRange(
6161
6203
  [h.params.fromRange, h.params.toRange],
@@ -6163,48 +6205,48 @@ let Ot = class extends le {
6163
6205
  s
6164
6206
  );
6165
6207
  }
6166
- case $.InsertRowCommandId: {
6208
+ case W.InsertRowCommandId: {
6167
6209
  const m = {
6168
6210
  startRow: e.params.range.startRow,
6169
6211
  endRow: t.getRowCount() - 1,
6170
6212
  startColumn: 0,
6171
6213
  endColumn: t.getColumnCount() - 1,
6172
- rangeType: B.ROW
6214
+ rangeType: j.ROW
6173
6215
  };
6174
6216
  return this._checkRange([m], o, s);
6175
6217
  }
6176
- case $.InsertColCommandId: {
6218
+ case W.InsertColCommandId: {
6177
6219
  const g = e.params.range.startColumn, m = {
6178
6220
  startRow: 0,
6179
6221
  endRow: t.getRowCount() - 1,
6180
6222
  startColumn: g,
6181
6223
  endColumn: t.getColumnCount() - 1,
6182
- rangeType: B.COLUMN
6224
+ rangeType: j.COLUMN
6183
6225
  };
6184
6226
  return this._checkRange([m], o, s);
6185
6227
  }
6186
- case $.RemoveRowCommandId: {
6228
+ case W.RemoveRowCommandId: {
6187
6229
  const m = {
6188
6230
  startRow: e.params.range.startRow,
6189
6231
  endRow: t.getRowCount() - 1,
6190
6232
  startColumn: 0,
6191
6233
  endColumn: t.getColumnCount() - 1,
6192
- rangeType: B.ROW
6234
+ rangeType: j.ROW
6193
6235
  };
6194
6236
  return this._checkRange([m], o, s);
6195
6237
  }
6196
- case $.RemoveColCommandId: {
6238
+ case W.RemoveColCommandId: {
6197
6239
  const g = e.params.range.startColumn, m = {
6198
6240
  startRow: 0,
6199
6241
  endRow: t.getRowCount() - 1,
6200
6242
  startColumn: g,
6201
6243
  endColumn: t.getColumnCount() - 1,
6202
- rangeType: B.COLUMN
6244
+ rangeType: j.COLUMN
6203
6245
  };
6204
6246
  return this._checkRange([m], o, s);
6205
6247
  }
6206
- case $.DeleteRangeMoveUpCommandId:
6207
- case $.InsertRangeMoveDownCommandId: {
6248
+ case W.DeleteRangeMoveUpCommandId:
6249
+ case W.InsertRangeMoveDownCommandId: {
6208
6250
  const g = e.params.range || ps(this._selectionManagerService)[0], m = {
6209
6251
  startRow: g.startRow,
6210
6252
  startColumn: g.startColumn,
@@ -6213,8 +6255,8 @@ let Ot = class extends le {
6213
6255
  };
6214
6256
  return this._checkRange([m], o, s);
6215
6257
  }
6216
- case $.DeleteRangeMoveLeftCommandId:
6217
- case $.InsertRangeMoveRightCommandId: {
6258
+ case W.DeleteRangeMoveLeftCommandId:
6259
+ case W.InsertRangeMoveRightCommandId: {
6218
6260
  const g = e.params.range || ps(this._selectionManagerService)[0], m = {
6219
6261
  startRow: g.startRow,
6220
6262
  startColumn: g.startColumn,
@@ -6223,7 +6265,7 @@ let Ot = class extends le {
6223
6265
  };
6224
6266
  return this._checkRange([m], o, s);
6225
6267
  }
6226
- case $.ReorderRangeCommandId: {
6268
+ case W.ReorderRangeCommandId: {
6227
6269
  const h = e, { range: g, order: m } = h.params, f = [];
6228
6270
  for (let C = g.startRow; C <= g.endRow; C++)
6229
6271
  C in m && f.push({
@@ -6321,7 +6363,7 @@ let Ot = class extends le {
6321
6363
  for (const d of this._watchRanges)
6322
6364
  d.onMutation(c);
6323
6365
  }));
6324
- const a = new $l(e, t, o, s, r);
6366
+ const a = new Wl(e, t, o, s, r);
6325
6367
  this._watchRanges.add(a);
6326
6368
  const u = Ee(() => {
6327
6369
  this._watchRanges.delete(a), this._watchRanges.size === 0 && (i == null || i.dispose(), i = null);
@@ -6333,16 +6375,16 @@ let Ot = class extends le {
6333
6375
  };
6334
6376
  Ot = Al([
6335
6377
  Mn(0, E),
6336
- Mn(1, W(z)),
6337
- Mn(2, W(M)),
6338
- Mn(3, W(G))
6378
+ Mn(1, $(z)),
6379
+ Mn(2, $(M)),
6380
+ Mn(3, $(G))
6339
6381
  ], Ot);
6340
6382
  function Rs(n) {
6341
- return n.getCurrentUnitForType(j.UNIVER_SHEET).getUnitId();
6383
+ return n.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId();
6342
6384
  }
6343
6385
  function Cs(n) {
6344
6386
  var e;
6345
- return (e = n.getCurrentUnitForType(j.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
6387
+ return (e = n.getCurrentUnitForType(B.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
6346
6388
  }
6347
6389
  function ps(n) {
6348
6390
  var e;
@@ -6425,8 +6467,8 @@ let Wn = class extends le {
6425
6467
  var o;
6426
6468
  switch (t.id) {
6427
6469
  case xo.id:
6428
- case Wo.id: {
6429
- const s = e._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET), r = s.getUnitId(), i = s == null ? void 0 : s.getActiveSheet();
6470
+ case $o.id: {
6471
+ const s = e._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET), r = s.getUnitId(), i = s == null ? void 0 : s.getActiveSheet();
6430
6472
  if (!i)
6431
6473
  return { redos: [], undos: [] };
6432
6474
  const a = i.getSheetId(), u = i.getConfig().mergeData, l = (o = e._selectionManagerService.getCurrentSelections()) == null ? void 0 : o.map((c) => c.range);
@@ -6477,11 +6519,11 @@ let Wn = class extends le {
6477
6519
  }
6478
6520
  refRangeHandle(e, t, o) {
6479
6521
  switch (e.id) {
6480
- case $.MoveColsCommandId: {
6522
+ case W.MoveColsCommandId: {
6481
6523
  const s = e.params;
6482
6524
  return this._handleMoveColsCommand(s, t, o);
6483
6525
  }
6484
- case $.MoveRowsCommandId: {
6526
+ case W.MoveRowsCommandId: {
6485
6527
  const s = e.params;
6486
6528
  return this._handleMoveRowsCommand(s, t, o);
6487
6529
  }
@@ -6493,11 +6535,11 @@ let Wn = class extends le {
6493
6535
  const s = e.params, r = s.unitId || t, i = s.subUnitId || o;
6494
6536
  return this._handleInsertColCommand(s, r, i);
6495
6537
  }
6496
- case lo.id: {
6538
+ case co.id: {
6497
6539
  const s = e.params;
6498
6540
  return this._handleRemoveColCommand(s, t, o);
6499
6541
  }
6500
- case uo.id: {
6542
+ case lo.id: {
6501
6543
  const s = e.params;
6502
6544
  return this._handleRemoveRowCommand(s, t, o);
6503
6545
  }
@@ -6553,7 +6595,7 @@ let Wn = class extends le {
6553
6595
  e(o.unitId, o.subUnitId);
6554
6596
  }
6555
6597
  })
6556
- ), this._univerInstanceService.getCurrentTypeOfUnit$(j.UNIVER_SHEET).pipe(zi((t) => !!t)).subscribe((t) => {
6598
+ ), this._univerInstanceService.getCurrentTypeOfUnit$(B.UNIVER_SHEET).pipe(zi((t) => !!t)).subscribe((t) => {
6557
6599
  const o = t.getActiveSheet();
6558
6600
  o && e(t.getUnitId(), o.getSheetId());
6559
6601
  });
@@ -6569,7 +6611,7 @@ let Wn = class extends le {
6569
6611
  if (i.forEach((m) => {
6570
6612
  if (c <= m.startRow && d >= m.endRow) {
6571
6613
  a.ranges.push(m);
6572
- const f = Vr({ id: $.MoveRowsCommandId, params: e }, m), C = Pt(f, m);
6614
+ const f = Vr({ id: W.MoveRowsCommandId, params: e }, m), C = Pt(f, m);
6573
6615
  C && u.ranges.push(C);
6574
6616
  }
6575
6617
  }), a.ranges.length === 0)
@@ -6593,7 +6635,7 @@ let Wn = class extends le {
6593
6635
  if (i.forEach((m) => {
6594
6636
  if (c <= m.startColumn && d >= m.endColumn) {
6595
6637
  a.ranges.push(m);
6596
- const f = Lr({ id: $.MoveColsCommandId, params: e }, m), C = Pt(f, m);
6638
+ const f = Lr({ id: W.MoveColsCommandId, params: e }, m), C = Pt(f, m);
6597
6639
  C && u.ranges.push(C);
6598
6640
  }
6599
6641
  }), a.ranges.length === 0)
@@ -7106,15 +7148,15 @@ let Wn = class extends le {
7106
7148
  }
7107
7149
  };
7108
7150
  Wn = Hl([
7109
- vt(0, W(E)),
7110
- vt(1, W(Ot)),
7111
- vt(2, W(M)),
7112
- vt(3, W(no)),
7113
- vt(4, W(z)),
7114
- vt(5, W(G))
7151
+ vt(0, $(E)),
7152
+ vt(1, $(Ot)),
7153
+ vt(2, $(M)),
7154
+ vt(3, $(oo)),
7155
+ vt(4, $(z)),
7156
+ vt(5, $(G))
7115
7157
  ], Wn);
7116
7158
  function Oe(n, e) {
7117
- return e ? n.getUniverSheetInstance(e) : n.getCurrentUnitForType(j.UNIVER_SHEET);
7159
+ return e ? n.getUniverSheetInstance(e) : n.getCurrentUnitForType(B.UNIVER_SHEET);
7118
7160
  }
7119
7161
  function Ne(n, e) {
7120
7162
  return e ? n.getSheetBySheetId(e) : n.getActiveSheet();
@@ -7153,7 +7195,7 @@ function Jl(n, e) {
7153
7195
  c && (u !== t || l !== o) && a.setValue(u, l, null);
7154
7196
  }), a;
7155
7197
  }
7156
- const co = {
7198
+ const ho = {
7157
7199
  type: v.COMMAND,
7158
7200
  id: "sheet.command.add-worksheet-merge",
7159
7201
  handler: (n, e) => {
@@ -7186,12 +7228,12 @@ const co = {
7186
7228
  const e = n.get(E), o = (l = n.get(G).getCurrentSelections()) == null ? void 0 : l.map((c) => c.range);
7187
7229
  if (!(o != null && o.length))
7188
7230
  return !1;
7189
- const r = n.get(M).getCurrentUnitForType(j.UNIVER_SHEET);
7231
+ const r = n.get(M).getCurrentUnitForType(B.UNIVER_SHEET);
7190
7232
  if (!r) return !1;
7191
7233
  const i = r.getActiveSheet();
7192
7234
  if (!i) return !1;
7193
7235
  const a = r.getUnitId(), u = i.getSheetId();
7194
- return e.executeCommand(co.id, {
7236
+ return e.executeCommand(ho.id, {
7195
7237
  selections: o,
7196
7238
  unitId: a,
7197
7239
  subUnitId: u
@@ -7205,12 +7247,12 @@ const co = {
7205
7247
  const e = n.get(E), o = (l = n.get(G).getCurrentSelections()) == null ? void 0 : l.map((c) => c.range);
7206
7248
  if (!(o != null && o.length))
7207
7249
  return !1;
7208
- const r = n.get(M).getCurrentUnitForType(j.UNIVER_SHEET);
7250
+ const r = n.get(M).getCurrentUnitForType(B.UNIVER_SHEET);
7209
7251
  if (!r) return !1;
7210
7252
  const i = r.getActiveSheet();
7211
7253
  if (!i) return !1;
7212
7254
  const a = r.getUnitId(), u = i.getSheetId();
7213
- return e.executeCommand(co.id, {
7255
+ return e.executeCommand(ho.id, {
7214
7256
  value: Re.COLUMNS,
7215
7257
  selections: o,
7216
7258
  unitId: a,
@@ -7225,12 +7267,12 @@ const co = {
7225
7267
  const e = n.get(E), o = (l = n.get(G).getCurrentSelections()) == null ? void 0 : l.map((c) => c.range);
7226
7268
  if (!(o != null && o.length))
7227
7269
  return !1;
7228
- const r = n.get(M).getCurrentUnitForType(j.UNIVER_SHEET);
7270
+ const r = n.get(M).getCurrentUnitForType(B.UNIVER_SHEET);
7229
7271
  if (!r) return !1;
7230
7272
  const i = r.getActiveSheet();
7231
7273
  if (!i) return !1;
7232
7274
  const a = r.getUnitId(), u = i.getSheetId();
7233
- return e.executeCommand(co.id, {
7275
+ return e.executeCommand(ho.id, {
7234
7276
  value: Re.ROWS,
7235
7277
  selections: o,
7236
7278
  unitId: a,
@@ -7244,7 +7286,7 @@ function Ah(n, e, t, o, s) {
7244
7286
  const { worksheet: a } = i;
7245
7287
  if (a.getMergeData().some((d) => o.some((h) => O.intersects(h, d))))
7246
7288
  throw new Error("The ranges to be merged overlap with the existing merged cells");
7247
- n.get(E).executeCommand(co.id, {
7289
+ n.get(E).executeCommand(ho.id, {
7248
7290
  unitId: e,
7249
7291
  subUnitId: t,
7250
7292
  selections: o,
@@ -7417,7 +7459,7 @@ const It = {
7417
7459
  startColumn: c,
7418
7460
  endColumn: c - 1 + u
7419
7461
  }
7420
- }, p = oo(
7462
+ }, p = so(
7421
7463
  n,
7422
7464
  C
7423
7465
  );
@@ -7434,14 +7476,14 @@ const It = {
7434
7476
  type: v.COMMAND,
7435
7477
  handler: (n, e) => {
7436
7478
  var I;
7437
- const t = n.get(M), o = n.get(E), s = n.get(G), r = n.get(V), i = n.get(z), a = t.getCurrentUnitForType(j.UNIVER_SHEET);
7479
+ const t = n.get(M), o = n.get(E), s = n.get(G), r = n.get(V), i = n.get(z), a = t.getCurrentUnitForType(B.UNIVER_SHEET);
7438
7480
  if (!a) return !1;
7439
7481
  const u = (e == null ? void 0 : e.unitId) || a.getUnitId(), l = a.getActiveSheet();
7440
7482
  if (!l) return !1;
7441
7483
  const c = (e == null ? void 0 : e.subUnitId) || l.getSheetId(), d = (e == null ? void 0 : e.ranges) || ((I = s.getCurrentSelections()) == null ? void 0 : I.map((S) => S.range));
7442
7484
  if (!(d != null && d.length))
7443
7485
  return !1;
7444
- const h = ro(d, n, u, c), g = {
7486
+ const h = io(d, n, u, c), g = {
7445
7487
  subUnitId: c,
7446
7488
  unitId: u,
7447
7489
  cellValue: _u(h)
@@ -7494,7 +7536,7 @@ const It = {
7494
7536
  ...C.redos
7495
7537
  ], w = [
7496
7538
  ...(y = C.preUndos) != null ? y : [],
7497
- { id: Wt.id, params: f },
7539
+ { id: $t.id, params: f },
7498
7540
  ...C.undos
7499
7541
  ];
7500
7542
  return L(p, t).result ? (o.pushUndoRedo({
@@ -7505,9 +7547,9 @@ const It = {
7505
7547
  }
7506
7548
  };
7507
7549
  function Ql(n, e, t) {
7508
- let o = t + e.t("sheets.tabs.sheetCopy", ""), s = 2;
7550
+ let o = `${t} ${e.t("sheets.tabs.sheetCopy", "")}`, s = 2;
7509
7551
  for (; n.checkSheetName(o); )
7510
- o = t + e.t("sheets.tabs.sheetCopy", `${s}`), s++;
7552
+ o = `${t} ${e.t("sheets.tabs.sheetCopy", `${s}`)}`, s++;
7511
7553
  return o;
7512
7554
  }
7513
7555
  const ec = {
@@ -7567,7 +7609,7 @@ const ec = {
7567
7609
  };
7568
7610
  return t.syncExecuteCommand(Qt.id, s) ? (o.pushUndoRedo({
7569
7611
  unitID: e.unitId,
7570
- undoMutations: [{ id: Tn.id, params: s }],
7612
+ undoMutations: [{ id: Pn.id, params: s }],
7571
7613
  redoMutations: [{ id: Qt.id, params: s }]
7572
7614
  }), !0) : !1;
7573
7615
  }
@@ -7592,7 +7634,7 @@ const ec = {
7592
7634
  );
7593
7635
  return t.syncExecuteCommand(un.id, g) ? (o.pushUndoRedo({
7594
7636
  unitID: a,
7595
- undoMutations: [{ id: Wt.id, params: m }],
7637
+ undoMutations: [{ id: $t.id, params: m }],
7596
7638
  redoMutations: [{ id: un.id, params: g }]
7597
7639
  }), !0) : !1;
7598
7640
  }
@@ -7645,7 +7687,7 @@ const ec = {
7645
7687
  ...e
7646
7688
  }, i = s.onCommandExecute({ id: zr.id, params: e }), a = [
7647
7689
  ...(c = i.preRedos) != null ? c : [],
7648
- { id: Tn.id, params: r },
7690
+ { id: Pn.id, params: r },
7649
7691
  ...i.redos
7650
7692
  ], u = [
7651
7693
  ...(d = i.preUndos) != null ? d : [],
@@ -7677,7 +7719,7 @@ const ec = {
7677
7719
  ), g = r.onCommandExecute({
7678
7720
  id: Jo.id,
7679
7721
  params: { unitId: a, subUnitId: u }
7680
- }), m = [...(p = g.preRedos) != null ? p : [], { id: Wt.id, params: d }, ...g.redos], f = [...(w = g.preUndos) != null ? w : [], { id: un.id, params: h }, ...g.undos];
7722
+ }), m = [...(p = g.preRedos) != null ? p : [], { id: $t.id, params: d }, ...g.redos], f = [...(w = g.preUndos) != null ? w : [], { id: un.id, params: h }, ...g.undos];
7681
7723
  return L(m, t).result ? (o.pushUndoRedo({
7682
7724
  unitID: a,
7683
7725
  undoMutations: f,
@@ -7753,7 +7795,7 @@ function ac(n, e) {
7753
7795
  undoParams: o
7754
7796
  };
7755
7797
  }
7756
- class $t {
7798
+ class Wt {
7757
7799
  constructor() {
7758
7800
  R(this, "_borderInfo", {
7759
7801
  type: de.ALL,
@@ -7786,7 +7828,7 @@ class $t {
7786
7828
  this._borderInfo$.next(this._borderInfo);
7787
7829
  }
7788
7830
  }
7789
- function $n(n, e) {
7831
+ function Vn(n, e) {
7790
7832
  const { startRow: t, startColumn: o, endRow: s, endColumn: r } = n;
7791
7833
  for (let i = t; i <= s; i++)
7792
7834
  for (let a = o; a <= r; a++)
@@ -7794,7 +7836,7 @@ function $n(n, e) {
7794
7836
  }
7795
7837
  const Yo = (n, e, t, o) => {
7796
7838
  const { mr: s, worksheet: r } = n;
7797
- e.startRow < 0 || e.startColumn < 0 || $n(e, (i, a) => {
7839
+ e.startRow < 0 || e.startColumn < 0 || Vn(e, (i, a) => {
7798
7840
  var c, d;
7799
7841
  const u = r.getMergedCell(i, a);
7800
7842
  let l = t;
@@ -7921,7 +7963,7 @@ function lc(n, e, t) {
7921
7963
  }
7922
7964
  const cc = (n) => {
7923
7965
  const { range: e, mr: t, borderStyle: o, vertical: s, horizontal: r, worksheet: i } = n;
7924
- s && $n(e, (a, u) => {
7966
+ s && Vn(e, (a, u) => {
7925
7967
  var c, d, h;
7926
7968
  const l = i.getMergedCell(a, u);
7927
7969
  if (l) {
@@ -7949,7 +7991,7 @@ const cc = (n) => {
7949
7991
  });
7950
7992
  }
7951
7993
  }
7952
- }), r && $n(e, (a, u) => {
7994
+ }), r && Vn(e, (a, u) => {
7953
7995
  var c, d, h;
7954
7996
  const l = i.getMergedCell(a, u);
7955
7997
  if (l) {
@@ -7994,7 +8036,7 @@ const hc = (n) => {
7994
8036
  const { range: e, worksheet: t, mr: o, top: s, bottom: r, left: i, right: a, vertical: u, horizontal: l, tl_br: c, tl_bc: d, tl_mr: h, bl_tr: g, ml_tr: m, bc_tr: f, topRange: C, bottomRange: p, leftRange: w, rightRange: I, topRangeOut: S, bottomRangeOut: y, leftRangeOut: b, rightRangeOut: N } = n, k = (T, U, D) => {
7995
8037
  Yo(n, T, U, D);
7996
8038
  };
7997
- !s && !r && !i && !a && !u && !l && !c && !d && !h && !g && !m && !f && ($n(e, (T, U) => {
8039
+ !s && !r && !i && !a && !u && !l && !c && !d && !h && !g && !m && !f && (Vn(e, (T, U) => {
7998
8040
  var H, F, K, J, ae, se, ue, Se;
7999
8041
  const D = t.getMergedCell(T, U);
8000
8042
  if (D) {
@@ -8070,7 +8112,7 @@ const hc = (n) => {
8070
8112
  type: v.COMMAND,
8071
8113
  handler: (n, e) => {
8072
8114
  var p;
8073
- const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(G), i = n.get($t), a = P(s, e);
8115
+ const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(G), i = n.get(Wt), a = P(s, e);
8074
8116
  if (!a) return !1;
8075
8117
  const u = (e == null ? void 0 : e.ranges) || ((p = r.getCurrentSelections()) == null ? void 0 : p.map((w) => w.range));
8076
8118
  if (!(u != null && u.length))
@@ -8099,27 +8141,27 @@ const hc = (n) => {
8099
8141
  handler: (n, e) => {
8100
8142
  if (!e.value) return !1;
8101
8143
  const t = n.get(E);
8102
- return n.get($t).setType(e.value), t.syncExecuteCommand(Sn.id);
8144
+ return n.get(Wt).setType(e.value), t.syncExecuteCommand(Sn.id);
8103
8145
  }
8104
8146
  }, fc = {
8105
8147
  id: "sheet.command.set-border-style",
8106
8148
  type: v.COMMAND,
8107
8149
  handler: (n, e) => {
8108
8150
  const t = n.get(E);
8109
- return n.get($t).setStyle(e.value), t.syncExecuteCommand(Sn.id);
8151
+ return n.get(Wt).setStyle(e.value), t.syncExecuteCommand(Sn.id);
8110
8152
  }
8111
8153
  }, Rc = {
8112
8154
  id: "sheet.command.set-border-color",
8113
8155
  type: v.COMMAND,
8114
8156
  handler: (n, e) => {
8115
8157
  const t = n.get(E);
8116
- return n.get($t).setColor(e.value), t.syncExecuteCommand(Sn.id);
8158
+ return n.get(Wt).setColor(e.value), t.syncExecuteCommand(Sn.id);
8117
8159
  }
8118
8160
  }, Cc = {
8119
8161
  id: "sheet.command.set-border-basic",
8120
8162
  type: v.COMMAND,
8121
8163
  handler: (n, e) => {
8122
- const { unitId: t, subUnitId: o, value: s, ranges: r } = e, { type: i, color: a, style: u } = s, l = n.get(E), c = n.get($t);
8164
+ const { unitId: t, subUnitId: o, value: s, ranges: r } = e, { type: i, color: a, style: u } = s, l = n.get(E), c = n.get(Wt);
8123
8165
  return c.setType(i), a && c.setColor(a), c.setStyle(u), l.syncExecuteCommand(Sn.id, {
8124
8166
  unitId: t,
8125
8167
  subUnitId: o,
@@ -8203,7 +8245,7 @@ const hc = (n) => {
8203
8245
  id: "sheet.command.set-selected-cols-visible",
8204
8246
  handler: (n) => {
8205
8247
  var l;
8206
- const e = n.get(G), t = n.get(E), o = (l = e.getCurrentSelections()) == null ? void 0 : l.map((c) => c.range).filter((c) => c.rangeType === B.COLUMN);
8248
+ const e = n.get(G), t = n.get(E), o = (l = e.getCurrentSelections()) == null ? void 0 : l.map((c) => c.range).filter((c) => c.rangeType === j.COLUMN);
8207
8249
  if (!(o != null && o.length)) return !1;
8208
8250
  const s = P(n.get(M));
8209
8251
  if (!s) return !1;
@@ -8220,7 +8262,7 @@ const hc = (n) => {
8220
8262
  handler: (n, e) => {
8221
8263
  var w, I, S, y;
8222
8264
  const t = n.get(G), o = n.get(z), s = n.get(M), r = n.get(E);
8223
- let i = (w = e == null ? void 0 : e.ranges) != null && w.length ? e.ranges : (I = t.getCurrentSelections()) == null ? void 0 : I.map((b) => b.range).filter((b) => b.rangeType === B.COLUMN);
8265
+ let i = (w = e == null ? void 0 : e.ranges) != null && w.length ? e.ranges : (I = t.getCurrentSelections()) == null ? void 0 : I.map((b) => b.range).filter((b) => b.rangeType === j.COLUMN);
8224
8266
  if (!(i != null && i.length)) return !1;
8225
8267
  const a = P(s, e);
8226
8268
  if (!a) return !1;
@@ -8320,12 +8362,12 @@ const Yr = {
8320
8362
  ...e
8321
8363
  }, i = Ki(n, e), a = s.onCommandExecute({ id: Yr.id, params: e }), u = [
8322
8364
  ...(d = a.preRedos) != null ? d : [],
8323
- { id: Tn.id, params: i },
8365
+ { id: Pn.id, params: i },
8324
8366
  { id: Qt.id, params: r },
8325
8367
  ...a.redos
8326
8368
  ], l = [
8327
8369
  ...(h = a.preUndos) != null ? h : [],
8328
- { id: Tn.id, params: r },
8370
+ { id: Pn.id, params: r },
8329
8371
  { id: Qt.id, params: i },
8330
8372
  ...a.undos
8331
8373
  ];
@@ -8540,7 +8582,7 @@ const Yr = {
8540
8582
  id: "sheet.command.set-selected-rows-visible",
8541
8583
  handler: async (n) => {
8542
8584
  var c;
8543
- const e = n.get(G), t = n.get(M), o = n.get(E), s = (c = e.getCurrentSelections()) == null ? void 0 : c.map((d) => d.range).filter((d) => d.rangeType === B.ROW);
8585
+ const e = n.get(G), t = n.get(M), o = n.get(E), s = (c = e.getCurrentSelections()) == null ? void 0 : c.map((d) => d.range).filter((d) => d.rangeType === j.ROW);
8544
8586
  if (!(s != null && s.length)) return !1;
8545
8587
  const r = P(t);
8546
8588
  if (!r) return !1;
@@ -8557,7 +8599,7 @@ const Yr = {
8557
8599
  handler: (n, e) => {
8558
8600
  var w, I, S, y, b, N;
8559
8601
  const t = n.get(G), o = n.get(E), s = n.get(V), r = n.get(M), i = n.get(z);
8560
- let a = (w = e == null ? void 0 : e.ranges) != null && w.length ? e.ranges : (I = t.getCurrentSelections()) == null ? void 0 : I.map((k) => k.range).filter((k) => k.rangeType === B.ROW);
8602
+ let a = (w = e == null ? void 0 : e.ranges) != null && w.length ? e.ranges : (I = t.getCurrentSelections()) == null ? void 0 : I.map((k) => k.range).filter((k) => k.rangeType === j.ROW);
8561
8603
  if (!(a != null && a.length)) return !1;
8562
8604
  const u = P(r, e);
8563
8605
  if (!u) return !1;
@@ -8708,7 +8750,7 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
8708
8750
  redoMutations: [{ id: ee.id, params: f }, ...N, ...y]
8709
8751
  }), !0) : !1;
8710
8752
  }
8711
- }, Wh = {
8753
+ }, $h = {
8712
8754
  type: v.COMMAND,
8713
8755
  id: "sheet.command.set-bold",
8714
8756
  handler: (n) => {
@@ -8724,7 +8766,7 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
8724
8766
  };
8725
8767
  return n.get(E).syncExecuteCommand(Ce.id, a);
8726
8768
  }
8727
- }, $h = {
8769
+ }, Wh = {
8728
8770
  type: v.COMMAND,
8729
8771
  id: "sheet.command.set-italic",
8730
8772
  handler: (n) => {
@@ -8965,13 +9007,13 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
8965
9007
  };
8966
9008
  return o.syncExecuteCommand(Ce.id, s);
8967
9009
  }
8968
- }, Wc = (n, e) => {
9010
+ }, $c = (n, e) => {
8969
9011
  const r = n.get(M).getUniverSheetInstance(e.unitId).getSheetBySheetId(e.subUnitId).getConfig().tabColor;
8970
9012
  return {
8971
9013
  ...A.deepClone(e),
8972
9014
  color: r
8973
9015
  };
8974
- }, En = {
9016
+ }, Un = {
8975
9017
  id: "sheet.mutation.set-tab-color",
8976
9018
  type: v.MUTATION,
8977
9019
  handler: (n, e) => {
@@ -8980,7 +9022,7 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
8980
9022
  const o = t.getSheetBySheetId(e.subUnitId);
8981
9023
  return o ? (o.getConfig().tabColor = e.color, !0) : !1;
8982
9024
  }
8983
- }, $c = {
9025
+ }, Wc = {
8984
9026
  type: v.COMMAND,
8985
9027
  id: "sheet.command.set-tab-color",
8986
9028
  handler: (n, e) => {
@@ -8990,18 +9032,18 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
8990
9032
  color: e.value,
8991
9033
  unitId: r,
8992
9034
  subUnitId: i
8993
- }, u = Wc(n, a);
8994
- return t.syncExecuteCommand(En.id, a) ? (o.pushUndoRedo({
9035
+ }, u = $c(n, a);
9036
+ return t.syncExecuteCommand(Un.id, a) ? (o.pushUndoRedo({
8995
9037
  unitID: r,
8996
- undoMutations: [{ id: En.id, params: u }],
8997
- redoMutations: [{ id: En.id, params: a }]
9038
+ undoMutations: [{ id: Un.id, params: u }],
9039
+ redoMutations: [{ id: Un.id, params: a }]
8998
9040
  }), !0) : !1;
8999
9041
  }
9000
9042
  }, Qr = {
9001
9043
  id: "sheet.mutation.set-workbook-name",
9002
9044
  type: v.MUTATION,
9003
9045
  handler: (n, e) => {
9004
- const t = n.get(M).getUnit(e.unitId, j.UNIVER_SHEET);
9046
+ const t = n.get(M).getUnit(e.unitId, B.UNIVER_SHEET);
9005
9047
  return t ? (t.setName(e.name), !0) : !1;
9006
9048
  }
9007
9049
  }, ei = {
@@ -9041,7 +9083,7 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
9041
9083
  }, Vc);
9042
9084
  });
9043
9085
  }
9044
- }, Vn = {
9086
+ }, Ln = {
9045
9087
  type: v.COMMAND,
9046
9088
  id: "sheet.command.delta-column-width",
9047
9089
  // eslint-disable-next-line max-lines-per-function
@@ -9051,12 +9093,12 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
9051
9093
  return !1;
9052
9094
  const s = n.get(E), r = n.get(V), i = P(n.get(M));
9053
9095
  if (!i) return !1;
9054
- const { worksheet: a, unitId: u, subUnitId: l } = i, { anchorCol: c, deltaX: d } = e, g = a.getColumnWidth(c) + d, m = o.length === 1 && o[0].range.rangeType === B.ALL, f = o.filter((J) => J.range.rangeType === B.COLUMN), C = m ? B.ALL : f.some(({ range: J }) => {
9096
+ const { worksheet: a, unitId: u, subUnitId: l } = i, { anchorCol: c, deltaX: d } = e, g = a.getColumnWidth(c) + d, m = o.length === 1 && o[0].range.rangeType === j.ALL, f = o.filter((J) => J.range.rangeType === j.COLUMN), C = m ? j.ALL : f.some(({ range: J }) => {
9055
9097
  const { startColumn: ae, endColumn: se } = J;
9056
9098
  return ae <= c && c <= se;
9057
- }) ? B.COLUMN : B.NORMAL;
9099
+ }) ? j.COLUMN : j.NORMAL;
9058
9100
  let p;
9059
- if (C === B.ALL) {
9101
+ if (C === j.ALL) {
9060
9102
  const J = a.getRowCount(), ae = new Array(a.getColumnCount()).fill(void 0).map(
9061
9103
  (se, ue) => ({ startRow: 0, endRow: J - 1, startColumn: ue, endColumn: ue })
9062
9104
  );
@@ -9066,7 +9108,7 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
9066
9108
  colWidth: g,
9067
9109
  ranges: ae
9068
9110
  };
9069
- } else C === B.COLUMN ? p = {
9111
+ } else C === j.COLUMN ? p = {
9070
9112
  subUnitId: l,
9071
9113
  unitId: u,
9072
9114
  ranges: f.map((J) => O.clone(J.range)),
@@ -9087,7 +9129,7 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
9087
9129
  const w = n.get(et).getSkeleton(u, l), { suitableRanges: I, remainingRanges: S } = pn(p.ranges, w);
9088
9130
  Go(I, a);
9089
9131
  const y = n.get(z), { undos: b, redos: N } = y.onCommandExecute({
9090
- id: Vn.id,
9132
+ id: Ln.id,
9091
9133
  params: p
9092
9134
  }), k = Ks(
9093
9135
  p,
@@ -9102,7 +9144,7 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
9102
9144
  autoHeightRanges: I,
9103
9145
  lazyAutoHeightRanges: S
9104
9146
  }), { undos: H, redos: F } = n.get(z).afterCommandExecute({
9105
- id: Vn.id,
9147
+ id: Ln.id,
9106
9148
  params: p
9107
9149
  }), K = L([...N, ...F, ...D], s);
9108
9150
  return T && K.result && r.pushUndoRedo({
@@ -9111,7 +9153,7 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
9111
9153
  redoMutations: [{ id: lt.id, params: p }, ...N, ...F, ...D]
9112
9154
  }), !0;
9113
9155
  }
9114
- }, Ln = {
9156
+ }, Hn = {
9115
9157
  type: v.COMMAND,
9116
9158
  id: "sheet.command.set-worksheet-col-width",
9117
9159
  handler: (n, e) => {
@@ -9134,12 +9176,12 @@ const Uc = ["ff", "fs", "tr", "tb"], Ce = {
9134
9176
  autoHeightRanges: g,
9135
9177
  lazyAutoHeightRanges: m
9136
9178
  }), I = r.onCommandExecute({
9137
- id: Ln.id,
9179
+ id: Hn.id,
9138
9180
  params: h
9139
9181
  }), S = L([...I.redos, ...w], o);
9140
9182
  if (C && S.result) {
9141
9183
  const T = r.afterCommandExecute({
9142
- id: Ln.id,
9184
+ id: Hn.id,
9143
9185
  params: h
9144
9186
  });
9145
9187
  return L(T.redos, o), s.pushUndoRedo({
@@ -9241,7 +9283,7 @@ const Lc = {
9241
9283
  name: o.getName(),
9242
9284
  subUnitId: o.getSheetId()
9243
9285
  };
9244
- }, Hn = {
9286
+ }, Fn = {
9245
9287
  id: "sheet.mutation.set-worksheet-name",
9246
9288
  type: v.MUTATION,
9247
9289
  handler: (n, e) => {
@@ -9270,11 +9312,11 @@ const Lc = {
9270
9312
  params: e
9271
9313
  }), d = [
9272
9314
  ...(m = c.preRedos) != null ? m : [],
9273
- { id: Hn.id, params: u },
9315
+ { id: Fn.id, params: u },
9274
9316
  ...c.redos
9275
9317
  ], h = [
9276
9318
  ...(f = c.preUndos) != null ? f : [],
9277
- { id: Hn.id, params: l },
9319
+ { id: Fn.id, params: l },
9278
9320
  ...c.undos
9279
9321
  ];
9280
9322
  return L(d, t).result ? (o.pushUndoRedo({
@@ -9287,7 +9329,7 @@ const Lc = {
9287
9329
  ...A.deepClone(e),
9288
9330
  toOrder: e.fromOrder,
9289
9331
  fromOrder: e.toOrder
9290
- }), Un = {
9332
+ }), kn = {
9291
9333
  id: "sheet.mutation.set-worksheet-order",
9292
9334
  type: v.MUTATION,
9293
9335
  handler: (n, e) => {
@@ -9308,10 +9350,10 @@ const Lc = {
9308
9350
  unitId: i,
9309
9351
  subUnitId: a
9310
9352
  }, c = jc(n, l);
9311
- return t.syncExecuteCommand(Un.id, l) ? (o.pushUndoRedo({
9353
+ return t.syncExecuteCommand(kn.id, l) ? (o.pushUndoRedo({
9312
9354
  unitID: i,
9313
- undoMutations: [{ id: Un.id, params: c }],
9314
- redoMutations: [{ id: Un.id, params: l }]
9355
+ undoMutations: [{ id: kn.id, params: c }],
9356
+ redoMutations: [{ id: kn.id, params: l }]
9315
9357
  }), !0) : !1;
9316
9358
  }
9317
9359
  };
@@ -9447,10 +9489,10 @@ const ye = () => [Vo, Ae, ri, si], ft = [_.Edit, _.View, _.ManageCollaborator, _
9447
9489
  _.DeleteColumn
9448
9490
  ], _e = () => [
9449
9491
  xe,
9450
- ao,
9492
+ uo,
9451
9493
  Ir,
9452
9494
  mr
9453
- ], We = () => [
9495
+ ], $e = () => [
9454
9496
  hr,
9455
9497
  gr,
9456
9498
  fr,
@@ -9461,11 +9503,11 @@ const ye = () => [Vo, Ae, ri, si], ft = [_.Edit, _.View, _.ManageCollaborator, _
9461
9503
  Sr,
9462
9504
  vr,
9463
9505
  Mr,
9464
- Nn,
9506
+ Dn,
9465
9507
  qt,
9466
9508
  Xt,
9467
9509
  _r
9468
- ], Ro = [
9510
+ ], Co = [
9469
9511
  _.Copy,
9470
9512
  _.DeleteColumn,
9471
9513
  _.DeleteRow,
@@ -9487,7 +9529,7 @@ var zc = Object.getOwnPropertyDescriptor, Kc = (n, e, t, o) => {
9487
9529
  return s;
9488
9530
  }, rt = (n, e) => (t, o) => e(t, o, n);
9489
9531
  const Jc = "SHEET_WORKSHEET_PROTECTION_PLUGIN", Yc = "SHEET_WORKSHEET_PROTECTION_POINT_PLUGIN";
9490
- let Fn = class extends Ds {
9532
+ let Bn = class extends Ds {
9491
9533
  constructor(n, e, t, o, s, r, i, a) {
9492
9534
  super(), this._permissionService = n, this._univerInstanceService = e, this._injector = t, this._worksheetProtectionRuleModel = o, this._worksheetProtectionPointRuleModel = s, this._resourceManagerService = r, this._rangeProtectionRuleModel = i, this._logService = a, this._init(), this._initRuleChange(), this._initRuleSnapshot(), this._initPointSnapshot();
9493
9535
  }
@@ -9495,7 +9537,7 @@ let Fn = class extends Ds {
9495
9537
  const n = (e) => {
9496
9538
  const t = e.getUnitId(), o = (s) => {
9497
9539
  const r = s.getSheetId();
9498
- [..._e(), ...We()].forEach((i) => {
9540
+ [..._e(), ...$e()].forEach((i) => {
9499
9541
  const a = new i(t, r);
9500
9542
  this._permissionService.addPermissionPoint(a);
9501
9543
  }), this._logService.debug("[WorksheetPermissionService]", "Initialization completed", t, r);
@@ -9511,15 +9553,15 @@ let Fn = class extends Ds {
9511
9553
  const l = new u(t, r, a.permissionId);
9512
9554
  this._permissionService.deletePermissionPoint(l.id);
9513
9555
  });
9514
- }), [..._e(), ...We()].forEach((a) => {
9556
+ }), [..._e(), ...$e()].forEach((a) => {
9515
9557
  const u = new a(t, r);
9516
9558
  this._permissionService.deletePermissionPoint(u.id);
9517
9559
  });
9518
9560
  });
9519
9561
  };
9520
- this._univerInstanceService.getAllUnitsForType(j.UNIVER_SHEET).forEach((e) => {
9562
+ this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).forEach((e) => {
9521
9563
  n(e);
9522
- }), this._univerInstanceService.getTypeOfUnitAdded$(j.UNIVER_SHEET).pipe(ts(this.dispose$)).subscribe(n), this._univerInstanceService.getTypeOfUnitDisposed$(j.UNIVER_SHEET).pipe(ts(this.dispose$)).subscribe((e) => {
9564
+ }), this._univerInstanceService.getTypeOfUnitAdded$(B.UNIVER_SHEET).pipe(ts(this.dispose$)).subscribe(n), this._univerInstanceService.getTypeOfUnitDisposed$(B.UNIVER_SHEET).pipe(ts(this.dispose$)).subscribe((e) => {
9523
9565
  e.getSheets().forEach((t) => {
9524
9566
  const o = e.getUnitId(), s = t.getSheetId();
9525
9567
  _e().forEach((r) => {
@@ -9571,7 +9613,7 @@ let Fn = class extends Ds {
9571
9613
  toJson: n,
9572
9614
  parseJson: e,
9573
9615
  pluginName: Jc,
9574
- businesses: [On.UNIVER_SHEET],
9616
+ businesses: [Nn.UNIVER_SHEET],
9575
9617
  onLoad: (t, o) => {
9576
9618
  this._worksheetProtectionRuleModel.fromObject(o), Object.keys(o).forEach((s) => {
9577
9619
  _e().forEach((r) => {
@@ -9584,7 +9626,7 @@ let Fn = class extends Ds {
9584
9626
  const o = this._univerInstanceService.getUnit(t);
9585
9627
  o && (o.getSheets().forEach((s) => {
9586
9628
  const r = s.getSheetId();
9587
- [..._e(), ...We()].forEach((i) => {
9629
+ [..._e(), ...$e()].forEach((i) => {
9588
9630
  const a = new i(t, r);
9589
9631
  this._permissionService.deletePermissionPoint(a.id);
9590
9632
  });
@@ -9614,10 +9656,10 @@ let Fn = class extends Ds {
9614
9656
  toJson: n,
9615
9657
  parseJson: e,
9616
9658
  pluginName: Yc,
9617
- businesses: [On.UNIVER_SHEET],
9659
+ businesses: [Nn.UNIVER_SHEET],
9618
9660
  onLoad: (t, o) => {
9619
9661
  this._worksheetProtectionPointRuleModel.fromObject(o), Object.keys(o).forEach((s) => {
9620
- We().forEach((r) => {
9662
+ $e().forEach((r) => {
9621
9663
  const i = new r(t, s);
9622
9664
  this._permissionService.addPermissionPoint(i);
9623
9665
  });
@@ -9630,16 +9672,16 @@ let Fn = class extends Ds {
9630
9672
  );
9631
9673
  }
9632
9674
  };
9633
- Fn = Kc([
9634
- rt(0, W(Ye)),
9635
- rt(1, W(M)),
9636
- rt(2, W(no)),
9637
- rt(3, W(st)),
9638
- rt(4, W(wn)),
9639
- rt(5, W(fn)),
9640
- rt(6, W(me)),
9641
- rt(7, W(Vs))
9642
- ], Fn);
9675
+ Bn = Kc([
9676
+ rt(0, $(Ye)),
9677
+ rt(1, $(M)),
9678
+ rt(2, $(oo)),
9679
+ rt(3, $(st)),
9680
+ rt(4, $(wn)),
9681
+ rt(5, $(fn)),
9682
+ rt(6, $(me)),
9683
+ rt(7, $(Vs))
9684
+ ], Bn);
9643
9685
  const Xo = {
9644
9686
  id: "sheet.mutation.set-worksheet-permission-points",
9645
9687
  type: v.MUTATION,
@@ -9687,7 +9729,7 @@ const Xo = {
9687
9729
  ...A.deepClone(e),
9688
9730
  rightToLeft: r
9689
9731
  };
9690
- }, Co = {
9732
+ }, po = {
9691
9733
  id: "sheet.mutation.set-worksheet-right-to-left",
9692
9734
  type: v.MUTATION,
9693
9735
  handler: (n, e) => {
@@ -9717,13 +9759,13 @@ const Xo = {
9717
9759
  u
9718
9760
  );
9719
9761
  return t.syncExecuteCommand(
9720
- Co.id,
9762
+ po.id,
9721
9763
  u
9722
9764
  ) ? (o.pushUndoRedo({
9723
9765
  unitID: r,
9724
- undoMutations: [{ id: Co.id, params: l }],
9766
+ undoMutations: [{ id: po.id, params: l }],
9725
9767
  redoMutations: [
9726
- { id: Co.id, params: u }
9768
+ { id: po.id, params: u }
9727
9769
  ]
9728
9770
  }), !0) : !1;
9729
9771
  }
@@ -9744,7 +9786,7 @@ const Xo = {
9744
9786
  redoMutations: [{ id: Jt.id, params: l }]
9745
9787
  }), !0) : !1;
9746
9788
  }
9747
- }, Bn = {
9789
+ }, jn = {
9748
9790
  type: v.COMMAND,
9749
9791
  id: "sheet.command.delta-row-height",
9750
9792
  // eslint-disable-next-line max-lines-per-function
@@ -9755,12 +9797,12 @@ const Xo = {
9755
9797
  return !1;
9756
9798
  const r = P(n.get(M));
9757
9799
  if (!r) return !1;
9758
- const { worksheet: i, subUnitId: a, unitId: u } = r, { anchorRow: l, deltaY: c } = e, h = i.getRowHeight(l) + c, g = o.length === 1 && o[0].range.rangeType === B.ALL, m = o.filter((D) => D.range.rangeType === B.ROW), f = g ? B.ALL : m.some(({ range: D }) => {
9800
+ const { worksheet: i, subUnitId: a, unitId: u } = r, { anchorRow: l, deltaY: c } = e, h = i.getRowHeight(l) + c, g = o.length === 1 && o[0].range.rangeType === j.ALL, m = o.filter((D) => D.range.rangeType === j.ROW), f = g ? j.ALL : m.some(({ range: D }) => {
9759
9801
  const { startRow: H, endRow: F } = D;
9760
9802
  return H <= l && l <= F;
9761
- }) ? B.ROW : B.NORMAL;
9803
+ }) ? j.ROW : j.NORMAL;
9762
9804
  let C;
9763
- if (f === B.ALL) {
9805
+ if (f === j.ALL) {
9764
9806
  const D = i.getColumnCount(), H = new Array(i.getRowCount()).fill(void 0).map(
9765
9807
  (F, K) => ({ startRow: K, endRow: K, startColumn: 0, endColumn: D - 1 })
9766
9808
  );
@@ -9770,7 +9812,7 @@ const Xo = {
9770
9812
  rowHeight: h,
9771
9813
  ranges: H
9772
9814
  };
9773
- } else f === B.ROW ? C = {
9815
+ } else f === j.ROW ? C = {
9774
9816
  subUnitId: a,
9775
9817
  unitId: u,
9776
9818
  ranges: m.map((D) => O.clone(D.range)),
@@ -9794,7 +9836,7 @@ const Xo = {
9794
9836
  ranges: C.ranges,
9795
9837
  autoHeightInfo: te.FALSE
9796
9838
  }, I = Ao(w, i), S = n.get(E), y = n.get(V), b = s.onCommandExecute({
9797
- id: Bn.id,
9839
+ id: jn.id,
9798
9840
  params: C
9799
9841
  }), N = L([
9800
9842
  {
@@ -9802,13 +9844,13 @@ const Xo = {
9802
9844
  params: C
9803
9845
  },
9804
9846
  {
9805
- id: $e.id,
9847
+ id: We.id,
9806
9848
  params: w
9807
9849
  }
9808
9850
  ], S), k = L([...b.redos], S);
9809
9851
  if (N.result && k.result) {
9810
9852
  const D = s.afterCommandExecute({
9811
- id: Bn.id,
9853
+ id: jn.id,
9812
9854
  params: C
9813
9855
  });
9814
9856
  return L(D.redos, S), y.pushUndoRedo({
@@ -9820,7 +9862,7 @@ const Xo = {
9820
9862
  params: p
9821
9863
  },
9822
9864
  {
9823
- id: $e.id,
9865
+ id: We.id,
9824
9866
  params: I
9825
9867
  },
9826
9868
  ...b.undos,
@@ -9833,7 +9875,7 @@ const Xo = {
9833
9875
  params: C
9834
9876
  },
9835
9877
  {
9836
- id: $e.id,
9878
+ id: We.id,
9837
9879
  params: w
9838
9880
  },
9839
9881
  ...b.redos,
@@ -9843,7 +9885,7 @@ const Xo = {
9843
9885
  }
9844
9886
  return !1;
9845
9887
  }
9846
- }, jn = {
9888
+ }, Gn = {
9847
9889
  type: v.COMMAND,
9848
9890
  id: "sheet.command.set-row-height",
9849
9891
  // eslint-disable-next-line max-lines-per-function
@@ -9870,16 +9912,16 @@ const Xo = {
9870
9912
  params: h
9871
9913
  },
9872
9914
  {
9873
- id: $e.id,
9915
+ id: We.id,
9874
9916
  params: m
9875
9917
  }
9876
9918
  ], o), p = i.onCommandExecute({
9877
- id: jn.id,
9919
+ id: Gn.id,
9878
9920
  params: h
9879
9921
  }), w = L([...p.redos], o);
9880
9922
  if (C.result && w.result) {
9881
9923
  const N = i.afterCommandExecute({
9882
- id: jn.id,
9924
+ id: Gn.id,
9883
9925
  params: h
9884
9926
  });
9885
9927
  return L(N.redos, o), s.pushUndoRedo({
@@ -9891,7 +9933,7 @@ const Xo = {
9891
9933
  params: g
9892
9934
  },
9893
9935
  {
9894
- id: $e.id,
9936
+ id: We.id,
9895
9937
  params: f
9896
9938
  },
9897
9939
  ...p.undos,
@@ -9904,7 +9946,7 @@ const Xo = {
9904
9946
  params: h
9905
9947
  },
9906
9948
  {
9907
- id: $e.id,
9949
+ id: We.id,
9908
9950
  params: m
9909
9951
  },
9910
9952
  ...p.redos,
@@ -9931,7 +9973,7 @@ const Xo = {
9931
9973
  autoHeightInfo: te.TRUE
9932
9974
  // Hard code first, maybe it will change by the menu item in the future.
9933
9975
  }, h = Ao(d, l), g = t.syncExecuteCommand(
9934
- $e.id,
9976
+ We.id,
9935
9977
  d
9936
9978
  ), m = n.get(et).getSkeleton(a, u), { suitableRanges: f, remainingRanges: C } = pn(d.ranges, m), p = n.get(z), { undos: w, redos: I } = p.generateMutationsOfAutoHeight({
9937
9979
  unitId: a,
@@ -9945,8 +9987,8 @@ const Xo = {
9945
9987
  }), b = L([...y, ...I], t);
9946
9988
  return g && b.result ? (o.pushUndoRedo({
9947
9989
  unitID: a,
9948
- undoMutations: [{ id: $e.id, params: h }, ...S, ...w],
9949
- redoMutations: [{ id: $e.id, params: d }, ...y, ...I]
9990
+ undoMutations: [{ id: We.id, params: h }, ...S, ...w],
9991
+ redoMutations: [{ id: We.id, params: d }, ...y, ...I]
9950
9992
  }), !0) : !1;
9951
9993
  }
9952
9994
  }, ii = {
@@ -9955,7 +9997,7 @@ const Xo = {
9955
9997
  handler: (n, e) => {
9956
9998
  const { unitId: t, subUnitId: o } = e, s = n.get(E), r = n.get(V), i = n.get(M);
9957
9999
  if (!P(n.get(M))) return !1;
9958
- const u = i.getCurrentUnitForType(j.UNIVER_SHEET);
10000
+ const u = i.getCurrentUnitForType(B.UNIVER_SHEET);
9959
10001
  if (!u) return !1;
9960
10002
  const l = u.getSheetBySheetId(o);
9961
10003
  if (!l || l.getConfig().hidden === te.FALSE) return !1;
@@ -9989,7 +10031,7 @@ const Xo = {
9989
10031
  handler: (n, e) => {
9990
10032
  const { unitId: t, subUnitId: o, range: s, delimiter: r, customDelimiter: i, treatMultipleDelimitersAsOne: a } = e, u = n.get(E), l = n.get(M), c = n.get(V);
9991
10033
  if (!P(n.get(M))) return !1;
9992
- const h = l.getCurrentUnitForType(j.UNIVER_SHEET);
10034
+ const h = l.getCurrentUnitForType(B.UNIVER_SHEET);
9993
10035
  if (!h) return !1;
9994
10036
  const g = h.getSheetBySheetId(o);
9995
10037
  if (!g) return !1;
@@ -10012,7 +10054,7 @@ const Xo = {
10012
10054
  id: He.id,
10013
10055
  params: D
10014
10056
  });
10015
- const H = oo(
10057
+ const H = so(
10016
10058
  n,
10017
10059
  D
10018
10060
  );
@@ -10058,7 +10100,7 @@ const Xo = {
10058
10100
  handler: (n, e) => {
10059
10101
  if (!e)
10060
10102
  return !1;
10061
- const { unitId: t, subUnitId: o, row: s, col: r, paragraphIndex: i } = e, u = n.get(M).getUnit(t, j.UNIVER_SHEET), l = u == null ? void 0 : u.getSheetBySheetId(o), c = n.get(V), d = n.get(E);
10103
+ const { unitId: t, subUnitId: o, row: s, col: r, paragraphIndex: i } = e, u = n.get(M).getUnit(t, B.UNIVER_SHEET), l = u == null ? void 0 : u.getSheetBySheetId(o), c = n.get(V), d = n.get(E);
10062
10104
  if (!l)
10063
10105
  return !1;
10064
10106
  const h = l.getCell(s, r);
@@ -10335,7 +10377,7 @@ var gd = Object.getOwnPropertyDescriptor, md = (n, e, t, o) => {
10335
10377
  return s;
10336
10378
  }, ws = (n, e) => (t, o) => e(t, o, n);
10337
10379
  const fd = "SHEET_DEFINED_NAME_PLUGIN", qh = "AllDefaultWorkbook";
10338
- let Gn = class extends le {
10380
+ let zn = class extends le {
10339
10381
  constructor(n, e) {
10340
10382
  super(), this._definedNamesService = n, this._resourceManagerService = e, this._initialize();
10341
10383
  }
@@ -10358,7 +10400,7 @@ let Gn = class extends le {
10358
10400
  this.disposeWithMe(
10359
10401
  this._resourceManagerService.registerPluginResource({
10360
10402
  pluginName: fd,
10361
- businesses: [j.UNIVER_SHEET],
10403
+ businesses: [B.UNIVER_SHEET],
10362
10404
  toJson: (t) => n(t),
10363
10405
  parseJson: (t) => e(t),
10364
10406
  onUnLoad: (t) => {
@@ -10371,16 +10413,16 @@ let Gn = class extends le {
10371
10413
  );
10372
10414
  }
10373
10415
  };
10374
- Gn = md([
10416
+ zn = md([
10375
10417
  ws(0, Fs),
10376
10418
  ws(1, fn)
10377
- ], Gn);
10419
+ ], zn);
10378
10420
  var Rd = Object.getOwnPropertyDescriptor, Cd = (n, e, t, o) => {
10379
10421
  for (var s = o > 1 ? void 0 : o ? Rd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
10380
10422
  (i = n[r]) && (s = i(s) || s);
10381
10423
  return s;
10382
10424
  }, je = (n, e) => (t, o) => e(t, o, n);
10383
- let zn = class extends le {
10425
+ let Kn = class extends le {
10384
10426
  constructor(e, t, o, s, r, i, a, u, l, c) {
10385
10427
  super();
10386
10428
  R(this, "disposableCollection", new Zt());
@@ -10395,27 +10437,27 @@ let zn = class extends le {
10395
10437
  let o = !0, s = "";
10396
10438
  switch (e) {
10397
10439
  case Cn.id:
10398
- Ws(t.value) && t.value.f ? (o = this._permissionCheckWithFormula(t), s = this._localeService.t("permission.dialog.formulaErr")) : o = this._permissionCheckBySetRangeValue({
10440
+ $s(t.value) && t.value.f ? (o = this._permissionCheckWithFormula(t), s = this._localeService.t("permission.dialog.formulaErr")) : o = this._permissionCheckBySetRangeValue({
10399
10441
  workbookTypes: [be],
10400
10442
  rangeTypes: [Ae],
10401
- worksheetTypes: [Nn, xe]
10443
+ worksheetTypes: [Dn, xe]
10402
10444
  }, t);
10403
10445
  break;
10404
10446
  case zo.id:
10405
10447
  o = this.permissionCheckWithRanges({
10406
10448
  workbookTypes: [be],
10407
10449
  rangeTypes: [Ae],
10408
- worksheetTypes: [Nn, xe]
10450
+ worksheetTypes: [Dn, xe]
10409
10451
  }), s = this._localeService.t("permission.dialog.editErr");
10410
10452
  break;
10411
- case Vn.id:
10412
10453
  case Ln.id:
10454
+ case Hn.id:
10413
10455
  o = this.permissionCheckWithoutRange({
10414
10456
  worksheetTypes: [qt]
10415
10457
  }), s = this._localeService.t("permission.dialog.setRowColStyleErr");
10416
10458
  break;
10417
- case Bn.id:
10418
10459
  case jn.id:
10460
+ case Gn.id:
10419
10461
  case Zo.id:
10420
10462
  o = this.permissionCheckWithoutRange({
10421
10463
  worksheetTypes: [Xt]
@@ -10494,8 +10536,8 @@ let zn = class extends le {
10494
10536
  ), this.disposeWithMe(
10495
10537
  this._commandService.onCommandExecuted((e) => {
10496
10538
  var t;
10497
- if (e.id === Hn.id) {
10498
- const o = e.params, { unitId: s = (t = this._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET)) == null ? void 0 : t.getUnitId(), subUnitId: r } = o;
10539
+ if (e.id === Fn.id) {
10540
+ const o = e.params, { unitId: s = (t = this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET)) == null ? void 0 : t.getUnitId(), subUnitId: r } = o;
10499
10541
  if (!s || !r)
10500
10542
  return;
10501
10543
  const i = this._worksheetProtectionRuleModel.getRule(s, r), a = this._rangeProtectionRuleModel.getSubunitRuleList(s, r);
@@ -10606,7 +10648,7 @@ let zn = class extends le {
10606
10648
  var r, i, a, u, l;
10607
10649
  const t = e.value, o = e.range, s = t.f;
10608
10650
  if (s) {
10609
- const c = s.substring(1), d = this._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET), h = (r = e.unitId) != null ? r : d.getUnitId(), g = this._definedNamesService.getValueByName(h, c);
10651
+ const c = s.substring(1), d = this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET), h = (r = e.unitId) != null ? r : d.getUnitId(), g = this._definedNamesService.getValueByName(h, c);
10610
10652
  if (g) {
10611
10653
  let m = g.formulaOrRefString;
10612
10654
  m.startsWith(Yi.EQUALS) && (m = m.slice(1));
@@ -10635,7 +10677,7 @@ let zn = class extends le {
10635
10677
  const C = m[f];
10636
10678
  if (typeof C == "string" || C.nodeType !== Xi.REFERENCE)
10637
10679
  continue;
10638
- const { token: p } = C, w = Zi(p), I = w.unitId ? this._univerInstanceService.getUnit(w.unitId) : this._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET);
10680
+ const { token: p } = C, w = Zi(p), I = w.unitId ? this._univerInstanceService.getUnit(w.unitId) : this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET);
10639
10681
  if (!I) return !0;
10640
10682
  let S = w.sheetName ? I.getSheetBySheetName(w.sheetName) : I.getActiveSheet();
10641
10683
  const y = I.getUnitId();
@@ -10643,7 +10685,7 @@ let zn = class extends le {
10643
10685
  if (S = I.getSheetBySheetName(w.sheetName), !S)
10644
10686
  return !0;
10645
10687
  const U = S == null ? void 0 : S.getSheetId();
10646
- if (!this._permissionService.getPermissionPoint(new ao(y, U).id)) return !1;
10688
+ if (!this._permissionService.getPermissionPoint(new uo(y, U).id)) return !1;
10647
10689
  }
10648
10690
  if (!S)
10649
10691
  return !0;
@@ -10669,18 +10711,18 @@ let zn = class extends le {
10669
10711
  return !0;
10670
10712
  }
10671
10713
  };
10672
- zn = Cd([
10714
+ Kn = Cd([
10673
10715
  je(0, E),
10674
10716
  je(1, M),
10675
10717
  je(2, Ye),
10676
- je(3, W(G)),
10677
- je(4, W(me)),
10678
- je(5, W(st)),
10679
- je(6, W(tt)),
10680
- je(7, W(Ji)),
10718
+ je(3, $(G)),
10719
+ je(4, $(me)),
10720
+ je(5, $(st)),
10721
+ je(6, $(tt)),
10722
+ je(7, $(Ji)),
10681
10723
  je(8, As),
10682
10724
  je(9, Fs)
10683
- ], zn);
10725
+ ], Kn);
10684
10726
  var pd = Object.getOwnPropertyDescriptor, Sd = (n, e, t, o) => {
10685
10727
  for (var s = o > 1 ? void 0 : o ? pd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
10686
10728
  (i = n[r]) && (s = i(s) || s);
@@ -10701,11 +10743,11 @@ let gn = class extends le {
10701
10743
  this._permissionService.addPermissionPoint(r);
10702
10744
  });
10703
10745
  };
10704
- this._univerInstanceService.getAllUnitsForType(j.UNIVER_SHEET).forEach((t) => {
10746
+ this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).forEach((t) => {
10705
10747
  e(t);
10706
- }), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(j.UNIVER_SHEET).subscribe((t) => {
10748
+ }), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(B.UNIVER_SHEET).subscribe((t) => {
10707
10749
  e(t);
10708
- })), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(j.UNIVER_SHEET).subscribe((t) => {
10750
+ })), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(B.UNIVER_SHEET).subscribe((t) => {
10709
10751
  const o = t.getUnitId();
10710
10752
  t.getSheets().forEach((s) => {
10711
10753
  const r = s.getSheetId();
@@ -10714,7 +10756,7 @@ let gn = class extends le {
10714
10756
  const l = new u(o, r, a.permissionId);
10715
10757
  this._permissionService.deletePermissionPoint(l.id);
10716
10758
  });
10717
- }), [..._e(), ...We()].forEach((a) => {
10759
+ }), [..._e(), ...$e()].forEach((a) => {
10718
10760
  const u = new a(o, r);
10719
10761
  this._permissionService.deletePermissionPoint(u.id);
10720
10762
  });
@@ -10729,18 +10771,18 @@ let gn = class extends le {
10729
10771
  }
10730
10772
  };
10731
10773
  gn = Sd([
10732
- Lt(0, W(Ye)),
10733
- Lt(1, W(M)),
10734
- Lt(2, W(me)),
10735
- Lt(3, W(st)),
10736
- Lt(4, W(wn))
10774
+ Lt(0, $(Ye)),
10775
+ Lt(1, $(M)),
10776
+ Lt(2, $(me)),
10777
+ Lt(3, $(st)),
10778
+ Lt(4, $(wn))
10737
10779
  ], gn);
10738
10780
  var wd = Object.getOwnPropertyDescriptor, Id = (n, e, t, o) => {
10739
10781
  for (var s = o > 1 ? void 0 : o ? wd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
10740
10782
  (i = n[r]) && (s = i(s) || s);
10741
10783
  return s;
10742
10784
  }, Ge = (n, e) => (t, o) => e(t, o, n);
10743
- let Kn = class extends le {
10785
+ let Jn = class extends le {
10744
10786
  constructor(n, e, t, o, s, r, i, a, u, l) {
10745
10787
  super(), this._univerInstanceService = n, this._permissionService = e, this._authzIoService = t, this._rangeProtectionRuleModel = o, this._worksheetProtectionRuleModel = s, this._userManagerService = r, this._worksheetProtectionPointRuleModel = i, this._workbookPermissionService = a, this._undoRedoService = u, this._commandService = l;
10746
10788
  }
@@ -10777,7 +10819,7 @@ let Kn = class extends le {
10777
10819
  }), this._rangeProtectionRuleModel.changeRuleInitState(!0);
10778
10820
  });
10779
10821
  };
10780
- await Promise.all(this._univerInstanceService.getAllUnitsForType(j.UNIVER_SHEET).map((e) => n(e))), this._rangeProtectionRuleModel.changeRuleInitState(!0);
10822
+ await Promise.all(this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).map((e) => n(e))), this._rangeProtectionRuleModel.changeRuleInitState(!0);
10781
10823
  }
10782
10824
  _initRangePermissionChange() {
10783
10825
  this.disposeWithMe(
@@ -10797,7 +10839,7 @@ let Kn = class extends le {
10797
10839
  const o = n.rule, s = new t(o.unitId, o.subUnitId, o.permissionId), r = s.subType, i = e.find((a) => a.action === r);
10798
10840
  i && this._permissionService.updatePermissionPoint(s.id, i.allowed);
10799
10841
  }), this._rangeProtectionRuleModel.ruleRefresh(n.rule.permissionId);
10800
- }) : this._rangeProtectionRuleModel.getSubunitRuleList(n.unitId, n.subUnitId).length === 0 && (this._worksheetProtectionPointRuleModel.deleteRule(n.unitId, n.subUnitId), [...We()].forEach((t) => {
10842
+ }) : this._rangeProtectionRuleModel.getSubunitRuleList(n.unitId, n.subUnitId).length === 0 && (this._worksheetProtectionPointRuleModel.deleteRule(n.unitId, n.subUnitId), [...$e()].forEach((t) => {
10801
10843
  const o = new t(n.unitId, n.subUnitId);
10802
10844
  this._permissionService.updatePermissionPoint(o.id, o.value);
10803
10845
  }));
@@ -10806,7 +10848,7 @@ let Kn = class extends le {
10806
10848
  }
10807
10849
  async initWorkbookPermissionChange(n) {
10808
10850
  var t;
10809
- const e = n || ((t = this._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET)) == null ? void 0 : t.getUnitId());
10851
+ const e = n || ((t = this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET)) == null ? void 0 : t.getUnitId());
10810
10852
  if (e)
10811
10853
  return this._authzIoService.allowed({
10812
10854
  objectID: e,
@@ -10821,7 +10863,7 @@ let Kn = class extends le {
10821
10863
  });
10822
10864
  }
10823
10865
  async _initWorkbookPermissionFromSnapshot() {
10824
- await Promise.all(this._univerInstanceService.getAllUnitsForType(j.UNIVER_SHEET).map((n) => this.initWorkbookPermissionChange(n.getUnitId()))), this._workbookPermissionService.changeUnitInitState(!0);
10866
+ await Promise.all(this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).map((n) => this.initWorkbookPermissionChange(n.getUnitId()))), this._workbookPermissionService.changeUnitInitState(!0);
10825
10867
  }
10826
10868
  _initWorksheetPermissionChange() {
10827
10869
  this.disposeWithMe(
@@ -10836,7 +10878,7 @@ let Kn = class extends le {
10836
10878
  const o = new t(n.unitId, n.subUnitId), s = o.subType, r = e.find((i) => i.action === s);
10837
10879
  r && this._permissionService.updatePermissionPoint(o.id, r.allowed);
10838
10880
  }), this._worksheetProtectionRuleModel.ruleRefresh(n.rule.permissionId);
10839
- }) : ([..._e(), ...We()].forEach((e) => {
10881
+ }) : ([..._e(), ...$e()].forEach((e) => {
10840
10882
  const t = new e(n.unitId, n.subUnitId);
10841
10883
  this._permissionService.updatePermissionPoint(t.id, !0);
10842
10884
  }), this._worksheetProtectionPointRuleModel.deleteRule(n.unitId, n.subUnitId));
@@ -10850,9 +10892,9 @@ let Kn = class extends le {
10850
10892
  objectID: n.permissionId,
10851
10893
  unitID: n.unitId,
10852
10894
  objectType: x.Worksheet,
10853
- actions: Ro
10895
+ actions: Co
10854
10896
  }).then((e) => {
10855
- We().forEach((t) => {
10897
+ $e().forEach((t) => {
10856
10898
  const o = new t(n.unitId, n.subUnitId), s = o.subType, r = e.find((i) => i.action === s);
10857
10899
  r && this._permissionService.updatePermissionPoint(o.id, r.allowed);
10858
10900
  });
@@ -10876,7 +10918,7 @@ let Kn = class extends le {
10876
10918
  objectID: l.permissionId,
10877
10919
  unitID: o,
10878
10920
  objectType: x.Worksheet,
10879
- actions: Ro
10921
+ actions: Co
10880
10922
  }));
10881
10923
  }), !t.length) {
10882
10924
  this._worksheetProtectionRuleModel.changeRuleInitState(!0);
@@ -10885,28 +10927,28 @@ let Kn = class extends le {
10885
10927
  this._authzIoService.batchAllowed(t).then((i) => {
10886
10928
  i.forEach((a) => {
10887
10929
  const u = r.get(a.objectID);
10888
- u && [..._e(), ...We()].forEach((l) => {
10930
+ u && [..._e(), ...$e()].forEach((l) => {
10889
10931
  const c = new l(o, u.subUnitId), d = c.subType, h = a.actions.find((g) => g.action === d);
10890
10932
  (h == null ? void 0 : h.allowed) !== void 0 && this._permissionService.updatePermissionPoint(c.id, h.allowed);
10891
10933
  });
10892
10934
  }), this._worksheetProtectionRuleModel.changeRuleInitState(!0);
10893
10935
  });
10894
10936
  };
10895
- await Promise.all(this._univerInstanceService.getAllUnitsForType(j.UNIVER_SHEET).map((e) => n(e))), this._worksheetProtectionRuleModel.changeRuleInitState(!0);
10937
+ await Promise.all(this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).map((e) => n(e))), this._worksheetProtectionRuleModel.changeRuleInitState(!0);
10896
10938
  }
10897
10939
  _initUserChange() {
10898
10940
  this.disposeWithMe(
10899
10941
  // When the user changes, the permission points are updated. The first modification needs to be filtered here because it is a Behavior type, but in fact the user information is ready when this controller is initialized.
10900
10942
  this._userManagerService.currentUser$.pipe(Hs(1)).subscribe(() => {
10901
10943
  const n = this._permissionService.getAllPermissionPoint();
10902
- this._permissionService.clearPermissionMap(), this._worksheetProtectionRuleModel.changeRuleInitState(!1), this._univerInstanceService.getAllUnitsForType(j.UNIVER_SHEET).forEach((t) => {
10944
+ this._permissionService.clearPermissionMap(), this._worksheetProtectionRuleModel.changeRuleInitState(!1), this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).forEach((t) => {
10903
10945
  const o = t.getUnitId();
10904
10946
  hn().forEach((s) => {
10905
10947
  let r = new s(o);
10906
10948
  n.has(r.id) && (r = n.get(r.id)), this._permissionService.addPermissionPoint(r);
10907
10949
  }), t.getSheets().forEach((s) => {
10908
10950
  const r = s.getSheetId();
10909
- [..._e(), ...We()].forEach((a) => {
10951
+ [..._e(), ...$e()].forEach((a) => {
10910
10952
  let u = new a(o, r);
10911
10953
  n.has(u.id) && (u = n.get(u.id)), this._permissionService.addPermissionPoint(u);
10912
10954
  }), this._rangeProtectionRuleModel.getSubunitRuleList(o, r).forEach((a) => {
@@ -10946,9 +10988,9 @@ let Kn = class extends le {
10946
10988
  objectID: e,
10947
10989
  unitID: n,
10948
10990
  objectType: x.Worksheet,
10949
- actions: Ro
10991
+ actions: Co
10950
10992
  }).then((u) => {
10951
- We().forEach((l) => {
10993
+ $e().forEach((l) => {
10952
10994
  var g;
10953
10995
  const c = new l(n, a), d = c.subType, h = u.find((m) => m.action === d);
10954
10996
  h && (((g = this._permissionService.getPermissionPoint(c.id)) == null ? void 0 : g.value) !== h.allowed && (o = !0), this._permissionService.updatePermissionPoint(c.id, h.allowed));
@@ -10984,24 +11026,24 @@ let Kn = class extends le {
10984
11026
  );
10985
11027
  }
10986
11028
  };
10987
- Kn = Id([
11029
+ Jn = Id([
10988
11030
  Ge(0, M),
10989
11031
  Ge(1, Ye),
10990
11032
  Ge(2, Oi),
10991
- Ge(3, W(me)),
10992
- Ge(4, W(st)),
10993
- Ge(5, W(Ni)),
10994
- Ge(6, W(wn)),
10995
- Ge(7, W(gn)),
10996
- Ge(8, W(V)),
10997
- Ge(9, W(E))
10998
- ], Kn);
11033
+ Ge(3, $(me)),
11034
+ Ge(4, $(st)),
11035
+ Ge(5, $(Ni)),
11036
+ Ge(6, $(wn)),
11037
+ Ge(7, $(gn)),
11038
+ Ge(8, $(V)),
11039
+ Ge(9, $(E))
11040
+ ], Jn);
10999
11041
  var vd = Object.getOwnPropertyDescriptor, Md = (n, e, t, o) => {
11000
11042
  for (var s = o > 1 ? void 0 : o ? vd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
11001
11043
  (i = n[r]) && (s = i(s) || s);
11002
11044
  return s;
11003
- }, po = (n, e) => (t, o) => e(t, o, n);
11004
- let Jn = class extends le {
11045
+ }, So = (n, e) => (t, o) => e(t, o, n);
11046
+ let Yn = class extends le {
11005
11047
  constructor(e, t, o) {
11006
11048
  super();
11007
11049
  R(this, "_zebraCacheUpdateSubject", new ke());
@@ -11065,11 +11107,11 @@ let Jn = class extends le {
11065
11107
  );
11066
11108
  }
11067
11109
  };
11068
- Jn = Md([
11069
- po(0, W(E)),
11070
- po(1, W(Ie)),
11071
- po(2, W(M))
11072
- ], Jn);
11110
+ Yn = Md([
11111
+ So(0, $(E)),
11112
+ So(1, $(Ie)),
11113
+ So(2, $(M))
11114
+ ], Yn);
11073
11115
  var _d = Object.getOwnPropertyDescriptor, yd = (n, e, t, o) => {
11074
11116
  for (var s = o > 1 ? void 0 : o ? _d(e, t) : e, r = n.length - 1, i; r >= 0; r--)
11075
11117
  (i = n[r]) && (s = i(s) || s);
@@ -11136,14 +11178,14 @@ let mn = class {
11136
11178
  }
11137
11179
  };
11138
11180
  mn = yd([
11139
- Is(0, W(me)),
11140
- Is(1, W(Ye))
11181
+ Is(0, $(me)),
11182
+ Is(1, $(Ye))
11141
11183
  ], mn);
11142
11184
  var bd = Object.getOwnPropertyDescriptor, Ed = (n, e, t, o) => {
11143
11185
  for (var s = o > 1 ? void 0 : o ? bd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
11144
11186
  (i = n[r]) && (s = i(s) || s);
11145
11187
  return s;
11146
- }, So = (n, e) => (t, o) => e(t, o, n);
11188
+ }, wo = (n, e) => (t, o) => e(t, o, n);
11147
11189
  let At = class extends le {
11148
11190
  constructor(e, t, o) {
11149
11191
  super();
@@ -11156,7 +11198,7 @@ let At = class extends le {
11156
11198
  this._ruleModel = e, this._permissionService = t, this._univerInstanceService = o, this._initUpdateCellRuleCache(), this._initUpdateCellInfoCache(), this._initUpdateRowColInfoCache(), this._initCache();
11157
11199
  }
11158
11200
  _initCache() {
11159
- this._univerInstanceService.getAllUnitsForType(j.UNIVER_SHEET).forEach((e) => {
11201
+ this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).forEach((e) => {
11160
11202
  e.getSheets().forEach((t) => {
11161
11203
  const o = e.getUnitId(), s = t.getSheetId();
11162
11204
  this.reBuildCache(o, s);
@@ -11369,17 +11411,17 @@ let At = class extends le {
11369
11411
  }
11370
11412
  };
11371
11413
  At = Ed([
11372
- So(0, W(me)),
11373
- So(1, W(Ye)),
11374
- So(2, W(M))
11414
+ wo(0, $(me)),
11415
+ wo(1, $(Ye)),
11416
+ wo(2, $(M))
11375
11417
  ], At);
11376
11418
  const ui = "ONLY_REGISTER_FORMULA_RELATED_MUTATIONS_KEY";
11377
11419
  var Ud = Object.getOwnPropertyDescriptor, kd = (n, e, t, o) => {
11378
11420
  for (var s = o > 1 ? void 0 : o ? Ud(e, t) : e, r = n.length - 1, i; r >= 0; r--)
11379
11421
  (i = n[r]) && (s = i(s) || s);
11380
11422
  return s;
11381
- }, wo = (n, e) => (t, o) => e(t, o, n);
11382
- let Yn = class extends le {
11423
+ }, Io = (n, e) => (t, o) => e(t, o, n);
11424
+ let qn = class extends le {
11383
11425
  // eslint-disable-next-line max-lines-per-function
11384
11426
  constructor(n, e, t) {
11385
11427
  var s;
@@ -11393,14 +11435,14 @@ let Yn = class extends le {
11393
11435
  dt,
11394
11436
  Te,
11395
11437
  Fe,
11396
- Wt,
11438
+ $t,
11397
11439
  oe,
11398
11440
  ai,
11399
11441
  ne,
11400
11442
  Qr,
11401
- Hn,
11443
+ Fn,
11402
11444
  Qo,
11403
- Pn,
11445
+ On,
11404
11446
  rd,
11405
11447
  Et,
11406
11448
  // formula SUBTOTAL
@@ -11414,12 +11456,12 @@ let Yn = class extends le {
11414
11456
  Zl,
11415
11457
  xo,
11416
11458
  zo,
11417
- Wo,
11459
+ $o,
11418
11460
  Gr,
11419
11461
  St,
11420
11462
  wt,
11421
- Vn,
11422
- Bn,
11463
+ Ln,
11464
+ jn,
11423
11465
  tl,
11424
11466
  el,
11425
11467
  nl,
@@ -11439,9 +11481,9 @@ let Yn = class extends le {
11439
11481
  Mt,
11440
11482
  rn,
11441
11483
  Nr,
11442
- lo,
11484
+ co,
11443
11485
  Dr,
11444
- uo,
11486
+ lo,
11445
11487
  Jo,
11446
11488
  _o,
11447
11489
  ic,
@@ -11456,7 +11498,7 @@ let Yn = class extends le {
11456
11498
  yo,
11457
11499
  nn,
11458
11500
  on,
11459
- Ln,
11501
+ Hn,
11460
11502
  pc,
11461
11503
  Bt,
11462
11504
  Ic,
@@ -11464,7 +11506,7 @@ let Yn = class extends le {
11464
11506
  vc,
11465
11507
  Dc,
11466
11508
  Cn,
11467
- jn,
11509
+ Gn,
11468
11510
  bo,
11469
11511
  yc,
11470
11512
  Gt,
@@ -11473,8 +11515,8 @@ let Yn = class extends le {
11473
11515
  cn,
11474
11516
  dn,
11475
11517
  Ce,
11476
- $c,
11477
- En,
11518
+ Wc,
11519
+ Un,
11478
11520
  kc,
11479
11521
  xc,
11480
11522
  Ac,
@@ -11486,11 +11528,11 @@ let Yn = class extends le {
11486
11528
  Ct,
11487
11529
  qo,
11488
11530
  oi,
11489
- Un,
11531
+ kn,
11490
11532
  Ys,
11491
11533
  Ze,
11492
11534
  Zo,
11493
- $e,
11535
+ We,
11494
11536
  lt,
11495
11537
  // SetWorksheetColIsAutoWidthCommand,
11496
11538
  Qc,
@@ -11542,17 +11584,17 @@ let Yn = class extends le {
11542
11584
  ].forEach((r) => this.disposeWithMe(this._commandService.registerCommand(r))), this._configService.setConfig(dd, hd);
11543
11585
  }
11544
11586
  };
11545
- Yn = kd([
11546
- wo(0, E),
11547
- wo(1, Ls),
11548
- wo(2, Ai(sa))
11549
- ], Yn);
11587
+ qn = kd([
11588
+ Io(0, E),
11589
+ Io(1, Ls),
11590
+ Io(2, Ai(sa))
11591
+ ], qn);
11550
11592
  var Td = Object.getOwnPropertyDescriptor, Pd = (n, e, t, o) => {
11551
11593
  for (var s = o > 1 ? void 0 : o ? Td(e, t) : e, r = n.length - 1, i; r >= 0; r--)
11552
11594
  (i = n[r]) && (s = i(s) || s);
11553
11595
  return s;
11554
11596
  }, vs = (n, e) => (t, o) => e(t, o, n);
11555
- let qn = class extends le {
11597
+ let Xn = class extends le {
11556
11598
  constructor(n, e) {
11557
11599
  super(), this._univerInstanceService = n, this._commandService = e, this._initialize();
11558
11600
  }
@@ -11606,17 +11648,17 @@ let qn = class extends le {
11606
11648
  }), a.getMatrix();
11607
11649
  }
11608
11650
  };
11609
- qn = Pd([
11610
- vs(0, W(M)),
11651
+ Xn = Pd([
11652
+ vs(0, $(M)),
11611
11653
  vs(1, E)
11612
- ], qn);
11654
+ ], Xn);
11613
11655
  const Od = "sheets.config", Ms = {};
11614
11656
  var Nd = Object.getOwnPropertyDescriptor, Dd = (n, e, t, o) => {
11615
11657
  for (var s = o > 1 ? void 0 : o ? Nd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
11616
11658
  (i = n[r]) && (s = i(s) || s);
11617
11659
  return s;
11618
11660
  }, Ad = (n, e) => (t, o) => e(t, o, n);
11619
- let Xn = class extends le {
11661
+ let Zn = class extends le {
11620
11662
  constructor(n) {
11621
11663
  super(), this._sheetInterceptorService = n, this._initialize();
11622
11664
  }
@@ -11639,15 +11681,15 @@ let Xn = class extends le {
11639
11681
  );
11640
11682
  }
11641
11683
  };
11642
- Xn = Dd([
11643
- Ad(0, W(z))
11644
- ], Xn);
11645
- var xd = Object.getOwnPropertyDescriptor, Wd = (n, e, t, o) => {
11684
+ Zn = Dd([
11685
+ Ad(0, $(z))
11686
+ ], Zn);
11687
+ var xd = Object.getOwnPropertyDescriptor, $d = (n, e, t, o) => {
11646
11688
  for (var s = o > 1 ? void 0 : o ? xd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
11647
11689
  (i = n[r]) && (s = i(s) || s);
11648
11690
  return s;
11649
11691
  }, _n = (n, e) => (t, o) => e(t, o, n);
11650
- let Zn = class extends le {
11692
+ let Qn = class extends le {
11651
11693
  constructor(n, e, t, o) {
11652
11694
  super(), this._permissionService = n, this._worksheetProtectionRuleModel = e, this._sheetInterceptorService = t, this._rangeProtectionCache = o, this._initViewModelByRangeInterceptor(), this._initViewModelBySheetInterceptor();
11653
11695
  }
@@ -11676,7 +11718,7 @@ let Zn = class extends le {
11676
11718
  const { unitId: o, subUnitId: s } = e, r = this._worksheetProtectionRuleModel.getRule(o, s);
11677
11719
  if (r != null && r.permissionId) {
11678
11720
  const d = [{
11679
- [_.View]: (a = (i = this._permissionService.getPermissionPoint(new ao(o, s).id)) == null ? void 0 : i.value) != null ? a : !1,
11721
+ [_.View]: (a = (i = this._permissionService.getPermissionPoint(new uo(o, s).id)) == null ? void 0 : i.value) != null ? a : !1,
11680
11722
  [_.Edit]: (l = (u = this._permissionService.getPermissionPoint(new xe(o, s).id)) == null ? void 0 : u.value) != null ? l : !1
11681
11723
  }], h = !((c = d[0]) != null && c[_.View]), g = !n || n === e.rawData ? { ...n } : n;
11682
11724
  return g.hasWorksheetRule = !0, g.selectionProtection = d, h ? (delete g.s, delete g.v, delete g.p, g) : t(g);
@@ -11686,14 +11728,14 @@ let Zn = class extends le {
11686
11728
  }));
11687
11729
  }
11688
11730
  };
11689
- Zn = Wd([
11731
+ Qn = $d([
11690
11732
  _n(0, Ye),
11691
- _n(1, W(st)),
11692
- _n(2, W(z)),
11693
- _n(3, W(At))
11694
- ], Zn);
11733
+ _n(1, $(st)),
11734
+ _n(2, $(z)),
11735
+ _n(3, $(At))
11736
+ ], Qn);
11695
11737
  const _s = No("univer.exclusive-range-service");
11696
- class $d extends le {
11738
+ class Wd extends le {
11697
11739
  constructor() {
11698
11740
  super(...arguments);
11699
11741
  /**
@@ -11760,7 +11802,7 @@ var Vd = Object.getOwnPropertyDescriptor, Ld = (n, e, t, o) => {
11760
11802
  for (var s = o > 1 ? void 0 : o ? Vd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
11761
11803
  (i = n[r]) && (s = i(s) || s);
11762
11804
  return s;
11763
- }, Io = (n, e) => (t, o) => e(t, o, n);
11805
+ }, vo = (n, e) => (t, o) => e(t, o, n);
11764
11806
  let Uo = class extends le {
11765
11807
  constructor(n, e, t) {
11766
11808
  super(), this._resourceManagerService = n, this._univerInstanceService = e, this._logService = t;
@@ -11825,9 +11867,9 @@ let Uo = class extends le {
11825
11867
  }
11826
11868
  };
11827
11869
  Uo = Ld([
11828
- Io(0, fn),
11829
- Io(1, M),
11830
- Io(2, Vs)
11870
+ vo(0, fn),
11871
+ vo(1, M),
11872
+ vo(2, Vs)
11831
11873
  ], Uo);
11832
11874
  var Hd = Object.getOwnPropertyDescriptor, Fd = (n, e, t, o) => {
11833
11875
  for (var s = o > 1 ? void 0 : o ? Hd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
@@ -11835,7 +11877,7 @@ var Hd = Object.getOwnPropertyDescriptor, Fd = (n, e, t, o) => {
11835
11877
  return s;
11836
11878
  }, it = (n, e) => (t, o) => e(t, o, n);
11837
11879
  const ys = [He.id, Le.id, Te.id, Fe.id], bs = [ct.id, dt.id];
11838
- let Qn = class extends le {
11880
+ let eo = class extends le {
11839
11881
  constructor(e, t, o, s, r, i, a, u) {
11840
11882
  super();
11841
11883
  R(this, "disposableCollection", new Zt());
@@ -11843,7 +11885,7 @@ let Qn = class extends le {
11843
11885
  }
11844
11886
  _onRefRangeChange() {
11845
11887
  const e = (o, s) => {
11846
- const r = this._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET);
11888
+ const r = this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET);
11847
11889
  if (!r || !(r == null ? void 0 : r.getSheetBySheetId(s)))
11848
11890
  return;
11849
11891
  this.disposableCollection.dispose();
@@ -11868,7 +11910,7 @@ let Qn = class extends le {
11868
11910
  }
11869
11911
  })
11870
11912
  );
11871
- const t = this._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET);
11913
+ const t = this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET);
11872
11914
  if (t) {
11873
11915
  const o = t.getActiveSheet();
11874
11916
  if (!o) return;
@@ -11885,9 +11927,9 @@ let Qn = class extends le {
11885
11927
  return this._getRefRangeMutationsByInsertRows(e.params, t, o);
11886
11928
  case Je.id:
11887
11929
  return this._getRefRangeMutationsByInsertCols(e.params, t, o);
11888
- case lo.id:
11930
+ case co.id:
11889
11931
  return this._getRefRangeMutationsByDeleteCols(e.params, t, o);
11890
- case uo.id:
11932
+ case lo.id:
11891
11933
  return this._getRefRangeMutationsByDeleteRows(e.params, t, o);
11892
11934
  }
11893
11935
  return { redos: [], undos: [] };
@@ -11990,7 +12032,7 @@ let Qn = class extends le {
11990
12032
  this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
11991
12033
  if (bs.includes(e.id)) {
11992
12034
  if (!e.params) return;
11993
- const t = this._univerInstanceService.getCurrentUnitForType(j.UNIVER_SHEET);
12035
+ const t = this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET);
11994
12036
  if (!t) return;
11995
12037
  const o = t.getSheetBySheetId(e.params.subUnitId);
11996
12038
  if (!o) return;
@@ -12060,23 +12102,23 @@ let Qn = class extends le {
12060
12102
  );
12061
12103
  }
12062
12104
  };
12063
- Qn = Fd([
12064
- it(0, W(me)),
12065
- it(1, W(M)),
12105
+ eo = Fd([
12106
+ it(0, $(me)),
12107
+ it(1, $(M)),
12066
12108
  it(2, E),
12067
- it(3, W(Ot)),
12068
- it(4, W(mn)),
12069
- it(5, W(At)),
12070
- it(6, W(z)),
12071
- it(7, W(me))
12072
- ], Qn);
12109
+ it(3, $(Ot)),
12110
+ it(4, $(mn)),
12111
+ it(5, $(At)),
12112
+ it(6, $(z)),
12113
+ it(7, $(me))
12114
+ ], eo);
12073
12115
  var Bd = Object.getOwnPropertyDescriptor, jd = (n, e, t, o) => {
12074
12116
  for (var s = o > 1 ? void 0 : o ? Bd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
12075
12117
  (i = n[r]) && (s = i(s) || s);
12076
12118
  return s;
12077
12119
  }, Ht = (n, e) => (t, o) => e(t, o, n);
12078
12120
  const Gd = "SHEET_RANGE_PROTECTION_PLUGIN";
12079
- let eo = class extends le {
12121
+ let to = class extends le {
12080
12122
  constructor(n, e, t, o, s) {
12081
12123
  super(), this._selectionProtectionRuleModel = n, this._permissionService = e, this._resourceManagerService = t, this._selectionProtectionCache = o, this._univerInstanceService = s, this._initSnapshot(), this._initRuleChange();
12082
12124
  }
@@ -12129,7 +12171,7 @@ let eo = class extends le {
12129
12171
  toJson: n,
12130
12172
  parseJson: e,
12131
12173
  pluginName: Gd,
12132
- businesses: [On.UNIVER_SHEET],
12174
+ businesses: [Nn.UNIVER_SHEET],
12133
12175
  onLoad: (t, o) => {
12134
12176
  const s = this._selectionProtectionRuleModel.toObject();
12135
12177
  s[t] = o, this._selectionProtectionRuleModel.fromObject(s);
@@ -12158,13 +12200,13 @@ let eo = class extends le {
12158
12200
  );
12159
12201
  }
12160
12202
  };
12161
- eo = jd([
12162
- Ht(0, W(me)),
12163
- Ht(1, W(Ye)),
12164
- Ht(2, W(fn)),
12165
- Ht(3, W(At)),
12166
- Ht(4, W(M))
12167
- ], eo);
12203
+ to = jd([
12204
+ Ht(0, $(me)),
12205
+ Ht(1, $(Ye)),
12206
+ Ht(2, $(fn)),
12207
+ Ht(3, $(At)),
12208
+ Ht(4, $(M))
12209
+ ], to);
12168
12210
  var zd = Object.getOwnPropertyDescriptor, Kd = (n, e, t, o) => {
12169
12211
  for (var s = o > 1 ? void 0 : o ? zd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
12170
12212
  (i = n[r]) && (s = i(s) || s);
@@ -12217,7 +12259,7 @@ let ko = class extends le {
12217
12259
  }
12218
12260
  };
12219
12261
  ko = Kd([
12220
- Jd(0, W(Ie))
12262
+ Jd(0, $(Ie))
12221
12263
  ], ko);
12222
12264
  var Yd = Object.defineProperty, qd = Object.getOwnPropertyDescriptor, Xd = (n, e, t) => e in n ? Yd(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Zd = (n, e, t, o) => {
12223
12265
  for (var s = o > 1 ? void 0 : o ? qd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
@@ -12225,7 +12267,7 @@ var Yd = Object.defineProperty, qd = Object.getOwnPropertyDescriptor, Xd = (n, e
12225
12267
  return s;
12226
12268
  }, Es = (n, e) => (t, o) => e(t, o, n), li = (n, e, t) => Xd(n, typeof e != "symbol" ? e + "" : e, t);
12227
12269
  const Qd = "SHEET_PLUGIN";
12228
- let to = class extends $i {
12270
+ let no = class extends Wi {
12229
12271
  constructor(n = Ms, e, t) {
12230
12272
  super(), this._config = n, this._injector = e, this._configService = t;
12231
12273
  const { ...o } = Vi(
@@ -12243,7 +12285,7 @@ let to = class extends $i {
12243
12285
  var e;
12244
12286
  const n = [
12245
12287
  // services
12246
- [$t],
12288
+ [Wt],
12247
12289
  [G],
12248
12290
  [Ot],
12249
12291
  [gn],
@@ -12252,45 +12294,45 @@ let to = class extends $i {
12252
12294
  [ko],
12253
12295
  [et],
12254
12296
  // controllers
12255
- [Yn],
12297
+ [qn],
12256
12298
  [Wn],
12257
- [Xn],
12258
- [Gn],
12259
- [Jn],
12299
+ [Zn],
12300
+ [zn],
12301
+ [Yn],
12260
12302
  // permission
12261
- [Fn],
12303
+ [Bn],
12262
12304
  [st],
12263
12305
  [wn],
12264
- [Zn],
12306
+ [Qn],
12307
+ [Jn],
12265
12308
  [Kn],
12266
- [zn],
12267
12309
  // range theme
12268
12310
  [Ie],
12269
12311
  // range protection
12270
12312
  [mn],
12271
12313
  [me],
12272
12314
  [At],
12273
- [Qn],
12274
12315
  [eo],
12316
+ [to],
12275
12317
  [_s, {
12276
- useClass: $d,
12318
+ useClass: Wd,
12277
12319
  deps: [G]
12278
12320
  }]
12279
12321
  ];
12280
- (e = this._config) != null && e.notExecuteFormula || n.push([qn]), Fi(this._injector, Bi(n, this._config.override)), In(this._injector, [
12322
+ (e = this._config) != null && e.notExecuteFormula || n.push([Xn]), Fi(this._injector, Bi(n, this._config.override)), In(this._injector, [
12281
12323
  [z],
12282
- [eo],
12324
+ [to],
12283
12325
  [_s],
12284
- [Kn]
12326
+ [Jn]
12285
12327
  ]);
12286
12328
  }
12287
12329
  onStarting() {
12288
12330
  In(this._injector, [
12289
- [Yn],
12331
+ [qn],
12290
12332
  [Wn],
12291
12333
  [gn],
12292
- [Fn],
12293
- [Zn],
12334
+ [Bn],
12335
+ [Qn],
12294
12336
  [et]
12295
12337
  ]);
12296
12338
  }
@@ -12301,25 +12343,25 @@ let to = class extends $i {
12301
12343
  }
12302
12344
  onReady() {
12303
12345
  In(this._injector, [
12304
- [qn],
12305
- [Gn],
12306
- [Jn],
12307
- [Ie],
12308
12346
  [Xn],
12347
+ [zn],
12348
+ [Yn],
12349
+ [Ie],
12350
+ [Zn],
12309
12351
  [mn],
12310
- [Qn],
12352
+ [eo],
12311
12353
  [Ot],
12312
- [zn]
12354
+ [Kn]
12313
12355
  ]);
12314
12356
  }
12315
12357
  };
12316
- li(to, "pluginName", Qd);
12317
- li(to, "type", j.UNIVER_SHEET);
12318
- to = Zd([
12319
- Wi(na),
12320
- Es(1, W(no)),
12358
+ li(no, "pluginName", Qd);
12359
+ li(no, "type", B.UNIVER_SHEET);
12360
+ no = Zd([
12361
+ $i(na),
12362
+ Es(1, $(oo)),
12321
12363
  Es(2, Ls)
12322
- ], to);
12364
+ ], no);
12323
12365
  const Xh = {
12324
12366
  /**
12325
12367
  * The permission point for adding or editing workbook comments
@@ -12448,7 +12490,7 @@ const Xh = {
12448
12490
  /**
12449
12491
  * The permission point for setting the value of cells in a worksheet
12450
12492
  */
12451
- WorksheetSetCellValuePermission: Nn,
12493
+ WorksheetSetCellValuePermission: Dn,
12452
12494
  /**
12453
12495
  * The permission point for setting the style of columns in a worksheet
12454
12496
  */
@@ -12464,7 +12506,7 @@ const Xh = {
12464
12506
  /**
12465
12507
  * The permission point for viewing the content of a worksheet
12466
12508
  */
12467
- WorksheetViewPermission: ao,
12509
+ WorksheetViewPermission: uo,
12468
12510
  /**
12469
12511
  * The permission point for editing the range protection settings
12470
12512
  */
@@ -12541,7 +12583,7 @@ function yn(n, e, t) {
12541
12583
  isMergedMainCell: a.rowSpan !== void 0 && a.colSpan !== void 0,
12542
12584
  endRow: r + (a.rowSpan !== void 0 ? a.rowSpan - 1 : 0),
12543
12585
  endColumn: i + (a.colSpan !== void 0 ? a.colSpan - 1 : 0),
12544
- rangeType: B.NORMAL
12586
+ rangeType: j.NORMAL
12545
12587
  }, !1)), o || {
12546
12588
  actualColumn: e,
12547
12589
  actualRow: n,
@@ -12551,7 +12593,7 @@ function yn(n, e, t) {
12551
12593
  endColumn: e,
12552
12594
  isMerged: !1,
12553
12595
  isMergedMainCell: !1,
12554
- rangeType: B.NORMAL
12596
+ rangeType: j.NORMAL
12555
12597
  };
12556
12598
  }
12557
12599
  const eh = (n, e, t, o, s = 1) => {
@@ -12599,7 +12641,7 @@ const eh = (n, e, t, o, s = 1) => {
12599
12641
  };
12600
12642
  };
12601
12643
  export {
12602
- go as AFTER_CELL_EDIT,
12644
+ mo as AFTER_CELL_EDIT,
12603
12645
  Jh as AddMergeRedoSelectionsOperationFactory,
12604
12646
  De as AddMergeUndoMutationFactory,
12605
12647
  Yh as AddMergeUndoSelectionsOperationFactory,
@@ -12607,7 +12649,7 @@ export {
12607
12649
  Ve as AddRangeProtectionMutation,
12608
12650
  sd as AddRangeThemeMutation,
12609
12651
  Oh as AddWorksheetMergeAllCommand,
12610
- co as AddWorksheetMergeCommand,
12652
+ ho as AddWorksheetMergeCommand,
12611
12653
  Dh as AddWorksheetMergeHorizontalCommand,
12612
12654
  ne as AddWorksheetMergeMutation,
12613
12655
  Nh as AddWorksheetMergeVerticalCommand,
@@ -12615,17 +12657,17 @@ export {
12615
12657
  It as AddWorksheetProtectionMutation,
12616
12658
  Zl as AppendRowCommand,
12617
12659
  is as BEFORE_CELL_EDIT,
12618
- $t as BorderStyleManagerService,
12660
+ Wt as BorderStyleManagerService,
12619
12661
  uh as COMMAND_LISTENER_SKELETON_CHANGE,
12620
12662
  lh as COMMAND_LISTENER_VALUE_CHANGE,
12621
12663
  vc as CancelFrozenCommand,
12622
12664
  ad as CancelMarkDirtyRowAutoHeightMutation,
12623
12665
  xo as ClearSelectionAllCommand,
12624
12666
  zo as ClearSelectionContentCommand,
12625
- Wo as ClearSelectionFormatCommand,
12667
+ $o as ClearSelectionFormatCommand,
12626
12668
  Gr as CopySheetCommand,
12627
12669
  wh as DISABLE_NORMAL_SELECTIONS,
12628
- Gn as DefinedNameDataController,
12670
+ zn as DefinedNameDataController,
12629
12671
  St as DeleteRangeMoveLeftCommand,
12630
12672
  wt as DeleteRangeMoveUpCommand,
12631
12673
  ec as DeleteRangeProtectionCommand,
@@ -12635,12 +12677,12 @@ export {
12635
12677
  nc as DeleteWorksheetRangeThemeStyleCommand,
12636
12678
  tn as DeleteWorksheetRangeThemeStyleMutation,
12637
12679
  Pa as DeleteWorksheetRangeThemeStyleMutationFactory,
12638
- Vn as DeltaColumnWidthCommand,
12639
- Bn as DeltaRowHeightCommand,
12680
+ Ln as DeltaColumnWidthCommand,
12681
+ jn as DeltaRowHeightCommand,
12640
12682
  Uu as EditStateEnum,
12641
- $ as EffectRefRangId,
12683
+ W as EffectRefRangId,
12642
12684
  rd as EmptyMutation,
12643
- $d as ExclusiveRangeService,
12685
+ Wd as ExclusiveRangeService,
12644
12686
  Sh as FactoryAddRangeProtectionMutation,
12645
12687
  ph as FactoryDeleteRangeProtectionMutation,
12646
12688
  xh as FactorySetRangeProtectionMutation,
@@ -12653,7 +12695,7 @@ export {
12653
12695
  Or as InsertColByRangeCommand,
12654
12696
  Je as InsertColCommand,
12655
12697
  He as InsertColMutation,
12656
- oo as InsertColMutationUndoFactory,
12698
+ so as InsertColMutationUndoFactory,
12657
12699
  oc as InsertDefinedNameCommand,
12658
12700
  nl as InsertMultiColsLeftCommand,
12659
12701
  ol as InsertMultiColsRightCommand,
@@ -12693,32 +12735,32 @@ export {
12693
12735
  Ae as RangeProtectionPermissionEditPoint,
12694
12736
  ri as RangeProtectionPermissionManageCollaPoint,
12695
12737
  Vo as RangeProtectionPermissionViewPoint,
12696
- Qn as RangeProtectionRefRangeService,
12738
+ eo as RangeProtectionRefRangeService,
12697
12739
  mn as RangeProtectionRenderModel,
12698
12740
  me as RangeProtectionRuleModel,
12699
- eo as RangeProtectionService,
12741
+ to as RangeProtectionService,
12700
12742
  gt as RangeThemeStyle,
12701
12743
  Ot as RefRangeService,
12702
12744
  hs as RefSelectionsService,
12703
12745
  rc as RegisterWorksheetRangeThemeStyleCommand,
12704
12746
  ln as RegisterWorksheetRangeThemeStyleMutation,
12705
12747
  Dr as RemoveColByRangeCommand,
12706
- lo as RemoveColCommand,
12748
+ co as RemoveColCommand,
12707
12749
  Te as RemoveColMutation,
12708
12750
  zr as RemoveDefinedNameCommand,
12709
12751
  Me as RemoveMergeUndoMutationFactory,
12710
12752
  ai as RemoveNumfmtMutation,
12711
12753
  ud as RemoveRangeThemeMutation,
12712
12754
  Nr as RemoveRowByRangeCommand,
12713
- uo as RemoveRowCommand,
12755
+ lo as RemoveRowCommand,
12714
12756
  Fe as RemoveRowMutation,
12715
12757
  Jo as RemoveSheetCommand,
12716
- Wt as RemoveSheetMutation,
12758
+ $t as RemoveSheetMutation,
12717
12759
  sl as RemoveSheetUndoMutationFactory,
12718
12760
  ic as RemoveWorksheetMergeCommand,
12719
12761
  oe as RemoveWorksheetMergeMutation,
12720
12762
  _o as ReorderRangeCommand,
12721
- Pn as ReorderRangeMutation,
12763
+ On as ReorderRangeMutation,
12722
12764
  xa as ReorderRangeUndoMutationFactory,
12723
12765
  Oc as ResetBackgroundColorCommand,
12724
12766
  Tc as ResetTextColorCommand,
@@ -12730,7 +12772,7 @@ export {
12730
12772
  Hu as SelectRangeCommand,
12731
12773
  we as SelectionMoveType,
12732
12774
  Pc as SetBackgroundColorCommand,
12733
- Wh as SetBoldCommand,
12775
+ $h as SetBoldCommand,
12734
12776
  Cc as SetBorderBasicCommand,
12735
12777
  Rc as SetBorderColorCommand,
12736
12778
  Sn as SetBorderCommand,
@@ -12742,7 +12784,7 @@ export {
12742
12784
  yo as SetColHiddenCommand,
12743
12785
  nn as SetColHiddenMutation,
12744
12786
  on as SetColVisibleMutation,
12745
- Ln as SetColWidthCommand,
12787
+ Hn as SetColWidthCommand,
12746
12788
  Yr as SetDefinedNameCommand,
12747
12789
  Fh as SetFontFamilyCommand,
12748
12790
  Bh as SetFontSizeCommand,
@@ -12752,7 +12794,7 @@ export {
12752
12794
  Mc as SetGridlinesColorCommand,
12753
12795
  jt as SetGridlinesColorMutation,
12754
12796
  Dc as SetHorizontalTextAlignCommand,
12755
- $h as SetItalicCommand,
12797
+ Wh as SetItalicCommand,
12756
12798
  Qo as SetNumfmtMutation,
12757
12799
  Hh as SetOverlineCommand,
12758
12800
  _c as SetProtectionCommand,
@@ -12764,7 +12806,7 @@ export {
12764
12806
  yc as SetRowDataCommand,
12765
12807
  Gt as SetRowDataMutation,
12766
12808
  Xa as SetRowDataMutationFactory,
12767
- jn as SetRowHeightCommand,
12809
+ Gn as SetRowHeightCommand,
12768
12810
  bo as SetRowHiddenCommand,
12769
12811
  Et as SetRowHiddenMutation,
12770
12812
  bt as SetRowVisibleMutation,
@@ -12775,8 +12817,8 @@ export {
12775
12817
  dn as SetSpecificRowsVisibleCommand,
12776
12818
  Lh as SetStrikeThroughCommand,
12777
12819
  Ce as SetStyleCommand,
12778
- $c as SetTabColorCommand,
12779
- En as SetTabColorMutation,
12820
+ Wc as SetTabColorCommand,
12821
+ Un as SetTabColorMutation,
12780
12822
  kc as SetTextColorCommand,
12781
12823
  xc as SetTextRotationCommand,
12782
12824
  Ac as SetTextWrapCommand,
@@ -12797,9 +12839,9 @@ export {
12797
12839
  Fc as SetWorksheetHideCommand,
12798
12840
  Ct as SetWorksheetHideMutation,
12799
12841
  qo as SetWorksheetNameCommand,
12800
- Hn as SetWorksheetNameMutation,
12842
+ Fn as SetWorksheetNameMutation,
12801
12843
  oi as SetWorksheetOrderCommand,
12802
- Un as SetWorksheetOrderMutation,
12844
+ kn as SetWorksheetOrderMutation,
12803
12845
  qc as SetWorksheetPermissionPointsCommand,
12804
12846
  Xo as SetWorksheetPermissionPointsMutation,
12805
12847
  Xc as SetWorksheetProtectionCommand,
@@ -12808,7 +12850,7 @@ export {
12808
12850
  en as SetWorksheetRangeThemeStyleMutation,
12809
12851
  Ta as SetWorksheetRangeThemeStyleMutationFactory,
12810
12852
  Gh as SetWorksheetRightToLeftCommand,
12811
- Co as SetWorksheetRightToLeftMutation,
12853
+ po as SetWorksheetRightToLeftMutation,
12812
12854
  Ys as SetWorksheetRowAutoHeightMutation,
12813
12855
  ah as SetWorksheetRowAutoHeightMutationFactory,
12814
12856
  Qc as SetWorksheetRowCountCommand,
@@ -12816,11 +12858,11 @@ export {
12816
12858
  nu as SetWorksheetRowCountUndoMutationFactory,
12817
12859
  Ze as SetWorksheetRowHeightMutation,
12818
12860
  Zo as SetWorksheetRowIsAutoHeightCommand,
12819
- $e as SetWorksheetRowIsAutoHeightMutation,
12861
+ We as SetWorksheetRowIsAutoHeightMutation,
12820
12862
  ii as SetWorksheetShowCommand,
12821
12863
  z as SheetInterceptorService,
12822
- zn as SheetPermissionCheckController,
12823
- Kn as SheetPermissionInitController,
12864
+ Kn as SheetPermissionCheckController,
12865
+ Jn as SheetPermissionInitController,
12824
12866
  Ie as SheetRangeThemeModel,
12825
12867
  ko as SheetRangeThemeService,
12826
12868
  ou as SheetSkeletonChangeType,
@@ -12834,10 +12876,10 @@ export {
12834
12876
  Yt as ToggleGridlinesMutation,
12835
12877
  _ as UnitAction,
12836
12878
  x as UnitObject,
12837
- to as UniverSheetsPlugin,
12879
+ no as UniverSheetsPlugin,
12838
12880
  od as UnregisterWorksheetRangeThemeStyleCommand,
12839
12881
  Ko as UnregisterWorksheetRangeThemeStyleMutation,
12840
- mo as VALIDATE_CELL,
12882
+ fo as VALIDATE_CELL,
12841
12883
  Eu as ViewStateEnum,
12842
12884
  er as WorkbookCommentPermission,
12843
12885
  tr as WorkbookCopyPermission,
@@ -12875,22 +12917,22 @@ export {
12875
12917
  Sr as WorksheetInsertHyperlinkPermission,
12876
12918
  wr as WorksheetInsertRowPermission,
12877
12919
  Ir as WorksheetManageCollaboratorPermission,
12878
- Fn as WorksheetPermissionService,
12920
+ Bn as WorksheetPermissionService,
12879
12921
  vr as WorksheetPivotTablePermission,
12880
12922
  wn as WorksheetProtectionPointModel,
12881
12923
  st as WorksheetProtectionRuleModel,
12882
12924
  yh as WorksheetSelectProtectedCellsPermission,
12883
12925
  bh as WorksheetSelectUnProtectedCellsPermission,
12884
12926
  Mr as WorksheetSetCellStylePermission,
12885
- Nn as WorksheetSetCellValuePermission,
12927
+ Dn as WorksheetSetCellValuePermission,
12886
12928
  qt as WorksheetSetColumnStylePermission,
12887
12929
  Xt as WorksheetSetRowStylePermission,
12888
12930
  _r as WorksheetSortPermission,
12889
- ao as WorksheetViewPermission,
12890
- Jn as ZebraCrossingCacheController,
12931
+ uo as WorksheetViewPermission,
12932
+ Yn as ZebraCrossingCacheController,
12891
12933
  Ah as addMergeCellsUtil,
12892
12934
  Ol as adjustRangeOnMutation,
12893
- io as alignToMergedCellsBorders,
12935
+ ao as alignToMergedCellsBorders,
12894
12936
  ft as baseProtectionActions,
12895
12937
  ss as checkCellValueType,
12896
12938
  Zh as checkRangesEditablePermission,
@@ -12900,7 +12942,7 @@ export {
12900
12942
  du as createTopMatrixFromMatrix,
12901
12943
  cu as createTopMatrixFromRanges,
12902
12944
  Gc as defaultWorkbookPermissionPoints,
12903
- Ro as defaultWorksheetPermissionPoint,
12945
+ Co as defaultWorksheetPermissionPoint,
12904
12946
  hh as expandToContinuousRange,
12905
12947
  Kh as factoryRemoveNumfmtUndoMutation,
12906
12948
  zh as factorySetNumfmtUndoMutation,
@@ -12913,11 +12955,11 @@ export {
12913
12955
  ye as getAllRangePermissionPoint,
12914
12956
  hn as getAllWorkbookPermissionPoint,
12915
12957
  _e as getAllWorksheetPermissionPoint,
12916
- We as getAllWorksheetPermissionPointByPointPanel,
12958
+ $e as getAllWorksheetPermissionPointByPointPanel,
12917
12959
  vh as getCellAtRowCol,
12918
12960
  jh as getDefaultRangePermission,
12919
12961
  yr as getInsertRangeMutations,
12920
- $o as getMoveRangeUndoRedoMutations,
12962
+ Wo as getMoveRangeUndoRedoMutations,
12921
12963
  Qh as getNextPrimaryCell,
12922
12964
  ve as getPrimaryForRange,
12923
12965
  br as getRemoveRangeMutations,
@@ -12928,9 +12970,9 @@ export {
12928
12970
  qe as getSheetMutationTarget,
12929
12971
  dh as getSkeletonChangedEffectedRange,
12930
12972
  ch as getValueChangedEffectedRange,
12931
- ro as getVisibleRanges,
12973
+ io as getVisibleRanges,
12932
12974
  Tt as handleBaseInsertRange,
12933
- xn as handleBaseMoveRowsCols,
12975
+ $n as handleBaseMoveRowsCols,
12934
12976
  kt as handleBaseRemoveRange,
12935
12977
  ms as handleCommonDefaultRangeChangeWithEffectRefCommands,
12936
12978
  Th as handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests,