@univerjs/sheets-hyper-link-ui 0.5.0-alpha.0 → 0.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,31 +1,31 @@
1
- var er = Object.defineProperty;
2
- var tr = (t, e, n) => e in t ? er(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var V = (t, e, n) => tr(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { Tools as Ce, Inject as R, LocaleService as it, UniverInstanceType as O, isValidRange as _n, IUniverInstanceService as K, ICommandService as re, IConfigService as Sn, RANGE_TYPE as nn, Rectangle as Ie, Injector as st, Disposable as z, Range as Cn, ObjectMatrix as nr, useDependency as E, IContextService as In, ThemeService as rr, DataStreamTreeTokenType as rn, CustomRangeType as Me, BuildTextUtils as de, ColorKit as ir, DOCS_ZEN_EDITOR_UNIT_ID_KEY as x, DisposableCollection as sr, FOCUSING_SHEET as _t, generateRandomId as or, DataValidationType as St, CommandType as ot, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as yt, FOCUSING_FX_BAR_EDITOR as ar, IPermissionService as cr, InterceptorEffectEnum as lr, DependentOn as ur, Plugin as dr } from "@univerjs/core";
5
- import { SheetHyperLinkType as S, ERROR_RANGE as pr, HyperLinkModel as at, RemoveHyperLinkMutation as xe, AddHyperLinkMutation as Ne, SheetsHyperLinkParserService as wt, UpdateRichHyperLinkCommand as hr, UpdateHyperLinkCommand as gr, AddRichHyperLinkCommand as mr, AddHyperLinkCommand as fr, CancelRichHyperLinkCommand as vr, CancelHyperLinkCommand as _r, UniverSheetsHyperLinkPlugin as Sr } from "@univerjs/sheets-hyper-link";
6
- import { ScrollToRangeOperation as yn, COPY_TYPE as Cr, virtualizeDiscreteRanges as Et, rangeToDiscreteRange as Ir, PREDEFINED_HOOK_NAME as De, getRepeatRange as yr, ISheetClipboardService as Er, IEditorBridgeService as ne, IMarkSelectionService as Rr, SheetCanvasPopManagerService as Pr, getEditingCustomRangePosition as Lr, getCustomRangePosition as br, whenSheetEditorFocused as wr, getCurrentRangeDisable$ as Or, IAutoFillService as kr, APPLY_TYPE as we, getAutoFillRepeatRange as Tr, SheetPermissionInterceptorBaseController as En, HoverManagerService as xr, HoverRenderController as Nr, SheetSkeletonManagerService as sn } from "@univerjs/sheets-ui";
7
- import { MessageType as ke, FormLayout as _e, Input as on, Select as Ct, Button as an, Tooltip as $e } from "@univerjs/design";
8
- import { deserializeRangeWithSheet as Ve, IDefinedNamesService as Rn, serializeRangeWithSheet as Mr, serializeRangeToRefString as Ur, serializeRange as Hr } from "@univerjs/engine-formula";
9
- import { SetSelectionsOperation as Pn, SetWorksheetActiveOperation as Ln, SheetsSelectionsService as Ot, getSheetCommandTarget as bn, WorkbookEditablePermission as kt, WorksheetEditPermission as Tt, WorksheetSetCellValuePermission as wn, WorksheetInsertHyperlinkPermission as xt, RangeProtectionPermissionEditPoint as Nt, WorkbookViewPermission as Dr, WorksheetViewPermission as $r, RangeProtectionPermissionViewPoint as jr, WorkbookCopyPermission as Vr, WorksheetCopyPermission as Br, ClearSelectionContentCommand as Ar, ClearSelectionAllCommand as Fr, ClearSelectionFormatCommand as Wr, SheetInterceptorService as Zr, INTERCEPTOR_POINT as Gr } from "@univerjs/sheets";
10
- import { IMessageService as On, useObservable as Kr, IZenZoneService as ct, useEvent as zr, KeyCode as Rt, MenuItemType as kn, MenuPosition as Tn, MenuGroup as Yr, MetaKeys as Xr, getMenuHiddenObservable as lt, RibbonStartGroup as qr, ContextMenuPosition as Jr, ContextMenuGroup as Qr, ComponentManager as ei, IShortcutService as ti, IMenuManagerService as ni } from "@univerjs/ui";
11
- import { DocSelectionRenderService as xn, DocBackScrollRenderController as ri, DocCanvasPopManagerService as ii, DocEventManagerService as cn, UniverDocsUIPlugin as si } from "@univerjs/docs-ui";
12
- import { IRenderManagerService as ut } from "@univerjs/engine-render";
13
- import { Subject as oi, BehaviorSubject as ai, of as Te, map as le, filter as ln, switchMap as ue, combineLatest as ci, distinctUntilChanged as li, debounceTime as Be, Observable as ui } from "rxjs";
14
- import { DocSelectionManagerService as Ue } from "@univerjs/docs";
15
- import di, { useState as X, useMemo as un, useRef as Pt, useCallback as pi, useEffect as te, forwardRef as ge, createElement as me } from "react";
16
- import { RangeSelector as hi } from "@univerjs/sheets-formula-ui";
17
- function Fe(t) {
18
- return Ce.isLegalUrl(t);
1
+ var Qn = Object.defineProperty;
2
+ var er = (t, e, n) => e in t ? Qn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var V = (t, e, n) => er(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { Tools as Ie, Inject as R, LocaleService as ot, UniverInstanceType as k, isValidRange as _n, IUniverInstanceService as K, ICommandService as re, IConfigService as Sn, RANGE_TYPE as nn, Rectangle as ye, Injector as at, Disposable as z, Range as In, ObjectMatrix as tr, useDependency as E, IContextService as Cn, ThemeService as nr, DataStreamTreeTokenType as rn, CustomRangeType as Ue, BuildTextUtils as de, ColorKit as rr, DOCS_ZEN_EDITOR_UNIT_ID_KEY as x, DisposableCollection as ir, FOCUSING_SHEET as St, generateRandomId as sr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ce, DataValidationType as It, CommandType as ct, FOCUSING_FX_BAR_EDITOR as or, IPermissionService as ar, InterceptorEffectEnum as cr, DependentOn as lr, Plugin as ur } from "@univerjs/core";
5
+ import { SheetHyperLinkType as S, ERROR_RANGE as dr, HyperLinkModel as lt, RemoveHyperLinkMutation as Ne, AddHyperLinkMutation as Me, SheetsHyperLinkParserService as wt, UpdateRichHyperLinkCommand as pr, UpdateHyperLinkCommand as hr, AddRichHyperLinkCommand as gr, AddHyperLinkCommand as mr, CancelRichHyperLinkCommand as fr, CancelHyperLinkCommand as vr, UniverSheetsHyperLinkPlugin as _r } from "@univerjs/sheets-hyper-link";
6
+ import { ScrollToRangeOperation as yn, COPY_TYPE as Sr, virtualizeDiscreteRanges as Et, rangeToDiscreteRange as Ir, PREDEFINED_HOOK_NAME as je, getRepeatRange as Cr, ISheetClipboardService as yr, IEditorBridgeService as ne, IMarkSelectionService as Er, SheetCanvasPopManagerService as Rr, getEditingCustomRangePosition as Pr, getCustomRangePosition as Lr, whenSheetEditorFocused as br, getCurrentRangeDisable$ as wr, IAutoFillService as kr, APPLY_TYPE as ke, getAutoFillRepeatRange as Or, SheetPermissionInterceptorBaseController as En, HoverManagerService as Tr, HoverRenderController as xr, SheetSkeletonManagerService as sn } from "@univerjs/sheets-ui";
7
+ import { MessageType as Te, FormLayout as _e, Input as on, Select as Ct, Button as an, Tooltip as Ve } from "@univerjs/design";
8
+ import { deserializeRangeWithSheet as Ae, IDefinedNamesService as Rn, serializeRangeWithSheet as Nr, serializeRangeToRefString as Mr, serializeRange as Ur } from "@univerjs/engine-formula";
9
+ import { SetSelectionsOperation as Pn, SetWorksheetActiveOperation as Ln, SheetsSelectionsService as kt, getSheetCommandTarget as bn, WorkbookEditablePermission as Ot, WorksheetEditPermission as Tt, WorksheetSetCellValuePermission as wn, WorksheetInsertHyperlinkPermission as xt, RangeProtectionPermissionEditPoint as Nt, WorkbookViewPermission as Hr, WorksheetViewPermission as Dr, RangeProtectionPermissionViewPoint as $r, WorkbookCopyPermission as jr, WorksheetCopyPermission as Vr, ClearSelectionContentCommand as Br, ClearSelectionAllCommand as Ar, ClearSelectionFormatCommand as Fr, SheetInterceptorService as Wr, INTERCEPTOR_POINT as Zr } from "@univerjs/sheets";
10
+ import { IMessageService as kn, useObservable as Gr, IZenZoneService as ut, useEvent as Kr, KeyCode as Rt, MenuItemType as On, MetaKeys as zr, getMenuHiddenObservable as dt, RibbonStartGroup as Yr, ContextMenuPosition as Xr, ContextMenuGroup as qr, ComponentManager as Jr, IShortcutService as Qr, IMenuManagerService as ei } from "@univerjs/ui";
11
+ import { DocSelectionRenderService as Tn, DocBackScrollRenderController as ti, DocCanvasPopManagerService as ni, calcDocRangePositions as ri, DocEventManagerService as cn, UniverDocsUIPlugin as ii } from "@univerjs/docs-ui";
12
+ import { IRenderManagerService as De } from "@univerjs/engine-render";
13
+ import { Subject as si, BehaviorSubject as oi, of as xe, map as le, filter as ln, switchMap as ue, combineLatest as ai, distinctUntilChanged as ci, debounceTime as Fe, Observable as li } from "rxjs";
14
+ import { DocSelectionManagerService as He } from "@univerjs/docs";
15
+ import ui, { useState as X, useMemo as un, useRef as Pt, useCallback as di, useEffect as te, forwardRef as ge, createElement as me } from "react";
16
+ import { RangeSelector as pi } from "@univerjs/sheets-formula-ui";
17
+ function Ze(t) {
18
+ return Ie.isLegalUrl(t);
19
19
  }
20
- function gi(t) {
20
+ function hi(t) {
21
21
  return /^[a-zA-Z]+:\/\//.test(t);
22
22
  }
23
- function mi(t) {
23
+ function gi(t) {
24
24
  return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
25
25
  }
26
- function fi(t) {
27
- if (Fe(t)) {
28
- const e = gi(t) ? t : mi(t) ? `mailto://${t}` : `http://${t}`;
26
+ function mi(t) {
27
+ if (Ze(t)) {
28
+ const e = hi(t) ? t : gi(t) ? `mailto://${t}` : `http://${t}`;
29
29
  let n;
30
30
  try {
31
31
  n = new URL(e);
@@ -36,11 +36,11 @@ function fi(t) {
36
36
  }
37
37
  return t;
38
38
  }
39
- const Nn = "sheets-hyper-link-ui.config", vi = {};
40
- var _i = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, Ci = (t, e, n, r) => {
41
- for (var i = r > 1 ? void 0 : r ? Si(e, n) : e, o = t.length - 1, s; o >= 0; o--)
39
+ const xn = "sheets-hyper-link-ui.config", fi = {};
40
+ var vi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, Si = (t, e, n, r) => {
41
+ for (var i = r > 1 ? void 0 : r ? _i(e, n) : e, o = t.length - 1, s; o >= 0; o--)
42
42
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
43
- return r && i && _i(e, n, i), i;
43
+ return r && i && vi(e, n, i), i;
44
44
  }, Se = (t, e) => (n, r) => e(n, r, t);
45
45
  function Ii(t, e) {
46
46
  const n = e.getMergeData(), r = e.getMaxColumns() - 1, i = e.getMaxRows() - 1;
@@ -48,8 +48,8 @@ function Ii(t, e) {
48
48
  return t;
49
49
  const o = [];
50
50
  return n.forEach((s) => {
51
- Ie.intersects(t, s) && o.push(s);
52
- }), Ie.realUnion(t, ...o);
51
+ ye.intersects(t, s) && o.push(s);
52
+ }), ye.realUnion(t, ...o);
53
53
  }
54
54
  let he = class {
55
55
  constructor(t, e, n, r, i, o) {
@@ -65,7 +65,7 @@ let he = class {
65
65
  }
66
66
  }
67
67
  _navigateToUniver(t) {
68
- const { gid: e, range: n, rangeid: r } = t, i = this._univerInstanceService.getCurrentUnitForType(O.UNIVER_SHEET);
68
+ const { gid: e, range: n, rangeid: r } = t, i = this._univerInstanceService.getCurrentUnitForType(k.UNIVER_SHEET);
69
69
  if (!i)
70
70
  return;
71
71
  const o = i.getUnitId();
@@ -77,14 +77,14 @@ let he = class {
77
77
  if (!u) {
78
78
  this._messageService.show({
79
79
  content: this._localeService.t("hyperLink.message.refError"),
80
- type: ke.Error
80
+ type: Te.Error
81
81
  });
82
82
  return;
83
83
  }
84
84
  if (u.isSheetHidden()) {
85
85
  this._messageService.show({
86
86
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
87
- type: ke.Error
87
+ type: Te.Error
88
88
  });
89
89
  return;
90
90
  }
@@ -92,8 +92,8 @@ let he = class {
92
92
  }
93
93
  if (e) {
94
94
  if (n) {
95
- const s = Ve(n);
96
- _n(s.range) && n !== pr && this.navigateToRange(o, e, s.range);
95
+ const s = Ae(n);
96
+ _n(s.range) && n !== dr && this.navigateToRange(o, e, s.range);
97
97
  return;
98
98
  }
99
99
  this.navigateToSheetById(o, e);
@@ -119,7 +119,7 @@ let he = class {
119
119
  }
120
120
  }
121
121
  async navigateToSheetById(t, e) {
122
- const n = this._univerInstanceService.getUnit(t, O.UNIVER_SHEET);
122
+ const n = this._univerInstanceService.getUnit(t, k.UNIVER_SHEET);
123
123
  if (!n)
124
124
  return !1;
125
125
  const r = n.getActiveSheet();
@@ -130,10 +130,10 @@ let he = class {
130
130
  const i = n.getSheetBySheetId(e);
131
131
  return i ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
132
132
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
133
- type: ke.Error
133
+ type: Te.Error
134
134
  }), !1) : await this._commandService.executeCommand(Ln.id, { unitId: t, subUnitId: e }) ? i : !1 : (this._messageService.show({
135
135
  content: this._localeService.t("hyperLink.message.noSheet"),
136
- type: ke.Error
136
+ type: Te.Error
137
137
  }), !1);
138
138
  }
139
139
  async navigateToDefineName(t, e) {
@@ -141,27 +141,27 @@ let he = class {
141
141
  }
142
142
  async navigateToOtherWebsite(t) {
143
143
  var n;
144
- const e = this._configService.getConfig(Nn);
144
+ const e = this._configService.getConfig(xn);
145
145
  if ((n = e == null ? void 0 : e.urlHandler) != null && n.navigateToOtherWebsite)
146
146
  return e.urlHandler.navigateToOtherWebsite(t);
147
147
  window.open(t, "_blank", "noopener noreferrer");
148
148
  }
149
149
  };
150
- he = Ci([
150
+ he = Si([
151
151
  Se(0, K),
152
152
  Se(1, re),
153
153
  Se(2, Rn),
154
- Se(3, On),
155
- Se(4, R(it)),
154
+ Se(3, kn),
155
+ Se(4, R(ot)),
156
156
  Se(5, Sn)
157
157
  ], he);
158
158
  const Mt = "SHEET_HYPER_LINK_UI_PLUGIN";
159
- var yi = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, Ri = (t, e, n, r) => {
160
- for (var i = r > 1 ? void 0 : r ? Ei(e, n) : e, o = t.length - 1, s; o >= 0; o--)
159
+ var Ci = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Ei = (t, e, n, r) => {
160
+ for (var i = r > 1 ? void 0 : r ? yi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
161
161
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
162
- return r && i && yi(e, n, i), i;
163
- }, je = (t, e) => (n, r) => e(n, r, t);
164
- let We = class extends z {
162
+ return r && i && Ci(e, n, i), i;
163
+ }, Be = (t, e) => (n, r) => e(n, r, t);
164
+ let Ge = class extends z {
165
165
  constructor(e, n, r, i) {
166
166
  super();
167
167
  V(this, "_plainTextFilter", /* @__PURE__ */ new Set());
@@ -185,31 +185,31 @@ let We = class extends z {
185
185
  id: Mt,
186
186
  onBeforeCopy: (e, n, r) => this._collect(e, n, r),
187
187
  onPasteCells: (e, n, r, i) => {
188
- const { copyType: o = Cr.COPY, pasteType: s } = i, { range: c } = e || {}, { range: u, unitId: d, subUnitId: l } = n;
189
- return this._generateMutations(u, { copyType: o, pasteType: s, copyRange: c, unitId: d, subUnitId: l });
188
+ const { copyType: o = Sr.COPY, pasteType: s } = i, { range: c } = e || {}, { range: u, unitId: p, subUnitId: l } = n;
189
+ return this._generateMutations(u, { copyType: o, pasteType: s, copyRange: c, unitId: p, subUnitId: l });
190
190
  },
191
191
  onPastePlainText: (e, n) => {
192
192
  const r = this._filterPlainText(n);
193
- if (Fe(n) && r) {
194
- const { range: i, unitId: o, subUnitId: s } = e, { ranges: [c], mapFunc: u } = Et([i]), d = [], l = [];
195
- return Cn.foreach(c, (g, p) => {
196
- const { row: v, col: C } = u(g, p), _ = this._hyperLinkModel.getHyperLinkByLocation(o, s, v, C);
197
- _ && d.push({
198
- id: xe.id,
193
+ if (Ze(n) && r) {
194
+ const { range: i, unitId: o, subUnitId: s } = e, { ranges: [c], mapFunc: u } = Et([i]), p = [], l = [];
195
+ return In.foreach(c, (h, d) => {
196
+ const { row: v, col: I } = u(h, d), _ = this._hyperLinkModel.getHyperLinkByLocation(o, s, v, I);
197
+ _ && p.push({
198
+ id: Ne.id,
199
199
  params: {
200
200
  unitId: o,
201
201
  subUnitId: s,
202
202
  id: _.id
203
203
  }
204
204
  }), _ && l.push({
205
- id: Ne.id,
205
+ id: Me.id,
206
206
  params: {
207
207
  unitId: o,
208
208
  subUnitId: s,
209
209
  link: _
210
210
  }
211
211
  });
212
- }), { redos: d, undos: l };
212
+ }), { redos: p, undos: l };
213
213
  }
214
214
  return { undos: [], redos: [] };
215
215
  },
@@ -217,7 +217,7 @@ let We = class extends z {
217
217
  });
218
218
  }
219
219
  _collect(e, n, r) {
220
- const i = new nr();
220
+ const i = new tr();
221
221
  this._copyInfo = {
222
222
  unitId: e,
223
223
  subUnitId: n,
@@ -227,11 +227,11 @@ let We = class extends z {
227
227
  if (!o)
228
228
  return;
229
229
  const { rows: s, cols: c } = o;
230
- s.forEach((u, d) => {
231
- c.forEach((l, g) => {
230
+ s.forEach((u, p) => {
231
+ c.forEach((l, h) => {
232
232
  var v;
233
- const p = this._hyperLinkModel.getHyperLinkByLocation(e, n, u, l);
234
- i.setValue(d, g, (v = p == null ? void 0 : p.id) != null ? v : "");
233
+ const d = this._hyperLinkModel.getHyperLinkByLocation(e, n, u, l);
234
+ i.setValue(p, h, (v = d == null ? void 0 : d.id) != null ? v : "");
235
235
  });
236
236
  });
237
237
  }
@@ -242,55 +242,55 @@ let We = class extends z {
242
242
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
243
243
  return { redos: [], undos: [] };
244
244
  if ([
245
- De.SPECIAL_PASTE_COL_WIDTH,
246
- De.SPECIAL_PASTE_VALUE,
247
- De.SPECIAL_PASTE_FORMAT,
248
- De.SPECIAL_PASTE_FORMULA
245
+ je.SPECIAL_PASTE_COL_WIDTH,
246
+ je.SPECIAL_PASTE_VALUE,
247
+ je.SPECIAL_PASTE_FORMAT,
248
+ je.SPECIAL_PASTE_FORMULA
249
249
  ].includes(
250
250
  n.pasteType
251
251
  ))
252
252
  return { redos: [], undos: [] };
253
- const { unitId: r, subUnitId: i } = this._copyInfo, o = [], s = [], { ranges: [c, u], mapFunc: d } = Et([n.copyRange, e]);
254
- return yr(c, u, !0).forEach(({ startRange: g }) => {
255
- var p;
256
- (p = this._copyInfo) == null || p.matrix.forValue((v, C, _) => {
257
- const b = Ie.getPositionRange(
253
+ const { unitId: r, subUnitId: i } = this._copyInfo, o = [], s = [], { ranges: [c, u], mapFunc: p } = Et([n.copyRange, e]);
254
+ return Cr(c, u, !0).forEach(({ startRange: h }) => {
255
+ var d;
256
+ (d = this._copyInfo) == null || d.matrix.forValue((v, I, _) => {
257
+ const b = ye.getPositionRange(
258
258
  {
259
259
  startRow: v,
260
260
  endRow: v,
261
- startColumn: C,
262
- endColumn: C
261
+ startColumn: I,
262
+ endColumn: I
263
263
  },
264
- g
265
- ), a = this._hyperLinkModel.getHyperLink(r, i, _), { row: w, col: M } = d(b.startRow, b.startColumn), P = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, w, M), k = Ce.generateRandomId();
264
+ h
265
+ ), a = this._hyperLinkModel.getHyperLink(r, i, _), { row: w, col: M } = p(b.startRow, b.startColumn), P = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, w, M), O = Ie.generateRandomId();
266
266
  P && o.push({
267
- id: xe.id,
267
+ id: Ne.id,
268
268
  params: {
269
269
  unitId: n.unitId,
270
270
  subUnitId: n.subUnitId,
271
271
  id: P.id
272
272
  }
273
273
  }), a && (o.push({
274
- id: Ne.id,
274
+ id: Me.id,
275
275
  params: {
276
276
  unitId: n.unitId,
277
277
  subUnitId: n.subUnitId,
278
278
  link: {
279
279
  ...a,
280
- id: k,
280
+ id: O,
281
281
  row: w,
282
282
  column: M
283
283
  }
284
284
  }
285
285
  }), s.push({
286
- id: xe.id,
286
+ id: Ne.id,
287
287
  params: {
288
288
  unitId: n.unitId,
289
289
  subUnitId: n.subUnitId,
290
- id: k
290
+ id: O
291
291
  }
292
292
  })), P && s.push({
293
- id: Ne.id,
293
+ id: Me.id,
294
294
  params: {
295
295
  unitId: n.unitId,
296
296
  subUnitId: n.subUnitId,
@@ -301,13 +301,13 @@ let We = class extends z {
301
301
  }), { redos: o, undos: s };
302
302
  }
303
303
  };
304
- We = Ri([
305
- je(0, Er),
306
- je(1, R(at)),
307
- je(2, R(st)),
308
- je(3, R(he))
309
- ], We);
310
- var f = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(f || {}), Mn = { exports: {} }, dt = {};
304
+ Ge = Ei([
305
+ Be(0, yr),
306
+ Be(1, R(lt)),
307
+ Be(2, R(at)),
308
+ Be(3, R(he))
309
+ ], Ge);
310
+ var f = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(f || {}), Nn = { exports: {} }, pt = {};
311
311
  /**
312
312
  * @license React
313
313
  * react-jsx-runtime.production.min.js
@@ -317,20 +317,20 @@ var f = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t
317
317
  * This source code is licensed under the MIT license found in the
318
318
  * LICENSE file in the root directory of this source tree.
319
319
  */
320
- var Pi = di, Li = Symbol.for("react.element"), bi = Symbol.for("react.fragment"), wi = Object.prototype.hasOwnProperty, Oi = Pi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, ki = { key: !0, ref: !0, __self: !0, __source: !0 };
321
- function Un(t, e, n) {
320
+ var Ri = ui, Pi = Symbol.for("react.element"), Li = Symbol.for("react.fragment"), bi = Object.prototype.hasOwnProperty, wi = Ri.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, ki = { key: !0, ref: !0, __self: !0, __source: !0 };
321
+ function Mn(t, e, n) {
322
322
  var r, i = {}, o = null, s = null;
323
323
  n !== void 0 && (o = "" + n), e.key !== void 0 && (o = "" + e.key), e.ref !== void 0 && (s = e.ref);
324
- for (r in e) wi.call(e, r) && !ki.hasOwnProperty(r) && (i[r] = e[r]);
324
+ for (r in e) bi.call(e, r) && !ki.hasOwnProperty(r) && (i[r] = e[r]);
325
325
  if (t && t.defaultProps) for (r in e = t.defaultProps, e) i[r] === void 0 && (i[r] = e[r]);
326
- return { $$typeof: Li, type: t, key: o, ref: s, props: i, _owner: Oi.current };
326
+ return { $$typeof: Pi, type: t, key: o, ref: s, props: i, _owner: wi.current };
327
327
  }
328
- dt.Fragment = bi;
329
- dt.jsx = Un;
330
- dt.jsxs = Un;
331
- Mn.exports = dt;
332
- var m = Mn.exports;
333
- class Hn extends z {
328
+ pt.Fragment = Li;
329
+ pt.jsx = Mn;
330
+ pt.jsxs = Mn;
331
+ Nn.exports = pt;
332
+ var m = Nn.exports;
333
+ class Un extends z {
334
334
  constructor() {
335
335
  super(...arguments);
336
336
  V(this, "_customHyperLinks", /* @__PURE__ */ new Map());
@@ -358,93 +358,93 @@ class Hn extends z {
358
358
  super.dispose(), this._customHyperLinks.clear();
359
359
  }
360
360
  }
361
- const Ti = "univer-cell-link-edit", xi = "univer-cell-link-edit-buttons", dn = {
362
- cellLinkEdit: Ti,
363
- cellLinkEditButtons: xi
364
- }, Ze = () => {
361
+ const Oi = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", dn = {
362
+ cellLinkEdit: Oi,
363
+ cellLinkEditButtons: Ti
364
+ }, Ke = () => {
365
365
  var Bt;
366
- const [t, e] = X(""), [n, r] = X(!1), [i, o] = X(""), [s, c] = X(!0), [u, d] = X(S.URL), [l, g] = X(""), p = E(it), v = E(Rn), C = E(ne), _ = E(K), b = E(G), a = Kr(b.currentEditing$), w = E(wt), M = E(he), P = E(re), k = E(Hn), q = un(() => k.getOptions(), [k]), D = E(ct), ie = E(ut), ye = E(Rr), He = E(Ue), se = E(In), Ee = E(rr), Re = E(Ue), Pe = Pt({}), oe = un(() => {
367
- if (!k.isBuiltInLinkType(u))
368
- return k.getCustomHyperLink(u);
369
- }, [k, u]), [j, zn] = X(!1), [Le, pt] = X(!1), H = Pt(!1), B = _.getCurrentUnitForType(O.UNIVER_SHEET), Yn = (B == null ? void 0 : B.getActiveSheet().getSheetId()) || "", J = pi((h) => {
370
- o(h.replaceAll(rn.CUSTOM_RANGE_START, "").replaceAll(rn.CUSTOM_RANGE_END, ""));
366
+ const [t, e] = X(""), [n, r] = X(!1), [i, o] = X(""), [s, c] = X(!0), [u, p] = X(S.URL), [l, h] = X(""), d = E(ot), v = E(Rn), I = E(ne), _ = E(K), b = E(G), a = Gr(b.currentEditing$), w = E(wt), M = E(he), P = E(re), O = E(Un), q = un(() => O.getOptions(), [O]), D = E(ut), ie = E(De), Ee = E(Er), $e = E(He), se = E(Cn), Re = E(nr), Pe = E(He), Le = Pt({}), oe = un(() => {
367
+ if (!O.isBuiltInLinkType(u))
368
+ return O.getCustomHyperLink(u);
369
+ }, [O, u]), [j, Kn] = X(!1), [be, ht] = X(!1), H = Pt(!1), B = _.getCurrentUnitForType(k.UNIVER_SHEET), zn = (B == null ? void 0 : B.getActiveSheet().getSheetId()) || "", J = di((g) => {
370
+ o(g.replaceAll(rn.CUSTOM_RANGE_START, "").replaceAll(rn.CUSTOM_RANGE_END, ""));
371
371
  }, [o]);
372
372
  te(() => {
373
- var h, y, I, L, N, A, At, Ft, Wt, Zt, Gt, Kt, zt, Yt, Xt, qt, Jt;
373
+ var g, y, C, L, N, A, At, Ft, Wt, Zt, Gt, Kt, zt, Yt, Xt, qt, Jt;
374
374
  if ((a == null ? void 0 : a.row) !== void 0 && a.col !== void 0) {
375
- const { customRange: ae, row: ft, col: vt } = a;
375
+ const { customRange: ae, row: vt, col: _t } = a;
376
376
  let { label: Y } = a;
377
377
  typeof Y == "number" && (Y = `${Y}`);
378
378
  let F;
379
379
  if (ae)
380
380
  F = {
381
- id: (h = ae == null ? void 0 : ae.rangeId) != null ? h : "",
381
+ id: (g = ae == null ? void 0 : ae.rangeId) != null ? g : "",
382
382
  display: Y != null ? Y : "",
383
- payload: (I = (y = ae == null ? void 0 : ae.properties) == null ? void 0 : y.url) != null ? I : "",
384
- row: ft,
385
- column: vt
383
+ payload: (C = (y = ae == null ? void 0 : ae.properties) == null ? void 0 : y.url) != null ? C : "",
384
+ row: vt,
385
+ column: _t
386
386
  };
387
387
  else if (a.type === f.VIEWING) {
388
388
  const T = _.getUnit(a.unitId), ee = T == null ? void 0 : T.getSheetBySheetId(a.subUnitId), U = ee == null ? void 0 : ee.getCellRaw(a.row, a.col), ve = (A = (N = (L = U == null ? void 0 : U.p) == null ? void 0 : L.body) == null ? void 0 : N.customRanges) == null ? void 0 : A.find((en) => {
389
389
  var tn;
390
- return en.rangeType === Me.HYPERLINK && ((tn = en.properties) == null ? void 0 : tn.url);
391
- }), be = U == null ? void 0 : U.v;
392
- U && (!de.transform.isEmptyDocument((Ft = (At = U.p) == null ? void 0 : At.body) == null ? void 0 : Ft.dataStream) || Ce.isDefine(be)) && c(!1), F = {
390
+ return en.rangeType === Ue.HYPERLINK && ((tn = en.properties) == null ? void 0 : tn.url);
391
+ }), we = U == null ? void 0 : U.v;
392
+ U && (!de.transform.isEmptyDocument((Ft = (At = U.p) == null ? void 0 : At.body) == null ? void 0 : Ft.dataStream) || Ie.isDefine(we)) && c(!1), F = {
393
393
  id: "",
394
394
  display: "",
395
395
  payload: (Zt = (Wt = ve == null ? void 0 : ve.properties) == null ? void 0 : Wt.url) != null ? Zt : "",
396
- row: ft,
397
- column: vt
396
+ row: vt,
397
+ column: _t
398
398
  };
399
399
  } else {
400
- const T = _.getCurrentUnitForType(O.UNIVER_DOC), ee = He.getActiveTextRange(), U = T == null ? void 0 : T.getBody(), ve = ee && U ? ee : null, be = ve && ((Kt = de.customRange.getCustomRangesInterestsWithSelection(ve, (Gt = U == null ? void 0 : U.customRanges) != null ? Gt : [])) == null ? void 0 : Kt[0]);
400
+ const T = _.getCurrentUnitForType(k.UNIVER_DOC), ee = $e.getActiveTextRange(), U = T == null ? void 0 : T.getBody(), ve = ee && U ? ee : null, we = ve && ((Kt = de.customRange.getCustomRangesInterestsWithSelection(ve, (Gt = U == null ? void 0 : U.customRanges) != null ? Gt : [])) == null ? void 0 : Kt[0]);
401
401
  c(!1), F = {
402
402
  id: "",
403
403
  display: Y != null ? Y : "",
404
- payload: (Yt = (zt = be == null ? void 0 : be.properties) == null ? void 0 : zt.url) != null ? Yt : "",
405
- row: ft,
406
- column: vt
404
+ payload: (Yt = (zt = we == null ? void 0 : we.properties) == null ? void 0 : zt.url) != null ? Yt : "",
405
+ row: vt,
406
+ column: _t
407
407
  };
408
408
  }
409
409
  e(F.id);
410
- const Qt = k.findCustomHyperLink(F);
410
+ const Qt = O.findCustomHyperLink(F);
411
411
  if (Qt) {
412
412
  const T = Qt.convert(F);
413
- d(T.type), g(T.payload), J(T.display);
413
+ p(T.type), h(T.payload), J(T.display);
414
414
  return;
415
415
  }
416
416
  J(F.display);
417
417
  const Q = w.parseHyperLink(F.payload);
418
- switch (d(Q.type === S.INVALID ? S.RANGE : Q.type), Q.type) {
418
+ switch (p(Q.type === S.INVALID ? S.RANGE : Q.type), Q.type) {
419
419
  case S.URL: {
420
- g(Q.url), Q.url === F.display && (H.current = !0);
420
+ h(Q.url), Q.url === F.display && (H.current = !0);
421
421
  break;
422
422
  }
423
423
  case S.RANGE: {
424
- const T = Q.searchObj, ee = T.gid && (Jt = (qt = (Xt = _.getUnit(a.unitId)) == null ? void 0 : Xt.getSheetBySheetId(T.gid)) == null ? void 0 : qt.getName()) != null ? Jt : "", U = Mr(ee, Ve(T.range).range);
425
- g(U), U === F.display && (H.current = !0);
424
+ const T = Q.searchObj, ee = T.gid && (Jt = (qt = (Xt = _.getUnit(a.unitId)) == null ? void 0 : Xt.getSheetBySheetId(T.gid)) == null ? void 0 : qt.getName()) != null ? Jt : "", U = Nr(ee, Ae(T.range).range);
425
+ h(U), U === F.display && (H.current = !0);
426
426
  break;
427
427
  }
428
428
  case S.SHEET: {
429
429
  const T = Q.searchObj;
430
- g(T.gid);
430
+ h(T.gid);
431
431
  break;
432
432
  }
433
433
  case S.DEFINE_NAME: {
434
434
  const T = Q.searchObj;
435
- g(T.rangeid);
435
+ h(T.rangeid);
436
436
  break;
437
437
  }
438
438
  default:
439
- g("");
439
+ h("");
440
440
  break;
441
441
  }
442
442
  }
443
- }, [a, M, k, He, _]), te(() => {
444
- let h = null;
445
- if (a && !a.customRangeId && a.type === f.VIEWING && Ce.isDefine(a.row) && Ce.isDefine(a.col)) {
446
- const y = _.getUnit(a.unitId, O.UNIVER_SHEET), I = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), L = I == null ? void 0 : I.getMergedCell(a.row, a.col), N = new ir(Ee.getCurrentTheme().hyacinth500).toRgb();
447
- h = ye.addShape(
443
+ }, [a, M, O, $e, _]), te(() => {
444
+ let g = null;
445
+ if (a && !a.customRangeId && a.type === f.VIEWING && Ie.isDefine(a.row) && Ie.isDefine(a.col)) {
446
+ const y = _.getUnit(a.unitId, k.UNIVER_SHEET), C = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), L = C == null ? void 0 : C.getMergedCell(a.row, a.col), N = new rr(Re.getCurrentTheme().hyacinth500).toRgb();
447
+ g = Ee.addShape(
448
448
  {
449
449
  range: L != null ? L : {
450
450
  startColumn: a.col,
@@ -453,7 +453,7 @@ const Ti = "univer-cell-link-edit", xi = "univer-cell-link-edit-buttons", dn = {
453
453
  endRow: a.row
454
454
  },
455
455
  style: {
456
- hasAutoFill: !1,
456
+ // hasAutoFill: false,
457
457
  fill: `rgb(${N.r}, ${N.g}, ${N.b}, 0.12)`,
458
458
  strokeWidth: 1,
459
459
  stroke: "#FFBD37",
@@ -466,81 +466,81 @@ const Ti = "univer-cell-link-edit", xi = "univer-cell-link-edit-buttons", dn = {
466
466
  );
467
467
  }
468
468
  return () => {
469
- h && ye.removeShape(h);
469
+ g && Ee.removeShape(g);
470
470
  };
471
- }, [a, ye, Ee, _]), te(() => {
472
- pt(u === S.RANGE);
471
+ }, [a, Ee, Re, _]), te(() => {
472
+ ht(u === S.RANGE);
473
473
  }, [u]), te(() => {
474
- const h = (a == null ? void 0 : a.type) === f.ZEN_EDITOR ? ie.getRenderById(x) : ie.getRenderById(C.getCurrentEditorId()), y = new sr();
475
- if (h) {
476
- const I = h.with(xn);
477
- I.setReserveRangesStatus(!0), y.add(() => {
478
- I.setReserveRangesStatus(!1);
474
+ const g = (a == null ? void 0 : a.type) === f.ZEN_EDITOR ? ie.getRenderById(x) : ie.getRenderById(I.getCurrentEditorId()), y = new ir();
475
+ if (g) {
476
+ const C = g.with(Tn);
477
+ C.setReserveRangesStatus(!0), y.add(() => {
478
+ C.setReserveRangesStatus(!1);
479
479
  });
480
480
  }
481
481
  return () => {
482
- C.disableForceKeepVisible(), y.dispose();
482
+ I.disableForceKeepVisible(), y.dispose();
483
483
  };
484
- }, [a == null ? void 0 : a.type, C, ie]), te(() => (b.setIsKeepVisible(Le), () => {
484
+ }, [a == null ? void 0 : a.type, I, ie]), te(() => (b.setIsKeepVisible(be), () => {
485
485
  b.setIsKeepVisible(!1);
486
- }), [Le, b]), te(() => () => {
487
- D.temporaryHidden && (D.show(), se.setContextValue(_t, !1));
486
+ }), [be, b]), te(() => () => {
487
+ D.temporaryHidden && (D.show(), se.setContextValue(St, !1));
488
488
  }, [se, D]), te(() => {
489
- if (Le)
490
- return C.enableForceKeepVisible(), () => {
491
- C.disableForceKeepVisible();
489
+ if (be)
490
+ return I.enableForceKeepVisible(), () => {
491
+ I.disableForceKeepVisible();
492
492
  };
493
- }, [Le, C]);
494
- const Xn = [
493
+ }, [be, I]);
494
+ const Yn = [
495
495
  {
496
- label: p.t("hyperLink.form.link"),
496
+ label: d.t("hyperLink.form.link"),
497
497
  value: S.URL
498
498
  },
499
499
  {
500
- label: p.t("hyperLink.form.range"),
500
+ label: d.t("hyperLink.form.range"),
501
501
  value: S.RANGE
502
502
  },
503
503
  {
504
- label: p.t("hyperLink.form.worksheet"),
504
+ label: d.t("hyperLink.form.worksheet"),
505
505
  value: S.SHEET
506
506
  },
507
507
  {
508
- label: p.t("hyperLink.form.definedName"),
508
+ label: d.t("hyperLink.form.definedName"),
509
509
  value: S.DEFINE_NAME
510
510
  },
511
511
  ...q
512
512
  ];
513
513
  if (!B)
514
514
  return;
515
- const qn = B.getHiddenWorksheets(), ht = B.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => qn.indexOf(h.value) === -1), gt = Object.values((Bt = v.getDefinedNameMap(B.getUnitId())) != null ? Bt : {}).map((h) => ({
516
- label: h.name,
517
- value: h.id
518
- })), Vt = (h, y) => {
519
- if (h === S.URL)
520
- return fi(y);
521
- if (h === S.RANGE) {
522
- const I = Ve(y), L = B.getSheetBySheetName(I.sheetName);
515
+ const Xn = B.getHiddenWorksheets(), gt = B.getSheets().map((g) => ({ label: g.getName(), value: g.getSheetId() })).filter((g) => Xn.indexOf(g.value) === -1), mt = Object.values((Bt = v.getDefinedNameMap(B.getUnitId())) != null ? Bt : {}).map((g) => ({
516
+ label: g.name,
517
+ value: g.id
518
+ })), Vt = (g, y) => {
519
+ if (g === S.URL)
520
+ return mi(y);
521
+ if (g === S.RANGE) {
522
+ const C = Ae(y), L = B.getSheetBySheetName(C.sheetName);
523
523
  if (L)
524
- return `#gid=${L.getSheetId()}&range=${Hr(I.range)}`;
524
+ return `#gid=${L.getSheetId()}&range=${Ur(C.range)}`;
525
525
  }
526
- return `#${h}=${y}`;
527
- }, Jn = zr((h) => {
526
+ return `#${g}=${y}`;
527
+ }, qn = Kr((g) => {
528
528
  var N;
529
- const I = h.split(",").map(Ve)[0];
530
- if (!I || !_n(I.range))
529
+ const C = g.split(",").map(Ae)[0];
530
+ if (!C || !_n(C.range))
531
531
  return;
532
- I.sheetName || (I.sheetName = ((N = B.getActiveSheet()) == null ? void 0 : N.getName()) || "");
533
- const L = Ur(I);
534
- g(L), L && (H.current || !i) && (J(L), H.current = !0);
535
- }), mt = async () => {
536
- if (s && !i || !l || u === S.URL && !Fe(l)) {
537
- zn(!0);
532
+ C.sheetName || (C.sheetName = ((N = B.getActiveSheet()) == null ? void 0 : N.getName()) || "");
533
+ const L = Mr(C);
534
+ h(L), L && (H.current || !i) && (J(L), H.current = !0);
535
+ }), ft = async () => {
536
+ if (s && !i || !l || u === S.URL && !Ze(l)) {
537
+ Kn(!0);
538
538
  return;
539
539
  }
540
540
  if (a)
541
541
  if (t) {
542
- const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? hr.id : gr.id;
543
- await P.executeCommand(h, {
542
+ const g = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? pr.id : hr.id;
543
+ await P.executeCommand(g, {
544
544
  id: t,
545
545
  unitId: a.unitId,
546
546
  subUnitId: a.subUnitId,
@@ -550,21 +550,21 @@ const Ti = "univer-cell-link-edit", xi = "univer-cell-link-edit-buttons", dn = {
550
550
  },
551
551
  row: a.row,
552
552
  column: a.col,
553
- documentId: a.type === f.ZEN_EDITOR ? x : C.getCurrentEditorId()
553
+ documentId: a.type === f.ZEN_EDITOR ? x : I.getCurrentEditorId()
554
554
  });
555
555
  } else {
556
- const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? mr.id : fr.id;
557
- await P.executeCommand(h, {
556
+ const g = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? gr.id : mr.id;
557
+ await P.executeCommand(g, {
558
558
  unitId: a.unitId,
559
559
  subUnitId: a.subUnitId,
560
560
  link: {
561
- id: or(),
561
+ id: sr(),
562
562
  row: a.row,
563
563
  column: a.col,
564
564
  payload: Vt(u, l),
565
565
  display: s ? i : ""
566
566
  },
567
- documentId: a.type === f.ZEN_EDITOR ? x : C.getCurrentEditorId()
567
+ documentId: a.type === f.ZEN_EDITOR ? x : I.getCurrentEditorId()
568
568
  });
569
569
  }
570
570
  if ((a == null ? void 0 : a.type) === f.VIEWING) {
@@ -572,130 +572,130 @@ const Ti = "univer-cell-link-edit", xi = "univer-cell-link-edit-buttons", dn = {
572
572
  unitId: a.unitId,
573
573
  subUnitId: a.subUnitId
574
574
  });
575
- const h = 1;
575
+ const g = 1;
576
576
  await P.executeCommand(yn.id, {
577
577
  range: {
578
- startRow: Math.max(a.row - h, 0),
579
- endRow: a.row + h,
580
- startColumn: Math.max(a.col - h, 0),
581
- endColumn: a.col + h
578
+ startRow: Math.max(a.row - g, 0),
579
+ endRow: a.row + g,
580
+ startColumn: Math.max(a.col - g, 0),
581
+ endColumn: a.col + g
582
582
  }
583
583
  });
584
584
  }
585
- P.executeCommand(Ke.id);
586
- }, Qn = (h) => {
587
- var I;
585
+ P.executeCommand(Ye.id);
586
+ }, Jn = (g) => {
587
+ var C;
588
588
  if (u !== S.RANGE)
589
589
  return;
590
- const y = (I = Pe.current) == null ? void 0 : I.handleOutClick;
591
- y && y(h, () => pt(!1));
590
+ const y = (C = Le.current) == null ? void 0 : C.handleOutClick;
591
+ y && y(g, () => ht(!1));
592
592
  };
593
- return a ? /* @__PURE__ */ m.jsxs("div", { className: dn.cellLinkEdit, style: { display: n ? "none" : "block" }, onClick: Qn, children: [
593
+ return a ? /* @__PURE__ */ m.jsxs("div", { className: dn.cellLinkEdit, style: { display: n ? "none" : "block" }, onClick: Jn, children: [
594
594
  s ? /* @__PURE__ */ m.jsx(
595
595
  _e,
596
596
  {
597
- label: p.t("hyperLink.form.label"),
598
- error: j && !i ? p.t("hyperLink.form.inputError") : "",
597
+ label: d.t("hyperLink.form.label"),
598
+ error: j && !i ? d.t("hyperLink.form.inputError") : "",
599
599
  children: /* @__PURE__ */ m.jsx(
600
600
  on,
601
601
  {
602
602
  value: i,
603
- onChange: (h) => {
604
- J(h), H.current = !1;
603
+ onChange: (g) => {
604
+ J(g), H.current = !1;
605
605
  },
606
- placeholder: p.t("hyperLink.form.labelPlaceholder"),
606
+ placeholder: d.t("hyperLink.form.labelPlaceholder"),
607
607
  autoFocus: !0,
608
- onKeyDown: (h) => {
609
- h.keyCode === Rt.ENTER && mt();
608
+ onKeyDown: (g) => {
609
+ g.keyCode === Rt.ENTER && ft();
610
610
  }
611
611
  }
612
612
  )
613
613
  }
614
614
  ) : null,
615
- /* @__PURE__ */ m.jsx(_e, { label: p.t("hyperLink.form.type"), children: /* @__PURE__ */ m.jsx(
615
+ /* @__PURE__ */ m.jsx(_e, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ m.jsx(
616
616
  Ct,
617
617
  {
618
- options: Xn,
618
+ options: Yn,
619
619
  value: u,
620
- onChange: (h) => {
621
- d(h), g("");
620
+ onChange: (g) => {
621
+ p(g), h("");
622
622
  }
623
623
  }
624
624
  ) }),
625
625
  u === S.URL && /* @__PURE__ */ m.jsx(
626
626
  _e,
627
627
  {
628
- error: j ? l ? Fe(l) ? "" : p.t("hyperLink.form.linkError") : p.t("hyperLink.form.inputError") : "",
628
+ error: j ? l ? Ze(l) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
629
629
  children: /* @__PURE__ */ m.jsx(
630
630
  on,
631
631
  {
632
632
  value: l,
633
- onChange: (h) => {
634
- g(h), h && (H.current || !i || i === l) && (J(h), H.current = !0);
633
+ onChange: (g) => {
634
+ h(g), g && (H.current || !i || i === l) && (J(g), H.current = !0);
635
635
  },
636
- placeholder: p.t("hyperLink.form.linkPlaceholder"),
636
+ placeholder: d.t("hyperLink.form.linkPlaceholder"),
637
637
  autoFocus: !0,
638
- onKeyDown: (h) => {
639
- h.keyCode === Rt.ENTER && mt();
638
+ onKeyDown: (g) => {
639
+ g.keyCode === Rt.ENTER && ft();
640
640
  }
641
641
  }
642
642
  )
643
643
  }
644
644
  ),
645
- u === S.RANGE && /* @__PURE__ */ m.jsx(_e, { error: j && !l ? p.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ m.jsx(
646
- hi,
645
+ u === S.RANGE && /* @__PURE__ */ m.jsx(_e, { error: j && !l ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ m.jsx(
646
+ pi,
647
647
  {
648
648
  unitId: B.getUnitId(),
649
- subUnitId: Yn,
649
+ subUnitId: zn,
650
650
  isOnlyOneRange: !0,
651
651
  isSupportAcrossSheet: !0,
652
652
  initValue: l,
653
- onChange: Jn,
654
- isFocus: Le,
655
- onFocus: () => pt(!0),
656
- actions: Pe.current,
657
- onRangeSelectorDialogVisibleChange: async (h) => {
658
- var y, I;
659
- if (h)
660
- a.type === f.ZEN_EDITOR && (D.hide(), se.setContextValue(_t, !0)), a.type !== f.VIEWING && C.enableForceKeepVisible(), r(!0);
653
+ onChange: qn,
654
+ isFocus: be,
655
+ onFocus: () => ht(!0),
656
+ actions: Le.current,
657
+ onRangeSelectorDialogVisibleChange: async (g) => {
658
+ var y, C;
659
+ if (g)
660
+ a.type === f.ZEN_EDITOR && (D.hide(), se.setContextValue(St, !0)), a.type !== f.VIEWING && I.enableForceKeepVisible(), r(!0);
661
661
  else {
662
662
  if (await M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === f.ZEN_EDITOR) {
663
663
  await P.executeCommand(Pn.id, {
664
664
  unitId: a.unitId,
665
665
  subUnitId: a.subUnitId,
666
666
  selections: [{ range: { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col } }]
667
- }), D.show(), se.setContextValue(_t, !1);
668
- const L = (y = ie.getRenderById(x)) == null ? void 0 : y.with(ri), N = (I = Re.getTextRanges({ unitId: x, subUnitId: x })) == null ? void 0 : I[0];
669
- L && N && (L.scrollToRange(N), Re.refreshSelection({ unitId: x, subUnitId: x }));
667
+ }), D.show(), se.setContextValue(St, !1);
668
+ const L = (y = ie.getRenderById(x)) == null ? void 0 : y.with(ti), N = (C = Pe.getTextRanges({ unitId: x, subUnitId: x })) == null ? void 0 : C[0];
669
+ L && N && (L.scrollToRange(N), Pe.refreshSelection({ unitId: x, subUnitId: x }));
670
670
  }
671
- C.disableForceKeepVisible(), r(!1);
671
+ I.disableForceKeepVisible(), r(!1);
672
672
  }
673
673
  }
674
674
  }
675
675
  ) }),
676
- u === S.SHEET && /* @__PURE__ */ m.jsx(_e, { error: j && !l ? p.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m.jsx(
676
+ u === S.SHEET && /* @__PURE__ */ m.jsx(_e, { error: j && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m.jsx(
677
677
  Ct,
678
678
  {
679
- options: ht,
679
+ options: gt,
680
680
  value: l,
681
- onChange: (h) => {
681
+ onChange: (g) => {
682
682
  var L, N;
683
- g(h);
684
- const y = (L = ht.find((A) => A.value === h)) == null ? void 0 : L.label, I = (N = ht.find((A) => A.value === l)) == null ? void 0 : N.label;
685
- y && (H.current || !i || i === I) && (J(y), H.current = !0);
683
+ h(g);
684
+ const y = (L = gt.find((A) => A.value === g)) == null ? void 0 : L.label, C = (N = gt.find((A) => A.value === l)) == null ? void 0 : N.label;
685
+ y && (H.current || !i || i === C) && (J(y), H.current = !0);
686
686
  }
687
687
  }
688
688
  ) }),
689
- u === S.DEFINE_NAME && /* @__PURE__ */ m.jsx(_e, { error: j && !l ? p.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m.jsx(
689
+ u === S.DEFINE_NAME && /* @__PURE__ */ m.jsx(_e, { error: j && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m.jsx(
690
690
  Ct,
691
691
  {
692
- options: gt,
692
+ options: mt,
693
693
  value: l,
694
- onChange: (h) => {
694
+ onChange: (g) => {
695
695
  var L, N;
696
- g(h);
697
- const y = (L = gt.find((A) => A.value === h)) == null ? void 0 : L.label, I = (N = gt.find((A) => A.value === l)) == null ? void 0 : N.label;
698
- y && (H.current || !i || i === I) && (J(y), H.current = !0);
696
+ h(g);
697
+ const y = (L = mt.find((A) => A.value === g)) == null ? void 0 : L.label, C = (N = mt.find((A) => A.value === l)) == null ? void 0 : N.label;
698
+ y && (H.current || !i || i === C) && (J(y), H.current = !0);
699
699
  }
700
700
  }
701
701
  ) }),
@@ -707,10 +707,10 @@ const Ti = "univer-cell-link-edit", xi = "univer-cell-link-edit-buttons", dn = {
707
707
  display: i,
708
708
  showError: j,
709
709
  setByPayload: H,
710
- setDisplay: (h) => {
711
- J(h), H.current = !0;
710
+ setDisplay: (g) => {
711
+ J(g), H.current = !0;
712
712
  },
713
- setPayload: g
713
+ setPayload: h
714
714
  }
715
715
  ),
716
716
  /* @__PURE__ */ m.jsxs("div", { className: dn.cellLinkEditButtons, children: [
@@ -718,9 +718,9 @@ const Ti = "univer-cell-link-edit", xi = "univer-cell-link-edit-buttons", dn = {
718
718
  an,
719
719
  {
720
720
  onClick: () => {
721
- a && M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), P.executeCommand(Ke.id);
721
+ a && M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), P.executeCommand(Ye.id);
722
722
  },
723
- children: p.t("hyperLink.form.cancel")
723
+ children: d.t("hyperLink.form.cancel")
724
724
  }
725
725
  ),
726
726
  /* @__PURE__ */ m.jsx(
@@ -729,15 +729,15 @@ const Ti = "univer-cell-link-edit", xi = "univer-cell-link-edit-buttons", dn = {
729
729
  type: "primary",
730
730
  style: { marginLeft: 8 },
731
731
  onClick: async () => {
732
- mt();
732
+ ft();
733
733
  },
734
- children: p.t("hyperLink.form.ok")
734
+ children: d.t("hyperLink.form.ok")
735
735
  }
736
736
  )
737
737
  ] })
738
738
  ] }) : null;
739
739
  };
740
- Ze.componentKey = "univer.sheet.cell-link-edit";
740
+ Ke.componentKey = "univer.sheet.cell-link-edit";
741
741
  var $ = function() {
742
742
  return $ = Object.assign || function(t) {
743
743
  for (var e, n = 1, r = arguments.length; n < r; n++) {
@@ -746,7 +746,7 @@ var $ = function() {
746
746
  }
747
747
  return t;
748
748
  }, $.apply(this, arguments);
749
- }, Ni = function(t, e) {
749
+ }, xi = function(t, e) {
750
750
  var n = {};
751
751
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
752
752
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -754,15 +754,15 @@ var $ = function() {
754
754
  e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
755
755
  return n;
756
756
  }, fe = ge(function(t, e) {
757
- var n = t.icon, r = t.id, i = t.className, o = t.extend, s = Ni(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), u = Pt("_".concat(Hi()));
758
- return Dn(n, "".concat(r), { defIds: n.defIds, idSuffix: u.current }, $({ ref: e, className: c }, s), o);
757
+ var n = t.icon, r = t.id, i = t.className, o = t.extend, s = xi(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), u = Pt("_".concat(Ui()));
758
+ return Hn(n, "".concat(r), { defIds: n.defIds, idSuffix: u.current }, $({ ref: e, className: c }, s), o);
759
759
  });
760
- function Dn(t, e, n, r, i) {
761
- return me(t.tag, $($({ key: e }, Mi(t, n, i)), r), (Ui(t, n).children || []).map(function(o, s) {
762
- return Dn(o, "".concat(e, "-").concat(t.tag, "-").concat(s), n, void 0, i);
760
+ function Hn(t, e, n, r, i) {
761
+ return me(t.tag, $($({ key: e }, Ni(t, n, i)), r), (Mi(t, n).children || []).map(function(o, s) {
762
+ return Hn(o, "".concat(e, "-").concat(t.tag, "-").concat(s), n, void 0, i);
763
763
  }));
764
764
  }
765
- function Mi(t, e, n) {
765
+ function Ni(t, e, n) {
766
766
  var r = $({}, t.attrs);
767
767
  n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
768
768
  var i = e.defIds;
@@ -771,98 +771,98 @@ function Mi(t, e, n) {
771
771
  typeof c == "string" && (r[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
772
772
  })), r;
773
773
  }
774
- function Ui(t, e) {
774
+ function Mi(t, e) {
775
775
  var n, r = e.defIds;
776
776
  return !r || r.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? $($({}, t), { children: t.children.map(function(i) {
777
777
  return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? $($({}, i), { attrs: $($({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
778
778
  }) }) : t;
779
779
  }
780
- function Hi() {
780
+ function Ui() {
781
781
  return Math.random().toString(36).substring(2, 8);
782
782
  }
783
783
  fe.displayName = "UniverIcon";
784
- var Di = { tag: "svg", attrs: { 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" } }] }, Ae = ge(function(t, e) {
784
+ var Hi = { tag: "svg", attrs: { 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" } }] }, We = ge(function(t, e) {
785
785
  return me(fe, Object.assign({}, t, {
786
786
  id: "all-border-single",
787
787
  ref: e,
788
- icon: Di
788
+ icon: Hi
789
789
  }));
790
790
  });
791
- Ae.displayName = "AllBorderSingle";
792
- var $i = { tag: "svg", attrs: { 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" } }] }, $n = ge(function(t, e) {
791
+ We.displayName = "AllBorderSingle";
792
+ var Di = { tag: "svg", attrs: { 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" } }] }, Dn = ge(function(t, e) {
793
793
  return me(fe, Object.assign({}, t, {
794
794
  id: "copy-single",
795
795
  ref: e,
796
- icon: $i
796
+ icon: Di
797
797
  }));
798
798
  });
799
- $n.displayName = "CopySingle";
800
- var ji = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ut = ge(function(t, e) {
799
+ Dn.displayName = "CopySingle";
800
+ var $i = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ut = ge(function(t, e) {
801
801
  return me(fe, Object.assign({}, t, {
802
802
  id: "link-single",
803
803
  ref: e,
804
- icon: ji
804
+ icon: $i
805
805
  }));
806
806
  });
807
807
  Ut.displayName = "LinkSingle";
808
- var Vi = { tag: "svg", attrs: { 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.76157 6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449 14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797 11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302zM3.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.05395 4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092 3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721 8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606zM3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332 2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302 13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332z" } }] }, jn = ge(function(t, e) {
808
+ var ji = { tag: "svg", attrs: { 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.76157 6.75249 4.52725 6.75249 4.14735 6.98681 3.91304L8.27535 2.62449C9.70209 1.19776 12.0153 1.19776 13.442 2.62449 14.8688 4.05123 14.8688 6.36442 13.442 7.79116L12.1535 9.0797C11.9192 9.31402 11.5393 9.31402 11.3049 9.0797 11.0706 8.84539 11.0706 8.46549 11.3049 8.23117L12.5935 6.94263C13.5516 5.98452 13.5516 4.43113 12.5935 3.47302zM3.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.05395 4.4606 6.81963 4.0807 6.81963 3.84639 7.05395L2.55784 8.34249C1.13111 9.76923 1.13111 12.0824 2.55784 13.5092 3.98458 14.9359 6.29777 14.9359 7.72451 13.5092L9.01305 12.2206C9.24737 11.9863 9.24737 11.6064 9.01305 11.3721 8.77874 11.1378 8.39884 11.1378 8.16452 11.3721L6.87598 12.6606C5.91787 13.6187 4.36448 13.6187 3.40637 12.6606zM3.5852 2.80332C3.35088 2.569 2.97098 2.569 2.73667 2.80332 2.50235 3.03763 2.50235 3.41753 2.73667 3.65185L12.4151 13.3302C12.6494 13.5646 13.0293 13.5646 13.2636 13.3302 13.4979 13.0959 13.4979 12.716 13.2636 12.4817L3.5852 2.80332z" } }] }, $n = ge(function(t, e) {
809
809
  return me(fe, Object.assign({}, t, {
810
810
  id: "unlink-single",
811
811
  ref: e,
812
- icon: Vi
812
+ icon: ji
813
813
  }));
814
814
  });
815
- jn.displayName = "UnlinkSingle";
816
- var Bi = { tag: "svg", attrs: { 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" } }] }, Vn = ge(function(t, e) {
815
+ $n.displayName = "UnlinkSingle";
816
+ var Vi = { tag: "svg", attrs: { 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" } }] }, jn = ge(function(t, e) {
817
817
  return me(fe, Object.assign({}, t, {
818
818
  id: "write-single",
819
819
  ref: e,
820
- icon: Bi
820
+ icon: Vi
821
821
  }));
822
822
  });
823
- Vn.displayName = "WriteSingle";
824
- var Ai = { tag: "svg", attrs: { 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: "#fff", 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 = ge(function(t, e) {
823
+ jn.displayName = "WriteSingle";
824
+ var Bi = { tag: "svg", attrs: { 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: "#fff", 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" } }] }, Vn = ge(function(t, e) {
825
825
  return me(fe, Object.assign({}, t, {
826
826
  id: "xlsx",
827
827
  ref: e,
828
- icon: Ai
828
+ icon: Bi
829
829
  }));
830
830
  });
831
- Bn.displayName = "Xlsx";
832
- function An(t) {
831
+ Vn.displayName = "Xlsx";
832
+ function Bn(t) {
833
833
  var e, n, r = "";
834
834
  if (typeof t == "string" || typeof t == "number") r += t;
835
835
  else if (typeof t == "object") if (Array.isArray(t)) {
836
836
  var i = t.length;
837
- for (e = 0; e < i; e++) t[e] && (n = An(t[e])) && (r && (r += " "), r += n);
837
+ for (e = 0; e < i; e++) t[e] && (n = Bn(t[e])) && (r && (r += " "), r += n);
838
838
  } else for (n in t) t[n] && (r && (r += " "), r += n);
839
839
  return r;
840
840
  }
841
841
  function pn() {
842
- for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = An(t)) && (r && (r += " "), r += e);
842
+ for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Bn(t)) && (r && (r += " "), r += e);
843
843
  return r;
844
844
  }
845
- const Fi = "univer-cell-link", Wi = "univer-cell-link-type", Zi = "univer-cell-link-content", Gi = "univer-cell-link-content-error", Ki = "univer-cell-link-url", zi = "univer-cell-link-operations", Yi = "univer-cell-link-operation", Xi = "univer-cell-link-operation-error", W = {
846
- cellLink: Fi,
847
- cellLinkType: Wi,
848
- cellLinkContent: Zi,
849
- cellLinkContentError: Gi,
850
- cellLinkUrl: Ki,
851
- cellLinkOperations: zi,
852
- cellLinkOperation: Yi,
853
- cellLinkOperationError: Xi
854
- }, qi = {
845
+ const Ai = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-link-content", Zi = "univer-cell-link-content-error", Gi = "univer-cell-link-url", Ki = "univer-cell-link-operations", zi = "univer-cell-link-operation", Yi = "univer-cell-link-operation-error", W = {
846
+ cellLink: Ai,
847
+ cellLinkType: Fi,
848
+ cellLinkContent: Wi,
849
+ cellLinkContentError: Zi,
850
+ cellLinkUrl: Gi,
851
+ cellLinkOperations: Ki,
852
+ cellLinkOperation: zi,
853
+ cellLinkOperationError: Yi
854
+ }, Xi = {
855
855
  [S.URL]: /* @__PURE__ */ m.jsx(Ut, {}),
856
- [S.SHEET]: /* @__PURE__ */ m.jsx(Bn, {}),
857
- [S.RANGE]: /* @__PURE__ */ m.jsx(Ae, {}),
858
- [S.DEFINE_NAME]: /* @__PURE__ */ m.jsx(Ae, {}),
859
- [S.INVALID]: /* @__PURE__ */ m.jsx(Ae, {})
856
+ [S.SHEET]: /* @__PURE__ */ m.jsx(Vn, {}),
857
+ [S.RANGE]: /* @__PURE__ */ m.jsx(We, {}),
858
+ [S.DEFINE_NAME]: /* @__PURE__ */ m.jsx(We, {}),
859
+ [S.INVALID]: /* @__PURE__ */ m.jsx(We, {})
860
860
  }, hn = (t) => {
861
861
  var M, P;
862
- const e = E(G), n = E(re), r = E(On), i = E(it), o = E(he), s = E(ne), c = E(wt), u = E(ct), { customRange: d, row: l, col: g, unitId: p, subUnitId: v, editPermission: C, copyPermission: _, type: b } = t;
863
- if (!((M = d == null ? void 0 : d.properties) != null && M.url))
862
+ const e = E(G), n = E(re), r = E(kn), i = E(ot), o = E(he), s = E(ne), c = E(wt), u = E(ut), { customRange: p, row: l, col: h, unitId: d, subUnitId: v, editPermission: I, copyPermission: _, type: b } = t;
863
+ if (!((M = p == null ? void 0 : p.properties) != null && M.url))
864
864
  return null;
865
- const a = c.parseHyperLink((P = d.properties.url) != null ? P : ""), w = a.type === S.INVALID;
865
+ const a = c.parseHyperLink((P = p.properties.url) != null ? P : ""), w = a.type === S.INVALID;
866
866
  return /* @__PURE__ */ m.jsxs("div", { className: W.cellLink, onClick: () => e.hideCurrentPopup(), children: [
867
867
  /* @__PURE__ */ m.jsxs(
868
868
  "div",
@@ -872,8 +872,8 @@ const Fi = "univer-cell-link", Wi = "univer-cell-link-type", Zi = "univer-cell-l
872
872
  u.visible || w || o.navigate(a);
873
873
  },
874
874
  children: [
875
- /* @__PURE__ */ m.jsx("div", { className: W.cellLinkType, children: qi[a.type] }),
876
- /* @__PURE__ */ m.jsx($e, { showIfEllipsis: !0, title: a.name, children: /* @__PURE__ */ m.jsx("span", { className: W.cellLinkUrl, children: a.name }) })
875
+ /* @__PURE__ */ m.jsx("div", { className: W.cellLinkType, children: Xi[a.type] }),
876
+ /* @__PURE__ */ m.jsx(Ve, { showIfEllipsis: !0, title: a.name, children: /* @__PURE__ */ m.jsx("span", { className: W.cellLinkUrl, children: a.name }) })
877
877
  ]
878
878
  }
879
879
  ),
@@ -885,35 +885,35 @@ const Fi = "univer-cell-link", Wi = "univer-cell-link-type", Zi = "univer-cell-l
885
885
  onClick: () => {
886
886
  if (!w) {
887
887
  if (a.type !== S.URL) {
888
- const k = new URL(window.location.href);
889
- k.hash = a.url.slice(1), navigator.clipboard.writeText(k.href);
888
+ const O = new URL(window.location.href);
889
+ O.hash = a.url.slice(1), navigator.clipboard.writeText(O.href);
890
890
  } else
891
891
  navigator.clipboard.writeText(a.url);
892
892
  r.show({
893
893
  content: i.t("hyperLink.message.coped"),
894
- type: ke.Info
894
+ type: Te.Info
895
895
  });
896
896
  }
897
897
  },
898
- children: /* @__PURE__ */ m.jsx($e, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ m.jsx($n, {}) })
898
+ children: /* @__PURE__ */ m.jsx(Ve, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ m.jsx(Dn, {}) })
899
899
  }
900
900
  ),
901
- C && /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
901
+ I && /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
902
902
  /* @__PURE__ */ m.jsx(
903
903
  "div",
904
904
  {
905
905
  className: W.cellLinkOperation,
906
906
  onClick: () => {
907
907
  n.executeCommand(Dt.id, {
908
- unitId: p,
908
+ unitId: d,
909
909
  subUnitId: v,
910
910
  row: l,
911
- col: g,
912
- customRangeId: d.rangeId,
911
+ col: h,
912
+ customRangeId: p.rangeId,
913
913
  type: b
914
914
  });
915
915
  },
916
- children: /* @__PURE__ */ m.jsx($e, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ m.jsx(Vn, {}) })
916
+ children: /* @__PURE__ */ m.jsx(Ve, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ m.jsx(jn, {}) })
917
917
  }
918
918
  ),
919
919
  /* @__PURE__ */ m.jsx(
@@ -921,23 +921,23 @@ const Fi = "univer-cell-link", Wi = "univer-cell-link-type", Zi = "univer-cell-l
921
921
  {
922
922
  className: W.cellLinkOperation,
923
923
  onClick: () => {
924
- const k = b === f.EDITING || b === f.ZEN_EDITOR ? vr.id : _r.id;
925
- n.syncExecuteCommand(k, {
926
- unitId: p,
924
+ const O = b === f.EDITING || b === f.ZEN_EDITOR ? fr.id : vr.id;
925
+ n.syncExecuteCommand(O, {
926
+ unitId: d,
927
927
  subUnitId: v,
928
- id: d.rangeId,
928
+ id: p.rangeId,
929
929
  row: l,
930
- column: g,
930
+ column: h,
931
931
  documentId: b === f.ZEN_EDITOR ? x : s.getCurrentEditorId()
932
932
  }) && e.hideCurrentPopup(void 0, !0);
933
933
  },
934
- children: /* @__PURE__ */ m.jsx($e, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ m.jsx(jn, {}) })
934
+ children: /* @__PURE__ */ m.jsx(Ve, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ m.jsx($n, {}) })
935
935
  }
936
936
  )
937
937
  ] })
938
938
  ] })
939
939
  ] });
940
- }, Ge = () => {
940
+ }, ze = () => {
941
941
  var i, o;
942
942
  const t = E(G), [e, n] = X(null), r = E(K);
943
943
  if (te(() => {
@@ -951,16 +951,16 @@ const Fi = "univer-cell-link", Wi = "univer-cell-link-type", Zi = "univer-cell-l
951
951
  }, [t.currentPopup, t.currentPopup$]), !e)
952
952
  return null;
953
953
  if (e.showAll) {
954
- const s = r.getUnit(e.unitId, O.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(e.subUnitId), u = c == null ? void 0 : c.getCell(e.row, e.col), d = (o = (i = u == null ? void 0 : u.p) == null ? void 0 : i.body) == null ? void 0 : o.customRanges;
955
- return d != null && d.length ? /* @__PURE__ */ m.jsx("div", { children: d.map((l) => /* @__PURE__ */ m.jsx(hn, { ...e, customRange: l }, l.rangeId)) }) : null;
954
+ const s = r.getUnit(e.unitId, k.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(e.subUnitId), u = c == null ? void 0 : c.getCell(e.row, e.col), p = (o = (i = u == null ? void 0 : u.p) == null ? void 0 : i.body) == null ? void 0 : o.customRanges;
955
+ return p != null && p.length ? /* @__PURE__ */ m.jsx("div", { children: p.map((l) => /* @__PURE__ */ m.jsx(hn, { ...e, customRange: l }, l.rangeId)) }) : null;
956
956
  }
957
957
  return /* @__PURE__ */ m.jsx(hn, { ...e });
958
958
  };
959
- Ge.componentKey = "univer.sheet.cell-link-popup";
960
- var Ji = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, es = (t, e, n, r) => {
961
- for (var i = r > 1 ? void 0 : r ? Qi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
959
+ ze.componentKey = "univer.sheet.cell-link-popup";
960
+ var qi = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, Qi = (t, e, n, r) => {
961
+ for (var i = r > 1 ? void 0 : r ? Ji(e, n) : e, o = t.length - 1, s; o >= 0; o--)
962
962
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
963
- return r && i && Ji(e, n, i), i;
963
+ return r && i && qi(e, n, i), i;
964
964
  }, ce = (t, e) => (n, r) => e(n, r, t);
965
965
  const gn = (t, e) => {
966
966
  var n, r;
@@ -970,10 +970,10 @@ let G = class extends z {
970
970
  constructor(e, n, r, i, o, s, c) {
971
971
  super();
972
972
  V(this, "_currentPopup", null);
973
- V(this, "_currentPopup$", new oi());
973
+ V(this, "_currentPopup$", new si());
974
974
  V(this, "currentPopup$", this._currentPopup$.asObservable());
975
975
  V(this, "_currentEditingPopup", null);
976
- V(this, "_currentEditing$", new ai(null));
976
+ V(this, "_currentEditing$", new oi(null));
977
977
  V(this, "currentEditing$", this._currentEditing$.asObservable());
978
978
  V(this, "_isKeepVisible", !1);
979
979
  this._sheetCanvasPopManagerService = e, this._injector = n, this._univerInstanceService = r, this._editorBridgeService = i, this._textSelectionManagerService = o, this._docCanvasPopManagerService = s, this._zenZoneService = c, this.disposeWithMe(() => {
@@ -999,9 +999,9 @@ let G = class extends z {
999
999
  if (n && gn(e, n))
1000
1000
  return;
1001
1001
  const { unitId: r, subUnitId: i, row: o, col: s, customRangeRect: c, customRange: u } = e;
1002
- let d;
1002
+ let p;
1003
1003
  const l = {
1004
- componentKey: Ge.componentKey,
1004
+ componentKey: ze.componentKey,
1005
1005
  direction: "bottom",
1006
1006
  onClickOutside: () => {
1007
1007
  this.hideCurrentPopup();
@@ -1013,14 +1013,14 @@ let G = class extends z {
1013
1013
  if (e.type === f.EDITING) {
1014
1014
  if (!u)
1015
1015
  return;
1016
- d = c && this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
1016
+ p = c && this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
1017
1017
  c,
1018
1018
  l
1019
1019
  );
1020
1020
  } else if (e.type === f.ZEN_EDITOR) {
1021
1021
  if (!u)
1022
1022
  return;
1023
- d = this._docCanvasPopManagerService.attachPopupToRange(
1023
+ p = this._docCanvasPopManagerService.attachPopupToRange(
1024
1024
  {
1025
1025
  startOffset: u.startIndex,
1026
1026
  endOffset: u.endIndex + 1,
@@ -1030,20 +1030,20 @@ let G = class extends z {
1030
1030
  x
1031
1031
  );
1032
1032
  } else if (e.showAll)
1033
- d = this._sheetCanvasPopManagerService.attachPopupToCell(e.row, e.col, l, r, i);
1033
+ p = this._sheetCanvasPopManagerService.attachPopupToCell(e.row, e.col, l, r, i);
1034
1034
  else {
1035
1035
  if (!u)
1036
1036
  return;
1037
- d = c && this._sheetCanvasPopManagerService.attachPopupByPosition(
1037
+ p = c && this._sheetCanvasPopManagerService.attachPopupByPosition(
1038
1038
  c,
1039
1039
  l,
1040
1040
  e
1041
1041
  );
1042
1042
  }
1043
- d && (this._currentPopup = {
1043
+ p && (this._currentPopup = {
1044
1044
  unitId: r,
1045
1045
  subUnitId: i,
1046
- disposable: d,
1046
+ disposable: p,
1047
1047
  row: o,
1048
1048
  col: s,
1049
1049
  editPermission: !!e.editPermission,
@@ -1071,22 +1071,22 @@ let G = class extends z {
1071
1071
  collapsed: c.dataStream.length - 2 === 0,
1072
1072
  label: de.transform.getPlainText(c.dataStream)
1073
1073
  };
1074
- const u = de.customRange.getCustomRangesInterestsWithSelection(s, (o = (i = c.customRanges) == null ? void 0 : i.filter((g) => g.rangeType === Me.HYPERLINK)) != null ? o : []);
1075
- let d = s.startOffset, l = s.endOffset;
1076
- return u.forEach((g) => {
1077
- d = Math.min(d, g.startIndex), l = Math.max(l, g.endIndex + 1);
1074
+ const u = de.customRange.getCustomRangesInterestsWithSelection(s, (o = (i = c.customRanges) == null ? void 0 : i.filter((h) => h.rangeType === Ue.HYPERLINK)) != null ? o : []);
1075
+ let p = s.startOffset, l = s.endOffset;
1076
+ return u.forEach((h) => {
1077
+ p = Math.min(p, h.startIndex), l = Math.max(l, h.endIndex + 1);
1078
1078
  }), {
1079
- startOffset: d,
1079
+ startOffset: p,
1080
1080
  endOffset: l,
1081
- collapsed: d === l,
1082
- label: de.transform.getPlainText(c.dataStream.slice(d, l))
1081
+ collapsed: p === l,
1082
+ label: de.transform.getPlainText(c.dataStream.slice(p, l))
1083
1083
  };
1084
1084
  }
1085
1085
  return null;
1086
1086
  }
1087
1087
  get _editPopup() {
1088
1088
  return {
1089
- componentKey: Ze.componentKey,
1089
+ componentKey: Ke.componentKey,
1090
1090
  direction: "bottom",
1091
1091
  onClickOutside: () => {
1092
1092
  this.getIsKeepVisible() || this.endEditing();
@@ -1098,30 +1098,38 @@ let G = class extends z {
1098
1098
  };
1099
1099
  }
1100
1100
  startAddEditing(e) {
1101
- var o, s, c, u, d;
1101
+ var o, s, c, u, p;
1102
1102
  const { unitId: n, subUnitId: r, type: i } = e;
1103
1103
  if (i === f.ZEN_EDITOR) {
1104
- const l = this._univerInstanceService.getUnit(x, O.UNIVER_DOC);
1104
+ const l = this._univerInstanceService.getUnit(x, k.UNIVER_DOC);
1105
1105
  if (!l)
1106
1106
  return;
1107
- const g = this._textSelectionManagerService.getActiveTextRange();
1108
- if (!g)
1107
+ const h = this._textSelectionManagerService.getActiveTextRange();
1108
+ if (!h)
1109
1109
  return;
1110
1110
  this._currentEditingPopup = this._docCanvasPopManagerService.attachPopupToRange(
1111
- g,
1111
+ h,
1112
1112
  this._editPopup,
1113
1113
  x
1114
1114
  );
1115
- const p = (o = l.getBody()) == null ? void 0 : o.dataStream.slice(g.startOffset, g.endOffset);
1115
+ const d = (o = l.getBody()) == null ? void 0 : o.dataStream.slice(h.startOffset, h.endOffset);
1116
1116
  this._currentEditing$.next({
1117
1117
  ...e,
1118
- label: p
1118
+ label: d
1119
1119
  });
1120
1120
  } else if (i === f.EDITING) {
1121
1121
  const l = this._getEditingRange();
1122
- l && this._textSelectionManagerService.replaceTextRanges([{ ...l }]), this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1123
- e.row,
1124
- e.col,
1122
+ if (!l)
1123
+ return;
1124
+ this._textSelectionManagerService.replaceDocRanges([{ ...l }], { unitId: Ce, subUnitId: Ce });
1125
+ const h = this._injector.get(De).getRenderById(Ce);
1126
+ if (!h)
1127
+ return;
1128
+ const d = ri(l, h);
1129
+ if (!(d != null && d.length))
1130
+ return;
1131
+ this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
1132
+ d.pop(),
1125
1133
  this._editPopup,
1126
1134
  n,
1127
1135
  r
@@ -1137,22 +1145,22 @@ let G = class extends z {
1137
1145
  n,
1138
1146
  r
1139
1147
  );
1140
- const l = this._univerInstanceService.getUnit(n, O.UNIVER_SHEET), g = l == null ? void 0 : l.getSheetBySheetId(r), p = g == null ? void 0 : g.getCellRaw(e.row, e.col);
1148
+ const l = this._univerInstanceService.getUnit(n, k.UNIVER_SHEET), h = l == null ? void 0 : l.getSheetBySheetId(r), d = h == null ? void 0 : h.getCellRaw(e.row, e.col);
1141
1149
  this._currentEditing$.next({
1142
1150
  ...e,
1143
- label: p != null && p.p ? de.transform.getPlainText((u = (c = p.p.body) == null ? void 0 : c.dataStream) != null ? u : "") : ((d = p == null ? void 0 : p.v) != null ? d : "").toString()
1151
+ label: d != null && d.p ? de.transform.getPlainText((u = (c = d.p.body) == null ? void 0 : c.dataStream) != null ? u : "") : ((p = d == null ? void 0 : d.v) != null ? p : "").toString()
1144
1152
  });
1145
1153
  }
1146
1154
  }
1147
1155
  // eslint-disable-next-line complexity, max-lines-per-function
1148
1156
  startEditing(e) {
1149
- var s, c, u, d, l, g;
1157
+ var s, c, u, p, l, h;
1150
1158
  (s = this._currentEditingPopup) == null || s.dispose(), this.hideCurrentPopup(void 0, !0);
1151
1159
  const { unitId: n, subUnitId: r } = e;
1152
1160
  let i, o;
1153
1161
  if (e.type === f.ZEN_EDITOR) {
1154
- const p = this._univerInstanceService.getUnit(x, O.UNIVER_DOC);
1155
- if (i = (u = (c = p == null ? void 0 : p.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : u.find((v) => v.rangeId === e.customRangeId), o = i ? (d = p == null ? void 0 : p.getBody()) == null ? void 0 : d.dataStream.slice(i.startIndex, i.endIndex + 1) : "", !i || !o)
1162
+ const d = this._univerInstanceService.getUnit(x, k.UNIVER_DOC);
1163
+ if (i = (u = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : u.find((v) => v.rangeId === e.customRangeId), o = i ? (p = d == null ? void 0 : d.getBody()) == null ? void 0 : p.dataStream.slice(i.startIndex, i.endIndex + 1) : "", !i || !o)
1156
1164
  return;
1157
1165
  this._textSelectionManagerService.replaceTextRanges([
1158
1166
  {
@@ -1169,23 +1177,23 @@ let G = class extends z {
1169
1177
  x
1170
1178
  );
1171
1179
  } else if (e.type === f.EDITING) {
1172
- const p = Lr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1173
- if (!p || !((l = p.rects) != null && l.length))
1180
+ const d = Pr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1181
+ if (!d || !((l = d.rects) != null && l.length))
1174
1182
  return;
1175
- i = p.customRange, o = p.label, this._textSelectionManagerService.replaceTextRanges([
1183
+ i = d.customRange, o = d.label, this._textSelectionManagerService.replaceTextRanges([
1176
1184
  {
1177
1185
  startOffset: i.startIndex,
1178
1186
  endOffset: i.endIndex + 1
1179
1187
  }
1180
1188
  ]), this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
1181
- p.rects.pop(),
1189
+ d.rects.pop(),
1182
1190
  this._editPopup,
1183
1191
  n,
1184
1192
  r
1185
1193
  );
1186
1194
  } else {
1187
- const p = this._univerInstanceService.getUnit(n, O.UNIVER_SHEET), v = p == null ? void 0 : p.getSheetBySheetId(r), C = v == null ? void 0 : v.getCellRaw(e.row, e.col), _ = p == null ? void 0 : p.getStyles().getStyleByCell(C), b = _ == null ? void 0 : _.tr, a = br(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1188
- if (!a || !((g = a.rects) != null && g.length))
1195
+ const d = this._univerInstanceService.getUnit(n, k.UNIVER_SHEET), v = d == null ? void 0 : d.getSheetBySheetId(r), I = v == null ? void 0 : v.getCellRaw(e.row, e.col), _ = d == null ? void 0 : d.getStyles().getStyleByCell(I), b = _ == null ? void 0 : _.tr, a = Lr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1196
+ if (!a || !((h = a.rects) != null && h.length))
1189
1197
  return;
1190
1198
  i = a.customRange, o = a.label, b ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1191
1199
  e.row,
@@ -1216,56 +1224,56 @@ let G = class extends z {
1216
1224
  n && (!e || e === n.type) && ((r = this._currentEditingPopup) == null || r.dispose(), this._currentEditing$.next(null));
1217
1225
  }
1218
1226
  };
1219
- G = es([
1220
- ce(0, R(Pr)),
1221
- ce(1, R(st)),
1227
+ G = Qi([
1228
+ ce(0, R(Rr)),
1229
+ ce(1, R(at)),
1222
1230
  ce(2, K),
1223
1231
  ce(3, ne),
1224
- ce(4, R(Ue)),
1225
- ce(5, R(ii)),
1226
- ce(6, ct)
1232
+ ce(4, R(He)),
1233
+ ce(5, R(ni)),
1234
+ ce(6, ut)
1227
1235
  ], G);
1228
1236
  const Ht = (t, e, n) => {
1229
1237
  const r = t.getCell(e, n);
1230
1238
  if (r != null && r.f || r != null && r.si)
1231
1239
  return !0;
1232
1240
  const i = [
1233
- St.CHECKBOX,
1234
- St.LIST,
1235
- St.LIST_MULTIPLE
1241
+ It.CHECKBOX,
1242
+ It.LIST,
1243
+ It.LIST_MULTIPLE
1236
1244
  ];
1237
1245
  return !!(r != null && r.dataValidation && i.includes(r.dataValidation.rule.type));
1238
- }, ts = (t) => {
1239
- const e = t.get(K).getCurrentUnitForType(O.UNIVER_SHEET);
1246
+ }, es = (t) => {
1247
+ const e = t.get(K).getCurrentUnitForType(k.UNIVER_SHEET);
1240
1248
  if (!e)
1241
1249
  return !0;
1242
- const n = e.getActiveSheet(), r = t.get(Ot).getCurrentSelections();
1250
+ const n = e.getActiveSheet(), r = t.get(kt).getCurrentSelections();
1243
1251
  if (!r.length)
1244
1252
  return !0;
1245
1253
  const i = r[0].range.startRow, o = r[0].range.startColumn;
1246
1254
  return Ht(n, i, o);
1247
- }, ns = (t) => {
1248
- var d, l;
1249
- const e = t.get(Ue), n = t.get(K), r = e.getDocRanges();
1255
+ }, ts = (t) => {
1256
+ var p, l;
1257
+ const e = t.get(He), n = t.get(K), r = e.getDocRanges();
1250
1258
  if (!r.length || r.length > 1)
1251
1259
  return !0;
1252
- const i = r[0], o = n.getCurrentUnitForType(O.UNIVER_DOC);
1260
+ const i = r[0], o = n.getCurrentUnitForType(k.UNIVER_DOC);
1253
1261
  if (!o || !i || i.collapsed)
1254
1262
  return !0;
1255
1263
  const s = o.getSelfOrHeaderFooterModel(i.segmentId).getBody();
1256
1264
  if (!s)
1257
1265
  return !0;
1258
- const c = (d = s == null ? void 0 : s.paragraphs) != null ? d : [];
1259
- for (let g = 0, p = c.length; g < p; g++) {
1260
- const v = c[g];
1266
+ const c = (p = s == null ? void 0 : s.paragraphs) != null ? p : [];
1267
+ for (let h = 0, d = c.length; h < d; h++) {
1268
+ const v = c[h];
1261
1269
  if (i.startOffset <= v.startIndex && i.endOffset > v.startIndex)
1262
1270
  return !0;
1263
1271
  if (v.startIndex > i.endOffset)
1264
1272
  break;
1265
1273
  }
1266
- return !de.customRange.getCustomRangesInterestsWithSelection(i, (l = s.customRanges) != null ? l : []).every((g) => g.rangeType === Me.HYPERLINK);
1274
+ return !de.customRange.getCustomRangesInterestsWithSelection(i, (l = s.customRanges) != null ? l : []).every((h) => h.rangeType === Ue.HYPERLINK);
1267
1275
  }, Dt = {
1268
- type: ot.OPERATION,
1276
+ type: ct.OPERATION,
1269
1277
  id: "sheet.operation.open-hyper-link-edit-panel",
1270
1278
  handler(t, e) {
1271
1279
  if (!e)
@@ -1273,55 +1281,55 @@ const Ht = (t, e, n) => {
1273
1281
  const n = t.get(G);
1274
1282
  return e.customRangeId ? n.startEditing(e) : n.startAddEditing(e), !0;
1275
1283
  }
1276
- }, Ke = {
1277
- type: ot.OPERATION,
1284
+ }, Ye = {
1285
+ type: ct.OPERATION,
1278
1286
  id: "sheet.operation.close-hyper-link-popup",
1279
1287
  handler(t) {
1280
1288
  return t.get(G).endEditing(), !0;
1281
1289
  }
1282
1290
  }, $t = {
1283
- type: ot.OPERATION,
1291
+ type: ct.OPERATION,
1284
1292
  id: "sheet.operation.insert-hyper-link",
1285
1293
  handler(t) {
1286
- var g;
1294
+ var h;
1287
1295
  const e = t.get(K), n = bn(e), r = t.get(ne);
1288
1296
  if (!n)
1289
1297
  return !1;
1290
- const i = t.get(re), s = t.get(Ot).getCurrentLastSelection();
1298
+ const i = t.get(re), s = t.get(kt).getCurrentLastSelection();
1291
1299
  if (!s)
1292
1300
  return !1;
1293
- const c = s.range.startRow, u = s.range.startColumn, d = r.isVisible(), l = ((g = e.getFocusedUnit()) == null ? void 0 : g.getUnitId()) === x;
1301
+ const c = s.range.startRow, u = s.range.startColumn, p = r.isVisible(), l = ((h = e.getFocusedUnit()) == null ? void 0 : h.getUnitId()) === x;
1294
1302
  return i.executeCommand(Dt.id, {
1295
1303
  unitId: n.unitId,
1296
1304
  subUnitId: n.subUnitId,
1297
1305
  row: c,
1298
1306
  col: u,
1299
- type: l ? f.ZEN_EDITOR : d.visible ? f.EDITING : f.VIEWING
1307
+ type: l ? f.ZEN_EDITOR : p.visible ? f.EDITING : f.VIEWING
1300
1308
  });
1301
1309
  }
1302
1310
  }, pe = {
1303
- type: ot.OPERATION,
1311
+ type: ct.OPERATION,
1304
1312
  id: "sheet.operation.insert-hyper-link-toolbar",
1305
1313
  handler(t) {
1306
- if (ts(t))
1314
+ if (es(t))
1307
1315
  return !1;
1308
1316
  const e = t.get(re);
1309
- return t.get(G).currentEditing ? e.executeCommand(Ke.id) : e.executeCommand($t.id);
1317
+ return t.get(G).currentEditing ? e.executeCommand(Ye.id) : e.executeCommand($t.id);
1310
1318
  }
1311
1319
  }, jt = (t, e = x) => {
1312
1320
  var i;
1313
- const n = t.get(K), r = (i = t.get(ut).getRenderById(e)) == null ? void 0 : i.with(xn);
1321
+ const n = t.get(K), r = (i = t.get(De).getRenderById(e)) == null ? void 0 : i.with(Tn);
1314
1322
  return r ? r.textSelectionInner$.pipe(le(() => {
1315
1323
  const s = t.get(ne).getEditCellState();
1316
1324
  if (!s)
1317
1325
  return !0;
1318
1326
  const c = bn(n, { unitId: s.unitId, subUnitId: s.sheetId });
1319
- return !(c != null && c.worksheet) || Ht(c.worksheet, s.row, s.column) ? !0 : ns(t);
1320
- })) : Te(!0);
1321
- }, Fn = (t) => {
1322
- const e = Or(t, { workbookTypes: [kt], worksheetTypes: [Tt, wn, xt], rangeTypes: [Nt] }, !0), n = t.get(K), r = t.get(Ot), i = t.has(ne) ? t.get(ne) : null, o = n.focused$.pipe(
1327
+ return !(c != null && c.worksheet) || Ht(c.worksheet, s.row, s.column) ? !0 : ts(t);
1328
+ })) : xe(!0);
1329
+ }, An = (t) => {
1330
+ const e = wr(t, { workbookTypes: [Ot], worksheetTypes: [Tt, wn, xt], rangeTypes: [Nt] }, !0), n = t.get(K), r = t.get(kt), i = t.has(ne) ? t.get(ne) : null, o = n.focused$.pipe(
1323
1331
  ln((s) => !!s),
1324
- le((s) => n.getUnit(s, O.UNIVER_SHEET)),
1332
+ le((s) => n.getUnit(s, k.UNIVER_SHEET)),
1325
1333
  ln((s) => !!s),
1326
1334
  ue((s) => s.activeSheet$),
1327
1335
  ue((s) => r.selectionMoveEnd$.pipe(le((c) => s && { selections: c, sheet: s }))),
@@ -1331,94 +1339,91 @@ const Ht = (t, e, n) => {
1331
1339
  const { selections: c, sheet: u } = s;
1332
1340
  if (!c.length)
1333
1341
  return !0;
1334
- const d = c[0].range.startRow, l = c[0].range.startColumn;
1335
- if (Ht(u, d, l))
1342
+ const p = c[0].range.startRow, l = c[0].range.startColumn;
1343
+ if (Ht(u, p, l))
1336
1344
  return !0;
1337
1345
  }),
1338
1346
  ue((s) => {
1339
1347
  if (s)
1340
- return Te(!0);
1341
- const c = (i ? i.visible$ : Te(null)).pipe(le((d) => d != null && d.visible ? yt : void 0)), u = t.get(In).subscribeContextValue$(ar);
1342
- return ci([c, u]).pipe(
1348
+ return xe(!0);
1349
+ const c = (i ? i.visible$ : xe(null)).pipe(le((p) => p != null && p.visible ? Ce : void 0)), u = t.get(Cn).subscribeContextValue$(or);
1350
+ return ai([c, u]).pipe(
1343
1351
  ue(
1344
- ([d, l]) => d ? l ? Te(!0) : jt(t, d) : Te(!1)
1352
+ ([p, l]) => p ? l ? xe(!0) : jt(t, p) : xe(!1)
1345
1353
  )
1346
1354
  );
1347
1355
  })
1348
1356
  );
1349
1357
  return e.pipe(
1350
- li(),
1358
+ ci(),
1351
1359
  ue((s) => o.pipe(le((c) => s || c)))
1352
1360
  );
1353
- }, ze = {
1361
+ }, Xe = {
1354
1362
  commandId: $t.id,
1355
- type: kn.BUTTON,
1356
- positions: [Tn.CONTEXT_MENU],
1363
+ type: On.BUTTON,
1357
1364
  title: "hyperLink.menu.add",
1358
1365
  icon: "LinkSingle"
1359
- }, Ye = (t) => `${t}-zen-editor`, rs = (t) => ({
1360
- ...ze,
1361
- id: ze.commandId,
1362
- hidden$: lt(t, O.UNIVER_SHEET),
1363
- disabled$: Fn(t)
1366
+ }, qe = (t) => `${t}-zen-editor`, ns = (t) => ({
1367
+ ...Xe,
1368
+ id: Xe.commandId,
1369
+ hidden$: dt(t, k.UNIVER_SHEET),
1370
+ disabled$: An(t)
1364
1371
  // disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetInsertHyperlinkPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })),
1365
- }), is = (t) => ({
1366
- ...ze,
1367
- id: Ye(ze.commandId),
1368
- hidden$: lt(t, O.UNIVER_DOC, x),
1372
+ }), rs = (t) => ({
1373
+ ...Xe,
1374
+ id: qe(Xe.commandId),
1375
+ hidden$: dt(t, k.UNIVER_DOC, x),
1369
1376
  disabled$: jt(t)
1370
- }), Xe = {
1377
+ }), Je = {
1371
1378
  tooltip: "hyperLink.form.addTitle",
1372
- positions: Tn.TOOLBAR_START,
1373
- group: Yr.TOOLBAR_OTHERS,
1374
1379
  commandId: pe.id,
1375
- type: kn.BUTTON,
1380
+ type: On.BUTTON,
1376
1381
  icon: "LinkSingle"
1377
- }, ss = (t) => ({
1378
- ...Xe,
1379
- id: Xe.commandId,
1380
- hidden$: lt(t, O.UNIVER_SHEET),
1381
- disabled$: Fn(t)
1382
- }), os = (t) => ({
1383
- ...Xe,
1384
- id: Ye(Xe.commandId),
1385
- hidden$: lt(t, O.UNIVER_DOC, x),
1382
+ }, is = (t) => ({
1383
+ ...Je,
1384
+ id: Je.commandId,
1385
+ hidden$: dt(t, k.UNIVER_SHEET),
1386
+ disabled$: An(t)
1387
+ }), ss = (t) => ({
1388
+ ...Je,
1389
+ id: qe(Je.commandId),
1390
+ hidden$: dt(t, k.UNIVER_DOC, x),
1386
1391
  disabled$: jt(t)
1387
- }), Wn = {
1392
+ }), Fn = {
1388
1393
  id: pe.id,
1389
- binding: Rt.K | Xr.CTRL_COMMAND,
1390
- preconditions: wr
1394
+ binding: Rt.K | zr.CTRL_COMMAND,
1395
+ preconditions: br
1391
1396
  };
1392
- var as = Object.defineProperty, cs = Object.getOwnPropertyDescriptor, ls = (t, e, n, r) => {
1393
- for (var i = r > 1 ? void 0 : r ? cs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1397
+ var os = Object.defineProperty, as = Object.getOwnPropertyDescriptor, cs = (t, e, n, r) => {
1398
+ for (var i = r > 1 ? void 0 : r ? as(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1394
1399
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
1395
- return r && i && as(e, n, i), i;
1400
+ return r && i && os(e, n, i), i;
1396
1401
  }, mn = (t, e) => (n, r) => e(n, r, t);
1397
- let qe = class extends z {
1402
+ let Qe = class extends z {
1398
1403
  constructor(t, e) {
1399
1404
  super(), this._autoFillService = t, this._hyperLinkModel = e, this._initAutoFill();
1400
1405
  }
1401
1406
  // eslint-disable-next-line max-lines-per-function
1402
1407
  _initAutoFill() {
1403
1408
  const t = () => ({ redos: [], undos: [] }), e = (r, i) => {
1404
- const { source: o, target: s, unitId: c, subUnitId: u } = r, d = Et([o, s]), [l, g] = d.ranges, { mapFunc: p } = d, v = {
1409
+ const { source: o, target: s, unitId: c, subUnitId: u } = r, p = Et([o, s]), [l, h] = p.ranges, { mapFunc: d } = p, v = {
1405
1410
  row: l.startRow,
1406
1411
  col: l.startColumn
1407
- }, C = Tr(l, g), _ = [], b = [];
1408
- return C.forEach((a) => {
1412
+ }, I = Or(l, h), _ = [], b = [];
1413
+ return I.forEach((a) => {
1409
1414
  const w = a.repeatStartCell, M = a.relativeRange, P = {
1410
1415
  startRow: v.row,
1411
1416
  startColumn: v.col,
1412
1417
  endColumn: v.col,
1413
1418
  endRow: v.row
1414
- }, k = {
1419
+ }, O = {
1415
1420
  startRow: w.row,
1416
1421
  startColumn: w.col,
1417
1422
  endColumn: w.col,
1418
1423
  endRow: w.row
1419
1424
  };
1420
- Cn.foreach(M, (q, D) => {
1421
- const ie = Ie.getPositionRange(
1425
+ In.foreach(M, (q, D) => {
1426
+ const ie = ye.getPositionRange(
1422
1427
  {
1423
1428
  startRow: q,
1424
1429
  startColumn: D,
@@ -1426,43 +1431,43 @@ let qe = class extends z {
1426
1431
  endRow: q
1427
1432
  },
1428
1433
  P
1429
- ), { row: ye, col: He } = p(ie.startRow, ie.startColumn), se = this._hyperLinkModel.getHyperLinkByLocation(c, u, ye, He), Ee = Ie.getPositionRange(
1434
+ ), { row: Ee, col: $e } = d(ie.startRow, ie.startColumn), se = this._hyperLinkModel.getHyperLinkByLocation(c, u, Ee, $e), Re = ye.getPositionRange(
1430
1435
  {
1431
1436
  startRow: q,
1432
1437
  startColumn: D,
1433
1438
  endColumn: D,
1434
1439
  endRow: q
1435
1440
  },
1436
- k
1437
- ), { row: Re, col: Pe } = p(Ee.startRow, Ee.startColumn), oe = Ce.generateRandomId(), j = this._hyperLinkModel.getHyperLinkByLocation(c, u, Re, Pe);
1441
+ O
1442
+ ), { row: Pe, col: Le } = d(Re.startRow, Re.startColumn), oe = Ie.generateRandomId(), j = this._hyperLinkModel.getHyperLinkByLocation(c, u, Pe, Le);
1438
1443
  j && _.push({
1439
- id: xe.id,
1444
+ id: Ne.id,
1440
1445
  params: {
1441
1446
  unitId: c,
1442
1447
  subUnitId: u,
1443
1448
  id: j.id
1444
1449
  }
1445
- }), (we.COPY === i || we.SERIES === i) && se && (_.push({
1446
- id: Ne.id,
1450
+ }), (ke.COPY === i || ke.SERIES === i) && se && (_.push({
1451
+ id: Me.id,
1447
1452
  params: {
1448
1453
  unitId: c,
1449
1454
  subUnitId: u,
1450
1455
  link: {
1451
1456
  ...se,
1452
1457
  id: oe,
1453
- row: Re,
1454
- column: Pe
1458
+ row: Pe,
1459
+ column: Le
1455
1460
  }
1456
1461
  }
1457
1462
  }), b.push({
1458
- id: xe.id,
1463
+ id: Ne.id,
1459
1464
  params: {
1460
1465
  unitId: c,
1461
1466
  subUnitId: u,
1462
1467
  id: oe
1463
1468
  }
1464
1469
  })), j && b.push({
1465
- id: Ne.id,
1470
+ id: Me.id,
1466
1471
  params: {
1467
1472
  unitId: c,
1468
1473
  subUnitId: u,
@@ -1476,29 +1481,29 @@ let qe = class extends z {
1476
1481
  };
1477
1482
  }, n = {
1478
1483
  id: Mt,
1479
- onFillData: (r, i, o) => o === we.COPY || o === we.ONLY_FORMAT || o === we.SERIES ? e(r, o) : t()
1484
+ onFillData: (r, i, o) => o === ke.COPY || o === ke.ONLY_FORMAT || o === ke.SERIES ? e(r, o) : t()
1480
1485
  };
1481
1486
  this.disposeWithMe(this._autoFillService.addHook(n));
1482
1487
  }
1483
1488
  };
1484
- qe = ls([
1489
+ Qe = cs([
1485
1490
  mn(0, kr),
1486
- mn(1, R(at))
1487
- ], qe);
1488
- var us = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, ps = (t, e, n, r) => {
1489
- for (var i = r > 1 ? void 0 : r ? ds(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1491
+ mn(1, R(lt))
1492
+ ], Qe);
1493
+ var ls = Object.defineProperty, us = Object.getOwnPropertyDescriptor, ds = (t, e, n, r) => {
1494
+ for (var i = r > 1 ? void 0 : r ? us(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1490
1495
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
1491
- return r && i && us(e, n, i), i;
1492
- }, It = (t, e) => (n, r) => e(n, r, t);
1493
- let Je = class extends z {
1496
+ return r && i && ls(e, n, i), i;
1497
+ }, yt = (t, e) => (n, r) => e(n, r, t);
1498
+ let et = class extends z {
1494
1499
  constructor(t, e, n) {
1495
1500
  super(), this._localeService = t, this._commandService = e, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
1496
1501
  }
1497
1502
  _commandExecutedListener() {
1498
1503
  this.disposeWithMe(
1499
1504
  this._commandService.beforeCommandExecuted((t) => {
1500
- t.id === Wn.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1501
- workbookTypes: [kt],
1505
+ t.id === Fn.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1506
+ workbookTypes: [Ot],
1502
1507
  rangeTypes: [Nt],
1503
1508
  worksheetTypes: [Tt, wn, xt]
1504
1509
  }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
@@ -1506,22 +1511,22 @@ let Je = class extends z {
1506
1511
  );
1507
1512
  }
1508
1513
  };
1509
- Je = ps([
1510
- It(0, R(it)),
1511
- It(1, re),
1512
- It(2, R(En))
1513
- ], Je);
1514
- var hs = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, ms = (t, e, n, r) => {
1515
- for (var i = r > 1 ? void 0 : r ? gs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1514
+ et = ds([
1515
+ yt(0, R(ot)),
1516
+ yt(1, re),
1517
+ yt(2, R(En))
1518
+ ], et);
1519
+ var ps = Object.defineProperty, hs = Object.getOwnPropertyDescriptor, gs = (t, e, n, r) => {
1520
+ for (var i = r > 1 ? void 0 : r ? hs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1516
1521
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
1517
- return r && i && hs(e, n, i), i;
1522
+ return r && i && ps(e, n, i), i;
1518
1523
  }, Z = (t, e) => (n, r) => e(n, r, t);
1519
- let Qe = class extends z {
1520
- constructor(t, e, n, r, i, o, s, c, u, d) {
1521
- super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = r, this._sheetPermissionInterceptorBaseController = i, this._commandService = o, this._editorBridgeService = s, this._textSelectionManagerService = c, this._univerInstanceService = u, this._zenZoneService = d, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1524
+ let tt = class extends z {
1525
+ constructor(t, e, n, r, i, o, s, c, u, p) {
1526
+ super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = r, this._sheetPermissionInterceptorBaseController = i, this._commandService = o, this._editorBridgeService = s, this._textSelectionManagerService = c, this._univerInstanceService = u, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1522
1527
  }
1523
1528
  _getLinkPermission(t) {
1524
- const { unitId: e, subUnitId: n, row: r, col: i } = t, o = this._univerInstanceService.getUnit(e, O.UNIVER_SHEET);
1529
+ const { unitId: e, subUnitId: n, row: r, col: i } = t, o = this._univerInstanceService.getUnit(e, k.UNIVER_SHEET);
1525
1530
  if (!(o == null ? void 0 : o.getSheetBySheetId(n)))
1526
1531
  return {
1527
1532
  viewPermission: !1,
@@ -1529,24 +1534,24 @@ let Qe = class extends z {
1529
1534
  copyPermission: !1
1530
1535
  };
1531
1536
  const c = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1532
- workbookTypes: [Dr],
1533
- worksheetTypes: [$r],
1534
- rangeTypes: [jr]
1537
+ workbookTypes: [Hr],
1538
+ worksheetTypes: [Dr],
1539
+ rangeTypes: [$r]
1535
1540
  }, [{ startRow: r, startColumn: i, endRow: r, endColumn: i }]), u = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1536
- workbookTypes: [kt],
1541
+ workbookTypes: [Ot],
1537
1542
  worksheetTypes: [Tt, xt],
1538
1543
  rangeTypes: [Nt]
1539
- }, [{ startRow: r, startColumn: i, endRow: r, endColumn: i }]), d = this._permissionService.composePermission([new Vr(e).id, new Br(e, n).id]).every((l) => l.value);
1544
+ }, [{ startRow: r, startColumn: i, endRow: r, endColumn: i }]), p = this._permissionService.composePermission([new jr(e).id, new Vr(e, n).id]).every((l) => l.value);
1540
1545
  return {
1541
1546
  viewPermission: c,
1542
1547
  editPermission: u,
1543
- copyPermission: d
1548
+ copyPermission: p
1544
1549
  };
1545
1550
  }
1546
1551
  _initHoverListener() {
1547
1552
  this.disposeWithMe(
1548
1553
  // hover over not editing cell
1549
- this._hoverManagerService.currentRichText$.pipe(Be(200)).subscribe((t) => {
1554
+ this._hoverManagerService.currentRichText$.pipe(Fe(200)).subscribe((t) => {
1550
1555
  var P;
1551
1556
  if (!t) {
1552
1557
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
@@ -1555,30 +1560,30 @@ let Qe = class extends z {
1555
1560
  const { unitId: e, subUnitId: n, row: r, col: i } = t, o = this._renderManagerService.getRenderById(e);
1556
1561
  if (!o)
1557
1562
  return;
1558
- const s = this._univerInstanceService.getUnit(e, O.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(n);
1563
+ const s = this._univerInstanceService.getUnit(e, k.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(n);
1559
1564
  if (!c)
1560
1565
  return;
1561
- if (!o.with(Nr).active) {
1566
+ if (!o.with(xr).active) {
1562
1567
  this._sheetsHyperLinkPopupService.hideCurrentPopup(f.VIEWING);
1563
1568
  return;
1564
1569
  }
1565
- const d = (P = o == null ? void 0 : o.with(sn).getWorksheetSkeleton(n)) == null ? void 0 : P.skeleton, l = i, g = r;
1566
- let p = g, v = l;
1567
- d && d.overflowCache.forValue((k, q, D) => {
1568
- Ie.contains(D, { startColumn: l, endColumn: l, startRow: g, endRow: g }) && (p = k, v = q);
1570
+ const p = (P = o == null ? void 0 : o.with(sn).getWorksheetSkeleton(n)) == null ? void 0 : P.skeleton, l = i, h = r;
1571
+ let d = h, v = l;
1572
+ p && p.overflowCache.forValue((O, q, D) => {
1573
+ ye.contains(D, { startColumn: l, endColumn: l, startRow: h, endRow: h }) && (d = O, v = q);
1569
1574
  });
1570
- const { viewPermission: C, editPermission: _, copyPermission: b } = this._getLinkPermission(t);
1571
- if (!C) {
1575
+ const { viewPermission: I, editPermission: _, copyPermission: b } = this._getLinkPermission(t);
1576
+ if (!I) {
1572
1577
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1573
1578
  return;
1574
1579
  }
1575
- const a = c.getCellStyleOnly(p, v), w = s.getStyles().getStyleByCell(a), M = w == null ? void 0 : w.tr;
1580
+ const a = c.getCellStyleOnly(d, v), w = s.getStyles().getStyleByCell(a), M = w == null ? void 0 : w.tr;
1576
1581
  if (!M && !t.customRange) {
1577
1582
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1578
1583
  return;
1579
1584
  }
1580
1585
  this._sheetsHyperLinkPopupService.showPopup({
1581
- row: p,
1586
+ row: d,
1582
1587
  col: v,
1583
1588
  editPermission: _,
1584
1589
  copyPermission: b,
@@ -1596,7 +1601,7 @@ let Qe = class extends z {
1596
1601
  let t = null;
1597
1602
  this.disposeWithMe(
1598
1603
  this._editorBridgeService.currentEditCellState$.pipe(ue((e) => this._editorBridgeService.visible$.pipe(le((n) => ({ visible: n, state: e }))))).subscribe(({ visible: e, state: n }) => {
1599
- if (!n || n.editorUnitId !== yt)
1604
+ if (!n || n.editorUnitId !== Ce)
1600
1605
  return;
1601
1606
  if (!e.visible) {
1602
1607
  t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(f.EDITING), this._sheetsHyperLinkPopupService.endEditing(f.EDITING);
@@ -1605,15 +1610,15 @@ let Qe = class extends z {
1605
1610
  const { editorUnitId: r, unitId: i, sheetId: o, row: s, column: c } = n, u = this._renderManagerService.getRenderById(r);
1606
1611
  if (!u)
1607
1612
  return;
1608
- const { editPermission: d, viewPermission: l, copyPermission: g } = this._getLinkPermission({ unitId: i, subUnitId: o, row: s, col: c }), p = u.with(cn);
1609
- l && (t == null || t.unsubscribe(), t = p.hoverCustomRanges$.pipe(Be(200)).subscribe((v) => {
1613
+ const { editPermission: p, viewPermission: l, copyPermission: h } = this._getLinkPermission({ unitId: i, subUnitId: o, row: s, col: c }), d = u.with(cn);
1614
+ l && (t == null || t.unsubscribe(), t = d.hoverCustomRanges$.pipe(Fe(200)).subscribe((v) => {
1610
1615
  var w, M;
1611
- const C = v.find((P) => P.range.rangeType === Me.HYPERLINK);
1612
- if (!C) {
1616
+ const I = v.find((P) => P.range.rangeType === Ue.HYPERLINK);
1617
+ if (!I) {
1613
1618
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1614
1619
  return;
1615
1620
  }
1616
- const _ = C.rects[C.rects.length - 1];
1621
+ const _ = I.rects[I.rects.length - 1];
1617
1622
  if (!((M = (w = this._renderManagerService.getRenderById(i)) == null ? void 0 : w.with(sn).getWorksheetSkeleton(o)) == null ? void 0 : M.skeleton) || !_)
1618
1623
  return;
1619
1624
  const a = u.engine.getCanvasElement().getBoundingClientRect();
@@ -1622,15 +1627,15 @@ let Qe = class extends z {
1622
1627
  subUnitId: o,
1623
1628
  row: s,
1624
1629
  col: c,
1625
- customRange: C.range,
1630
+ customRange: I.range,
1626
1631
  customRangeRect: {
1627
1632
  left: _.left + a.left,
1628
1633
  top: _.top + a.top,
1629
1634
  bottom: _.bottom + a.top,
1630
1635
  right: _.right + a.left
1631
1636
  },
1632
- editPermission: d,
1633
- copyPermission: g,
1637
+ editPermission: p,
1638
+ copyPermission: h,
1634
1639
  type: f.EDITING
1635
1640
  });
1636
1641
  }));
@@ -1648,14 +1653,14 @@ let Qe = class extends z {
1648
1653
  this._univerInstanceService.focused$.pipe(
1649
1654
  ue((t) => {
1650
1655
  const e = t === x ? this._renderManagerService.getRenderById(t) : null;
1651
- return e ? e.with(cn).hoverCustomRanges$.pipe(Be(200)) : new ui((n) => {
1656
+ return e ? e.with(cn).hoverCustomRanges$.pipe(Fe(200)) : new li((n) => {
1652
1657
  n.next(null);
1653
1658
  });
1654
1659
  })
1655
1660
  ).subscribe((t) => {
1656
- const e = t == null ? void 0 : t.find((r) => r.range.rangeType === Me.HYPERLINK), n = this._editorBridgeService.getEditCellState();
1661
+ const e = t == null ? void 0 : t.find((r) => r.range.rangeType === Ue.HYPERLINK), n = this._editorBridgeService.getEditCellState();
1657
1662
  if (e && n) {
1658
- const { unitId: r, sheetId: i, row: o, column: s } = n, { editPermission: c, viewPermission: u, copyPermission: d } = this._getLinkPermission({ unitId: r, subUnitId: i, row: o, col: s });
1663
+ const { unitId: r, sheetId: i, row: o, column: s } = n, { editPermission: c, viewPermission: u, copyPermission: p } = this._getLinkPermission({ unitId: r, subUnitId: i, row: o, col: s });
1659
1664
  u && this._sheetsHyperLinkPopupService.showPopup({
1660
1665
  type: f.ZEN_EDITOR,
1661
1666
  unitId: r,
@@ -1664,7 +1669,7 @@ let Qe = class extends z {
1664
1669
  col: s,
1665
1670
  customRange: e.range,
1666
1671
  editPermission: c,
1667
- copyPermission: d
1672
+ copyPermission: p
1668
1673
  });
1669
1674
  } else
1670
1675
  this._sheetsHyperLinkPopupService.hideCurrentPopup(f.ZEN_EDITOR);
@@ -1674,33 +1679,33 @@ let Qe = class extends z {
1674
1679
  _initTextSelectionListener() {
1675
1680
  this.disposeWithMe(
1676
1681
  this._textSelectionManagerService.textSelection$.subscribe((t) => {
1677
- t && t.unitId === yt && this._sheetsHyperLinkPopupService.endEditing(f.EDITING);
1682
+ t && t.unitId === Ce && this._sheetsHyperLinkPopupService.endEditing(f.EDITING);
1678
1683
  })
1679
1684
  );
1680
1685
  }
1681
1686
  _initCommandListener() {
1682
- const t = [Ar.id, Fr.id, Wr.id];
1687
+ const t = [Br.id, Ar.id, Fr.id];
1683
1688
  this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
1684
1689
  t.includes(e.id) && this._sheetsHyperLinkPopupService.hideCurrentPopup();
1685
1690
  }));
1686
1691
  }
1687
1692
  };
1688
- Qe = ms([
1689
- Z(0, R(xr)),
1693
+ tt = gs([
1694
+ Z(0, R(Tr)),
1690
1695
  Z(1, R(G)),
1691
- Z(2, R(ut)),
1692
- Z(3, R(cr)),
1696
+ Z(2, R(De)),
1697
+ Z(3, R(ar)),
1693
1698
  Z(4, R(En)),
1694
1699
  Z(5, re),
1695
1700
  Z(6, ne),
1696
- Z(7, R(Ue)),
1701
+ Z(7, R(He)),
1697
1702
  Z(8, K),
1698
- Z(9, ct)
1699
- ], Qe);
1700
- var fs = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, Zn = (t, e, n, r) => {
1701
- for (var i = r > 1 ? void 0 : r ? vs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1703
+ Z(9, ut)
1704
+ ], tt);
1705
+ var ms = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, Wn = (t, e, n, r) => {
1706
+ for (var i = r > 1 ? void 0 : r ? fs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1702
1707
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
1703
- return r && i && fs(e, n, i), i;
1708
+ return r && i && ms(e, n, i), i;
1704
1709
  }, Lt = (t, e) => (n, r) => e(n, r, t);
1705
1710
  let bt = class extends z {
1706
1711
  constructor(t, e) {
@@ -1711,24 +1716,24 @@ let bt = class extends z {
1711
1716
  var e;
1712
1717
  (e = this._context.mainComponent) == null || e.makeForceDirty();
1713
1718
  };
1714
- this.disposeWithMe(this._hyperLinkModel.linkUpdate$.pipe(Be(16)).subscribe(() => {
1719
+ this.disposeWithMe(this._hyperLinkModel.linkUpdate$.pipe(Fe(16)).subscribe(() => {
1715
1720
  t();
1716
1721
  }));
1717
1722
  }
1718
1723
  };
1719
- bt = Zn([
1720
- Lt(1, R(at))
1724
+ bt = Wn([
1725
+ Lt(1, R(lt))
1721
1726
  ], bt);
1722
- let et = class extends z {
1727
+ let nt = class extends z {
1723
1728
  constructor(t, e) {
1724
1729
  super(), this._sheetInterceptorService = t, this._hyperLinkModel = e, this._initViewModelIntercept();
1725
1730
  }
1726
1731
  _initViewModelIntercept() {
1727
1732
  this.disposeWithMe(
1728
1733
  this._sheetInterceptorService.intercept(
1729
- Gr.CELL_CONTENT,
1734
+ Zr.CELL_CONTENT,
1730
1735
  {
1731
- effect: lr.Value,
1736
+ effect: cr.Value,
1732
1737
  priority: 100,
1733
1738
  handler: (t, e, n) => {
1734
1739
  const { row: r, col: i, unitId: o, subUnitId: s } = e, c = this._hyperLinkModel.getHyperLinkByLocation(o, s, r, i);
@@ -1743,48 +1748,48 @@ let et = class extends z {
1743
1748
  );
1744
1749
  }
1745
1750
  };
1746
- et = Zn([
1747
- Lt(0, R(Zr)),
1748
- Lt(1, R(at))
1749
- ], et);
1750
- const _s = {
1751
- [qr.OTHERS]: {
1751
+ nt = Wn([
1752
+ Lt(0, R(Wr)),
1753
+ Lt(1, R(lt))
1754
+ ], nt);
1755
+ const vs = {
1756
+ [Yr.OTHERS]: {
1752
1757
  [pe.id]: {
1753
1758
  order: 2,
1754
- menuItemFactory: ss
1759
+ menuItemFactory: is
1755
1760
  },
1756
- [Ye(pe.id)]: {
1761
+ [qe(pe.id)]: {
1757
1762
  order: 2,
1758
- menuItemFactory: os
1763
+ menuItemFactory: ss
1759
1764
  }
1760
1765
  },
1761
- [Jr.MAIN_AREA]: {
1762
- [Qr.OTHERS]: {
1766
+ [Xr.MAIN_AREA]: {
1767
+ [qr.OTHERS]: {
1763
1768
  order: 1,
1764
1769
  [pe.id]: {
1765
1770
  order: 0,
1766
- menuItemFactory: rs
1771
+ menuItemFactory: ns
1767
1772
  },
1768
- [Ye(pe.id)]: {
1773
+ [qe(pe.id)]: {
1769
1774
  order: 0,
1770
- menuItemFactory: is
1775
+ menuItemFactory: rs
1771
1776
  }
1772
1777
  }
1773
1778
  }
1774
1779
  };
1775
- var Ss = Object.defineProperty, Cs = Object.getOwnPropertyDescriptor, Is = (t, e, n, r) => {
1776
- for (var i = r > 1 ? void 0 : r ? Cs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1780
+ var _s = Object.defineProperty, Ss = Object.getOwnPropertyDescriptor, Is = (t, e, n, r) => {
1781
+ for (var i = r > 1 ? void 0 : r ? Ss(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1777
1782
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
1778
- return r && i && Ss(e, n, i), i;
1783
+ return r && i && _s(e, n, i), i;
1779
1784
  }, Oe = (t, e) => (n, r) => e(n, r, t);
1780
- let tt = class extends z {
1785
+ let rt = class extends z {
1781
1786
  constructor(t, e, n, r, i) {
1782
1787
  super(), this._componentManager = t, this._commandService = e, this._menuManagerService = n, this._injector = r, this._shortcutService = i, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1783
1788
  }
1784
1789
  _initComponents() {
1785
1790
  [
1786
- [Ge, Ge.componentKey],
1787
- [Ze, Ze.componentKey],
1791
+ [ze, ze.componentKey],
1792
+ [Ke, Ke.componentKey],
1788
1793
  [Ut, "LinkSingle"]
1789
1794
  ].forEach(([t, e]) => {
1790
1795
  this._componentManager.register(e, t);
@@ -1793,7 +1798,7 @@ let tt = class extends z {
1793
1798
  _initCommands() {
1794
1799
  [
1795
1800
  Dt,
1796
- Ke,
1801
+ Ye,
1797
1802
  $t,
1798
1803
  pe
1799
1804
  ].forEach((t) => {
@@ -1801,25 +1806,25 @@ let tt = class extends z {
1801
1806
  });
1802
1807
  }
1803
1808
  _initMenus() {
1804
- this._menuManagerService.mergeMenu(_s);
1809
+ this._menuManagerService.mergeMenu(vs);
1805
1810
  }
1806
1811
  _initShortCut() {
1807
- this._shortcutService.registerShortcut(Wn);
1812
+ this._shortcutService.registerShortcut(Fn);
1808
1813
  }
1809
1814
  };
1810
- tt = Is([
1811
- Oe(0, R(ei)),
1815
+ rt = Is([
1816
+ Oe(0, R(Jr)),
1812
1817
  Oe(1, re),
1813
- Oe(2, ni),
1814
- Oe(3, R(st)),
1815
- Oe(4, R(ti))
1816
- ], tt);
1817
- var ys = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Rs = (t, e, n, r) => {
1818
- for (var i = r > 1 ? void 0 : r ? Es(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1818
+ Oe(2, ei),
1819
+ Oe(3, R(at)),
1820
+ Oe(4, R(Qr))
1821
+ ], rt);
1822
+ var Cs = Object.defineProperty, ys = Object.getOwnPropertyDescriptor, Es = (t, e, n, r) => {
1823
+ for (var i = r > 1 ? void 0 : r ? ys(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1819
1824
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
1820
- return r && i && ys(e, n, i), i;
1825
+ return r && i && Cs(e, n, i), i;
1821
1826
  }, fn = (t, e) => (n, r) => e(n, r, t);
1822
- let nt = class extends z {
1827
+ let it = class extends z {
1823
1828
  constructor(t, e) {
1824
1829
  super(), this._parserService = t, this._resolverService = e, this._handleInitUrl();
1825
1830
  }
@@ -1831,57 +1836,57 @@ let nt = class extends z {
1831
1836
  }
1832
1837
  }
1833
1838
  };
1834
- nt = Rs([
1839
+ it = Es([
1835
1840
  fn(0, R(wt)),
1836
1841
  fn(1, R(he))
1837
- ], nt);
1838
- var Gn = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, Ls = (t, e, n) => e in t ? Gn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, bs = (t, e, n, r) => {
1839
- for (var i = r > 1 ? void 0 : r ? Ps(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1842
+ ], it);
1843
+ var Zn = Object.defineProperty, Rs = Object.getOwnPropertyDescriptor, Ps = (t, e, n) => e in t ? Zn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ls = (t, e, n, r) => {
1844
+ for (var i = r > 1 ? void 0 : r ? Rs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1840
1845
  (s = t[o]) && (i = (r ? s(e, n, i) : s(i)) || i);
1841
- return r && i && Gn(e, n, i), i;
1842
- }, vn = (t, e) => (n, r) => e(n, r, t), Kn = (t, e, n) => Ls(t, typeof e != "symbol" ? e + "" : e, n);
1843
- let rt = class extends dr {
1844
- constructor(t = vi, e, n) {
1846
+ return r && i && Zn(e, n, i), i;
1847
+ }, vn = (t, e) => (n, r) => e(n, r, t), Gn = (t, e, n) => Ps(t, typeof e != "symbol" ? e + "" : e, n);
1848
+ let st = class extends ur {
1849
+ constructor(t = fi, e, n) {
1845
1850
  super(), this._config = t, this._injector = e, this._configService = n;
1846
1851
  const { menu: r, ...i } = this._config;
1847
- r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Nn, i);
1852
+ r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(xn, i);
1848
1853
  }
1849
1854
  onStarting() {
1850
1855
  [
1851
1856
  [he],
1852
1857
  [G],
1853
- [Hn],
1854
- [et],
1855
- [Qe],
1858
+ [Un],
1859
+ [nt],
1856
1860
  [tt],
1857
- [qe],
1858
- [We],
1859
- [Je],
1860
- [nt]
1861
- ].forEach((e) => this._injector.add(e)), this._injector.get(et);
1861
+ [rt],
1862
+ [Qe],
1863
+ [Ge],
1864
+ [et],
1865
+ [it]
1866
+ ].forEach((e) => this._injector.add(e)), this._injector.get(nt);
1862
1867
  }
1863
1868
  onReady() {
1864
- this._injector.get(ut).registerRenderModule(O.UNIVER_SHEET, [bt]), this._injector.get(qe), this._injector.get(We), this._injector.get(tt);
1869
+ this._injector.get(De).registerRenderModule(k.UNIVER_SHEET, [bt]), this._injector.get(Qe), this._injector.get(Ge), this._injector.get(rt);
1865
1870
  }
1866
1871
  onRendered() {
1867
- this._injector.get(Je), this._injector.get(nt), this._injector.get(Qe);
1872
+ this._injector.get(et), this._injector.get(it), this._injector.get(tt);
1868
1873
  }
1869
1874
  };
1870
- Kn(rt, "pluginName", Mt);
1871
- Kn(rt, "type", O.UNIVER_SHEET);
1872
- rt = bs([
1873
- ur(Sr, si),
1874
- vn(1, R(st)),
1875
+ Gn(st, "pluginName", Mt);
1876
+ Gn(st, "type", k.UNIVER_SHEET);
1877
+ st = Ls([
1878
+ lr(_r, ii),
1879
+ vn(1, R(at)),
1875
1880
  vn(2, Sn)
1876
- ], rt);
1881
+ ], st);
1877
1882
  export {
1878
- Ke as CloseHyperLinkPopupOperation,
1883
+ Ye as CloseHyperLinkPopupOperation,
1879
1884
  $t as InsertHyperLinkOperation,
1880
- Wn as InsertLinkShortcut,
1885
+ Fn as InsertLinkShortcut,
1881
1886
  Dt as OpenHyperLinkEditPanelOperation,
1882
- We as SheetsHyperLinkCopyPasteController,
1887
+ Ge as SheetsHyperLinkCopyPasteController,
1883
1888
  G as SheetsHyperLinkPopupService,
1884
1889
  he as SheetsHyperLinkResolverService,
1885
- Hn as SheetsHyperLinkSidePanelService,
1886
- rt as UniverSheetsHyperLinkUIPlugin
1890
+ Un as SheetsHyperLinkSidePanelService,
1891
+ st as UniverSheetsHyperLinkUIPlugin
1887
1892
  };