@univerjs/sheets-data-validation-ui 0.6.10-nightly.202504171607 → 0.6.10-nightly.202504181606

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