@univerjs/sheets-numfmt 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,26 +1,26 @@
1
- var Et = Object.defineProperty;
2
- var $t = (e, t, r) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var Y = (e, t, r) => ($t(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { CommandType as ne, ICommandService as V, IUniverInstanceService as $, IUndoRedoService as Tt, sequenceExecute as Ut, Tools as At, Disposable as H, OnLifecycle as k, LifecycleStages as T, Range as M, Rectangle as xe, ObjectMatrix as lt, CellValueType as ee, toDisposable as Z, ThemeService as ut, runOnLifecycle as Lt, ILocalStorageService as Vt, LocaleService as D, DisposableCollection as dt, UniverInstanceType as De, Plugin as Ht, PluginType as kt } from "@univerjs/core";
5
- import { transformCellsToRange as ue, rangeMerge as W, SetNumfmtMutation as w, factorySetNumfmtUndoMutation as de, RemoveNumfmtMutation as I, factoryRemoveNumfmtUndoMutation as J, INumfmtService as U, INTERCEPTOR_POINT as mt, SheetInterceptorService as Ee, SelectionManagerService as re, ClearSelectionFormatCommand as Ft, ClearSelectionAllCommand as Bt, SetRangeValuesCommand as Wt, getCurrentSheetDisabled$ as $e, RefRangeService as zt, EffectRefRangId as j, handleMoveRows as Kt, handleMoveCols as Gt, handleIRemoveRow as Yt, handleIRemoveCol as qt, handleMoveRange as Zt, handleInsertRow as Jt, handleInsertRangeMoveRight as Qt, handleInsertRangeMoveDown as Xt, handleInsertCol as en, handleDeleteRangeMoveUp as tn, handleDeleteRangeMoveLeft as nn, runRefRangeMutations as rn, RemoveSheetCommand as sn } from "@univerjs/sheets";
6
- import { Inject as g, Injector as K, createIdentifier as an } from "@wendellhu/redi";
7
- import { IAutoFillService as on, APPLY_TYPE as He, getAutoFillRepeatRange as cn, SheetSkeletonManagerService as Ke, COPY_TYPE as nt, PREDEFINED_HOOK_NAME as rt, getRepeatRange as ln, ISheetClipboardService as un, IEditorBridgeService as dn } from "@univerjs/sheets-ui";
8
- import { map as ce, distinctUntilChanged as ht, switchMap as ft, tap as mn, debounceTime as hn, filter as st, bufferTime as fn } from "rxjs/operators";
9
- import E from "@univerjs/engine-numfmt";
10
- import { IRenderManagerService as vn, ITextSelectionRenderManager as pn } from "@univerjs/engine-render";
11
- import { ComponentManager as vt, ISidebarService as gn, MenuItemType as Te, MenuGroup as Ue, MenuPosition as Ae, getMenuHiddenObservable as Le, IMenuService as _n } from "@univerjs/ui";
12
- import { Observable as q, combineLatest as Sn, merge as Ge } from "rxjs";
13
- import Cn, { createContext as bn, useState as x, useEffect as Ye, useRef as qe, useContext as pt, useMemo as L, createElement as se, forwardRef as me } from "react";
1
+ var $t = Object.defineProperty;
2
+ var Ut = (e, t, r) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var Y = (e, t, r) => (Ut(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { CommandType as X, ICommandService as E, IUniverInstanceService as $, IUndoRedoService as At, sequenceExecute as Lt, Tools as Vt, Disposable as H, OnLifecycle as k, LifecycleStages as U, Range as R, Rectangle as De, ObjectMatrix as lt, CellValueType as se, toDisposable as Z, ThemeService as ut, runOnLifecycle as Ht, ILocalStorageService as kt, LocaleService as T, DisposableCollection as dt, UniverInstanceType as de, Plugin as Ft, PluginType as Bt } from "@univerjs/core";
5
+ import { transformCellsToRange as me, rangeMerge as z, SetNumfmtMutation as w, factorySetNumfmtUndoMutation as he, RemoveNumfmtMutation as M, factoryRemoveNumfmtUndoMutation as J, INumfmtService as A, INTERCEPTOR_POINT as mt, SheetInterceptorService as Ae, SelectionManagerService as ee, ClearSelectionFormatCommand as zt, ClearSelectionAllCommand as Wt, SetRangeValuesCommand as Kt, getCurrentSheetDisabled$ as fe, RefRangeService as Gt, EffectRefRangId as j, handleMoveRows as Yt, handleMoveCols as qt, handleIRemoveRow as Zt, handleIRemoveCol as Jt, handleMoveRange as Qt, handleInsertRow as Xt, handleInsertRangeMoveRight as en, handleInsertRangeMoveDown as tn, handleInsertCol as nn, handleDeleteRangeMoveUp as rn, handleDeleteRangeMoveLeft as sn, runRefRangeMutations as an, RemoveSheetCommand as on } from "@univerjs/sheets";
6
+ import { Inject as g, Injector as K, createIdentifier as cn } from "@wendellhu/redi";
7
+ import { IAutoFillService as ln, APPLY_TYPE as He, getAutoFillRepeatRange as un, SheetSkeletonManagerService as Ke, COPY_TYPE as nt, PREDEFINED_HOOK_NAME as rt, getRepeatRange as dn, ISheetClipboardService as mn, IEditorBridgeService as hn } from "@univerjs/sheets-ui";
8
+ import { map as le, distinctUntilChanged as ht, switchMap as ft, tap as fn, debounceTime as pn, filter as st, bufferTime as vn } from "rxjs/operators";
9
+ import D from "@univerjs/engine-numfmt";
10
+ import { IRenderManagerService as gn, ITextSelectionRenderManager as _n } from "@univerjs/engine-render";
11
+ import { ComponentManager as pt, ISidebarService as Sn, MenuItemType as pe, MenuGroup as ve, MenuPosition as ge, getMenuHiddenObservable as _e, IMenuService as Cn } from "@univerjs/ui";
12
+ import { Observable as q, combineLatest as bn, merge as Ge } from "rxjs";
13
+ import yn, { createContext as Rn, useState as x, useEffect as Ye, useRef as qe, useContext as vt, useMemo as V, createElement as te, forwardRef as ie } from "react";
14
14
  import { InputNumber as Ze, Select as Je, SelectList as Qe, Button as it } from "@univerjs/design";
15
- import { useDependency as N, useInjector as Rn } from "@wendellhu/redi/react-bindings";
16
- import { FormulaDataModel as yn } from "@univerjs/engine-formula";
17
- const te = {
15
+ import { useDependency as N, useInjector as In } from "@wendellhu/redi/react-bindings";
16
+ import { FormulaDataModel as Mn } from "@univerjs/engine-formula";
17
+ const Q = {
18
18
  id: "sheet.command.numfmt.set.numfmt",
19
- type: ne.COMMAND,
19
+ type: X.COMMAND,
20
20
  handler: (e, t) => {
21
21
  if (!t)
22
22
  return !1;
23
- const r = e.get(V), n = e.get($), s = e.get(Tt), i = n.getCurrentUniverSheetInstance(), a = i.getUnitId(), c = i.getActiveSheet().getSheetId(), d = t.values.filter((f) => !!f.pattern), l = t.values.filter((f) => !f.pattern), u = ue(a, c, d), m = {
23
+ const r = e.get(E), n = e.get($), s = e.get(At), i = n.getCurrentUniverSheetInstance(), a = i.getUnitId(), c = i.getActiveSheet().getSheetId(), d = t.values.filter((f) => !!f.pattern), l = t.values.filter((f) => !f.pattern), u = me(a, c, d), m = {
24
24
  unitId: a,
25
25
  subUnitId: c,
26
26
  ranges: l.map((f) => ({
@@ -33,67 +33,67 @@ const te = {
33
33
  if (d.length) {
34
34
  Object.keys(u.values).forEach((S) => {
35
35
  const C = u.values[S];
36
- C.ranges = W(C.ranges);
36
+ C.ranges = z(C.ranges);
37
37
  }), h.push({
38
38
  id: w.id,
39
39
  params: u
40
40
  });
41
- const f = de(e, u);
41
+ const f = he(e, u);
42
42
  _.push(...f);
43
43
  }
44
44
  if (l.length) {
45
- m.ranges = W(m.ranges), h.push({
46
- id: I.id,
45
+ m.ranges = z(m.ranges), h.push({
46
+ id: M.id,
47
47
  params: m
48
48
  });
49
49
  const f = J(e, m);
50
50
  _.push(...f);
51
51
  }
52
- const p = Ut(h, r).result;
53
- return p && s.pushUndoRedo({
52
+ const v = Lt(h, r).result;
53
+ return v && s.pushUndoRedo({
54
54
  unitID: a,
55
55
  undoMutations: _,
56
56
  redoMutations: h
57
- }), p;
57
+ }), v;
58
58
  }
59
- }, In = {
59
+ }, On = {
60
60
  sheet: {
61
61
  numfmt: {
62
- title: "数据格式",
63
- numfmtType: "格式类型",
64
- cancel: "取消",
65
- confirm: "确认",
66
- general: "常规",
67
- accounting: "会计",
68
- text: "文本",
69
- number: "数值",
70
- currency: "货币",
71
- date: "日期",
72
- time: "时间",
73
- thousandthPercentile: "千分位符",
74
- preview: "示例",
75
- dateTime: "日期时间",
76
- decimalLength: "小数位数",
77
- currencyType: "货币类型",
78
- moreFmt: "更多格式",
79
- financialValue: "财务数值",
80
- roundingCurrency: "货币取整",
81
- timeDuration: "持续时间",
82
- currencyDes: "货币格式用于表示一般货币数值。会计格式可以对一列数值进行小数点对齐",
83
- accountingDes: "会计数字格式可对一列数值进行货币符号和小数点对齐",
84
- dateType: "日期类型",
85
- dateDes: "日期格式将日期和时间系列数值品示为日期值。",
86
- negType: "负数类型",
87
- generalDes: "常规格式不包含任何特定的数字格式。",
88
- thousandthPercentileDes: "千分位符格式用于一般数字的表示。货币和会计格式则提供货币值计算的专用格式。",
89
- addDecimal: "增加小数位",
90
- subtractDecimal: "减少小数位"
62
+ title: "Number format",
63
+ numfmtType: "Format types",
64
+ cancel: "Cancel",
65
+ confirm: "Confirm",
66
+ general: "General",
67
+ accounting: "Accounting",
68
+ text: "Text",
69
+ number: "Number",
70
+ currency: "Currency",
71
+ date: "Date",
72
+ time: "Time",
73
+ thousandthPercentile: "Thousands separator",
74
+ preview: "Preview",
75
+ dateTime: "Date and time",
76
+ decimalLength: "Decimal places",
77
+ currencyType: "Currency Symbol",
78
+ moreFmt: "More Formats",
79
+ financialValue: "Financial value",
80
+ roundingCurrency: "Rounding up the currency",
81
+ timeDuration: "Duration Time",
82
+ currencyDes: "The currency format is used to represent general currency values. The accounting format aligns a column of values with decimal points",
83
+ accountingDes: "The accounting number format aligns a column of values with currency symbols and decimal points",
84
+ dateType: "Date Type",
85
+ dateDes: "The date format presents date and time series values as date values.",
86
+ negType: "A negative number type",
87
+ generalDes: "The regular format does not contain any specific number format.",
88
+ thousandthPercentileDes: "The percentile format is used for the representation of ordinary numbers. Monetary and accounting formats provide a specialized format for monetary value calculations.",
89
+ addDecimal: "Increase decimal places",
90
+ subtractDecimal: "Decreasing decimal places"
91
91
  }
92
92
  }
93
- }, fs = In, Mn = {
93
+ }, Pn = On, xn = {
94
94
  sheet: {
95
95
  numfmt: {
96
- title: "数据格式",
96
+ title: "数字格式",
97
97
  numfmtType: "格式类型",
98
98
  cancel: "取消",
99
99
  confirm: "确认",
@@ -124,8 +124,8 @@ const te = {
124
124
  subtractDecimal: "减少小数位"
125
125
  }
126
126
  }
127
- }, On = Mn, le = "SHEET_NUMFMT_PLUGIN", we = (e) => {
128
- const t = e.filter((i) => i.id === I.id).map((i) => i.params), r = e.filter((i) => i.id === w.id).map((i) => i.params), n = [];
127
+ }, wn = xn, ue = "SHEET_NUMFMT_PLUGIN", Ee = (e) => {
128
+ const t = e.filter((i) => i.id === M.id).map((i) => i.params), r = e.filter((i) => i.id === w.id).map((i) => i.params), n = [];
129
129
  if (t[0]) {
130
130
  const i = t.reduce(
131
131
  (a, o) => (a.ranges.push(...o.ranges), a),
@@ -135,12 +135,12 @@ const te = {
135
135
  subUnitId: t[0].subUnitId
136
136
  }
137
137
  );
138
- i.ranges = W(i.ranges), n.push({ id: I.id, params: i });
138
+ i.ranges = z(i.ranges), n.push({ id: M.id, params: i });
139
139
  }
140
140
  const s = (i, a) => {
141
141
  const o = Object.keys(i), c = o.findIndex((d) => {
142
142
  const l = i[d];
143
- return At.diffValue(l, a);
143
+ return Vt.diffValue(l, a);
144
144
  });
145
145
  return o[c];
146
146
  };
@@ -166,17 +166,17 @@ const te = {
166
166
  );
167
167
  Object.keys(i.values).forEach((a) => {
168
168
  const o = i.values[a];
169
- o.ranges = W(o.ranges);
169
+ o.ranges = z(o.ranges);
170
170
  }), n.push({ id: w.id, params: i });
171
171
  }
172
172
  return n;
173
173
  };
174
- var Pn = Object.defineProperty, xn = Object.getOwnPropertyDescriptor, wn = (e, t, r, n) => {
175
- for (var s = n > 1 ? void 0 : n ? xn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
174
+ var jn = Object.defineProperty, Nn = Object.getOwnPropertyDescriptor, Tn = (e, t, r, n) => {
175
+ for (var s = n > 1 ? void 0 : n ? Nn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
176
176
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
177
- return n && s && Pn(t, r, s), s;
178
- }, ve = (e, t) => (r, n) => t(r, n, e);
179
- let _e = class extends H {
177
+ return n && s && jn(t, r, s), s;
178
+ }, Ce = (e, t) => (r, n) => t(r, n, e);
179
+ let Re = class extends H {
180
180
  constructor(e, t, r, n) {
181
181
  super(), this._injector = e, this._univerInstanceService = t, this._numfmtService = r, this._autoFillService = n, this._initAutoFill();
182
182
  }
@@ -193,8 +193,8 @@ let _e = class extends H {
193
193
  endColumn: i.col,
194
194
  endRow: i.row
195
195
  }, u = [];
196
- if (M.foreach(a, (m, h) => {
197
- const _ = xe.getPositionRange(
196
+ if (R.foreach(a, (m, h) => {
197
+ const _ = De.getPositionRange(
198
198
  {
199
199
  startRow: m,
200
200
  startColumn: h,
@@ -202,14 +202,14 @@ let _e = class extends H {
202
202
  endRow: m
203
203
  },
204
204
  d
205
- ), p = this._numfmtService.getValue(
205
+ ), v = this._numfmtService.getValue(
206
206
  o,
207
207
  c,
208
208
  _.startRow,
209
209
  _.startColumn
210
210
  );
211
- if (p) {
212
- const f = xe.getPositionRange(
211
+ if (v) {
212
+ const f = De.getPositionRange(
213
213
  {
214
214
  startRow: m,
215
215
  startColumn: h,
@@ -219,8 +219,8 @@ let _e = class extends H {
219
219
  l
220
220
  );
221
221
  u.push({
222
- pattern: p.pattern,
223
- type: p.type,
222
+ pattern: v.pattern,
223
+ type: v.type,
224
224
  row: f.startRow,
225
225
  col: f.startColumn
226
226
  });
@@ -228,8 +228,8 @@ let _e = class extends H {
228
228
  }), u.length) {
229
229
  const m = {
230
230
  id: w.id,
231
- params: ue(o, c, u)
232
- }, h = de(this._injector, m.params);
231
+ params: me(o, c, u)
232
+ }, h = he(this._injector, m.params);
233
233
  return {
234
234
  redos: [m],
235
235
  undos: h
@@ -241,15 +241,15 @@ let _e = class extends H {
241
241
  row: s.startRow,
242
242
  col: s.startColumn
243
243
  };
244
- return cn(s, i).forEach((l) => {
244
+ return un(s, i).forEach((l) => {
245
245
  const { undos: u, redos: m } = t(c, l.repeatStartCell, l.relativeRange);
246
246
  a.push(...u), o.push(...m);
247
247
  }), {
248
- undos: we(a),
249
- redos: we(o)
248
+ undos: Ee(a),
249
+ redos: Ee(o)
250
250
  };
251
251
  }, n = {
252
- id: le,
252
+ id: ue,
253
253
  onFillData: (s, i, a) => {
254
254
  if (a === He.COPY || a === He.ONLY_FORMAT || a === He.SERIES) {
255
255
  const { source: o, target: c } = s;
@@ -261,15 +261,15 @@ let _e = class extends H {
261
261
  this.disposeWithMe(this._autoFillService.addHook(n));
262
262
  }
263
263
  };
264
- _e = wn([
265
- k(T.Rendered, _e),
266
- ve(0, g(K)),
267
- ve(1, g($)),
268
- ve(2, g(U)),
269
- ve(3, g(on))
270
- ], _e);
271
- const Xe = (e) => E.getInfo(e).type || "unknown", gt = (e, t) => {
272
- const n = E.getInfo(e)._partitions[1], s = E.format(e, t, { locale: "zh-CN" });
264
+ Re = Tn([
265
+ k(U.Rendered, Re),
266
+ Ce(0, g(K)),
267
+ Ce(1, g($)),
268
+ Ce(2, g(A)),
269
+ Ce(3, g(ln))
270
+ ], Re);
271
+ const Xe = (e) => D.getInfo(e).type || "unknown", gt = (e, t) => {
272
+ const n = D.getInfo(e)._partitions[1], s = D.format(e, t, { locale: "zh-CN" });
273
273
  return t < 0 ? {
274
274
  result: s,
275
275
  color: n.color
@@ -277,12 +277,12 @@ const Xe = (e) => E.getInfo(e).type || "unknown", gt = (e, t) => {
277
277
  result: s
278
278
  };
279
279
  };
280
- var jn = Object.defineProperty, Nn = Object.getOwnPropertyDescriptor, Dn = (e, t, r, n) => {
281
- for (var s = n > 1 ? void 0 : n ? Nn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
280
+ var Dn = Object.defineProperty, En = Object.getOwnPropertyDescriptor, $n = (e, t, r, n) => {
281
+ for (var s = n > 1 ? void 0 : n ? En(t, r) : t, i = e.length - 1, a; i >= 0; i--)
282
282
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
283
- return n && s && jn(t, r, s), s;
284
- }, ae = (e, t) => (r, n) => t(r, n, e);
285
- let Se = class extends H {
283
+ return n && s && Dn(t, r, s), s;
284
+ }, oe = (e, t) => (r, n) => t(r, n, e);
285
+ let Ie = class extends H {
286
286
  constructor(e, t, r, n, s) {
287
287
  super(), this._sheetInterceptorService = e, this._themeService = t, this._sheetSkeletonManagerService = r, this._commandService = n, this._numfmtService = s, this._initInterceptorCellContent();
288
288
  }
@@ -295,7 +295,7 @@ let Se = class extends H {
295
295
  if (!a)
296
296
  return n(t);
297
297
  const o = t;
298
- if (!o || o.t !== ee.NUMBER)
298
+ if (!o || o.t !== se.NUMBER)
299
299
  return n(t);
300
300
  let c = "";
301
301
  const d = e.getValue(r.row, r.col);
@@ -321,7 +321,7 @@ let Se = class extends H {
321
321
  const r = t.params;
322
322
  Object.keys(r.values).forEach((n) => {
323
323
  r.values[n].ranges.forEach((i) => {
324
- M.foreach(i, (a, o) => {
324
+ R.foreach(i, (a, o) => {
325
325
  e.realDeleteValue(a, o);
326
326
  });
327
327
  });
@@ -331,7 +331,7 @@ let Se = class extends H {
331
331
  ), this.disposeWithMe(
332
332
  Z(
333
333
  this._sheetSkeletonManagerService.currentSkeleton$.pipe(
334
- ce((t) => t == null ? void 0 : t.sheetId),
334
+ le((t) => t == null ? void 0 : t.sheetId),
335
335
  ht()
336
336
  ).subscribe(() => {
337
337
  e.reset();
@@ -340,18 +340,18 @@ let Se = class extends H {
340
340
  );
341
341
  }
342
342
  };
343
- Se = Dn([
344
- k(T.Rendered, Se),
345
- ae(0, g(Ee)),
346
- ae(1, g(ut)),
347
- ae(2, g(Ke)),
348
- ae(3, g(V)),
349
- ae(4, g(U))
350
- ], Se);
351
- const z = (e, t = 0) => {
343
+ Ie = $n([
344
+ k(U.Rendered, Ie),
345
+ oe(0, g(Ae)),
346
+ oe(1, g(ut)),
347
+ oe(2, g(Ke)),
348
+ oe(3, g(E)),
349
+ oe(4, g(A))
350
+ ], Ie);
351
+ const W = (e, t = 0) => {
352
352
  var n;
353
- return e && (n = E.getInfo(e).maxDecimals) != null ? n : t;
354
- }, ie = (e, t) => {
353
+ return e && (n = D.getInfo(e).maxDecimals) != null ? n : t;
354
+ }, Le = (e, t) => {
355
355
  if (e && !t || !e && t)
356
356
  return !1;
357
357
  const r = (d) => d.reduce(
@@ -362,54 +362,54 @@ const z = (e, t = 0) => {
362
362
  return u.type === "point" ? (l.isEnd = !0, l) : { ...l, result: l.result + m };
363
363
  },
364
364
  { isEnd: !1, result: "" }
365
- ).result, n = E.getInfo(e)._partitions, s = E.getInfo(t)._partitions, i = r(n[0].tokens), a = r(s[0].tokens), o = r(n[1].tokens), c = r(s[1].tokens);
365
+ ).result, n = D.getInfo(e)._partitions, s = D.getInfo(t)._partitions, i = r(n[0].tokens), a = r(s[0].tokens), o = r(n[1].tokens), c = r(s[1].tokens);
366
366
  return i === a && o === c && n[1].color === s[1].color;
367
- }, at = (e) => new Array(Math.min(Math.max(0, Number(e)), 30)).fill(0).join(""), y = (e, t) => e.split(";").map((n) => /\.0?/.test(n) ? n.replace(
367
+ }, at = (e) => new Array(Math.min(Math.max(0, Number(e)), 30)).fill(0).join(""), I = (e, t) => e.split(";").map((n) => /\.0?/.test(n) ? n.replace(
368
368
  /\.0*/g,
369
369
  `${t > 0 ? "." : ""}${at(Number(t || 0))}`
370
370
  ) : /0([^0]?)|0$/.test(n) ? n.replace(
371
371
  /0([^0]+)|0$/,
372
372
  `0${t > 0 ? "." : ""}${at(Number(t || 0))}$1`
373
- ) : n).join(";"), En = (e) => /\.0?/.test(e) || /0([^0]?)|0$/.test(e), _t = {
373
+ ) : n).join(";"), Un = (e) => /\.0?/.test(e) || /0([^0]?)|0$/.test(e), _t = {
374
374
  id: "sheet.command.numfmt.add.decimal.command",
375
- type: ne.COMMAND,
375
+ type: X.COMMAND,
376
376
  handler: async (e) => {
377
- const t = e.get(V), r = e.get(re), n = e.get(U), s = e.get($), i = r.getSelections();
377
+ const t = e.get(E), r = e.get(ee), n = e.get(A), s = e.get($), i = r.getSelections();
378
378
  if (!i || !i.length)
379
379
  return !1;
380
380
  const a = s.getCurrentUniverSheetInstance(), o = a.getActiveSheet(), c = a.getUnitId(), d = o.getSheetId();
381
381
  let l = 0;
382
382
  i.forEach((_) => {
383
- M.foreach(_.range, (p, f) => {
384
- const S = n.getValue(c, d, p, f);
383
+ R.foreach(_.range, (v, f) => {
384
+ const S = n.getValue(c, d, v, f);
385
385
  if (!S)
386
386
  return;
387
- const C = z(S.pattern);
387
+ const C = W(S.pattern);
388
388
  l = C > l ? C : l;
389
389
  });
390
390
  });
391
- const u = l + 1, m = y(`0${u > 0 ? ".0" : ""}`, u), h = [];
391
+ const u = l + 1, m = I(`0${u > 0 ? ".0" : ""}`, u), h = [];
392
392
  return i.forEach((_) => {
393
- M.foreach(_.range, (p, f) => {
394
- const S = n.getValue(c, d, p, f);
395
- if (!S || ie(S.pattern, "0.0"))
393
+ R.foreach(_.range, (v, f) => {
394
+ const S = n.getValue(c, d, v, f);
395
+ if (!S)
396
396
  h.push({
397
- row: p,
397
+ row: v,
398
398
  col: f,
399
399
  pattern: m
400
400
  });
401
401
  else {
402
- const C = z(S.pattern), R = y(S.pattern, C + 1);
403
- R !== S.pattern && h.push({
404
- row: p,
402
+ const C = W(S.pattern), y = I(S.pattern, C + 1);
403
+ y !== S.pattern && h.push({
404
+ row: v,
405
405
  col: f,
406
- pattern: R
406
+ pattern: y
407
407
  });
408
408
  }
409
409
  });
410
- }), h.length ? await t.executeCommand(te.id, { values: h }) : !1;
410
+ }), h.length ? await t.executeCommand(Q.id, { values: h }) : !1;
411
411
  }
412
- }, $n = [
412
+ }, An = [
413
413
  {
414
414
  label: "1930-08-05",
415
415
  suffix: "yyyy-MM-dd"
@@ -454,7 +454,7 @@ const z = (e, t = 0) => {
454
454
  label: "08-05 下午 01:30",
455
455
  suffix: "MM-dd A/P hh:mm"
456
456
  }
457
- ], Tn = [
457
+ ], Ln = [
458
458
  {
459
459
  label: "(1,235)",
460
460
  suffix: "#,##0_);(#,##0)"
@@ -512,72 +512,72 @@ const z = (e, t = 0) => {
512
512
  }
513
513
  ], Ct = {
514
514
  id: "sheet.command.numfmt.set.currency",
515
- type: ne.COMMAND,
515
+ type: X.COMMAND,
516
516
  handler: async (e) => {
517
- const t = e.get(V), n = e.get(re).getSelections();
517
+ const t = e.get(E), n = e.get(ee).getSelections();
518
518
  if (!n || !n.length)
519
519
  return !1;
520
520
  const s = [], i = St[0].suffix("¥");
521
521
  return n.forEach((o) => {
522
- M.foreach(o.range, (c, d) => {
522
+ R.foreach(o.range, (c, d) => {
523
523
  s.push({ row: c, col: d, pattern: i, type: "currency" });
524
524
  });
525
- }), await t.executeCommand(te.id, { values: s });
525
+ }), await t.executeCommand(Q.id, { values: s });
526
526
  }
527
527
  }, bt = {
528
528
  id: "sheet.command.numfmt.subtract.decimal.command",
529
- type: ne.COMMAND,
529
+ type: X.COMMAND,
530
530
  handler: async (e) => {
531
- const t = e.get(V), r = e.get(re), n = e.get(U), s = e.get($), i = r.getSelections();
531
+ const t = e.get(E), r = e.get(ee), n = e.get(A), s = e.get($), i = r.getSelections();
532
532
  if (!i || !i.length)
533
533
  return !1;
534
534
  const a = s.getCurrentUniverSheetInstance(), o = a.getActiveSheet(), c = a.getUnitId(), d = o.getSheetId();
535
535
  let l = 0;
536
- i.forEach((p) => {
537
- M.foreach(p.range, (f, S) => {
536
+ i.forEach((v) => {
537
+ R.foreach(v.range, (f, S) => {
538
538
  const C = n.getValue(c, d, f, S);
539
539
  if (!C)
540
540
  return;
541
- const R = z(C.pattern);
542
- l = R > l ? R : l;
541
+ const y = W(C.pattern);
542
+ l = y > l ? y : l;
543
543
  });
544
544
  });
545
- const u = l - 1, m = y(`0${u > 0 ? ".0" : "."}`, u), h = [];
546
- return i.forEach((p) => {
547
- M.foreach(p.range, (f, S) => {
545
+ const u = l - 1, m = I(`0${u > 0 ? ".0" : "."}`, u), h = [];
546
+ return i.forEach((v) => {
547
+ R.foreach(v.range, (f, S) => {
548
548
  const C = n.getValue(c, d, f, S);
549
- if (!C || ie(C.pattern, "0.0"))
549
+ if (!C)
550
550
  h.push({
551
551
  row: f,
552
552
  col: S,
553
553
  pattern: m
554
554
  });
555
555
  else {
556
- const R = z(C.pattern);
556
+ const y = W(C.pattern);
557
557
  h.push({
558
558
  row: f,
559
559
  col: S,
560
- pattern: y(C.pattern, R - 1)
560
+ pattern: I(C.pattern, y - 1)
561
561
  });
562
562
  }
563
563
  });
564
- }), await t.executeCommand(te.id, { values: h });
564
+ }), await t.executeCommand(Q.id, { values: h });
565
565
  }
566
566
  }, ke = {
567
567
  id: "sheet.operation.close.numfmt.panel",
568
- type: ne.OPERATION,
568
+ type: X.OPERATION,
569
569
  handler: () => (
570
570
  // do nothing,just notify panel is closed
571
571
  !0
572
572
  )
573
- }, et = an("INumfmtController");
574
- Lt(T.Rendered, et);
575
- const je = {
573
+ }, et = cn("INumfmtController");
574
+ Ht(U.Rendered, et);
575
+ const $e = {
576
576
  id: "sheet.operation.open.numfmt.panel",
577
- type: ne.OPERATION,
577
+ type: X.OPERATION,
578
578
  handler: (e) => (e.get(et).openPanel(), !0)
579
579
  };
580
- var Rt = { exports: {} }, Ve = {};
580
+ var yt = { exports: {} }, Ve = {};
581
581
  /**
582
582
  * @license React
583
583
  * react-jsx-runtime.production.min.js
@@ -587,23 +587,23 @@ var Rt = { exports: {} }, Ve = {};
587
587
  * This source code is licensed under the MIT license found in the
588
588
  * LICENSE file in the root directory of this source tree.
589
589
  */
590
- var Un = Cn, An = Symbol.for("react.element"), Ln = Symbol.for("react.fragment"), Vn = Object.prototype.hasOwnProperty, Hn = Un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, kn = { key: !0, ref: !0, __self: !0, __source: !0 };
591
- function yt(e, t, r) {
590
+ var Vn = yn, Hn = Symbol.for("react.element"), kn = Symbol.for("react.fragment"), Fn = Object.prototype.hasOwnProperty, Bn = Vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, zn = { key: !0, ref: !0, __self: !0, __source: !0 };
591
+ function Rt(e, t, r) {
592
592
  var n, s = {}, i = null, a = null;
593
593
  r !== void 0 && (i = "" + r), t.key !== void 0 && (i = "" + t.key), t.ref !== void 0 && (a = t.ref);
594
594
  for (n in t)
595
- Vn.call(t, n) && !kn.hasOwnProperty(n) && (s[n] = t[n]);
595
+ Fn.call(t, n) && !zn.hasOwnProperty(n) && (s[n] = t[n]);
596
596
  if (e && e.defaultProps)
597
597
  for (n in t = e.defaultProps, t)
598
598
  s[n] === void 0 && (s[n] = t[n]);
599
- return { $$typeof: An, type: e, key: i, ref: a, props: s, _owner: Hn.current };
599
+ return { $$typeof: Hn, type: e, key: i, ref: a, props: s, _owner: Bn.current };
600
600
  }
601
- Ve.Fragment = Ln;
602
- Ve.jsx = yt;
603
- Ve.jsxs = yt;
604
- Rt.exports = Ve;
605
- var v = Rt.exports;
606
- const tt = bn([]), ze = [
601
+ Ve.Fragment = kn;
602
+ Ve.jsx = Rt;
603
+ Ve.jsxs = Rt;
604
+ yt.exports = Ve;
605
+ var p = yt.exports;
606
+ const tt = Rn([]), We = [
607
607
  "$",
608
608
  "£",
609
609
  "¥",
@@ -632,12 +632,12 @@ const tt = bn([]), ze = [
632
632
  "₾",
633
633
  "₿"
634
634
  ];
635
- var Fn = Object.defineProperty, Bn = Object.getOwnPropertyDescriptor, Wn = (e, t, r, n) => {
636
- for (var s = n > 1 ? void 0 : n ? Bn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
635
+ var Wn = Object.defineProperty, Kn = Object.getOwnPropertyDescriptor, Gn = (e, t, r, n) => {
636
+ for (var s = n > 1 ? void 0 : n ? Kn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
637
637
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
638
- return n && s && Fn(t, r, s), s;
639
- }, zn = (e, t) => (r, n) => t(r, n, e);
640
- let Ne = class {
638
+ return n && s && Wn(t, r, s), s;
639
+ }, Yn = (e, t) => (r, n) => t(r, n, e);
640
+ let Ue = class {
641
641
  constructor(e) {
642
642
  this._localStorageService = e;
643
643
  }
@@ -681,21 +681,21 @@ let Ne = class {
681
681
  this._localStorageService.removeItem(e);
682
682
  }
683
683
  };
684
- Ne = Wn([
685
- zn(0, g(Vt))
686
- ], Ne);
687
- const ot = "numfmtCurrency", Kn = (e) => {
688
- const t = N(Ne), [r, n] = x(ze);
684
+ Ue = Gn([
685
+ Yn(0, g(kt))
686
+ ], Ue);
687
+ const ot = "numfmtCurrency", qn = (e) => {
688
+ const t = N(Ue), [r, n] = x(We);
689
689
  return Ye(() => {
690
690
  t.addHabit("numfmtCurrency", []).then(() => {
691
- t.getHabit(ot, [...ze]).then((i) => {
691
+ t.getHabit(ot, [...We]).then((i) => {
692
692
  n(i), e && e(i);
693
693
  });
694
694
  });
695
695
  }, []), { userHabitCurrency: r, mark: (i) => {
696
696
  t.markHabit(ot, i);
697
697
  } };
698
- }, Gn = () => {
698
+ }, Zn = () => {
699
699
  const e = qe([]), [t, r] = x({});
700
700
  return Ye(() => {
701
701
  e.current.forEach((s) => {
@@ -704,68 +704,68 @@ const ot = "numfmtCurrency", Kn = (e) => {
704
704
  }, [t]), (s) => {
705
705
  e.current.push(s), r({});
706
706
  };
707
- }, he = (e) => ze.find((r) => e.includes(r)), Yn = (e) => !!he(e) && e.startsWith("_("), qn = (e) => {
708
- const [t, r] = x(() => z(e.defaultPattern || "", 2)), n = pt(tt), [s, i] = x(() => he(e.defaultPattern) || n[0]), a = L(() => n.map((u) => ({ label: u, value: u })), []), c = N(D).t;
709
- e.action.current = () => y(`_("${s}"* #,##0${t > 0 ? ".0" : ""}_)`, t);
707
+ }, Se = (e) => We.find((r) => e.includes(r)), Jn = (e) => !!Se(e) && e.startsWith("_("), Qn = (e) => {
708
+ const [t, r] = x(() => W(e.defaultPattern || "", 2)), n = vt(tt), [s, i] = x(() => Se(e.defaultPattern) || n[0]), a = V(() => n.map((u) => ({ label: u, value: u })), []), c = N(T).t;
709
+ e.action.current = () => I(`_("${s}"* #,##0${t > 0 ? ".0" : ""}_)`, t);
710
710
  const d = (u) => {
711
- i(u), e.onChange(y(`_("${u}"* #,##0${t > 0 ? ".0" : ""}_)`, t));
711
+ i(u), e.onChange(I(`_("${u}"* #,##0${t > 0 ? ".0" : ""}_)`, t));
712
712
  }, l = (u) => {
713
713
  const m = u || 0;
714
- r(m), e.onChange(y(`_("${s}"* #,##0${m > 0 ? ".0" : ""}_)`, m));
714
+ r(m), e.onChange(I(`_("${s}"* #,##0${m > 0 ? ".0" : ""}_)`, m));
715
715
  };
716
- return /* @__PURE__ */ v.jsxs("div", { children: [
717
- /* @__PURE__ */ v.jsxs("div", { className: "m-t-16 options ", children: [
718
- /* @__PURE__ */ v.jsxs("div", { className: "option", children: [
719
- /* @__PURE__ */ v.jsx("div", { className: "label", children: c("sheet.numfmt.decimalLength") }),
720
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8 w-120", children: /* @__PURE__ */ v.jsx(Ze, { value: t, max: 20, min: 0, onChange: l }) })
716
+ return /* @__PURE__ */ p.jsxs("div", { children: [
717
+ /* @__PURE__ */ p.jsxs("div", { className: "m-t-16 options ", children: [
718
+ /* @__PURE__ */ p.jsxs("div", { className: "option", children: [
719
+ /* @__PURE__ */ p.jsx("div", { className: "label", children: c("sheet.numfmt.decimalLength") }),
720
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8 w-120", children: /* @__PURE__ */ p.jsx(Ze, { value: t, max: 20, min: 0, onChange: l }) })
721
721
  ] }),
722
- /* @__PURE__ */ v.jsxs("div", { className: "option", children: [
723
- /* @__PURE__ */ v.jsx("div", { className: "label", children: c("sheet.numfmt.currencyType") }),
724
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8 w-140", children: /* @__PURE__ */ v.jsx(Je, { onChange: d, options: a, value: s }) })
722
+ /* @__PURE__ */ p.jsxs("div", { className: "option", children: [
723
+ /* @__PURE__ */ p.jsx("div", { className: "label", children: c("sheet.numfmt.currencyType") }),
724
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8 w-140", children: /* @__PURE__ */ p.jsx(Je, { onChange: d, options: a, value: s }) })
725
725
  ] })
726
726
  ] }),
727
- /* @__PURE__ */ v.jsx("div", { className: "describe m-t-14", children: c("sheet.numfmt.accountingDes") })
727
+ /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: c("sheet.numfmt.accountingDes") })
728
728
  ] });
729
729
  }, Fe = (e) => St.map((t) => ({
730
730
  label: t.label(e),
731
731
  value: t.suffix(e),
732
732
  color: t.color
733
- })), It = () => $n.map((e) => ({ label: e.label, value: e.suffix })), Mt = () => Tn.map((e) => ({ label: e.label, value: e.suffix, color: e.color })), Zn = (e) => !!he(e) && !e.startsWith("_("), Jn = (e) => {
734
- const r = N(D).t, n = pt(tt), [s, i] = x(() => he(e.defaultPattern) || n[0]), [a, o] = x(() => z(e.defaultPattern || "", 2)), [c, d] = x(() => {
733
+ })), It = () => An.map((e) => ({ label: e.label, value: e.suffix })), Mt = () => Ln.map((e) => ({ label: e.label, value: e.suffix, color: e.color })), Xn = (e) => !!Se(e) && !e.startsWith("_("), er = (e) => {
734
+ const r = N(T).t, n = vt(tt), [s, i] = x(() => Se(e.defaultPattern) || n[0]), [a, o] = x(() => W(e.defaultPattern || "", 2)), [c, d] = x(() => {
735
735
  var S;
736
- const p = Fe(s);
737
- return ((S = p.find((C) => ie(C.value, e.defaultPattern))) == null ? void 0 : S.value) || p[0].value;
738
- }), l = L(() => Fe(s), [s]), u = L(() => n.map((p) => ({ label: p, value: p })), [n]);
739
- e.action.current = () => y(c, a);
740
- const m = (p) => {
741
- i(p);
742
- const f = Fe(p)[0].value;
743
- d(f), e.onChange(y(f, a));
744
- }, h = (p) => {
745
- d(p), e.onChange(y(p, a));
746
- }, _ = (p) => {
747
- o(p || 0), e.onChange(y(c, p || 0));
736
+ const v = Fe(s);
737
+ return ((S = v.find((C) => Le(C.value, e.defaultPattern))) == null ? void 0 : S.value) || v[0].value;
738
+ }), l = V(() => Fe(s), [s]), u = V(() => n.map((v) => ({ label: v, value: v })), [n]);
739
+ e.action.current = () => I(c, a);
740
+ const m = (v) => {
741
+ i(v);
742
+ const f = Fe(v)[0].value;
743
+ d(f), e.onChange(I(f, a));
744
+ }, h = (v) => {
745
+ d(v), e.onChange(I(v, a));
746
+ }, _ = (v) => {
747
+ o(v || 0), e.onChange(I(c, v || 0));
748
748
  };
749
- return /* @__PURE__ */ v.jsxs("div", { children: [
750
- /* @__PURE__ */ v.jsxs("div", { className: "m-t-16 options ", children: [
751
- /* @__PURE__ */ v.jsxs("div", { className: "option", children: [
752
- /* @__PURE__ */ v.jsx("div", { className: "label", children: r("sheet.numfmt.decimalLength") }),
753
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8 w-120", children: /* @__PURE__ */ v.jsx(Ze, { value: a, max: 20, min: 0, onChange: _ }) })
749
+ return /* @__PURE__ */ p.jsxs("div", { children: [
750
+ /* @__PURE__ */ p.jsxs("div", { className: "m-t-16 options ", children: [
751
+ /* @__PURE__ */ p.jsxs("div", { className: "option", children: [
752
+ /* @__PURE__ */ p.jsx("div", { className: "label", children: r("sheet.numfmt.decimalLength") }),
753
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8 w-120", children: /* @__PURE__ */ p.jsx(Ze, { value: a, max: 20, min: 0, onChange: _ }) })
754
754
  ] }),
755
- /* @__PURE__ */ v.jsxs("div", { className: "option", children: [
756
- /* @__PURE__ */ v.jsx("div", { className: "label", children: r("sheet.numfmt.currencyType") }),
757
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8 w-140", children: /* @__PURE__ */ v.jsx(Je, { onChange: m, options: u, value: s }) })
755
+ /* @__PURE__ */ p.jsxs("div", { className: "option", children: [
756
+ /* @__PURE__ */ p.jsx("div", { className: "label", children: r("sheet.numfmt.currencyType") }),
757
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8 w-140", children: /* @__PURE__ */ p.jsx(Je, { onChange: m, options: u, value: s }) })
758
758
  ] })
759
759
  ] }),
760
- /* @__PURE__ */ v.jsx("div", { className: "m-t-16 label", children: r("sheet.numfmt.negType") }),
761
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ v.jsx(Qe, { onChange: h, options: l, value: c }) }),
762
- /* @__PURE__ */ v.jsx("div", { className: "describe m-t-14", children: r("sheet.numfmt.currencyDes") })
760
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-16 label", children: r("sheet.numfmt.negType") }),
761
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(Qe, { onChange: h, options: l, value: c }) }),
762
+ /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: r("sheet.numfmt.currencyDes") })
763
763
  ] });
764
- }, Qn = (e) => {
765
- const t = E.getInfo(e);
764
+ }, tr = (e) => {
765
+ const t = D.getInfo(e);
766
766
  return It().map((r) => r.value).includes(e) || ["date", "datetime", "time"].includes(t.type);
767
- }, Xn = (e) => {
768
- const t = L(It, []), n = N(D).t, [s, i] = x(() => {
767
+ }, nr = (e) => {
768
+ const t = V(It, []), n = N(T).t, [s, i] = x(() => {
769
769
  if (e.defaultPattern) {
770
770
  const o = t.find((c) => c.value === e.defaultPattern);
771
771
  if (o)
@@ -777,26 +777,26 @@ const ot = "numfmtCurrency", Kn = (e) => {
777
777
  const a = (o) => {
778
778
  i(o), e.onChange(o);
779
779
  };
780
- return /* @__PURE__ */ v.jsxs("div", { children: [
781
- /* @__PURE__ */ v.jsx("div", { className: "m-t-16 label", children: n("sheet.numfmt.dateType") }),
782
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ v.jsx(Qe, { value: s, options: t, onChange: a }) }),
783
- /* @__PURE__ */ v.jsx("div", { className: "describe m-t-14", children: n("sheet.numfmt.dateDes") })
780
+ return /* @__PURE__ */ p.jsxs("div", { children: [
781
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-16 label", children: n("sheet.numfmt.dateType") }),
782
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(Qe, { value: s, options: t, onChange: a }) }),
783
+ /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: n("sheet.numfmt.dateDes") })
784
784
  ] });
785
- }, er = (e) => !e, tr = (e) => {
786
- const r = N(D).t;
787
- return e.action.current = () => "", /* @__PURE__ */ v.jsx("div", { children: /* @__PURE__ */ v.jsx("div", { className: "describe m-t-14", children: r("sheet.numfmt.generalDes") }) });
788
- }, nr = (e) => Mt().some((t) => ie(t.value, e)), rr = (e) => {
789
- const t = N(D), r = L(Mt, []), [n, s] = x(() => z(e.defaultPattern || "", 0)), [i, a] = x(() => {
790
- const u = r.find((m) => ie(m.value, e.defaultPattern || ""));
785
+ }, rr = (e) => !e, sr = (e) => {
786
+ const r = N(T).t;
787
+ return e.action.current = () => "", /* @__PURE__ */ p.jsx("div", { children: /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: r("sheet.numfmt.generalDes") }) });
788
+ }, ir = (e) => Mt().some((t) => Le(t.value, e)), ar = (e) => {
789
+ const t = N(T), r = V(Mt, []), [n, s] = x(() => W(e.defaultPattern || "", 0)), [i, a] = x(() => {
790
+ const u = r.find((m) => Le(m.value, e.defaultPattern || ""));
791
791
  return (u == null ? void 0 : u.value) || r[0].value;
792
- }), o = L(() => y(i, Number(n || 0)), [i, n]), c = L(() => !En(i), [i]), d = (u) => {
793
- s(u || 0), e.onChange(y(i, Number(u || 0)));
792
+ }), o = V(() => I(i, Number(n || 0)), [i, n]), c = V(() => !Un(i), [i]), d = (u) => {
793
+ s(u || 0), e.onChange(I(i, Number(u || 0)));
794
794
  }, l = (u) => {
795
- s(z(u, 0)), a(u), e.onChange(u);
795
+ s(W(u, 0)), a(u), e.onChange(u);
796
796
  };
797
- return e.action.current = () => o, /* @__PURE__ */ v.jsxs("div", { children: [
798
- /* @__PURE__ */ v.jsx("div", { className: "m-t-16 label", children: t.t("sheet.numfmt.decimalLength") }),
799
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ v.jsx(
797
+ return e.action.current = () => o, /* @__PURE__ */ p.jsxs("div", { children: [
798
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-16 label", children: t.t("sheet.numfmt.decimalLength") }),
799
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(
800
800
  Ze,
801
801
  {
802
802
  disabled: c,
@@ -806,68 +806,82 @@ const ot = "numfmtCurrency", Kn = (e) => {
806
806
  onChange: d
807
807
  }
808
808
  ) }),
809
- /* @__PURE__ */ v.jsxs("div", { className: "m-t-16 label", children: [
809
+ /* @__PURE__ */ p.jsxs("div", { className: "m-t-16 label", children: [
810
810
  " ",
811
811
  t.t("sheet.numfmt.negType")
812
812
  ] }),
813
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ v.jsx(Qe, { onChange: l, options: r, value: i }) }),
814
- /* @__PURE__ */ v.jsx("div", { className: "describe m-t-14", children: t.t("sheet.numfmt.thousandthPercentileDes") })
813
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(Qe, { onChange: l, options: r, value: i }) }),
814
+ /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: t.t("sheet.numfmt.thousandthPercentileDes") })
815
815
  ] });
816
- }, sr = (e) => {
817
- const { defaultValue: t, defaultPattern: r, row: n, col: s } = e.value, i = N(D), a = qe(() => ""), o = i.t, c = Gn(), d = L(
816
+ }, or = (e) => {
817
+ const { defaultValue: t, defaultPattern: r, row: n, col: s } = e.value, i = N(T), a = qe(() => ""), o = i.t, c = Zn(), d = V(
818
818
  () => [
819
- { label: "sheet.numfmt.general", component: tr },
820
- { label: "sheet.numfmt.accounting", component: qn },
821
- { label: "sheet.numfmt.currency", component: Jn },
822
- { label: "sheet.numfmt.date", component: Xn },
823
- { label: "sheet.numfmt.thousandthPercentile", component: rr }
819
+ { label: "sheet.numfmt.general", component: sr },
820
+ { label: "sheet.numfmt.accounting", component: Qn },
821
+ { label: "sheet.numfmt.currency", component: er },
822
+ { label: "sheet.numfmt.date", component: nr },
823
+ { label: "sheet.numfmt.thousandthPercentile", component: ar }
824
824
  ].map((b) => ({ ...b, label: o(b.label) })),
825
825
  []
826
- ), [l, u] = x(S), [m, h] = x(() => `${n}_${s}`), { mark: _, userHabitCurrency: p } = Kn(() => h(`${n}_${s}_userCurrency'`)), f = L(() => {
826
+ ), [l, u] = x(S), [m, h] = x(() => `${n}_${s}`), { mark: _, userHabitCurrency: v } = qn(() => h(`${n}_${s}_userCurrency'`)), f = V(() => {
827
827
  var b;
828
- return (b = d.find((Q) => Q.label === l)) == null ? void 0 : b.component;
828
+ return (b = d.find((ne) => ne.label === l)) == null ? void 0 : b.component;
829
829
  }, [l]);
830
830
  function S() {
831
- return [er, Yn, Zn, Qn, nr].reduce((Q, Nt, Dt) => Q || (Nt(r) ? d[Dt].label : ""), "") || d[0].label;
831
+ return [rr, Jn, Xn, tr, ir].reduce((ne, Dt, Et) => ne || (Dt(r) ? d[Et].label : ""), "") || d[0].label;
832
832
  }
833
833
  const C = d.map((b) => ({
834
834
  label: b.label,
835
835
  value: b.label
836
- })), R = (b) => {
836
+ })), y = (b) => {
837
837
  u(b), c(() => e.onChange({ type: "change", value: a.current() || "" }));
838
- }, A = (b) => {
838
+ }, L = (b) => {
839
839
  e.onChange({ type: "change", value: b });
840
840
  }, G = () => {
841
- const b = a.current() || "", Q = he(b);
842
- Q && _(Q), e.onChange({ type: "confirm", value: b });
841
+ const b = a.current() || "", ne = Se(b);
842
+ ne && _(ne), e.onChange({ type: "confirm", value: b });
843
843
  }, F = () => {
844
844
  e.onChange({ type: "cancel", value: "" });
845
845
  }, B = {
846
- onChange: A,
846
+ onChange: L,
847
847
  defaultValue: t,
848
848
  defaultPattern: r,
849
849
  action: a
850
850
  };
851
851
  return Ye(() => {
852
852
  u(S()), h(`${n}_${s}`);
853
- }, [n, s]), /* @__PURE__ */ v.jsxs("div", { className: "numfmt-panel p-b-20", children: [
854
- /* @__PURE__ */ v.jsxs("div", { children: [
855
- /* @__PURE__ */ v.jsx("div", { className: "label m-t-14", children: o("sheet.numfmt.numfmtType") }),
856
- /* @__PURE__ */ v.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ v.jsx(Je, { onChange: R, options: C, value: l }) }),
857
- /* @__PURE__ */ v.jsx("div", { children: f && /* @__PURE__ */ v.jsx(tt.Provider, { value: p, children: /* @__PURE__ */ se(f, { ...B, key: m }) }) })
853
+ }, [n, s]), /* @__PURE__ */ p.jsxs("div", { className: "numfmt-panel p-b-20", children: [
854
+ /* @__PURE__ */ p.jsxs("div", { children: [
855
+ /* @__PURE__ */ p.jsx("div", { className: "label m-t-14", children: o("sheet.numfmt.numfmtType") }),
856
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(Je, { onChange: y, options: C, value: l }) }),
857
+ /* @__PURE__ */ p.jsx("div", { children: f && /* @__PURE__ */ p.jsx(tt.Provider, { value: v, children: /* @__PURE__ */ te(f, { ...B, key: m }) }) })
858
858
  ] }),
859
- /* @__PURE__ */ v.jsxs("div", { className: "btn-list m-t-14 m-b-20", children: [
860
- /* @__PURE__ */ v.jsx(it, { size: "small", onClick: F, className: "m-r-12", children: o("sheet.numfmt.cancel") }),
861
- /* @__PURE__ */ v.jsx(it, { type: "primary", size: "small", onClick: G, children: o("sheet.numfmt.confirm") })
859
+ /* @__PURE__ */ p.jsxs("div", { className: "btn-list m-t-14 m-b-20", children: [
860
+ /* @__PURE__ */ p.jsx(it, { size: "small", onClick: F, className: "m-r-12", children: o("sheet.numfmt.cancel") }),
861
+ /* @__PURE__ */ p.jsx(it, { type: "primary", size: "small", onClick: G, children: o("sheet.numfmt.confirm") })
862
862
  ] })
863
863
  ] });
864
+ }, Ot = {
865
+ id: "sheet.command.numfmt.set.percent",
866
+ type: X.COMMAND,
867
+ handler: async (e) => {
868
+ const t = e.get(E), n = e.get(ee).getSelections();
869
+ if (!n || !n.length)
870
+ return !1;
871
+ const s = [], i = "0%";
872
+ return n.forEach((o) => {
873
+ R.foreach(o.range, (c, d) => {
874
+ s.push({ row: c, col: d, pattern: i, type: "percent" });
875
+ });
876
+ }), await t.executeCommand(Q.id, { values: s });
877
+ }
864
878
  };
865
- var ir = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, or = (e, t, r, n) => {
866
- for (var s = n > 1 ? void 0 : n ? ar(t, r) : t, i = e.length - 1, a; i >= 0; i--)
879
+ var cr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, ur = (e, t, r, n) => {
880
+ for (var s = n > 1 ? void 0 : n ? lr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
867
881
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
868
- return n && s && ir(t, r, s), s;
882
+ return n && s && cr(t, r, s), s;
869
883
  }, O = (e, t) => (r, n) => t(r, n, e);
870
- let Ce = class extends H {
884
+ let Me = class extends H {
871
885
  constructor(t, r, n, s, i, a, o, c, d, l, u, m) {
872
886
  super();
873
887
  /**
@@ -889,23 +903,23 @@ let Ce = class extends H {
889
903
  );
890
904
  let h = "";
891
905
  m && (h = m.pattern);
892
- const _ = (u == null ? void 0 : u.t) === ee.NUMBER ? u.v : 12345678, p = {
906
+ const _ = (u == null ? void 0 : u.t) === se.NUMBER ? u.v : 12345678, v = {
893
907
  onChange: (f) => {
894
908
  var S, C;
895
909
  if (f.type === "change")
896
910
  this._previewPattern = f.value, this._sheetSkeletonManagerService.reCalculate(), (C = (S = this._renderManagerService.getRenderById(d.getUnitId())) == null ? void 0 : S.mainComponent) == null || C.makeDirty();
897
911
  else if (f.type === "confirm") {
898
- const R = r.getSelectionRanges() || [], A = { values: [] }, G = Xe(f.value);
899
- R.forEach((F) => {
900
- M.foreach(F, (B, b) => {
901
- A.values.push({
912
+ const y = r.getSelectionRanges() || [], L = { values: [] }, G = Xe(f.value);
913
+ y.forEach((F) => {
914
+ R.foreach(F, (B, b) => {
915
+ L.values.push({
902
916
  row: B,
903
917
  col: b,
904
918
  pattern: f.value,
905
919
  type: G
906
920
  });
907
921
  });
908
- }), n.executeCommand(te.id, A), t.close();
922
+ }), n.executeCommand(Q.id, L), t.close();
909
923
  } else
910
924
  f.type === "cancel" && t.close();
911
925
  },
@@ -914,8 +928,8 @@ let Ce = class extends H {
914
928
  t.open({
915
929
  header: { title: a.t("sheet.numfmt.title") },
916
930
  children: {
917
- label: le,
918
- ...p
931
+ label: ue,
932
+ ...v
919
933
  // need passthrough to react props.
920
934
  },
921
935
  onClose: () => {
@@ -931,15 +945,16 @@ let Ce = class extends H {
931
945
  _t,
932
946
  bt,
933
947
  Ct,
934
- je,
948
+ Ot,
949
+ $e,
935
950
  ke,
936
- te
951
+ Q
937
952
  ].forEach((t) => {
938
953
  this.disposeWithMe(this._commandService.registerCommand(t));
939
954
  });
940
955
  }
941
956
  _initPanel() {
942
- this._componentManager.register(le, sr);
957
+ this._componentManager.register(ue, or);
943
958
  }
944
959
  _initInterceptorCommands() {
945
960
  const t = this;
@@ -947,8 +962,8 @@ let Ce = class extends H {
947
962
  this._sheetInterceptorService.interceptCommand({
948
963
  getMutations(r) {
949
964
  switch (r.id) {
950
- case Bt.id:
951
- case Ft.id: {
965
+ case Wt.id:
966
+ case zt.id: {
952
967
  const n = t._univerInstanceService.getCurrentUniverSheetInstance().getUnitId(), s = t._univerInstanceService.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(), i = t._selectionManagerService.getSelectionRanges();
953
968
  if (!(i != null && i.length))
954
969
  break;
@@ -958,7 +973,7 @@ let Ce = class extends H {
958
973
  ranges: []
959
974
  }, o = t._numfmtService.getModel(n, s);
960
975
  i.forEach((d) => {
961
- M.foreach(d, (l, u) => {
976
+ R.foreach(d, (l, u) => {
962
977
  o != null && o.getValue(l, u) && a.ranges.push({
963
978
  startColumn: u,
964
979
  endColumn: u,
@@ -966,10 +981,10 @@ let Ce = class extends H {
966
981
  endRow: l
967
982
  });
968
983
  });
969
- }), a.ranges = W(a.ranges);
984
+ }), a.ranges = z(a.ranges);
970
985
  const c = J(t._injector, a);
971
986
  return {
972
- redos: [{ id: I.id, params: a }],
987
+ redos: [{ id: M.id, params: a }],
973
988
  undos: c
974
989
  };
975
990
  }
@@ -985,12 +1000,12 @@ let Ce = class extends H {
985
1000
  _initRealTimeRenderingInterceptor() {
986
1001
  const t = new q((n) => {
987
1002
  this._commandService.onCommandExecuted((s) => {
988
- s.id === je.id && n.next(!0), s.id === ke.id && n.next(!1);
1003
+ s.id === $e.id && n.next(!0), s.id === ke.id && n.next(!1);
989
1004
  });
990
- }), r = Sn([
1005
+ }), r = bn([
991
1006
  t,
992
1007
  this._selectionManagerService.selectionMoveEnd$.pipe(
993
- ce((n) => n ? n.map((s) => s.range) : [])
1008
+ le((n) => n ? n.map((s) => s.range) : [])
994
1009
  )
995
1010
  ]);
996
1011
  this.disposeWithMe(
@@ -1004,7 +1019,7 @@ let Ce = class extends H {
1004
1019
  };
1005
1020
  })
1006
1021
  ),
1007
- mn(() => {
1022
+ fn(() => {
1008
1023
  this._previewPattern = null;
1009
1024
  })
1010
1025
  ).subscribe(({ disposableCollection: n, selectionRanges: s }) => {
@@ -1018,8 +1033,8 @@ let Ce = class extends H {
1018
1033
  if (s.find(
1019
1034
  (h) => h.startColumn <= m && h.endColumn >= m && h.startRow <= u && h.endRow >= u
1020
1035
  )) {
1021
- const h = d.worksheet.getCellRaw(u, m), _ = h == null ? void 0 : h.v, p = h == null ? void 0 : h.t;
1022
- if (_ == null || p !== ee.NUMBER || this._previewPattern === null)
1036
+ const h = d.worksheet.getCellRaw(u, m), _ = h == null ? void 0 : h.v, v = h == null ? void 0 : h.t;
1037
+ if (_ == null || v !== se.NUMBER || this._previewPattern === null)
1023
1038
  return l(c);
1024
1039
  const f = gt(this._previewPattern, _);
1025
1040
  if (f.color) {
@@ -1027,14 +1042,14 @@ let Ce = class extends H {
1027
1042
  return {
1028
1043
  ...c,
1029
1044
  v: f.result,
1030
- t: ee.STRING,
1045
+ t: se.STRING,
1031
1046
  s: { cl: { rgb: C } }
1032
1047
  };
1033
1048
  }
1034
1049
  return {
1035
1050
  ...c,
1036
1051
  v: f.result,
1037
- t: ee.STRING
1052
+ t: se.STRING
1038
1053
  };
1039
1054
  }
1040
1055
  return l(c);
@@ -1046,7 +1061,7 @@ let Ce = class extends H {
1046
1061
  );
1047
1062
  }
1048
1063
  _commandExecutedListener() {
1049
- const t = [I.id, w.id];
1064
+ const t = [M.id, w.id];
1050
1065
  this.disposeWithMe(
1051
1066
  Z(
1052
1067
  Ge(
@@ -1062,7 +1077,7 @@ let Ce = class extends H {
1062
1077
  };
1063
1078
  }),
1064
1079
  this._numfmtService.modelReplace$
1065
- ).pipe(hn(16)).subscribe((r) => {
1080
+ ).pipe(pn(16)).subscribe((r) => {
1066
1081
  var n, s;
1067
1082
  this._sheetSkeletonManagerService.reCalculate(), (s = (n = this._renderManagerService.getRenderById(r)) == null ? void 0 : n.mainComponent) == null || s.makeDirty();
1068
1083
  })
@@ -1070,27 +1085,27 @@ let Ce = class extends H {
1070
1085
  );
1071
1086
  }
1072
1087
  };
1073
- Ce = or([
1074
- k(T.Rendered, Ce),
1075
- O(0, g(Ee)),
1088
+ Me = ur([
1089
+ k(U.Rendered, Me),
1090
+ O(0, g(Ae)),
1076
1091
  O(1, g(ut)),
1077
1092
  O(2, g(K)),
1078
1093
  O(3, g($)),
1079
1094
  O(4, g(Ke)),
1080
- O(5, g(V)),
1081
- O(6, g(re)),
1082
- O(7, g(vn)),
1083
- O(8, g(U)),
1084
- O(9, g(vt)),
1085
- O(10, g(gn)),
1086
- O(11, g(D))
1087
- ], Ce);
1088
- var cr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, ur = (e, t, r, n) => {
1089
- for (var s = n > 1 ? void 0 : n ? lr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1095
+ O(5, g(E)),
1096
+ O(6, g(ee)),
1097
+ O(7, g(gn)),
1098
+ O(8, g(A)),
1099
+ O(9, g(pt)),
1100
+ O(10, g(Sn)),
1101
+ O(11, g(T))
1102
+ ], Me);
1103
+ var dr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, hr = (e, t, r, n) => {
1104
+ for (var s = n > 1 ? void 0 : n ? mr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1090
1105
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1091
- return n && s && cr(t, r, s), s;
1092
- }, pe = (e, t) => (r, n) => t(r, n, e);
1093
- let be = class extends H {
1106
+ return n && s && dr(t, r, s), s;
1107
+ }, be = (e, t) => (r, n) => t(r, n, e);
1108
+ let Oe = class extends H {
1094
1109
  constructor(t, r, n, s) {
1095
1110
  super();
1096
1111
  Y(this, "_copyInfo");
@@ -1099,7 +1114,7 @@ let be = class extends H {
1099
1114
  _initClipboardHook() {
1100
1115
  this.disposeWithMe(
1101
1116
  this._sheetClipboardService.addClipboardHook({
1102
- id: le,
1117
+ id: ue,
1103
1118
  onBeforeCopy: (t, r, n) => this._collectNumfmt(t, r, n),
1104
1119
  onPasteCells: (t, r, n, s) => {
1105
1120
  const { copyType: i = nt.COPY, pasteType: a } = s, { range: o } = t || {}, { range: c } = r;
@@ -1118,11 +1133,11 @@ let be = class extends H {
1118
1133
  }
1119
1134
  };
1120
1135
  const i = this._numfmtService.getModel(t, r);
1121
- i && M.foreach(n, (a, o) => {
1136
+ i && R.foreach(n, (a, o) => {
1122
1137
  const c = this._numfmtService.getValue(t, r, a, o, i);
1123
1138
  if (!c)
1124
1139
  return;
1125
- const d = xe.getRelativeRange(
1140
+ const d = De.getRelativeRange(
1126
1141
  {
1127
1142
  startRow: a,
1128
1143
  endRow: a,
@@ -1147,17 +1162,17 @@ let be = class extends H {
1147
1162
  r.pasteType
1148
1163
  ))
1149
1164
  return { redos: [], undos: [] };
1150
- const o = ln(r.copyRange, t, !0), c = [], d = { unitId: i, subUnitId: a, ranges: [] }, l = this._numfmtService.getModel(i, a);
1151
- M.foreach(t, (h, _) => {
1165
+ const o = dn(r.copyRange, t, !0), c = [], d = { unitId: i, subUnitId: a, ranges: [] }, l = this._numfmtService.getModel(i, a);
1166
+ R.foreach(t, (h, _) => {
1152
1167
  this._numfmtService.getValue(i, a, h, _, l) && d.ranges.push({ startRow: h, startColumn: _, endRow: h, endColumn: _ });
1153
1168
  }), o.forEach((h) => {
1154
- this._copyInfo && this._copyInfo.matrix.forValue((_, p, f) => {
1155
- const S = xe.getPositionRange(
1169
+ this._copyInfo && this._copyInfo.matrix.forValue((_, v, f) => {
1170
+ const S = De.getPositionRange(
1156
1171
  {
1157
1172
  startRow: _,
1158
1173
  endRow: _,
1159
- startColumn: p,
1160
- endColumn: p
1174
+ startColumn: v,
1175
+ endColumn: v
1161
1176
  },
1162
1177
  h.startRange
1163
1178
  );
@@ -1169,37 +1184,37 @@ let be = class extends H {
1169
1184
  });
1170
1185
  });
1171
1186
  });
1172
- const u = ue(i, a, c);
1187
+ const u = me(i, a, c);
1173
1188
  Object.keys(u.values).forEach((h) => {
1174
1189
  const _ = u.values[h];
1175
- _.ranges = W(_.ranges);
1176
- }), d.ranges = W(d.ranges);
1190
+ _.ranges = z(_.ranges);
1191
+ }), d.ranges = z(d.ranges);
1177
1192
  const m = [
1178
- ...de(this._injector, u),
1193
+ ...he(this._injector, u),
1179
1194
  ...J(this._injector, d)
1180
1195
  ];
1181
1196
  return {
1182
1197
  redos: [
1183
- { id: I.id, params: d },
1198
+ { id: M.id, params: d },
1184
1199
  { id: w.id, params: u }
1185
1200
  ],
1186
- undos: we(m)
1201
+ undos: Ee(m)
1187
1202
  };
1188
1203
  }
1189
1204
  };
1190
- be = ur([
1191
- k(T.Rendered, be),
1192
- pe(0, g(un)),
1193
- pe(1, g(K)),
1194
- pe(2, g(U)),
1195
- pe(3, g($))
1196
- ], be);
1197
- var dr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, hr = (e, t, r, n) => {
1198
- for (var s = n > 1 ? void 0 : n ? mr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1205
+ Oe = hr([
1206
+ k(U.Rendered, Oe),
1207
+ be(0, g(mn)),
1208
+ be(1, g(K)),
1209
+ be(2, g(A)),
1210
+ be(3, g($))
1211
+ ], Oe);
1212
+ var fr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, vr = (e, t, r, n) => {
1213
+ for (var s = n > 1 ? void 0 : n ? pr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1199
1214
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1200
- return n && s && dr(t, r, s), s;
1201
- }, oe = (e, t) => (r, n) => t(r, n, e);
1202
- const fr = () => {
1215
+ return n && s && fr(t, r, s), s;
1216
+ }, ce = (e, t) => (r, n) => t(r, n, e);
1217
+ const gr = () => {
1203
1218
  let e = [];
1204
1219
  return {
1205
1220
  add: (s, i, a, o, c) => e.push({ unitId: s, subUnitId: i, row: a, col: o, value: c }),
@@ -1209,11 +1224,11 @@ const fr = () => {
1209
1224
  }
1210
1225
  };
1211
1226
  };
1212
- let Re = class extends H {
1227
+ let Pe = class extends H {
1213
1228
  constructor(t, r, n, s, i) {
1214
1229
  super();
1215
1230
  // collect effect mutations when edit end and push this to commands stack in next commands progress
1216
- Y(this, "_collectEffectMutation", fr());
1231
+ Y(this, "_collectEffectMutation", gr());
1217
1232
  this._sheetInterceptorService = t, this._numfmtService = r, this._univerInstanceService = n, this._injector = s, this._editorBridgeService = i, this._initInterceptorEditorStart(), this._initInterceptorEditorEnd(), this._initInterceptorCommands();
1218
1233
  }
1219
1234
  _initInterceptorEditorStart() {
@@ -1279,7 +1294,7 @@ let Re = class extends H {
1279
1294
  };
1280
1295
  if (!(t != null && t.v))
1281
1296
  return n(t);
1282
- const a = String(t.v), o = E.parseDate(a) || E.parseTime(a);
1297
+ const a = String(t.v), o = D.parseDate(a) || D.parseTime(a);
1283
1298
  if (!!o) {
1284
1299
  if (o && o.z) {
1285
1300
  const d = Number(o.v);
@@ -1292,10 +1307,10 @@ let Re = class extends H {
1292
1307
  type: "date",
1293
1308
  pattern: o.z
1294
1309
  }
1295
- ), { ...t, v: d, t: ee.NUMBER };
1310
+ ), { ...t, v: d, t: se.NUMBER };
1296
1311
  }
1297
1312
  } else
1298
- (["date", "time", "datetime"].includes((s == null ? void 0 : s.type) || "") || !vr(a)) && i();
1313
+ (["date", "time", "datetime"].includes((s == null ? void 0 : s.type) || "") || !_r(a)) && i();
1299
1314
  return n(t);
1300
1315
  }
1301
1316
  }
@@ -1309,7 +1324,7 @@ let Re = class extends H {
1309
1324
  this._sheetInterceptorService.interceptCommand({
1310
1325
  getMutations(r) {
1311
1326
  switch (r.id) {
1312
- case Wt.id: {
1327
+ case Kt.id: {
1313
1328
  const n = t._univerInstanceService.getCurrentUniverSheetInstance().getUnitId(), s = t._univerInstanceService.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(), i = t._collectEffectMutation.getEffects();
1314
1329
  if (!i.length)
1315
1330
  return {
@@ -1336,13 +1351,13 @@ let Re = class extends H {
1336
1351
  if (a) {
1337
1352
  const l = {
1338
1353
  id: w.id,
1339
- params: ue(n, s, a)
1354
+ params: me(n, s, a)
1340
1355
  };
1341
- c.push(l), d.push(...de(t._injector, l.params));
1356
+ c.push(l), d.push(...he(t._injector, l.params));
1342
1357
  }
1343
1358
  if (o) {
1344
1359
  const l = {
1345
- id: I.id,
1360
+ id: M.id,
1346
1361
  params: {
1347
1362
  unitId: n,
1348
1363
  subUnitId: s,
@@ -1366,35 +1381,35 @@ let Re = class extends H {
1366
1381
  );
1367
1382
  }
1368
1383
  };
1369
- Re = hr([
1370
- k(T.Rendered, Re),
1371
- oe(0, g(Ee)),
1372
- oe(1, g(U)),
1373
- oe(2, g($)),
1374
- oe(3, g(K)),
1375
- oe(4, g(dn))
1376
- ], Re);
1377
- function vr(e) {
1384
+ Pe = vr([
1385
+ k(U.Rendered, Pe),
1386
+ ce(0, g(Ae)),
1387
+ ce(1, g(A)),
1388
+ ce(2, g($)),
1389
+ ce(3, g(K)),
1390
+ ce(4, g(hn))
1391
+ ], Pe);
1392
+ function _r(e) {
1378
1393
  return /^-?\d+(\.\d+)?$/.test(e);
1379
1394
  }
1380
- var pr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, _r = (e, t, r, n) => {
1381
- for (var s = n > 1 ? void 0 : n ? gr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1395
+ var Sr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, br = (e, t, r, n) => {
1396
+ for (var s = n > 1 ? void 0 : n ? Cr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1382
1397
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1383
- return n && s && pr(t, r, s), s;
1384
- }, Sr = (e, t) => (r, n) => t(r, n, e);
1385
- let ye = class extends H {
1398
+ return n && s && Sr(t, r, s), s;
1399
+ }, yr = (e, t) => (r, n) => t(r, n, e);
1400
+ let xe = class extends H {
1386
1401
  constructor(t) {
1387
1402
  super();
1388
1403
  Y(this, "_initLocal", () => {
1389
- this._localeService.load({ zhCN: On });
1404
+ this._localeService.load({ zhCN: wn, enUS: Pn });
1390
1405
  });
1391
1406
  this._localeService = t, this._initLocal();
1392
1407
  }
1393
1408
  };
1394
- ye = _r([
1395
- k(T.Rendered, ye),
1396
- Sr(0, g(D))
1397
- ], ye);
1409
+ xe = br([
1410
+ k(U.Rendered, xe),
1411
+ yr(0, g(T))
1412
+ ], xe);
1398
1413
  var P = function() {
1399
1414
  return P = Object.assign || function(e) {
1400
1415
  for (var t, r = 1, n = arguments.length; r < n; r++) {
@@ -1404,7 +1419,7 @@ var P = function() {
1404
1419
  }
1405
1420
  return e;
1406
1421
  }, P.apply(this, arguments);
1407
- }, Cr = function(e, t) {
1422
+ }, Rr = function(e, t) {
1408
1423
  var r = {};
1409
1424
  for (var n in e)
1410
1425
  Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
@@ -1412,16 +1427,16 @@ var P = function() {
1412
1427
  for (var s = 0, n = Object.getOwnPropertySymbols(e); s < n.length; s++)
1413
1428
  t.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[s]) && (r[n[s]] = e[n[s]]);
1414
1429
  return r;
1415
- }, fe = me(function(e, t) {
1416
- var r = e.icon, n = e.id, s = e.className, i = e.extend, a = Cr(e, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(n, " ").concat(s || "").trim(), c = qe("_".concat(yr()));
1417
- return Ot(r, "".concat(n), { defIds: r.defIds, idSuffix: c.current }, P({ ref: t, className: o }, a), i);
1430
+ }, ae = ie(function(e, t) {
1431
+ var r = e.icon, n = e.id, s = e.className, i = e.extend, a = Rr(e, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(n, " ").concat(s || "").trim(), c = qe("_".concat(Or()));
1432
+ return Pt(r, "".concat(n), { defIds: r.defIds, idSuffix: c.current }, P({ ref: t, className: o }, a), i);
1418
1433
  });
1419
- function Ot(e, t, r, n, s) {
1420
- return se(e.tag, P(P({ key: t }, br(e, r, s)), n), (Rr(e, r).children || []).map(function(i, a) {
1421
- return Ot(i, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, s);
1434
+ function Pt(e, t, r, n, s) {
1435
+ return te(e.tag, P(P({ key: t }, Ir(e, r, s)), n), (Mr(e, r).children || []).map(function(i, a) {
1436
+ return Pt(i, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, s);
1422
1437
  }));
1423
1438
  }
1424
- function br(e, t, r) {
1439
+ function Ir(e, t, r) {
1425
1440
  var n = P({}, e.attrs);
1426
1441
  r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1);
1427
1442
  var s = t.defIds;
@@ -1430,141 +1445,61 @@ function br(e, t, r) {
1430
1445
  typeof o == "string" && (n[a] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
1431
1446
  })), n;
1432
1447
  }
1433
- function Rr(e, t) {
1448
+ function Mr(e, t) {
1434
1449
  var r, n = t.defIds;
1435
1450
  return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? P(P({}, e), { children: e.children.map(function(s) {
1436
1451
  return typeof s.attrs.id == "string" && n && n.indexOf(s.attrs.id) > -1 ? P(P({}, s), { attrs: P(P({}, s.attrs), { id: s.attrs.id + t.idSuffix }) }) : s;
1437
1452
  }) }) : e;
1438
1453
  }
1439
- function yr() {
1454
+ function Or() {
1440
1455
  return Math.random().toString(36).substring(2, 8);
1441
1456
  }
1442
- fe.displayName = "UniverIcon";
1443
- var Ir = {
1444
- tag: "svg",
1445
- attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" },
1446
- children: [
1447
- {
1448
- tag: "path",
1449
- attrs: {
1450
- fill: "currentColor",
1451
- d: "M3.99988 3.60921C3.99988 2.32055 5.04456 1.27588 6.33321 1.27588 7.62187 1.27588 8.66654 2.32055 8.66654 3.60921V6.24136C8.66654 7.53002 7.62187 8.5747 6.33321 8.5747 5.04455 8.5747 3.99988 7.53002 3.99988 6.24136V3.60921zM6.33321 2.60921C5.78093 2.60921 5.33321 3.05693 5.33321 3.60921V6.24136C5.33321 6.79364 5.78093 7.24136 6.33321 7.24136 6.88549 7.24136 7.33321 6.79364 7.33321 6.24136V3.60921C7.33321 3.05693 6.88549 2.60921 6.33321 2.60921zM9.99988 3.60921C9.99988 2.32055 11.0446 1.27588 12.3332 1.27588 13.6219 1.27588 14.6665 2.32055 14.6665 3.60921V6.24136C14.6665 7.53002 13.6219 8.5747 12.3332 8.5747 11.0446 8.5747 9.99988 7.53002 9.99988 6.24136V3.60921zM12.3332 2.60921C11.7809 2.60921 11.3332 3.05693 11.3332 3.60921V6.24136C11.3332 6.79364 11.7809 7.24136 12.3332 7.24136 12.8855 7.24136 13.3332 6.79364 13.3332 6.24136V3.60921C13.3332 3.05693 12.8855 2.60921 12.3332 2.60921z",
1452
- fillRule: "evenodd",
1453
- clipRule: "evenodd"
1454
- }
1455
- },
1456
- {
1457
- tag: "path",
1458
- attrs: {
1459
- fill: "currentColor",
1460
- d: "M12.4713 9.58625C12.211 9.3259 11.7889 9.3259 11.5285 9.58625 11.2682 9.8466 11.2682 10.2687 11.5285 10.5291L12.3904 11.391H6.33329C5.9651 11.391 5.66663 11.6895 5.66663 12.0577 5.66663 12.4258 5.9651 12.7243 6.33329 12.7243H12.3904L11.5285 13.5862C11.2682 13.8466 11.2682 14.2687 11.5285 14.5291 11.7889 14.7894 12.211 14.7894 12.4713 14.5291L14.4669 12.5335C14.4851 12.5156 14.5022 12.4968 14.5183 12.477 14.5484 12.4399 14.5739 12.4003 14.5948 12.359 14.6407 12.2685 14.6666 12.1661 14.6666 12.0577 14.6666 11.9492 14.6407 11.8468 14.5948 11.7563 14.5739 11.715 14.5484 11.6754 14.5183 11.6383 14.5022 11.6185 14.4851 11.5997 14.4669 11.5818L12.4713 9.58625zM1.33325 7.98825C1.33325 7.62006 1.63173 7.32159 1.99992 7.32159H2.33325C2.70144 7.32159 2.99992 7.62006 2.99992 7.98825 2.99992 8.35644 2.70144 8.65492 2.33325 8.65492H1.99992C1.63173 8.65492 1.33325 8.35644 1.33325 7.98825z"
1461
- }
1462
- }
1463
- ]
1464
- }, Pt = me(function(e, t) {
1465
- return se(fe, Object.assign({}, e, {
1457
+ ae.displayName = "UniverIcon";
1458
+ var Pr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.99988 3.60921C3.99988 2.32055 5.04456 1.27588 6.33321 1.27588 7.62187 1.27588 8.66654 2.32055 8.66654 3.60921V6.24136C8.66654 7.53002 7.62187 8.5747 6.33321 8.5747 5.04455 8.5747 3.99988 7.53002 3.99988 6.24136V3.60921zM6.33321 2.60921C5.78093 2.60921 5.33321 3.05693 5.33321 3.60921V6.24136C5.33321 6.79364 5.78093 7.24136 6.33321 7.24136 6.88549 7.24136 7.33321 6.79364 7.33321 6.24136V3.60921C7.33321 3.05693 6.88549 2.60921 6.33321 2.60921zM9.99988 3.60921C9.99988 2.32055 11.0446 1.27588 12.3332 1.27588 13.6219 1.27588 14.6665 2.32055 14.6665 3.60921V6.24136C14.6665 7.53002 13.6219 8.5747 12.3332 8.5747 11.0446 8.5747 9.99988 7.53002 9.99988 6.24136V3.60921zM12.3332 2.60921C11.7809 2.60921 11.3332 3.05693 11.3332 3.60921V6.24136C11.3332 6.79364 11.7809 7.24136 12.3332 7.24136 12.8855 7.24136 13.3332 6.79364 13.3332 6.24136V3.60921C13.3332 3.05693 12.8855 2.60921 12.3332 2.60921z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4713 9.58625C12.211 9.3259 11.7889 9.3259 11.5285 9.58625 11.2682 9.8466 11.2682 10.2687 11.5285 10.5291L12.3904 11.391H6.33329C5.9651 11.391 5.66663 11.6895 5.66663 12.0577 5.66663 12.4258 5.9651 12.7243 6.33329 12.7243H12.3904L11.5285 13.5862C11.2682 13.8466 11.2682 14.2687 11.5285 14.5291 11.7889 14.7894 12.211 14.7894 12.4713 14.5291L14.4669 12.5335C14.4851 12.5156 14.5022 12.4968 14.5183 12.477 14.5484 12.4399 14.5739 12.4003 14.5948 12.359 14.6407 12.2685 14.6666 12.1661 14.6666 12.0577 14.6666 11.9492 14.6407 11.8468 14.5948 11.7563 14.5739 11.715 14.5484 11.6754 14.5183 11.6383 14.5022 11.6185 14.4851 11.5997 14.4669 11.5818L12.4713 9.58625zM1.33325 7.98825C1.33325 7.62006 1.63173 7.32159 1.99992 7.32159H2.33325C2.70144 7.32159 2.99992 7.62006 2.99992 7.98825 2.99992 8.35644 2.70144 8.65492 2.33325 8.65492H1.99992C1.63173 8.65492 1.33325 8.35644 1.33325 7.98825z" } }] }, xt = ie(function(e, t) {
1459
+ return te(ae, Object.assign({}, e, {
1466
1460
  id: "add-digits-single",
1467
1461
  ref: t,
1468
- icon: Ir
1462
+ icon: Pr
1469
1463
  }));
1470
1464
  });
1471
- Pt.displayName = "AddDigitsSingle";
1472
- const Mr = Pt;
1473
- var Or = {
1474
- tag: "svg",
1475
- attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" },
1476
- children: [
1477
- {
1478
- tag: "mask",
1479
- attrs: {
1480
- id: "mask0_102_556",
1481
- style: { maskType: "alpha" },
1482
- width: 16,
1483
- height: 16,
1484
- x: 0,
1485
- y: 0,
1486
- maskUnits: "userSpaceOnUse"
1487
- },
1488
- children: [
1489
- { tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }
1490
- ]
1491
- },
1492
- {
1493
- tag: "g",
1494
- attrs: { mask: "url(#mask0_102_556)" },
1495
- children: [
1496
- {
1497
- tag: "path",
1498
- attrs: {
1499
- fill: "currentColor",
1500
- d: "M0.629584 3.99986C1.13729 3.4922 1.9604 3.49224 2.46806 3.99995L7.57569 9.10806C7.81 9.3424 8.18992 9.3424 8.42424 9.10808L13.5323 3.99998C14.04 3.4923 14.8631 3.4923 15.3708 3.99998C15.8785 4.50766 15.8785 5.33078 15.3708 5.83846L9.41415 11.7951C8.63307 12.5762 7.36669 12.5762 6.58565 11.7951L0.629497 5.83834C0.121839 5.33063 0.121879 4.50752 0.629584 3.99986Z",
1501
- fillRule: "evenodd",
1502
- clipRule: "evenodd"
1503
- }
1504
- }
1505
- ]
1506
- }
1507
- ]
1508
- }, xt = me(function(e, t) {
1509
- return se(fe, Object.assign({}, e, {
1465
+ xt.displayName = "AddDigitsSingle";
1466
+ const xr = xt;
1467
+ var wr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_102_556", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_102_556)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M0.629584 3.99986C1.13729 3.4922 1.9604 3.49224 2.46806 3.99995L7.57569 9.10806C7.81 9.3424 8.18992 9.3424 8.42424 9.10808L13.5323 3.99998C14.04 3.4923 14.8631 3.4923 15.3708 3.99998C15.8785 4.50766 15.8785 5.33078 15.3708 5.83846L9.41415 11.7951C8.63307 12.5762 7.36669 12.5762 6.58565 11.7951L0.629497 5.83834C0.121839 5.33063 0.121879 4.50752 0.629584 3.99986Z", fillRule: "evenodd", clipRule: "evenodd" } }] }] }, wt = ie(function(e, t) {
1468
+ return te(ae, Object.assign({}, e, {
1510
1469
  id: "more-down-single",
1511
1470
  ref: t,
1512
- icon: Or
1471
+ icon: wr
1513
1472
  }));
1514
1473
  });
1515
- xt.displayName = "MoreDownSingle";
1516
- const Pr = xt;
1517
- var xr = {
1518
- tag: "svg",
1519
- attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" },
1520
- children: [
1521
- {
1522
- tag: "path",
1523
- attrs: {
1524
- fill: "currentColor",
1525
- d: "M5 3.61825C5 2.32958 6.04468 1.28491 7.33333 1.28491C8.62199 1.28491 9.66667 2.32958 9.66667 3.61825V6.30787C9.66667 7.59653 8.62199 8.64121 7.33333 8.64121C6.04468 8.64121 5 7.59653 5 6.30787V3.61825ZM7.33333 2.61825C6.78105 2.61825 6.33333 3.06596 6.33333 3.61825V6.30787C6.33333 6.86015 6.78106 7.30787 7.33333 7.30787C7.88561 7.30787 8.33333 6.86015 8.33333 6.30787V3.61825C8.33333 3.06596 7.88561 2.61825 7.33333 2.61825Z",
1526
- fillRule: "evenodd",
1527
- clipRule: "evenodd"
1528
- }
1529
- },
1530
- {
1531
- tag: "path",
1532
- attrs: {
1533
- fill: "currentColor",
1534
- d: "M2 7.9745C2 7.60631 2.29848 7.30783 2.66667 7.30783H3C3.36819 7.30783 3.66667 7.60631 3.66667 7.9745 3.66667 8.34269 3.36819 8.64117 3 8.64117H2.66667C2.29848 8.64117 2 8.34269 2 7.9745zM8.80482 9.56197C9.06517 9.82232 9.06517 10.2444 8.80482 10.5048L7.94289 11.3667H13.3334C13.7016 11.3667 14.0001 11.6652 14.0001 12.0334 14.0001 12.4016 13.7016 12.7 13.3334 12.7H7.94289L8.80482 13.562C9.06517 13.8223 9.06517 14.2444 8.80482 14.5048 8.54447 14.7651 8.12236 14.7651 7.86201 14.5048L5.86201 12.5048C5.79809 12.4409 5.74987 12.3672 5.71733 12.2886 5.68474 12.21 5.66675 12.1238 5.66675 12.0334 5.66675 11.943 5.68474 11.8568 5.71733 11.7782 5.74987 11.6996 5.79809 11.6259 5.86201 11.562L7.86201 9.56197C8.12236 9.30162 8.54447 9.30162 8.80482 9.56197z"
1535
- }
1536
- }
1537
- ]
1538
- }, wt = me(function(e, t) {
1539
- return se(fe, Object.assign({}, e, {
1474
+ wt.displayName = "MoreDownSingle";
1475
+ const jr = wt;
1476
+ var Nr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_561_2", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_561_2)", fillRule: "evenodd", clipRule: "evenodd" }, children: [{ tag: "path", attrs: { d: "M4.91876 2.65039C3.66601 2.65039 2.65045 3.66595 2.65045 4.9187 2.65045 6.17146 3.66601 7.18702 4.91876 7.18702 6.17152 7.18702 7.18708 6.17146 7.18708 4.9187 7.18708 3.66595 6.17152 2.65039 4.91876 2.65039zM3.94663 4.9187C3.94663 4.38181 4.38187 3.94657 4.91876 3.94657 5.45566 3.94657 5.8909 4.38181 5.8909 4.9187 5.8909 5.4556 5.45566 5.89084 4.91876 5.89084 4.38187 5.89084 3.94663 5.4556 3.94663 4.9187zM11.0812 8.81299C9.82842 8.81299 8.81286 9.82855 8.81286 11.0813 8.81286 12.3341 9.82842 13.3496 11.0812 13.3496 12.3339 13.3496 13.3495 12.3341 13.3495 11.0813 13.3495 9.82855 12.3339 8.81299 11.0812 8.81299zM10.109 11.0813C10.109 10.5444 10.5443 10.1092 11.0812 10.1092 11.6181 10.1092 12.0533 10.5444 12.0533 11.0813 12.0533 11.6182 11.6181 12.0534 11.0812 12.0534 10.5443 12.0534 10.109 11.6182 10.109 11.0813zM13.1597 2.84021C13.4128 3.09331 13.4128 3.50365 13.1597 3.75675L3.7568 13.1596C3.5037 13.4127 3.09336 13.4127 2.84026 13.1596 2.58717 12.9065 2.58717 12.4962 2.84026 12.2431L12.2431 2.84021C12.4962 2.58712 12.9066 2.58712 13.1597 2.84021z" } }] }] }, jt = ie(function(e, t) {
1477
+ return te(ae, Object.assign({}, e, {
1478
+ id: "percent-single",
1479
+ ref: t,
1480
+ icon: Nr
1481
+ }));
1482
+ });
1483
+ jt.displayName = "PercentSingle";
1484
+ const Tr = jt;
1485
+ var Dr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5 3.61825C5 2.32958 6.04468 1.28491 7.33333 1.28491C8.62199 1.28491 9.66667 2.32958 9.66667 3.61825V6.30787C9.66667 7.59653 8.62199 8.64121 7.33333 8.64121C6.04468 8.64121 5 7.59653 5 6.30787V3.61825ZM7.33333 2.61825C6.78105 2.61825 6.33333 3.06596 6.33333 3.61825V6.30787C6.33333 6.86015 6.78106 7.30787 7.33333 7.30787C7.88561 7.30787 8.33333 6.86015 8.33333 6.30787V3.61825C8.33333 3.06596 7.88561 2.61825 7.33333 2.61825Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2 7.9745C2 7.60631 2.29848 7.30783 2.66667 7.30783H3C3.36819 7.30783 3.66667 7.60631 3.66667 7.9745 3.66667 8.34269 3.36819 8.64117 3 8.64117H2.66667C2.29848 8.64117 2 8.34269 2 7.9745zM8.80482 9.56197C9.06517 9.82232 9.06517 10.2444 8.80482 10.5048L7.94289 11.3667H13.3334C13.7016 11.3667 14.0001 11.6652 14.0001 12.0334 14.0001 12.4016 13.7016 12.7 13.3334 12.7H7.94289L8.80482 13.562C9.06517 13.8223 9.06517 14.2444 8.80482 14.5048 8.54447 14.7651 8.12236 14.7651 7.86201 14.5048L5.86201 12.5048C5.79809 12.4409 5.74987 12.3672 5.71733 12.2886 5.68474 12.21 5.66675 12.1238 5.66675 12.0334 5.66675 11.943 5.68474 11.8568 5.71733 11.7782 5.74987 11.6996 5.79809 11.6259 5.86201 11.562L7.86201 9.56197C8.12236 9.30162 8.54447 9.30162 8.80482 9.56197z" } }] }, Nt = ie(function(e, t) {
1486
+ return te(ae, Object.assign({}, e, {
1540
1487
  id: "reduce-digits-single",
1541
1488
  ref: t,
1542
- icon: xr
1489
+ icon: Dr
1543
1490
  }));
1544
1491
  });
1545
- wt.displayName = "ReduceDigitsSingle";
1546
- const wr = wt;
1547
- var jr = {
1548
- tag: "svg",
1549
- attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" },
1550
- children: [
1551
- {
1552
- tag: "path",
1553
- attrs: {
1554
- fill: "currentColor",
1555
- d: "M4.05443 1.55744C4.34898 1.33653 4.76685 1.39623 4.98776 1.69078L7.99996 5.98276L11.0122 1.69078C11.2331 1.39623 11.6509 1.33653 11.9455 1.55744C12.24 1.77836 12.2997 2.19623 12.0788 2.49078L9.33338 6.42708H12.0788C12.447 6.42708 12.7455 6.72556 12.7455 7.09375C12.7455 7.46194 12.447 7.76042 12.0788 7.76042H8.66659V9.69702H12.3348C12.703 9.69702 13.0015 9.9955 13.0015 10.3637C13.0015 10.7319 12.703 11.0304 12.3348 11.0304H8.66659V13.9091C8.66659 14.2773 8.36811 14.5758 7.99992 14.5758C7.63173 14.5758 7.33325 14.2773 7.33325 13.9091V11.0304H3.66508C3.29689 11.0304 2.99841 10.7319 2.99841 10.3637C2.99841 9.9955 3.29689 9.69702 3.66508 9.69702H7.33325V7.76042H3.92109C3.5529 7.76042 3.25443 7.46194 3.25443 7.09375C3.25443 6.72556 3.5529 6.42708 3.92109 6.42708H6.66653L3.92109 2.49078C3.70018 2.19623 3.75987 1.77836 4.05443 1.55744Z"
1556
- }
1557
- }
1558
- ]
1559
- }, jt = me(function(e, t) {
1560
- return se(fe, Object.assign({}, e, {
1492
+ Nt.displayName = "ReduceDigitsSingle";
1493
+ const Er = Nt;
1494
+ var $r = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.05443 1.55744C4.34898 1.33653 4.76685 1.39623 4.98776 1.69078L7.99996 5.98276L11.0122 1.69078C11.2331 1.39623 11.6509 1.33653 11.9455 1.55744C12.24 1.77836 12.2997 2.19623 12.0788 2.49078L9.33338 6.42708H12.0788C12.447 6.42708 12.7455 6.72556 12.7455 7.09375C12.7455 7.46194 12.447 7.76042 12.0788 7.76042H8.66659V9.69702H12.3348C12.703 9.69702 13.0015 9.9955 13.0015 10.3637C13.0015 10.7319 12.703 11.0304 12.3348 11.0304H8.66659V13.9091C8.66659 14.2773 8.36811 14.5758 7.99992 14.5758C7.63173 14.5758 7.33325 14.2773 7.33325 13.9091V11.0304H3.66508C3.29689 11.0304 2.99841 10.7319 2.99841 10.3637C2.99841 9.9955 3.29689 9.69702 3.66508 9.69702H7.33325V7.76042H3.92109C3.5529 7.76042 3.25443 7.46194 3.25443 7.09375C3.25443 6.72556 3.5529 6.42708 3.92109 6.42708H6.66653L3.92109 2.49078C3.70018 2.19623 3.75987 1.77836 4.05443 1.55744Z" } }] }, Tt = ie(function(e, t) {
1495
+ return te(ae, Object.assign({}, e, {
1561
1496
  id: "rmb-single",
1562
1497
  ref: t,
1563
- icon: jr
1498
+ icon: $r
1564
1499
  }));
1565
1500
  });
1566
- jt.displayName = "RmbSingle";
1567
- const Nr = jt, Ie = [
1501
+ Tt.displayName = "RmbSingle";
1502
+ const Ur = Tt, we = [
1568
1503
  {
1569
1504
  label: "sheet.numfmt.general",
1570
1505
  pattern: null
@@ -1617,30 +1552,30 @@ const Nr = jt, Ie = [
1617
1552
  label: "sheet.numfmt.moreFmt",
1618
1553
  pattern: ""
1619
1554
  }
1620
- ], Dr = (e) => {
1555
+ ], Ar = (e) => {
1621
1556
  var n;
1622
- const t = N(D), r = (n = e.value) != null ? n : t.t("sheet.numfmt.general");
1623
- return /* @__PURE__ */ v.jsx("span", { className: "more-numfmt-type", children: r });
1624
- }, Er = () => {
1625
- const e = N(V), t = N(D), r = Rn(), n = N(re), s = (o) => {
1557
+ const t = N(T), r = (n = e.value) != null ? n : t.t("sheet.numfmt.general");
1558
+ return /* @__PURE__ */ p.jsx("span", { className: "more-numfmt-type", children: r });
1559
+ }, Lr = () => {
1560
+ const e = N(E), t = N(T), r = In(), n = N(ee), s = (o) => {
1626
1561
  const c = n.getLast();
1627
1562
  if (!c)
1628
1563
  return;
1629
- const d = r.get(pn), l = c.range, u = [];
1630
- M.foreach(l, (m, h) => {
1564
+ const d = r.get(_n), l = c.range, u = [];
1565
+ R.foreach(l, (m, h) => {
1631
1566
  o ? u.push({ row: m, col: h, pattern: o, type: Xe(o) }) : u.push({ row: m, col: h });
1632
- }), e.executeCommand(te.id, { values: u }), d.focus();
1567
+ }), e.executeCommand(Q.id, { values: u }), d.focus();
1633
1568
  }, i = (o) => {
1634
1569
  if (o === 0)
1635
1570
  s(null);
1636
- else if (o === Ie.length - 1)
1637
- e.executeCommand(je.id);
1571
+ else if (o === we.length - 1)
1572
+ e.executeCommand($e.id);
1638
1573
  else {
1639
- const c = Ie[o];
1574
+ const c = we[o];
1640
1575
  c.pattern && s(c.pattern);
1641
1576
  }
1642
1577
  }, a = 1220;
1643
- return /* @__PURE__ */ v.jsx("div", { className: "more-numfmt-type-options", children: Ie.map((o, c) => o === "|" ? /* @__PURE__ */ v.jsx("div", { className: "line m-t-4", onClick: (d) => d.stopPropagation() }, c) : /* @__PURE__ */ v.jsxs(
1578
+ return /* @__PURE__ */ p.jsx("div", { className: "more-numfmt-type-options", children: we.map((o, c) => o === "|" ? /* @__PURE__ */ p.jsx("div", { className: "line m-t-4", onClick: (d) => d.stopPropagation() }, c) : /* @__PURE__ */ p.jsxs(
1644
1579
  "div",
1645
1580
  {
1646
1581
  className: "option-item m-t-4",
@@ -1648,71 +1583,84 @@ const Nr = jt, Ie = [
1648
1583
  i(c);
1649
1584
  },
1650
1585
  children: [
1651
- /* @__PURE__ */ v.jsx("div", { children: t.t(o.label) }),
1652
- /* @__PURE__ */ v.jsx("div", { className: "m-l-26", children: o.pattern ? E.format(o.pattern || "", a, { locale: "zh-CN" }) : "" })
1586
+ /* @__PURE__ */ p.jsx("div", { children: t.t(o.label) }),
1587
+ /* @__PURE__ */ p.jsx("div", { className: "m-l-26", children: o.pattern ? D.format(o.pattern || "", a, { locale: "zh-CN" }) : "" })
1653
1588
  ]
1654
1589
  },
1655
1590
  c
1656
1591
  )) });
1657
- }, $r = (e) => {
1592
+ }, Vr = (e) => {
1658
1593
  const t = "icon-rmbSingle";
1659
- return e.register(t, Nr), e.register("MoreDownSingle", Pr), (r) => ({
1594
+ return e.register(t, Ur), e.register("MoreDownSingle", jr), (r) => ({
1660
1595
  icon: t,
1661
1596
  id: Ct.id,
1662
1597
  title: "sheet.numfmt.currency",
1663
1598
  tooltip: "sheet.numfmt.currency",
1664
- type: Te.BUTTON,
1665
- group: Ue.TOOLBAR_FORMULAS_INSERT,
1666
- positions: [Ae.TOOLBAR_START],
1667
- hidden$: Le(r, De.SHEET),
1668
- disabled$: $e(r)
1599
+ type: pe.BUTTON,
1600
+ group: ve.TOOLBAR_FORMULAS_INSERT,
1601
+ positions: [ge.TOOLBAR_START],
1602
+ hidden$: _e(r, de.SHEET),
1603
+ disabled$: fe(r)
1669
1604
  });
1670
- }, Tr = (e) => {
1605
+ }, Hr = (e) => {
1671
1606
  const t = "icon-addDigitsSingle";
1672
- return e.register(t, Mr), (r) => ({
1607
+ return e.register(t, xr), (r) => ({
1673
1608
  icon: t,
1674
1609
  id: _t.id,
1675
1610
  title: "sheet.numfmt.addDecimal",
1676
1611
  tooltip: "sheet.numfmt.addDecimal",
1677
- type: Te.BUTTON,
1678
- positions: [Ae.TOOLBAR_START],
1679
- group: Ue.TOOLBAR_FORMULAS_INSERT,
1680
- hidden$: Le(r, De.SHEET),
1681
- disabled$: $e(r)
1612
+ type: pe.BUTTON,
1613
+ positions: [ge.TOOLBAR_START],
1614
+ group: ve.TOOLBAR_FORMULAS_INSERT,
1615
+ hidden$: _e(r, de.SHEET),
1616
+ disabled$: fe(r)
1682
1617
  });
1683
- }, Ur = (e) => {
1618
+ }, kr = (e) => {
1684
1619
  const t = "icon-reduceDigitsSingle";
1685
- return e.register(t, wr), (r) => ({
1620
+ return e.register(t, Er), (r) => ({
1686
1621
  icon: t,
1687
1622
  id: bt.id,
1688
1623
  title: "sheet.numfmt.subtractDecimal",
1689
1624
  tooltip: "sheet.numfmt.subtractDecimal",
1690
- type: Te.BUTTON,
1691
- group: Ue.TOOLBAR_FORMULAS_INSERT,
1692
- positions: [Ae.TOOLBAR_START],
1693
- hidden$: Le(r, De.SHEET),
1694
- disabled$: $e(r)
1625
+ type: pe.BUTTON,
1626
+ group: ve.TOOLBAR_FORMULAS_INSERT,
1627
+ positions: [ge.TOOLBAR_START],
1628
+ hidden$: _e(r, de.SHEET),
1629
+ disabled$: fe(r)
1630
+ });
1631
+ }, Fr = (e) => {
1632
+ const t = "icon-PercentSingle";
1633
+ return e.register(t, Tr), (r) => ({
1634
+ icon: t,
1635
+ id: Ot.id,
1636
+ title: "sheet.numfmt.percent",
1637
+ tooltip: "sheet.numfmt.percent",
1638
+ type: pe.BUTTON,
1639
+ group: ve.TOOLBAR_FORMULAS_INSERT,
1640
+ positions: [ge.TOOLBAR_START],
1641
+ hidden$: _e(r, de.SHEET),
1642
+ disabled$: fe(r)
1695
1643
  });
1696
- }, Ar = (e) => {
1644
+ }, Br = (e) => {
1697
1645
  const t = "sheet.numfmt.moreNumfmtType", r = "sheet.numfmt.moreNumfmtType.options";
1698
- return e.register(t, Dr), e.register(r, Er), (n) => {
1699
- const s = n.get(U), i = n.get(yn), a = n.get($), o = n.get(V), c = n.get(D), d = n.get(re), l = new q(
1646
+ return e.register(t, Ar), e.register(r, Lr), (n) => {
1647
+ const s = n.get(A), i = n.get(Mn), a = n.get($), o = n.get(E), c = n.get(T), d = n.get(ee), l = new q(
1700
1648
  (u) => Ge(
1701
1649
  d.selectionMoveEnd$,
1702
1650
  new q((m) => {
1703
- const h = [I.id, w.id], _ = o.onCommandExecuted((p) => {
1704
- h.includes(p.id) && m.next(null);
1651
+ const h = [M.id, w.id], _ = o.onCommandExecuted((v) => {
1652
+ h.includes(v.id) && m.next(null);
1705
1653
  });
1706
1654
  return () => _.dispose();
1707
1655
  })
1708
1656
  ).subscribe(() => {
1709
1657
  const m = d.getSelections();
1710
1658
  if (m && m[0]) {
1711
- const h = a.getCurrentUniverSheetInstance(), _ = h.getActiveSheet(), p = m[0].range, f = p.startRow, S = p.startColumn, C = s.getValue(h.getUnitId(), _.getSheetId(), f, S), R = i.getNumfmtValue(h.getUnitId(), _.getSheetId(), f, S), A = (C == null ? void 0 : C.pattern) || R;
1659
+ const h = a.getCurrentUniverSheetInstance(), _ = h.getActiveSheet(), v = m[0].range, f = v.startRow, S = v.startColumn, C = s.getValue(h.getUnitId(), _.getSheetId(), f, S), y = i.getNumfmtValue(h.getUnitId(), _.getSheetId(), f, S), L = (C == null ? void 0 : C.pattern) || y;
1712
1660
  let G = c.t("sheet.numfmt.general");
1713
- if (A) {
1714
- const F = Ie.filter((B) => typeof B == "object" && B.pattern).find(
1715
- (B) => ie(A, B.pattern)
1661
+ if (L) {
1662
+ const F = we.filter((B) => typeof B == "object" && B.pattern).find(
1663
+ (B) => Le(L, B.pattern)
1716
1664
  );
1717
1665
  F && typeof F == "object" && F.pattern ? G = c.t(F.label) : G = c.t("sheet.numfmt.moreFmt");
1718
1666
  }
@@ -1723,11 +1671,11 @@ const Nr = jt, Ie = [
1723
1671
  return {
1724
1672
  // icon: 'MoreDownSingle',
1725
1673
  label: t,
1726
- id: je.id,
1674
+ id: $e.id,
1727
1675
  tooltip: "sheet.numfmt.title",
1728
- type: Te.SELECTOR,
1729
- group: Ue.TOOLBAR_FORMULAS_INSERT,
1730
- positions: [Ae.TOOLBAR_START],
1676
+ type: pe.SELECTOR,
1677
+ group: ve.TOOLBAR_FORMULAS_INSERT,
1678
+ positions: [ge.TOOLBAR_START],
1731
1679
  selections: [
1732
1680
  {
1733
1681
  label: {
@@ -1737,39 +1685,39 @@ const Nr = jt, Ie = [
1737
1685
  }
1738
1686
  ],
1739
1687
  value$: l,
1740
- hidden$: Le(n, De.SHEET),
1741
- disabled$: $e(n)
1688
+ hidden$: _e(n, de.SHEET),
1689
+ disabled$: fe(n)
1742
1690
  };
1743
1691
  };
1744
1692
  };
1745
- var Lr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, Hr = (e, t, r, n) => {
1746
- for (var s = n > 1 ? void 0 : n ? Vr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1693
+ var zr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, Kr = (e, t, r, n) => {
1694
+ for (var s = n > 1 ? void 0 : n ? Wr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1747
1695
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1748
- return n && s && Lr(t, r, s), s;
1696
+ return n && s && zr(t, r, s), s;
1749
1697
  }, Be = (e, t) => (r, n) => t(r, n, e);
1750
- let Me = class extends H {
1698
+ let je = class extends H {
1751
1699
  constructor(e, t, r) {
1752
1700
  super(), this._injector = e, this._componentManager = t, this._menuService = r, this._initMenu();
1753
1701
  }
1754
1702
  _initMenu() {
1755
- [Tr, Ur, $r, Ar].map((e) => e(this._componentManager)).forEach((e) => {
1703
+ [Fr, Hr, kr, Vr, Br].map((e) => e(this._componentManager)).forEach((e) => {
1756
1704
  this.disposeWithMe(this._menuService.addMenuItem(e(this._injector)));
1757
1705
  });
1758
1706
  }
1759
1707
  };
1760
- Me = Hr([
1761
- k(T.Rendered, Me),
1708
+ je = Kr([
1709
+ k(U.Rendered, je),
1762
1710
  Be(0, g(K)),
1763
- Be(1, g(vt)),
1764
- Be(2, g(_n))
1765
- ], Me);
1766
- var kr = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, Br = (e, t, r, n) => {
1767
- for (var s = n > 1 ? void 0 : n ? Fr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1711
+ Be(1, g(pt)),
1712
+ Be(2, g(Cn))
1713
+ ], je);
1714
+ var Gr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, qr = (e, t, r, n) => {
1715
+ for (var s = n > 1 ? void 0 : n ? Yr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1768
1716
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1769
- return n && s && kr(t, r, s), s;
1770
- }, X = (e, t) => (r, n) => t(r, n, e);
1771
- const Wr = [w.id, I.id];
1772
- let Oe = class extends H {
1717
+ return n && s && Gr(t, r, s), s;
1718
+ }, re = (e, t) => (r, n) => t(r, n, e);
1719
+ const Zr = [w.id, M.id];
1720
+ let Ne = class extends H {
1773
1721
  constructor(e, t, r, n, s, i) {
1774
1722
  super(), this._numfmtService = e, this._univerInstanceService = t, this._injector = r, this._refRangeService = n, this._sheetSkeletonManagerService = s, this._commandService = i, this._registerRefRange(), this._mergeRefMutations();
1775
1723
  }
@@ -1778,8 +1726,8 @@ let Oe = class extends H {
1778
1726
  handler: (e, t, r) => {
1779
1727
  if (!e)
1780
1728
  return r(e);
1781
- const n = e.filter((s) => !Wr.includes(s.id));
1782
- return n.push(...we(e)), r(n);
1729
+ const n = e.filter((s) => !Zr.includes(s.id));
1730
+ return n.push(...Ee(e)), r(n);
1783
1731
  }
1784
1732
  });
1785
1733
  }
@@ -1788,7 +1736,7 @@ let Oe = class extends H {
1788
1736
  Z(
1789
1737
  Ge(
1790
1738
  this._sheetSkeletonManagerService.currentSkeleton$.pipe(
1791
- ce((e) => e == null ? void 0 : e.sheetId),
1739
+ le((e) => e == null ? void 0 : e.sheetId),
1792
1740
  ht()
1793
1741
  ),
1794
1742
  this._numfmtService.modelReplace$
@@ -1812,65 +1760,65 @@ let Oe = class extends H {
1812
1760
  let u = [];
1813
1761
  switch (o.id) {
1814
1762
  case j.DeleteRangeMoveLeftCommandId: {
1815
- u = nn(o, l);
1763
+ u = sn(o, l);
1816
1764
  break;
1817
1765
  }
1818
1766
  case j.DeleteRangeMoveUpCommandId: {
1819
- u = tn(o, l);
1767
+ u = rn(o, l);
1820
1768
  break;
1821
1769
  }
1822
1770
  case j.InsertColCommandId: {
1823
- u = en(o, l);
1771
+ u = nn(o, l);
1824
1772
  break;
1825
1773
  }
1826
1774
  case j.InsertRangeMoveDownCommandId: {
1827
- u = Xt(o, l);
1775
+ u = tn(o, l);
1828
1776
  break;
1829
1777
  }
1830
1778
  case j.InsertRangeMoveRightCommandId: {
1831
- u = Qt(o, l);
1779
+ u = en(o, l);
1832
1780
  break;
1833
1781
  }
1834
1782
  case j.InsertRowCommandId: {
1835
- u = Jt(o, l);
1783
+ u = Xt(o, l);
1836
1784
  break;
1837
1785
  }
1838
1786
  case j.MoveRangeCommandId: {
1839
- u = Zt(o, l);
1787
+ u = Qt(o, l);
1840
1788
  break;
1841
1789
  }
1842
1790
  case j.RemoveColCommandId: {
1843
- u = qt(o, l);
1791
+ u = Jt(o, l);
1844
1792
  break;
1845
1793
  }
1846
1794
  case j.RemoveRowCommandId: {
1847
- u = Yt(o, l);
1795
+ u = Zt(o, l);
1848
1796
  break;
1849
1797
  }
1850
1798
  case j.MoveColsCommandId: {
1851
- u = Gt(o, l);
1799
+ u = qt(o, l);
1852
1800
  break;
1853
1801
  }
1854
1802
  case j.MoveRowsCommandId:
1855
- u = Kt(o, l);
1803
+ u = Yt(o, l);
1856
1804
  }
1857
- const m = rn(u, l), h = this._numfmtService.getValue(r, n, c, d);
1805
+ const m = an(u, l), h = this._numfmtService.getValue(r, n, c, d);
1858
1806
  if (!m && h) {
1859
1807
  const _ = {
1860
- id: I.id,
1808
+ id: M.id,
1861
1809
  params: {
1862
1810
  unitId: r,
1863
1811
  subUnitId: n,
1864
1812
  ranges: [{ startColumn: d, startRow: c, endColumn: d, endRow: c }]
1865
1813
  }
1866
- }, p = J(this._injector, _.params);
1814
+ }, v = J(this._injector, _.params);
1867
1815
  return {
1868
1816
  redos: [_],
1869
- undos: p
1817
+ undos: v
1870
1818
  };
1871
1819
  }
1872
1820
  if (h && m) {
1873
- const _ = [], p = [], f = [
1821
+ const _ = [], v = [], f = [
1874
1822
  {
1875
1823
  pattern: h.pattern,
1876
1824
  type: h.type,
@@ -1879,18 +1827,18 @@ let Oe = class extends H {
1879
1827
  }
1880
1828
  ], S = {
1881
1829
  id: w.id,
1882
- params: ue(r, n, f)
1883
- }, C = de(this._injector, S.params), R = {
1884
- id: I.id,
1830
+ params: me(r, n, f)
1831
+ }, C = he(this._injector, S.params), y = {
1832
+ id: M.id,
1885
1833
  params: {
1886
1834
  unitId: r,
1887
1835
  subUnitId: n,
1888
1836
  ranges: [{ startColumn: d, startRow: c, endColumn: d, endRow: c }]
1889
1837
  }
1890
- }, A = J(this._injector, R.params);
1891
- return _.push(S, R), p.push(...C, ...A), {
1838
+ }, L = J(this._injector, y.params);
1839
+ return _.push(S, y), v.push(...C, ...L), {
1892
1840
  redos: _,
1893
- undos: p.reverse()
1841
+ undos: v.reverse()
1894
1842
  };
1895
1843
  }
1896
1844
  return { redos: [], undos: [] };
@@ -1911,26 +1859,26 @@ let Oe = class extends H {
1911
1859
  new q((o) => {
1912
1860
  e.add(
1913
1861
  this._commandService.onCommandExecuted((c) => {
1914
- [w.id, I.id].includes(c.id) && o.next(c.params);
1862
+ [w.id, M.id].includes(c.id) && o.next(c.params);
1915
1863
  })
1916
1864
  );
1917
1865
  }).pipe(
1918
1866
  st(
1919
1867
  (o) => o.unitId === r && o.subUnitId === n
1920
1868
  ),
1921
- ce((o) => o.ranges ? o.ranges : o.values ? Object.keys(o.values).reduce((c, d) => {
1869
+ le((o) => o.ranges ? o.ranges : o.values ? Object.keys(o.values).reduce((c, d) => {
1922
1870
  const l = o.values[d];
1923
1871
  return c.push(...l.ranges), c;
1924
1872
  }, []) : []),
1925
- fn(300),
1873
+ vn(300),
1926
1874
  // updating the listener moves to the next queue
1927
- ce(
1875
+ le(
1928
1876
  (o) => o.reduce((c, d) => (c.push(...d), c), [])
1929
1877
  ),
1930
1878
  st((o) => !!o.length)
1931
1879
  ).subscribe((o) => {
1932
1880
  o.forEach((c) => {
1933
- M.foreach(c, (d, l) => {
1881
+ R.foreach(c, (d, l) => {
1934
1882
  const u = `${d}_${l}`, m = i.get(u);
1935
1883
  if (i.delete(u), m && m.dispose(), this._numfmtService.getValue(r, n, d, l)) {
1936
1884
  const _ = {
@@ -1938,11 +1886,11 @@ let Oe = class extends H {
1938
1886
  startColumn: l,
1939
1887
  endRow: d,
1940
1888
  endColumn: l
1941
- }, p = this._refRangeService.registerRefRange(
1889
+ }, v = this._refRangeService.registerRefRange(
1942
1890
  _,
1943
1891
  (f) => a(f, d, l)
1944
1892
  );
1945
- i.set(u, p), e.add(p);
1893
+ i.set(u, v), e.add(v);
1946
1894
  }
1947
1895
  });
1948
1896
  });
@@ -1954,21 +1902,21 @@ let Oe = class extends H {
1954
1902
  );
1955
1903
  }
1956
1904
  };
1957
- Oe = Br([
1958
- k(T.Rendered, Oe),
1959
- X(0, g(U)),
1960
- X(1, g($)),
1961
- X(2, g(K)),
1962
- X(3, g(zt)),
1963
- X(4, g(Ke)),
1964
- X(5, g(V))
1965
- ], Oe);
1966
- var zr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, Gr = (e, t, r, n) => {
1967
- for (var s = n > 1 ? void 0 : n ? Kr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1905
+ Ne = qr([
1906
+ k(U.Rendered, Ne),
1907
+ re(0, g(A)),
1908
+ re(1, g($)),
1909
+ re(2, g(K)),
1910
+ re(3, g(Gt)),
1911
+ re(4, g(Ke)),
1912
+ re(5, g(E))
1913
+ ], Ne);
1914
+ var Jr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, Xr = (e, t, r, n) => {
1915
+ for (var s = n > 1 ? void 0 : n ? Qr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1968
1916
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1969
- return n && s && zr(t, r, s), s;
1970
- }, ge = (e, t) => (r, n) => t(r, n, e);
1971
- let Pe = class extends H {
1917
+ return n && s && Jr(t, r, s), s;
1918
+ }, ye = (e, t) => (r, n) => t(r, n, e);
1919
+ let Te = class extends H {
1972
1920
  constructor(e, t, r, n) {
1973
1921
  super(), this._numfmtService = e, this._sheetInterceptorService = t, this._univerInstanceService = r, this._injector = n, this._initSheetChange();
1974
1922
  }
@@ -1976,8 +1924,8 @@ let Pe = class extends H {
1976
1924
  this.disposeWithMe(
1977
1925
  this._sheetInterceptorService.interceptCommand({
1978
1926
  getMutations: (e) => {
1979
- if (e.id === sn.id) {
1980
- const t = e.params, r = t.unitId || Yr(this._univerInstanceService), n = t.subUnitId || qr(this._univerInstanceService), s = this._numfmtService.getModel(r, n);
1927
+ if (e.id === on.id) {
1928
+ const t = e.params, r = t.unitId || es(this._univerInstanceService), n = t.subUnitId || ts(this._univerInstanceService), s = this._numfmtService.getModel(r, n);
1981
1929
  if (!s)
1982
1930
  return { redos: [], undos: [] };
1983
1931
  const i = [];
@@ -1987,10 +1935,10 @@ let Pe = class extends H {
1987
1935
  const a = {
1988
1936
  unitId: r,
1989
1937
  subUnitId: n,
1990
- ranges: W(i)
1938
+ ranges: z(i)
1991
1939
  }, o = J(this._injector, a);
1992
1940
  return {
1993
- redos: [{ id: I.id, params: a }],
1941
+ redos: [{ id: M.id, params: a }],
1994
1942
  undos: o
1995
1943
  };
1996
1944
  }
@@ -2000,34 +1948,34 @@ let Pe = class extends H {
2000
1948
  );
2001
1949
  }
2002
1950
  };
2003
- Pe = Gr([
2004
- k(T.Rendered, Pe),
2005
- ge(0, g(U)),
2006
- ge(1, g(Ee)),
2007
- ge(2, g($)),
2008
- ge(3, g(K))
2009
- ], Pe);
2010
- const Yr = (e) => e.getCurrentUniverSheetInstance().getUnitId(), qr = (e) => e.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
2011
- var Zr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Qr = (e, t, r, n) => {
2012
- for (var s = n > 1 ? void 0 : n ? Jr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1951
+ Te = Xr([
1952
+ k(U.Rendered, Te),
1953
+ ye(0, g(A)),
1954
+ ye(1, g(Ae)),
1955
+ ye(2, g($)),
1956
+ ye(3, g(K))
1957
+ ], Te);
1958
+ const es = (e) => e.getCurrentUniverSheetInstance().getUnitId(), ts = (e) => e.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
1959
+ var ns = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, ss = (e, t, r, n) => {
1960
+ for (var s = n > 1 ? void 0 : n ? rs(t, r) : t, i = e.length - 1, a; i >= 0; i--)
2013
1961
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
2014
- return n && s && Zr(t, r, s), s;
2015
- }, Xr = (e, t) => (r, n) => t(r, n, e), We;
2016
- let ct = (We = class extends Ht {
1962
+ return n && s && ns(t, r, s), s;
1963
+ }, is = (e, t) => (r, n) => t(r, n, e), ze;
1964
+ let ct = (ze = class extends Ft {
2017
1965
  constructor(e, t) {
2018
- super(le), this._injector = t;
1966
+ super(ue), this._injector = t;
2019
1967
  }
2020
1968
  onStarting() {
2021
- this._injector.add([et, { useClass: Ce, lazy: !1 }]), this._injector.add([Re]), this._injector.add([Ne]), this._injector.add([Oe]), this._injector.add([Pe]), this._injector.add([be]), this._injector.add([_e]), this._injector.add([Se]), this._injector.add([ye]), this._injector.add([Me]);
1969
+ this._injector.add([et, { useClass: Me, lazy: !1 }]), this._injector.add([Pe]), this._injector.add([Ue]), this._injector.add([Ne]), this._injector.add([Te]), this._injector.add([Oe]), this._injector.add([Re]), this._injector.add([Ie]), this._injector.add([xe]), this._injector.add([je]);
2022
1970
  }
2023
- }, Y(We, "type", kt.Sheet), We);
2024
- ct = Qr([
2025
- Xr(1, g(K))
1971
+ }, Y(ze, "type", Bt.Sheet), ze);
1972
+ ct = ss([
1973
+ is(1, g(K))
2026
1974
  ], ct);
2027
1975
  export {
2028
- te as SetNumfmtCommand,
1976
+ Q as SetNumfmtCommand,
2029
1977
  ct as UniverSheetsNumfmtPlugin,
2030
- fs as enUS,
1978
+ Pn as enUS,
2031
1979
  gt as getPatternPreview,
2032
- On as zhCN
1980
+ wn as zhCN
2033
1981
  };