@univerjs/sheets-hyper-link-ui 0.10.12 → 0.10.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,34 +1,34 @@
1
- var Jn = Object.defineProperty;
2
- var Qn = (t, e, n) => e in t ? Jn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var $ = (t, e, n) => Qn(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { Tools as je, IUniverInstanceService as K, ICommandService as ne, Inject as y, LocaleService as ut, IConfigService as Sn, UniverInstanceType as k, isValidRange as yn, RANGE_TYPE as cn, Rectangle as Se, Disposable as Y, IContextService as er, ThemeService as tr, DataStreamTreeTokenType as un, CustomRangeType as Oe, BuildTextUtils as _e, ColorKit as nr, DOCS_ZEN_EDITOR_UNIT_ID_KEY as x, DisposableCollection as rr, FOCUSING_SHEET as Ct, generateRandomId as kt, Injector as lt, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ce, DataValidationType as St, CommandType as dt, Range as En, ObjectMatrix as ir, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as sr, IPermissionService as or, InterceptorEffectEnum as ar, DependentOn as cr, Plugin as ur, merge as lr } from "@univerjs/core";
5
- import { SetSelectionsOperation as Rn, SetWorksheetActiveOperation as Pn, SheetsSelectionsService as Tt, getSheetCommandTarget as Ot, rangeToDiscreteRange as dr, RangeProtectionPermissionEditPoint as xt, WorksheetEditPermission as Nt, WorksheetSetCellValuePermission as Ln, WorksheetInsertHyperlinkPermission as Mt, WorkbookEditablePermission as Ut, SheetPermissionCheckController as wn, RangeProtectionPermissionViewPoint as pr, WorksheetViewPermission as hr, WorkbookViewPermission as gr, WorkbookCopyPermission as vr, WorksheetCopyPermission as mr, ClearSelectionContentCommand as fr, ClearSelectionAllCommand as _r, ClearSelectionFormatCommand as Ir, SheetInterceptorService as Cr, INTERCEPTOR_POINT as Sr } from "@univerjs/sheets";
6
- import { ScrollToRangeOperation as bn, IEditorBridgeService as te, IMarkSelectionService as yr, SheetCanvasPopManagerService as Er, getEditingCustomRangePosition as Rr, getCustomRangePosition as Pr, ISheetClipboardService as Lr, virtualizeDiscreteRanges as Pt, COPY_TYPE as wr, PREDEFINED_HOOK_NAME as $e, getRepeatRange as br, whenSheetEditorFocused as kr, getCurrentRangeDisable$ as Tr, IAutoFillService as Or, APPLY_TYPE as we, getAutoFillRepeatRange as xr, HoverManagerService as Nr, HoverRenderController as Mr, SheetSkeletonManagerService as ln } from "@univerjs/sheets-ui";
7
- import { DocSelectionManagerService as Ue } from "@univerjs/docs";
8
- import { DocSelectionRenderService as kn, DocBackScrollRenderController as Ur, DocCanvasPopManagerService as Hr, calcDocRangePositions as Dr, DocEventManagerService as dn, UniverDocsUIPlugin as Ar } from "@univerjs/docs-ui";
9
- import { IRenderManagerService as He } from "@univerjs/engine-render";
10
- import { IMessageService as Tn, useDependency as S, useObservable as Vr, IZenZoneService as pt, useEvent as $r, KeyCode as Lt, MenuItemType as On, MetaKeys as Br, getMenuHiddenObservable as ht, ContextMenuPosition as Fr, ContextMenuGroup as jr, RibbonInsertGroup as Wr, ComponentManager as Zr, IMenuManagerService as Gr, IShortcutService as Kr } from "@univerjs/ui";
11
- import { Subject as Yr, BehaviorSubject as zr, of as ae, map as Ht, switchMap as xe, combineLatest as Xr, debounceTime as We, Observable as qr } from "rxjs";
12
- import { jsxs as Ie, jsx as m, Fragment as Jr } from "react/jsx-runtime";
13
- import { MessageType as ke, clsx as Ze, FormLayout as me, Input as pn, Select as yt, Button as hn, borderClassName as xn, Tooltip as Be } from "@univerjs/design";
14
- import { IDefinedNamesService as Nn, deserializeRangeWithSheet as Ge, serializeRangeWithSheet as Qr, serializeRangeToRefString as ei, serializeRange as ti } from "@univerjs/engine-formula";
15
- import { RangeSelector as ni } from "@univerjs/sheets-formula-ui";
16
- import { SheetHyperLinkType as C, ERROR_RANGE as ri, SheetsHyperLinkParserService as Dt, UpdateRichHyperLinkCommand as ii, UpdateHyperLinkCommand as si, AddRichHyperLinkCommand as oi, AddHyperLinkCommand as ai, CancelRichHyperLinkCommand as ci, CancelHyperLinkCommand as ui, HyperLinkModel as gt, RemoveHyperLinkMutation as Ne, AddHyperLinkMutation as Me, UniverSheetsHyperLinkPlugin as li } from "@univerjs/sheets-hyper-link";
17
- import { useState as Z, useMemo as Et, useRef as Mn, useCallback as di, useEffect as ee, forwardRef as le, createElement as de } from "react";
18
- import { SheetDataValidationModel as gn } from "@univerjs/sheets-data-validation";
19
- var v = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(v || {});
20
- function Ye(t) {
21
- return je.isLegalUrl(t);
1
+ var qn = Object.defineProperty;
2
+ var Jn = (t, e, n) => e in t ? qn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var A = (t, e, n) => Jn(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { Tools as Fe, IUniverInstanceService as G, ICommandService as te, Inject as y, LocaleService as ct, IConfigService as Cn, UniverInstanceType as k, isValidRange as Sn, RANGE_TYPE as an, Rectangle as Ie, Disposable as K, IContextService as Qn, ThemeService as er, DataStreamTreeTokenType as cn, CustomRangeType as Te, BuildTextUtils as ve, ColorKit as tr, DOCS_ZEN_EDITOR_UNIT_ID_KEY as x, DisposableCollection as nr, FOCUSING_SHEET as It, generateRandomId as bt, Injector as ut, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as _e, DataValidationType as Ct, CommandType as lt, Range as yn, ObjectMatrix as rr, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as ir, IPermissionService as sr, InterceptorEffectEnum as or, DependentOn as ar, Plugin as cr, merge as ur } from "@univerjs/core";
5
+ import { SetSelectionsOperation as En, SetWorksheetActiveOperation as Rn, SheetsSelectionsService as kt, getSheetCommandTarget as Tt, rangeToDiscreteRange as lr, RangeProtectionPermissionEditPoint as Nt, WorksheetEditPermission as xt, WorksheetSetCellValuePermission as Pn, WorksheetInsertHyperlinkPermission as Ot, WorkbookEditablePermission as Mt, SheetPermissionCheckController as Ln, RangeProtectionPermissionViewPoint as dr, WorksheetViewPermission as pr, WorkbookViewPermission as hr, WorkbookCopyPermission as gr, WorksheetCopyPermission as mr, ClearSelectionContentCommand as vr, ClearSelectionAllCommand as fr, ClearSelectionFormatCommand as _r, SheetInterceptorService as Ir, INTERCEPTOR_POINT as Cr } from "@univerjs/sheets";
6
+ import { ScrollToRangeOperation as wn, IEditorBridgeService as ee, IMarkSelectionService as Sr, SheetCanvasPopManagerService as yr, getEditingCustomRangePosition as Er, getCustomRangePosition as Rr, ISheetClipboardService as Pr, virtualizeDiscreteRanges as Rt, COPY_TYPE as Lr, PREDEFINED_HOOK_NAME as Ae, getRepeatRange as wr, whenSheetEditorFocused as br, getCurrentRangeDisable$ as kr, IAutoFillService as Tr, APPLY_TYPE as Le, getAutoFillRepeatRange as Nr, HoverManagerService as xr, HoverRenderController as Or, SheetSkeletonManagerService as un } from "@univerjs/sheets-ui";
7
+ import { DocSelectionManagerService as Me } from "@univerjs/docs";
8
+ import { DocSelectionRenderService as bn, DocBackScrollRenderController as Mr, DocCanvasPopManagerService as Ur, calcDocRangePositions as Hr, DocEventManagerService as ln, UniverDocsUIPlugin as Dr } from "@univerjs/docs-ui";
9
+ import { IRenderManagerService as Ue } from "@univerjs/engine-render";
10
+ import { IMessageService as kn, useDependency as S, useObservable as $r, IZenZoneService as dt, useEvent as Ar, KeyCode as Pt, MenuItemType as Tn, MetaKeys as Vr, getMenuHiddenObservable as pt, ContextMenuPosition as Br, ContextMenuGroup as Fr, RibbonInsertGroup as Wr, ComponentManager as jr, IMenuManagerService as Zr, IShortcutService as Gr } from "@univerjs/ui";
11
+ import { Subject as Kr, BehaviorSubject as Yr, of as oe, map as Ut, switchMap as Ne, combineLatest as zr, debounceTime as We, Observable as Xr } from "rxjs";
12
+ import { jsxs as fe, jsx as v, Fragment as qr } from "react/jsx-runtime";
13
+ import { MessageType as be, clsx as je, FormLayout as ge, Input as dn, Select as St, Button as pn, borderClassName as Nn, Tooltip as Ve } from "@univerjs/design";
14
+ import { IDefinedNamesService as xn, deserializeRangeWithSheet as Ze, serializeRangeWithSheet as Jr, serializeRangeToRefString as Qr, serializeRange as ei } from "@univerjs/engine-formula";
15
+ import { RangeSelector as ti } from "@univerjs/sheets-formula-ui";
16
+ import { SheetHyperLinkType as C, ERROR_RANGE as ni, SheetsHyperLinkParserService as Ht, UpdateRichHyperLinkCommand as ri, UpdateHyperLinkCommand as ii, AddRichHyperLinkCommand as si, AddHyperLinkCommand as oi, CancelRichHyperLinkCommand as ai, CancelHyperLinkCommand as ci, HyperLinkModel as ht, RemoveHyperLinkMutation as xe, AddHyperLinkMutation as Oe, UniverSheetsHyperLinkPlugin as ui } from "@univerjs/sheets-hyper-link";
17
+ import { useState as j, useMemo as yt, useRef as On, useCallback as li, useEffect as Q, createElement as ue, forwardRef as Ce } from "react";
18
+ import { SheetDataValidationModel as hn } from "@univerjs/sheets-data-validation";
19
+ var m = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(m || {});
20
+ function Ke(t) {
21
+ return Fe.isLegalUrl(t);
22
22
  }
23
- function pi(t) {
23
+ function di(t) {
24
24
  return /^[a-zA-Z]+:\/\//.test(t);
25
25
  }
26
- function hi(t) {
26
+ function pi(t) {
27
27
  return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
28
28
  }
29
- function gi(t) {
30
- if (Ye(t)) {
31
- const e = pi(t) ? t : hi(t) ? `mailto://${t}` : `http://${t}`;
29
+ function hi(t) {
30
+ if (Ke(t)) {
31
+ const e = di(t) ? t : pi(t) ? `mailto://${t}` : `http://${t}`;
32
32
  let n;
33
33
  try {
34
34
  n = new URL(e);
@@ -39,22 +39,22 @@ function gi(t) {
39
39
  }
40
40
  return t;
41
41
  }
42
- const Un = "sheets-hyper-link-ui.config", vn = {};
43
- var vi = Object.getOwnPropertyDescriptor, mi = (t, e, n, i) => {
44
- for (var r = i > 1 ? void 0 : i ? vi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
42
+ const Mn = "sheets-hyper-link-ui.config", gn = {};
43
+ var gi = Object.getOwnPropertyDescriptor, mi = (t, e, n, i) => {
44
+ for (var r = i > 1 ? void 0 : i ? gi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
45
45
  (o = t[s]) && (r = o(r) || r);
46
46
  return r;
47
- }, fe = (t, e) => (n, i) => e(n, i, t);
48
- function fi(t, e) {
47
+ }, me = (t, e) => (n, i) => e(n, i, t);
48
+ function vi(t, e) {
49
49
  const n = e.getMergeData(), i = e.getMaxColumns() - 1, r = e.getMaxRows() - 1;
50
- if (i < t.endColumn && (t.endColumn = i), r < t.endRow && (t.endRow = r), t.rangeType === cn.COLUMN || cn.ROW)
50
+ if (i < t.endColumn && (t.endColumn = i), r < t.endRow && (t.endRow = r), t.rangeType === an.COLUMN || an.ROW)
51
51
  return t;
52
52
  const s = [];
53
53
  return n.forEach((o) => {
54
- Se.intersects(t, o) && s.push(o);
55
- }), Se.realUnion(t, ...s);
54
+ Ie.intersects(t, o) && s.push(o);
55
+ }), Ie.realUnion(t, ...s);
56
56
  }
57
- let ue = class {
57
+ let ce = class {
58
58
  constructor(t, e, n, i, r, s) {
59
59
  this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = i, this._localeService = r, this._configService = s;
60
60
  }
@@ -80,14 +80,14 @@ let ue = class {
80
80
  if (!u) {
81
81
  this._messageService.show({
82
82
  content: this._localeService.t("hyperLink.message.refError"),
83
- type: ke.Error
83
+ type: be.Error
84
84
  });
85
85
  return;
86
86
  }
87
87
  if (u.isSheetHidden()) {
88
88
  this._messageService.show({
89
89
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
90
- type: ke.Error
90
+ type: be.Error
91
91
  });
92
92
  return;
93
93
  }
@@ -95,8 +95,8 @@ let ue = class {
95
95
  }
96
96
  if (e) {
97
97
  if (n) {
98
- const o = Ge(n);
99
- yn(o.range) && n !== ri && this.navigateToRange(s, e, o.range);
98
+ const o = Ze(n);
99
+ Sn(o.range) && n !== ni && this.navigateToRange(s, e, o.range);
100
100
  return;
101
101
  }
102
102
  this.navigateToSheetById(s, e);
@@ -105,9 +105,9 @@ let ue = class {
105
105
  async navigateToRange(t, e, n, i) {
106
106
  const r = await this.navigateToSheetById(t, e);
107
107
  if (r) {
108
- const s = fi(n, r);
108
+ const s = vi(n, r);
109
109
  await this._commandService.executeCommand(
110
- Rn.id,
110
+ En.id,
111
111
  {
112
112
  unitId: t,
113
113
  subUnitId: e,
@@ -116,7 +116,7 @@ let ue = class {
116
116
  primary: null
117
117
  }]
118
118
  }
119
- ), await this._commandService.executeCommand(bn.id, {
119
+ ), await this._commandService.executeCommand(wn.id, {
120
120
  range: s,
121
121
  forceTop: i
122
122
  });
@@ -134,10 +134,10 @@ let ue = class {
134
134
  const r = n.getSheetBySheetId(e);
135
135
  return r ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
136
136
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
137
- type: ke.Error
138
- }), !1) : await this._commandService.executeCommand(Pn.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
137
+ type: be.Error
138
+ }), !1) : await this._commandService.executeCommand(Rn.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
139
139
  content: this._localeService.t("hyperLink.message.noSheet"),
140
- type: ke.Error
140
+ type: be.Error
141
141
  }), !1);
142
142
  }
143
143
  async navigateToDefineName(t, e) {
@@ -145,24 +145,24 @@ let ue = class {
145
145
  }
146
146
  async navigateToOtherWebsite(t) {
147
147
  var n;
148
- const e = this._configService.getConfig(Un);
148
+ const e = this._configService.getConfig(Mn);
149
149
  if ((n = e == null ? void 0 : e.urlHandler) != null && n.navigateToOtherWebsite)
150
150
  return e.urlHandler.navigateToOtherWebsite(t);
151
151
  window.open(t, "_blank", "noopener noreferrer");
152
152
  }
153
153
  };
154
- ue = mi([
155
- fe(0, K),
156
- fe(1, ne),
157
- fe(2, Nn),
158
- fe(3, Tn),
159
- fe(4, y(ut)),
160
- fe(5, Sn)
161
- ], ue);
162
- class Hn extends Y {
154
+ ce = mi([
155
+ me(0, G),
156
+ me(1, te),
157
+ me(2, xn),
158
+ me(3, kn),
159
+ me(4, y(ct)),
160
+ me(5, Cn)
161
+ ], ce);
162
+ class Un extends K {
163
163
  constructor() {
164
164
  super(...arguments);
165
- $(this, "_customHyperLinks", /* @__PURE__ */ new Map());
165
+ A(this, "_customHyperLinks", /* @__PURE__ */ new Map());
166
166
  }
167
167
  isBuiltInLinkType(n) {
168
168
  return n !== C.URL;
@@ -187,78 +187,78 @@ class Hn extends Y {
187
187
  super.dispose(), this._customHyperLinks.clear();
188
188
  }
189
189
  }
190
- const ze = () => {
191
- var Gt;
192
- const [t, e] = Z(""), [n, i] = Z(!1), [r, s] = Z(""), [o, c] = Z(!0), [u, p] = Z(C.URL), [l, g] = Z(""), d = S(ut), _ = S(Nn), I = S(te), f = S(K), w = S(G), a = Vr(w.currentEditing$), b = S(Dt), M = S(ue), T = S(ne), P = S(Hn), D = Et(() => P.getOptions(), [P]), A = S(pt), z = S(He), re = S(yr), De = S(Ue), ie = S(er), ye = S(tr), Ee = S(Ue), [Re, Ae] = Z(!1), he = S(Tt), Gn = Et(() => he.getCurrentSelections(), []), Ve = Et(() => {
190
+ const Ye = () => {
191
+ var Zt;
192
+ const [t, e] = j(""), [n, i] = j(!1), [r, s] = j(""), [o, c] = j(!0), [u, p] = j(C.URL), [l, g] = j(""), d = S(ct), _ = S(xn), I = S(ee), f = S(G), w = S(Z), a = $r(w.currentEditing$), b = S(Ht), M = S(ce), T = S(te), P = S(Un), D = yt(() => P.getOptions(), [P]), $ = S(dt), Y = S(Ue), ne = S(Sr), He = S(Me), re = S(Qn), Se = S(er), ye = S(Me), [Ee, De] = j(!1), de = S(kt), Zn = yt(() => de.getCurrentSelections(), []), $e = yt(() => {
193
193
  if (!P.isBuiltInLinkType(u))
194
194
  return P.getCustomHyperLink(u);
195
- }, [P, u]), [ge, Kn] = Z(!1), [Pe, Wt] = Z(!1), H = Mn(!1), B = f.getCurrentUnitForType(k.UNIVER_SHEET), Yn = (B == null ? void 0 : B.getActiveSheet().getSheetId()) || "", q = di((h) => {
196
- s(h.replaceAll(un.CUSTOM_RANGE_START, "").replaceAll(un.CUSTOM_RANGE_END, ""));
195
+ }, [P, u]), [pe, Gn] = j(!1), [Re, Wt] = j(!1), H = On(!1), V = f.getCurrentUnitForType(k.UNIVER_SHEET), Kn = (V == null ? void 0 : V.getActiveSheet().getSheetId()) || "", X = li((h) => {
196
+ s(h.replaceAll(cn.CUSTOM_RANGE_START, "").replaceAll(cn.CUSTOM_RANGE_END, ""));
197
197
  }, [s]);
198
- ee(() => {
199
- var h, E, R, L, N, F, Kt, Yt, zt, Xt, qt, Jt, Qt, en, tn, nn, rn;
198
+ Q(() => {
199
+ var h, E, R, L, O, B, Gt, Kt, Yt, zt, Xt, qt, Jt, Qt, en, tn, nn;
200
200
  if ((a == null ? void 0 : a.row) !== void 0 && a.col !== void 0) {
201
- const { customRange: se, row: _t, col: It } = a;
202
- let { label: X } = a;
203
- typeof X == "number" && (X = `${X}`);
204
- let j;
205
- if (se)
206
- j = {
207
- id: (h = se == null ? void 0 : se.rangeId) != null ? h : "",
208
- display: X != null ? X : "",
209
- payload: (R = (E = se == null ? void 0 : se.properties) == null ? void 0 : E.url) != null ? R : "",
210
- row: _t,
211
- column: It
201
+ const { customRange: ie, row: ft, col: _t } = a;
202
+ let { label: z } = a;
203
+ typeof z == "number" && (z = `${z}`);
204
+ let F;
205
+ if (ie)
206
+ F = {
207
+ id: (h = ie == null ? void 0 : ie.rangeId) != null ? h : "",
208
+ display: z != null ? z : "",
209
+ payload: (R = (E = ie == null ? void 0 : ie.properties) == null ? void 0 : E.url) != null ? R : "",
210
+ row: ft,
211
+ column: _t
212
212
  };
213
- else if (a.type === v.VIEWING) {
214
- const O = f.getUnit(a.unitId), Q = O == null ? void 0 : O.getSheetBySheetId(a.subUnitId), U = Q == null ? void 0 : Q.getCellRaw(a.row, a.col), ve = (F = (N = (L = U == null ? void 0 : U.p) == null ? void 0 : L.body) == null ? void 0 : N.customRanges) == null ? void 0 : F.find((on) => {
215
- var an;
216
- return on.rangeType === Oe.HYPERLINK && ((an = on.properties) == null ? void 0 : an.url);
217
- }), Le = U == null ? void 0 : U.v;
218
- U && (!_e.transform.isEmptyDocument((Yt = (Kt = U.p) == null ? void 0 : Kt.body) == null ? void 0 : Yt.dataStream) || je.isDefine(Le)) && c(!1), j = {
213
+ else if (a.type === m.VIEWING) {
214
+ const N = f.getUnit(a.unitId), J = N == null ? void 0 : N.getSheetBySheetId(a.subUnitId), U = J == null ? void 0 : J.getCellRaw(a.row, a.col), he = (B = (O = (L = U == null ? void 0 : U.p) == null ? void 0 : L.body) == null ? void 0 : O.customRanges) == null ? void 0 : B.find((sn) => {
215
+ var on;
216
+ return sn.rangeType === Te.HYPERLINK && ((on = sn.properties) == null ? void 0 : on.url);
217
+ }), Pe = U == null ? void 0 : U.v;
218
+ U && (!ve.transform.isEmptyDocument((Kt = (Gt = U.p) == null ? void 0 : Gt.body) == null ? void 0 : Kt.dataStream) || Fe.isDefine(Pe)) && c(!1), F = {
219
219
  id: "",
220
220
  display: "",
221
- payload: (Xt = (zt = ve == null ? void 0 : ve.properties) == null ? void 0 : zt.url) != null ? Xt : "",
222
- row: _t,
223
- column: It
221
+ payload: (zt = (Yt = he == null ? void 0 : he.properties) == null ? void 0 : Yt.url) != null ? zt : "",
222
+ row: ft,
223
+ column: _t
224
224
  };
225
225
  } else {
226
- const O = f.getCurrentUnitForType(k.UNIVER_DOC), Q = De.getActiveTextRange(), U = O == null ? void 0 : O.getBody(), ve = Q && U ? Q : null, Le = ve && ((Jt = _e.customRange.getCustomRangesInterestsWithSelection(ve, (qt = U == null ? void 0 : U.customRanges) != null ? qt : [])) == null ? void 0 : Jt[0]);
227
- c(!1), j = {
226
+ const N = f.getCurrentUnitForType(k.UNIVER_DOC), J = He.getActiveTextRange(), U = N == null ? void 0 : N.getBody(), he = J && U ? J : null, Pe = he && ((qt = ve.customRange.getCustomRangesInterestsWithSelection(he, (Xt = U == null ? void 0 : U.customRanges) != null ? Xt : [])) == null ? void 0 : qt[0]);
227
+ c(!1), F = {
228
228
  id: "",
229
- display: X != null ? X : "",
230
- payload: (en = (Qt = Le == null ? void 0 : Le.properties) == null ? void 0 : Qt.url) != null ? en : "",
231
- row: _t,
232
- column: It
229
+ display: z != null ? z : "",
230
+ payload: (Qt = (Jt = Pe == null ? void 0 : Pe.properties) == null ? void 0 : Jt.url) != null ? Qt : "",
231
+ row: ft,
232
+ column: _t
233
233
  };
234
234
  }
235
- e(j.id);
236
- const sn = P.findCustomHyperLink(j);
237
- if (sn) {
238
- const O = sn.convert(j);
239
- p(O.type), g(O.payload), q(O.display);
235
+ e(F.id);
236
+ const rn = P.findCustomHyperLink(F);
237
+ if (rn) {
238
+ const N = rn.convert(F);
239
+ p(N.type), g(N.payload), X(N.display);
240
240
  return;
241
241
  }
242
- q(j.display);
243
- const J = b.parseHyperLink(j.payload);
244
- switch (p(J.type === C.INVALID ? C.RANGE : J.type), J.type) {
242
+ X(F.display);
243
+ const q = b.parseHyperLink(F.payload);
244
+ switch (p(q.type === C.INVALID ? C.RANGE : q.type), q.type) {
245
245
  case C.URL: {
246
- g(J.url), J.url === j.display && (H.current = !0);
246
+ g(q.url), q.url === F.display && (H.current = !0);
247
247
  break;
248
248
  }
249
249
  case C.RANGE: {
250
- const O = J.searchObj, Q = O.gid && (rn = (nn = (tn = f.getUnit(a.unitId)) == null ? void 0 : tn.getSheetBySheetId(O.gid)) == null ? void 0 : nn.getName()) != null ? rn : "", U = Qr(Q, Ge(O.range).range);
251
- g(U), U === j.display && (H.current = !0);
250
+ const N = q.searchObj, J = N.gid && (nn = (tn = (en = f.getUnit(a.unitId)) == null ? void 0 : en.getSheetBySheetId(N.gid)) == null ? void 0 : tn.getName()) != null ? nn : "", U = Jr(J, Ze(N.range).range);
251
+ g(U), U === F.display && (H.current = !0);
252
252
  break;
253
253
  }
254
254
  case C.SHEET: {
255
- const O = J.searchObj;
256
- g(O.gid);
255
+ const N = q.searchObj;
256
+ g(N.gid);
257
257
  break;
258
258
  }
259
259
  case C.DEFINE_NAME: {
260
- const O = J.searchObj;
261
- g(O.rangeid);
260
+ const N = q.searchObj;
261
+ g(N.rangeid);
262
262
  break;
263
263
  }
264
264
  default:
@@ -266,11 +266,11 @@ const ze = () => {
266
266
  break;
267
267
  }
268
268
  }
269
- }, [a, M, P, De, f]), ee(() => {
269
+ }, [a, M, P, He, f]), Q(() => {
270
270
  let h = null;
271
- if (a && !a.customRangeId && a.type === v.VIEWING && je.isDefine(a.row) && je.isDefine(a.col)) {
272
- const E = f.getUnit(a.unitId, k.UNIVER_SHEET), R = E == null ? void 0 : E.getSheetBySheetId(a.subUnitId), L = R == null ? void 0 : R.getMergedCell(a.row, a.col), N = new nr(ye.getColorFromTheme("primary.600")).toRgb();
273
- h = re.addShape(
271
+ if (a && !a.customRangeId && a.type === m.VIEWING && Fe.isDefine(a.row) && Fe.isDefine(a.col)) {
272
+ const E = f.getUnit(a.unitId, k.UNIVER_SHEET), R = E == null ? void 0 : E.getSheetBySheetId(a.subUnitId), L = R == null ? void 0 : R.getMergedCell(a.row, a.col), O = new tr(Se.getColorFromTheme("primary.600")).toRgb();
273
+ h = ne.addShape(
274
274
  {
275
275
  range: L != null ? L : {
276
276
  startColumn: a.col,
@@ -280,7 +280,7 @@ const ze = () => {
280
280
  },
281
281
  style: {
282
282
  // hasAutoFill: false,
283
- fill: `rgb(${N.r}, ${N.g}, ${N.b}, 0.12)`,
283
+ fill: `rgb(${O.r}, ${O.g}, ${O.b}, 0.12)`,
284
284
  strokeWidth: 1,
285
285
  stroke: "#FFBD37",
286
286
  widgets: {}
@@ -292,14 +292,14 @@ const ze = () => {
292
292
  );
293
293
  }
294
294
  return () => {
295
- h && re.removeShape(h);
295
+ h && ne.removeShape(h);
296
296
  };
297
- }, [a, re, ye, f]), ee(() => {
297
+ }, [a, ne, Se, f]), Q(() => {
298
298
  Wt(u === C.RANGE);
299
- }, [u]), ee(() => {
300
- const h = (a == null ? void 0 : a.type) === v.ZEN_EDITOR ? z.getRenderById(x) : z.getRenderById(I.getCurrentEditorId()), E = new rr();
299
+ }, [u]), Q(() => {
300
+ const h = (a == null ? void 0 : a.type) === m.ZEN_EDITOR ? Y.getRenderById(x) : Y.getRenderById(I.getCurrentEditorId()), E = new nr();
301
301
  if (h) {
302
- const R = h.with(kn);
302
+ const R = h.with(bn);
303
303
  R.setReserveRangesStatus(!0), E.add(() => {
304
304
  R.setReserveRangesStatus(!1);
305
305
  });
@@ -307,17 +307,17 @@ const ze = () => {
307
307
  return () => {
308
308
  I.disableForceKeepVisible(), E.dispose();
309
309
  };
310
- }, [a == null ? void 0 : a.type, I, z]), ee(() => (Pe && w.setIsKeepVisible(Pe), w.setIsKeepVisible(Re), () => {
310
+ }, [a == null ? void 0 : a.type, I, Y]), Q(() => (Re && w.setIsKeepVisible(Re), w.setIsKeepVisible(Ee), () => {
311
311
  w.setIsKeepVisible(!1);
312
- }), [Pe, Re, w]), ee(() => () => {
313
- A.temporaryHidden && (A.show(), ie.setContextValue(Ct, !1));
314
- }, [ie, A]), ee(() => {
315
- if (Pe)
312
+ }), [Re, Ee, w]), Q(() => () => {
313
+ $.temporaryHidden && ($.show(), re.setContextValue(It, !1));
314
+ }, [re, $]), Q(() => {
315
+ if (Re)
316
316
  return I.enableForceKeepVisible(), () => {
317
317
  I.disableForceKeepVisible();
318
318
  };
319
- }, [Pe, I]);
320
- const zn = [
319
+ }, [Re, I]);
320
+ const Yn = [
321
321
  {
322
322
  label: d.t("hyperLink.form.link"),
323
323
  value: C.URL
@@ -336,70 +336,70 @@ const ze = () => {
336
336
  },
337
337
  ...D
338
338
  ];
339
- if (!B)
339
+ if (!V)
340
340
  return;
341
- const Xn = B.getHiddenWorksheets(), vt = B.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => Xn.indexOf(h.value) === -1), mt = Object.values((Gt = _.getDefinedNameMap(B.getUnitId())) != null ? Gt : {}).map((h) => ({
341
+ const zn = V.getHiddenWorksheets(), gt = V.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => zn.indexOf(h.value) === -1), mt = Object.values((Zt = _.getDefinedNameMap(V.getUnitId())) != null ? Zt : {}).map((h) => ({
342
342
  label: h.name,
343
343
  value: h.id
344
- })), Zt = (h, E) => {
344
+ })), jt = (h, E) => {
345
345
  if (h === C.URL)
346
- return gi(E);
346
+ return hi(E);
347
347
  if (h === C.RANGE) {
348
- const R = Ge(E), L = B.getSheetBySheetName(R.sheetName);
348
+ const R = Ze(E), L = V.getSheetBySheetName(R.sheetName);
349
349
  if (L)
350
- return `#gid=${L.getSheetId()}&range=${ti(R.range)}`;
350
+ return `#gid=${L.getSheetId()}&range=${ei(R.range)}`;
351
351
  }
352
352
  return `#${h}=${E}`;
353
- }, qn = $r((h) => {
354
- var N;
355
- const R = h.split(",").map(Ge)[0];
356
- if (!R || !yn(R.range))
353
+ }, Xn = Ar((h) => {
354
+ var O;
355
+ const R = h.split(",").map(Ze)[0];
356
+ if (!R || !Sn(R.range))
357
357
  return;
358
- R.sheetName || (R.sheetName = ((N = B.getActiveSheet()) == null ? void 0 : N.getName()) || "");
359
- const L = ei(R);
360
- g(L), L && (H.current || !r) && (q(L), H.current = !0);
361
- }), ft = async () => {
362
- if (o && !r || !l || u === C.URL && !Ye(l)) {
363
- Kn(!0);
358
+ R.sheetName || (R.sheetName = ((O = V.getActiveSheet()) == null ? void 0 : O.getName()) || "");
359
+ const L = Qr(R);
360
+ g(L), L && (H.current || !r) && (X(L), H.current = !0);
361
+ }), vt = async () => {
362
+ if (o && !r || !l || u === C.URL && !Ke(l)) {
363
+ Gn(!0);
364
364
  return;
365
365
  }
366
366
  if (a)
367
367
  if (t) {
368
- const h = a.type === v.ZEN_EDITOR || a.type === v.EDITING ? ii.id : si.id;
368
+ const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? ri.id : ii.id;
369
369
  await T.executeCommand(h, {
370
370
  id: t,
371
371
  unitId: a.unitId,
372
372
  subUnitId: a.subUnitId,
373
373
  payload: {
374
374
  display: o ? r : "",
375
- payload: Zt(u, l)
375
+ payload: jt(u, l)
376
376
  },
377
377
  row: a.row,
378
378
  column: a.col,
379
- documentId: a.type === v.ZEN_EDITOR ? x : I.getCurrentEditorId()
379
+ documentId: a.type === m.ZEN_EDITOR ? x : I.getCurrentEditorId()
380
380
  });
381
381
  } else {
382
- const h = a.type === v.ZEN_EDITOR || a.type === v.EDITING ? oi.id : ai.id;
382
+ const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? si.id : oi.id;
383
383
  await T.executeCommand(h, {
384
384
  unitId: a.unitId,
385
385
  subUnitId: a.subUnitId,
386
386
  link: {
387
- id: kt(),
387
+ id: bt(),
388
388
  row: a.row,
389
389
  column: a.col,
390
- payload: Zt(u, l),
390
+ payload: jt(u, l),
391
391
  display: o ? r : ""
392
392
  },
393
- documentId: a.type === v.ZEN_EDITOR ? x : I.getCurrentEditorId()
393
+ documentId: a.type === m.ZEN_EDITOR ? x : I.getCurrentEditorId()
394
394
  });
395
395
  }
396
- if ((a == null ? void 0 : a.type) === v.VIEWING) {
397
- await T.executeCommand(Pn.id, {
396
+ if ((a == null ? void 0 : a.type) === m.VIEWING) {
397
+ await T.executeCommand(Rn.id, {
398
398
  unitId: a.unitId,
399
399
  subUnitId: a.subUnitId
400
400
  });
401
401
  const h = 1;
402
- await T.executeCommand(bn.id, {
402
+ await T.executeCommand(wn.id, {
403
403
  range: {
404
404
  startRow: Math.max(a.row - h, 0),
405
405
  endRow: a.row + h,
@@ -408,88 +408,88 @@ const ze = () => {
408
408
  }
409
409
  });
410
410
  }
411
- T.executeCommand(qe.id);
411
+ T.executeCommand(Xe.id);
412
412
  };
413
- return a ? /* @__PURE__ */ Ie(
413
+ return a ? /* @__PURE__ */ fe(
414
414
  "div",
415
415
  {
416
- className: Ze("univer-box-border univer-w-[296px] univer-rounded-xl univer-bg-white univer-p-4 univer-shadow-md dark:!univer-bg-gray-900", xn),
416
+ className: je("univer-box-border univer-w-[296px] univer-rounded-xl univer-bg-white univer-p-4 univer-shadow-md dark:!univer-bg-gray-900", Nn),
417
417
  children: [
418
- o ? /* @__PURE__ */ m(
419
- me,
418
+ o ? /* @__PURE__ */ v(
419
+ ge,
420
420
  {
421
421
  label: d.t("hyperLink.form.label"),
422
- error: ge && !r ? d.t("hyperLink.form.inputError") : "",
423
- children: /* @__PURE__ */ m(
424
- pn,
422
+ error: pe && !r ? d.t("hyperLink.form.inputError") : "",
423
+ children: /* @__PURE__ */ v(
424
+ dn,
425
425
  {
426
426
  value: r,
427
427
  onChange: (h) => {
428
- q(h), H.current = !1;
428
+ X(h), H.current = !1;
429
429
  },
430
430
  placeholder: d.t("hyperLink.form.labelPlaceholder"),
431
431
  autoFocus: !0,
432
432
  onKeyDown: (h) => {
433
- h.keyCode === Lt.ENTER && ft();
433
+ h.keyCode === Pt.ENTER && vt();
434
434
  }
435
435
  }
436
436
  )
437
437
  }
438
438
  ) : null,
439
- /* @__PURE__ */ m(me, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ m(
440
- yt,
439
+ /* @__PURE__ */ v(ge, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ v(
440
+ St,
441
441
  {
442
442
  className: "univer-w-full",
443
- options: zn,
443
+ options: Yn,
444
444
  value: u,
445
445
  onChange: (h) => {
446
446
  p(h), g("");
447
447
  }
448
448
  }
449
449
  ) }),
450
- u === C.URL && /* @__PURE__ */ m(
451
- me,
450
+ u === C.URL && /* @__PURE__ */ v(
451
+ ge,
452
452
  {
453
- error: ge ? l ? Ye(l) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
454
- children: /* @__PURE__ */ m(
455
- pn,
453
+ error: pe ? l ? Ke(l) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
454
+ children: /* @__PURE__ */ v(
455
+ dn,
456
456
  {
457
457
  value: l,
458
458
  onChange: (h) => {
459
- g(h), h && (H.current || !r || r === h) && (q(h), H.current = !0);
459
+ g(h), h && (H.current || !r || r === h) && (X(h), H.current = !0);
460
460
  },
461
461
  placeholder: d.t("hyperLink.form.linkPlaceholder"),
462
462
  autoFocus: !0,
463
463
  onKeyDown: (h) => {
464
- h.keyCode === Lt.ENTER && ft();
464
+ h.keyCode === Pt.ENTER && vt();
465
465
  }
466
466
  }
467
467
  )
468
468
  }
469
469
  ),
470
- u === C.RANGE && /* @__PURE__ */ m(me, { error: ge && !l ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ m(
471
- ni,
470
+ u === C.RANGE && /* @__PURE__ */ v(ge, { error: pe && !l ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ v(
471
+ ti,
472
472
  {
473
- unitId: B.getUnitId(),
474
- subUnitId: Yn,
473
+ unitId: V.getUnitId(),
474
+ subUnitId: Kn,
475
475
  maxRangeCount: 1,
476
476
  supportAcrossSheet: !0,
477
477
  initialValue: l,
478
- resetRange: Gn,
479
- onChange: (h, E) => qn(E),
478
+ resetRange: Zn,
479
+ onChange: (h, E) => Xn(E),
480
480
  onRangeSelectorDialogVisibleChange: async (h) => {
481
481
  var E, R;
482
- if (Ae(h), h)
483
- a.type === v.ZEN_EDITOR && (A.hide(), ie.setContextValue(Ct, !0)), a.type !== v.VIEWING && I.enableForceKeepVisible(), i(!0);
482
+ if (De(h), h)
483
+ a.type === m.ZEN_EDITOR && ($.hide(), re.setContextValue(It, !0)), a.type !== m.VIEWING && I.enableForceKeepVisible(), i(!0);
484
484
  else {
485
- if (await M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === v.ZEN_EDITOR) {
486
- await T.executeCommand(Rn.id, {
485
+ if (await M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === m.ZEN_EDITOR) {
486
+ await T.executeCommand(En.id, {
487
487
  unitId: a.unitId,
488
488
  subUnitId: a.subUnitId,
489
489
  selections: [{ range: { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col } }]
490
- }), A.show(), ie.setContextValue(Ct, !1);
491
- const L = (E = z.getRenderById(x)) == null ? void 0 : E.with(Ur), N = (R = Ee.getTextRanges({ unitId: x, subUnitId: x })) == null ? void 0 : R[0];
492
- L && N && (L.scrollToRange(N), Ee.refreshSelection({ unitId: x, subUnitId: x }));
490
+ }), $.show(), re.setContextValue(It, !1);
491
+ const L = (E = Y.getRenderById(x)) == null ? void 0 : E.with(Mr), O = (R = ye.getTextRanges({ unitId: x, subUnitId: x })) == null ? void 0 : R[0];
492
+ L && O && (L.scrollToRange(O), ye.refreshSelection({ unitId: x, subUnitId: x }));
493
493
  }
494
494
  I.disableForceKeepVisible(), i(!1);
495
495
  }
@@ -497,64 +497,64 @@ const ze = () => {
497
497
  onFocusChange: (h) => Wt(h)
498
498
  }
499
499
  ) }),
500
- u === C.SHEET && /* @__PURE__ */ m(me, { error: ge && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m(
501
- yt,
500
+ u === C.SHEET && /* @__PURE__ */ v(ge, { error: pe && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ v(
501
+ St,
502
502
  {
503
503
  className: "univer-w-full",
504
- options: vt,
504
+ options: gt,
505
505
  value: l,
506
506
  onChange: (h) => {
507
- var L, N;
507
+ var L, O;
508
508
  g(h);
509
- const E = (L = vt.find((F) => F.value === h)) == null ? void 0 : L.label, R = (N = vt.find((F) => F.value === l)) == null ? void 0 : N.label;
510
- E && (H.current || !r || r === R) && (q(E), H.current = !0);
509
+ const E = (L = gt.find((B) => B.value === h)) == null ? void 0 : L.label, R = (O = gt.find((B) => B.value === l)) == null ? void 0 : O.label;
510
+ E && (H.current || !r || r === R) && (X(E), H.current = !0);
511
511
  }
512
512
  }
513
513
  ) }),
514
- u === C.DEFINE_NAME && /* @__PURE__ */ m(me, { error: ge && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m(
515
- yt,
514
+ u === C.DEFINE_NAME && /* @__PURE__ */ v(ge, { error: pe && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ v(
515
+ St,
516
516
  {
517
517
  className: "univer-w-full",
518
518
  options: mt,
519
519
  value: l,
520
520
  onChange: (h) => {
521
- var L, N;
521
+ var L, O;
522
522
  g(h);
523
- const E = (L = mt.find((F) => F.value === h)) == null ? void 0 : L.label, R = (N = mt.find((F) => F.value === l)) == null ? void 0 : N.label;
524
- E && (H.current || !r || r === R) && (q(E), H.current = !0);
523
+ const E = (L = mt.find((B) => B.value === h)) == null ? void 0 : L.label, R = (O = mt.find((B) => B.value === l)) == null ? void 0 : O.label;
524
+ E && (H.current || !r || r === R) && (X(E), H.current = !0);
525
525
  }
526
526
  }
527
527
  ) }),
528
- (Ve == null ? void 0 : Ve.Form) && /* @__PURE__ */ m(
529
- Ve.Form,
528
+ ($e == null ? void 0 : $e.Form) && /* @__PURE__ */ v(
529
+ $e.Form,
530
530
  {
531
531
  linkId: t,
532
532
  payload: l,
533
533
  display: r,
534
- showError: ge,
534
+ showError: pe,
535
535
  setByPayload: H,
536
536
  setDisplay: (h) => {
537
- q(h), H.current = !0;
537
+ X(h), H.current = !0;
538
538
  },
539
539
  setPayload: g
540
540
  }
541
541
  ),
542
- /* @__PURE__ */ Ie("div", { className: "univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
543
- /* @__PURE__ */ m(
544
- hn,
542
+ /* @__PURE__ */ fe("div", { className: "univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
543
+ /* @__PURE__ */ v(
544
+ pn,
545
545
  {
546
546
  onClick: () => {
547
- a && M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), T.executeCommand(qe.id);
547
+ a && M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), T.executeCommand(Xe.id);
548
548
  },
549
549
  children: d.t("hyperLink.form.cancel")
550
550
  }
551
551
  ),
552
- /* @__PURE__ */ m(
553
- hn,
552
+ /* @__PURE__ */ v(
553
+ pn,
554
554
  {
555
555
  variant: "primary",
556
556
  onClick: async () => {
557
- ft();
557
+ vt();
558
558
  },
559
559
  children: d.t("hyperLink.form.ok")
560
560
  }
@@ -564,147 +564,295 @@ const ze = () => {
564
564
  }
565
565
  ) : null;
566
566
  };
567
- ze.componentKey = "univer.sheet.cell-link-edit";
568
- var V = function() {
569
- return V = Object.assign || function(t) {
570
- for (var e, n = 1, i = arguments.length; n < i; n++) {
571
- e = arguments[n];
572
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
573
- }
574
- return t;
575
- }, V.apply(this, arguments);
576
- }, _i = function(t, e) {
577
- var n = {};
578
- for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
579
- if (t != null && typeof Object.getOwnPropertySymbols == "function")
580
- for (var r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
581
- e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
582
- return n;
583
- }, pe = le(function(t, e) {
584
- var n = t.icon, i = t.id, r = t.className, s = t.extend, o = _i(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), u = Mn("_".concat(Si()));
585
- return Dn(n, "".concat(i), { defIds: n.defIds, idSuffix: u.current }, V({ ref: e, className: c }, o), s);
586
- });
587
- function Dn(t, e, n, i, r) {
588
- return de(t.tag, V(V({ key: e }, Ii(t, n, r)), i), (Ci(t, n).children || []).map(function(s, o) {
589
- return Dn(s, "".concat(e, "-").concat(t.tag, "-").concat(o), n, void 0, r);
590
- }));
567
+ Ye.componentKey = "univer.sheet.cell-link-edit";
568
+ function le({ ref: t, ...e }) {
569
+ const { icon: n, id: i, className: r, extend: s, ...o } = e, c = `univerjs-icon univerjs-icon-${i} ${r || ""}`.trim(), u = On(`_${Ii()}`);
570
+ return Hn(n, `${i}`, {
571
+ defIds: n.defIds,
572
+ idSuffix: u.current
573
+ }, {
574
+ ref: t,
575
+ className: c,
576
+ ...o
577
+ }, s);
578
+ }
579
+ function Hn(t, e, n, i, r) {
580
+ return ue(t.tag, {
581
+ key: e,
582
+ ...fi(t, n, r),
583
+ ...i
584
+ }, (_i(t, n).children || []).map((s, o) => Hn(s, `${e}-${t.tag}-${o}`, n, void 0, r)));
591
585
  }
592
- function Ii(t, e, n) {
593
- var i = V({}, t.attrs);
594
- n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1), t.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(function(s) {
595
- var o = s[0], c = s[1];
596
- o === "mask" && typeof c == "string" && (i[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
586
+ function fi(t, e, n) {
587
+ const i = { ...t.attrs };
588
+ n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1), t.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(([s, o]) => {
589
+ s === "mask" && typeof o == "string" && (i[s] = o.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
597
590
  });
598
- var r = e.defIds;
599
- return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(function(s) {
600
- var o = s[0], c = s[1];
601
- typeof c == "string" && (i[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
591
+ const { defIds: r } = e;
592
+ return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(([s, o]) => {
593
+ typeof o == "string" && (i[s] = o.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
602
594
  })), i;
603
595
  }
604
- function Ci(t, e) {
605
- var n, i = e.defIds;
606
- return !i || i.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? V(V({}, t), { children: t.children.map(function(r) {
607
- return typeof r.attrs.id == "string" && i && i.includes(r.attrs.id) ? V(V({}, r), { attrs: V(V({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
608
- }) }) : t;
596
+ function _i(t, e) {
597
+ var i;
598
+ const { defIds: n } = e;
599
+ return !n || n.length === 0 ? t : t.tag === "defs" && ((i = t.children) != null && i.length) ? {
600
+ ...t,
601
+ children: t.children.map((r) => typeof r.attrs.id == "string" && n && n.includes(r.attrs.id) ? {
602
+ ...r,
603
+ attrs: {
604
+ ...r.attrs,
605
+ id: r.attrs.id + e.idSuffix
606
+ }
607
+ } : r)
608
+ } : t;
609
609
  }
610
- function Si() {
610
+ function Ii() {
611
611
  return Math.random().toString(36).substring(2, 8);
612
612
  }
613
- pe.displayName = "UniverIcon";
614
- var yi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.9999 1.12915C8.03875 1.12915 8.07673 1.13284 8.11352 1.13989H12.2599C13.6958 1.13989 14.8599 2.30395 14.8599 3.73989V7.88619C14.867 7.92301 14.8707 7.96102 14.8707 7.9999C14.8707 8.03878 14.867 8.0768 14.8599 8.11362V12.2599C14.8599 13.6958 13.6958 14.8599 12.2599 14.8599H8.11362C8.0768 14.867 8.03878 14.8707 7.9999 14.8707C7.96102 14.8707 7.92301 14.867 7.88619 14.8599H3.73989C2.30396 14.8599 1.13989 13.6958 1.13989 12.2599V8.11352C1.13284 8.07673 1.12915 8.03875 1.12915 7.9999C1.12915 7.96106 1.13284 7.92308 1.13989 7.88629V3.73989C1.13989 2.30396 2.30395 1.13989 3.73989 1.13989H7.88629C7.92308 1.13284 7.96106 1.12915 7.9999 1.12915ZM2.33989 8.5999V12.2599C2.33989 13.0331 2.9667 13.6599 3.73989 13.6599H7.3999V8.5999H2.33989ZM7.3999 7.3999H2.33989V3.73989C2.33989 2.9667 2.96669 2.33989 3.73989 2.33989H7.3999V7.3999ZM8.5999 8.5999V13.6599H12.2599C13.0331 13.6599 13.6599 13.0331 13.6599 12.2599V8.5999H8.5999ZM13.6599 7.3999H8.5999V2.33989H12.2599C13.0331 2.33989 13.6599 2.96669 13.6599 3.73989V7.3999Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ke = le(function(t, e) {
615
- return de(pe, Object.assign({}, t, {
613
+ le.displayName = "UniverIcon";
614
+ const Ci = {
615
+ tag: "svg",
616
+ attrs: {
617
+ xmlns: "http://www.w3.org/2000/svg",
618
+ fill: "none",
619
+ viewBox: "0 0 16 16",
620
+ width: "1em",
621
+ height: "1em"
622
+ },
623
+ children: [{
624
+ tag: "path",
625
+ attrs: {
626
+ fill: "currentColor",
627
+ d: "M7.9999 1.12915C8.03875 1.12915 8.07673 1.13284 8.11352 1.13989H12.2599C13.6958 1.13989 14.8599 2.30395 14.8599 3.73989V7.88619C14.867 7.92301 14.8707 7.96102 14.8707 7.9999C14.8707 8.03878 14.867 8.0768 14.8599 8.11362V12.2599C14.8599 13.6958 13.6958 14.8599 12.2599 14.8599H8.11362C8.0768 14.867 8.03878 14.8707 7.9999 14.8707C7.96102 14.8707 7.92301 14.867 7.88619 14.8599H3.73989C2.30396 14.8599 1.13989 13.6958 1.13989 12.2599V8.11352C1.13284 8.07673 1.12915 8.03875 1.12915 7.9999C1.12915 7.96106 1.13284 7.92308 1.13989 7.88629V3.73989C1.13989 2.30396 2.30395 1.13989 3.73989 1.13989H7.88629C7.92308 1.13284 7.96106 1.12915 7.9999 1.12915ZM2.33989 8.5999V12.2599C2.33989 13.0331 2.9667 13.6599 3.73989 13.6599H7.3999V8.5999H2.33989ZM7.3999 7.3999H2.33989V3.73989C2.33989 2.9667 2.96669 2.33989 3.73989 2.33989H7.3999V7.3999ZM8.5999 8.5999V13.6599H12.2599C13.0331 13.6599 13.6599 13.0331 13.6599 12.2599V8.5999H8.5999ZM13.6599 7.3999H8.5999V2.33989H12.2599C13.0331 2.33989 13.6599 2.96669 13.6599 3.73989V7.3999Z",
628
+ fillRule: "evenodd",
629
+ clipRule: "evenodd"
630
+ }
631
+ }]
632
+ }, Ge = Ce(function(e, n) {
633
+ return ue(le, Object.assign({}, e, {
616
634
  id: "all-border-icon",
617
- ref: e,
618
- icon: yi
635
+ ref: n,
636
+ icon: Ci
619
637
  }));
620
638
  });
621
- Ke.displayName = "AllBorderIcon";
622
- var Ei = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.1302 12.4251C4.25802 13.7417 5.36779 14.7708 6.71792 14.7708H11.7179C13.1539 14.7708 14.3179 13.6067 14.3179 12.1708V6.1708C14.3179 4.78586 13.2351 3.65383 11.8698 3.57517C11.742 2.25858 10.6323 1.22949 9.28213 1.22949H4.28213C2.84619 1.22949 1.68213 2.39355 1.68213 3.82949V9.82949C1.68213 11.2144 2.76497 12.3465 4.1302 12.4251ZM10.6583 3.5708H6.71792C5.28198 3.5708 4.11792 4.73486 4.11792 6.1708V11.22C3.4221 11.1387 2.88213 10.5471 2.88213 9.82949V3.82949C2.88213 3.05629 3.50893 2.42949 4.28213 2.42949H9.28213C9.96695 2.42949 10.5369 2.92119 10.6583 3.5708ZM13.1179 6.1708C13.1179 5.3976 12.4911 4.7708 11.7179 4.7708H6.71792C5.94472 4.7708 5.31792 5.3976 5.31792 6.1708V12.1708C5.31792 12.944 5.94472 13.5708 6.71792 13.5708H11.7179C12.4911 13.5708 13.1179 12.944 13.1179 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, An = le(function(t, e) {
623
- return de(pe, Object.assign({}, t, {
639
+ Ge.displayName = "AllBorderIcon";
640
+ const Si = {
641
+ tag: "svg",
642
+ attrs: {
643
+ xmlns: "http://www.w3.org/2000/svg",
644
+ fill: "none",
645
+ viewBox: "0 0 16 16",
646
+ width: "1em",
647
+ height: "1em"
648
+ },
649
+ children: [{
650
+ tag: "path",
651
+ attrs: {
652
+ fill: "currentColor",
653
+ d: "M4.1302 12.4251C4.25802 13.7417 5.36779 14.7708 6.71792 14.7708H11.7179C13.1539 14.7708 14.3179 13.6067 14.3179 12.1708V6.1708C14.3179 4.78586 13.2351 3.65383 11.8698 3.57517C11.742 2.25858 10.6323 1.22949 9.28213 1.22949H4.28213C2.84619 1.22949 1.68213 2.39355 1.68213 3.82949V9.82949C1.68213 11.2144 2.76497 12.3465 4.1302 12.4251ZM10.6583 3.5708H6.71792C5.28198 3.5708 4.11792 4.73486 4.11792 6.1708V11.22C3.4221 11.1387 2.88213 10.5471 2.88213 9.82949V3.82949C2.88213 3.05629 3.50893 2.42949 4.28213 2.42949H9.28213C9.96695 2.42949 10.5369 2.92119 10.6583 3.5708ZM13.1179 6.1708C13.1179 5.3976 12.4911 4.7708 11.7179 4.7708H6.71792C5.94472 4.7708 5.31792 5.3976 5.31792 6.1708V12.1708C5.31792 12.944 5.94472 13.5708 6.71792 13.5708H11.7179C12.4911 13.5708 13.1179 12.944 13.1179 12.1708V6.1708Z",
654
+ fillRule: "evenodd",
655
+ clipRule: "evenodd"
656
+ }
657
+ }]
658
+ }, Dn = Ce(function(e, n) {
659
+ return ue(le, Object.assign({}, e, {
624
660
  id: "copy-icon",
625
- ref: e,
626
- icon: Ei
661
+ ref: n,
662
+ icon: Si
627
663
  }));
628
664
  });
629
- An.displayName = "CopyIcon";
630
- var Ri = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.8816 1.97978C11.0177 0.843607 12.862 0.884962 14.0004 2.02342C15.1389 3.16188 15.1803 5.00612 14.0441 6.14228L11.399 8.78737C11.1608 9.02559 10.7746 9.02559 10.5363 8.78737C10.2981 8.54915 10.2981 8.16292 10.5363 7.9247L13.1814 5.2796C13.8195 4.64155 13.8217 3.57006 13.1378 2.8861C12.4538 2.20211 11.3823 2.20438 10.7443 2.84245L7.6976 5.88911L7.69317 5.89349C7.05959 6.53211 7.05894 7.60014 7.74132 8.28252C7.97954 8.52074 7.97954 8.90697 7.74132 9.14519C7.5031 9.38341 7.11687 9.38341 6.87865 9.14519C5.74016 8.00671 5.69884 6.16251 6.83497 5.02633L6.84021 5.02116L9.8816 1.97978Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.61426 7.2364C4.85248 6.99818 5.23871 6.99818 5.47693 7.2364C5.71515 7.47462 5.71515 7.86085 5.47693 8.09907L2.83183 10.7442C2.19375 11.3823 2.1915 12.4537 2.87547 13.1377C3.55945 13.8217 4.6309 13.8194 5.26899 13.1813L8.31566 10.1347C8.32262 10.1277 8.32971 10.121 8.33691 10.1144C8.34408 10.1064 8.3515 10.0986 8.35916 10.091C8.99721 9.45291 8.99949 8.38145 8.3155 7.69746C8.07728 7.45924 8.07728 7.07301 8.3155 6.83479C8.55372 6.59657 8.93995 6.59657 9.17817 6.83479C10.3166 7.97327 10.358 9.81748 9.22183 10.9536C9.21487 10.9606 9.20779 10.9673 9.20058 10.9739C9.19341 10.9819 9.18599 10.9897 9.17833 10.9973L6.13166 14.044C4.99548 15.1802 3.15127 15.1389 2.01279 14.0004C0.874362 12.8619 0.83297 11.0177 1.96916 9.8815L4.61426 7.2364Z" } }] }, At = le(function(t, e) {
631
- return de(pe, Object.assign({}, t, {
665
+ Dn.displayName = "CopyIcon";
666
+ const yi = {
667
+ tag: "svg",
668
+ attrs: {
669
+ xmlns: "http://www.w3.org/2000/svg",
670
+ fill: "none",
671
+ viewBox: "0 0 16 16",
672
+ width: "1em",
673
+ height: "1em"
674
+ },
675
+ children: [{
676
+ tag: "path",
677
+ attrs: {
678
+ fill: "currentColor",
679
+ d: "M9.8816 1.97978C11.0177 0.843607 12.862 0.884962 14.0004 2.02342C15.1389 3.16188 15.1803 5.00612 14.0441 6.14228L11.399 8.78737C11.1608 9.02559 10.7746 9.02559 10.5363 8.78737C10.2981 8.54915 10.2981 8.16292 10.5363 7.9247L13.1814 5.2796C13.8195 4.64155 13.8217 3.57006 13.1378 2.8861C12.4538 2.20211 11.3823 2.20438 10.7443 2.84245L7.6976 5.88911L7.69317 5.89349C7.05959 6.53211 7.05894 7.60014 7.74132 8.28252C7.97954 8.52074 7.97954 8.90697 7.74132 9.14519C7.5031 9.38341 7.11687 9.38341 6.87865 9.14519C5.74016 8.00671 5.69884 6.16251 6.83497 5.02633L6.84021 5.02116L9.8816 1.97978Z"
680
+ }
681
+ }, {
682
+ tag: "path",
683
+ attrs: {
684
+ fill: "currentColor",
685
+ d: "M4.61426 7.2364C4.85248 6.99818 5.23871 6.99818 5.47693 7.2364C5.71515 7.47462 5.71515 7.86085 5.47693 8.09907L2.83183 10.7442C2.19375 11.3823 2.1915 12.4537 2.87547 13.1377C3.55945 13.8217 4.6309 13.8194 5.26899 13.1813L8.31566 10.1347C8.32262 10.1277 8.32971 10.121 8.33691 10.1144C8.34408 10.1064 8.3515 10.0986 8.35916 10.091C8.99721 9.45291 8.99949 8.38145 8.3155 7.69746C8.07728 7.45924 8.07728 7.07301 8.3155 6.83479C8.55372 6.59657 8.93995 6.59657 9.17817 6.83479C10.3166 7.97327 10.358 9.81748 9.22183 10.9536C9.21487 10.9606 9.20779 10.9673 9.20058 10.9739C9.19341 10.9819 9.18599 10.9897 9.17833 10.9973L6.13166 14.044C4.99548 15.1802 3.15127 15.1389 2.01279 14.0004C0.874362 12.8619 0.83297 11.0177 1.96916 9.8815L4.61426 7.2364Z"
686
+ }
687
+ }]
688
+ }, Dt = Ce(function(e, n) {
689
+ return ue(le, Object.assign({}, e, {
632
690
  id: "link-icon",
633
- ref: e,
634
- icon: Ri
691
+ ref: n,
692
+ icon: yi
635
693
  }));
636
694
  });
637
- At.displayName = "LinkIcon";
638
- var Pi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.5935 3.47302C11.6354 2.51492 10.082 2.51492 9.12388 3.47302L7.83534 4.76157C7.60102 4.99588 7.22112 4.99588 6.98681 4.76157C6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449C14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797C11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.40637 12.6606C2.44827 11.7025 2.44827 10.1491 3.40637 9.19102L4.69492 7.90248C4.92923 7.66816 4.92923 7.28826 4.69492 7.05395C4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092C3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721C8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332C2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302C13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332Z" } }] }, Vn = le(function(t, e) {
639
- return de(pe, Object.assign({}, t, {
695
+ Dt.displayName = "LinkIcon";
696
+ const Ei = {
697
+ tag: "svg",
698
+ attrs: {
699
+ xmlns: "http://www.w3.org/2000/svg",
700
+ fill: "none",
701
+ viewBox: "0 0 16 17",
702
+ width: "1em",
703
+ height: "1em"
704
+ },
705
+ children: [
706
+ {
707
+ tag: "path",
708
+ attrs: {
709
+ fill: "currentColor",
710
+ d: "M12.5935 3.47302C11.6354 2.51492 10.082 2.51492 9.12388 3.47302L7.83534 4.76157C7.60102 4.99588 7.22112 4.99588 6.98681 4.76157C6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449C14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797C11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302Z"
711
+ }
712
+ },
713
+ {
714
+ tag: "path",
715
+ attrs: {
716
+ fill: "currentColor",
717
+ d: "M3.40637 12.6606C2.44827 11.7025 2.44827 10.1491 3.40637 9.19102L4.69492 7.90248C4.92923 7.66816 4.92923 7.28826 4.69492 7.05395C4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092C3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721C8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606Z"
718
+ }
719
+ },
720
+ {
721
+ tag: "path",
722
+ attrs: {
723
+ fill: "currentColor",
724
+ d: "M3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332C2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302C13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332Z"
725
+ }
726
+ }
727
+ ]
728
+ }, $n = Ce(function(e, n) {
729
+ return ue(le, Object.assign({}, e, {
640
730
  id: "unlink-icon",
641
- ref: e,
642
- icon: Pi
731
+ ref: n,
732
+ icon: Ei
643
733
  }));
644
734
  });
645
- Vn.displayName = "UnlinkIcon";
646
- var Li = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M12.6551 1.98906C11.7476 1.08113 10.2757 1.08149 9.3686 1.98987L4.82542 6.53955C4.75087 6.61421 4.69336 6.70411 4.65682 6.80309L3.2461 10.625C3.16506 10.8446 3.21909 11.0912 3.3845 11.2568C3.54991 11.4224 3.79651 11.4767 4.01616 11.3959L7.85031 9.98517C7.94979 9.94856 8.04014 9.89077 8.11508 9.81579L12.6552 5.27327C13.5618 4.36621 13.5618 2.89607 12.6551 1.98906ZM10.2177 2.83779C10.6562 2.39869 11.3677 2.39851 11.8064 2.8374C12.2447 3.27584 12.2447 3.9865 11.8065 4.42497L7.3392 8.89457L4.82213 9.82068L5.74706 7.31487L10.2177 2.83779Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.79238 13.2999C1.46101 13.2999 1.19238 13.5685 1.19238 13.8999C1.19238 14.2313 1.46101 14.4999 1.79238 14.4999H14.4924C14.8238 14.4999 15.0924 14.2313 15.0924 13.8999C15.0924 13.5685 14.8238 13.2999 14.4924 13.2999H1.79238Z" } }] }, $n = le(function(t, e) {
647
- return de(pe, Object.assign({}, t, {
735
+ $n.displayName = "UnlinkIcon";
736
+ const Ri = {
737
+ tag: "svg",
738
+ attrs: {
739
+ xmlns: "http://www.w3.org/2000/svg",
740
+ fill: "none",
741
+ viewBox: "0 0 17 16",
742
+ width: "1em",
743
+ height: "1em"
744
+ },
745
+ children: [{
746
+ tag: "path",
747
+ attrs: {
748
+ fill: "currentColor",
749
+ d: "M12.6551 1.98906C11.7476 1.08113 10.2757 1.08149 9.3686 1.98987L4.82542 6.53955C4.75087 6.61421 4.69336 6.70411 4.65682 6.80309L3.2461 10.625C3.16506 10.8446 3.21909 11.0912 3.3845 11.2568C3.54991 11.4224 3.79651 11.4767 4.01616 11.3959L7.85031 9.98517C7.94979 9.94856 8.04014 9.89077 8.11508 9.81579L12.6552 5.27327C13.5618 4.36621 13.5618 2.89607 12.6551 1.98906ZM10.2177 2.83779C10.6562 2.39869 11.3677 2.39851 11.8064 2.8374C12.2447 3.27584 12.2447 3.9865 11.8065 4.42497L7.3392 8.89457L4.82213 9.82068L5.74706 7.31487L10.2177 2.83779Z",
750
+ fillRule: "evenodd",
751
+ clipRule: "evenodd"
752
+ }
753
+ }, {
754
+ tag: "path",
755
+ attrs: {
756
+ fill: "currentColor",
757
+ d: "M1.79238 13.2999C1.46101 13.2999 1.19238 13.5685 1.19238 13.8999C1.19238 14.2313 1.46101 14.4999 1.79238 14.4999H14.4924C14.8238 14.4999 15.0924 14.2313 15.0924 13.8999C15.0924 13.5685 14.8238 13.2999 14.4924 13.2999H1.79238Z"
758
+ }
759
+ }]
760
+ }, An = Ce(function(e, n) {
761
+ return ue(le, Object.assign({}, e, {
648
762
  id: "write-icon",
649
- ref: e,
650
- icon: Li
763
+ ref: n,
764
+ icon: Ri
651
765
  }));
652
766
  });
653
- $n.displayName = "WriteIcon";
654
- var wi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.4535 1.12549C2.7002 1.12549 2.08954 1.73615 2.08954 2.48945V13.5104C2.08954 14.2637 2.7002 14.8744 3.4535 14.8744H12.5465C13.2998 14.8744 13.9105 14.2637 13.9105 13.5104V5.0992L10.0091 1.12549H3.4535Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M10.0075 1.12549L13.9104 5.09842H10.6742C10.306 5.09842 10.0075 4.79994 10.0075 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "white", d: "M7.8088 10.2949L6.3764 12.403C6.26259 12.5705 6.03455 12.614 5.86705 12.5002C5.69955 12.3864 5.65603 12.1584 5.76984 11.9909L7.3655 9.64252L5.94042 7.54519C5.82661 7.37769 5.87013 7.14964 6.03763 7.03583C6.20512 6.92202 6.43317 6.96555 6.54698 7.13304L7.8088 8.9901L9.07062 7.13304C9.18443 6.96555 9.41248 6.92202 9.57997 7.03583C9.74747 7.14964 9.79099 7.37769 9.67718 7.54519L8.2521 9.64252L9.84776 11.9909C9.96157 12.1584 9.91805 12.3864 9.75055 12.5002C9.58305 12.614 9.35501 12.5705 9.2412 12.403L7.8088 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Bn = le(function(t, e) {
655
- return de(pe, Object.assign({}, t, {
767
+ An.displayName = "WriteIcon";
768
+ const Pi = {
769
+ tag: "svg",
770
+ attrs: {
771
+ xmlns: "http://www.w3.org/2000/svg",
772
+ fill: "none",
773
+ viewBox: "0 0 16 16",
774
+ width: "1em",
775
+ height: "1em"
776
+ },
777
+ children: [
778
+ {
779
+ tag: "path",
780
+ attrs: {
781
+ fill: "#35BD4B",
782
+ d: "M3.4535 1.12549C2.7002 1.12549 2.08954 1.73615 2.08954 2.48945V13.5104C2.08954 14.2637 2.7002 14.8744 3.4535 14.8744H12.5465C13.2998 14.8744 13.9105 14.2637 13.9105 13.5104V5.0992L10.0091 1.12549H3.4535Z"
783
+ }
784
+ },
785
+ {
786
+ tag: "path",
787
+ attrs: {
788
+ fill: "#32A846",
789
+ d: "M10.0075 1.12549L13.9104 5.09842H10.6742C10.306 5.09842 10.0075 4.79994 10.0075 4.43175V1.12549Z"
790
+ }
791
+ },
792
+ {
793
+ tag: "path",
794
+ attrs: {
795
+ fill: "white",
796
+ d: "M7.8088 10.2949L6.3764 12.403C6.26259 12.5705 6.03455 12.614 5.86705 12.5002C5.69955 12.3864 5.65603 12.1584 5.76984 11.9909L7.3655 9.64252L5.94042 7.54519C5.82661 7.37769 5.87013 7.14964 6.03763 7.03583C6.20512 6.92202 6.43317 6.96555 6.54698 7.13304L7.8088 8.9901L9.07062 7.13304C9.18443 6.96555 9.41248 6.92202 9.57997 7.03583C9.74747 7.14964 9.79099 7.37769 9.67718 7.54519L8.2521 9.64252L9.84776 11.9909C9.96157 12.1584 9.91805 12.3864 9.75055 12.5002C9.58305 12.614 9.35501 12.5705 9.2412 12.403L7.8088 10.2949Z",
797
+ fillRule: "evenodd",
798
+ clipRule: "evenodd"
799
+ }
800
+ }
801
+ ]
802
+ }, Vn = Ce(function(e, n) {
803
+ return ue(le, Object.assign({}, e, {
656
804
  id: "xlsx-multi-icon",
657
- ref: e,
658
- icon: wi
805
+ ref: n,
806
+ icon: Pi
659
807
  }));
660
808
  });
661
- Bn.displayName = "XlsxMultiIcon";
662
- const bi = {
663
- [C.URL]: /* @__PURE__ */ m(At, {}),
664
- [C.SHEET]: /* @__PURE__ */ m(Bn, { className: "univer-text-green-500" }),
665
- [C.RANGE]: /* @__PURE__ */ m(Ke, {}),
666
- [C.DEFINE_NAME]: /* @__PURE__ */ m(Ke, {}),
667
- [C.INVALID]: /* @__PURE__ */ m(Ke, {})
809
+ Vn.displayName = "XlsxMultiIcon";
810
+ const Li = {
811
+ [C.URL]: /* @__PURE__ */ v(Dt, {}),
812
+ [C.SHEET]: /* @__PURE__ */ v(Vn, { className: "univer-text-green-500" }),
813
+ [C.RANGE]: /* @__PURE__ */ v(Ge, {}),
814
+ [C.DEFINE_NAME]: /* @__PURE__ */ v(Ge, {}),
815
+ [C.INVALID]: /* @__PURE__ */ v(Ge, {})
668
816
  }, mn = (t) => {
669
817
  var M, T;
670
- const e = S(G), n = S(ne), i = S(Tn), r = S(ut), s = S(ue), o = S(te), c = S(Dt), u = S(pt), { customRange: p, row: l, col: g, unitId: d, subUnitId: _, editPermission: I, copyPermission: f, type: w } = t;
818
+ const e = S(Z), n = S(te), i = S(kn), r = S(ct), s = S(ce), o = S(ee), c = S(Ht), u = S(dt), { customRange: p, row: l, col: g, unitId: d, subUnitId: _, editPermission: I, copyPermission: f, type: w } = t;
671
819
  if (!((M = p == null ? void 0 : p.properties) != null && M.url))
672
820
  return null;
673
821
  const a = c.parseHyperLink((T = p.properties.url) != null ? T : ""), b = a.type === C.INVALID;
674
- return /* @__PURE__ */ Ie(
822
+ return /* @__PURE__ */ fe(
675
823
  "div",
676
824
  {
677
- className: Ze("univer-mb-1 univer-flex univer-max-w-80 univer-flex-row univer-items-center univer-justify-between univer-overflow-hidden univer-rounded-lg univer-bg-white univer-p-3 univer-shadow-md dark:!univer-bg-gray-900", xn),
825
+ className: je("univer-mb-1 univer-flex univer-max-w-80 univer-flex-row univer-items-center univer-justify-between univer-overflow-hidden univer-rounded-lg univer-bg-white univer-p-3 univer-shadow-md dark:!univer-bg-gray-900", Nn),
678
826
  onClick: () => e.hideCurrentPopup(),
679
827
  children: [
680
- /* @__PURE__ */ Ie(
828
+ /* @__PURE__ */ fe(
681
829
  "div",
682
830
  {
683
- className: Ze("univer-flex univer-h-6 univer-flex-1 univer-cursor-pointer univer-flex-row univer-items-center univer-truncate univer-text-sm univer-leading-5 univer-text-primary-600", { "univer-text-red-500": b }),
831
+ className: je("univer-flex univer-h-6 univer-flex-1 univer-cursor-pointer univer-flex-row univer-items-center univer-truncate univer-text-sm univer-leading-5 univer-text-primary-600", { "univer-text-red-500": b }),
684
832
  onClick: () => {
685
833
  u.visible || b || s.navigate(a);
686
834
  },
687
835
  children: [
688
- /* @__PURE__ */ m(
836
+ /* @__PURE__ */ v(
689
837
  "div",
690
838
  {
691
839
  className: "univer-mr-2 univer-flex univer-h-5 univer-w-5 univer-flex-none univer-items-center univer-justify-center univer-text-base univer-text-gray-900 dark:!univer-text-white",
692
- children: bi[a.type]
840
+ children: Li[a.type]
693
841
  }
694
842
  ),
695
- /* @__PURE__ */ m(Be, { showIfEllipsis: !0, title: a.name, asChild: !0, children: /* @__PURE__ */ m("span", { className: "univer-flex-1 univer-overflow-hidden univer-text-ellipsis", children: a.name }) })
843
+ /* @__PURE__ */ v(Ve, { showIfEllipsis: !0, title: a.name, asChild: !0, children: /* @__PURE__ */ v("span", { className: "univer-flex-1 univer-overflow-hidden univer-text-ellipsis", children: a.name }) })
696
844
  ]
697
845
  }
698
846
  ),
699
- /* @__PURE__ */ Ie(
847
+ /* @__PURE__ */ fe(
700
848
  "div",
701
849
  {
702
850
  className: "univer-flex univer-h-6 univer-flex-none univer-flex-row univer-items-center univer-justify-center",
703
851
  children: [
704
- f && /* @__PURE__ */ m(
852
+ f && /* @__PURE__ */ v(
705
853
  "div",
706
854
  {
707
- className: Ze("univer-ml-2 univer-flex univer-size-6 univer-cursor-pointer univer-flex-row univer-items-center univer-justify-center univer-rounded univer-text-base hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", { "univer-text-red-500": b }),
855
+ className: je("univer-ml-2 univer-flex univer-size-6 univer-cursor-pointer univer-flex-row univer-items-center univer-justify-center univer-rounded univer-text-base hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", { "univer-text-red-500": b }),
708
856
  onClick: () => {
709
857
  if (!b) {
710
858
  if (a.type !== C.URL) {
@@ -714,20 +862,20 @@ const bi = {
714
862
  navigator.clipboard.writeText(a.url);
715
863
  i.show({
716
864
  content: r.t("hyperLink.message.coped"),
717
- type: ke.Info
865
+ type: be.Info
718
866
  });
719
867
  }
720
868
  },
721
- children: /* @__PURE__ */ m(Be, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ m(An, { className: "dark:!univer-text-white" }) })
869
+ children: /* @__PURE__ */ v(Ve, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ v(Dn, { className: "dark:!univer-text-white" }) })
722
870
  }
723
871
  ),
724
- I && /* @__PURE__ */ Ie(Jr, { children: [
725
- /* @__PURE__ */ m(
872
+ I && /* @__PURE__ */ fe(qr, { children: [
873
+ /* @__PURE__ */ v(
726
874
  "div",
727
875
  {
728
876
  className: "univer-ml-2 univer-flex univer-size-6 univer-cursor-pointer univer-flex-row univer-items-center univer-justify-center univer-rounded univer-text-base hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
729
877
  onClick: () => {
730
- n.executeCommand($t.id, {
878
+ n.executeCommand(At.id, {
731
879
  unitId: d,
732
880
  subUnitId: _,
733
881
  row: l,
@@ -736,25 +884,25 @@ const bi = {
736
884
  type: w
737
885
  });
738
886
  },
739
- children: /* @__PURE__ */ m(Be, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ m($n, { className: "dark:!univer-text-white" }) })
887
+ children: /* @__PURE__ */ v(Ve, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ v(An, { className: "dark:!univer-text-white" }) })
740
888
  }
741
889
  ),
742
- /* @__PURE__ */ m(
890
+ /* @__PURE__ */ v(
743
891
  "div",
744
892
  {
745
893
  className: "univer-ml-2 univer-flex univer-size-6 univer-cursor-pointer univer-flex-row univer-items-center univer-justify-center univer-rounded univer-text-base hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
746
894
  onClick: () => {
747
- const P = w === v.EDITING || w === v.ZEN_EDITOR ? ci.id : ui.id;
895
+ const P = w === m.EDITING || w === m.ZEN_EDITOR ? ai.id : ci.id;
748
896
  n.syncExecuteCommand(P, {
749
897
  unitId: d,
750
898
  subUnitId: _,
751
899
  id: p.rangeId,
752
900
  row: l,
753
901
  column: g,
754
- documentId: w === v.ZEN_EDITOR ? x : o.getCurrentEditorId()
902
+ documentId: w === m.ZEN_EDITOR ? x : o.getCurrentEditorId()
755
903
  }) && e.hideCurrentPopup(void 0, !0);
756
904
  },
757
- children: /* @__PURE__ */ m(Be, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ m(Vn, { className: "dark:!univer-text-white" }) })
905
+ children: /* @__PURE__ */ v(Ve, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ v($n, { className: "dark:!univer-text-white" }) })
758
906
  }
759
907
  )
760
908
  ] })
@@ -764,10 +912,10 @@ const bi = {
764
912
  ]
765
913
  }
766
914
  );
767
- }, Xe = () => {
915
+ }, ze = () => {
768
916
  var r, s;
769
- const t = S(G), [e, n] = Z(null), i = S(K);
770
- if (ee(() => {
917
+ const t = S(Z), [e, n] = j(null), i = S(G);
918
+ if (Q(() => {
771
919
  n(t.currentPopup);
772
920
  const o = t.currentPopup$.subscribe((c) => {
773
921
  n(c);
@@ -779,30 +927,30 @@ const bi = {
779
927
  return null;
780
928
  if (e.showAll) {
781
929
  const o = i.getUnit(e.unitId, k.UNIVER_SHEET), c = o == null ? void 0 : o.getSheetBySheetId(e.subUnitId), u = c == null ? void 0 : c.getCell(e.row, e.col), p = (s = (r = u == null ? void 0 : u.p) == null ? void 0 : r.body) == null ? void 0 : s.customRanges;
782
- return p != null && p.length ? /* @__PURE__ */ m("div", { children: p.map((l) => /* @__PURE__ */ m(mn, { ...e, customRange: l }, l.rangeId)) }) : null;
930
+ return p != null && p.length ? /* @__PURE__ */ v("div", { children: p.map((l) => /* @__PURE__ */ v(mn, { ...e, customRange: l }, l.rangeId)) }) : null;
783
931
  }
784
- return /* @__PURE__ */ m(mn, { ...e });
932
+ return /* @__PURE__ */ v(mn, { ...e });
785
933
  };
786
- Xe.componentKey = "univer.sheet.cell-link-popup";
787
- var ki = Object.getOwnPropertyDescriptor, Ti = (t, e, n, i) => {
788
- for (var r = i > 1 ? void 0 : i ? ki(e, n) : e, s = t.length - 1, o; s >= 0; s--)
934
+ ze.componentKey = "univer.sheet.cell-link-popup";
935
+ var wi = Object.getOwnPropertyDescriptor, bi = (t, e, n, i) => {
936
+ for (var r = i > 1 ? void 0 : i ? wi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
789
937
  (o = t[s]) && (r = o(r) || r);
790
938
  return r;
791
- }, oe = (t, e) => (n, i) => e(n, i, t);
792
- const fn = (t, e) => {
939
+ }, se = (t, e) => (n, i) => e(n, i, t);
940
+ const vn = (t, e) => {
793
941
  var n, i;
794
942
  return t.unitId === e.unitId && t.subUnitId === e.subUnitId && t.row === e.row && t.col === e.col && ((n = t.customRange) == null ? void 0 : n.rangeId) === ((i = e.customRange) == null ? void 0 : i.rangeId) && t.type === e.type;
795
943
  };
796
- let G = class extends Y {
944
+ let Z = class extends K {
797
945
  constructor(e, n, i, r, s, o, c) {
798
946
  super();
799
- $(this, "_currentPopup", null);
800
- $(this, "_currentPopup$", new Yr());
801
- $(this, "currentPopup$", this._currentPopup$.asObservable());
802
- $(this, "_currentEditingPopup", null);
803
- $(this, "_currentEditing$", new zr(null));
804
- $(this, "currentEditing$", this._currentEditing$.asObservable());
805
- $(this, "_isKeepVisible", !1);
947
+ A(this, "_currentPopup", null);
948
+ A(this, "_currentPopup$", new Kr());
949
+ A(this, "currentPopup$", this._currentPopup$.asObservable());
950
+ A(this, "_currentEditingPopup", null);
951
+ A(this, "_currentEditing$", new Yr(null));
952
+ A(this, "currentEditing$", this._currentEditing$.asObservable());
953
+ A(this, "_isKeepVisible", !1);
806
954
  this._sheetCanvasPopManagerService = e, this._injector = n, this._univerInstanceService = i, this._editorBridgeService = r, this._textSelectionManagerService = s, this._docCanvasPopManagerService = o, this._zenZoneService = c, this.disposeWithMe(() => {
807
955
  this.hideCurrentPopup(), this.endEditing(), this._currentEditing$.complete(), this._currentPopup$.complete();
808
956
  });
@@ -822,15 +970,15 @@ let G = class extends Y {
822
970
  // eslint-disable-next-line max-lines-per-function
823
971
  showPopup(e) {
824
972
  var g;
825
- if (this._currentPopup && fn(e, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), e.type !== v.ZEN_EDITOR && this._zenZoneService.visible))
973
+ if (this._currentPopup && vn(e, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), e.type !== m.ZEN_EDITOR && this._zenZoneService.visible))
826
974
  return;
827
975
  const n = this._currentEditing$.getValue();
828
- if (n && fn(e, n))
976
+ if (n && vn(e, n))
829
977
  return;
830
978
  const { unitId: i, subUnitId: r, row: s, col: o, customRangeRect: c, customRange: u } = e;
831
979
  let p;
832
980
  const l = {
833
- componentKey: Xe.componentKey,
981
+ componentKey: ze.componentKey,
834
982
  direction: "bottom",
835
983
  onClickOutside: () => {
836
984
  this.hideCurrentPopup();
@@ -839,14 +987,14 @@ let G = class extends Y {
839
987
  this.hideCurrentPopup(e.type, !0);
840
988
  }
841
989
  };
842
- if (e.type === v.EDITING) {
990
+ if (e.type === m.EDITING) {
843
991
  if (!u)
844
992
  return;
845
993
  p = c && this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
846
994
  c,
847
995
  l
848
996
  );
849
- } else if (e.type === v.ZEN_EDITOR) {
997
+ } else if (e.type === m.ZEN_EDITOR) {
850
998
  if (!u)
851
999
  return;
852
1000
  p = this._docCanvasPopManagerService.attachPopupToRange(
@@ -901,9 +1049,9 @@ let G = class extends Y {
901
1049
  startOffset: 0,
902
1050
  endOffset: c.dataStream.length - 2,
903
1051
  collapsed: c.dataStream.length - 2 === 0,
904
- label: _e.transform.getPlainText(c.dataStream)
1052
+ label: ve.transform.getPlainText(c.dataStream)
905
1053
  };
906
- const u = _e.customRange.getCustomRangesInterestsWithSelection(o, (s = (r = c.customRanges) == null ? void 0 : r.filter((g) => g.rangeType === Oe.HYPERLINK)) != null ? s : []);
1054
+ const u = ve.customRange.getCustomRangesInterestsWithSelection(o, (s = (r = c.customRanges) == null ? void 0 : r.filter((g) => g.rangeType === Te.HYPERLINK)) != null ? s : []);
907
1055
  let p = o.startOffset, l = o.endOffset;
908
1056
  return u.forEach((g) => {
909
1057
  p = Math.min(p, g.startIndex), l = Math.max(l, g.endIndex + 1);
@@ -911,14 +1059,14 @@ let G = class extends Y {
911
1059
  startOffset: p,
912
1060
  endOffset: l,
913
1061
  collapsed: p === l,
914
- label: _e.transform.getPlainText(c.dataStream.slice(p, l))
1062
+ label: ve.transform.getPlainText(c.dataStream.slice(p, l))
915
1063
  };
916
1064
  }
917
1065
  return null;
918
1066
  }
919
1067
  get _editPopup() {
920
1068
  return {
921
- componentKey: ze.componentKey,
1069
+ componentKey: Ye.componentKey,
922
1070
  direction: "vertical",
923
1071
  onClickOutside: () => {
924
1072
  this.endEditing();
@@ -932,7 +1080,7 @@ let G = class extends Y {
932
1080
  startAddEditing(e) {
933
1081
  var s, o, c, u, p;
934
1082
  const { unitId: n, subUnitId: i, type: r } = e;
935
- if (r === v.ZEN_EDITOR) {
1083
+ if (r === m.ZEN_EDITOR) {
936
1084
  const l = this._univerInstanceService.getUnit(x, k.UNIVER_DOC);
937
1085
  if (!l)
938
1086
  return;
@@ -949,15 +1097,15 @@ let G = class extends Y {
949
1097
  ...e,
950
1098
  label: d
951
1099
  });
952
- } else if (r === v.EDITING) {
1100
+ } else if (r === m.EDITING) {
953
1101
  const l = this._getEditingRange();
954
1102
  if (!l)
955
1103
  return;
956
- this._textSelectionManagerService.replaceDocRanges([{ ...l }], { unitId: Ce, subUnitId: Ce });
957
- const g = this._injector.get(He).getRenderById(Ce);
1104
+ this._textSelectionManagerService.replaceDocRanges([{ ...l }], { unitId: _e, subUnitId: _e });
1105
+ const g = this._injector.get(Ue).getRenderById(_e);
958
1106
  if (!g)
959
1107
  return;
960
- const d = Dr(l, g);
1108
+ const d = Hr(l, g);
961
1109
  if (!(d != null && d.length))
962
1110
  return;
963
1111
  this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
@@ -980,7 +1128,7 @@ let G = class extends Y {
980
1128
  const l = this._univerInstanceService.getUnit(n, k.UNIVER_SHEET), g = l == null ? void 0 : l.getSheetBySheetId(i), d = g == null ? void 0 : g.getCellRaw(e.row, e.col);
981
1129
  this._currentEditing$.next({
982
1130
  ...e,
983
- label: d != null && d.p ? _e.transform.getPlainText((u = (c = d.p.body) == null ? void 0 : c.dataStream) != null ? u : "") : ((p = d == null ? void 0 : d.v) != null ? p : "").toString()
1131
+ label: d != null && d.p ? ve.transform.getPlainText((u = (c = d.p.body) == null ? void 0 : c.dataStream) != null ? u : "") : ((p = d == null ? void 0 : d.v) != null ? p : "").toString()
984
1132
  });
985
1133
  }
986
1134
  }
@@ -990,7 +1138,7 @@ let G = class extends Y {
990
1138
  (o = this._currentEditingPopup) == null || o.dispose(), this.hideCurrentPopup(void 0, !0);
991
1139
  const { unitId: n, subUnitId: i } = e;
992
1140
  let r, s;
993
- if (e.type === v.ZEN_EDITOR) {
1141
+ if (e.type === m.ZEN_EDITOR) {
994
1142
  const d = this._univerInstanceService.getUnit(x, k.UNIVER_DOC);
995
1143
  if (r = (u = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : u.find((_) => _.rangeId === e.customRangeId), s = r ? (p = d == null ? void 0 : d.getBody()) == null ? void 0 : p.dataStream.slice(r.startIndex, r.endIndex + 1) : "", !r || !s)
996
1144
  return;
@@ -1008,8 +1156,8 @@ let G = class extends Y {
1008
1156
  this._editPopup,
1009
1157
  x
1010
1158
  );
1011
- } else if (e.type === v.EDITING) {
1012
- const d = Rr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1159
+ } else if (e.type === m.EDITING) {
1160
+ const d = Er(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1013
1161
  if (!d || !((l = d.rects) != null && l.length))
1014
1162
  return;
1015
1163
  r = d.customRange, s = d.label, this._textSelectionManagerService.replaceTextRanges([
@@ -1024,7 +1172,7 @@ let G = class extends Y {
1024
1172
  i
1025
1173
  );
1026
1174
  } else {
1027
- const d = this._univerInstanceService.getUnit(n, k.UNIVER_SHEET), _ = d == null ? void 0 : d.getSheetBySheetId(i), I = _ == null ? void 0 : _.getCellRaw(e.row, e.col), f = d == null ? void 0 : d.getStyles().getStyleByCell(I), w = f == null ? void 0 : f.tr, a = Pr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1175
+ const d = this._univerInstanceService.getUnit(n, k.UNIVER_SHEET), _ = d == null ? void 0 : d.getSheetBySheetId(i), I = _ == null ? void 0 : _.getCellRaw(e.row, e.col), f = d == null ? void 0 : d.getStyles().getStyleByCell(I), w = f == null ? void 0 : f.tr, a = Rr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1028
1176
  if (!a || !((g = a.rects) != null && g.length))
1029
1177
  return;
1030
1178
  r = a.customRange, s = a.label, w ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
@@ -1058,97 +1206,97 @@ let G = class extends Y {
1058
1206
  n && (!e || e === n.type) && ((i = this._currentEditingPopup) == null || i.dispose(), this._currentEditing$.next(null));
1059
1207
  }
1060
1208
  };
1061
- G = Ti([
1062
- oe(0, y(Er)),
1063
- oe(1, y(lt)),
1064
- oe(2, K),
1065
- oe(3, te),
1066
- oe(4, y(Ue)),
1067
- oe(5, y(Hr)),
1068
- oe(6, pt)
1069
- ], G);
1070
- var Te = /* @__PURE__ */ ((t) => (t[t.ALLOWED = 0] = "ALLOWED", t[t.DISABLED_BY_CELL = 1] = "DISABLED_BY_CELL", t[t.ALLOW_ON_EDITING = 2] = "ALLOW_ON_EDITING", t))(Te || {});
1071
- const Oi = /* @__PURE__ */ new Set([
1072
- St.CHECKBOX,
1073
- St.LIST,
1074
- St.LIST_MULTIPLE
1075
- ]), Vt = (t, e, n, i) => {
1209
+ Z = bi([
1210
+ se(0, y(yr)),
1211
+ se(1, y(ut)),
1212
+ se(2, G),
1213
+ se(3, ee),
1214
+ se(4, y(Me)),
1215
+ se(5, y(Ur)),
1216
+ se(6, dt)
1217
+ ], Z);
1218
+ var ke = /* @__PURE__ */ ((t) => (t[t.ALLOWED = 0] = "ALLOWED", t[t.DISABLED_BY_CELL = 1] = "DISABLED_BY_CELL", t[t.ALLOW_ON_EDITING = 2] = "ALLOW_ON_EDITING", t))(ke || {});
1219
+ const ki = /* @__PURE__ */ new Set([
1220
+ Ct.CHECKBOX,
1221
+ Ct.LIST,
1222
+ Ct.LIST_MULTIPLE
1223
+ ]), $t = (t, e, n, i) => {
1076
1224
  var c, u, p, l, g;
1077
1225
  const r = e.getCell(n, i);
1078
1226
  if (r != null && r.f || r != null && r.si || (p = (u = (c = r == null ? void 0 : r.p) == null ? void 0 : c.body) == null ? void 0 : u.customBlocks) != null && p.length)
1079
1227
  return 1;
1080
- const s = t.has(gn) ? t.get(gn) : null, o = s == null ? void 0 : s.getRuleByLocation(e.getUnitId(), e.getSheetId(), n, i);
1081
- return o && Oi.has(o.type) ? !0 : (g = (l = r == null ? void 0 : r.p) == null ? void 0 : l.drawingsOrder) != null && g.length ? 2 : 0;
1082
- }, xi = (t) => {
1083
- const e = t.get(K).getCurrentUnitForType(k.UNIVER_SHEET);
1228
+ const s = t.has(hn) ? t.get(hn) : null, o = s == null ? void 0 : s.getRuleByLocation(e.getUnitId(), e.getSheetId(), n, i);
1229
+ return o && ki.has(o.type) ? !0 : (g = (l = r == null ? void 0 : r.p) == null ? void 0 : l.drawingsOrder) != null && g.length ? 2 : 0;
1230
+ }, Ti = (t) => {
1231
+ const e = t.get(G).getCurrentUnitForType(k.UNIVER_SHEET);
1084
1232
  if (!e)
1085
1233
  return !0;
1086
- const n = e.getActiveSheet(), i = t.get(Tt).getCurrentSelections();
1234
+ const n = e.getActiveSheet(), i = t.get(kt).getCurrentSelections();
1087
1235
  if (!i.length)
1088
1236
  return !0;
1089
1237
  const r = i[0].range.startRow, s = i[0].range.startColumn;
1090
- return Vt(t, n, r, s) === 1;
1238
+ return $t(t, n, r, s) === 1;
1091
1239
  }, Ni = (t) => {
1092
- const e = t.get(Ue), n = t.get(K), i = e.getTextRanges();
1240
+ const e = t.get(Me), n = t.get(G), i = e.getTextRanges();
1093
1241
  if (!(i != null && i.length))
1094
1242
  return !0;
1095
1243
  const r = n.getCurrentUnitForType(k.UNIVER_DOC);
1096
1244
  return !!(!r || i.every((o) => o.collapsed) || !r.getSelfOrHeaderFooterModel(i[0].segmentId).getBody());
1097
- }, $t = {
1098
- type: dt.OPERATION,
1245
+ }, At = {
1246
+ type: lt.OPERATION,
1099
1247
  id: "sheet.operation.open-hyper-link-edit-panel",
1100
1248
  handler(t, e) {
1101
1249
  if (!e)
1102
1250
  return !1;
1103
- const n = t.get(G);
1251
+ const n = t.get(Z);
1104
1252
  return e.customRangeId ? n.startEditing(e) : n.startAddEditing(e), !0;
1105
1253
  }
1106
- }, qe = {
1107
- type: dt.OPERATION,
1254
+ }, Xe = {
1255
+ type: lt.OPERATION,
1108
1256
  id: "sheet.operation.close-hyper-link-popup",
1109
1257
  handler(t) {
1110
- return t.get(G).endEditing(), !0;
1258
+ return t.get(Z).endEditing(), !0;
1111
1259
  }
1112
- }, Bt = {
1113
- type: dt.OPERATION,
1260
+ }, Vt = {
1261
+ type: lt.OPERATION,
1114
1262
  id: "sheet.operation.insert-hyper-link",
1115
1263
  handler(t) {
1116
1264
  var g;
1117
- const e = t.get(K), n = Ot(e), i = t.get(te);
1265
+ const e = t.get(G), n = Tt(e), i = t.get(ee);
1118
1266
  if (!n)
1119
1267
  return !1;
1120
- const r = t.get(ne), o = t.get(Tt).getCurrentLastSelection();
1268
+ const r = t.get(te), o = t.get(kt).getCurrentLastSelection();
1121
1269
  if (!o)
1122
1270
  return !1;
1123
1271
  const c = o.range.startRow, u = o.range.startColumn, p = i.isVisible(), l = ((g = e.getFocusedUnit()) == null ? void 0 : g.getUnitId()) === x;
1124
- return r.executeCommand($t.id, {
1272
+ return r.executeCommand(At.id, {
1125
1273
  unitId: n.unitId,
1126
1274
  subUnitId: n.subUnitId,
1127
1275
  row: c,
1128
1276
  col: u,
1129
- type: l ? v.ZEN_EDITOR : p.visible ? v.EDITING : v.VIEWING
1277
+ type: l ? m.ZEN_EDITOR : p.visible ? m.EDITING : m.VIEWING
1130
1278
  });
1131
1279
  }
1132
- }, ce = {
1133
- type: dt.OPERATION,
1280
+ }, ae = {
1281
+ type: lt.OPERATION,
1134
1282
  id: "sheet.operation.insert-hyper-link-toolbar",
1135
1283
  handler(t) {
1136
- if (xi(t))
1284
+ if (Ti(t))
1137
1285
  return !1;
1138
- const e = t.get(ne);
1139
- return t.get(G).currentEditing ? e.executeCommand(qe.id) : e.executeCommand(Bt.id);
1286
+ const e = t.get(te);
1287
+ return t.get(Z).currentEditing ? e.executeCommand(Xe.id) : e.executeCommand(Vt.id);
1140
1288
  }
1141
- }, Ft = "SHEET_HYPER_LINK_UI_PLUGIN";
1142
- var Mi = Object.getOwnPropertyDescriptor, Ui = (t, e, n, i) => {
1143
- for (var r = i > 1 ? void 0 : i ? Mi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1289
+ }, Bt = "SHEET_HYPER_LINK_UI_PLUGIN";
1290
+ var xi = Object.getOwnPropertyDescriptor, Oi = (t, e, n, i) => {
1291
+ for (var r = i > 1 ? void 0 : i ? xi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1144
1292
  (o = t[s]) && (r = o(r) || r);
1145
1293
  return r;
1146
- }, Fe = (t, e) => (n, i) => e(n, i, t);
1147
- let Je = class extends Y {
1294
+ }, Be = (t, e) => (n, i) => e(n, i, t);
1295
+ let qe = class extends K {
1148
1296
  constructor(e, n, i, r) {
1149
1297
  super();
1150
- $(this, "_plainTextFilter", /* @__PURE__ */ new Set());
1151
- $(this, "_copyInfo");
1298
+ A(this, "_plainTextFilter", /* @__PURE__ */ new Set());
1299
+ A(this, "_copyInfo");
1152
1300
  this._sheetClipboardService = e, this._hyperLinkModel = n, this._injector = i, this._resolverService = r, this._initCopyPaste(), this.disposeWithMe(() => {
1153
1301
  this._plainTextFilter.clear();
1154
1302
  });
@@ -1165,27 +1313,27 @@ let Je = class extends Y {
1165
1313
  }
1166
1314
  _initCopyPaste() {
1167
1315
  this._sheetClipboardService.addClipboardHook({
1168
- id: Ft,
1316
+ id: Bt,
1169
1317
  onBeforeCopy: (e, n, i) => this._collect(e, n, i),
1170
1318
  onPasteCells: (e, n, i, r) => {
1171
- const { copyType: s = wr.COPY, pasteType: o } = r, { range: c } = e || {}, { range: u, unitId: p, subUnitId: l } = n;
1319
+ const { copyType: s = Lr.COPY, pasteType: o } = r, { range: c } = e || {}, { range: u, unitId: p, subUnitId: l } = n;
1172
1320
  return this._generateMutations(u, { copyType: s, pasteType: o, copyRange: c, unitId: p, subUnitId: l });
1173
1321
  },
1174
1322
  onPastePlainText: (e, n) => {
1175
1323
  const i = this._filterPlainText(n);
1176
- if (Ye(n) && i) {
1177
- const { range: r, unitId: s, subUnitId: o } = e, { ranges: [c], mapFunc: u } = Pt([r]), p = [], l = [];
1178
- return En.foreach(c, (g, d) => {
1324
+ if (Ke(n) && i) {
1325
+ const { range: r, unitId: s, subUnitId: o } = e, { ranges: [c], mapFunc: u } = Rt([r]), p = [], l = [];
1326
+ return yn.foreach(c, (g, d) => {
1179
1327
  const { row: _, col: I } = u(g, d), f = this._hyperLinkModel.getHyperLinkByLocation(s, o, _, I);
1180
1328
  f && p.push({
1181
- id: Ne.id,
1329
+ id: xe.id,
1182
1330
  params: {
1183
1331
  unitId: s,
1184
1332
  subUnitId: o,
1185
1333
  id: f.id
1186
1334
  }
1187
1335
  }), f && l.push({
1188
- id: Me.id,
1336
+ id: Oe.id,
1189
1337
  params: {
1190
1338
  unitId: s,
1191
1339
  subUnitId: o,
@@ -1200,13 +1348,13 @@ let Je = class extends Y {
1200
1348
  });
1201
1349
  }
1202
1350
  _collect(e, n, i) {
1203
- const r = new ir();
1351
+ const r = new rr();
1204
1352
  this._copyInfo = {
1205
1353
  unitId: e,
1206
1354
  subUnitId: n,
1207
1355
  matrix: r
1208
1356
  };
1209
- const s = this._injector.invoke((u) => dr(i, u, e, n));
1357
+ const s = this._injector.invoke((u) => lr(i, u, e, n));
1210
1358
  if (!s)
1211
1359
  return;
1212
1360
  const { rows: o, cols: c } = s;
@@ -1225,17 +1373,17 @@ let Je = class extends Y {
1225
1373
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
1226
1374
  return { redos: [], undos: [] };
1227
1375
  if ([
1228
- $e.SPECIAL_PASTE_COL_WIDTH,
1229
- $e.SPECIAL_PASTE_VALUE,
1230
- $e.SPECIAL_PASTE_FORMAT,
1231
- $e.SPECIAL_PASTE_FORMULA
1376
+ Ae.SPECIAL_PASTE_COL_WIDTH,
1377
+ Ae.SPECIAL_PASTE_VALUE,
1378
+ Ae.SPECIAL_PASTE_FORMAT,
1379
+ Ae.SPECIAL_PASTE_FORMULA
1232
1380
  ].includes(n.pasteType))
1233
1381
  return { redos: [], undos: [] };
1234
- const { unitId: r, subUnitId: s } = this._copyInfo, o = [], c = [], { ranges: [u, p], mapFunc: l } = Pt([n.copyRange, e]);
1235
- return br(u, p, !0).forEach(({ startRange: d }) => {
1382
+ const { unitId: r, subUnitId: s } = this._copyInfo, o = [], c = [], { ranges: [u, p], mapFunc: l } = Rt([n.copyRange, e]);
1383
+ return wr(u, p, !0).forEach(({ startRange: d }) => {
1236
1384
  var _;
1237
1385
  (_ = this._copyInfo) == null || _.matrix.forValue((I, f, w) => {
1238
- const a = Se.getPositionRange(
1386
+ const a = Ie.getPositionRange(
1239
1387
  {
1240
1388
  startRow: I,
1241
1389
  endRow: I,
@@ -1243,16 +1391,16 @@ let Je = class extends Y {
1243
1391
  endColumn: f
1244
1392
  },
1245
1393
  d
1246
- ), b = this._hyperLinkModel.getHyperLink(r, s, w), { row: M, col: T } = l(a.startRow, a.startColumn), P = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, M, T), D = kt();
1394
+ ), b = this._hyperLinkModel.getHyperLink(r, s, w), { row: M, col: T } = l(a.startRow, a.startColumn), P = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, M, T), D = bt();
1247
1395
  P && o.push({
1248
- id: Ne.id,
1396
+ id: xe.id,
1249
1397
  params: {
1250
1398
  unitId: n.unitId,
1251
1399
  subUnitId: n.subUnitId,
1252
1400
  id: P.id
1253
1401
  }
1254
1402
  }), b && (o.push({
1255
- id: Me.id,
1403
+ id: Oe.id,
1256
1404
  params: {
1257
1405
  unitId: n.unitId,
1258
1406
  subUnitId: n.subUnitId,
@@ -1264,14 +1412,14 @@ let Je = class extends Y {
1264
1412
  }
1265
1413
  }
1266
1414
  }), c.push({
1267
- id: Ne.id,
1415
+ id: xe.id,
1268
1416
  params: {
1269
1417
  unitId: n.unitId,
1270
1418
  subUnitId: n.subUnitId,
1271
1419
  id: D
1272
1420
  }
1273
1421
  })), P && c.push({
1274
- id: Me.id,
1422
+ id: Oe.id,
1275
1423
  params: {
1276
1424
  unitId: n.unitId,
1277
1425
  subUnitId: n.subUnitId,
@@ -1282,97 +1430,97 @@ let Je = class extends Y {
1282
1430
  }), { redos: o, undos: c };
1283
1431
  }
1284
1432
  };
1285
- Je = Ui([
1286
- Fe(0, Lr),
1287
- Fe(1, y(gt)),
1288
- Fe(2, y(lt)),
1289
- Fe(3, y(ue))
1290
- ], Je);
1291
- const jt = (t, e = x) => {
1433
+ qe = Oi([
1434
+ Be(0, Pr),
1435
+ Be(1, y(ht)),
1436
+ Be(2, y(ut)),
1437
+ Be(3, y(ce))
1438
+ ], qe);
1439
+ const Ft = (t, e = x) => {
1292
1440
  var r;
1293
- const n = t.get(K), i = (r = t.get(He).getRenderById(e)) == null ? void 0 : r.with(kn);
1294
- return i ? i.textSelectionInner$.pipe(Ht(() => {
1295
- const o = t.get(te).getEditCellState();
1441
+ const n = t.get(G), i = (r = t.get(Ue).getRenderById(e)) == null ? void 0 : r.with(bn);
1442
+ return i ? i.textSelectionInner$.pipe(Ut(() => {
1443
+ const o = t.get(ee).getEditCellState();
1296
1444
  if (!o)
1297
1445
  return !0;
1298
- const c = Ot(n, { unitId: o.unitId, subUnitId: o.sheetId });
1299
- return !(c != null && c.worksheet) || Vt(t, c.worksheet, o.row, o.column) === 1 ? !0 : Ni(t);
1300
- })) : ae(!0);
1301
- }, Fn = (t) => {
1446
+ const c = Tt(n, { unitId: o.unitId, subUnitId: o.sheetId });
1447
+ return !(c != null && c.worksheet) || $t(t, c.worksheet, o.row, o.column) === 1 ? !0 : Ni(t);
1448
+ })) : oe(!0);
1449
+ }, Bn = (t) => {
1302
1450
  var r;
1303
- const e = t.get(K), n = t.has(te) ? t.get(te) : null;
1451
+ const e = t.get(G), n = t.has(ee) ? t.get(ee) : null;
1304
1452
  return ((r = n == null ? void 0 : n.currentEditCellState$.pipe(
1305
- Ht((s) => {
1453
+ Ut((s) => {
1306
1454
  if (!s)
1307
- return Te.DISABLED_BY_CELL;
1308
- const o = Ot(e, { unitId: s.unitId, subUnitId: s.sheetId });
1309
- return o ? Vt(t, o.worksheet, s.row, s.column) : Te.DISABLED_BY_CELL;
1455
+ return ke.DISABLED_BY_CELL;
1456
+ const o = Tt(e, { unitId: s.unitId, subUnitId: s.sheetId });
1457
+ return o ? $t(t, o.worksheet, s.row, s.column) : ke.DISABLED_BY_CELL;
1310
1458
  }),
1311
- xe((s) => {
1312
- if (s === Te.DISABLED_BY_CELL)
1313
- return ae(!0);
1314
- const o = n ? n.visible$ : ae(null);
1315
- return Xr([o, e.getCurrentTypeOfUnit$(k.UNIVER_DOC)]).pipe(
1316
- xe(
1317
- ([c, u]) => c != null && c.visible ? (u == null ? void 0 : u.getUnitId()) === sr ? ae(!0) : jt(t, Ce) : ae(s !== Te.ALLOWED)
1459
+ Ne((s) => {
1460
+ if (s === ke.DISABLED_BY_CELL)
1461
+ return oe(!0);
1462
+ const o = n ? n.visible$ : oe(null);
1463
+ return zr([o, e.getCurrentTypeOfUnit$(k.UNIVER_DOC)]).pipe(
1464
+ Ne(
1465
+ ([c, u]) => c != null && c.visible ? (u == null ? void 0 : u.getUnitId()) === ir ? oe(!0) : Ft(t, _e) : oe(s !== ke.ALLOWED)
1318
1466
  )
1319
1467
  );
1320
1468
  })
1321
- )) != null ? r : ae(!0)).pipe(
1322
- xe((s) => s ? ae(!0) : Tr(t, { workbookTypes: [Ut], worksheetTypes: [Nt, Ln, Mt], rangeTypes: [xt] }, !0))
1469
+ )) != null ? r : oe(!0)).pipe(
1470
+ Ne((s) => s ? oe(!0) : kr(t, { workbookTypes: [Mt], worksheetTypes: [xt, Pn, Ot], rangeTypes: [Nt] }, !0))
1323
1471
  );
1324
- }, Qe = {
1325
- commandId: Bt.id,
1326
- type: On.BUTTON,
1472
+ }, Je = {
1473
+ commandId: Vt.id,
1474
+ type: Tn.BUTTON,
1327
1475
  title: "hyperLink.menu.add",
1328
1476
  icon: "LinkIcon"
1329
- }, et = (t) => `${t}-zen-editor`, Hi = (t) => ({
1330
- ...Qe,
1331
- id: Qe.commandId,
1332
- hidden$: ht(t, k.UNIVER_SHEET),
1333
- disabled$: Fn(t)
1477
+ }, Qe = (t) => `${t}-zen-editor`, Mi = (t) => ({
1478
+ ...Je,
1479
+ id: Je.commandId,
1480
+ hidden$: pt(t, k.UNIVER_SHEET),
1481
+ disabled$: Bn(t)
1334
1482
  // disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetInsertHyperlinkPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })),
1335
- }), Di = (t) => ({
1336
- ...Qe,
1337
- id: et(Qe.commandId),
1338
- hidden$: ht(t, k.UNIVER_DOC, x),
1339
- disabled$: jt(t)
1340
- }), tt = {
1483
+ }), Ui = (t) => ({
1484
+ ...Je,
1485
+ id: Qe(Je.commandId),
1486
+ hidden$: pt(t, k.UNIVER_DOC, x),
1487
+ disabled$: Ft(t)
1488
+ }), et = {
1341
1489
  tooltip: "hyperLink.form.addTitle",
1342
- commandId: ce.id,
1343
- type: On.BUTTON,
1490
+ commandId: ae.id,
1491
+ type: Tn.BUTTON,
1344
1492
  icon: "LinkIcon"
1345
- }, Ai = (t) => ({
1346
- ...tt,
1347
- id: tt.commandId,
1348
- hidden$: ht(t, k.UNIVER_SHEET),
1349
- disabled$: Fn(t)
1350
- }), Vi = (t) => ({
1351
- ...tt,
1352
- id: et(tt.commandId),
1353
- hidden$: ht(t, k.UNIVER_DOC, x),
1354
- disabled$: jt(t)
1355
- }), jn = {
1356
- id: ce.id,
1357
- binding: Lt.K | Br.CTRL_COMMAND,
1358
- preconditions: kr
1493
+ }, Hi = (t) => ({
1494
+ ...et,
1495
+ id: et.commandId,
1496
+ hidden$: pt(t, k.UNIVER_SHEET),
1497
+ disabled$: Bn(t)
1498
+ }), Di = (t) => ({
1499
+ ...et,
1500
+ id: Qe(et.commandId),
1501
+ hidden$: pt(t, k.UNIVER_DOC, x),
1502
+ disabled$: Ft(t)
1503
+ }), Fn = {
1504
+ id: ae.id,
1505
+ binding: Pt.K | Vr.CTRL_COMMAND,
1506
+ preconditions: br
1359
1507
  };
1360
- var $i = Object.getOwnPropertyDescriptor, Bi = (t, e, n, i) => {
1508
+ var $i = Object.getOwnPropertyDescriptor, Ai = (t, e, n, i) => {
1361
1509
  for (var r = i > 1 ? void 0 : i ? $i(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1362
1510
  (o = t[s]) && (r = o(r) || r);
1363
1511
  return r;
1364
- }, _n = (t, e) => (n, i) => e(n, i, t);
1365
- let nt = class extends Y {
1512
+ }, fn = (t, e) => (n, i) => e(n, i, t);
1513
+ let tt = class extends K {
1366
1514
  constructor(t, e) {
1367
1515
  super(), this._autoFillService = t, this._hyperLinkModel = e, this._initAutoFill();
1368
1516
  }
1369
1517
  // eslint-disable-next-line max-lines-per-function
1370
1518
  _initAutoFill() {
1371
1519
  const t = () => ({ redos: [], undos: [] }), e = (i, r) => {
1372
- const { source: s, target: o, unitId: c, subUnitId: u } = i, p = Pt([s, o]), [l, g] = p.ranges, { mapFunc: d } = p, _ = {
1520
+ const { source: s, target: o, unitId: c, subUnitId: u } = i, p = Rt([s, o]), [l, g] = p.ranges, { mapFunc: d } = p, _ = {
1373
1521
  row: l.startRow,
1374
1522
  col: l.startColumn
1375
- }, I = xr(l, g), f = [], w = [];
1523
+ }, I = Nr(l, g), f = [], w = [];
1376
1524
  return I.forEach((a) => {
1377
1525
  const b = a.repeatStartCell, M = a.relativeRange, T = {
1378
1526
  startRow: _.row,
@@ -1385,56 +1533,56 @@ let nt = class extends Y {
1385
1533
  endColumn: b.col,
1386
1534
  endRow: b.row
1387
1535
  };
1388
- En.foreach(M, (D, A) => {
1389
- const z = Se.getPositionRange(
1536
+ yn.foreach(M, (D, $) => {
1537
+ const Y = Ie.getPositionRange(
1390
1538
  {
1391
1539
  startRow: D,
1392
- startColumn: A,
1393
- endColumn: A,
1540
+ startColumn: $,
1541
+ endColumn: $,
1394
1542
  endRow: D
1395
1543
  },
1396
1544
  T
1397
- ), { row: re, col: De } = d(z.startRow, z.startColumn), ie = this._hyperLinkModel.getHyperLinkByLocation(c, u, re, De), ye = Se.getPositionRange(
1545
+ ), { row: ne, col: He } = d(Y.startRow, Y.startColumn), re = this._hyperLinkModel.getHyperLinkByLocation(c, u, ne, He), Se = Ie.getPositionRange(
1398
1546
  {
1399
1547
  startRow: D,
1400
- startColumn: A,
1401
- endColumn: A,
1548
+ startColumn: $,
1549
+ endColumn: $,
1402
1550
  endRow: D
1403
1551
  },
1404
1552
  P
1405
- ), { row: Ee, col: Re } = d(ye.startRow, ye.startColumn), Ae = kt(), he = this._hyperLinkModel.getHyperLinkByLocation(c, u, Ee, Re);
1406
- he && f.push({
1407
- id: Ne.id,
1553
+ ), { row: ye, col: Ee } = d(Se.startRow, Se.startColumn), De = bt(), de = this._hyperLinkModel.getHyperLinkByLocation(c, u, ye, Ee);
1554
+ de && f.push({
1555
+ id: xe.id,
1408
1556
  params: {
1409
1557
  unitId: c,
1410
1558
  subUnitId: u,
1411
- id: he.id
1559
+ id: de.id
1412
1560
  }
1413
- }), (we.COPY === r || we.SERIES === r) && ie && (f.push({
1414
- id: Me.id,
1561
+ }), (Le.COPY === r || Le.SERIES === r) && re && (f.push({
1562
+ id: Oe.id,
1415
1563
  params: {
1416
1564
  unitId: c,
1417
1565
  subUnitId: u,
1418
1566
  link: {
1419
- ...ie,
1420
- id: Ae,
1421
- row: Ee,
1422
- column: Re
1567
+ ...re,
1568
+ id: De,
1569
+ row: ye,
1570
+ column: Ee
1423
1571
  }
1424
1572
  }
1425
1573
  }), w.push({
1426
- id: Ne.id,
1574
+ id: xe.id,
1427
1575
  params: {
1428
1576
  unitId: c,
1429
1577
  subUnitId: u,
1430
- id: Ae
1578
+ id: De
1431
1579
  }
1432
- })), he && w.push({
1433
- id: Me.id,
1580
+ })), de && w.push({
1581
+ id: Oe.id,
1434
1582
  params: {
1435
1583
  unitId: c,
1436
1584
  subUnitId: u,
1437
- link: he
1585
+ link: de
1438
1586
  }
1439
1587
  });
1440
1588
  });
@@ -1443,48 +1591,48 @@ let nt = class extends Y {
1443
1591
  redos: f
1444
1592
  };
1445
1593
  }, n = {
1446
- id: Ft,
1447
- onFillData: (i, r, s) => s === we.COPY || s === we.ONLY_FORMAT || s === we.SERIES ? e(i, s) : t()
1594
+ id: Bt,
1595
+ onFillData: (i, r, s) => s === Le.COPY || s === Le.ONLY_FORMAT || s === Le.SERIES ? e(i, s) : t()
1448
1596
  };
1449
1597
  this.disposeWithMe(this._autoFillService.addHook(n));
1450
1598
  }
1451
1599
  };
1452
- nt = Bi([
1453
- _n(0, Or),
1454
- _n(1, y(gt))
1455
- ], nt);
1456
- var Fi = Object.getOwnPropertyDescriptor, ji = (t, e, n, i) => {
1457
- for (var r = i > 1 ? void 0 : i ? Fi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1600
+ tt = Ai([
1601
+ fn(0, Tr),
1602
+ fn(1, y(ht))
1603
+ ], tt);
1604
+ var Vi = Object.getOwnPropertyDescriptor, Bi = (t, e, n, i) => {
1605
+ for (var r = i > 1 ? void 0 : i ? Vi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1458
1606
  (o = t[s]) && (r = o(r) || r);
1459
1607
  return r;
1460
- }, Rt = (t, e) => (n, i) => e(n, i, t);
1461
- let rt = class extends Y {
1608
+ }, Et = (t, e) => (n, i) => e(n, i, t);
1609
+ let nt = class extends K {
1462
1610
  constructor(t, e, n) {
1463
1611
  super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController = n, this._commandExecutedListener();
1464
1612
  }
1465
1613
  _commandExecutedListener() {
1466
1614
  this.disposeWithMe(
1467
1615
  this._commandService.beforeCommandExecuted((t) => {
1468
- t.id === jn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1469
- workbookTypes: [Ut],
1470
- rangeTypes: [xt],
1471
- worksheetTypes: [Nt, Ln, Mt]
1616
+ t.id === Fn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1617
+ workbookTypes: [Mt],
1618
+ rangeTypes: [Nt],
1619
+ worksheetTypes: [xt, Pn, Ot]
1472
1620
  }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.hyperLinkErr")));
1473
1621
  })
1474
1622
  );
1475
1623
  }
1476
1624
  };
1477
- rt = ji([
1478
- Rt(0, y(ut)),
1479
- Rt(1, ne),
1480
- Rt(2, y(wn))
1481
- ], rt);
1482
- var Wi = Object.getOwnPropertyDescriptor, Zi = (t, e, n, i) => {
1483
- for (var r = i > 1 ? void 0 : i ? Wi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1625
+ nt = Bi([
1626
+ Et(0, y(ct)),
1627
+ Et(1, te),
1628
+ Et(2, y(Ln))
1629
+ ], nt);
1630
+ var Fi = Object.getOwnPropertyDescriptor, Wi = (t, e, n, i) => {
1631
+ for (var r = i > 1 ? void 0 : i ? Fi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1484
1632
  (o = t[s]) && (r = o(r) || r);
1485
1633
  return r;
1486
1634
  }, W = (t, e) => (n, i) => e(n, i, t);
1487
- let it = class extends Y {
1635
+ let rt = class extends K {
1488
1636
  constructor(t, e, n, i, r, s, o, c, u, p) {
1489
1637
  super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = i, this._sheetPermissionCheckController = r, this._commandService = s, this._editorBridgeService = o, this._textSelectionManagerService = c, this._univerInstanceService = u, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1490
1638
  }
@@ -1497,18 +1645,18 @@ let it = class extends Y {
1497
1645
  copyPermission: !1
1498
1646
  };
1499
1647
  const c = this._sheetPermissionCheckController.permissionCheckWithRanges({
1500
- workbookTypes: [gr],
1501
- worksheetTypes: [hr],
1502
- rangeTypes: [pr]
1648
+ workbookTypes: [hr],
1649
+ worksheetTypes: [pr],
1650
+ rangeTypes: [dr]
1503
1651
  }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]);
1504
1652
  let u = this._sheetPermissionCheckController.permissionCheckWithRanges({
1505
- workbookTypes: [Ut],
1506
- worksheetTypes: [Nt, Mt],
1507
- rangeTypes: [xt]
1653
+ workbookTypes: [Mt],
1654
+ worksheetTypes: [xt, Ot],
1655
+ rangeTypes: [Nt]
1508
1656
  }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]);
1509
1657
  const p = o.getCellRaw(i, r);
1510
1658
  p != null && p.f && p.f.startsWith("=HYPERLINK(") && (u = !1);
1511
- const l = this._permissionService.composePermission([new vr(e).id, new mr(e, n).id]).every((g) => g.value);
1659
+ const l = this._permissionService.composePermission([new gr(e).id, new mr(e, n).id]).every((g) => g.value);
1512
1660
  return {
1513
1661
  viewPermission: c,
1514
1662
  editPermission: u,
@@ -1520,7 +1668,7 @@ let it = class extends Y {
1520
1668
  // hover over not editing cell
1521
1669
  this._hoverManagerService.currentRichText$.pipe(We(200)).subscribe((t) => {
1522
1670
  var T, P, D;
1523
- if (!t || ((T = t.customRange) == null ? void 0 : T.rangeType) !== Oe.HYPERLINK) {
1671
+ if (!t || ((T = t.customRange) == null ? void 0 : T.rangeType) !== Te.HYPERLINK) {
1524
1672
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1525
1673
  return;
1526
1674
  }
@@ -1530,14 +1678,14 @@ let it = class extends Y {
1530
1678
  const o = this._univerInstanceService.getUnit(e, k.UNIVER_SHEET), c = o == null ? void 0 : o.getSheetBySheetId(n);
1531
1679
  if (!c)
1532
1680
  return;
1533
- if (!s.with(Mr).active) {
1534
- this._sheetsHyperLinkPopupService.hideCurrentPopup(v.VIEWING);
1681
+ if (!s.with(Or).active) {
1682
+ this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING);
1535
1683
  return;
1536
1684
  }
1537
- const p = (P = s == null ? void 0 : s.with(ln).getSkeletonParam(n)) == null ? void 0 : P.skeleton, l = r, g = i;
1685
+ const p = (P = s == null ? void 0 : s.with(un).getSkeletonParam(n)) == null ? void 0 : P.skeleton, l = r, g = i;
1538
1686
  let d = g, _ = l;
1539
- p && p.overflowCache.forValue((A, z, re) => {
1540
- Se.contains(re, { startColumn: l, endColumn: l, startRow: g, endRow: g }) && (d = A, _ = z);
1687
+ p && p.overflowCache.forValue(($, Y, ne) => {
1688
+ Ie.contains(ne, { startColumn: l, endColumn: l, startRow: g, endRow: g }) && (d = $, _ = Y);
1541
1689
  });
1542
1690
  const { viewPermission: I, editPermission: f, copyPermission: w } = this._getLinkPermission(t);
1543
1691
  if (!I) {
@@ -1556,7 +1704,7 @@ let it = class extends Y {
1556
1704
  copyPermission: w,
1557
1705
  customRange: t.customRange,
1558
1706
  customRangeRect: t.rect,
1559
- type: v.VIEWING,
1707
+ type: m.VIEWING,
1560
1708
  unitId: e,
1561
1709
  subUnitId: n,
1562
1710
  showAll: !!M
@@ -1567,26 +1715,26 @@ let it = class extends Y {
1567
1715
  _initHoverEditingListener() {
1568
1716
  let t = null;
1569
1717
  this.disposeWithMe(
1570
- this._editorBridgeService.currentEditCellState$.pipe(xe((e) => this._editorBridgeService.visible$.pipe(Ht((n) => ({ visible: n, state: e }))))).subscribe(({ visible: e, state: n }) => {
1571
- if (!n || n.editorUnitId !== Ce)
1718
+ this._editorBridgeService.currentEditCellState$.pipe(Ne((e) => this._editorBridgeService.visible$.pipe(Ut((n) => ({ visible: n, state: e }))))).subscribe(({ visible: e, state: n }) => {
1719
+ if (!n || n.editorUnitId !== _e)
1572
1720
  return;
1573
1721
  if (!e.visible) {
1574
- t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(v.EDITING), this._sheetsHyperLinkPopupService.endEditing(v.EDITING);
1722
+ t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1575
1723
  return;
1576
1724
  }
1577
1725
  const { editorUnitId: i, unitId: r, sheetId: s, row: o, column: c } = n, u = this._renderManagerService.getRenderById(i);
1578
1726
  if (!u)
1579
1727
  return;
1580
- const { editPermission: p, viewPermission: l, copyPermission: g } = this._getLinkPermission({ unitId: r, subUnitId: s, row: o, col: c }), d = u.with(dn);
1728
+ const { editPermission: p, viewPermission: l, copyPermission: g } = this._getLinkPermission({ unitId: r, subUnitId: s, row: o, col: c }), d = u.with(ln);
1581
1729
  l && (t == null || t.unsubscribe(), t = d.hoverCustomRanges$.pipe(We(200)).subscribe((_) => {
1582
1730
  var b, M;
1583
- const I = _.find((T) => T.range.rangeType === Oe.HYPERLINK);
1731
+ const I = _.find((T) => T.range.rangeType === Te.HYPERLINK);
1584
1732
  if (!I) {
1585
1733
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1586
1734
  return;
1587
1735
  }
1588
1736
  const f = I.rects[I.rects.length - 1];
1589
- if (!((M = (b = this._renderManagerService.getRenderById(r)) == null ? void 0 : b.with(ln).getSkeletonParam(s)) == null ? void 0 : M.skeleton) || !f)
1737
+ if (!((M = (b = this._renderManagerService.getRenderById(r)) == null ? void 0 : b.with(un).getSkeletonParam(s)) == null ? void 0 : M.skeleton) || !f)
1590
1738
  return;
1591
1739
  const a = u.engine.getCanvasElement().getBoundingClientRect();
1592
1740
  this._sheetsHyperLinkPopupService.showPopup({
@@ -1603,7 +1751,7 @@ let it = class extends Y {
1603
1751
  },
1604
1752
  editPermission: p,
1605
1753
  copyPermission: g,
1606
- type: v.EDITING
1754
+ type: m.EDITING
1607
1755
  });
1608
1756
  }));
1609
1757
  })
@@ -1614,22 +1762,22 @@ let it = class extends Y {
1614
1762
  _initZenEditor() {
1615
1763
  this.disposeWithMe(
1616
1764
  this._zenZoneService.visible$.subscribe((t) => {
1617
- t ? (this._sheetsHyperLinkPopupService.hideCurrentPopup(v.VIEWING), this._sheetsHyperLinkPopupService.hideCurrentPopup(v.EDITING), this._sheetsHyperLinkPopupService.endEditing(v.EDITING), this._sheetsHyperLinkPopupService.hideCurrentPopup(v.VIEWING)) : (this._sheetsHyperLinkPopupService.hideCurrentPopup(v.ZEN_EDITOR), this._sheetsHyperLinkPopupService.endEditing(v.ZEN_EDITOR));
1765
+ t ? (this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING)) : (this._sheetsHyperLinkPopupService.hideCurrentPopup(m.ZEN_EDITOR), this._sheetsHyperLinkPopupService.endEditing(m.ZEN_EDITOR));
1618
1766
  })
1619
1767
  ), this.disposeWithMe(
1620
1768
  this._univerInstanceService.focused$.pipe(
1621
- xe((t) => {
1769
+ Ne((t) => {
1622
1770
  const e = t === x ? this._renderManagerService.getRenderById(t) : null;
1623
- return e ? e.with(dn).hoverCustomRanges$.pipe(We(200)) : new qr((n) => {
1771
+ return e ? e.with(ln).hoverCustomRanges$.pipe(We(200)) : new Xr((n) => {
1624
1772
  n.next(null);
1625
1773
  });
1626
1774
  })
1627
1775
  ).subscribe((t) => {
1628
- const e = t == null ? void 0 : t.find((i) => i.range.rangeType === Oe.HYPERLINK), n = this._editorBridgeService.getEditCellState();
1776
+ const e = t == null ? void 0 : t.find((i) => i.range.rangeType === Te.HYPERLINK), n = this._editorBridgeService.getEditCellState();
1629
1777
  if (e && n) {
1630
1778
  const { unitId: i, sheetId: r, row: s, column: o } = n, { editPermission: c, viewPermission: u, copyPermission: p } = this._getLinkPermission({ unitId: i, subUnitId: r, row: s, col: o });
1631
1779
  u && this._sheetsHyperLinkPopupService.showPopup({
1632
- type: v.ZEN_EDITOR,
1780
+ type: m.ZEN_EDITOR,
1633
1781
  unitId: i,
1634
1782
  subUnitId: r,
1635
1783
  row: s,
@@ -1639,42 +1787,42 @@ let it = class extends Y {
1639
1787
  copyPermission: p
1640
1788
  });
1641
1789
  } else
1642
- this._sheetsHyperLinkPopupService.hideCurrentPopup(v.ZEN_EDITOR);
1790
+ this._sheetsHyperLinkPopupService.hideCurrentPopup(m.ZEN_EDITOR);
1643
1791
  })
1644
1792
  );
1645
1793
  }
1646
1794
  _initTextSelectionListener() {
1647
1795
  this.disposeWithMe(
1648
1796
  this._textSelectionManagerService.textSelection$.subscribe((t) => {
1649
- t && t.unitId === Ce && this._sheetsHyperLinkPopupService.endEditing(v.EDITING);
1797
+ t && t.unitId === _e && this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1650
1798
  })
1651
1799
  );
1652
1800
  }
1653
1801
  _initCommandListener() {
1654
- const t = [fr.id, _r.id, Ir.id];
1802
+ const t = [vr.id, fr.id, _r.id];
1655
1803
  this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
1656
1804
  t.includes(e.id) && this._sheetsHyperLinkPopupService.hideCurrentPopup();
1657
1805
  }));
1658
1806
  }
1659
1807
  };
1660
- it = Zi([
1661
- W(0, y(Nr)),
1662
- W(1, y(G)),
1663
- W(2, y(He)),
1664
- W(3, y(or)),
1665
- W(4, y(wn)),
1666
- W(5, ne),
1667
- W(6, te),
1668
- W(7, y(Ue)),
1669
- W(8, K),
1670
- W(9, pt)
1671
- ], it);
1672
- var Gi = Object.getOwnPropertyDescriptor, Wn = (t, e, n, i) => {
1673
- for (var r = i > 1 ? void 0 : i ? Gi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1808
+ rt = Wi([
1809
+ W(0, y(xr)),
1810
+ W(1, y(Z)),
1811
+ W(2, y(Ue)),
1812
+ W(3, y(sr)),
1813
+ W(4, y(Ln)),
1814
+ W(5, te),
1815
+ W(6, ee),
1816
+ W(7, y(Me)),
1817
+ W(8, G),
1818
+ W(9, dt)
1819
+ ], rt);
1820
+ var ji = Object.getOwnPropertyDescriptor, Wn = (t, e, n, i) => {
1821
+ for (var r = i > 1 ? void 0 : i ? ji(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1674
1822
  (o = t[s]) && (r = o(r) || r);
1675
1823
  return r;
1676
- }, wt = (t, e) => (n, i) => e(n, i, t);
1677
- let bt = class extends Y {
1824
+ }, Lt = (t, e) => (n, i) => e(n, i, t);
1825
+ let wt = class extends K {
1678
1826
  constructor(t, e) {
1679
1827
  super(), this._context = t, this._hyperLinkModel = e, this._initSkeletonChange();
1680
1828
  }
@@ -1688,19 +1836,19 @@ let bt = class extends Y {
1688
1836
  }));
1689
1837
  }
1690
1838
  };
1691
- bt = Wn([
1692
- wt(1, y(gt))
1693
- ], bt);
1694
- let st = class extends Y {
1839
+ wt = Wn([
1840
+ Lt(1, y(ht))
1841
+ ], wt);
1842
+ let it = class extends K {
1695
1843
  constructor(t, e) {
1696
1844
  super(), this._sheetInterceptorService = t, this._hyperLinkModel = e, this._initViewModelIntercept();
1697
1845
  }
1698
1846
  _initViewModelIntercept() {
1699
1847
  this.disposeWithMe(
1700
1848
  this._sheetInterceptorService.intercept(
1701
- Sr.CELL_CONTENT,
1849
+ Cr.CELL_CONTENT,
1702
1850
  {
1703
- effect: ar.Value,
1851
+ effect: or.Value,
1704
1852
  priority: 100,
1705
1853
  handler: (t, e, n) => {
1706
1854
  const { row: i, col: r, unitId: s, subUnitId: o } = e, c = this._hyperLinkModel.getHyperLinkByLocation(s, o, i, r);
@@ -1711,83 +1859,83 @@ let st = class extends Y {
1711
1859
  );
1712
1860
  }
1713
1861
  };
1714
- st = Wn([
1715
- wt(0, y(Cr)),
1716
- wt(1, y(gt))
1717
- ], st);
1718
- const Ki = {
1862
+ it = Wn([
1863
+ Lt(0, y(Ir)),
1864
+ Lt(1, y(ht))
1865
+ ], it);
1866
+ const Zi = {
1719
1867
  [Wr.MEDIA]: {
1720
- [ce.id]: {
1868
+ [ae.id]: {
1721
1869
  order: 1,
1722
- menuItemFactory: Ai
1870
+ menuItemFactory: Hi
1723
1871
  },
1724
- [et(ce.id)]: {
1872
+ [Qe(ae.id)]: {
1725
1873
  order: 1,
1726
- menuItemFactory: Vi
1874
+ menuItemFactory: Di
1727
1875
  }
1728
1876
  },
1729
- [Fr.MAIN_AREA]: {
1730
- [jr.OTHERS]: {
1877
+ [Br.MAIN_AREA]: {
1878
+ [Fr.OTHERS]: {
1731
1879
  order: 1,
1732
- [ce.id]: {
1880
+ [ae.id]: {
1733
1881
  order: 0,
1734
- menuItemFactory: Hi
1882
+ menuItemFactory: Mi
1735
1883
  },
1736
- [et(ce.id)]: {
1884
+ [Qe(ae.id)]: {
1737
1885
  order: 0,
1738
- menuItemFactory: Di
1886
+ menuItemFactory: Ui
1739
1887
  }
1740
1888
  }
1741
1889
  }
1742
1890
  };
1743
- var Yi = Object.getOwnPropertyDescriptor, zi = (t, e, n, i) => {
1744
- for (var r = i > 1 ? void 0 : i ? Yi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1891
+ var Gi = Object.getOwnPropertyDescriptor, Ki = (t, e, n, i) => {
1892
+ for (var r = i > 1 ? void 0 : i ? Gi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1745
1893
  (o = t[s]) && (r = o(r) || r);
1746
1894
  return r;
1747
- }, be = (t, e) => (n, i) => e(n, i, t);
1748
- let ot = class extends Y {
1895
+ }, we = (t, e) => (n, i) => e(n, i, t);
1896
+ let st = class extends K {
1749
1897
  constructor(t, e, n, i, r) {
1750
1898
  super(), this._componentManager = t, this._commandService = e, this._menuManagerService = n, this._injector = i, this._shortcutService = r, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1751
1899
  }
1752
1900
  _initComponents() {
1753
1901
  [
1754
- [Xe.componentKey, Xe],
1755
1902
  [ze.componentKey, ze],
1756
- ["LinkIcon", At]
1903
+ [Ye.componentKey, Ye],
1904
+ ["LinkIcon", Dt]
1757
1905
  ].forEach(([t, e]) => {
1758
1906
  this._componentManager.register(t, e);
1759
1907
  });
1760
1908
  }
1761
1909
  _initCommands() {
1762
1910
  [
1763
- $t,
1764
- qe,
1765
- Bt,
1766
- ce
1911
+ At,
1912
+ Xe,
1913
+ Vt,
1914
+ ae
1767
1915
  ].forEach((t) => {
1768
1916
  this._commandService.registerCommand(t);
1769
1917
  });
1770
1918
  }
1771
1919
  _initMenus() {
1772
- this._menuManagerService.mergeMenu(Ki);
1920
+ this._menuManagerService.mergeMenu(Zi);
1773
1921
  }
1774
1922
  _initShortCut() {
1775
- this._shortcutService.registerShortcut(jn);
1923
+ this._shortcutService.registerShortcut(Fn);
1776
1924
  }
1777
1925
  };
1778
- ot = zi([
1779
- be(0, y(Zr)),
1780
- be(1, ne),
1781
- be(2, Gr),
1782
- be(3, y(lt)),
1783
- be(4, y(Kr))
1784
- ], ot);
1785
- var Xi = Object.getOwnPropertyDescriptor, qi = (t, e, n, i) => {
1786
- for (var r = i > 1 ? void 0 : i ? Xi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1926
+ st = Ki([
1927
+ we(0, y(jr)),
1928
+ we(1, te),
1929
+ we(2, Zr),
1930
+ we(3, y(ut)),
1931
+ we(4, y(Gr))
1932
+ ], st);
1933
+ var Yi = Object.getOwnPropertyDescriptor, zi = (t, e, n, i) => {
1934
+ for (var r = i > 1 ? void 0 : i ? Yi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1787
1935
  (o = t[s]) && (r = o(r) || r);
1788
1936
  return r;
1789
- }, In = (t, e) => (n, i) => e(n, i, t);
1790
- let at = class extends Y {
1937
+ }, _n = (t, e) => (n, i) => e(n, i, t);
1938
+ let ot = class extends K {
1791
1939
  constructor(t, e) {
1792
1940
  super(), this._parserService = t, this._resolverService = e, this._handleInitUrl();
1793
1941
  }
@@ -1799,61 +1947,61 @@ let at = class extends Y {
1799
1947
  }
1800
1948
  }
1801
1949
  };
1802
- at = qi([
1803
- In(0, y(Dt)),
1804
- In(1, y(ue))
1805
- ], at);
1806
- var Ji = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, es = (t, e, n) => e in t ? Ji(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ts = (t, e, n, i) => {
1807
- for (var r = i > 1 ? void 0 : i ? Qi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1950
+ ot = zi([
1951
+ _n(0, y(Ht)),
1952
+ _n(1, y(ce))
1953
+ ], ot);
1954
+ var Xi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, Ji = (t, e, n) => e in t ? Xi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Qi = (t, e, n, i) => {
1955
+ for (var r = i > 1 ? void 0 : i ? qi(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1808
1956
  (o = t[s]) && (r = o(r) || r);
1809
1957
  return r;
1810
- }, Cn = (t, e) => (n, i) => e(n, i, t), Zn = (t, e, n) => es(t, typeof e != "symbol" ? e + "" : e, n);
1811
- let ct = class extends ur {
1812
- constructor(t = vn, e, n) {
1958
+ }, In = (t, e) => (n, i) => e(n, i, t), jn = (t, e, n) => Ji(t, typeof e != "symbol" ? e + "" : e, n);
1959
+ let at = class extends cr {
1960
+ constructor(t = gn, e, n) {
1813
1961
  super(), this._config = t, this._injector = e, this._configService = n;
1814
- const { menu: i, ...r } = lr(
1962
+ const { menu: i, ...r } = ur(
1815
1963
  {},
1816
- vn,
1964
+ gn,
1817
1965
  this._config
1818
1966
  );
1819
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Un, r);
1967
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Mn, r);
1820
1968
  }
1821
1969
  onStarting() {
1822
1970
  [
1823
- [ue],
1824
- [G],
1825
- [Hn],
1826
- [st],
1971
+ [ce],
1972
+ [Z],
1973
+ [Un],
1827
1974
  [it],
1828
- [ot],
1829
- [nt],
1830
- [Je],
1831
1975
  [rt],
1832
- [at]
1833
- ].forEach((e) => this._injector.add(e)), this._injector.get(st);
1976
+ [st],
1977
+ [tt],
1978
+ [qe],
1979
+ [nt],
1980
+ [ot]
1981
+ ].forEach((e) => this._injector.add(e)), this._injector.get(it);
1834
1982
  }
1835
1983
  onReady() {
1836
- this._injector.get(He).registerRenderModule(k.UNIVER_SHEET, [bt]), this._injector.get(nt), this._injector.get(Je), this._injector.get(ot);
1984
+ this._injector.get(Ue).registerRenderModule(k.UNIVER_SHEET, [wt]), this._injector.get(tt), this._injector.get(qe), this._injector.get(st);
1837
1985
  }
1838
1986
  onRendered() {
1839
- this._injector.get(rt), this._injector.get(at), this._injector.get(it);
1987
+ this._injector.get(nt), this._injector.get(ot), this._injector.get(rt);
1840
1988
  }
1841
1989
  };
1842
- Zn(ct, "pluginName", Ft);
1843
- Zn(ct, "type", k.UNIVER_SHEET);
1844
- ct = ts([
1845
- cr(li, Ar),
1846
- Cn(1, y(lt)),
1847
- Cn(2, Sn)
1848
- ], ct);
1990
+ jn(at, "pluginName", Bt);
1991
+ jn(at, "type", k.UNIVER_SHEET);
1992
+ at = Qi([
1993
+ ar(ui, Dr),
1994
+ In(1, y(ut)),
1995
+ In(2, Cn)
1996
+ ], at);
1849
1997
  export {
1850
- qe as CloseHyperLinkPopupOperation,
1851
- Bt as InsertHyperLinkOperation,
1852
- jn as InsertLinkShortcut,
1853
- $t as OpenHyperLinkEditPanelOperation,
1854
- Je as SheetsHyperLinkCopyPasteController,
1855
- G as SheetsHyperLinkPopupService,
1856
- ue as SheetsHyperLinkResolverService,
1857
- Hn as SheetsHyperLinkSidePanelService,
1858
- ct as UniverSheetsHyperLinkUIPlugin
1998
+ Xe as CloseHyperLinkPopupOperation,
1999
+ Vt as InsertHyperLinkOperation,
2000
+ Fn as InsertLinkShortcut,
2001
+ At as OpenHyperLinkEditPanelOperation,
2002
+ qe as SheetsHyperLinkCopyPasteController,
2003
+ Z as SheetsHyperLinkPopupService,
2004
+ ce as SheetsHyperLinkResolverService,
2005
+ Un as SheetsHyperLinkSidePanelService,
2006
+ at as UniverSheetsHyperLinkUIPlugin
1859
2007
  };