@univerjs/sheets-data-validation-ui 0.7.0-beta.0 → 0.7.0-beta.1

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