@univerjs/sheets-data-validation 0.6.10-experimental.20250411-f5b7b16 → 0.6.10-experimental.20250418-8830bd4

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,24 +1,24 @@
1
- var ft = Object.defineProperty;
2
- var Rt = (o, a, e) => a in o ? ft(o, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[a] = e;
3
- var g = (o, a, e) => Rt(o, typeof a != "symbol" ? a + "" : a, e);
4
- import { Inject as v, ICommandService as x, IUniverInstanceService as w, Disposable as W, ObjectMatrix as Se, UniverInstanceType as N, Range as b, Rectangle as I, isFormulaString as S, DataValidationType as T, getOriginCellValue as vt, RBush as St, debounce as Vt, Tools as V, DataValidationStatus as D, WrapStrategy as ve, DataValidationOperator as h, numfmt as j, dayjs as at, DataValidationRenderMode as Be, CommandType as z, IUndoRedoService as Z, sequenceExecute as Ie, isRangesEqual as rt, generateRandomId as Mt, toDisposable as Qe, IPermissionService as yt, Injector as qe, CellValueType as Et, RxDisposable as Tt, LifecycleService as Ft, LifecycleStages as ze, bufferDebounceTime as Nt, DependentOn as Ct, IConfigService as wt, Plugin as Ot, merge as It } from "@univerjs/core";
5
- import { DataValidationModel as Ge, DataValidatorRegistryService as q, UpdateRuleType as y, BaseDataValidator as G, TextLengthErrorTitleMap as At, AddDataValidationMutation as L, RemoveDataValidationMutation as A, UpdateDataValidationMutation as E, getRuleSetting as Dt, getRuleOptions as bt, UniverDataValidationPlugin as Lt } from "@univerjs/data-validation";
6
- import { SetRangeValuesMutation as se, RemoveSheetMutation as it, getSheetCommandTarget as Ye, SetRangeValuesUndoMutationFactory as ot, WorksheetViewPermission as xt, RefRangeService as Bt, handleCommonDefaultRangeChangeWithEffectRefCommands as Ut, SheetInterceptorService as st, RemoveSheetCommand as Ht, SheetsSelectionsService as nt, ClearSelectionAllCommand as Wt } from "@univerjs/sheets";
7
- import { Subject as je, bufferWhen as Pt, filter as Ze } from "rxjs";
8
- import { RegisterOtherFormulaService as lt, FormulaRefRangeService as ut } from "@univerjs/sheets-formula";
9
- import { ERROR_TYPE_SET as $t, LexerTreeBuilder as Y, isReferenceString as dt, sequenceNodeType as kt, deserializeRangeWithSheet as jt, deserializeRangeWithSheetWithCache as Qt, operatorToken as qt } from "@univerjs/engine-formula";
10
- const Gt = "SHEET_DATA_VALIDATION_PLUGIN";
11
- var Yt = Object.getOwnPropertyDescriptor, Xt = (o, a, e, t) => {
12
- for (var r = t > 1 ? void 0 : t ? Yt(a, e) : a, i = o.length - 1, s; i >= 0; i--)
1
+ var vt = Object.defineProperty;
2
+ var Rt = (o, a, e) => a in o ? vt(o, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[a] = e;
3
+ var m = (o, a, e) => Rt(o, typeof a != "symbol" ? a + "" : a, e);
4
+ import { Inject as R, ICommandService as U, IUniverInstanceService as O, Disposable as P, ObjectMatrix as Se, UniverInstanceType as N, Range as b, Rectangle as A, isFormulaString as S, DataValidationType as T, getOriginCellValue as St, RBush as Mt, debounce as Vt, Tools as M, DataValidationStatus as D, WrapStrategy as Re, DataValidationOperator as h, numfmt as j, dayjs as it, DataValidationRenderMode as Be, CommandType as z, IUndoRedoService as Z, sequenceExecute as Ie, isRangesEqual as ot, generateRandomId as yt, toDisposable as qe, IPermissionService as Et, Injector as Ge, CellValueType as Tt, RxDisposable as Ft, LifecycleService as Nt, LifecycleStages as Ze, bufferDebounceTime as Ct, DependentOn as Ot, IConfigService as wt, Plugin as At, merge as It } from "@univerjs/core";
5
+ import { DataValidationModel as Ye, DataValidatorRegistryService as q, UpdateRuleType as y, BaseDataValidator as G, TextLengthErrorTitleMap as Dt, AddDataValidationMutation as L, RemoveDataValidationMutation as I, UpdateDataValidationMutation as E, getRuleSetting as bt, getRuleOptions as Lt, UniverDataValidationPlugin as Ut } from "@univerjs/data-validation";
6
+ import { SetRangeValuesMutation as se, RemoveSheetMutation as st, getSheetCommandTarget as Xe, SetRangeValuesUndoMutationFactory as nt, WorksheetViewPermission as xt, RefRangeService as Bt, handleCommonDefaultRangeChangeWithEffectRefCommands as Ht, SheetInterceptorService as lt, RemoveSheetCommand as Pt, SheetsSelectionsService as ut, ClearSelectionAllCommand as Wt } from "@univerjs/sheets";
7
+ import { Subject as Qe, bufferWhen as $t, filter as Je } from "rxjs";
8
+ import { RegisterOtherFormulaService as dt, FormulaRefRangeService as ct } from "@univerjs/sheets-formula";
9
+ import { ERROR_TYPE_SET as kt, LexerTreeBuilder as Y, isReferenceString as ht, sequenceNodeType as jt, deserializeRangeWithSheet as Qt, deserializeRangeWithSheetWithCache as qt, operatorToken as Gt } from "@univerjs/engine-formula";
10
+ const Yt = "SHEET_DATA_VALIDATION_PLUGIN";
11
+ var Xt = Object.getOwnPropertyDescriptor, Kt = (o, a, e, t) => {
12
+ for (var r = t > 1 ? void 0 : t ? Xt(a, e) : a, i = o.length - 1, s; i >= 0; i--)
13
13
  (s = o[i]) && (r = s(r) || r);
14
14
  return r;
15
- }, Je = (o, a) => (e, t) => a(e, t, o);
16
- let Q = class extends W {
15
+ }, et = (o, a) => (e, t) => a(e, t, o);
16
+ let Q = class extends P {
17
17
  constructor(a, e) {
18
18
  super();
19
- g(this, "_cacheMatrix", /* @__PURE__ */ new Map());
20
- g(this, "_dirtyRanges$", new je());
21
- g(this, "dirtyRanges$", this._dirtyRanges$.asObservable());
19
+ m(this, "_cacheMatrix", /* @__PURE__ */ new Map());
20
+ m(this, "_dirtyRanges$", new Qe());
21
+ m(this, "dirtyRanges$", this._dirtyRanges$.asObservable());
22
22
  this._commandService = a, this._univerInstanceService = e, this._initDirtyRanges(), this._initSheetRemove();
23
23
  }
24
24
  _initDirtyRanges() {
@@ -36,7 +36,7 @@ let Q = class extends W {
36
36
  _initSheetRemove() {
37
37
  this.disposeWithMe(this._commandService.onCommandExecuted((a) => {
38
38
  var e;
39
- if (a.id === it.id) {
39
+ if (a.id === st.id) {
40
40
  const { unitId: t, subUnitId: r } = a.params;
41
41
  (e = this._cacheMatrix.get(t)) == null || e.delete(r);
42
42
  }
@@ -79,9 +79,9 @@ let Q = class extends W {
79
79
  return this._ensureCache(a, e).getValue(t, r);
80
80
  }
81
81
  };
82
- Q = Xt([
83
- Je(0, v(x)),
84
- Je(1, v(w))
82
+ Q = Kt([
83
+ et(0, R(U)),
84
+ et(1, R(O))
85
85
  ], Q);
86
86
  function oe(o) {
87
87
  var a, e;
@@ -92,26 +92,26 @@ function _e(o) {
92
92
  return (a = o == null ? void 0 : o[0]) == null ? void 0 : a[0];
93
93
  }
94
94
  function C(o) {
95
- return !$t.has(o);
95
+ return !kt.has(o);
96
96
  }
97
97
  function de(o, a) {
98
98
  var t;
99
99
  const e = a.getValidatorItem(o);
100
100
  return (t = e == null ? void 0 : e.offsetFormulaByRange) != null ? t : !1;
101
101
  }
102
- var Kt = Object.getOwnPropertyDescriptor, zt = (o, a, e, t) => {
103
- for (var r = t > 1 ? void 0 : t ? Kt(a, e) : a, i = o.length - 1, s; i >= 0; i--)
102
+ var zt = Object.getOwnPropertyDescriptor, Zt = (o, a, e, t) => {
103
+ for (var r = t > 1 ? void 0 : t ? zt(a, e) : a, i = o.length - 1, s; i >= 0; i--)
104
104
  (s = o[i]) && (r = s(r) || r);
105
105
  return r;
106
106
  }, re = (o, a) => (e, t) => a(e, t, o);
107
- let H = class extends W {
107
+ let H = class extends P {
108
108
  constructor(a, e, t, r, i) {
109
109
  super();
110
110
  /**
111
111
  * Map of origin formula of rule
112
112
  */
113
- g(this, "_ruleFormulaMap", /* @__PURE__ */ new Map());
114
- g(this, "_ruleFormulaMap2", /* @__PURE__ */ new Map());
113
+ m(this, "_ruleFormulaMap", /* @__PURE__ */ new Map());
114
+ m(this, "_ruleFormulaMap2", /* @__PURE__ */ new Map());
115
115
  this._instanceSrv = a, this._registerOtherFormulaService = e, this._dataValidationModel = t, this._dataValidationCacheService = r, this._validatorRegistryService = i, this._initFormulaResultHandler(), this._initDirtyRanges();
116
116
  }
117
117
  _initFormulaResultHandler() {
@@ -122,8 +122,8 @@ let H = class extends W {
122
122
  for (const i in t) {
123
123
  const s = t[i], { ruleFormulaMap: n } = this._ensureMaps(e, i);
124
124
  s.forEach((l) => {
125
- var c, m;
126
- const u = n.get((c = l.extra) == null ? void 0 : c.ruleId), d = this._dataValidationModel.getRuleById(e, i, (m = l.extra) == null ? void 0 : m.ruleId);
125
+ var c, g;
126
+ const u = n.get((c = l.extra) == null ? void 0 : c.ruleId), d = this._dataValidationModel.getRuleById(e, i, (g = l.extra) == null ? void 0 : g.ruleId);
127
127
  d && u && this._dataValidationCacheService.markRangeDirty(e, i, d.ranges);
128
128
  });
129
129
  }
@@ -144,7 +144,7 @@ let H = class extends W {
144
144
  _handleDirtyRanges(a, e, t) {
145
145
  this._dataValidationModel.getRules(a, e).forEach((i) => {
146
146
  const s = i.ranges;
147
- I.doAnyRangesIntersect(s, t) && this.makeRuleDirty(a, e, i.uid);
147
+ A.doAnyRangesIntersect(s, t) && this.makeRuleDirty(a, e, i.uid);
148
148
  });
149
149
  }
150
150
  _initDirtyRanges() {
@@ -193,32 +193,32 @@ let H = class extends W {
193
193
  const { ruleFormulaMap: s } = this._ensureMaps(a, e), n = s.get(t);
194
194
  if (!n)
195
195
  return Promise.resolve(void 0);
196
- const l = await this._registerOtherFormulaService.getFormulaValue(a, e, n.formulaId), { originRow: u, originCol: d } = n, c = r - u, m = i - d;
197
- return _e((_ = (p = l == null ? void 0 : l.result) == null ? void 0 : p[c]) == null ? void 0 : _[m]);
196
+ const l = await this._registerOtherFormulaService.getFormulaValue(a, e, n.formulaId), { originRow: u, originCol: d } = n, c = r - u, g = i - d;
197
+ return _e((_ = (p = l == null ? void 0 : l.result) == null ? void 0 : p[c]) == null ? void 0 : _[g]);
198
198
  }
199
199
  async getCellFormula2Value(a, e, t, r, i) {
200
200
  var p, _;
201
201
  const { ruleFormulaMap2: s } = this._ensureMaps(a, e), n = s.get(t);
202
202
  if (!n)
203
203
  return Promise.resolve(void 0);
204
- const l = await this._registerOtherFormulaService.getFormulaValue(a, e, n.formulaId), { originRow: u, originCol: d } = n, c = r - u, m = i - d;
205
- return _e((_ = (p = l == null ? void 0 : l.result) == null ? void 0 : p[c]) == null ? void 0 : _[m]);
204
+ const l = await this._registerOtherFormulaService.getFormulaValue(a, e, n.formulaId), { originRow: u, originCol: d } = n, c = r - u, g = i - d;
205
+ return _e((_ = (p = l == null ? void 0 : l.result) == null ? void 0 : p[c]) == null ? void 0 : _[g]);
206
206
  }
207
207
  getCellFormulaValueSync(a, e, t, r, i) {
208
208
  var p, _;
209
209
  const { ruleFormulaMap: s } = this._ensureMaps(a, e), n = s.get(t);
210
210
  if (!n)
211
211
  return;
212
- const l = this._registerOtherFormulaService.getFormulaValueSync(a, e, n.formulaId), { originRow: u, originCol: d } = n, c = r - u, m = i - d;
213
- return _e((_ = (p = l == null ? void 0 : l.result) == null ? void 0 : p[c]) == null ? void 0 : _[m]);
212
+ const l = this._registerOtherFormulaService.getFormulaValueSync(a, e, n.formulaId), { originRow: u, originCol: d } = n, c = r - u, g = i - d;
213
+ return _e((_ = (p = l == null ? void 0 : l.result) == null ? void 0 : p[c]) == null ? void 0 : _[g]);
214
214
  }
215
215
  getCellFormula2ValueSync(a, e, t, r, i) {
216
216
  var p, _;
217
217
  const { ruleFormulaMap2: s } = this._ensureMaps(a, e), n = s.get(t);
218
218
  if (!n)
219
219
  return;
220
- const l = this._registerOtherFormulaService.getFormulaValueSync(a, e, n.formulaId), { originRow: u, originCol: d } = n, c = r - u, m = i - d;
221
- return _e((_ = (p = l == null ? void 0 : l.result) == null ? void 0 : p[c]) == null ? void 0 : _[m]);
220
+ const l = this._registerOtherFormulaService.getFormulaValueSync(a, e, n.formulaId), { originRow: u, originCol: d } = n, c = r - u, g = i - d;
221
+ return _e((_ = (p = l == null ? void 0 : l.result) == null ? void 0 : p[c]) == null ? void 0 : _[g]);
222
222
  }
223
223
  getRuleFormulaInfo(a, e, t) {
224
224
  const { ruleFormulaMap: r } = this._ensureMaps(a, e);
@@ -230,22 +230,22 @@ let H = class extends W {
230
230
  r && this._registerOtherFormulaService.markFormulaDirty(a, e, r.formulaId), i && this._registerOtherFormulaService.markFormulaDirty(a, e, i.formulaId);
231
231
  }
232
232
  };
233
- H = zt([
234
- re(0, w),
235
- re(1, v(lt)),
236
- re(2, v(Ge)),
237
- re(3, v(Q)),
238
- re(4, v(q))
233
+ H = Zt([
234
+ re(0, O),
235
+ re(1, R(dt)),
236
+ re(2, R(Ye)),
237
+ re(3, R(Q)),
238
+ re(4, R(q))
239
239
  ], H);
240
- var Zt = Object.getOwnPropertyDescriptor, Jt = (o, a, e, t) => {
241
- for (var r = t > 1 ? void 0 : t ? Zt(a, e) : a, i = o.length - 1, s; i >= 0; i--)
240
+ var Jt = Object.getOwnPropertyDescriptor, ea = (o, a, e, t) => {
241
+ for (var r = t > 1 ? void 0 : t ? Jt(a, e) : a, i = o.length - 1, s; i >= 0; i--)
242
242
  (s = o[i]) && (r = s(r) || r);
243
243
  return r;
244
244
  }, ie = (o, a) => (e, t) => a(e, t, o);
245
- let K = class extends W {
245
+ let K = class extends P {
246
246
  constructor(a, e, t, r, i) {
247
247
  super();
248
- g(this, "_formulaRuleMap", /* @__PURE__ */ new Map());
248
+ m(this, "_formulaRuleMap", /* @__PURE__ */ new Map());
249
249
  this._instanceService = a, this._registerOtherFormulaService = e, this._dataValidationCacheService = t, this._dataValidationModel = r, this._validatorRegistryService = i, this._initFormulaResultHandler();
250
250
  }
251
251
  _initFormulaResultHandler() {
@@ -322,26 +322,26 @@ let K = class extends W {
322
322
  return this._ensureRuleFormulaMap(a, e).get(t);
323
323
  }
324
324
  };
325
- K = Jt([
326
- ie(0, w),
327
- ie(1, v(lt)),
328
- ie(2, v(Q)),
329
- ie(3, v(Ge)),
330
- ie(4, v(q))
325
+ K = ea([
326
+ ie(0, O),
327
+ ie(1, R(dt)),
328
+ ie(2, R(Q)),
329
+ ie(3, R(Ye)),
330
+ ie(4, R(q))
331
331
  ], K);
332
332
  function ne(o) {
333
- return vt(o);
333
+ return St(o);
334
334
  }
335
- function ct(o) {
335
+ function mt(o) {
336
336
  var a;
337
337
  return String((a = ne(o)) != null ? a : "");
338
338
  }
339
- class Xe {
339
+ class Ke {
340
340
  constructor(a, e, t, r, i = !1) {
341
- g(this, "_map");
342
- g(this, "_tree", new St());
343
- g(this, "_dirty", !0);
344
- g(this, "_buildTree", () => {
341
+ m(this, "_map");
342
+ m(this, "_tree", new Mt());
343
+ m(this, "_dirty", !0);
344
+ m(this, "_buildTree", () => {
345
345
  if (!this._dirty || this._disableTree)
346
346
  return;
347
347
  this._tree.clear();
@@ -358,7 +358,7 @@ class Xe {
358
358
  });
359
359
  }), this._tree.load(a), this._dirty = !1;
360
360
  });
361
- g(this, "_debonceBuildTree", Vt(this._buildTree, 0));
361
+ m(this, "_debonceBuildTree", Vt(this._buildTree, 0));
362
362
  this._unitId = e, this._subUnitId = t, this._univerInstanceService = r, this._disableTree = i, this._map = a, this._buildTree();
363
363
  }
364
364
  get _worksheet() {
@@ -368,9 +368,9 @@ class Xe {
368
368
  _addRule(a, e) {
369
369
  if (!this._worksheet)
370
370
  return;
371
- const t = I.mergeRanges(e.map((r) => b.transformRange(r, this._worksheet)));
371
+ const t = A.mergeRanges(e.map((r) => b.transformRange(r, this._worksheet)));
372
372
  this._map.forEach((r, i) => {
373
- const s = I.subtractMulti(r, t);
373
+ const s = A.subtractMulti(r, t);
374
374
  s.length === 0 ? this._map.delete(i) : this._map.set(i, s);
375
375
  }), this._dirty = !0, this._map.set(a, t), this._debonceBuildTree();
376
376
  }
@@ -382,7 +382,7 @@ class Xe {
382
382
  return;
383
383
  const e = a.map((t) => b.transformRange(t, this._worksheet));
384
384
  this._map.forEach((t, r) => {
385
- const i = I.subtractMulti(t, e);
385
+ const i = A.subtractMulti(t, e);
386
386
  i.length === 0 ? this._map.delete(r) : this._map.set(r, i);
387
387
  }), this._dirty = !0, this._debonceBuildTree();
388
388
  }
@@ -400,10 +400,10 @@ class Xe {
400
400
  if (!t.length)
401
401
  return;
402
402
  let r = this._map.get(e);
403
- r ? (this._map.set(e, I.mergeRanges([...r, ...t])), r = this._map.get(e)) : (r = t, this._map.set(e, r)), this._map.forEach((i, s) => {
403
+ r ? (this._map.set(e, A.mergeRanges([...r, ...t])), r = this._map.get(e)) : (r = t, this._map.set(e, r)), this._map.forEach((i, s) => {
404
404
  if (s === e)
405
405
  return;
406
- const n = I.subtractMulti(i, t);
406
+ const n = A.subtractMulti(i, t);
407
407
  n.length === 0 ? this._map.delete(s) : this._map.set(s, n);
408
408
  });
409
409
  }), this._dirty = !0, this._debonceBuildTree();
@@ -414,11 +414,11 @@ class Xe {
414
414
  return a.forEach((r, i) => {
415
415
  var l;
416
416
  const s = (l = this._map.get(r.uid)) != null ? l : [], n = r.ranges;
417
- s.length !== 0 && (s.length !== n.length || s.some((u, d) => !I.equals(u, n[d]))) && e.push({
417
+ s.length !== 0 && (s.length !== n.length || s.some((u, d) => !A.equals(u, n[d]))) && e.push({
418
418
  type: "update",
419
419
  ruleId: r.uid,
420
420
  oldRanges: n,
421
- newRanges: I.sort(s),
421
+ newRanges: A.sort(s),
422
422
  rule: r
423
423
  }), s.length === 0 && (e.push({
424
424
  type: "delete",
@@ -433,11 +433,11 @@ class Xe {
433
433
  return a.forEach((i, s) => {
434
434
  var u;
435
435
  const n = (u = this._map.get(i.uid)) != null ? u : [], l = i.ranges;
436
- n.length !== 0 && (n.length !== l.length || n.some((d, c) => !I.equals(d, l[c]))) && t.push({
436
+ n.length !== 0 && (n.length !== l.length || n.some((d, c) => !A.equals(d, l[c]))) && t.push({
437
437
  type: "update",
438
438
  ruleId: i.uid,
439
439
  oldRanges: l,
440
- newRanges: I.sort(n),
440
+ newRanges: A.sort(n),
441
441
  rule: i
442
442
  }), n.length === 0 && (t.push({
443
443
  type: "delete",
@@ -451,14 +451,14 @@ class Xe {
451
451
  type: "add",
452
452
  rule: {
453
453
  ...i,
454
- ranges: I.sort(s)
454
+ ranges: A.sort(s)
455
455
  }
456
456
  });
457
457
  }), t;
458
458
  }
459
459
  clone() {
460
- return new Xe(
461
- new Map(V.deepClone(Array.from(this._map.entries()))),
460
+ return new Ke(
461
+ new Map(M.deepClone(Array.from(this._map.entries()))),
462
462
  this._unitId,
463
463
  this._subUnitId,
464
464
  this._univerInstanceService,
@@ -477,19 +477,19 @@ class Xe {
477
477
  return t.length > 0 ? t[0].ruleId : void 0;
478
478
  }
479
479
  }
480
- var ea = Object.getOwnPropertyDescriptor, ta = (o, a, e, t) => {
481
- for (var r = t > 1 ? void 0 : t ? ea(a, e) : a, i = o.length - 1, s; i >= 0; i--)
480
+ var ta = Object.getOwnPropertyDescriptor, aa = (o, a, e, t) => {
481
+ for (var r = t > 1 ? void 0 : t ? ta(a, e) : a, i = o.length - 1, s; i >= 0; i--)
482
482
  (s = o[i]) && (r = s(r) || r);
483
483
  return r;
484
484
  }, X = (o, a) => (e, t) => a(e, t, o);
485
- let F = class extends W {
485
+ let F = class extends P {
486
486
  constructor(a, e, t, r, i, s, n) {
487
487
  super();
488
- g(this, "_ruleMatrixMap", /* @__PURE__ */ new Map());
489
- g(this, "_validStatusChange$", new je());
490
- g(this, "_ruleChange$", new je());
491
- g(this, "ruleChange$", this._ruleChange$.asObservable());
492
- g(this, "validStatusChange$", this._validStatusChange$.asObservable());
488
+ m(this, "_ruleMatrixMap", /* @__PURE__ */ new Map());
489
+ m(this, "_validStatusChange$", new Qe());
490
+ m(this, "_ruleChange$", new Qe());
491
+ m(this, "ruleChange$", this._ruleChange$.asObservable());
492
+ m(this, "validStatusChange$", this._validStatusChange$.asObservable());
493
493
  this._dataValidationModel = a, this._univerInstanceService = e, this._dataValidatorRegistryService = t, this._dataValidationCacheService = r, this._dataValidationFormulaService = i, this._dataValidationCustomFormulaService = s, this._commandService = n, this._initRuleUpdateListener(), this.disposeWithMe(() => {
494
494
  this._ruleChange$.complete(), this._validStatusChange$.complete();
495
495
  }), this._initUniverInstanceListener();
@@ -501,7 +501,7 @@ let F = class extends W {
501
501
  })
502
502
  ), this.disposeWithMe(
503
503
  this._commandService.onCommandExecuted((a) => {
504
- if (a.id === it.id) {
504
+ if (a.id === st.id) {
505
505
  const { unitId: e, subUnitId: t } = a.params, r = this._ruleMatrixMap.get(e);
506
506
  r && r.delete(t);
507
507
  }
@@ -541,7 +541,7 @@ let F = class extends W {
541
541
  let t = this._ruleMatrixMap.get(a);
542
542
  t || (t = /* @__PURE__ */ new Map(), this._ruleMatrixMap.set(a, t));
543
543
  let r = t.get(e);
544
- return r || (r = new Xe(/* @__PURE__ */ new Map(), a, e, this._univerInstanceService), t.set(e, r)), r;
544
+ return r || (r = new Ke(/* @__PURE__ */ new Map(), a, e, this._univerInstanceService), t.set(e, r)), r;
545
545
  }
546
546
  _addRuleSideEffect(a, e, t) {
547
547
  this._ensureRuleMatrix(a, e).addRule(t), this._dataValidationCacheService.addRule(a, e, t), this._dataValidationFormulaService.addRule(a, e, t), this._dataValidationCustomFormulaService.addRule(a, e, t);
@@ -573,8 +573,8 @@ let F = class extends W {
573
573
  return this._dataValidationModel.getRuleById(a, e, i);
574
574
  }
575
575
  validator(a, e, t) {
576
- const { col: r, row: i, unitId: s, subUnitId: n, worksheet: l } = e, u = (_, R) => {
577
- t && t(_, R), R && this._validStatusChange$.next({
576
+ const { col: r, row: i, unitId: s, subUnitId: n, worksheet: l } = e, u = (_, v) => {
577
+ t && t(_, v), v && this._validStatusChange$.next({
578
578
  unitId: s,
579
579
  subUnitId: n,
580
580
  ruleId: a.uid,
@@ -582,10 +582,10 @@ let F = class extends W {
582
582
  row: i,
583
583
  col: r
584
584
  });
585
- }, d = l.getCellValueOnly(i, r), c = this.getValidator(a.type), m = l.getCellRaw(i, r), p = ne(m);
585
+ }, d = l.getCellValueOnly(i, r), c = this.getValidator(a.type), g = l.getCellRaw(i, r), p = ne(g);
586
586
  if (c) {
587
- const _ = this._dataValidationCacheService.ensureCache(s, n), R = _.getValue(i, r);
588
- return R == null ? (_.setValue(i, r, D.VALIDATING), c.validator(
587
+ const _ = this._dataValidationCacheService.ensureCache(s, n), v = _.getValue(i, r);
588
+ return v == null ? (_.setValue(i, r, D.VALIDATING), c.validator(
589
589
  {
590
590
  value: p,
591
591
  unitId: s,
@@ -595,13 +595,13 @@ let F = class extends W {
595
595
  worksheet: e.worksheet,
596
596
  workbook: e.workbook,
597
597
  interceptValue: ne(d),
598
- t: m == null ? void 0 : m.t
598
+ t: g == null ? void 0 : g.t
599
599
  },
600
600
  a
601
- ).then((M) => {
602
- const f = M ? D.VALID : D.INVALID, O = _.getValue(i, r);
603
- f === D.VALID ? _.realDeleteValue(i, r) : _.setValue(i, r, f), u(f, R !== O);
604
- }), D.VALIDATING) : (u(R != null ? R : D.VALID, !1), R != null ? R : D.VALID);
601
+ ).then((V) => {
602
+ const f = V ? D.VALID : D.INVALID, w = _.getValue(i, r);
603
+ f === D.VALID ? _.realDeleteValue(i, r) : _.setValue(i, r, f), u(f, v !== w);
604
+ }), D.VALIDATING) : (u(v != null ? v : D.VALID, !1), v != null ? v : D.VALID);
605
605
  } else
606
606
  return u(D.VALID, !1), D.VALID;
607
607
  }
@@ -630,37 +630,38 @@ let F = class extends W {
630
630
  return this._dataValidationModel.getAll();
631
631
  }
632
632
  };
633
- F = ta([
634
- X(0, v(Ge)),
635
- X(1, w),
636
- X(2, v(q)),
637
- X(3, v(Q)),
638
- X(4, v(K)),
639
- X(5, v(H)),
640
- X(6, x)
633
+ F = aa([
634
+ X(0, R(Ye)),
635
+ X(1, O),
636
+ X(2, R(q)),
637
+ X(3, R(Q)),
638
+ X(4, R(K)),
639
+ X(5, R(H)),
640
+ X(6, U)
641
641
  ], F);
642
- const Ve = 1, Me = 0;
643
- function et(o, a) {
644
- return V.isBlank(o) ? a.t("dataValidation.validFail.value") : S(o) ? a.t("dataValidation.validFail.primitive") : "";
642
+ const Me = 1, Ve = 0;
643
+ function tt(o, a) {
644
+ return M.isBlank(o) ? a.t("dataValidation.validFail.value") : S(o) ? a.t("dataValidation.validFail.primitive") : "";
645
645
  }
646
- const pe = (o) => V.isDefine(o) && String(o).toLowerCase() === "true" ? "1" : String(o).toLowerCase() === "false" ? "0" : o;
647
- class aa extends G {
646
+ const pe = (o) => M.isDefine(o) && String(o).toLowerCase() === "true" ? "1" : String(o).toLowerCase() === "false" ? "0" : o;
647
+ class ra extends G {
648
648
  constructor() {
649
649
  super(...arguments);
650
- g(this, "id", T.CHECKBOX);
651
- g(this, "title", "dataValidation.checkbox.title");
652
- g(this, "operators", []);
653
- g(this, "scopes", ["sheet"]);
654
- g(this, "offsetFormulaByRange", !1);
655
- g(this, "_formulaService", this.injector.get(K));
656
- g(this, "skipDefaultFontRender", (e, t, r) => {
650
+ m(this, "id", T.CHECKBOX);
651
+ m(this, "title", "dataValidation.checkbox.title");
652
+ m(this, "operators", []);
653
+ m(this, "scopes", ["sheet"]);
654
+ m(this, "order", 41);
655
+ m(this, "offsetFormulaByRange", !1);
656
+ m(this, "_formulaService", this.injector.get(K));
657
+ m(this, "skipDefaultFontRender", (e, t, r) => {
657
658
  const { unitId: i, subUnitId: s } = r, { formula1: n, formula2: l } = this.parseFormulaSync(e, i, s), u = `${t != null ? t : ""}`;
658
659
  return !u || u === `${n}` || u === `${l}`;
659
660
  });
660
661
  }
661
662
  validatorFormula(e, t, r) {
662
663
  const { formula1: i, formula2: s } = e, n = i === s;
663
- if (V.isBlank(i) && V.isBlank(s))
664
+ if (M.isBlank(i) && M.isBlank(s))
664
665
  return {
665
666
  success: !0
666
667
  };
@@ -670,7 +671,7 @@ class aa extends G {
670
671
  formula1: this.localeService.t("dataValidation.validFail.checkboxEqual"),
671
672
  formula2: this.localeService.t("dataValidation.validFail.checkboxEqual")
672
673
  };
673
- const l = et(i, this.localeService), u = et(s, this.localeService);
674
+ const l = tt(i, this.localeService), u = tt(s, this.localeService);
674
675
  return {
675
676
  success: !l && !u,
676
677
  formula1: l,
@@ -678,8 +679,8 @@ class aa extends G {
678
679
  };
679
680
  }
680
681
  async parseFormula(e, t, r) {
681
- var c, m, p, _;
682
- const { formula1: i = Ve, formula2: s = Me } = e, n = await this._formulaService.getRuleFormulaResult(t, r, e.uid), l = S(i) ? oe((m = (c = n == null ? void 0 : n[0]) == null ? void 0 : c.result) == null ? void 0 : m[0][0]) : i, u = S(s) ? oe((_ = (p = n == null ? void 0 : n[1]) == null ? void 0 : p.result) == null ? void 0 : _[0][0]) : s, d = C(String(l)) && C(String(u));
682
+ var c, g, p, _;
683
+ const { formula1: i = Me, formula2: s = Ve } = e, n = await this._formulaService.getRuleFormulaResult(t, r, e.uid), l = S(i) ? oe((g = (c = n == null ? void 0 : n[0]) == null ? void 0 : c.result) == null ? void 0 : g[0][0]) : i, u = S(s) ? oe((_ = (p = n == null ? void 0 : n[1]) == null ? void 0 : p.result) == null ? void 0 : _[0][0]) : s, d = C(String(l)) && C(String(u));
683
684
  return {
684
685
  formula1: pe(l),
685
686
  formula2: pe(u),
@@ -690,12 +691,12 @@ class aa extends G {
690
691
  }
691
692
  getExtraStyle(e, t) {
692
693
  return {
693
- tb: ve.CLIP
694
+ tb: Re.CLIP
694
695
  };
695
696
  }
696
697
  parseFormulaSync(e, t, r) {
697
- var c, m, p, _;
698
- const { formula1: i = Ve, formula2: s = Me } = e, n = this._formulaService.getRuleFormulaResultSync(t, r, e.uid), l = S(i) ? oe((m = (c = n == null ? void 0 : n[0]) == null ? void 0 : c.result) == null ? void 0 : m[0][0]) : i, u = S(s) ? oe((_ = (p = n == null ? void 0 : n[1]) == null ? void 0 : p.result) == null ? void 0 : _[0][0]) : s, d = C(String(l)) && C(String(u));
698
+ var c, g, p, _;
699
+ const { formula1: i = Me, formula2: s = Ve } = e, n = this._formulaService.getRuleFormulaResultSync(t, r, e.uid), l = S(i) ? oe((g = (c = n == null ? void 0 : n[0]) == null ? void 0 : c.result) == null ? void 0 : g[0][0]) : i, u = S(s) ? oe((_ = (p = n == null ? void 0 : n[1]) == null ? void 0 : p.result) == null ? void 0 : _[0][0]) : s, d = C(String(l)) && C(String(u));
699
700
  return {
700
701
  formula1: pe(l),
701
702
  formula2: pe(u),
@@ -706,13 +707,16 @@ class aa extends G {
706
707
  }
707
708
  async isValidType(e, t, r) {
708
709
  const { value: i, unitId: s, subUnitId: n } = e, { formula1: l, formula2: u, originFormula1: d, originFormula2: c } = await this.parseFormula(r, s, n);
709
- return !V.isDefine(l) || !V.isDefine(u) ? !0 : V.isDefine(i) && (String(i) === String(l) || String(i) === String(u) || String(i) === String(d != null ? d : "") || String(i) === String(c != null ? c : ""));
710
+ return !M.isDefine(l) || !M.isDefine(u) ? !0 : M.isDefine(i) && (String(i) === String(l) || String(i) === String(u) || String(i) === String(d != null ? d : "") || String(i) === String(c != null ? c : ""));
710
711
  }
711
712
  generateRuleErrorMessage(e) {
712
713
  return this.localeService.t("dataValidation.checkbox.error");
713
714
  }
715
+ generateRuleName(e) {
716
+ return this.titleStr;
717
+ }
714
718
  }
715
- const ra = {
719
+ const ia = {
716
720
  [h.BETWEEN]: "dataValidation.date.operators.between",
717
721
  [h.EQUAL]: "dataValidation.date.operators.equal",
718
722
  [h.GREATER_THAN]: "dataValidation.date.operators.greaterThan",
@@ -723,7 +727,7 @@ const ra = {
723
727
  [h.NOT_EQUAL]: "dataValidation.date.operators.notEqual"
724
728
  };
725
729
  h.BETWEEN + "", h.EQUAL + "", h.GREATER_THAN + "", h.GREATER_THAN_OR_EQUAL + "", h.LESS_THAN + "", h.LESS_THAN_OR_EQUAL + "", h.NOT_BETWEEN + "", h.NOT_EQUAL + "";
726
- const ia = {
730
+ const at = {
727
731
  [h.BETWEEN]: "dataValidation.date.ruleName.between",
728
732
  [h.EQUAL]: "dataValidation.date.ruleName.equal",
729
733
  [h.GREATER_THAN]: "dataValidation.date.ruleName.greaterThan",
@@ -731,7 +735,8 @@ const ia = {
731
735
  [h.LESS_THAN]: "dataValidation.date.ruleName.lessThan",
732
736
  [h.LESS_THAN_OR_EQUAL]: "dataValidation.date.ruleName.lessThanOrEqual",
733
737
  [h.NOT_BETWEEN]: "dataValidation.date.ruleName.notBetween",
734
- [h.NOT_EQUAL]: "dataValidation.date.ruleName.notEqual"
738
+ [h.NOT_EQUAL]: "dataValidation.date.ruleName.notEqual",
739
+ NONE: "dataValidation.date.ruleName.legal"
735
740
  }, oa = {
736
741
  [h.BETWEEN]: "dataValidation.date.errorMsg.between",
737
742
  [h.EQUAL]: "dataValidation.date.errorMsg.equal",
@@ -740,8 +745,9 @@ const ia = {
740
745
  [h.LESS_THAN]: "dataValidation.date.errorMsg.lessThan",
741
746
  [h.LESS_THAN_OR_EQUAL]: "dataValidation.date.errorMsg.lessThanOrEqual",
742
747
  [h.NOT_BETWEEN]: "dataValidation.date.errorMsg.notBetween",
743
- [h.NOT_EQUAL]: "dataValidation.date.errorMsg.notEqual"
744
- }, Ae = [
748
+ [h.NOT_EQUAL]: "dataValidation.date.errorMsg.notEqual",
749
+ NONE: "dataValidation.date.errorMsg.legal"
750
+ }, De = [
745
751
  h.BETWEEN,
746
752
  h.NOT_BETWEEN
747
753
  ], le = "{FORMULA1}", ue = "{FORMULA2}";
@@ -755,28 +761,29 @@ function Xa(o) {
755
761
  const a = ne(o);
756
762
  return a == null ? "" : a.toString();
757
763
  }
758
- function De(o, a, e) {
764
+ function be(o, a, e) {
759
765
  const { formula1: t, formula2: r } = a, i = a.ranges[0].startRow, s = a.ranges[0].startColumn, n = e.row - i, l = e.col - s, u = S(t) ? o.moveFormulaRefOffset(t, l, n, !0) : t, d = S(r) ? o.moveFormulaRefOffset(r, l, n, !0) : r;
760
766
  return {
761
767
  transformedFormula1: u,
762
768
  transformedFormula2: d
763
769
  };
764
770
  }
765
- const Ue = (o) => {
771
+ const He = (o) => {
766
772
  var e, t;
767
773
  if (o == null || typeof o == "boolean")
768
774
  return;
769
775
  if (typeof o == "number" || !Number.isNaN(+o))
770
776
  return +o;
771
777
  const a = (e = j.parseDate(o)) == null ? void 0 : e.v;
772
- return V.isDefine(a) ? a : (t = j.parseDate(at(o).format("YYYY-MM-DD HH:mm:ss"))) == null ? void 0 : t.v;
778
+ return M.isDefine(a) ? a : (t = j.parseDate(it(o).format("YYYY-MM-DD HH:mm:ss"))) == null ? void 0 : t.v;
773
779
  };
774
780
  class sa extends G {
775
781
  constructor() {
776
782
  super(...arguments);
777
- g(this, "id", T.DATE);
778
- g(this, "title", "dataValidation.date.title");
779
- g(this, "operators", [
783
+ m(this, "id", T.DATE);
784
+ m(this, "title", "dataValidation.date.title");
785
+ m(this, "order", 40);
786
+ m(this, "operators", [
780
787
  h.BETWEEN,
781
788
  h.EQUAL,
782
789
  h.GREATER_THAN,
@@ -786,15 +793,15 @@ class sa extends G {
786
793
  h.NOT_BETWEEN,
787
794
  h.NOT_EQUAL
788
795
  ]);
789
- g(this, "scopes", ["sheet"]);
790
- g(this, "_customFormulaService", this.injector.get(H));
791
- g(this, "_lexerTreeBuilder", this.injector.get(Y));
796
+ m(this, "scopes", ["sheet"]);
797
+ m(this, "_customFormulaService", this.injector.get(H));
798
+ m(this, "_lexerTreeBuilder", this.injector.get(Y));
792
799
  }
793
800
  async parseFormula(e, t, r, i, s) {
794
801
  const n = await this._customFormulaService.getCellFormulaValue(t, r, e.uid, i, s), l = await this._customFormulaService.getCellFormula2Value(t, r, e.uid, i, s), { formula1: u, formula2: d } = e, c = C(String(n == null ? void 0 : n.v)) && C(String(l == null ? void 0 : l.v));
795
802
  return {
796
- formula1: Ue(S(u) ? n == null ? void 0 : n.v : u),
797
- formula2: Ue(S(d) ? l == null ? void 0 : l.v : d),
803
+ formula1: He(S(u) ? n == null ? void 0 : n.v : u),
804
+ formula2: He(S(d) ? l == null ? void 0 : l.v : d),
798
805
  isFormulaValid: c
799
806
  };
800
807
  }
@@ -803,16 +810,16 @@ class sa extends G {
803
810
  return typeof r == "number" && typeof t == "string" ? !0 : typeof t == "string" ? !!j.parseDate(t) : !1;
804
811
  }
805
812
  _validatorSingleFormula(e) {
806
- return !V.isBlank(e) && (S(e) || !Number.isNaN(+e) || !!(e && j.parseDate(e)));
813
+ return !M.isBlank(e) && (S(e) || !Number.isNaN(+e) || !!(e && j.parseDate(e)));
807
814
  }
808
815
  validatorFormula(e, t, r) {
809
816
  const i = e.operator;
810
817
  if (!i)
811
818
  return {
812
- success: !1
819
+ success: !0
813
820
  };
814
821
  const s = this._validatorSingleFormula(e.formula1), n = this.localeService.t("dataValidation.validFail.date");
815
- if (Ae.includes(i)) {
822
+ if (De.includes(i)) {
816
823
  const u = this._validatorSingleFormula(e.formula2);
817
824
  return {
818
825
  success: s && u,
@@ -834,12 +841,12 @@ class sa extends G {
834
841
  if (!Number.isNaN(+u))
835
842
  d = j.dateFromSerial(+u);
836
843
  else {
837
- const m = (c = j.parseDate(u)) == null ? void 0 : c.v;
838
- if (m == null)
844
+ const g = (c = j.parseDate(u)) == null ? void 0 : c.v;
845
+ if (g == null)
839
846
  return "";
840
- d = j.dateFromSerial(m);
847
+ d = j.dateFromSerial(g);
841
848
  }
842
- return at(`${d[0]}/${d[1]}/${d[2]} ${d[3]}:${d[4]}:${d[5]}`).format(n != null && n.showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD");
849
+ return it(`${d[0]}/${d[1]}/${d[2]} ${d[3]}:${d[4]}:${d[5]}`).format(n != null && n.showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD");
843
850
  };
844
851
  return {
845
852
  formula1: S(i) ? i : l(`${i}`),
@@ -850,29 +857,29 @@ class sa extends G {
850
857
  const { value: i } = e;
851
858
  return {
852
859
  ...e,
853
- value: Ue(i)
860
+ value: He(i)
854
861
  };
855
862
  }
856
863
  get operatorNames() {
857
- return this.operators.map((e) => this.localeService.t(ra[e]));
864
+ return this.operators.map((e) => this.localeService.t(ia[e]));
858
865
  }
859
866
  generateRuleName(e) {
860
867
  var r, i;
861
868
  if (!e.operator)
862
- return this.titleStr;
863
- const t = this.localeService.t(ia[e.operator]).replace(le, (r = e.formula1) != null ? r : "").replace(ue, (i = e.formula2) != null ? i : "");
869
+ return this.localeService.t(at.NONE);
870
+ const t = this.localeService.t(at[e.operator]).replace(le, (r = e.formula1) != null ? r : "").replace(ue, (i = e.formula2) != null ? i : "");
864
871
  return `${this.titleStr} ${t}`;
865
872
  }
866
873
  generateRuleErrorMessage(e, t) {
867
874
  if (!e.operator)
868
875
  return this.titleStr;
869
- const { transformedFormula1: r, transformedFormula2: i } = De(this._lexerTreeBuilder, e, t);
876
+ const { transformedFormula1: r, transformedFormula2: i } = be(this._lexerTreeBuilder, e, t);
870
877
  return `${this.localeService.t(oa[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
871
878
  }
872
879
  }
873
880
  h.BETWEEN + "", h.EQUAL + "", h.GREATER_THAN + "", h.GREATER_THAN_OR_EQUAL + "", h.LESS_THAN + "", h.LESS_THAN_OR_EQUAL + "", h.NOT_BETWEEN + "", h.NOT_EQUAL + "";
874
881
  h.BETWEEN + "", h.EQUAL + "", h.GREATER_THAN + "", h.GREATER_THAN_OR_EQUAL + "", h.LESS_THAN + "", h.LESS_THAN_OR_EQUAL + "", h.NOT_BETWEEN + "", h.NOT_EQUAL + "";
875
- const ht = {
882
+ const ye = {
876
883
  [h.BETWEEN]: "dataValidation.errorMsg.between",
877
884
  [h.EQUAL]: "dataValidation.errorMsg.equal",
878
885
  [h.GREATER_THAN]: "dataValidation.errorMsg.greaterThan",
@@ -880,20 +887,22 @@ const ht = {
880
887
  [h.LESS_THAN]: "dataValidation.errorMsg.lessThan",
881
888
  [h.LESS_THAN_OR_EQUAL]: "dataValidation.errorMsg.lessThanOrEqual",
882
889
  [h.NOT_BETWEEN]: "dataValidation.errorMsg.notBetween",
883
- [h.NOT_EQUAL]: "dataValidation.errorMsg.notEqual"
890
+ [h.NOT_EQUAL]: "dataValidation.errorMsg.notEqual",
891
+ NONE: "dataValidation.errorMsg.legal"
884
892
  };
885
- function ye(o) {
893
+ function Ee(o) {
886
894
  let a = o;
887
895
  return typeof o == "string" ? ((o.startsWith("¥") || o.startsWith("$")) && (a = o.slice(1)), +a) : +o;
888
896
  }
889
897
  class na extends G {
890
898
  constructor() {
891
899
  super(...arguments);
892
- g(this, "_customFormulaService", this.injector.get(H));
893
- g(this, "id", T.DECIMAL);
894
- g(this, "_lexerTreeBuilder", this.injector.get(Y));
895
- g(this, "title", "dataValidation.decimal.title");
896
- g(this, "operators", [
900
+ m(this, "_customFormulaService", this.injector.get(H));
901
+ m(this, "id", T.DECIMAL);
902
+ m(this, "_lexerTreeBuilder", this.injector.get(Y));
903
+ m(this, "title", "dataValidation.decimal.title");
904
+ m(this, "order", 20);
905
+ m(this, "operators", [
897
906
  h.BETWEEN,
898
907
  h.EQUAL,
899
908
  h.GREATER_THAN,
@@ -903,20 +912,20 @@ class na extends G {
903
912
  h.NOT_BETWEEN,
904
913
  h.NOT_EQUAL
905
914
  ]);
906
- g(this, "scopes", ["sheet"]);
915
+ m(this, "scopes", ["sheet"]);
907
916
  }
908
917
  _isFormulaOrNumber(e) {
909
- return !V.isBlank(e) && (S(e) || !Number.isNaN(+e));
918
+ return !M.isBlank(e) && (S(e) || !Number.isNaN(+e));
910
919
  }
911
920
  async isValidType(e, t, r) {
912
921
  const { value: i } = e;
913
- return !Number.isNaN(ye(i));
922
+ return !Number.isNaN(Ee(i));
914
923
  }
915
924
  transform(e, t, r) {
916
925
  const { value: i } = e;
917
926
  return {
918
927
  ...e,
919
- value: ye(i)
928
+ value: Ee(i)
920
929
  };
921
930
  }
922
931
  _parseNumber(e) {
@@ -934,9 +943,9 @@ class na extends G {
934
943
  const i = e.operator;
935
944
  if (!i)
936
945
  return {
937
- success: !1
946
+ success: !0
938
947
  };
939
- const s = V.isDefine(e.formula1) && this._isFormulaOrNumber(e.formula1), n = V.isDefine(e.formula2) && this._isFormulaOrNumber(e.formula2), l = Ae.includes(i), u = this.localeService.t("dataValidation.validFail.number");
948
+ const s = M.isDefine(e.formula1) && this._isFormulaOrNumber(e.formula1), n = M.isDefine(e.formula2) && this._isFormulaOrNumber(e.formula2), l = De.includes(i), u = this.localeService.t("dataValidation.validFail.number");
940
949
  return l ? {
941
950
  success: s && n,
942
951
  formula1: s ? void 0 : u,
@@ -948,12 +957,12 @@ class na extends G {
948
957
  }
949
958
  generateRuleErrorMessage(e, t) {
950
959
  if (!e.operator)
951
- return this.titleStr;
952
- const { transformedFormula1: r, transformedFormula2: i } = De(this._lexerTreeBuilder, e, t);
953
- return `${this.localeService.t(ht[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
960
+ return this.localeService.t(ye.NONE).replace("{TYPE}", this.titleStr);
961
+ const { transformedFormula1: r, transformedFormula2: i } = be(this._lexerTreeBuilder, e, t);
962
+ return `${this.localeService.t(ye[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
954
963
  }
955
964
  }
956
- function He(o) {
965
+ function Pe(o) {
957
966
  if (!o)
958
967
  return [];
959
968
  const a = /* @__PURE__ */ new Set();
@@ -980,36 +989,37 @@ const la = [
980
989
  "offset"
981
990
  ];
982
991
  function ua(o, a) {
983
- if (!S(o) || dt(o.slice(1)))
992
+ if (!S(o) || ht(o.slice(1)))
984
993
  return !0;
985
994
  const t = a.sequenceNodesBuilder(o);
986
- return t && t.some((r) => typeof r == "object" && r.nodeType === kt.FUNCTION && la.indexOf(r.token.toLowerCase()) > -1);
995
+ return t && t.some((r) => typeof r == "object" && r.nodeType === jt.FUNCTION && la.indexOf(r.token.toLowerCase()) > -1);
987
996
  }
988
997
  function da(o, a) {
989
998
  const { formula1: e = "", ranges: t } = o;
990
- if (dt(e.slice(1))) {
991
- const i = jt(e.slice(1));
992
- if ((!i.sheetName || i.sheetName === a) && t.some((s) => I.intersects(s, i.range)))
999
+ if (ht(e.slice(1))) {
1000
+ const i = Qt(e.slice(1));
1001
+ if ((!i.sheetName || i.sheetName === a) && t.some((s) => A.intersects(s, i.range)))
993
1002
  return !0;
994
1003
  }
995
1004
  return !1;
996
1005
  }
997
- class mt extends G {
1006
+ class gt extends G {
998
1007
  constructor() {
999
1008
  super(...arguments);
1000
- g(this, "formulaService", this.injector.get(K));
1001
- g(this, "_lexer", this.injector.get(Y));
1002
- g(this, "_univerInstanceService", this.injector.get(w));
1003
- g(this, "offsetFormulaByRange", !1);
1004
- g(this, "id", T.LIST);
1005
- g(this, "title", "dataValidation.list.title");
1006
- g(this, "operators", []);
1007
- g(this, "scopes", ["sheet"]);
1008
- g(this, "skipDefaultFontRender", (e) => e.renderMode !== Be.TEXT);
1009
+ m(this, "formulaService", this.injector.get(K));
1010
+ m(this, "_lexer", this.injector.get(Y));
1011
+ m(this, "_univerInstanceService", this.injector.get(O));
1012
+ m(this, "order", 50);
1013
+ m(this, "offsetFormulaByRange", !1);
1014
+ m(this, "id", T.LIST);
1015
+ m(this, "title", "dataValidation.list.title");
1016
+ m(this, "operators", []);
1017
+ m(this, "scopes", ["sheet"]);
1018
+ m(this, "skipDefaultFontRender", (e) => e.renderMode !== Be.TEXT);
1009
1019
  }
1010
1020
  validatorFormula(e, t, r) {
1011
1021
  var u, d, c;
1012
- const i = !V.isBlank(e.formula1), s = ua((u = e.formula1) != null ? u : "", this._lexer), n = (c = (d = this._univerInstanceService.getUnit(t, N.UNIVER_SHEET)) == null ? void 0 : d.getSheetBySheetId(r)) == null ? void 0 : c.getName(), l = da(e, n != null ? n : "");
1022
+ const i = !M.isBlank(e.formula1), s = ua((u = e.formula1) != null ? u : "", this._lexer), n = (c = (d = this._univerInstanceService.getUnit(t, N.UNIVER_SHEET)) == null ? void 0 : d.getSheetBySheetId(r)) == null ? void 0 : c.getName(), l = da(e, n != null ? n : "");
1013
1023
  return {
1014
1024
  success: !!(i && s && !l),
1015
1025
  formula1: i ? s ? l ? this.localeService.t("dataValidation.validFail.listIntersects") : void 0 : this.localeService.t("dataValidation.validFail.listInvalid") : this.localeService.t("dataValidation.validFail.list")
@@ -1017,7 +1027,7 @@ class mt extends G {
1017
1027
  }
1018
1028
  getExtraStyle(e, t, { style: r }) {
1019
1029
  var s;
1020
- const i = (s = r.tb !== ve.OVERFLOW ? r.tb : ve.CLIP) != null ? s : ve.WRAP;
1030
+ const i = (s = r.tb !== Re.OVERFLOW ? r.tb : Re.CLIP) != null ? s : Re.WRAP;
1021
1031
  if (e.type === T.LIST && (e.renderMode === Be.ARROW || e.renderMode === Be.TEXT)) {
1022
1032
  const n = this.getListWithColorMap(e), l = `${t != null ? t : ""}`, u = n[l];
1023
1033
  if (u)
@@ -1046,8 +1056,8 @@ class mt extends G {
1046
1056
  };
1047
1057
  }
1048
1058
  async isValidType(e, t, r) {
1049
- var m, p;
1050
- const { value: i, unitId: s, subUnitId: n } = e, { formula1: l = "" } = r, u = await this.formulaService.getRuleFormulaResult(s, n, r.uid), d = S(l) ? He((p = (m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) == null ? void 0 : p[0][0]) : fe(l);
1059
+ var g, p;
1060
+ const { value: i, unitId: s, subUnitId: n } = e, { formula1: l = "" } = r, u = await this.formulaService.getRuleFormulaResult(s, n, r.uid), d = S(l) ? Pe((p = (g = u == null ? void 0 : u[0]) == null ? void 0 : g.result) == null ? void 0 : p[0][0]) : fe(l);
1051
1061
  return this.parseCellValue(i).every((_) => d.includes(_));
1052
1062
  }
1053
1063
  generateRuleName() {
@@ -1057,22 +1067,22 @@ class mt extends G {
1057
1067
  return this.localeService.t("dataValidation.list.error");
1058
1068
  }
1059
1069
  getList(e, t, r) {
1060
- var m, p, _, R;
1061
- const { formula1: i = "" } = e, s = this.injector.get(w), n = (m = t ? s.getUniverSheetInstance(t) : void 0) != null ? m : s.getCurrentUnitForType(N.UNIVER_SHEET);
1070
+ var g, p, _, v;
1071
+ const { formula1: i = "" } = e, s = this.injector.get(O), n = (g = t ? s.getUniverSheetInstance(t) : void 0) != null ? g : s.getCurrentUnitForType(N.UNIVER_SHEET);
1062
1072
  if (!n) return [];
1063
1073
  const l = (p = r ? n.getSheetBySheetId(r) : void 0) != null ? p : n.getActiveSheet();
1064
1074
  if (!l) return [];
1065
1075
  const u = n.getUnitId(), d = l.getSheetId(), c = this.formulaService.getRuleFormulaResultSync(u, d, e.uid);
1066
- return S(i) ? He((R = (_ = c == null ? void 0 : c[0]) == null ? void 0 : _.result) == null ? void 0 : R[0][0]) : fe(i);
1076
+ return S(i) ? Pe((v = (_ = c == null ? void 0 : c[0]) == null ? void 0 : _.result) == null ? void 0 : v[0][0]) : fe(i);
1067
1077
  }
1068
1078
  async getListAsync(e, t, r) {
1069
- var m, p, _, R;
1070
- const { formula1: i = "" } = e, s = this.injector.get(w), n = (m = t ? s.getUniverSheetInstance(t) : void 0) != null ? m : s.getCurrentUnitForType(N.UNIVER_SHEET);
1079
+ var g, p, _, v;
1080
+ const { formula1: i = "" } = e, s = this.injector.get(O), n = (g = t ? s.getUniverSheetInstance(t) : void 0) != null ? g : s.getCurrentUnitForType(N.UNIVER_SHEET);
1071
1081
  if (!n) return [];
1072
1082
  const l = (p = r ? n.getSheetBySheetId(r) : void 0) != null ? p : n.getActiveSheet();
1073
1083
  if (!l) return [];
1074
1084
  const u = n.getUnitId(), d = l.getSheetId(), c = await this.formulaService.getRuleFormulaResult(u, d, e.uid);
1075
- return S(i) ? He((R = (_ = c == null ? void 0 : c[0]) == null ? void 0 : _.result) == null ? void 0 : R[0][0]) : fe(i);
1085
+ return S(i) ? Pe((v = (_ = c == null ? void 0 : c[0]) == null ? void 0 : _.result) == null ? void 0 : v[0][0]) : fe(i);
1076
1086
  }
1077
1087
  getListWithColor(e, t, r) {
1078
1088
  const i = this.getList(e, t, r), s = (e.formula2 || "").split(",");
@@ -1088,10 +1098,11 @@ class mt extends G {
1088
1098
  class ca extends G {
1089
1099
  constructor() {
1090
1100
  super(...arguments);
1091
- g(this, "id", T.TEXT_LENGTH);
1092
- g(this, "title", "dataValidation.textLength.title");
1093
- g(this, "_lexerTreeBuilder", this.injector.get(Y));
1094
- g(this, "operators", [
1101
+ m(this, "id", T.TEXT_LENGTH);
1102
+ m(this, "title", "dataValidation.textLength.title");
1103
+ m(this, "_lexerTreeBuilder", this.injector.get(Y));
1104
+ m(this, "order", 30);
1105
+ m(this, "operators", [
1095
1106
  h.BETWEEN,
1096
1107
  h.EQUAL,
1097
1108
  h.GREATER_THAN,
@@ -1101,11 +1112,11 @@ class ca extends G {
1101
1112
  h.NOT_BETWEEN,
1102
1113
  h.NOT_EQUAL
1103
1114
  ]);
1104
- g(this, "scopes", ["sheet"]);
1105
- g(this, "_customFormulaService", this.injector.get(H));
1115
+ m(this, "scopes", ["sheet"]);
1116
+ m(this, "_customFormulaService", this.injector.get(H));
1106
1117
  }
1107
1118
  _isFormulaOrInt(e) {
1108
- return !V.isBlank(e) && (S(e) || !Number.isNaN(+e) && Number.isInteger(+e));
1119
+ return !M.isBlank(e) && (S(e) || !Number.isNaN(+e) && Number.isInteger(+e));
1109
1120
  }
1110
1121
  validatorFormula(e, t, r) {
1111
1122
  const i = e.operator;
@@ -1113,7 +1124,7 @@ class ca extends G {
1113
1124
  return {
1114
1125
  success: !1
1115
1126
  };
1116
- const s = V.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), n = V.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = Ae.includes(i), u = this.localeService.t("dataValidation.validFail.number");
1127
+ const s = M.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), n = M.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = De.includes(i), u = this.localeService.t("dataValidation.validFail.number");
1117
1128
  return l ? {
1118
1129
  success: s && n,
1119
1130
  formula1: s ? void 0 : u,
@@ -1147,29 +1158,29 @@ class ca extends G {
1147
1158
  generateRuleErrorMessage(e, t) {
1148
1159
  if (!e.operator)
1149
1160
  return this.titleStr;
1150
- const { transformedFormula1: r, transformedFormula2: i } = De(this._lexerTreeBuilder, e, t);
1151
- return `${this.localeService.t(At[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
1161
+ const { transformedFormula1: r, transformedFormula2: i } = be(this._lexerTreeBuilder, e, t);
1162
+ return `${this.localeService.t(Dt[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
1152
1163
  }
1153
1164
  }
1154
- function gt(o) {
1165
+ function _t(o) {
1155
1166
  var e, t;
1156
- return o ? o.p ? !((t = (e = o.p.body) == null ? void 0 : e.dataStream) != null ? t : "").slice(0, -2).trim() : V.isBlank(o.v) : !0;
1167
+ return o ? o.p ? !((t = (e = o.p.body) == null ? void 0 : e.dataStream) != null ? t : "").slice(0, -2).trim() : M.isBlank(o.v) : !0;
1157
1168
  }
1158
- function be(o, a, e, t, r = "command", i = !0) {
1159
- const s = t.get(Y), n = t.get(q), l = [], u = [], d = t.get(F), c = t.get(w), m = Ye(c, { unitId: o, subUnitId: a });
1160
- if (!m)
1169
+ function Le(o, a, e, t, r = "command", i = !0) {
1170
+ const s = t.get(Y), n = t.get(q), l = [], u = [], d = t.get(F), c = t.get(O), g = Xe(c, { unitId: o, subUnitId: a });
1171
+ if (!g)
1161
1172
  return {
1162
1173
  redoMutations: l,
1163
1174
  undoMutations: u
1164
1175
  };
1165
- const { worksheet: p } = m, _ = new Se();
1166
- let R = !1;
1167
- function M(f, O) {
1168
- i && f.forEach((P) => {
1169
- b.foreach(P, (B, $) => {
1170
- const U = p.getCellRaw(B, $), J = ct(U);
1171
- (gt(U) || J === O) && !(U != null && U.p) && (R = !0, _.setValue(B, $, {
1172
- v: O,
1176
+ const { worksheet: p } = g, _ = new Se();
1177
+ let v = !1;
1178
+ function V(f, w) {
1179
+ i && f.forEach((W) => {
1180
+ b.foreach(W, (x, $) => {
1181
+ const B = p.getCellRaw(x, $), J = mt(B);
1182
+ (_t(B) || J === w) && !(B != null && B.p) && (v = !0, _.setValue(x, $, {
1183
+ v: w,
1173
1184
  p: null
1174
1185
  }));
1175
1186
  });
@@ -1179,7 +1190,7 @@ function be(o, a, e, t, r = "command", i = !0) {
1179
1190
  switch (f.type) {
1180
1191
  case "delete":
1181
1192
  l.push({
1182
- id: A.id,
1193
+ id: I.id,
1183
1194
  params: {
1184
1195
  unitId: o,
1185
1196
  subUnitId: a,
@@ -1199,8 +1210,8 @@ function be(o, a, e, t, r = "command", i = !0) {
1199
1210
  break;
1200
1211
  case "update": {
1201
1212
  if (de(f.rule.type, n)) {
1202
- const P = f.oldRanges[0].startRow, B = f.oldRanges[0].startColumn, $ = f.newRanges[0].startRow, U = f.newRanges[0].startColumn, J = $ - P, ce = U - B, he = S(f.rule.formula1) ? s.moveFormulaRefOffset(f.rule.formula1, ce, J) : f.rule.formula1, me = S(f.rule.formula2) ? s.moveFormulaRefOffset(f.rule.formula2, ce, J) : f.rule.formula2;
1203
- he !== f.rule.formula1 || me !== f.rule.formula2 || !rt(f.newRanges, f.oldRanges) ? (l.push({
1213
+ const W = f.oldRanges[0].startRow, x = f.oldRanges[0].startColumn, $ = f.newRanges[0].startRow, B = f.newRanges[0].startColumn, J = $ - W, ce = B - x, he = S(f.rule.formula1) ? s.moveFormulaRefOffset(f.rule.formula1, ce, J) : f.rule.formula1, me = S(f.rule.formula2) ? s.moveFormulaRefOffset(f.rule.formula2, ce, J) : f.rule.formula2;
1214
+ he !== f.rule.formula1 || me !== f.rule.formula2 || !ot(f.newRanges, f.oldRanges) ? (l.push({
1204
1215
  id: E.id,
1205
1216
  params: {
1206
1217
  unitId: o,
@@ -1281,10 +1292,10 @@ function be(o, a, e, t, r = "command", i = !0) {
1281
1292
  source: r
1282
1293
  }
1283
1294
  });
1284
- const O = d.getRuleById(o, a, f.ruleId);
1285
- if (O && O.type === T.CHECKBOX) {
1286
- const B = d.getValidator(T.CHECKBOX).parseFormulaSync(O, o, a);
1287
- M(f.newRanges, B.formula2);
1295
+ const w = d.getRuleById(o, a, f.ruleId);
1296
+ if (w && w.type === T.CHECKBOX) {
1297
+ const x = d.getValidator(T.CHECKBOX).parseFormulaSync(w, o, a);
1298
+ V(f.newRanges, x.formula2);
1288
1299
  }
1289
1300
  break;
1290
1301
  }
@@ -1298,7 +1309,7 @@ function be(o, a, e, t, r = "command", i = !0) {
1298
1309
  source: r
1299
1310
  }
1300
1311
  }), u.unshift({
1301
- id: A.id,
1312
+ id: I.id,
1302
1313
  params: {
1303
1314
  unitId: o,
1304
1315
  subUnitId: a,
@@ -1306,13 +1317,13 @@ function be(o, a, e, t, r = "command", i = !0) {
1306
1317
  source: r
1307
1318
  }
1308
1319
  }), f.rule.type === T.CHECKBOX) {
1309
- const P = d.getValidator(T.CHECKBOX).parseFormulaSync(f.rule, o, a);
1310
- M(f.rule.ranges, P.originFormula2);
1320
+ const W = d.getValidator(T.CHECKBOX).parseFormulaSync(f.rule, o, a);
1321
+ V(f.rule.ranges, W.originFormula2);
1311
1322
  }
1312
1323
  break;
1313
1324
  }
1314
1325
  }
1315
- }), R) {
1326
+ }), v) {
1316
1327
  const f = {
1317
1328
  id: se.id,
1318
1329
  params: {
@@ -1320,11 +1331,11 @@ function be(o, a, e, t, r = "command", i = !0) {
1320
1331
  subUnitId: a,
1321
1332
  cellValue: _.getData()
1322
1333
  }
1323
- }, O = {
1334
+ }, w = {
1324
1335
  id: se.id,
1325
- params: ot(t, f.params)
1336
+ params: nt(t, f.params)
1326
1337
  };
1327
- l.push(f), u.push(O);
1338
+ l.push(f), u.push(w);
1328
1339
  }
1329
1340
  return {
1330
1341
  redoMutations: l,
@@ -1337,17 +1348,17 @@ const ha = {
1337
1348
  handler(o, a) {
1338
1349
  if (!a)
1339
1350
  return !1;
1340
- const { unitId: e, subUnitId: t, ranges: r, ruleId: i } = a, s = o.get(F), n = o.get(x), l = o.get(Z);
1351
+ const { unitId: e, subUnitId: t, ranges: r, ruleId: i } = a, s = o.get(F), n = o.get(U), l = o.get(Z);
1341
1352
  if (!s.getRuleById(e, t, i))
1342
1353
  return !1;
1343
1354
  const d = s.getRuleObjectMatrix(e, t).clone();
1344
1355
  d.updateRange(i, r);
1345
- const c = d.diff(s.getRules(e, t)), { redoMutations: m, undoMutations: p } = be(e, t, c, o);
1356
+ const c = d.diff(s.getRules(e, t)), { redoMutations: g, undoMutations: p } = Le(e, t, c, o);
1346
1357
  return l.pushUndoRedo({
1347
1358
  undoMutations: p,
1348
- redoMutations: m,
1359
+ redoMutations: g,
1349
1360
  unitID: e
1350
- }), Ie(m, n), !0;
1361
+ }), Ie(g, n), !0;
1351
1362
  }
1352
1363
  }, ma = {
1353
1364
  type: z.COMMAND,
@@ -1355,7 +1366,7 @@ const ha = {
1355
1366
  handler(o, a) {
1356
1367
  if (!a)
1357
1368
  return !1;
1358
- const { unitId: e, subUnitId: t, rule: r } = a, i = o.get(F), s = o.get(x), n = o.get(Z), l = i.getRuleObjectMatrix(e, t).clone();
1369
+ const { unitId: e, subUnitId: t, rule: r } = a, i = o.get(F), s = o.get(U), n = o.get(Z), l = i.getRuleObjectMatrix(e, t).clone();
1359
1370
  l.addRule(r);
1360
1371
  const u = l.diff(i.getRules(e, t)), d = i.getValidator(r.type), c = {
1361
1372
  unitId: e,
@@ -1364,12 +1375,12 @@ const ha = {
1364
1375
  ...r,
1365
1376
  ...d == null ? void 0 : d.normalizeFormula(r, e, t)
1366
1377
  }
1367
- }, { redoMutations: m, undoMutations: p } = be(e, t, u, o);
1368
- return m.push({
1378
+ }, { redoMutations: g, undoMutations: p } = Le(e, t, u, o);
1379
+ return g.push({
1369
1380
  id: L.id,
1370
1381
  params: c
1371
1382
  }), p.unshift({
1372
- id: A.id,
1383
+ id: I.id,
1373
1384
  params: {
1374
1385
  unitId: e,
1375
1386
  subUnitId: t,
@@ -1377,9 +1388,9 @@ const ha = {
1377
1388
  }
1378
1389
  }), n.pushUndoRedo({
1379
1390
  unitID: e,
1380
- redoMutations: m,
1391
+ redoMutations: g,
1381
1392
  undoMutations: p
1382
- }), Ie(m, s), !0;
1393
+ }), Ie(g, s), !0;
1383
1394
  }
1384
1395
  }, ga = {
1385
1396
  type: z.COMMAND,
@@ -1388,14 +1399,14 @@ const ha = {
1388
1399
  handler(o, a) {
1389
1400
  if (!a)
1390
1401
  return !1;
1391
- const e = o.get(x), t = o.get(Z), r = o.get(F), i = o.get(q), { unitId: s, subUnitId: n, ruleId: l, setting: u } = a, d = i.getValidatorItem(u.type);
1402
+ const e = o.get(U), t = o.get(Z), r = o.get(F), i = o.get(q), { unitId: s, subUnitId: n, ruleId: l, setting: u } = a, d = i.getValidatorItem(u.type);
1392
1403
  if (!d)
1393
1404
  return !1;
1394
1405
  const c = r.getRuleById(s, n, l);
1395
1406
  if (!c)
1396
1407
  return !1;
1397
- const m = { ...c, ...u };
1398
- if (!d.validatorFormula(m, s, n).success)
1408
+ const g = { ...c, ...u };
1409
+ if (!d.validatorFormula(g, s, n).success)
1399
1410
  return !1;
1400
1411
  const p = {
1401
1412
  unitId: s,
@@ -1405,41 +1416,41 @@ const ha = {
1405
1416
  type: y.SETTING,
1406
1417
  payload: {
1407
1418
  ...u,
1408
- ...d.normalizeFormula(m, s, n)
1419
+ ...d.normalizeFormula(g, s, n)
1409
1420
  }
1410
1421
  }
1411
1422
  }, _ = [{
1412
1423
  id: E.id,
1413
1424
  params: p
1414
- }], R = {
1425
+ }], v = {
1415
1426
  unitId: s,
1416
1427
  subUnitId: n,
1417
1428
  ruleId: l,
1418
1429
  payload: {
1419
1430
  type: y.SETTING,
1420
- payload: Dt(c)
1431
+ payload: bt(c)
1421
1432
  }
1422
- }, M = [{
1433
+ }, V = [{
1423
1434
  id: E.id,
1424
- params: R
1435
+ params: v
1425
1436
  }];
1426
1437
  if (u.type === T.CHECKBOX) {
1427
- const O = c.ranges, P = o.get(w), B = Ye(P, { unitId: s, subUnitId: n });
1428
- if (B) {
1429
- const $ = new Se(), { worksheet: U } = B, { formula2: J = Me, formula1: ce = Ve } = c, { formula2: he = Me, formula1: me = Ve } = u;
1430
- let Le = !1;
1431
- if (O.forEach((ge) => {
1438
+ const w = c.ranges, W = o.get(O), x = Xe(W, { unitId: s, subUnitId: n });
1439
+ if (x) {
1440
+ const $ = new Se(), { worksheet: B } = x, { formula2: J = Ve, formula1: ce = Me } = c, { formula2: he = Ve, formula1: me = Me } = u;
1441
+ let Ue = !1;
1442
+ if (w.forEach((ge) => {
1432
1443
  b.foreach(ge, (ae, xe) => {
1433
- const k = U.getCellRaw(ae, xe), Ke = ct(k);
1434
- (gt(k) || Ke === String(J)) && !(k != null && k.p) ? ($.setValue(ae, xe, {
1444
+ const k = B.getCellRaw(ae, xe), ze = mt(k);
1445
+ (_t(k) || ze === String(J)) && !(k != null && k.p) ? ($.setValue(ae, xe, {
1435
1446
  v: he,
1436
1447
  p: null
1437
- }), Le = !0) : Ke === String(ce) && !(k != null && k.p) && ($.setValue(ae, xe, {
1448
+ }), Ue = !0) : ze === String(ce) && !(k != null && k.p) && ($.setValue(ae, xe, {
1438
1449
  v: me,
1439
1450
  p: null
1440
- }), Le = !0);
1451
+ }), Ue = !0);
1441
1452
  });
1442
- }), Le) {
1453
+ }), Ue) {
1443
1454
  const ge = {
1444
1455
  id: se.id,
1445
1456
  params: {
@@ -1449,16 +1460,16 @@ const ha = {
1449
1460
  }
1450
1461
  }, ae = {
1451
1462
  id: se.id,
1452
- params: ot(o, ge.params)
1463
+ params: nt(o, ge.params)
1453
1464
  };
1454
- _.push(ge), M.push(ae);
1465
+ _.push(ge), V.push(ae);
1455
1466
  }
1456
1467
  }
1457
1468
  }
1458
1469
  return Ie(_, e).result ? (t.pushUndoRedo({
1459
1470
  unitID: s,
1460
1471
  redoMutations: _,
1461
- undoMutations: M
1472
+ undoMutations: V
1462
1473
  }), !0) : !1;
1463
1474
  }
1464
1475
  }, _a = {
@@ -1467,7 +1478,7 @@ const ha = {
1467
1478
  handler(o, a) {
1468
1479
  if (!a)
1469
1480
  return !1;
1470
- const e = o.get(x), t = o.get(Z), r = o.get(F), { unitId: i, subUnitId: s, ruleId: n, options: l } = a, u = r.getRuleById(i, s, n);
1481
+ const e = o.get(U), t = o.get(Z), r = o.get(F), { unitId: i, subUnitId: s, ruleId: n, options: l } = a, u = r.getRuleById(i, s, n);
1471
1482
  if (!u)
1472
1483
  return !1;
1473
1484
  const d = {
@@ -1481,17 +1492,17 @@ const ha = {
1481
1492
  }, c = [{
1482
1493
  id: E.id,
1483
1494
  params: d
1484
- }], m = {
1495
+ }], g = {
1485
1496
  unitId: i,
1486
1497
  subUnitId: s,
1487
1498
  ruleId: n,
1488
1499
  payload: {
1489
1500
  type: y.OPTIONS,
1490
- payload: bt(u)
1501
+ payload: Lt(u)
1491
1502
  }
1492
1503
  }, p = [{
1493
1504
  id: E.id,
1494
- params: m
1505
+ params: g
1495
1506
  }];
1496
1507
  return t.pushUndoRedo({
1497
1508
  unitID: i,
@@ -1505,16 +1516,16 @@ const ha = {
1505
1516
  handler(o, a) {
1506
1517
  if (!a)
1507
1518
  return !1;
1508
- const { unitId: e, subUnitId: t, ranges: r } = a, i = o.get(x), s = o.get(w), n = Ye(s, { unitId: e, subUnitId: t }), l = o.get(F);
1519
+ const { unitId: e, subUnitId: t, ranges: r } = a, i = o.get(U), s = o.get(O), n = Xe(s, { unitId: e, subUnitId: t }), l = o.get(F);
1509
1520
  if (!n) return !1;
1510
1521
  const u = o.get(Z), d = l.getRuleObjectMatrix(e, t).clone();
1511
1522
  d.removeRange(r);
1512
- const c = d.diff(l.getRules(e, t)), { redoMutations: m, undoMutations: p } = be(e, t, c, o);
1523
+ const c = d.diff(l.getRules(e, t)), { redoMutations: g, undoMutations: p } = Le(e, t, c, o);
1513
1524
  return u.pushUndoRedo({
1514
1525
  unitID: e,
1515
- redoMutations: m,
1526
+ redoMutations: g,
1516
1527
  undoMutations: p
1517
- }), Ie(m, i).result;
1528
+ }), Ie(g, i).result;
1518
1529
  }
1519
1530
  }, fa = {
1520
1531
  type: z.COMMAND,
@@ -1522,12 +1533,12 @@ const ha = {
1522
1533
  handler(o, a) {
1523
1534
  if (!a)
1524
1535
  return !1;
1525
- const { unitId: e, subUnitId: t } = a, r = o.get(x), i = o.get(F), s = o.get(Z), n = [...i.getRules(e, t)], l = {
1536
+ const { unitId: e, subUnitId: t } = a, r = o.get(U), i = o.get(F), s = o.get(Z), n = [...i.getRules(e, t)], l = {
1526
1537
  unitId: e,
1527
1538
  subUnitId: t,
1528
1539
  ruleId: n.map((c) => c.uid)
1529
1540
  }, u = [{
1530
- id: A.id,
1541
+ id: I.id,
1531
1542
  params: l
1532
1543
  }], d = [{
1533
1544
  id: L.id,
@@ -1541,9 +1552,9 @@ const ha = {
1541
1552
  redoMutations: u,
1542
1553
  undoMutations: d,
1543
1554
  unitID: e
1544
- }), r.executeCommand(A.id, l), !0;
1555
+ }), r.executeCommand(I.id, l), !0;
1545
1556
  }
1546
- }, Ra = (o, a) => {
1557
+ }, va = (o, a) => {
1547
1558
  const e = o.get(F), { unitId: t, subUnitId: r, ruleId: i, source: s } = a;
1548
1559
  if (Array.isArray(i)) {
1549
1560
  const l = i.map((u) => e.getRuleById(t, r, u)).filter(Boolean);
@@ -1568,14 +1579,14 @@ const ha = {
1568
1579
  index: e.getRuleIndex(t, r, i)
1569
1580
  }
1570
1581
  }];
1571
- }, va = {
1582
+ }, Ra = {
1572
1583
  type: z.COMMAND,
1573
1584
  id: "sheet.command.remove-data-validation-rule",
1574
1585
  handler(o, a) {
1575
1586
  if (!a)
1576
1587
  return !1;
1577
- const { unitId: e, subUnitId: t, ruleId: r } = a, i = o.get(x), s = o.get(Z), n = o.get(F), l = [{
1578
- id: A.id,
1588
+ const { unitId: e, subUnitId: t, ruleId: r } = a, i = o.get(U), s = o.get(Z), n = o.get(F), l = [{
1589
+ id: I.id,
1579
1590
  params: a
1580
1591
  }], u = [{
1581
1592
  id: L.id,
@@ -1592,19 +1603,19 @@ const ha = {
1592
1603
  undoMutations: u,
1593
1604
  redoMutations: l,
1594
1605
  unitID: a.unitId
1595
- }), i.executeCommand(A.id, a), !0;
1606
+ }), i.executeCommand(I.id, a), !0;
1596
1607
  }
1597
- }, Sa = "sheets-data-validation.config", tt = {};
1598
- var Va = Object.getOwnPropertyDescriptor, Ma = (o, a, e, t) => {
1599
- for (var r = t > 1 ? void 0 : t ? Va(a, e) : a, i = o.length - 1, s; i >= 0; i--)
1608
+ }, Sa = "sheets-data-validation.config", rt = {};
1609
+ var Ma = Object.getOwnPropertyDescriptor, Va = (o, a, e, t) => {
1610
+ for (var r = t > 1 ? void 0 : t ? Ma(a, e) : a, i = o.length - 1, s; i >= 0; i--)
1600
1611
  (s = o[i]) && (r = s(r) || r);
1601
1612
  return r;
1602
1613
  }, We = (o, a) => (e, t) => a(e, t, o);
1603
- let Ee = class extends W {
1614
+ let Te = class extends P {
1604
1615
  constructor(a, e, t) {
1605
1616
  super();
1606
- g(this, "_disposableMap", /* @__PURE__ */ new Map());
1607
- g(this, "registerRule", (a, e, t) => {
1617
+ m(this, "_disposableMap", /* @__PURE__ */ new Map());
1618
+ m(this, "registerRule", (a, e, t) => {
1608
1619
  de(t.type, this._validatorRegistryService) && this.register(a, e, t);
1609
1620
  });
1610
1621
  this._dataValidationModel = a, this._formulaRefRangeService = e, this._validatorRegistryService = t, this._initRefRange();
@@ -1627,7 +1638,7 @@ let Ee = class extends W {
1627
1638
  }
1628
1639
  }],
1629
1640
  redos: [{
1630
- id: A.id,
1641
+ id: I.id,
1631
1642
  params: {
1632
1643
  unitId: a,
1633
1644
  subUnitId: e,
@@ -1636,7 +1647,7 @@ let Ee = class extends W {
1636
1647
  }
1637
1648
  }]
1638
1649
  };
1639
- const d = [], c = [], m = u[0];
1650
+ const d = [], c = [], g = u[0];
1640
1651
  d.push({
1641
1652
  id: E.id,
1642
1653
  params: {
@@ -1646,9 +1657,9 @@ let Ee = class extends W {
1646
1657
  payload: {
1647
1658
  type: y.ALL,
1648
1659
  payload: {
1649
- ranges: m.ranges,
1650
- formula1: m.formulas[0],
1651
- formula2: m.formulas[1]
1660
+ ranges: g.ranges,
1661
+ formula1: g.formulas[0],
1662
+ formula2: g.formulas[1]
1652
1663
  }
1653
1664
  },
1654
1665
  source: "patched"
@@ -1671,7 +1682,7 @@ let Ee = class extends W {
1671
1682
  }
1672
1683
  });
1673
1684
  for (let p = 1; p < u.length; p++) {
1674
- const _ = u[p], R = Mt();
1685
+ const _ = u[p], v = yt();
1675
1686
  d.push({
1676
1687
  id: L.id,
1677
1688
  params: {
@@ -1679,7 +1690,7 @@ let Ee = class extends W {
1679
1690
  subUnitId: e,
1680
1691
  rule: {
1681
1692
  ...t,
1682
- uid: R,
1693
+ uid: v,
1683
1694
  formula1: _.formulas[0],
1684
1695
  formula2: _.formulas[1],
1685
1696
  ranges: _.ranges
@@ -1687,11 +1698,11 @@ let Ee = class extends W {
1687
1698
  source: "patched"
1688
1699
  }
1689
1700
  }), c.push({
1690
- id: A.id,
1701
+ id: I.id,
1691
1702
  params: {
1692
1703
  unitId: a,
1693
1704
  subUnitId: e,
1694
- ruleId: R,
1705
+ ruleId: v,
1695
1706
  source: "patched"
1696
1707
  }
1697
1708
  });
@@ -1730,24 +1741,24 @@ let Ee = class extends W {
1730
1741
  }
1731
1742
  }
1732
1743
  })
1733
- ), this.disposeWithMe(Qe(() => {
1744
+ ), this.disposeWithMe(qe(() => {
1734
1745
  this._disposableMap.forEach((e) => {
1735
1746
  e.dispose();
1736
1747
  }), this._disposableMap.clear();
1737
1748
  }));
1738
1749
  }
1739
1750
  };
1740
- Ee = Ma([
1741
- We(0, v(F)),
1742
- We(1, v(ut)),
1743
- We(2, v(q))
1744
- ], Ee);
1745
- var _t = /* @__PURE__ */ ((o) => (o[o.View = 0] = "View", o[o.Edit = 1] = "Edit", o[o.ManageCollaborator = 2] = "ManageCollaborator", o[o.Print = 3] = "Print", o[o.Duplicate = 4] = "Duplicate", o[o.Comment = 5] = "Comment", o[o.Copy = 6] = "Copy", o[o.Share = 7] = "Share", o[o.Export = 8] = "Export", o[o.MoveWorksheet = 9] = "MoveWorksheet", o[o.DeleteWorksheet = 10] = "DeleteWorksheet", o[o.HideWorksheet = 11] = "HideWorksheet", o[o.RenameWorksheet = 12] = "RenameWorksheet", o[o.CreateWorksheet = 13] = "CreateWorksheet", o[o.SetWorksheetStyle = 14] = "SetWorksheetStyle", o[o.EditWorksheetCell = 15] = "EditWorksheetCell", o[o.InsertHyperlink = 16] = "InsertHyperlink", o[o.Sort = 17] = "Sort", o[o.Filter = 18] = "Filter", o[o.PivotTable = 19] = "PivotTable", o[o.FloatImg = 20] = "FloatImg", o[o.History = 21] = "History", o[o.RwHgtClWdt = 22] = "RwHgtClWdt", o[o.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", o[o.ViewFilter = 24] = "ViewFilter", o[o.MoveSheet = 25] = "MoveSheet", o[o.DeleteSheet = 26] = "DeleteSheet", o[o.HideSheet = 27] = "HideSheet", o[o.CopySheet = 28] = "CopySheet", o[o.RenameSheet = 29] = "RenameSheet", o[o.CreateSheet = 30] = "CreateSheet", o[o.SelectProtectedCells = 31] = "SelectProtectedCells", o[o.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", o[o.SetCellStyle = 33] = "SetCellStyle", o[o.SetCellValue = 34] = "SetCellValue", o[o.SetRowStyle = 35] = "SetRowStyle", o[o.SetColumnStyle = 36] = "SetColumnStyle", o[o.InsertRow = 37] = "InsertRow", o[o.InsertColumn = 38] = "InsertColumn", o[o.DeleteRow = 39] = "DeleteRow", o[o.DeleteColumn = 40] = "DeleteColumn", o[o.EditExtraObject = 41] = "EditExtraObject", o[o.Delete = 42] = "Delete", o[o.RecoverHistory = 43] = "RecoverHistory", o[o.ViewHistory = 44] = "ViewHistory", o[o.CreatePermissionObject = 45] = "CreatePermissionObject", o[o.UNRECOGNIZED = -1] = "UNRECOGNIZED", o))(_t || {}), ya = Object.getOwnPropertyDescriptor, Ea = (o, a, e, t) => {
1751
+ Te = Va([
1752
+ We(0, R(F)),
1753
+ We(1, R(ct)),
1754
+ We(2, R(q))
1755
+ ], Te);
1756
+ var pt = /* @__PURE__ */ ((o) => (o[o.View = 0] = "View", o[o.Edit = 1] = "Edit", o[o.ManageCollaborator = 2] = "ManageCollaborator", o[o.Print = 3] = "Print", o[o.Duplicate = 4] = "Duplicate", o[o.Comment = 5] = "Comment", o[o.Copy = 6] = "Copy", o[o.Share = 7] = "Share", o[o.Export = 8] = "Export", o[o.MoveWorksheet = 9] = "MoveWorksheet", o[o.DeleteWorksheet = 10] = "DeleteWorksheet", o[o.HideWorksheet = 11] = "HideWorksheet", o[o.RenameWorksheet = 12] = "RenameWorksheet", o[o.CreateWorksheet = 13] = "CreateWorksheet", o[o.SetWorksheetStyle = 14] = "SetWorksheetStyle", o[o.EditWorksheetCell = 15] = "EditWorksheetCell", o[o.InsertHyperlink = 16] = "InsertHyperlink", o[o.Sort = 17] = "Sort", o[o.Filter = 18] = "Filter", o[o.PivotTable = 19] = "PivotTable", o[o.FloatImg = 20] = "FloatImg", o[o.History = 21] = "History", o[o.RwHgtClWdt = 22] = "RwHgtClWdt", o[o.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", o[o.ViewFilter = 24] = "ViewFilter", o[o.MoveSheet = 25] = "MoveSheet", o[o.DeleteSheet = 26] = "DeleteSheet", o[o.HideSheet = 27] = "HideSheet", o[o.CopySheet = 28] = "CopySheet", o[o.RenameSheet = 29] = "RenameSheet", o[o.CreateSheet = 30] = "CreateSheet", o[o.SelectProtectedCells = 31] = "SelectProtectedCells", o[o.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", o[o.SetCellStyle = 33] = "SetCellStyle", o[o.SetCellValue = 34] = "SetCellValue", o[o.SetRowStyle = 35] = "SetRowStyle", o[o.SetColumnStyle = 36] = "SetColumnStyle", o[o.InsertRow = 37] = "InsertRow", o[o.InsertColumn = 38] = "InsertColumn", o[o.DeleteRow = 39] = "DeleteRow", o[o.DeleteColumn = 40] = "DeleteColumn", o[o.EditExtraObject = 41] = "EditExtraObject", o[o.Delete = 42] = "Delete", o[o.RecoverHistory = 43] = "RecoverHistory", o[o.ViewHistory = 44] = "ViewHistory", o[o.CreatePermissionObject = 45] = "CreatePermissionObject", o[o.UNRECOGNIZED = -1] = "UNRECOGNIZED", o))(pt || {}), ya = Object.getOwnPropertyDescriptor, Ea = (o, a, e, t) => {
1746
1757
  for (var r = t > 1 ? void 0 : t ? ya(a, e) : a, i = o.length - 1, s; i >= 0; i--)
1747
1758
  (s = o[i]) && (r = s(r) || r);
1748
1759
  return r;
1749
- }, Pe = (o, a) => (e, t) => a(e, t, o);
1750
- let Te = class extends W {
1760
+ }, $e = (o, a) => (e, t) => a(e, t, o);
1761
+ let Fe = class extends P {
1751
1762
  constructor(o, a, e) {
1752
1763
  super(), this._univerInstanceService = o, this._permissionService = a, this._lexerTreeBuilder = e;
1753
1764
  }
@@ -1760,43 +1771,43 @@ let Te = class extends W {
1760
1771
  const i = a[r];
1761
1772
  if (typeof i == "string")
1762
1773
  continue;
1763
- const { token: s } = i, n = Qt(s), l = this._univerInstanceService.getCurrentUnitForType(N.UNIVER_SHEET);
1774
+ const { token: s } = i, n = qt(s), l = this._univerInstanceService.getCurrentUnitForType(N.UNIVER_SHEET);
1764
1775
  let u = l.getActiveSheet();
1765
1776
  const d = l.getUnitId();
1766
1777
  if (n.sheetName) {
1767
1778
  if (u = l.getSheetBySheetName(n.sheetName), !u)
1768
1779
  return !1;
1769
- const R = u == null ? void 0 : u.getSheetId();
1770
- if (!this._permissionService.getPermissionPoint(new xt(d, R).id)) return !1;
1780
+ const v = u == null ? void 0 : u.getSheetId();
1781
+ if (!this._permissionService.getPermissionPoint(new xt(d, v).id)) return !1;
1771
1782
  }
1772
1783
  if (!u)
1773
1784
  return !1;
1774
- const { startRow: c, endRow: m, startColumn: p, endColumn: _ } = n.range;
1775
- for (let R = c; R <= m; R++)
1776
- for (let M = p; M <= _; M++) {
1777
- const f = (t = (e = u.getCell(R, M)) == null ? void 0 : e.selectionProtection) == null ? void 0 : t[0];
1778
- if ((f == null ? void 0 : f[_t.View]) === !1)
1785
+ const { startRow: c, endRow: g, startColumn: p, endColumn: _ } = n.range;
1786
+ for (let v = c; v <= g; v++)
1787
+ for (let V = p; V <= _; V++) {
1788
+ const f = (t = (e = u.getCell(v, V)) == null ? void 0 : e.selectionProtection) == null ? void 0 : t[0];
1789
+ if ((f == null ? void 0 : f[pt.View]) === !1)
1779
1790
  return !1;
1780
1791
  }
1781
1792
  }
1782
1793
  return !0;
1783
1794
  }
1784
1795
  };
1785
- Te = Ea([
1786
- Pe(0, w),
1787
- Pe(1, yt),
1788
- Pe(2, v(Y))
1789
- ], Te);
1796
+ Fe = Ea([
1797
+ $e(0, O),
1798
+ $e(1, Et),
1799
+ $e(2, R(Y))
1800
+ ], Fe);
1790
1801
  var Ta = Object.getOwnPropertyDescriptor, Fa = (o, a, e, t) => {
1791
1802
  for (var r = t > 1 ? void 0 : t ? Ta(a, e) : a, i = o.length - 1, s; i >= 0; i--)
1792
1803
  (s = o[i]) && (r = s(r) || r);
1793
1804
  return r;
1794
1805
  }, ee = (o, a) => (e, t) => a(e, t, o);
1795
- let Fe = class extends W {
1806
+ let Ne = class extends P {
1796
1807
  constructor(a, e, t, r, i, s) {
1797
1808
  super();
1798
- g(this, "_disposableMap", /* @__PURE__ */ new Map());
1799
- g(this, "registerRule", (a, e, t) => {
1809
+ m(this, "_disposableMap", /* @__PURE__ */ new Map());
1810
+ m(this, "registerRule", (a, e, t) => {
1800
1811
  de(t.type, this._validatorRegistryService) || (this.register(a, e, t), this.registerFormula(a, e, t));
1801
1812
  });
1802
1813
  this._dataValidationModel = a, this._injector = e, this._refRangeService = t, this._dataValidationFormulaService = r, this._formulaRefRangeService = i, this._validatorRegistryService = s, this._initRefRange();
@@ -1808,10 +1819,10 @@ let Fe = class extends W {
1808
1819
  registerFormula(a, e, t) {
1809
1820
  var u;
1810
1821
  const r = t.uid, i = this._getIdWithUnitId(a, e, r), s = (u = this._disposableMap.get(i)) != null ? u : /* @__PURE__ */ new Set(), n = (d, c) => {
1811
- const m = this._dataValidationModel.getRuleById(a, e, r);
1812
- if (!m)
1822
+ const g = this._dataValidationModel.getRuleById(a, e, r);
1823
+ if (!g)
1813
1824
  return { redos: [], undos: [] };
1814
- const p = m[d];
1825
+ const p = g[d];
1815
1826
  if (!p || p === c)
1816
1827
  return { redos: [], undos: [] };
1817
1828
  const _ = {
@@ -1821,27 +1832,27 @@ let Fe = class extends W {
1821
1832
  payload: {
1822
1833
  type: y.SETTING,
1823
1834
  payload: {
1824
- type: m.type,
1825
- formula1: m.formula1,
1826
- formula2: m.formula2,
1835
+ type: g.type,
1836
+ formula1: g.formula1,
1837
+ formula2: g.formula2,
1827
1838
  [d]: c
1828
1839
  }
1829
1840
  },
1830
1841
  source: "patched"
1831
- }, R = {
1842
+ }, v = {
1832
1843
  unitId: a,
1833
1844
  subUnitId: e,
1834
1845
  ruleId: t.uid,
1835
1846
  payload: {
1836
1847
  type: y.SETTING,
1837
1848
  payload: {
1838
- type: m.type,
1839
- formula1: m.formula1,
1840
- formula2: m.formula2
1849
+ type: g.type,
1850
+ formula1: g.formula1,
1851
+ formula2: g.formula2
1841
1852
  }
1842
1853
  },
1843
1854
  source: "patched"
1844
- }, M = [
1855
+ }, V = [
1845
1856
  {
1846
1857
  id: E.id,
1847
1858
  params: _
@@ -1849,50 +1860,50 @@ let Fe = class extends W {
1849
1860
  ], f = [
1850
1861
  {
1851
1862
  id: E.id,
1852
- params: R
1863
+ params: v
1853
1864
  }
1854
1865
  ];
1855
- return { redos: M, undos: f };
1866
+ return { redos: V, undos: f };
1856
1867
  }, l = this._dataValidationFormulaService.getRuleFormulaInfo(a, e, r);
1857
1868
  if (l) {
1858
1869
  const [d, c] = l;
1859
1870
  if (d) {
1860
- const m = this._formulaRefRangeService.registerFormula(
1871
+ const g = this._formulaRefRangeService.registerFormula(
1861
1872
  a,
1862
1873
  e,
1863
1874
  d.text,
1864
1875
  (p) => n("formula1", p)
1865
1876
  );
1866
- s.add(() => m.dispose());
1877
+ s.add(() => g.dispose());
1867
1878
  }
1868
1879
  if (c) {
1869
- const m = this._formulaRefRangeService.registerFormula(
1880
+ const g = this._formulaRefRangeService.registerFormula(
1870
1881
  a,
1871
1882
  e,
1872
1883
  c.text,
1873
1884
  (p) => n("formula2", p)
1874
1885
  );
1875
- s.add(() => m.dispose());
1886
+ s.add(() => g.dispose());
1876
1887
  }
1877
1888
  }
1878
1889
  }
1879
1890
  register(a, e, t) {
1880
1891
  var l;
1881
1892
  const r = (u) => {
1882
- const d = [...t.ranges], m = d.map((_) => Ut(_, u)).filter((_) => !!_).flat();
1883
- if (rt(m, d))
1893
+ const d = [...t.ranges], g = d.map((_) => Ht(_, u)).filter((_) => !!_).flat();
1894
+ if (ot(g, d))
1884
1895
  return { redos: [], undos: [] };
1885
- if (m.length) {
1896
+ if (g.length) {
1886
1897
  const _ = {
1887
1898
  unitId: a,
1888
1899
  subUnitId: e,
1889
1900
  ruleId: t.uid,
1890
1901
  payload: {
1891
1902
  type: y.RANGE,
1892
- payload: m
1903
+ payload: g
1893
1904
  },
1894
1905
  source: "patched"
1895
- }, R = [{ id: E.id, params: _ }], M = [{
1906
+ }, v = [{ id: E.id, params: _ }], V = [{
1896
1907
  id: E.id,
1897
1908
  params: {
1898
1909
  unitId: a,
@@ -1905,10 +1916,10 @@ let Fe = class extends W {
1905
1916
  source: "patched"
1906
1917
  }
1907
1918
  }];
1908
- return { redos: R, undos: M };
1919
+ return { redos: v, undos: V };
1909
1920
  } else {
1910
- const _ = { unitId: a, subUnitId: e, ruleId: t.uid }, R = [{ id: A.id, params: _ }], M = Ra(this._injector, _);
1911
- return { redos: R, undos: M };
1921
+ const _ = { unitId: a, subUnitId: e, ruleId: t.uid }, v = [{ id: I.id, params: _ }], V = va(this._injector, _);
1922
+ return { redos: v, undos: V };
1912
1923
  }
1913
1924
  }, i = [];
1914
1925
  t.ranges.forEach((u) => {
@@ -1945,27 +1956,27 @@ let Fe = class extends W {
1945
1956
  }
1946
1957
  }
1947
1958
  })
1948
- ), this.disposeWithMe(Qe(() => {
1959
+ ), this.disposeWithMe(qe(() => {
1949
1960
  this._disposableMap.forEach((e) => {
1950
1961
  e.forEach((t) => t());
1951
1962
  }), this._disposableMap.clear();
1952
1963
  }));
1953
1964
  }
1954
1965
  };
1955
- Fe = Fa([
1956
- ee(0, v(F)),
1957
- ee(1, v(qe)),
1958
- ee(2, v(Bt)),
1959
- ee(3, v(K)),
1960
- ee(4, v(ut)),
1961
- ee(5, v(q))
1962
- ], Fe);
1966
+ Ne = Fa([
1967
+ ee(0, R(F)),
1968
+ ee(1, R(Ge)),
1969
+ ee(2, R(Bt)),
1970
+ ee(3, R(K)),
1971
+ ee(4, R(ct)),
1972
+ ee(5, R(q))
1973
+ ], Ne);
1963
1974
  var Na = Object.getOwnPropertyDescriptor, Ca = (o, a, e, t) => {
1964
1975
  for (var r = t > 1 ? void 0 : t ? Na(a, e) : a, i = o.length - 1, s; i >= 0; i--)
1965
1976
  (s = o[i]) && (r = s(r) || r);
1966
1977
  return r;
1967
- }, $e = (o, a) => (e, t) => a(e, t, o);
1968
- let Ne = class extends W {
1978
+ }, ke = (o, a) => (e, t) => a(e, t, o);
1979
+ let Ce = class extends P {
1969
1980
  constructor(o, a, e) {
1970
1981
  super(), this._sheetInterceptorService = o, this._univerInstanceService = a, this._sheetDataValidationModel = e, this._initSheetChange();
1971
1982
  }
@@ -1974,7 +1985,7 @@ let Ne = class extends W {
1974
1985
  this._sheetInterceptorService.interceptCommand({
1975
1986
  getMutations: (o) => {
1976
1987
  var a;
1977
- if (o.id === Ht.id) {
1988
+ if (o.id === Pt.id) {
1978
1989
  const e = o.params, t = e.unitId || this._univerInstanceService.getCurrentUnitForType(N.UNIVER_SHEET).getUnitId(), r = this._univerInstanceService.getUniverSheetInstance(t);
1979
1990
  if (!r)
1980
1991
  return { redos: [], undos: [] };
@@ -1997,7 +2008,7 @@ let Ne = class extends W {
1997
2008
  };
1998
2009
  return {
1999
2010
  redos: [{
2000
- id: A.id,
2011
+ id: I.id,
2001
2012
  params: l
2002
2013
  }],
2003
2014
  undos: [{
@@ -2012,19 +2023,20 @@ let Ne = class extends W {
2012
2023
  );
2013
2024
  }
2014
2025
  };
2015
- Ne = Ca([
2016
- $e(0, v(st)),
2017
- $e(1, v(w)),
2018
- $e(2, v(F))
2019
- ], Ne);
2020
- class wa extends G {
2026
+ Ce = Ca([
2027
+ ke(0, R(lt)),
2028
+ ke(1, R(O)),
2029
+ ke(2, R(F))
2030
+ ], Ce);
2031
+ class Oa extends G {
2021
2032
  constructor() {
2022
2033
  super(...arguments);
2023
- g(this, "id", T.ANY);
2024
- g(this, "title", "dataValidation.any.title");
2025
- g(this, "operators", []);
2026
- g(this, "scopes", ["sheet"]);
2027
- g(this, "offsetFormulaByRange", !1);
2034
+ m(this, "id", T.ANY);
2035
+ m(this, "title", "dataValidation.any.title");
2036
+ m(this, "operators", []);
2037
+ m(this, "scopes", ["sheet"]);
2038
+ m(this, "order", 0);
2039
+ m(this, "offsetFormulaByRange", !1);
2028
2040
  }
2029
2041
  async parseFormula(e, t, r) {
2030
2042
  return {
@@ -2045,19 +2057,20 @@ class wa extends G {
2045
2057
  return this.localeService.t("dataValidation.any.error");
2046
2058
  }
2047
2059
  }
2048
- class Oa extends G {
2060
+ class wa extends G {
2049
2061
  constructor() {
2050
2062
  super(...arguments);
2051
- g(this, "id", T.CUSTOM);
2052
- g(this, "title", "dataValidation.custom.title");
2053
- g(this, "operators", []);
2054
- g(this, "scopes", ["sheet"]);
2055
- g(this, "_customFormulaService", this.injector.get(H));
2056
- g(this, "_lexerTreeBuilder", this.injector.get(Y));
2063
+ m(this, "id", T.CUSTOM);
2064
+ m(this, "title", "dataValidation.custom.title");
2065
+ m(this, "operators", []);
2066
+ m(this, "scopes", ["sheet"]);
2067
+ m(this, "order", 60);
2068
+ m(this, "_customFormulaService", this.injector.get(H));
2069
+ m(this, "_lexerTreeBuilder", this.injector.get(Y));
2057
2070
  }
2058
2071
  validatorFormula(e, t, r) {
2059
2072
  var u;
2060
- const i = S(e.formula1), s = (u = e.formula1) != null ? u : "", l = this._lexerTreeBuilder.checkIfAddBracket(s) === 0 && s.startsWith(qt.EQUALS);
2073
+ const i = S(e.formula1), s = (u = e.formula1) != null ? u : "", l = this._lexerTreeBuilder.checkIfAddBracket(s) === 0 && s.startsWith(Gt.EQUALS);
2061
2074
  return {
2062
2075
  success: i && l,
2063
2076
  formula1: i && l ? "" : this.localeService.t("dataValidation.validFail.formula")
@@ -2072,7 +2085,7 @@ class Oa extends G {
2072
2085
  }
2073
2086
  async isValidType(e, t, r) {
2074
2087
  const { column: i, row: s, unitId: n, subUnitId: l } = e, u = await this._customFormulaService.getCellFormulaValue(n, l, r.uid, s, i), d = u == null ? void 0 : u.v;
2075
- return C(String(d)) && V.isDefine(d) && d !== "" ? u.t === Et.BOOLEAN ? !!d : typeof d == "boolean" ? d : typeof d == "number" ? !!d : typeof d == "string" ? C(d) : !!d : !1;
2088
+ return C(String(d)) && M.isDefine(d) && d !== "" ? u.t === Tt.BOOLEAN ? !!d : typeof d == "boolean" ? d : typeof d == "number" ? !!d : typeof d == "string" ? C(d) : !!d : !1;
2076
2089
  }
2077
2090
  generateRuleErrorMessage(e) {
2078
2091
  return this.localeService.t("dataValidation.custom.error");
@@ -2082,23 +2095,24 @@ class Oa extends G {
2082
2095
  return this.localeService.t("dataValidation.custom.ruleName").replace("{FORMULA1}", (t = e.formula1) != null ? t : "");
2083
2096
  }
2084
2097
  }
2085
- class Ia extends mt {
2098
+ class Aa extends gt {
2086
2099
  constructor() {
2087
2100
  super(...arguments);
2088
- g(this, "id", T.LIST_MULTIPLE);
2089
- g(this, "title", "dataValidation.listMultiple.title");
2090
- g(this, "offsetFormulaByRange", !1);
2091
- g(this, "skipDefaultFontRender", () => !0);
2101
+ m(this, "id", T.LIST_MULTIPLE);
2102
+ m(this, "title", "dataValidation.listMultiple.title");
2103
+ m(this, "offsetFormulaByRange", !1);
2104
+ m(this, "skipDefaultFontRender", () => !0);
2092
2105
  }
2093
2106
  }
2094
- class Aa extends G {
2107
+ class Ia extends G {
2095
2108
  constructor() {
2096
2109
  super(...arguments);
2097
- g(this, "_customFormulaService", this.injector.get(H));
2098
- g(this, "_lexerTreeBuilder", this.injector.get(Y));
2099
- g(this, "id", T.WHOLE);
2100
- g(this, "title", "dataValidation.whole.title");
2101
- g(this, "operators", [
2110
+ m(this, "_customFormulaService", this.injector.get(H));
2111
+ m(this, "_lexerTreeBuilder", this.injector.get(Y));
2112
+ m(this, "id", T.WHOLE);
2113
+ m(this, "title", "dataValidation.whole.title");
2114
+ m(this, "order", 10);
2115
+ m(this, "operators", [
2102
2116
  h.BETWEEN,
2103
2117
  h.EQUAL,
2104
2118
  h.GREATER_THAN,
@@ -2108,30 +2122,30 @@ class Aa extends G {
2108
2122
  h.NOT_BETWEEN,
2109
2123
  h.NOT_EQUAL
2110
2124
  ]);
2111
- g(this, "scopes", ["sheet"]);
2125
+ m(this, "scopes", ["sheet"]);
2112
2126
  }
2113
2127
  _isFormulaOrInt(e) {
2114
- return !V.isBlank(e) && (S(e) || !Number.isNaN(+e) && Number.isInteger(+e));
2128
+ return !M.isBlank(e) && (S(e) || !Number.isNaN(+e) && Number.isInteger(+e));
2115
2129
  }
2116
2130
  async isValidType(e, t, r) {
2117
- const { value: i } = e, s = ye(i);
2131
+ const { value: i } = e, s = Ee(i);
2118
2132
  return !Number.isNaN(s) && Number.isInteger(s);
2119
2133
  }
2120
2134
  transform(e, t, r) {
2121
2135
  const { value: i } = e;
2122
2136
  return {
2123
2137
  ...e,
2124
- value: ye(i)
2138
+ value: Ee(i)
2125
2139
  };
2126
2140
  }
2127
2141
  _parseNumber(e) {
2128
2142
  return e == null ? Number.NaN : +e;
2129
2143
  }
2130
2144
  async parseFormula(e, t, r, i, s) {
2131
- const n = await this._customFormulaService.getCellFormulaValue(t, r, e.uid, i, s), l = await this._customFormulaService.getCellFormula2Value(t, r, e.uid, i, s), { formula1: u, formula2: d } = e, c = S(u) ? n == null ? void 0 : n.v : u, m = S(d) ? l == null ? void 0 : l.v : d, p = C(`${c}`) && C(`${m}`);
2145
+ const n = await this._customFormulaService.getCellFormulaValue(t, r, e.uid, i, s), l = await this._customFormulaService.getCellFormula2Value(t, r, e.uid, i, s), { formula1: u, formula2: d } = e, c = S(u) ? n == null ? void 0 : n.v : u, g = S(d) ? l == null ? void 0 : l.v : d, p = C(`${c}`) && C(`${g}`);
2132
2146
  return {
2133
2147
  formula1: this._parseNumber(c),
2134
- formula2: this._parseNumber(m),
2148
+ formula2: this._parseNumber(g),
2135
2149
  isFormulaValid: p
2136
2150
  };
2137
2151
  }
@@ -2139,9 +2153,9 @@ class Aa extends G {
2139
2153
  const i = e.operator;
2140
2154
  if (!i)
2141
2155
  return {
2142
- success: !1
2156
+ success: !0
2143
2157
  };
2144
- const s = V.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), n = V.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = Ae.includes(i), u = this.localeService.t("dataValidation.validFail.number");
2158
+ const s = M.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), n = M.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = De.includes(i), u = this.localeService.t("dataValidation.validFail.number");
2145
2159
  return l ? {
2146
2160
  success: s && n,
2147
2161
  formula1: s ? void 0 : u,
@@ -2153,9 +2167,9 @@ class Aa extends G {
2153
2167
  }
2154
2168
  generateRuleErrorMessage(e, t) {
2155
2169
  if (!e.operator)
2156
- return this.titleStr;
2157
- const { transformedFormula1: r, transformedFormula2: i } = De(this._lexerTreeBuilder, e, t);
2158
- return `${this.localeService.t(ht[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
2170
+ return this.localeService.t(ye.NONE).replace("{TYPE}", this.titleStr);
2171
+ const { transformedFormula1: r, transformedFormula2: i } = be(this._lexerTreeBuilder, e, t);
2172
+ return `${this.localeService.t(ye[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
2159
2173
  }
2160
2174
  }
2161
2175
  var Da = Object.getOwnPropertyDescriptor, ba = (o, a, e, t) => {
@@ -2163,7 +2177,7 @@ var Da = Object.getOwnPropertyDescriptor, ba = (o, a, e, t) => {
2163
2177
  (s = o[i]) && (r = s(r) || r);
2164
2178
  return r;
2165
2179
  }, te = (o, a) => (e, t) => a(e, t, o);
2166
- let Ce = class extends Tt {
2180
+ let Oe = class extends Ft {
2167
2181
  constructor(o, a, e, t, r, i) {
2168
2182
  super(), this._univerInstanceService = o, this._dataValidatorRegistryService = a, this._injector = e, this._selectionManagerService = t, this._sheetInterceptorService = r, this._sheetDataValidationModel = i, this._init();
2169
2183
  }
@@ -2172,18 +2186,18 @@ let Ce = class extends Tt {
2172
2186
  }
2173
2187
  _registerValidators() {
2174
2188
  [
2175
- wa,
2189
+ Oa,
2176
2190
  na,
2177
- Aa,
2191
+ Ia,
2178
2192
  ca,
2179
2193
  sa,
2180
- aa,
2181
- mt,
2182
- Ia,
2183
- Oa
2194
+ ra,
2195
+ gt,
2196
+ Aa,
2197
+ wa
2184
2198
  ].forEach((o) => {
2185
2199
  const a = this._injector.createInstance(o);
2186
- this.disposeWithMe(this._dataValidatorRegistryService.register(a)), this.disposeWithMe(Qe(() => this._injector.delete(o)));
2200
+ this.disposeWithMe(this._dataValidatorRegistryService.register(a)), this.disposeWithMe(qe(() => this._injector.delete(o)));
2187
2201
  });
2188
2202
  }
2189
2203
  _initCommandInterceptor() {
@@ -2196,7 +2210,7 @@ let Ce = class extends Tt {
2196
2210
  throw new Error("No active sheet found");
2197
2211
  const i = r.getSheetId(), s = (a = this._selectionManagerService.getCurrentSelections()) == null ? void 0 : a.map((c) => c.range), n = this._sheetDataValidationModel.getRuleObjectMatrix(t, i).clone();
2198
2212
  s && n.removeRange(s);
2199
- const l = n.diff(this._sheetDataValidationModel.getRules(t, i)), { redoMutations: u, undoMutations: d } = be(t, i, l, this._injector, "patched");
2213
+ const l = n.diff(this._sheetDataValidationModel.getRules(t, i)), { redoMutations: u, undoMutations: d } = Le(t, i, l, this._injector, "patched");
2200
2214
  return {
2201
2215
  undos: d,
2202
2216
  redos: u
@@ -2210,20 +2224,20 @@ let Ce = class extends Tt {
2210
2224
  });
2211
2225
  }
2212
2226
  };
2213
- Ce = ba([
2214
- te(0, w),
2215
- te(1, v(q)),
2216
- te(2, v(qe)),
2217
- te(3, v(nt)),
2218
- te(4, v(st)),
2219
- te(5, v(F))
2220
- ], Ce);
2221
- var La = Object.getOwnPropertyDescriptor, xa = (o, a, e, t) => {
2227
+ Oe = ba([
2228
+ te(0, O),
2229
+ te(1, R(q)),
2230
+ te(2, R(Ge)),
2231
+ te(3, R(ut)),
2232
+ te(4, R(lt)),
2233
+ te(5, R(F))
2234
+ ], Oe);
2235
+ var La = Object.getOwnPropertyDescriptor, Ua = (o, a, e, t) => {
2222
2236
  for (var r = t > 1 ? void 0 : t ? La(a, e) : a, i = o.length - 1, s; i >= 0; i--)
2223
2237
  (s = o[i]) && (r = s(r) || r);
2224
2238
  return r;
2225
- }, Re = (o, a) => (e, t) => a(e, t, o);
2226
- let we = class extends W {
2239
+ }, ve = (o, a) => (e, t) => a(e, t, o);
2240
+ let we = class extends P {
2227
2241
  constructor(o, a, e, t) {
2228
2242
  super(), this._univerInstanceService = o, this._sheetDataValidationModel = a, this._dataValidationCacheService = e, this._lifecycleService = t, this._initRecalculate();
2229
2243
  }
@@ -2244,11 +2258,11 @@ let we = class extends W {
2244
2258
  });
2245
2259
  });
2246
2260
  };
2247
- this.disposeWithMe(this._dataValidationCacheService.dirtyRanges$.pipe(Pt(() => this._lifecycleService.lifecycle$.pipe(Ze((a) => a === ze.Rendered)))).subscribe(o)), this.disposeWithMe(this._dataValidationCacheService.dirtyRanges$.pipe(Ze(() => this._lifecycleService.stage >= ze.Rendered), Nt(20)).subscribe(o));
2261
+ this.disposeWithMe(this._dataValidationCacheService.dirtyRanges$.pipe($t(() => this._lifecycleService.lifecycle$.pipe(Je((a) => a === Ze.Rendered)))).subscribe(o)), this.disposeWithMe(this._dataValidationCacheService.dirtyRanges$.pipe(Je(() => this._lifecycleService.stage >= Ze.Rendered), Ct(20)).subscribe(o));
2248
2262
  }
2249
2263
  async _validatorByCell(o, a, e, t) {
2250
2264
  const r = o.getUnitId(), i = a.getSheetId();
2251
- if (!V.isDefine(e) || !V.isDefine(t))
2265
+ if (!M.isDefine(e) || !M.isDefine(t))
2252
2266
  throw new Error(`row or col is not defined, row: ${e}, col: ${t}`);
2253
2267
  const s = this._sheetDataValidationModel.getRuleByLocation(r, i, e, t);
2254
2268
  return s ? new Promise((n) => {
@@ -2316,23 +2330,23 @@ let we = class extends W {
2316
2330
  return this.getDataValidations(o, a, e)[0];
2317
2331
  }
2318
2332
  };
2319
- we = xa([
2320
- Re(0, w),
2321
- Re(1, v(F)),
2322
- Re(2, v(Q)),
2323
- Re(3, v(Ft))
2333
+ we = Ua([
2334
+ ve(0, O),
2335
+ ve(1, R(F)),
2336
+ ve(2, R(Q)),
2337
+ ve(3, R(Nt))
2324
2338
  ], we);
2325
- var Ba = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, Ha = (o, a, e) => a in o ? Ba(o, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[a] = e, Wa = (o, a, e, t) => {
2326
- for (var r = t > 1 ? void 0 : t ? Ua(a, e) : a, i = o.length - 1, s; i >= 0; i--)
2339
+ var xa = Object.defineProperty, Ba = Object.getOwnPropertyDescriptor, Ha = (o, a, e) => a in o ? xa(o, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[a] = e, Pa = (o, a, e, t) => {
2340
+ for (var r = t > 1 ? void 0 : t ? Ba(a, e) : a, i = o.length - 1, s; i >= 0; i--)
2327
2341
  (s = o[i]) && (r = s(r) || r);
2328
2342
  return r;
2329
- }, ke = (o, a) => (e, t) => a(e, t, o), pt = (o, a, e) => Ha(o, typeof a != "symbol" ? a + "" : a, e);
2330
- let Oe = class extends Ot {
2331
- constructor(o = tt, a, e, t) {
2343
+ }, je = (o, a) => (e, t) => a(e, t, o), ft = (o, a, e) => Ha(o, typeof a != "symbol" ? a + "" : a, e);
2344
+ let Ae = class extends At {
2345
+ constructor(o = rt, a, e, t) {
2332
2346
  super(), this._config = o, this._injector = a, this._commandService = e, this._configService = t;
2333
2347
  const { ...r } = It(
2334
2348
  {},
2335
- tt,
2349
+ rt,
2336
2350
  this._config
2337
2351
  );
2338
2352
  this._configService.setConfig(Sa, r);
@@ -2344,11 +2358,11 @@ let Oe = class extends Ot {
2344
2358
  [H],
2345
2359
  [we],
2346
2360
  [F],
2361
+ [Oe],
2362
+ [Fe],
2347
2363
  [Ce],
2348
- [Te],
2349
2364
  [Ne],
2350
- [Fe],
2351
- [Ee]
2365
+ [Te]
2352
2366
  ].forEach((o) => {
2353
2367
  this._injector.add(o);
2354
2368
  }), [
@@ -2356,67 +2370,74 @@ let Oe = class extends Ot {
2356
2370
  ha,
2357
2371
  ga,
2358
2372
  _a,
2359
- va,
2373
+ Ra,
2360
2374
  fa,
2361
2375
  pa
2362
2376
  ].forEach((o) => {
2363
2377
  this._commandService.registerCommand(o);
2364
- }), this._injector.get(Q), this._injector.get(we), this._injector.get(Ce), this._injector.get(Ee), this._injector.get(Fe);
2378
+ }), this._injector.get(Q), this._injector.get(we), this._injector.get(Oe), this._injector.get(Te), this._injector.get(Ne);
2365
2379
  }
2366
2380
  onReady() {
2367
- this._injector.get(Ne);
2381
+ this._injector.get(Ce);
2368
2382
  }
2369
2383
  onRendered() {
2370
- this._injector.get(Te);
2384
+ this._injector.get(Fe);
2371
2385
  }
2372
2386
  };
2373
- pt(Oe, "pluginName", Gt);
2374
- pt(Oe, "type", N.UNIVER_SHEET);
2375
- Oe = Wa([
2376
- Ct(Lt),
2377
- ke(1, v(qe)),
2378
- ke(2, x),
2379
- ke(3, wt)
2380
- ], Oe);
2387
+ ft(Ae, "pluginName", Yt);
2388
+ ft(Ae, "type", N.UNIVER_SHEET);
2389
+ Ae = Pa([
2390
+ Ot(Ut),
2391
+ je(1, R(Ge)),
2392
+ je(2, U),
2393
+ je(3, wt)
2394
+ ], Ae);
2381
2395
  function Ka(o) {
2382
- const e = o.get(nt).getCurrentSelections().map((i) => i.range);
2396
+ const e = o.get(ut).getCurrentSelections().map((i) => i.range);
2383
2397
  return {
2384
- uid: V.generateRandomId(6),
2398
+ uid: M.generateRandomId(6),
2385
2399
  type: T.DECIMAL,
2386
2400
  operator: h.EQUAL,
2387
2401
  formula1: "100",
2388
2402
  ranges: e != null ? e : [{ startColumn: 0, endColumn: 0, startRow: 0, endRow: 0 }]
2389
2403
  };
2390
2404
  }
2405
+ const za = "data-validation.custom-formula-input", Za = "data-validation.formula-input", Ja = "data-validation.list-formula-input", er = "data-validation.checkbox-formula-input";
2391
2406
  export {
2392
2407
  ma as AddSheetDataValidationCommand,
2393
- Ve as CHECKBOX_FORMULA_1,
2394
- Me as CHECKBOX_FORMULA_2,
2395
- aa as CheckboxValidator,
2408
+ Za as BASE_FORMULA_INPUT_NAME,
2409
+ Me as CHECKBOX_FORMULA_1,
2410
+ Ve as CHECKBOX_FORMULA_2,
2411
+ er as CHECKBOX_FORMULA_INPUT_NAME,
2412
+ za as CUSTOM_FORMULA_INPUT_NAME,
2413
+ ra as CheckboxValidator,
2396
2414
  pa as ClearRangeDataValidationCommand,
2397
- Gt as DATA_VALIDATION_PLUGIN_NAME,
2415
+ Yt as DATA_VALIDATION_PLUGIN_NAME,
2398
2416
  Q as DataValidationCacheService,
2399
2417
  H as DataValidationCustomFormulaService,
2400
- Te as DataValidationFormulaController,
2418
+ Fe as DataValidationFormulaController,
2401
2419
  K as DataValidationFormulaService,
2402
2420
  sa as DateValidator,
2403
- Ia as ListMultipleValidator,
2404
- mt as ListValidator,
2421
+ Ja as LIST_FORMULA_INPUT_NAME,
2422
+ Aa as ListMultipleValidator,
2423
+ gt as ListValidator,
2405
2424
  fa as RemoveSheetAllDataValidationCommand,
2406
- va as RemoveSheetDataValidationCommand,
2425
+ Ra as RemoveSheetDataValidationCommand,
2407
2426
  F as SheetDataValidationModel,
2408
2427
  we as SheetsDataValidationValidatorService,
2409
- Oe as UniverSheetsDataValidationPlugin,
2428
+ Ae as UniverSheetsDataValidationPlugin,
2410
2429
  _a as UpdateSheetDataValidationOptionsCommand,
2411
2430
  ha as UpdateSheetDataValidationRangeCommand,
2412
2431
  ga as UpdateSheetDataValidationSettingCommand,
2413
2432
  Ka as createDefaultNewRule,
2414
2433
  fe as deserializeListOptions,
2434
+ Ee as getCellValueNumber,
2415
2435
  ne as getCellValueOrigin,
2416
2436
  Xa as getDataValidationCellValue,
2417
- be as getDataValidationDiffMutations,
2437
+ Le as getDataValidationDiffMutations,
2418
2438
  _e as getFormulaCellData,
2419
2439
  oe as getFormulaResult,
2440
+ be as getTransformedFormula,
2420
2441
  C as isLegalFormulaResult,
2421
2442
  Ya as serializeListOptions,
2422
2443
  pe as transformCheckboxValue