@univerjs/sheets-data-validation-ui 0.15.4 → 0.15.5

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,40 +1,42 @@
1
- var Tr = Object.defineProperty;
2
- var Or = (e, t, n) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var V = (e, t, n) => Or(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { Disposable as Re, UniverInstanceType as Z, toDisposable as Ar, IUniverInstanceService as le, Inject as D, LocaleService as de, DataValidationErrorStyle as st, DataValidationStatus as Ye, ICommandService as te, Injector as ye, IConfigService as dn, DataValidationRenderMode as ae, DisposableCollection as Pr, dayjs as Nt, numfmt as Wn, CellValueType as Lr, CommandType as tt, DataValidationType as Y, ObjectMatrix as wt, Range as kr, Rectangle as It, queryObjectMatrix as Gt, Optional as Nr, RxDisposable as cn, InterceptorEffectEnum as Hn, sequenceExecute as jn, bufferDebounceTime as Ur, debounce as Fr, UndoCommand as $r, RedoCommand as xr, isUnitRangesEqual as Br, shallowEqual as Rn, ThemeService as Yn, ColorKit as Wr, isFormulaString as De, generateRandomId as yn, VerticalAlign as se, HorizontalAlign as Ie, DEFAULT_STYLES as ee, WrapStrategy as ve, Plugin as Xn, merge as Zn, DependentOn as Hr } from "@univerjs/core";
5
- import { DeviceInputEventType as pt, IRenderManagerService as Ue, fixLineWidthByScale as Mn, Transform as jr, CheckboxShape as Yr, getCurrentTypeOfRenderer as Xe, CURSOR_TYPE as Ze, FontCache as Xr, Shape as Zr, Rect as zn, getFontStyleString as Ve, DocSimpleSkeleton as rt, Text as bn } from "@univerjs/engine-render";
6
- import { SheetInterceptorService as un, VALIDATE_CELL as zr, SheetsSelectionsService as Kn, SetRangeValuesCommand as at, getSheetCommandTarget as Gn, rangeToDiscreteRange as Kr, SheetPermissionCheckController as Gr, WorksheetEditPermission as qt, WorksheetSetCellStylePermission as Jt, RangeProtectionPermissionEditPoint as Qt, WorkbookEditablePermission as en, INTERCEPTOR_POINT as qn, InterceptCellContentPriority as Jn, checkRangesEditablePermission as qr } from "@univerjs/sheets";
7
- import { SheetDataValidationModel as oe, SheetsDataValidationValidatorService as Jr, getDataValidationCellValue as Ut, getCellValueOrigin as re, serializeListOptions as Qn, createDefaultNewRule as er, AddSheetDataValidationCommand as hn, DATA_VALIDATION_PLUGIN_NAME as tr, getDataValidationDiffMutations as tn, UpdateSheetDataValidationRangeCommand as nr, DataValidationCacheService as rr, UpdateSheetDataValidationSettingCommand as En, UpdateSheetDataValidationOptionsCommand as Qr, RemoveSheetDataValidationCommand as or, RemoveSheetAllDataValidationCommand as eo, DataValidationFormulaController as to, deserializeListOptions as no, CUSTOM_FORMULA_INPUT_NAME as ir, BASE_FORMULA_INPUT_NAME as At, LIST_FORMULA_INPUT_NAME as pn, CHECKBOX_FORMULA_INPUT_NAME as ar, DataValidationFormulaService as ro, CHECKBOX_FORMULA_2 as oo, CHECKBOX_FORMULA_1 as io, getFormulaResult as Ft, isLegalFormulaResult as Dn, transformCheckboxValue as ao, UniverSheetsDataValidationPlugin as so } from "@univerjs/sheets-data-validation";
8
- import { DataValidatorRegistryService as Me, DataValidatorDropdownType as pe, DataValidationModel as gn, DataValidatorRegistryScope as lo, TWO_FORMULA_OPERATOR_COUNT as co, getRuleOptions as Vn, getRuleSetting as Tn } from "@univerjs/data-validation";
9
- import { ISidebarService as sr, IDialogService as uo, IZenZoneService as lr, KeyCode as gt, MenuItemType as vn, getMenuHiddenObservable as ho, RibbonDataGroup as po, IMenuManagerService as go, useDependency as F, ComponentManager as mn, useObservable as Oe, useEvent as nn, useSidebarClick as dr } from "@univerjs/ui";
10
- import { filter as fn, BehaviorSubject as On, distinctUntilChanged as vo, Subject as mo, debounceTime as cr, bufferTime as ur, of as fo } from "rxjs";
11
- import { getPatternType as _o } from "@univerjs/sheets-numfmt";
12
- import { ISheetCellDropdownManagerService as Co, IEditorBridgeService as hr, SetCellEditVisibleOperation as vt, HoverManagerService as So, CellAlertManagerService as wo, CellAlertType as Io, IAutoFillService as Ro, APPLY_TYPE as ot, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as yo, ISheetClipboardService as Mo, COPY_TYPE as An, PREDEFINED_HOOK_NAME_PASTE as mt, getRepeatRange as Pn, getCurrentRangeDisable$ as bo, AutoHeightController as pr, SheetSkeletonManagerService as lt, IMarkSelectionService as Eo } from "@univerjs/sheets-ui";
13
- import { Button as ze, FormLayout as X, RadioGroup as _n, Radio as Ae, Checkbox as Pt, Input as Pe, Select as Ln, clsx as ke, borderClassName as Rt, DraggableList as Do, Dropdown as Vo } from "@univerjs/design";
14
- import { createElement as we, useRef as ht, forwardRef as nt, useState as W, useMemo as dt, useEffect as Le } from "react";
15
- import { jsxs as j, Fragment as ct, jsx as C } from "react/jsx-runtime";
16
- import { deserializeRangeWithSheet as To, serializeRange as gr } from "@univerjs/engine-formula";
17
- import { RangeSelector as Oo, FormulaEditor as vr } from "@univerjs/sheets-formula-ui";
18
- var Ao = Object.getOwnPropertyDescriptor, Po = (e, t, n, r) => {
19
- for (var o = r > 1 ? void 0 : r ? Ao(t, n) : t, i = e.length - 1, a; i >= 0; i--)
1
+ var Lr = Object.defineProperty;
2
+ var kr = (e, t, n) => t in e ? Lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var V = (e, t, n) => kr(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { Disposable as De, UniverInstanceType as H, toDisposable as Nr, IUniverInstanceService as pe, Inject as E, LocaleService as ge, DataValidationErrorStyle as ct, DataValidationStatus as ze, ICommandService as oe, Injector as Ve, IConfigService as hn, DataValidationRenderMode as ue, DisposableCollection as Ur, dayjs as $t, numfmt as Yn, CellValueType as Fr, CommandType as ot, DataValidationType as X, ObjectMatrix as yt, Range as $r, Rectangle as Mt, queryObjectMatrix as Qt, Optional as xr, RxDisposable as pn, InterceptorEffectEnum as Xn, sequenceExecute as Zn, bufferDebounceTime as Br, debounce as Wr, UndoCommand as Hr, RedoCommand as jr, isUnitRangesEqual as Yr, shallowEqual as bn, ThemeService as zn, ColorKit as Xr, isFormulaString as Pe, generateRandomId as En, VerticalAlign as he, HorizontalAlign as Ee, DEFAULT_STYLES as re, WrapStrategy as Se, Plugin as Kn, merge as Gn, DependentOn as Zr } from "@univerjs/core";
5
+ import { DeviceInputEventType as mt, IRenderManagerService as xe, fixLineWidthByScale as Dn, Transform as zr, CheckboxShape as Kr, getCurrentTypeOfRenderer as Ke, CURSOR_TYPE as Ge, FontCache as Gr, Shape as qr, Rect as qn, getFontStyleString as Le, DocSimpleSkeleton as at, Text as Vn } from "@univerjs/engine-render";
6
+ import { SheetInterceptorService as gn, VALIDATE_CELL as Jr, SheetsSelectionsService as Jn, SetRangeValuesCommand as dt, getSheetCommandTarget as Qn, IAutoFillService as Qr, AUTO_FILL_APPLY_TYPE as st, AutoFillTools as eo, rangeToDiscreteRange as to, SheetPermissionCheckController as no, WorksheetEditPermission as en, WorksheetSetCellStylePermission as tn, RangeProtectionPermissionEditPoint as nn, WorkbookEditablePermission as rn, INTERCEPTOR_POINT as er, InterceptCellContentPriority as tr, SetWorksheetActiveOperation as ro, checkRangesEditablePermission as oo } from "@univerjs/sheets";
7
+ import { SheetDataValidationModel as ae, SheetsDataValidationValidatorService as io, getDataValidationCellValue as xt, getCellValueOrigin as ie, serializeListOptions as nr, createDefaultNewRule as rr, AddSheetDataValidationCommand as vn, DATA_VALIDATION_PLUGIN_NAME as or, getDataValidationDiffMutations as on, UpdateSheetDataValidationRangeCommand as ir, DataValidationCacheService as ar, UpdateSheetDataValidationSettingCommand as Tn, UpdateSheetDataValidationOptionsCommand as ao, RemoveSheetDataValidationCommand as sr, RemoveSheetAllDataValidationCommand as so, DataValidationFormulaController as lo, deserializeListOptions as co, CUSTOM_FORMULA_INPUT_NAME as lr, BASE_FORMULA_INPUT_NAME as kt, LIST_FORMULA_INPUT_NAME as mn, CHECKBOX_FORMULA_INPUT_NAME as dr, DataValidationFormulaService as uo, CHECKBOX_FORMULA_2 as ho, CHECKBOX_FORMULA_1 as po, getFormulaResult as Bt, isLegalFormulaResult as On, transformCheckboxValue as go, UniverSheetsDataValidationPlugin as vo } from "@univerjs/sheets-data-validation";
8
+ import { DataValidatorRegistryService as Te, DataValidatorDropdownType as fe, DataValidationModel as fn, DataValidatorRegistryScope as mo, TWO_FORMULA_OPERATOR_COUNT as fo, getRuleOptions as An, getRuleSetting as Pn } from "@univerjs/data-validation";
9
+ import { ISidebarService as cr, IDialogService as _o, IZenZoneService as ur, KeyCode as ft, MenuItemType as _n, getMenuHiddenObservable as So, RibbonDataGroup as Co, IMenuManagerService as Io, useDependency as F, ComponentManager as Sn, useObservable as Re, useEvent as an, useSidebarClick as hr } from "@univerjs/ui";
10
+ import { filter as Cn, BehaviorSubject as Ln, distinctUntilChanged as wo, Subject as Ro, debounceTime as pr, bufferTime as gr, of as vr } from "rxjs";
11
+ import { getPatternType as yo } from "@univerjs/sheets-numfmt";
12
+ import { ISheetCellDropdownManagerService as Mo, IEditorBridgeService as mr, SetCellEditVisibleOperation as _t, HoverManagerService as bo, CellAlertManagerService as Eo, CellAlertType as Do, virtualizeDiscreteRanges as sn, ISheetClipboardService as Vo, COPY_TYPE as kn, PREDEFINED_HOOK_NAME_PASTE as St, getRepeatRange as Nn, getCurrentRangeDisable$ as To, AutoHeightController as fr, SheetSkeletonManagerService as ut, IMarkSelectionService as Oo } from "@univerjs/sheets-ui";
13
+ import { Button as qe, FormLayout as Z, RadioGroup as In, Radio as Ne, Checkbox as Nt, Input as Ue, Select as Un, clsx as Fe, borderClassName as bt, DraggableList as Ao, Dropdown as Po } from "@univerjs/design";
14
+ import { createElement as ye, useRef as vt, forwardRef as it, useState as W, useMemo as ht, useEffect as be } from "react";
15
+ import { jsxs as Y, Fragment as pt, jsx as S } from "react/jsx-runtime";
16
+ import { deserializeRangeWithSheet as Lo, serializeRange as _r } from "@univerjs/engine-formula";
17
+ import { RangeSelector as ko, FormulaEditor as Sr } from "@univerjs/sheets-formula-ui";
18
+ var No = Object.getOwnPropertyDescriptor, Uo = (e, t, n, r) => {
19
+ for (var o = r > 1 ? void 0 : r ? No(t, n) : t, i = e.length - 1, a; i >= 0; i--)
20
20
  (a = e[i]) && (o = a(o) || o);
21
21
  return o;
22
- }, kn = (e, t) => (n, r) => t(n, r, e);
23
- let me = class extends Re {
22
+ }, Fn = (e, t) => (n, r) => t(n, r, e);
23
+ let _e = class extends De {
24
24
  constructor(t, n) {
25
25
  super();
26
- V(this, "_open$", new On(!1));
27
- V(this, "open$", this._open$.pipe(vo()));
26
+ V(this, "_open$", new Ln(!1));
27
+ V(this, "open$", this._open$.pipe(wo()));
28
28
  V(this, "_activeRule");
29
- V(this, "_activeRule$", new On(void 0));
29
+ V(this, "_activeRule$", new Ln(void 0));
30
30
  V(this, "activeRule$", this._activeRule$.asObservable());
31
31
  V(this, "_closeDisposable", null);
32
+ // Record the worksheet to which the rule using the range selector belongs, so that the rule list is not switched when making cross-sheet selections
33
+ V(this, "_focusFormulaEditorActiveRuleSubUnitId", null);
32
34
  this._univerInstanceService = t, this._sidebarService = n, this.disposeWithMe(
33
- this._univerInstanceService.getCurrentTypeOfUnit$(Z.UNIVER_SHEET).pipe(fn((r) => !r)).subscribe(() => {
35
+ this._univerInstanceService.getCurrentTypeOfUnit$(H.UNIVER_SHEET).pipe(Cn((r) => !r)).subscribe(() => {
34
36
  this.close();
35
37
  })
36
38
  ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((r) => {
37
- r.id === bt && (r.visible || setTimeout(() => {
39
+ r.id === Vt && (r.visible || setTimeout(() => {
38
40
  this._sidebarService.sidebarOptions$.next({ visible: !1 });
39
41
  }));
40
42
  }));
@@ -57,40 +59,46 @@ let me = class extends Re {
57
59
  this._open$.next(!1), (t = this._closeDisposable) == null || t.dispose();
58
60
  }
59
61
  setCloseDisposable(t) {
60
- this._closeDisposable = Ar(() => {
62
+ this._closeDisposable = Nr(() => {
61
63
  t.dispose(), this._closeDisposable = null;
62
64
  });
63
65
  }
64
66
  setActiveRule(t) {
65
67
  this._activeRule = t, this._activeRule$.next(t);
66
68
  }
69
+ setFocusFormulaEditorActiveRuleSubUnitId(t) {
70
+ this._focusFormulaEditorActiveRuleSubUnitId = t;
71
+ }
72
+ getFocusFormulaEditorActiveRuleSubUnitId() {
73
+ return this._focusFormulaEditorActiveRuleSubUnitId;
74
+ }
67
75
  };
68
- me = Po([
69
- kn(0, le),
70
- kn(1, sr)
71
- ], me);
72
- const Te = "#ECECEC", yt = "sheets-data-validation-ui.config", Mt = {};
73
- var Lo = Object.getOwnPropertyDescriptor, ko = (e, t, n, r) => {
74
- for (var o = r > 1 ? void 0 : r ? Lo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
76
+ _e = Uo([
77
+ Fn(0, pe),
78
+ Fn(1, cr)
79
+ ], _e);
80
+ const ke = "#ECECEC", Et = "sheets-data-validation-ui.config", Dt = {};
81
+ var Fo = Object.getOwnPropertyDescriptor, $o = (e, t, n, r) => {
82
+ for (var o = r > 1 ? void 0 : r ? Fo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
75
83
  (a = e[i]) && (o = a(o) || o);
76
84
  return o;
77
- }, xe = (e, t) => (n, r) => t(n, r, e);
78
- let Ke = class extends Re {
85
+ }, He = (e, t) => (n, r) => t(n, r, e);
86
+ let Je = class extends De {
79
87
  constructor(e, t, n, r, o, i) {
80
88
  super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = n, this._dialogService = r, this._localeService = o, this._sheetsDataValidationValidatorService = i, this._initEditorBridgeInterceptor();
81
89
  }
82
90
  _initEditorBridgeInterceptor() {
83
91
  this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(
84
- zr,
92
+ Jr,
85
93
  {
86
94
  handler: async (e, t, n) => {
87
95
  const r = await e, { row: o, col: i, unitId: a, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(a, l, o, i), d = s ? this._dataValidationModel.getRuleById(a, l, s) : void 0;
88
96
  if (r === !1)
89
97
  return n(Promise.resolve(!1));
90
- if (!d || d.errorStyle !== st.STOP)
98
+ if (!d || d.errorStyle !== ct.STOP)
91
99
  return n(Promise.resolve(!0));
92
100
  const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
93
- return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, o, i) === Ye.VALID ? n(Promise.resolve(!0)) : (this._dialogService.open({
101
+ return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, o, i) === ze.VALID ? n(Promise.resolve(!0)) : (this._dialogService.open({
94
102
  width: 368,
95
103
  title: {
96
104
  title: this._localeService.t("dataValidation.alert.title")
@@ -100,8 +108,8 @@ let Ke = class extends Re {
100
108
  title: u.getRuleFinalError(d, { row: o, col: i, unitId: a, subUnitId: l })
101
109
  },
102
110
  footer: {
103
- title: we(
104
- ze,
111
+ title: ye(
112
+ qe,
105
113
  {
106
114
  variant: "primary",
107
115
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -128,8 +136,8 @@ let Ke = class extends Re {
128
136
  title: e
129
137
  },
130
138
  footer: {
131
- title: we(
132
- ze,
139
+ title: ye(
140
+ qe,
133
141
  {
134
142
  variant: "primary",
135
143
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -143,31 +151,31 @@ let Ke = class extends Re {
143
151
  });
144
152
  }
145
153
  };
146
- Ke = ko([
147
- xe(0, D(un)),
148
- xe(1, D(oe)),
149
- xe(2, D(Me)),
150
- xe(3, uo),
151
- xe(4, D(de)),
152
- xe(5, D(Jr))
153
- ], Ke);
154
- var No = Object.getOwnPropertyDescriptor, Uo = (e, t, n, r) => {
155
- for (var o = r > 1 ? void 0 : r ? No(t, n) : t, i = e.length - 1, a; i >= 0; i--)
154
+ Je = $o([
155
+ He(0, E(gn)),
156
+ He(1, E(ae)),
157
+ He(2, E(Te)),
158
+ He(3, _o),
159
+ He(4, E(ge)),
160
+ He(5, E(io))
161
+ ], Je);
162
+ var xo = Object.getOwnPropertyDescriptor, Bo = (e, t, n, r) => {
163
+ for (var o = r > 1 ? void 0 : r ? xo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
156
164
  (a = e[i]) && (o = a(o) || o);
157
165
  return o;
158
- }, ue = (e, t) => (n, r) => t(n, r, e);
159
- const $t = (e) => {
166
+ }, ve = (e, t) => (n, r) => t(n, r, e);
167
+ const Wt = (e) => {
160
168
  if (e == null || typeof e == "boolean")
161
169
  return;
162
- if (e === "") return Nt();
170
+ if (e === "") return $t();
163
171
  if (typeof e == "number" || !Number.isNaN(+e))
164
- return Nt(Wn.format("yyyy-MM-dd HH:mm:ss", Number(e)));
165
- const t = Nt(e);
172
+ return $t(Yn.format("yyyy-MM-dd HH:mm:ss", Number(e)));
173
+ const t = $t(e);
166
174
  if (t.isValid())
167
175
  return t;
168
176
  };
169
- function Fo(e, t) {
170
- const n = _o(t);
177
+ function Wo(e, t) {
178
+ const n = yo(t);
171
179
  if (e === n)
172
180
  return t;
173
181
  switch (e) {
@@ -179,15 +187,15 @@ function Fo(e, t) {
179
187
  return "HH:mm:ss";
180
188
  }
181
189
  }
182
- let Ne = class extends Re {
183
- constructor(t, n, r, o, i, a, l, s, d, u, g) {
190
+ let $e = class extends De {
191
+ constructor(t, n, r, o, i, a, l, s, d, u, h) {
184
192
  super();
185
193
  V(this, "_activeDropdown");
186
- V(this, "_activeDropdown$", new mo());
194
+ V(this, "_activeDropdown$", new Ro());
187
195
  V(this, "_currentPopup", null);
188
196
  V(this, "activeDropdown$", this._activeDropdown$.asObservable());
189
197
  V(this, "_zenVisible", !1);
190
- this._univerInstanceService = t, this._dataValidatorRegistryService = n, this._zenZoneService = r, this._dataValidationModel = o, this._sheetsSelectionsService = i, this._cellDropdownManagerService = a, this._sheetDataValidationModel = l, this._commandService = s, this._editorBridgeService = d, this._injector = u, this._configService = g, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
198
+ this._univerInstanceService = t, this._dataValidatorRegistryService = n, this._zenZoneService = r, this._dataValidationModel = o, this._sheetsSelectionsService = i, this._cellDropdownManagerService = a, this._sheetDataValidationModel = l, this._commandService = s, this._editorBridgeService = d, this._injector = u, this._configService = h, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
191
199
  this._activeDropdown$.complete();
192
200
  });
193
201
  }
@@ -200,7 +208,7 @@ let Ne = class extends Re {
200
208
  }));
201
209
  }
202
210
  _getDropdownByCell(t, n, r, o) {
203
- const i = t ? this._univerInstanceService.getUnit(t, Z.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(Z.UNIVER_SHEET);
211
+ const i = t ? this._univerInstanceService.getUnit(t, H.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(H.UNIVER_SHEET);
204
212
  if (!i)
205
213
  return;
206
214
  const a = n ? i.getSheetBySheetId(n) : i.getActiveSheet();
@@ -219,7 +227,7 @@ let Ne = class extends Re {
219
227
  }
220
228
  // eslint-disable-next-line max-lines-per-function, complexity
221
229
  showDropdown(t) {
222
- var E, R, w, S, I, b;
230
+ var D, v, C, f, w, b;
223
231
  const { location: n } = t, { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = n;
224
232
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
225
233
  return;
@@ -230,13 +238,13 @@ let Ne = class extends Re {
230
238
  const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
231
239
  if (!(u != null && u.dropdownType))
232
240
  return;
233
- let g;
234
- const c = async (v, p) => {
235
- var A, x, H;
236
- if (!v)
241
+ let h;
242
+ const c = async (g, p) => {
243
+ var U, k, x;
244
+ if (!g)
237
245
  return !0;
238
- const _ = v, P = s.getCell(r, o), k = _.format(p === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), U = (A = Wn.parseDate(k)) == null ? void 0 : A.v, L = p === "time" ? U % 1 : U, y = l.getStyles().getStyleByCell(P), T = (H = (x = y == null ? void 0 : y.n) == null ? void 0 : x.pattern) != null ? H : "";
239
- return d.errorStyle !== st.STOP || await u.validator({
246
+ const _ = g, T = s.getCell(r, o), A = _.format(p === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), P = (U = Yn.parseDate(A)) == null ? void 0 : U.v, L = p === "time" ? P % 1 : P, y = l.getStyles().getStyleByCell(T), O = (x = (k = y == null ? void 0 : y.n) == null ? void 0 : k.pattern) != null ? x : "";
247
+ return d.errorStyle !== ct.STOP || await u.validator({
240
248
  value: L,
241
249
  unitId: i,
242
250
  subUnitId: a,
@@ -244,9 +252,9 @@ let Ne = class extends Re {
244
252
  column: o,
245
253
  worksheet: s,
246
254
  workbook: l,
247
- interceptValue: k.replace("Z", "").replace("T", " "),
248
- t: Lr.NUMBER
249
- }, d) ? (await this._commandService.executeCommand(at.id, {
255
+ interceptValue: A.replace("Z", "").replace("T", " "),
256
+ t: Fr.NUMBER
257
+ }, d) ? (await this._commandService.executeCommand(dt.id, {
250
258
  unitId: i,
251
259
  subUnitId: a,
252
260
  range: {
@@ -263,35 +271,35 @@ let Ne = class extends Re {
263
271
  si: null,
264
272
  s: {
265
273
  n: {
266
- pattern: Fo(p, T)
274
+ pattern: Wo(p, O)
267
275
  }
268
276
  }
269
277
  }
270
- }), await this._commandService.executeCommand(vt.id, {
278
+ }), await this._commandService.executeCommand(_t.id, {
271
279
  visible: !1,
272
- eventType: pt.Keyboard,
280
+ eventType: mt.Keyboard,
273
281
  unitId: i,
274
- keycode: gt.ESC
275
- }), !0) : (this._injector.has(Ke) && this._injector.get(Ke).showReject(u.getRuleFinalError(d, { row: r, col: o, unitId: i, subUnitId: a })), !1);
282
+ keycode: ft.ESC
283
+ }), !0) : (this._injector.has(Je) && this._injector.get(Je).showReject(u.getRuleFinalError(d, { row: r, col: o, unitId: i, subUnitId: a })), !1);
276
284
  };
277
285
  let m;
278
286
  switch (u.dropdownType) {
279
- case pe.DATE: {
280
- const v = re(s.getCellRaw(r, o)), p = $t(v), _ = !!((E = d.bizInfo) != null && E.showTime);
287
+ case fe.DATE: {
288
+ const g = ie(s.getCellRaw(r, o)), p = Wt(g), _ = !!((D = d.bizInfo) != null && D.showTime);
281
289
  m = {
282
290
  location: n,
283
291
  type: "datepicker",
284
292
  props: {
285
293
  showTime: _,
286
- onChange: (P) => c(P, _ ? "datetime" : "date"),
294
+ onChange: (T) => c(T, _ ? "datetime" : "date"),
287
295
  defaultValue: p,
288
296
  patternType: "date"
289
297
  }
290
298
  };
291
299
  break;
292
300
  }
293
- case pe.TIME: {
294
- const v = re(s.getCellRaw(r, o)), p = $t(v);
301
+ case fe.TIME: {
302
+ const g = ie(s.getCellRaw(r, o)), p = Wt(g);
295
303
  m = {
296
304
  location: n,
297
305
  type: "datepicker",
@@ -303,8 +311,8 @@ let Ne = class extends Re {
303
311
  };
304
312
  break;
305
313
  }
306
- case pe.DATETIME: {
307
- const v = re(s.getCellRaw(r, o)), p = $t(v);
314
+ case fe.DATETIME: {
315
+ const g = ie(s.getCellRaw(r, o)), p = Wt(g);
308
316
  m = {
309
317
  location: n,
310
318
  type: "datepicker",
@@ -316,10 +324,10 @@ let Ne = class extends Re {
316
324
  };
317
325
  break;
318
326
  }
319
- case pe.LIST:
320
- case pe.MULTIPLE_LIST: {
321
- const v = u.dropdownType === pe.MULTIPLE_LIST, p = async (y) => {
322
- const T = Qn(y), A = {
327
+ case fe.LIST:
328
+ case fe.MULTIPLE_LIST: {
329
+ const g = u.dropdownType === fe.MULTIPLE_LIST, p = async (y) => {
330
+ const O = nr(y), U = {
323
331
  unitId: i,
324
332
  subUnitId: a,
325
333
  range: {
@@ -329,26 +337,26 @@ let Ne = class extends Re {
329
337
  endRow: r
330
338
  },
331
339
  value: {
332
- v: T,
340
+ v: O,
333
341
  p: null,
334
342
  f: null,
335
343
  si: null
336
344
  }
337
345
  };
338
- return this._commandService.executeCommand(at.id, A), this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(vt.id, {
346
+ return this._commandService.executeCommand(dt.id, U), this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(_t.id, {
339
347
  visible: !1,
340
- eventType: pt.Keyboard,
348
+ eventType: mt.Keyboard,
341
349
  unitId: i,
342
- keycode: gt.ESC
343
- }), !v;
344
- }, _ = (d == null ? void 0 : d.renderMode) === ae.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, P = u.getListWithColor(d, i, a), k = Ut(s.getCellRaw(r, o)), U = () => {
345
- this._commandService.executeCommand(Fe.id, {
350
+ keycode: ft.ESC
351
+ }), !g;
352
+ }, _ = (d == null ? void 0 : d.renderMode) === ue.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, T = u.getListWithColor(d, i, a), A = xt(s.getCellRaw(r, o)), P = () => {
353
+ this._commandService.executeCommand(Be.id, {
346
354
  ruleId: d.uid
347
- }), g == null || g.dispose();
348
- }, L = P.map((y) => ({
355
+ }), h == null || h.dispose();
356
+ }, L = T.map((y) => ({
349
357
  label: y.label,
350
358
  value: y.label,
351
- color: _ || y.color ? y.color || Te : "transparent"
359
+ color: _ || y.color ? y.color || ke : "transparent"
352
360
  }));
353
361
  m = {
354
362
  location: n,
@@ -356,16 +364,16 @@ let Ne = class extends Re {
356
364
  props: {
357
365
  onChange: (y) => p(y),
358
366
  options: L,
359
- onEdit: U,
360
- defaultValue: k,
361
- multiple: v,
362
- showEdit: (w = (R = this._configService.getConfig(yt)) == null ? void 0 : R.showEditOnDropdown) != null ? w : !0,
363
- showSearch: (I = (S = this._configService.getConfig(yt)) == null ? void 0 : S.showSearchOnDropdown) != null ? I : !0
367
+ onEdit: P,
368
+ defaultValue: A,
369
+ multiple: g,
370
+ showEdit: (C = (v = this._configService.getConfig(Et)) == null ? void 0 : v.showEditOnDropdown) != null ? C : !0,
371
+ showSearch: (w = (f = this._configService.getConfig(Et)) == null ? void 0 : f.showSearchOnDropdown) != null ? w : !0
364
372
  }
365
373
  };
366
374
  break;
367
375
  }
368
- case pe.CASCADE: {
376
+ case fe.CASCADE: {
369
377
  m = {
370
378
  type: "cascader",
371
379
  props: {
@@ -386,21 +394,21 @@ let Ne = class extends Re {
386
394
  si: null
387
395
  }
388
396
  };
389
- return this._commandService.syncExecuteCommand(at.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(vt.id, {
397
+ return this._commandService.syncExecuteCommand(dt.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(_t.id, {
390
398
  visible: !1,
391
- eventType: pt.Keyboard,
399
+ eventType: mt.Keyboard,
392
400
  unitId: i,
393
- keycode: gt.ESC
401
+ keycode: ft.ESC
394
402
  }), !0;
395
403
  },
396
- defaultValue: Ut(s.getCellRaw(r, o)).split("/"),
404
+ defaultValue: xt(s.getCellRaw(r, o)).split("/"),
397
405
  options: JSON.parse((b = d.formula1) != null ? b : "[]")
398
406
  },
399
407
  location: n
400
408
  };
401
409
  break;
402
410
  }
403
- case pe.COLOR: {
411
+ case fe.COLOR: {
404
412
  m = {
405
413
  type: "color",
406
414
  props: {
@@ -421,14 +429,14 @@ let Ne = class extends Re {
421
429
  si: null
422
430
  }
423
431
  };
424
- return this._commandService.syncExecuteCommand(at.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(vt.id, {
432
+ return this._commandService.syncExecuteCommand(dt.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(_t.id, {
425
433
  visible: !1,
426
- eventType: pt.Keyboard,
434
+ eventType: mt.Keyboard,
427
435
  unitId: i,
428
- keycode: gt.ESC
436
+ keycode: ft.ESC
429
437
  }), !0;
430
438
  },
431
- defaultValue: Ut(s.getCellRaw(r, o))
439
+ defaultValue: xt(s.getCellRaw(r, o))
432
440
  },
433
441
  location: n
434
442
  };
@@ -437,26 +445,26 @@ let Ne = class extends Re {
437
445
  default:
438
446
  throw new Error("[DataValidationDropdownManagerService]: unknown type!");
439
447
  }
440
- if (g = this._cellDropdownManagerService.showDropdown({
448
+ if (h = this._cellDropdownManagerService.showDropdown({
441
449
  ...m,
442
450
  onHide: () => {
443
451
  this._activeDropdown = null, this._activeDropdown$.next(null);
444
452
  }
445
- }), !g)
453
+ }), !h)
446
454
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
447
- const h = new Pr();
448
- h.add(g), h.add({
455
+ const I = new Ur();
456
+ I.add(h), I.add({
449
457
  dispose: () => {
450
- var v, p;
451
- (p = (v = this._activeDropdown) == null ? void 0 : v.onHide) == null || p.call(v);
458
+ var g, p;
459
+ (p = (g = this._activeDropdown) == null ? void 0 : g.onHide) == null || p.call(g);
452
460
  }
453
- }), this._currentPopup = h;
461
+ }), this._currentPopup = I;
454
462
  }
455
463
  hideDropdown() {
456
464
  this._activeDropdown && (this._currentPopup && this._currentPopup.dispose(), this._currentPopup = null, this._activeDropdown = null, this._activeDropdown$.next(null));
457
465
  }
458
466
  showDataValidationDropdown(t, n, r, o, i) {
459
- const a = this._univerInstanceService.getUnit(t, Z.UNIVER_SHEET);
467
+ const a = this._univerInstanceService.getUnit(t, H.UNIVER_SHEET);
460
468
  if (!a)
461
469
  return;
462
470
  const l = a.getSheetBySheetId(n);
@@ -483,62 +491,62 @@ let Ne = class extends Re {
483
491
  });
484
492
  }
485
493
  };
486
- Ne = Uo([
487
- ue(0, le),
488
- ue(1, D(Me)),
489
- ue(2, lr),
490
- ue(3, D(oe)),
491
- ue(4, D(Kn)),
492
- ue(5, D(Co)),
493
- ue(6, D(oe)),
494
- ue(7, te),
495
- ue(8, hr),
496
- ue(9, D(ye)),
497
- ue(10, dn)
498
- ], Ne);
499
- const bt = "DataValidationPanel", Fe = {
494
+ $e = Bo([
495
+ ve(0, pe),
496
+ ve(1, E(Te)),
497
+ ve(2, ur),
498
+ ve(3, E(ae)),
499
+ ve(4, E(Jn)),
500
+ ve(5, E(Mo)),
501
+ ve(6, E(ae)),
502
+ ve(7, oe),
503
+ ve(8, mr),
504
+ ve(9, E(Ve)),
505
+ ve(10, hn)
506
+ ], $e);
507
+ const Vt = "DataValidationPanel", Be = {
500
508
  id: "data-validation.operation.open-validation-panel",
501
- type: tt.OPERATION,
509
+ type: ot.OPERATION,
502
510
  handler(e, t) {
503
511
  if (!t)
504
512
  return !1;
505
- const { ruleId: n, isAdd: r } = t, o = e.get(me), i = e.get(gn), a = e.get(le), l = e.get(sr), s = Gn(a);
513
+ const { ruleId: n, isAdd: r } = t, o = e.get(_e), i = e.get(fn), a = e.get(pe), l = e.get(cr), s = Qn(a);
506
514
  if (!s) return !1;
507
- const { unitId: d, subUnitId: u } = s, g = n ? i.getRuleById(d, u, n) : void 0;
508
- o.open(), o.setActiveRule(g && {
515
+ const { unitId: d, subUnitId: u } = s, h = n ? i.getRuleById(d, u, n) : void 0;
516
+ o.open(), o.setActiveRule(h && {
509
517
  unitId: d,
510
518
  subUnitId: u,
511
- rule: g
519
+ rule: h
512
520
  });
513
521
  const c = l.open({
514
- id: bt,
522
+ id: Vt,
515
523
  header: { title: r ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
516
- children: { label: bt },
524
+ children: { label: Vt },
517
525
  width: 312,
518
526
  onClose: () => o.close()
519
527
  });
520
528
  return o.setCloseDisposable(c), !0;
521
529
  }
522
- }, Cn = {
530
+ }, wn = {
523
531
  id: "data-validation.operation.close-validation-panel",
524
- type: tt.OPERATION,
532
+ type: ot.OPERATION,
525
533
  handler(e) {
526
- return e.get(me).close(), !0;
534
+ return e.get(_e).close(), !0;
527
535
  }
528
- }, mr = {
536
+ }, Cr = {
529
537
  id: "data-validation.operation.toggle-validation-panel",
530
- type: tt.OPERATION,
538
+ type: ot.OPERATION,
531
539
  handler(e) {
532
- const t = e.get(te), n = e.get(me);
533
- return n.open(), n.isOpen ? t.executeCommand(Cn.id) : t.executeCommand(Fe.id), !0;
540
+ const t = e.get(oe), n = e.get(_e);
541
+ return n.open(), n.isOpen ? t.executeCommand(wn.id) : t.executeCommand(Be.id), !0;
534
542
  }
535
- }, Lt = {
536
- type: tt.OPERATION,
543
+ }, Ut = {
544
+ type: ot.OPERATION,
537
545
  id: "sheet.operation.show-data-validation-dropdown",
538
546
  handler(e, t) {
539
547
  if (!t)
540
548
  return !1;
541
- const n = e.get(Ne), { unitId: r, subUnitId: o, row: i, column: a } = t, l = n.activeDropdown, s = l == null ? void 0 : l.location;
549
+ const n = e.get($e), { unitId: r, subUnitId: o, row: i, column: a } = t, l = n.activeDropdown, s = l == null ? void 0 : l.location;
542
550
  return s && s.unitId === r && s.subUnitId === o && s.row === i && s.col === a || n.showDataValidationDropdown(
543
551
  r,
544
552
  o,
@@ -546,36 +554,36 @@ const bt = "DataValidationPanel", Fe = {
546
554
  a
547
555
  ), !0;
548
556
  }
549
- }, fr = {
550
- type: tt.OPERATION,
557
+ }, Ir = {
558
+ type: ot.OPERATION,
551
559
  id: "sheet.operation.hide-data-validation-dropdown",
552
560
  handler(e, t) {
553
- return t ? (e.get(Ne).hideDropdown(), !0) : !1;
561
+ return t ? (e.get($e).hideDropdown(), !0) : !1;
554
562
  }
555
- }, kt = {
556
- type: tt.COMMAND,
563
+ }, Ft = {
564
+ type: ot.COMMAND,
557
565
  id: "data-validation.command.addRuleAndOpen",
558
566
  handler(e) {
559
- const t = e.get(le), n = Gn(t);
567
+ const t = e.get(pe), n = Qn(t);
560
568
  if (!n) return !1;
561
- const { workbook: r, worksheet: o } = n, i = er(e), a = e.get(te), l = r.getUnitId(), s = o.getSheetId(), d = {
569
+ const { workbook: r, worksheet: o } = n, i = rr(e), a = e.get(oe), l = r.getUnitId(), s = o.getSheetId(), d = {
562
570
  rule: i,
563
571
  unitId: l,
564
572
  subUnitId: s
565
573
  };
566
- return a.syncExecuteCommand(hn.id, d) ? (a.syncExecuteCommand(Fe.id, {
574
+ return a.syncExecuteCommand(vn.id, d) ? (a.syncExecuteCommand(Be.id, {
567
575
  ruleId: i.uid,
568
576
  isAdd: !0
569
577
  }), !0) : !1;
570
578
  }
571
579
  };
572
- var $o = Object.getOwnPropertyDescriptor, xo = (e, t, n, r) => {
573
- for (var o = r > 1 ? void 0 : r ? $o(t, n) : t, i = e.length - 1, a; i >= 0; i--)
580
+ var Ho = Object.getOwnPropertyDescriptor, jo = (e, t, n, r) => {
581
+ for (var o = r > 1 ? void 0 : r ? Ho(t, n) : t, i = e.length - 1, a; i >= 0; i--)
574
582
  (a = e[i]) && (o = a(o) || o);
575
583
  return o;
576
- }, Be = (e, t) => (n, r) => t(n, r, e);
577
- const be = "SHEET_DATA_VALIDATION_ALERT";
578
- let ut = class extends Re {
584
+ }, je = (e, t) => (n, r) => t(n, r, e);
585
+ const Oe = "SHEET_DATA_VALIDATION_ALERT";
586
+ let gt = class extends De {
579
587
  constructor(e, t, n, r, o, i) {
580
588
  super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = n, this._localeService = r, this._zenZoneService = o, this._dataValidationModel = i, this._init();
581
589
  }
@@ -583,143 +591,143 @@ let ut = class extends Re {
583
591
  this._initCellAlertPopup(), this._initZenService();
584
592
  }
585
593
  _initCellAlertPopup() {
586
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(cr(100)).subscribe((e) => {
594
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(pr(100)).subscribe((e) => {
587
595
  var t;
588
596
  if (e) {
589
- const n = this._univerInstanceService.getUnit(e.location.unitId, Z.UNIVER_SHEET), r = n.getSheetBySheetId(e.location.subUnitId);
597
+ const n = this._univerInstanceService.getUnit(e.location.unitId, H.UNIVER_SHEET), r = n.getSheetBySheetId(e.location.subUnitId);
590
598
  if (!r) return;
591
599
  const o = this._dataValidationModel.getRuleByLocation(e.location.unitId, e.location.subUnitId, e.location.row, e.location.col);
592
600
  if (!o) {
593
- this._cellAlertManagerService.removeAlert(be);
601
+ this._cellAlertManagerService.removeAlert(Oe);
594
602
  return;
595
603
  }
596
- if (this._dataValidationModel.validator(o, { ...e.location, workbook: n, worksheet: r }) === Ye.INVALID) {
597
- const a = this._cellAlertManagerService.currentAlert.get(be), l = (t = a == null ? void 0 : a.alert) == null ? void 0 : t.location;
604
+ if (this._dataValidationModel.validator(o, { ...e.location, workbook: n, worksheet: r }) === ze.INVALID) {
605
+ const a = this._cellAlertManagerService.currentAlert.get(Oe), l = (t = a == null ? void 0 : a.alert) == null ? void 0 : t.location;
598
606
  if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId) {
599
- this._cellAlertManagerService.removeAlert(be);
607
+ this._cellAlertManagerService.removeAlert(Oe);
600
608
  return;
601
609
  }
602
610
  const s = this._dataValidationModel.getValidator(o.type);
603
611
  if (!s) {
604
- this._cellAlertManagerService.removeAlert(be);
612
+ this._cellAlertManagerService.removeAlert(Oe);
605
613
  return;
606
614
  }
607
615
  this._cellAlertManagerService.showAlert({
608
- type: Io.ERROR,
616
+ type: Do.ERROR,
609
617
  title: this._localeService.t("dataValidation.error.title"),
610
618
  message: s == null ? void 0 : s.getRuleFinalError(o, e.location),
611
619
  location: e.location,
612
620
  width: 200,
613
621
  height: 74,
614
- key: be
622
+ key: Oe
615
623
  });
616
624
  return;
617
625
  }
618
626
  }
619
- this._cellAlertManagerService.removeAlert(be);
627
+ this._cellAlertManagerService.removeAlert(Oe);
620
628
  }));
621
629
  }
622
630
  _initZenService() {
623
631
  this.disposeWithMe(this._zenZoneService.visible$.subscribe((e) => {
624
- e && this._cellAlertManagerService.removeAlert(be);
632
+ e && this._cellAlertManagerService.removeAlert(Oe);
625
633
  }));
626
634
  }
627
635
  };
628
- ut = xo([
629
- Be(0, D(So)),
630
- Be(1, D(wo)),
631
- Be(2, le),
632
- Be(3, D(de)),
633
- Be(4, lr),
634
- Be(5, D(oe))
635
- ], ut);
636
- var Bo = Object.getOwnPropertyDescriptor, Wo = (e, t, n, r) => {
637
- for (var o = r > 1 ? void 0 : r ? Bo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
636
+ gt = jo([
637
+ je(0, E(bo)),
638
+ je(1, E(Eo)),
639
+ je(2, pe),
640
+ je(3, E(ge)),
641
+ je(4, ur),
642
+ je(5, E(ae))
643
+ ], gt);
644
+ var Yo = Object.getOwnPropertyDescriptor, Xo = (e, t, n, r) => {
645
+ for (var o = r > 1 ? void 0 : r ? Yo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
638
646
  (a = e[i]) && (o = a(o) || o);
639
647
  return o;
640
- }, xt = (e, t) => (n, r) => t(n, r, e);
641
- let Ge = class extends Re {
648
+ }, Ht = (e, t) => (n, r) => t(n, r, e);
649
+ let Qe = class extends De {
642
650
  constructor(e, t, n) {
643
651
  super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = n, this._initAutoFill();
644
652
  }
645
653
  // eslint-disable-next-line max-lines-per-function
646
654
  _initAutoFill() {
647
655
  const e = () => ({ redos: [], undos: [] }), t = (r, o) => {
648
- const { source: i, target: a, unitId: l, subUnitId: s } = r, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = rn([i, a]), [g, c] = u.ranges, { mapFunc: m } = u, h = {
649
- row: g.startRow,
650
- col: g.startColumn
651
- }, E = yo(g, c), R = new wt(), w = /* @__PURE__ */ new Set();
652
- E.forEach((p) => {
653
- const _ = p.repeatStartCell, P = p.relativeRange, k = {
654
- startRow: h.row,
655
- startColumn: h.col,
656
- endColumn: h.col,
657
- endRow: h.row
658
- }, U = {
656
+ const { source: i, target: a, unitId: l, subUnitId: s } = r, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = sn([i, a]), [h, c] = u.ranges, { mapFunc: m } = u, I = {
657
+ row: h.startRow,
658
+ col: h.startColumn
659
+ }, D = eo.getAutoFillRepeatRange(h, c), v = new yt(), C = /* @__PURE__ */ new Set();
660
+ D.forEach((p) => {
661
+ const _ = p.repeatStartCell, T = p.relativeRange, A = {
662
+ startRow: I.row,
663
+ startColumn: I.col,
664
+ endColumn: I.col,
665
+ endRow: I.row
666
+ }, P = {
659
667
  startRow: _.row,
660
668
  startColumn: _.col,
661
669
  endColumn: _.col,
662
670
  endRow: _.row
663
671
  };
664
- kr.foreach(P, (L, y) => {
665
- const T = It.getPositionRange(
672
+ $r.foreach(T, (L, y) => {
673
+ const O = Mt.getPositionRange(
666
674
  {
667
675
  startRow: L,
668
676
  startColumn: y,
669
677
  endColumn: y,
670
678
  endRow: L
671
679
  },
672
- k
673
- ), { row: A, col: x } = m(T.startRow, T.startColumn), H = this._sheetDataValidationModel.getRuleIdByLocation(l, s, A, x) || "", q = It.getPositionRange(
680
+ A
681
+ ), { row: U, col: k } = m(O.startRow, O.startColumn), x = this._sheetDataValidationModel.getRuleIdByLocation(l, s, U, k) || "", te = Mt.getPositionRange(
674
682
  {
675
683
  startRow: L,
676
684
  startColumn: y,
677
685
  endColumn: y,
678
686
  endRow: L
679
687
  },
680
- U
681
- ), { row: B, col: ne } = m(q.startRow, q.startColumn);
682
- R.setValue(B, ne, H), w.add(H);
688
+ P
689
+ ), { row: j, col: se } = m(te.startRow, te.startColumn);
690
+ v.setValue(j, se, x), C.add(x);
683
691
  });
684
692
  });
685
- const S = Array.from(w).map((p) => ({ id: p, ranges: Gt(R, (_) => _ === p) }));
686
- d.addRangeRules(S);
687
- const I = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: b, undoMutations: v } = tn(l, s, I, this._injector, "patched", o === ot.ONLY_FORMAT);
693
+ const f = Array.from(C).map((p) => ({ id: p, ranges: Qt(v, (_) => _ === p) }));
694
+ d.addRangeRules(f);
695
+ const w = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: b, undoMutations: g } = on(l, s, w, this._injector, "patched", o === st.ONLY_FORMAT);
688
696
  return {
689
- undos: v,
697
+ undos: g,
690
698
  redos: b
691
699
  };
692
700
  }, n = {
693
- id: tr,
701
+ id: or,
694
702
  onBeforeFillData: (r) => {
695
703
  const { source: o, unitId: i, subUnitId: a } = r;
696
704
  for (const l of o.rows)
697
705
  for (const s of o.cols) {
698
706
  const d = this._sheetDataValidationModel.getRuleByLocation(i, a, l, s);
699
- if (d && d.type === Y.CHECKBOX) {
700
- this._autoFillService.setDisableApplyType(ot.SERIES, !0);
707
+ if (d && d.type === X.CHECKBOX) {
708
+ this._autoFillService.setDisableApplyType(st.SERIES, !0);
701
709
  return;
702
710
  }
703
711
  }
704
712
  },
705
- onFillData: (r, o, i) => i === ot.COPY || i === ot.ONLY_FORMAT || i === ot.SERIES ? t(r, i) : e(),
713
+ onFillData: (r, o, i) => i === st.COPY || i === st.ONLY_FORMAT || i === st.SERIES ? t(r, i) : e(),
706
714
  onAfterFillData: () => {
707
715
  }
708
716
  };
709
717
  this.disposeWithMe(this._autoFillService.addHook(n));
710
718
  }
711
719
  };
712
- Ge = Wo([
713
- xt(0, Ro),
714
- xt(1, D(oe)),
715
- xt(2, D(ye))
716
- ], Ge);
717
- var Ho = Object.getOwnPropertyDescriptor, jo = (e, t, n, r) => {
718
- for (var o = r > 1 ? void 0 : r ? Ho(t, n) : t, i = e.length - 1, a; i >= 0; i--)
720
+ Qe = Xo([
721
+ Ht(0, Qr),
722
+ Ht(1, E(ae)),
723
+ Ht(2, E(Ve))
724
+ ], Qe);
725
+ var Zo = Object.getOwnPropertyDescriptor, zo = (e, t, n, r) => {
726
+ for (var o = r > 1 ? void 0 : r ? Zo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
719
727
  (a = e[i]) && (o = a(o) || o);
720
728
  return o;
721
- }, Bt = (e, t) => (n, r) => t(n, r, e);
722
- let qe = class extends Re {
729
+ }, jt = (e, t) => (n, r) => t(n, r, e);
730
+ let et = class extends De {
723
731
  constructor(t, n, r) {
724
732
  super();
725
733
  V(this, "_copyInfo");
@@ -727,29 +735,29 @@ let qe = class extends Re {
727
735
  }
728
736
  _initCopyPaste() {
729
737
  this._sheetClipboardService.addClipboardHook({
730
- id: tr,
738
+ id: or,
731
739
  onBeforeCopy: (t, n, r) => this._collect(t, n, r),
732
740
  onPasteCells: (t, n, r, o) => {
733
- const { copyType: i = An.COPY, pasteType: a } = o, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = n;
741
+ const { copyType: i = kn.COPY, pasteType: a } = o, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = n;
734
742
  return this._generateMutations(s, { copyType: i, pasteType: a, copyRange: l, unitId: d, subUnitId: u });
735
743
  }
736
744
  });
737
745
  }
738
746
  _collect(t, n, r) {
739
- const o = new wt();
747
+ const o = new yt();
740
748
  this._copyInfo = {
741
749
  unitId: t,
742
750
  subUnitId: n,
743
751
  matrix: o
744
752
  };
745
- const i = this._injector.invoke((s) => Kr(r, s, t, n));
753
+ const i = this._injector.invoke((s) => to(r, s, t, n));
746
754
  if (!i)
747
755
  return;
748
756
  const { rows: a, cols: l } = i;
749
757
  a.forEach((s, d) => {
750
- l.forEach((u, g) => {
758
+ l.forEach((u, h) => {
751
759
  const c = this._sheetDataValidationModel.getRuleIdByLocation(t, n, s, u);
752
- o.setValue(d, g, c != null ? c : "");
760
+ o.setValue(d, h, c != null ? c : "");
753
761
  });
754
762
  });
755
763
  }
@@ -757,40 +765,40 @@ let qe = class extends Re {
757
765
  _generateMutations(t, n) {
758
766
  if (!this._copyInfo)
759
767
  return { redos: [], undos: [] };
760
- if (n.copyType === An.CUT)
768
+ if (n.copyType === kn.CUT)
761
769
  return this._copyInfo = null, { redos: [], undos: [] };
762
770
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
763
771
  return { redos: [], undos: [] };
764
772
  if ([
765
- mt.SPECIAL_PASTE_COL_WIDTH,
766
- mt.SPECIAL_PASTE_VALUE,
767
- mt.SPECIAL_PASTE_FORMAT,
768
- mt.SPECIAL_PASTE_FORMULA
773
+ St.SPECIAL_PASTE_COL_WIDTH,
774
+ St.SPECIAL_PASTE_VALUE,
775
+ St.SPECIAL_PASTE_FORMAT,
776
+ St.SPECIAL_PASTE_FORMULA
769
777
  ].includes(n.pasteType))
770
778
  return { redos: [], undos: [] };
771
779
  const { unitId: o, subUnitId: i } = this._copyInfo;
772
780
  if (n.unitId !== o || i !== n.subUnitId) {
773
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(n.unitId, n.subUnitId).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: g } = rn([n.copyRange, t]), c = Pn(d, u, !0), m = /* @__PURE__ */ new Map();
774
- c.forEach(({ startRange: w }) => {
775
- var S;
776
- (S = this._copyInfo) == null || S.matrix.forValue((I, b, v) => {
777
- const p = It.getPositionRange(
781
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(n.unitId, n.subUnitId).clone(), l = new yt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = sn([n.copyRange, t]), c = Nn(d, u, !0), m = /* @__PURE__ */ new Map();
782
+ c.forEach(({ startRange: C }) => {
783
+ var f;
784
+ (f = this._copyInfo) == null || f.matrix.forValue((w, b, g) => {
785
+ const p = Mt.getPositionRange(
778
786
  {
779
- startRow: I,
780
- endRow: I,
787
+ startRow: w,
788
+ endRow: w,
781
789
  startColumn: b,
782
790
  endColumn: b
783
791
  },
784
- w
785
- ), _ = `${i}-${v}`, P = this._sheetDataValidationModel.getRuleById(o, i, v);
786
- !this._sheetDataValidationModel.getRuleById(n.unitId, n.subUnitId, _) && P && m.set(_, { ...P, uid: _ });
787
- const { row: k, col: U } = g(p.startRow, p.startColumn);
788
- s.add(_), l.setValue(k, U, _);
792
+ C
793
+ ), _ = `${i}-${g}`, T = this._sheetDataValidationModel.getRuleById(o, i, g);
794
+ !this._sheetDataValidationModel.getRuleById(n.unitId, n.subUnitId, _) && T && m.set(_, { ...T, uid: _ });
795
+ const { row: A, col: P } = h(p.startRow, p.startColumn);
796
+ s.add(_), l.setValue(A, P, _);
789
797
  });
790
798
  });
791
- const h = Array.from(s).map((w) => ({ id: w, ranges: Gt(l, (S) => S === w) }));
792
- a.addRangeRules(h);
793
- const { redoMutations: E, undoMutations: R } = tn(
799
+ const I = Array.from(s).map((C) => ({ id: C, ranges: Qt(l, (f) => f === C) }));
800
+ a.addRangeRules(I);
801
+ const { redoMutations: D, undoMutations: v } = on(
794
802
  n.unitId,
795
803
  n.subUnitId,
796
804
  a.diffWithAddition(this._sheetDataValidationModel.getRules(n.unitId, n.subUnitId), m.values()),
@@ -799,29 +807,29 @@ let qe = class extends Re {
799
807
  !1
800
808
  );
801
809
  return {
802
- redos: E,
803
- undos: R
810
+ redos: D,
811
+ undos: v
804
812
  };
805
813
  } else {
806
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: g } = rn([n.copyRange, t]);
807
- Pn(d, u, !0).forEach(({ startRange: R }) => {
808
- var w;
809
- (w = this._copyInfo) == null || w.matrix.forValue((S, I, b) => {
810
- const v = It.getPositionRange(
814
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new yt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = sn([n.copyRange, t]);
815
+ Nn(d, u, !0).forEach(({ startRange: v }) => {
816
+ var C;
817
+ (C = this._copyInfo) == null || C.matrix.forValue((f, w, b) => {
818
+ const g = Mt.getPositionRange(
811
819
  {
812
- startRow: S,
813
- endRow: S,
814
- startColumn: I,
815
- endColumn: I
820
+ startRow: f,
821
+ endRow: f,
822
+ startColumn: w,
823
+ endColumn: w
816
824
  },
817
- R
818
- ), { row: p, col: _ } = g(v.startRow, v.startColumn);
825
+ v
826
+ ), { row: p, col: _ } = h(g.startRow, g.startColumn);
819
827
  l.setValue(p, _, b), s.add(b);
820
828
  });
821
829
  });
822
- const m = Array.from(s).map((R) => ({ id: R, ranges: Gt(l, (w) => w === R) }));
830
+ const m = Array.from(s).map((v) => ({ id: v, ranges: Qt(l, (C) => C === v) }));
823
831
  a.addRangeRules(m);
824
- const { redoMutations: h, undoMutations: E } = tn(
832
+ const { redoMutations: I, undoMutations: D } = on(
825
833
  o,
826
834
  i,
827
835
  a.diff(this._sheetDataValidationModel.getRules(o, i)),
@@ -830,112 +838,112 @@ let qe = class extends Re {
830
838
  !1
831
839
  );
832
840
  return {
833
- redos: h,
834
- undos: E
841
+ redos: I,
842
+ undos: D
835
843
  };
836
844
  }
837
845
  }
838
846
  };
839
- qe = jo([
840
- Bt(0, Mo),
841
- Bt(1, D(oe)),
842
- Bt(2, D(ye))
843
- ], qe);
844
- var Yo = Object.getOwnPropertyDescriptor, Xo = (e, t, n, r) => {
845
- for (var o = r > 1 ? void 0 : r ? Yo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
847
+ et = zo([
848
+ jt(0, Vo),
849
+ jt(1, E(ae)),
850
+ jt(2, E(Ve))
851
+ ], et);
852
+ var Ko = Object.getOwnPropertyDescriptor, Go = (e, t, n, r) => {
853
+ for (var o = r > 1 ? void 0 : r ? Ko(t, n) : t, i = e.length - 1, a; i >= 0; i--)
846
854
  (a = e[i]) && (o = a(o) || o);
847
855
  return o;
848
- }, Wt = (e, t) => (n, r) => t(n, r, e);
849
- let Je = class extends Re {
856
+ }, Yt = (e, t) => (n, r) => t(n, r, e);
857
+ let tt = class extends De {
850
858
  constructor(e, t, n) {
851
859
  super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = n, this._commandExecutedListener();
852
860
  }
853
861
  _commandExecutedListener() {
854
862
  this.disposeWithMe(
855
863
  this._commandService.beforeCommandExecuted((e) => {
856
- if (e.id === hn.id) {
864
+ if (e.id === vn.id) {
857
865
  const { unitId: t, subUnitId: n, rule: { ranges: r } } = e.params;
858
866
  this._sheetPermissionCheckController.permissionCheckWithRanges({
859
- workbookTypes: [en],
860
- rangeTypes: [Qt],
861
- worksheetTypes: [qt, Jt]
867
+ workbookTypes: [rn],
868
+ rangeTypes: [nn],
869
+ worksheetTypes: [en, tn]
862
870
  }, r, t, n) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"));
863
871
  }
864
- if (e.id === nr.id) {
872
+ if (e.id === ir.id) {
865
873
  const { unitId: t, subUnitId: n, ranges: r } = e.params;
866
874
  this._sheetPermissionCheckController.permissionCheckWithRanges({
867
- workbookTypes: [en],
868
- rangeTypes: [Qt],
869
- worksheetTypes: [qt, Jt]
875
+ workbookTypes: [rn],
876
+ rangeTypes: [nn],
877
+ worksheetTypes: [en, tn]
870
878
  }, r, t, n) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"));
871
879
  }
872
880
  })
873
881
  );
874
882
  }
875
883
  };
876
- Je = Xo([
877
- Wt(0, D(de)),
878
- Wt(1, te),
879
- Wt(2, D(Gr))
880
- ], Je);
881
- const _r = "sheet.menu.data-validation";
882
- function Zo(e) {
884
+ tt = Go([
885
+ Yt(0, E(ge)),
886
+ Yt(1, oe),
887
+ Yt(2, E(no))
888
+ ], tt);
889
+ const wr = "sheet.menu.data-validation";
890
+ function qo(e) {
883
891
  return {
884
- id: _r,
885
- type: vn.SUBITEMS,
892
+ id: wr,
893
+ type: _n.SUBITEMS,
886
894
  icon: "DataValidationIcon",
887
895
  tooltip: "dataValidation.title",
888
- hidden$: ho(e, Z.UNIVER_SHEET),
889
- disabled$: bo(e, { workbookTypes: [en], worksheetTypes: [Jt, qt], rangeTypes: [Qt] })
896
+ hidden$: So(e, H.UNIVER_SHEET),
897
+ disabled$: To(e, { workbookTypes: [rn], worksheetTypes: [tn, en], rangeTypes: [nn] })
890
898
  };
891
899
  }
892
- function zo(e) {
900
+ function Jo(e) {
893
901
  return {
894
- id: Fe.id,
902
+ id: Be.id,
895
903
  title: "dataValidation.panel.title",
896
- type: vn.BUTTON
904
+ type: _n.BUTTON
897
905
  };
898
906
  }
899
- function Ko(e) {
907
+ function Qo(e) {
900
908
  return {
901
- id: kt.id,
909
+ id: Ft.id,
902
910
  title: "dataValidation.panel.add",
903
- type: vn.BUTTON
911
+ type: _n.BUTTON
904
912
  };
905
913
  }
906
- const Go = {
907
- [po.RULES]: {
908
- [_r]: {
914
+ const ei = {
915
+ [Co.RULES]: {
916
+ [wr]: {
909
917
  order: 0,
910
- menuItemFactory: Zo,
911
- [Fe.id]: {
918
+ menuItemFactory: qo,
919
+ [Be.id]: {
912
920
  order: 0,
913
- menuItemFactory: zo
921
+ menuItemFactory: Jo
914
922
  },
915
- [kt.id]: {
923
+ [Ft.id]: {
916
924
  order: 1,
917
- menuItemFactory: Ko
925
+ menuItemFactory: Qo
918
926
  }
919
927
  }
920
928
  }
921
929
  };
922
- var qo = Object.getOwnPropertyDescriptor, Cr = (e, t, n, r) => {
923
- for (var o = r > 1 ? void 0 : r ? qo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
930
+ var ti = Object.getOwnPropertyDescriptor, Rr = (e, t, n, r) => {
931
+ for (var o = r > 1 ? void 0 : r ? ti(t, n) : t, i = e.length - 1, a; i >= 0; i--)
924
932
  (a = e[i]) && (o = a(o) || o);
925
933
  return o;
926
934
  }, K = (e, t) => (n, r) => t(n, r, e);
927
- const Sr = {
935
+ const yr = {
928
936
  tr: {
929
937
  size: 6,
930
938
  color: "#fe4b4b"
931
939
  }
932
940
  };
933
- let Qe = class extends cn {
941
+ let nt = class extends pn {
934
942
  constructor(e, t, n, r, o, i, a, l, s, d, u) {
935
943
  super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = n, this._univerInstanceService = r, this._autoHeightController = o, this._dropdownManagerService = i, this._sheetDataValidationModel = a, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = d, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
936
944
  }
937
945
  _initMenu() {
938
- this._menuManagerService.mergeMenu(Go);
946
+ this._menuManagerService.mergeMenu(ei);
939
947
  }
940
948
  _initDropdown() {
941
949
  this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
@@ -957,7 +965,7 @@ let Qe = class extends cn {
957
965
  return;
958
966
  const u = l.getActiveSheet();
959
967
  if (!u) return;
960
- const g = this._dropdownManagerService.activeDropdown, c = g == null ? void 0 : g.location;
968
+ const h = this._dropdownManagerService.activeDropdown, c = h == null ? void 0 : h.location;
961
969
  if (c && c.unitId === r && c.subUnitId === o && c.row === i && c.col === a)
962
970
  return;
963
971
  this._dropdownManagerService.showDropdown(
@@ -981,56 +989,56 @@ let Qe = class extends cn {
981
989
  _initViewModelIntercept() {
982
990
  this.disposeWithMe(
983
991
  this._sheetInterceptorService.intercept(
984
- qn.CELL_CONTENT,
992
+ er.CELL_CONTENT,
985
993
  {
986
- effect: Hn.Style,
994
+ effect: Xn.Style,
987
995
  // must be after numfmt
988
- priority: Jn.DATA_VALIDATION,
996
+ priority: tr.DATA_VALIDATION,
989
997
  // eslint-disable-next-line max-lines-per-function, complexity
990
998
  handler: (e, t, n) => {
991
- var w, S, I, b, v;
999
+ var C, f, w, b, g;
992
1000
  const { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, a, r, o);
993
1001
  if (!d)
994
1002
  return n(e);
995
1003
  const u = this._sheetDataValidationModel.getRuleById(i, a, d);
996
1004
  if (!u)
997
1005
  return n(e);
998
- const g = (w = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? w : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
999
- let h;
1000
- const E = {
1006
+ const h = (C = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? C : ze.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
1007
+ let I;
1008
+ const D = {
1001
1009
  get value() {
1002
1010
  var p;
1003
- return h !== void 0 || (h = (p = re(m)) != null ? p : null), h;
1011
+ return I !== void 0 || (I = (p = ie(m)) != null ? p : null), I;
1004
1012
  }
1005
- }, R = {
1013
+ }, v = {
1006
1014
  get value() {
1007
1015
  var p;
1008
- return `${(p = E.value) != null ? p : ""}`;
1016
+ return `${(p = D.value) != null ? p : ""}`;
1009
1017
  }
1010
1018
  };
1011
1019
  return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
1012
1020
  ...e == null ? void 0 : e.markers,
1013
- ...g === Ye.INVALID ? Sr : null
1021
+ ...h === ze.INVALID ? yr : null
1014
1022
  }, e.customRender = [
1015
- ...(S = e == null ? void 0 : e.customRender) != null ? S : [],
1023
+ ...(f = e == null ? void 0 : e.customRender) != null ? f : [],
1016
1024
  ...c != null && c.canvasRender ? [c.canvasRender] : []
1017
1025
  ], e.fontRenderExtension = {
1018
1026
  ...e == null ? void 0 : e.fontRenderExtension,
1019
- isSkip: ((I = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : I.isSkip) || ((b = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : b.call(c, u, E.value, t))
1027
+ isSkip: ((w = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : w.isSkip) || ((b = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : b.call(c, u, D.value, t))
1020
1028
  }, e.interceptorStyle = {
1021
1029
  ...e == null ? void 0 : e.interceptorStyle,
1022
- ...c == null ? void 0 : c.getExtraStyle(u, R.value, {
1030
+ ...c == null ? void 0 : c.getExtraStyle(u, v.value, {
1023
1031
  get style() {
1024
1032
  const p = l.getStyles();
1025
1033
  return (typeof (e == null ? void 0 : e.s) == "string" ? p.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1026
1034
  }
1027
1035
  }, r, o)
1028
1036
  }, e.interceptorAutoHeight = () => {
1029
- var k, U, L, y, T, A;
1030
- const p = (U = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(lt).getSkeletonParam(a)) == null ? void 0 : U.skeleton;
1037
+ var A, P, L, y, O, U;
1038
+ const p = (P = (A = this._renderManagerService.getRenderById(i)) == null ? void 0 : A.with(ut).getSkeletonParam(a)) == null ? void 0 : P.skeleton;
1031
1039
  if (!p)
1032
1040
  return;
1033
- const _ = p.worksheet.getMergedCell(r, o), P = {
1041
+ const _ = p.worksheet.getMergedCell(r, o), T = {
1034
1042
  data: e,
1035
1043
  style: p.getStyles().getStyleByCell(e),
1036
1044
  primaryWithCoord: p.getCellWithCoordByIndex((L = _ == null ? void 0 : _.startRow) != null ? L : r, (y = _ == null ? void 0 : _.startColumn) != null ? y : o),
@@ -1041,13 +1049,13 @@ let Qe = class extends cn {
1041
1049
  workbook: l,
1042
1050
  worksheet: s
1043
1051
  };
1044
- return (A = (T = c == null ? void 0 : c.canvasRender) == null ? void 0 : T.calcCellAutoHeight) == null ? void 0 : A.call(T, P);
1052
+ return (U = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoHeight) == null ? void 0 : U.call(O, T);
1045
1053
  }, e.interceptorAutoWidth = () => {
1046
- var k, U, L, y, T, A;
1047
- const p = (U = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(lt).getSkeletonParam(a)) == null ? void 0 : U.skeleton;
1054
+ var A, P, L, y, O, U;
1055
+ const p = (P = (A = this._renderManagerService.getRenderById(i)) == null ? void 0 : A.with(ut).getSkeletonParam(a)) == null ? void 0 : P.skeleton;
1048
1056
  if (!p)
1049
1057
  return;
1050
- const _ = p.worksheet.getMergedCell(r, o), P = {
1058
+ const _ = p.worksheet.getMergedCell(r, o), T = {
1051
1059
  data: e,
1052
1060
  style: p.getStyles().getStyleByCell(e),
1053
1061
  primaryWithCoord: p.getCellWithCoordByIndex((L = _ == null ? void 0 : _.startRow) != null ? L : r, (y = _ == null ? void 0 : _.startColumn) != null ? y : o),
@@ -1058,8 +1066,8 @@ let Qe = class extends cn {
1058
1066
  workbook: l,
1059
1067
  worksheet: s
1060
1068
  };
1061
- return (A = (T = c == null ? void 0 : c.canvasRender) == null ? void 0 : T.calcCellAutoWidth) == null ? void 0 : A.call(T, P);
1062
- }, e.coverable = ((v = e == null ? void 0 : e.coverable) != null ? v : !0) && !(u.type === Y.LIST || u.type === Y.LIST_MULTIPLE), n(e);
1069
+ return (U = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoWidth) == null ? void 0 : U.call(O, T);
1070
+ }, e.coverable = ((g = e == null ? void 0 : e.coverable) != null ? g : !0) && !(u.type === X.LIST || u.type === X.LIST_MULTIPLE), n(e);
1063
1071
  }
1064
1072
  }
1065
1073
  )
@@ -1069,36 +1077,36 @@ let Qe = class extends cn {
1069
1077
  this._sheetDataValidationModel.ruleChange$.pipe(
1070
1078
  // patched data-validation change don't need to re-calc row height
1071
1079
  // re-calc of row height will be triggered precisely by the origin command
1072
- fn((e) => e.source === "command"),
1073
- ur(100)
1080
+ Cn((e) => e.source === "command"),
1081
+ gr(100)
1074
1082
  ).subscribe((e) => {
1075
1083
  if (e.length === 0)
1076
1084
  return;
1077
1085
  const t = [];
1078
1086
  if (e.forEach((n) => {
1079
1087
  var r;
1080
- (n.rule.type === Y.LIST_MULTIPLE || n.rule.type === Y.LIST) && (r = n.rule) != null && r.ranges && t.push(...n.rule.ranges);
1088
+ (n.rule.type === X.LIST_MULTIPLE || n.rule.type === X.LIST) && (r = n.rule) != null && r.ranges && t.push(...n.rule.ranges);
1081
1089
  }), t.length) {
1082
1090
  const n = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1083
- jn(n.redos, this._commandService);
1091
+ Zn(n.redos, this._commandService);
1084
1092
  }
1085
1093
  });
1086
1094
  }
1087
1095
  };
1088
- Qe = Cr([
1089
- K(0, te),
1090
- K(1, go),
1091
- K(2, Ue),
1092
- K(3, le),
1093
- K(4, D(pr)),
1094
- K(5, D(Ne)),
1095
- K(6, D(oe)),
1096
- K(7, D(Me)),
1097
- K(8, D(un)),
1098
- K(9, D(rr)),
1099
- K(10, Nr(hr))
1100
- ], Qe);
1101
- let Nn = class extends cn {
1096
+ nt = Rr([
1097
+ K(0, oe),
1098
+ K(1, Io),
1099
+ K(2, xe),
1100
+ K(3, pe),
1101
+ K(4, E(fr)),
1102
+ K(5, E($e)),
1103
+ K(6, E(ae)),
1104
+ K(7, E(Te)),
1105
+ K(8, E(gn)),
1106
+ K(9, E(ar)),
1107
+ K(10, xr(mr))
1108
+ ], nt);
1109
+ let $n = class extends pn {
1102
1110
  constructor(e, t, n, r, o, i, a) {
1103
1111
  super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = n, this._dataValidatorRegistryService = r, this._sheetInterceptorService = o, this._sheetDataValidationModel = i, this._dataValidationCacheService = a, this._initViewModelIntercept(), this._initAutoHeight();
1104
1112
  }
@@ -1106,47 +1114,47 @@ let Nn = class extends cn {
1106
1114
  _initViewModelIntercept() {
1107
1115
  this.disposeWithMe(
1108
1116
  this._sheetInterceptorService.intercept(
1109
- qn.CELL_CONTENT,
1117
+ er.CELL_CONTENT,
1110
1118
  {
1111
- effect: Hn.Style,
1119
+ effect: Xn.Style,
1112
1120
  // must be after numfmt
1113
- priority: Jn.DATA_VALIDATION,
1121
+ priority: tr.DATA_VALIDATION,
1114
1122
  // eslint-disable-next-line complexity, max-lines-per-function
1115
1123
  handler: (e, t, n) => {
1116
- var R, w, S, I, b;
1124
+ var v, C, f, w, b;
1117
1125
  const { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, a, r, o);
1118
1126
  if (!d)
1119
1127
  return n(e);
1120
1128
  const u = this._sheetDataValidationModel.getRuleById(i, a, d);
1121
1129
  if (!u)
1122
1130
  return n(e);
1123
- const g = (R = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? R : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = s.getCellRaw(r, o), h = re(m), E = `${h != null ? h : ""}`;
1131
+ const h = (v = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? v : ze.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = s.getCellRaw(r, o), I = ie(m), D = `${I != null ? I : ""}`;
1124
1132
  return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
1125
1133
  ...e == null ? void 0 : e.markers,
1126
- ...g === Ye.INVALID ? Sr : null
1134
+ ...h === ze.INVALID ? yr : null
1127
1135
  }, e.customRender = [
1128
- ...(w = e == null ? void 0 : e.customRender) != null ? w : [],
1136
+ ...(C = e == null ? void 0 : e.customRender) != null ? C : [],
1129
1137
  ...c != null && c.canvasRender ? [c.canvasRender] : []
1130
1138
  ], e.fontRenderExtension = {
1131
1139
  ...e == null ? void 0 : e.fontRenderExtension,
1132
- isSkip: ((S = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : S.isSkip) || ((I = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : I.call(c, u, h, t))
1140
+ isSkip: ((f = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : f.isSkip) || ((w = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : w.call(c, u, I, t))
1133
1141
  }, e.interceptorStyle = {
1134
1142
  ...e == null ? void 0 : e.interceptorStyle,
1135
- ...c == null ? void 0 : c.getExtraStyle(u, E, {
1143
+ ...c == null ? void 0 : c.getExtraStyle(u, D, {
1136
1144
  get style() {
1137
- const v = l.getStyles();
1138
- return (typeof (e == null ? void 0 : e.s) == "string" ? v.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1145
+ const g = l.getStyles();
1146
+ return (typeof (e == null ? void 0 : e.s) == "string" ? g.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1139
1147
  }
1140
1148
  }, r, o)
1141
1149
  }, e.interceptorAutoHeight = () => {
1142
- var P, k, U, L, y, T;
1143
- const v = (k = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(lt).getSkeletonParam(a)) == null ? void 0 : k.skeleton;
1144
- if (!v)
1150
+ var T, A, P, L, y, O;
1151
+ const g = (A = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(ut).getSkeletonParam(a)) == null ? void 0 : A.skeleton;
1152
+ if (!g)
1145
1153
  return;
1146
- const p = v.worksheet.getMergedCell(r, o), _ = {
1154
+ const p = g.worksheet.getMergedCell(r, o), _ = {
1147
1155
  data: e,
1148
- style: v.getStyles().getStyleByCell(e),
1149
- primaryWithCoord: v.getCellWithCoordByIndex((U = p == null ? void 0 : p.startRow) != null ? U : r, (L = p == null ? void 0 : p.startColumn) != null ? L : o),
1156
+ style: g.getStyles().getStyleByCell(e),
1157
+ primaryWithCoord: g.getCellWithCoordByIndex((P = p == null ? void 0 : p.startRow) != null ? P : r, (L = p == null ? void 0 : p.startColumn) != null ? L : o),
1150
1158
  unitId: i,
1151
1159
  subUnitId: a,
1152
1160
  row: r,
@@ -1154,16 +1162,16 @@ let Nn = class extends cn {
1154
1162
  workbook: l,
1155
1163
  worksheet: s
1156
1164
  };
1157
- return (T = (y = c == null ? void 0 : c.canvasRender) == null ? void 0 : y.calcCellAutoHeight) == null ? void 0 : T.call(y, _);
1165
+ return (O = (y = c == null ? void 0 : c.canvasRender) == null ? void 0 : y.calcCellAutoHeight) == null ? void 0 : O.call(y, _);
1158
1166
  }, e.interceptorAutoWidth = () => {
1159
- var P, k, U, L, y, T;
1160
- const v = (k = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(lt).getSkeletonParam(a)) == null ? void 0 : k.skeleton;
1161
- if (!v)
1167
+ var T, A, P, L, y, O;
1168
+ const g = (A = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(ut).getSkeletonParam(a)) == null ? void 0 : A.skeleton;
1169
+ if (!g)
1162
1170
  return;
1163
- const p = v.worksheet.getMergedCell(r, o), _ = {
1171
+ const p = g.worksheet.getMergedCell(r, o), _ = {
1164
1172
  data: e,
1165
- style: v.getStyles().getStyleByCell(e),
1166
- primaryWithCoord: v.getCellWithCoordByIndex((U = p == null ? void 0 : p.startRow) != null ? U : r, (L = p == null ? void 0 : p.startColumn) != null ? L : o),
1173
+ style: g.getStyles().getStyleByCell(e),
1174
+ primaryWithCoord: g.getCellWithCoordByIndex((P = p == null ? void 0 : p.startRow) != null ? P : r, (L = p == null ? void 0 : p.startColumn) != null ? L : o),
1167
1175
  unitId: i,
1168
1176
  subUnitId: a,
1169
1177
  row: r,
@@ -1171,8 +1179,8 @@ let Nn = class extends cn {
1171
1179
  workbook: l,
1172
1180
  worksheet: s
1173
1181
  };
1174
- return (T = (y = c == null ? void 0 : c.canvasRender) == null ? void 0 : y.calcCellAutoWidth) == null ? void 0 : T.call(y, _);
1175
- }, e.coverable = ((b = e == null ? void 0 : e.coverable) != null ? b : !0) && !(u.type === Y.LIST || u.type === Y.LIST_MULTIPLE), n(e);
1182
+ return (O = (y = c == null ? void 0 : c.canvasRender) == null ? void 0 : y.calcCellAutoWidth) == null ? void 0 : O.call(y, _);
1183
+ }, e.coverable = ((b = e == null ? void 0 : e.coverable) != null ? b : !0) && !(u.type === X.LIST || u.type === X.LIST_MULTIPLE), n(e);
1176
1184
  }
1177
1185
  }
1178
1186
  )
@@ -1180,35 +1188,35 @@ let Nn = class extends cn {
1180
1188
  }
1181
1189
  _initAutoHeight() {
1182
1190
  this._sheetDataValidationModel.ruleChange$.pipe(
1183
- fn((e) => e.source === "command"),
1184
- ur(16)
1191
+ Cn((e) => e.source === "command"),
1192
+ gr(16)
1185
1193
  ).subscribe((e) => {
1186
1194
  const t = [];
1187
1195
  if (e.forEach((n) => {
1188
1196
  var r;
1189
- (n.rule.type === Y.LIST_MULTIPLE || n.rule.type === Y.LIST) && (r = n.rule) != null && r.ranges && t.push(...n.rule.ranges);
1197
+ (n.rule.type === X.LIST_MULTIPLE || n.rule.type === X.LIST) && (r = n.rule) != null && r.ranges && t.push(...n.rule.ranges);
1190
1198
  }), t.length) {
1191
1199
  const n = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1192
- jn(n.redos, this._commandService);
1200
+ Zn(n.redos, this._commandService);
1193
1201
  }
1194
1202
  });
1195
1203
  }
1196
1204
  };
1197
- Nn = Cr([
1198
- K(0, te),
1199
- K(1, Ue),
1200
- K(2, D(pr)),
1201
- K(3, D(Me)),
1202
- K(4, D(un)),
1203
- K(5, D(oe)),
1204
- K(6, D(rr))
1205
- ], Nn);
1206
- var Jo = Object.getOwnPropertyDescriptor, Qo = (e, t, n, r) => {
1207
- for (var o = r > 1 ? void 0 : r ? Jo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
1205
+ $n = Rr([
1206
+ K(0, oe),
1207
+ K(1, xe),
1208
+ K(2, E(fr)),
1209
+ K(3, E(Te)),
1210
+ K(4, E(gn)),
1211
+ K(5, E(ae)),
1212
+ K(6, E(ar))
1213
+ ], $n);
1214
+ var ni = Object.getOwnPropertyDescriptor, ri = (e, t, n, r) => {
1215
+ for (var o = r > 1 ? void 0 : r ? ni(t, n) : t, i = e.length - 1, a; i >= 0; i--)
1208
1216
  (a = e[i]) && (o = a(o) || o);
1209
1217
  return o;
1210
- }, Un = (e, t) => (n, r) => t(n, r, e);
1211
- let Et = class extends Re {
1218
+ }, xn = (e, t) => (n, r) => t(n, r, e);
1219
+ let Tt = class extends De {
1212
1220
  constructor(e, t, n) {
1213
1221
  super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = n, this._initSkeletonChange();
1214
1222
  }
@@ -1225,16 +1233,16 @@ let Et = class extends Re {
1225
1233
  (i = this._sheetSkeletonManagerService.getSkeletonParam(o)) == null || i.skeleton.makeDirty(!0);
1226
1234
  }), (r = this._context.mainComponent) == null || r.makeForceDirty();
1227
1235
  };
1228
- this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Ur(16)).subscribe(e));
1236
+ this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Br(16)).subscribe(e));
1229
1237
  }
1230
1238
  };
1231
- Et = Qo([
1232
- Un(1, D(oe)),
1233
- Un(2, D(lt))
1234
- ], Et);
1235
- function $e({ ref: e, ...t }) {
1236
- const { icon: n, id: r, className: o, extend: i, ...a } = t, l = `univerjs-icon univerjs-icon-${r} ${o || ""}`.trim(), s = ht(`_${ni()}`);
1237
- return wr(n, `${r}`, {
1239
+ Tt = ri([
1240
+ xn(1, E(ae)),
1241
+ xn(2, E(ut))
1242
+ ], Tt);
1243
+ function We({ ref: e, ...t }) {
1244
+ const { icon: n, id: r, className: o, extend: i, ...a } = t, l = `univerjs-icon univerjs-icon-${r} ${o || ""}`.trim(), s = vt(`_${ai()}`);
1245
+ return Mr(n, `${r}`, {
1238
1246
  defIds: n.defIds,
1239
1247
  idSuffix: s.current
1240
1248
  }, {
@@ -1243,14 +1251,14 @@ function $e({ ref: e, ...t }) {
1243
1251
  ...a
1244
1252
  }, i);
1245
1253
  }
1246
- function wr(e, t, n, r, o) {
1247
- return we(e.tag, {
1254
+ function Mr(e, t, n, r, o) {
1255
+ return ye(e.tag, {
1248
1256
  key: t,
1249
- ...ei(e, n, o),
1257
+ ...oi(e, n, o),
1250
1258
  ...r
1251
- }, (ti(e, n).children || []).map((i, a) => wr(i, `${t}-${e.tag}-${a}`, n, void 0, o)));
1259
+ }, (ii(e, n).children || []).map((i, a) => Mr(i, `${t}-${e.tag}-${a}`, n, void 0, o)));
1252
1260
  }
1253
- function ei(e, t, n) {
1261
+ function oi(e, t, n) {
1254
1262
  const r = { ...e.attrs };
1255
1263
  n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), e.tag === "mask" && r.id && (r.id = r.id + t.idSuffix), Object.entries(r).forEach(([i, a]) => {
1256
1264
  i === "mask" && typeof a == "string" && (r[i] = a.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
@@ -1260,7 +1268,7 @@ function ei(e, t, n) {
1260
1268
  typeof a == "string" && (r[i] = a.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
1261
1269
  })), r;
1262
1270
  }
1263
- function ti(e, t) {
1271
+ function ii(e, t) {
1264
1272
  var r;
1265
1273
  const { defIds: n } = t;
1266
1274
  return !n || n.length === 0 ? e : e.tag === "defs" && ((r = e.children) != null && r.length) ? {
@@ -1274,11 +1282,11 @@ function ti(e, t) {
1274
1282
  } : o)
1275
1283
  } : e;
1276
1284
  }
1277
- function ni() {
1285
+ function ai() {
1278
1286
  return Math.random().toString(36).substring(2, 8);
1279
1287
  }
1280
- $e.displayName = "UniverIcon";
1281
- const ri = {
1288
+ We.displayName = "UniverIcon";
1289
+ const si = {
1282
1290
  tag: "svg",
1283
1291
  attrs: {
1284
1292
  xmlns: "http://www.w3.org/2000/svg",
@@ -1321,15 +1329,15 @@ const ri = {
1321
1329
  }
1322
1330
  }
1323
1331
  ]
1324
- }, Ir = nt(function(t, n) {
1325
- return we($e, Object.assign({}, t, {
1332
+ }, br = it(function(t, n) {
1333
+ return ye(We, Object.assign({}, t, {
1326
1334
  id: "data-validation-icon",
1327
1335
  ref: n,
1328
- icon: ri
1336
+ icon: si
1329
1337
  }));
1330
1338
  });
1331
- Ir.displayName = "DataValidationIcon";
1332
- const oi = {
1339
+ br.displayName = "DataValidationIcon";
1340
+ const li = {
1333
1341
  tag: "svg",
1334
1342
  attrs: {
1335
1343
  xmlns: "http://www.w3.org/2000/svg",
@@ -1370,15 +1378,15 @@ const oi = {
1370
1378
  }
1371
1379
  }
1372
1380
  ]
1373
- }, Sn = nt(function(t, n) {
1374
- return we($e, Object.assign({}, t, {
1381
+ }, Rn = it(function(t, n) {
1382
+ return ye(We, Object.assign({}, t, {
1375
1383
  id: "delete-icon",
1376
1384
  ref: n,
1377
- icon: oi
1385
+ icon: li
1378
1386
  }));
1379
1387
  });
1380
- Sn.displayName = "DeleteIcon";
1381
- const ii = {
1388
+ Rn.displayName = "DeleteIcon";
1389
+ const di = {
1382
1390
  tag: "svg",
1383
1391
  attrs: {
1384
1392
  xmlns: "http://www.w3.org/2000/svg",
@@ -1394,15 +1402,15 @@ const ii = {
1394
1402
  d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"
1395
1403
  }
1396
1404
  }]
1397
- }, Rr = nt(function(t, n) {
1398
- return we($e, Object.assign({}, t, {
1405
+ }, Er = it(function(t, n) {
1406
+ return ye(We, Object.assign({}, t, {
1399
1407
  id: "increase-icon",
1400
1408
  ref: n,
1401
- icon: ii
1409
+ icon: di
1402
1410
  }));
1403
1411
  });
1404
- Rr.displayName = "IncreaseIcon";
1405
- const ai = {
1412
+ Er.displayName = "IncreaseIcon";
1413
+ const ci = {
1406
1414
  tag: "svg",
1407
1415
  attrs: {
1408
1416
  xmlns: "http://www.w3.org/2000/svg",
@@ -1420,15 +1428,15 @@ const ai = {
1420
1428
  clipRule: "evenodd"
1421
1429
  }
1422
1430
  }]
1423
- }, wn = nt(function(t, n) {
1424
- return we($e, Object.assign({}, t, {
1431
+ }, yn = it(function(t, n) {
1432
+ return ye(We, Object.assign({}, t, {
1425
1433
  id: "more-down-icon",
1426
1434
  ref: n,
1427
- icon: ai
1435
+ icon: ci
1428
1436
  }));
1429
1437
  });
1430
- wn.displayName = "MoreDownIcon";
1431
- const si = {
1438
+ yn.displayName = "MoreDownIcon";
1439
+ const ui = {
1432
1440
  tag: "svg",
1433
1441
  attrs: {
1434
1442
  xmlns: "http://www.w3.org/2000/svg",
@@ -1446,15 +1454,15 @@ const si = {
1446
1454
  clipRule: "evenodd"
1447
1455
  }
1448
1456
  }]
1449
- }, yr = nt(function(t, n) {
1450
- return we($e, Object.assign({}, t, {
1457
+ }, Dr = it(function(t, n) {
1458
+ return ye(We, Object.assign({}, t, {
1451
1459
  id: "more-up-icon",
1452
1460
  ref: n,
1453
- icon: si
1461
+ icon: ui
1454
1462
  }));
1455
1463
  });
1456
- yr.displayName = "MoreUpIcon";
1457
- const li = {
1464
+ Dr.displayName = "MoreUpIcon";
1465
+ const hi = {
1458
1466
  tag: "svg",
1459
1467
  attrs: {
1460
1468
  xmlns: "http://www.w3.org/2000/svg",
@@ -1507,54 +1515,54 @@ const li = {
1507
1515
  }
1508
1516
  }
1509
1517
  ]
1510
- }, Mr = nt(function(t, n) {
1511
- return we($e, Object.assign({}, t, {
1518
+ }, Vr = it(function(t, n) {
1519
+ return ye(We, Object.assign({}, t, {
1512
1520
  id: "sequence-icon",
1513
1521
  ref: n,
1514
- icon: li
1522
+ icon: hi
1515
1523
  }));
1516
1524
  });
1517
- Mr.displayName = "SequenceIcon";
1518
- function di(e) {
1525
+ Vr.displayName = "SequenceIcon";
1526
+ function pi(e) {
1519
1527
  var d;
1520
- const t = F(de), n = F(mn), { value: r, onChange: o, extraComponent: i } = e, [a, l] = W(!1), s = i ? n.get(i) : null;
1521
- return /* @__PURE__ */ j(ct, { children: [
1522
- /* @__PURE__ */ j(
1528
+ const t = F(ge), n = F(Sn), { value: r, onChange: o, extraComponent: i } = e, [a, l] = W(!1), s = i ? n.get(i) : null;
1529
+ return /* @__PURE__ */ Y(pt, { children: [
1530
+ /* @__PURE__ */ Y(
1523
1531
  "div",
1524
1532
  {
1525
1533
  className: "univer-mb-3 univer-flex univer-cursor-pointer univer-items-center univer-text-sm univer-text-gray-900 dark:!univer-text-white",
1526
1534
  onClick: () => l(!a),
1527
1535
  children: [
1528
1536
  t.t("dataValidation.panel.options"),
1529
- a ? /* @__PURE__ */ C(yr, { className: "univer-ml-1" }) : /* @__PURE__ */ C(wn, { className: "univer-ml-1" })
1537
+ a ? /* @__PURE__ */ S(Dr, { className: "univer-ml-1" }) : /* @__PURE__ */ S(yn, { className: "univer-ml-1" })
1530
1538
  ]
1531
1539
  }
1532
1540
  ),
1533
- a && /* @__PURE__ */ j(ct, { children: [
1534
- s ? /* @__PURE__ */ C(s, { value: r, onChange: o }) : null,
1535
- /* @__PURE__ */ C(
1536
- X,
1541
+ a && /* @__PURE__ */ Y(pt, { children: [
1542
+ s ? /* @__PURE__ */ S(s, { value: r, onChange: o }) : null,
1543
+ /* @__PURE__ */ S(
1544
+ Z,
1537
1545
  {
1538
1546
  label: t.t("dataValidation.panel.invalid"),
1539
- children: /* @__PURE__ */ j(
1540
- _n,
1547
+ children: /* @__PURE__ */ Y(
1548
+ In,
1541
1549
  {
1542
- value: `${(d = r.errorStyle) != null ? d : st.WARNING}`,
1550
+ value: `${(d = r.errorStyle) != null ? d : ct.WARNING}`,
1543
1551
  onChange: (u) => o({ ...r, errorStyle: +u }),
1544
1552
  children: [
1545
- /* @__PURE__ */ C(Ae, { value: `${st.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1546
- /* @__PURE__ */ C(Ae, { value: `${st.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1553
+ /* @__PURE__ */ S(Ne, { value: `${ct.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1554
+ /* @__PURE__ */ S(Ne, { value: `${ct.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1547
1555
  ]
1548
1556
  }
1549
1557
  )
1550
1558
  }
1551
1559
  ),
1552
- /* @__PURE__ */ C(
1553
- X,
1560
+ /* @__PURE__ */ S(
1561
+ Z,
1554
1562
  {
1555
1563
  label: t.t("dataValidation.panel.messageInfo"),
1556
- children: /* @__PURE__ */ C(
1557
- Pt,
1564
+ children: /* @__PURE__ */ S(
1565
+ Nt,
1558
1566
  {
1559
1567
  checked: r.showErrorMessage,
1560
1568
  onChange: () => o({
@@ -1566,259 +1574,272 @@ function di(e) {
1566
1574
  )
1567
1575
  }
1568
1576
  ),
1569
- r.showErrorMessage ? /* @__PURE__ */ C(X, { children: /* @__PURE__ */ C(Pe, { value: r.error, onChange: (u) => o({ ...r, error: u }) }) }) : null
1577
+ r.showErrorMessage ? /* @__PURE__ */ S(Z, { children: /* @__PURE__ */ S(Ue, { value: r.error, onChange: (u) => o({ ...r, error: u }) }) }) : null
1570
1578
  ] })
1571
1579
  ] });
1572
1580
  }
1573
- const ci = (e) => Fr(
1581
+ const gi = (e) => Wr(
1574
1582
  async (t, n, r, o) => {
1575
1583
  const i = await e.executeCommand(t, n, r);
1576
1584
  o == null || o(i);
1577
1585
  },
1578
1586
  1e3
1579
1587
  );
1580
- function ui(e, t, n) {
1588
+ function vi(e, t, n) {
1581
1589
  var r, o, i, a;
1582
- return t ? ((o = (r = e.getUnit(t)) == null ? void 0 : r.getSheetBySheetName(n)) == null ? void 0 : o.getSheetId()) || "" : ((a = (i = e.getCurrentUnitForType(Z.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(n)) == null ? void 0 : a.getSheetId()) || "";
1590
+ return t ? ((o = (r = e.getUnit(t)) == null ? void 0 : r.getSheetBySheetName(n)) == null ? void 0 : o.getSheetId()) || "" : ((a = (i = e.getCurrentUnitForType(H.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(n)) == null ? void 0 : a.getSheetId()) || "";
1583
1591
  }
1584
- function hi() {
1585
- var M, N;
1586
- const [e, t] = W(0), n = F(me), r = Oe(n.activeRule$, n.activeRule), { unitId: o, subUnitId: i, rule: a } = r || {}, l = a.uid, s = F(Me), d = F(le), u = F(mn), g = F(te), c = F(gn), m = F(de), [h, E] = W(a), R = s.getValidatorItem(h.type), [w, S] = W(!1), I = s.getValidatorsByScope(lo.SHEET), [b, v] = W(() => h.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), p = dt(() => ci(g), [g]), [_, P] = W(!1), [k, U] = W(!1), L = ht(null), y = F(Kn);
1587
- if (Le(() => () => {
1588
- const f = y.getCurrentLastSelection();
1589
- f && y.setSelections([f]);
1590
- }, [y]), Le(() => {
1591
- g.onCommandExecuted((f) => {
1592
- (f.id === $r.id || f.id === xr.id) && setTimeout(() => {
1593
- const O = c.getRuleById(o, i, l);
1594
- t(($) => $ + 1), O && (E(O), v(O.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
1592
+ function mi() {
1593
+ var N, J;
1594
+ const [e, t] = W(0), n = F(_e), r = Re(n.activeRule$, n.activeRule), { unitId: o, subUnitId: i, rule: a } = r || {}, l = a.uid, s = F(Te), d = F(pe), u = F(Sn), h = F(oe), c = F(fn), m = F(ge), I = Re(
1595
+ () => d.getCurrentTypeOfUnit$(H.UNIVER_SHEET),
1596
+ void 0,
1597
+ void 0,
1598
+ []
1599
+ ), D = Re(() => {
1600
+ var R;
1601
+ return (R = I == null ? void 0 : I.activeSheet$) != null ? R : vr(null);
1602
+ }, void 0, void 0, []), [v, C] = W(a), f = s.getValidatorItem(v.type), [w, b] = W(!1), g = s.getValidatorsByScope(mo.SHEET), [p, _] = W(() => v.ranges.map((R) => ({ unitId: "", sheetId: "", range: R }))), T = ht(() => gi(h), [h]), [A, P] = W(!1), [L, y] = W(!1), O = vt(null), U = F(Jn);
1603
+ if (be(() => () => {
1604
+ const R = U.getCurrentLastSelection();
1605
+ R && U.setSelections([R]);
1606
+ }, [U]), be(() => {
1607
+ h.onCommandExecuted((R) => {
1608
+ (R.id === Hr.id || R.id === jr.id) && setTimeout(() => {
1609
+ const B = c.getRuleById(o, i, l);
1610
+ t((z) => z + 1), B && (C(B), _(B.ranges.map((z) => ({ unitId: "", sheetId: "", range: z }))));
1595
1611
  }, 20);
1596
1612
  });
1597
- }, [g, c, l, i, o]), !R)
1613
+ }, [h, c, l, i, o]), !f)
1598
1614
  return null;
1599
- const T = R.operators, A = R.operatorNames, x = h.operator ? co.includes(h.operator) : !1, H = () => {
1600
- var f, O, $;
1601
- (O = (f = L.current) == null ? void 0 : f.editor) != null && O.isFocus() && q(($ = L.current) == null ? void 0 : $.getValue()), !(!h.ranges.length || _) && (R.validatorFormula(h, o, i).success ? n.setActiveRule(null) : S(!0));
1602
- }, q = nn((f) => {
1603
- const O = f.split(",").filter(Boolean).map(To).map((Q) => {
1604
- const In = Q.sheetName;
1605
- if (In) {
1606
- const Vr = ui(d, Q.unitId, In);
1607
- return { ...Q, sheetId: Vr };
1615
+ const k = f.operators, x = f.operatorNames, te = v.operator ? fo.includes(v.operator) : !1, j = () => {
1616
+ (D == null ? void 0 : D.getSheetId()) !== i && h.syncExecuteCommand(ro.id, {
1617
+ unitId: o,
1618
+ subUnitId: i
1619
+ });
1620
+ }, se = () => {
1621
+ var R, B, z;
1622
+ (B = (R = O.current) == null ? void 0 : R.editor) != null && B.isFocus() && le((z = O.current) == null ? void 0 : z.getValue()), !(!v.ranges.length || A) && (f.validatorFormula(v, o, i).success ? n.setActiveRule(null) : b(!0), j());
1623
+ }, le = an((R) => {
1624
+ const B = R.split(",").filter(Boolean).map(Lo).map((ne) => {
1625
+ const Mn = ne.sheetName;
1626
+ if (Mn) {
1627
+ const Pr = vi(d, ne.unitId, Mn);
1628
+ return { ...ne, sheetId: Pr };
1608
1629
  }
1609
1630
  return {
1610
- ...Q,
1631
+ ...ne,
1611
1632
  sheetId: ""
1612
1633
  };
1613
1634
  });
1614
- if (Br(O, b))
1635
+ if (Yr(B, p))
1615
1636
  return;
1616
- v(O);
1617
- const $ = O.filter((Q) => (!Q.unitId || Q.unitId === o) && (!Q.sheetId || Q.sheetId === i)).map((Q) => Q.range);
1618
- if (E({
1619
- ...h,
1620
- ranges: $
1621
- }), $.length === 0)
1637
+ _(B);
1638
+ const z = B.filter((ne) => (!ne.unitId || ne.unitId === o) && (!ne.sheetId || ne.sheetId === i)).map((ne) => ne.range);
1639
+ if (C({
1640
+ ...v,
1641
+ ranges: z
1642
+ }), z.length === 0)
1622
1643
  return;
1623
- const ce = {
1644
+ const Ie = {
1624
1645
  unitId: o,
1625
1646
  subUnitId: i,
1626
1647
  ruleId: l,
1627
- ranges: $
1648
+ ranges: z
1628
1649
  };
1629
- p(nr.id, ce);
1630
- }), B = (f) => {
1631
- if (Rn(f, Tn(h)))
1650
+ T(ir.id, Ie);
1651
+ }), de = (R) => {
1652
+ if (bn(R, Pn(v)))
1632
1653
  return;
1633
- E({
1634
- ...h,
1635
- ...f
1654
+ C({
1655
+ ...v,
1656
+ ...R
1636
1657
  });
1637
- const O = {
1658
+ const B = {
1638
1659
  unitId: o,
1639
1660
  subUnitId: i,
1640
1661
  ruleId: l,
1641
- setting: f
1662
+ setting: R
1642
1663
  };
1643
- p(
1644
- En.id,
1645
- O,
1664
+ T(
1665
+ Tn.id,
1666
+ B,
1646
1667
  void 0
1647
1668
  );
1648
- }, ne = async () => {
1649
- await g.executeCommand(or.id, {
1669
+ }, Me = async () => {
1670
+ await h.executeCommand(sr.id, {
1650
1671
  ruleId: l,
1651
1672
  unitId: o,
1652
1673
  subUnitId: i
1653
- }), n.setActiveRule(null);
1654
- }, ie = {
1655
- type: h.type,
1656
- operator: h.operator,
1657
- formula1: h.formula1,
1658
- formula2: h.formula2,
1659
- allowBlank: h.allowBlank
1660
- }, _e = (f) => {
1661
- const O = s.getValidatorItem(f);
1662
- if (!O)
1674
+ }), n.setActiveRule(null), j();
1675
+ }, Q = {
1676
+ type: v.type,
1677
+ operator: v.operator,
1678
+ formula1: v.formula1,
1679
+ formula2: v.formula2,
1680
+ allowBlank: v.allowBlank
1681
+ }, G = (R) => {
1682
+ const B = s.getValidatorItem(R);
1683
+ if (!B)
1663
1684
  return;
1664
- const $ = O.operators, ce = c.getRuleById(o, i, l), Q = f === (ce == null ? void 0 : ce.type) || f.includes("list") && (ce != null && ce.type.includes("list")) ? {
1665
- ...ce,
1666
- type: f
1685
+ const z = B.operators, Ie = c.getRuleById(o, i, l), ne = R === (Ie == null ? void 0 : Ie.type) || R.includes("list") && (Ie != null && Ie.type.includes("list")) ? {
1686
+ ...Ie,
1687
+ type: R
1667
1688
  } : {
1668
- ...h,
1669
- type: f,
1670
- operator: $[0],
1689
+ ...v,
1690
+ type: R,
1691
+ operator: z[0],
1671
1692
  formula1: void 0,
1672
1693
  formula2: void 0
1673
1694
  };
1674
- E(Q), g.executeCommand(En.id, {
1695
+ C(ne), h.executeCommand(Tn.id, {
1675
1696
  unitId: o,
1676
1697
  subUnitId: i,
1677
- ruleId: h.uid,
1678
- setting: Tn(Q)
1698
+ ruleId: v.uid,
1699
+ setting: Pn(ne)
1679
1700
  });
1680
- }, Ce = u.get(R.formulaInput), J = dt(() => b.map((f) => gr(f.range)).join(","), []), z = Vn(h), ge = (f) => {
1681
- Rn(f, Vn(h)) || (E({
1682
- ...h,
1683
- ...f
1684
- }), p(
1685
- Qr.id,
1701
+ }, ce = u.get(f.formulaInput), ee = ht(() => p.map((R) => _r(R.range)).join(","), []), q = An(v), M = (R) => {
1702
+ bn(R, An(v)) || (C({
1703
+ ...v,
1704
+ ...R
1705
+ }), T(
1706
+ ao.id,
1686
1707
  {
1687
1708
  unitId: o,
1688
1709
  subUnitId: i,
1689
1710
  ruleId: l,
1690
- options: f
1711
+ options: R
1691
1712
  }
1692
1713
  ));
1693
- }, G = T.length && !h.operator;
1694
- return /* @__PURE__ */ j("div", { "data-u-comp": "data-validation-detail", className: "univer-py-2", children: [
1695
- /* @__PURE__ */ C(
1696
- X,
1714
+ }, $ = k.length && !v.operator;
1715
+ return /* @__PURE__ */ Y("div", { "data-u-comp": "data-validation-detail", className: "univer-py-2", children: [
1716
+ /* @__PURE__ */ S(
1717
+ Z,
1697
1718
  {
1698
1719
  label: m.t("dataValidation.panel.range"),
1699
- error: !h.ranges.length || _ ? m.t("dataValidation.panel.rangeError") : "",
1700
- children: /* @__PURE__ */ C(
1701
- Oo,
1720
+ error: !v.ranges.length || A ? m.t("dataValidation.panel.rangeError") : "",
1721
+ children: /* @__PURE__ */ S(
1722
+ ko,
1702
1723
  {
1703
- selectorRef: L,
1724
+ selectorRef: O,
1704
1725
  unitId: o,
1705
1726
  subUnitId: i,
1706
- initialValue: J,
1707
- onChange: (f, O) => {
1708
- var $;
1709
- !k && (($ = L.current) != null && $.verify()) && q(O);
1727
+ initialValue: ee,
1728
+ onChange: (R, B) => {
1729
+ var z;
1730
+ !L && ((z = O.current) != null && z.verify()) && le(B);
1710
1731
  },
1711
- onFocusChange: (f, O) => {
1712
- var $;
1713
- U(f), !f && O && (($ = L.current) != null && $.verify()) && q(O);
1732
+ onFocusChange: (R, B) => {
1733
+ var z;
1734
+ y(R), !R && B && ((z = O.current) != null && z.verify()) && le(B);
1714
1735
  },
1715
- onVerify: (f) => P(!f)
1736
+ onVerify: (R) => P(!R)
1716
1737
  }
1717
1738
  )
1718
1739
  }
1719
1740
  ),
1720
- /* @__PURE__ */ C(X, { label: m.t("dataValidation.panel.type"), children: /* @__PURE__ */ C(
1721
- Ln,
1741
+ /* @__PURE__ */ S(Z, { label: m.t("dataValidation.panel.type"), children: /* @__PURE__ */ S(
1742
+ Un,
1722
1743
  {
1723
1744
  className: "univer-w-full",
1724
- value: h.type,
1725
- options: (M = I == null ? void 0 : I.sort((f, O) => f.order - O.order)) == null ? void 0 : M.map((f) => ({
1726
- label: m.t(f.title),
1727
- value: f.id
1745
+ value: v.type,
1746
+ options: (N = g == null ? void 0 : g.sort((R, B) => R.order - B.order)) == null ? void 0 : N.map((R) => ({
1747
+ label: m.t(R.title),
1748
+ value: R.id
1728
1749
  })),
1729
- onChange: _e
1750
+ onChange: G
1730
1751
  }
1731
1752
  ) }),
1732
- T != null && T.length ? /* @__PURE__ */ C(X, { label: m.t("dataValidation.panel.operator"), children: /* @__PURE__ */ C(
1733
- Ln,
1753
+ k != null && k.length ? /* @__PURE__ */ S(Z, { label: m.t("dataValidation.panel.operator"), children: /* @__PURE__ */ S(
1754
+ Un,
1734
1755
  {
1735
1756
  className: "univer-w-full",
1736
- value: `${h.operator}`,
1757
+ value: `${v.operator}`,
1737
1758
  options: [
1738
1759
  {
1739
1760
  value: "",
1740
1761
  label: m.t("dataValidation.operators.legal")
1741
1762
  },
1742
- ...T.map((f, O) => ({
1743
- value: `${f}`,
1744
- label: A[O]
1763
+ ...k.map((R, B) => ({
1764
+ value: `${R}`,
1765
+ label: x[B]
1745
1766
  }))
1746
1767
  ],
1747
- onChange: (f) => {
1748
- B({
1749
- ...ie,
1750
- operator: f
1768
+ onChange: (R) => {
1769
+ de({
1770
+ ...Q,
1771
+ operator: R
1751
1772
  });
1752
1773
  }
1753
1774
  }
1754
1775
  ) }) : null,
1755
- Ce && !G ? /* @__PURE__ */ C(
1756
- Ce,
1776
+ ce && !$ ? /* @__PURE__ */ S(
1777
+ ce,
1757
1778
  {
1758
- isTwoFormula: x,
1779
+ isTwoFormula: te,
1759
1780
  value: {
1760
- formula1: h.formula1,
1761
- formula2: h.formula2
1781
+ formula1: v.formula1,
1782
+ formula2: v.formula2
1762
1783
  },
1763
- onChange: (f) => {
1764
- B({
1765
- ...ie,
1766
- ...f
1784
+ onChange: (R) => {
1785
+ de({
1786
+ ...Q,
1787
+ ...R
1767
1788
  });
1768
1789
  },
1769
1790
  showError: w,
1770
- validResult: R.validatorFormula(h, o, i),
1791
+ validResult: f.validatorFormula(v, o, i),
1771
1792
  unitId: o,
1772
1793
  subUnitId: i,
1773
1794
  ruleId: l
1774
1795
  },
1775
- e + h.type
1796
+ e + v.type
1776
1797
  ) : null,
1777
- /* @__PURE__ */ C(X, { children: /* @__PURE__ */ C(
1778
- Pt,
1798
+ /* @__PURE__ */ S(Z, { children: /* @__PURE__ */ S(
1799
+ Nt,
1779
1800
  {
1780
- checked: (N = h.allowBlank) != null ? N : !0,
1801
+ checked: (J = v.allowBlank) != null ? J : !0,
1781
1802
  onChange: () => {
1782
- var f;
1783
- return B({
1784
- ...ie,
1785
- allowBlank: !((f = h.allowBlank) == null || f)
1803
+ var R;
1804
+ return de({
1805
+ ...Q,
1806
+ allowBlank: !((R = v.allowBlank) == null || R)
1786
1807
  });
1787
1808
  },
1788
1809
  children: m.t("dataValidation.panel.allowBlank")
1789
1810
  }
1790
1811
  ) }),
1791
- /* @__PURE__ */ C(di, { value: z, onChange: ge, extraComponent: R.optionsInput }),
1792
- /* @__PURE__ */ j("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
1793
- /* @__PURE__ */ C(ze, { className: "univer-ml-3", onClick: ne, children: m.t("dataValidation.panel.removeRule") }),
1794
- /* @__PURE__ */ C(ze, { className: "univer-ml-3", variant: "primary", onClick: H, children: m.t("dataValidation.panel.done") })
1812
+ /* @__PURE__ */ S(pi, { value: q, onChange: M, extraComponent: f.optionsInput }),
1813
+ /* @__PURE__ */ Y("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
1814
+ /* @__PURE__ */ S(qe, { className: "univer-ml-3", onClick: Me, children: m.t("dataValidation.panel.removeRule") }),
1815
+ /* @__PURE__ */ S(qe, { className: "univer-ml-3", variant: "primary", onClick: se, children: m.t("dataValidation.panel.done") })
1795
1816
  ] })
1796
1817
  ] });
1797
1818
  }
1798
- const pi = (e) => {
1799
- const { rule: t, onClick: n, unitId: r, subUnitId: o, disable: i } = e, a = F(Me), l = F(te), s = F(Eo), d = a.getValidatorItem(t.type), u = ht(void 0), [g, c] = W(!1), m = F(Yn), h = Oe(m.currentTheme$), E = dt(() => {
1800
- var v;
1801
- const w = m.getColorFromTheme("primary.600"), S = m.getColorFromTheme("loop-color.2"), I = (v = m.getColorFromTheme(S)) != null ? v : w, b = new Wr(I).toRgb();
1819
+ const fi = (e) => {
1820
+ const { rule: t, onClick: n, unitId: r, subUnitId: o, disable: i } = e, a = F(Te), l = F(oe), s = F(Oo), d = a.getValidatorItem(t.type), u = vt(void 0), [h, c] = W(!1), m = F(zn), I = Re(m.currentTheme$), D = ht(() => {
1821
+ var g;
1822
+ const C = m.getColorFromTheme("primary.600"), f = m.getColorFromTheme("loop-color.2"), w = (g = m.getColorFromTheme(f)) != null ? g : C, b = new Xr(w).toRgb();
1802
1823
  return {
1803
1824
  fill: `rgba(${b.r}, ${b.g}, ${b.b}, 0.1)`,
1804
- stroke: I
1825
+ stroke: w
1805
1826
  };
1806
- }, [h]), R = (w) => {
1807
- l.executeCommand(or.id, {
1827
+ }, [I]), v = (C) => {
1828
+ l.executeCommand(sr.id, {
1808
1829
  ruleId: t.uid,
1809
1830
  unitId: r,
1810
1831
  subUnitId: o
1811
- }), w.stopPropagation();
1832
+ }), C.stopPropagation();
1812
1833
  };
1813
- return Le(() => () => {
1814
- var w;
1815
- u.current && ((w = u.current) == null || w.forEach((S) => {
1816
- S && s.removeShape(S);
1834
+ return be(() => () => {
1835
+ var C;
1836
+ u.current && ((C = u.current) == null || C.forEach((f) => {
1837
+ f && s.removeShape(f);
1817
1838
  }));
1818
- }, [s]), /* @__PURE__ */ j(
1839
+ }, [s]), /* @__PURE__ */ Y(
1819
1840
  "div",
1820
1841
  {
1821
- className: ke(
1842
+ className: Fe(
1822
1843
  `
1823
1844
  univer-bg-secondary univer-relative univer--mx-2 univer-box-border univer-flex univer-w-[287px]
1824
1845
  univer-cursor-pointer univer-flex-col univer-justify-between univer-overflow-hidden univer-rounded-md
@@ -1831,119 +1852,119 @@ const pi = (e) => {
1831
1852
  ),
1832
1853
  onClick: n,
1833
1854
  onMouseEnter: () => {
1834
- i || (c(!0), u.current = t.ranges.map((w) => s.addShape({
1835
- range: w,
1836
- style: E,
1855
+ i || (c(!0), u.current = t.ranges.map((C) => s.addShape({
1856
+ range: C,
1857
+ style: D,
1837
1858
  primary: null
1838
1859
  })));
1839
1860
  },
1840
1861
  onMouseLeave: () => {
1841
- var w;
1842
- c(!1), (w = u.current) == null || w.forEach((S) => {
1843
- S && s.removeShape(S);
1862
+ var C;
1863
+ c(!1), (C = u.current) == null || C.forEach((f) => {
1864
+ f && s.removeShape(f);
1844
1865
  }), u.current = void 0;
1845
1866
  },
1846
1867
  children: [
1847
- /* @__PURE__ */ C(
1868
+ /* @__PURE__ */ S(
1848
1869
  "div",
1849
1870
  {
1850
1871
  className: "univer-truncate univer-text-sm univer-font-medium univer-leading-[22px] univer-text-gray-900 dark:!univer-text-white",
1851
1872
  children: d == null ? void 0 : d.generateRuleName(t)
1852
1873
  }
1853
1874
  ),
1854
- /* @__PURE__ */ C(
1875
+ /* @__PURE__ */ S(
1855
1876
  "div",
1856
1877
  {
1857
1878
  className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px] dark:!univer-text-gray-300",
1858
- children: t.ranges.map((w) => gr(w)).join(",")
1879
+ children: t.ranges.map((C) => _r(C)).join(",")
1859
1880
  }
1860
1881
  ),
1861
- g ? /* @__PURE__ */ C(
1882
+ h ? /* @__PURE__ */ S(
1862
1883
  "div",
1863
1884
  {
1864
1885
  className: "univer-absolute univer-right-2 univer-top-[19px] univer-flex univer-size-5 univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 dark:!univer-text-gray-300 dark:hover:!univer-bg-gray-700",
1865
- onClick: R,
1866
- children: /* @__PURE__ */ C(Sn, {})
1886
+ onClick: v,
1887
+ children: /* @__PURE__ */ S(Rn, {})
1867
1888
  }
1868
1889
  ) : null
1869
1890
  ]
1870
1891
  }
1871
1892
  );
1872
1893
  };
1873
- function gi(e) {
1874
- const t = F(oe), n = F(le), r = F(te), o = F(ye), i = F(me), a = F(de), [l, s] = W([]), { workbook: d } = e, u = Oe(d.activeSheet$, void 0, !0), g = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
1875
- Le(() => {
1876
- s(t.getRules(g, c));
1877
- const S = t.ruleChange$.subscribe((I) => {
1878
- I.unitId === g && I.subUnitId === c && s(t.getRules(g, c));
1894
+ function _i(e) {
1895
+ const t = F(ae), n = F(pe), r = F(oe), o = F(Ve), i = F(_e), a = F(ge), [l, s] = W([]), { workbook: d } = e, u = Re(d.activeSheet$, void 0, !0), h = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
1896
+ be(() => {
1897
+ s(t.getRules(h, c));
1898
+ const f = t.ruleChange$.subscribe((w) => {
1899
+ w.unitId === h && w.subUnitId === c && s(t.getRules(h, c));
1879
1900
  });
1880
1901
  return () => {
1881
- S.unsubscribe();
1902
+ f.unsubscribe();
1882
1903
  };
1883
- }, [g, c, t]);
1904
+ }, [h, c, t]);
1884
1905
  const m = async () => {
1885
- const S = er(o), I = {
1886
- unitId: g,
1906
+ const f = rr(o), w = {
1907
+ unitId: h,
1887
1908
  subUnitId: c,
1888
- rule: S
1909
+ rule: f
1889
1910
  };
1890
- await r.executeCommand(hn.id, I), i.setActiveRule({
1891
- unitId: g,
1911
+ await r.executeCommand(vn.id, w), i.setActiveRule({
1912
+ unitId: h,
1892
1913
  subUnitId: c,
1893
- rule: S
1914
+ rule: f
1894
1915
  });
1895
- }, h = () => {
1896
- r.executeCommand(eo.id, {
1897
- unitId: g,
1916
+ }, I = () => {
1917
+ r.executeCommand(so.id, {
1918
+ unitId: h,
1898
1919
  subUnitId: c
1899
1920
  });
1900
- }, R = ((S) => {
1901
- const I = n.getCurrentUnitForType(Z.UNIVER_SHEET), b = I.getActiveSheet(), v = I.getUnitId(), p = b.getSheetId();
1902
- return S.map((P) => qr(o, v, p, P.ranges) ? { ...P } : { ...P, disable: !0 });
1903
- })(l), w = R == null ? void 0 : R.some((S) => S.disable);
1904
- return /* @__PURE__ */ j("div", { className: "univer-pb-4", children: [
1905
- R == null ? void 0 : R.map((S) => {
1906
- var I;
1907
- return /* @__PURE__ */ C(
1908
- pi,
1921
+ }, v = ((f) => {
1922
+ const w = n.getCurrentUnitForType(H.UNIVER_SHEET), b = w.getActiveSheet(), g = w.getUnitId(), p = b.getSheetId();
1923
+ return f.map((T) => oo(o, g, p, T.ranges) ? { ...T } : { ...T, disable: !0 });
1924
+ })(l), C = v == null ? void 0 : v.some((f) => f.disable);
1925
+ return /* @__PURE__ */ Y("div", { className: "univer-pb-4", children: [
1926
+ v == null ? void 0 : v.map((f) => {
1927
+ var w;
1928
+ return /* @__PURE__ */ S(
1929
+ fi,
1909
1930
  {
1910
- unitId: g,
1931
+ unitId: h,
1911
1932
  subUnitId: c,
1912
1933
  onClick: () => {
1913
- S.disable || i.setActiveRule({
1914
- unitId: g,
1934
+ f.disable || i.setActiveRule({
1935
+ unitId: h,
1915
1936
  subUnitId: c,
1916
- rule: S
1937
+ rule: f
1917
1938
  });
1918
1939
  },
1919
- rule: S,
1920
- disable: (I = S.disable) != null ? I : !1
1940
+ rule: f,
1941
+ disable: (w = f.disable) != null ? w : !1
1921
1942
  },
1922
- S.uid
1943
+ f.uid
1923
1944
  );
1924
1945
  }),
1925
- /* @__PURE__ */ j("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
1926
- l.length && !w ? /* @__PURE__ */ C(ze, { onClick: h, children: a.t("dataValidation.panel.removeAll") }) : null,
1927
- /* @__PURE__ */ C(ze, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1946
+ /* @__PURE__ */ Y("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
1947
+ l.length && !C ? /* @__PURE__ */ S(qe, { onClick: I, children: a.t("dataValidation.panel.removeAll") }) : null,
1948
+ /* @__PURE__ */ S(qe, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1928
1949
  ] })
1929
1950
  ] });
1930
1951
  }
1931
- const vi = () => {
1932
- const e = F(me), t = Oe(e.activeRule$, e.activeRule), n = F(le), r = Oe(
1933
- () => n.getCurrentTypeOfUnit$(Z.UNIVER_SHEET),
1952
+ const Si = () => {
1953
+ const e = F(_e), t = Re(e.activeRule$, e.activeRule), n = F(pe), r = Re(
1954
+ () => n.getCurrentTypeOfUnit$(H.UNIVER_SHEET),
1934
1955
  void 0,
1935
1956
  void 0,
1936
1957
  []
1937
- ), o = Oe(() => {
1958
+ ), o = Re(() => {
1938
1959
  var i;
1939
- return (i = r == null ? void 0 : r.activeSheet$) != null ? i : fo(null);
1960
+ return (i = r == null ? void 0 : r.activeSheet$) != null ? i : vr(null);
1940
1961
  }, void 0, void 0, []);
1941
- return !r || !o ? null : t && t.subUnitId === o.getSheetId() ? /* @__PURE__ */ C(hi, {}, t.rule.uid) : /* @__PURE__ */ C(gi, { workbook: r });
1942
- }, mi = (e) => {
1943
- const { isTwoFormula: t = !1, value: n, onChange: r, showError: o, validResult: i } = e, a = F(de), l = o ? i == null ? void 0 : i.formula1 : "", s = o ? i == null ? void 0 : i.formula2 : "";
1944
- return t ? /* @__PURE__ */ j(ct, { children: [
1945
- /* @__PURE__ */ C(X, { error: l, children: /* @__PURE__ */ C(
1946
- Pe,
1962
+ return !r || !o ? null : t && (t.subUnitId === o.getSheetId() || t.subUnitId === e.getFocusFormulaEditorActiveRuleSubUnitId()) ? /* @__PURE__ */ S(mi, {}, t.rule.uid) : /* @__PURE__ */ S(_i, { workbook: r });
1963
+ }, Ci = (e) => {
1964
+ const { isTwoFormula: t = !1, value: n, onChange: r, showError: o, validResult: i } = e, a = F(ge), l = o ? i == null ? void 0 : i.formula1 : "", s = o ? i == null ? void 0 : i.formula2 : "";
1965
+ return t ? /* @__PURE__ */ Y(pt, { children: [
1966
+ /* @__PURE__ */ S(Z, { error: l, children: /* @__PURE__ */ S(
1967
+ Ue,
1947
1968
  {
1948
1969
  className: "univer-w-full",
1949
1970
  placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
@@ -1956,9 +1977,9 @@ const vi = () => {
1956
1977
  }
1957
1978
  }
1958
1979
  ) }),
1959
- /* @__PURE__ */ C("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
1960
- /* @__PURE__ */ C(X, { error: s, children: /* @__PURE__ */ C(
1961
- Pe,
1980
+ /* @__PURE__ */ S("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
1981
+ /* @__PURE__ */ S(Z, { error: s, children: /* @__PURE__ */ S(
1982
+ Ue,
1962
1983
  {
1963
1984
  className: "univer-w-full",
1964
1985
  placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
@@ -1971,8 +1992,8 @@ const vi = () => {
1971
1992
  }
1972
1993
  }
1973
1994
  ) })
1974
- ] }) : /* @__PURE__ */ C(X, { error: l, children: /* @__PURE__ */ C(
1975
- Pe,
1995
+ ] }) : /* @__PURE__ */ S(Z, { error: l, children: /* @__PURE__ */ S(
1996
+ Ue,
1976
1997
  {
1977
1998
  className: "univer-w-full",
1978
1999
  placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
@@ -1983,11 +2004,11 @@ const vi = () => {
1983
2004
  }
1984
2005
  ) });
1985
2006
  };
1986
- function fi(e) {
1987
- const { value: t, onChange: n, showError: r, validResult: o } = e, i = F(de), a = r ? o == null ? void 0 : o.formula1 : "", l = r ? o == null ? void 0 : o.formula2 : "", [s, d] = W(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
1988
- return /* @__PURE__ */ j(ct, { children: [
1989
- /* @__PURE__ */ C(X, { children: /* @__PURE__ */ C(
1990
- Pt,
2007
+ function Ii(e) {
2008
+ const { value: t, onChange: n, showError: r, validResult: o } = e, i = F(ge), a = r ? o == null ? void 0 : o.formula1 : "", l = r ? o == null ? void 0 : o.formula2 : "", [s, d] = W(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
2009
+ return /* @__PURE__ */ Y(pt, { children: [
2010
+ /* @__PURE__ */ S(Z, { children: /* @__PURE__ */ S(
2011
+ Nt,
1991
2012
  {
1992
2013
  checked: s,
1993
2014
  onChange: (u) => {
@@ -2000,8 +2021,8 @@ function fi(e) {
2000
2021
  children: i.t("dataValidation.checkbox.tips")
2001
2022
  }
2002
2023
  ) }),
2003
- s ? /* @__PURE__ */ C(X, { label: i.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ C(
2004
- Pe,
2024
+ s ? /* @__PURE__ */ S(Z, { label: i.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ S(
2025
+ Ue,
2005
2026
  {
2006
2027
  className: "univer-w-full",
2007
2028
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
@@ -2014,8 +2035,8 @@ function fi(e) {
2014
2035
  }
2015
2036
  }
2016
2037
  ) }) : null,
2017
- s ? /* @__PURE__ */ C(X, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ C(
2018
- Pe,
2038
+ s ? /* @__PURE__ */ S(Z, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ S(
2039
+ Ue,
2019
2040
  {
2020
2041
  className: "univer-w-full",
2021
2042
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
@@ -2030,18 +2051,18 @@ function fi(e) {
2030
2051
  ) }) : null
2031
2052
  ] });
2032
2053
  }
2033
- function _i(e) {
2034
- var g;
2035
- const { unitId: t, subUnitId: n, value: r, onChange: o, showError: i, validResult: a } = e, l = i ? a == null ? void 0 : a.formula1 : void 0, s = ht(null), [d, u] = W(!1);
2036
- return dr((c) => {
2037
- var h;
2038
- (h = s.current) != null && h.isClickOutSide(c) && u(!1);
2039
- }), /* @__PURE__ */ C(X, { error: l, children: /* @__PURE__ */ C(
2040
- vr,
2054
+ function wi(e) {
2055
+ var h;
2056
+ const { unitId: t, subUnitId: n, value: r, onChange: o, showError: i, validResult: a } = e, l = i ? a == null ? void 0 : a.formula1 : void 0, s = vt(null), [d, u] = W(!1);
2057
+ return hr((c) => {
2058
+ var I;
2059
+ (I = s.current) != null && I.isClickOutSide(c) && u(!1);
2060
+ }), /* @__PURE__ */ S(Z, { error: l, children: /* @__PURE__ */ S(
2061
+ Sr,
2041
2062
  {
2042
2063
  ref: s,
2043
- className: ke("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Rt),
2044
- initValue: (g = r == null ? void 0 : r.formula1) != null ? g : "=",
2064
+ className: Fe("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", bt),
2065
+ initValue: (h = r == null ? void 0 : r.formula1) != null ? h : "=",
2045
2066
  unitId: t,
2046
2067
  subUnitId: n,
2047
2068
  isFocus: d,
@@ -2057,7 +2078,7 @@ function _i(e) {
2057
2078
  }
2058
2079
  ) });
2059
2080
  }
2060
- const Ci = [
2081
+ const Ri = [
2061
2082
  "#FFFFFF",
2062
2083
  "#FEE7E7",
2063
2084
  "#FEF0E6",
@@ -2082,24 +2103,24 @@ const Ci = [
2082
2103
  "#3A60F7",
2083
2104
  "#9E6DE3",
2084
2105
  "#F248A6"
2085
- ], Si = (e) => {
2106
+ ], yi = (e) => {
2086
2107
  const { value: t, onChange: n, disabled: r } = e, [o, i] = W(!1);
2087
- return /* @__PURE__ */ C(
2088
- Vo,
2108
+ return /* @__PURE__ */ S(
2109
+ Po,
2089
2110
  {
2090
2111
  align: "start",
2091
2112
  disabled: r,
2092
2113
  open: o,
2093
2114
  onOpenChange: i,
2094
- overlay: /* @__PURE__ */ C(
2115
+ overlay: /* @__PURE__ */ S(
2095
2116
  "div",
2096
2117
  {
2097
2118
  className: "univer-box-border univer-grid univer-w-fit univer-grid-cols-6 univer-flex-wrap univer-gap-2 univer-p-1.5",
2098
- children: Ci.map(
2099
- (a) => /* @__PURE__ */ C(
2119
+ children: Ri.map(
2120
+ (a) => /* @__PURE__ */ S(
2100
2121
  "div",
2101
2122
  {
2102
- className: ke("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", Rt),
2123
+ className: Fe("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", bt),
2103
2124
  style: { background: a },
2104
2125
  onClick: () => {
2105
2126
  n(a), i(!1);
@@ -2110,30 +2131,30 @@ const Ci = [
2110
2131
  )
2111
2132
  }
2112
2133
  ),
2113
- children: /* @__PURE__ */ j(
2134
+ children: /* @__PURE__ */ Y(
2114
2135
  "div",
2115
2136
  {
2116
- className: ke("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", Rt),
2137
+ className: Fe("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", bt),
2117
2138
  children: [
2118
- /* @__PURE__ */ C(
2139
+ /* @__PURE__ */ S(
2119
2140
  "div",
2120
2141
  {
2121
2142
  className: "univer-box-border univer-size-4 univer-rounded univer-text-base",
2122
2143
  style: { background: t }
2123
2144
  }
2124
2145
  ),
2125
- /* @__PURE__ */ C(wn, {})
2146
+ /* @__PURE__ */ S(yn, {})
2126
2147
  ]
2127
2148
  }
2128
2149
  )
2129
2150
  }
2130
2151
  );
2131
- }, Fn = (e) => {
2152
+ }, Bn = (e) => {
2132
2153
  const { item: t, commonProps: n, className: r } = e, { onItemChange: o, onItemDelete: i } = n;
2133
- return /* @__PURE__ */ j("div", { className: ke("univer-flex univer-items-center univer-gap-2", r), children: [
2134
- !t.isRef && /* @__PURE__ */ C("div", { className: ke("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ C(Mr, {}) }),
2135
- /* @__PURE__ */ C(
2136
- Si,
2154
+ return /* @__PURE__ */ Y("div", { className: Fe("univer-flex univer-items-center univer-gap-2", r), children: [
2155
+ !t.isRef && /* @__PURE__ */ S("div", { className: Fe("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(Vr, {}) }),
2156
+ /* @__PURE__ */ S(
2157
+ yi,
2137
2158
  {
2138
2159
  value: t.color,
2139
2160
  onChange: (a) => {
@@ -2141,8 +2162,8 @@ const Ci = [
2141
2162
  }
2142
2163
  }
2143
2164
  ),
2144
- /* @__PURE__ */ C(
2145
- Pe,
2165
+ /* @__PURE__ */ S(
2166
+ Ue,
2146
2167
  {
2147
2168
  disabled: t.isRef,
2148
2169
  value: t.label,
@@ -2151,166 +2172,168 @@ const Ci = [
2151
2172
  }
2152
2173
  }
2153
2174
  ),
2154
- t.isRef ? null : /* @__PURE__ */ C(
2175
+ t.isRef ? null : /* @__PURE__ */ S(
2155
2176
  "div",
2156
2177
  {
2157
2178
  className: "univer-ml-1 univer-cursor-pointer univer-rounded univer-text-base hover:univer-bg-gray-200",
2158
- children: /* @__PURE__ */ C(Sn, { onClick: () => i(t.id) })
2179
+ children: /* @__PURE__ */ S(Rn, { onClick: () => i(t.id) })
2159
2180
  }
2160
2181
  )
2161
2182
  ] });
2162
2183
  };
2163
- function wi(e) {
2184
+ function Mi(e) {
2164
2185
  const { value: t, onChange: n = () => {
2165
- }, unitId: r, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, g] = W(() => De(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [h, E] = W(u === "1" ? s : "="), R = F(de), w = F(Me), S = F(gn), I = F(to), [b, v] = W(() => d.split(",")), p = w.getValidatorItem(Y.LIST), [_, P] = W([]), [k, U] = W(""), L = a ? i == null ? void 0 : i.formula1 : "", y = dt(() => S.ruleChange$.pipe(cr(16)), []), T = Oe(y), A = nn(n);
2166
- Le(() => {
2186
+ }, unitId: r, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = W(() => Pe(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [I, D] = W(u === "1" ? s : "="), v = F(ge), C = F(Te), f = F(fn), w = F(lo), b = F(_e), [g, p] = W(() => d.split(",")), _ = C.getValidatorItem(X.LIST), [T, A] = W([]), [P, L] = W(""), y = a ? i == null ? void 0 : i.formula1 : "", O = ht(() => f.ruleChange$.pipe(pr(16)), []), U = Re(O), k = an(n);
2187
+ be(() => {
2167
2188
  (async () => {
2168
- await new Promise((f) => {
2169
- setTimeout(() => f(!0), 100);
2189
+ await new Promise((N) => {
2190
+ setTimeout(() => N(!0), 100);
2170
2191
  });
2171
- const M = S.getRuleById(r, o, l), N = M == null ? void 0 : M.formula1;
2172
- if (De(N) && p && M) {
2173
- const f = await p.getListAsync(M, r, o);
2174
- P(f);
2192
+ const M = f.getRuleById(r, o, l), $ = M == null ? void 0 : M.formula1;
2193
+ if (Pe($) && _ && M) {
2194
+ const N = await _.getListAsync(M, r, o);
2195
+ A(N);
2175
2196
  }
2176
2197
  })();
2177
- }, [S, T, p, l, o, r]), Le(() => {
2178
- De(s) && s !== h && (m(s), E(h));
2179
- }, [h, s]);
2180
- const [x, H] = W(() => {
2181
- const M = u !== "1" ? no(s) : [], N = d.split(",");
2182
- return M.map((f, O) => ({
2183
- label: f,
2184
- color: N[O] || Te,
2198
+ }, [f, U, _, l, o, r]), be(() => {
2199
+ Pe(s) && s !== I && (m(s), D(I));
2200
+ }, [I, s]);
2201
+ const [x, te] = W(() => {
2202
+ const M = u !== "1" ? co(s) : [], $ = d.split(",");
2203
+ return M.map((N, J) => ({
2204
+ label: N,
2205
+ color: $[J] || ke,
2185
2206
  isRef: !1,
2186
- id: yn(4)
2207
+ id: En(4)
2187
2208
  }));
2188
- }), q = (M, N, f) => {
2189
- const O = x.find(($) => $.id === M);
2190
- O && (O.label = N, O.color = f, H([...x]));
2191
- }, B = (M) => {
2192
- const N = x.findIndex((f) => f.id === M);
2193
- N !== -1 && (x.splice(N, 1), H([...x]));
2194
- }, ne = d.split(","), ie = dt(() => _.map((M, N) => ({
2209
+ }), j = (M, $, N) => {
2210
+ const J = x.find((R) => R.id === M);
2211
+ J && (J.label = $, J.color = N, te([...x]));
2212
+ }, se = (M) => {
2213
+ const $ = x.findIndex((N) => N.id === M);
2214
+ $ !== -1 && (x.splice($, 1), te([...x]));
2215
+ }, le = d.split(","), de = ht(() => T.map((M, $) => ({
2195
2216
  label: M,
2196
- color: ne[N] || Te,
2197
- id: `${N}`,
2217
+ color: le[$] || ke,
2218
+ id: `${$}`,
2198
2219
  isRef: !0
2199
- })), [ne, _]), _e = (M, N, f) => {
2200
- const O = [...b];
2201
- O[+M] = f, v(O), A({
2220
+ })), [le, T]), Me = (M, $, N) => {
2221
+ const J = [...g];
2222
+ J[+M] = N, p(J), k({
2202
2223
  formula1: s,
2203
- formula2: O.join(",")
2224
+ formula2: J.join(",")
2204
2225
  });
2205
- }, Ce = () => {
2206
- H([
2226
+ }, Q = () => {
2227
+ te([
2207
2228
  ...x,
2208
2229
  {
2209
2230
  label: "",
2210
- color: Te,
2231
+ color: ke,
2211
2232
  isRef: !1,
2212
- id: yn(4)
2233
+ id: En(4)
2213
2234
  }
2214
2235
  ]);
2215
2236
  };
2216
- Le(() => {
2237
+ be(() => {
2217
2238
  if (u === "1")
2218
2239
  return;
2219
- const M = /* @__PURE__ */ new Set(), N = [];
2220
- x.map((f) => ({
2221
- labelList: f.label.split(","),
2222
- item: f
2223
- })).forEach(({ item: f, labelList: O }) => {
2224
- O.forEach(($) => {
2225
- M.has($) || (M.add($), N.push({
2226
- label: $,
2227
- color: f.color
2240
+ const M = /* @__PURE__ */ new Set(), $ = [];
2241
+ x.map((N) => ({
2242
+ labelList: N.label.split(","),
2243
+ item: N
2244
+ })).forEach(({ item: N, labelList: J }) => {
2245
+ J.forEach((R) => {
2246
+ M.has(R) || (M.add(R), $.push({
2247
+ label: R,
2248
+ color: N.color
2228
2249
  }));
2229
2250
  });
2230
- }), A({
2231
- formula1: Qn(N.map((f) => f.label)),
2232
- formula2: N.map((f) => f.color === Te ? "" : f.color).join(",")
2251
+ }), k({
2252
+ formula1: nr($.map((N) => N.label)),
2253
+ formula2: $.map((N) => N.color === ke ? "" : N.color).join(",")
2233
2254
  });
2234
- }, [x, A, u, h, b]);
2235
- const J = nn(async (M) => {
2236
- if (!De(M)) {
2237
- A == null || A({
2255
+ }, [x, k, u, I, g]);
2256
+ const G = an(async (M) => {
2257
+ if (!Pe(M)) {
2258
+ k == null || k({
2238
2259
  formula1: "",
2239
2260
  formula2: d
2240
2261
  });
2241
2262
  return;
2242
2263
  }
2243
- I.getFormulaRefCheck(M) ? (A == null || A({
2244
- formula1: De(M) ? M : "",
2264
+ w.getFormulaRefCheck(M) ? (k == null || k({
2265
+ formula1: Pe(M) ? M : "",
2245
2266
  formula2: d
2246
- }), U("")) : (A == null || A({
2267
+ }), L("")) : (k == null || k({
2247
2268
  formula1: "",
2248
2269
  formula2: d
2249
- }), m("="), U(R.t("dataValidation.validFail.formulaError")));
2250
- }), z = ht(null), [ge, G] = W(!1);
2251
- return dr((M) => {
2252
- var f;
2253
- (f = z.current) != null && f.isClickOutSide(M) && G(!1);
2254
- }), /* @__PURE__ */ j(ct, { children: [
2255
- /* @__PURE__ */ C(X, { label: R.t("dataValidation.list.options"), children: /* @__PURE__ */ j(
2256
- _n,
2270
+ }), m("="), L(v.t("dataValidation.validFail.formulaError")));
2271
+ }), ce = vt(null), [ee, q] = W(!1);
2272
+ return hr((M) => {
2273
+ var N;
2274
+ (N = ce.current) != null && N.isClickOutSide(M) && q(!1);
2275
+ }), be(() => {
2276
+ ee ? b.setFocusFormulaEditorActiveRuleSubUnitId(o) : b.setFocusFormulaEditorActiveRuleSubUnitId(null);
2277
+ }, [ee, o, b]), /* @__PURE__ */ Y(pt, { children: [
2278
+ /* @__PURE__ */ S(Z, { label: v.t("dataValidation.list.options"), children: /* @__PURE__ */ Y(
2279
+ In,
2257
2280
  {
2258
2281
  value: u,
2259
2282
  onChange: (M) => {
2260
- g(M), m(h), M === "1" && A({
2261
- formula1: h === "=" ? "" : h,
2262
- formula2: b.join(",")
2283
+ h(M), m(I), M === "1" && k({
2284
+ formula1: I === "=" ? "" : I,
2285
+ formula2: g.join(",")
2263
2286
  });
2264
2287
  },
2265
2288
  children: [
2266
- /* @__PURE__ */ C(Ae, { value: "0", children: R.t("dataValidation.list.customOptions") }),
2267
- /* @__PURE__ */ C(Ae, { value: "1", children: R.t("dataValidation.list.refOptions") })
2289
+ /* @__PURE__ */ S(Ne, { value: "0", children: v.t("dataValidation.list.customOptions") }),
2290
+ /* @__PURE__ */ S(Ne, { value: "1", children: v.t("dataValidation.list.refOptions") })
2268
2291
  ]
2269
2292
  }
2270
2293
  ) }),
2271
- u === "1" ? /* @__PURE__ */ j(X, { error: L || k || void 0, children: [
2272
- /* @__PURE__ */ C(
2273
- vr,
2294
+ u === "1" ? /* @__PURE__ */ Y(Z, { error: y || P || void 0, children: [
2295
+ /* @__PURE__ */ S(
2296
+ Sr,
2274
2297
  {
2275
- ref: z,
2276
- className: ke("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Rt),
2298
+ ref: ce,
2299
+ className: Fe("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", bt),
2277
2300
  initValue: c,
2278
2301
  unitId: r,
2279
2302
  subUnitId: o,
2280
- isFocus: ge,
2303
+ isFocus: ee,
2281
2304
  isSupportAcrossSheet: !0,
2282
- onFocus: () => G(!0),
2305
+ onFocus: () => q(!0),
2283
2306
  onChange: (M = "") => {
2284
- const N = (M != null ? M : "").trim();
2285
- E(N), J(N);
2307
+ const $ = (M != null ? M : "").trim();
2308
+ D($), G($);
2286
2309
  }
2287
2310
  }
2288
2311
  ),
2289
- ie.length > 0 && /* @__PURE__ */ C("div", { className: "univer-mt-3", children: ie.map((M) => /* @__PURE__ */ C(
2290
- Fn,
2312
+ de.length > 0 && /* @__PURE__ */ S("div", { className: "univer-mt-3", children: de.map((M) => /* @__PURE__ */ S(
2313
+ Bn,
2291
2314
  {
2292
2315
  className: "univer-mb-3",
2293
2316
  item: M,
2294
- commonProps: { onItemChange: _e }
2317
+ commonProps: { onItemChange: Me }
2295
2318
  },
2296
2319
  M.id
2297
2320
  )) })
2298
- ] }) : /* @__PURE__ */ C(X, { error: L, children: /* @__PURE__ */ j("div", { className: "-univer-mt-3", children: [
2299
- /* @__PURE__ */ C(
2300
- Do,
2321
+ ] }) : /* @__PURE__ */ S(Z, { error: y, children: /* @__PURE__ */ Y("div", { className: "-univer-mt-3", children: [
2322
+ /* @__PURE__ */ S(
2323
+ Ao,
2301
2324
  {
2302
2325
  list: x,
2303
- onListChange: H,
2326
+ onListChange: te,
2304
2327
  rowHeight: 28,
2305
2328
  margin: [0, 12],
2306
2329
  draggableHandle: ".draggableHandle",
2307
- itemRender: (M) => /* @__PURE__ */ C(
2308
- Fn,
2330
+ itemRender: (M) => /* @__PURE__ */ S(
2331
+ Bn,
2309
2332
  {
2310
2333
  item: M,
2311
2334
  commonProps: {
2312
- onItemChange: q,
2313
- onItemDelete: B
2335
+ onItemChange: j,
2336
+ onItemDelete: se
2314
2337
  }
2315
2338
  },
2316
2339
  M.id
@@ -2318,54 +2341,54 @@ function wi(e) {
2318
2341
  idKey: "id"
2319
2342
  }
2320
2343
  ),
2321
- /* @__PURE__ */ j(
2344
+ /* @__PURE__ */ Y(
2322
2345
  "a",
2323
2346
  {
2324
2347
  className: "univer-text-primary univer-flex univer-w-fit univer-cursor-pointer univer-flex-row univer-items-center univer-rounded univer-p-1 univer-px-2 univer-text-sm hover:univer-bg-primary-50 dark:hover:!univer-bg-gray-800",
2325
- onClick: Ce,
2348
+ onClick: Q,
2326
2349
  children: [
2327
- /* @__PURE__ */ C(Rr, { className: "univer-mr-1" }),
2328
- R.t("dataValidation.list.add")
2350
+ /* @__PURE__ */ S(Er, { className: "univer-mr-1" }),
2351
+ v.t("dataValidation.list.add")
2329
2352
  ]
2330
2353
  }
2331
2354
  )
2332
2355
  ] }) })
2333
2356
  ] });
2334
2357
  }
2335
- const Ii = [
2358
+ const bi = [
2336
2359
  [
2337
- ir,
2338
- _i
2360
+ lr,
2361
+ wi
2339
2362
  ],
2340
2363
  [
2341
- At,
2342
- mi
2364
+ kt,
2365
+ Ci
2343
2366
  ],
2344
2367
  [
2345
- pn,
2346
- wi
2368
+ mn,
2369
+ Mi
2347
2370
  ],
2348
2371
  [
2349
- ar,
2350
- fi
2372
+ dr,
2373
+ Ii
2351
2374
  ]
2352
- ], Ri = "LIST_RENDER_MODE_OPTION_INPUT";
2353
- function Dt(e) {
2375
+ ], Ei = "LIST_RENDER_MODE_OPTION_INPUT";
2376
+ function Ot(e) {
2354
2377
  var o;
2355
- const { value: t, onChange: n } = e, r = F(de);
2356
- return /* @__PURE__ */ C(X, { label: r.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ j(_n, { value: `${(o = t.renderMode) != null ? o : ae.CUSTOM}`, onChange: (i) => n({ ...t, renderMode: +i }), children: [
2357
- /* @__PURE__ */ C(Ae, { value: `${ae.CUSTOM}`, children: r.t("dataValidation.renderMode.chip") }),
2358
- /* @__PURE__ */ C(Ae, { value: `${ae.ARROW}`, children: r.t("dataValidation.renderMode.arrow") }),
2359
- /* @__PURE__ */ C(Ae, { value: `${ae.TEXT}`, children: r.t("dataValidation.renderMode.text") })
2378
+ const { value: t, onChange: n } = e, r = F(ge);
2379
+ return /* @__PURE__ */ S(Z, { label: r.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ Y(In, { value: `${(o = t.renderMode) != null ? o : ue.CUSTOM}`, onChange: (i) => n({ ...t, renderMode: +i }), children: [
2380
+ /* @__PURE__ */ S(Ne, { value: `${ue.CUSTOM}`, children: r.t("dataValidation.renderMode.chip") }),
2381
+ /* @__PURE__ */ S(Ne, { value: `${ue.ARROW}`, children: r.t("dataValidation.renderMode.arrow") }),
2382
+ /* @__PURE__ */ S(Ne, { value: `${ue.TEXT}`, children: r.t("dataValidation.renderMode.text") })
2360
2383
  ] }) });
2361
2384
  }
2362
- Dt.componentKey = Ri;
2363
- const yi = "DATE_SHOW_TIME_OPTION";
2364
- function Vt(e) {
2385
+ Ot.componentKey = Ei;
2386
+ const Di = "DATE_SHOW_TIME_OPTION";
2387
+ function At(e) {
2365
2388
  var o;
2366
- const { value: t, onChange: n } = e, r = F(de);
2367
- return /* @__PURE__ */ C(X, { children: /* @__PURE__ */ C(
2368
- Pt,
2389
+ const { value: t, onChange: n } = e, r = F(ge);
2390
+ return /* @__PURE__ */ S(Z, { children: /* @__PURE__ */ S(
2391
+ Nt,
2369
2392
  {
2370
2393
  checked: (o = t.bizInfo) == null ? void 0 : o.showTime,
2371
2394
  onChange: (i) => {
@@ -2381,26 +2404,26 @@ function Vt(e) {
2381
2404
  }
2382
2405
  ) });
2383
2406
  }
2384
- Vt.componentKey = yi;
2385
- var Mi = Object.getOwnPropertyDescriptor, bi = (e, t, n, r) => {
2386
- for (var o = r > 1 ? void 0 : r ? Mi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2407
+ At.componentKey = Di;
2408
+ var Vi = Object.getOwnPropertyDescriptor, Ti = (e, t, n, r) => {
2409
+ for (var o = r > 1 ? void 0 : r ? Vi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2387
2410
  (a = e[i]) && (o = a(o) || o);
2388
2411
  return o;
2389
- }, We = (e, t) => (n, r) => t(n, r, e);
2390
- const ft = 6;
2391
- let on = class {
2412
+ }, Ye = (e, t) => (n, r) => t(n, r, e);
2413
+ const Ct = 6;
2414
+ let ln = class {
2392
2415
  constructor(e, t, n, r, o, i) {
2393
2416
  this._commandService = e, this._univerInstanceService = t, this._formulaService = n, this._themeService = r, this._renderManagerService = o, this._dataValidationModel = i;
2394
2417
  }
2395
2418
  _calc(e, t) {
2396
- var d, u, g;
2397
- const { vt: n, ht: r } = t || {}, o = e.endX - e.startX - ft * 2, i = e.endY - e.startY, a = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
2419
+ var d, u, h;
2420
+ const { vt: n, ht: r } = t || {}, o = e.endX - e.startX - Ct * 2, i = e.endY - e.startY, a = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
2398
2421
  let l = 0, s = 0;
2399
2422
  switch (n) {
2400
- case se.TOP:
2423
+ case he.TOP:
2401
2424
  s = 0;
2402
2425
  break;
2403
- case se.BOTTOM:
2426
+ case he.BOTTOM:
2404
2427
  s = 0 + (i - a);
2405
2428
  break;
2406
2429
  default:
@@ -2408,21 +2431,21 @@ let on = class {
2408
2431
  break;
2409
2432
  }
2410
2433
  switch (r) {
2411
- case Ie.LEFT:
2412
- l = ft;
2434
+ case Ee.LEFT:
2435
+ l = Ct;
2413
2436
  break;
2414
- case Ie.RIGHT:
2415
- l = ft + (o - a);
2437
+ case Ee.RIGHT:
2438
+ l = Ct + (o - a);
2416
2439
  break;
2417
2440
  default:
2418
- l = ft + (o - a) / 2;
2441
+ l = Ct + (o - a) / 2;
2419
2442
  break;
2420
2443
  }
2421
2444
  return {
2422
2445
  left: e.startX + l,
2423
2446
  top: e.startY + s,
2424
2447
  width: ((u = t == null ? void 0 : t.fs) != null ? u : 10) * 1.6,
2425
- height: ((g = t == null ? void 0 : t.fs) != null ? g : 10) * 1.6
2448
+ height: ((h = t == null ? void 0 : t.fs) != null ? h : 10) * 1.6
2426
2449
  };
2427
2450
  }
2428
2451
  calcCellAutoHeight(e) {
@@ -2436,25 +2459,25 @@ let on = class {
2436
2459
  return ((n = t == null ? void 0 : t.fs) != null ? n : 10) * 1.6;
2437
2460
  }
2438
2461
  async _parseFormula(e, t, n) {
2439
- var d, u, g, c, m, h, E, R, w;
2440
- const { formula1: r = io, formula2: o = oo } = e, i = await this._formulaService.getRuleFormulaResult(t, n, e.uid), a = Ft((g = (u = (d = i == null ? void 0 : i[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : g[0]), l = Ft((h = (m = (c = i == null ? void 0 : i[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : h[0]), s = Dn(String(a)) && Dn(String(l));
2462
+ var d, u, h, c, m, I, D, v, C;
2463
+ const { formula1: r = po, formula2: o = ho } = e, i = await this._formulaService.getRuleFormulaResult(t, n, e.uid), a = Bt((h = (u = (d = i == null ? void 0 : i[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Bt((I = (m = (c = i == null ? void 0 : i[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : I[0]), s = On(String(a)) && On(String(l));
2441
2464
  return {
2442
- formula1: De(r) ? Ft((w = (R = (E = i == null ? void 0 : i[0]) == null ? void 0 : E.result) == null ? void 0 : R[0]) == null ? void 0 : w[0]) : r,
2443
- formula2: De(o) ? l : o,
2465
+ formula1: Pe(r) ? Bt((C = (v = (D = i == null ? void 0 : i[0]) == null ? void 0 : D.result) == null ? void 0 : v[0]) == null ? void 0 : C[0]) : r,
2466
+ formula2: Pe(o) ? l : o,
2444
2467
  isFormulaValid: s
2445
2468
  };
2446
2469
  }
2447
2470
  drawWith(e, t) {
2448
- var L, y, T, A;
2449
- const { style: n, primaryWithCoord: r, unitId: o, subUnitId: i, worksheet: a, row: l, col: s } = t, d = r.isMergedMainCell ? r.mergeInfo : r, u = re(a.getCellRaw(l, s)), g = this._dataValidationModel.getRuleByLocation(o, i, l, s);
2450
- if (!g)
2471
+ var L, y, O, U;
2472
+ const { style: n, primaryWithCoord: r, unitId: o, subUnitId: i, worksheet: a, row: l, col: s } = t, d = r.isMergedMainCell ? r.mergeInfo : r, u = ie(a.getCellRaw(l, s)), h = this._dataValidationModel.getRuleByLocation(o, i, l, s);
2473
+ if (!h)
2451
2474
  return;
2452
- const c = this._dataValidationModel.getValidator(g.type);
2453
- if (!c || !((L = c.skipDefaultFontRender) != null && L.call(c, g, u, { unitId: o, subUnitId: i, row: l, column: s })))
2475
+ const c = this._dataValidationModel.getValidator(h.type);
2476
+ if (!c || !((L = c.skipDefaultFontRender) != null && L.call(c, h, u, { unitId: o, subUnitId: i, row: l, column: s })))
2454
2477
  return;
2455
- const m = c.parseFormulaSync(g, o, i), { formula1: h } = m, E = this._calc(d, n), { a: R, d: w } = e.getTransform(), S = Mn(E.left, R), I = Mn(E.top, w), b = jr.create().composeMatrix({
2456
- left: S,
2457
- top: I,
2478
+ const m = c.parseFormulaSync(h, o, i), { formula1: I } = m, D = this._calc(d, n), { a: v, d: C } = e.getTransform(), f = Dn(D.left, v), w = Dn(D.top, C), b = zr.create().composeMatrix({
2479
+ left: f,
2480
+ top: w,
2458
2481
  scaleX: 1,
2459
2482
  scaleY: 1,
2460
2483
  angle: 0,
@@ -2462,16 +2485,16 @@ let on = class {
2462
2485
  skewY: 0,
2463
2486
  flipX: !1,
2464
2487
  flipY: !1
2465
- }), v = d.endX - d.startX, p = d.endY - d.startY;
2466
- e.save(), e.beginPath(), e.rect(d.startX, d.startY, v, p), e.clip();
2488
+ }), g = d.endX - d.startX, p = d.endY - d.startY;
2489
+ e.save(), e.beginPath(), e.rect(d.startX, d.startY, g, p), e.clip();
2467
2490
  const _ = b.getMatrix();
2468
2491
  e.transform(_[0], _[1], _[2], _[3], _[4], _[5]);
2469
- const P = ((y = n == null ? void 0 : n.fs) != null ? y : 10) * 1.6, k = String(u) === String(h), U = this._themeService.getColorFromTheme("primary.600");
2470
- Yr.drawWith(e, {
2471
- checked: k,
2472
- width: P,
2473
- height: P,
2474
- fill: (A = (T = n == null ? void 0 : n.cl) == null ? void 0 : T.rgb) != null ? A : U
2492
+ const T = ((y = n == null ? void 0 : n.fs) != null ? y : 10) * 1.6, A = String(u) === String(I), P = this._themeService.getColorFromTheme("primary.600");
2493
+ Kr.drawWith(e, {
2494
+ checked: A,
2495
+ width: T,
2496
+ height: T,
2497
+ fill: (U = (O = n == null ? void 0 : n.cl) == null ? void 0 : O.rgb) != null ? U : P
2475
2498
  }), e.restore();
2476
2499
  }
2477
2500
  isHit(e, t) {
@@ -2479,16 +2502,16 @@ let on = class {
2479
2502
  return s <= l && s >= a && d <= i && d >= o;
2480
2503
  }
2481
2504
  async onPointerDown(e, t) {
2482
- var h;
2505
+ var I;
2483
2506
  if (t.button === 2)
2484
2507
  return;
2485
- const { primaryWithCoord: n, unitId: r, subUnitId: o, worksheet: i, row: a, col: l } = e, s = re(i.getCellRaw(a, l)), d = this._dataValidationModel.getRuleByLocation(r, o, a, l);
2508
+ const { primaryWithCoord: n, unitId: r, subUnitId: o, worksheet: i, row: a, col: l } = e, s = ie(i.getCellRaw(a, l)), d = this._dataValidationModel.getRuleByLocation(r, o, a, l);
2486
2509
  if (!d)
2487
2510
  return;
2488
2511
  const u = this._dataValidationModel.getValidator(d.type);
2489
- if (!u || !((h = u.skipDefaultFontRender) != null && h.call(u, d, s, { unitId: r, subUnitId: o, row: a, column: l })))
2512
+ if (!u || !((I = u.skipDefaultFontRender) != null && I.call(u, d, s, { unitId: r, subUnitId: o, row: a, column: l })))
2490
2513
  return;
2491
- const { formula1: g, formula2: c } = await this._parseFormula(d, r, o), m = {
2514
+ const { formula1: h, formula2: c } = await this._parseFormula(d, r, o), m = {
2492
2515
  range: {
2493
2516
  startColumn: n.actualColumn,
2494
2517
  endColumn: n.actualColumn,
@@ -2496,142 +2519,142 @@ let on = class {
2496
2519
  endRow: n.actualRow
2497
2520
  },
2498
2521
  value: {
2499
- v: String(s) === ao(String(g)) ? c : g,
2522
+ v: String(s) === go(String(h)) ? c : h,
2500
2523
  p: null
2501
2524
  }
2502
2525
  };
2503
2526
  this._commandService.executeCommand(
2504
- at.id,
2527
+ dt.id,
2505
2528
  m
2506
2529
  );
2507
2530
  }
2508
2531
  onPointerEnter(e, t) {
2509
2532
  var n, r;
2510
- (r = (n = Xe(Z.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ze.POINTER);
2533
+ (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ge.POINTER);
2511
2534
  }
2512
2535
  onPointerLeave(e, t) {
2513
2536
  var n, r;
2514
- (r = (n = Xe(Z.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ze.DEFAULT);
2537
+ (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ge.DEFAULT);
2515
2538
  }
2516
2539
  };
2517
- on = bi([
2518
- We(0, te),
2519
- We(1, le),
2520
- We(2, D(ro)),
2521
- We(3, D(Yn)),
2522
- We(4, D(Ue)),
2523
- We(5, D(oe))
2524
- ], on);
2525
- var Ei = Object.getOwnPropertyDescriptor, Di = (e, t, n, r) => {
2526
- for (var o = r > 1 ? void 0 : r ? Ei(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2540
+ ln = Ti([
2541
+ Ye(0, oe),
2542
+ Ye(1, pe),
2543
+ Ye(2, E(uo)),
2544
+ Ye(3, E(zn)),
2545
+ Ye(4, E(xe)),
2546
+ Ye(5, E(ae))
2547
+ ], ln);
2548
+ var Oi = Object.getOwnPropertyDescriptor, Ai = (e, t, n, r) => {
2549
+ for (var o = r > 1 ? void 0 : r ? Oi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2527
2550
  (a = e[i]) && (o = a(o) || o);
2528
2551
  return o;
2529
- }, Vi = (e, t) => (n, r) => t(n, r, e);
2530
- let fe = class {
2552
+ }, Pi = (e, t) => (n, r) => t(n, r, e);
2553
+ let Ce = class {
2531
2554
  constructor(e) {
2532
2555
  V(this, "canvasRender", null);
2533
2556
  V(this, "dropdownType");
2534
2557
  V(this, "optionsInput");
2535
- V(this, "formulaInput", pn);
2558
+ V(this, "formulaInput", mn);
2536
2559
  this.injector = e;
2537
2560
  }
2538
2561
  };
2539
- fe = Di([
2540
- Vi(0, D(ye))
2541
- ], fe);
2542
- class Ti extends fe {
2562
+ Ce = Ai([
2563
+ Pi(0, E(Ve))
2564
+ ], Ce);
2565
+ class Li extends Ce {
2543
2566
  constructor() {
2544
2567
  super(...arguments);
2545
- V(this, "id", Y.CHECKBOX);
2546
- V(this, "canvasRender", this.injector.createInstance(on));
2547
- V(this, "formulaInput", ar);
2568
+ V(this, "id", X.CHECKBOX);
2569
+ V(this, "canvasRender", this.injector.createInstance(ln));
2570
+ V(this, "formulaInput", dr);
2548
2571
  }
2549
2572
  }
2550
- class Oi extends fe {
2573
+ class ki extends Ce {
2551
2574
  constructor() {
2552
2575
  super(...arguments);
2553
- V(this, "id", Y.CUSTOM);
2554
- V(this, "formulaInput", ir);
2576
+ V(this, "id", X.CUSTOM);
2577
+ V(this, "formulaInput", lr);
2555
2578
  }
2556
2579
  }
2557
- const Ai = "data-validation.formula-input";
2558
- class Pi extends fe {
2580
+ const Ni = "data-validation.formula-input";
2581
+ class Ui extends Ce {
2559
2582
  constructor() {
2560
2583
  super(...arguments);
2561
- V(this, "id", Y.DATE);
2562
- V(this, "formulaInput", Ai);
2563
- V(this, "optionsInput", Vt.componentKey);
2564
- V(this, "dropdownType", pe.DATE);
2584
+ V(this, "id", X.DATE);
2585
+ V(this, "formulaInput", Ni);
2586
+ V(this, "optionsInput", At.componentKey);
2587
+ V(this, "dropdownType", fe.DATE);
2565
2588
  }
2566
2589
  }
2567
- class Li extends fe {
2590
+ class Fi extends Ce {
2568
2591
  constructor() {
2569
2592
  super(...arguments);
2570
- V(this, "id", Y.DECIMAL);
2571
- V(this, "formulaInput", At);
2593
+ V(this, "id", X.DECIMAL);
2594
+ V(this, "formulaInput", kt);
2572
2595
  }
2573
2596
  }
2574
- const br = 4, ki = 0, Ht = 4, Er = 4, an = 6, Tt = 6, Ee = 14;
2575
- function Ni(e, t) {
2576
- const n = Xr.getTextSize(e, t), r = n.width + br * 2, { ba: o, bd: i } = n, a = o + i;
2597
+ const Tr = 4, $i = 0, Xt = 4, Or = 4, dn = 6, Pt = 6, Ae = 14;
2598
+ function xi(e, t) {
2599
+ const n = Gr.getTextSize(e, t), r = n.width + Tr * 2, { ba: o, bd: i } = n, a = o + i;
2577
2600
  return {
2578
2601
  width: r,
2579
- height: a + ki * 2,
2602
+ height: a + $i * 2,
2580
2603
  ba: o
2581
2604
  };
2582
2605
  }
2583
- function jt(e, t, n, r) {
2584
- const o = Ee + an * 2, i = n - o, a = r - Tt * 2, l = e.map((c) => ({
2585
- layout: Ni(c, t),
2606
+ function Zt(e, t, n, r) {
2607
+ const o = Ae + dn * 2, i = n - o, a = r - Pt * 2, l = e.map((c) => ({
2608
+ layout: xi(c, t),
2586
2609
  text: c
2587
2610
  }));
2588
2611
  let s;
2589
2612
  const d = [];
2590
2613
  l.forEach((c) => {
2591
- const { layout: m } = c, { width: h, height: E } = m;
2592
- !s || s.width + h + Ht > i ? (s = {
2593
- width: h,
2594
- height: E,
2614
+ const { layout: m } = c, { width: I, height: D } = m;
2615
+ !s || s.width + I + Xt > i ? (s = {
2616
+ width: I,
2617
+ height: D,
2595
2618
  items: [{
2596
2619
  ...c,
2597
2620
  left: 0
2598
2621
  }]
2599
2622
  }, d.push(s)) : (s.items.push({
2600
2623
  ...c,
2601
- left: s.width + Ht
2602
- }), s.width = s.width + h + Ht);
2624
+ left: s.width + Xt
2625
+ }), s.width = s.width + I + Xt);
2603
2626
  });
2604
- let u = 0, g = 0;
2627
+ let u = 0, h = 0;
2605
2628
  return d.forEach((c, m) => {
2606
- g = Math.max(g, c.width), m === d.length - 1 ? u += c.height : u += c.height + Er;
2629
+ h = Math.max(h, c.width), m === d.length - 1 ? u += c.height : u += c.height + Or;
2607
2630
  }), {
2608
2631
  lines: d,
2609
2632
  totalHeight: u,
2610
2633
  contentWidth: i,
2611
2634
  contentHeight: a,
2612
- cellAutoHeight: u + Tt * 2,
2613
- calcAutoWidth: g + o
2635
+ cellAutoHeight: u + Pt * 2,
2636
+ calcAutoWidth: h + o
2614
2637
  };
2615
2638
  }
2616
- const Ui = 8;
2617
- class Fi extends Zr {
2639
+ const Bi = 8;
2640
+ class Wi extends qr {
2618
2641
  static drawWith(t, n) {
2619
2642
  const { fontString: r, info: o, fill: i, color: a } = n, { layout: l, text: s } = o;
2620
- t.save(), zn.drawWith(t, {
2643
+ t.save(), qn.drawWith(t, {
2621
2644
  width: l.width,
2622
2645
  height: l.height,
2623
- radius: Ui,
2624
- fill: i || Te
2625
- }), t.translateWithPrecision(br, l.ba), t.font = r, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
2646
+ radius: Bi,
2647
+ fill: i || ke
2648
+ }), t.translateWithPrecision(Tr, l.ba), t.font = r, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
2626
2649
  }
2627
2650
  }
2628
- var $i = Object.getOwnPropertyDescriptor, xi = (e, t, n, r) => {
2629
- for (var o = r > 1 ? void 0 : r ? $i(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2651
+ var Hi = Object.getOwnPropertyDescriptor, ji = (e, t, n, r) => {
2652
+ for (var o = r > 1 ? void 0 : r ? Hi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2630
2653
  (a = e[i]) && (o = a(o) || o);
2631
2654
  return o;
2632
- }, _t = (e, t) => (n, r) => t(n, r, e);
2633
- const Bi = 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");
2634
- let sn = class {
2655
+ }, It = (e, t) => (n, r) => t(n, r, e);
2656
+ const Yi = 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");
2657
+ let cn = class {
2635
2658
  constructor(e, t, n, r) {
2636
2659
  V(this, "zIndex");
2637
2660
  V(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
@@ -2645,105 +2668,105 @@ let sn = class {
2645
2668
  return `${e}.${t}`;
2646
2669
  }
2647
2670
  _drawDownIcon(e, t, n, r, o) {
2648
- const i = n - Ee + 4;
2671
+ const i = n - Ae + 4;
2649
2672
  let a = 4;
2650
2673
  switch (o) {
2651
- case se.MIDDLE:
2652
- a = (r - Ee) / 2 + 4;
2674
+ case he.MIDDLE:
2675
+ a = (r - Ae) / 2 + 4;
2653
2676
  break;
2654
- case se.BOTTOM:
2655
- a = r - Ee + 4;
2677
+ case he.BOTTOM:
2678
+ a = r - Ae + 4;
2656
2679
  break;
2657
2680
  }
2658
- e.save(), e.translateWithPrecision(t.startX + i, t.startY + a), e.fillStyle = "#565656", e.fill(Bi), e.restore();
2681
+ e.save(), e.translateWithPrecision(t.startX + i, t.startY + a), e.fillStyle = "#565656", e.fill(Yi), e.restore();
2659
2682
  }
2660
2683
  // eslint-disable-next-line max-lines-per-function
2661
2684
  drawWith(e, t, n, r) {
2662
- var ie, _e;
2663
- const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: d } = t, u = o.isMergedMainCell ? o.mergeInfo : o, g = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: m = 0, topOffset: h = 0, downOffset: E = 0 } = g || {}, R = this._ensureMap(d), w = this._generateKey(i, a), S = o.isMergedMainCell ? o.mergeInfo.startRow : i, I = o.isMergedMainCell ? o.mergeInfo.startColumn : a, b = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, S, I);
2685
+ var le, de;
2686
+ const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: d } = t, u = o.isMergedMainCell ? o.mergeInfo : o, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: m = 0, topOffset: I = 0, downOffset: D = 0 } = h || {}, v = this._ensureMap(d), C = this._generateKey(i, a), f = o.isMergedMainCell ? o.mergeInfo.startRow : i, w = o.isMergedMainCell ? o.mergeInfo.startColumn : a, b = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, f, w);
2664
2687
  if (!b)
2665
2688
  return;
2666
- const v = this._dataValidationModel.getValidator(b.type);
2667
- if (!v)
2689
+ const g = this._dataValidationModel.getValidator(b.type);
2690
+ if (!g)
2668
2691
  return;
2669
2692
  const p = {
2670
2693
  startX: u.startX + c,
2671
2694
  endX: u.endX - m,
2672
- startY: u.startY + h,
2673
- endY: u.endY - E
2674
- }, _ = p.endX - p.startX, P = p.endY - p.startY, { cl: k } = l || {}, U = (ie = typeof k == "object" ? k == null ? void 0 : k.rgb : k) != null ? ie : "#000", L = Ve(l != null ? l : void 0), { vt: y, ht: T } = l || {}, A = y != null ? y : se.MIDDLE, x = (_e = re(s)) != null ? _e : "", H = v.parseCellValue(x), q = v.getListWithColorMap(b), B = jt(H, L, _, P);
2675
- this._drawDownIcon(e, p, _, P, A), e.save(), e.translateWithPrecision(p.startX, p.startY), e.beginPath(), e.rect(0, 0, _ - Ee, P), e.clip(), e.translateWithPrecision(an, Tt);
2676
- let ne = 0;
2677
- switch (A) {
2678
- case se.MIDDLE:
2679
- ne = (B.contentHeight - B.totalHeight) / 2;
2695
+ startY: u.startY + I,
2696
+ endY: u.endY - D
2697
+ }, _ = p.endX - p.startX, T = p.endY - p.startY, { cl: A } = l || {}, P = (le = typeof A == "object" ? A == null ? void 0 : A.rgb : A) != null ? le : "#000", L = Le(l != null ? l : void 0), { vt: y, ht: O } = l || {}, U = y != null ? y : he.MIDDLE, k = (de = ie(s)) != null ? de : "", x = g.parseCellValue(k), te = g.getListWithColorMap(b), j = Zt(x, L, _, T);
2698
+ this._drawDownIcon(e, p, _, T, U), e.save(), e.translateWithPrecision(p.startX, p.startY), e.beginPath(), e.rect(0, 0, _ - Ae, T), e.clip(), e.translateWithPrecision(dn, Pt);
2699
+ let se = 0;
2700
+ switch (U) {
2701
+ case he.MIDDLE:
2702
+ se = (j.contentHeight - j.totalHeight) / 2;
2680
2703
  break;
2681
- case se.BOTTOM:
2682
- ne = B.contentHeight - B.totalHeight;
2704
+ case he.BOTTOM:
2705
+ se = j.contentHeight - j.totalHeight;
2683
2706
  break;
2684
2707
  }
2685
- e.translateWithPrecision(0, ne), B.lines.forEach((Ce, J) => {
2708
+ e.translateWithPrecision(0, se), j.lines.forEach((Me, Q) => {
2686
2709
  e.save();
2687
- const { width: z, height: ge, items: G } = Ce;
2688
- let M = 0;
2689
- switch (T) {
2690
- case Ie.RIGHT:
2691
- M = B.contentWidth - z;
2710
+ const { width: G, height: ce, items: ee } = Me;
2711
+ let q = 0;
2712
+ switch (O) {
2713
+ case Ee.RIGHT:
2714
+ q = j.contentWidth - G;
2692
2715
  break;
2693
- case Ie.CENTER:
2694
- M = (B.contentWidth - z) / 2;
2716
+ case Ee.CENTER:
2717
+ q = (j.contentWidth - G) / 2;
2695
2718
  break;
2696
2719
  }
2697
- e.translate(M, J * (ge + Er)), G.forEach((N) => {
2698
- e.save(), e.translateWithPrecision(N.left, 0), Fi.drawWith(e, {
2720
+ e.translate(q, Q * (ce + Or)), ee.forEach((M) => {
2721
+ e.save(), e.translateWithPrecision(M.left, 0), Wi.drawWith(e, {
2699
2722
  ...L,
2700
- info: N,
2701
- color: U,
2702
- fill: q[N.text]
2723
+ info: M,
2724
+ color: P,
2725
+ fill: te[M.text]
2703
2726
  }), e.restore();
2704
2727
  }), e.restore();
2705
- }), e.restore(), R.set(w, {
2728
+ }), e.restore(), v.set(C, {
2706
2729
  left: p.startX,
2707
2730
  top: p.startY,
2708
- width: B.contentWidth + an + Ee,
2709
- height: B.contentHeight + Tt * 2
2731
+ width: j.contentWidth + dn + Ae,
2732
+ height: j.contentHeight + Pt * 2
2710
2733
  });
2711
2734
  }
2712
2735
  calcCellAutoHeight(e) {
2713
- var v;
2714
- const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = r == null ? void 0 : r.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, g = t.isMergedMainCell ? t.mergeInfo : t, c = {
2715
- startX: g.startX + l,
2716
- endX: g.endX - s,
2717
- startY: g.startY + d,
2718
- endY: g.endY - u
2736
+ var g;
2737
+ const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = r == null ? void 0 : r.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, h = t.isMergedMainCell ? t.mergeInfo : t, c = {
2738
+ startX: h.startX + l,
2739
+ endX: h.endX - s,
2740
+ startY: h.startY + d,
2741
+ endY: h.endY - u
2719
2742
  }, m = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2720
2743
  if (!m)
2721
2744
  return;
2722
- const h = this._dataValidationModel.getValidator(m.type);
2723
- if (!h)
2745
+ const I = this._dataValidationModel.getValidator(m.type);
2746
+ if (!I)
2724
2747
  return;
2725
- const E = c.endX - c.startX, R = c.endY - c.startY, w = (v = re(r)) != null ? v : "", S = h.parseCellValue(w), I = Ve(n != null ? n : void 0);
2726
- return jt(S, I, E, R).cellAutoHeight;
2748
+ const D = c.endX - c.startX, v = c.endY - c.startY, C = (g = ie(r)) != null ? g : "", f = I.parseCellValue(C), w = Le(n != null ? n : void 0);
2749
+ return Zt(f, w, D, v).cellAutoHeight;
2727
2750
  }
2728
2751
  calcCellAutoWidth(e) {
2729
- var v;
2730
- const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = r == null ? void 0 : r.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, g = t.isMergedMainCell ? t.mergeInfo : t, c = {
2731
- startX: g.startX + l,
2732
- endX: g.endX - s,
2733
- startY: g.startY + d,
2734
- endY: g.endY - u
2752
+ var g;
2753
+ const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = r == null ? void 0 : r.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, h = t.isMergedMainCell ? t.mergeInfo : t, c = {
2754
+ startX: h.startX + l,
2755
+ endX: h.endX - s,
2756
+ startY: h.startY + d,
2757
+ endY: h.endY - u
2735
2758
  }, m = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2736
2759
  if (!m)
2737
2760
  return;
2738
- const h = this._dataValidationModel.getValidator(m.type);
2739
- if (!h)
2761
+ const I = this._dataValidationModel.getValidator(m.type);
2762
+ if (!I)
2740
2763
  return;
2741
- const E = c.endX - c.startX, R = c.endY - c.startY, w = (v = re(r)) != null ? v : "", S = h.parseCellValue(w), I = Ve(n != null ? n : void 0);
2742
- return jt(S, I, E, R).calcAutoWidth;
2764
+ const D = c.endX - c.startX, v = c.endY - c.startY, C = (g = ie(r)) != null ? g : "", f = I.parseCellValue(C), w = Le(n != null ? n : void 0);
2765
+ return Zt(f, w, D, v).calcAutoWidth;
2743
2766
  }
2744
2767
  isHit(e, t) {
2745
2768
  const { primaryWithCoord: n } = t, r = n.isMergedMainCell ? n.mergeInfo : n, { endX: o } = r, { x: i } = e;
2746
- return i >= o - Ee && i <= o;
2769
+ return i >= o - Ae && i <= o;
2747
2770
  }
2748
2771
  onPointerDown(e, t) {
2749
2772
  if (t.button === 2)
@@ -2754,67 +2777,67 @@ let sn = class {
2754
2777
  row: o,
2755
2778
  column: i
2756
2779
  };
2757
- this._commandService.executeCommand(Lt.id, a);
2780
+ this._commandService.executeCommand(Ut.id, a);
2758
2781
  }
2759
2782
  onPointerEnter(e, t) {
2760
2783
  var n, r;
2761
- return (r = (n = Xe(Z.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(Ze.POINTER);
2784
+ return (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(Ge.POINTER);
2762
2785
  }
2763
2786
  onPointerLeave(e, t) {
2764
2787
  var n, r;
2765
- return (r = (n = Xe(Z.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(Ze.DEFAULT);
2788
+ return (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(Ge.DEFAULT);
2766
2789
  }
2767
2790
  };
2768
- sn = xi([
2769
- _t(0, te),
2770
- _t(1, le),
2771
- _t(2, D(Ue)),
2772
- _t(3, D(oe))
2773
- ], sn);
2774
- class Wi extends fe {
2791
+ cn = ji([
2792
+ It(0, oe),
2793
+ It(1, pe),
2794
+ It(2, E(xe)),
2795
+ It(3, E(ae))
2796
+ ], cn);
2797
+ class Xi extends Ce {
2775
2798
  constructor() {
2776
2799
  super(...arguments);
2777
- V(this, "id", Y.LIST_MULTIPLE);
2778
- V(this, "canvasRender", this.injector.createInstance(sn));
2779
- V(this, "dropdownType", pe.MULTIPLE_LIST);
2800
+ V(this, "id", X.LIST_MULTIPLE);
2801
+ V(this, "canvasRender", this.injector.createInstance(cn));
2802
+ V(this, "dropdownType", fe.MULTIPLE_LIST);
2780
2803
  }
2781
2804
  }
2782
- var Hi = Object.getOwnPropertyDescriptor, ji = (e, t, n, r) => {
2783
- for (var o = r > 1 ? void 0 : r ? Hi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2805
+ var Zi = Object.getOwnPropertyDescriptor, zi = (e, t, n, r) => {
2806
+ for (var o = r > 1 ? void 0 : r ? Zi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2784
2807
  (a = e[i]) && (o = a(o) || o);
2785
2808
  return o;
2786
- }, it = (e, t) => (n, r) => t(n, r, e);
2787
- const He = 4, Ct = 4, he = 14, Yt = 1, Se = 6, je = 3, Xt = 8, Yi = "#565656", $n = 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");
2788
- function xn(e, t, n, r, o, i, a = !0) {
2809
+ }, lt = (e, t) => (n, r) => t(n, r, e);
2810
+ const Xe = 4, wt = 4, me = 14, zt = 1, we = 6, Ze = 3, Kt = 8, Ki = "#565656", Wn = 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");
2811
+ function Hn(e, t, n, r, o, i, a = !0) {
2789
2812
  let l = 0;
2790
- const s = a ? je : 0;
2813
+ const s = a ? Ze : 0;
2791
2814
  switch (o) {
2792
- case se.BOTTOM:
2815
+ case he.BOTTOM:
2793
2816
  l = t - r - s;
2794
2817
  break;
2795
- case se.MIDDLE:
2818
+ case he.MIDDLE:
2796
2819
  l = (t - r) / 2;
2797
2820
  break;
2798
2821
  default:
2799
2822
  l = s;
2800
2823
  break;
2801
2824
  }
2802
- l = Math.max(je, l);
2825
+ l = Math.max(Ze, l);
2803
2826
  let d = 0;
2804
2827
  switch (i) {
2805
- case Ie.CENTER:
2828
+ case Ee.CENTER:
2806
2829
  d = (e - n) / 2;
2807
2830
  break;
2808
- case Ie.RIGHT:
2831
+ case Ee.RIGHT:
2809
2832
  d = e - n;
2810
2833
  break;
2811
2834
  }
2812
- return d = Math.max(Se, d), {
2835
+ return d = Math.max(we, d), {
2813
2836
  paddingLeft: d,
2814
2837
  paddingTop: l
2815
2838
  };
2816
2839
  }
2817
- let ln = class {
2840
+ let un = class {
2818
2841
  constructor(e, t, n, r, o) {
2819
2842
  V(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2820
2843
  V(this, "zIndex");
@@ -2828,174 +2851,174 @@ let ln = class {
2828
2851
  return `${e}.${t}`;
2829
2852
  }
2830
2853
  _drawDownIcon(e, t, n, r, o, i, a) {
2831
- const { t: l = ee.pd.t, b: s = ee.pd.b } = a, d = n - he;
2854
+ const { t: l = re.pd.t, b: s = re.pd.b } = a, d = n - me;
2832
2855
  let u;
2833
2856
  switch (i) {
2834
- case se.MIDDLE:
2835
- u = (r - Ct) / 2;
2857
+ case he.MIDDLE:
2858
+ u = (r - wt) / 2;
2836
2859
  break;
2837
- case se.BOTTOM:
2838
- u = r - s - o - je + (o / 2 - Ct / 2);
2860
+ case he.BOTTOM:
2861
+ u = r - s - o - Ze + (o / 2 - wt / 2);
2839
2862
  break;
2840
2863
  default:
2841
- u = l + je + (o / 2 - Ct / 2);
2864
+ u = l + Ze + (o / 2 - wt / 2);
2842
2865
  break;
2843
2866
  }
2844
- e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill($n), e.restore();
2867
+ e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill(Wn), e.restore();
2845
2868
  }
2846
2869
  // eslint-disable-next-line max-lines-per-function, complexity
2847
2870
  drawWith(e, t, n) {
2848
- var q, B, ne, ie, _e, Ce;
2849
- const { primaryWithCoord: r, row: o, col: i, style: a, data: l, subUnitId: s } = t, d = r.isMergedMainCell ? r.mergeInfo : r, u = r.isMergedMainCell ? r.mergeInfo.startRow : o, g = r.isMergedMainCell ? r.mergeInfo.startColumn : i, c = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, u, g);
2871
+ var te, j, se, le, de, Me;
2872
+ const { primaryWithCoord: r, row: o, col: i, style: a, data: l, subUnitId: s } = t, d = r.isMergedMainCell ? r.mergeInfo : r, u = r.isMergedMainCell ? r.mergeInfo.startRow : o, h = r.isMergedMainCell ? r.mergeInfo.startColumn : i, c = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, u, h);
2850
2873
  if (!c)
2851
2874
  return;
2852
2875
  const m = this._dataValidationModel.getValidator(c.type);
2853
2876
  if (!m)
2854
2877
  return;
2855
- const h = l == null ? void 0 : l.fontRenderExtension, { leftOffset: E = 0, rightOffset: R = 0, topOffset: w = 0, downOffset: S = 0 } = h || {};
2856
- if (!c || !m || !m || m.id.indexOf(Y.LIST) !== 0 || !m.skipDefaultFontRender(c))
2878
+ const I = l == null ? void 0 : l.fontRenderExtension, { leftOffset: D = 0, rightOffset: v = 0, topOffset: C = 0, downOffset: f = 0 } = I || {};
2879
+ if (!c || !m || !m || m.id.indexOf(X.LIST) !== 0 || !m.skipDefaultFontRender(c))
2857
2880
  return;
2858
- const I = {
2859
- startX: d.startX + E,
2860
- endX: d.endX - R,
2861
- startY: d.startY + w,
2862
- endY: d.endY - S
2863
- }, b = I.endX - I.startX, v = I.endY - I.startY, p = this._ensureMap(s), _ = this._generateKey(o, i), P = m.getListWithColorMap(c), k = re(l), U = `${k != null ? k : ""}`, L = P[U];
2864
- let { tb: y, vt: T, ht: A, pd: x } = a || {};
2865
- y = y != null ? y : ve.WRAP, T = T != null ? T : se.BOTTOM, A = A != null ? A : ee.ht, x = x != null ? x : ee.pd;
2866
- const H = Ve(a).fontCache;
2867
- if (c.renderMode === ae.ARROW) {
2868
- const { l: J = ee.pd.l, t: z = ee.pd.t, r: ge = ee.pd.r, b: G = ee.pd.b } = x, M = b - J - ge - he - 4, N = new rt(
2869
- U,
2870
- H,
2871
- y === ve.WRAP,
2872
- M,
2881
+ const w = {
2882
+ startX: d.startX + D,
2883
+ endX: d.endX - v,
2884
+ startY: d.startY + C,
2885
+ endY: d.endY - f
2886
+ }, b = w.endX - w.startX, g = w.endY - w.startY, p = this._ensureMap(s), _ = this._generateKey(o, i), T = m.getListWithColorMap(c), A = ie(l), P = `${A != null ? A : ""}`, L = T[P];
2887
+ let { tb: y, vt: O, ht: U, pd: k } = a || {};
2888
+ y = y != null ? y : Se.WRAP, O = O != null ? O : he.BOTTOM, U = U != null ? U : re.ht, k = k != null ? k : re.pd;
2889
+ const x = Le(a).fontCache;
2890
+ if (c.renderMode === ue.ARROW) {
2891
+ const { l: Q = re.pd.l, t: G = re.pd.t, r: ce = re.pd.r, b: ee = re.pd.b } = k, q = b - Q - ce - me - 4, M = new at(
2892
+ P,
2893
+ x,
2894
+ y === Se.WRAP,
2895
+ q,
2873
2896
  1 / 0
2874
2897
  );
2875
- N.calculate();
2876
- const f = N.getTotalWidth(), O = N.getTotalHeight(), { paddingTop: $, paddingLeft: ce } = xn(M, v - z - G, f, O, T, A, !0);
2877
- this._drawDownIcon(e, I, b, v, O, T, x), e.save(), e.translateWithPrecision(I.startX + J, I.startY + z), e.beginPath(), e.rect(0, 0, b - J - ge, v - z - G), e.clip(), e.translateWithPrecision(0, $), e.save(), e.translateWithPrecision(ce, 0), e.beginPath(), e.rect(0, 0, M, O), e.clip(), bn.drawWith(e, {
2878
- text: U,
2879
- fontStyle: H,
2880
- width: M,
2881
- height: O,
2882
- color: (q = a == null ? void 0 : a.cl) == null ? void 0 : q.rgb,
2883
- strokeLine: !!((B = a == null ? void 0 : a.st) != null && B.s),
2884
- underline: !!((ne = a == null ? void 0 : a.ul) != null && ne.s),
2885
- warp: y === ve.WRAP,
2886
- hAlign: Ie.LEFT
2887
- }, N), e.restore(), e.restore(), p.set(_, {
2888
- left: I.endX - he + n.rowHeaderWidth,
2889
- top: I.startY + z + n.columnHeaderHeight,
2890
- width: he,
2891
- height: v - z - G
2898
+ M.calculate();
2899
+ const $ = M.getTotalWidth(), N = M.getTotalHeight(), { paddingTop: J, paddingLeft: R } = Hn(q, g - G - ee, $, N, O, U, !0);
2900
+ this._drawDownIcon(e, w, b, g, N, O, k), e.save(), e.translateWithPrecision(w.startX + Q, w.startY + G), e.beginPath(), e.rect(0, 0, b - Q - ce, g - G - ee), e.clip(), e.translateWithPrecision(0, J), e.save(), e.translateWithPrecision(R, 0), e.beginPath(), e.rect(0, 0, q, N), e.clip(), Vn.drawWith(e, {
2901
+ text: P,
2902
+ fontStyle: x,
2903
+ width: q,
2904
+ height: N,
2905
+ color: (te = a == null ? void 0 : a.cl) == null ? void 0 : te.rgb,
2906
+ strokeLine: !!((j = a == null ? void 0 : a.st) != null && j.s),
2907
+ underline: !!((se = a == null ? void 0 : a.ul) != null && se.s),
2908
+ warp: y === Se.WRAP,
2909
+ hAlign: Ee.LEFT
2910
+ }, M), e.restore(), e.restore(), p.set(_, {
2911
+ left: w.endX - me + n.rowHeaderWidth,
2912
+ top: w.startY + G + n.columnHeaderHeight,
2913
+ width: me,
2914
+ height: g - G - ee
2892
2915
  });
2893
2916
  } else {
2894
- e.save(), e.translateWithPrecision(I.startX, I.startY), e.beginPath(), e.rect(0, 0, b, v), e.clip();
2895
- const J = b - Se * 2 - He - he - 4, z = new rt(
2896
- U,
2897
- H,
2898
- y === ve.WRAP,
2899
- J,
2917
+ e.save(), e.translateWithPrecision(w.startX, w.startY), e.beginPath(), e.rect(0, 0, b, g), e.clip();
2918
+ const Q = b - we * 2 - Xe - me - 4, G = new at(
2919
+ P,
2920
+ x,
2921
+ y === Se.WRAP,
2922
+ Q,
2900
2923
  1 / 0
2901
2924
  );
2902
- z.calculate();
2903
- const ge = z.getTotalWidth(), G = z.getTotalHeight(), M = G + Yt * 2, N = Math.max(b - Se * 2, 1), { paddingTop: f } = xn(N, v, ge, M, T, A);
2904
- e.translateWithPrecision(Se, f), zn.drawWith(e, {
2905
- width: N,
2906
- height: M,
2907
- fill: L || Te,
2908
- radius: Xt
2909
- }), e.save(), e.translateWithPrecision(He, Yt), e.beginPath(), e.rect(0, 0, J, G), e.clip(), bn.drawWith(e, {
2910
- text: U,
2911
- fontStyle: H,
2912
- width: J,
2913
- height: G,
2914
- color: (ie = a == null ? void 0 : a.cl) == null ? void 0 : ie.rgb,
2915
- strokeLine: !!((_e = a == null ? void 0 : a.st) != null && _e.s),
2916
- underline: !!((Ce = a == null ? void 0 : a.ul) != null && Ce.s),
2917
- warp: y === ve.WRAP,
2918
- hAlign: Ie.LEFT
2919
- }, z), e.restore(), e.translateWithPrecision(J + He + 4, (G - Ct) / 2), e.fillStyle = Yi, e.fill($n), e.restore(), p.set(_, {
2920
- left: I.startX + Se + n.rowHeaderWidth,
2921
- top: I.startY + f + n.columnHeaderHeight,
2922
- width: N,
2923
- height: M
2925
+ G.calculate();
2926
+ const ce = G.getTotalWidth(), ee = G.getTotalHeight(), q = ee + zt * 2, M = Math.max(b - we * 2, 1), { paddingTop: $ } = Hn(M, g, ce, q, O, U);
2927
+ e.translateWithPrecision(we, $), qn.drawWith(e, {
2928
+ width: M,
2929
+ height: q,
2930
+ fill: L || ke,
2931
+ radius: Kt
2932
+ }), e.save(), e.translateWithPrecision(Xe, zt), e.beginPath(), e.rect(0, 0, Q, ee), e.clip(), Vn.drawWith(e, {
2933
+ text: P,
2934
+ fontStyle: x,
2935
+ width: Q,
2936
+ height: ee,
2937
+ color: (le = a == null ? void 0 : a.cl) == null ? void 0 : le.rgb,
2938
+ strokeLine: !!((de = a == null ? void 0 : a.st) != null && de.s),
2939
+ underline: !!((Me = a == null ? void 0 : a.ul) != null && Me.s),
2940
+ warp: y === Se.WRAP,
2941
+ hAlign: Ee.LEFT
2942
+ }, G), e.restore(), e.translateWithPrecision(Q + Xe + 4, (ee - wt) / 2), e.fillStyle = Ki, e.fill(Wn), e.restore(), p.set(_, {
2943
+ left: w.startX + we + n.rowHeaderWidth,
2944
+ top: w.startY + $ + n.columnHeaderHeight,
2945
+ width: M,
2946
+ height: q
2924
2947
  });
2925
2948
  }
2926
2949
  }
2927
2950
  calcCellAutoHeight(e) {
2928
- const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = r == null ? void 0 : r.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: g = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2929
- if (!c || c.renderMode === ae.TEXT)
2951
+ const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = r == null ? void 0 : r.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2952
+ if (!c || c.renderMode === ue.TEXT)
2930
2953
  return;
2931
2954
  const m = {
2932
2955
  startX: a.startX + s,
2933
2956
  endX: a.endX - d,
2934
2957
  startY: a.startY + u,
2935
- endY: a.endY - g
2936
- }, h = m.endX - m.startX, E = re(r), R = `${E != null ? E : ""}`;
2937
- let { tb: w, pd: S } = n || {};
2938
- const { t: I = ee.pd.t, b = ee.pd.b } = S != null ? S : {};
2939
- if (w = w != null ? w : ve.WRAP, c.renderMode === ae.ARROW) {
2940
- const { l: v = ee.pd.l, r: p = ee.pd.r } = S != null ? S : {}, _ = h - v - p - he - 4, P = new rt(
2941
- R,
2942
- Ve(n).fontCache,
2943
- w === ve.WRAP,
2958
+ endY: a.endY - h
2959
+ }, I = m.endX - m.startX, D = ie(r), v = `${D != null ? D : ""}`;
2960
+ let { tb: C, pd: f } = n || {};
2961
+ const { t: w = re.pd.t, b = re.pd.b } = f != null ? f : {};
2962
+ if (C = C != null ? C : Se.WRAP, c.renderMode === ue.ARROW) {
2963
+ const { l: g = re.pd.l, r: p = re.pd.r } = f != null ? f : {}, _ = I - g - p - me - 4, T = new at(
2964
+ v,
2965
+ Le(n).fontCache,
2966
+ C === Se.WRAP,
2944
2967
  _,
2945
2968
  1 / 0
2946
2969
  );
2947
- return P.calculate(), P.getTotalHeight() + I + b + je * 2;
2970
+ return T.calculate(), T.getTotalHeight() + w + b + Ze * 2;
2948
2971
  } else {
2949
- const v = Math.max(h - Se * 2 - He - he - 4, 10), p = new rt(
2950
- R,
2951
- Ve(n).fontCache,
2952
- w === ve.WRAP,
2972
+ const g = Math.max(I - we * 2 - Xe - me - 4, 10), p = new at(
2953
2973
  v,
2974
+ Le(n).fontCache,
2975
+ C === Se.WRAP,
2976
+ g,
2954
2977
  1 / 0
2955
2978
  );
2956
- return p.calculate(), p.getTotalHeight() + je * 2 + Yt * 2;
2979
+ return p.calculate(), p.getTotalHeight() + Ze * 2 + zt * 2;
2957
2980
  }
2958
2981
  }
2959
2982
  calcCellAutoWidth(e) {
2960
- const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = r == null ? void 0 : r.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: g = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2961
- if (!c || c.renderMode === ae.TEXT)
2983
+ const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = r == null ? void 0 : r.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2984
+ if (!c || c.renderMode === ue.TEXT)
2962
2985
  return;
2963
2986
  const m = {
2964
2987
  startX: a.startX + s,
2965
2988
  endX: a.endX - d,
2966
2989
  startY: a.startY + u,
2967
- endY: a.endY - g
2968
- }, h = m.endX - m.startX, E = re(r), R = `${E != null ? E : ""}`;
2969
- let { tb: w, pd: S } = n || {};
2970
- const { l: I = ee.pd.l, r: b = ee.pd.r } = S != null ? S : {};
2971
- w = w != null ? w : ve.WRAP;
2972
- let v = Se * 2 + he;
2990
+ endY: a.endY - h
2991
+ }, I = m.endX - m.startX, D = ie(r), v = `${D != null ? D : ""}`;
2992
+ let { tb: C, pd: f } = n || {};
2993
+ const { l: w = re.pd.l, r: b = re.pd.r } = f != null ? f : {};
2994
+ C = C != null ? C : Se.WRAP;
2995
+ let g = we * 2 + me;
2973
2996
  switch (c.renderMode) {
2974
- case ae.ARROW:
2975
- v = he + 4 + b + I;
2997
+ case ue.ARROW:
2998
+ g = me + 4 + b + w;
2976
2999
  break;
2977
- case ae.CUSTOM:
2978
- v = he + Se * 2 + He * 2 + b + I + Xt / 2 + 1;
3000
+ case ue.CUSTOM:
3001
+ g = me + we * 2 + Xe * 2 + b + w + Kt / 2 + 1;
2979
3002
  break;
2980
3003
  // default is CUSTOM
2981
3004
  default:
2982
- v = he + Se * 2 + He * 2 + b + I + Xt / 2 + 1;
3005
+ g = me + we * 2 + Xe * 2 + b + w + Kt / 2 + 1;
2983
3006
  }
2984
- const p = h - v, _ = new rt(
2985
- R,
2986
- Ve(n).fontCache,
2987
- w === ve.WRAP,
3007
+ const p = I - g, _ = new at(
3008
+ v,
3009
+ Le(n).fontCache,
3010
+ C === Se.WRAP,
2988
3011
  p,
2989
3012
  1 / 0
2990
3013
  );
2991
- return _.calculate(), _.getTotalWidth() + v;
3014
+ return _.calculate(), _.getTotalWidth() + g;
2992
3015
  }
2993
3016
  isHit(e, t) {
2994
3017
  const { subUnitId: n, row: r, col: o } = t, a = this._ensureMap(n).get(this._generateKey(r, o)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, r, o);
2995
- if (!l || !a || l.renderMode === ae.TEXT)
3018
+ if (!l || !a || l.renderMode === ue.TEXT)
2996
3019
  return !1;
2997
- const { top: s, left: d, width: u, height: g } = a, { x: c, y: m } = e;
2998
- return c >= d && c <= d + u && m >= s && m <= s + g;
3020
+ const { top: s, left: d, width: u, height: h } = a, { x: c, y: m } = e;
3021
+ return c >= d && c <= d + u && m >= s && m <= s + h;
2999
3022
  }
3000
3023
  onPointerDown(e, t) {
3001
3024
  if (t.button === 2)
@@ -3006,64 +3029,64 @@ let ln = class {
3006
3029
  row: o,
3007
3030
  column: i
3008
3031
  };
3009
- this._commandService.executeCommand(Lt.id, a);
3032
+ this._commandService.executeCommand(Ut.id, a);
3010
3033
  }
3011
3034
  onPointerEnter(e, t) {
3012
3035
  var n, r;
3013
- (r = (n = Xe(Z.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ze.POINTER);
3036
+ (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ge.POINTER);
3014
3037
  }
3015
3038
  onPointerLeave(e, t) {
3016
3039
  var n, r;
3017
- (r = (n = Xe(Z.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ze.DEFAULT);
3040
+ (r = (n = Ke(H.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ge.DEFAULT);
3018
3041
  }
3019
3042
  };
3020
- ln = ji([
3021
- it(0, le),
3022
- it(1, D(de)),
3023
- it(2, te),
3024
- it(3, D(Ue)),
3025
- it(4, D(oe))
3026
- ], ln);
3027
- class Xi extends fe {
3043
+ un = zi([
3044
+ lt(0, pe),
3045
+ lt(1, E(ge)),
3046
+ lt(2, oe),
3047
+ lt(3, E(xe)),
3048
+ lt(4, E(ae))
3049
+ ], un);
3050
+ class Gi extends Ce {
3028
3051
  constructor() {
3029
3052
  super(...arguments);
3030
- V(this, "id", Y.LIST);
3031
- V(this, "canvasRender", this.injector.createInstance(ln));
3032
- V(this, "dropdownType", pe.LIST);
3033
- V(this, "optionsInput", Dt.componentKey);
3034
- V(this, "formulaInput", pn);
3053
+ V(this, "id", X.LIST);
3054
+ V(this, "canvasRender", this.injector.createInstance(un));
3055
+ V(this, "dropdownType", fe.LIST);
3056
+ V(this, "optionsInput", Ot.componentKey);
3057
+ V(this, "formulaInput", mn);
3035
3058
  }
3036
3059
  }
3037
- class Zi extends fe {
3060
+ class qi extends Ce {
3038
3061
  constructor() {
3039
3062
  super(...arguments);
3040
- V(this, "id", Y.TEXT_LENGTH);
3041
- V(this, "formulaInput", At);
3063
+ V(this, "id", X.TEXT_LENGTH);
3064
+ V(this, "formulaInput", kt);
3042
3065
  }
3043
3066
  }
3044
- class zi extends fe {
3067
+ class Ji extends Ce {
3045
3068
  constructor() {
3046
3069
  super(...arguments);
3047
- V(this, "id", Y.WHOLE);
3048
- V(this, "formulaInput", At);
3070
+ V(this, "id", X.WHOLE);
3071
+ V(this, "formulaInput", kt);
3049
3072
  }
3050
3073
  }
3051
- var Ki = Object.getOwnPropertyDescriptor, Gi = (e, t, n, r) => {
3052
- for (var o = r > 1 ? void 0 : r ? Ki(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3074
+ var Qi = Object.getOwnPropertyDescriptor, ea = (e, t, n, r) => {
3075
+ for (var o = r > 1 ? void 0 : r ? Qi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3053
3076
  (a = e[i]) && (o = a(o) || o);
3054
3077
  return o;
3055
- }, Zt = (e, t) => (n, r) => t(n, r, e);
3056
- let et = class extends cn {
3078
+ }, Gt = (e, t) => (n, r) => t(n, r, e);
3079
+ let rt = class extends pn {
3057
3080
  constructor(e, t, n) {
3058
3081
  super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = n, this._initComponents(), this._registerValidatorViews();
3059
3082
  }
3060
3083
  _initComponents() {
3061
3084
  [
3062
- ["DataValidationIcon", Ir],
3063
- [bt, vi],
3064
- [Dt.componentKey, Dt],
3065
- [Vt.componentKey, Vt],
3066
- ...Ii
3085
+ ["DataValidationIcon", br],
3086
+ [Vt, Si],
3087
+ [Ot.componentKey, Ot],
3088
+ [At.componentKey, At],
3089
+ ...bi
3067
3090
  ].forEach(([e, t]) => {
3068
3091
  this.disposeWithMe(this._componentManger.register(
3069
3092
  e,
@@ -3073,146 +3096,146 @@ let et = class extends cn {
3073
3096
  }
3074
3097
  _registerValidatorViews() {
3075
3098
  [
3099
+ Fi,
3100
+ Ji,
3101
+ qi,
3102
+ Ui,
3076
3103
  Li,
3077
- zi,
3078
- Zi,
3079
- Pi,
3080
- Ti,
3104
+ Gi,
3081
3105
  Xi,
3082
- Wi,
3083
- Oi
3106
+ ki
3084
3107
  ].forEach((e) => {
3085
3108
  const t = this._injector.createInstance(e), n = this._dataValidatorRegistryService.getValidatorItem(t.id);
3086
3109
  n && (n.formulaInput = t.formulaInput, n.canvasRender = t.canvasRender, n.dropdownType = t.dropdownType, n.optionsInput = t.optionsInput);
3087
3110
  });
3088
3111
  }
3089
3112
  };
3090
- et = Gi([
3091
- Zt(0, D(ye)),
3092
- Zt(1, D(mn)),
3093
- Zt(2, D(Me))
3094
- ], et);
3095
- var qi = Object.getOwnPropertyDescriptor, Ji = (e, t, n, r) => {
3096
- for (var o = r > 1 ? void 0 : r ? qi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3113
+ rt = ea([
3114
+ Gt(0, E(Ve)),
3115
+ Gt(1, E(Sn)),
3116
+ Gt(2, E(Te))
3117
+ ], rt);
3118
+ var ta = Object.getOwnPropertyDescriptor, na = (e, t, n, r) => {
3119
+ for (var o = r > 1 ? void 0 : r ? ta(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3097
3120
  (a = e[i]) && (o = a(o) || o);
3098
3121
  return o;
3099
- }, zt = (e, t) => (n, r) => t(n, r, e);
3100
- const Qi = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3101
- var St;
3102
- let Bn = (St = class extends Xn {
3103
- constructor(e = Mt, t, n, r) {
3122
+ }, qt = (e, t) => (n, r) => t(n, r, e);
3123
+ const ra = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3124
+ var Rt;
3125
+ let jn = (Rt = class extends Kn {
3126
+ constructor(e = Dt, t, n, r) {
3104
3127
  super(), this._config = e, this._injector = t, this._commandService = n, this._configService = r;
3105
- const { menu: o, ...i } = Zn(
3128
+ const { menu: o, ...i } = Gn(
3106
3129
  {},
3107
- Mt,
3130
+ Dt,
3108
3131
  this._config
3109
3132
  );
3110
- o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(yt, i);
3133
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Et, i);
3111
3134
  }
3112
3135
  onStarting() {
3113
3136
  [
3114
- [me],
3115
- [Ne],
3116
- [ut],
3117
- [Ge],
3137
+ [_e],
3138
+ [$e],
3139
+ [gt],
3118
3140
  [Qe],
3119
- [Je],
3120
- [qe],
3121
- [et]
3141
+ [nt],
3142
+ [tt],
3143
+ [et],
3144
+ [rt]
3122
3145
  ].forEach((e) => {
3123
3146
  this._injector.add(e);
3124
3147
  }), [
3125
- kt,
3126
- Lt,
3127
- fr,
3128
- Cn,
3129
- Fe,
3130
- mr
3148
+ Ft,
3149
+ Ut,
3150
+ Ir,
3151
+ wn,
3152
+ Be,
3153
+ Cr
3131
3154
  ].forEach((e) => {
3132
3155
  this._commandService.registerCommand(e);
3133
3156
  });
3134
3157
  }
3135
3158
  onReady() {
3136
- this._injector.get(qe), this._injector.get(Je), this._injector.get(Ue).registerRenderModule(
3137
- Z.UNIVER_SHEET,
3138
- [Et]
3159
+ this._injector.get(et), this._injector.get(tt), this._injector.get(xe).registerRenderModule(
3160
+ H.UNIVER_SHEET,
3161
+ [Tt]
3139
3162
  );
3140
3163
  }
3141
3164
  onRendered() {
3142
- this._injector.get(et), this._injector.get(Qe);
3165
+ this._injector.get(rt), this._injector.get(nt);
3143
3166
  }
3144
3167
  onSteady() {
3145
- this._injector.get(Ge);
3146
- }
3147
- }, V(St, "pluginName", Qi), V(St, "type", Z.UNIVER_SHEET), St);
3148
- Bn = Ji([
3149
- zt(1, D(ye)),
3150
- zt(2, te),
3151
- zt(3, dn)
3152
- ], Bn);
3153
- var ea = Object.defineProperty, ta = Object.getOwnPropertyDescriptor, na = (e, t, n) => t in e ? ea(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ra = (e, t, n, r) => {
3154
- for (var o = r > 1 ? void 0 : r ? ta(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3168
+ this._injector.get(Qe);
3169
+ }
3170
+ }, V(Rt, "pluginName", ra), V(Rt, "type", H.UNIVER_SHEET), Rt);
3171
+ jn = na([
3172
+ qt(1, E(Ve)),
3173
+ qt(2, oe),
3174
+ qt(3, hn)
3175
+ ], jn);
3176
+ var oa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, aa = (e, t, n) => t in e ? oa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sa = (e, t, n, r) => {
3177
+ for (var o = r > 1 ? void 0 : r ? ia(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3155
3178
  (a = e[i]) && (o = a(o) || o);
3156
3179
  return o;
3157
- }, Kt = (e, t) => (n, r) => t(n, r, e), Dr = (e, t, n) => na(e, typeof t != "symbol" ? t + "" : t, n);
3158
- const oa = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3159
- let Ot = class extends Xn {
3160
- constructor(e = Mt, t, n, r) {
3180
+ }, Jt = (e, t) => (n, r) => t(n, r, e), Ar = (e, t, n) => aa(e, typeof t != "symbol" ? t + "" : t, n);
3181
+ const la = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3182
+ let Lt = class extends Kn {
3183
+ constructor(e = Dt, t, n, r) {
3161
3184
  super(), this._config = e, this._injector = t, this._commandService = n, this._configService = r;
3162
- const { menu: o, ...i } = Zn(
3185
+ const { menu: o, ...i } = Gn(
3163
3186
  {},
3164
- Mt,
3187
+ Dt,
3165
3188
  this._config
3166
3189
  );
3167
- o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(yt, i);
3190
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Et, i);
3168
3191
  }
3169
3192
  onStarting() {
3170
3193
  [
3171
- [me],
3172
- [Ne],
3173
- [ut],
3174
- [Ge],
3194
+ [_e],
3195
+ [$e],
3196
+ [gt],
3175
3197
  [Qe],
3198
+ [nt],
3199
+ [tt],
3200
+ [et],
3176
3201
  [Je],
3177
- [qe],
3178
- [Ke],
3179
- [et]
3202
+ [rt]
3180
3203
  ].forEach((e) => {
3181
3204
  this._injector.add(e);
3182
3205
  }), [
3183
- kt,
3184
- Lt,
3185
- fr,
3186
- Cn,
3187
- Fe,
3188
- mr
3206
+ Ft,
3207
+ Ut,
3208
+ Ir,
3209
+ wn,
3210
+ Be,
3211
+ Cr
3189
3212
  ].forEach((e) => {
3190
3213
  this._commandService.registerCommand(e);
3191
3214
  });
3192
3215
  }
3193
3216
  onReady() {
3194
- this._injector.get(qe), this._injector.get(Je), this._injector.get(Ke), this._injector.get(ut), this._injector.get(Ue).registerRenderModule(
3195
- Z.UNIVER_SHEET,
3196
- [Et]
3217
+ this._injector.get(et), this._injector.get(tt), this._injector.get(Je), this._injector.get(gt), this._injector.get(xe).registerRenderModule(
3218
+ H.UNIVER_SHEET,
3219
+ [Tt]
3197
3220
  );
3198
3221
  }
3199
3222
  onRendered() {
3200
- this._injector.get(et), this._injector.get(Qe);
3223
+ this._injector.get(rt), this._injector.get(nt);
3201
3224
  }
3202
3225
  onSteady() {
3203
- this._injector.get(Ge);
3226
+ this._injector.get(Qe);
3204
3227
  }
3205
3228
  };
3206
- Dr(Ot, "pluginName", oa);
3207
- Dr(Ot, "type", Z.UNIVER_SHEET);
3208
- Ot = ra([
3209
- Hr(so),
3210
- Kt(1, D(ye)),
3211
- Kt(2, te),
3212
- Kt(3, dn)
3213
- ], Ot);
3229
+ Ar(Lt, "pluginName", la);
3230
+ Ar(Lt, "type", H.UNIVER_SHEET);
3231
+ Lt = sa([
3232
+ Zr(vo),
3233
+ Jt(1, E(Ve)),
3234
+ Jt(2, oe),
3235
+ Jt(3, hn)
3236
+ ], Lt);
3214
3237
  export {
3215
- fe as BaseSheetDataValidatorView,
3216
- Bn as UniverSheetsDataValidationMobileUIPlugin,
3217
- Ot as UniverSheetsDataValidationUIPlugin
3238
+ Ce as BaseSheetDataValidatorView,
3239
+ jn as UniverSheetsDataValidationMobileUIPlugin,
3240
+ Lt as UniverSheetsDataValidationUIPlugin
3218
3241
  };