@univerjs/sheets-data-validation-ui 0.6.0-nightly.202502181606 → 0.6.0-nightly.202502201606

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,48 +1,48 @@
1
- var ko = Object.defineProperty;
2
- var Wo = (e, t, o) => t in e ? ko(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var y = (e, t, o) => Wo(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { jsxs as x, jsx as f, Fragment as we } from "react/jsx-runtime";
5
- import { Inject as b, LocaleService as Q, Disposable as De, DataValidationErrorStyle as rt, ICommandService as ee, dayjs as Zt, numfmt as qt, CellValueType as Ho, UniverInstanceType as X, toDisposable as jo, IUniverInstanceService as ve, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as xo, DisposableCollection as Yo, CommandType as et, BuildTextUtils as Xo, DataValidationRenderMode as ce, DataValidationType as K, IConfigService as pn, UndoCommand as zo, RedoCommand as Ko, isUnitRangesEqual as Go, debounce as Zo, shallowEqual as bn, Injector as $e, DataValidationStatus as st, ObjectMatrix as St, Range as qo, Rectangle as Ct, queryObjectMatrix as Jt, Optional as Jo, RxDisposable as fn, InterceptorEffectEnum as zn, sequenceExecute as Kn, bufferDebounceTime as Qo, isFormulaString as Ae, Tools as Qt, ThemeService as ea, VerticalAlign as he, HorizontalAlign as Ye, DEFAULT_STYLES as de, WrapStrategy as Ce, DocumentDataModel as ta, DEFAULT_EMPTY_DOCUMENT_VALUE as na, BooleanNumber as tt, Plugin as Gn, merge as Zn } from "@univerjs/core";
6
- import { Button as Be, DatePanel as oa, Scrollbar as aa, FormLayout as q, RadioGroup as mn, Radio as Ne, Checkbox as Pt, Input as Ue, Select as en, DraggableList as ia } from "@univerjs/design";
7
- import { DeviceInputEventType as tn, IRenderManagerService as Ve, fixLineWidthByScale as En, Transform as ra, CheckboxShape as sa, CURSOR_TYPE as Xe, FontCache as la, Shape as da, Rect as qn, getFontStyleString as Ut, getDocsSkeletonPageSize as nt, DocumentViewModel as ca, DocumentSkeleton as ua, Documents as ha } from "@univerjs/engine-render";
8
- import { SheetInterceptorService as gn, AFTER_CELL_EDIT_ASYNC as pa, SetRangeValuesCommand as vn, SheetsSelectionsService as Jn, getSheetCommandTarget as Qn, SheetPermissionCheckController as eo, WorkbookEditablePermission as It, RangeProtectionPermissionEditPoint as wt, WorksheetEditPermission as Rt, checkRangesEditablePermission as fa, WorksheetSetCellStylePermission as nn, INTERCEPTOR_POINT as to, InterceptCellContentPriority as no } from "@univerjs/sheets";
9
- import { SheetDataValidationModel as ae, getCellValueOrigin as re, getDataValidationCellValue as ma, deserializeListOptions as oo, serializeListOptions as ao, UpdateSheetDataValidationRangeCommand as io, UpdateSheetDataValidationSettingCommand as On, RemoveSheetDataValidationCommand as ro, UpdateSheetDataValidationOptionsCommand as ga, createDefaultNewRule as so, AddSheetDataValidationCommand as _n, RemoveSheetAllDataValidationCommand as va, DATA_VALIDATION_PLUGIN_NAME as lo, getDataValidationDiffMutations as on, DataValidationCacheService as co, DataValidationFormulaController as _a, DataValidationFormulaService as Sa, getFormulaResult as Bt, isLegalFormulaResult as Pn, transformCheckboxValue as Ca, CHECKBOX_FORMULA_1 as Ia, CHECKBOX_FORMULA_2 as wa } from "@univerjs/sheets-data-validation";
1
+ var $o = Object.defineProperty;
2
+ var Wo = (t, e, o) => e in t ? $o(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var M = (t, e, o) => Wo(t, typeof e != "symbol" ? e + "" : e, o);
4
+ import { jsxs as j, jsx as m, Fragment as wt } from "react/jsx-runtime";
5
+ import { Inject as E, LocaleService as Q, Disposable as Dt, DataValidationErrorStyle as re, ICommandService as tt, dayjs as Ze, numfmt as qe, CellValueType as Ho, UniverInstanceType as X, toDisposable as xo, IUniverInstanceService as vt, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as jo, DisposableCollection as Yo, CommandType as te, BuildTextUtils as Xo, DataValidationRenderMode as ct, DataValidationType as K, IConfigService as pn, debounce as zo, UndoCommand as Ko, RedoCommand as Go, isUnitRangesEqual as Zo, shallowEqual as En, Injector as Bt, DataValidationStatus as se, ObjectMatrix as Se, Range as qo, Rectangle as Ce, queryObjectMatrix as Je, Optional as Jo, RxDisposable as mn, InterceptorEffectEnum as zn, sequenceExecute as Kn, bufferDebounceTime as Qo, isFormulaString as At, Tools as Qe, ThemeService as ta, VerticalAlign as ht, HorizontalAlign as Yt, DEFAULT_STYLES as dt, WrapStrategy as Ct, DocumentDataModel as ea, BooleanNumber as ee, DEFAULT_EMPTY_DOCUMENT_VALUE as na, Plugin as Gn, merge as Zn } from "@univerjs/core";
6
+ import { Button as Ut, DatePanel as oa, Scrollbar as aa, FormLayout as q, RadioGroup as gn, Radio as Ft, Checkbox as Le, Input as Nt, Select as tn, DraggableList as ia } from "@univerjs/design";
7
+ import { DeviceInputEventType as en, IRenderManagerService as Vt, fixLineWidthByScale as bn, Transform as ra, CheckboxShape as sa, CURSOR_TYPE as Xt, FontCache as la, Shape as da, Rect as qn, getFontStyleString as Ne, getDocsSkeletonPageSize as ne, Documents as ca, DocumentViewModel as ua, DocumentSkeleton as ha } from "@univerjs/engine-render";
8
+ import { SheetInterceptorService as fn, AFTER_CELL_EDIT_ASYNC as pa, SetRangeValuesCommand as vn, SheetsSelectionsService as Jn, getSheetCommandTarget as Qn, SheetPermissionCheckController as to, WorksheetEditPermission as Ie, RangeProtectionPermissionEditPoint as we, WorkbookEditablePermission as Re, checkRangesEditablePermission as ma, WorksheetSetCellStylePermission as nn, INTERCEPTOR_POINT as eo, InterceptCellContentPriority as no } from "@univerjs/sheets";
9
+ import { SheetDataValidationModel as at, getCellValueOrigin as rt, getDataValidationCellValue as ga, deserializeListOptions as oo, serializeListOptions as ao, UpdateSheetDataValidationRangeCommand as io, UpdateSheetDataValidationSettingCommand as On, UpdateSheetDataValidationOptionsCommand as fa, RemoveSheetDataValidationCommand as ro, RemoveSheetAllDataValidationCommand as va, createDefaultNewRule as so, AddSheetDataValidationCommand as _n, DATA_VALIDATION_PLUGIN_NAME as lo, getDataValidationDiffMutations as on, DataValidationCacheService as co, DataValidationFormulaController as _a, DataValidationFormulaService as Sa, CHECKBOX_FORMULA_2 as Ca, CHECKBOX_FORMULA_1 as Ia, getFormulaResult as Ue, isLegalFormulaResult as Ln, transformCheckboxValue as wa } from "@univerjs/sheets-data-validation";
10
10
  import { getPatternType as Ra } from "@univerjs/sheets-numfmt";
11
- import { SetCellEditVisibleOperation as an, SheetCanvasPopManagerService as Da, IEditorBridgeService as uo, IMarkSelectionService as Va, HoverManagerService as Ma, CellAlertManagerService as ya, CellAlertType as ba, IAutoFillService as Ea, APPLY_TYPE as ot, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Oa, COPY_TYPE as Ln, rangeToDiscreteRange as Pa, PREDEFINED_HOOK_NAME as ct, getRepeatRange as Tn, ISheetClipboardService as La, getCurrentRangeDisable$ as Ta, AutoHeightController as ho, SheetSkeletonManagerService as Dt } from "@univerjs/sheets-ui";
12
- import { IDialogService as Aa, useDependency as P, KeyCode as sn, ISidebarService as po, useObservable as ke, ComponentManager as Lt, IZenZoneService as fo, RectPopup as Fa, useEvent as ln, useSidebarClick as Sn, MenuItemType as Cn, getMenuHiddenObservable as Na, RibbonStartGroup as Ua, IMenuManagerService as Ba } from "@univerjs/ui";
13
- import An, { useState as j, forwardRef as Me, useRef as ze, createElement as ye, useMemo as Ke, useEffect as Ie } from "react";
14
- import { DataValidatorRegistryService as be, DataValidationModel as Tt, DataValidatorRegistryScope as $a, TWO_FORMULA_OPERATOR_COUNT as ka, getRuleOptions as Fn, getRuleSetting as Nn } from "@univerjs/data-validation";
11
+ import { SetCellEditVisibleOperation as an, SheetCanvasPopManagerService as Da, IEditorBridgeService as uo, IMarkSelectionService as Va, HoverManagerService as ya, CellAlertManagerService as Ma, CellAlertType as Ea, IAutoFillService as ba, APPLY_TYPE as oe, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Oa, ISheetClipboardService as La, COPY_TYPE as Tn, rangeToDiscreteRange as Ta, PREDEFINED_HOOK_NAME as ce, getRepeatRange as Pn, getCurrentRangeDisable$ as Pa, AutoHeightController as ho, SheetSkeletonManagerService as De } from "@univerjs/sheets-ui";
12
+ import { IDialogService as Aa, useDependency as L, KeyCode as sn, ISidebarService as po, useObservable as $t, ComponentManager as Te, IZenZoneService as mo, RectPopup as ka, useEvent as ln, useSidebarClick as Sn, MenuItemType as Cn, getMenuHiddenObservable as Fa, RibbonStartGroup as Na, IMenuManagerService as Ua } from "@univerjs/ui";
13
+ import An, { useState as x, forwardRef as yt, useRef as zt, createElement as Mt, useMemo as Kt, useEffect as It } from "react";
14
+ import { DataValidatorRegistryService as Et, DataValidationModel as Pe, DataValidatorRegistryScope as Ba, TWO_FORMULA_OPERATOR_COUNT as $a, getRuleOptions as kn, getRuleSetting as Fn } from "@univerjs/data-validation";
15
15
  import { RichTextEditingMutation as Wa } from "@univerjs/docs";
16
- import { filter as In, BehaviorSubject as Un, distinctUntilChanged as Ha, Subject as ja, debounceTime as wn, bufferTime as mo } from "rxjs";
17
- import { deserializeRangeWithSheet as xa, serializeRange as go } from "@univerjs/engine-formula";
16
+ import { filter as In, BehaviorSubject as Nn, distinctUntilChanged as Ha, Subject as xa, debounceTime as wn, bufferTime as go } from "rxjs";
17
+ import { deserializeRangeWithSheet as ja, serializeRange as fo } from "@univerjs/engine-formula";
18
18
  import { RangeSelector as Ya, FormulaEditor as vo } from "@univerjs/sheets-formula-ui";
19
- var Xa = Object.defineProperty, za = Object.getOwnPropertyDescriptor, Ka = (e, t, o, n) => {
20
- for (var a = n > 1 ? void 0 : n ? za(t, o) : t, i = e.length - 1, r; i >= 0; i--)
21
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
22
- return n && a && Xa(t, o, a), a;
23
- }, at = (e, t) => (o, n) => t(o, n, e);
24
- let lt = class extends De {
25
- constructor(e, t, o, n, a) {
26
- super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = o, this._dialogService = n, this._localeService = a, this._initEditorBridgeInterceptor();
19
+ var Xa = Object.getOwnPropertyDescriptor, za = (t, e, o, n) => {
20
+ for (var a = n > 1 ? void 0 : n ? Xa(e, o) : e, i = t.length - 1, r; i >= 0; i--)
21
+ (r = t[i]) && (a = r(a) || a);
22
+ return a;
23
+ }, ae = (t, e) => (o, n) => e(o, n, t);
24
+ let le = class extends Dt {
25
+ constructor(t, e, o, n, a) {
26
+ super(), this._sheetInterceptorService = t, this._dataValidationModel = e, this._dataValidatorRegistryService = o, this._dialogService = n, this._localeService = a, this._initEditorBridgeInterceptor();
27
27
  }
28
28
  _initEditorBridgeInterceptor() {
29
29
  this._sheetInterceptorService.writeCellInterceptor.intercept(
30
30
  pa,
31
31
  {
32
- handler: async (e, t, o) => {
32
+ handler: async (t, e, o) => {
33
33
  var C;
34
- const n = await e, { worksheet: a, row: i, col: r, unitId: l, subUnitId: s, workbook: c } = t, u = this._dataValidationModel.getRuleIdByLocation(l, s, i, r), h = u ? this._dataValidationModel.getRuleById(l, s, u) : void 0;
35
- if (!h || h.errorStyle !== rt.STOP)
34
+ const n = await t, { worksheet: a, row: i, col: r, unitId: s, subUnitId: l, workbook: c } = e, u = this._dataValidationModel.getRuleIdByLocation(s, l, i, r), h = u ? this._dataValidationModel.getRuleById(s, l, u) : void 0;
35
+ if (!h || h.errorStyle !== re.STOP)
36
36
  return o(Promise.resolve(n));
37
37
  const d = await this._dataValidatorRegistryService.getValidatorItem(h.type);
38
38
  if (!d || await d.validator(
39
39
  {
40
- value: re(n),
41
- interceptValue: re((C = t == null ? void 0 : t.origin) != null ? C : n),
40
+ value: rt(n),
41
+ interceptValue: rt((C = e == null ? void 0 : e.origin) != null ? C : n),
42
42
  row: i,
43
43
  column: r,
44
- unitId: l,
45
- subUnitId: s,
44
+ unitId: s,
45
+ subUnitId: l,
46
46
  worksheet: a,
47
47
  workbook: c,
48
48
  t: n == null ? void 0 : n.t
@@ -58,11 +58,11 @@ let lt = class extends De {
58
58
  },
59
59
  id: "reject-input-dialog",
60
60
  children: {
61
- title: d.getRuleFinalError(h, { row: i, col: r, unitId: l, subUnitId: s })
61
+ title: d.getRuleFinalError(h, { row: i, col: r, unitId: s, subUnitId: l })
62
62
  },
63
63
  footer: {
64
64
  title: An.createElement(
65
- Be,
65
+ Ut,
66
66
  {
67
67
  type: "primary",
68
68
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -78,7 +78,7 @@ let lt = class extends De {
78
78
  }
79
79
  );
80
80
  }
81
- showReject(e) {
81
+ showReject(t) {
82
82
  this._dialogService.open({
83
83
  width: 368,
84
84
  title: {
@@ -86,11 +86,11 @@ let lt = class extends De {
86
86
  },
87
87
  id: "reject-input-dialog",
88
88
  children: {
89
- title: e
89
+ title: t
90
90
  },
91
91
  footer: {
92
92
  title: An.createElement(
93
- Be,
93
+ Ut,
94
94
  {
95
95
  type: "primary",
96
96
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -104,56 +104,56 @@ let lt = class extends De {
104
104
  });
105
105
  }
106
106
  };
107
- lt = Ka([
108
- at(0, b(gn)),
109
- at(1, b(ae)),
110
- at(2, b(be)),
111
- at(3, Aa),
112
- at(4, b(Q))
113
- ], lt);
114
- const Ga = "univer-dv-date-dropdown", Za = "univer-dv-date-dropdown-btns", Bn = {
115
- dvDateDropdown: Ga,
116
- dvDateDropdownBtns: Za
117
- }, qa = (e) => {
118
- if (e == null || typeof e == "boolean")
107
+ le = za([
108
+ ae(0, E(fn)),
109
+ ae(1, E(at)),
110
+ ae(2, E(Et)),
111
+ ae(3, Aa),
112
+ ae(4, E(Q))
113
+ ], le);
114
+ const Ka = "univer-dv-date-dropdown", Ga = "univer-dv-date-dropdown-btns", Un = {
115
+ dvDateDropdown: Ka,
116
+ dvDateDropdownBtns: Ga
117
+ }, Za = (t) => {
118
+ if (t == null || typeof t == "boolean")
119
119
  return;
120
- if (typeof e == "number" || !Number.isNaN(+e))
121
- return Zt(qt.format("yyyy-MM-dd HH:mm:ss", Number(e)));
122
- const t = Zt(e);
123
- if (t.isValid())
124
- return t;
120
+ if (typeof t == "number" || !Number.isNaN(+t))
121
+ return Ze(qe.format("yyyy-MM-dd HH:mm:ss", Number(t)));
122
+ const e = Ze(t);
123
+ if (e.isValid())
124
+ return e;
125
125
  };
126
- function Ja(e) {
127
- var m;
128
- const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l, workbook: s } = t, c = P(ee), u = P(lt), h = n.getCell(a, i), d = re(n.getCellRaw(a, i)), v = qa(d), [p, C] = j(v), R = p && p.isValid() ? p : Zt(), g = P(Q), w = P(ae), I = w.getRuleByLocation(r, l, a, i);
126
+ function qa(t) {
127
+ var g;
128
+ const { location: e, hideFn: o } = t, { worksheet: n, row: a, col: i, unitId: r, subUnitId: s, workbook: l } = e, c = L(tt), u = L(le), h = n.getCell(a, i), d = rt(n.getCellRaw(a, i)), v = Za(d), [p, C] = x(v), R = p && p.isValid() ? p : Ze(), f = L(Q), w = L(at), I = w.getRuleByLocation(r, s, a, i);
129
129
  if (!I)
130
130
  return null;
131
131
  const V = w.getValidator(I.type);
132
132
  if (!h || !V)
133
133
  return;
134
- const _ = !!((m = I.bizInfo) != null && m.showTime), S = async () => {
135
- var F, N, B;
134
+ const _ = !!((g = I.bizInfo) != null && g.showTime), S = async () => {
135
+ var k, F, U;
136
136
  if (!R)
137
137
  return;
138
- const L = R.format(_ ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), U = (F = qt.parseDate(L)) == null ? void 0 : F.v, T = s.getStyles().getStyleByCell(h), E = (B = (N = T == null ? void 0 : T.n) == null ? void 0 : N.pattern) != null ? B : "", A = Ra(E);
139
- I.errorStyle !== rt.STOP || await V.validator({
140
- value: U,
138
+ const T = R.format(_ ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), N = (k = qe.parseDate(T)) == null ? void 0 : k.v, P = l.getStyles().getStyleByCell(h), b = (U = (F = P == null ? void 0 : P.n) == null ? void 0 : F.pattern) != null ? U : "", A = Ra(b);
139
+ I.errorStyle !== re.STOP || await V.validator({
140
+ value: N,
141
141
  unitId: r,
142
- subUnitId: l,
142
+ subUnitId: s,
143
143
  row: a,
144
144
  column: i,
145
145
  worksheet: n,
146
- workbook: s,
147
- interceptValue: L.replace("Z", "").replace("T", " "),
146
+ workbook: l,
147
+ interceptValue: T.replace("Z", "").replace("T", " "),
148
148
  t: Ho.NUMBER
149
149
  }, I) ? (o(), await c.executeCommand(an.id, {
150
150
  visible: !1,
151
- eventType: tn.Keyboard,
151
+ eventType: en.Keyboard,
152
152
  unitId: r,
153
153
  keycode: sn.ESC
154
154
  }), await c.executeCommand(vn.id, {
155
155
  unitId: r,
156
- subUnitId: l,
156
+ subUnitId: s,
157
157
  range: {
158
158
  startColumn: i,
159
159
  endColumn: i,
@@ -161,157 +161,160 @@ function Ja(e) {
161
161
  endRow: a
162
162
  },
163
163
  value: {
164
- v: U,
164
+ v: N,
165
165
  t: 2,
166
166
  p: null,
167
167
  f: null,
168
168
  si: null,
169
169
  s: {
170
170
  n: {
171
- pattern: _ ? A === "datetime" ? E : "yyyy-MM-dd hh:mm:ss" : A === "date" ? E : "yyyy-MM-dd"
171
+ pattern: _ ? A === "datetime" ? b : "yyyy-MM-dd hh:mm:ss" : A === "date" ? b : "yyyy-MM-dd"
172
172
  }
173
173
  }
174
174
  }
175
- })) : u.showReject(V.getRuleFinalError(I, { row: a, col: i, unitId: r, subUnitId: l }));
175
+ })) : u.showReject(V.getRuleFinalError(I, { row: a, col: i, unitId: r, subUnitId: s }));
176
176
  };
177
- return /* @__PURE__ */ x("div", { className: Bn.dvDateDropdown, children: [
178
- /* @__PURE__ */ f(
177
+ return /* @__PURE__ */ j("div", { className: Un.dvDateDropdown, children: [
178
+ /* @__PURE__ */ m(
179
179
  oa,
180
180
  {
181
181
  defaultValue: R,
182
182
  pickerValue: R,
183
183
  showTime: _ || void 0,
184
- onSelect: async (M) => {
185
- C(M);
184
+ onSelect: async (y) => {
185
+ C(y);
186
186
  },
187
- onPanelChange: (M) => {
188
- C(M);
187
+ onPanelChange: (y) => {
188
+ C(y);
189
189
  },
190
- disabledDate: (M) => !qt.parseDate(M.format("YYYY-MM-DD"))
190
+ disabledDate: (y) => !qe.parseDate(y.format("YYYY-MM-DD"))
191
191
  }
192
192
  ),
193
- /* @__PURE__ */ f("div", { className: Bn.dvDateDropdownBtns, children: /* @__PURE__ */ f(Be, { size: "small", type: "primary", onClick: S, disabled: !R.isValid(), children: g.t("dataValidation.alert.ok") }) })
193
+ /* @__PURE__ */ m("div", { className: Un.dvDateDropdownBtns, children: /* @__PURE__ */ m(Ut, { size: "small", type: "primary", onClick: S, disabled: !R.isValid(), children: f.t("dataValidation.alert.ok") }) })
194
194
  ] });
195
195
  }
196
- var ue = function() {
197
- return ue = Object.assign || function(e) {
198
- for (var t, o = 1, n = arguments.length; o < n; o++) {
199
- t = arguments[o];
200
- for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
196
+ var ut = function() {
197
+ return ut = Object.assign || function(t) {
198
+ for (var e, o = 1, n = arguments.length; o < n; o++) {
199
+ e = arguments[o];
200
+ for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]);
201
201
  }
202
- return e;
203
- }, ue.apply(this, arguments);
204
- }, Qa = function(e, t) {
202
+ return t;
203
+ }, ut.apply(this, arguments);
204
+ }, Ja = function(t, e) {
205
205
  var o = {};
206
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
207
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
208
- for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
209
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
206
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (o[n] = t[n]);
207
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
208
+ for (var a = 0, n = Object.getOwnPropertySymbols(t); a < n.length; a++)
209
+ e.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[a]) && (o[n[a]] = t[n[a]]);
210
210
  return o;
211
- }, Ee = Me(function(e, t) {
212
- var o = e.icon, n = e.id, a = e.className, i = e.extend, r = Qa(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(a || "").trim(), s = ze("_".concat(ni()));
213
- return _o(o, "".concat(n), { defIds: o.defIds, idSuffix: s.current }, ue({ ref: t, className: l }, r), i);
211
+ }, bt = yt(function(t, e) {
212
+ var o = t.icon, n = t.id, a = t.className, i = t.extend, r = Ja(t, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(n, " ").concat(a || "").trim(), l = zt("_".concat(ei()));
213
+ return _o(o, "".concat(n), { defIds: o.defIds, idSuffix: l.current }, ut({ ref: e, className: s }, r), i);
214
214
  });
215
- function _o(e, t, o, n, a) {
216
- return ye(e.tag, ue(ue({ key: t }, ei(e, o, a)), n), (ti(e, o).children || []).map(function(i, r) {
217
- return _o(i, "".concat(t, "-").concat(e.tag, "-").concat(r), o, void 0, a);
215
+ function _o(t, e, o, n, a) {
216
+ return Mt(t.tag, ut(ut({ key: e }, Qa(t, o, a)), n), (ti(t, o).children || []).map(function(i, r) {
217
+ return _o(i, "".concat(e, "-").concat(t.tag, "-").concat(r), o, void 0, a);
218
218
  }));
219
219
  }
220
- function ei(e, t, o) {
221
- var n = ue({}, e.attrs);
222
- o != null && o.colorChannel1 && n.fill === "colorChannel1" && (n.fill = o.colorChannel1);
223
- var a = t.defIds;
224
- return !a || a.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(i) {
225
- var r = i[0], l = i[1];
226
- typeof l == "string" && (n[r] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
220
+ function Qa(t, e, o) {
221
+ var n = ut({}, t.attrs);
222
+ o != null && o.colorChannel1 && n.fill === "colorChannel1" && (n.fill = o.colorChannel1), t.tag === "mask" && n.id && (n.id = n.id + e.idSuffix), Object.entries(n).forEach(function(i) {
223
+ var r = i[0], s = i[1];
224
+ r === "mask" && typeof s == "string" && (n[r] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
225
+ });
226
+ var a = e.defIds;
227
+ return !a || a.length === 0 || (t.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + e.idSuffix), Object.entries(n).forEach(function(i) {
228
+ var r = i[0], s = i[1];
229
+ typeof s == "string" && (n[r] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
227
230
  })), n;
228
231
  }
229
- function ti(e, t) {
230
- var o, n = t.defIds;
231
- return !n || n.length === 0 ? e : e.tag === "defs" && (!((o = e.children) === null || o === void 0) && o.length) ? ue(ue({}, e), { children: e.children.map(function(a) {
232
- return typeof a.attrs.id == "string" && n && n.indexOf(a.attrs.id) > -1 ? ue(ue({}, a), { attrs: ue(ue({}, a.attrs), { id: a.attrs.id + t.idSuffix }) }) : a;
233
- }) }) : e;
232
+ function ti(t, e) {
233
+ var o, n = e.defIds;
234
+ return !n || n.length === 0 ? t : t.tag === "defs" && (!((o = t.children) === null || o === void 0) && o.length) ? ut(ut({}, t), { children: t.children.map(function(a) {
235
+ return typeof a.attrs.id == "string" && n && n.indexOf(a.attrs.id) > -1 ? ut(ut({}, a), { attrs: ut(ut({}, a.attrs), { id: a.attrs.id + e.idSuffix }) }) : a;
236
+ }) }) : t;
234
237
  }
235
- function ni() {
238
+ function ei() {
236
239
  return Math.random().toString(36).substring(2, 8);
237
240
  }
238
- Ee.displayName = "UniverIcon";
239
- var oi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, So = Me(function(e, t) {
240
- return ye(Ee, Object.assign({}, e, {
241
+ bt.displayName = "UniverIcon";
242
+ var ni = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, So = yt(function(t, e) {
243
+ return Mt(bt, Object.assign({}, t, {
241
244
  id: "check-mark-single",
242
- ref: t,
243
- icon: oi
245
+ ref: e,
246
+ icon: ni
244
247
  }));
245
248
  });
246
249
  So.displayName = "CheckMarkSingle";
247
- var ai = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Co = Me(function(e, t) {
248
- return ye(Ee, Object.assign({}, e, {
250
+ var oi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Co = yt(function(t, e) {
251
+ return Mt(bt, Object.assign({}, t, {
249
252
  id: "data-validation-single",
250
- ref: t,
251
- icon: ai
253
+ ref: e,
254
+ icon: oi
252
255
  }));
253
256
  });
254
257
  Co.displayName = "DataValidationSingle";
255
- var ii = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rn = Me(function(e, t) {
256
- return ye(Ee, Object.assign({}, e, {
258
+ var ai = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rn = yt(function(t, e) {
259
+ return Mt(bt, Object.assign({}, t, {
257
260
  id: "delete-single",
258
- ref: t,
259
- icon: ii
261
+ ref: e,
262
+ icon: ai
260
263
  }));
261
264
  });
262
265
  Rn.displayName = "DeleteSingle";
263
- var ri = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", 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" } }] }, Io = Me(function(e, t) {
264
- return ye(Ee, Object.assign({}, e, {
266
+ var ii = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", 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" } }] }, Io = yt(function(t, e) {
267
+ return Mt(bt, Object.assign({}, t, {
265
268
  id: "increase-single",
266
- ref: t,
267
- icon: ri
269
+ ref: e,
270
+ icon: ii
268
271
  }));
269
272
  });
270
273
  Io.displayName = "IncreaseSingle";
271
- var si = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wo = Me(function(e, t) {
272
- return ye(Ee, Object.assign({}, e, {
274
+ var ri = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wo = yt(function(t, e) {
275
+ return Mt(bt, Object.assign({}, t, {
273
276
  id: "more-down-single",
274
- ref: t,
275
- icon: si
277
+ ref: e,
278
+ icon: ri
276
279
  }));
277
280
  });
278
281
  wo.displayName = "MoreDownSingle";
279
- var li = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ro = Me(function(e, t) {
280
- return ye(Ee, Object.assign({}, e, {
282
+ var si = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ro = yt(function(t, e) {
283
+ return Mt(bt, Object.assign({}, t, {
281
284
  id: "more-up-single",
282
- ref: t,
283
- icon: li
285
+ ref: e,
286
+ icon: si
284
287
  }));
285
288
  });
286
289
  Ro.displayName = "MoreUpSingle";
287
- var di = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Do = Me(function(e, t) {
288
- return ye(Ee, Object.assign({}, e, {
290
+ var li = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Do = yt(function(t, e) {
291
+ return Mt(bt, Object.assign({}, t, {
289
292
  id: "sequence-single",
290
- ref: t,
291
- icon: di
293
+ ref: e,
294
+ icon: li
292
295
  }));
293
296
  });
294
297
  Do.displayName = "SequenceSingle";
295
- var ci = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, hi = (e, t, o, n) => {
296
- for (var a = n > 1 ? void 0 : n ? ui(t, o) : t, i = e.length - 1, r; i >= 0; i--)
297
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
298
- return n && a && ci(t, o, a), a;
299
- }, $n = (e, t) => (o, n) => t(o, n, e);
300
- let me = class extends De {
301
- constructor(t, o) {
298
+ var di = Object.getOwnPropertyDescriptor, ci = (t, e, o, n) => {
299
+ for (var a = n > 1 ? void 0 : n ? di(e, o) : e, i = t.length - 1, r; i >= 0; i--)
300
+ (r = t[i]) && (a = r(a) || a);
301
+ return a;
302
+ }, Bn = (t, e) => (o, n) => e(o, n, t);
303
+ let gt = class extends Dt {
304
+ constructor(e, o) {
302
305
  super();
303
- y(this, "_open$", new Un(!1));
304
- y(this, "open$", this._open$.pipe(Ha()));
305
- y(this, "_activeRule");
306
- y(this, "_activeRule$", new Un(void 0));
307
- y(this, "activeRule$", this._activeRule$.asObservable());
308
- y(this, "_closeDisposable", null);
309
- this._univerInstanceService = t, this._sidebarService = o, this.disposeWithMe(
306
+ M(this, "_open$", new Nn(!1));
307
+ M(this, "open$", this._open$.pipe(Ha()));
308
+ M(this, "_activeRule");
309
+ M(this, "_activeRule$", new Nn(void 0));
310
+ M(this, "activeRule$", this._activeRule$.asObservable());
311
+ M(this, "_closeDisposable", null);
312
+ this._univerInstanceService = e, this._sidebarService = o, this.disposeWithMe(
310
313
  this._univerInstanceService.getCurrentTypeOfUnit$(X.UNIVER_SHEET).pipe(In((n) => !n)).subscribe(() => {
311
314
  this.close();
312
315
  })
313
316
  ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((n) => {
314
- n.id === Vt && (n.visible || setTimeout(() => {
317
+ n.id === Ve && (n.visible || setTimeout(() => {
315
318
  this._sidebarService.sidebarOptions$.next({ visible: !1 });
316
319
  }));
317
320
  }));
@@ -323,60 +326,60 @@ let me = class extends De {
323
326
  return this._open$.getValue();
324
327
  }
325
328
  dispose() {
326
- var t;
327
- super.dispose(), this._open$.next(!1), this._open$.complete(), this._activeRule$.complete(), (t = this._closeDisposable) == null || t.dispose();
329
+ var e;
330
+ super.dispose(), this._open$.next(!1), this._open$.complete(), this._activeRule$.complete(), (e = this._closeDisposable) == null || e.dispose();
328
331
  }
329
332
  open() {
330
333
  this._open$.next(!0);
331
334
  }
332
335
  close() {
333
- var t;
334
- this._open$.next(!1), (t = this._closeDisposable) == null || t.dispose();
336
+ var e;
337
+ this._open$.next(!1), (e = this._closeDisposable) == null || e.dispose();
335
338
  }
336
- setCloseDisposable(t) {
337
- this._closeDisposable = jo(() => {
338
- t.dispose(), this._closeDisposable = null;
339
+ setCloseDisposable(e) {
340
+ this._closeDisposable = xo(() => {
341
+ e.dispose(), this._closeDisposable = null;
339
342
  });
340
343
  }
341
- setActiveRule(t) {
342
- this._activeRule = t, this._activeRule$.next(t);
344
+ setActiveRule(e) {
345
+ this._activeRule = e, this._activeRule$.next(e);
343
346
  }
344
347
  };
345
- me = hi([
346
- $n(0, ve),
347
- $n(1, po)
348
- ], me);
349
- function pi() {
350
- const e = P(Re), t = ke(e.activeDropdown$, e.activeDropdown), o = P(Lt);
351
- if (!t)
348
+ gt = ci([
349
+ Bn(0, vt),
350
+ Bn(1, po)
351
+ ], gt);
352
+ function ui() {
353
+ const t = L(Rt), e = $t(t.activeDropdown$, t.activeDropdown), o = L(Te);
354
+ if (!e)
352
355
  return null;
353
- const { location: n, componentKey: a } = t, i = o.get(a), r = `${n.unitId}-${n.subUnitId}-${n.row}-${n.col}`;
354
- return i ? /* @__PURE__ */ f(
356
+ const { location: n, componentKey: a } = e, i = o.get(a), r = `${n.unitId}-${n.subUnitId}-${n.row}-${n.col}`;
357
+ return i ? /* @__PURE__ */ m(
355
358
  i,
356
359
  {
357
360
  location: n,
358
361
  hideFn: () => {
359
- e.hideDropdown();
362
+ t.hideDropdown();
360
363
  }
361
364
  },
362
365
  r
363
366
  ) : null;
364
367
  }
365
368
  const Vo = "sheet.ui.dropdown";
366
- var fi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, gi = (e, t, o, n) => {
367
- for (var a = n > 1 ? void 0 : n ? mi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
368
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
369
- return n && a && fi(t, o, a), a;
370
- }, Oe = (e, t) => (o, n) => t(o, n, e);
371
- let Re = class extends De {
372
- constructor(t, o, n, a, i, r, l) {
369
+ var hi = Object.getOwnPropertyDescriptor, pi = (t, e, o, n) => {
370
+ for (var a = n > 1 ? void 0 : n ? hi(e, o) : e, i = t.length - 1, r; i >= 0; i--)
371
+ (r = t[i]) && (a = r(a) || a);
372
+ return a;
373
+ }, Ot = (t, e) => (o, n) => e(o, n, t);
374
+ let Rt = class extends Dt {
375
+ constructor(e, o, n, a, i, r, s) {
373
376
  super();
374
- y(this, "_activeDropdown");
375
- y(this, "_activeDropdown$", new ja());
376
- y(this, "_currentPopup", null);
377
- y(this, "activeDropdown$", this._activeDropdown$.asObservable());
378
- y(this, "_zenVisible", !1);
379
- this._canvasPopupManagerService = t, this._univerInstanceService = o, this._dataValidatorRegistryService = n, this._zenZoneService = a, this._renderManagerService = i, this._dataValidationModel = r, this._sheetsSelectionsService = l, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
377
+ M(this, "_activeDropdown");
378
+ M(this, "_activeDropdown$", new xa());
379
+ M(this, "_currentPopup", null);
380
+ M(this, "activeDropdown$", this._activeDropdown$.asObservable());
381
+ M(this, "_zenVisible", !1);
382
+ this._canvasPopupManagerService = e, this._univerInstanceService = o, this._dataValidatorRegistryService = n, this._zenZoneService = a, this._renderManagerService = i, this._dataValidationModel = r, this._sheetsSelectionsService = s, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
380
383
  this._activeDropdown$.complete();
381
384
  });
382
385
  }
@@ -384,34 +387,34 @@ let Re = class extends De {
384
387
  return this._activeDropdown;
385
388
  }
386
389
  _init() {
387
- this.disposeWithMe(this._zenZoneService.visible$.subscribe((t) => {
388
- this._zenVisible = t, t && this.hideDropdown();
390
+ this.disposeWithMe(this._zenZoneService.visible$.subscribe((e) => {
391
+ this._zenVisible = e, e && this.hideDropdown();
389
392
  }));
390
393
  }
391
- _getDropdownByCell(t, o, n, a) {
392
- const i = t ? this._univerInstanceService.getUnit(t, X.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(X.UNIVER_SHEET);
394
+ _getDropdownByCell(e, o, n, a) {
395
+ const i = e ? this._univerInstanceService.getUnit(e, X.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(X.UNIVER_SHEET);
393
396
  if (!i)
394
397
  return;
395
398
  const r = o ? i.getSheetBySheetId(o) : i.getActiveSheet();
396
399
  if (!r)
397
400
  return;
398
- const l = this._dataValidationModel.getRuleByLocation(i.getUnitId(), r.getSheetId(), n, a);
399
- if (!l)
401
+ const s = this._dataValidationModel.getRuleByLocation(i.getUnitId(), r.getSheetId(), n, a);
402
+ if (!s)
400
403
  return;
401
- const s = this._dataValidatorRegistryService.getValidatorItem(l.type);
402
- return s == null ? void 0 : s.dropdown;
404
+ const l = this._dataValidatorRegistryService.getValidatorItem(s.type);
405
+ return l == null ? void 0 : l.dropdown;
403
406
  }
404
407
  _initSelectionChange() {
405
- this.disposeWithMe(this._sheetsSelectionsService.selectionMoveEnd$.subscribe((t) => {
406
- t && t.every((o) => !(o.primary && this._getDropdownByCell(o.primary.unitId, o.primary.sheetId, o.primary.actualRow, o.primary.actualColumn))) && this.hideDropdown();
408
+ this.disposeWithMe(this._sheetsSelectionsService.selectionMoveEnd$.subscribe((e) => {
409
+ e && e.every((o) => !(o.primary && this._getDropdownByCell(o.primary.unitId, o.primary.sheetId, o.primary.actualRow, o.primary.actualColumn))) && this.hideDropdown();
407
410
  }));
408
411
  }
409
- showDropdown(t, o = !0) {
410
- const { location: n } = t, { row: a, col: i, unitId: r, subUnitId: l } = n;
412
+ showDropdown(e, o = !0) {
413
+ const { location: n } = e, { row: a, col: i, unitId: r, subUnitId: s } = n;
411
414
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
412
415
  return;
413
- this._activeDropdown = t, this._activeDropdown$.next(this._activeDropdown);
414
- const s = this._renderManagerService.getRenderById(xo), c = this._canvasPopupManagerService.attachPopupToCell(
416
+ this._activeDropdown = e, this._activeDropdown$.next(this._activeDropdown);
417
+ const l = this._renderManagerService.getRenderById(jo), c = this._canvasPopupManagerService.attachPopupToCell(
415
418
  a,
416
419
  i,
417
420
  {
@@ -420,10 +423,10 @@ let Re = class extends De {
420
423
  o && this.hideDropdown();
421
424
  },
422
425
  offset: [0, 3],
423
- excludeOutside: [s == null ? void 0 : s.engine.getCanvasElement()].filter(Boolean)
426
+ excludeOutside: [l == null ? void 0 : l.engine.getCanvasElement()].filter(Boolean)
424
427
  },
425
428
  r,
426
- l
429
+ s
427
430
  );
428
431
  if (!c)
429
432
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
@@ -438,17 +441,17 @@ let Re = class extends De {
438
441
  hideDropdown() {
439
442
  this._activeDropdown && (this._currentPopup && this._currentPopup.dispose(), this._currentPopup = null, this._activeDropdown = null, this._activeDropdown$.next(null));
440
443
  }
441
- showDataValidationDropdown(t, o, n, a, i) {
442
- const r = this._univerInstanceService.getUnit(t, X.UNIVER_SHEET);
444
+ showDataValidationDropdown(e, o, n, a, i) {
445
+ const r = this._univerInstanceService.getUnit(e, X.UNIVER_SHEET);
443
446
  if (!r)
444
447
  return;
445
- const l = r.getSheetBySheetId(o);
446
- if (!l)
447
- return;
448
- const s = this._dataValidationModel.getRuleByLocation(r.getUnitId(), l.getSheetId(), n, a);
448
+ const s = r.getSheetBySheetId(o);
449
449
  if (!s)
450
450
  return;
451
- const c = this._dataValidatorRegistryService.getValidatorItem(s.type);
451
+ const l = this._dataValidationModel.getRuleByLocation(r.getUnitId(), s.getSheetId(), n, a);
452
+ if (!l)
453
+ return;
454
+ const c = this._dataValidatorRegistryService.getValidatorItem(l.type);
452
455
  if (!c || !c.dropdown) {
453
456
  this.hideDropdown();
454
457
  return;
@@ -456,10 +459,10 @@ let Re = class extends De {
456
459
  this.showDropdown({
457
460
  location: {
458
461
  workbook: r,
459
- worksheet: l,
462
+ worksheet: s,
460
463
  row: n,
461
464
  col: a,
462
- unitId: t,
465
+ unitId: e,
463
466
  subUnitId: o
464
467
  },
465
468
  componentKey: c.dropdown,
@@ -467,33 +470,33 @@ let Re = class extends De {
467
470
  });
468
471
  }
469
472
  };
470
- Re = gi([
471
- Oe(0, b(Da)),
472
- Oe(1, ve),
473
- Oe(2, b(be)),
474
- Oe(3, fo),
475
- Oe(4, Ve),
476
- Oe(5, b(ae)),
477
- Oe(6, b(Jn))
478
- ], Re);
479
- const Vt = "DataValidationPanel", We = {
473
+ Rt = pi([
474
+ Ot(0, E(Da)),
475
+ Ot(1, vt),
476
+ Ot(2, E(Et)),
477
+ Ot(3, mo),
478
+ Ot(4, Vt),
479
+ Ot(5, E(at)),
480
+ Ot(6, E(Jn))
481
+ ], Rt);
482
+ const Ve = "DataValidationPanel", Wt = {
480
483
  id: "data-validation.operation.open-validation-panel",
481
- type: et.OPERATION,
482
- handler(e, t) {
483
- if (!t)
484
+ type: te.OPERATION,
485
+ handler(t, e) {
486
+ if (!e)
484
487
  return !1;
485
- const { ruleId: o, isAdd: n } = t, a = e.get(me), i = e.get(Tt), r = e.get(ve), l = e.get(po), s = Qn(r);
486
- if (!s) return !1;
487
- const { unitId: c, subUnitId: u } = s, h = o ? i.getRuleById(c, u, o) : void 0;
488
+ const { ruleId: o, isAdd: n } = e, a = t.get(gt), i = t.get(Pe), r = t.get(vt), s = t.get(po), l = Qn(r);
489
+ if (!l) return !1;
490
+ const { unitId: c, subUnitId: u } = l, h = o ? i.getRuleById(c, u, o) : void 0;
488
491
  a.open(), a.setActiveRule(h && {
489
492
  unitId: c,
490
493
  subUnitId: u,
491
494
  rule: h
492
495
  });
493
- const d = l.open({
494
- id: Vt,
496
+ const d = s.open({
497
+ id: Ve,
495
498
  header: { title: n ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
496
- children: { label: Vt },
499
+ children: { label: Ve },
497
500
  width: 312,
498
501
  onClose: () => a.close()
499
502
  });
@@ -501,98 +504,98 @@ const Vt = "DataValidationPanel", We = {
501
504
  }
502
505
  }, Dn = {
503
506
  id: "data-validation.operation.close-validation-panel",
504
- type: et.OPERATION,
505
- handler(e) {
506
- return e.get(me).close(), !0;
507
+ type: te.OPERATION,
508
+ handler(t) {
509
+ return t.get(gt).close(), !0;
507
510
  }
508
- }, Mo = {
511
+ }, yo = {
509
512
  id: "data-validation.operation.toggle-validation-panel",
510
- type: et.OPERATION,
511
- handler(e) {
512
- const t = e.get(ee), o = e.get(me);
513
- return o.open(), o.isOpen ? t.executeCommand(Dn.id) : t.executeCommand(We.id), !0;
513
+ type: te.OPERATION,
514
+ handler(t) {
515
+ const e = t.get(tt), o = t.get(gt);
516
+ return o.open(), o.isOpen ? e.executeCommand(Dn.id) : e.executeCommand(Wt.id), !0;
514
517
  }
515
- }, At = {
516
- type: et.OPERATION,
518
+ }, Ae = {
519
+ type: te.OPERATION,
517
520
  id: "sheet.operation.show-data-validation-dropdown",
518
- handler(e, t) {
519
- if (!t)
521
+ handler(t, e) {
522
+ if (!e)
520
523
  return !1;
521
- const o = e.get(Re), { unitId: n, subUnitId: a, row: i, column: r } = t, l = o.activeDropdown, s = l == null ? void 0 : l.location;
522
- return s && s.unitId === n && s.subUnitId === a && s.row === i && s.col === r || o.showDataValidationDropdown(
524
+ const o = t.get(Rt), { unitId: n, subUnitId: a, row: i, column: r } = e, s = o.activeDropdown, l = s == null ? void 0 : s.location;
525
+ return l && l.unitId === n && l.subUnitId === a && l.row === i && l.col === r || o.showDataValidationDropdown(
523
526
  n,
524
527
  a,
525
528
  i,
526
529
  r
527
530
  ), !0;
528
531
  }
529
- }, yo = {
530
- type: et.OPERATION,
532
+ }, Mo = {
533
+ type: te.OPERATION,
531
534
  id: "sheet.operation.hide-data-validation-dropdown",
532
- handler(e, t) {
533
- return t ? (e.get(Re).hideDropdown(), !0) : !1;
534
- }
535
- }, Fe = "#ECECEC", Vn = "sheets-data-validation-ui.config", Mt = {}, vi = "univer-dv-list-dropdown", _i = "univer-dv-list-dropdown-title", Si = "univer-dv-list-dropdown-list", Ci = "univer-dv-list-dropdown-list-container", Ii = "univer-dv-list-dropdown-selected-icon", wi = "univer-dv-list-dropdown-item-container", Ri = "univer-dv-list-dropdown-item", Di = "univer-dv-list-dropdown-split", Vi = "univer-dv-list-dropdown-edit", _e = {
536
- dvListDropdown: vi,
537
- dvListDropdownTitle: _i,
538
- dvListDropdownList: Si,
539
- dvListDropdownListContainer: Ci,
540
- dvListDropdownSelectedIcon: Ii,
541
- dvListDropdownItemContainer: wi,
542
- dvListDropdownItem: Ri,
543
- dvListDropdownSplit: Di,
544
- dvListDropdownEdit: Vi
545
- }, Mi = (e) => {
535
+ handler(t, e) {
536
+ return e ? (t.get(Rt).hideDropdown(), !0) : !1;
537
+ }
538
+ }, kt = "#ECECEC", Vn = "sheets-data-validation-ui.config", ye = {}, mi = "univer-dv-list-dropdown", gi = "univer-dv-list-dropdown-title", fi = "univer-dv-list-dropdown-list", vi = "univer-dv-list-dropdown-list-container", _i = "univer-dv-list-dropdown-selected-icon", Si = "univer-dv-list-dropdown-item-container", Ci = "univer-dv-list-dropdown-item", Ii = "univer-dv-list-dropdown-split", wi = "univer-dv-list-dropdown-edit", _t = {
539
+ dvListDropdown: mi,
540
+ dvListDropdownTitle: gi,
541
+ dvListDropdownList: fi,
542
+ dvListDropdownListContainer: vi,
543
+ dvListDropdownSelectedIcon: _i,
544
+ dvListDropdownItemContainer: Si,
545
+ dvListDropdownItem: Ci,
546
+ dvListDropdownSplit: Ii,
547
+ dvListDropdownEdit: wi
548
+ }, Ri = (t) => {
546
549
  var _, S;
547
- const { value: t, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: l, filter: s, location: c } = e, u = P(Q), h = P(pn), d = s == null ? void 0 : s.toLowerCase(), { row: v, col: p, unitId: C, subUnitId: R } = c, g = a.filter((m) => d ? m.label.toLowerCase().includes(d) : !0), w = (S = (_ = h.getConfig(Vn)) == null ? void 0 : _.showEditOnDropdown) != null ? S : !0, I = P(eo), V = Ke(() => I.permissionCheckWithRanges(
550
+ const { value: e, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: s, filter: l, location: c } = t, u = L(Q), h = L(pn), d = l == null ? void 0 : l.toLowerCase(), { row: v, col: p, unitId: C, subUnitId: R } = c, f = a.filter((g) => d ? g.label.toLowerCase().includes(d) : !0), w = (S = (_ = h.getConfig(Vn)) == null ? void 0 : _.showEditOnDropdown) != null ? S : !0, I = L(to), V = Kt(() => I.permissionCheckWithRanges(
548
551
  {
549
- workbookTypes: [It],
550
- rangeTypes: [wt],
551
- worksheetTypes: [Rt]
552
+ workbookTypes: [Re],
553
+ rangeTypes: [we],
554
+ worksheetTypes: [Ie]
552
555
  },
553
556
  [{ startColumn: p, startRow: v, endColumn: p, endRow: v }],
554
557
  C,
555
558
  R
556
559
  ), [I, p, v, C, R]);
557
- return /* @__PURE__ */ x("div", { className: _e.dvListDropdown, style: l, children: [
558
- /* @__PURE__ */ f("div", { className: _e.dvListDropdownTitle, children: i }),
559
- /* @__PURE__ */ f("div", { className: _e.dvListDropdownList, children: /* @__PURE__ */ f(aa, { children: /* @__PURE__ */ f("div", { className: _e.dvListDropdownListContainer, children: g.map((m, M) => {
560
- const L = t.indexOf(m.value) > -1, U = () => {
561
- let E;
562
- L ? E = new Set(t.filter((F) => F !== m.value)) : E = new Set(n ? [...t, m.value] : [m.value]);
560
+ return /* @__PURE__ */ j("div", { className: _t.dvListDropdown, style: s, children: [
561
+ /* @__PURE__ */ m("div", { className: _t.dvListDropdownTitle, children: i }),
562
+ /* @__PURE__ */ m("div", { className: _t.dvListDropdownList, children: /* @__PURE__ */ m(aa, { children: /* @__PURE__ */ m("div", { className: _t.dvListDropdownListContainer, children: f.map((g, y) => {
563
+ const T = e.indexOf(g.value) > -1, N = () => {
564
+ let b;
565
+ T ? b = new Set(e.filter((k) => k !== g.value)) : b = new Set(n ? [...e, g.value] : [g.value]);
563
566
  const A = [];
564
- a.forEach((F) => {
565
- E.has(F.value) && A.push(F.value);
567
+ a.forEach((k) => {
568
+ b.has(k.value) && A.push(k.value);
566
569
  }), o(A);
567
- }, T = m.label.toLocaleLowerCase().indexOf(d);
568
- return /* @__PURE__ */ x("div", { className: _e.dvListDropdownItemContainer, onClick: U, children: [
569
- /* @__PURE__ */ f("div", { className: _e.dvListDropdownItem, style: { background: m.color || Fe }, children: d && m.label.toLowerCase().includes(d) ? /* @__PURE__ */ x(we, { children: [
570
- /* @__PURE__ */ f("span", { children: m.label.substring(0, T) }),
571
- /* @__PURE__ */ f("span", { style: { fontWeight: "bold" }, children: m.label.substring(T, T + d.length) }),
572
- /* @__PURE__ */ f("span", { children: m.label.substring(T + d.length) })
573
- ] }) : m.label }),
574
- /* @__PURE__ */ f("div", { className: _e.dvListDropdownSelectedIcon, children: L ? /* @__PURE__ */ f(So, {}) : null })
575
- ] }, M);
576
- }) }) }, s) }),
577
- w && V ? /* @__PURE__ */ x(we, { children: [
578
- /* @__PURE__ */ f("div", { className: _e.dvListDropdownSplit }),
579
- /* @__PURE__ */ f("div", { className: _e.dvListDropdownEdit, children: /* @__PURE__ */ f("a", { onClick: r, children: u.t("dataValidation.list.edit") }) })
570
+ }, P = g.label.toLocaleLowerCase().indexOf(d);
571
+ return /* @__PURE__ */ j("div", { className: _t.dvListDropdownItemContainer, onClick: N, children: [
572
+ /* @__PURE__ */ m("div", { className: _t.dvListDropdownItem, style: { background: g.color || kt }, children: d && g.label.toLowerCase().includes(d) ? /* @__PURE__ */ j(wt, { children: [
573
+ /* @__PURE__ */ m("span", { children: g.label.substring(0, P) }),
574
+ /* @__PURE__ */ m("span", { style: { fontWeight: "bold" }, children: g.label.substring(P, P + d.length) }),
575
+ /* @__PURE__ */ m("span", { children: g.label.substring(P + d.length) })
576
+ ] }) : g.label }),
577
+ /* @__PURE__ */ m("div", { className: _t.dvListDropdownSelectedIcon, children: T ? /* @__PURE__ */ m(So, {}) : null })
578
+ ] }, y);
579
+ }) }) }, l) }),
580
+ w && V ? /* @__PURE__ */ j(wt, { children: [
581
+ /* @__PURE__ */ m("div", { className: _t.dvListDropdownSplit }),
582
+ /* @__PURE__ */ m("div", { className: _t.dvListDropdownEdit, children: /* @__PURE__ */ m("a", { onClick: r, children: u.t("dataValidation.list.edit") }) })
580
583
  ] }) : null
581
584
  ] });
582
585
  };
583
- function yi(e) {
584
- var N, B, Y, z;
585
- const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = P(Tt), [c, u] = j(""), h = P(ee), d = P(Q), [v, p] = j(""), C = P(uo), R = P(ve), g = Ke(() => s.ruleChange$.pipe(wn(16)), []), w = P(ae);
586
- ke(g);
587
- const I = Fa.useContext(), V = ((B = (N = I.current) == null ? void 0 : N.right) != null ? B : 0) - ((z = (Y = I.current) == null ? void 0 : Y.left) != null ? z : 0);
588
- if (Ie(() => {
586
+ function Di(t) {
587
+ var F, U, Y, z;
588
+ const { location: e, hideFn: o } = t, { worksheet: n, row: a, col: i, unitId: r, subUnitId: s } = e, l = L(Pe), [c, u] = x(""), h = L(tt), d = L(Q), [v, p] = x(""), C = L(uo), R = L(vt), f = Kt(() => l.ruleChange$.pipe(wn(16)), []), w = L(at);
589
+ $t(f);
590
+ const I = ka.useContext(), V = ((U = (F = I.current) == null ? void 0 : F.right) != null ? U : 0) - ((z = (Y = I.current) == null ? void 0 : Y.left) != null ? z : 0);
591
+ if (It(() => {
589
592
  const H = h.onCommandExecuted((G) => {
590
- var J, te;
593
+ var J, et;
591
594
  if (G.id === Wa.id) {
592
- const ne = G.params, { unitId: se } = ne, ie = R.getUnit(se, X.UNIVER_DOC);
593
- if (!ie || !C.isVisible().visible) return;
594
- const le = Xo.transform.getPlainText((te = (J = ie.getSnapshot().body) == null ? void 0 : J.dataStream) != null ? te : "");
595
- u(le);
595
+ const nt = G.params, { unitId: st } = nt, it = R.getUnit(st, X.UNIVER_DOC);
596
+ if (!it || !C.isVisible().visible) return;
597
+ const lt = Xo.transform.getPlainText((et = (J = it.getSnapshot().body) == null ? void 0 : J.dataStream) != null ? et : "");
598
+ u(lt);
596
599
  }
597
600
  });
598
601
  return () => {
@@ -600,35 +603,35 @@ function yi(e) {
600
603
  };
601
604
  }, [h, C, R]), !n)
602
605
  return null;
603
- const _ = w.getRuleByLocation(r, l, a, i);
606
+ const _ = w.getRuleByLocation(r, s, a, i);
604
607
  if (!_)
605
608
  return null;
606
609
  const S = w.getValidator(_.type);
607
610
  if (!S)
608
611
  return null;
609
- const m = n.getCell(a, i), M = (_ == null ? void 0 : _.renderMode) === ce.CUSTOM || (_ == null ? void 0 : _.renderMode) === void 0;
610
- if (!m || !_ || !S || S.id.indexOf(K.LIST) !== 0)
612
+ const g = n.getCell(a, i), y = (_ == null ? void 0 : _.renderMode) === ct.CUSTOM || (_ == null ? void 0 : _.renderMode) === void 0;
613
+ if (!g || !_ || !S || S.id.indexOf(K.LIST) !== 0)
611
614
  return;
612
- const L = _.type === K.LIST_MULTIPLE, U = S.getListWithColor(_, r, l), T = v || ma(n.getCellRaw(a, i)), E = oo(T), A = () => {
613
- h.executeCommand(We.id, {
615
+ const T = _.type === K.LIST_MULTIPLE, N = S.getListWithColor(_, r, s), P = v || ga(n.getCellRaw(a, i)), b = oo(P), A = () => {
616
+ h.executeCommand(Wt.id, {
614
617
  ruleId: _.uid
615
618
  }), o();
616
- }, F = U.map((H) => ({
619
+ }, k = N.map((H) => ({
617
620
  label: H.label,
618
621
  value: H.label,
619
- color: M || H.color ? H.color : "transparent"
622
+ color: y || H.color ? H.color : "transparent"
620
623
  }));
621
- return /* @__PURE__ */ f(
622
- Mi,
624
+ return /* @__PURE__ */ m(
625
+ Ri,
623
626
  {
624
627
  style: { minWidth: V, maxWidth: Math.max(V, 200) },
625
- title: L ? d.t("dataValidation.listMultiple.dropdown") : d.t("dataValidation.list.dropdown"),
626
- value: E,
627
- multiple: L,
628
+ title: T ? d.t("dataValidation.listMultiple.dropdown") : d.t("dataValidation.list.dropdown"),
629
+ value: b,
630
+ multiple: T,
628
631
  onChange: async (H) => {
629
632
  const G = ao(H), J = {
630
633
  unitId: r,
631
- subUnitId: l,
634
+ subUnitId: s,
632
635
  range: {
633
636
  startColumn: i,
634
637
  endColumn: i,
@@ -644,138 +647,138 @@ function yi(e) {
644
647
  };
645
648
  C.isVisible() && h.executeCommand(an.id, {
646
649
  visible: !1,
647
- eventType: tn.Keyboard,
650
+ eventType: en.Keyboard,
648
651
  unitId: r,
649
652
  keycode: sn.ESC
650
- }), p(G), L || o(), C.isVisible().visible && await h.executeCommand(an.id, {
653
+ }), p(G), T || o(), C.isVisible().visible && await h.executeCommand(an.id, {
651
654
  visible: !1,
652
- eventType: tn.Keyboard,
655
+ eventType: en.Keyboard,
653
656
  unitId: r,
654
657
  keycode: sn.ESC
655
658
  }), h.executeCommand(vn.id, J);
656
659
  },
657
- options: F,
660
+ options: k,
658
661
  onEdit: A,
659
662
  filter: c,
660
- location: t
663
+ location: e
661
664
  }
662
665
  );
663
666
  }
664
- const bi = "univer-data-validation-options-button", Ei = "univer-data-validation-options-button-icon", $t = {
665
- dataValidationOptionsButton: bi,
666
- dataValidationOptionsButtonIcon: Ei
667
+ const Vi = "univer-data-validation-options-button", yi = "univer-data-validation-options-button-icon", Be = {
668
+ dataValidationOptionsButton: Vi,
669
+ dataValidationOptionsButtonIcon: yi
667
670
  };
668
- function Oi(e) {
671
+ function Mi(t) {
669
672
  var c;
670
- const t = P(Q), o = P(Lt), { value: n, onChange: a, extraComponent: i } = e, [r, l] = j(!1), s = i ? o.get(i) : null;
671
- return /* @__PURE__ */ x(we, { children: [
672
- /* @__PURE__ */ x("div", { className: $t.dataValidationOptionsButton, onClick: () => l(!r), children: [
673
- t.t("dataValidation.panel.options"),
674
- r ? /* @__PURE__ */ f(Ro, { className: $t.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ f(wo, { className: $t.dataValidationOptionsButtonIcon })
673
+ const e = L(Q), o = L(Te), { value: n, onChange: a, extraComponent: i } = t, [r, s] = x(!1), l = i ? o.get(i) : null;
674
+ return /* @__PURE__ */ j(wt, { children: [
675
+ /* @__PURE__ */ j("div", { className: Be.dataValidationOptionsButton, onClick: () => s(!r), children: [
676
+ e.t("dataValidation.panel.options"),
677
+ r ? /* @__PURE__ */ m(Ro, { className: Be.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ m(wo, { className: Be.dataValidationOptionsButtonIcon })
675
678
  ] }),
676
- r && /* @__PURE__ */ x(we, { children: [
677
- s ? /* @__PURE__ */ f(s, { value: n, onChange: a }) : null,
678
- /* @__PURE__ */ f(
679
+ r && /* @__PURE__ */ j(wt, { children: [
680
+ l ? /* @__PURE__ */ m(l, { value: n, onChange: a }) : null,
681
+ /* @__PURE__ */ m(
679
682
  q,
680
683
  {
681
- label: t.t("dataValidation.panel.invalid"),
682
- children: /* @__PURE__ */ x(
683
- mn,
684
+ label: e.t("dataValidation.panel.invalid"),
685
+ children: /* @__PURE__ */ j(
686
+ gn,
684
687
  {
685
- value: `${(c = n.errorStyle) != null ? c : rt.WARNING}`,
688
+ value: `${(c = n.errorStyle) != null ? c : re.WARNING}`,
686
689
  onChange: (u) => a({ ...n, errorStyle: +u }),
687
690
  children: [
688
- /* @__PURE__ */ f(Ne, { value: `${rt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
689
- /* @__PURE__ */ f(Ne, { value: `${rt.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
691
+ /* @__PURE__ */ m(Ft, { value: `${re.WARNING}`, children: e.t("dataValidation.panel.showWarning") }),
692
+ /* @__PURE__ */ m(Ft, { value: `${re.STOP}`, children: e.t("dataValidation.panel.rejectInput") })
690
693
  ]
691
694
  }
692
695
  )
693
696
  }
694
697
  ),
695
- /* @__PURE__ */ f(
698
+ /* @__PURE__ */ m(
696
699
  q,
697
700
  {
698
- label: t.t("dataValidation.panel.messageInfo"),
699
- children: /* @__PURE__ */ f(
700
- Pt,
701
+ label: e.t("dataValidation.panel.messageInfo"),
702
+ children: /* @__PURE__ */ m(
703
+ Le,
701
704
  {
702
705
  checked: n.showErrorMessage,
703
706
  onChange: () => a({
704
707
  ...n,
705
708
  showErrorMessage: !n.showErrorMessage
706
709
  }),
707
- children: t.t("dataValidation.panel.showInfo")
710
+ children: e.t("dataValidation.panel.showInfo")
708
711
  }
709
712
  )
710
713
  }
711
714
  ),
712
- n.showErrorMessage ? /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(Ue, { value: n.error, onChange: (u) => a({ ...n, error: u }) }) }) : null
715
+ n.showErrorMessage ? /* @__PURE__ */ m(q, { children: /* @__PURE__ */ m(Nt, { value: n.error, onChange: (u) => a({ ...n, error: u }) }) }) : null
713
716
  ] })
714
717
  ] });
715
718
  }
716
- const Pi = "univer-data-validation-detail", Li = "univer-data-validation-detail-form-item", Ti = "univer-data-validation-detail-buttons", Ai = "univer-data-validation-detail-button", He = {
717
- dataValidationDetail: Pi,
718
- dataValidationDetailFormItem: Li,
719
- dataValidationDetailButtons: Ti,
720
- dataValidationDetailButton: Ai
721
- }, Fi = (e) => Zo(
722
- async (t, o, n, a) => {
723
- const i = await e.executeCommand(t, o, n);
719
+ const Ei = "univer-data-validation-detail", bi = "univer-data-validation-detail-form-item", Oi = "univer-data-validation-detail-buttons", Li = "univer-data-validation-detail-button", Ht = {
720
+ dataValidationDetail: Ei,
721
+ dataValidationDetailFormItem: bi,
722
+ dataValidationDetailButtons: Oi,
723
+ dataValidationDetailButton: Li
724
+ }, Ti = (t) => zo(
725
+ async (e, o, n, a) => {
726
+ const i = await t.executeCommand(e, o, n);
724
727
  a == null || a(i);
725
728
  },
726
729
  1e3
727
730
  );
728
- function Ni(e, t, o) {
731
+ function Pi(t, e, o) {
729
732
  var n, a, i, r;
730
- return t ? ((a = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(o)) == null ? void 0 : a.getSheetId()) || "" : ((r = (i = e.getCurrentUnitForType(X.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(o)) == null ? void 0 : r.getSheetId()) || "";
733
+ return e ? ((a = (n = t.getUnit(e)) == null ? void 0 : n.getSheetBySheetName(o)) == null ? void 0 : a.getSheetId()) || "" : ((r = (i = t.getCurrentUnitForType(X.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(o)) == null ? void 0 : r.getSheetId()) || "";
731
734
  }
732
- function Ui() {
733
- var le;
734
- const [e, t] = j(0), o = P(me), n = ke(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = P(be), c = P(ve), u = P(Lt), h = P(ee), d = P(Tt), v = P(Q), [p, C] = j(r), R = s.getValidatorItem(p.type), [g, w] = j(!1), I = s.getValidatorsByScope($a.SHEET), [V, _] = j(() => p.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), S = Ke(() => Fi(h), [h]), [m, M] = j(!1), L = ze({}), [U, T] = j(!1), E = P(Jn);
735
- if (Ie(() => () => {
736
- const O = E.getCurrentLastSelection();
737
- O && E.setSelections([O]);
738
- }, [E]), Ie(() => {
735
+ function Ai() {
736
+ var lt;
737
+ const [t, e] = x(0), o = L(gt), n = $t(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, s = r.uid, l = L(Et), c = L(vt), u = L(Te), h = L(tt), d = L(Pe), v = L(Q), [p, C] = x(r), R = l.getValidatorItem(p.type), [f, w] = x(!1), I = l.getValidatorsByScope(Ba.SHEET), [V, _] = x(() => p.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), S = Kt(() => Ti(h), [h]), [g, y] = x(!1), T = zt({}), [N, P] = x(!1), b = L(Jn);
738
+ if (It(() => () => {
739
+ const O = b.getCurrentLastSelection();
740
+ O && b.setSelections([O]);
741
+ }, [b]), It(() => {
739
742
  h.onCommandExecuted((O) => {
740
- (O.id === zo.id || O.id === Ko.id) && setTimeout(() => {
741
- const D = d.getRuleById(a, i, l);
742
- t(($) => $ + 1), D && (C(D), _(D.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
743
+ (O.id === Ko.id || O.id === Go.id) && setTimeout(() => {
744
+ const D = d.getRuleById(a, i, s);
745
+ e((B) => B + 1), D && (C(D), _(D.ranges.map((B) => ({ unitId: "", sheetId: "", range: B }))));
743
746
  }, 20);
744
747
  });
745
- }, [h, d, l, i, a]), !R)
748
+ }, [h, d, s, i, a]), !R)
746
749
  return null;
747
- const A = R.operators, F = R.operatorNames, N = p.operator ? ka.includes(p.operator) : !1, B = () => {
748
- !p.ranges.length || m || (R.validatorFormula(p, a, i).success ? o.setActiveRule(null) : w(!0));
750
+ const A = R.operators, k = R.operatorNames, F = p.operator ? $a.includes(p.operator) : !1, U = () => {
751
+ !p.ranges.length || g || (R.validatorFormula(p, a, i).success ? o.setActiveRule(null) : w(!0));
749
752
  }, Y = ln((O) => {
750
- const D = O.split(",").filter(Boolean).map(xa).map((W) => {
751
- const Se = W.sheetName;
752
- if (Se) {
753
- const $o = Ni(c, W.unitId, Se);
754
- return { ...W, sheetId: $o };
753
+ const D = O.split(",").filter(Boolean).map(ja).map((W) => {
754
+ const St = W.sheetName;
755
+ if (St) {
756
+ const Bo = Pi(c, W.unitId, St);
757
+ return { ...W, sheetId: Bo };
755
758
  }
756
759
  return {
757
760
  ...W,
758
761
  sheetId: ""
759
762
  };
760
763
  });
761
- if (Go(D, V))
764
+ if (Zo(D, V))
762
765
  return;
763
766
  _(D);
764
- const $ = D.filter((W) => (!W.unitId || W.unitId === a) && (!W.sheetId || W.sheetId === i)).map((W) => W.range);
767
+ const B = D.filter((W) => (!W.unitId || W.unitId === a) && (!W.sheetId || W.sheetId === i)).map((W) => W.range);
765
768
  if (C({
766
769
  ...p,
767
- ranges: $
768
- }), $.length === 0)
770
+ ranges: B
771
+ }), B.length === 0)
769
772
  return;
770
- const k = {
773
+ const $ = {
771
774
  unitId: a,
772
775
  subUnitId: i,
773
- ruleId: l,
774
- ranges: $
776
+ ruleId: s,
777
+ ranges: B
775
778
  };
776
- S(io.id, k);
779
+ S(io.id, $);
777
780
  }), z = (O) => {
778
- if (bn(O, Nn(p)))
781
+ if (En(O, Fn(p)))
779
782
  return;
780
783
  C({
781
784
  ...p,
@@ -784,7 +787,7 @@ function Ui() {
784
787
  const D = {
785
788
  unitId: a,
786
789
  subUnitId: i,
787
- ruleId: l,
790
+ ruleId: s,
788
791
  setting: O
789
792
  };
790
793
  S(
@@ -794,7 +797,7 @@ function Ui() {
794
797
  );
795
798
  }, H = async () => {
796
799
  await h.executeCommand(ro.id, {
797
- ruleId: l,
800
+ ruleId: s,
798
801
  unitId: a,
799
802
  subUnitId: i
800
803
  }), o.setActiveRule(null);
@@ -805,16 +808,16 @@ function Ui() {
805
808
  formula2: p.formula2,
806
809
  allowBlank: p.allowBlank
807
810
  }, J = (O) => {
808
- const D = s.getValidatorItem(O);
811
+ const D = l.getValidatorItem(O);
809
812
  if (!D)
810
813
  return;
811
- const $ = D.operators, k = d.getRuleById(a, i, l), W = O === (k == null ? void 0 : k.type) || O.includes("list") && (k != null && k.type.includes("list")) ? {
812
- ...k,
814
+ const B = D.operators, $ = d.getRuleById(a, i, s), W = O === ($ == null ? void 0 : $.type) || O.includes("list") && ($ != null && $.type.includes("list")) ? {
815
+ ...$,
813
816
  type: O
814
817
  } : {
815
818
  ...p,
816
819
  type: O,
817
- operator: $[0],
820
+ operator: B[0],
818
821
  formula1: void 0,
819
822
  formula2: void 0
820
823
  };
@@ -822,49 +825,49 @@ function Ui() {
822
825
  unitId: a,
823
826
  subUnitId: i,
824
827
  ruleId: p.uid,
825
- setting: Nn(W)
828
+ setting: Fn(W)
826
829
  });
827
- }, te = u.get(R.formulaInput), ne = Ke(() => V.map((O) => go(O.range)).join(","), []), se = Fn(p), ie = (O) => {
828
- bn(O, Fn(p)) || (C({
830
+ }, et = u.get(R.formulaInput), nt = Kt(() => V.map((O) => fo(O.range)).join(","), []), st = kn(p), it = (O) => {
831
+ En(O, kn(p)) || (C({
829
832
  ...p,
830
833
  ...O
831
834
  }), S(
832
- ga.id,
835
+ fa.id,
833
836
  {
834
837
  unitId: a,
835
838
  subUnitId: i,
836
- ruleId: l,
839
+ ruleId: s,
837
840
  options: O
838
841
  }
839
842
  ));
840
843
  };
841
844
  return Sn((O) => {
842
- var $;
843
- const D = ($ = L.current) == null ? void 0 : $.handleOutClick;
844
- D && D(O, () => T(!1));
845
- }), /* @__PURE__ */ x("div", { className: He.dataValidationDetail, children: [
846
- /* @__PURE__ */ f(
845
+ var B;
846
+ const D = (B = T.current) == null ? void 0 : B.handleOutClick;
847
+ D && D(O, () => P(!1));
848
+ }), /* @__PURE__ */ j("div", { className: Ht.dataValidationDetail, children: [
849
+ /* @__PURE__ */ m(
847
850
  q,
848
851
  {
849
852
  label: v.t("dataValidation.panel.range"),
850
- error: !p.ranges.length || m ? v.t("dataValidation.panel.rangeError") : "",
851
- children: /* @__PURE__ */ f(
853
+ error: !p.ranges.length || g ? v.t("dataValidation.panel.rangeError") : "",
854
+ children: /* @__PURE__ */ m(
852
855
  Ya,
853
856
  {
854
857
  unitId: a,
855
858
  subUnitId: i,
856
- initValue: ne,
859
+ initValue: nt,
857
860
  onChange: Y,
858
- onFocus: () => T(!0),
859
- isFocus: U,
860
- actions: L.current,
861
- onVerify: (O) => M(!O)
861
+ onFocus: () => P(!0),
862
+ isFocus: N,
863
+ actions: T.current,
864
+ onVerify: (O) => y(!O)
862
865
  }
863
866
  )
864
867
  }
865
868
  ),
866
- /* @__PURE__ */ f(q, { label: v.t("dataValidation.panel.type"), children: /* @__PURE__ */ f(
867
- en,
869
+ /* @__PURE__ */ m(q, { label: v.t("dataValidation.panel.type"), children: /* @__PURE__ */ m(
870
+ tn,
868
871
  {
869
872
  options: I == null ? void 0 : I.map((O) => ({
870
873
  label: v.t(O.title),
@@ -872,15 +875,15 @@ function Ui() {
872
875
  })),
873
876
  value: p.type,
874
877
  onChange: J,
875
- className: He.dataValidationDetailFormItem
878
+ className: Ht.dataValidationDetailFormItem
876
879
  }
877
880
  ) }),
878
- A != null && A.length ? /* @__PURE__ */ f(q, { label: v.t("dataValidation.panel.operator"), children: /* @__PURE__ */ f(
879
- en,
881
+ A != null && A.length ? /* @__PURE__ */ m(q, { label: v.t("dataValidation.panel.operator"), children: /* @__PURE__ */ m(
882
+ tn,
880
883
  {
881
884
  options: A.map((O, D) => ({
882
885
  value: `${O}`,
883
- label: F[D]
886
+ label: k[D]
884
887
  })),
885
888
  value: `${p.operator}`,
886
889
  onChange: (O) => {
@@ -889,13 +892,13 @@ function Ui() {
889
892
  operator: O
890
893
  });
891
894
  },
892
- className: He.dataValidationDetailFormItem
895
+ className: Ht.dataValidationDetailFormItem
893
896
  }
894
897
  ) }) : null,
895
- te ? /* @__PURE__ */ f(
896
- te,
898
+ et ? /* @__PURE__ */ m(
899
+ et,
897
900
  {
898
- isTwoFormula: N,
901
+ isTwoFormula: F,
899
902
  value: {
900
903
  formula1: p.formula1,
901
904
  formula2: p.formula2
@@ -906,18 +909,18 @@ function Ui() {
906
909
  ...O
907
910
  });
908
911
  },
909
- showError: g,
912
+ showError: f,
910
913
  validResult: R.validatorFormula(p, a, i),
911
914
  unitId: a,
912
915
  subUnitId: i,
913
- ruleId: l
916
+ ruleId: s
914
917
  },
915
- e + p.type
918
+ t + p.type
916
919
  ) : null,
917
- /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(
918
- Pt,
920
+ /* @__PURE__ */ m(q, { children: /* @__PURE__ */ m(
921
+ Le,
919
922
  {
920
- checked: (le = p.allowBlank) != null ? le : !0,
923
+ checked: (lt = p.allowBlank) != null ? lt : !0,
921
924
  onChange: () => {
922
925
  var O;
923
926
  return z({
@@ -928,38 +931,38 @@ function Ui() {
928
931
  children: v.t("dataValidation.panel.allowBlank")
929
932
  }
930
933
  ) }),
931
- /* @__PURE__ */ f(Oi, { value: se, onChange: ie, extraComponent: R.optionsInput }),
932
- /* @__PURE__ */ x("div", { className: He.dataValidationDetailButtons, children: [
933
- /* @__PURE__ */ f(Be, { className: He.dataValidationDetailButton, onClick: H, children: v.t("dataValidation.panel.removeRule") }),
934
- /* @__PURE__ */ f(Be, { className: He.dataValidationDetailButton, type: "primary", onClick: B, children: v.t("dataValidation.panel.done") })
934
+ /* @__PURE__ */ m(Mi, { value: st, onChange: it, extraComponent: R.optionsInput }),
935
+ /* @__PURE__ */ j("div", { className: Ht.dataValidationDetailButtons, children: [
936
+ /* @__PURE__ */ m(Ut, { className: Ht.dataValidationDetailButton, onClick: H, children: v.t("dataValidation.panel.removeRule") }),
937
+ /* @__PURE__ */ m(Ut, { className: Ht.dataValidationDetailButton, type: "primary", onClick: U, children: v.t("dataValidation.panel.done") })
935
938
  ] })
936
939
  ] });
937
940
  }
938
- const Bi = "univer-data-validation-item-container", $i = "univer-data-validation-item-title", ki = "univer-data-validation-item-content", Wi = "univer-data-validation-item-icon", ut = {
939
- dataValidationItemContainer: Bi,
940
- dataValidationItemTitle: $i,
941
- dataValidationItemContent: ki,
942
- dataValidationItemIcon: Wi
943
- }, Hi = (e) => {
944
- const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = P(be), l = P(ee), s = P(Va), c = r.getValidatorItem(t.type), u = ze(void 0), [h, d] = j(!1), v = (p) => {
945
- l.executeCommand(ro.id, {
946
- ruleId: t.uid,
941
+ const ki = "univer-data-validation-item-container", Fi = "univer-data-validation-item-title", Ni = "univer-data-validation-item-content", Ui = "univer-data-validation-item-icon", ue = {
942
+ dataValidationItemContainer: ki,
943
+ dataValidationItemTitle: Fi,
944
+ dataValidationItemContent: Ni,
945
+ dataValidationItemIcon: Ui
946
+ }, Bi = (t) => {
947
+ const { rule: e, onClick: o, unitId: n, subUnitId: a, disable: i } = t, r = L(Et), s = L(tt), l = L(Va), c = r.getValidatorItem(e.type), u = zt(void 0), [h, d] = x(!1), v = (p) => {
948
+ s.executeCommand(ro.id, {
949
+ ruleId: e.uid,
947
950
  unitId: n,
948
951
  subUnitId: a
949
952
  }), p.stopPropagation();
950
953
  };
951
- return Ie(() => () => {
954
+ return It(() => () => {
952
955
  var p;
953
956
  u.current && ((p = u.current) == null || p.forEach((C) => {
954
- C && s.removeShape(C);
957
+ C && l.removeShape(C);
955
958
  }));
956
- }, [s]), /* @__PURE__ */ x(
959
+ }, [l]), /* @__PURE__ */ j(
957
960
  "div",
958
961
  {
959
- className: ut.dataValidationItemContainer,
962
+ className: ue.dataValidationItemContainer,
960
963
  onClick: o,
961
964
  onMouseEnter: () => {
962
- i || (d(!0), u.current = t.ranges.map((p) => s.addShape({
965
+ i || (d(!0), u.current = e.ranges.map((p) => l.addShape({
963
966
  range: p,
964
967
  style: {
965
968
  // hasAutoFill: false,
@@ -974,41 +977,41 @@ const Bi = "univer-data-validation-item-container", $i = "univer-data-validation
974
977
  onMouseLeave: () => {
975
978
  var p;
976
979
  d(!1), (p = u.current) == null || p.forEach((C) => {
977
- C && s.removeShape(C);
980
+ C && l.removeShape(C);
978
981
  }), u.current = void 0;
979
982
  },
980
983
  children: [
981
- /* @__PURE__ */ f("div", { className: ut.dataValidationItemTitle, children: c == null ? void 0 : c.generateRuleName(t) }),
982
- /* @__PURE__ */ f("div", { className: ut.dataValidationItemContent, children: t.ranges.map((p) => go(p)).join(",") }),
983
- h ? /* @__PURE__ */ f("div", { className: ut.dataValidationItemIcon, onClick: v, children: /* @__PURE__ */ f(Rn, {}) }) : null
984
+ /* @__PURE__ */ m("div", { className: ue.dataValidationItemTitle, children: c == null ? void 0 : c.generateRuleName(e) }),
985
+ /* @__PURE__ */ m("div", { className: ue.dataValidationItemContent, children: e.ranges.map((p) => fo(p)).join(",") }),
986
+ h ? /* @__PURE__ */ m("div", { className: ue.dataValidationItemIcon, onClick: v, children: /* @__PURE__ */ m(Rn, {}) }) : null
984
987
  ]
985
988
  }
986
989
  );
987
- }, ji = "univer-data-validation-list", xi = "univer-data-validation-list-buttons", Yi = "univer-data-validation-list-button", ht = {
988
- dataValidationList: ji,
989
- dataValidationListButtons: xi,
990
- dataValidationListButton: Yi
990
+ }, $i = "univer-data-validation-list", Wi = "univer-data-validation-list-buttons", Hi = "univer-data-validation-list-button", he = {
991
+ dataValidationList: $i,
992
+ dataValidationListButtons: Wi,
993
+ dataValidationListButton: Hi
991
994
  };
992
- function Xi() {
993
- const e = P(ve), t = ke(
994
- () => e.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
995
+ function xi() {
996
+ const t = L(vt), e = $t(
997
+ () => t.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
995
998
  void 0,
996
999
  void 0,
997
1000
  []
998
1001
  );
999
- return t ? /* @__PURE__ */ f(zi, { workbook: t }) : null;
1002
+ return e ? /* @__PURE__ */ m(ji, { workbook: e }) : null;
1000
1003
  }
1001
- function zi(e) {
1002
- const t = P(ae), o = P(ve), n = P(ee), a = P($e), i = P(me), r = P(Q), [l, s] = j([]), { workbook: c } = e, u = ke(c.activeSheet$, void 0, !0), h = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
1003
- Ie(() => {
1004
- s(t.getRules(h, d));
1005
- const w = t.ruleChange$.subscribe((I) => {
1006
- I.unitId === h && I.subUnitId === d && s(t.getRules(h, d));
1004
+ function ji(t) {
1005
+ const e = L(at), o = L(vt), n = L(tt), a = L(Bt), i = L(gt), r = L(Q), [s, l] = x([]), { workbook: c } = t, u = $t(c.activeSheet$, void 0, !0), h = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
1006
+ It(() => {
1007
+ l(e.getRules(h, d));
1008
+ const w = e.ruleChange$.subscribe((I) => {
1009
+ I.unitId === h && I.subUnitId === d && l(e.getRules(h, d));
1007
1010
  });
1008
1011
  return () => {
1009
1012
  w.unsubscribe();
1010
1013
  };
1011
- }, [h, d, t]);
1014
+ }, [h, d, e]);
1012
1015
  const v = async () => {
1013
1016
  const w = so(a), I = {
1014
1017
  unitId: h,
@@ -1027,13 +1030,13 @@ function zi(e) {
1027
1030
  });
1028
1031
  }, R = ((w) => {
1029
1032
  const I = o.getCurrentUnitForType(X.UNIVER_SHEET), V = I.getActiveSheet(), _ = I.getUnitId(), S = V.getSheetId();
1030
- return w.map((M) => fa(a, _, S, M.ranges) ? { ...M } : { ...M, disable: !0 });
1031
- })(l), g = R == null ? void 0 : R.some((w) => w.disable);
1032
- return /* @__PURE__ */ x("div", { className: ht.dataValidationList, children: [
1033
+ return w.map((y) => ma(a, _, S, y.ranges) ? { ...y } : { ...y, disable: !0 });
1034
+ })(s), f = R == null ? void 0 : R.some((w) => w.disable);
1035
+ return /* @__PURE__ */ j("div", { className: he.dataValidationList, children: [
1033
1036
  R == null ? void 0 : R.map((w) => {
1034
1037
  var I;
1035
- return /* @__PURE__ */ f(
1036
- Hi,
1038
+ return /* @__PURE__ */ m(
1039
+ Bi,
1037
1040
  {
1038
1041
  unitId: h,
1039
1042
  subUnitId: d,
@@ -1050,148 +1053,148 @@ function zi(e) {
1050
1053
  w.uid
1051
1054
  );
1052
1055
  }),
1053
- /* @__PURE__ */ x("div", { className: ht.dataValidationListButtons, children: [
1054
- l.length && !g ? /* @__PURE__ */ f(Be, { className: ht.dataValidationListButton, onClick: p, children: r.t("dataValidation.panel.removeAll") }) : null,
1055
- /* @__PURE__ */ f(Be, { className: ht.dataValidationListButton, type: "primary", onClick: v, children: r.t("dataValidation.panel.add") })
1056
+ /* @__PURE__ */ j("div", { className: he.dataValidationListButtons, children: [
1057
+ s.length && !f ? /* @__PURE__ */ m(Ut, { className: he.dataValidationListButton, onClick: p, children: r.t("dataValidation.panel.removeAll") }) : null,
1058
+ /* @__PURE__ */ m(Ut, { className: he.dataValidationListButton, type: "primary", onClick: v, children: r.t("dataValidation.panel.add") })
1056
1059
  ] })
1057
1060
  ] });
1058
1061
  }
1059
- const Ki = () => {
1060
- const e = P(me), t = ke(e.activeRule$, e.activeRule);
1061
- return t ? /* @__PURE__ */ f(Ui, {}, t.rule.uid) : /* @__PURE__ */ f(Xi, {});
1062
- }, Mn = "data-validation.list.dropdown", bo = "data-validation.date.dropdown", Ft = {
1063
- type: et.COMMAND,
1062
+ const Yi = () => {
1063
+ const t = L(gt), e = $t(t.activeRule$, t.activeRule);
1064
+ return e ? /* @__PURE__ */ m(Ai, {}, e.rule.uid) : /* @__PURE__ */ m(xi, {});
1065
+ }, yn = "data-validation.list.dropdown", Eo = "data-validation.date.dropdown", ke = {
1066
+ type: te.COMMAND,
1064
1067
  id: "data-validation.command.addRuleAndOpen",
1065
- handler(e) {
1066
- const t = e.get(ve), o = Qn(t);
1068
+ handler(t) {
1069
+ const e = t.get(vt), o = Qn(e);
1067
1070
  if (!o) return !1;
1068
- const { workbook: n, worksheet: a } = o, i = so(e), r = e.get(ee), l = n.getUnitId(), s = a.getSheetId(), c = {
1071
+ const { workbook: n, worksheet: a } = o, i = so(t), r = t.get(tt), s = n.getUnitId(), l = a.getSheetId(), c = {
1069
1072
  rule: i,
1070
- unitId: l,
1071
- subUnitId: s
1073
+ unitId: s,
1074
+ subUnitId: l
1072
1075
  };
1073
- return r.syncExecuteCommand(_n.id, c) ? (r.syncExecuteCommand(We.id, {
1076
+ return r.syncExecuteCommand(_n.id, c) ? (r.syncExecuteCommand(Wt.id, {
1074
1077
  ruleId: i.uid,
1075
1078
  isAdd: !0
1076
1079
  }), !0) : !1;
1077
1080
  }
1078
1081
  };
1079
- var Gi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, qi = (e, t, o, n) => {
1080
- for (var a = n > 1 ? void 0 : n ? Zi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1081
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1082
- return n && a && Gi(t, o, a), a;
1083
- }, je = (e, t) => (o, n) => t(o, n, e);
1084
- const Pe = "SHEET_DATA_VALIDATION_ALERT";
1085
- let dt = class extends De {
1086
- constructor(e, t, o, n, a, i) {
1087
- super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = o, this._localeService = n, this._zenZoneService = a, this._dataValidationModel = i, this._init();
1082
+ var Xi = Object.getOwnPropertyDescriptor, zi = (t, e, o, n) => {
1083
+ for (var a = n > 1 ? void 0 : n ? Xi(e, o) : e, i = t.length - 1, r; i >= 0; i--)
1084
+ (r = t[i]) && (a = r(a) || a);
1085
+ return a;
1086
+ }, xt = (t, e) => (o, n) => e(o, n, t);
1087
+ const Lt = "SHEET_DATA_VALIDATION_ALERT";
1088
+ let de = class extends Dt {
1089
+ constructor(t, e, o, n, a, i) {
1090
+ super(), this._hoverManagerService = t, this._cellAlertManagerService = e, this._univerInstanceService = o, this._localeService = n, this._zenZoneService = a, this._dataValidationModel = i, this._init();
1088
1091
  }
1089
1092
  _init() {
1090
1093
  this._initCellAlertPopup(), this._initZenService();
1091
1094
  }
1092
1095
  _initCellAlertPopup() {
1093
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(wn(100)).subscribe((e) => {
1094
- var t;
1095
- if (e) {
1096
- const o = this._univerInstanceService.getUnit(e.location.unitId, X.UNIVER_SHEET), n = o.getSheetBySheetId(e.location.subUnitId);
1096
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(wn(100)).subscribe((t) => {
1097
+ var e;
1098
+ if (t) {
1099
+ const o = this._univerInstanceService.getUnit(t.location.unitId, X.UNIVER_SHEET), n = o.getSheetBySheetId(t.location.subUnitId);
1097
1100
  if (!n) return;
1098
- const a = this._dataValidationModel.getRuleByLocation(e.location.unitId, e.location.subUnitId, e.location.row, e.location.col);
1101
+ const a = this._dataValidationModel.getRuleByLocation(t.location.unitId, t.location.subUnitId, t.location.row, t.location.col);
1099
1102
  if (!a) {
1100
- this._cellAlertManagerService.removeAlert(Pe);
1103
+ this._cellAlertManagerService.removeAlert(Lt);
1101
1104
  return;
1102
1105
  }
1103
- if (this._dataValidationModel.validator(a, { ...e.location, workbook: o, worksheet: n }) === st.INVALID) {
1104
- const r = this._cellAlertManagerService.currentAlert.get(Pe), l = (t = r == null ? void 0 : r.alert) == null ? void 0 : t.location;
1105
- if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId) {
1106
- this._cellAlertManagerService.removeAlert(Pe);
1106
+ if (this._dataValidationModel.validator(a, { ...t.location, workbook: o, worksheet: n }) === se.INVALID) {
1107
+ const r = this._cellAlertManagerService.currentAlert.get(Lt), s = (e = r == null ? void 0 : r.alert) == null ? void 0 : e.location;
1108
+ if (s && s.row === t.location.row && s.col === t.location.col && s.subUnitId === t.location.subUnitId && s.unitId === t.location.unitId) {
1109
+ this._cellAlertManagerService.removeAlert(Lt);
1107
1110
  return;
1108
1111
  }
1109
- const s = this._dataValidationModel.getValidator(a.type);
1110
- if (!s) {
1111
- this._cellAlertManagerService.removeAlert(Pe);
1112
+ const l = this._dataValidationModel.getValidator(a.type);
1113
+ if (!l) {
1114
+ this._cellAlertManagerService.removeAlert(Lt);
1112
1115
  return;
1113
1116
  }
1114
1117
  this._cellAlertManagerService.showAlert({
1115
- type: ba.ERROR,
1118
+ type: Ea.ERROR,
1116
1119
  title: this._localeService.t("dataValidation.error.title"),
1117
- message: s == null ? void 0 : s.getRuleFinalError(a, e.location),
1118
- location: e.location,
1120
+ message: l == null ? void 0 : l.getRuleFinalError(a, t.location),
1121
+ location: t.location,
1119
1122
  width: 200,
1120
1123
  height: 74,
1121
- key: Pe
1124
+ key: Lt
1122
1125
  });
1123
1126
  return;
1124
1127
  }
1125
1128
  }
1126
- this._cellAlertManagerService.removeAlert(Pe);
1129
+ this._cellAlertManagerService.removeAlert(Lt);
1127
1130
  }));
1128
1131
  }
1129
1132
  _initZenService() {
1130
- this.disposeWithMe(this._zenZoneService.visible$.subscribe((e) => {
1131
- e && this._cellAlertManagerService.removeAlert(Pe);
1133
+ this.disposeWithMe(this._zenZoneService.visible$.subscribe((t) => {
1134
+ t && this._cellAlertManagerService.removeAlert(Lt);
1132
1135
  }));
1133
1136
  }
1134
1137
  };
1135
- dt = qi([
1136
- je(0, b(Ma)),
1137
- je(1, b(ya)),
1138
- je(2, ve),
1139
- je(3, b(Q)),
1140
- je(4, fo),
1141
- je(5, b(ae))
1142
- ], dt);
1143
- var Ji = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, er = (e, t, o, n) => {
1144
- for (var a = n > 1 ? void 0 : n ? Qi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1145
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1146
- return n && a && Ji(t, o, a), a;
1147
- }, kt = (e, t) => (o, n) => t(o, n, e);
1148
- let Ge = class extends De {
1149
- constructor(e, t, o) {
1150
- super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = o, this._initAutoFill();
1138
+ de = zi([
1139
+ xt(0, E(ya)),
1140
+ xt(1, E(Ma)),
1141
+ xt(2, vt),
1142
+ xt(3, E(Q)),
1143
+ xt(4, mo),
1144
+ xt(5, E(at))
1145
+ ], de);
1146
+ var Ki = Object.getOwnPropertyDescriptor, Gi = (t, e, o, n) => {
1147
+ for (var a = n > 1 ? void 0 : n ? Ki(e, o) : e, i = t.length - 1, r; i >= 0; i--)
1148
+ (r = t[i]) && (a = r(a) || a);
1149
+ return a;
1150
+ }, $e = (t, e) => (o, n) => e(o, n, t);
1151
+ let Gt = class extends Dt {
1152
+ constructor(t, e, o) {
1153
+ super(), this._autoFillService = t, this._sheetDataValidationModel = e, this._injector = o, this._initAutoFill();
1151
1154
  }
1152
1155
  // eslint-disable-next-line max-lines-per-function
1153
1156
  _initAutoFill() {
1154
- const e = () => ({ redos: [], undos: [] }), t = (n, a) => {
1155
- const { source: i, target: r, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = rn([i, r]), [h, d] = u.ranges, { mapFunc: v } = u, p = {
1157
+ const t = () => ({ redos: [], undos: [] }), e = (n, a) => {
1158
+ const { source: i, target: r, unitId: s, subUnitId: l } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(s, l).clone(), u = rn([i, r]), [h, d] = u.ranges, { mapFunc: v } = u, p = {
1156
1159
  row: h.startRow,
1157
1160
  col: h.startColumn
1158
- }, C = Oa(h, d), R = new St(), g = /* @__PURE__ */ new Set();
1161
+ }, C = Oa(h, d), R = new Se(), f = /* @__PURE__ */ new Set();
1159
1162
  C.forEach((S) => {
1160
- const m = S.repeatStartCell, M = S.relativeRange, L = {
1163
+ const g = S.repeatStartCell, y = S.relativeRange, T = {
1161
1164
  startRow: p.row,
1162
1165
  startColumn: p.col,
1163
1166
  endColumn: p.col,
1164
1167
  endRow: p.row
1165
- }, U = {
1166
- startRow: m.row,
1167
- startColumn: m.col,
1168
- endColumn: m.col,
1169
- endRow: m.row
1168
+ }, N = {
1169
+ startRow: g.row,
1170
+ startColumn: g.col,
1171
+ endColumn: g.col,
1172
+ endRow: g.row
1170
1173
  };
1171
- qo.foreach(M, (T, E) => {
1172
- const A = Ct.getPositionRange(
1174
+ qo.foreach(y, (P, b) => {
1175
+ const A = Ce.getPositionRange(
1173
1176
  {
1174
- startRow: T,
1175
- startColumn: E,
1176
- endColumn: E,
1177
- endRow: T
1177
+ startRow: P,
1178
+ startColumn: b,
1179
+ endColumn: b,
1180
+ endRow: P
1178
1181
  },
1179
- L
1180
- ), { row: F, col: N } = v(A.startRow, A.startColumn), B = this._sheetDataValidationModel.getRuleIdByLocation(l, s, F, N) || "", Y = Ct.getPositionRange(
1182
+ T
1183
+ ), { row: k, col: F } = v(A.startRow, A.startColumn), U = this._sheetDataValidationModel.getRuleIdByLocation(s, l, k, F) || "", Y = Ce.getPositionRange(
1181
1184
  {
1182
- startRow: T,
1183
- startColumn: E,
1184
- endColumn: E,
1185
- endRow: T
1185
+ startRow: P,
1186
+ startColumn: b,
1187
+ endColumn: b,
1188
+ endRow: P
1186
1189
  },
1187
- U
1190
+ N
1188
1191
  ), { row: z, col: H } = v(Y.startRow, Y.startColumn);
1189
- R.setValue(z, H, B), g.add(B);
1192
+ R.setValue(z, H, U), f.add(U);
1190
1193
  });
1191
1194
  });
1192
- const w = Array.from(g).map((S) => ({ id: S, ranges: Jt(R, (m) => m === S) }));
1195
+ const w = Array.from(f).map((S) => ({ id: S, ranges: Je(R, (g) => g === S) }));
1193
1196
  c.addRangeRules(w);
1194
- const I = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: _ } = on(l, s, I, this._injector, "patched", a === ot.ONLY_FORMAT);
1197
+ const I = c.diff(this._sheetDataValidationModel.getRules(s, l)), { redoMutations: V, undoMutations: _ } = on(s, l, I, this._injector, "patched", a === oe.ONLY_FORMAT);
1195
1198
  return {
1196
1199
  undos: _,
1197
1200
  redos: V
@@ -1200,102 +1203,102 @@ let Ge = class extends De {
1200
1203
  id: lo,
1201
1204
  onBeforeFillData: (n) => {
1202
1205
  const { source: a, unitId: i, subUnitId: r } = n;
1203
- for (const l of a.rows)
1204
- for (const s of a.cols) {
1205
- const c = this._sheetDataValidationModel.getRuleByLocation(i, r, l, s);
1206
+ for (const s of a.rows)
1207
+ for (const l of a.cols) {
1208
+ const c = this._sheetDataValidationModel.getRuleByLocation(i, r, s, l);
1206
1209
  if (c && c.type === K.CHECKBOX) {
1207
- this._autoFillService.setDisableApplyType(ot.SERIES, !0);
1210
+ this._autoFillService.setDisableApplyType(oe.SERIES, !0);
1208
1211
  return;
1209
1212
  }
1210
1213
  }
1211
1214
  },
1212
- onFillData: (n, a, i) => i === ot.COPY || i === ot.ONLY_FORMAT || i === ot.SERIES ? t(n, i) : e(),
1215
+ onFillData: (n, a, i) => i === oe.COPY || i === oe.ONLY_FORMAT || i === oe.SERIES ? e(n, i) : t(),
1213
1216
  onAfterFillData: () => {
1214
1217
  }
1215
1218
  };
1216
1219
  this.disposeWithMe(this._autoFillService.addHook(o));
1217
1220
  }
1218
1221
  };
1219
- Ge = er([
1220
- kt(0, Ea),
1221
- kt(1, b(ae)),
1222
- kt(2, b($e))
1223
- ], Ge);
1224
- var tr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, or = (e, t, o, n) => {
1225
- for (var a = n > 1 ? void 0 : n ? nr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1226
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1227
- return n && a && tr(t, o, a), a;
1228
- }, Wt = (e, t) => (o, n) => t(o, n, e);
1229
- let Ze = class extends De {
1230
- constructor(t, o, n) {
1222
+ Gt = Gi([
1223
+ $e(0, ba),
1224
+ $e(1, E(at)),
1225
+ $e(2, E(Bt))
1226
+ ], Gt);
1227
+ var Zi = Object.getOwnPropertyDescriptor, qi = (t, e, o, n) => {
1228
+ for (var a = n > 1 ? void 0 : n ? Zi(e, o) : e, i = t.length - 1, r; i >= 0; i--)
1229
+ (r = t[i]) && (a = r(a) || a);
1230
+ return a;
1231
+ }, We = (t, e) => (o, n) => e(o, n, t);
1232
+ let Zt = class extends Dt {
1233
+ constructor(e, o, n) {
1231
1234
  super();
1232
- y(this, "_copyInfo");
1233
- this._sheetClipboardService = t, this._sheetDataValidationModel = o, this._injector = n, this._initCopyPaste();
1235
+ M(this, "_copyInfo");
1236
+ this._sheetClipboardService = e, this._sheetDataValidationModel = o, this._injector = n, this._initCopyPaste();
1234
1237
  }
1235
1238
  _initCopyPaste() {
1236
1239
  this._sheetClipboardService.addClipboardHook({
1237
1240
  id: lo,
1238
- onBeforeCopy: (t, o, n) => this._collect(t, o, n),
1239
- onPasteCells: (t, o, n, a) => {
1240
- const { copyType: i = Ln.COPY, pasteType: r } = a, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = o;
1241
- return this._generateMutations(s, { copyType: i, pasteType: r, copyRange: l, unitId: c, subUnitId: u });
1241
+ onBeforeCopy: (e, o, n) => this._collect(e, o, n),
1242
+ onPasteCells: (e, o, n, a) => {
1243
+ const { copyType: i = Tn.COPY, pasteType: r } = a, { range: s } = e || {}, { range: l, unitId: c, subUnitId: u } = o;
1244
+ return this._generateMutations(l, { copyType: i, pasteType: r, copyRange: s, unitId: c, subUnitId: u });
1242
1245
  }
1243
1246
  });
1244
1247
  }
1245
- _collect(t, o, n) {
1246
- const a = new St();
1248
+ _collect(e, o, n) {
1249
+ const a = new Se();
1247
1250
  this._copyInfo = {
1248
- unitId: t,
1251
+ unitId: e,
1249
1252
  subUnitId: o,
1250
1253
  matrix: a
1251
1254
  };
1252
- const i = this._injector.invoke((s) => Pa(n, s, t, o));
1255
+ const i = this._injector.invoke((l) => Ta(n, l, e, o));
1253
1256
  if (!i)
1254
1257
  return;
1255
- const { rows: r, cols: l } = i;
1256
- r.forEach((s, c) => {
1257
- l.forEach((u, h) => {
1258
- const d = this._sheetDataValidationModel.getRuleIdByLocation(t, o, s, u);
1258
+ const { rows: r, cols: s } = i;
1259
+ r.forEach((l, c) => {
1260
+ s.forEach((u, h) => {
1261
+ const d = this._sheetDataValidationModel.getRuleIdByLocation(e, o, l, u);
1259
1262
  a.setValue(c, h, d != null ? d : "");
1260
1263
  });
1261
1264
  });
1262
1265
  }
1263
1266
  // eslint-disable-next-line max-lines-per-function
1264
- _generateMutations(t, o) {
1267
+ _generateMutations(e, o) {
1265
1268
  if (!this._copyInfo)
1266
1269
  return { redos: [], undos: [] };
1267
- if (o.copyType === Ln.CUT)
1270
+ if (o.copyType === Tn.CUT)
1268
1271
  return this._copyInfo = null, { redos: [], undos: [] };
1269
1272
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !o.copyRange)
1270
1273
  return { redos: [], undos: [] };
1271
1274
  if ([
1272
- ct.SPECIAL_PASTE_COL_WIDTH,
1273
- ct.SPECIAL_PASTE_VALUE,
1274
- ct.SPECIAL_PASTE_FORMAT,
1275
- ct.SPECIAL_PASTE_FORMULA
1275
+ ce.SPECIAL_PASTE_COL_WIDTH,
1276
+ ce.SPECIAL_PASTE_VALUE,
1277
+ ce.SPECIAL_PASTE_FORMAT,
1278
+ ce.SPECIAL_PASTE_FORMULA
1276
1279
  ].includes(o.pasteType))
1277
1280
  return { redos: [], undos: [] };
1278
1281
  const { unitId: a, subUnitId: i } = this._copyInfo;
1279
1282
  if (o.unitId !== a || i !== o.subUnitId) {
1280
- const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), l = new St(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = rn([o.copyRange, t]), d = Tn(c, u, !0), v = /* @__PURE__ */ new Map();
1281
- d.forEach(({ startRange: g }) => {
1283
+ const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), s = new Se(), l = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = rn([o.copyRange, e]), d = Pn(c, u, !0), v = /* @__PURE__ */ new Map();
1284
+ d.forEach(({ startRange: f }) => {
1282
1285
  var w;
1283
1286
  (w = this._copyInfo) == null || w.matrix.forValue((I, V, _) => {
1284
- const S = Ct.getPositionRange(
1287
+ const S = Ce.getPositionRange(
1285
1288
  {
1286
1289
  startRow: I,
1287
1290
  endRow: I,
1288
1291
  startColumn: V,
1289
1292
  endColumn: V
1290
1293
  },
1291
- g
1292
- ), m = `${i}-${_}`, M = this._sheetDataValidationModel.getRuleById(a, i, _);
1293
- !this._sheetDataValidationModel.getRuleById(o.unitId, o.subUnitId, m) && M && v.set(m, { ...M, uid: m });
1294
- const { row: L, col: U } = h(S.startRow, S.startColumn);
1295
- s.add(m), l.setValue(L, U, m);
1294
+ f
1295
+ ), g = `${i}-${_}`, y = this._sheetDataValidationModel.getRuleById(a, i, _);
1296
+ !this._sheetDataValidationModel.getRuleById(o.unitId, o.subUnitId, g) && y && v.set(g, { ...y, uid: g });
1297
+ const { row: T, col: N } = h(S.startRow, S.startColumn);
1298
+ l.add(g), s.setValue(T, N, g);
1296
1299
  });
1297
1300
  });
1298
- const p = Array.from(s).map((g) => ({ id: g, ranges: Jt(l, (w) => w === g) }));
1301
+ const p = Array.from(l).map((f) => ({ id: f, ranges: Je(s, (w) => w === f) }));
1299
1302
  r.addRangeRules(p);
1300
1303
  const { redoMutations: C, undoMutations: R } = on(
1301
1304
  o.unitId,
@@ -1310,11 +1313,11 @@ let Ze = class extends De {
1310
1313
  undos: R
1311
1314
  };
1312
1315
  } else {
1313
- const r = this._sheetDataValidationModel.getRuleObjectMatrix(a, i).clone(), l = new St(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = rn([o.copyRange, t]);
1314
- Tn(c, u, !0).forEach(({ startRange: R }) => {
1315
- var g;
1316
- (g = this._copyInfo) == null || g.matrix.forValue((w, I, V) => {
1317
- const _ = Ct.getPositionRange(
1316
+ const r = this._sheetDataValidationModel.getRuleObjectMatrix(a, i).clone(), s = new Se(), l = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = rn([o.copyRange, e]);
1317
+ Pn(c, u, !0).forEach(({ startRange: R }) => {
1318
+ var f;
1319
+ (f = this._copyInfo) == null || f.matrix.forValue((w, I, V) => {
1320
+ const _ = Ce.getPositionRange(
1318
1321
  {
1319
1322
  startRow: w,
1320
1323
  endRow: w,
@@ -1322,11 +1325,11 @@ let Ze = class extends De {
1322
1325
  endColumn: I
1323
1326
  },
1324
1327
  R
1325
- ), { row: S, col: m } = h(_.startRow, _.startColumn);
1326
- l.setValue(S, m, V), s.add(V);
1328
+ ), { row: S, col: g } = h(_.startRow, _.startColumn);
1329
+ s.setValue(S, g, V), l.add(V);
1327
1330
  });
1328
1331
  });
1329
- const v = Array.from(s).map((R) => ({ id: R, ranges: Jt(l, (g) => g === R) }));
1332
+ const v = Array.from(l).map((R) => ({ id: R, ranges: Je(s, (f) => f === R) }));
1330
1333
  r.addRangeRules(v);
1331
1334
  const { redoMutations: p, undoMutations: C } = on(
1332
1335
  a,
@@ -1343,119 +1346,119 @@ let Ze = class extends De {
1343
1346
  }
1344
1347
  }
1345
1348
  };
1346
- Ze = or([
1347
- Wt(0, La),
1348
- Wt(1, b(ae)),
1349
- Wt(2, b($e))
1350
- ], Ze);
1351
- var ar = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, rr = (e, t, o, n) => {
1352
- for (var a = n > 1 ? void 0 : n ? ir(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1353
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1354
- return n && a && ar(t, o, a), a;
1355
- }, Ht = (e, t) => (o, n) => t(o, n, e);
1356
- let qe = class extends De {
1357
- constructor(e, t, o) {
1358
- super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = o, this._commandExecutedListener();
1349
+ Zt = qi([
1350
+ We(0, La),
1351
+ We(1, E(at)),
1352
+ We(2, E(Bt))
1353
+ ], Zt);
1354
+ var Ji = Object.getOwnPropertyDescriptor, Qi = (t, e, o, n) => {
1355
+ for (var a = n > 1 ? void 0 : n ? Ji(e, o) : e, i = t.length - 1, r; i >= 0; i--)
1356
+ (r = t[i]) && (a = r(a) || a);
1357
+ return a;
1358
+ }, He = (t, e) => (o, n) => e(o, n, t);
1359
+ let qt = class extends Dt {
1360
+ constructor(t, e, o) {
1361
+ super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController = o, this._commandExecutedListener();
1359
1362
  }
1360
1363
  _commandExecutedListener() {
1361
1364
  this.disposeWithMe(
1362
- this._commandService.beforeCommandExecuted((e) => {
1363
- e.id === _n.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1364
- workbookTypes: [It],
1365
- rangeTypes: [wt],
1366
- worksheetTypes: [Rt, nn]
1367
- }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === io.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1368
- workbookTypes: [It],
1369
- rangeTypes: [wt],
1370
- worksheetTypes: [Rt, nn]
1371
- }, e.params.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
1365
+ this._commandService.beforeCommandExecuted((t) => {
1366
+ t.id === _n.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1367
+ workbookTypes: [Re],
1368
+ rangeTypes: [we],
1369
+ worksheetTypes: [Ie, nn]
1370
+ }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), t.id === io.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1371
+ workbookTypes: [Re],
1372
+ rangeTypes: [we],
1373
+ worksheetTypes: [Ie, nn]
1374
+ }, t.params.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
1372
1375
  })
1373
1376
  );
1374
1377
  }
1375
1378
  };
1376
- qe = rr([
1377
- Ht(0, b(Q)),
1378
- Ht(1, ee),
1379
- Ht(2, b(eo))
1380
- ], qe);
1381
- const Eo = "data-validation-single", Oo = "sheet.menu.data-validation";
1382
- function sr(e) {
1379
+ qt = Qi([
1380
+ He(0, E(Q)),
1381
+ He(1, tt),
1382
+ He(2, E(to))
1383
+ ], qt);
1384
+ const bo = "data-validation-single", Oo = "sheet.menu.data-validation";
1385
+ function tr(t) {
1383
1386
  return {
1384
1387
  id: Oo,
1385
1388
  type: Cn.SUBITEMS,
1386
- icon: Eo,
1389
+ icon: bo,
1387
1390
  tooltip: "dataValidation.title",
1388
- hidden$: Na(e, X.UNIVER_SHEET),
1389
- disabled$: Ta(e, { workbookTypes: [It], worksheetTypes: [nn, Rt], rangeTypes: [wt] })
1391
+ hidden$: Fa(t, X.UNIVER_SHEET),
1392
+ disabled$: Pa(t, { workbookTypes: [Re], worksheetTypes: [nn, Ie], rangeTypes: [we] })
1390
1393
  };
1391
1394
  }
1392
- function lr(e) {
1395
+ function er(t) {
1393
1396
  return {
1394
- id: We.id,
1397
+ id: Wt.id,
1395
1398
  title: "dataValidation.panel.title",
1396
1399
  type: Cn.BUTTON
1397
1400
  };
1398
1401
  }
1399
- function dr(e) {
1402
+ function nr(t) {
1400
1403
  return {
1401
- id: Ft.id,
1404
+ id: ke.id,
1402
1405
  title: "dataValidation.panel.add",
1403
1406
  type: Cn.BUTTON
1404
1407
  };
1405
1408
  }
1406
- const cr = {
1407
- [Ua.FORMULAS_INSERT]: {
1409
+ const or = {
1410
+ [Na.FORMULAS_INSERT]: {
1408
1411
  [Oo]: {
1409
1412
  order: 9,
1410
- menuItemFactory: sr,
1411
- [We.id]: {
1413
+ menuItemFactory: tr,
1414
+ [Wt.id]: {
1412
1415
  order: 0,
1413
- menuItemFactory: lr
1416
+ menuItemFactory: er
1414
1417
  },
1415
- [Ft.id]: {
1418
+ [ke.id]: {
1416
1419
  order: 1,
1417
- menuItemFactory: dr
1420
+ menuItemFactory: nr
1418
1421
  }
1419
1422
  }
1420
1423
  }
1421
1424
  };
1422
- var ur = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, Po = (e, t, o, n) => {
1423
- for (var a = n > 1 ? void 0 : n ? hr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1424
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1425
- return n && a && ur(t, o, a), a;
1426
- }, Z = (e, t) => (o, n) => t(o, n, e);
1427
- const Lo = {
1425
+ var ar = Object.getOwnPropertyDescriptor, Lo = (t, e, o, n) => {
1426
+ for (var a = n > 1 ? void 0 : n ? ar(e, o) : e, i = t.length - 1, r; i >= 0; i--)
1427
+ (r = t[i]) && (a = r(a) || a);
1428
+ return a;
1429
+ }, Z = (t, e) => (o, n) => e(o, n, t);
1430
+ const To = {
1428
1431
  tr: {
1429
1432
  size: 6,
1430
1433
  color: "#fe4b4b"
1431
1434
  }
1432
1435
  };
1433
- let Je = class extends fn {
1434
- constructor(e, t, o, n, a, i, r, l, s, c, u) {
1435
- super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = o, this._univerInstanceService = n, this._autoHeightController = a, this._dropdownManagerService = i, this._sheetDataValidationModel = r, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = c, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
1436
+ let Jt = class extends mn {
1437
+ constructor(t, e, o, n, a, i, r, s, l, c, u) {
1438
+ super(), this._commandService = t, this._menuManagerService = e, this._renderManagerService = o, this._univerInstanceService = n, this._autoHeightController = a, this._dropdownManagerService = i, this._sheetDataValidationModel = r, this._dataValidatorRegistryService = s, this._sheetInterceptorService = l, this._dataValidationCacheService = c, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
1436
1439
  }
1437
1440
  _initMenu() {
1438
- this._menuManagerService.mergeMenu(cr);
1441
+ this._menuManagerService.mergeMenu(or);
1439
1442
  }
1440
1443
  _initDropdown() {
1441
- this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
1444
+ this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((t) => {
1442
1445
  var o;
1443
- if (!e.visible) {
1446
+ if (!t.visible) {
1444
1447
  ((o = this._dropdownManagerService.activeDropdown) == null ? void 0 : o.trigger) === "editor-bridge" && this._dropdownManagerService.hideDropdown();
1445
1448
  return;
1446
1449
  }
1447
- const t = this._editorBridgeService.getEditCellState();
1448
- if (t) {
1449
- const { unitId: n, sheetId: a, row: i, column: r } = t, l = this._univerInstanceService.getUniverSheetInstance(n);
1450
- if (!l)
1451
- return;
1452
- const s = this._sheetDataValidationModel.getRuleByLocation(n, a, i, r);
1450
+ const e = this._editorBridgeService.getEditCellState();
1451
+ if (e) {
1452
+ const { unitId: n, sheetId: a, row: i, column: r } = e, s = this._univerInstanceService.getUniverSheetInstance(n);
1453
1453
  if (!s)
1454
1454
  return;
1455
- const c = this._dataValidatorRegistryService.getValidatorItem(s.type);
1455
+ const l = this._sheetDataValidationModel.getRuleByLocation(n, a, i, r);
1456
+ if (!l)
1457
+ return;
1458
+ const c = this._dataValidatorRegistryService.getValidatorItem(l.type);
1456
1459
  if (!(c != null && c.dropdown))
1457
1460
  return;
1458
- const u = l.getActiveSheet();
1461
+ const u = s.getActiveSheet();
1459
1462
  if (!u) return;
1460
1463
  const h = this._dropdownManagerService.activeDropdown, d = h == null ? void 0 : h.location;
1461
1464
  if (d && d.unitId === n && d.subUnitId === a && d.row === i && d.col === r)
@@ -1467,7 +1470,7 @@ let Je = class extends fn {
1467
1470
  subUnitId: a,
1468
1471
  row: i,
1469
1472
  col: r,
1470
- workbook: l,
1473
+ workbook: s,
1471
1474
  worksheet: u
1472
1475
  },
1473
1476
  componentKey: c.dropdown,
@@ -1484,26 +1487,26 @@ let Je = class extends fn {
1484
1487
  _initViewModelIntercept() {
1485
1488
  this.disposeWithMe(
1486
1489
  this._sheetInterceptorService.intercept(
1487
- to.CELL_CONTENT,
1490
+ eo.CELL_CONTENT,
1488
1491
  {
1489
1492
  effect: zn.Style,
1490
1493
  // must be after numfmt
1491
1494
  priority: no.DATA_VALIDATION,
1492
1495
  // eslint-disable-next-line max-lines-per-function, complexity
1493
- handler: (e, t, o) => {
1494
- var g, w, I, V, _;
1495
- const { row: n, col: a, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1496
+ handler: (t, e, o) => {
1497
+ var f, w, I, V, _;
1498
+ const { row: n, col: a, unitId: i, subUnitId: r, workbook: s, worksheet: l } = e, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1496
1499
  if (!c)
1497
- return o(e);
1500
+ return o(t);
1498
1501
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1499
1502
  if (!u)
1500
- return o(e);
1501
- const h = (g = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? g : st.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), v = t.rawData;
1503
+ return o(t);
1504
+ const h = (f = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? f : se.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), v = e.rawData;
1502
1505
  let p;
1503
1506
  const C = {
1504
1507
  get value() {
1505
1508
  var S;
1506
- return p !== void 0 || (p = (S = re(v)) != null ? S : null), p;
1509
+ return p !== void 0 || (p = (S = rt(v)) != null ? S : null), p;
1507
1510
  }
1508
1511
  }, R = {
1509
1512
  get value() {
@@ -1512,65 +1515,65 @@ let Je = class extends fn {
1512
1515
  }
1513
1516
  };
1514
1517
  return o({
1515
- ...e,
1518
+ ...t,
1516
1519
  markers: {
1517
- ...e == null ? void 0 : e.markers,
1518
- ...h === st.INVALID ? Lo : null
1520
+ ...t == null ? void 0 : t.markers,
1521
+ ...h === se.INVALID ? To : null
1519
1522
  },
1520
1523
  customRender: [
1521
- ...(w = e == null ? void 0 : e.customRender) != null ? w : [],
1524
+ ...(w = t == null ? void 0 : t.customRender) != null ? w : [],
1522
1525
  ...d != null && d.canvasRender ? [d.canvasRender] : []
1523
1526
  ],
1524
1527
  fontRenderExtension: {
1525
- ...e == null ? void 0 : e.fontRenderExtension,
1526
- isSkip: ((I = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : I.isSkip) || ((V = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : V.call(d, u, C.value, t))
1528
+ ...t == null ? void 0 : t.fontRenderExtension,
1529
+ isSkip: ((I = t == null ? void 0 : t.fontRenderExtension) == null ? void 0 : I.isSkip) || ((V = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : V.call(d, u, C.value, e))
1527
1530
  },
1528
1531
  interceptorStyle: {
1529
- ...e == null ? void 0 : e.interceptorStyle,
1532
+ ...t == null ? void 0 : t.interceptorStyle,
1530
1533
  ...d == null ? void 0 : d.getExtraStyle(u, R.value, {
1531
1534
  get style() {
1532
- const S = l.getStyles();
1533
- return (typeof (e == null ? void 0 : e.s) == "string" ? S.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1535
+ const S = s.getStyles();
1536
+ return (typeof (t == null ? void 0 : t.s) == "string" ? S.get(t == null ? void 0 : t.s) : t == null ? void 0 : t.s) || {};
1534
1537
  }
1535
1538
  }, n, a)
1536
1539
  },
1537
1540
  interceptorAutoHeight: () => {
1538
- var L, U, T, E, A, F;
1539
- const S = (U = (L = this._renderManagerService.getRenderById(i)) == null ? void 0 : L.with(Dt).getSkeletonParam(r)) == null ? void 0 : U.skeleton;
1541
+ var T, N, P, b, A, k;
1542
+ const S = (N = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(De).getSkeletonParam(r)) == null ? void 0 : N.skeleton;
1540
1543
  if (!S)
1541
1544
  return;
1542
- const m = S.worksheet.getMergedCell(n, a), M = {
1543
- data: e,
1544
- style: S.getStyles().getStyleByCell(e),
1545
- primaryWithCoord: S.getCellWithCoordByIndex((T = m == null ? void 0 : m.startRow) != null ? T : n, (E = m == null ? void 0 : m.startColumn) != null ? E : a),
1545
+ const g = S.worksheet.getMergedCell(n, a), y = {
1546
+ data: t,
1547
+ style: S.getStyles().getStyleByCell(t),
1548
+ primaryWithCoord: S.getCellWithCoordByIndex((P = g == null ? void 0 : g.startRow) != null ? P : n, (b = g == null ? void 0 : g.startColumn) != null ? b : a),
1546
1549
  unitId: i,
1547
1550
  subUnitId: r,
1548
1551
  row: n,
1549
1552
  col: a,
1550
- workbook: l,
1551
- worksheet: s
1553
+ workbook: s,
1554
+ worksheet: l
1552
1555
  };
1553
- return (F = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : F.call(A, M);
1556
+ return (k = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : k.call(A, y);
1554
1557
  },
1555
1558
  interceptorAutoWidth: () => {
1556
- var L, U, T, E, A, F;
1557
- const S = (U = (L = this._renderManagerService.getRenderById(i)) == null ? void 0 : L.with(Dt).getSkeletonParam(r)) == null ? void 0 : U.skeleton;
1559
+ var T, N, P, b, A, k;
1560
+ const S = (N = (T = this._renderManagerService.getRenderById(i)) == null ? void 0 : T.with(De).getSkeletonParam(r)) == null ? void 0 : N.skeleton;
1558
1561
  if (!S)
1559
1562
  return;
1560
- const m = S.worksheet.getMergedCell(n, a), M = {
1561
- data: e,
1562
- style: S.getStyles().getStyleByCell(e),
1563
- primaryWithCoord: S.getCellWithCoordByIndex((T = m == null ? void 0 : m.startRow) != null ? T : n, (E = m == null ? void 0 : m.startColumn) != null ? E : a),
1563
+ const g = S.worksheet.getMergedCell(n, a), y = {
1564
+ data: t,
1565
+ style: S.getStyles().getStyleByCell(t),
1566
+ primaryWithCoord: S.getCellWithCoordByIndex((P = g == null ? void 0 : g.startRow) != null ? P : n, (b = g == null ? void 0 : g.startColumn) != null ? b : a),
1564
1567
  unitId: i,
1565
1568
  subUnitId: r,
1566
1569
  row: n,
1567
1570
  col: a,
1568
- workbook: l,
1569
- worksheet: s
1571
+ workbook: s,
1572
+ worksheet: l
1570
1573
  };
1571
- return (F = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoWidth) == null ? void 0 : F.call(A, M);
1574
+ return (k = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoWidth) == null ? void 0 : k.call(A, y);
1572
1575
  },
1573
- coverable: ((_ = e == null ? void 0 : e.coverable) != null ? _ : !0) && !(u.type === K.LIST || u.type === K.LIST_MULTIPLE)
1576
+ coverable: ((_ = t == null ? void 0 : t.coverable) != null ? _ : !0) && !(u.type === K.LIST || u.type === K.LIST_MULTIPLE)
1574
1577
  });
1575
1578
  }
1576
1579
  }
@@ -1581,99 +1584,99 @@ let Je = class extends fn {
1581
1584
  this._sheetDataValidationModel.ruleChange$.pipe(
1582
1585
  // patched data-validation change don't need to re-calc row height
1583
1586
  // re-calc of row height will be triggered precisely by the origin command
1584
- In((e) => e.source === "command"),
1585
- mo(100)
1586
- ).subscribe((e) => {
1587
- if (e.length === 0)
1587
+ In((t) => t.source === "command"),
1588
+ go(100)
1589
+ ).subscribe((t) => {
1590
+ if (t.length === 0)
1588
1591
  return;
1589
- const t = [];
1590
- if (e.forEach((o) => {
1592
+ const e = [];
1593
+ if (t.forEach((o) => {
1591
1594
  var n;
1592
- (o.rule.type === K.LIST_MULTIPLE || o.rule.type === K.LIST) && (n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
1593
- }), t.length) {
1594
- const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1595
+ (o.rule.type === K.LIST_MULTIPLE || o.rule.type === K.LIST) && (n = o.rule) != null && n.ranges && e.push(...o.rule.ranges);
1596
+ }), e.length) {
1597
+ const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(e);
1595
1598
  Kn(o.redos, this._commandService);
1596
1599
  }
1597
1600
  });
1598
1601
  }
1599
1602
  };
1600
- Je = Po([
1601
- Z(0, ee),
1602
- Z(1, Ba),
1603
- Z(2, Ve),
1604
- Z(3, ve),
1605
- Z(4, b(ho)),
1606
- Z(5, b(Re)),
1607
- Z(6, b(ae)),
1608
- Z(7, b(be)),
1609
- Z(8, b(gn)),
1610
- Z(9, b(co)),
1603
+ Jt = Lo([
1604
+ Z(0, tt),
1605
+ Z(1, Ua),
1606
+ Z(2, Vt),
1607
+ Z(3, vt),
1608
+ Z(4, E(ho)),
1609
+ Z(5, E(Rt)),
1610
+ Z(6, E(at)),
1611
+ Z(7, E(Et)),
1612
+ Z(8, E(fn)),
1613
+ Z(9, E(co)),
1611
1614
  Z(10, Jo(uo))
1612
- ], Je);
1613
- let kn = class extends fn {
1614
- constructor(e, t, o, n, a, i, r) {
1615
- super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = o, this._dataValidatorRegistryService = n, this._sheetInterceptorService = a, this._sheetDataValidationModel = i, this._dataValidationCacheService = r, this._initViewModelIntercept(), this._initAutoHeight();
1615
+ ], Jt);
1616
+ let $n = class extends mn {
1617
+ constructor(t, e, o, n, a, i, r) {
1618
+ super(), this._commandService = t, this._renderManagerService = e, this._autoHeightController = o, this._dataValidatorRegistryService = n, this._sheetInterceptorService = a, this._sheetDataValidationModel = i, this._dataValidationCacheService = r, this._initViewModelIntercept(), this._initAutoHeight();
1616
1619
  }
1617
1620
  _initViewModelIntercept() {
1618
1621
  this.disposeWithMe(
1619
1622
  this._sheetInterceptorService.intercept(
1620
- to.CELL_CONTENT,
1623
+ eo.CELL_CONTENT,
1621
1624
  {
1622
1625
  effect: zn.Style,
1623
1626
  // must be after numfmt
1624
1627
  priority: no.DATA_VALIDATION,
1625
1628
  // eslint-disable-next-line complexity
1626
- handler: (e, t, o) => {
1627
- var R, g, w, I, V;
1628
- const { row: n, col: a, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1629
+ handler: (t, e, o) => {
1630
+ var R, f, w, I, V;
1631
+ const { row: n, col: a, unitId: i, subUnitId: r, workbook: s, worksheet: l } = e, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1629
1632
  if (!c)
1630
- return o(e);
1633
+ return o(t);
1631
1634
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1632
1635
  if (!u)
1633
- return o(e);
1634
- const h = (R = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? R : st.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), v = s.getCellRaw(n, a), p = re(v), C = `${p != null ? p : ""}`;
1636
+ return o(t);
1637
+ const h = (R = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? R : se.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), v = l.getCellRaw(n, a), p = rt(v), C = `${p != null ? p : ""}`;
1635
1638
  return o({
1636
- ...e,
1639
+ ...t,
1637
1640
  markers: {
1638
- ...e == null ? void 0 : e.markers,
1639
- ...h === st.INVALID ? Lo : null
1641
+ ...t == null ? void 0 : t.markers,
1642
+ ...h === se.INVALID ? To : null
1640
1643
  },
1641
1644
  customRender: [
1642
- ...(g = e == null ? void 0 : e.customRender) != null ? g : [],
1645
+ ...(f = t == null ? void 0 : t.customRender) != null ? f : [],
1643
1646
  ...d != null && d.canvasRender ? [d.canvasRender] : []
1644
1647
  ],
1645
1648
  fontRenderExtension: {
1646
- ...e == null ? void 0 : e.fontRenderExtension,
1647
- isSkip: ((w = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : w.isSkip) || ((I = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : I.call(d, u, p, t))
1649
+ ...t == null ? void 0 : t.fontRenderExtension,
1650
+ isSkip: ((w = t == null ? void 0 : t.fontRenderExtension) == null ? void 0 : w.isSkip) || ((I = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : I.call(d, u, p, e))
1648
1651
  },
1649
1652
  interceptorStyle: {
1650
- ...e == null ? void 0 : e.interceptorStyle,
1653
+ ...t == null ? void 0 : t.interceptorStyle,
1651
1654
  ...d == null ? void 0 : d.getExtraStyle(u, C, {
1652
1655
  get style() {
1653
- const _ = l.getStyles();
1654
- return (typeof (e == null ? void 0 : e.s) == "string" ? _.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1656
+ const _ = s.getStyles();
1657
+ return (typeof (t == null ? void 0 : t.s) == "string" ? _.get(t == null ? void 0 : t.s) : t == null ? void 0 : t.s) || {};
1655
1658
  }
1656
1659
  }, n, a)
1657
1660
  },
1658
1661
  interceptorAutoHeight: () => {
1659
- var M, L, U, T, E, A;
1660
- const _ = (L = (M = this._renderManagerService.getRenderById(i)) == null ? void 0 : M.with(Dt).getSkeletonParam(r)) == null ? void 0 : L.skeleton;
1662
+ var y, T, N, P, b, A;
1663
+ const _ = (T = (y = this._renderManagerService.getRenderById(i)) == null ? void 0 : y.with(De).getSkeletonParam(r)) == null ? void 0 : T.skeleton;
1661
1664
  if (!_)
1662
1665
  return;
1663
- const S = _.worksheet.getMergedCell(n, a), m = {
1664
- data: e,
1665
- style: _.getStyles().getStyleByCell(e),
1666
- primaryWithCoord: _.getCellWithCoordByIndex((U = S == null ? void 0 : S.startRow) != null ? U : n, (T = S == null ? void 0 : S.startColumn) != null ? T : a),
1666
+ const S = _.worksheet.getMergedCell(n, a), g = {
1667
+ data: t,
1668
+ style: _.getStyles().getStyleByCell(t),
1669
+ primaryWithCoord: _.getCellWithCoordByIndex((N = S == null ? void 0 : S.startRow) != null ? N : n, (P = S == null ? void 0 : S.startColumn) != null ? P : a),
1667
1670
  unitId: i,
1668
1671
  subUnitId: r,
1669
1672
  row: n,
1670
1673
  col: a,
1671
- workbook: l,
1672
- worksheet: s
1674
+ workbook: s,
1675
+ worksheet: l
1673
1676
  };
1674
- return (A = (E = d == null ? void 0 : d.canvasRender) == null ? void 0 : E.calcCellAutoHeight) == null ? void 0 : A.call(E, m);
1677
+ return (A = (b = d == null ? void 0 : d.canvasRender) == null ? void 0 : b.calcCellAutoHeight) == null ? void 0 : A.call(b, g);
1675
1678
  },
1676
- coverable: ((V = e == null ? void 0 : e.coverable) != null ? V : !0) && !(u.type === K.LIST || u.type === K.LIST_MULTIPLE)
1679
+ coverable: ((V = t == null ? void 0 : t.coverable) != null ? V : !0) && !(u.type === K.LIST || u.type === K.LIST_MULTIPLE)
1677
1680
  });
1678
1681
  }
1679
1682
  }
@@ -1682,75 +1685,75 @@ let kn = class extends fn {
1682
1685
  }
1683
1686
  _initAutoHeight() {
1684
1687
  this._sheetDataValidationModel.ruleChange$.pipe(
1685
- In((e) => e.source === "command"),
1686
- mo(16)
1687
- ).subscribe((e) => {
1688
- const t = [];
1689
- if (e.forEach((o) => {
1688
+ In((t) => t.source === "command"),
1689
+ go(16)
1690
+ ).subscribe((t) => {
1691
+ const e = [];
1692
+ if (t.forEach((o) => {
1690
1693
  var n;
1691
- (n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
1692
- }), t.length) {
1693
- const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1694
+ (n = o.rule) != null && n.ranges && e.push(...o.rule.ranges);
1695
+ }), e.length) {
1696
+ const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(e);
1694
1697
  Kn(o.redos, this._commandService);
1695
1698
  }
1696
1699
  });
1697
1700
  }
1698
1701
  };
1699
- kn = Po([
1700
- Z(0, ee),
1701
- Z(1, Ve),
1702
- Z(2, b(ho)),
1703
- Z(3, b(be)),
1704
- Z(4, b(gn)),
1705
- Z(5, b(ae)),
1706
- Z(6, b(co))
1707
- ], kn);
1708
- var pr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, mr = (e, t, o, n) => {
1709
- for (var a = n > 1 ? void 0 : n ? fr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1710
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1711
- return n && a && pr(t, o, a), a;
1712
- }, Wn = (e, t) => (o, n) => t(o, n, e);
1713
- let yt = class extends De {
1714
- constructor(e, t, o) {
1715
- super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = o, this._initSkeletonChange();
1702
+ $n = Lo([
1703
+ Z(0, tt),
1704
+ Z(1, Vt),
1705
+ Z(2, E(ho)),
1706
+ Z(3, E(Et)),
1707
+ Z(4, E(fn)),
1708
+ Z(5, E(at)),
1709
+ Z(6, E(co))
1710
+ ], $n);
1711
+ var ir = Object.getOwnPropertyDescriptor, rr = (t, e, o, n) => {
1712
+ for (var a = n > 1 ? void 0 : n ? ir(e, o) : e, i = t.length - 1, r; i >= 0; i--)
1713
+ (r = t[i]) && (a = r(a) || a);
1714
+ return a;
1715
+ }, Wn = (t, e) => (o, n) => e(o, n, t);
1716
+ let Me = class extends Dt {
1717
+ constructor(t, e, o) {
1718
+ super(), this._context = t, this._sheetDataValidationModel = e, this._sheetSkeletonManagerService = o, this._initSkeletonChange();
1716
1719
  }
1717
1720
  _initSkeletonChange() {
1718
- const e = (t) => {
1721
+ const t = (e) => {
1719
1722
  var n;
1720
- if (!t.length)
1723
+ if (!e.length)
1721
1724
  return;
1722
1725
  const o = /* @__PURE__ */ new Set();
1723
- t.forEach((a) => {
1726
+ e.forEach((a) => {
1724
1727
  o.add(a.subUnitId);
1725
1728
  }), o.forEach((a) => {
1726
1729
  var i;
1727
1730
  (i = this._sheetSkeletonManagerService.getSkeletonParam(a)) == null || i.skeleton.makeDirty(!0);
1728
1731
  }), (n = this._context.mainComponent) == null || n.makeForceDirty();
1729
1732
  };
1730
- this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Qo(16)).subscribe(e));
1733
+ this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Qo(16)).subscribe(t));
1731
1734
  }
1732
1735
  };
1733
- yt = mr([
1734
- Wn(1, b(ae)),
1735
- Wn(2, b(Dt))
1736
- ], yt);
1737
- const gr = "univer-data-validation-formula", vr = "univer-data-validation-formula-and", _r = "univer-data-validation-formula-list-item", Sr = "univer-data-validation-formula-list-item-icon", Cr = "univer-data-validation-formula-list-item-drag", Ir = "univer-data-validation-formula-list-add", wr = "univer-data-validation-formula-color-select", Rr = "univer-data-validation-formula-color-select-panel", Dr = "univer-data-validation-formula-color-item", oe = {
1738
- dataValidationFormula: gr,
1739
- dataValidationFormulaAnd: vr,
1740
- dataValidationFormulaListItem: _r,
1741
- dataValidationFormulaListItemIcon: Sr,
1742
- dataValidationFormulaListItemDrag: Cr,
1743
- dataValidationFormulaListAdd: Ir,
1744
- dataValidationFormulaColorSelect: wr,
1745
- dataValidationFormulaColorSelectPanel: Rr,
1746
- dataValidationFormulaColorItem: Dr
1747
- }, Vr = (e) => {
1748
- const { isTwoFormula: t = !1, value: o, onChange: n, showError: a, validResult: i } = e, r = P(Q), l = a ? i == null ? void 0 : i.formula1 : "", s = a ? i == null ? void 0 : i.formula2 : "";
1749
- return t ? /* @__PURE__ */ x(we, { children: [
1750
- /* @__PURE__ */ f(q, { error: l, children: /* @__PURE__ */ f(
1751
- Ue,
1736
+ Me = rr([
1737
+ Wn(1, E(at)),
1738
+ Wn(2, E(De))
1739
+ ], Me);
1740
+ const sr = "univer-data-validation-formula", lr = "univer-data-validation-formula-and", dr = "univer-data-validation-formula-list-item", cr = "univer-data-validation-formula-list-item-icon", ur = "univer-data-validation-formula-list-item-drag", hr = "univer-data-validation-formula-list-add", pr = "univer-data-validation-formula-color-select", mr = "univer-data-validation-formula-color-select-panel", gr = "univer-data-validation-formula-color-item", ot = {
1741
+ dataValidationFormula: sr,
1742
+ dataValidationFormulaAnd: lr,
1743
+ dataValidationFormulaListItem: dr,
1744
+ dataValidationFormulaListItemIcon: cr,
1745
+ dataValidationFormulaListItemDrag: ur,
1746
+ dataValidationFormulaListAdd: hr,
1747
+ dataValidationFormulaColorSelect: pr,
1748
+ dataValidationFormulaColorSelectPanel: mr,
1749
+ dataValidationFormulaColorItem: gr
1750
+ }, fr = (t) => {
1751
+ const { isTwoFormula: e = !1, value: o, onChange: n, showError: a, validResult: i } = t, r = L(Q), s = a ? i == null ? void 0 : i.formula1 : "", l = a ? i == null ? void 0 : i.formula2 : "";
1752
+ return e ? /* @__PURE__ */ j(wt, { children: [
1753
+ /* @__PURE__ */ m(q, { error: s, children: /* @__PURE__ */ m(
1754
+ Nt,
1752
1755
  {
1753
- className: oe.dataValidationFormula,
1756
+ className: ot.dataValidationFormula,
1754
1757
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
1755
1758
  value: o == null ? void 0 : o.formula1,
1756
1759
  onChange: (c) => {
@@ -1761,11 +1764,11 @@ const gr = "univer-data-validation-formula", vr = "univer-data-validation-formul
1761
1764
  }
1762
1765
  }
1763
1766
  ) }),
1764
- /* @__PURE__ */ f("div", { className: oe.dataValidationFormulaAnd, children: r.t("dataValidation.panel.formulaAnd") }),
1765
- /* @__PURE__ */ f(q, { error: s, children: /* @__PURE__ */ f(
1766
- Ue,
1767
+ /* @__PURE__ */ m("div", { className: ot.dataValidationFormulaAnd, children: r.t("dataValidation.panel.formulaAnd") }),
1768
+ /* @__PURE__ */ m(q, { error: l, children: /* @__PURE__ */ m(
1769
+ Nt,
1767
1770
  {
1768
- className: oe.dataValidationFormula,
1771
+ className: ot.dataValidationFormula,
1769
1772
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
1770
1773
  value: o == null ? void 0 : o.formula2,
1771
1774
  onChange: (c) => {
@@ -1776,10 +1779,10 @@ const gr = "univer-data-validation-formula", vr = "univer-data-validation-formul
1776
1779
  }
1777
1780
  }
1778
1781
  ) })
1779
- ] }) : /* @__PURE__ */ f(q, { error: l, children: /* @__PURE__ */ f(
1780
- Ue,
1782
+ ] }) : /* @__PURE__ */ m(q, { error: s, children: /* @__PURE__ */ m(
1783
+ Nt,
1781
1784
  {
1782
- className: oe.dataValidationFormula,
1785
+ className: ot.dataValidationFormula,
1783
1786
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
1784
1787
  value: o == null ? void 0 : o.formula1,
1785
1788
  onChange: (c) => {
@@ -1788,16 +1791,16 @@ const gr = "univer-data-validation-formula", vr = "univer-data-validation-formul
1788
1791
  }
1789
1792
  ) });
1790
1793
  };
1791
- function Mr(e) {
1792
- const { value: t, onChange: o, showError: n, validResult: a } = e, i = P(Q), r = n ? a == null ? void 0 : a.formula1 : "", l = n ? a == null ? void 0 : a.formula2 : "", [s, c] = j(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
1793
- return /* @__PURE__ */ x(we, { children: [
1794
- /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(
1795
- Pt,
1794
+ function vr(t) {
1795
+ const { value: e, onChange: o, showError: n, validResult: a } = t, i = L(Q), r = n ? a == null ? void 0 : a.formula1 : "", s = n ? a == null ? void 0 : a.formula2 : "", [l, c] = x(!((e == null ? void 0 : e.formula1) === void 0 && (e == null ? void 0 : e.formula2) === void 0));
1796
+ return /* @__PURE__ */ j(wt, { children: [
1797
+ /* @__PURE__ */ m(q, { children: /* @__PURE__ */ m(
1798
+ Le,
1796
1799
  {
1797
- checked: s,
1800
+ checked: l,
1798
1801
  onChange: (u) => {
1799
1802
  u ? c(!0) : (c(!1), o == null || o({
1800
- ...t,
1803
+ ...e,
1801
1804
  formula1: void 0,
1802
1805
  formula2: void 0
1803
1806
  }));
@@ -1805,29 +1808,29 @@ function Mr(e) {
1805
1808
  children: i.t("dataValidation.checkbox.tips")
1806
1809
  }
1807
1810
  ) }),
1808
- s ? /* @__PURE__ */ f(q, { label: i.t("dataValidation.checkbox.checked"), error: r, children: /* @__PURE__ */ f(
1809
- Ue,
1811
+ l ? /* @__PURE__ */ m(q, { label: i.t("dataValidation.checkbox.checked"), error: r, children: /* @__PURE__ */ m(
1812
+ Nt,
1810
1813
  {
1811
- className: oe.dataValidationFormula,
1814
+ className: ot.dataValidationFormula,
1812
1815
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
1813
- value: t == null ? void 0 : t.formula1,
1816
+ value: e == null ? void 0 : e.formula1,
1814
1817
  onChange: (u) => {
1815
1818
  o == null || o({
1816
- ...t,
1819
+ ...e,
1817
1820
  formula1: u || void 0
1818
1821
  });
1819
1822
  }
1820
1823
  }
1821
1824
  ) }) : null,
1822
- s ? /* @__PURE__ */ f(q, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ f(
1823
- Ue,
1825
+ l ? /* @__PURE__ */ m(q, { label: i.t("dataValidation.checkbox.unchecked"), error: s, children: /* @__PURE__ */ m(
1826
+ Nt,
1824
1827
  {
1825
- className: oe.dataValidationFormula,
1828
+ className: ot.dataValidationFormula,
1826
1829
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
1827
- value: t == null ? void 0 : t.formula2,
1830
+ value: e == null ? void 0 : e.formula2,
1828
1831
  onChange: (u) => {
1829
1832
  o == null || o({
1830
- ...t,
1833
+ ...e,
1831
1834
  formula2: u || void 0
1832
1835
  });
1833
1836
  }
@@ -1835,18 +1838,18 @@ function Mr(e) {
1835
1838
  ) }) : null
1836
1839
  ] });
1837
1840
  }
1838
- function yr(e) {
1841
+ function _r(t) {
1839
1842
  var h;
1840
- const { unitId: t, subUnitId: o, value: n, onChange: a, showError: i, validResult: r } = e, l = i ? r == null ? void 0 : r.formula1 : void 0, s = ze({}), [c, u] = j(!1);
1843
+ const { unitId: e, subUnitId: o, value: n, onChange: a, showError: i, validResult: r } = t, s = i ? r == null ? void 0 : r.formula1 : void 0, l = zt({}), [c, u] = x(!1);
1841
1844
  return Sn((d) => {
1842
1845
  var p;
1843
- const v = (p = s.current) == null ? void 0 : p.handleOutClick;
1846
+ const v = (p = l.current) == null ? void 0 : p.handleOutClick;
1844
1847
  v && v(d, () => u(!1));
1845
- }), /* @__PURE__ */ f(
1848
+ }), /* @__PURE__ */ m(
1846
1849
  vo,
1847
1850
  {
1848
1851
  initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
1849
- unitId: t,
1852
+ unitId: e,
1850
1853
  subUnitId: o,
1851
1854
  isFocus: c,
1852
1855
  onChange: (d) => {
@@ -1856,27 +1859,27 @@ function yr(e) {
1856
1859
  formula1: v
1857
1860
  }));
1858
1861
  },
1859
- errorText: l,
1862
+ errorText: s,
1860
1863
  onFocus: () => u(!0),
1861
- actions: s.current,
1864
+ actions: l.current,
1862
1865
  isSupportAcrossSheet: !0
1863
1866
  }
1864
1867
  );
1865
1868
  }
1866
- function To(e) {
1867
- var t, o, n = "";
1868
- if (typeof e == "string" || typeof e == "number") n += e;
1869
- else if (typeof e == "object") if (Array.isArray(e)) {
1870
- var a = e.length;
1871
- for (t = 0; t < a; t++) e[t] && (o = To(e[t])) && (n && (n += " "), n += o);
1872
- } else for (o in e) e[o] && (n && (n += " "), n += o);
1869
+ function Po(t) {
1870
+ var e, o, n = "";
1871
+ if (typeof t == "string" || typeof t == "number") n += t;
1872
+ else if (typeof t == "object") if (Array.isArray(t)) {
1873
+ var a = t.length;
1874
+ for (e = 0; e < a; e++) t[e] && (o = Po(t[e])) && (n && (n += " "), n += o);
1875
+ } else for (o in t) t[o] && (n && (n += " "), n += o);
1873
1876
  return n;
1874
1877
  }
1875
- function br() {
1876
- for (var e, t, o = 0, n = "", a = arguments.length; o < a; o++) (e = arguments[o]) && (t = To(e)) && (n && (n += " "), n += t);
1878
+ function Sr() {
1879
+ for (var t, e, o = 0, n = "", a = arguments.length; o < a; o++) (t = arguments[o]) && (e = Po(t)) && (n && (n += " "), n += e);
1877
1880
  return n;
1878
1881
  }
1879
- const Er = [
1882
+ const Cr = [
1880
1883
  "#FFFFFF",
1881
1884
  "#FEE7E7",
1882
1885
  "#FEF0E6",
@@ -1901,34 +1904,34 @@ const Er = [
1901
1904
  "#3A60F7",
1902
1905
  "#9E6DE3",
1903
1906
  "#F248A6"
1904
- ], Or = (e) => {
1905
- const { value: t, onChange: o, disabled: n } = e, [a, i] = j(!1);
1906
- return /* @__PURE__ */ f(
1907
- en,
1907
+ ], Ir = (t) => {
1908
+ const { value: e, onChange: o, disabled: n } = t, [a, i] = x(!1);
1909
+ return /* @__PURE__ */ m(
1910
+ tn,
1908
1911
  {
1909
1912
  disabled: n,
1910
1913
  open: a,
1911
1914
  onDropdownVisibleChange: i,
1912
1915
  dropdownStyle: { width: 112 },
1913
1916
  style: { width: 96, cursor: "pointer" },
1914
- className: oe.dataValidationFormulaColorSelect,
1915
- value: t,
1917
+ className: ot.dataValidationFormulaColorSelect,
1918
+ value: e,
1916
1919
  onChange: o,
1917
- labelRender: (r) => /* @__PURE__ */ f(
1920
+ labelRender: (r) => /* @__PURE__ */ m(
1918
1921
  "div",
1919
1922
  {
1920
- className: oe.dataValidationFormulaColorItem,
1923
+ className: ot.dataValidationFormulaColorItem,
1921
1924
  style: { background: r.value, marginTop: 5 }
1922
1925
  }
1923
1926
  ),
1924
- dropdownRender: () => /* @__PURE__ */ f("div", { className: oe.dataValidationFormulaColorSelectPanel, children: Er.map(
1925
- (r) => /* @__PURE__ */ f(
1927
+ dropdownRender: () => /* @__PURE__ */ m("div", { className: ot.dataValidationFormulaColorSelectPanel, children: Cr.map(
1928
+ (r) => /* @__PURE__ */ m(
1926
1929
  "div",
1927
1930
  {
1928
1931
  onClick: () => {
1929
1932
  o(r), i(!1);
1930
1933
  },
1931
- className: oe.dataValidationFormulaColorItem,
1934
+ className: ot.dataValidationFormulaColorItem,
1932
1935
  style: { background: r }
1933
1936
  },
1934
1937
  r
@@ -1936,170 +1939,170 @@ const Er = [
1936
1939
  ) })
1937
1940
  }
1938
1941
  );
1939
- }, Hn = (e) => {
1940
- const { item: t, commonProps: o, style: n } = e, { onItemChange: a, onItemDelete: i } = o;
1941
- return /* @__PURE__ */ x("div", { className: oe.dataValidationFormulaListItem, style: n, children: [
1942
- t.isRef ? null : /* @__PURE__ */ f("div", { className: br(oe.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ f(Do, {}) }),
1943
- /* @__PURE__ */ f(
1944
- Or,
1942
+ }, Hn = (t) => {
1943
+ const { item: e, commonProps: o, style: n } = t, { onItemChange: a, onItemDelete: i } = o;
1944
+ return /* @__PURE__ */ j("div", { className: ot.dataValidationFormulaListItem, style: n, children: [
1945
+ e.isRef ? null : /* @__PURE__ */ m("div", { className: Sr(ot.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ m(Do, {}) }),
1946
+ /* @__PURE__ */ m(
1947
+ Ir,
1945
1948
  {
1946
- value: t.color,
1949
+ value: e.color,
1947
1950
  onChange: (r) => {
1948
- a(t.id, t.label, r);
1951
+ a(e.id, e.label, r);
1949
1952
  }
1950
1953
  }
1951
1954
  ),
1952
- /* @__PURE__ */ f(
1953
- Ue,
1955
+ /* @__PURE__ */ m(
1956
+ Nt,
1954
1957
  {
1955
- disabled: t.isRef,
1956
- value: t.label,
1958
+ disabled: e.isRef,
1959
+ value: e.label,
1957
1960
  onChange: (r) => {
1958
- a(t.id, r, t.color);
1961
+ a(e.id, r, e.color);
1959
1962
  }
1960
1963
  }
1961
1964
  ),
1962
- t.isRef ? null : /* @__PURE__ */ f("div", { className: oe.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ f(Rn, { onClick: () => i(t.id) }) })
1965
+ e.isRef ? null : /* @__PURE__ */ m("div", { className: ot.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ m(Rn, { onClick: () => i(e.id) }) })
1963
1966
  ] });
1964
1967
  };
1965
- function Pr(e) {
1966
- const { value: t, onChange: o = () => {
1967
- }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = ze(null), [h, d] = j(() => Ae(s) ? "1" : "0"), [v, p] = j(h === "1" ? s : "="), [C, R] = j(h === "1" ? s : "="), g = P(Q), w = P(be), I = P(Tt), V = P(_a), [_, S] = j(() => c.split(",")), m = w.getValidatorItem(K.LIST), [M, L] = j([]), [U, T] = j(""), E = r ? i == null ? void 0 : i.formula1 : "", A = Ke(() => I.ruleChange$.pipe(wn(16)), []), F = ke(A), N = ln(o);
1968
- Ie(() => {
1968
+ function wr(t) {
1969
+ const { value: e, onChange: o = () => {
1970
+ }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: s } = t, { formula1: l = "", formula2: c = "" } = e || {}, u = zt(null), [h, d] = x(() => At(l) ? "1" : "0"), [v, p] = x(h === "1" ? l : "="), [C, R] = x(h === "1" ? l : "="), f = L(Q), w = L(Et), I = L(Pe), V = L(_a), [_, S] = x(() => c.split(",")), g = w.getValidatorItem(K.LIST), [y, T] = x([]), [N, P] = x(""), b = r ? i == null ? void 0 : i.formula1 : "", A = Kt(() => I.ruleChange$.pipe(wn(16)), []), k = $t(A), F = ln(o);
1971
+ It(() => {
1969
1972
  (async () => {
1970
- await new Promise((k) => {
1971
- setTimeout(() => k(!0), 100);
1973
+ await new Promise(($) => {
1974
+ setTimeout(() => $(!0), 100);
1972
1975
  });
1973
- const D = I.getRuleById(n, a, l), $ = D == null ? void 0 : D.formula1;
1974
- if (Ae($) && m && D) {
1975
- const k = await m.getListAsync(D, n, a);
1976
- L(k);
1976
+ const D = I.getRuleById(n, a, s), B = D == null ? void 0 : D.formula1;
1977
+ if (At(B) && g && D) {
1978
+ const $ = await g.getListAsync(D, n, a);
1979
+ T($);
1977
1980
  }
1978
1981
  })();
1979
- }, [I, F, m, l, a, n]), Ie(() => {
1980
- Ae(s) && s !== C && (p(s), R(C));
1981
- }, [C, s]);
1982
- const [B, Y] = j(() => {
1983
- const D = h !== "1" ? oo(s) : [], $ = c.split(",");
1984
- return D.map((k, W) => ({
1985
- label: k,
1986
- color: $[W] || Fe,
1982
+ }, [I, k, g, s, a, n]), It(() => {
1983
+ At(l) && l !== C && (p(l), R(C));
1984
+ }, [C, l]);
1985
+ const [U, Y] = x(() => {
1986
+ const D = h !== "1" ? oo(l) : [], B = c.split(",");
1987
+ return D.map(($, W) => ({
1988
+ label: $,
1989
+ color: B[W] || kt,
1987
1990
  isRef: !1,
1988
- id: Qt.generateRandomId(4)
1991
+ id: Qe.generateRandomId(4)
1989
1992
  }));
1990
- }), z = (D, $, k) => {
1991
- const W = B.find((Se) => Se.id === D);
1992
- W && (W.label = $, W.color = k, Y([...B]));
1993
+ }), z = (D, B, $) => {
1994
+ const W = U.find((St) => St.id === D);
1995
+ W && (W.label = B, W.color = $, Y([...U]));
1993
1996
  }, H = (D) => {
1994
- const $ = B.findIndex((k) => k.id === D);
1995
- $ !== -1 && (B.splice($, 1), Y([...B]));
1996
- }, G = c.split(","), J = Ke(() => M.map((D, $) => ({
1997
+ const B = U.findIndex(($) => $.id === D);
1998
+ B !== -1 && (U.splice(B, 1), Y([...U]));
1999
+ }, G = c.split(","), J = Kt(() => y.map((D, B) => ({
1997
2000
  label: D,
1998
- color: G[$] || Fe,
1999
- id: `${$}`,
2001
+ color: G[B] || kt,
2002
+ id: `${B}`,
2000
2003
  isRef: !0
2001
- })), [G, M]), te = (D, $, k) => {
2004
+ })), [G, y]), et = (D, B, $) => {
2002
2005
  const W = [..._];
2003
- W[+D] = k, S(W), N({
2004
- formula1: s,
2006
+ W[+D] = $, S(W), F({
2007
+ formula1: l,
2005
2008
  formula2: W.join(",")
2006
2009
  });
2007
- }, ne = () => {
2010
+ }, nt = () => {
2008
2011
  Y([
2009
- ...B,
2012
+ ...U,
2010
2013
  {
2011
2014
  label: "",
2012
- color: Fe,
2015
+ color: kt,
2013
2016
  isRef: !1,
2014
- id: Qt.generateRandomId(4)
2017
+ id: Qe.generateRandomId(4)
2015
2018
  }
2016
2019
  ]);
2017
2020
  };
2018
- Ie(() => {
2021
+ It(() => {
2019
2022
  if (h === "1")
2020
2023
  return;
2021
- const D = /* @__PURE__ */ new Set(), $ = [];
2022
- B.map((k) => ({
2023
- labelList: k.label.split(","),
2024
- item: k
2025
- })).forEach(({ item: k, labelList: W }) => {
2026
- W.forEach((Se) => {
2027
- D.has(Se) || (D.add(Se), $.push({
2028
- label: Se,
2029
- color: k.color
2024
+ const D = /* @__PURE__ */ new Set(), B = [];
2025
+ U.map(($) => ({
2026
+ labelList: $.label.split(","),
2027
+ item: $
2028
+ })).forEach(({ item: $, labelList: W }) => {
2029
+ W.forEach((St) => {
2030
+ D.has(St) || (D.add(St), B.push({
2031
+ label: St,
2032
+ color: $.color
2030
2033
  }));
2031
2034
  });
2032
- }), N({
2033
- formula1: ao($.map((k) => k.label)),
2034
- formula2: $.map((k) => k.color === Fe ? "" : k.color).join(",")
2035
+ }), F({
2036
+ formula1: ao(B.map(($) => $.label)),
2037
+ formula2: B.map(($) => $.color === kt ? "" : $.color).join(",")
2035
2038
  });
2036
- }, [B, N, h, C, _]);
2037
- const se = ln(async (D) => {
2038
- if (!Ae(D)) {
2039
- N == null || N({
2039
+ }, [U, F, h, C, _]);
2040
+ const st = ln(async (D) => {
2041
+ if (!At(D)) {
2042
+ F == null || F({
2040
2043
  formula1: "",
2041
2044
  formula2: c
2042
2045
  });
2043
2046
  return;
2044
2047
  }
2045
- V.getFormulaRefCheck(D) ? (N == null || N({
2046
- formula1: Ae(D) ? D : "",
2048
+ V.getFormulaRefCheck(D) ? (F == null || F({
2049
+ formula1: At(D) ? D : "",
2047
2050
  formula2: c
2048
- }), T("")) : (N == null || N({
2051
+ }), P("")) : (F == null || F({
2049
2052
  formula1: "",
2050
2053
  formula2: c
2051
- }), p("="), T(g.t("dataValidation.validFail.formulaError")));
2052
- }), ie = ze({}), [le, O] = j(!1);
2054
+ }), p("="), P(f.t("dataValidation.validFail.formulaError")));
2055
+ }), it = zt({}), [lt, O] = x(!1);
2053
2056
  return Sn((D) => {
2054
- var k;
2055
- const $ = (k = ie.current) == null ? void 0 : k.handleOutClick;
2056
- $ && $(D, () => O(!1));
2057
- }), /* @__PURE__ */ x(we, { children: [
2058
- /* @__PURE__ */ f(q, { label: g.t("dataValidation.list.options"), children: /* @__PURE__ */ x(
2059
- mn,
2057
+ var $;
2058
+ const B = ($ = it.current) == null ? void 0 : $.handleOutClick;
2059
+ B && B(D, () => O(!1));
2060
+ }), /* @__PURE__ */ j(wt, { children: [
2061
+ /* @__PURE__ */ m(q, { label: f.t("dataValidation.list.options"), children: /* @__PURE__ */ j(
2062
+ gn,
2060
2063
  {
2061
2064
  value: h,
2062
2065
  onChange: (D) => {
2063
- d(D), p(C), D === "1" && N({
2066
+ d(D), p(C), D === "1" && F({
2064
2067
  formula1: C === "=" ? "" : C,
2065
2068
  formula2: _.join(",")
2066
2069
  });
2067
2070
  },
2068
2071
  children: [
2069
- /* @__PURE__ */ f(Ne, { value: "0", children: g.t("dataValidation.list.customOptions") }),
2070
- /* @__PURE__ */ f(Ne, { value: "1", children: g.t("dataValidation.list.refOptions") })
2072
+ /* @__PURE__ */ m(Ft, { value: "0", children: f.t("dataValidation.list.customOptions") }),
2073
+ /* @__PURE__ */ m(Ft, { value: "1", children: f.t("dataValidation.list.refOptions") })
2071
2074
  ]
2072
2075
  }
2073
2076
  ) }),
2074
- h === "1" ? /* @__PURE__ */ x(we, { children: [
2075
- /* @__PURE__ */ f(
2077
+ h === "1" ? /* @__PURE__ */ j(wt, { children: [
2078
+ /* @__PURE__ */ m(
2076
2079
  vo,
2077
2080
  {
2078
2081
  initValue: v,
2079
2082
  unitId: n,
2080
2083
  subUnitId: a,
2081
- isFocus: le,
2084
+ isFocus: lt,
2082
2085
  onChange: (D = "") => {
2083
- const $ = (D != null ? D : "").trim();
2084
- R($), se($);
2086
+ const B = (D != null ? D : "").trim();
2087
+ R(B), st(B);
2085
2088
  },
2086
- errorText: E || U || void 0,
2089
+ errorText: b || N || void 0,
2087
2090
  onFocus: () => O(!0),
2088
- actions: ie.current,
2091
+ actions: it.current,
2089
2092
  isSupportAcrossSheet: !0
2090
2093
  }
2091
2094
  ),
2092
- /* @__PURE__ */ f("div", { ref: u, style: { marginTop: "12px" }, children: J.map((D) => /* @__PURE__ */ f(Hn, { item: D, commonProps: { onItemChange: te }, style: { marginBottom: 12 } }, D.id)) })
2093
- ] }) : /* @__PURE__ */ f(q, { error: E, children: /* @__PURE__ */ x("div", { ref: u, style: { marginTop: "-12px" }, children: [
2094
- /* @__PURE__ */ f(
2095
+ /* @__PURE__ */ m("div", { ref: u, style: { marginTop: "12px" }, children: J.map((D) => /* @__PURE__ */ m(Hn, { item: D, commonProps: { onItemChange: et }, style: { marginBottom: 12 } }, D.id)) })
2096
+ ] }) : /* @__PURE__ */ m(q, { error: b, children: /* @__PURE__ */ j("div", { ref: u, style: { marginTop: "-12px" }, children: [
2097
+ /* @__PURE__ */ m(
2095
2098
  ia,
2096
2099
  {
2097
- list: B,
2100
+ list: U,
2098
2101
  onListChange: Y,
2099
2102
  rowHeight: 32,
2100
2103
  margin: [0, 12],
2101
2104
  draggableHandle: ".draggableHandle",
2102
- itemRender: (D) => /* @__PURE__ */ f(
2105
+ itemRender: (D) => /* @__PURE__ */ m(
2103
2106
  Hn,
2104
2107
  {
2105
2108
  item: D,
@@ -2113,54 +2116,54 @@ function Pr(e) {
2113
2116
  idKey: "id"
2114
2117
  }
2115
2118
  ),
2116
- /* @__PURE__ */ x("a", { className: oe.dataValidationFormulaListAdd, onClick: ne, children: [
2117
- /* @__PURE__ */ f(Io, {}),
2118
- g.t("dataValidation.list.add")
2119
+ /* @__PURE__ */ j("a", { className: ot.dataValidationFormulaListAdd, onClick: nt, children: [
2120
+ /* @__PURE__ */ m(Io, {}),
2121
+ f.t("dataValidation.list.add")
2119
2122
  ] })
2120
2123
  ] }) })
2121
2124
  ] });
2122
2125
  }
2123
- const Ao = "data-validation.custom-formula-input", Nt = "data-validation.formula-input", yn = "data-validation.list-formula-input", Fo = "data-validation.checkbox-formula-input", Lr = [
2126
+ const Ao = "data-validation.custom-formula-input", Fe = "data-validation.formula-input", Mn = "data-validation.list-formula-input", ko = "data-validation.checkbox-formula-input", Rr = [
2124
2127
  [
2125
2128
  Ao,
2126
- yr
2129
+ _r
2127
2130
  ],
2128
2131
  [
2129
- Nt,
2130
- Vr
2132
+ Fe,
2133
+ fr
2131
2134
  ],
2132
2135
  [
2133
- yn,
2134
- Pr
2136
+ Mn,
2137
+ wr
2135
2138
  ],
2136
2139
  [
2137
- Fo,
2138
- Mr
2140
+ ko,
2141
+ vr
2139
2142
  ]
2140
- ], Tr = "LIST_RENDER_MODE_OPTION_INPUT";
2141
- function bt(e) {
2143
+ ], Dr = "LIST_RENDER_MODE_OPTION_INPUT";
2144
+ function Ee(t) {
2142
2145
  var a;
2143
- const { value: t, onChange: o } = e, n = P(Q);
2144
- return /* @__PURE__ */ f(q, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ x(mn, { value: `${(a = t.renderMode) != null ? a : ce.CUSTOM}`, onChange: (i) => o({ ...t, renderMode: +i }), children: [
2145
- /* @__PURE__ */ f(Ne, { value: `${ce.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2146
- /* @__PURE__ */ f(Ne, { value: `${ce.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2147
- /* @__PURE__ */ f(Ne, { value: `${ce.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2146
+ const { value: e, onChange: o } = t, n = L(Q);
2147
+ return /* @__PURE__ */ m(q, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ j(gn, { value: `${(a = e.renderMode) != null ? a : ct.CUSTOM}`, onChange: (i) => o({ ...e, renderMode: +i }), children: [
2148
+ /* @__PURE__ */ m(Ft, { value: `${ct.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2149
+ /* @__PURE__ */ m(Ft, { value: `${ct.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2150
+ /* @__PURE__ */ m(Ft, { value: `${ct.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2148
2151
  ] }) });
2149
2152
  }
2150
- bt.componentKey = Tr;
2151
- const Ar = "DATE_SHOW_TIME_OPTION";
2152
- function Et(e) {
2153
+ Ee.componentKey = Dr;
2154
+ const Vr = "DATE_SHOW_TIME_OPTION";
2155
+ function be(t) {
2153
2156
  var a;
2154
- const { value: t, onChange: o } = e, n = P(Q);
2155
- return /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(
2156
- Pt,
2157
+ const { value: e, onChange: o } = t, n = L(Q);
2158
+ return /* @__PURE__ */ m(q, { children: /* @__PURE__ */ m(
2159
+ Le,
2157
2160
  {
2158
- checked: (a = t.bizInfo) == null ? void 0 : a.showTime,
2161
+ checked: (a = e.bizInfo) == null ? void 0 : a.showTime,
2159
2162
  onChange: (i) => {
2160
2163
  o({
2161
- ...t,
2164
+ ...e,
2162
2165
  bizInfo: {
2163
- ...t.bizInfo,
2166
+ ...e.bizInfo,
2164
2167
  showTime: i
2165
2168
  }
2166
2169
  });
@@ -2169,81 +2172,81 @@ function Et(e) {
2169
2172
  }
2170
2173
  ) });
2171
2174
  }
2172
- Et.componentKey = Ar;
2173
- var Fr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, Ur = (e, t, o, n) => {
2174
- for (var a = n > 1 ? void 0 : n ? Nr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2175
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2176
- return n && a && Fr(t, o, a), a;
2177
- }, it = (e, t) => (o, n) => t(o, n, e);
2178
- const pt = 6;
2175
+ be.componentKey = Vr;
2176
+ var yr = Object.getOwnPropertyDescriptor, Mr = (t, e, o, n) => {
2177
+ for (var a = n > 1 ? void 0 : n ? yr(e, o) : e, i = t.length - 1, r; i >= 0; i--)
2178
+ (r = t[i]) && (a = r(a) || a);
2179
+ return a;
2180
+ }, ie = (t, e) => (o, n) => e(o, n, t);
2181
+ const pe = 6;
2179
2182
  let dn = class {
2180
- constructor(e, t, o, n, a) {
2181
- this._commandService = e, this._formulaService = t, this._themeService = o, this._renderManagerService = n, this._dataValidationModel = a;
2183
+ constructor(t, e, o, n, a) {
2184
+ this._commandService = t, this._formulaService = e, this._themeService = o, this._renderManagerService = n, this._dataValidationModel = a;
2182
2185
  }
2183
- _calc(e, t) {
2186
+ _calc(t, e) {
2184
2187
  var c, u, h;
2185
- const { vt: o, ht: n } = t || {}, a = e.endX - e.startX - pt * 2, i = e.endY - e.startY, r = ((c = t == null ? void 0 : t.fs) != null ? c : 10) * 1.6;
2186
- let l = 0, s = 0;
2188
+ const { vt: o, ht: n } = e || {}, a = t.endX - t.startX - pe * 2, i = t.endY - t.startY, r = ((c = e == null ? void 0 : e.fs) != null ? c : 10) * 1.6;
2189
+ let s = 0, l = 0;
2187
2190
  switch (o) {
2188
- case he.TOP:
2189
- s = 0;
2191
+ case ht.TOP:
2192
+ l = 0;
2190
2193
  break;
2191
- case he.BOTTOM:
2192
- s = 0 + (i - r);
2194
+ case ht.BOTTOM:
2195
+ l = 0 + (i - r);
2193
2196
  break;
2194
2197
  default:
2195
- s = 0 + (i - r) / 2;
2198
+ l = 0 + (i - r) / 2;
2196
2199
  break;
2197
2200
  }
2198
2201
  switch (n) {
2199
- case Ye.LEFT:
2200
- l = pt;
2202
+ case Yt.LEFT:
2203
+ s = pe;
2201
2204
  break;
2202
- case Ye.RIGHT:
2203
- l = pt + (a - r);
2205
+ case Yt.RIGHT:
2206
+ s = pe + (a - r);
2204
2207
  break;
2205
2208
  default:
2206
- l = pt + (a - r) / 2;
2209
+ s = pe + (a - r) / 2;
2207
2210
  break;
2208
2211
  }
2209
2212
  return {
2210
- left: e.startX + l,
2211
- top: e.startY + s,
2212
- width: ((u = t == null ? void 0 : t.fs) != null ? u : 10) * 1.6,
2213
- height: ((h = t == null ? void 0 : t.fs) != null ? h : 10) * 1.6
2213
+ left: t.startX + s,
2214
+ top: t.startY + l,
2215
+ width: ((u = e == null ? void 0 : e.fs) != null ? u : 10) * 1.6,
2216
+ height: ((h = e == null ? void 0 : e.fs) != null ? h : 10) * 1.6
2214
2217
  };
2215
2218
  }
2216
- calcCellAutoHeight(e) {
2219
+ calcCellAutoHeight(t) {
2217
2220
  var o;
2218
- const { style: t } = e;
2219
- return ((o = t == null ? void 0 : t.fs) != null ? o : 10) * 1.6;
2221
+ const { style: e } = t;
2222
+ return ((o = e == null ? void 0 : e.fs) != null ? o : 10) * 1.6;
2220
2223
  }
2221
- calcCellAutoWidth(e) {
2224
+ calcCellAutoWidth(t) {
2222
2225
  var o;
2223
- const { style: t } = e;
2224
- return ((o = t == null ? void 0 : t.fs) != null ? o : 10) * 1.6;
2226
+ const { style: e } = t;
2227
+ return ((o = e == null ? void 0 : e.fs) != null ? o : 10) * 1.6;
2225
2228
  }
2226
- async _parseFormula(e, t, o) {
2227
- var c, u, h, d, v, p, C, R, g;
2228
- const { formula1: n = Ia, formula2: a = wa } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r = Bt((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Bt((p = (v = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : v[0]) == null ? void 0 : p[0]), s = Pn(String(r)) && Pn(String(l));
2229
+ async _parseFormula(t, e, o) {
2230
+ var c, u, h, d, v, p, C, R, f;
2231
+ const { formula1: n = Ia, formula2: a = Ca } = t, i = await this._formulaService.getRuleFormulaResult(e, o, t.uid), r = Ue((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), s = Ue((p = (v = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : v[0]) == null ? void 0 : p[0]), l = Ln(String(r)) && Ln(String(s));
2229
2232
  return {
2230
- formula1: Ae(n) ? Bt((g = (R = (C = i == null ? void 0 : i[0]) == null ? void 0 : C.result) == null ? void 0 : R[0]) == null ? void 0 : g[0]) : n,
2231
- formula2: Ae(a) ? l : a,
2232
- isFormulaValid: s
2233
+ formula1: At(n) ? Ue((f = (R = (C = i == null ? void 0 : i[0]) == null ? void 0 : C.result) == null ? void 0 : R[0]) == null ? void 0 : f[0]) : n,
2234
+ formula2: At(a) ? s : a,
2235
+ isFormulaValid: l
2233
2236
  };
2234
2237
  }
2235
- drawWith(e, t) {
2236
- var E, A, F, N;
2237
- const { style: o, primaryWithCoord: n, unitId: a, subUnitId: i, worksheet: r, row: l, col: s } = t, c = n.isMergedMainCell ? n.mergeInfo : n, u = re(r.getCellRaw(l, s)), h = this._dataValidationModel.getRuleByLocation(a, i, l, s);
2238
+ drawWith(t, e) {
2239
+ var b, A, k, F;
2240
+ const { style: o, primaryWithCoord: n, unitId: a, subUnitId: i, worksheet: r, row: s, col: l } = e, c = n.isMergedMainCell ? n.mergeInfo : n, u = rt(r.getCellRaw(s, l)), h = this._dataValidationModel.getRuleByLocation(a, i, s, l);
2238
2241
  if (!h)
2239
2242
  return;
2240
2243
  const d = this._dataValidationModel.getValidator(h.type);
2241
2244
  if (!d)
2242
2245
  return;
2243
2246
  const v = this._themeService.getCurrentTheme();
2244
- if (!((E = d.skipDefaultFontRender) != null && E.call(d, h, u, { unitId: a, subUnitId: i, row: l, column: s })))
2247
+ if (!((b = d.skipDefaultFontRender) != null && b.call(d, h, u, { unitId: a, subUnitId: i, row: s, column: l })))
2245
2248
  return;
2246
- const p = d.parseFormulaSync(h, a, i), { formula1: C } = p, R = this._calc(c, o), { a: g, d: w } = e.getTransform(), I = En(R.left, g), V = En(R.top, w), _ = ra.create().composeMatrix({
2249
+ const p = d.parseFormulaSync(h, a, i), { formula1: C } = p, R = this._calc(c, o), { a: f, d: w } = t.getTransform(), I = bn(R.left, f), V = bn(R.top, w), _ = ra.create().composeMatrix({
2247
2250
  left: I,
2248
2251
  top: V,
2249
2252
  scaleX: 1,
@@ -2253,31 +2256,31 @@ let dn = class {
2253
2256
  skewY: 0,
2254
2257
  flipX: !1,
2255
2258
  flipY: !1
2256
- }), S = c.endX - c.startX, m = c.endY - c.startY;
2257
- e.save(), e.beginPath(), e.rect(c.startX, c.startY, S, m), e.clip();
2258
- const M = _.getMatrix();
2259
- e.transform(M[0], M[1], M[2], M[3], M[4], M[5]);
2260
- const L = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, U = String(u) === String(C), T = v.hyacinth500;
2261
- sa.drawWith(e, {
2262
- checked: U,
2263
- width: L,
2264
- height: L,
2265
- fill: (N = (F = o == null ? void 0 : o.cl) == null ? void 0 : F.rgb) != null ? N : T
2266
- }), e.restore();
2267
- }
2268
- isHit(e, t) {
2269
- const o = t.primaryWithCoord.isMergedMainCell ? t.primaryWithCoord.mergeInfo : t.primaryWithCoord, n = this._calc(o, t.style), a = n.top, i = n.top + n.height, r = n.left, l = n.left + n.width, { x: s, y: c } = e;
2270
- return s <= l && s >= r && c <= i && c >= a;
2271
- }
2272
- async onPointerDown(e, t) {
2259
+ }), S = c.endX - c.startX, g = c.endY - c.startY;
2260
+ t.save(), t.beginPath(), t.rect(c.startX, c.startY, S, g), t.clip();
2261
+ const y = _.getMatrix();
2262
+ t.transform(y[0], y[1], y[2], y[3], y[4], y[5]);
2263
+ const T = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, N = String(u) === String(C), P = v.hyacinth500;
2264
+ sa.drawWith(t, {
2265
+ checked: N,
2266
+ width: T,
2267
+ height: T,
2268
+ fill: (F = (k = o == null ? void 0 : o.cl) == null ? void 0 : k.rgb) != null ? F : P
2269
+ }), t.restore();
2270
+ }
2271
+ isHit(t, e) {
2272
+ const o = e.primaryWithCoord.isMergedMainCell ? e.primaryWithCoord.mergeInfo : e.primaryWithCoord, n = this._calc(o, e.style), a = n.top, i = n.top + n.height, r = n.left, s = n.left + n.width, { x: l, y: c } = t;
2273
+ return l <= s && l >= r && c <= i && c >= a;
2274
+ }
2275
+ async onPointerDown(t, e) {
2273
2276
  var p;
2274
- if (t.button === 2)
2277
+ if (e.button === 2)
2275
2278
  return;
2276
- const { primaryWithCoord: o, unitId: n, subUnitId: a, worksheet: i, row: r, col: l } = e, s = re(i.getCellRaw(r, l)), c = this._dataValidationModel.getRuleByLocation(n, a, r, l);
2279
+ const { primaryWithCoord: o, unitId: n, subUnitId: a, worksheet: i, row: r, col: s } = t, l = rt(i.getCellRaw(r, s)), c = this._dataValidationModel.getRuleByLocation(n, a, r, s);
2277
2280
  if (!c)
2278
2281
  return;
2279
2282
  const u = this._dataValidationModel.getValidator(c.type);
2280
- if (!u || !((p = u.skipDefaultFontRender) != null && p.call(u, c, s, { unitId: n, subUnitId: a, row: r, column: l })))
2283
+ if (!u || !((p = u.skipDefaultFontRender) != null && p.call(u, c, l, { unitId: n, subUnitId: a, row: r, column: s })))
2281
2284
  return;
2282
2285
  const { formula1: h, formula2: d } = await this._parseFormula(c, n, a), v = {
2283
2286
  range: {
@@ -2287,7 +2290,7 @@ let dn = class {
2287
2290
  endRow: o.actualRow
2288
2291
  },
2289
2292
  value: {
2290
- v: String(s) === Ca(String(h)) ? d : h,
2293
+ v: String(l) === wa(String(h)) ? d : h,
2291
2294
  p: null
2292
2295
  }
2293
2296
  };
@@ -2296,161 +2299,161 @@ let dn = class {
2296
2299
  v
2297
2300
  );
2298
2301
  }
2299
- onPointerEnter(e, t) {
2302
+ onPointerEnter(t, e) {
2300
2303
  var o, n;
2301
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2304
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xt.POINTER);
2302
2305
  }
2303
- onPointerLeave(e, t) {
2306
+ onPointerLeave(t, e) {
2304
2307
  var o, n;
2305
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2308
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xt.DEFAULT);
2306
2309
  }
2307
2310
  };
2308
- dn = Ur([
2309
- it(0, ee),
2310
- it(1, b(Sa)),
2311
- it(2, b(ea)),
2312
- it(3, b(Ve)),
2313
- it(4, b(ae))
2311
+ dn = Mr([
2312
+ ie(0, tt),
2313
+ ie(1, E(Sa)),
2314
+ ie(2, E(ta)),
2315
+ ie(3, E(Vt)),
2316
+ ie(4, E(at))
2314
2317
  ], dn);
2315
- var Br = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, kr = (e, t, o, n) => {
2316
- for (var a = n > 1 ? void 0 : n ? $r(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2317
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2318
- return n && a && Br(t, o, a), a;
2319
- }, Wr = (e, t) => (o, n) => t(o, n, e);
2320
- let ge = class {
2321
- constructor(e) {
2322
- y(this, "canvasRender", null);
2323
- y(this, "dropdown");
2324
- y(this, "optionsInput");
2325
- y(this, "formulaInput", yn);
2326
- this.injector = e;
2318
+ var Er = Object.getOwnPropertyDescriptor, br = (t, e, o, n) => {
2319
+ for (var a = n > 1 ? void 0 : n ? Er(e, o) : e, i = t.length - 1, r; i >= 0; i--)
2320
+ (r = t[i]) && (a = r(a) || a);
2321
+ return a;
2322
+ }, Or = (t, e) => (o, n) => e(o, n, t);
2323
+ let ft = class {
2324
+ constructor(t) {
2325
+ M(this, "canvasRender", null);
2326
+ M(this, "dropdown");
2327
+ M(this, "optionsInput");
2328
+ M(this, "formulaInput", Mn);
2329
+ this.injector = t;
2327
2330
  }
2328
2331
  };
2329
- ge = kr([
2330
- Wr(0, b($e))
2331
- ], ge);
2332
- class Hr extends ge {
2332
+ ft = br([
2333
+ Or(0, E(Bt))
2334
+ ], ft);
2335
+ class Lr extends ft {
2333
2336
  constructor() {
2334
2337
  super(...arguments);
2335
- y(this, "id", K.CHECKBOX);
2336
- y(this, "canvasRender", this.injector.createInstance(dn));
2337
- y(this, "formulaInput", Fo);
2338
+ M(this, "id", K.CHECKBOX);
2339
+ M(this, "canvasRender", this.injector.createInstance(dn));
2340
+ M(this, "formulaInput", ko);
2338
2341
  }
2339
2342
  }
2340
- class jr extends ge {
2343
+ class Tr extends ft {
2341
2344
  constructor() {
2342
2345
  super(...arguments);
2343
- y(this, "id", K.CUSTOM);
2344
- y(this, "formulaInput", Ao);
2346
+ M(this, "id", K.CUSTOM);
2347
+ M(this, "formulaInput", Ao);
2345
2348
  }
2346
2349
  }
2347
- const xr = "data-validation.formula-input";
2348
- class Yr extends ge {
2350
+ const Pr = "data-validation.formula-input";
2351
+ class Ar extends ft {
2349
2352
  constructor() {
2350
2353
  super(...arguments);
2351
- y(this, "id", K.DATE);
2352
- y(this, "formulaInput", xr);
2353
- y(this, "optionsInput", Et.componentKey);
2354
- y(this, "dropdown", bo);
2354
+ M(this, "id", K.DATE);
2355
+ M(this, "formulaInput", Pr);
2356
+ M(this, "optionsInput", be.componentKey);
2357
+ M(this, "dropdown", Eo);
2355
2358
  }
2356
2359
  }
2357
- class Xr extends ge {
2360
+ class kr extends ft {
2358
2361
  constructor() {
2359
2362
  super(...arguments);
2360
- y(this, "id", K.DECIMAL);
2361
- y(this, "formulaInput", Nt);
2363
+ M(this, "id", K.DECIMAL);
2364
+ M(this, "formulaInput", Fe);
2362
2365
  }
2363
2366
  }
2364
- const No = 4, zr = 0, jt = 4, Uo = 4, cn = 6, Ot = 6, Te = 14;
2365
- function Kr(e, t) {
2366
- const o = la.getTextSize(e, t), n = o.width + No * 2, { ba: a, bd: i } = o, r = a + i;
2367
+ const Fo = 4, Fr = 0, xe = 4, No = 4, cn = 6, Oe = 6, Pt = 14;
2368
+ function Nr(t, e) {
2369
+ const o = la.getTextSize(t, e), n = o.width + Fo * 2, { ba: a, bd: i } = o, r = a + i;
2367
2370
  return {
2368
2371
  width: n,
2369
- height: r + zr * 2,
2372
+ height: r + Fr * 2,
2370
2373
  ba: a
2371
2374
  };
2372
2375
  }
2373
- function xt(e, t, o, n) {
2374
- const a = Te + cn * 2, i = o - a, r = n - Ot * 2, l = e.map((d) => ({
2375
- layout: Kr(d, t),
2376
+ function je(t, e, o, n) {
2377
+ const a = Pt + cn * 2, i = o - a, r = n - Oe * 2, s = t.map((d) => ({
2378
+ layout: Nr(d, e),
2376
2379
  text: d
2377
2380
  }));
2378
- let s;
2381
+ let l;
2379
2382
  const c = [];
2380
- l.forEach((d) => {
2383
+ s.forEach((d) => {
2381
2384
  const { layout: v } = d, { width: p, height: C } = v;
2382
- !s || s.width + p + jt > i ? (s = {
2385
+ !l || l.width + p + xe > i ? (l = {
2383
2386
  width: p,
2384
2387
  height: C,
2385
2388
  items: [{
2386
2389
  ...d,
2387
2390
  left: 0
2388
2391
  }]
2389
- }, c.push(s)) : (s.items.push({
2392
+ }, c.push(l)) : (l.items.push({
2390
2393
  ...d,
2391
- left: s.width + jt
2392
- }), s.width = s.width + p + jt);
2394
+ left: l.width + xe
2395
+ }), l.width = l.width + p + xe);
2393
2396
  });
2394
2397
  let u = 0, h = 0;
2395
2398
  return c.forEach((d, v) => {
2396
- h = Math.max(h, d.width), v === c.length - 1 ? u += d.height : u += d.height + Uo;
2399
+ h = Math.max(h, d.width), v === c.length - 1 ? u += d.height : u += d.height + No;
2397
2400
  }), {
2398
2401
  lines: c,
2399
2402
  totalHeight: u,
2400
2403
  contentWidth: i,
2401
2404
  contentHeight: r,
2402
- cellAutoHeight: u + Ot * 2,
2405
+ cellAutoHeight: u + Oe * 2,
2403
2406
  calcAutoWidth: h + a
2404
2407
  };
2405
2408
  }
2406
- const Gr = 8;
2407
- class Zr extends da {
2408
- static drawWith(t, o) {
2409
- const { fontString: n, info: a, fill: i, color: r } = o, { layout: l, text: s } = a;
2410
- t.save(), qn.drawWith(t, {
2411
- width: l.width,
2412
- height: l.height,
2413
- radius: Gr,
2414
- fill: i || Fe
2415
- }), t.translateWithPrecision(No, l.ba), t.font = n, t.fillStyle = r, t.fillText(s, 0, 0), t.restore();
2409
+ const Ur = 8;
2410
+ class Br extends da {
2411
+ static drawWith(e, o) {
2412
+ const { fontString: n, info: a, fill: i, color: r } = o, { layout: s, text: l } = a;
2413
+ e.save(), qn.drawWith(e, {
2414
+ width: s.width,
2415
+ height: s.height,
2416
+ radius: Ur,
2417
+ fill: i || kt
2418
+ }), e.translateWithPrecision(Fo, s.ba), e.font = n, e.fillStyle = r, e.fillText(l, 0, 0), e.restore();
2416
2419
  }
2417
2420
  }
2418
- var qr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Qr = (e, t, o, n) => {
2419
- for (var a = n > 1 ? void 0 : n ? Jr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2420
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2421
- return n && a && qr(t, o, a), a;
2422
- }, Yt = (e, t) => (o, n) => t(o, n, e);
2423
- const es = 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");
2421
+ var $r = Object.getOwnPropertyDescriptor, Wr = (t, e, o, n) => {
2422
+ for (var a = n > 1 ? void 0 : n ? $r(e, o) : e, i = t.length - 1, r; i >= 0; i--)
2423
+ (r = t[i]) && (a = r(a) || a);
2424
+ return a;
2425
+ }, Ye = (t, e) => (o, n) => e(o, n, t);
2426
+ const Hr = 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");
2424
2427
  let un = class {
2425
- constructor(e, t, o) {
2426
- y(this, "zIndex");
2427
- y(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2428
- this._commandService = e, this._renderManagerService = t, this._dataValidationModel = o;
2428
+ constructor(t, e, o) {
2429
+ M(this, "zIndex");
2430
+ M(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2431
+ this._commandService = t, this._renderManagerService = e, this._dataValidationModel = o;
2429
2432
  }
2430
- _ensureMap(e) {
2431
- let t = this._dropdownInfoMap.get(e);
2432
- return t || (t = /* @__PURE__ */ new Map(), this._dropdownInfoMap.set(e, t)), t;
2433
+ _ensureMap(t) {
2434
+ let e = this._dropdownInfoMap.get(t);
2435
+ return e || (e = /* @__PURE__ */ new Map(), this._dropdownInfoMap.set(t, e)), e;
2433
2436
  }
2434
- _generateKey(e, t) {
2435
- return `${e}.${t}`;
2437
+ _generateKey(t, e) {
2438
+ return `${t}.${e}`;
2436
2439
  }
2437
- _drawDownIcon(e, t, o, n, a) {
2438
- const i = o - Te + 4;
2440
+ _drawDownIcon(t, e, o, n, a) {
2441
+ const i = o - Pt + 4;
2439
2442
  let r = 4;
2440
2443
  switch (a) {
2441
- case he.MIDDLE:
2442
- r = (n - Te) / 2 + 4;
2444
+ case ht.MIDDLE:
2445
+ r = (n - Pt) / 2 + 4;
2443
2446
  break;
2444
- case he.BOTTOM:
2445
- r = n - Te + 4;
2447
+ case ht.BOTTOM:
2448
+ r = n - Pt + 4;
2446
2449
  break;
2447
2450
  }
2448
- e.save(), e.translateWithPrecision(t.startX + i, t.startY + r), e.fillStyle = "#565656", e.fill(es), e.restore();
2451
+ t.save(), t.translateWithPrecision(e.startX + i, e.startY + r), t.fillStyle = "#565656", t.fill(Hr), t.restore();
2449
2452
  }
2450
2453
  // eslint-disable-next-line max-lines-per-function
2451
- drawWith(e, t, o, n) {
2454
+ drawWith(t, e, o, n) {
2452
2455
  var z, H;
2453
- const { primaryWithCoord: a, row: i, col: r, style: l, data: s, subUnitId: c } = t, u = a.isMergedMainCell ? a.mergeInfo : a, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: d = 0, rightOffset: v = 0, topOffset: p = 0, downOffset: C = 0 } = h || {}, R = this._ensureMap(c), g = this._generateKey(i, r), w = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, r);
2456
+ const { primaryWithCoord: a, row: i, col: r, style: s, data: l, subUnitId: c } = e, u = a.isMergedMainCell ? a.mergeInfo : a, h = l == null ? void 0 : l.fontRenderExtension, { leftOffset: d = 0, rightOffset: v = 0, topOffset: p = 0, downOffset: C = 0 } = h || {}, R = this._ensureMap(c), f = this._generateKey(i, r), w = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, r);
2454
2457
  if (!w)
2455
2458
  return;
2456
2459
  const I = this._dataValidationModel.getValidator(w.type);
@@ -2461,143 +2464,143 @@ let un = class {
2461
2464
  endX: u.endX - v,
2462
2465
  startY: u.startY + p,
2463
2466
  endY: u.endY - C
2464
- }, _ = V.endX - V.startX, S = V.endY - V.startY, { cl: m } = l || {}, M = (z = typeof m == "object" ? m == null ? void 0 : m.rgb : m) != null ? z : "#000", L = Ut(l != null ? l : void 0), { vt: U, ht: T } = l || {}, E = U != null ? U : he.MIDDLE, A = (H = re(s)) != null ? H : "", F = I.parseCellValue(A), N = I.getListWithColorMap(w), B = xt(F, L, _, S);
2465
- this._drawDownIcon(e, V, _, S, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, _ - Te, S), e.clip(), e.translateWithPrecision(cn, Ot);
2467
+ }, _ = V.endX - V.startX, S = V.endY - V.startY, { cl: g } = s || {}, y = (z = typeof g == "object" ? g == null ? void 0 : g.rgb : g) != null ? z : "#000", T = Ne(s != null ? s : void 0), { vt: N, ht: P } = s || {}, b = N != null ? N : ht.MIDDLE, A = (H = rt(l)) != null ? H : "", k = I.parseCellValue(A), F = I.getListWithColorMap(w), U = je(k, T, _, S);
2468
+ this._drawDownIcon(t, V, _, S, b), t.save(), t.translateWithPrecision(V.startX, V.startY), t.beginPath(), t.rect(0, 0, _ - Pt, S), t.clip(), t.translateWithPrecision(cn, Oe);
2466
2469
  let Y = 0;
2467
- switch (E) {
2468
- case he.MIDDLE:
2469
- Y = (B.contentHeight - B.totalHeight) / 2;
2470
+ switch (b) {
2471
+ case ht.MIDDLE:
2472
+ Y = (U.contentHeight - U.totalHeight) / 2;
2470
2473
  break;
2471
- case he.BOTTOM:
2472
- Y = B.contentHeight - B.totalHeight;
2474
+ case ht.BOTTOM:
2475
+ Y = U.contentHeight - U.totalHeight;
2473
2476
  break;
2474
2477
  }
2475
- e.translateWithPrecision(0, Y), B.lines.forEach((G, J) => {
2476
- e.save();
2477
- const { width: te, height: ne, items: se } = G;
2478
- let ie = 0;
2479
- switch (T) {
2480
- case Ye.RIGHT:
2481
- ie = B.contentWidth - te;
2478
+ t.translateWithPrecision(0, Y), U.lines.forEach((G, J) => {
2479
+ t.save();
2480
+ const { width: et, height: nt, items: st } = G;
2481
+ let it = 0;
2482
+ switch (P) {
2483
+ case Yt.RIGHT:
2484
+ it = U.contentWidth - et;
2482
2485
  break;
2483
- case Ye.CENTER:
2484
- ie = (B.contentWidth - te) / 2;
2486
+ case Yt.CENTER:
2487
+ it = (U.contentWidth - et) / 2;
2485
2488
  break;
2486
2489
  }
2487
- e.translate(ie, J * (ne + Uo)), se.forEach((le) => {
2488
- e.save(), e.translateWithPrecision(le.left, 0), Zr.drawWith(e, {
2489
- ...L,
2490
- info: le,
2491
- color: M,
2492
- fill: N[le.text]
2493
- }), e.restore();
2494
- }), e.restore();
2495
- }), e.restore(), R.set(g, {
2490
+ t.translate(it, J * (nt + No)), st.forEach((lt) => {
2491
+ t.save(), t.translateWithPrecision(lt.left, 0), Br.drawWith(t, {
2492
+ ...T,
2493
+ info: lt,
2494
+ color: y,
2495
+ fill: F[lt.text]
2496
+ }), t.restore();
2497
+ }), t.restore();
2498
+ }), t.restore(), R.set(f, {
2496
2499
  left: V.startX,
2497
2500
  top: V.startY,
2498
- width: B.contentWidth + cn + Te,
2499
- height: B.contentHeight + Ot * 2
2501
+ width: U.contentWidth + cn + Pt,
2502
+ height: U.contentHeight + Oe * 2
2500
2503
  });
2501
2504
  }
2502
- calcCellAutoHeight(e) {
2505
+ calcCellAutoHeight(t) {
2503
2506
  var _;
2504
- const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, h = t.isMergedMainCell ? t.mergeInfo : t, d = {
2505
- startX: h.startX + l,
2506
- endX: h.endX - s,
2507
+ const { primaryWithCoord: e, style: o, data: n, row: a, col: i } = t, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: l = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, h = e.isMergedMainCell ? e.mergeInfo : e, d = {
2508
+ startX: h.startX + s,
2509
+ endX: h.endX - l,
2507
2510
  startY: h.startY + c,
2508
2511
  endY: h.endY - u
2509
- }, v = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2512
+ }, v = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2510
2513
  if (!v)
2511
2514
  return;
2512
2515
  const p = this._dataValidationModel.getValidator(v.type);
2513
2516
  if (!p)
2514
2517
  return;
2515
- const C = d.endX - d.startX, R = d.endY - d.startY, g = (_ = re(n)) != null ? _ : "", w = p.parseCellValue(g), I = Ut(o != null ? o : void 0);
2516
- return xt(w, I, C, R).cellAutoHeight;
2518
+ const C = d.endX - d.startX, R = d.endY - d.startY, f = (_ = rt(n)) != null ? _ : "", w = p.parseCellValue(f), I = Ne(o != null ? o : void 0);
2519
+ return je(w, I, C, R).cellAutoHeight;
2517
2520
  }
2518
- calcCellAutoWidth(e) {
2521
+ calcCellAutoWidth(t) {
2519
2522
  var _;
2520
- const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, h = t.isMergedMainCell ? t.mergeInfo : t, d = {
2521
- startX: h.startX + l,
2522
- endX: h.endX - s,
2523
+ const { primaryWithCoord: e, style: o, data: n, row: a, col: i } = t, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: l = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, h = e.isMergedMainCell ? e.mergeInfo : e, d = {
2524
+ startX: h.startX + s,
2525
+ endX: h.endX - l,
2523
2526
  startY: h.startY + c,
2524
2527
  endY: h.endY - u
2525
- }, v = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2528
+ }, v = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2526
2529
  if (!v)
2527
2530
  return;
2528
2531
  const p = this._dataValidationModel.getValidator(v.type);
2529
2532
  if (!p)
2530
2533
  return;
2531
- const C = d.endX - d.startX, R = d.endY - d.startY, g = (_ = re(n)) != null ? _ : "", w = p.parseCellValue(g), I = Ut(o != null ? o : void 0);
2532
- return xt(w, I, C, R).calcAutoWidth;
2534
+ const C = d.endX - d.startX, R = d.endY - d.startY, f = (_ = rt(n)) != null ? _ : "", w = p.parseCellValue(f), I = Ne(o != null ? o : void 0);
2535
+ return je(w, I, C, R).calcAutoWidth;
2533
2536
  }
2534
- isHit(e, t) {
2535
- const { primaryWithCoord: o } = t, n = o.isMergedMainCell ? o.mergeInfo : o, { endX: a } = n, { x: i } = e;
2536
- return i >= a - Te && i <= a;
2537
+ isHit(t, e) {
2538
+ const { primaryWithCoord: o } = e, n = o.isMergedMainCell ? o.mergeInfo : o, { endX: a } = n, { x: i } = t;
2539
+ return i >= a - Pt && i <= a;
2537
2540
  }
2538
- onPointerDown(e, t) {
2539
- if (t.button === 2)
2541
+ onPointerDown(t, e) {
2542
+ if (e.button === 2)
2540
2543
  return;
2541
- const { unitId: o, subUnitId: n, row: a, col: i } = e, r = {
2544
+ const { unitId: o, subUnitId: n, row: a, col: i } = t, r = {
2542
2545
  unitId: o,
2543
2546
  subUnitId: n,
2544
2547
  row: a,
2545
2548
  column: i
2546
2549
  };
2547
- this._commandService.executeCommand(At.id, r);
2550
+ this._commandService.executeCommand(Ae.id, r);
2548
2551
  }
2549
- onPointerEnter(e, t) {
2552
+ onPointerEnter(t, e) {
2550
2553
  var o, n;
2551
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2554
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xt.POINTER);
2552
2555
  }
2553
- onPointerLeave(e, t) {
2556
+ onPointerLeave(t, e) {
2554
2557
  var o, n;
2555
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2558
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xt.DEFAULT);
2556
2559
  }
2557
2560
  };
2558
- un = Qr([
2559
- Yt(0, ee),
2560
- Yt(1, b(Ve)),
2561
- Yt(2, b(ae))
2561
+ un = Wr([
2562
+ Ye(0, tt),
2563
+ Ye(1, E(Vt)),
2564
+ Ye(2, E(at))
2562
2565
  ], un);
2563
- class ts extends ge {
2566
+ class xr extends ft {
2564
2567
  constructor() {
2565
2568
  super(...arguments);
2566
- y(this, "id", K.LIST_MULTIPLE);
2567
- y(this, "canvasRender", this.injector.createInstance(un));
2568
- y(this, "dropdown", Mn);
2569
+ M(this, "id", K.LIST_MULTIPLE);
2570
+ M(this, "canvasRender", this.injector.createInstance(un));
2571
+ M(this, "dropdown", yn);
2569
2572
  }
2570
2573
  }
2571
- var ns = Object.defineProperty, os = Object.getOwnPropertyDescriptor, as = (e, t, o, n) => {
2572
- for (var a = n > 1 ? void 0 : n ? os(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2573
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2574
- return n && a && ns(t, o, a), a;
2575
- }, ft = (e, t) => (o, n) => t(o, n, e);
2576
- const Le = 4, mt = 4, pe = 14, fe = 6, xe = 4, Xt = 8, is = "#565656", jn = 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");
2577
- function rs(e, t) {
2578
- const o = e.length;
2574
+ var jr = Object.getOwnPropertyDescriptor, Yr = (t, e, o, n) => {
2575
+ for (var a = n > 1 ? void 0 : n ? jr(e, o) : e, i = t.length - 1, r; i >= 0; i--)
2576
+ (r = t[i]) && (a = r(a) || a);
2577
+ return a;
2578
+ }, me = (t, e) => (o, n) => e(o, n, t);
2579
+ const Tt = 4, ge = 4, pt = 14, mt = 6, jt = 4, Xe = 8, Xr = "#565656", xn = 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");
2580
+ function zr(t, e) {
2581
+ const o = t.length;
2579
2582
  return {
2580
2583
  id: "d",
2581
2584
  body: {
2582
- dataStream: `${e}${na}`,
2585
+ dataStream: `${t}${na}`,
2583
2586
  textRuns: [
2584
2587
  {
2585
2588
  ts: {
2586
2589
  fs: 11,
2587
2590
  ff: void 0,
2588
- it: tt.FALSE,
2589
- bl: tt.FALSE,
2591
+ it: ee.FALSE,
2592
+ bl: ee.FALSE,
2590
2593
  ul: {
2591
- s: tt.FALSE
2594
+ s: ee.FALSE
2592
2595
  },
2593
2596
  st: {
2594
- s: tt.FALSE
2597
+ s: ee.FALSE
2595
2598
  },
2596
2599
  ol: {
2597
- s: tt.FALSE
2600
+ s: ee.FALSE
2598
2601
  },
2599
2602
  cl: void 0,
2600
- ...t,
2603
+ ...e,
2601
2604
  bg: void 0,
2602
2605
  bd: void 0
2603
2606
  },
@@ -2614,22 +2617,22 @@ function rs(e, t) {
2614
2617
  }
2615
2618
  };
2616
2619
  }
2617
- function Bo(e, t, o) {
2618
- const n = rs(e, o), a = new ta(n), i = new ca(a);
2620
+ function Uo(t, e, o) {
2621
+ const n = zr(t, o), a = new ea(n), i = new ua(a);
2619
2622
  return {
2620
- documentSkeleton: ua.create(i, t),
2623
+ documentSkeleton: ha.create(i, e),
2621
2624
  docModel: a,
2622
2625
  docViewModel: i
2623
2626
  };
2624
2627
  }
2625
- function gt(e, t, o) {
2628
+ function fe(t, e, o) {
2626
2629
  const {
2627
2630
  documentSkeleton: n,
2628
2631
  docModel: a,
2629
2632
  docViewModel: i
2630
- } = Bo(e, t, o);
2633
+ } = Uo(t, e, o);
2631
2634
  return {
2632
- documents: new ha(`DOCUMENTS_${Qt.generateRandomId()}`, n, {
2635
+ documents: new ca(`DOCUMENTS_${Qe.generateRandomId()}`, n, {
2633
2636
  pageMarginLeft: 0,
2634
2637
  pageMarginTop: 0
2635
2638
  }),
@@ -2638,390 +2641,390 @@ function gt(e, t, o) {
2638
2641
  docViewModel: i
2639
2642
  };
2640
2643
  }
2641
- function xn(e, t, o, n, a, i, r = !0) {
2642
- let l = 0;
2643
- const s = r ? xe : 0;
2644
+ function jn(t, e, o, n, a, i, r = !0) {
2645
+ let s = 0;
2646
+ const l = r ? jt : 0;
2644
2647
  switch (a) {
2645
- case he.BOTTOM:
2646
- l = t - n - s;
2648
+ case ht.BOTTOM:
2649
+ s = e - n - l;
2647
2650
  break;
2648
- case he.MIDDLE:
2649
- l = (t - n) / 2;
2651
+ case ht.MIDDLE:
2652
+ s = (e - n) / 2;
2650
2653
  break;
2651
2654
  default:
2652
- l = s;
2655
+ s = l;
2653
2656
  break;
2654
2657
  }
2655
- l = Math.max(xe, l);
2658
+ s = Math.max(jt, s);
2656
2659
  let c = 0;
2657
2660
  switch (i) {
2658
- case Ye.CENTER:
2659
- c = (e - o) / 2;
2661
+ case Yt.CENTER:
2662
+ c = (t - o) / 2;
2660
2663
  break;
2661
- case Ye.RIGHT:
2662
- c = e - o;
2664
+ case Yt.RIGHT:
2665
+ c = t - o;
2663
2666
  break;
2664
2667
  }
2665
- return c = Math.max(fe, c), {
2668
+ return c = Math.max(mt, c), {
2666
2669
  paddingLeft: c,
2667
- paddingTop: l
2670
+ paddingTop: s
2668
2671
  };
2669
2672
  }
2670
2673
  let hn = class {
2671
- constructor(e, t, o, n) {
2672
- y(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2673
- y(this, "zIndex");
2674
- this._localeService = e, this._commandService = t, this._renderManagerService = o, this._dataValidationModel = n;
2674
+ constructor(t, e, o, n) {
2675
+ M(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2676
+ M(this, "zIndex");
2677
+ this._localeService = t, this._commandService = e, this._renderManagerService = o, this._dataValidationModel = n;
2675
2678
  }
2676
- _ensureMap(e) {
2677
- let t = this._dropdownInfoMap.get(e);
2678
- return t || (t = /* @__PURE__ */ new Map(), this._dropdownInfoMap.set(e, t)), t;
2679
+ _ensureMap(t) {
2680
+ let e = this._dropdownInfoMap.get(t);
2681
+ return e || (e = /* @__PURE__ */ new Map(), this._dropdownInfoMap.set(t, e)), e;
2679
2682
  }
2680
- _generateKey(e, t) {
2681
- return `${e}.${t}`;
2683
+ _generateKey(t, e) {
2684
+ return `${t}.${e}`;
2682
2685
  }
2683
- _drawDownIcon(e, t, o, n, a, i, r) {
2684
- const { t: l = de.pd.t, b: s = de.pd.b } = r, c = o - pe;
2686
+ _drawDownIcon(t, e, o, n, a, i, r) {
2687
+ const { t: s = dt.pd.t, b: l = dt.pd.b } = r, c = o - pt;
2685
2688
  let u;
2686
2689
  switch (i) {
2687
- case he.MIDDLE:
2688
- u = (n - mt) / 2;
2690
+ case ht.MIDDLE:
2691
+ u = (n - ge) / 2;
2689
2692
  break;
2690
- case he.BOTTOM:
2691
- u = n - s - a - xe + (a / 2 - mt / 2);
2693
+ case ht.BOTTOM:
2694
+ u = n - l - a - jt + (a / 2 - ge / 2);
2692
2695
  break;
2693
2696
  default:
2694
- u = l + xe + (a / 2 - mt / 2);
2697
+ u = s + jt + (a / 2 - ge / 2);
2695
2698
  break;
2696
2699
  }
2697
- e.save(), e.translateWithPrecision(t.startX + c, t.startY + u), e.fillStyle = "#565656", e.fill(jn), e.restore();
2700
+ t.save(), t.translateWithPrecision(e.startX + c, e.startY + u), t.fillStyle = "#565656", t.fill(xn), t.restore();
2698
2701
  }
2699
2702
  // eslint-disable-next-line max-lines-per-function, complexity
2700
- drawWith(e, t, o) {
2701
- const { primaryWithCoord: n, row: a, col: i, style: r, data: l, subUnitId: s } = t, c = n.isMergedMainCell ? n.mergeInfo : n, u = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2703
+ drawWith(t, e, o) {
2704
+ const { primaryWithCoord: n, row: a, col: i, style: r, data: s, subUnitId: l } = e, c = n.isMergedMainCell ? n.mergeInfo : n, u = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2702
2705
  if (!u)
2703
2706
  return;
2704
2707
  const h = this._dataValidationModel.getValidator(u.type);
2705
2708
  if (!h)
2706
2709
  return;
2707
- const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: v = 0, rightOffset: p = 0, topOffset: C = 0, downOffset: R = 0 } = d || {};
2710
+ const d = s == null ? void 0 : s.fontRenderExtension, { leftOffset: v = 0, rightOffset: p = 0, topOffset: C = 0, downOffset: R = 0 } = d || {};
2708
2711
  if (!u || !h || !h || h.id.indexOf(K.LIST) !== 0 || !h.skipDefaultFontRender(u))
2709
2712
  return;
2710
- const g = {
2713
+ const f = {
2711
2714
  startX: c.startX + v,
2712
2715
  endX: c.endX - p,
2713
2716
  startY: c.startY + C,
2714
2717
  endY: c.endY - R
2715
- }, w = g.endX - g.startX, I = g.endY - g.startY, V = this._ensureMap(s), _ = this._generateKey(a, i), S = h.getListWithColor(u), m = re(l), M = `${m != null ? m : ""}`, L = S.find((F) => F.label === M);
2716
- let { tb: U, vt: T, ht: E, pd: A } = r || {};
2717
- if (U = U != null ? U : Ce.WRAP, T = T != null ? T : he.BOTTOM, E = E != null ? E : de.ht, A = A != null ? A : de.pd, u.renderMode === ce.ARROW) {
2718
- const { l: F = de.pd.l, t: N = de.pd.t, r: B = de.pd.r, b: Y = de.pd.b } = A, z = w - F - B - pe - 4, { documentSkeleton: H, documents: G, docModel: J } = gt(M, this._localeService, r);
2719
- U === Ce.WRAP && J.updateDocumentDataPageSize(Math.max(z, 1)), H.calculate(), H.getActualSize();
2720
- const te = nt(H), { height: ne, width: se } = te, { paddingTop: ie, paddingLeft: le } = xn(z, I - N - Y, se, ne, T, E, !0);
2721
- this._drawDownIcon(e, g, w, I, ne, T, A), e.save(), e.translateWithPrecision(g.startX + F, g.startY + N), e.beginPath(), e.rect(0, 0, w - F - B, I - N - Y), e.clip(), e.translateWithPrecision(0, ie), e.save(), e.translateWithPrecision(Le, 0), e.beginPath(), e.rect(0, 0, z, ne), e.clip(), G.render(e), e.translateWithPrecision(le, 0), e.restore(), e.restore(), V.set(_, {
2722
- left: g.endX + F + o.rowHeaderWidth - pe,
2723
- top: g.startY + N + o.columnHeaderHeight,
2724
- width: pe,
2725
- height: I - N - Y
2718
+ }, w = f.endX - f.startX, I = f.endY - f.startY, V = this._ensureMap(l), _ = this._generateKey(a, i), S = h.getListWithColor(u), g = rt(s), y = `${g != null ? g : ""}`, T = S.find((k) => k.label === y);
2719
+ let { tb: N, vt: P, ht: b, pd: A } = r || {};
2720
+ if (N = N != null ? N : Ct.WRAP, P = P != null ? P : ht.BOTTOM, b = b != null ? b : dt.ht, A = A != null ? A : dt.pd, u.renderMode === ct.ARROW) {
2721
+ const { l: k = dt.pd.l, t: F = dt.pd.t, r: U = dt.pd.r, b: Y = dt.pd.b } = A, z = w - k - U - pt - 4, { documentSkeleton: H, documents: G, docModel: J } = fe(y, this._localeService, r);
2722
+ N === Ct.WRAP && J.updateDocumentDataPageSize(Math.max(z, 1)), H.calculate(), H.getActualSize();
2723
+ const et = ne(H), { height: nt, width: st } = et, { paddingTop: it, paddingLeft: lt } = jn(z, I - F - Y, st, nt, P, b, !0);
2724
+ this._drawDownIcon(t, f, w, I, nt, P, A), t.save(), t.translateWithPrecision(f.startX + k, f.startY + F), t.beginPath(), t.rect(0, 0, w - k - U, I - F - Y), t.clip(), t.translateWithPrecision(0, it), t.save(), t.translateWithPrecision(Tt, 0), t.beginPath(), t.rect(0, 0, z, nt), t.clip(), G.render(t), t.translateWithPrecision(lt, 0), t.restore(), t.restore(), V.set(_, {
2725
+ left: f.endX + k + o.rowHeaderWidth - pt,
2726
+ top: f.startY + F + o.columnHeaderHeight,
2727
+ width: pt,
2728
+ height: I - F - Y
2726
2729
  });
2727
2730
  } else {
2728
- e.save(), e.translateWithPrecision(g.startX, g.startY), e.beginPath(), e.rect(0, 0, w, I), e.clip();
2729
- const F = w - fe * 2 - Le - pe - 4, { documentSkeleton: N, documents: B, docModel: Y } = gt(M, this._localeService, r);
2730
- U === Ce.WRAP && Y.updateDocumentDataPageSize(Math.max(F, 1)), N.calculate();
2731
- const z = nt(N), { height: H, width: G } = z, { paddingTop: J, paddingLeft: te } = xn(F, I, G, H, T, E);
2732
- e.translateWithPrecision(fe, J);
2733
- const ne = Math.max(w - fe * 2, 1), se = H;
2734
- qn.drawWith(e, {
2735
- width: ne,
2736
- height: se,
2737
- fill: (L == null ? void 0 : L.color) || Fe,
2738
- radius: Xt
2739
- }), e.save(), e.translateWithPrecision(Le, 0), e.beginPath(), e.rect(0, 0, F, H), e.clip(), e.translateWithPrecision(te, 0), B.render(e), e.restore(), e.translateWithPrecision(F + Le + 4, (H - mt) / 2), e.fillStyle = is, e.fill(jn), e.restore(), V.set(_, {
2740
- left: g.startX + fe + o.rowHeaderWidth,
2741
- top: g.startY + J + o.columnHeaderHeight,
2742
- width: ne,
2743
- height: se
2731
+ t.save(), t.translateWithPrecision(f.startX, f.startY), t.beginPath(), t.rect(0, 0, w, I), t.clip();
2732
+ const k = w - mt * 2 - Tt - pt - 4, { documentSkeleton: F, documents: U, docModel: Y } = fe(y, this._localeService, r);
2733
+ N === Ct.WRAP && Y.updateDocumentDataPageSize(Math.max(k, 1)), F.calculate();
2734
+ const z = ne(F), { height: H, width: G } = z, { paddingTop: J, paddingLeft: et } = jn(k, I, G, H, P, b);
2735
+ t.translateWithPrecision(mt, J);
2736
+ const nt = Math.max(w - mt * 2, 1), st = H;
2737
+ qn.drawWith(t, {
2738
+ width: nt,
2739
+ height: st,
2740
+ fill: (T == null ? void 0 : T.color) || kt,
2741
+ radius: Xe
2742
+ }), t.save(), t.translateWithPrecision(Tt, 0), t.beginPath(), t.rect(0, 0, k, H), t.clip(), t.translateWithPrecision(et, 0), U.render(t), t.restore(), t.translateWithPrecision(k + Tt + 4, (H - ge) / 2), t.fillStyle = Xr, t.fill(xn), t.restore(), V.set(_, {
2743
+ left: f.startX + mt + o.rowHeaderWidth,
2744
+ top: f.startY + J + o.columnHeaderHeight,
2745
+ width: nt,
2746
+ height: st
2744
2747
  });
2745
2748
  }
2746
2749
  }
2747
- calcCellAutoHeight(e) {
2748
- const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2749
- if (!d || d.renderMode === ce.TEXT)
2750
+ calcCellAutoHeight(t) {
2751
+ const { primaryWithCoord: e, style: o, data: n, row: a, col: i } = t, r = e.isMergedMainCell ? e.mergeInfo : e, s = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = s || {}, d = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2752
+ if (!d || d.renderMode === ct.TEXT)
2750
2753
  return;
2751
2754
  const v = {
2752
- startX: r.startX + s,
2755
+ startX: r.startX + l,
2753
2756
  endX: r.endX - c,
2754
2757
  startY: r.startY + u,
2755
2758
  endY: r.endY - h
2756
- }, p = v.endX - v.startX, C = re(n), R = `${C != null ? C : ""}`;
2757
- let { tb: g, pd: w } = o || {};
2758
- const { t: I = de.pd.t, b: V = de.pd.b } = w != null ? w : {};
2759
- if (g = g != null ? g : Ce.WRAP, d.renderMode === ce.ARROW) {
2760
- const _ = p - pe, { documentSkeleton: S, docModel: m } = gt(R, this._localeService, o);
2761
- g === Ce.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate(), S.getActualSize();
2762
- const M = nt(S), { height: L } = M;
2763
- return L + I + V + xe * 2;
2759
+ }, p = v.endX - v.startX, C = rt(n), R = `${C != null ? C : ""}`;
2760
+ let { tb: f, pd: w } = o || {};
2761
+ const { t: I = dt.pd.t, b: V = dt.pd.b } = w != null ? w : {};
2762
+ if (f = f != null ? f : Ct.WRAP, d.renderMode === ct.ARROW) {
2763
+ const _ = p - pt, { documentSkeleton: S, docModel: g } = fe(R, this._localeService, o);
2764
+ f === Ct.WRAP && g.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate(), S.getActualSize();
2765
+ const y = ne(S), { height: T } = y;
2766
+ return T + I + V + jt * 2;
2764
2767
  } else {
2765
- const _ = p - fe * 2 - Le - pe, { documentSkeleton: S, docModel: m } = Bo(R, this._localeService, o);
2766
- g === Ce.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate();
2767
- const M = nt(S), {
2768
- height: L
2769
- } = M;
2770
- return L + xe * 2;
2768
+ const _ = p - mt * 2 - Tt - pt, { documentSkeleton: S, docModel: g } = Uo(R, this._localeService, o);
2769
+ f === Ct.WRAP && g.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate();
2770
+ const y = ne(S), {
2771
+ height: T
2772
+ } = y;
2773
+ return T + jt * 2;
2771
2774
  }
2772
2775
  }
2773
- calcCellAutoWidth(e) {
2774
- const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2775
- if (!d || d.renderMode === ce.TEXT)
2776
+ calcCellAutoWidth(t) {
2777
+ const { primaryWithCoord: e, style: o, data: n, row: a, col: i } = t, r = e.isMergedMainCell ? e.mergeInfo : e, s = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = s || {}, d = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2778
+ if (!d || d.renderMode === ct.TEXT)
2776
2779
  return;
2777
2780
  const v = {
2778
- startX: r.startX + s,
2781
+ startX: r.startX + l,
2779
2782
  endX: r.endX - c,
2780
2783
  startY: r.startY + u,
2781
2784
  endY: r.endY - h
2782
- }, p = v.endX - v.startX, C = re(n), R = `${C != null ? C : ""}`;
2783
- let { tb: g, pd: w } = o || {};
2784
- const { l: I = de.pd.l, r: V = de.pd.r } = w != null ? w : {};
2785
- g = g != null ? g : Ce.WRAP;
2786
- let _ = fe * 2 + pe;
2785
+ }, p = v.endX - v.startX, C = rt(n), R = `${C != null ? C : ""}`;
2786
+ let { tb: f, pd: w } = o || {};
2787
+ const { l: I = dt.pd.l, r: V = dt.pd.r } = w != null ? w : {};
2788
+ f = f != null ? f : Ct.WRAP;
2789
+ let _ = mt * 2 + pt;
2787
2790
  switch (d.renderMode) {
2788
- case ce.ARROW:
2789
- _ = pe + fe * 2 + V + I;
2791
+ case ct.ARROW:
2792
+ _ = pt + mt * 2 + V + I;
2790
2793
  break;
2791
- case ce.CUSTOM:
2792
- _ = pe + fe * 2 + Le * 2 + V + I + Xt / 2 + 1;
2794
+ case ct.CUSTOM:
2795
+ _ = pt + mt * 2 + Tt * 2 + V + I + Xe / 2 + 1;
2793
2796
  break;
2794
2797
  // default is CUSTOM
2795
2798
  default:
2796
- _ = pe + fe * 2 + Le * 2 + V + I + Xt / 2 + 1;
2799
+ _ = pt + mt * 2 + Tt * 2 + V + I + Xe / 2 + 1;
2797
2800
  }
2798
- const S = p - _, { documentSkeleton: m, docModel: M } = gt(R, this._localeService, o);
2799
- return g === Ce.WRAP && M.updateDocumentDataPageSize(Math.max(S, 1)), m.calculate(), m.getActualSize(), nt(m).width + _;
2801
+ const S = p - _, { documentSkeleton: g, docModel: y } = fe(R, this._localeService, o);
2802
+ return f === Ct.WRAP && y.updateDocumentDataPageSize(Math.max(S, 1)), g.calculate(), g.getActualSize(), ne(g).width + _;
2800
2803
  }
2801
- isHit(e, t) {
2802
- const { subUnitId: o, row: n, col: a } = t, r = this._ensureMap(o).get(this._generateKey(n, a)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, n, a);
2803
- if (!l || !r || l.renderMode === ce.TEXT)
2804
+ isHit(t, e) {
2805
+ const { subUnitId: o, row: n, col: a } = e, r = this._ensureMap(o).get(this._generateKey(n, a)), s = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, n, a);
2806
+ if (!s || !r || s.renderMode === ct.TEXT)
2804
2807
  return !1;
2805
- const { top: s, left: c, width: u, height: h } = r, { x: d, y: v } = e;
2806
- return d >= c && d <= c + u && v >= s && v <= s + h;
2808
+ const { top: l, left: c, width: u, height: h } = r, { x: d, y: v } = t;
2809
+ return d >= c && d <= c + u && v >= l && v <= l + h;
2807
2810
  }
2808
- onPointerDown(e, t) {
2809
- if (t.button === 2)
2811
+ onPointerDown(t, e) {
2812
+ if (e.button === 2)
2810
2813
  return;
2811
- const { unitId: o, subUnitId: n, row: a, col: i } = e, r = {
2814
+ const { unitId: o, subUnitId: n, row: a, col: i } = t, r = {
2812
2815
  unitId: o,
2813
2816
  subUnitId: n,
2814
2817
  row: a,
2815
2818
  column: i
2816
2819
  };
2817
- this._commandService.executeCommand(At.id, r);
2820
+ this._commandService.executeCommand(Ae.id, r);
2818
2821
  }
2819
- onPointerEnter(e, t) {
2822
+ onPointerEnter(t, e) {
2820
2823
  var o, n;
2821
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2824
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xt.POINTER);
2822
2825
  }
2823
- onPointerLeave(e, t) {
2826
+ onPointerLeave(t, e) {
2824
2827
  var o, n;
2825
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2828
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xt.DEFAULT);
2826
2829
  }
2827
2830
  };
2828
- hn = as([
2829
- ft(0, b(Q)),
2830
- ft(1, ee),
2831
- ft(2, b(Ve)),
2832
- ft(3, b(ae))
2831
+ hn = Yr([
2832
+ me(0, E(Q)),
2833
+ me(1, tt),
2834
+ me(2, E(Vt)),
2835
+ me(3, E(at))
2833
2836
  ], hn);
2834
- class ss extends ge {
2837
+ class Kr extends ft {
2835
2838
  constructor() {
2836
2839
  super(...arguments);
2837
- y(this, "id", K.LIST);
2838
- y(this, "canvasRender", this.injector.createInstance(hn));
2839
- y(this, "dropdown", Mn);
2840
- y(this, "optionsInput", bt.componentKey);
2841
- y(this, "formulaInput", yn);
2840
+ M(this, "id", K.LIST);
2841
+ M(this, "canvasRender", this.injector.createInstance(hn));
2842
+ M(this, "dropdown", yn);
2843
+ M(this, "optionsInput", Ee.componentKey);
2844
+ M(this, "formulaInput", Mn);
2842
2845
  }
2843
2846
  }
2844
- class ls extends ge {
2847
+ class Gr extends ft {
2845
2848
  constructor() {
2846
2849
  super(...arguments);
2847
- y(this, "id", K.TEXT_LENGTH);
2848
- y(this, "formulaInput", Nt);
2850
+ M(this, "id", K.TEXT_LENGTH);
2851
+ M(this, "formulaInput", Fe);
2849
2852
  }
2850
2853
  }
2851
- class ds extends ge {
2854
+ class Zr extends ft {
2852
2855
  constructor() {
2853
2856
  super(...arguments);
2854
- y(this, "id", K.WHOLE);
2855
- y(this, "formulaInput", Nt);
2857
+ M(this, "id", K.WHOLE);
2858
+ M(this, "formulaInput", Fe);
2856
2859
  }
2857
2860
  }
2858
- var cs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, hs = (e, t, o, n) => {
2859
- for (var a = n > 1 ? void 0 : n ? us(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2860
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2861
- return n && a && cs(t, o, a), a;
2862
- }, zt = (e, t) => (o, n) => t(o, n, e);
2863
- let Qe = class extends fn {
2864
- constructor(e, t, o) {
2865
- super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = o, this._initComponents(), this._registerValidatorViews();
2861
+ var qr = Object.getOwnPropertyDescriptor, Jr = (t, e, o, n) => {
2862
+ for (var a = n > 1 ? void 0 : n ? qr(e, o) : e, i = t.length - 1, r; i >= 0; i--)
2863
+ (r = t[i]) && (a = r(a) || a);
2864
+ return a;
2865
+ }, ze = (t, e) => (o, n) => e(o, n, t);
2866
+ let Qt = class extends mn {
2867
+ constructor(t, e, o) {
2868
+ super(), this._injector = t, this._componentManger = e, this._dataValidatorRegistryService = o, this._initComponents(), this._registerValidatorViews();
2866
2869
  }
2867
2870
  _initComponents() {
2868
2871
  [
2869
- [Eo, Co],
2870
- [Vt, Ki],
2871
- [Vo, pi],
2872
- [Mn, yi],
2873
- [bo, Ja],
2874
- [bt.componentKey, bt],
2875
- [Et.componentKey, Et],
2876
- ...Lr
2877
- ].forEach(([e, t]) => {
2872
+ [bo, Co],
2873
+ [Ve, Yi],
2874
+ [Vo, ui],
2875
+ [yn, Di],
2876
+ [Eo, qa],
2877
+ [Ee.componentKey, Ee],
2878
+ [be.componentKey, be],
2879
+ ...Rr
2880
+ ].forEach(([t, e]) => {
2878
2881
  this.disposeWithMe(this._componentManger.register(
2879
- e,
2880
- t
2882
+ t,
2883
+ e
2881
2884
  ));
2882
2885
  });
2883
2886
  }
2884
2887
  _registerValidatorViews() {
2885
2888
  [
2886
- Xr,
2887
- ds,
2888
- ls,
2889
- Yr,
2890
- Hr,
2891
- ss,
2892
- ts,
2893
- jr
2894
- ].forEach((e) => {
2895
- const t = this._injector.createInstance(e), o = this._dataValidatorRegistryService.getValidatorItem(t.id);
2896
- o && (o.formulaInput = t.formulaInput, o.canvasRender = t.canvasRender, o.dropdown = t.dropdown, o.optionsInput = t.optionsInput);
2889
+ kr,
2890
+ Zr,
2891
+ Gr,
2892
+ Ar,
2893
+ Lr,
2894
+ Kr,
2895
+ xr,
2896
+ Tr
2897
+ ].forEach((t) => {
2898
+ const e = this._injector.createInstance(t), o = this._dataValidatorRegistryService.getValidatorItem(e.id);
2899
+ o && (o.formulaInput = e.formulaInput, o.canvasRender = e.canvasRender, o.dropdown = e.dropdown, o.optionsInput = e.optionsInput);
2897
2900
  });
2898
2901
  }
2899
2902
  };
2900
- Qe = hs([
2901
- zt(0, b($e)),
2902
- zt(1, b(Lt)),
2903
- zt(2, b(be))
2904
- ], Qe);
2905
- var ps = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, ms = (e, t, o, n) => {
2906
- for (var a = n > 1 ? void 0 : n ? fs(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2907
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2908
- return n && a && ps(t, o, a), a;
2909
- }, Kt = (e, t) => (o, n) => t(o, n, e);
2910
- const gs = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2911
- var vt;
2912
- let Yn = (vt = class extends Gn {
2913
- constructor(e = Mt, t, o, n) {
2914
- super(), this._config = e, this._injector = t, this._commandService = o, this._configService = n;
2903
+ Qt = Jr([
2904
+ ze(0, E(Bt)),
2905
+ ze(1, E(Te)),
2906
+ ze(2, E(Et))
2907
+ ], Qt);
2908
+ var Qr = Object.getOwnPropertyDescriptor, ts = (t, e, o, n) => {
2909
+ for (var a = n > 1 ? void 0 : n ? Qr(e, o) : e, i = t.length - 1, r; i >= 0; i--)
2910
+ (r = t[i]) && (a = r(a) || a);
2911
+ return a;
2912
+ }, Ke = (t, e) => (o, n) => e(o, n, t);
2913
+ const es = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2914
+ var ve;
2915
+ let Yn = (ve = class extends Gn {
2916
+ constructor(t = ye, e, o, n) {
2917
+ super(), this._config = t, this._injector = e, this._commandService = o, this._configService = n;
2915
2918
  const { menu: a, ...i } = Zn(
2916
2919
  {},
2917
- Mt,
2920
+ ye,
2918
2921
  this._config
2919
2922
  );
2920
2923
  a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Vn, i);
2921
2924
  }
2922
2925
  onStarting() {
2923
2926
  [
2924
- [me],
2925
- [Re],
2926
- [dt],
2927
- [Ge],
2928
- [Je],
2929
- [qe],
2930
- [Ze],
2931
- [lt],
2932
- [Qe]
2933
- ].forEach((e) => {
2934
- this._injector.add(e);
2927
+ [gt],
2928
+ [Rt],
2929
+ [de],
2930
+ [Gt],
2931
+ [Jt],
2932
+ [qt],
2933
+ [Zt],
2934
+ [le],
2935
+ [Qt]
2936
+ ].forEach((t) => {
2937
+ this._injector.add(t);
2935
2938
  }), [
2936
- Ft,
2937
- At,
2938
- yo,
2939
+ ke,
2940
+ Ae,
2941
+ Mo,
2939
2942
  Dn,
2940
- We,
2941
- Mo
2942
- ].forEach((e) => {
2943
- this._commandService.registerCommand(e);
2943
+ Wt,
2944
+ yo
2945
+ ].forEach((t) => {
2946
+ this._commandService.registerCommand(t);
2944
2947
  });
2945
2948
  }
2946
2949
  onReady() {
2947
- this._injector.get(Ze), this._injector.get(qe), this._injector.get(lt), this._injector.get(dt), this._injector.get(Ve).registerRenderModule(
2950
+ this._injector.get(Zt), this._injector.get(qt), this._injector.get(le), this._injector.get(de), this._injector.get(Vt).registerRenderModule(
2948
2951
  X.UNIVER_SHEET,
2949
- [yt]
2952
+ [Me]
2950
2953
  );
2951
2954
  }
2952
2955
  onRendered() {
2953
- this._injector.get(Qe), this._injector.get(Je);
2956
+ this._injector.get(Qt), this._injector.get(Jt);
2954
2957
  }
2955
2958
  onSteady() {
2956
- this._injector.get(Ge);
2959
+ this._injector.get(Gt);
2957
2960
  }
2958
- }, y(vt, "pluginName", gs), y(vt, "type", X.UNIVER_SHEET), vt);
2959
- Yn = ms([
2960
- Kt(1, b($e)),
2961
- Kt(2, ee),
2962
- Kt(3, pn)
2961
+ }, M(ve, "pluginName", es), M(ve, "type", X.UNIVER_SHEET), ve);
2962
+ Yn = ts([
2963
+ Ke(1, E(Bt)),
2964
+ Ke(2, tt),
2965
+ Ke(3, pn)
2963
2966
  ], Yn);
2964
- var vs = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Ss = (e, t, o, n) => {
2965
- for (var a = n > 1 ? void 0 : n ? _s(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2966
- (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2967
- return n && a && vs(t, o, a), a;
2968
- }, Gt = (e, t) => (o, n) => t(o, n, e);
2969
- const Cs = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2970
- var _t;
2971
- let Xn = (_t = class extends Gn {
2972
- constructor(e = Mt, t, o, n) {
2973
- super(), this._config = e, this._injector = t, this._commandService = o, this._configService = n;
2967
+ var ns = Object.getOwnPropertyDescriptor, os = (t, e, o, n) => {
2968
+ for (var a = n > 1 ? void 0 : n ? ns(e, o) : e, i = t.length - 1, r; i >= 0; i--)
2969
+ (r = t[i]) && (a = r(a) || a);
2970
+ return a;
2971
+ }, Ge = (t, e) => (o, n) => e(o, n, t);
2972
+ const as = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2973
+ var _e;
2974
+ let Xn = (_e = class extends Gn {
2975
+ constructor(t = ye, e, o, n) {
2976
+ super(), this._config = t, this._injector = e, this._commandService = o, this._configService = n;
2974
2977
  const { menu: a, ...i } = Zn(
2975
2978
  {},
2976
- Mt,
2979
+ ye,
2977
2980
  this._config
2978
2981
  );
2979
2982
  a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Vn, i);
2980
2983
  }
2981
2984
  onStarting() {
2982
2985
  [
2983
- [me],
2984
- [Re],
2985
- [dt],
2986
- [Ge],
2987
- [Je],
2988
- [qe],
2989
- [Ze],
2990
- [Qe]
2991
- ].forEach((e) => {
2992
- this._injector.add(e);
2986
+ [gt],
2987
+ [Rt],
2988
+ [de],
2989
+ [Gt],
2990
+ [Jt],
2991
+ [qt],
2992
+ [Zt],
2993
+ [Qt]
2994
+ ].forEach((t) => {
2995
+ this._injector.add(t);
2993
2996
  }), [
2994
- Ft,
2995
- At,
2996
- yo,
2997
+ ke,
2998
+ Ae,
2999
+ Mo,
2997
3000
  Dn,
2998
- We,
2999
- Mo
3000
- ].forEach((e) => {
3001
- this._commandService.registerCommand(e);
3001
+ Wt,
3002
+ yo
3003
+ ].forEach((t) => {
3004
+ this._commandService.registerCommand(t);
3002
3005
  });
3003
3006
  }
3004
3007
  onReady() {
3005
- this._injector.get(Ze), this._injector.get(qe), this._injector.get(Ve).registerRenderModule(
3008
+ this._injector.get(Zt), this._injector.get(qt), this._injector.get(Vt).registerRenderModule(
3006
3009
  X.UNIVER_SHEET,
3007
- [yt]
3010
+ [Me]
3008
3011
  );
3009
3012
  }
3010
3013
  onRendered() {
3011
- this._injector.get(Qe), this._injector.get(Je);
3014
+ this._injector.get(Qt), this._injector.get(Jt);
3012
3015
  }
3013
3016
  onSteady() {
3014
- this._injector.get(Ge);
3017
+ this._injector.get(Gt);
3015
3018
  }
3016
- }, y(_t, "pluginName", Cs), y(_t, "type", X.UNIVER_SHEET), _t);
3017
- Xn = Ss([
3018
- Gt(1, b($e)),
3019
- Gt(2, ee),
3020
- Gt(3, pn)
3019
+ }, M(_e, "pluginName", as), M(_e, "type", X.UNIVER_SHEET), _e);
3020
+ Xn = os([
3021
+ Ge(1, E(Bt)),
3022
+ Ge(2, tt),
3023
+ Ge(3, pn)
3021
3024
  ], Xn);
3022
3025
  export {
3023
- bo as DATE_DROPDOWN_KEY,
3024
- Mn as LIST_DROPDOWN_KEY,
3026
+ Eo as DATE_DROPDOWN_KEY,
3027
+ yn as LIST_DROPDOWN_KEY,
3025
3028
  Xn as UniverSheetsDataValidationMobileUIPlugin,
3026
3029
  Yn as UniverSheetsDataValidationUIPlugin
3027
3030
  };