@univerjs/sheets-data-validation 0.1.15 → 0.1.16

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,23 +1,23 @@
1
1
  var $r = Object.defineProperty;
2
2
  var Wr = (r, a, e) => a in r ? $r(r, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[a] = e;
3
- var v = (r, a, e) => (Wr(r, typeof a != "symbol" ? a + "" : a, e), e);
4
- import { Disposable as he, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Hr, DisposableCollection as Qa, IUniverInstanceService as ee, UniverInstanceType as ae, toDisposable as ma, CommandType as ye, ICommandService as re, IUndoRedoService as Ka, sequenceExecuteAsync as Za, LocaleService as ie, DataValidationErrorStyle as tt, UndoCommand as kr, RedoCommand as Yr, isUnitRangesEqual as Gr, createInternalEditorID as fa, isValidRange as Xr, debounce as qr, shallowEqual as Oa, DEFAULT_EMPTY_DOCUMENT_VALUE as Ja, OnLifecycle as ve, LifecycleStages as ge, IPermissionService as zr, isFormulaString as T, DataValidationType as q, Tools as U, ObjectMatrix as lt, Range as $, ThemeService as Qr, VerticalAlign as de, HorizontalAlign as Ae, DataValidationOperator as C, WrapStrategy as pe, DataValidationRenderMode as ce, DocumentDataModel as Kr, BooleanNumber as Je, Rectangle as xe, RxDisposable as er, DataValidationStatus as Re, sequenceExecute as Zr, isRangesEqual as Jr, queryObjectMatrix as Pt, IResourceManagerService as eo, DependentOn as to, Plugin as ao } from "@univerjs/core";
3
+ var g = (r, a, e) => Wr(r, typeof a != "symbol" ? a + "" : a, e);
4
+ import { Disposable as he, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Hr, DisposableCollection as Qa, IUniverInstanceService as te, UniverInstanceType as ae, toDisposable as ma, CommandType as ye, ICommandService as re, IUndoRedoService as Ka, sequenceExecuteAsync as Za, LocaleService as ie, DataValidationErrorStyle as at, UndoCommand as kr, RedoCommand as Yr, isUnitRangesEqual as Xr, createInternalEditorID as fa, isValidRange as Gr, debounce as qr, shallowEqual as Oa, DEFAULT_EMPTY_DOCUMENT_VALUE as Ja, OnLifecycle as ve, LifecycleStages as ge, IPermissionService as zr, isFormulaString as N, DataValidationType as X, Tools as B, ObjectMatrix as dt, Range as U, ThemeService as Qr, VerticalAlign as de, HorizontalAlign as Ae, DataValidationOperator as C, WrapStrategy as pe, DataValidationRenderMode as ce, DocumentDataModel as Kr, BooleanNumber as Je, Rectangle as xe, RxDisposable as er, DataValidationStatus as Re, sequenceExecute as Zr, isRangesEqual as Jr, queryObjectMatrix as At, IResourceManagerService as eo, DependentOn as to, Plugin as ao } from "@univerjs/core";
5
5
  import { ICommandService as Dl, LocaleService as El, Plugin as Ol } from "@univerjs/core";
6
- import { Inject as w, Injector as Ue } from "@wendellhu/redi";
7
- import { DataValidatorRegistryService as De, DataValidationModel as K, AddDataValidationMutation as Jt, RemoveDataValidationMutation as It, createDefaultNewRule as tr, UpdateDataValidationMutation as Ge, UpdateRuleType as Ie, DataValidatorRegistryScope as ro, TWO_FORMULA_OPERATOR_COUNT as oo, getRuleOptions as ba, getRuleSetting as Ta, UpdateDataValidationSettingCommand as Na, RemoveDataValidationCommand as ar, UpdateDataValidationOptionsCommand as no, BaseDataValidator as $e, TextLengthErrorTitleMap as io, RemoveAllDataValidationCommand as so, removeDataValidationUndoFactory as lo, DataValidationManager as co, AddDataValidationCommand as uo, UniverDataValidationPlugin as ho } from "@univerjs/data-validation";
6
+ import { Inject as I, Injector as Ue } from "@wendellhu/redi";
7
+ import { DataValidatorRegistryService as De, DataValidationModel as K, AddDataValidationMutation as Jt, RemoveDataValidationMutation as yt, createDefaultNewRule as tr, UpdateDataValidationMutation as Xe, UpdateRuleType as Ie, DataValidatorRegistryScope as ro, TWO_FORMULA_OPERATOR_COUNT as oo, getRuleOptions as ba, getRuleSetting as Ta, UpdateDataValidationSettingCommand as Fa, RemoveDataValidationCommand as ar, UpdateDataValidationOptionsCommand as no, BaseDataValidator as $e, TextLengthErrorTitleMap as io, RemoveAllDataValidationCommand as so, removeDataValidationUndoFactory as lo, DataValidationManager as co, AddDataValidationCommand as uo, UniverDataValidationPlugin as ho } from "@univerjs/data-validation";
8
8
  import { getSheetCommandTarget as rr, WorksheetViewPermission as mo, SetRangeValuesCommand as pa, WorkbookEditablePermission as ea, WorksheetSetCellStylePermission as ta, WorksheetEditPermission as aa, RangeProtectionPermissionEditPoint as ra, SelectionManagerService as fo, SheetInterceptorService as or, ClearSelectionAllCommand as po, INTERCEPTOR_POINT as vo, RefRangeService as go, handleCommonDefaultRangeChangeWithEffectRefCommands as _o, UniverSheetsPlugin as So } from "@univerjs/sheets";
9
- import { SheetCanvasPopManagerService as Ro, IMarkSelectionService as Co, getCurrentRangeDisable$ as Vo, IEditorBridgeService as va, AutoHeightController as Mo, SheetSkeletonManagerService as Fa, HoverManagerService as wo, CellAlertManagerService as Io, CellAlertType as yo, IAutoFillService as Do, APPLY_TYPE as At, virtualizeDiscreteRanges as oa, getAutoFillRepeatRange as Eo, COPY_TYPE as La, rangeToDiscreteRange as Oo, PREDEFINED_HOOK_NAME as xt, getRepeatRange as Pa, ISheetClipboardService as bo, SheetPermissionInterceptorBaseController as To, UniverSheetsUIPlugin as No } from "@univerjs/sheets-ui";
10
- import { useObservable as Ze, ComponentManager as dt, IZenZoneService as Fo, ISidebarService as nr, useEvent as ir, RangeSelector as Lo, TextEditor as sr, MenuItemType as ga, MenuPosition as Po, MenuGroup as Ao, getMenuHiddenObservable as xo, KeyCode as jo, IDialogService as Bo, IMenuService as Uo } from "@univerjs/ui";
11
- import { IRenderManagerService as lr, fixLineWidthByScale as Aa, Transform as $o, Checkbox as Wo, getDocsSkeletonPageSize as mt, Rect as dr, DocumentViewModel as Ho, DocumentSkeleton as ko, Documents as Yo, FontCache as Go, Shape as Xo, getFontStyleString as xa, DeviceInputEventType as qo } from "@univerjs/engine-render";
12
- import na, { forwardRef as Ee, useRef as _a, createElement as Oe, useState as z, useMemo as yt, useEffect as qe } from "react";
13
- import { useDependency as E } from "@wendellhu/redi/react-bindings";
9
+ import { SheetCanvasPopManagerService as Ro, IMarkSelectionService as Co, getCurrentRangeDisable$ as Vo, IEditorBridgeService as va, AutoHeightController as Mo, SheetSkeletonManagerService as Na, HoverManagerService as wo, CellAlertManagerService as Io, CellAlertType as yo, IAutoFillService as Do, APPLY_TYPE as et, virtualizeDiscreteRanges as oa, getAutoFillRepeatRange as Eo, COPY_TYPE as La, rangeToDiscreteRange as Oo, PREDEFINED_HOOK_NAME as xt, getRepeatRange as Pa, ISheetClipboardService as bo, SheetPermissionInterceptorBaseController as To, UniverSheetsUIPlugin as Fo } from "@univerjs/sheets-ui";
10
+ import { useObservable as Ze, ComponentManager as ct, IZenZoneService as No, ISidebarService as nr, useEvent as ir, RangeSelector as Lo, TextEditor as sr, MenuItemType as ga, MenuPosition as Po, MenuGroup as Ao, getMenuHiddenObservable as xo, KeyCode as jo, IDialogService as Bo, IMenuService as Uo } from "@univerjs/ui";
11
+ import { IRenderManagerService as lr, fixLineWidthByScale as Aa, Transform as $o, Checkbox as Wo, getDocsSkeletonPageSize as ft, Rect as dr, DocumentViewModel as Ho, DocumentSkeleton as ko, Documents as Yo, FontCache as Xo, Shape as Go, getFontStyleString as xa, DeviceInputEventType as qo } from "@univerjs/engine-render";
12
+ import na, { forwardRef as Ee, useRef as _a, createElement as Oe, useState as z, useMemo as Dt, useEffect as qe } from "react";
13
+ import { useDependency as T } from "@wendellhu/redi/react-bindings";
14
14
  import { FormLayout as Q, RadioGroup as Sa, Radio as Le, Checkbox as cr, Input as Pe, Select as ia, Button as ze, DraggableList as zo, RectPopup as Qo, Scrollbar as Ko, DatePanel as Zo } from "@univerjs/design";
15
15
  import { serializeRange as ur, LexerTreeBuilder as Ra, deserializeRangeWithSheet as hr, isFormulaTransformable as Jo, transformFormula as ja, isReferenceString as Ca, sequenceNodeType as en } from "@univerjs/engine-formula";
16
16
  import { Subject as mr, filter as tn, BehaviorSubject as Ba, distinctUntilChanged as an, debounceTime as rn } from "rxjs";
17
17
  import on from "clsx";
18
18
  import { RegisterOtherFormulaService as fr, FormulaRefRangeService as nn, SPECIAL_PASTE_FORMULA as sn } from "@univerjs/sheets-formula";
19
19
  import je from "dayjs";
20
- var pr = { exports: {} }, Lt = {};
20
+ var pr = { exports: {} }, Pt = {};
21
21
  /**
22
22
  * @license React
23
23
  * react-jsx-runtime.production.min.js
@@ -31,20 +31,17 @@ var ln = na, dn = Symbol.for("react.element"), cn = Symbol.for("react.fragment")
31
31
  function vr(r, a, e) {
32
32
  var t, o = {}, n = null, i = null;
33
33
  e !== void 0 && (n = "" + e), a.key !== void 0 && (n = "" + a.key), a.ref !== void 0 && (i = a.ref);
34
- for (t in a)
35
- un.call(a, t) && !mn.hasOwnProperty(t) && (o[t] = a[t]);
36
- if (r && r.defaultProps)
37
- for (t in a = r.defaultProps, a)
38
- o[t] === void 0 && (o[t] = a[t]);
34
+ for (t in a) un.call(a, t) && !mn.hasOwnProperty(t) && (o[t] = a[t]);
35
+ if (r && r.defaultProps) for (t in a = r.defaultProps, a) o[t] === void 0 && (o[t] = a[t]);
39
36
  return { $$typeof: dn, type: r, key: n, ref: i, props: o, _owner: hn.current };
40
37
  }
41
- Lt.Fragment = cn;
42
- Lt.jsx = vr;
43
- Lt.jsxs = vr;
44
- pr.exports = Lt;
38
+ Pt.Fragment = cn;
39
+ Pt.jsx = vr;
40
+ Pt.jsxs = vr;
41
+ pr.exports = Pt;
45
42
  var p = pr.exports;
46
43
  function fn() {
47
- const r = E(Be), a = Ze(r.activeDropdown$, r.activeDropdown), e = E(dt);
44
+ const r = T(Be), a = Ze(r.activeDropdown$, r.activeDropdown), e = T(ct);
48
45
  if (!a)
49
46
  return null;
50
47
  const { location: t, componentKey: o } = a, n = e.get(o), i = `${t.unitId}-${t.subUnitId}-${t.row}-${t.col}`;
@@ -71,11 +68,11 @@ var pn = Object.defineProperty, vn = Object.getOwnPropertyDescriptor, gn = (r, a
71
68
  let Be = class extends he {
72
69
  constructor(a, e, t, o, n, i) {
73
70
  super();
74
- v(this, "_activeDropdown");
75
- v(this, "_activeDropdown$", new mr());
76
- v(this, "_currentPopup", null);
77
- v(this, "activeDropdown$", this._activeDropdown$.asObservable());
78
- v(this, "_zenVisible", !1);
71
+ g(this, "_activeDropdown");
72
+ g(this, "_activeDropdown$", new mr());
73
+ g(this, "_currentPopup", null);
74
+ g(this, "activeDropdown$", this._activeDropdown$.asObservable());
75
+ g(this, "_zenVisible", !1);
79
76
  this._canvasPopupManagerService = a, this._univerInstanceService = e, this._dataValidatorRegistryService = t, this._zenZoneService = o, this._renderManagerService = n, this._dataValidationModel = i, this._init();
80
77
  }
81
78
  get activeDropdown() {
@@ -146,12 +143,12 @@ let Be = class extends he {
146
143
  }
147
144
  };
148
145
  Be = gn([
149
- We(0, w(Ro)),
150
- We(1, ee),
151
- We(2, w(De)),
152
- We(3, Fo),
146
+ We(0, I(Ro)),
147
+ We(1, te),
148
+ We(2, I(De)),
149
+ We(3, No),
153
150
  We(4, lr),
154
- We(5, w(K))
151
+ We(5, I(K))
155
152
  ], Be);
156
153
  var _n = Object.defineProperty, Sn = Object.getOwnPropertyDescriptor, Rn = (r, a, e, t) => {
157
154
  for (var o = t > 1 ? void 0 : t ? Sn(a, e) : a, n = r.length - 1, i; n >= 0; n--)
@@ -161,12 +158,12 @@ var _n = Object.defineProperty, Sn = Object.getOwnPropertyDescriptor, Rn = (r, a
161
158
  let Ve = class extends he {
162
159
  constructor(a, e) {
163
160
  super();
164
- v(this, "_open$", new Ba(!1));
165
- v(this, "open$", this._open$.pipe(an()));
166
- v(this, "_activeRule");
167
- v(this, "_activeRule$", new Ba(void 0));
168
- v(this, "activeRule$", this._activeRule$.asObservable());
169
- v(this, "_closeDisposable", null);
161
+ g(this, "_open$", new Ba(!1));
162
+ g(this, "open$", this._open$.pipe(an()));
163
+ g(this, "_activeRule");
164
+ g(this, "_activeRule$", new Ba(void 0));
165
+ g(this, "activeRule$", this._activeRule$.asObservable());
166
+ g(this, "_closeDisposable", null);
170
167
  this._univerInstanceService = a, this._sidebarService = e, this.disposeWithMe(
171
168
  this._univerInstanceService.getCurrentTypeOfUnit$(ae.UNIVER_SHEET).pipe(tn((t) => !t)).subscribe(() => {
172
169
  this.close();
@@ -200,31 +197,30 @@ let Ve = class extends he {
200
197
  }
201
198
  };
202
199
  Ve = Rn([
203
- Ua(0, ee),
200
+ Ua(0, te),
204
201
  Ua(1, nr)
205
202
  ], Ve);
206
- const _r = "DataValidationPanel", ct = {
203
+ const _r = "DataValidationPanel", ut = {
207
204
  id: "data-validation.operation.open-validation-panel",
208
205
  type: ye.OPERATION,
209
206
  handler(r, a) {
210
207
  if (!a)
211
208
  return !1;
212
- const { ruleId: e, isAdd: t } = a, o = r.get(Ve), n = r.get(K), i = r.get(ee), s = r.get(nr), l = rr(i);
213
- if (!l)
214
- return !1;
209
+ const { ruleId: e, isAdd: t } = a, o = r.get(Ve), n = r.get(K), i = r.get(te), s = r.get(nr), l = rr(i);
210
+ if (!l) return !1;
215
211
  const { unitId: d, subUnitId: c } = l, u = e ? n.getRuleById(d, c, e) : void 0;
216
212
  o.open(), o.setActiveRule(u && {
217
213
  unitId: d,
218
214
  subUnitId: c,
219
215
  rule: u
220
216
  });
221
- const m = s.open({
217
+ const h = s.open({
222
218
  header: { title: t ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
223
219
  children: { label: _r },
224
220
  width: 312,
225
221
  onClose: () => o.close()
226
222
  });
227
- return o.setCloseDisposable(m), !0;
223
+ return o.setCloseDisposable(h), !0;
228
224
  }
229
225
  }, Sr = {
230
226
  id: "data-validation.operation.close-validation-panel",
@@ -237,7 +233,7 @@ const _r = "DataValidationPanel", ct = {
237
233
  type: ye.OPERATION,
238
234
  handler(r) {
239
235
  const a = r.get(re), e = r.get(Ve);
240
- return e.open(), e.isOpen ? a.executeCommand(Sr.id) : a.executeCommand(ct.id), !0;
236
+ return e.open(), e.isOpen ? a.executeCommand(Sr.id) : a.executeCommand(ut.id), !0;
241
237
  }
242
238
  }, Va = {
243
239
  type: ye.OPERATION,
@@ -266,7 +262,7 @@ function Qe(r, a, e) {
266
262
  switch (n.type) {
267
263
  case "delete":
268
264
  t.push({
269
- id: It.id,
265
+ id: yt.id,
270
266
  params: {
271
267
  unitId: r,
272
268
  subUnitId: a,
@@ -284,7 +280,7 @@ function Qe(r, a, e) {
284
280
  break;
285
281
  case "update": {
286
282
  t.push({
287
- id: Ge.id,
283
+ id: Xe.id,
288
284
  params: {
289
285
  unitId: r,
290
286
  subUnitId: a,
@@ -295,7 +291,7 @@ function Qe(r, a, e) {
295
291
  }
296
292
  }
297
293
  }), o.unshift({
298
- id: Ge.id,
294
+ id: Xe.id,
299
295
  params: {
300
296
  unitId: r,
301
297
  subUnitId: a,
@@ -317,7 +313,7 @@ function Qe(r, a, e) {
317
313
  rule: n.rule
318
314
  }
319
315
  }), o.unshift({
320
- id: It.id,
316
+ id: yt.id,
321
317
  params: {
322
318
  unitId: r,
323
319
  subUnitId: a,
@@ -341,14 +337,14 @@ const Ma = {
341
337
  const { unitId: e, subUnitId: t, ranges: o, ruleId: n } = a, i = r.get(K), s = r.get(re), l = r.get(Ka), d = i.ensureManager(e, t), c = d.getRuleById(n);
342
338
  if (!c)
343
339
  return !1;
344
- const u = c.ranges, m = d.getRuleObjectMatrix().clone();
345
- m.updateRange(n, u, o);
346
- const f = m.diff(d.getDataValidations()), { redoMutations: h, undoMutations: g } = Qe(e, t, f);
340
+ const u = c.ranges, h = d.getRuleObjectMatrix().clone();
341
+ h.updateRange(n, u, o);
342
+ const f = h.diff(d.getDataValidations()), { redoMutations: m, undoMutations: v } = Qe(e, t, f);
347
343
  return l.pushUndoRedo({
348
- undoMutations: g,
349
- redoMutations: h,
344
+ undoMutations: v,
345
+ redoMutations: m,
350
346
  unitID: e
351
- }), await Za(h, s), !0;
347
+ }), await Za(m, s), !0;
352
348
  }
353
349
  }, wa = {
354
350
  type: ye.COMMAND,
@@ -362,12 +358,12 @@ const Ma = {
362
358
  unitId: e,
363
359
  subUnitId: t,
364
360
  rule: o
365
- }, { redoMutations: m, undoMutations: f } = Qe(e, t, c);
366
- return m.push({
361
+ }, { redoMutations: h, undoMutations: f } = Qe(e, t, c);
362
+ return h.push({
367
363
  id: Jt.id,
368
364
  params: u
369
365
  }), f.unshift({
370
- id: It.id,
366
+ id: yt.id,
371
367
  params: {
372
368
  unitId: e,
373
369
  subUnitId: t,
@@ -375,23 +371,22 @@ const Ma = {
375
371
  }
376
372
  }), s.pushUndoRedo({
377
373
  unitID: e,
378
- redoMutations: m,
374
+ redoMutations: h,
379
375
  undoMutations: f
380
- }), await Za(m, i), !0;
376
+ }), await Za(h, i), !0;
381
377
  }
382
378
  }, Rr = {
383
379
  type: ye.COMMAND,
384
380
  id: "data-validation.command.addRuleAndOpen",
385
381
  async handler(r) {
386
- const a = r.get(ee), e = rr(a);
387
- if (!e)
388
- return !1;
382
+ const a = r.get(te), e = rr(a);
383
+ if (!e) return !1;
389
384
  const { workbook: t, worksheet: o } = e, n = tr(r), i = r.get(re), s = t.getUnitId(), l = o.getSheetId(), d = {
390
385
  rule: n,
391
386
  unitId: s,
392
387
  subUnitId: l
393
388
  };
394
- return await i.executeCommand(wa.id, d) ? (i.executeCommand(ct.id, {
389
+ return await i.executeCommand(wa.id, d) ? (i.executeCommand(ut.id, {
395
390
  ruleId: n.uid,
396
391
  isAdd: !0
397
392
  }), !0) : !1;
@@ -401,15 +396,13 @@ var le = function() {
401
396
  return le = Object.assign || function(r) {
402
397
  for (var a, e = 1, t = arguments.length; e < t; e++) {
403
398
  a = arguments[e];
404
- for (var o in a)
405
- Object.prototype.hasOwnProperty.call(a, o) && (r[o] = a[o]);
399
+ for (var o in a) Object.prototype.hasOwnProperty.call(a, o) && (r[o] = a[o]);
406
400
  }
407
401
  return r;
408
402
  }, le.apply(this, arguments);
409
403
  }, Mn = function(r, a) {
410
404
  var e = {};
411
- for (var t in r)
412
- Object.prototype.hasOwnProperty.call(r, t) && a.indexOf(t) < 0 && (e[t] = r[t]);
405
+ for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && a.indexOf(t) < 0 && (e[t] = r[t]);
413
406
  if (r != null && typeof Object.getOwnPropertySymbols == "function")
414
407
  for (var o = 0, t = Object.getOwnPropertySymbols(r); o < t.length; o++)
415
408
  a.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(r, t[o]) && (e[t[o]] = r[t[o]]);
@@ -482,19 +475,19 @@ var Tn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
482
475
  }));
483
476
  });
484
477
  Ir.displayName = "MoreDownSingle";
485
- var Nn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, yr = Ee(function(r, a) {
478
+ var Fn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, yr = Ee(function(r, a) {
486
479
  return Oe(be, Object.assign({}, r, {
487
480
  id: "more-up-single",
488
481
  ref: a,
489
- icon: Nn
482
+ icon: Fn
490
483
  }));
491
484
  });
492
485
  yr.displayName = "MoreUpSingle";
493
- var Fn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Dr = Ee(function(r, a) {
486
+ var Nn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Dr = Ee(function(r, a) {
494
487
  return Oe(be, Object.assign({}, r, {
495
488
  id: "sequence-single",
496
489
  ref: a,
497
- icon: Fn
490
+ icon: Nn
498
491
  }));
499
492
  });
500
493
  Dr.displayName = "SequenceSingle";
@@ -504,7 +497,7 @@ const Ln = "univer-data-validation-options-button", Pn = "univer-data-validation
504
497
  };
505
498
  function An(r) {
506
499
  var d;
507
- const a = E(ie), e = E(dt), { value: t, onChange: o, extraComponent: n } = r, [i, s] = z(!1), l = n ? e.get(n) : null;
500
+ const a = T(ie), e = T(ct), { value: t, onChange: o, extraComponent: n } = r, [i, s] = z(!1), l = n ? e.get(n) : null;
508
501
  return /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
509
502
  /* @__PURE__ */ p.jsxs("div", { className: jt.dataValidationOptionsButton, onClick: () => s(!i), children: [
510
503
  a.t("dataValidation.panel.options"),
@@ -519,11 +512,11 @@ function An(r) {
519
512
  children: /* @__PURE__ */ p.jsxs(
520
513
  Sa,
521
514
  {
522
- value: `${(d = t.errorStyle) != null ? d : tt.WARNING}`,
515
+ value: `${(d = t.errorStyle) != null ? d : at.WARNING}`,
523
516
  onChange: (c) => o({ ...t, errorStyle: +c }),
524
517
  children: [
525
- /* @__PURE__ */ p.jsx(Le, { value: `${tt.WARNING}`, children: a.t("dataValidation.panel.showWarning") }),
526
- /* @__PURE__ */ p.jsx(Le, { value: `${tt.STOP}`, children: a.t("dataValidation.panel.rejectInput") })
518
+ /* @__PURE__ */ p.jsx(Le, { value: `${at.WARNING}`, children: a.t("dataValidation.panel.showWarning") }),
519
+ /* @__PURE__ */ p.jsx(Le, { value: `${at.STOP}`, children: a.t("dataValidation.panel.rejectInput") })
527
520
  ]
528
521
  }
529
522
  )
@@ -562,89 +555,89 @@ const xn = "univer-data-validation-detail-form-item", jn = "univer-data-validati
562
555
  275
563
556
  );
564
557
  function $n() {
565
- const [r, a] = z(0), e = E(Ve), t = Ze(e.activeRule$, e.activeRule), { unitId: o, subUnitId: n, rule: i } = t || {}, s = i.uid, l = E(De), d = E(dt), c = E(re), u = E(K), m = E(ie), [f, h] = z(i), g = l.getValidatorItem(f.type), [R, _] = z(!1), V = l.getValidatorsByScope(ro.SHEET), [S, I] = z(() => f.ranges.map((M) => ({ unitId: "", sheetId: "", range: M }))), y = yt(() => Un(c), [c]);
558
+ const [r, a] = z(0), e = T(Ve), t = Ze(e.activeRule$, e.activeRule), { unitId: o, subUnitId: n, rule: i } = t || {}, s = i.uid, l = T(De), d = T(ct), c = T(re), u = T(K), h = T(ie), [f, m] = z(i), v = l.getValidatorItem(f.type), [R, _] = z(!1), V = l.getValidatorsByScope(ro.SHEET), [S, y] = z(() => f.ranges.map((M) => ({ unitId: "", sheetId: "", range: M }))), w = Dt(() => Un(c), [c]);
566
559
  if (qe(() => {
567
560
  c.onCommandExecuted((M) => {
568
561
  (M.id === kr.id || M.id === Yr.id) && setTimeout(() => {
569
- const b = u.getRuleById(o, n, s);
570
- a((Z) => Z + 1), b && (h(b), I(b.ranges.map((Z) => ({ unitId: "", sheetId: "", range: Z }))));
562
+ const O = u.getRuleById(o, n, s);
563
+ a((J) => J + 1), O && (m(O), y(O.ranges.map((J) => ({ unitId: "", sheetId: "", range: J }))));
571
564
  }, 20);
572
565
  });
573
- }, [c, u, s, n, o]), !g)
566
+ }, [c, u, s, n, o]), !v)
574
567
  return null;
575
- const O = g.operators, j = g.operatorNames, P = f.operator ? oo.includes(f.operator) : !1, N = () => {
576
- g.validatorFormula(f, o, n).success ? e.setActiveRule(null) : _(!0);
577
- }, A = ir((M) => {
578
- if (Gr(M, S))
568
+ const F = v.operators, x = v.operatorNames, j = f.operator ? oo.includes(f.operator) : !1, $ = () => {
569
+ v.validatorFormula(f, o, n).success ? e.setActiveRule(null) : _(!0);
570
+ }, E = ir((M) => {
571
+ if (Xr(M, S))
579
572
  return;
580
- I(M);
581
- const b = M.filter((X) => (!X.unitId || X.unitId === o) && (!X.sheetId || X.sheetId === n)).map((X) => X.range);
582
- if (h({
573
+ y(M);
574
+ const O = M.filter((G) => (!G.unitId || G.unitId === o) && (!G.sheetId || G.sheetId === n)).map((G) => G.range);
575
+ if (m({
583
576
  ...f,
584
- ranges: b
585
- }), b.length === 0)
577
+ ranges: O
578
+ }), O.length === 0)
586
579
  return;
587
- const Z = {
580
+ const J = {
588
581
  unitId: o,
589
582
  subUnitId: n,
590
583
  ruleId: s,
591
- ranges: b
584
+ ranges: O
592
585
  };
593
- y(Ma.id, Z);
594
- }), F = (M) => {
586
+ w(Ma.id, J);
587
+ }), P = (M) => {
595
588
  if (Oa(M, Ta(f)))
596
589
  return;
597
- h({
590
+ m({
598
591
  ...f,
599
592
  ...M
600
593
  });
601
- const b = {
594
+ const O = {
602
595
  unitId: o,
603
596
  subUnitId: n,
604
597
  ruleId: s,
605
598
  setting: M
606
599
  };
607
- y(
608
- Na.id,
609
- b,
600
+ w(
601
+ Fa.id,
602
+ O,
610
603
  void 0
611
604
  );
612
- }, B = async () => {
605
+ }, A = async () => {
613
606
  await c.executeCommand(ar.id, {
614
607
  ruleId: s,
615
608
  unitId: o,
616
609
  subUnitId: n
617
610
  }), e.setActiveRule(null);
618
- }, Y = {
611
+ }, q = {
619
612
  type: f.type,
620
613
  operator: f.operator,
621
614
  formula1: f.formula1,
622
615
  formula2: f.formula2,
623
616
  allowBlank: f.allowBlank
624
- }, x = (M) => {
625
- const b = l.getValidatorItem(M);
626
- if (!b)
617
+ }, L = (M) => {
618
+ const O = l.getValidatorItem(M);
619
+ if (!O)
627
620
  return;
628
- const Z = b.operators, X = u.getRuleById(o, n, s), me = M === (X == null ? void 0 : X.type) ? {
629
- ...X
621
+ const J = O.operators, G = u.getRuleById(o, n, s), me = M === (G == null ? void 0 : G.type) ? {
622
+ ...G
630
623
  } : {
631
624
  ...f,
632
625
  type: M,
633
- operator: Z[0],
626
+ operator: J[0],
634
627
  formula1: void 0,
635
628
  formula2: void 0
636
629
  };
637
- h(me), c.executeCommand(Na.id, {
630
+ m(me), c.executeCommand(Fa.id, {
638
631
  unitId: o,
639
632
  subUnitId: n,
640
633
  ruleId: f.uid,
641
634
  setting: Ta(me)
642
635
  });
643
- }, L = d.get(g.formulaInput), G = yt(() => S.map((M) => ur(M.range)).join(","), []), te = ba(f), H = (M) => {
644
- Oa(M, ba(f)) || (h({
636
+ }, b = d.get(v.formulaInput), Y = Dt(() => S.map((M) => ur(M.range)).join(","), []), Z = ba(f), H = (M) => {
637
+ Oa(M, ba(f)) || (m({
645
638
  ...f,
646
639
  ...M
647
- }), y(
640
+ }), w(
648
641
  no.id,
649
642
  {
650
643
  unitId: o,
@@ -655,105 +648,105 @@ function $n() {
655
648
  ));
656
649
  };
657
650
  return /* @__PURE__ */ p.jsxs("div", { children: [
658
- /* @__PURE__ */ p.jsx(Q, { label: m.t("dataValidation.panel.range"), children: /* @__PURE__ */ p.jsx(
651
+ /* @__PURE__ */ p.jsx(Q, { label: h.t("dataValidation.panel.range"), children: /* @__PURE__ */ p.jsx(
659
652
  Lo,
660
653
  {
661
654
  className: He.dataValidationDetailFormItem,
662
- value: G,
655
+ value: Y,
663
656
  id: fa("data-validation-detail"),
664
657
  openForSheetUnitId: o,
665
658
  openForSheetSubUnitId: n,
666
659
  onChange: (M) => {
667
- M.some((b) => !Xr(b.range) || b.range.endColumn < b.range.startColumn || b.range.endRow < b.range.startRow) || A(M);
660
+ M.some((O) => !Gr(O.range) || O.range.endColumn < O.range.startColumn || O.range.endRow < O.range.startRow) || E(M);
668
661
  }
669
662
  },
670
663
  r
671
664
  ) }),
672
- /* @__PURE__ */ p.jsx(Q, { label: m.t("dataValidation.panel.type"), children: /* @__PURE__ */ p.jsx(
665
+ /* @__PURE__ */ p.jsx(Q, { label: h.t("dataValidation.panel.type"), children: /* @__PURE__ */ p.jsx(
673
666
  ia,
674
667
  {
675
668
  options: V == null ? void 0 : V.map((M) => ({
676
- label: m.t(M.title),
669
+ label: h.t(M.title),
677
670
  value: M.id
678
671
  })),
679
672
  value: f.type,
680
- onChange: x,
673
+ onChange: L,
681
674
  className: He.dataValidationDetailFormItem
682
675
  }
683
676
  ) }),
684
- O != null && O.length ? /* @__PURE__ */ p.jsx(Q, { label: m.t("dataValidation.panel.operator"), children: /* @__PURE__ */ p.jsx(
677
+ F != null && F.length ? /* @__PURE__ */ p.jsx(Q, { label: h.t("dataValidation.panel.operator"), children: /* @__PURE__ */ p.jsx(
685
678
  ia,
686
679
  {
687
- options: O.map((M, b) => ({
680
+ options: F.map((M, O) => ({
688
681
  value: `${M}`,
689
- label: j[b]
682
+ label: x[O]
690
683
  })),
691
684
  value: `${f.operator}`,
692
685
  onChange: (M) => {
693
- F({
694
- ...Y,
686
+ P({
687
+ ...q,
695
688
  operator: M
696
689
  });
697
690
  },
698
691
  className: He.dataValidationDetailFormItem
699
692
  }
700
693
  ) }) : null,
701
- L ? /* @__PURE__ */ p.jsx(
702
- L,
694
+ b ? /* @__PURE__ */ p.jsx(
695
+ b,
703
696
  {
704
- isTwoFormula: P,
697
+ isTwoFormula: j,
705
698
  value: {
706
699
  formula1: f.formula1,
707
700
  formula2: f.formula2
708
701
  },
709
702
  onChange: (M) => {
710
- F({
711
- ...Y,
703
+ P({
704
+ ...q,
712
705
  ...M
713
706
  });
714
707
  },
715
708
  showError: R,
716
- validResult: g.validatorFormula(f, o, n),
709
+ validResult: v.validatorFormula(f, o, n),
717
710
  unitId: o,
718
711
  subUnitId: n,
719
712
  ruleId: s
720
713
  },
721
714
  r
722
715
  ) : null,
723
- /* @__PURE__ */ p.jsx(An, { value: te, onChange: H, extraComponent: g.optionsInput }),
716
+ /* @__PURE__ */ p.jsx(An, { value: Z, onChange: H, extraComponent: v.optionsInput }),
724
717
  /* @__PURE__ */ p.jsxs("div", { className: He.dataValidationDetailButtons, children: [
725
- /* @__PURE__ */ p.jsx(ze, { className: He.dataValidationDetailButton, onClick: B, children: m.t("dataValidation.panel.removeRule") }),
726
- /* @__PURE__ */ p.jsx(ze, { className: He.dataValidationDetailButton, type: "primary", onClick: N, children: m.t("dataValidation.panel.done") })
718
+ /* @__PURE__ */ p.jsx(ze, { className: He.dataValidationDetailButton, onClick: A, children: h.t("dataValidation.panel.removeRule") }),
719
+ /* @__PURE__ */ p.jsx(ze, { className: He.dataValidationDetailButton, type: "primary", onClick: $, children: h.t("dataValidation.panel.done") })
727
720
  ] })
728
721
  ] });
729
722
  }
730
- var Dt = /* @__PURE__ */ ((r) => (r[r.View = 0] = "View", r[r.Edit = 1] = "Edit", r[r.ManageCollaborator = 2] = "ManageCollaborator", r[r.Print = 3] = "Print", r[r.Duplicate = 4] = "Duplicate", r[r.Comment = 5] = "Comment", r[r.Copy = 6] = "Copy", r[r.Share = 7] = "Share", r[r.Export = 8] = "Export", r[r.MoveWorksheet = 9] = "MoveWorksheet", r[r.DeleteWorksheet = 10] = "DeleteWorksheet", r[r.HideWorksheet = 11] = "HideWorksheet", r[r.RenameWorksheet = 12] = "RenameWorksheet", r[r.CreateWorksheet = 13] = "CreateWorksheet", r[r.SetWorksheetStyle = 14] = "SetWorksheetStyle", r[r.EditWorksheetCell = 15] = "EditWorksheetCell", r[r.InsertHyperlink = 16] = "InsertHyperlink", r[r.Sort = 17] = "Sort", r[r.Filter = 18] = "Filter", r[r.PivotTable = 19] = "PivotTable", r[r.FloatImg = 20] = "FloatImg", r[r.History = 21] = "History", r[r.RwHgtClWdt = 22] = "RwHgtClWdt", r[r.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", r[r.ViewFilter = 24] = "ViewFilter", r[r.MoveSheet = 25] = "MoveSheet", r[r.DeleteSheet = 26] = "DeleteSheet", r[r.HideSheet = 27] = "HideSheet", r[r.CopySheet = 28] = "CopySheet", r[r.RenameSheet = 29] = "RenameSheet", r[r.CreateSheet = 30] = "CreateSheet", r[r.SelectProtectedCells = 31] = "SelectProtectedCells", r[r.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", r[r.SetCellStyle = 33] = "SetCellStyle", r[r.SetCellValue = 34] = "SetCellValue", r[r.SetRowStyle = 35] = "SetRowStyle", r[r.SetColumnStyle = 36] = "SetColumnStyle", r[r.InsertRow = 37] = "InsertRow", r[r.InsertColumn = 38] = "InsertColumn", r[r.DeleteRow = 39] = "DeleteRow", r[r.DeleteColumn = 40] = "DeleteColumn", r[r.EditExtraObject = 41] = "EditExtraObject", r[r.Delete = 42] = "Delete", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(Dt || {});
731
- const Wn = "univer-data-validation-item-container", Hn = "univer-data-validation-item-title", kn = "univer-data-validation-item-content", Yn = "univer-data-validation-item-icon", ft = {
723
+ var Et = /* @__PURE__ */ ((r) => (r[r.View = 0] = "View", r[r.Edit = 1] = "Edit", r[r.ManageCollaborator = 2] = "ManageCollaborator", r[r.Print = 3] = "Print", r[r.Duplicate = 4] = "Duplicate", r[r.Comment = 5] = "Comment", r[r.Copy = 6] = "Copy", r[r.Share = 7] = "Share", r[r.Export = 8] = "Export", r[r.MoveWorksheet = 9] = "MoveWorksheet", r[r.DeleteWorksheet = 10] = "DeleteWorksheet", r[r.HideWorksheet = 11] = "HideWorksheet", r[r.RenameWorksheet = 12] = "RenameWorksheet", r[r.CreateWorksheet = 13] = "CreateWorksheet", r[r.SetWorksheetStyle = 14] = "SetWorksheetStyle", r[r.EditWorksheetCell = 15] = "EditWorksheetCell", r[r.InsertHyperlink = 16] = "InsertHyperlink", r[r.Sort = 17] = "Sort", r[r.Filter = 18] = "Filter", r[r.PivotTable = 19] = "PivotTable", r[r.FloatImg = 20] = "FloatImg", r[r.History = 21] = "History", r[r.RwHgtClWdt = 22] = "RwHgtClWdt", r[r.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", r[r.ViewFilter = 24] = "ViewFilter", r[r.MoveSheet = 25] = "MoveSheet", r[r.DeleteSheet = 26] = "DeleteSheet", r[r.HideSheet = 27] = "HideSheet", r[r.CopySheet = 28] = "CopySheet", r[r.RenameSheet = 29] = "RenameSheet", r[r.CreateSheet = 30] = "CreateSheet", r[r.SelectProtectedCells = 31] = "SelectProtectedCells", r[r.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", r[r.SetCellStyle = 33] = "SetCellStyle", r[r.SetCellValue = 34] = "SetCellValue", r[r.SetRowStyle = 35] = "SetRowStyle", r[r.SetColumnStyle = 36] = "SetColumnStyle", r[r.InsertRow = 37] = "InsertRow", r[r.InsertColumn = 38] = "InsertColumn", r[r.DeleteRow = 39] = "DeleteRow", r[r.DeleteColumn = 40] = "DeleteColumn", r[r.EditExtraObject = 41] = "EditExtraObject", r[r.Delete = 42] = "Delete", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(Et || {});
724
+ const Wn = "univer-data-validation-item-container", Hn = "univer-data-validation-item-title", kn = "univer-data-validation-item-content", Yn = "univer-data-validation-item-icon", pt = {
732
725
  dataValidationItemContainer: Wn,
733
726
  dataValidationItemTitle: Hn,
734
727
  dataValidationItemContent: kn,
735
728
  dataValidationItemIcon: Yn
736
- }, Gn = (r) => {
737
- const { rule: a, onClick: e, unitId: t, subUnitId: o, disable: n } = r, i = E(De), s = E(re), l = E(Co), d = i.getValidatorItem(a.type), c = _a(), [u, m] = z(!1), f = (h) => {
729
+ }, Xn = (r) => {
730
+ const { rule: a, onClick: e, unitId: t, subUnitId: o, disable: n } = r, i = T(De), s = T(re), l = T(Co), d = i.getValidatorItem(a.type), c = _a(), [u, h] = z(!1), f = (m) => {
738
731
  s.executeCommand(ar.id, {
739
732
  ruleId: a.uid,
740
733
  unitId: t,
741
734
  subUnitId: o
742
- }), h.stopPropagation();
735
+ }), m.stopPropagation();
743
736
  };
744
737
  return qe(() => () => {
745
- var h;
746
- c.current && ((h = c.current) == null || h.forEach((g) => {
747
- g && l.removeShape(g);
738
+ var m;
739
+ c.current && ((m = c.current) == null || m.forEach((v) => {
740
+ v && l.removeShape(v);
748
741
  }));
749
742
  }, [l]), /* @__PURE__ */ p.jsxs(
750
743
  "div",
751
744
  {
752
- className: ft.dataValidationItemContainer,
745
+ className: pt.dataValidationItemContainer,
753
746
  onClick: e,
754
747
  onMouseEnter: () => {
755
- n || (m(!0), c.current = a.ranges.map((h) => l.addShape({
756
- range: h,
748
+ n || (h(!0), c.current = a.ranges.map((m) => l.addShape({
749
+ range: m,
757
750
  style: {
758
751
  hasAutoFill: !1,
759
752
  fill: "rgba(73, 184, 17, 0.05)",
@@ -762,41 +755,41 @@ const Wn = "univer-data-validation-item-container", Hn = "univer-data-validation
762
755
  widgets: {}
763
756
  },
764
757
  primary: {
765
- startColumn: h.startColumn,
766
- endColumn: h.endColumn,
767
- startRow: h.startRow,
768
- endRow: h.endRow,
769
- actualRow: h.startRow,
770
- actualColumn: h.startColumn,
758
+ startColumn: m.startColumn,
759
+ endColumn: m.endColumn,
760
+ startRow: m.startRow,
761
+ endRow: m.endRow,
762
+ actualRow: m.startRow,
763
+ actualColumn: m.startColumn,
771
764
  isMerged: !1,
772
765
  isMergedMainCell: !1
773
766
  }
774
767
  })));
775
768
  },
776
769
  onMouseLeave: () => {
777
- var h;
778
- m(!1), (h = c.current) == null || h.forEach((g) => {
779
- g && l.removeShape(g);
770
+ var m;
771
+ h(!1), (m = c.current) == null || m.forEach((v) => {
772
+ v && l.removeShape(v);
780
773
  }), c.current = void 0;
781
774
  },
782
775
  children: [
783
- /* @__PURE__ */ p.jsx("div", { className: ft.dataValidationItemTitle, children: d == null ? void 0 : d.generateRuleName(a) }),
784
- /* @__PURE__ */ p.jsx("div", { className: ft.dataValidationItemContent, children: a.ranges.map((h) => ur(h)).join(",") }),
785
- u ? /* @__PURE__ */ p.jsx("div", { className: ft.dataValidationItemIcon, onClick: f, children: /* @__PURE__ */ p.jsx(Ia, {}) }) : null
776
+ /* @__PURE__ */ p.jsx("div", { className: pt.dataValidationItemTitle, children: d == null ? void 0 : d.generateRuleName(a) }),
777
+ /* @__PURE__ */ p.jsx("div", { className: pt.dataValidationItemContent, children: a.ranges.map((m) => ur(m)).join(",") }),
778
+ u ? /* @__PURE__ */ p.jsx("div", { className: pt.dataValidationItemIcon, onClick: f, children: /* @__PURE__ */ p.jsx(Ia, {}) }) : null
786
779
  ]
787
780
  }
788
781
  );
789
782
  };
790
- var Xn = Object.defineProperty, qn = Object.getOwnPropertyDescriptor, zn = (r, a, e, t) => {
783
+ var Gn = Object.defineProperty, qn = Object.getOwnPropertyDescriptor, zn = (r, a, e, t) => {
791
784
  for (var o = t > 1 ? void 0 : t ? qn(a, e) : a, n = r.length - 1, i; n >= 0; n--)
792
785
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
793
- return t && o && Xn(a, e, o), o;
786
+ return t && o && Gn(a, e, o), o;
794
787
  }, Qn = (r, a) => (e, t) => a(e, t, r);
795
- let Et = class {
788
+ let Ot = class {
796
789
  constructor(r) {
797
- v(this, "_currentManager");
798
- v(this, "_currentManager$", new mr());
799
- v(this, "currentManager$", this._currentManager$.asObservable());
790
+ g(this, "_currentManager");
791
+ g(this, "_currentManager$", new mr());
792
+ g(this, "currentManager$", this._currentManager$.asObservable());
800
793
  this._dataValidationModel = r;
801
794
  }
802
795
  get currentManager() {
@@ -820,9 +813,9 @@ let Et = class {
820
813
  return this._ensureManager(r, a);
821
814
  }
822
815
  };
823
- Et = zn([
824
- Qn(0, w(K))
825
- ], Et);
816
+ Ot = zn([
817
+ Qn(0, I(K))
818
+ ], Ot);
826
819
  function Kn(r) {
827
820
  var l;
828
821
  const { unitId: a, subUnitId: e, value: t, onChange: o, showError: n, validResult: i } = r, s = n ? i == null ? void 0 : i.formula1 : "";
@@ -854,7 +847,7 @@ const Zn = "univer-data-validation-formula", Jn = "univer-data-validation-formul
854
847
  dataValidationFormulaColorSelectPanel: ni,
855
848
  dataValidationFormulaColorItem: ii
856
849
  }, si = (r) => {
857
- const { isTwoFormula: a = !1, value: e, onChange: t, showError: o, validResult: n } = r, i = E(ie), s = o ? n == null ? void 0 : n.formula1 : "", l = o ? n == null ? void 0 : n.formula2 : "";
850
+ const { isTwoFormula: a = !1, value: e, onChange: t, showError: o, validResult: n } = r, i = T(ie), s = o ? n == null ? void 0 : n.formula1 : "", l = o ? n == null ? void 0 : n.formula2 : "";
858
851
  return a ? /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
859
852
  /* @__PURE__ */ p.jsx(Q, { error: s, children: /* @__PURE__ */ p.jsx(
860
853
  Pe,
@@ -912,20 +905,20 @@ function ne(r) {
912
905
  function Er(r) {
913
906
  return r.filter(Boolean).join(",");
914
907
  }
915
- function Xe(r) {
908
+ function Ge(r) {
916
909
  return r.split(",").filter(Boolean);
917
910
  }
918
911
  function li(r) {
919
912
  const a = ne(r);
920
913
  return a == null ? "" : a.toString();
921
914
  }
922
- const ya = "SHEET_DATA_VALIDATION_PLUGIN", Fe = "#ECECEC";
915
+ const ya = "SHEET_DATA_VALIDATION_PLUGIN", Ne = "#ECECEC";
923
916
  var di = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, ui = (r, a, e, t) => {
924
917
  for (var o = t > 1 ? void 0 : t ? ci(a, e) : a, n = r.length - 1, i; n >= 0; n--)
925
918
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
926
919
  return t && o && di(a, e, o), o;
927
920
  }, Bt = (r, a) => (e, t) => a(e, t, r);
928
- let at = class extends he {
921
+ let rt = class extends he {
929
922
  constructor(r, a, e) {
930
923
  super(), this._univerInstanceService = r, this._permissionService = a, this._lexerTreeBuilder = e;
931
924
  }
@@ -944,29 +937,28 @@ let at = class extends he {
944
937
  if (s.sheetName) {
945
938
  if (d = l.getSheetBySheetName(s.sheetName), !d)
946
939
  return !1;
947
- const g = d == null ? void 0 : d.getSheetId();
948
- if (!this._permissionService.getPermissionPoint(new mo(c, g).id))
949
- return !1;
940
+ const v = d == null ? void 0 : d.getSheetId();
941
+ if (!this._permissionService.getPermissionPoint(new mo(c, v).id)) return !1;
950
942
  }
951
943
  if (!d)
952
944
  return !1;
953
- const { startRow: u, endRow: m, startColumn: f, endColumn: h } = s.range;
954
- for (let g = u; g <= m; g++)
955
- for (let R = f; R <= h; R++) {
956
- const _ = (t = (e = d.getCell(g, R)) == null ? void 0 : e.selectionProtection) == null ? void 0 : t[0];
957
- if ((_ == null ? void 0 : _[Dt.View]) === !1)
945
+ const { startRow: u, endRow: h, startColumn: f, endColumn: m } = s.range;
946
+ for (let v = u; v <= h; v++)
947
+ for (let R = f; R <= m; R++) {
948
+ const _ = (t = (e = d.getCell(v, R)) == null ? void 0 : e.selectionProtection) == null ? void 0 : t[0];
949
+ if ((_ == null ? void 0 : _[Et.View]) === !1)
958
950
  return !1;
959
951
  }
960
952
  }
961
953
  return !0;
962
954
  }
963
955
  };
964
- at = ui([
965
- ve(ge.Rendered, at),
966
- Bt(0, ee),
956
+ rt = ui([
957
+ ve(ge.Rendered, rt),
958
+ Bt(0, te),
967
959
  Bt(1, zr),
968
- Bt(2, w(Ra))
969
- ], at);
960
+ Bt(2, I(Ra))
961
+ ], rt);
970
962
  const hi = [
971
963
  "#FFFFFF",
972
964
  "#FEE7E7",
@@ -1054,54 +1046,54 @@ const hi = [
1054
1046
  };
1055
1047
  function fi(r) {
1056
1048
  const { value: a, onChange: e = () => {
1057
- }, unitId: t, subUnitId: o, validResult: n, showError: i, ruleId: s } = r, { formula1: l = "", formula2: d = "" } = a || {}, c = _a(null), [u, m] = z(() => T(l) ? "1" : "0"), [f, h] = z(u === "1" ? l : "="), [g, R] = z(u === "1" ? l : "="), _ = E(ie), V = E(De), S = E(K), I = E(at), [y, O] = z(() => d.split(",")), j = V.getValidatorItem(q.LIST), [P, N] = z([]), [A, F] = z(""), B = i ? n == null ? void 0 : n.formula1 : "", Y = Ze(S.ruleChange$), x = ir(e);
1049
+ }, unitId: t, subUnitId: o, validResult: n, showError: i, ruleId: s } = r, { formula1: l = "", formula2: d = "" } = a || {}, c = _a(null), [u, h] = z(() => N(l) ? "1" : "0"), [f, m] = z(u === "1" ? l : "="), [v, R] = z(u === "1" ? l : "="), _ = T(ie), V = T(De), S = T(K), y = T(rt), [w, F] = z(() => d.split(",")), x = V.getValidatorItem(X.LIST), [j, $] = z([]), [E, P] = z(""), A = i ? n == null ? void 0 : n.formula1 : "", q = Ze(S.ruleChange$), L = ir(e);
1058
1050
  qe(() => {
1059
1051
  (async () => {
1060
1052
  await new Promise((k) => {
1061
1053
  setTimeout(() => k(!0), 100);
1062
1054
  });
1063
1055
  const D = S.getRuleById(t, o, s), W = D == null ? void 0 : D.formula1;
1064
- if (T(W) && j && D) {
1065
- const k = await j.getListAsync(D, t, o);
1066
- N(k);
1056
+ if (N(W) && x && D) {
1057
+ const k = await x.getListAsync(D, t, o);
1058
+ $(k);
1067
1059
  }
1068
1060
  })();
1069
- }, [S, Y, j, s, o, t]), qe(() => {
1070
- T(l) && l !== g && (h(l), R(g));
1071
- }, [g, l]);
1072
- const [L, G] = z(() => {
1073
- const D = u !== "1" ? Xe(l) : [], W = d.split(",");
1074
- return D.map((k, J) => ({
1061
+ }, [S, q, x, s, o, t]), qe(() => {
1062
+ N(l) && l !== v && (m(l), R(v));
1063
+ }, [v, l]);
1064
+ const [b, Y] = z(() => {
1065
+ const D = u !== "1" ? Ge(l) : [], W = d.split(",");
1066
+ return D.map((k, ee) => ({
1075
1067
  label: k,
1076
- color: W[J] || Fe,
1068
+ color: W[ee] || Ne,
1077
1069
  isRef: !1,
1078
- id: U.generateRandomId(4)
1070
+ id: B.generateRandomId(4)
1079
1071
  }));
1080
- }), te = (D, W, k) => {
1081
- const J = L.find((_e) => _e.id === D);
1082
- J && (J.label = W, J.color = k, G([...L]));
1072
+ }), Z = (D, W, k) => {
1073
+ const ee = b.find((_e) => _e.id === D);
1074
+ ee && (ee.label = W, ee.color = k, Y([...b]));
1083
1075
  }, H = (D) => {
1084
- const W = L.findIndex((k) => k.id === D);
1085
- W !== -1 && (L.splice(W, 1), G([...L]));
1086
- }, M = d.split(","), b = yt(() => P.map((D, W) => ({
1076
+ const W = b.findIndex((k) => k.id === D);
1077
+ W !== -1 && (b.splice(W, 1), Y([...b]));
1078
+ }, M = d.split(","), O = Dt(() => j.map((D, W) => ({
1087
1079
  label: D,
1088
- color: M[W] || Fe,
1080
+ color: M[W] || Ne,
1089
1081
  id: `${W}`,
1090
1082
  isRef: !0
1091
- })), [M, P]), Z = (D, W, k) => {
1092
- const J = [...y];
1093
- J[+D] = k, O(J), x({
1083
+ })), [M, j]), J = (D, W, k) => {
1084
+ const ee = [...w];
1085
+ ee[+D] = k, F(ee), L({
1094
1086
  formula1: l,
1095
- formula2: J.join(",")
1087
+ formula2: ee.join(",")
1096
1088
  });
1097
- }, X = () => {
1098
- G([
1099
- ...L,
1089
+ }, G = () => {
1090
+ Y([
1091
+ ...b,
1100
1092
  {
1101
1093
  label: "",
1102
- color: Fe,
1094
+ color: Ne,
1103
1095
  isRef: !1,
1104
- id: U.generateRandomId(4)
1096
+ id: B.generateRandomId(4)
1105
1097
  }
1106
1098
  ]);
1107
1099
  };
@@ -1109,39 +1101,39 @@ function fi(r) {
1109
1101
  if (u === "1")
1110
1102
  return;
1111
1103
  const D = /* @__PURE__ */ new Set(), W = [];
1112
- L.map((k) => ({
1104
+ b.map((k) => ({
1113
1105
  labelList: k.label.split(","),
1114
1106
  item: k
1115
- })).forEach(({ item: k, labelList: J }) => {
1116
- J.forEach((_e) => {
1107
+ })).forEach(({ item: k, labelList: ee }) => {
1108
+ ee.forEach((_e) => {
1117
1109
  D.has(_e) || (D.add(_e), W.push({
1118
1110
  label: _e,
1119
1111
  color: k.color
1120
1112
  }));
1121
1113
  });
1122
- }), x({
1114
+ }), L({
1123
1115
  formula1: Er(W.map((k) => k.label)),
1124
- formula2: W.map((k) => k.color === Fe ? "" : k.color).join(",")
1116
+ formula2: W.map((k) => k.color === Ne ? "" : k.color).join(",")
1125
1117
  });
1126
- }, [L, x, u, g, y]);
1127
- const me = yt(
1118
+ }, [b, L, u, v, w]);
1119
+ const me = Dt(
1128
1120
  () => async (D) => {
1129
- if (!T(D)) {
1130
- x == null || x({
1121
+ if (!N(D)) {
1122
+ L == null || L({
1131
1123
  formula1: "",
1132
1124
  formula2: d
1133
1125
  });
1134
1126
  return;
1135
1127
  }
1136
- I.getFormulaRefCheck(D) ? (x == null || x({
1137
- formula1: T(D) ? D : "",
1128
+ y.getFormulaRefCheck(D) ? (L == null || L({
1129
+ formula1: N(D) ? D : "",
1138
1130
  formula2: d
1139
- }), F("")) : (x == null || x({
1131
+ }), P("")) : (L == null || L({
1140
1132
  formula1: "",
1141
1133
  formula2: d
1142
- }), h("="), F(_.t("dataValidation.validFail.formulaError")));
1134
+ }), m("="), P(_.t("dataValidation.validFail.formulaError")));
1143
1135
  },
1144
- [d, x]
1136
+ [d, L]
1145
1137
  );
1146
1138
  return /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
1147
1139
  /* @__PURE__ */ p.jsx(Q, { label: _.t("dataValidation.list.options"), children: /* @__PURE__ */ p.jsxs(
@@ -1149,9 +1141,9 @@ function fi(r) {
1149
1141
  {
1150
1142
  value: u,
1151
1143
  onChange: (D) => {
1152
- m(D), h(g), D === "1" && x({
1153
- formula1: g === "=" ? "" : g,
1154
- formula2: y.join(",")
1144
+ h(D), m(v), D === "1" && L({
1145
+ formula1: v === "=" ? "" : v,
1146
+ formula2: w.join(",")
1155
1147
  });
1156
1148
  },
1157
1149
  children: [
@@ -1161,7 +1153,7 @@ function fi(r) {
1161
1153
  }
1162
1154
  ) }),
1163
1155
  u === "1" ? /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
1164
- /* @__PURE__ */ p.jsx(Q, { error: B || A, children: /* @__PURE__ */ p.jsx(
1156
+ /* @__PURE__ */ p.jsx(Q, { error: A || E, children: /* @__PURE__ */ p.jsx(
1165
1157
  sr,
1166
1158
  {
1167
1159
  id: fa(`list-ref-range-${t}-${o}`),
@@ -1175,13 +1167,13 @@ function fi(r) {
1175
1167
  }
1176
1168
  }
1177
1169
  ) }),
1178
- /* @__PURE__ */ p.jsx(Q, { children: /* @__PURE__ */ p.jsx("div", { ref: c, children: b.map((D) => /* @__PURE__ */ p.jsx($a, { item: D, commonProps: { onItemChange: Z }, style: { marginBottom: 12 } }, D.id)) }) })
1179
- ] }) : /* @__PURE__ */ p.jsx(Q, { error: B, children: /* @__PURE__ */ p.jsxs("div", { ref: c, style: { marginTop: "-12px" }, children: [
1170
+ /* @__PURE__ */ p.jsx(Q, { children: /* @__PURE__ */ p.jsx("div", { ref: c, children: O.map((D) => /* @__PURE__ */ p.jsx($a, { item: D, commonProps: { onItemChange: J }, style: { marginBottom: 12 } }, D.id)) }) })
1171
+ ] }) : /* @__PURE__ */ p.jsx(Q, { error: A, children: /* @__PURE__ */ p.jsxs("div", { ref: c, style: { marginTop: "-12px" }, children: [
1180
1172
  /* @__PURE__ */ p.jsx(
1181
1173
  zo,
1182
1174
  {
1183
- list: L,
1184
- onListChange: G,
1175
+ list: b,
1176
+ onListChange: Y,
1185
1177
  rowHeight: 32,
1186
1178
  margin: [0, 12],
1187
1179
  draggableHandle: ".draggableHandle",
@@ -1190,7 +1182,7 @@ function fi(r) {
1190
1182
  {
1191
1183
  item: D,
1192
1184
  commonProps: {
1193
- onItemChange: te,
1185
+ onItemChange: Z,
1194
1186
  onItemDelete: H
1195
1187
  }
1196
1188
  },
@@ -1199,7 +1191,7 @@ function fi(r) {
1199
1191
  idKey: "id"
1200
1192
  }
1201
1193
  ),
1202
- /* @__PURE__ */ p.jsxs("a", { className: oe.dataValidationFormulaListAdd, onClick: X, children: [
1194
+ /* @__PURE__ */ p.jsxs("a", { className: oe.dataValidationFormulaListAdd, onClick: G, children: [
1203
1195
  /* @__PURE__ */ p.jsx(wr, {}),
1204
1196
  _.t("dataValidation.list.add")
1205
1197
  ] })
@@ -1207,7 +1199,7 @@ function fi(r) {
1207
1199
  ] });
1208
1200
  }
1209
1201
  function pi(r) {
1210
- const { value: a, onChange: e, showError: t, validResult: o } = r, n = E(ie), i = t ? o == null ? void 0 : o.formula1 : "", s = t ? o == null ? void 0 : o.formula2 : "", [l, d] = z(!((a == null ? void 0 : a.formula1) === void 0 && (a == null ? void 0 : a.formula2) === void 0));
1202
+ const { value: a, onChange: e, showError: t, validResult: o } = r, n = T(ie), i = t ? o == null ? void 0 : o.formula1 : "", s = t ? o == null ? void 0 : o.formula2 : "", [l, d] = z(!((a == null ? void 0 : a.formula1) === void 0 && (a == null ? void 0 : a.formula2) === void 0));
1211
1203
  return /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
1212
1204
  /* @__PURE__ */ p.jsx(Q, { children: /* @__PURE__ */ p.jsx(
1213
1205
  cr,
@@ -1253,13 +1245,13 @@ function pi(r) {
1253
1245
  ) }) : null
1254
1246
  ] });
1255
1247
  }
1256
- const Or = "data-validation.custom-formula-input", ut = "data-validation.formula-input", br = "data-validation.list-formula-input", Tr = "data-validation.checkbox-formula-input", vi = [
1248
+ const Or = "data-validation.custom-formula-input", ht = "data-validation.formula-input", br = "data-validation.list-formula-input", Tr = "data-validation.checkbox-formula-input", vi = [
1257
1249
  [
1258
1250
  Or,
1259
1251
  Kn
1260
1252
  ],
1261
1253
  [
1262
- ut,
1254
+ ht,
1263
1255
  si
1264
1256
  ],
1265
1257
  [
@@ -1271,15 +1263,15 @@ const Or = "data-validation.custom-formula-input", ut = "data-validation.formula
1271
1263
  pi
1272
1264
  ]
1273
1265
  ];
1274
- class ht {
1266
+ class mt {
1275
1267
  constructor() {
1276
- v(this, "_cacheMatrix", /* @__PURE__ */ new Map());
1268
+ g(this, "_cacheMatrix", /* @__PURE__ */ new Map());
1277
1269
  }
1278
1270
  _ensureCache(a, e) {
1279
1271
  let t = this._cacheMatrix.get(a);
1280
1272
  t || (t = /* @__PURE__ */ new Map(), this._cacheMatrix.set(a, t));
1281
1273
  let o = t.get(e);
1282
- return o || (o = new lt(), t.set(e, o)), o;
1274
+ return o || (o = new dt(), t.set(e, o)), o;
1283
1275
  }
1284
1276
  ensureCache(a, e) {
1285
1277
  return this._ensureCache(a, e);
@@ -1293,17 +1285,17 @@ class ht {
1293
1285
  updateRuleRanges(a, e, t, o, n) {
1294
1286
  const i = this._ensureCache(a, e);
1295
1287
  n.forEach((s) => {
1296
- $.foreach(s, (l, d) => {
1288
+ U.foreach(s, (l, d) => {
1297
1289
  const c = i.getValue(l, d);
1298
1290
  c && (c.temp = !0);
1299
1291
  });
1300
1292
  }), o.forEach((s) => {
1301
- $.foreach(s, (l, d) => {
1293
+ U.foreach(s, (l, d) => {
1302
1294
  const c = i.getValue(l, d);
1303
1295
  c && c.ruleId === t ? c.temp = !1 : i.setValue(l, d, void 0);
1304
1296
  });
1305
1297
  }), n.forEach((s) => {
1306
- $.foreach(s, (l, d) => {
1298
+ U.foreach(s, (l, d) => {
1307
1299
  const c = i.getValue(l, d);
1308
1300
  c && c.temp === !0 && i.realDeleteValue(l, d);
1309
1301
  });
@@ -1312,7 +1304,7 @@ class ht {
1312
1304
  markRangeDirty(a, e, t) {
1313
1305
  const o = this._ensureCache(a, e);
1314
1306
  t.forEach((n) => {
1315
- $.foreach(n, (i, s) => {
1307
+ U.foreach(n, (i, s) => {
1316
1308
  o.setValue(i, s, void 0);
1317
1309
  });
1318
1310
  });
@@ -1323,7 +1315,7 @@ class ht {
1323
1315
  _deleteRange(a, e, t) {
1324
1316
  const o = this._ensureCache(a, e);
1325
1317
  t.forEach((n) => {
1326
- $.foreach(n, (i, s) => {
1318
+ U.foreach(n, (i, s) => {
1327
1319
  o.realDeleteValue(i, s);
1328
1320
  });
1329
1321
  });
@@ -1339,19 +1331,19 @@ var gi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, Si = (r, a
1339
1331
  for (var o = t > 1 ? void 0 : t ? _i(a, e) : a, n = r.length - 1, i; n >= 0; n--)
1340
1332
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
1341
1333
  return t && o && gi(a, e, o), o;
1342
- }, pt = (r, a) => (e, t) => a(e, t, r);
1334
+ }, vt = (r, a) => (e, t) => a(e, t, r);
1343
1335
  let Ke = class extends he {
1344
1336
  constructor(a, e, t, o) {
1345
1337
  super();
1346
- v(this, "_formulaMap", /* @__PURE__ */ new Map());
1338
+ g(this, "_formulaMap", /* @__PURE__ */ new Map());
1347
1339
  /**
1348
1340
  * Map of origin formula of rule
1349
1341
  */
1350
- v(this, "_ruleFormulaMap", /* @__PURE__ */ new Map());
1342
+ g(this, "_ruleFormulaMap", /* @__PURE__ */ new Map());
1351
1343
  /**
1352
1344
  * reflect of formulaId to cell, only store transformable formula
1353
1345
  */
1354
- v(this, "_formulaCellMap", /* @__PURE__ */ new Map());
1346
+ g(this, "_formulaCellMap", /* @__PURE__ */ new Map());
1355
1347
  this._registerOtherFormulaService = a, this._lexerTreeBuilder = e, this._dataValidationModel = t, this._dataValidationCacheService = o, this._initFormulaResultHandler();
1356
1348
  }
1357
1349
  _initFormulaResultHandler() {
@@ -1361,9 +1353,9 @@ let Ke = class extends he {
1361
1353
  for (const o in t) {
1362
1354
  const n = t[o], { formulaCellMap: i, ruleFormulaMap: s } = this._ensureMaps(e, o), l = this._dataValidationModel.ensureManager(e, o);
1363
1355
  n.forEach((d) => {
1364
- var f, h;
1365
- const c = s.get((f = d.extra) == null ? void 0 : f.ruleId), u = i.get(d.formulaId), m = l.getRuleById((h = d.extra) == null ? void 0 : h.ruleId);
1366
- m && c && !c.isTransformable && this._dataValidationCacheService.markRangeDirty(e, o, m.ranges), u && this._dataValidationCacheService.markCellDirty(e, o, u.row, u.column);
1356
+ var f, m;
1357
+ const c = s.get((f = d.extra) == null ? void 0 : f.ruleId), u = i.get(d.formulaId), h = l.getRuleById((m = d.extra) == null ? void 0 : m.ruleId);
1358
+ h && c && !c.isTransformable && this._dataValidationCacheService.markRangeDirty(e, o, h.ranges), u && this._dataValidationCacheService.markCellDirty(e, o, u.row, u.column);
1367
1359
  });
1368
1360
  }
1369
1361
  }
@@ -1373,7 +1365,7 @@ let Ke = class extends he {
1373
1365
  let t = this._formulaMap.get(a), o = this._ruleFormulaMap.get(a), n = this._formulaCellMap.get(a);
1374
1366
  (!t || !o || !n) && (t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), this._formulaMap.set(a, t), this._ruleFormulaMap.set(a, o), this._formulaCellMap.set(a, n));
1375
1367
  let i = t.get(e), s = o.get(e), l = n.get(e);
1376
- return (!i || !s || !l) && (i = new lt(), t.set(e, i), s = /* @__PURE__ */ new Map(), o.set(e, s), l = /* @__PURE__ */ new Map(), n.set(e, l)), {
1368
+ return (!i || !s || !l) && (i = new dt(), t.set(e, i), s = /* @__PURE__ */ new Map(), o.set(e, s), l = /* @__PURE__ */ new Map(), n.set(e, l)), {
1377
1369
  formulaMap: i,
1378
1370
  ruleFormulaMap: s,
1379
1371
  formulaCellMap: l
@@ -1385,11 +1377,11 @@ let Ke = class extends he {
1385
1377
  deleteByRuleId(a, e, t) {
1386
1378
  const { formulaMap: o, formulaCellMap: n, ruleFormulaMap: i } = this._ensureMaps(a, e), s = this._dataValidationModel.getRuleById(a, e, t), l = /* @__PURE__ */ new Set(), d = i.get(t);
1387
1379
  !s || !d || (i.delete(t), s.ranges.forEach((c) => {
1388
- $.foreach(c, (u, m) => {
1389
- const f = o.getValue(u, m);
1380
+ U.foreach(c, (u, h) => {
1381
+ const f = o.getValue(u, h);
1390
1382
  if (f && f.ruleId === t) {
1391
- const { formulaId: h } = f;
1392
- o.realDeleteValue(u, m), l.add(h), n.delete(h);
1383
+ const { formulaId: m } = f;
1384
+ o.realDeleteValue(u, h), l.add(m), n.delete(m);
1393
1385
  }
1394
1386
  });
1395
1387
  }), this._registerOtherFormulaService.deleteFormula(a, e, Array.from(l.values())));
@@ -1402,27 +1394,27 @@ let Ke = class extends he {
1402
1394
  this._lexerTreeBuilder,
1403
1395
  o
1404
1396
  ), c = n[0].startRow, u = n[0].startColumn;
1405
- let m;
1397
+ let h;
1406
1398
  d ? n.forEach((f) => {
1407
- $.foreach(f, (h, g) => {
1399
+ U.foreach(f, (m, v) => {
1408
1400
  const R = ja(
1409
1401
  this._lexerTreeBuilder,
1410
1402
  o,
1411
1403
  c,
1412
1404
  u,
1413
- h,
1414
- g
1405
+ m,
1406
+ v
1415
1407
  ), _ = this._registerFormula(a, e, t, R);
1416
- i.setValue(h, g, {
1408
+ i.setValue(m, v, {
1417
1409
  formulaId: _,
1418
1410
  // formulaText: relativeFormula,
1419
1411
  ruleId: t
1420
- }), l.set(_, { row: h, column: g });
1412
+ }), l.set(_, { row: m, column: v });
1421
1413
  });
1422
- }) : (m = this._registerFormula(a, e, t, o), n.forEach((f) => {
1423
- $.foreach(f, (h, g) => {
1424
- i.setValue(h, g, {
1425
- formulaId: m,
1414
+ }) : (h = this._registerFormula(a, e, t, o), n.forEach((f) => {
1415
+ U.foreach(f, (m, v) => {
1416
+ i.setValue(m, v, {
1417
+ formulaId: h,
1426
1418
  // formulaText: formula,
1427
1419
  ruleId: t
1428
1420
  });
@@ -1432,53 +1424,53 @@ let Ke = class extends he {
1432
1424
  originCol: u,
1433
1425
  originRow: c,
1434
1426
  isTransformable: d,
1435
- formulaId: m
1427
+ formulaId: h
1436
1428
  });
1437
1429
  }
1438
1430
  addRule(a, e, t) {
1439
1431
  const { ranges: o, formula1: n, uid: i, type: s } = t;
1440
- s !== q.CUSTOM || !n || !T(n) || this._addFormulaByRange(a, e, i, n, o);
1432
+ s !== X.CUSTOM || !n || !N(n) || this._addFormulaByRange(a, e, i, n, o);
1441
1433
  }
1442
1434
  updateRuleRanges(a, e, t, o, n) {
1443
1435
  const { formulaMap: i, ruleFormulaMap: s, formulaCellMap: l } = this._ensureMaps(a, e), d = s.get(t);
1444
1436
  if (!d)
1445
1437
  return;
1446
- const { formula: c, originCol: u, originRow: m, isTransformable: f, formulaId: h } = d, g = /* @__PURE__ */ new Set();
1438
+ const { formula: c, originCol: u, originRow: h, isTransformable: f, formulaId: m } = d, v = /* @__PURE__ */ new Set();
1447
1439
  o.forEach((R) => {
1448
- $.foreach(R, (_, V) => {
1440
+ U.foreach(R, (_, V) => {
1449
1441
  const S = i.getValue(_, V);
1450
1442
  S && S.ruleId === t && (S.temp = !0);
1451
1443
  });
1452
1444
  }), n.forEach((R) => {
1453
- $.foreach(R, (_, V) => {
1454
- var I;
1455
- const S = (I = i.getValue(_, V)) != null ? I : {};
1445
+ U.foreach(R, (_, V) => {
1446
+ var y;
1447
+ const S = (y = i.getValue(_, V)) != null ? y : {};
1456
1448
  if (S.ruleId !== t) {
1457
- const y = s.get(S.ruleId);
1458
- if (y != null && y.isTransformable && g.add(S.formulaId), f) {
1459
- const O = ja(this._lexerTreeBuilder, c, m, u, _, V), j = this._registerFormula(a, e, t, O);
1449
+ const w = s.get(S.ruleId);
1450
+ if (w != null && w.isTransformable && v.add(S.formulaId), f) {
1451
+ const F = ja(this._lexerTreeBuilder, c, h, u, _, V), x = this._registerFormula(a, e, t, F);
1460
1452
  i.setValue(_, V, {
1461
1453
  // formulaText: relativeText,
1462
1454
  ruleId: t,
1463
- formulaId: j
1464
- }), l.set(j, { row: _, column: V });
1455
+ formulaId: x
1456
+ }), l.set(x, { row: _, column: V });
1465
1457
  } else
1466
1458
  i.setValue(_, V, {
1467
1459
  // formulaText: formula,
1468
1460
  ruleId: t,
1469
- formulaId: h
1461
+ formulaId: m
1470
1462
  });
1471
1463
  } else
1472
1464
  S.temp = !1;
1473
1465
  });
1474
1466
  }), o.forEach((R) => {
1475
- $.foreach(R, (_, V) => {
1467
+ U.foreach(R, (_, V) => {
1476
1468
  const S = i.getValue(_, V);
1477
- S && S.ruleId === t && S.temp === !0 && (i.realDeleteValue(_, V), f && g.add(S.formulaId));
1469
+ S && S.ruleId === t && S.temp === !0 && (i.realDeleteValue(_, V), f && v.add(S.formulaId));
1478
1470
  });
1479
- }), g.forEach((R) => {
1471
+ }), v.forEach((R) => {
1480
1472
  l.delete(R);
1481
- }), this._registerOtherFormulaService.deleteFormula(a, e, Array.from(g.values()));
1473
+ }), this._registerOtherFormulaService.deleteFormula(a, e, Array.from(v.values()));
1482
1474
  }
1483
1475
  updateRuleFormula(a, e, t, o, n) {
1484
1476
  const { ruleFormulaMap: i } = this._ensureMaps(a, e), s = i.get(t);
@@ -1494,10 +1486,10 @@ let Ke = class extends he {
1494
1486
  }
1495
1487
  };
1496
1488
  Ke = Si([
1497
- pt(0, w(fr)),
1498
- pt(1, w(Ra)),
1499
- pt(2, w(K)),
1500
- pt(3, w(ht))
1489
+ vt(0, I(fr)),
1490
+ vt(1, I(Ra)),
1491
+ vt(2, I(K)),
1492
+ vt(3, I(mt))
1501
1493
  ], Ke);
1502
1494
  function Ce(r) {
1503
1495
  var a, e;
@@ -1506,15 +1498,15 @@ function Ce(r) {
1506
1498
  class Ri extends $e {
1507
1499
  constructor() {
1508
1500
  super(...arguments);
1509
- v(this, "id", q.CUSTOM);
1510
- v(this, "title", "dataValidation.custom.title");
1511
- v(this, "operators", []);
1512
- v(this, "scopes", ["sheet"]);
1513
- v(this, "formulaInput", Or);
1514
- v(this, "_customFormulaService", this.injector.get(Ke));
1501
+ g(this, "id", X.CUSTOM);
1502
+ g(this, "title", "dataValidation.custom.title");
1503
+ g(this, "operators", []);
1504
+ g(this, "scopes", ["sheet"]);
1505
+ g(this, "formulaInput", Or);
1506
+ g(this, "_customFormulaService", this.injector.get(Ke));
1515
1507
  }
1516
1508
  validatorFormula(e, t, o) {
1517
- const n = T(e.formula1);
1509
+ const n = N(e.formula1);
1518
1510
  return {
1519
1511
  success: n,
1520
1512
  formula1: n ? "" : this.localeService.t("dataValidation.validFail.formula")
@@ -1542,7 +1534,7 @@ var Ci = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, Mi = (r, a
1542
1534
  let ue = class extends he {
1543
1535
  constructor(a, e, t) {
1544
1536
  super();
1545
- v(this, "_formulaRuleMap", /* @__PURE__ */ new Map());
1537
+ g(this, "_formulaRuleMap", /* @__PURE__ */ new Map());
1546
1538
  this._registerOtherFormulaService = a, this._dataValidationCacheService = e, this._dataValidationModel = t, this._initFormulaResultHandler();
1547
1539
  }
1548
1540
  _initFormulaResultHandler() {
@@ -1569,7 +1561,7 @@ let ue = class extends he {
1569
1561
  return o || (o = /* @__PURE__ */ new Map(), t.set(e, o)), o;
1570
1562
  }
1571
1563
  addRule(a, e, t, o, n) {
1572
- const i = T(o), s = T(n);
1564
+ const i = N(o), s = N(n);
1573
1565
  if (!i && !s)
1574
1566
  return;
1575
1567
  const l = this._ensureRuleFormulaMap(a, e), d = [void 0, void 0];
@@ -1598,7 +1590,7 @@ let ue = class extends he {
1598
1590
  }
1599
1591
  const [l, d] = s;
1600
1592
  if ((l == null ? void 0 : l.text) !== o)
1601
- if (l && this._registerOtherFormulaService.deleteFormula(a, e, [l.id]), T(o)) {
1593
+ if (l && this._registerOtherFormulaService.deleteFormula(a, e, [l.id]), N(o)) {
1602
1594
  const c = this._registerOtherFormulaService.registerFormula(a, e, o, { ruleId: t });
1603
1595
  s[0] = {
1604
1596
  text: o,
@@ -1607,7 +1599,7 @@ let ue = class extends he {
1607
1599
  } else
1608
1600
  s[0] = void 0;
1609
1601
  if ((d == null ? void 0 : d.text) !== n)
1610
- if (d && this._registerOtherFormulaService.deleteFormula(a, e, [d.id]), T(n)) {
1602
+ if (d && this._registerOtherFormulaService.deleteFormula(a, e, [d.id]), N(n)) {
1611
1603
  const c = this._registerOtherFormulaService.registerFormula(a, e, n, { ruleId: t });
1612
1604
  s[1] = {
1613
1605
  text: n,
@@ -1639,23 +1631,23 @@ let ue = class extends he {
1639
1631
  }
1640
1632
  };
1641
1633
  ue = Mi([
1642
- Ut(0, w(fr)),
1643
- Ut(1, w(ht)),
1644
- Ut(2, w(K))
1634
+ Ut(0, I(fr)),
1635
+ Ut(1, I(mt)),
1636
+ Ut(2, I(K))
1645
1637
  ], ue);
1646
1638
  var wi = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, yi = (r, a, e, t) => {
1647
1639
  for (var o = t > 1 ? void 0 : t ? Ii(a, e) : a, n = r.length - 1, i; n >= 0; n--)
1648
1640
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
1649
1641
  return t && o && wi(a, e, o), o;
1650
1642
  }, $t = (r, a) => (e, t) => a(e, t, r);
1651
- const vt = 6;
1643
+ const gt = 6;
1652
1644
  let sa = class {
1653
1645
  constructor(r, a, e) {
1654
1646
  this._commandService = r, this._formulaService = a, this._themeService = e;
1655
1647
  }
1656
1648
  _calc(r, a) {
1657
1649
  var d, c, u;
1658
- const { vt: e, ht: t } = a || {}, o = r.endX - r.startX - vt * 2, n = r.endY - r.startY, i = ((d = a == null ? void 0 : a.fs) != null ? d : 10) * 1.6;
1650
+ const { vt: e, ht: t } = a || {}, o = r.endX - r.startX - gt * 2, n = r.endY - r.startY, i = ((d = a == null ? void 0 : a.fs) != null ? d : 10) * 1.6;
1659
1651
  let s = 0, l = 0;
1660
1652
  switch (e) {
1661
1653
  case de.TOP:
@@ -1670,13 +1662,13 @@ let sa = class {
1670
1662
  }
1671
1663
  switch (t) {
1672
1664
  case Ae.LEFT:
1673
- s = vt;
1665
+ s = gt;
1674
1666
  break;
1675
1667
  case Ae.RIGHT:
1676
- s = vt + (o - i);
1668
+ s = gt + (o - i);
1677
1669
  break;
1678
1670
  default:
1679
- s = vt + (o - i) / 2;
1671
+ s = gt + (o - i) / 2;
1680
1672
  break;
1681
1673
  }
1682
1674
  return {
@@ -1693,21 +1685,21 @@ let sa = class {
1693
1685
  }
1694
1686
  async _parseFormula(r, a, e) {
1695
1687
  var i, s;
1696
- const { formula1: t = Ot, formula2: o = la } = r, n = await this._formulaService.getRuleFormulaResult(a, e, r.uid);
1688
+ const { formula1: t = bt, formula2: o = la } = r, n = await this._formulaService.getRuleFormulaResult(a, e, r.uid);
1697
1689
  return {
1698
- formula1: T(t) ? Ce((i = n == null ? void 0 : n[0]) == null ? void 0 : i.result) : t,
1699
- formula2: T(o) ? Ce((s = n == null ? void 0 : n[1]) == null ? void 0 : s.result) : o
1690
+ formula1: N(t) ? Ce((i = n == null ? void 0 : n[0]) == null ? void 0 : i.result) : t,
1691
+ formula2: N(o) ? Ce((s = n == null ? void 0 : n[1]) == null ? void 0 : s.result) : o
1700
1692
  };
1701
1693
  }
1702
1694
  drawWith(r, a) {
1703
- var N, A, F, B, Y;
1704
- const { style: e, data: t, primaryWithCoord: o, unitId: n, subUnitId: i } = a, s = o.isMergedMainCell ? o.mergeInfo : o, l = ne(t), d = (N = t.dataValidation) == null ? void 0 : N.rule, c = (A = t.dataValidation) == null ? void 0 : A.validator;
1695
+ var $, E, P, A, q;
1696
+ const { style: e, data: t, primaryWithCoord: o, unitId: n, subUnitId: i } = a, s = o.isMergedMainCell ? o.mergeInfo : o, l = ne(t), d = ($ = t.dataValidation) == null ? void 0 : $.rule, c = (E = t.dataValidation) == null ? void 0 : E.validator;
1705
1697
  if (!d || !c)
1706
1698
  return;
1707
1699
  const u = this._themeService.getCurrentTheme();
1708
1700
  if (!c.skipDefaultFontRender(d, l, { unitId: n, subUnitId: i }))
1709
1701
  return;
1710
- const { formula1: m = Ot } = d, f = this._calc(s, e), { a: h, d: g } = r.getTransform(), R = Aa(f.left, h), _ = Aa(f.top, g), V = $o.create().composeMatrix({
1702
+ const { formula1: h = bt } = d, f = this._calc(s, e), { a: m, d: v } = r.getTransform(), R = Aa(f.left, m), _ = Aa(f.top, v), V = $o.create().composeMatrix({
1711
1703
  left: R,
1712
1704
  top: _,
1713
1705
  scaleX: 1,
@@ -1717,16 +1709,16 @@ let sa = class {
1717
1709
  skewY: 0,
1718
1710
  flipX: !1,
1719
1711
  flipY: !1
1720
- }), S = s.endX - s.startX, I = s.endY - s.startY;
1721
- r.save(), r.beginPath(), r.rect(s.startX, s.startY, S, I), r.clip();
1722
- const y = V.getMatrix();
1723
- r.transform(y[0], y[1], y[2], y[3], y[4], y[5]);
1724
- const O = ((F = e == null ? void 0 : e.fs) != null ? F : 10) * 1.6, j = String(l) === String(m), P = u.hyacinth500;
1712
+ }), S = s.endX - s.startX, y = s.endY - s.startY;
1713
+ r.save(), r.beginPath(), r.rect(s.startX, s.startY, S, y), r.clip();
1714
+ const w = V.getMatrix();
1715
+ r.transform(w[0], w[1], w[2], w[3], w[4], w[5]);
1716
+ const F = ((P = e == null ? void 0 : e.fs) != null ? P : 10) * 1.6, x = String(l) === String(h), j = u.hyacinth500;
1725
1717
  Wo.drawWith(r, {
1726
- checked: j,
1727
- width: O,
1728
- height: O,
1729
- fill: (Y = (B = e == null ? void 0 : e.cl) == null ? void 0 : B.rgb) != null ? Y : P
1718
+ checked: x,
1719
+ width: F,
1720
+ height: F,
1721
+ fill: (q = (A = e == null ? void 0 : e.cl) == null ? void 0 : A.rgb) != null ? q : j
1730
1722
  }), r.restore();
1731
1723
  }
1732
1724
  isHit(r, a) {
@@ -1734,10 +1726,10 @@ let sa = class {
1734
1726
  return l <= s && l >= i && d <= n && d >= o;
1735
1727
  }
1736
1728
  async onPointerDown(r, a) {
1737
- var m, f;
1729
+ var h, f;
1738
1730
  if (a.button === 2)
1739
1731
  return;
1740
- const { primaryWithCoord: e, unitId: t, subUnitId: o, data: n } = r, i = ne(n), s = (m = n.dataValidation) == null ? void 0 : m.rule, l = (f = n.dataValidation) == null ? void 0 : f.validator;
1732
+ const { primaryWithCoord: e, unitId: t, subUnitId: o, data: n } = r, i = ne(n), s = (h = n.dataValidation) == null ? void 0 : h.rule, l = (f = n.dataValidation) == null ? void 0 : f.validator;
1741
1733
  if (!s || !l || !l.skipDefaultFontRender(s, i, { unitId: t, subUnitId: o }))
1742
1734
  return;
1743
1735
  const { formula1: d, formula2: c } = await this._parseFormula(s, t, o), u = {
@@ -1760,27 +1752,27 @@ let sa = class {
1760
1752
  };
1761
1753
  sa = yi([
1762
1754
  $t(0, re),
1763
- $t(1, w(ue)),
1764
- $t(2, w(Qr))
1755
+ $t(1, I(ue)),
1756
+ $t(2, I(Qr))
1765
1757
  ], sa);
1766
- const Ot = 1, la = 0;
1758
+ const bt = 1, la = 0;
1767
1759
  class Di extends $e {
1768
1760
  constructor() {
1769
1761
  super(...arguments);
1770
- v(this, "id", q.CHECKBOX);
1771
- v(this, "title", "dataValidation.checkbox.title");
1772
- v(this, "operators", []);
1773
- v(this, "scopes", ["sheet"]);
1774
- v(this, "formulaInput", Tr);
1775
- v(this, "canvasRender", this.injector.createInstance(sa));
1776
- v(this, "_formulaService", this.injector.get(ue));
1762
+ g(this, "id", X.CHECKBOX);
1763
+ g(this, "title", "dataValidation.checkbox.title");
1764
+ g(this, "operators", []);
1765
+ g(this, "scopes", ["sheet"]);
1766
+ g(this, "formulaInput", Tr);
1767
+ g(this, "canvasRender", this.injector.createInstance(sa));
1768
+ g(this, "_formulaService", this.injector.get(ue));
1777
1769
  }
1778
1770
  skipDefaultFontRender(e, t, o) {
1779
1771
  const { formula1: n, formula2: i } = this.parseFormulaSync(e, o.unitId, o.subUnitId), s = `${t != null ? t : ""}`;
1780
1772
  return !s || s === `${n}` || s === `${i}`;
1781
1773
  }
1782
1774
  validatorFormula(e, t, o) {
1783
- const { formula1: n, formula2: i } = e, s = !U.isBlank(n), l = !U.isBlank(i), d = n === i;
1775
+ const { formula1: n, formula2: i } = e, s = !B.isBlank(n), l = !B.isBlank(i), d = n === i;
1784
1776
  return {
1785
1777
  success: s && l && !d || !s && !l,
1786
1778
  formula1: s ? d ? this.localeService.t("dataValidation.validFail.checkboxEqual") : "" : this.localeService.t("dataValidation.validFail.common"),
@@ -1789,29 +1781,29 @@ class Di extends $e {
1789
1781
  }
1790
1782
  async parseFormula(e, t, o) {
1791
1783
  var l, d;
1792
- const { formula1: n = Ot, formula2: i = la } = e, s = await this._formulaService.getRuleFormulaResult(t, o, e.uid);
1784
+ const { formula1: n = bt, formula2: i = la } = e, s = await this._formulaService.getRuleFormulaResult(t, o, e.uid);
1793
1785
  return {
1794
- formula1: T(n) ? Ce((l = s == null ? void 0 : s[0]) == null ? void 0 : l.result) : n,
1795
- formula2: T(i) ? Ce((d = s == null ? void 0 : s[1]) == null ? void 0 : d.result) : i
1786
+ formula1: N(n) ? Ce((l = s == null ? void 0 : s[0]) == null ? void 0 : l.result) : n,
1787
+ formula2: N(i) ? Ce((d = s == null ? void 0 : s[1]) == null ? void 0 : d.result) : i
1796
1788
  };
1797
1789
  }
1798
1790
  parseFormulaSync(e, t, o) {
1799
1791
  var l, d;
1800
- const { formula1: n = Ot, formula2: i = la } = e, s = this._formulaService.getRuleFormulaResultSync(t, o, e.uid);
1792
+ const { formula1: n = bt, formula2: i = la } = e, s = this._formulaService.getRuleFormulaResultSync(t, o, e.uid);
1801
1793
  return {
1802
- formula1: T(n) ? Ce((l = s == null ? void 0 : s[0]) == null ? void 0 : l.result) : n,
1803
- formula2: T(i) ? Ce((d = s == null ? void 0 : s[1]) == null ? void 0 : d.result) : i
1794
+ formula1: N(n) ? Ce((l = s == null ? void 0 : s[0]) == null ? void 0 : l.result) : n,
1795
+ formula2: N(i) ? Ce((d = s == null ? void 0 : s[1]) == null ? void 0 : d.result) : i
1804
1796
  };
1805
1797
  }
1806
1798
  async isValidType(e, t, o) {
1807
1799
  const { value: n, unitId: i, subUnitId: s } = e, { formula1: l, formula2: d } = await this.parseFormula(o, i, s);
1808
- return !U.isDefine(l) || !U.isDefine(d) ? !0 : U.isDefine(n) && (String(n) === String(l) || String(n) === String(d));
1800
+ return !B.isDefine(l) || !B.isDefine(d) ? !0 : B.isDefine(n) && (String(n) === String(l) || String(n) === String(d));
1809
1801
  }
1810
1802
  generateRuleErrorMessage(e) {
1811
1803
  return this.localeService.t("dataValidation.checkbox.error");
1812
1804
  }
1813
1805
  }
1814
- const st = [
1806
+ const lt = [
1815
1807
  C.BETWEEN,
1816
1808
  C.NOT_BETWEEN
1817
1809
  ], Wt = 86400;
@@ -1861,7 +1853,7 @@ const Ti = {
1861
1853
  [C.LESS_THAN_OR_EQUAL]: "dataValidation.date.ruleName.lessThanOrEqual",
1862
1854
  [C.NOT_BETWEEN]: "dataValidation.date.ruleName.notBetween",
1863
1855
  [C.NOT_EQUAL]: "dataValidation.date.ruleName.notEqual"
1864
- }, Ni = {
1856
+ }, Fi = {
1865
1857
  [C.BETWEEN]: "dataValidation.date.errorMsg.between",
1866
1858
  [C.EQUAL]: "dataValidation.date.errorMsg.equal",
1867
1859
  [C.GREATER_THAN]: "dataValidation.date.errorMsg.greaterThan",
@@ -1870,16 +1862,16 @@ const Ti = {
1870
1862
  [C.LESS_THAN_OR_EQUAL]: "dataValidation.date.errorMsg.lessThanOrEqual",
1871
1863
  [C.NOT_BETWEEN]: "dataValidation.date.errorMsg.notBetween",
1872
1864
  [C.NOT_EQUAL]: "dataValidation.date.errorMsg.notEqual"
1873
- }, Wa = "{FORMULA1}", Ha = "{FORMULA2}", ka = (r) => je(r).isValid(), gt = (r) => {
1865
+ }, Wa = "{FORMULA1}", Ha = "{FORMULA2}", ka = (r) => je(r).isValid(), _t = (r) => {
1874
1866
  if (!(r == null || typeof r == "boolean"))
1875
1867
  return typeof r == "number" || !Number.isNaN(+r) ? je(Oi(+r)) : je(r);
1876
1868
  };
1877
- class Fi extends $e {
1869
+ class Ni extends $e {
1878
1870
  constructor() {
1879
1871
  super(...arguments);
1880
- v(this, "id", q.DATE);
1881
- v(this, "title", "dataValidation.date.title");
1882
- v(this, "operators", [
1872
+ g(this, "id", X.DATE);
1873
+ g(this, "title", "dataValidation.date.title");
1874
+ g(this, "operators", [
1883
1875
  C.BETWEEN,
1884
1876
  C.EQUAL,
1885
1877
  C.GREATER_THAN,
@@ -1889,18 +1881,18 @@ class Fi extends $e {
1889
1881
  C.NOT_BETWEEN,
1890
1882
  C.NOT_EQUAL
1891
1883
  ]);
1892
- v(this, "scopes", ["sheet"]);
1893
- v(this, "formulaInput", ut);
1894
- v(this, "dropdown", jr);
1895
- v(this, "_formulaService", this.injector.get(ue));
1896
- v(this, "transformDate", gt);
1884
+ g(this, "scopes", ["sheet"]);
1885
+ g(this, "formulaInput", ht);
1886
+ g(this, "dropdown", jr);
1887
+ g(this, "_formulaService", this.injector.get(ue));
1888
+ g(this, "transformDate", _t);
1897
1889
  }
1898
1890
  async parseFormula(e, t, o) {
1899
1891
  var l, d;
1900
1892
  const n = await this._formulaService.getRuleFormulaResult(t, o, e.uid), { formula1: i, formula2: s } = e;
1901
1893
  return {
1902
- formula1: gt(T(i) ? Ce((l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) : i),
1903
- formula2: gt(T(s) ? Ce((d = n == null ? void 0 : n[1]) == null ? void 0 : d.result) : s)
1894
+ formula1: _t(N(i) ? Ce((l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) : i),
1895
+ formula2: _t(N(s) ? Ce((d = n == null ? void 0 : n[1]) == null ? void 0 : d.result) : s)
1904
1896
  };
1905
1897
  }
1906
1898
  async isValidType(e) {
@@ -1908,7 +1900,7 @@ class Fi extends $e {
1908
1900
  return typeof t == "string" ? je(t).isValid() : typeof t == "number";
1909
1901
  }
1910
1902
  _validatorSingleFormula(e) {
1911
- return !U.isBlank(e) && (T(e) || !Number.isNaN(+e) || !!e && je(e).isValid());
1903
+ return !B.isBlank(e) && (N(e) || !Number.isNaN(+e) || !!e && je(e).isValid());
1912
1904
  }
1913
1905
  validatorFormula(e, t, o) {
1914
1906
  const n = e.operator;
@@ -1917,7 +1909,7 @@ class Fi extends $e {
1917
1909
  success: !1
1918
1910
  };
1919
1911
  const i = this._validatorSingleFormula(e.formula1), s = this.localeService.t("dataValidation.validFail.date");
1920
- if (st.includes(n)) {
1912
+ if (lt.includes(n)) {
1921
1913
  const d = this._validatorSingleFormula(e.formula2);
1922
1914
  return {
1923
1915
  success: i && d,
@@ -1934,7 +1926,7 @@ class Fi extends $e {
1934
1926
  const { value: n } = e;
1935
1927
  return {
1936
1928
  ...e,
1937
- value: gt(n)
1929
+ value: _t(n)
1938
1930
  };
1939
1931
  }
1940
1932
  async validatorIsEqual(e, t, o) {
@@ -1976,14 +1968,14 @@ class Fi extends $e {
1976
1968
  return n ? o.isBefore(n) || o.isSame(n) : !0;
1977
1969
  }
1978
1970
  validatorFormulaValue(e) {
1979
- if (!U.isDefine(e.operator))
1971
+ if (!B.isDefine(e.operator))
1980
1972
  return;
1981
- if (st.includes(e.operator)) {
1982
- if (U.isBlank(e.formula1) || U.isBlank(e.formula2))
1973
+ if (lt.includes(e.operator)) {
1974
+ if (B.isBlank(e.formula1) || B.isBlank(e.formula2))
1983
1975
  return "";
1984
1976
  if (!ka(e.formula1) || !ka(e.formula2))
1985
1977
  return "";
1986
- } else if (U.isBlank(e.formula1))
1978
+ } else if (B.isBlank(e.formula1))
1987
1979
  return "";
1988
1980
  }
1989
1981
  get operatorNames() {
@@ -1998,7 +1990,7 @@ class Fi extends $e {
1998
1990
  }
1999
1991
  generateRuleErrorMessage(e) {
2000
1992
  var o, n;
2001
- return e.operator ? `${this.localeService.t(Ni[e.operator]).replace(Wa, (o = e.formula1) != null ? o : "").replace(Ha, (n = e.formula2) != null ? n : "")}` : this.titleStr;
1993
+ return e.operator ? `${this.localeService.t(Fi[e.operator]).replace(Wa, (o = e.formula1) != null ? o : "").replace(Ha, (n = e.formula2) != null ? n : "")}` : this.titleStr;
2002
1994
  }
2003
1995
  }
2004
1996
  var Li = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, Ai = (r, a, e, t) => {
@@ -2006,7 +1998,7 @@ var Li = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, Ai = (r, a
2006
1998
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
2007
1999
  return t && o && Li(a, e, o), o;
2008
2000
  }, Ya = (r, a) => (e, t) => a(e, t, r);
2009
- const ke = 4, xi = 6, fe = 14, Te = 6, we = 4, ji = "#565656", Ga = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2001
+ const ke = 4, xi = 6, fe = 14, Te = 6, we = 4, ji = "#565656", Xa = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2010
2002
  function Bi(r, a) {
2011
2003
  const e = r.length;
2012
2004
  return {
@@ -2047,7 +2039,7 @@ function Bi(r, a) {
2047
2039
  }
2048
2040
  };
2049
2041
  }
2050
- function Nr(r, a, e) {
2042
+ function Fr(r, a, e) {
2051
2043
  const t = Bi(r, e), o = new Kr(t), n = new Ho(o);
2052
2044
  return {
2053
2045
  documentSkeleton: ko.create(n, a),
@@ -2060,9 +2052,9 @@ function Ht(r, a, e) {
2060
2052
  documentSkeleton: t,
2061
2053
  docModel: o,
2062
2054
  docViewModel: n
2063
- } = Nr(r, a, e);
2055
+ } = Fr(r, a, e);
2064
2056
  return {
2065
- documents: new Yo(`DOCUMENTS_${U.generateRandomId()}`, t, {
2057
+ documents: new Yo(`DOCUMENTS_${B.generateRandomId()}`, t, {
2066
2058
  pageMarginLeft: 0,
2067
2059
  pageMarginTop: 0
2068
2060
  }),
@@ -2071,7 +2063,7 @@ function Ht(r, a, e) {
2071
2063
  docViewModel: n
2072
2064
  };
2073
2065
  }
2074
- function Xa(r, a, e, t, o, n) {
2066
+ function Ga(r, a, e, t, o, n) {
2075
2067
  let i = 0;
2076
2068
  switch (o) {
2077
2069
  case de.BOTTOM:
@@ -2101,10 +2093,10 @@ function Xa(r, a, e, t, o, n) {
2101
2093
  var Zt;
2102
2094
  let da = (Zt = class {
2103
2095
  constructor(r, a) {
2104
- v(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2105
- v(this, "zIndex");
2106
- v(this, "onPointerEnter");
2107
- v(this, "onPointerLeave");
2096
+ g(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2097
+ g(this, "zIndex");
2098
+ g(this, "onPointerEnter");
2099
+ g(this, "onPointerLeave");
2108
2100
  this._localeService = r, this._commandService = a;
2109
2101
  }
2110
2102
  _ensureMap(r) {
@@ -2116,36 +2108,36 @@ let da = (Zt = class {
2116
2108
  }
2117
2109
  _drawDownIcon(r, a, e, t, o) {
2118
2110
  const n = e - fe + 4;
2119
- let i = 4;
2111
+ let i = 9;
2120
2112
  switch (o) {
2121
2113
  case de.MIDDLE:
2122
2114
  i = (t - fe) / 2 + 4;
2123
2115
  break;
2124
2116
  case de.BOTTOM:
2125
- i = t - fe + 4;
2117
+ i = t - fe - 1;
2126
2118
  break;
2127
2119
  }
2128
- r.save(), r.translateWithPrecision(a.startX + n, a.startY + i), r.fillStyle = "#565656", r.fill(Ga), r.restore();
2120
+ r.save(), r.translateWithPrecision(a.startX + n, a.startY + i), r.fillStyle = "#565656", r.fill(Xa), r.restore();
2129
2121
  }
2130
2122
  // eslint-disable-next-line max-lines-per-function
2131
2123
  drawWith(r, a, e) {
2132
- var Y, x;
2133
- const { primaryWithCoord: t, row: o, col: n, style: i, data: s, subUnitId: l } = a, d = t.isMergedMainCell ? t.mergeInfo : t, c = (Y = s.dataValidation) == null ? void 0 : Y.rule, u = (x = s.dataValidation) == null ? void 0 : x.validator, m = s.fontRenderExtension, { leftOffset: f = 0, rightOffset: h = 0, topOffset: g = 0, downOffset: R = 0 } = m || {};
2124
+ var q, L;
2125
+ const { primaryWithCoord: t, row: o, col: n, style: i, data: s, subUnitId: l } = a, d = t.isMergedMainCell ? t.mergeInfo : t, c = (q = s.dataValidation) == null ? void 0 : q.rule, u = (L = s.dataValidation) == null ? void 0 : L.validator, h = s.fontRenderExtension, { leftOffset: f = 0, rightOffset: m = 0, topOffset: v = 0, downOffset: R = 0 } = h || {};
2134
2126
  if (!c || !u || !u.skipDefaultFontRender(c))
2135
2127
  return;
2136
2128
  const _ = {
2137
2129
  startX: d.startX + f,
2138
- endX: d.endX - h,
2139
- startY: d.startY + g,
2130
+ endX: d.endX - m,
2131
+ startY: d.startY + v,
2140
2132
  endY: d.endY - R
2141
- }, V = _.endX - _.startX, S = _.endY - _.startY, I = this._ensureMap(l), y = this._generateKey(o, n), O = u.getListWithColor(c), j = ne(s), P = `${j != null ? j : ""}`, N = O.find((L) => L.label === P);
2142
- let { tb: A, vt: F, ht: B } = i || {};
2143
- if (A = A != null ? A : pe.WRAP, F = F != null ? F : de.BOTTOM, B = B != null ? B : Ae.LEFT, c.renderMode === ce.ARROW) {
2144
- this._drawDownIcon(r, _, V, S, F), r.save(), r.translateWithPrecision(_.startX, _.startY), r.beginPath(), r.rect(0, 0, V, S), r.clip();
2145
- const L = V - fe, { documentSkeleton: G, documents: te, docModel: H } = Ht(P, this._localeService, i);
2146
- A === pe.WRAP && H.updateDocumentDataPageSize(Math.max(L, 1)), G.calculate(), G.getActualSize();
2147
- const M = mt(G), { height: b, width: Z } = M, { paddingTop: X, paddingLeft: me } = Xa(L, S, Z, b, F, B);
2148
- r.translate(0, X), r.save(), r.translateWithPrecision(ke, 0), r.beginPath(), r.rect(0, 0, L, b), r.clip(), te.render(r), r.translateWithPrecision(me, 0), r.restore(), r.restore(), I.set(y, {
2133
+ }, V = _.endX - _.startX, S = _.endY - _.startY, y = this._ensureMap(l), w = this._generateKey(o, n), F = u.getListWithColor(c), x = ne(s), j = `${x != null ? x : ""}`, $ = F.find((b) => b.label === j);
2134
+ let { tb: E, vt: P, ht: A } = i || {};
2135
+ if (E = E != null ? E : pe.WRAP, P = P != null ? P : de.BOTTOM, A = A != null ? A : Ae.LEFT, c.renderMode === ce.ARROW) {
2136
+ this._drawDownIcon(r, _, V, S, P), r.save(), r.translateWithPrecision(_.startX, _.startY), r.beginPath(), r.rect(0, 0, V, S), r.clip();
2137
+ const b = V - fe, { documentSkeleton: Y, documents: Z, docModel: H } = Ht(j, this._localeService, i);
2138
+ E === pe.WRAP && H.updateDocumentDataPageSize(Math.max(b, 1)), Y.calculate(), Y.getActualSize();
2139
+ const M = ft(Y), { height: O, width: J } = M, { paddingTop: G, paddingLeft: me } = Ga(b, S, J, O, P, A);
2140
+ r.translate(0, G), r.save(), r.translateWithPrecision(ke, 0), r.beginPath(), r.rect(0, 0, b, O), r.clip(), Z.render(r), r.translateWithPrecision(me, 0), r.restore(), r.restore(), y.set(w, {
2149
2141
  left: _.endX + e.rowHeaderWidth - fe,
2150
2142
  top: _.startY + e.columnHeaderHeight,
2151
2143
  width: fe,
@@ -2153,19 +2145,19 @@ let da = (Zt = class {
2153
2145
  });
2154
2146
  } else {
2155
2147
  r.save(), r.translateWithPrecision(_.startX, _.startY), r.beginPath(), r.rect(0, 0, V, S), r.clip();
2156
- const L = V - Te * 2 - ke - fe, { documentSkeleton: G, documents: te, docModel: H } = Ht(P, this._localeService, i);
2157
- A === pe.WRAP && H.updateDocumentDataPageSize(Math.max(L, 1)), G.calculate();
2158
- const M = mt(G), { height: b, width: Z } = M, { paddingTop: X, paddingLeft: me } = Xa(L, S, Z, b, F, B);
2159
- r.translate(Te, X);
2160
- const D = Math.max(V - Te * 2, 1), W = b;
2148
+ const b = V - Te * 2 - ke - fe, { documentSkeleton: Y, documents: Z, docModel: H } = Ht(j, this._localeService, i);
2149
+ E === pe.WRAP && H.updateDocumentDataPageSize(Math.max(b, 1)), Y.calculate();
2150
+ const M = ft(Y), { height: O, width: J } = M, { paddingTop: G, paddingLeft: me } = Ga(b, S, J, O, P, A);
2151
+ r.translate(Te, G);
2152
+ const D = Math.max(V - Te * 2, 1), W = O;
2161
2153
  dr.drawWith(r, {
2162
2154
  width: D,
2163
2155
  height: W,
2164
- fill: (N == null ? void 0 : N.color) || Fe,
2156
+ fill: ($ == null ? void 0 : $.color) || Ne,
2165
2157
  radius: 8
2166
- }), r.save(), r.translateWithPrecision(ke, 0), r.beginPath(), r.rect(0, 0, L, b), r.clip(), r.translateWithPrecision(me, 0), te.render(r), r.restore(), r.translate(L + ke + 4, (b - xi) / 2), r.fillStyle = ji, r.fill(Ga), r.restore(), I.set(y, {
2158
+ }), r.save(), r.translateWithPrecision(ke, 0), r.beginPath(), r.rect(0, 0, b, O), r.clip(), r.translateWithPrecision(me, 0), Z.render(r), r.restore(), r.translate(b + ke + 4, (O - xi) / 2), r.fillStyle = ji, r.fill(Xa), r.restore(), y.set(w, {
2167
2159
  left: _.startX + Te + e.rowHeaderWidth,
2168
- top: _.startY + X + e.columnHeaderHeight,
2160
+ top: _.startY + G + e.columnHeaderHeight,
2169
2161
  width: D,
2170
2162
  height: W
2171
2163
  });
@@ -2181,28 +2173,28 @@ let da = (Zt = class {
2181
2173
  endX: o.endX - s,
2182
2174
  startY: o.startY + l,
2183
2175
  endY: o.endY - d
2184
- }, m = u.endX - u.startX, f = ne(t), h = `${f != null ? f : ""}`;
2185
- let { tb: g } = e || {};
2186
- if (g = g != null ? g : pe.WRAP, c.renderMode === ce.ARROW) {
2187
- const _ = m - fe, { documentSkeleton: V, docModel: S } = Ht(h, this._localeService, e);
2188
- g === pe.WRAP && S.updateDocumentDataPageSize(Math.max(_, 1)), V.calculate(), V.getActualSize();
2189
- const I = mt(V), { height: y } = I;
2190
- return y;
2176
+ }, h = u.endX - u.startX, f = ne(t), m = `${f != null ? f : ""}`;
2177
+ let { tb: v } = e || {};
2178
+ if (v = v != null ? v : pe.WRAP, c.renderMode === ce.ARROW) {
2179
+ const _ = h - fe, { documentSkeleton: V, docModel: S } = Ht(m, this._localeService, e);
2180
+ v === pe.WRAP && S.updateDocumentDataPageSize(Math.max(_, 1)), V.calculate(), V.getActualSize();
2181
+ const y = ft(V), { height: w } = y;
2182
+ return w;
2191
2183
  } else {
2192
- const _ = m - Te * 2 - ke - fe, { documentSkeleton: V, docModel: S } = Nr(h, this._localeService, e);
2193
- g === pe.WRAP && S.updateDocumentDataPageSize(Math.max(_, 1)), V.calculate();
2194
- const I = mt(V), {
2195
- height: y
2196
- } = I;
2197
- return y + we * 2;
2184
+ const _ = h - Te * 2 - ke - fe, { documentSkeleton: V, docModel: S } = Fr(m, this._localeService, e);
2185
+ v === pe.WRAP && S.updateDocumentDataPageSize(Math.max(_, 1)), V.calculate();
2186
+ const y = ft(V), {
2187
+ height: w
2188
+ } = y;
2189
+ return w + we * 2;
2198
2190
  }
2199
2191
  }
2200
2192
  isHit(r, a) {
2201
2193
  const { data: e, subUnitId: t, row: o, col: n } = a, s = this._ensureMap(t).get(this._generateKey(o, n)), l = e.dataValidation;
2202
2194
  if (!l || !s || l.rule.renderMode === ce.TEXT)
2203
2195
  return !1;
2204
- const { top: d, left: c, width: u, height: m } = s, { x: f, y: h } = r;
2205
- return f >= c && f <= c + u && h >= d && h <= d + m;
2196
+ const { top: d, left: c, width: u, height: h } = s, { x: f, y: m } = r;
2197
+ return f >= c && f <= c + u && m >= d && m <= d + h;
2206
2198
  }
2207
2199
  onPointerDown(r, a) {
2208
2200
  if (a.button === 2)
@@ -2215,27 +2207,27 @@ let da = (Zt = class {
2215
2207
  };
2216
2208
  this._commandService.executeCommand(Va.id, i);
2217
2209
  }
2218
- }, v(Zt, "padding", {
2210
+ }, g(Zt, "padding", {
2219
2211
  l: Te + ke,
2220
2212
  r: fe + Te,
2221
2213
  t: we,
2222
2214
  b: we
2223
2215
  }), Zt);
2224
2216
  da = Ai([
2225
- Ya(0, w(ie)),
2217
+ Ya(0, I(ie)),
2226
2218
  Ya(1, re)
2227
2219
  ], da);
2228
2220
  const Ui = "LIST_RENDER_MODE_OPTION_INPUT";
2229
- function bt(r) {
2221
+ function Tt(r) {
2230
2222
  var o;
2231
- const { value: a, onChange: e } = r, t = E(ie);
2223
+ const { value: a, onChange: e } = r, t = T(ie);
2232
2224
  return /* @__PURE__ */ p.jsx(Q, { label: t.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ p.jsxs(Sa, { value: `${(o = a.renderMode) != null ? o : ce.CUSTOM}`, onChange: (n) => e({ ...a, renderMode: +n }), children: [
2233
2225
  /* @__PURE__ */ p.jsx(Le, { value: `${ce.CUSTOM}`, children: t.t("dataValidation.renderMode.chip") }),
2234
2226
  /* @__PURE__ */ p.jsx(Le, { value: `${ce.ARROW}`, children: t.t("dataValidation.renderMode.arrow") }),
2235
2227
  /* @__PURE__ */ p.jsx(Le, { value: `${ce.TEXT}`, children: t.t("dataValidation.renderMode.text") })
2236
2228
  ] }) });
2237
2229
  }
2238
- bt.componentKey = Ui;
2230
+ Tt.componentKey = Ui;
2239
2231
  function kt(r) {
2240
2232
  if (!r)
2241
2233
  return [];
@@ -2256,7 +2248,7 @@ const $i = [
2256
2248
  "offset"
2257
2249
  ];
2258
2250
  function Wi(r, a) {
2259
- if (!T(r) || Ca(r.slice(1)))
2251
+ if (!N(r) || Ca(r.slice(1)))
2260
2252
  return !0;
2261
2253
  const t = a.sequenceNodesBuilder(r);
2262
2254
  return t && t.some((o) => typeof o == "object" && o.nodeType === en.FUNCTION && $i.indexOf(o.token.toLowerCase()) > -1);
@@ -2270,27 +2262,27 @@ function Hi(r, a) {
2270
2262
  }
2271
2263
  return !1;
2272
2264
  }
2273
- class Fr extends $e {
2265
+ class Nr extends $e {
2274
2266
  constructor() {
2275
2267
  super(...arguments);
2276
- v(this, "formulaService", this.injector.get(ue));
2277
- v(this, "_lexer", this.injector.get(Ra));
2278
- v(this, "_univerInstanceService", this.injector.get(ee));
2279
- v(this, "id", q.LIST);
2280
- v(this, "title", "dataValidation.list.title");
2281
- v(this, "operators", []);
2282
- v(this, "scopes", ["sheet"]);
2283
- v(this, "formulaInput", br);
2284
- v(this, "canvasRender", this.injector.createInstance(da));
2285
- v(this, "dropdown", xr);
2286
- v(this, "optionsInput", bt.componentKey);
2268
+ g(this, "formulaService", this.injector.get(ue));
2269
+ g(this, "_lexer", this.injector.get(Ra));
2270
+ g(this, "_univerInstanceService", this.injector.get(te));
2271
+ g(this, "id", X.LIST);
2272
+ g(this, "title", "dataValidation.list.title");
2273
+ g(this, "operators", []);
2274
+ g(this, "scopes", ["sheet"]);
2275
+ g(this, "formulaInput", br);
2276
+ g(this, "canvasRender", this.injector.createInstance(da));
2277
+ g(this, "dropdown", xr);
2278
+ g(this, "optionsInput", Tt.componentKey);
2287
2279
  }
2288
2280
  skipDefaultFontRender(e) {
2289
2281
  return e.renderMode !== ce.TEXT;
2290
2282
  }
2291
2283
  validatorFormula(e, t, o) {
2292
2284
  var d, c, u;
2293
- const n = !U.isBlank(e.formula1), i = Wi((d = e.formula1) != null ? d : "", this._lexer), s = (u = (c = this._univerInstanceService.getUnit(t, ae.UNIVER_SHEET)) == null ? void 0 : c.getSheetBySheetId(o)) == null ? void 0 : u.getName(), l = Hi(e, s != null ? s : "");
2285
+ const n = !B.isBlank(e.formula1), i = Wi((d = e.formula1) != null ? d : "", this._lexer), s = (u = (c = this._univerInstanceService.getUnit(t, ae.UNIVER_SHEET)) == null ? void 0 : c.getSheetBySheetId(o)) == null ? void 0 : u.getName(), l = Hi(e, s != null ? s : "");
2294
2286
  return {
2295
2287
  success: !!(n && i && !l),
2296
2288
  formula1: n ? i ? l ? this.localeService.t("dataValidation.validFail.listIntersects") : void 0 : this.localeService.t("dataValidation.validFail.listInvalid") : this.localeService.t("dataValidation.validFail.list")
@@ -2298,13 +2290,13 @@ class Fr extends $e {
2298
2290
  }
2299
2291
  parseCellValue(e) {
2300
2292
  const t = e.toString();
2301
- return Xe(t);
2293
+ return Ge(t);
2302
2294
  }
2303
2295
  async parseFormula(e, t, o) {
2304
2296
  var s;
2305
2297
  const { formula1: n = "" } = e, i = await this.formulaService.getRuleFormulaResult(t, o, e.uid);
2306
2298
  return {
2307
- formula1: T(n) ? kt((s = i == null ? void 0 : i[0]) == null ? void 0 : s.result) : Xe(n),
2299
+ formula1: N(n) ? kt((s = i == null ? void 0 : i[0]) == null ? void 0 : s.result) : Ge(n),
2308
2300
  formula2: void 0
2309
2301
  };
2310
2302
  }
@@ -2319,20 +2311,22 @@ class Fr extends $e {
2319
2311
  return this.localeService.t("dataValidation.list.error");
2320
2312
  }
2321
2313
  getList(e, t, o) {
2322
- var m, f, h;
2323
- const { formula1: n = "" } = e, i = this.injector.get(ee), s = (m = t ? i.getUniverSheetInstance(t) : void 0) != null ? m : i.getCurrentUnitForType(ae.UNIVER_SHEET);
2324
- if (!s)
2325
- return [];
2326
- const l = (f = o ? s.getSheetBySheetId(o) : void 0) != null ? f : s.getActiveSheet(), d = s.getUnitId(), c = l.getSheetId(), u = this.formulaService.getRuleFormulaResultSync(d, c, e.uid);
2327
- return T(n) ? kt((h = u == null ? void 0 : u[0]) == null ? void 0 : h.result) : Xe(n);
2314
+ var h, f, m;
2315
+ const { formula1: n = "" } = e, i = this.injector.get(te), s = (h = t ? i.getUniverSheetInstance(t) : void 0) != null ? h : i.getCurrentUnitForType(ae.UNIVER_SHEET);
2316
+ if (!s) return [];
2317
+ const l = (f = o ? s.getSheetBySheetId(o) : void 0) != null ? f : s.getActiveSheet();
2318
+ if (!l) return [];
2319
+ const d = s.getUnitId(), c = l.getSheetId(), u = this.formulaService.getRuleFormulaResultSync(d, c, e.uid);
2320
+ return N(n) ? kt((m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) : Ge(n);
2328
2321
  }
2329
2322
  async getListAsync(e, t, o) {
2330
- var m, f, h;
2331
- const { formula1: n = "" } = e, i = this.injector.get(ee), s = (m = t ? i.getUniverSheetInstance(t) : void 0) != null ? m : i.getCurrentUnitForType(ae.UNIVER_SHEET);
2332
- if (!s)
2333
- return [];
2334
- const l = (f = o ? s.getSheetBySheetId(o) : void 0) != null ? f : s.getActiveSheet(), d = s.getUnitId(), c = l.getSheetId(), u = await this.formulaService.getRuleFormulaResult(d, c, e.uid);
2335
- return T(n) ? kt((h = u == null ? void 0 : u[0]) == null ? void 0 : h.result) : Xe(n);
2323
+ var h, f, m;
2324
+ const { formula1: n = "" } = e, i = this.injector.get(te), s = (h = t ? i.getUniverSheetInstance(t) : void 0) != null ? h : i.getCurrentUnitForType(ae.UNIVER_SHEET);
2325
+ if (!s) return [];
2326
+ const l = (f = o ? s.getSheetBySheetId(o) : void 0) != null ? f : s.getActiveSheet();
2327
+ if (!l) return [];
2328
+ const d = s.getUnitId(), c = l.getSheetId(), u = await this.formulaService.getRuleFormulaResult(d, c, e.uid);
2329
+ return N(n) ? kt((m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) : Ge(n);
2336
2330
  }
2337
2331
  getListWithColor(e, t, o) {
2338
2332
  const n = this.getList(e, t, o), i = (e.formula2 || "").split(",");
@@ -2345,17 +2339,17 @@ class Fr extends $e {
2345
2339
  }), i;
2346
2340
  }
2347
2341
  }
2348
- function Tt(r) {
2342
+ function Ft(r) {
2349
2343
  let a = r;
2350
2344
  return typeof r == "string" ? ((r.startsWith("¥") || r.startsWith("$")) && (a = r.slice(1)), +a) : +r;
2351
2345
  }
2352
2346
  class ki extends $e {
2353
2347
  constructor() {
2354
2348
  super(...arguments);
2355
- v(this, "_formulaService", this.injector.get(ue));
2356
- v(this, "id", q.DECIMAL);
2357
- v(this, "title", "dataValidation.decimal.title");
2358
- v(this, "operators", [
2349
+ g(this, "_formulaService", this.injector.get(ue));
2350
+ g(this, "id", X.DECIMAL);
2351
+ g(this, "title", "dataValidation.decimal.title");
2352
+ g(this, "operators", [
2359
2353
  C.BETWEEN,
2360
2354
  C.EQUAL,
2361
2355
  C.GREATER_THAN,
@@ -2365,33 +2359,33 @@ class ki extends $e {
2365
2359
  C.NOT_BETWEEN,
2366
2360
  C.NOT_EQUAL
2367
2361
  ]);
2368
- v(this, "scopes", ["sheet"]);
2369
- v(this, "formulaInput", ut);
2370
- v(this, "dropDownInput");
2362
+ g(this, "scopes", ["sheet"]);
2363
+ g(this, "formulaInput", ht);
2364
+ g(this, "dropDownInput");
2371
2365
  }
2372
2366
  _isFormulaOrNumber(e) {
2373
- return !U.isBlank(e) && (T(e) || !Number.isNaN(+e));
2367
+ return !B.isBlank(e) && (N(e) || !Number.isNaN(+e));
2374
2368
  }
2375
2369
  async isValidType(e, t, o) {
2376
2370
  const { value: n } = e;
2377
- return !Number.isNaN(Tt(n));
2371
+ return !Number.isNaN(Ft(n));
2378
2372
  }
2379
2373
  transform(e, t, o) {
2380
2374
  const { value: n } = e;
2381
2375
  return {
2382
2376
  ...e,
2383
- value: Tt(n)
2377
+ value: Ft(n)
2384
2378
  };
2385
2379
  }
2386
2380
  _parseNumber(e) {
2387
2381
  return e == null ? Number.NaN : +e;
2388
2382
  }
2389
2383
  async parseFormula(e, t, o) {
2390
- var d, c, u, m, f, h, g, R;
2384
+ var d, c, u, h, f, m, v, R;
2391
2385
  const n = await this._formulaService.getRuleFormulaResult(t, o, e.uid), { formula1: i, formula2: s } = e;
2392
2386
  return {
2393
- formula1: this._parseNumber(T(i) ? (m = (u = (c = (d = n == null ? void 0 : n[0]) == null ? void 0 : d.result) == null ? void 0 : c[0]) == null ? void 0 : u[0]) == null ? void 0 : m.v : i),
2394
- formula2: this._parseNumber(T(s) ? (R = (g = (h = (f = n == null ? void 0 : n[1]) == null ? void 0 : f.result) == null ? void 0 : h[0]) == null ? void 0 : g[0]) == null ? void 0 : R.v : s)
2387
+ formula1: this._parseNumber(N(i) ? (h = (u = (c = (d = n == null ? void 0 : n[0]) == null ? void 0 : d.result) == null ? void 0 : c[0]) == null ? void 0 : u[0]) == null ? void 0 : h.v : i),
2388
+ formula2: this._parseNumber(N(s) ? (R = (v = (m = (f = n == null ? void 0 : n[1]) == null ? void 0 : f.result) == null ? void 0 : m[0]) == null ? void 0 : v[0]) == null ? void 0 : R.v : s)
2395
2389
  };
2396
2390
  }
2397
2391
  validatorFormula(e, t, o) {
@@ -2400,7 +2394,7 @@ class ki extends $e {
2400
2394
  return {
2401
2395
  success: !1
2402
2396
  };
2403
- const i = U.isDefine(e.formula1) && this._isFormulaOrNumber(e.formula1), s = U.isDefine(e.formula2) && this._isFormulaOrNumber(e.formula2), l = st.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2397
+ const i = B.isDefine(e.formula1) && this._isFormulaOrNumber(e.formula1), s = B.isDefine(e.formula2) && this._isFormulaOrNumber(e.formula2), l = lt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2404
2398
  return l ? {
2405
2399
  success: i && s,
2406
2400
  formula1: i ? void 0 : d,
@@ -2449,13 +2443,13 @@ class ki extends $e {
2449
2443
  return Number.isNaN(n) ? !0 : e.value <= n;
2450
2444
  }
2451
2445
  }
2452
- const Yi = "{FORMULA1}", Gi = "{FORMULA2}";
2453
- class Xi extends $e {
2446
+ const Yi = "{FORMULA1}", Xi = "{FORMULA2}";
2447
+ class Gi extends $e {
2454
2448
  constructor() {
2455
2449
  super(...arguments);
2456
- v(this, "id", q.TEXT_LENGTH);
2457
- v(this, "title", "dataValidation.textLength.title");
2458
- v(this, "operators", [
2450
+ g(this, "id", X.TEXT_LENGTH);
2451
+ g(this, "title", "dataValidation.textLength.title");
2452
+ g(this, "operators", [
2459
2453
  C.BETWEEN,
2460
2454
  C.EQUAL,
2461
2455
  C.GREATER_THAN,
@@ -2465,12 +2459,12 @@ class Xi extends $e {
2465
2459
  C.NOT_BETWEEN,
2466
2460
  C.NOT_EQUAL
2467
2461
  ]);
2468
- v(this, "scopes", ["sheet"]);
2469
- v(this, "formulaInput", ut);
2470
- v(this, "_formulaService", this.injector.get(ue));
2462
+ g(this, "scopes", ["sheet"]);
2463
+ g(this, "formulaInput", ht);
2464
+ g(this, "_formulaService", this.injector.get(ue));
2471
2465
  }
2472
2466
  _isFormulaOrInt(e) {
2473
- return !U.isBlank(e) && (T(e) || !Number.isNaN(+e) && Number.isInteger(+e));
2467
+ return !B.isBlank(e) && (N(e) || !Number.isNaN(+e) && Number.isInteger(+e));
2474
2468
  }
2475
2469
  validatorFormula(e, t, o) {
2476
2470
  const n = e.operator;
@@ -2478,7 +2472,7 @@ class Xi extends $e {
2478
2472
  return {
2479
2473
  success: !1
2480
2474
  };
2481
- const i = U.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), s = U.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = st.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2475
+ const i = B.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), s = B.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = lt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2482
2476
  return l ? {
2483
2477
  success: i && s,
2484
2478
  formula1: i ? void 0 : d,
@@ -2495,11 +2489,11 @@ class Xi extends $e {
2495
2489
  return !Number.isNaN(e);
2496
2490
  }
2497
2491
  async parseFormula(e, t, o) {
2498
- var l, d, c, u, m, f, h, g;
2492
+ var l, d, c, u, h, f, m, v;
2499
2493
  const n = await this._formulaService.getRuleFormulaResult(t, o, e.uid), { formula1: i, formula2: s } = e;
2500
2494
  return {
2501
- formula1: this._parseNumber(T(i) ? (u = (c = (d = (l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) == null ? void 0 : d[0]) == null ? void 0 : c[0]) == null ? void 0 : u.v : i),
2502
- formula2: this._parseNumber(T(s) ? (g = (h = (f = (m = n == null ? void 0 : n[1]) == null ? void 0 : m.result) == null ? void 0 : f[0]) == null ? void 0 : h[0]) == null ? void 0 : g.v : s)
2495
+ formula1: this._parseNumber(N(i) ? (u = (c = (d = (l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) == null ? void 0 : d[0]) == null ? void 0 : c[0]) == null ? void 0 : u.v : i),
2496
+ formula2: this._parseNumber(N(s) ? (v = (m = (f = (h = n == null ? void 0 : n[1]) == null ? void 0 : h.result) == null ? void 0 : f[0]) == null ? void 0 : m[0]) == null ? void 0 : v.v : s)
2503
2497
  };
2504
2498
  }
2505
2499
  transform(e, t, o) {
@@ -2514,11 +2508,11 @@ class Xi extends $e {
2514
2508
  }
2515
2509
  async validatorIsEqual(e, t, o) {
2516
2510
  const { formula1: n } = t;
2517
- return U.isDefine(n) ? e.value === n : !1;
2511
+ return B.isDefine(n) ? e.value === n : !1;
2518
2512
  }
2519
2513
  async validatorIsNotEqual(e, t, o) {
2520
2514
  const { formula1: n } = t;
2521
- return U.isDefine(n) ? e.value !== n : !1;
2515
+ return B.isDefine(n) ? e.value !== n : !1;
2522
2516
  }
2523
2517
  async validatorIsBetween(e, t, o) {
2524
2518
  const { formula1: n, formula2: i } = t, { value: s } = e;
@@ -2552,16 +2546,16 @@ class Xi extends $e {
2552
2546
  }
2553
2547
  generateRuleErrorMessage(e) {
2554
2548
  var o, n;
2555
- return e.operator ? `${this.localeService.t(io[e.operator]).replace(Yi, (o = e.formula1) != null ? o : "").replace(Gi, (n = e.formula2) != null ? n : "")}` : this.titleStr;
2549
+ return e.operator ? `${this.localeService.t(io[e.operator]).replace(Yi, (o = e.formula1) != null ? o : "").replace(Xi, (n = e.formula2) != null ? n : "")}` : this.titleStr;
2556
2550
  }
2557
2551
  }
2558
2552
  class qi extends $e {
2559
2553
  constructor() {
2560
2554
  super(...arguments);
2561
- v(this, "_formulaService", this.injector.get(ue));
2562
- v(this, "id", q.WHOLE);
2563
- v(this, "title", "dataValidation.whole.title");
2564
- v(this, "operators", [
2555
+ g(this, "_formulaService", this.injector.get(ue));
2556
+ g(this, "id", X.WHOLE);
2557
+ g(this, "title", "dataValidation.whole.title");
2558
+ g(this, "operators", [
2565
2559
  C.BETWEEN,
2566
2560
  C.EQUAL,
2567
2561
  C.GREATER_THAN,
@@ -2571,33 +2565,33 @@ class qi extends $e {
2571
2565
  C.NOT_BETWEEN,
2572
2566
  C.NOT_EQUAL
2573
2567
  ]);
2574
- v(this, "scopes", ["sheet"]);
2575
- v(this, "formulaInput", ut);
2576
- v(this, "dropDownInput");
2568
+ g(this, "scopes", ["sheet"]);
2569
+ g(this, "formulaInput", ht);
2570
+ g(this, "dropDownInput");
2577
2571
  }
2578
2572
  _isFormulaOrInt(e) {
2579
- return !U.isBlank(e) && (T(e) || !Number.isNaN(+e) && Number.isInteger(+e));
2573
+ return !B.isBlank(e) && (N(e) || !Number.isNaN(+e) && Number.isInteger(+e));
2580
2574
  }
2581
2575
  async isValidType(e, t, o) {
2582
- const { value: n } = e, i = Tt(n);
2576
+ const { value: n } = e, i = Ft(n);
2583
2577
  return !Number.isNaN(i) && Number.isInteger(i);
2584
2578
  }
2585
2579
  transform(e, t, o) {
2586
2580
  const { value: n } = e;
2587
2581
  return {
2588
2582
  ...e,
2589
- value: Tt(n)
2583
+ value: Ft(n)
2590
2584
  };
2591
2585
  }
2592
2586
  _parseNumber(e) {
2593
2587
  return e == null ? Number.NaN : +e;
2594
2588
  }
2595
2589
  async parseFormula(e, t, o) {
2596
- var d, c, u, m, f, h, g, R;
2590
+ var d, c, u, h, f, m, v, R;
2597
2591
  const n = await this._formulaService.getRuleFormulaResult(t, o, e.uid), { formula1: i, formula2: s } = e;
2598
2592
  return {
2599
- formula1: this._parseNumber(T(i) ? (m = (u = (c = (d = n == null ? void 0 : n[0]) == null ? void 0 : d.result) == null ? void 0 : c[0]) == null ? void 0 : u[0]) == null ? void 0 : m.v : i),
2600
- formula2: this._parseNumber(T(s) ? (R = (g = (h = (f = n == null ? void 0 : n[1]) == null ? void 0 : f.result) == null ? void 0 : h[0]) == null ? void 0 : g[0]) == null ? void 0 : R.v : s)
2593
+ formula1: this._parseNumber(N(i) ? (h = (u = (c = (d = n == null ? void 0 : n[0]) == null ? void 0 : d.result) == null ? void 0 : c[0]) == null ? void 0 : u[0]) == null ? void 0 : h.v : i),
2594
+ formula2: this._parseNumber(N(s) ? (R = (v = (m = (f = n == null ? void 0 : n[1]) == null ? void 0 : f.result) == null ? void 0 : m[0]) == null ? void 0 : v[0]) == null ? void 0 : R.v : s)
2601
2595
  };
2602
2596
  }
2603
2597
  validatorFormula(e, t, o) {
@@ -2606,7 +2600,7 @@ class qi extends $e {
2606
2600
  return {
2607
2601
  success: !1
2608
2602
  };
2609
- const i = U.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), s = U.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = st.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2603
+ const i = B.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), s = B.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = lt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2610
2604
  return l ? {
2611
2605
  success: i && s,
2612
2606
  formula1: i ? void 0 : d,
@@ -2655,9 +2649,9 @@ class qi extends $e {
2655
2649
  return Number.isNaN(n) ? !0 : e.value <= n;
2656
2650
  }
2657
2651
  }
2658
- const Lr = 4, zi = 0, Yt = 4, Pr = 4, ca = 6, Nt = 6, Ne = 14;
2652
+ const Lr = 4, zi = 0, Yt = 4, Pr = 4, ca = 6, Nt = 6, Fe = 14;
2659
2653
  function Qi(r, a) {
2660
- const e = Go.getTextSize(r, a), t = e.width + Lr * 2, { ba: o, bd: n } = e, i = o + n;
2654
+ const e = Xo.getTextSize(r, a), t = e.width + Lr * 2, { ba: o, bd: n } = e, i = o + n;
2661
2655
  return {
2662
2656
  width: t,
2663
2657
  height: i + zi * 2,
@@ -2665,16 +2659,16 @@ function Qi(r, a) {
2665
2659
  };
2666
2660
  }
2667
2661
  function qa(r, a, e, t) {
2668
- const o = e - Ne - ca, n = t - Nt * 2, i = r.map((c) => ({
2662
+ const o = e - Fe - ca, n = t - Nt * 2, i = r.map((c) => ({
2669
2663
  layout: Qi(c, a),
2670
2664
  text: c
2671
2665
  }));
2672
2666
  let s;
2673
2667
  const l = [];
2674
2668
  i.forEach((c) => {
2675
- const { layout: u } = c, { width: m, height: f } = u;
2676
- !s || s.width + m + Yt > o ? (s = {
2677
- width: m,
2669
+ const { layout: u } = c, { width: h, height: f } = u;
2670
+ !s || s.width + h + Yt > o ? (s = {
2671
+ width: h,
2678
2672
  height: f,
2679
2673
  items: [{
2680
2674
  ...c,
@@ -2683,7 +2677,7 @@ function qa(r, a, e, t) {
2683
2677
  }, l.push(s)) : (s.items.push({
2684
2678
  ...c,
2685
2679
  left: s.width + Yt
2686
- }), s.width = s.width + m + Yt);
2680
+ }), s.width = s.width + h + Yt);
2687
2681
  });
2688
2682
  let d = 0;
2689
2683
  return l.forEach((c, u) => {
@@ -2697,14 +2691,14 @@ function qa(r, a, e, t) {
2697
2691
  };
2698
2692
  }
2699
2693
  const Ki = 8;
2700
- class Zi extends Xo {
2694
+ class Zi extends Go {
2701
2695
  static drawWith(a, e) {
2702
2696
  const { fontFamily: t, fontString: o, fontSize: n, info: i, fill: s, color: l } = e, { layout: d, text: c } = i;
2703
2697
  a.save(), dr.drawWith(a, {
2704
2698
  width: d.width,
2705
2699
  height: d.height,
2706
2700
  radius: Ki,
2707
- fill: s || Fe
2701
+ fill: s || Ne
2708
2702
  }), a.translateWithPrecision(Lr, d.ba), a.font = o, a.fillStyle = l, a.fillText(c, 0, 0), a.restore();
2709
2703
  }
2710
2704
  }
@@ -2716,8 +2710,8 @@ var Ji = Object.defineProperty, es = Object.getOwnPropertyDescriptor, ts = (r, a
2716
2710
  const rs = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2717
2711
  let ua = class {
2718
2712
  constructor(r) {
2719
- v(this, "zIndex");
2720
- v(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2713
+ g(this, "zIndex");
2714
+ g(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2721
2715
  this._commandService = r;
2722
2716
  }
2723
2717
  _ensureMap(r) {
@@ -2728,33 +2722,33 @@ let ua = class {
2728
2722
  return `${r}.${a}`;
2729
2723
  }
2730
2724
  _drawDownIcon(r, a, e, t, o) {
2731
- const n = e - Ne + 4;
2725
+ const n = e - Fe + 4;
2732
2726
  let i = 4;
2733
2727
  switch (o) {
2734
2728
  case de.MIDDLE:
2735
- i = (t - Ne) / 2 + 4;
2729
+ i = (t - Fe) / 2 + 4;
2736
2730
  break;
2737
2731
  case de.BOTTOM:
2738
- i = t - Ne + 4;
2732
+ i = t - Fe + 4;
2739
2733
  break;
2740
2734
  }
2741
2735
  r.save(), r.translateWithPrecision(a.startX + n, a.startY + i), r.fillStyle = "#565656", r.fill(rs), r.restore();
2742
2736
  }
2743
2737
  // eslint-disable-next-line max-lines-per-function
2744
2738
  drawWith(r, a, e, t) {
2745
- var b, Z;
2746
- const { primaryWithCoord: o, row: n, col: i, style: s, data: l, subUnitId: d } = a, c = o.isMergedMainCell ? o.mergeInfo : o, u = l.fontRenderExtension, { leftOffset: m = 0, rightOffset: f = 0, topOffset: h = 0, downOffset: g = 0 } = u || {}, R = l.dataValidation, _ = this._ensureMap(d), V = this._generateKey(n, i);
2739
+ var O, J;
2740
+ const { primaryWithCoord: o, row: n, col: i, style: s, data: l, subUnitId: d } = a, c = o.isMergedMainCell ? o.mergeInfo : o, u = l.fontRenderExtension, { leftOffset: h = 0, rightOffset: f = 0, topOffset: m = 0, downOffset: v = 0 } = u || {}, R = l.dataValidation, _ = this._ensureMap(d), V = this._generateKey(n, i);
2747
2741
  if (!R)
2748
2742
  return;
2749
2743
  const S = {
2750
- startX: c.startX + m,
2744
+ startX: c.startX + h,
2751
2745
  endX: c.endX - f,
2752
- startY: c.startY + h,
2753
- endY: c.endY - g
2754
- }, I = S.endX - S.startX, y = S.endY - S.startY, { cl: O } = s || {}, j = (b = typeof O == "object" ? O == null ? void 0 : O.rgb : O) != null ? b : "#000", P = xa(s != null ? s : void 0), { rule: N, validator: A } = R, F = A, { vt: B, ht: Y } = s || {}, x = B != null ? B : de.MIDDLE, L = (Z = ne(l)) != null ? Z : "", G = F.parseCellValue(L), te = F.getListWithColorMap(N), H = qa(G, P, I, y);
2755
- this._drawDownIcon(r, S, I, y, x), r.save(), r.translateWithPrecision(S.startX, S.startY), r.beginPath(), r.rect(0, 0, I - Ne, y), r.clip(), r.translateWithPrecision(ca, Nt);
2746
+ startY: c.startY + m,
2747
+ endY: c.endY - v
2748
+ }, y = S.endX - S.startX, w = S.endY - S.startY, { cl: F } = s || {}, x = (O = typeof F == "object" ? F == null ? void 0 : F.rgb : F) != null ? O : "#000", j = xa(s != null ? s : void 0), { rule: $, validator: E } = R, P = E, { vt: A, ht: q } = s || {}, L = A != null ? A : de.MIDDLE, b = (J = ne(l)) != null ? J : "", Y = P.parseCellValue(b), Z = P.getListWithColorMap($), H = qa(Y, j, y, w);
2749
+ this._drawDownIcon(r, S, y, w, L), r.save(), r.translateWithPrecision(S.startX, S.startY), r.beginPath(), r.rect(0, 0, y - Fe, w), r.clip(), r.translateWithPrecision(ca, Nt);
2756
2750
  let M = 0;
2757
- switch (x) {
2751
+ switch (L) {
2758
2752
  case de.MIDDLE:
2759
2753
  M = (H.contentHeight - H.totalHeight) / 2;
2760
2754
  break;
@@ -2762,35 +2756,35 @@ let ua = class {
2762
2756
  M = H.contentHeight - H.totalHeight;
2763
2757
  break;
2764
2758
  }
2765
- r.translateWithPrecision(0, M), H.lines.forEach((X, me) => {
2759
+ r.translateWithPrecision(0, M), H.lines.forEach((G, me) => {
2766
2760
  r.save();
2767
- const { width: D, height: W, items: k } = X;
2768
- let J = 0;
2769
- switch (Y) {
2761
+ const { width: D, height: W, items: k } = G;
2762
+ let ee = 0;
2763
+ switch (q) {
2770
2764
  case Ae.RIGHT:
2771
- J = H.contentWidth - D;
2765
+ ee = H.contentWidth - D;
2772
2766
  break;
2773
2767
  case Ae.CENTER:
2774
- J = (H.contentWidth - D) / 2;
2768
+ ee = (H.contentWidth - D) / 2;
2775
2769
  break;
2776
2770
  }
2777
- r.translate(J, me * (W + Pr)), k.forEach((_e) => {
2771
+ r.translate(ee, me * (W + Pr)), k.forEach((_e) => {
2778
2772
  r.save(), r.translateWithPrecision(_e.left, 0), Zi.drawWith(r, {
2779
- ...P,
2773
+ ...j,
2780
2774
  info: _e,
2781
- color: j,
2782
- fill: te[_e.text]
2775
+ color: x,
2776
+ fill: Z[_e.text]
2783
2777
  }), r.restore();
2784
2778
  }), r.restore();
2785
2779
  }), r.restore(), _.set(V, {
2786
2780
  left: S.startX,
2787
2781
  top: S.startY,
2788
- width: H.contentWidth + ca + Ne,
2782
+ width: H.contentWidth + ca + Fe,
2789
2783
  height: H.contentHeight + Nt * 2
2790
2784
  });
2791
2785
  }
2792
2786
  calcCellAutoHeight(r) {
2793
- var I;
2787
+ var y;
2794
2788
  const { primaryWithCoord: a, style: e, data: t } = r, o = t.fontRenderExtension, { leftOffset: n = 0, rightOffset: i = 0, topOffset: s = 0, downOffset: l = 0 } = o || {}, d = a.isMergedMainCell ? a.mergeInfo : a, c = {
2795
2789
  startX: d.startX + n,
2796
2790
  endX: d.endX - i,
@@ -2799,12 +2793,12 @@ let ua = class {
2799
2793
  }, u = t.dataValidation;
2800
2794
  if (!u)
2801
2795
  return;
2802
- const m = c.endX - c.startX, f = c.endY - c.startY, h = (I = ne(t)) != null ? I : "", { validator: g } = u, _ = g.parseCellValue(h), V = xa(e != null ? e : void 0);
2803
- return qa(_, V, m, f).cellAutoHeight;
2796
+ const h = c.endX - c.startX, f = c.endY - c.startY, m = (y = ne(t)) != null ? y : "", { validator: v } = u, _ = v.parseCellValue(m), V = xa(e != null ? e : void 0);
2797
+ return qa(_, V, h, f).cellAutoHeight;
2804
2798
  }
2805
2799
  isHit(r, a) {
2806
2800
  const { primaryWithCoord: e } = a, t = e.isMergedMainCell ? e.mergeInfo : e, { endX: o } = t, { x: n } = r;
2807
- return n >= o - Ne && n <= o;
2801
+ return n >= o - Fe && n <= o;
2808
2802
  }
2809
2803
  onPointerDown(r, a) {
2810
2804
  if (a.button === 2)
@@ -2821,12 +2815,12 @@ let ua = class {
2821
2815
  ua = ts([
2822
2816
  as(0, re)
2823
2817
  ], ua);
2824
- class os extends Fr {
2818
+ class os extends Nr {
2825
2819
  constructor() {
2826
2820
  super(...arguments);
2827
- v(this, "id", q.LIST_MULTIPLE);
2828
- v(this, "title", "dataValidation.listMultiple.title");
2829
- v(this, "canvasRender", this.injector.createInstance(ua));
2821
+ g(this, "id", X.LIST_MULTIPLE);
2822
+ g(this, "title", "dataValidation.listMultiple.title");
2823
+ g(this, "canvasRender", this.injector.createInstance(ua));
2830
2824
  }
2831
2825
  skipDefaultFontRender() {
2832
2826
  return !0;
@@ -2847,7 +2841,7 @@ function ns(r) {
2847
2841
  }
2848
2842
  function is(r) {
2849
2843
  return {
2850
- id: ct.id,
2844
+ id: ut.id,
2851
2845
  title: "dataValidation.panel.title",
2852
2846
  type: ga.BUTTON,
2853
2847
  positions: [Da]
@@ -2866,7 +2860,7 @@ var ls = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, cs = (r, a
2866
2860
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
2867
2861
  return t && o && ls(a, e, o), o;
2868
2862
  }, Me = (r, a) => (e, t) => a(e, t, r);
2869
- let rt = class extends er {
2863
+ let ot = class extends er {
2870
2864
  constructor(r, a, e, t, o, n, i, s) {
2871
2865
  super(), this._univerInstanceService = r, this._sheetDataValidationService = a, this._dataValidatorRegistryService = e, this._injector = t, this._componentManger = o, this._selectionManagerService = n, this._sheetInterceptorService = i, this._dataValidationModel = s, this._init();
2872
2866
  }
@@ -2877,10 +2871,10 @@ let rt = class extends er {
2877
2871
  [
2878
2872
  ki,
2879
2873
  qi,
2880
- Xi,
2881
- Fi,
2874
+ Gi,
2875
+ Ni,
2882
2876
  Di,
2883
- Fr,
2877
+ Nr,
2884
2878
  os,
2885
2879
  Ri
2886
2880
  ].forEach((r) => {
@@ -2897,11 +2891,14 @@ let rt = class extends er {
2897
2891
  _initInstanceChange() {
2898
2892
  const r = new Qa();
2899
2893
  this._univerInstanceService.getCurrentTypeOfUnit$(ae.UNIVER_SHEET).subscribe((a) => {
2900
- r.dispose(), a && (this._sheetDataValidationService.switchCurrent(a.getUnitId(), a.getActiveSheet().getSheetId()), r.add(ma(
2901
- a.activeSheet$.subscribe((e) => {
2902
- if (e) {
2903
- const t = a.getUnitId(), o = e.getSheetId();
2904
- this._sheetDataValidationService.switchCurrent(t, o);
2894
+ if (r.dispose(), !a)
2895
+ return;
2896
+ const e = a.getActiveSheet();
2897
+ e && (this._sheetDataValidationService.switchCurrent(a.getUnitId(), e.getSheetId()), r.add(ma(
2898
+ a.activeSheet$.subscribe((t) => {
2899
+ if (t) {
2900
+ const o = a.getUnitId(), n = t.getSheetId();
2901
+ this._sheetDataValidationService.switchCurrent(o, n);
2905
2902
  }
2906
2903
  })
2907
2904
  )));
@@ -2911,7 +2908,10 @@ let rt = class extends er {
2911
2908
  this._sheetInterceptorService.interceptCommand({
2912
2909
  getMutations: (r) => {
2913
2910
  if (r.id === po.id) {
2914
- const a = this._univerInstanceService.getCurrentUnitForType(ae.UNIVER_SHEET), e = a.getUnitId(), o = a.getActiveSheet().getSheetId(), n = this._selectionManagerService.getSelectionRanges(), i = this._dataValidationModel.ensureManager(e, o), s = i.getRuleObjectMatrix().clone();
2911
+ const a = this._univerInstanceService.getCurrentUnitForType(ae.UNIVER_SHEET), e = a.getUnitId(), t = a.getActiveSheet();
2912
+ if (!t)
2913
+ throw new Error("No active sheet found");
2914
+ const o = t.getSheetId(), n = this._selectionManagerService.getSelectionRanges(), i = this._dataValidationModel.ensureManager(e, o), s = i.getRuleObjectMatrix().clone();
2915
2915
  n && s.removeRange(n);
2916
2916
  const l = s.diff(i.getDataValidations()), { redoMutations: d, undoMutations: c } = Qe(e, o, l);
2917
2917
  return {
@@ -2927,23 +2927,23 @@ let rt = class extends er {
2927
2927
  });
2928
2928
  }
2929
2929
  };
2930
- rt = cs([
2931
- ve(ge.Rendered, rt),
2932
- Me(0, ee),
2933
- Me(1, w(Et)),
2934
- Me(2, w(De)),
2935
- Me(3, w(Ue)),
2936
- Me(4, w(dt)),
2937
- Me(5, w(fo)),
2938
- Me(6, w(or)),
2939
- Me(7, w(K))
2940
- ], rt);
2941
- const us = "univer-data-validation-list-buttons", hs = "univer-data-validation-list-button", Gt = {
2930
+ ot = cs([
2931
+ ve(ge.Rendered, ot),
2932
+ Me(0, te),
2933
+ Me(1, I(Ot)),
2934
+ Me(2, I(De)),
2935
+ Me(3, I(Ue)),
2936
+ Me(4, I(ct)),
2937
+ Me(5, I(fo)),
2938
+ Me(6, I(or)),
2939
+ Me(7, I(K))
2940
+ ], ot);
2941
+ const us = "univer-data-validation-list-buttons", hs = "univer-data-validation-list-button", Xt = {
2942
2942
  dataValidationListButtons: us,
2943
2943
  dataValidationListButton: hs
2944
2944
  };
2945
2945
  function ms() {
2946
- const r = E(ee), a = Ze(
2946
+ const r = T(te), a = Ze(
2947
2947
  () => r.getCurrentTypeOfUnit$(ae.UNIVER_SHEET),
2948
2948
  void 0,
2949
2949
  void 0,
@@ -2952,80 +2952,80 @@ function ms() {
2952
2952
  return a ? /* @__PURE__ */ p.jsx(fs, { workbook: a }) : null;
2953
2953
  }
2954
2954
  function fs(r) {
2955
- const a = E(K), e = E(ee), t = E(re), o = E(Ue), n = E(Ve);
2956
- E(rt);
2957
- const i = E(ie), [s, l] = z([]), { workbook: d } = r, c = Ze(d.activeSheet$, void 0, !0), u = d.getUnitId(), m = c == null ? void 0 : c.getSheetId(), f = a.ensureManager(u, m);
2955
+ const a = T(K), e = T(te), t = T(re), o = T(Ue), n = T(Ve);
2956
+ T(ot);
2957
+ const i = T(ie), [s, l] = z([]), { workbook: d } = r, c = Ze(d.activeSheet$, void 0, !0), u = d.getUnitId(), h = c == null ? void 0 : c.getSheetId(), f = a.ensureManager(u, h);
2958
2958
  qe(() => {
2959
2959
  l(f.getDataValidations());
2960
- const S = f.dataValidations$.subscribe((I) => {
2961
- l([...I]);
2960
+ const S = f.dataValidations$.subscribe((y) => {
2961
+ l([...y]);
2962
2962
  });
2963
2963
  return () => {
2964
2964
  S.unsubscribe();
2965
2965
  };
2966
2966
  }, [f]);
2967
- const h = async () => {
2968
- const S = tr(o), I = {
2967
+ const m = async () => {
2968
+ const S = tr(o), y = {
2969
2969
  unitId: u,
2970
- subUnitId: m,
2970
+ subUnitId: h,
2971
2971
  rule: S
2972
2972
  };
2973
- await t.executeCommand(wa.id, I), n.setActiveRule({
2973
+ await t.executeCommand(wa.id, y), n.setActiveRule({
2974
2974
  unitId: u,
2975
- subUnitId: m,
2975
+ subUnitId: h,
2976
2976
  rule: S
2977
2977
  });
2978
- }, g = () => {
2978
+ }, v = () => {
2979
2979
  t.executeCommand(so.id, {
2980
2980
  unitId: u,
2981
- subUnitId: m
2981
+ subUnitId: h
2982
2982
  });
2983
2983
  }, _ = ((S) => {
2984
- const y = e.getCurrentUnitForType(ae.UNIVER_SHEET).getActiveSheet();
2985
- return S.map((j) => {
2986
- const { ranges: P } = j;
2987
- return (P == null ? void 0 : P.some((A) => {
2988
- var L, G;
2989
- const { startRow: F, startColumn: B, endRow: Y, endColumn: x } = A;
2990
- for (let te = F; te <= Y; te++)
2991
- for (let H = B; H <= x; H++) {
2992
- const M = (G = (L = y.getCell(te, H)) == null ? void 0 : L.selectionProtection) == null ? void 0 : G[0];
2993
- if ((M == null ? void 0 : M[Dt.Edit]) === !1 || (M == null ? void 0 : M[Dt.View]) === !1)
2984
+ const w = e.getCurrentUnitForType(ae.UNIVER_SHEET).getActiveSheet();
2985
+ return S.map((x) => {
2986
+ const { ranges: j } = x;
2987
+ return (j == null ? void 0 : j.some((E) => {
2988
+ var b, Y;
2989
+ const { startRow: P, startColumn: A, endRow: q, endColumn: L } = E;
2990
+ for (let Z = P; Z <= q; Z++)
2991
+ for (let H = A; H <= L; H++) {
2992
+ const M = (Y = (b = w == null ? void 0 : w.getCell(Z, H)) == null ? void 0 : b.selectionProtection) == null ? void 0 : Y[0];
2993
+ if ((M == null ? void 0 : M[Et.Edit]) === !1 || (M == null ? void 0 : M[Et.View]) === !1)
2994
2994
  return !0;
2995
2995
  }
2996
2996
  return !1;
2997
- })) ? { ...j, disable: !0 } : { ...j };
2997
+ })) ? { ...x, disable: !0 } : { ...x };
2998
2998
  });
2999
2999
  })(s), V = _ == null ? void 0 : _.some((S) => S.disable);
3000
3000
  return /* @__PURE__ */ p.jsxs("div", { children: [
3001
3001
  _ == null ? void 0 : _.map((S) => {
3002
- var I;
3002
+ var y;
3003
3003
  return /* @__PURE__ */ p.jsx(
3004
- Gn,
3004
+ Xn,
3005
3005
  {
3006
3006
  unitId: u,
3007
- subUnitId: m,
3007
+ subUnitId: h,
3008
3008
  onClick: () => {
3009
3009
  S.disable || n.setActiveRule({
3010
3010
  unitId: u,
3011
- subUnitId: m,
3011
+ subUnitId: h,
3012
3012
  rule: S
3013
3013
  });
3014
3014
  },
3015
3015
  rule: S,
3016
- disable: (I = S.disable) != null ? I : !1
3016
+ disable: (y = S.disable) != null ? y : !1
3017
3017
  },
3018
3018
  S.uid
3019
3019
  );
3020
3020
  }),
3021
- /* @__PURE__ */ p.jsxs("div", { className: Gt.dataValidationListButtons, children: [
3022
- s.length && !V ? /* @__PURE__ */ p.jsx(ze, { className: Gt.dataValidationListButton, onClick: g, children: i.t("dataValidation.panel.removeAll") }) : null,
3023
- /* @__PURE__ */ p.jsx(ze, { className: Gt.dataValidationListButton, type: "primary", onClick: h, children: i.t("dataValidation.panel.add") })
3021
+ /* @__PURE__ */ p.jsxs("div", { className: Xt.dataValidationListButtons, children: [
3022
+ s.length && !V ? /* @__PURE__ */ p.jsx(ze, { className: Xt.dataValidationListButton, onClick: v, children: i.t("dataValidation.panel.removeAll") }) : null,
3023
+ /* @__PURE__ */ p.jsx(ze, { className: Xt.dataValidationListButton, type: "primary", onClick: m, children: i.t("dataValidation.panel.add") })
3024
3024
  ] })
3025
3025
  ] });
3026
3026
  }
3027
3027
  const ps = () => {
3028
- const r = E(Ve), a = Ze(r.activeRule$, r.activeRule);
3028
+ const r = T(Ve), a = Ze(r.activeRule$, r.activeRule);
3029
3029
  return a ? /* @__PURE__ */ p.jsx($n, {}, a.rule.uid) : /* @__PURE__ */ p.jsx(ms, {});
3030
3030
  }, vs = "univer-dv-list-dropdown", gs = "univer-dv-list-dropdown-title", _s = "univer-dv-list-dropdown-list", Ss = "univer-dv-list-dropdown-list-container", Rs = "univer-dv-list-dropdown-selected-icon", Cs = "univer-dv-list-dropdown-item-container", Vs = "univer-dv-list-dropdown-item", Ms = "univer-dv-list-dropdown-split", ws = "univer-dv-list-dropdown-edit", Se = {
3031
3031
  dvListDropdown: vs,
@@ -3043,15 +3043,15 @@ const ps = () => {
3043
3043
  /* @__PURE__ */ p.jsx("div", { className: Se.dvListDropdownTitle, children: n }),
3044
3044
  /* @__PURE__ */ p.jsx("div", { className: Se.dvListDropdownList, children: /* @__PURE__ */ p.jsx(Ko, { children: /* @__PURE__ */ p.jsx("div", { className: Se.dvListDropdownListContainer, children: o.map((l, d) => {
3045
3045
  const c = a.indexOf(l.value) > -1, u = () => {
3046
- let m;
3047
- c ? m = new Set(a.filter((h) => h !== l.value)) : m = new Set(t ? [...a, l.value] : [l.value]);
3046
+ let h;
3047
+ c ? h = new Set(a.filter((m) => m !== l.value)) : h = new Set(t ? [...a, l.value] : [l.value]);
3048
3048
  const f = [];
3049
- o.forEach((h) => {
3050
- m.has(h.value) && f.push(h.value);
3049
+ o.forEach((m) => {
3050
+ h.has(m.value) && f.push(m.value);
3051
3051
  }), e(f);
3052
3052
  };
3053
3053
  return /* @__PURE__ */ p.jsxs("div", { className: Se.dvListDropdownItemContainer, onClick: u, children: [
3054
- /* @__PURE__ */ p.jsx("div", { className: Se.dvListDropdownItem, style: { background: l.color || Fe }, children: l.label }),
3054
+ /* @__PURE__ */ p.jsx("div", { className: Se.dvListDropdownItem, style: { background: l.color || Ne }, children: l.label }),
3055
3055
  /* @__PURE__ */ p.jsx("div", { className: Se.dvListDropdownSelectedIcon, children: c ? /* @__PURE__ */ p.jsx(Vr, {}) : null })
3056
3056
  ] }, d);
3057
3057
  }) }) }) }),
@@ -3060,27 +3060,27 @@ const ps = () => {
3060
3060
  ] });
3061
3061
  };
3062
3062
  function ys(r) {
3063
- var P, N;
3064
- const { location: a, hideFn: e } = r, { worksheet: t, row: o, col: n, unitId: i, subUnitId: s } = a, l = E(re), d = E(ie), [c, u] = z(""), m = E(va), f = Qo.useContext(), h = f.right - f.left;
3063
+ var j, $;
3064
+ const { location: a, hideFn: e } = r, { worksheet: t, row: o, col: n, unitId: i, subUnitId: s } = a, l = T(re), d = T(ie), [c, u] = z(""), h = T(va), f = Qo.useContext(), m = f.right - f.left;
3065
3065
  if (!t)
3066
3066
  return null;
3067
- const g = t.getCell(o, n), R = (P = g == null ? void 0 : g.dataValidation) == null ? void 0 : P.rule, _ = (N = g == null ? void 0 : g.dataValidation) == null ? void 0 : N.validator, V = (R == null ? void 0 : R.renderMode) === ce.CUSTOM || (R == null ? void 0 : R.renderMode) === void 0;
3068
- if (!g || !R || !_)
3067
+ const v = t.getCell(o, n), R = (j = v == null ? void 0 : v.dataValidation) == null ? void 0 : j.rule, _ = ($ = v == null ? void 0 : v.dataValidation) == null ? void 0 : $.validator, V = (R == null ? void 0 : R.renderMode) === ce.CUSTOM || (R == null ? void 0 : R.renderMode) === void 0;
3068
+ if (!v || !R || !_)
3069
3069
  return;
3070
- const S = R.type === q.LIST_MULTIPLE, I = _.getListWithColor(R, i, s), y = c || li(g), O = Xe(y), j = () => {
3071
- l.executeCommand(ct.id, {
3070
+ const S = R.type === X.LIST_MULTIPLE, y = _.getListWithColor(R, i, s), w = c || li(v), F = Ge(w), x = () => {
3071
+ l.executeCommand(ut.id, {
3072
3072
  ruleId: R.uid
3073
3073
  }), e();
3074
3074
  };
3075
3075
  return /* @__PURE__ */ p.jsx(
3076
3076
  Is,
3077
3077
  {
3078
- style: { minWidth: h, maxWidth: Math.max(h, 200) },
3078
+ style: { minWidth: m, maxWidth: Math.max(m, 200) },
3079
3079
  title: S ? d.t("dataValidation.listMultiple.dropdown") : d.t("dataValidation.list.dropdown"),
3080
- value: O,
3080
+ value: F,
3081
3081
  multiple: S,
3082
- onChange: (A) => {
3083
- const F = Er(A), B = {
3082
+ onChange: (E) => {
3083
+ const P = Er(E), A = {
3084
3084
  unitId: i,
3085
3085
  subUnitId: s,
3086
3086
  range: {
@@ -3090,24 +3090,24 @@ function ys(r) {
3090
3090
  endRow: o
3091
3091
  },
3092
3092
  value: {
3093
- v: F,
3093
+ v: P,
3094
3094
  p: null,
3095
3095
  f: null,
3096
3096
  si: null
3097
3097
  }
3098
3098
  };
3099
- m.isVisible() && m.changeVisible({
3099
+ h.isVisible() && h.changeVisible({
3100
3100
  visible: !1,
3101
3101
  keycode: jo.ESC,
3102
3102
  eventType: qo.Keyboard
3103
- }), l.executeCommand(pa.id, B), u(F), S || e();
3103
+ }), l.executeCommand(pa.id, A), u(P), S || e();
3104
3104
  },
3105
- options: I.map((A) => ({
3106
- label: A.label,
3107
- value: A.label,
3108
- color: V ? A.color : "transparent"
3105
+ options: y.map((E) => ({
3106
+ label: E.label,
3107
+ value: E.label,
3108
+ color: V ? E.color : "transparent"
3109
3109
  })),
3110
- onEdit: j
3110
+ onEdit: x
3111
3111
  }
3112
3112
  );
3113
3113
  }
@@ -3115,8 +3115,8 @@ var Ds = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Os = (r, a
3115
3115
  for (var o = t > 1 ? void 0 : t ? Es(a, e) : a, n = r.length - 1, i; n >= 0; n--)
3116
3116
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
3117
3117
  return t && o && Ds(a, e, o), o;
3118
- }, et = (r, a) => (e, t) => a(e, t, r);
3119
- let ot = class extends he {
3118
+ }, tt = (r, a) => (e, t) => a(e, t, r);
3119
+ let nt = class extends he {
3120
3120
  constructor(r, a, e, t, o) {
3121
3121
  super(), this._editorBridgeService = r, this._dataValidationModel = a, this._dataValidatorRegistryService = e, this._dialogService = t, this._localeService = o, this._initEditorBridgeInterceptor();
3122
3122
  }
@@ -3126,10 +3126,10 @@ let ot = class extends he {
3126
3126
  {
3127
3127
  handler: async (r, a, e) => {
3128
3128
  const t = await r, { worksheet: o, row: n, col: i, unitId: s, subUnitId: l } = a, d = this._dataValidationModel.ensureManager(s, l), c = d.getRuleIdByLocation(n, i), u = c ? d.getRuleById(c) : void 0;
3129
- if (!u || u.errorStyle !== tt.STOP)
3129
+ if (!u || u.errorStyle !== at.STOP)
3130
3130
  return e(Promise.resolve(t));
3131
- const m = await this._dataValidatorRegistryService.getValidatorItem(u.type);
3132
- if (!m || await m.validator(
3131
+ const h = await this._dataValidatorRegistryService.getValidatorItem(u.type);
3132
+ if (!h || await h.validator(
3133
3133
  {
3134
3134
  value: ne(t),
3135
3135
  row: n,
@@ -3140,7 +3140,7 @@ let ot = class extends he {
3140
3140
  u
3141
3141
  ))
3142
3142
  return e(Promise.resolve(t));
3143
- const h = o.getCellRaw(n, i);
3143
+ const m = o.getCellRaw(n, i);
3144
3144
  return this._dialogService.open({
3145
3145
  width: 368,
3146
3146
  title: {
@@ -3148,7 +3148,7 @@ let ot = class extends he {
3148
3148
  },
3149
3149
  id: "reject-input-dialog",
3150
3150
  children: {
3151
- title: m.getRuleFinalError(u)
3151
+ title: h.getRuleFinalError(u)
3152
3152
  },
3153
3153
  footer: {
3154
3154
  title: na.createElement(
@@ -3163,7 +3163,7 @@ let ot = class extends he {
3163
3163
  onClose: () => {
3164
3164
  this._dialogService.close("reject-input-dialog");
3165
3165
  }
3166
- }), e(Promise.resolve(h));
3166
+ }), e(Promise.resolve(m));
3167
3167
  }
3168
3168
  }
3169
3169
  );
@@ -3194,34 +3194,34 @@ let ot = class extends he {
3194
3194
  });
3195
3195
  }
3196
3196
  };
3197
- ot = Os([
3198
- ve(ge.Ready, ot),
3199
- et(0, va),
3200
- et(1, w(K)),
3201
- et(2, w(De)),
3202
- et(3, Bo),
3203
- et(4, w(ie))
3204
- ], ot);
3197
+ nt = Os([
3198
+ ve(ge.Ready, nt),
3199
+ tt(0, va),
3200
+ tt(1, I(K)),
3201
+ tt(2, I(De)),
3202
+ tt(3, Bo),
3203
+ tt(4, I(ie))
3204
+ ], nt);
3205
3205
  const bs = "univer-dv-date-dropdown", Ts = {
3206
3206
  dvDateDropdown: bs
3207
3207
  };
3208
- function Ns(r) {
3209
- var V, S, I;
3210
- const { location: a, hideFn: e } = r, { worksheet: t, row: o, col: n, unitId: i, subUnitId: s } = a, l = E(re), d = E(ot), [c, u] = z();
3208
+ function Fs(r) {
3209
+ var V, S, y;
3210
+ const { location: a, hideFn: e } = r, { worksheet: t, row: o, col: n, unitId: i, subUnitId: s } = a, l = T(re), d = T(nt), [c, u] = z();
3211
3211
  if (!t)
3212
3212
  return null;
3213
- const m = t.getCell(o, n), f = (V = m == null ? void 0 : m.dataValidation) == null ? void 0 : V.rule, h = (S = m == null ? void 0 : m.dataValidation) == null ? void 0 : S.validator;
3214
- if (!m || !f || !h)
3213
+ const h = t.getCell(o, n), f = (V = h == null ? void 0 : h.dataValidation) == null ? void 0 : V.rule, m = (S = h == null ? void 0 : h.dataValidation) == null ? void 0 : S.validator;
3214
+ if (!h || !f || !m)
3215
3215
  return;
3216
- const g = ne(m), R = (I = h.transformDate(g)) != null ? I : je(), _ = R.isValid() ? R : je();
3216
+ const v = ne(h), R = (y = m.transformDate(v)) != null ? y : je(), _ = R.isValid() ? R : je();
3217
3217
  return /* @__PURE__ */ p.jsx("div", { className: Ts.dvDateDropdown, children: /* @__PURE__ */ p.jsx(
3218
3218
  Zo,
3219
3219
  {
3220
3220
  pickerValue: c != null ? c : _,
3221
- onSelect: async (y) => {
3222
- const O = y.format("YYYY/MM/DD");
3223
- f.errorStyle !== tt.STOP || await h.validator({
3224
- value: O,
3221
+ onSelect: async (w) => {
3222
+ const F = w.format("YYYY/MM/DD");
3223
+ f.errorStyle !== at.STOP || await m.validator({
3224
+ value: F,
3225
3225
  unitId: i,
3226
3226
  subUnitId: s,
3227
3227
  row: o,
@@ -3236,24 +3236,24 @@ function Ns(r) {
3236
3236
  endRow: o
3237
3237
  },
3238
3238
  value: {
3239
- v: O,
3239
+ v: F,
3240
3240
  p: null,
3241
3241
  f: null,
3242
3242
  si: null
3243
3243
  }
3244
- }) : d.showReject(h.getRuleFinalError(f)), e();
3244
+ }) : d.showReject(m.getRuleFinalError(f)), e();
3245
3245
  },
3246
- onPanelChange: (y) => {
3247
- u(y);
3246
+ onPanelChange: (w) => {
3247
+ u(w);
3248
3248
  }
3249
3249
  }
3250
3250
  ) });
3251
3251
  }
3252
3252
  const xr = "data-validation.list.dropdown", jr = "data-validation.date.dropdown";
3253
- var Fs = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, Ps = (r, a, e, t) => {
3253
+ var Ns = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, Ps = (r, a, e, t) => {
3254
3254
  for (var o = t > 1 ? void 0 : t ? Ls(a, e) : a, n = r.length - 1, i; n >= 0; n--)
3255
3255
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
3256
- return t && o && Fs(a, e, o), o;
3256
+ return t && o && Ns(a, e, o), o;
3257
3257
  }, se = (r, a) => (e, t) => a(e, t, r);
3258
3258
  const As = {}, xs = {
3259
3259
  tr: {
@@ -3261,9 +3261,9 @@ const As = {}, xs = {
3261
3261
  color: "#fe4b4b"
3262
3262
  }
3263
3263
  };
3264
- let nt = class extends er {
3265
- constructor(r, a, e, t, o, n, i, s, l, d, c, u, m) {
3266
- super(), this._config = r, this._commandService = a, this._editorBridgeService = e, this._menuService = t, this._renderManagerService = o, this._univerInstanceService = n, this._autoHeightController = i, this._componentManager = s, this._dropdownManagerService = l, this._dataValidationModel = d, this._dataValidatorRegistryService = c, this._injector = u, this._sheetInterceptorService = m, this._initComponents(), this._initMenu(), this._initSkeletonChange(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
3264
+ let it = class extends er {
3265
+ constructor(r, a, e, t, o, n, i, s, l, d, c, u, h) {
3266
+ super(), this._config = r, this._commandService = a, this._editorBridgeService = e, this._menuService = t, this._renderManagerService = o, this._univerInstanceService = n, this._autoHeightController = i, this._componentManager = s, this._dropdownManagerService = l, this._dataValidationModel = d, this._dataValidatorRegistryService = c, this._injector = u, this._sheetInterceptorService = h, this._initComponents(), this._initMenu(), this._initSkeletonChange(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
3267
3267
  }
3268
3268
  _initMenu() {
3269
3269
  const { menu: r = {} } = this._config;
@@ -3293,11 +3293,11 @@ let nt = class extends er {
3293
3293
  ],
3294
3294
  [
3295
3295
  jr,
3296
- Ns
3296
+ Fs
3297
3297
  ],
3298
3298
  [
3299
- bt.componentKey,
3300
- bt
3299
+ Tt.componentKey,
3300
+ Tt
3301
3301
  ],
3302
3302
  ...vi
3303
3303
  ].forEach(([r, a]) => {
@@ -3322,8 +3322,10 @@ let nt = class extends er {
3322
3322
  const d = this._dataValidatorRegistryService.getValidatorItem(l.type);
3323
3323
  if (!(d != null && d.dropdown))
3324
3324
  return;
3325
- const c = i.getActiveSheet(), u = this._dropdownManagerService.activeDropdown, m = u == null ? void 0 : u.location;
3326
- if (m && m.unitId === e && m.subUnitId === t && m.row === o && m.col === n)
3325
+ const c = i.getActiveSheet();
3326
+ if (!c) return;
3327
+ const u = this._dropdownManagerService.activeDropdown, h = u == null ? void 0 : u.location;
3328
+ if (h && h.unitId === e && h.subUnitId === t && h.row === o && h.col === n)
3327
3329
  return;
3328
3330
  this._dropdownManagerService.showDropdown({
3329
3331
  location: {
@@ -3343,11 +3345,12 @@ let nt = class extends er {
3343
3345
  }
3344
3346
  _initSkeletonChange() {
3345
3347
  const r = () => {
3346
- var i, s;
3348
+ var i, s, l;
3347
3349
  const a = this._univerInstanceService.getCurrentUnitForType(ae.UNIVER_SHEET);
3348
- if (!a)
3349
- return;
3350
- const e = a.getUnitId(), t = a.getActiveSheet().getSheetId(), o = (s = (i = this._renderManagerService.getRenderById(e)) == null ? void 0 : i.with(Fa).getUnitSkeleton(e, t)) == null ? void 0 : s.skeleton, n = this._renderManagerService.getRenderById(e);
3350
+ if (!a) return;
3351
+ const e = a.getUnitId(), t = (i = a.getActiveSheet()) == null ? void 0 : i.getSheetId();
3352
+ if (!t) return;
3353
+ const o = (l = (s = this._renderManagerService.getRenderById(e)) == null ? void 0 : s.with(Na).getUnitSkeleton(e, t)) == null ? void 0 : l.skeleton, n = this._renderManagerService.getRenderById(e);
3351
3354
  o == null || o.makeDirty(!0), o == null || o.calculate(), n && n.mainComponent.makeForceDirty();
3352
3355
  };
3353
3356
  this.disposeWithMe(this._dataValidationModel.ruleChange$.subscribe(() => r())), this.disposeWithMe(this._dataValidationModel.validStatusChange$.subscribe(() => r()));
@@ -3359,32 +3362,32 @@ let nt = class extends er {
3359
3362
  vo.CELL_CONTENT,
3360
3363
  {
3361
3364
  priority: 200,
3362
- // eslint-disable-next-line max-lines-per-function
3365
+ // eslint-disable-next-line max-lines-per-function, complexity
3363
3366
  handler: (r, a, e) => {
3364
- var I, y, O, j, P;
3367
+ var y, w, F, x, j, $;
3365
3368
  const { row: t, col: o, unitId: n, subUnitId: i, workbook: s, worksheet: l } = a, d = this._dataValidationModel.ensureManager(n, i);
3366
3369
  if (!d)
3367
3370
  return e(r);
3368
- const c = (y = (I = this._renderManagerService.getRenderById(n)) == null ? void 0 : I.with(Fa).getUnitSkeleton(n, i)) == null ? void 0 : y.skeleton;
3371
+ const c = (w = (y = this._renderManagerService.getRenderById(n)) == null ? void 0 : y.with(Na).getUnitSkeleton(n, i)) == null ? void 0 : w.skeleton;
3369
3372
  if (!c)
3370
3373
  return e(r);
3371
- const u = a.workbook.getStyles(), m = (typeof (r == null ? void 0 : r.s) == "string" ? u.get(r == null ? void 0 : r.s) : r == null ? void 0 : r.s) || {}, f = d.getRuleIdByLocation(t, o);
3374
+ const u = a.workbook.getStyles(), h = (typeof (r == null ? void 0 : r.s) == "string" ? u.get(r == null ? void 0 : r.s) : r == null ? void 0 : r.s) || {}, f = d.getRuleIdByLocation(t, o);
3372
3375
  if (!f)
3373
3376
  return e(r);
3374
- const h = d.getRuleById(f);
3375
- if (!h)
3377
+ const m = d.getRuleById(f);
3378
+ if (!m)
3376
3379
  return e(r);
3377
- const g = l.getCellRaw(a.row, a.col), R = this._dataValidationModel.validator(ne(g), h, a), _ = this._dataValidatorRegistryService.getValidatorItem(h.type), V = ne(r);
3380
+ const v = l.getCellRaw(a.row, a.col), R = this._dataValidationModel.validator(ne(v), m, a), _ = this._dataValidatorRegistryService.getValidatorItem(m.type), V = ne(r);
3378
3381
  let S = {};
3379
- if ((h.type === q.LIST || h.type === q.LIST_MULTIPLE) && (S = {
3382
+ if ((m.type === X.LIST || m.type === X.LIST_MULTIPLE) && (S = {
3380
3383
  interceptorStyle: {
3381
3384
  ...r == null ? void 0 : r.interceptorStyle,
3382
- tb: (O = m.tb !== pe.OVERFLOW ? m.tb : pe.CLIP) != null ? O : pe.WRAP
3385
+ tb: (F = h.tb !== pe.OVERFLOW ? h.tb : pe.CLIP) != null ? F : pe.WRAP
3383
3386
  }
3384
- }), h.type === q.CHECKBOX) {
3385
- const { formula2: N } = _.parseFormulaSync(h, a.unitId, a.subUnitId);
3387
+ }), m.type === X.CHECKBOX) {
3388
+ const { formula2: E } = _.parseFormulaSync(m, a.unitId, a.subUnitId);
3386
3389
  V || (S = {
3387
- v: N,
3390
+ v: E,
3388
3391
  t: 1,
3389
3392
  p: null,
3390
3393
  interceptorStyle: {
@@ -3393,14 +3396,14 @@ let nt = class extends er {
3393
3396
  }
3394
3397
  });
3395
3398
  }
3396
- if (h.type === q.LIST && (h.renderMode === ce.ARROW || h.renderMode === ce.TEXT)) {
3397
- const N = _.getListWithColorMap(h), A = `${(j = ne(r)) != null ? j : ""}`, F = N[A];
3398
- F && (S = {
3399
+ if (m.type === X.LIST && (m.renderMode === ce.ARROW || m.renderMode === ce.TEXT)) {
3400
+ const E = _.getListWithColorMap(m), P = `${(x = ne(r)) != null ? x : ""}`, A = E[P];
3401
+ A && (S = {
3399
3402
  ...S,
3400
3403
  interceptorStyle: {
3401
3404
  ...S.interceptorStyle,
3402
3405
  bg: {
3403
- rgb: F
3406
+ rgb: A
3404
3407
  }
3405
3408
  }
3406
3409
  });
@@ -3411,7 +3414,7 @@ let nt = class extends er {
3411
3414
  dataValidation: {
3412
3415
  ruleId: f,
3413
3416
  validStatus: R,
3414
- rule: h,
3417
+ rule: m,
3415
3418
  validator: _
3416
3419
  },
3417
3420
  markers: {
@@ -3419,36 +3422,36 @@ let nt = class extends er {
3419
3422
  ...R === Re.INVALID ? xs : null
3420
3423
  },
3421
3424
  customRender: [
3422
- ...(P = r == null ? void 0 : r.customRender) != null ? P : [],
3425
+ ...(j = r == null ? void 0 : r.customRender) != null ? j : [],
3423
3426
  ..._ != null && _.canvasRender ? [_.canvasRender] : []
3424
3427
  ],
3425
3428
  // @ts-ignore
3426
3429
  fontRenderExtension: {
3427
3430
  // @ts-ignore
3428
3431
  ...r == null ? void 0 : r.fontRenderExtension,
3429
- isSkip: _ == null ? void 0 : _.skipDefaultFontRender(h, V, a)
3432
+ isSkip: _ == null ? void 0 : _.skipDefaultFontRender(m, V, a)
3430
3433
  },
3431
3434
  interceptorStyle: {
3432
3435
  ...r == null ? void 0 : r.interceptorStyle,
3433
3436
  ...S.interceptorStyle
3434
3437
  },
3435
3438
  get interceptorAutoHeight() {
3436
- var F, B, Y, x;
3437
- const N = c.mergeData.find((L) => {
3438
- const { startColumn: G, startRow: te, endColumn: H, endRow: M } = L;
3439
- return t >= te && o >= G && t <= M && o <= H;
3440
- }), A = {
3439
+ var A, q, L, b;
3440
+ const E = c.mergeData.find((Y) => {
3441
+ const { startColumn: Z, startRow: H, endColumn: M, endRow: O } = Y;
3442
+ return t >= H && o >= Z && t <= O && o <= M;
3443
+ }), P = {
3441
3444
  data: {
3442
3445
  ...r,
3443
3446
  dataValidation: {
3444
3447
  ruleId: f,
3445
3448
  validStatus: R,
3446
- rule: h,
3449
+ rule: m,
3447
3450
  validator: _
3448
3451
  }
3449
3452
  },
3450
3453
  style: c.getsStyles().getStyleByCell(r),
3451
- primaryWithCoord: c.getCellByIndex((F = N == null ? void 0 : N.startRow) != null ? F : t, (B = N == null ? void 0 : N.startColumn) != null ? B : o),
3454
+ primaryWithCoord: c.getCellByIndex((A = E == null ? void 0 : E.startRow) != null ? A : t, (q = E == null ? void 0 : E.startColumn) != null ? q : o),
3452
3455
  unitId: n,
3453
3456
  subUnitId: i,
3454
3457
  row: t,
@@ -3456,8 +3459,9 @@ let nt = class extends er {
3456
3459
  workbook: s,
3457
3460
  worksheet: l
3458
3461
  };
3459
- return (x = (Y = _ == null ? void 0 : _.canvasRender) == null ? void 0 : Y.calcCellAutoHeight) == null ? void 0 : x.call(Y, A);
3460
- }
3462
+ return (b = (L = _ == null ? void 0 : _.canvasRender) == null ? void 0 : L.calcCellAutoHeight) == null ? void 0 : b.call(L, P);
3463
+ },
3464
+ coverable: (($ = r == null ? void 0 : r.coverable) != null ? $ : !0) && !(m.type === X.LIST || m.type === X.LIST_MULTIPLE)
3461
3465
  });
3462
3466
  }
3463
3467
  }
@@ -3474,28 +3478,28 @@ let nt = class extends er {
3474
3478
  });
3475
3479
  }
3476
3480
  };
3477
- nt = Ps([
3478
- ve(ge.Rendered, nt),
3481
+ it = Ps([
3482
+ ve(ge.Rendered, it),
3479
3483
  se(1, re),
3480
3484
  se(2, va),
3481
3485
  se(3, Uo),
3482
3486
  se(4, lr),
3483
- se(5, ee),
3484
- se(6, w(Mo)),
3485
- se(7, w(dt)),
3486
- se(8, w(Be)),
3487
- se(9, w(K)),
3488
- se(10, w(De)),
3489
- se(11, w(Ue)),
3490
- se(12, w(or))
3491
- ], nt);
3487
+ se(5, te),
3488
+ se(6, I(Mo)),
3489
+ se(7, I(ct)),
3490
+ se(8, I(Be)),
3491
+ se(9, I(K)),
3492
+ se(10, I(De)),
3493
+ se(11, I(Ue)),
3494
+ se(12, I(or))
3495
+ ], it);
3492
3496
  var js = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, Us = (r, a, e, t) => {
3493
3497
  for (var o = t > 1 ? void 0 : t ? Bs(a, e) : a, n = r.length - 1, i; n >= 0; n--)
3494
3498
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
3495
3499
  return t && o && js(a, e, o), o;
3496
- }, _t = (r, a) => (e, t) => a(e, t, r);
3497
- const Xt = "SHEET_DATA_VALIDATION_ALERT";
3498
- let Rt = class extends he {
3500
+ }, St = (r, a) => (e, t) => a(e, t, r);
3501
+ const Gt = "SHEET_DATA_VALIDATION_ALERT";
3502
+ let Ct = class extends he {
3499
3503
  constructor(r, a, e, t) {
3500
3504
  super(), this._hoverManagerService = r, this._cellAlertManagerService = a, this._univerInstanceService = e, this._localeService = t, this._init();
3501
3505
  }
@@ -3506,9 +3510,11 @@ let Rt = class extends he {
3506
3510
  this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(rn(100)).subscribe((r) => {
3507
3511
  var a, e;
3508
3512
  if (r) {
3509
- const n = this._univerInstanceService.getCurrentUnitForType(ae.UNIVER_SHEET).getActiveSheet().getCell(r.location.row, r.location.col);
3513
+ const o = this._univerInstanceService.getCurrentUnitForType(ae.UNIVER_SHEET).getActiveSheet();
3514
+ if (!o) return;
3515
+ const n = o.getCell(r.location.row, r.location.col);
3510
3516
  if (((a = n == null ? void 0 : n.dataValidation) == null ? void 0 : a.validStatus) === Re.INVALID) {
3511
- const i = this._cellAlertManagerService.currentAlert.get(Xt), s = (e = i == null ? void 0 : i.alert) == null ? void 0 : e.location;
3517
+ const i = this._cellAlertManagerService.currentAlert.get(Gt), s = (e = i == null ? void 0 : i.alert) == null ? void 0 : e.location;
3512
3518
  if (s && s.row === r.location.row && s.col === r.location.col && s.subUnitId === r.location.subUnitId && s.unitId === r.location.unitId)
3513
3519
  return;
3514
3520
  const l = n.dataValidation.validator, d = n.dataValidation.rule;
@@ -3521,32 +3527,32 @@ let Rt = class extends he {
3521
3527
  location: r.location,
3522
3528
  width: 200,
3523
3529
  height: 74,
3524
- key: Xt
3530
+ key: Gt
3525
3531
  });
3526
3532
  return;
3527
3533
  }
3528
3534
  }
3529
- this._cellAlertManagerService.removeAlert(Xt);
3535
+ this._cellAlertManagerService.removeAlert(Gt);
3530
3536
  }));
3531
3537
  }
3532
3538
  };
3533
- Rt = Us([
3534
- ve(ge.Rendered, Rt),
3535
- _t(0, w(wo)),
3536
- _t(1, w(Io)),
3537
- _t(2, ee),
3538
- _t(3, w(ie))
3539
- ], Rt);
3539
+ Ct = Us([
3540
+ ve(ge.Rendered, Ct),
3541
+ St(0, I(wo)),
3542
+ St(1, I(Io)),
3543
+ St(2, te),
3544
+ St(3, I(ie))
3545
+ ], Ct);
3540
3546
  var $s = Object.defineProperty, Ws = Object.getOwnPropertyDescriptor, Hs = (r, a, e, t) => {
3541
3547
  for (var o = t > 1 ? void 0 : t ? Ws(a, e) : a, n = r.length - 1, i; n >= 0; n--)
3542
3548
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
3543
3549
  return t && o && $s(a, e, o), o;
3544
3550
  }, Ye = (r, a) => (e, t) => a(e, t, r);
3545
- let it = class extends he {
3551
+ let st = class extends he {
3546
3552
  constructor(a, e, t, o, n, i) {
3547
3553
  super();
3548
- v(this, "_disposableMap", /* @__PURE__ */ new Map());
3549
- v(this, "registerRule", (a, e, t) => {
3554
+ g(this, "_disposableMap", /* @__PURE__ */ new Map());
3555
+ g(this, "registerRule", (a, e, t) => {
3550
3556
  this.register(a, e, t), this.registerFormula(a, e, t);
3551
3557
  });
3552
3558
  this._dataValidationModel = a, this._injector = e, this._refRangeService = t, this._dataValidationCustomFormulaService = o, this._dataValidationFormulaService = n, this._formulaRefRangeService = i, this._initRefRange();
@@ -3561,8 +3567,8 @@ let it = class extends he {
3561
3567
  const u = this._dataValidationModel.getRuleById(a, e, o);
3562
3568
  if (!u)
3563
3569
  return { redos: [], undos: [] };
3564
- const m = u[d];
3565
- if (!m || m === c)
3570
+ const h = u[d];
3571
+ if (!h || h === c)
3566
3572
  return { redos: [], undos: [] };
3567
3573
  const f = {
3568
3574
  unitId: a,
@@ -3577,7 +3583,7 @@ let it = class extends he {
3577
3583
  [d]: c
3578
3584
  }
3579
3585
  }
3580
- }, h = {
3586
+ }, m = {
3581
3587
  unitId: a,
3582
3588
  subUnitId: e,
3583
3589
  ruleId: t.uid,
@@ -3589,20 +3595,20 @@ let it = class extends he {
3589
3595
  formula2: u.formula2
3590
3596
  }
3591
3597
  }
3592
- }, g = [
3598
+ }, v = [
3593
3599
  {
3594
- id: Ge.id,
3600
+ id: Xe.id,
3595
3601
  params: f
3596
3602
  }
3597
3603
  ], R = [
3598
3604
  {
3599
- id: Ge.id,
3600
- params: h
3605
+ id: Xe.id,
3606
+ params: m
3601
3607
  }
3602
3608
  ];
3603
- return { redos: g, undos: R };
3609
+ return { redos: v, undos: R };
3604
3610
  };
3605
- if (t.type === q.CUSTOM) {
3611
+ if (t.type === X.CUSTOM) {
3606
3612
  const d = this._dataValidationCustomFormulaService.getRuleFormulaInfo(a, e, o);
3607
3613
  if (d) {
3608
3614
  const c = this._formulaRefRangeService.registerFormula(
@@ -3612,23 +3618,23 @@ let it = class extends he {
3612
3618
  i.add(() => c.dispose());
3613
3619
  }
3614
3620
  }
3615
- if (t.type !== q.CUSTOM) {
3621
+ if (t.type !== X.CUSTOM) {
3616
3622
  const d = this._dataValidationFormulaService.getRuleFormulaInfo(a, e, o);
3617
3623
  if (d) {
3618
3624
  const [c, u] = d;
3619
3625
  if (c) {
3620
- const m = this._formulaRefRangeService.registerFormula(
3626
+ const h = this._formulaRefRangeService.registerFormula(
3621
3627
  c.text,
3622
3628
  (f) => s("formula1", f)
3623
3629
  );
3624
- i.add(() => m.dispose());
3630
+ i.add(() => h.dispose());
3625
3631
  }
3626
3632
  if (u) {
3627
- const m = this._formulaRefRangeService.registerFormula(
3633
+ const h = this._formulaRefRangeService.registerFormula(
3628
3634
  u.text,
3629
3635
  (f) => s("formula1", f)
3630
3636
  );
3631
- i.add(() => m.dispose());
3637
+ i.add(() => h.dispose());
3632
3638
  }
3633
3639
  }
3634
3640
  }
@@ -3636,20 +3642,20 @@ let it = class extends he {
3636
3642
  register(a, e, t) {
3637
3643
  var l;
3638
3644
  const o = (d) => {
3639
- const c = [...t.ranges], m = c.map((h) => _o(h, d)).filter((h) => !!h).flat();
3640
- if (Jr(m, c))
3645
+ const c = [...t.ranges], h = c.map((m) => _o(m, d)).filter((m) => !!m).flat();
3646
+ if (Jr(h, c))
3641
3647
  return { redos: [], undos: [] };
3642
- if (m.length) {
3643
- const h = {
3648
+ if (h.length) {
3649
+ const m = {
3644
3650
  unitId: a,
3645
3651
  subUnitId: e,
3646
3652
  ruleId: t.uid,
3647
3653
  payload: {
3648
3654
  type: Ie.RANGE,
3649
- payload: m
3655
+ payload: h
3650
3656
  }
3651
- }, g = [{ id: Ge.id, params: h }], R = [{
3652
- id: Ge.id,
3657
+ }, v = [{ id: Xe.id, params: m }], R = [{
3658
+ id: Xe.id,
3653
3659
  params: {
3654
3660
  unitId: a,
3655
3661
  subUnitId: e,
@@ -3660,10 +3666,10 @@ let it = class extends he {
3660
3666
  }
3661
3667
  }
3662
3668
  }];
3663
- return { redos: g, undos: R };
3669
+ return { redos: v, undos: R };
3664
3670
  } else {
3665
- const h = { unitId: a, subUnitId: e, ruleId: t.uid }, g = [{ id: It.id, params: h }], R = lo(this._injector, h);
3666
- return { redos: g, undos: R };
3671
+ const m = { unitId: a, subUnitId: e, ruleId: t.uid }, v = [{ id: yt.id, params: m }], R = lo(this._injector, m);
3672
+ return { redos: v, undos: R };
3667
3673
  }
3668
3674
  }, n = [];
3669
3675
  t.ranges.forEach((d) => {
@@ -3702,93 +3708,109 @@ let it = class extends he {
3702
3708
  }));
3703
3709
  }
3704
3710
  };
3705
- it = Hs([
3706
- ve(ge.Ready, it),
3707
- Ye(0, w(K)),
3708
- Ye(1, w(Ue)),
3709
- Ye(2, w(go)),
3710
- Ye(3, w(Ke)),
3711
- Ye(4, w(ue)),
3712
- Ye(5, w(nn))
3713
- ], it);
3714
- var ks = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, Gs = (r, a, e, t) => {
3711
+ st = Hs([
3712
+ ve(ge.Ready, st),
3713
+ Ye(0, I(K)),
3714
+ Ye(1, I(Ue)),
3715
+ Ye(2, I(go)),
3716
+ Ye(3, I(Ke)),
3717
+ Ye(4, I(ue)),
3718
+ Ye(5, I(nn))
3719
+ ], st);
3720
+ var ks = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, Xs = (r, a, e, t) => {
3715
3721
  for (var o = t > 1 ? void 0 : t ? Ys(a, e) : a, n = r.length - 1, i; n >= 0; n--)
3716
3722
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
3717
3723
  return t && o && ks(a, e, o), o;
3718
3724
  }, za = (r, a) => (e, t) => a(e, t, r);
3719
- let Ct = class extends he {
3725
+ let Vt = class extends he {
3720
3726
  constructor(r, a) {
3721
3727
  super(), this._autoFillService = r, this._dataValidationModel = a, this._initAutoFill();
3722
3728
  }
3723
3729
  // eslint-disable-next-line max-lines-per-function
3724
3730
  _initAutoFill() {
3725
- const r = () => ({ redos: [], undos: [] }), a = (t) => {
3726
- const { source: o, target: n, unitId: i, subUnitId: s } = t, l = this._dataValidationModel.ensureManager(i, s), d = l.getRuleObjectMatrix().clone(), c = oa([o, n]), [u, m] = c.ranges, { mapFunc: f } = c, h = {
3727
- row: u.startRow,
3728
- col: u.startColumn
3731
+ const r = () => ({ redos: [], undos: [] }), a = (o) => {
3732
+ const { source: n, target: i, unitId: s, subUnitId: l } = o, d = this._dataValidationModel.ensureManager(s, l), c = d.getRuleObjectMatrix().clone(), u = oa([n, i]), [h, f] = u.ranges, { mapFunc: m } = u, v = {
3733
+ row: h.startRow,
3734
+ col: h.startColumn
3729
3735
  };
3730
- Eo(u, m).forEach((S) => {
3731
- const I = S.repeatStartCell, y = S.relativeRange, O = {
3732
- startRow: h.row,
3733
- startColumn: h.col,
3734
- endColumn: h.col,
3735
- endRow: h.row
3736
+ Eo(h, f).forEach((y) => {
3737
+ const w = y.repeatStartCell, F = y.relativeRange, x = {
3738
+ startRow: v.row,
3739
+ startColumn: v.col,
3740
+ endColumn: v.col,
3741
+ endRow: v.row
3736
3742
  }, j = {
3737
- startRow: I.row,
3738
- startColumn: I.col,
3739
- endColumn: I.col,
3740
- endRow: I.row
3743
+ startRow: w.row,
3744
+ startColumn: w.col,
3745
+ endColumn: w.col,
3746
+ endRow: w.row
3741
3747
  };
3742
- $.foreach(y, (P, N) => {
3743
- const A = xe.getPositionRange(
3748
+ U.foreach(F, ($, E) => {
3749
+ const P = xe.getPositionRange(
3744
3750
  {
3745
- startRow: P,
3746
- startColumn: N,
3747
- endColumn: N,
3748
- endRow: P
3751
+ startRow: $,
3752
+ startColumn: E,
3753
+ endColumn: E,
3754
+ endRow: $
3749
3755
  },
3750
- O
3751
- ), { row: F, col: B } = f(A.startRow, A.startColumn), Y = l.getRuleIdByLocation(F, B);
3752
- if (Y) {
3753
- const x = xe.getPositionRange(
3756
+ x
3757
+ ), { row: A, col: q } = m(P.startRow, P.startColumn), L = d.getRuleIdByLocation(A, q);
3758
+ if (L) {
3759
+ const b = xe.getPositionRange(
3754
3760
  {
3755
- startRow: P,
3756
- startColumn: N,
3757
- endColumn: N,
3758
- endRow: P
3761
+ startRow: $,
3762
+ startColumn: E,
3763
+ endColumn: E,
3764
+ endRow: $
3759
3765
  },
3760
3766
  j
3761
- ), { row: L, col: G } = f(x.startRow, x.startColumn);
3762
- d.setValue(L, G, Y);
3767
+ ), { row: Y, col: Z } = m(b.startRow, b.startColumn);
3768
+ c.setValue(Y, Z, L);
3763
3769
  }
3764
3770
  });
3765
3771
  });
3766
- const R = d.diff(l.getDataValidations()), { redoMutations: _, undoMutations: V } = Qe(i, s, R);
3772
+ const _ = c.diff(d.getDataValidations()), { redoMutations: V, undoMutations: S } = Qe(s, l, _);
3767
3773
  return {
3768
- undos: V,
3769
- redos: _
3774
+ undos: S,
3775
+ redos: V
3770
3776
  };
3771
- }, e = {
3777
+ }, e = [
3778
+ X.CHECKBOX
3779
+ ], t = {
3772
3780
  id: ya,
3773
- onFillData: (t, o, n) => n === At.COPY || n === At.ONLY_FORMAT || n === At.SERIES ? a(t) : r()
3781
+ onBeforeFillData: (o) => {
3782
+ const { source: n, unitId: i, subUnitId: s } = o, l = this._dataValidationModel.ensureManager(i, s);
3783
+ for (const d of n.rows)
3784
+ for (const c of n.cols) {
3785
+ const u = l.getRuleByLocation(d, c);
3786
+ if (u && e.indexOf(u.type) > -1) {
3787
+ this._autoFillService.setDisableApplyType(et.SERIES, !0);
3788
+ return;
3789
+ }
3790
+ }
3791
+ },
3792
+ onFillData: (o, n, i) => i === et.COPY || i === et.ONLY_FORMAT || i === et.SERIES ? a(o) : r(),
3793
+ onAfterFillData: () => {
3794
+ this._autoFillService.setDisableApplyType(et.SERIES, !1);
3795
+ }
3774
3796
  };
3775
- this.disposeWithMe(this._autoFillService.addHook(e));
3797
+ this.disposeWithMe(this._autoFillService.addHook(t));
3776
3798
  }
3777
3799
  };
3778
- Ct = Gs([
3779
- ve(ge.Ready, Ct),
3800
+ Vt = Xs([
3801
+ ve(ge.Ready, Vt),
3780
3802
  za(0, Do),
3781
- za(1, w(K))
3782
- ], Ct);
3783
- var Xs = Object.defineProperty, qs = Object.getOwnPropertyDescriptor, zs = (r, a, e, t) => {
3803
+ za(1, I(K))
3804
+ ], Vt);
3805
+ var Gs = Object.defineProperty, qs = Object.getOwnPropertyDescriptor, zs = (r, a, e, t) => {
3784
3806
  for (var o = t > 1 ? void 0 : t ? qs(a, e) : a, n = r.length - 1, i; n >= 0; n--)
3785
3807
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
3786
- return t && o && Xs(a, e, o), o;
3808
+ return t && o && Gs(a, e, o), o;
3787
3809
  }, qt = (r, a) => (e, t) => a(e, t, r);
3788
- let Vt = class extends he {
3810
+ let Mt = class extends he {
3789
3811
  constructor(a, e, t) {
3790
3812
  super();
3791
- v(this, "_copyInfo");
3813
+ g(this, "_copyInfo");
3792
3814
  this._sheetClipboardService = a, this._dataValidationModel = e, this._injector = t, this._initCopyPaste();
3793
3815
  }
3794
3816
  _initCopyPaste() {
@@ -3802,7 +3824,7 @@ let Vt = class extends he {
3802
3824
  });
3803
3825
  }
3804
3826
  _collect(a, e, t) {
3805
- const o = new lt();
3827
+ const o = new dt();
3806
3828
  this._copyInfo = {
3807
3829
  unitId: a,
3808
3830
  subUnitId: e,
@@ -3815,9 +3837,9 @@ let Vt = class extends he {
3815
3837
  return;
3816
3838
  const { rows: l, cols: d } = s;
3817
3839
  l.forEach((c, u) => {
3818
- d.forEach((m, f) => {
3819
- const h = n.getRuleIdByLocation(c, m);
3820
- o.setValue(u, f, h != null ? h : "");
3840
+ d.forEach((h, f) => {
3841
+ const m = n.getRuleIdByLocation(c, h);
3842
+ o.setValue(u, f, m != null ? m : "");
3821
3843
  });
3822
3844
  });
3823
3845
  }
@@ -3840,78 +3862,78 @@ let Vt = class extends he {
3840
3862
  return { redos: [], undos: [] };
3841
3863
  const { unitId: t, subUnitId: o } = this._copyInfo;
3842
3864
  if (e.unitId !== t || o !== e.subUnitId) {
3843
- const n = this._dataValidationModel.ensureManager(t, o), i = this._dataValidationModel.ensureManager(e.unitId, e.subUnitId), s = i.getRuleObjectMatrix().clone(), { ranges: [l, d], mapFunc: c } = oa([e.copyRange, a]), u = Pa(l, d, !0), m = /* @__PURE__ */ new Map();
3844
- u.forEach(({ startRange: g }) => {
3865
+ const n = this._dataValidationModel.ensureManager(t, o), i = this._dataValidationModel.ensureManager(e.unitId, e.subUnitId), s = i.getRuleObjectMatrix().clone(), { ranges: [l, d], mapFunc: c } = oa([e.copyRange, a]), u = Pa(l, d, !0), h = /* @__PURE__ */ new Map();
3866
+ u.forEach(({ startRange: v }) => {
3845
3867
  var R;
3846
3868
  (R = this._copyInfo) == null || R.matrix.forValue((_, V, S) => {
3847
- const I = xe.getPositionRange(
3869
+ const y = xe.getPositionRange(
3848
3870
  {
3849
3871
  startRow: _,
3850
3872
  endRow: _,
3851
3873
  startColumn: V,
3852
3874
  endColumn: V
3853
3875
  },
3854
- g
3855
- ), y = `${o}-${S}`, O = n.getRuleById(S);
3856
- !i.getRuleById(y) && O && m.set(y, { ...O, uid: y });
3857
- const { row: j, col: P } = c(I.startRow, I.startColumn);
3858
- s.setValue(j, P, y);
3876
+ v
3877
+ ), w = `${o}-${S}`, F = n.getRuleById(S);
3878
+ !i.getRuleById(w) && F && h.set(w, { ...F, uid: w });
3879
+ const { row: x, col: j } = c(y.startRow, y.startColumn);
3880
+ s.setValue(x, j, w);
3859
3881
  });
3860
3882
  });
3861
- const { redoMutations: f, undoMutations: h } = Qe(
3883
+ const { redoMutations: f, undoMutations: m } = Qe(
3862
3884
  e.unitId,
3863
3885
  e.subUnitId,
3864
- s.diffWithAddition(i.getDataValidations(), m.values())
3886
+ s.diffWithAddition(i.getDataValidations(), h.values())
3865
3887
  );
3866
3888
  return {
3867
3889
  redos: f,
3868
- undos: h
3890
+ undos: m
3869
3891
  };
3870
3892
  } else {
3871
3893
  const n = this._dataValidationModel.ensureManager(t, o), i = n.getRuleObjectMatrix().clone(), { ranges: [s, l], mapFunc: d } = oa([e.copyRange, a]);
3872
3894
  Pa(s, l, !0).forEach(({ startRange: f }) => {
3873
- var h;
3874
- (h = this._copyInfo) == null || h.matrix.forValue((g, R, _) => {
3895
+ var m;
3896
+ (m = this._copyInfo) == null || m.matrix.forValue((v, R, _) => {
3875
3897
  const V = xe.getPositionRange(
3876
3898
  {
3877
- startRow: g,
3878
- endRow: g,
3899
+ startRow: v,
3900
+ endRow: v,
3879
3901
  startColumn: R,
3880
3902
  endColumn: R
3881
3903
  },
3882
3904
  f
3883
- ), { row: S, col: I } = d(V.startRow, V.startColumn);
3884
- i.setValue(S, I, _);
3905
+ ), { row: S, col: y } = d(V.startRow, V.startColumn);
3906
+ i.setValue(S, y, _);
3885
3907
  });
3886
3908
  });
3887
- const { redoMutations: u, undoMutations: m } = Qe(
3909
+ const { redoMutations: u, undoMutations: h } = Qe(
3888
3910
  t,
3889
3911
  o,
3890
3912
  i.diff(n.getDataValidations())
3891
3913
  );
3892
3914
  return {
3893
3915
  redos: u,
3894
- undos: m
3916
+ undos: h
3895
3917
  };
3896
3918
  }
3897
3919
  }
3898
3920
  };
3899
- Vt = zs([
3900
- ve(ge.Ready, Vt),
3921
+ Mt = zs([
3922
+ ve(ge.Ready, Mt),
3901
3923
  qt(0, bo),
3902
- qt(1, w(K)),
3903
- qt(2, w(Ue))
3904
- ], Vt);
3924
+ qt(1, I(K)),
3925
+ qt(2, I(Ue))
3926
+ ], Mt);
3905
3927
  class Ea {
3906
3928
  constructor(a, e) {
3907
- v(this, "value");
3929
+ g(this, "value");
3908
3930
  this._worksheet = e, this.value = a;
3909
3931
  }
3910
3932
  addRule(a) {
3911
3933
  const e = a.uid;
3912
3934
  a.ranges.forEach((t) => {
3913
- $.foreach(
3914
- $.transformRange(t, this._worksheet),
3935
+ U.foreach(
3936
+ U.transformRange(t, this._worksheet),
3915
3937
  (o, n) => {
3916
3938
  this.value.setValue(o, n, e);
3917
3939
  }
@@ -3920,30 +3942,30 @@ class Ea {
3920
3942
  }
3921
3943
  removeRange(a) {
3922
3944
  a.forEach((e) => {
3923
- $.foreach($.transformRange(e, this._worksheet), (t, o) => {
3945
+ U.foreach(U.transformRange(e, this._worksheet), (t, o) => {
3924
3946
  this.value.realDeleteValue(t, o);
3925
3947
  });
3926
3948
  });
3927
3949
  }
3928
3950
  removeRule(a) {
3929
3951
  a.ranges.forEach((e) => {
3930
- $.foreach($.transformRange(e, this._worksheet), (t, o) => {
3952
+ U.foreach(U.transformRange(e, this._worksheet), (t, o) => {
3931
3953
  this.value.setValue(t, o, "");
3932
3954
  });
3933
3955
  });
3934
3956
  }
3935
3957
  updateRange(a, e, t) {
3936
- const o = `${a}$`, n = e.map((s) => $.transformRange(s, this._worksheet)), i = t.map((s) => $.transformRange(s, this._worksheet));
3958
+ const o = `${a}$`, n = e.map((s) => U.transformRange(s, this._worksheet)), i = t.map((s) => U.transformRange(s, this._worksheet));
3937
3959
  n.forEach((s) => {
3938
- $.foreach(s, (l, d) => {
3960
+ U.foreach(s, (l, d) => {
3939
3961
  this.value.getValue(l, d) === a && this.value.setValue(l, d, o);
3940
3962
  });
3941
3963
  }), i.forEach((s) => {
3942
- $.foreach(s, (l, d) => {
3964
+ U.foreach(s, (l, d) => {
3943
3965
  this.value.setValue(l, d, a);
3944
3966
  });
3945
3967
  }), n.forEach((s) => {
3946
- $.foreach(s, (l, d) => {
3968
+ U.foreach(s, (l, d) => {
3947
3969
  this.value.getValue(l, d) === o && this.value.realDeleteValue(l, d);
3948
3970
  });
3949
3971
  });
@@ -3952,7 +3974,7 @@ class Ea {
3952
3974
  const e = [];
3953
3975
  let t = 0;
3954
3976
  return a.forEach((o, n) => {
3955
- const i = Pt(this.value, (l) => l === o.uid), s = o.ranges;
3977
+ const i = At(this.value, (l) => l === o.uid), s = o.ranges;
3956
3978
  (i.length !== s.length || i.some((l, d) => !xe.equals(l, s[d]))) && e.push({
3957
3979
  type: "update",
3958
3980
  ruleId: o.uid,
@@ -3969,7 +3991,7 @@ class Ea {
3969
3991
  const t = [];
3970
3992
  let o = 0;
3971
3993
  return a.forEach((n, i) => {
3972
- const s = Pt(this.value, (d) => d === n.uid), l = n.ranges;
3994
+ const s = At(this.value, (d) => d === n.uid), l = n.ranges;
3973
3995
  (s.length !== l.length || s.some((d, c) => !xe.equals(d, l[c]))) && t.push({
3974
3996
  type: "update",
3975
3997
  ruleId: n.uid,
@@ -3981,7 +4003,7 @@ class Ea {
3981
4003
  index: i - o
3982
4004
  }), o++);
3983
4005
  }), Array.from(e).forEach((n) => {
3984
- const i = Pt(this.value, (s) => s === n.uid);
4006
+ const i = At(this.value, (s) => s === n.uid);
3985
4007
  t.push({
3986
4008
  type: "add",
3987
4009
  rule: {
@@ -3992,7 +4014,7 @@ class Ea {
3992
4014
  }), t;
3993
4015
  }
3994
4016
  clone() {
3995
- return new Ea(new lt(this.value.clone()), this._worksheet);
4017
+ return new Ea(new dt(this.value.clone()), this._worksheet);
3996
4018
  }
3997
4019
  getValue(a, e) {
3998
4020
  return this.value.getValue(a, e);
@@ -4007,20 +4029,20 @@ class Qs extends co {
4007
4029
  /**
4008
4030
  * save cell's ruleId
4009
4031
  */
4010
- v(this, "_ruleMatrix");
4011
- v(this, "_dataValidatorRegistryService");
4012
- v(this, "_dataValidationCacheService");
4013
- v(this, "_dataValidationFormulaService");
4014
- v(this, "_dataValidationCustomFormulaService");
4015
- v(this, "_cache");
4016
- v(this, "_dataValidationRefRangeController");
4017
- this._injector = n, this._dataValidatorRegistryService = this._injector.get(De), this._dataValidationCacheService = this._injector.get(ht), this._dataValidationFormulaService = this._injector.get(ue), this._dataValidationCustomFormulaService = this._injector.get(Ke), this._dataValidationRefRangeController = this._injector.get(it), this._cache = this._dataValidationCacheService.ensureCache(e, t);
4018
- const s = this._injector.get(ee).getUnit(e, ae.UNIVER_SHEET).getSheetBySheetId(t), l = new lt();
4032
+ g(this, "_ruleMatrix");
4033
+ g(this, "_dataValidatorRegistryService");
4034
+ g(this, "_dataValidationCacheService");
4035
+ g(this, "_dataValidationFormulaService");
4036
+ g(this, "_dataValidationCustomFormulaService");
4037
+ g(this, "_cache");
4038
+ g(this, "_dataValidationRefRangeController");
4039
+ this._injector = n, this._dataValidatorRegistryService = this._injector.get(De), this._dataValidationCacheService = this._injector.get(mt), this._dataValidationFormulaService = this._injector.get(ue), this._dataValidationCustomFormulaService = this._injector.get(Ke), this._dataValidationRefRangeController = this._injector.get(st), this._cache = this._dataValidationCacheService.ensureCache(e, t);
4040
+ const s = this._injector.get(te).getUnit(e, ae.UNIVER_SHEET).getSheetBySheetId(t), l = new dt();
4019
4041
  o == null || o.forEach((d) => {
4020
4042
  const c = d.uid;
4021
4043
  d.ranges.forEach((u) => {
4022
- $.foreach(u, (m, f) => {
4023
- l.setValue(m, f, c);
4044
+ U.foreach(u, (h, f) => {
4045
+ l.setValue(h, f, c);
4024
4046
  });
4025
4047
  });
4026
4048
  }), o == null || o.forEach((d) => {
@@ -4030,7 +4052,7 @@ class Qs extends co {
4030
4052
  _addRuleSideEffect(e) {
4031
4053
  var n;
4032
4054
  const { unitId: t, subUnitId: o } = this;
4033
- (e.type === q.LIST || e.type === q.LIST_MULTIPLE) && Ca((n = e.formula1) != null ? n : "") && (e.formula1 = `=${e.formula1}`), this._ruleMatrix.addRule(e), this._dataValidationCacheService.addRule(t, o, e), this._dataValidationFormulaService.addRule(t, o, e.uid, e.formula1, e.formula2), this._dataValidationCustomFormulaService.addRule(t, o, e);
4055
+ (e.type === X.LIST || e.type === X.LIST_MULTIPLE) && Ca((n = e.formula1) != null ? n : "") && (e.formula1 = `=${e.formula1}`), this._ruleMatrix.addRule(e), this._dataValidationCacheService.addRule(t, o, e), this._dataValidationFormulaService.addRule(t, o, e.uid, e.formula1, e.formula2), this._dataValidationCustomFormulaService.addRule(t, o, e);
4034
4056
  }
4035
4057
  addRule(e, t) {
4036
4058
  (Array.isArray(e) ? e : [e]).forEach((n) => {
@@ -4058,19 +4080,19 @@ class Qs extends co {
4058
4080
  validator(e, t, o, n) {
4059
4081
  const { col: i, row: s, unitId: l, subUnitId: d } = o, c = t.uid, u = this._dataValidatorRegistryService.getValidatorItem(t.type);
4060
4082
  if (u) {
4061
- const m = this._cache.getValue(s, i);
4062
- return !m || m.value !== e ? (this._cache.setValue(s, i, {
4083
+ const h = this._cache.getValue(s, i);
4084
+ return !h || h.value !== e ? (this._cache.setValue(s, i, {
4063
4085
  value: e,
4064
4086
  status: Re.VALIDATING,
4065
4087
  ruleId: c
4066
4088
  }), u.validator({ value: e, unitId: l, subUnitId: d, row: s, column: i }, t).then((f) => {
4067
- const h = f ? Re.VALID : Re.INVALID;
4089
+ const m = f ? Re.VALID : Re.INVALID;
4068
4090
  this._cache.setValue(s, i, {
4069
4091
  value: e,
4070
- status: h,
4092
+ status: m,
4071
4093
  ruleId: c
4072
- }), n(h, !0);
4073
- }), Re.VALIDATING) : (n(m.status, !1), m.status);
4094
+ }), n(m, !0);
4095
+ }), Re.VALIDATING) : (n(h.status, !1), h.status);
4074
4096
  } else
4075
4097
  return n(Re.VALID, !1), Re.VALID;
4076
4098
  }
@@ -4089,8 +4111,8 @@ var Ks = Object.defineProperty, Zs = Object.getOwnPropertyDescriptor, Js = (r, a
4089
4111
  for (var o = t > 1 ? void 0 : t ? Zs(a, e) : a, n = r.length - 1, i; n >= 0; n--)
4090
4112
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
4091
4113
  return t && o && Ks(a, e, o), o;
4092
- }, St = (r, a) => (e, t) => a(e, t, r);
4093
- let Mt = class extends he {
4114
+ }, Rt = (r, a) => (e, t) => a(e, t, r);
4115
+ let wt = class extends he {
4094
4116
  constructor(r, a, e, t) {
4095
4117
  super(), this._resourceManagerService = r, this._univerInstanceService = a, this._dataValidationModel = e, this._injector = t, this._initDataValidationDataSource();
4096
4118
  }
@@ -4106,19 +4128,19 @@ let Mt = class extends he {
4106
4128
  this._dataValidationModel.setManagerCreator(this._createSheetDataValidationManager.bind(this));
4107
4129
  }
4108
4130
  };
4109
- Mt = Js([
4110
- ve(ge.Starting, Mt),
4111
- St(0, eo),
4112
- St(1, ee),
4113
- St(2, w(K)),
4114
- St(3, w(Ue))
4115
- ], Mt);
4131
+ wt = Js([
4132
+ ve(ge.Starting, wt),
4133
+ Rt(0, eo),
4134
+ Rt(1, te),
4135
+ Rt(2, I(K)),
4136
+ Rt(3, I(Ue))
4137
+ ], wt);
4116
4138
  var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, al = (r, a, e, t) => {
4117
4139
  for (var o = t > 1 ? void 0 : t ? tl(a, e) : a, n = r.length - 1, i; n >= 0; n--)
4118
4140
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
4119
4141
  return t && o && el(a, e, o), o;
4120
4142
  }, zt = (r, a) => (e, t) => a(e, t, r);
4121
- let wt = class extends he {
4143
+ let It = class extends he {
4122
4144
  constructor(r, a, e) {
4123
4145
  super(), this._localeService = r, this._commandService = a, this._sheetPermissionInterceptorBaseController = e, this._commandExecutedListener();
4124
4146
  }
@@ -4138,12 +4160,12 @@ let wt = class extends he {
4138
4160
  );
4139
4161
  }
4140
4162
  };
4141
- wt = al([
4142
- ve(ge.Ready, wt),
4143
- zt(0, w(ie)),
4163
+ It = al([
4164
+ ve(ge.Ready, It),
4165
+ zt(0, I(ie)),
4144
4166
  zt(1, re),
4145
- zt(2, w(To))
4146
- ], wt);
4167
+ zt(2, I(To))
4168
+ ], It);
4147
4169
  var rl = Object.defineProperty, ol = Object.getOwnPropertyDescriptor, nl = (r, a, e, t) => {
4148
4170
  for (var o = t > 1 ? void 0 : t ? ol(a, e) : a, n = r.length - 1, i; n >= 0; n--)
4149
4171
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
@@ -4169,7 +4191,7 @@ let ha = class {
4169
4191
  const t = this._dataValidationModel.ensureManager(r, a).getDataValidations();
4170
4192
  return await Promise.all(t.map((o) => Promise.all(o.ranges.map((n) => {
4171
4193
  const i = [];
4172
- return $.foreach(n, (s, l) => {
4194
+ return U.foreach(n, (s, l) => {
4173
4195
  i.push(this.validatorCell(r, a, s, l));
4174
4196
  }), i;
4175
4197
  })))), this._dataValidationCacheService.ensureCache(r, a);
@@ -4182,44 +4204,44 @@ let ha = class {
4182
4204
  }
4183
4205
  };
4184
4206
  ha = nl([
4185
- Qt(0, ee),
4186
- Qt(1, w(K)),
4187
- Qt(2, w(ht))
4207
+ Qt(0, te),
4208
+ Qt(1, I(K)),
4209
+ Qt(2, I(mt))
4188
4210
  ], ha);
4189
4211
  var Br = Object.defineProperty, il = Object.getOwnPropertyDescriptor, sl = (r, a, e) => a in r ? Br(r, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[a] = e, ll = (r, a, e, t) => {
4190
4212
  for (var o = t > 1 ? void 0 : t ? il(a, e) : a, n = r.length - 1, i; n >= 0; n--)
4191
4213
  (i = r[n]) && (o = (t ? i(a, e, o) : i(o)) || o);
4192
4214
  return t && o && Br(a, e, o), o;
4193
- }, Kt = (r, a) => (e, t) => a(e, t, r), Ur = (r, a, e) => (sl(r, typeof a != "symbol" ? a + "" : a, e), e);
4194
- let Ft = class extends ao {
4215
+ }, Kt = (r, a) => (e, t) => a(e, t, r), Ur = (r, a, e) => sl(r, typeof a != "symbol" ? a + "" : a, e);
4216
+ let Lt = class extends ao {
4195
4217
  constructor(r = {}, a, e, t) {
4196
- super(), this._config = r, this._injector = a, this._commandService = e, this._localeService = t, this._config = U.deepMerge({}, As, this._config);
4218
+ super(), this._config = r, this._injector = a, this._commandService = e, this._localeService = t, this._config = B.deepMerge({}, As, this._config);
4197
4219
  }
4198
4220
  onStarting(r) {
4199
4221
  [
4200
4222
  [Ve],
4201
- [Et],
4202
- [ht],
4223
+ [Ot],
4224
+ [mt],
4203
4225
  [ue],
4204
4226
  [Ke],
4205
4227
  [Be],
4206
4228
  [ha],
4207
4229
  // controller
4208
- [Mt],
4209
- [rt],
4230
+ [wt],
4231
+ [ot],
4210
4232
  [
4211
- nt,
4233
+ it,
4212
4234
  {
4213
- useFactory: () => this._injector.createInstance(nt, this._config)
4235
+ useFactory: () => this._injector.createInstance(it, this._config)
4214
4236
  }
4215
4237
  ],
4216
- [Rt],
4217
- [it],
4218
- [wt],
4219
4238
  [Ct],
4239
+ [st],
4240
+ [It],
4220
4241
  [Vt],
4221
- [at],
4222
- [ot]
4242
+ [Mt],
4243
+ [rt],
4244
+ [nt]
4223
4245
  ].forEach((a) => {
4224
4246
  r.add(a);
4225
4247
  }), [
@@ -4230,43 +4252,43 @@ let Ft = class extends ao {
4230
4252
  Va,
4231
4253
  Vn,
4232
4254
  Sr,
4233
- ct,
4255
+ ut,
4234
4256
  Cn
4235
4257
  ].forEach((a) => {
4236
4258
  this._commandService.registerCommand(a);
4237
4259
  });
4238
4260
  }
4239
4261
  };
4240
- Ur(Ft, "pluginName", ya);
4241
- Ur(Ft, "type", ae.UNIVER_SHEET);
4242
- Ft = ll([
4243
- to(ho, So, No),
4244
- Kt(1, w(Ue)),
4262
+ Ur(Lt, "pluginName", ya);
4263
+ Ur(Lt, "type", ae.UNIVER_SHEET);
4264
+ Lt = ll([
4265
+ to(ho, So, Fo),
4266
+ Kt(1, I(Ue)),
4245
4267
  Kt(2, re),
4246
- Kt(3, w(ie))
4247
- ], Ft);
4268
+ Kt(3, I(ie))
4269
+ ], Lt);
4248
4270
  export {
4249
4271
  Rr as AddSheetDataValidationAndOpenCommand,
4250
4272
  wa as AddSheetDataValidationCommand,
4251
4273
  ya as DATA_VALIDATION_PLUGIN_NAME,
4252
- Rt as DataValidationAlertController,
4253
- Ct as DataValidationAutoFillController,
4254
- ht as DataValidationCacheService,
4255
- rt as DataValidationController,
4256
- Vt as DataValidationCopyPasteController,
4274
+ Ct as DataValidationAlertController,
4275
+ Vt as DataValidationAutoFillController,
4276
+ mt as DataValidationCacheService,
4277
+ ot as DataValidationController,
4278
+ Mt as DataValidationCopyPasteController,
4257
4279
  Ke as DataValidationCustomFormulaService,
4258
- at as DataValidationFormulaController,
4280
+ rt as DataValidationFormulaController,
4259
4281
  ue as DataValidationFormulaService,
4260
- it as DataValidationRefRangeController,
4261
- ot as DataValidationRejectInputController,
4282
+ st as DataValidationRefRangeController,
4283
+ nt as DataValidationRejectInputController,
4262
4284
  Vn as HideDataValidationDropdown,
4263
4285
  Dl as ICommandService,
4264
4286
  El as LocaleService,
4265
4287
  Ol as Plugin,
4266
- Et as SheetDataValidationService,
4267
- nt as SheetsDataValidationRenderController,
4288
+ Ot as SheetDataValidationService,
4289
+ it as SheetsDataValidationRenderController,
4268
4290
  ha as SheetsDataValidationValidatorService,
4269
4291
  Va as ShowDataValidationDropdown,
4270
- Ft as UniverSheetsDataValidationPlugin,
4292
+ Lt as UniverSheetsDataValidationPlugin,
4271
4293
  Ma as UpdateSheetDataValidationRangeCommand
4272
4294
  };