@univerjs/sheets-hyper-link-ui 0.5.5 → 0.6.0-alpha.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,32 +1,33 @@
1
- var rr = Object.defineProperty;
2
- var ir = (t, e, n) => e in t ? rr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var B = (t, e, n) => ir(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { Tools as Ce, Inject as R, LocaleService as ct, UniverInstanceType as w, isValidRange as Rn, IUniverInstanceService as Y, ICommandService as ie, IConfigService as Ln, RANGE_TYPE as sn, Rectangle as ye, Injector as lt, Disposable as z, Range as Pn, ObjectMatrix as sr, useDependency as E, IContextService as bn, ThemeService as or, DataStreamTreeTokenType as on, CustomRangeType as Ge, BuildTextUtils as Se, ColorKit as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as x, DisposableCollection as cr, FOCUSING_SHEET as Ct, generateRandomId as lr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ie, DataValidationType as It, CommandType as ut, FOCUSING_FX_BAR_EDITOR as ur, IPermissionService as dr, InterceptorEffectEnum as pr, DependentOn as hr, Plugin as gr, merge as fr } from "@univerjs/core";
5
- import { SheetHyperLinkType as S, ERROR_RANGE as mr, HyperLinkModel as dt, RemoveHyperLinkMutation as Ue, AddHyperLinkMutation as He, SheetsHyperLinkParserService as kt, UpdateRichHyperLinkCommand as _r, UpdateHyperLinkCommand as vr, AddRichHyperLinkCommand as Sr, AddHyperLinkCommand as Cr, CancelRichHyperLinkCommand as Ir, CancelHyperLinkCommand as yr, UniverSheetsHyperLinkPlugin as Er } from "@univerjs/sheets-hyper-link";
6
- import { ScrollToRangeOperation as wn, COPY_TYPE as Rr, virtualizeDiscreteRanges as Lt, rangeToDiscreteRange as Lr, PREDEFINED_HOOK_NAME as Ae, getRepeatRange as Pr, ISheetClipboardService as br, IEditorBridgeService as re, IMarkSelectionService as wr, SheetCanvasPopManagerService as Or, getEditingCustomRangePosition as kr, getCustomRangePosition as Tr, whenSheetEditorFocused as xr, getCurrentRangeDisable$ as Nr, IAutoFillService as Mr, APPLY_TYPE as Oe, getAutoFillRepeatRange as Ur, HoverManagerService as Hr, HoverRenderController as Dr, SheetSkeletonManagerService as an } from "@univerjs/sheets-ui";
7
- import { MessageType as xe, FormLayout as _e, Input as cn, Select as yt, Button as ln, Tooltip as Be } from "@univerjs/design";
8
- import { deserializeRangeWithSheet as Fe, IDefinedNamesService as On, serializeRangeWithSheet as $r, serializeRangeToRefString as jr, serializeRange as Ar } from "@univerjs/engine-formula";
9
- import { SetSelectionsOperation as kn, SetWorksheetActiveOperation as Tn, SheetsSelectionsService as Tt, getSheetCommandTarget as xn, WorkbookEditablePermission as xt, WorksheetEditPermission as Nt, WorksheetSetCellValuePermission as Nn, WorksheetInsertHyperlinkPermission as Mt, RangeProtectionPermissionEditPoint as Ut, SheetPermissionCheckController as Mn, WorkbookViewPermission as Br, WorksheetViewPermission as Vr, RangeProtectionPermissionViewPoint as Fr, WorkbookCopyPermission as Wr, WorksheetCopyPermission as Zr, ClearSelectionContentCommand as Gr, ClearSelectionAllCommand as Kr, ClearSelectionFormatCommand as Yr, SheetInterceptorService as zr, INTERCEPTOR_POINT as qr } from "@univerjs/sheets";
10
- import { IMessageService as Un, useObservable as Jr, IZenZoneService as pt, useEvent as Xr, KeyCode as Pt, MenuItemType as Hn, MetaKeys as Qr, getMenuHiddenObservable as ht, RibbonStartGroup as ei, ContextMenuPosition as ti, ContextMenuGroup as ni, ComponentManager as ri, IShortcutService as ii, IMenuManagerService as si } from "@univerjs/ui";
11
- import { DocSelectionRenderService as Dn, DocBackScrollRenderController as oi, DocCanvasPopManagerService as ai, calcDocRangePositions as ci, DocEventManagerService as un, UniverDocsUIPlugin as li } from "@univerjs/docs-ui";
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 Ie, Inject as R, LocaleService as ct, UniverInstanceType as w, isValidRange as In, IUniverInstanceService as Y, ICommandService as ie, IConfigService as yn, RANGE_TYPE as rn, Rectangle as Ee, Injector as lt, Disposable as z, Range as En, ObjectMatrix as nr, useDependency as E, IContextService as Rn, ThemeService as rr, DataStreamTreeTokenType as on, CustomRangeType as Ge, BuildTextUtils as Se, ColorKit as ir, DOCS_ZEN_EDITOR_UNIT_ID_KEY as N, DisposableCollection as or, FOCUSING_SHEET as Ct, generateRandomId as sr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ye, DataValidationType as It, CommandType as ut, FOCUSING_FX_BAR_EDITOR as ar, IPermissionService as cr, InterceptorEffectEnum as lr, DependentOn as ur, Plugin as dr, merge as pr } from "@univerjs/core";
5
+ import { SheetHyperLinkType as S, ERROR_RANGE as hr, HyperLinkModel as dt, RemoveHyperLinkMutation as He, AddHyperLinkMutation as xe, SheetsHyperLinkParserService as kt, UpdateRichHyperLinkCommand as gr, UpdateHyperLinkCommand as fr, AddRichHyperLinkCommand as mr, AddHyperLinkCommand as vr, CancelRichHyperLinkCommand as _r, CancelHyperLinkCommand as Sr, UniverSheetsHyperLinkPlugin as Cr } from "@univerjs/sheets-hyper-link";
6
+ import { ScrollToRangeOperation as Ln, COPY_TYPE as Ir, virtualizeDiscreteRanges as Rt, rangeToDiscreteRange as yr, PREDEFINED_HOOK_NAME as Be, getRepeatRange as Er, ISheetClipboardService as Rr, IEditorBridgeService as re, IMarkSelectionService as Lr, SheetCanvasPopManagerService as Pr, getEditingCustomRangePosition as br, getCustomRangePosition as wr, whenSheetEditorFocused as kr, getCurrentRangeDisable$ as Or, IAutoFillService as Tr, APPLY_TYPE as Oe, getAutoFillRepeatRange as Nr, HoverManagerService as Mr, HoverRenderController as Ur, SheetSkeletonManagerService as sn } from "@univerjs/sheets-ui";
7
+ import { MessageType as Ne, FormLayout as ve, Input as an, Select as yt, Button as cn, Tooltip as Ve } from "@univerjs/design";
8
+ import { deserializeRangeWithSheet as je, IDefinedNamesService as Pn, serializeRangeWithSheet as Hr, serializeRangeToRefString as xr, serializeRange as Dr } from "@univerjs/engine-formula";
9
+ import { SetSelectionsOperation as bn, SetWorksheetActiveOperation as wn, SheetsSelectionsService as Ot, getSheetCommandTarget as kn, WorkbookEditablePermission as Tt, WorksheetEditPermission as Nt, WorksheetSetCellValuePermission as On, WorksheetInsertHyperlinkPermission as Mt, RangeProtectionPermissionEditPoint as Ut, SheetPermissionCheckController as Tn, WorkbookViewPermission as $r, WorksheetViewPermission as Ar, RangeProtectionPermissionViewPoint as Br, WorkbookCopyPermission as Vr, WorksheetCopyPermission as Fr, ClearSelectionContentCommand as jr, ClearSelectionAllCommand as Wr, ClearSelectionFormatCommand as Zr, SheetInterceptorService as Gr, INTERCEPTOR_POINT as Kr } from "@univerjs/sheets";
10
+ import { IMessageService as Nn, useObservable as Yr, IZenZoneService as pt, useEvent as zr, KeyCode as Lt, MenuItemType as Mn, MetaKeys as Xr, getMenuHiddenObservable as ht, 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 Un, DocBackScrollRenderController as ri, DocCanvasPopManagerService as ii, calcDocRangePositions as oi, DocEventManagerService as ln, UniverDocsUIPlugin as si } from "@univerjs/docs-ui";
12
12
  import { IRenderManagerService as $e } from "@univerjs/engine-render";
13
- import { Subject as ui, BehaviorSubject as di, of as Ne, map as le, filter as dn, switchMap as ue, combineLatest as pi, distinctUntilChanged as hi, debounceTime as We, Observable as gi } from "rxjs";
13
+ import { Subject as ai, BehaviorSubject as ci, of as Me, map as le, filter as un, switchMap as ue, combineLatest as li, distinctUntilChanged as ui, debounceTime as We, Observable as di } from "rxjs";
14
14
  import { DocSelectionManagerService as De } from "@univerjs/docs";
15
- import fi, { useState as X, useMemo as pn, useRef as bt, useCallback as mi, useEffect as ne, forwardRef as he, createElement as ge } from "react";
16
- import { RangeSelector as _i } from "@univerjs/sheets-formula-ui";
17
- import { SheetDataValidationModel as hn } from "@univerjs/sheets-data-validation";
15
+ import { jsxs as Ce, jsx as m, Fragment as pi } from "react/jsx-runtime";
16
+ import { RangeSelector as hi } from "@univerjs/sheets-formula-ui";
17
+ import { useState as J, useMemo as dn, useRef as Pt, useCallback as gi, useEffect as ne, forwardRef as he, createElement as ge } from "react";
18
+ import { SheetDataValidationModel as pn } from "@univerjs/sheets-data-validation";
18
19
  function Ke(t) {
19
- return Ce.isLegalUrl(t);
20
+ return Ie.isLegalUrl(t);
20
21
  }
21
- function vi(t) {
22
+ function fi(t) {
22
23
  return /^[a-zA-Z]+:\/\//.test(t);
23
24
  }
24
- function Si(t) {
25
+ function mi(t) {
25
26
  return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
26
27
  }
27
- function Ci(t) {
28
+ function vi(t) {
28
29
  if (Ke(t)) {
29
- const e = vi(t) ? t : Si(t) ? `mailto://${t}` : `http://${t}`;
30
+ const e = fi(t) ? t : mi(t) ? `mailto://${t}` : `http://${t}`;
30
31
  let n;
31
32
  try {
32
33
  n = new URL(e);
@@ -37,24 +38,24 @@ function Ci(t) {
37
38
  }
38
39
  return t;
39
40
  }
40
- const $n = "sheets-hyper-link-ui.config", gn = {};
41
- var Ii = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, Ei = (t, e, n, i) => {
42
- for (var r = i > 1 ? void 0 : i ? yi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
43
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
44
- return i && r && Ii(e, n, r), r;
45
- }, ve = (t, e) => (n, i) => e(n, i, t);
46
- function Ri(t, e) {
41
+ const Hn = "sheets-hyper-link-ui.config", hn = {};
42
+ var _i = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, Ci = (t, e, n, i) => {
43
+ for (var r = i > 1 ? void 0 : i ? Si(e, n) : e, s = t.length - 1, o; s >= 0; s--)
44
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
45
+ return i && r && _i(e, n, r), r;
46
+ }, _e = (t, e) => (n, i) => e(n, i, t);
47
+ function Ii(t, e) {
47
48
  const n = e.getMergeData(), i = e.getMaxColumns() - 1, r = e.getMaxRows() - 1;
48
- if (i < t.endColumn && (t.endColumn = i), r < t.endRow && (t.endRow = r), t.rangeType === sn.COLUMN || sn.ROW)
49
+ if (i < t.endColumn && (t.endColumn = i), r < t.endRow && (t.endRow = r), t.rangeType === rn.COLUMN || rn.ROW)
49
50
  return t;
50
- const o = [];
51
- return n.forEach((s) => {
52
- ye.intersects(t, s) && o.push(s);
53
- }), ye.realUnion(t, ...o);
51
+ const s = [];
52
+ return n.forEach((o) => {
53
+ Ee.intersects(t, o) && s.push(o);
54
+ }), Ee.realUnion(t, ...s);
54
55
  }
55
56
  let pe = class {
56
- constructor(t, e, n, i, r, o) {
57
- this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = i, this._localeService = r, this._configService = o;
57
+ constructor(t, e, n, i, r, s) {
58
+ this._univerInstanceService = t, this._commandService = e, this._definedNamesService = n, this._messageService = i, this._localeService = r, this._configService = s;
58
59
  }
59
60
  navigate(t) {
60
61
  switch (t.type) {
@@ -69,53 +70,53 @@ let pe = class {
69
70
  const { gid: e, range: n, rangeid: i } = t, r = this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
70
71
  if (!r)
71
72
  return;
72
- const o = r.getUnitId();
73
+ const s = r.getUnitId();
73
74
  if (i) {
74
- const s = this._definedNamesService.getValueById(o, i);
75
- if (!s)
75
+ const o = this._definedNamesService.getValueById(s, i);
76
+ if (!o)
76
77
  return;
77
- const { formulaOrRefString: c } = s, l = this._definedNamesService.getWorksheetByRef(o, c);
78
- if (!l) {
78
+ const { formulaOrRefString: c } = o, u = this._definedNamesService.getWorksheetByRef(s, c);
79
+ if (!u) {
79
80
  this._messageService.show({
80
81
  content: this._localeService.t("hyperLink.message.refError"),
81
- type: xe.Error
82
+ type: Ne.Error
82
83
  });
83
84
  return;
84
85
  }
85
- if (l.isSheetHidden()) {
86
+ if (u.isSheetHidden()) {
86
87
  this._messageService.show({
87
88
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
88
- type: xe.Error
89
+ type: Ne.Error
89
90
  });
90
91
  return;
91
92
  }
92
- this.navigateToDefineName(o, i);
93
+ this.navigateToDefineName(s, i);
93
94
  }
94
95
  if (e) {
95
96
  if (n) {
96
- const s = Fe(n);
97
- Rn(s.range) && n !== mr && this.navigateToRange(o, e, s.range);
97
+ const o = je(n);
98
+ In(o.range) && n !== hr && this.navigateToRange(s, e, o.range);
98
99
  return;
99
100
  }
100
- this.navigateToSheetById(o, e);
101
+ this.navigateToSheetById(s, e);
101
102
  }
102
103
  }
103
104
  async navigateToRange(t, e, n, i) {
104
105
  const r = await this.navigateToSheetById(t, e);
105
106
  if (r) {
106
- const o = Ri(n, r);
107
+ const s = Ii(n, r);
107
108
  await this._commandService.executeCommand(
108
- kn.id,
109
+ bn.id,
109
110
  {
110
111
  unitId: t,
111
112
  subUnitId: e,
112
113
  selections: [{
113
- range: o,
114
+ range: s,
114
115
  primary: null
115
116
  }]
116
117
  }
117
- ), await this._commandService.executeCommand(wn.id, {
118
- range: o,
118
+ ), await this._commandService.executeCommand(Ln.id, {
119
+ range: s,
119
120
  forceTop: i
120
121
  });
121
122
  }
@@ -132,10 +133,10 @@ let pe = class {
132
133
  const r = n.getSheetBySheetId(e);
133
134
  return r ? n.getHiddenWorksheets().indexOf(e) > -1 ? (this._messageService.show({
134
135
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
135
- type: xe.Error
136
- }), !1) : await this._commandService.executeCommand(Tn.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
136
+ type: Ne.Error
137
+ }), !1) : await this._commandService.executeCommand(wn.id, { unitId: t, subUnitId: e }) ? r : !1 : (this._messageService.show({
137
138
  content: this._localeService.t("hyperLink.message.noSheet"),
138
- type: xe.Error
139
+ type: Ne.Error
139
140
  }), !1);
140
141
  }
141
142
  async navigateToDefineName(t, e) {
@@ -143,31 +144,31 @@ let pe = class {
143
144
  }
144
145
  async navigateToOtherWebsite(t) {
145
146
  var n;
146
- const e = this._configService.getConfig($n);
147
+ const e = this._configService.getConfig(Hn);
147
148
  if ((n = e == null ? void 0 : e.urlHandler) != null && n.navigateToOtherWebsite)
148
149
  return e.urlHandler.navigateToOtherWebsite(t);
149
150
  window.open(t, "_blank", "noopener noreferrer");
150
151
  }
151
152
  };
152
- pe = Ei([
153
- ve(0, Y),
154
- ve(1, ie),
155
- ve(2, On),
156
- ve(3, Un),
157
- ve(4, R(ct)),
158
- ve(5, Ln)
153
+ pe = Ci([
154
+ _e(0, Y),
155
+ _e(1, ie),
156
+ _e(2, Pn),
157
+ _e(3, Nn),
158
+ _e(4, R(ct)),
159
+ _e(5, yn)
159
160
  ], pe);
160
161
  const Ht = "SHEET_HYPER_LINK_UI_PLUGIN";
161
- var Li = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, bi = (t, e, n, i) => {
162
- for (var r = i > 1 ? void 0 : i ? Pi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
163
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
164
- return i && r && Li(e, n, r), r;
165
- }, Ve = (t, e) => (n, i) => e(n, i, t);
162
+ var yi = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, Ri = (t, e, n, i) => {
163
+ for (var r = i > 1 ? void 0 : i ? Ei(e, n) : e, s = t.length - 1, o; s >= 0; s--)
164
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
165
+ return i && r && yi(e, n, r), r;
166
+ }, Fe = (t, e) => (n, i) => e(n, i, t);
166
167
  let Ye = class extends z {
167
168
  constructor(e, n, i, r) {
168
169
  super();
169
- B(this, "_plainTextFilter", /* @__PURE__ */ new Set());
170
- B(this, "_copyInfo");
170
+ V(this, "_plainTextFilter", /* @__PURE__ */ new Set());
171
+ V(this, "_copyInfo");
171
172
  this._sheetClipboardService = e, this._hyperLinkModel = n, this._injector = i, this._resolverService = r, this._initCopyPaste(), this.disposeWithMe(() => {
172
173
  this._plainTextFilter.clear();
173
174
  });
@@ -187,31 +188,31 @@ let Ye = class extends z {
187
188
  id: Ht,
188
189
  onBeforeCopy: (e, n, i) => this._collect(e, n, i),
189
190
  onPasteCells: (e, n, i, r) => {
190
- const { copyType: o = Rr.COPY, pasteType: s } = r, { range: c } = e || {}, { range: l, unitId: p, subUnitId: u } = n;
191
- return this._generateMutations(l, { copyType: o, pasteType: s, copyRange: c, unitId: p, subUnitId: u });
191
+ const { copyType: s = Ir.COPY, pasteType: o } = r, { range: c } = e || {}, { range: u, unitId: p, subUnitId: l } = n;
192
+ return this._generateMutations(u, { copyType: s, pasteType: o, copyRange: c, unitId: p, subUnitId: l });
192
193
  },
193
194
  onPastePlainText: (e, n) => {
194
195
  const i = this._filterPlainText(n);
195
196
  if (Ke(n) && i) {
196
- const { range: r, unitId: o, subUnitId: s } = e, { ranges: [c], mapFunc: l } = Lt([r]), p = [], u = [];
197
- return Pn.foreach(c, (g, d) => {
198
- const { row: v, col: C } = l(g, d), _ = this._hyperLinkModel.getHyperLinkByLocation(o, s, v, C);
199
- _ && p.push({
200
- id: Ue.id,
197
+ const { range: r, unitId: s, subUnitId: o } = e, { ranges: [c], mapFunc: u } = Rt([r]), p = [], l = [];
198
+ return En.foreach(c, (g, d) => {
199
+ const { row: _, col: C } = u(g, d), v = this._hyperLinkModel.getHyperLinkByLocation(s, o, _, C);
200
+ v && p.push({
201
+ id: He.id,
201
202
  params: {
202
- unitId: o,
203
- subUnitId: s,
204
- id: _.id
203
+ unitId: s,
204
+ subUnitId: o,
205
+ id: v.id
205
206
  }
206
- }), _ && u.push({
207
- id: He.id,
207
+ }), v && l.push({
208
+ id: xe.id,
208
209
  params: {
209
- unitId: o,
210
- subUnitId: s,
211
- link: _
210
+ unitId: s,
211
+ subUnitId: o,
212
+ link: v
212
213
  }
213
214
  });
214
- }), { redos: p, undos: u };
215
+ }), { redos: p, undos: l };
215
216
  }
216
217
  return { undos: [], redos: [] };
217
218
  },
@@ -219,21 +220,21 @@ let Ye = class extends z {
219
220
  });
220
221
  }
221
222
  _collect(e, n, i) {
222
- const r = new sr();
223
+ const r = new nr();
223
224
  this._copyInfo = {
224
225
  unitId: e,
225
226
  subUnitId: n,
226
227
  matrix: r
227
228
  };
228
- const o = this._injector.invoke((l) => Lr(i, l, e, n));
229
- if (!o)
229
+ const s = this._injector.invoke((u) => yr(i, u, e, n));
230
+ if (!s)
230
231
  return;
231
- const { rows: s, cols: c } = o;
232
- s.forEach((l, p) => {
233
- c.forEach((u, g) => {
234
- var v;
235
- const d = this._hyperLinkModel.getHyperLinkByLocation(e, n, l, u);
236
- r.setValue(p, g, (v = d == null ? void 0 : d.id) != null ? v : "");
232
+ const { rows: o, cols: c } = s;
233
+ o.forEach((u, p) => {
234
+ c.forEach((l, g) => {
235
+ var _;
236
+ const d = this._hyperLinkModel.getHyperLinkByLocation(e, n, u, l);
237
+ r.setValue(p, g, (_ = d == null ? void 0 : d.id) != null ? _ : "");
237
238
  });
238
239
  });
239
240
  }
@@ -244,53 +245,53 @@ let Ye = class extends z {
244
245
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
245
246
  return { redos: [], undos: [] };
246
247
  if ([
247
- Ae.SPECIAL_PASTE_COL_WIDTH,
248
- Ae.SPECIAL_PASTE_VALUE,
249
- Ae.SPECIAL_PASTE_FORMAT,
250
- Ae.SPECIAL_PASTE_FORMULA
248
+ Be.SPECIAL_PASTE_COL_WIDTH,
249
+ Be.SPECIAL_PASTE_VALUE,
250
+ Be.SPECIAL_PASTE_FORMAT,
251
+ Be.SPECIAL_PASTE_FORMULA
251
252
  ].includes(n.pasteType))
252
253
  return { redos: [], undos: [] };
253
- const { unitId: r, subUnitId: o } = this._copyInfo, s = [], c = [], { ranges: [l, p], mapFunc: u } = Lt([n.copyRange, e]);
254
- return Pr(l, p, !0).forEach(({ startRange: d }) => {
255
- var v;
256
- (v = this._copyInfo) == null || v.matrix.forValue((C, _, O) => {
257
- const a = ye.getPositionRange(
254
+ const { unitId: r, subUnitId: s } = this._copyInfo, o = [], c = [], { ranges: [u, p], mapFunc: l } = Rt([n.copyRange, e]);
255
+ return Er(u, p, !0).forEach(({ startRange: d }) => {
256
+ var _;
257
+ (_ = this._copyInfo) == null || _.matrix.forValue((C, v, k) => {
258
+ const a = Ee.getPositionRange(
258
259
  {
259
260
  startRow: C,
260
261
  endRow: C,
261
- startColumn: _,
262
- endColumn: _
262
+ startColumn: v,
263
+ endColumn: v
263
264
  },
264
265
  d
265
- ), b = this._hyperLinkModel.getHyperLink(r, o, O), { row: M, col: k } = u(a.startRow, a.startColumn), L = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, M, k), j = Ce.generateRandomId();
266
- L && s.push({
267
- id: Ue.id,
266
+ ), b = this._hyperLinkModel.getHyperLink(r, s, k), { row: U, col: O } = l(a.startRow, a.startColumn), L = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, U, O), A = Ie.generateRandomId();
267
+ L && o.push({
268
+ id: He.id,
268
269
  params: {
269
270
  unitId: n.unitId,
270
271
  subUnitId: n.subUnitId,
271
272
  id: L.id
272
273
  }
273
- }), b && (s.push({
274
- id: He.id,
274
+ }), b && (o.push({
275
+ id: xe.id,
275
276
  params: {
276
277
  unitId: n.unitId,
277
278
  subUnitId: n.subUnitId,
278
279
  link: {
279
280
  ...b,
280
- id: j,
281
- row: M,
282
- column: k
281
+ id: A,
282
+ row: U,
283
+ column: O
283
284
  }
284
285
  }
285
286
  }), c.push({
286
- id: Ue.id,
287
+ id: He.id,
287
288
  params: {
288
289
  unitId: n.unitId,
289
290
  subUnitId: n.subUnitId,
290
- id: j
291
+ id: A
291
292
  }
292
293
  })), L && c.push({
293
- id: He.id,
294
+ id: xe.id,
294
295
  params: {
295
296
  unitId: n.unitId,
296
297
  subUnitId: n.subUnitId,
@@ -298,48 +299,20 @@ let Ye = class extends z {
298
299
  }
299
300
  });
300
301
  });
301
- }), { redos: s, undos: c };
302
+ }), { redos: o, undos: c };
302
303
  }
303
304
  };
304
- Ye = bi([
305
- Ve(0, br),
306
- Ve(1, R(dt)),
307
- Ve(2, R(lt)),
308
- Ve(3, R(pe))
305
+ Ye = Ri([
306
+ Fe(0, Rr),
307
+ Fe(1, R(dt)),
308
+ Fe(2, R(lt)),
309
+ Fe(3, R(pe))
309
310
  ], Ye);
310
- var m = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(m || {}), Et = { exports: {} }, ke = {};
311
- /**
312
- * @license React
313
- * react-jsx-runtime.production.min.js
314
- *
315
- * Copyright (c) Facebook, Inc. and its affiliates.
316
- *
317
- * This source code is licensed under the MIT license found in the
318
- * LICENSE file in the root directory of this source tree.
319
- */
320
- var fn;
321
- function wi() {
322
- if (fn) return ke;
323
- fn = 1;
324
- var t = fi, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
325
- function s(c, l, p) {
326
- var u, g = {}, d = null, v = null;
327
- p !== void 0 && (d = "" + p), l.key !== void 0 && (d = "" + l.key), l.ref !== void 0 && (v = l.ref);
328
- for (u in l) i.call(l, u) && !o.hasOwnProperty(u) && (g[u] = l[u]);
329
- if (c && c.defaultProps) for (u in l = c.defaultProps, l) g[u] === void 0 && (g[u] = l[u]);
330
- return { $$typeof: e, type: c, key: d, ref: v, props: g, _owner: r.current };
331
- }
332
- return ke.Fragment = n, ke.jsx = s, ke.jsxs = s, ke;
333
- }
334
- var mn;
335
- function Oi() {
336
- return mn || (mn = 1, Et.exports = wi()), Et.exports;
337
- }
338
- var f = Oi();
339
- class jn extends z {
311
+ var f = /* @__PURE__ */ ((t) => (t.EDITING = "editing", t.VIEWING = "viewing", t.ZEN_EDITOR = "zen_mode", t))(f || {});
312
+ class xn extends z {
340
313
  constructor() {
341
314
  super(...arguments);
342
- B(this, "_customHyperLinks", /* @__PURE__ */ new Map());
315
+ V(this, "_customHyperLinks", /* @__PURE__ */ new Map());
343
316
  }
344
317
  isBuiltInLinkType(n) {
345
318
  return n !== S.URL;
@@ -364,58 +337,58 @@ class jn extends z {
364
337
  super.dispose(), this._customHyperLinks.clear();
365
338
  }
366
339
  }
367
- const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
368
- cellLinkEdit: ki,
369
- cellLinkEditButtons: Ti
340
+ const Li = "univer-cell-link-edit", Pi = "univer-cell-link-edit-buttons", gn = {
341
+ cellLinkEdit: Li,
342
+ cellLinkEditButtons: Pi
370
343
  }, ze = () => {
371
344
  var Ft;
372
- const [t, e] = X(""), [n, i] = X(!1), [r, o] = X(""), [s, c] = X(!0), [l, p] = X(S.URL), [u, g] = X(""), d = E(ct), v = E(On), C = E(re), _ = E(Y), O = E(K), a = Jr(O.currentEditing$), b = E(kt), M = E(pe), k = E(ie), L = E(jn), j = pn(() => L.getOptions(), [L]), D = E(pt), q = E($e), Ee = E(wr), je = E(De), se = E(bn), Re = E(or), Le = E(De), Pe = bt({}), oe = pn(() => {
373
- if (!L.isBuiltInLinkType(l))
374
- return L.getCustomHyperLink(l);
375
- }, [L, l]), [A, Jn] = X(!1), [be, gt] = X(!1), H = bt(!1), V = _.getCurrentUnitForType(w.UNIVER_SHEET), Xn = (V == null ? void 0 : V.getActiveSheet().getSheetId()) || "", Q = mi((h) => {
376
- o(h.replaceAll(on.CUSTOM_RANGE_START, "").replaceAll(on.CUSTOM_RANGE_END, ""));
377
- }, [o]);
345
+ const [t, e] = J(""), [n, i] = J(!1), [r, s] = J(""), [o, c] = J(!0), [u, p] = J(S.URL), [l, g] = J(""), d = E(ct), _ = E(Pn), C = E(re), v = E(Y), k = E(K), a = Yr(k.currentEditing$), b = E(kt), U = E(pe), O = E(ie), L = E(xn), A = dn(() => L.getOptions(), [L]), D = E(pt), X = E($e), Re = E(Lr), Ae = E(De), oe = E(Rn), Le = E(rr), Pe = E(De), be = Pt({}), se = dn(() => {
346
+ if (!L.isBuiltInLinkType(u))
347
+ return L.getCustomHyperLink(u);
348
+ }, [L, u]), [B, Yn] = J(!1), [we, gt] = J(!1), x = Pt(!1), F = v.getCurrentUnitForType(w.UNIVER_SHEET), zn = (F == null ? void 0 : F.getActiveSheet().getSheetId()) || "", Q = gi((h) => {
349
+ s(h.replaceAll(on.CUSTOM_RANGE_START, "").replaceAll(on.CUSTOM_RANGE_END, ""));
350
+ }, [s]);
378
351
  ne(() => {
379
- var h, y, I, P, N, F, Wt, Zt, Gt, Kt, Yt, zt, qt, Jt, Xt, Qt, en;
352
+ var h, y, I, P, M, j, jt, Wt, Zt, Gt, Kt, Yt, zt, Xt, qt, Jt, Qt;
380
353
  if ((a == null ? void 0 : a.row) !== void 0 && a.col !== void 0) {
381
- const { customRange: ae, row: vt, col: St } = a;
382
- let { label: J } = a;
383
- typeof J == "number" && (J = `${J}`);
354
+ const { customRange: ae, row: _t, col: St } = a;
355
+ let { label: q } = a;
356
+ typeof q == "number" && (q = `${q}`);
384
357
  let W;
385
358
  if (ae)
386
359
  W = {
387
360
  id: (h = ae == null ? void 0 : ae.rangeId) != null ? h : "",
388
- display: J != null ? J : "",
361
+ display: q != null ? q : "",
389
362
  payload: (I = (y = ae == null ? void 0 : ae.properties) == null ? void 0 : y.url) != null ? I : "",
390
- row: vt,
363
+ row: _t,
391
364
  column: St
392
365
  };
393
- else if (a.type === m.VIEWING) {
394
- const T = _.getUnit(a.unitId), te = T == null ? void 0 : T.getSheetBySheetId(a.subUnitId), U = te == null ? void 0 : te.getCellRaw(a.row, a.col), me = (F = (N = (P = U == null ? void 0 : U.p) == null ? void 0 : P.body) == null ? void 0 : N.customRanges) == null ? void 0 : F.find((nn) => {
395
- var rn;
396
- return nn.rangeType === Ge.HYPERLINK && ((rn = nn.properties) == null ? void 0 : rn.url);
397
- }), we = U == null ? void 0 : U.v;
398
- U && (!Se.transform.isEmptyDocument((Zt = (Wt = U.p) == null ? void 0 : Wt.body) == null ? void 0 : Zt.dataStream) || Ce.isDefine(we)) && c(!1), W = {
366
+ else if (a.type === f.VIEWING) {
367
+ const T = v.getUnit(a.unitId), te = T == null ? void 0 : T.getSheetBySheetId(a.subUnitId), H = te == null ? void 0 : te.getCellRaw(a.row, a.col), me = (j = (M = (P = H == null ? void 0 : H.p) == null ? void 0 : P.body) == null ? void 0 : M.customRanges) == null ? void 0 : j.find((tn) => {
368
+ var nn;
369
+ return tn.rangeType === Ge.HYPERLINK && ((nn = tn.properties) == null ? void 0 : nn.url);
370
+ }), ke = H == null ? void 0 : H.v;
371
+ H && (!Se.transform.isEmptyDocument((Wt = (jt = H.p) == null ? void 0 : jt.body) == null ? void 0 : Wt.dataStream) || Ie.isDefine(ke)) && c(!1), W = {
399
372
  id: "",
400
373
  display: "",
401
- payload: (Kt = (Gt = me == null ? void 0 : me.properties) == null ? void 0 : Gt.url) != null ? Kt : "",
402
- row: vt,
374
+ payload: (Gt = (Zt = me == null ? void 0 : me.properties) == null ? void 0 : Zt.url) != null ? Gt : "",
375
+ row: _t,
403
376
  column: St
404
377
  };
405
378
  } else {
406
- const T = _.getCurrentUnitForType(w.UNIVER_DOC), te = je.getActiveTextRange(), U = T == null ? void 0 : T.getBody(), me = te && U ? te : null, we = me && ((zt = Se.customRange.getCustomRangesInterestsWithSelection(me, (Yt = U == null ? void 0 : U.customRanges) != null ? Yt : [])) == null ? void 0 : zt[0]);
379
+ const T = v.getCurrentUnitForType(w.UNIVER_DOC), te = Ae.getActiveTextRange(), H = T == null ? void 0 : T.getBody(), me = te && H ? te : null, ke = me && ((Yt = Se.customRange.getCustomRangesInterestsWithSelection(me, (Kt = H == null ? void 0 : H.customRanges) != null ? Kt : [])) == null ? void 0 : Yt[0]);
407
380
  c(!1), W = {
408
381
  id: "",
409
- display: J != null ? J : "",
410
- payload: (Jt = (qt = we == null ? void 0 : we.properties) == null ? void 0 : qt.url) != null ? Jt : "",
411
- row: vt,
382
+ display: q != null ? q : "",
383
+ payload: (Xt = (zt = ke == null ? void 0 : ke.properties) == null ? void 0 : zt.url) != null ? Xt : "",
384
+ row: _t,
412
385
  column: St
413
386
  };
414
387
  }
415
388
  e(W.id);
416
- const tn = L.findCustomHyperLink(W);
417
- if (tn) {
418
- const T = tn.convert(W);
389
+ const en = L.findCustomHyperLink(W);
390
+ if (en) {
391
+ const T = en.convert(W);
419
392
  p(T.type), g(T.payload), Q(T.display);
420
393
  return;
421
394
  }
@@ -423,12 +396,12 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
423
396
  const ee = b.parseHyperLink(W.payload);
424
397
  switch (p(ee.type === S.INVALID ? S.RANGE : ee.type), ee.type) {
425
398
  case S.URL: {
426
- g(ee.url), ee.url === W.display && (H.current = !0);
399
+ g(ee.url), ee.url === W.display && (x.current = !0);
427
400
  break;
428
401
  }
429
402
  case S.RANGE: {
430
- const T = ee.searchObj, te = T.gid && (en = (Qt = (Xt = _.getUnit(a.unitId)) == null ? void 0 : Xt.getSheetBySheetId(T.gid)) == null ? void 0 : Qt.getName()) != null ? en : "", U = $r(te, Fe(T.range).range);
431
- g(U), U === W.display && (H.current = !0);
403
+ const T = ee.searchObj, te = T.gid && (Qt = (Jt = (qt = v.getUnit(a.unitId)) == null ? void 0 : qt.getSheetBySheetId(T.gid)) == null ? void 0 : Jt.getName()) != null ? Qt : "", H = Hr(te, je(T.range).range);
404
+ g(H), H === W.display && (x.current = !0);
432
405
  break;
433
406
  }
434
407
  case S.SHEET: {
@@ -446,11 +419,11 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
446
419
  break;
447
420
  }
448
421
  }
449
- }, [a, M, L, je, _]), ne(() => {
422
+ }, [a, U, L, Ae, v]), ne(() => {
450
423
  let h = null;
451
- if (a && !a.customRangeId && a.type === m.VIEWING && Ce.isDefine(a.row) && Ce.isDefine(a.col)) {
452
- const y = _.getUnit(a.unitId, w.UNIVER_SHEET), I = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), P = I == null ? void 0 : I.getMergedCell(a.row, a.col), N = new ar(Re.getCurrentTheme().hyacinth500).toRgb();
453
- h = Ee.addShape(
424
+ if (a && !a.customRangeId && a.type === f.VIEWING && Ie.isDefine(a.row) && Ie.isDefine(a.col)) {
425
+ const y = v.getUnit(a.unitId, w.UNIVER_SHEET), I = y == null ? void 0 : y.getSheetBySheetId(a.subUnitId), P = I == null ? void 0 : I.getMergedCell(a.row, a.col), M = new ir(Le.getCurrentTheme().hyacinth500).toRgb();
426
+ h = Re.addShape(
454
427
  {
455
428
  range: P != null ? P : {
456
429
  startColumn: a.col,
@@ -460,7 +433,7 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
460
433
  },
461
434
  style: {
462
435
  // hasAutoFill: false,
463
- fill: `rgb(${N.r}, ${N.g}, ${N.b}, 0.12)`,
436
+ fill: `rgb(${M.r}, ${M.g}, ${M.b}, 0.12)`,
464
437
  strokeWidth: 1,
465
438
  stroke: "#FFBD37",
466
439
  widgets: {}
@@ -472,14 +445,14 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
472
445
  );
473
446
  }
474
447
  return () => {
475
- h && Ee.removeShape(h);
448
+ h && Re.removeShape(h);
476
449
  };
477
- }, [a, Ee, Re, _]), ne(() => {
478
- gt(l === S.RANGE);
479
- }, [l]), ne(() => {
480
- const h = (a == null ? void 0 : a.type) === m.ZEN_EDITOR ? q.getRenderById(x) : q.getRenderById(C.getCurrentEditorId()), y = new cr();
450
+ }, [a, Re, Le, v]), ne(() => {
451
+ gt(u === S.RANGE);
452
+ }, [u]), ne(() => {
453
+ const h = (a == null ? void 0 : a.type) === f.ZEN_EDITOR ? X.getRenderById(N) : X.getRenderById(C.getCurrentEditorId()), y = new or();
481
454
  if (h) {
482
- const I = h.with(Dn);
455
+ const I = h.with(Un);
483
456
  I.setReserveRangesStatus(!0), y.add(() => {
484
457
  I.setReserveRangesStatus(!1);
485
458
  });
@@ -487,17 +460,17 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
487
460
  return () => {
488
461
  C.disableForceKeepVisible(), y.dispose();
489
462
  };
490
- }, [a == null ? void 0 : a.type, C, q]), ne(() => (O.setIsKeepVisible(be), () => {
491
- O.setIsKeepVisible(!1);
492
- }), [be, O]), ne(() => () => {
493
- D.temporaryHidden && (D.show(), se.setContextValue(Ct, !1));
494
- }, [se, D]), ne(() => {
495
- if (be)
463
+ }, [a == null ? void 0 : a.type, C, X]), ne(() => (k.setIsKeepVisible(we), () => {
464
+ k.setIsKeepVisible(!1);
465
+ }), [we, k]), ne(() => () => {
466
+ D.temporaryHidden && (D.show(), oe.setContextValue(Ct, !1));
467
+ }, [oe, D]), ne(() => {
468
+ if (we)
496
469
  return C.enableForceKeepVisible(), () => {
497
470
  C.disableForceKeepVisible();
498
471
  };
499
- }, [be, C]);
500
- const Qn = [
472
+ }, [we, C]);
473
+ const Xn = [
501
474
  {
502
475
  label: d.t("hyperLink.form.link"),
503
476
  value: S.URL
@@ -514,72 +487,72 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
514
487
  label: d.t("hyperLink.form.definedName"),
515
488
  value: S.DEFINE_NAME
516
489
  },
517
- ...j
490
+ ...A
518
491
  ];
519
- if (!V)
492
+ if (!F)
520
493
  return;
521
- const er = V.getHiddenWorksheets(), ft = V.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => er.indexOf(h.value) === -1), mt = Object.values((Ft = v.getDefinedNameMap(V.getUnitId())) != null ? Ft : {}).map((h) => ({
494
+ const qn = F.getHiddenWorksheets(), ft = F.getSheets().map((h) => ({ label: h.getName(), value: h.getSheetId() })).filter((h) => qn.indexOf(h.value) === -1), mt = Object.values((Ft = _.getDefinedNameMap(F.getUnitId())) != null ? Ft : {}).map((h) => ({
522
495
  label: h.name,
523
496
  value: h.id
524
497
  })), Vt = (h, y) => {
525
498
  if (h === S.URL)
526
- return Ci(y);
499
+ return vi(y);
527
500
  if (h === S.RANGE) {
528
- const I = Fe(y), P = V.getSheetBySheetName(I.sheetName);
501
+ const I = je(y), P = F.getSheetBySheetName(I.sheetName);
529
502
  if (P)
530
- return `#gid=${P.getSheetId()}&range=${Ar(I.range)}`;
503
+ return `#gid=${P.getSheetId()}&range=${Dr(I.range)}`;
531
504
  }
532
505
  return `#${h}=${y}`;
533
- }, tr = Xr((h) => {
534
- var N;
535
- const I = h.split(",").map(Fe)[0];
536
- if (!I || !Rn(I.range))
506
+ }, Jn = zr((h) => {
507
+ var M;
508
+ const I = h.split(",").map(je)[0];
509
+ if (!I || !In(I.range))
537
510
  return;
538
- I.sheetName || (I.sheetName = ((N = V.getActiveSheet()) == null ? void 0 : N.getName()) || "");
539
- const P = jr(I);
540
- g(P), P && (H.current || !r) && (Q(P), H.current = !0);
541
- }), _t = async () => {
542
- if (s && !r || !u || l === S.URL && !Ke(u)) {
543
- Jn(!0);
511
+ I.sheetName || (I.sheetName = ((M = F.getActiveSheet()) == null ? void 0 : M.getName()) || "");
512
+ const P = xr(I);
513
+ g(P), P && (x.current || !r) && (Q(P), x.current = !0);
514
+ }), vt = async () => {
515
+ if (o && !r || !l || u === S.URL && !Ke(l)) {
516
+ Yn(!0);
544
517
  return;
545
518
  }
546
519
  if (a)
547
520
  if (t) {
548
- const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? _r.id : vr.id;
549
- await k.executeCommand(h, {
521
+ const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? gr.id : fr.id;
522
+ await O.executeCommand(h, {
550
523
  id: t,
551
524
  unitId: a.unitId,
552
525
  subUnitId: a.subUnitId,
553
526
  payload: {
554
- display: s ? r : "",
555
- payload: Vt(l, u)
527
+ display: o ? r : "",
528
+ payload: Vt(u, l)
556
529
  },
557
530
  row: a.row,
558
531
  column: a.col,
559
- documentId: a.type === m.ZEN_EDITOR ? x : C.getCurrentEditorId()
532
+ documentId: a.type === f.ZEN_EDITOR ? N : C.getCurrentEditorId()
560
533
  });
561
534
  } else {
562
- const h = a.type === m.ZEN_EDITOR || a.type === m.EDITING ? Sr.id : Cr.id;
563
- await k.executeCommand(h, {
535
+ const h = a.type === f.ZEN_EDITOR || a.type === f.EDITING ? mr.id : vr.id;
536
+ await O.executeCommand(h, {
564
537
  unitId: a.unitId,
565
538
  subUnitId: a.subUnitId,
566
539
  link: {
567
- id: lr(),
540
+ id: sr(),
568
541
  row: a.row,
569
542
  column: a.col,
570
- payload: Vt(l, u),
571
- display: s ? r : ""
543
+ payload: Vt(u, l),
544
+ display: o ? r : ""
572
545
  },
573
- documentId: a.type === m.ZEN_EDITOR ? x : C.getCurrentEditorId()
546
+ documentId: a.type === f.ZEN_EDITOR ? N : C.getCurrentEditorId()
574
547
  });
575
548
  }
576
- if ((a == null ? void 0 : a.type) === m.VIEWING) {
577
- await k.executeCommand(Tn.id, {
549
+ if ((a == null ? void 0 : a.type) === f.VIEWING) {
550
+ await O.executeCommand(wn.id, {
578
551
  unitId: a.unitId,
579
552
  subUnitId: a.subUnitId
580
553
  });
581
554
  const h = 1;
582
- await k.executeCommand(wn.id, {
555
+ await O.executeCommand(Ln.id, {
583
556
  range: {
584
557
  startRow: Math.max(a.row - h, 0),
585
558
  endRow: a.row + h,
@@ -588,154 +561,154 @@ const ki = "univer-cell-link-edit", Ti = "univer-cell-link-edit-buttons", _n = {
588
561
  }
589
562
  });
590
563
  }
591
- k.executeCommand(Je.id);
592
- }, nr = (h) => {
564
+ O.executeCommand(qe.id);
565
+ }, Qn = (h) => {
593
566
  var I;
594
- if (l !== S.RANGE)
567
+ if (u !== S.RANGE)
595
568
  return;
596
- const y = (I = Pe.current) == null ? void 0 : I.handleOutClick;
569
+ const y = (I = be.current) == null ? void 0 : I.handleOutClick;
597
570
  y && y(h, () => gt(!1));
598
571
  };
599
- return a ? /* @__PURE__ */ f.jsxs("div", { className: _n.cellLinkEdit, style: { display: n ? "none" : "block" }, onClick: nr, children: [
600
- s ? /* @__PURE__ */ f.jsx(
601
- _e,
572
+ return a ? /* @__PURE__ */ Ce("div", { className: gn.cellLinkEdit, style: { display: n ? "none" : "block" }, onClick: Qn, children: [
573
+ o ? /* @__PURE__ */ m(
574
+ ve,
602
575
  {
603
576
  label: d.t("hyperLink.form.label"),
604
- error: A && !r ? d.t("hyperLink.form.inputError") : "",
605
- children: /* @__PURE__ */ f.jsx(
606
- cn,
577
+ error: B && !r ? d.t("hyperLink.form.inputError") : "",
578
+ children: /* @__PURE__ */ m(
579
+ an,
607
580
  {
608
581
  value: r,
609
582
  onChange: (h) => {
610
- Q(h), H.current = !1;
583
+ Q(h), x.current = !1;
611
584
  },
612
585
  placeholder: d.t("hyperLink.form.labelPlaceholder"),
613
586
  autoFocus: !0,
614
587
  onKeyDown: (h) => {
615
- h.keyCode === Pt.ENTER && _t();
588
+ h.keyCode === Lt.ENTER && vt();
616
589
  }
617
590
  }
618
591
  )
619
592
  }
620
593
  ) : null,
621
- /* @__PURE__ */ f.jsx(_e, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ f.jsx(
594
+ /* @__PURE__ */ m(ve, { label: d.t("hyperLink.form.type"), children: /* @__PURE__ */ m(
622
595
  yt,
623
596
  {
624
- options: Qn,
625
- value: l,
597
+ options: Xn,
598
+ value: u,
626
599
  onChange: (h) => {
627
600
  p(h), g("");
628
601
  }
629
602
  }
630
603
  ) }),
631
- l === S.URL && /* @__PURE__ */ f.jsx(
632
- _e,
604
+ u === S.URL && /* @__PURE__ */ m(
605
+ ve,
633
606
  {
634
- error: A ? u ? Ke(u) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
635
- children: /* @__PURE__ */ f.jsx(
636
- cn,
607
+ error: B ? l ? Ke(l) ? "" : d.t("hyperLink.form.linkError") : d.t("hyperLink.form.inputError") : "",
608
+ children: /* @__PURE__ */ m(
609
+ an,
637
610
  {
638
- value: u,
611
+ value: l,
639
612
  onChange: (h) => {
640
- g(h), h && (H.current || !r || r === u) && (Q(h), H.current = !0);
613
+ g(h), h && (x.current || !r || r === l) && (Q(h), x.current = !0);
641
614
  },
642
615
  placeholder: d.t("hyperLink.form.linkPlaceholder"),
643
616
  autoFocus: !0,
644
617
  onKeyDown: (h) => {
645
- h.keyCode === Pt.ENTER && _t();
618
+ h.keyCode === Lt.ENTER && vt();
646
619
  }
647
620
  }
648
621
  )
649
622
  }
650
623
  ),
651
- l === S.RANGE && /* @__PURE__ */ f.jsx(_e, { error: A && !u ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ f.jsx(
652
- _i,
624
+ u === S.RANGE && /* @__PURE__ */ m(ve, { error: B && !l ? d.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ m(
625
+ hi,
653
626
  {
654
- unitId: V.getUnitId(),
655
- subUnitId: Xn,
627
+ unitId: F.getUnitId(),
628
+ subUnitId: zn,
656
629
  isOnlyOneRange: !0,
657
630
  isSupportAcrossSheet: !0,
658
- initValue: u,
659
- onChange: tr,
660
- isFocus: be,
631
+ initValue: l,
632
+ onChange: Jn,
633
+ isFocus: we,
661
634
  onFocus: () => gt(!0),
662
- actions: Pe.current,
635
+ actions: be.current,
663
636
  onRangeSelectorDialogVisibleChange: async (h) => {
664
637
  var y, I;
665
638
  if (h)
666
- a.type === m.ZEN_EDITOR && (D.hide(), se.setContextValue(Ct, !0)), a.type !== m.VIEWING && C.enableForceKeepVisible(), i(!0);
639
+ a.type === f.ZEN_EDITOR && (D.hide(), oe.setContextValue(Ct, !0)), a.type !== f.VIEWING && C.enableForceKeepVisible(), i(!0);
667
640
  else {
668
- if (await M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === m.ZEN_EDITOR) {
669
- await k.executeCommand(kn.id, {
641
+ if (await U.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), a.type === f.ZEN_EDITOR) {
642
+ await O.executeCommand(bn.id, {
670
643
  unitId: a.unitId,
671
644
  subUnitId: a.subUnitId,
672
645
  selections: [{ range: { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col } }]
673
- }), D.show(), se.setContextValue(Ct, !1);
674
- const P = (y = q.getRenderById(x)) == null ? void 0 : y.with(oi), N = (I = Le.getTextRanges({ unitId: x, subUnitId: x })) == null ? void 0 : I[0];
675
- P && N && (P.scrollToRange(N), Le.refreshSelection({ unitId: x, subUnitId: x }));
646
+ }), D.show(), oe.setContextValue(Ct, !1);
647
+ const P = (y = X.getRenderById(N)) == null ? void 0 : y.with(ri), M = (I = Pe.getTextRanges({ unitId: N, subUnitId: N })) == null ? void 0 : I[0];
648
+ P && M && (P.scrollToRange(M), Pe.refreshSelection({ unitId: N, subUnitId: N }));
676
649
  }
677
650
  C.disableForceKeepVisible(), i(!1);
678
651
  }
679
652
  }
680
653
  }
681
654
  ) }),
682
- l === S.SHEET && /* @__PURE__ */ f.jsx(_e, { error: A && !u ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ f.jsx(
655
+ u === S.SHEET && /* @__PURE__ */ m(ve, { error: B && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m(
683
656
  yt,
684
657
  {
685
658
  options: ft,
686
- value: u,
659
+ value: l,
687
660
  onChange: (h) => {
688
- var P, N;
661
+ var P, M;
689
662
  g(h);
690
- const y = (P = ft.find((F) => F.value === h)) == null ? void 0 : P.label, I = (N = ft.find((F) => F.value === u)) == null ? void 0 : N.label;
691
- y && (H.current || !r || r === I) && (Q(y), H.current = !0);
663
+ const y = (P = ft.find((j) => j.value === h)) == null ? void 0 : P.label, I = (M = ft.find((j) => j.value === l)) == null ? void 0 : M.label;
664
+ y && (x.current || !r || r === I) && (Q(y), x.current = !0);
692
665
  }
693
666
  }
694
667
  ) }),
695
- l === S.DEFINE_NAME && /* @__PURE__ */ f.jsx(_e, { error: A && !u ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ f.jsx(
668
+ u === S.DEFINE_NAME && /* @__PURE__ */ m(ve, { error: B && !l ? d.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ m(
696
669
  yt,
697
670
  {
698
671
  options: mt,
699
- value: u,
672
+ value: l,
700
673
  onChange: (h) => {
701
- var P, N;
674
+ var P, M;
702
675
  g(h);
703
- const y = (P = mt.find((F) => F.value === h)) == null ? void 0 : P.label, I = (N = mt.find((F) => F.value === u)) == null ? void 0 : N.label;
704
- y && (H.current || !r || r === I) && (Q(y), H.current = !0);
676
+ const y = (P = mt.find((j) => j.value === h)) == null ? void 0 : P.label, I = (M = mt.find((j) => j.value === l)) == null ? void 0 : M.label;
677
+ y && (x.current || !r || r === I) && (Q(y), x.current = !0);
705
678
  }
706
679
  }
707
680
  ) }),
708
- (oe == null ? void 0 : oe.Form) && /* @__PURE__ */ f.jsx(
709
- oe.Form,
681
+ (se == null ? void 0 : se.Form) && /* @__PURE__ */ m(
682
+ se.Form,
710
683
  {
711
684
  linkId: t,
712
- payload: u,
685
+ payload: l,
713
686
  display: r,
714
- showError: A,
715
- setByPayload: H,
687
+ showError: B,
688
+ setByPayload: x,
716
689
  setDisplay: (h) => {
717
- Q(h), H.current = !0;
690
+ Q(h), x.current = !0;
718
691
  },
719
692
  setPayload: g
720
693
  }
721
694
  ),
722
- /* @__PURE__ */ f.jsxs("div", { className: _n.cellLinkEditButtons, children: [
723
- /* @__PURE__ */ f.jsx(
724
- ln,
695
+ /* @__PURE__ */ Ce("div", { className: gn.cellLinkEditButtons, children: [
696
+ /* @__PURE__ */ m(
697
+ cn,
725
698
  {
726
699
  onClick: () => {
727
- a && M.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), k.executeCommand(Je.id);
700
+ a && U.navigateToRange(a.unitId, a.subUnitId, { startRow: a.row, endRow: a.row, startColumn: a.col, endColumn: a.col }, !0), O.executeCommand(qe.id);
728
701
  },
729
702
  children: d.t("hyperLink.form.cancel")
730
703
  }
731
704
  ),
732
- /* @__PURE__ */ f.jsx(
733
- ln,
705
+ /* @__PURE__ */ m(
706
+ cn,
734
707
  {
735
708
  type: "primary",
736
709
  style: { marginLeft: 8 },
737
710
  onClick: async () => {
738
- _t();
711
+ vt();
739
712
  },
740
713
  children: d.t("hyperLink.form.ok")
741
714
  }
@@ -752,7 +725,7 @@ var $ = function() {
752
725
  }
753
726
  return t;
754
727
  }, $.apply(this, arguments);
755
- }, xi = function(t, e) {
728
+ }, bi = function(t, e) {
756
729
  var n = {};
757
730
  for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
758
731
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -760,134 +733,134 @@ var $ = function() {
760
733
  e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
761
734
  return n;
762
735
  }, fe = he(function(t, e) {
763
- var n = t.icon, i = t.id, r = t.className, o = t.extend, s = xi(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), l = bt("_".concat(Ui()));
764
- return An(n, "".concat(i), { defIds: n.defIds, idSuffix: l.current }, $({ ref: e, className: c }, s), o);
736
+ var n = t.icon, i = t.id, r = t.className, s = t.extend, o = bi(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), u = Pt("_".concat(Oi()));
737
+ return Dn(n, "".concat(i), { defIds: n.defIds, idSuffix: u.current }, $({ ref: e, className: c }, o), s);
765
738
  });
766
- function An(t, e, n, i, r) {
767
- return ge(t.tag, $($({ key: e }, Ni(t, n, r)), i), (Mi(t, n).children || []).map(function(o, s) {
768
- return An(o, "".concat(e, "-").concat(t.tag, "-").concat(s), n, void 0, r);
739
+ function Dn(t, e, n, i, r) {
740
+ return ge(t.tag, $($({ key: e }, wi(t, n, r)), i), (ki(t, n).children || []).map(function(s, o) {
741
+ return Dn(s, "".concat(e, "-").concat(t.tag, "-").concat(o), n, void 0, r);
769
742
  }));
770
743
  }
771
- function Ni(t, e, n) {
744
+ function wi(t, e, n) {
772
745
  var i = $({}, t.attrs);
773
746
  n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1);
774
747
  var r = e.defIds;
775
- return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(function(o) {
776
- var s = o[0], c = o[1];
777
- typeof c == "string" && (i[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
748
+ return !r || r.length === 0 || (t.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(function(s) {
749
+ var o = s[0], c = s[1];
750
+ typeof c == "string" && (i[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
778
751
  })), i;
779
752
  }
780
- function Mi(t, e) {
753
+ function ki(t, e) {
781
754
  var n, i = e.defIds;
782
755
  return !i || i.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? $($({}, t), { children: t.children.map(function(r) {
783
756
  return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? $($({}, r), { attrs: $($({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
784
757
  }) }) : t;
785
758
  }
786
- function Ui() {
759
+ function Oi() {
787
760
  return Math.random().toString(36).substring(2, 8);
788
761
  }
789
762
  fe.displayName = "UniverIcon";
790
- 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" } }] }, Ze = he(function(t, e) {
763
+ var Ti = { 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" } }] }, Ze = he(function(t, e) {
791
764
  return ge(fe, Object.assign({}, t, {
792
765
  id: "all-border-single",
793
766
  ref: e,
794
- icon: Hi
767
+ icon: Ti
795
768
  }));
796
769
  });
797
770
  Ze.displayName = "AllBorderSingle";
798
- 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" } }] }, Bn = he(function(t, e) {
771
+ var Ni = { 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 = he(function(t, e) {
799
772
  return ge(fe, Object.assign({}, t, {
800
773
  id: "copy-single",
801
774
  ref: e,
802
- icon: Di
775
+ icon: Ni
803
776
  }));
804
777
  });
805
- Bn.displayName = "CopySingle";
806
- var $i = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.8816 1.97978C11.0177 0.843607 12.862 0.884962 14.0004 2.02342C15.1389 3.16188 15.1803 5.00612 14.0441 6.14228L11.399 8.78737C11.1608 9.02559 10.7746 9.02559 10.5363 8.78737C10.2981 8.54915 10.2981 8.16292 10.5363 7.9247L13.1814 5.2796C13.8195 4.64155 13.8217 3.57006 13.1378 2.8861C12.4538 2.20211 11.3823 2.20438 10.7443 2.84245L7.6976 5.88911L7.69317 5.89349C7.05959 6.53211 7.05894 7.60014 7.74132 8.28252C7.97954 8.52074 7.97954 8.90697 7.74132 9.14519C7.5031 9.38341 7.11687 9.38341 6.87865 9.14519C5.74016 8.00671 5.69884 6.16251 6.83497 5.02633L6.84021 5.02116L9.8816 1.97978Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.61426 7.2364C4.85248 6.99818 5.23871 6.99818 5.47693 7.2364C5.71515 7.47462 5.71515 7.86085 5.47693 8.09907L2.83183 10.7442C2.19375 11.3823 2.1915 12.4537 2.87547 13.1377C3.55945 13.8217 4.6309 13.8194 5.26899 13.1813L8.31566 10.1347C8.32262 10.1277 8.32971 10.121 8.33691 10.1144C8.34408 10.1064 8.3515 10.0986 8.35916 10.091C8.99721 9.45291 8.99949 8.38145 8.3155 7.69746C8.07728 7.45924 8.07728 7.07301 8.3155 6.83479C8.55372 6.59657 8.93995 6.59657 9.17817 6.83479C10.3166 7.97327 10.358 9.81748 9.22183 10.9536C9.21487 10.9606 9.20779 10.9673 9.20058 10.9739C9.19341 10.9819 9.18599 10.9897 9.17833 10.9973L6.13166 14.044C4.99548 15.1802 3.15127 15.1389 2.01279 14.0004C0.874362 12.8619 0.83297 11.0177 1.96916 9.8815L4.61426 7.2364Z" } }] }, Dt = he(function(t, e) {
778
+ $n.displayName = "CopySingle";
779
+ var Mi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M9.8816 1.97978C11.0177 0.843607 12.862 0.884962 14.0004 2.02342C15.1389 3.16188 15.1803 5.00612 14.0441 6.14228L11.399 8.78737C11.1608 9.02559 10.7746 9.02559 10.5363 8.78737C10.2981 8.54915 10.2981 8.16292 10.5363 7.9247L13.1814 5.2796C13.8195 4.64155 13.8217 3.57006 13.1378 2.8861C12.4538 2.20211 11.3823 2.20438 10.7443 2.84245L7.6976 5.88911L7.69317 5.89349C7.05959 6.53211 7.05894 7.60014 7.74132 8.28252C7.97954 8.52074 7.97954 8.90697 7.74132 9.14519C7.5031 9.38341 7.11687 9.38341 6.87865 9.14519C5.74016 8.00671 5.69884 6.16251 6.83497 5.02633L6.84021 5.02116L9.8816 1.97978Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.61426 7.2364C4.85248 6.99818 5.23871 6.99818 5.47693 7.2364C5.71515 7.47462 5.71515 7.86085 5.47693 8.09907L2.83183 10.7442C2.19375 11.3823 2.1915 12.4537 2.87547 13.1377C3.55945 13.8217 4.6309 13.8194 5.26899 13.1813L8.31566 10.1347C8.32262 10.1277 8.32971 10.121 8.33691 10.1144C8.34408 10.1064 8.3515 10.0986 8.35916 10.091C8.99721 9.45291 8.99949 8.38145 8.3155 7.69746C8.07728 7.45924 8.07728 7.07301 8.3155 6.83479C8.55372 6.59657 8.93995 6.59657 9.17817 6.83479C10.3166 7.97327 10.358 9.81748 9.22183 10.9536C9.21487 10.9606 9.20779 10.9673 9.20058 10.9739C9.19341 10.9819 9.18599 10.9897 9.17833 10.9973L6.13166 14.044C4.99548 15.1802 3.15127 15.1389 2.01279 14.0004C0.874362 12.8619 0.83297 11.0177 1.96916 9.8815L4.61426 7.2364Z" } }] }, xt = he(function(t, e) {
807
780
  return ge(fe, Object.assign({}, t, {
808
781
  id: "link-single",
809
782
  ref: e,
810
- icon: $i
783
+ icon: Mi
811
784
  }));
812
785
  });
813
- Dt.displayName = "LinkSingle";
814
- 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" } }] }, Vn = he(function(t, e) {
786
+ xt.displayName = "LinkSingle";
787
+ var Ui = { 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" } }] }, An = he(function(t, e) {
815
788
  return ge(fe, Object.assign({}, t, {
816
789
  id: "unlink-single",
817
790
  ref: e,
818
- icon: ji
791
+ icon: Ui
819
792
  }));
820
793
  });
821
- Vn.displayName = "UnlinkSingle";
822
- var Ai = { 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" } }] }, Fn = he(function(t, e) {
794
+ An.displayName = "UnlinkSingle";
795
+ var Hi = { 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" } }] }, Bn = he(function(t, e) {
823
796
  return ge(fe, Object.assign({}, t, {
824
797
  id: "write-single",
825
798
  ref: e,
826
- icon: Ai
799
+ icon: Hi
827
800
  }));
828
801
  });
829
- Fn.displayName = "WriteSingle";
830
- 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" } }] }, Wn = he(function(t, e) {
802
+ Bn.displayName = "WriteSingle";
803
+ var xi = { 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 = he(function(t, e) {
831
804
  return ge(fe, Object.assign({}, t, {
832
805
  id: "xlsx",
833
806
  ref: e,
834
- icon: Bi
807
+ icon: xi
835
808
  }));
836
809
  });
837
- Wn.displayName = "Xlsx";
838
- function Zn(t) {
810
+ Vn.displayName = "Xlsx";
811
+ function Fn(t) {
839
812
  var e, n, i = "";
840
813
  if (typeof t == "string" || typeof t == "number") i += t;
841
814
  else if (typeof t == "object") if (Array.isArray(t)) {
842
815
  var r = t.length;
843
- for (e = 0; e < r; e++) t[e] && (n = Zn(t[e])) && (i && (i += " "), i += n);
816
+ for (e = 0; e < r; e++) t[e] && (n = Fn(t[e])) && (i && (i += " "), i += n);
844
817
  } else for (n in t) t[n] && (i && (i += " "), i += n);
845
818
  return i;
846
819
  }
847
- function vn() {
848
- for (var t, e, n = 0, i = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (e = Zn(t)) && (i && (i += " "), i += e);
820
+ function fn() {
821
+ for (var t, e, n = 0, i = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (e = Fn(t)) && (i && (i += " "), i += e);
849
822
  return i;
850
823
  }
851
- const Vi = "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", Yi = "univer-cell-link-operation", zi = "univer-cell-link-operation-error", Z = {
852
- cellLink: Vi,
853
- cellLinkType: Fi,
854
- cellLinkContent: Wi,
855
- cellLinkContentError: Zi,
856
- cellLinkUrl: Gi,
857
- cellLinkOperations: Ki,
858
- cellLinkOperation: Yi,
859
- cellLinkOperationError: zi
860
- }, qi = {
861
- [S.URL]: /* @__PURE__ */ f.jsx(Dt, {}),
862
- [S.SHEET]: /* @__PURE__ */ f.jsx(Wn, {}),
863
- [S.RANGE]: /* @__PURE__ */ f.jsx(Ze, {}),
864
- [S.DEFINE_NAME]: /* @__PURE__ */ f.jsx(Ze, {}),
865
- [S.INVALID]: /* @__PURE__ */ f.jsx(Ze, {})
866
- }, Sn = (t) => {
867
- var M, k;
868
- const e = E(K), n = E(ie), i = E(Un), r = E(ct), o = E(pe), s = E(re), c = E(kt), l = E(pt), { customRange: p, row: u, col: g, unitId: d, subUnitId: v, editPermission: C, copyPermission: _, type: O } = t;
869
- if (!((M = p == null ? void 0 : p.properties) != null && M.url))
824
+ const Di = "univer-cell-link", $i = "univer-cell-link-type", Ai = "univer-cell-link-content", Bi = "univer-cell-link-content-error", Vi = "univer-cell-link-url", Fi = "univer-cell-link-operations", ji = "univer-cell-link-operation", Wi = "univer-cell-link-operation-error", Z = {
825
+ cellLink: Di,
826
+ cellLinkType: $i,
827
+ cellLinkContent: Ai,
828
+ cellLinkContentError: Bi,
829
+ cellLinkUrl: Vi,
830
+ cellLinkOperations: Fi,
831
+ cellLinkOperation: ji,
832
+ cellLinkOperationError: Wi
833
+ }, Zi = {
834
+ [S.URL]: /* @__PURE__ */ m(xt, {}),
835
+ [S.SHEET]: /* @__PURE__ */ m(Vn, {}),
836
+ [S.RANGE]: /* @__PURE__ */ m(Ze, {}),
837
+ [S.DEFINE_NAME]: /* @__PURE__ */ m(Ze, {}),
838
+ [S.INVALID]: /* @__PURE__ */ m(Ze, {})
839
+ }, mn = (t) => {
840
+ var U, O;
841
+ const e = E(K), n = E(ie), i = E(Nn), r = E(ct), s = E(pe), o = E(re), c = E(kt), u = E(pt), { customRange: p, row: l, col: g, unitId: d, subUnitId: _, editPermission: C, copyPermission: v, type: k } = t;
842
+ if (!((U = p == null ? void 0 : p.properties) != null && U.url))
870
843
  return null;
871
- const a = c.parseHyperLink((k = p.properties.url) != null ? k : ""), b = a.type === S.INVALID;
872
- return /* @__PURE__ */ f.jsxs("div", { className: Z.cellLink, onClick: () => e.hideCurrentPopup(), children: [
873
- /* @__PURE__ */ f.jsxs(
844
+ const a = c.parseHyperLink((O = p.properties.url) != null ? O : ""), b = a.type === S.INVALID;
845
+ return /* @__PURE__ */ Ce("div", { className: Z.cellLink, onClick: () => e.hideCurrentPopup(), children: [
846
+ /* @__PURE__ */ Ce(
874
847
  "div",
875
848
  {
876
- className: vn(Z.cellLinkContent, { [Z.cellLinkContentError]: b }),
849
+ className: fn(Z.cellLinkContent, { [Z.cellLinkContentError]: b }),
877
850
  onClick: () => {
878
- l.visible || b || o.navigate(a);
851
+ u.visible || b || s.navigate(a);
879
852
  },
880
853
  children: [
881
- /* @__PURE__ */ f.jsx("div", { className: Z.cellLinkType, children: qi[a.type] }),
882
- /* @__PURE__ */ f.jsx(Be, { showIfEllipsis: !0, title: a.name, asChild: !0, children: /* @__PURE__ */ f.jsx("span", { className: Z.cellLinkUrl, children: a.name }) })
854
+ /* @__PURE__ */ m("div", { className: Z.cellLinkType, children: Zi[a.type] }),
855
+ /* @__PURE__ */ m(Ve, { showIfEllipsis: !0, title: a.name, asChild: !0, children: /* @__PURE__ */ m("span", { className: Z.cellLinkUrl, children: a.name }) })
883
856
  ]
884
857
  }
885
858
  ),
886
- /* @__PURE__ */ f.jsxs("div", { className: Z.cellLinkOperations, children: [
887
- _ && /* @__PURE__ */ f.jsx(
859
+ /* @__PURE__ */ Ce("div", { className: Z.cellLinkOperations, children: [
860
+ v && /* @__PURE__ */ m(
888
861
  "div",
889
862
  {
890
- className: vn(Z.cellLinkOperation, { [Z.cellLinkOperationError]: b }),
863
+ className: fn(Z.cellLinkOperation, { [Z.cellLinkOperationError]: b }),
891
864
  onClick: () => {
892
865
  if (!b) {
893
866
  if (a.type !== S.URL) {
@@ -897,92 +870,92 @@ const Vi = "univer-cell-link", Fi = "univer-cell-link-type", Wi = "univer-cell-l
897
870
  navigator.clipboard.writeText(a.url);
898
871
  i.show({
899
872
  content: r.t("hyperLink.message.coped"),
900
- type: xe.Info
873
+ type: Ne.Info
901
874
  });
902
875
  }
903
876
  },
904
- children: /* @__PURE__ */ f.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ f.jsx(Bn, {}) })
877
+ children: /* @__PURE__ */ m(Ve, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ m($n, {}) })
905
878
  }
906
879
  ),
907
- C && /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
908
- /* @__PURE__ */ f.jsx(
880
+ C && /* @__PURE__ */ Ce(pi, { children: [
881
+ /* @__PURE__ */ m(
909
882
  "div",
910
883
  {
911
884
  className: Z.cellLinkOperation,
912
885
  onClick: () => {
913
- n.executeCommand(jt.id, {
886
+ n.executeCommand($t.id, {
914
887
  unitId: d,
915
- subUnitId: v,
916
- row: u,
888
+ subUnitId: _,
889
+ row: l,
917
890
  col: g,
918
891
  customRangeId: p.rangeId,
919
- type: O
892
+ type: k
920
893
  });
921
894
  },
922
- children: /* @__PURE__ */ f.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ f.jsx(Fn, {}) })
895
+ children: /* @__PURE__ */ m(Ve, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ m(Bn, {}) })
923
896
  }
924
897
  ),
925
- /* @__PURE__ */ f.jsx(
898
+ /* @__PURE__ */ m(
926
899
  "div",
927
900
  {
928
901
  className: Z.cellLinkOperation,
929
902
  onClick: () => {
930
- const L = O === m.EDITING || O === m.ZEN_EDITOR ? Ir.id : yr.id;
903
+ const L = k === f.EDITING || k === f.ZEN_EDITOR ? _r.id : Sr.id;
931
904
  n.syncExecuteCommand(L, {
932
905
  unitId: d,
933
- subUnitId: v,
906
+ subUnitId: _,
934
907
  id: p.rangeId,
935
- row: u,
908
+ row: l,
936
909
  column: g,
937
- documentId: O === m.ZEN_EDITOR ? x : s.getCurrentEditorId()
910
+ documentId: k === f.ZEN_EDITOR ? N : o.getCurrentEditorId()
938
911
  }) && e.hideCurrentPopup(void 0, !0);
939
912
  },
940
- children: /* @__PURE__ */ f.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ f.jsx(Vn, {}) })
913
+ children: /* @__PURE__ */ m(Ve, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ m(An, {}) })
941
914
  }
942
915
  )
943
916
  ] })
944
917
  ] })
945
918
  ] });
946
- }, qe = () => {
947
- var r, o;
948
- const t = E(K), [e, n] = X(null), i = E(Y);
919
+ }, Xe = () => {
920
+ var r, s;
921
+ const t = E(K), [e, n] = J(null), i = E(Y);
949
922
  if (ne(() => {
950
923
  n(t.currentPopup);
951
- const s = t.currentPopup$.subscribe((c) => {
924
+ const o = t.currentPopup$.subscribe((c) => {
952
925
  n(c);
953
926
  });
954
927
  return () => {
955
- s.unsubscribe();
928
+ o.unsubscribe();
956
929
  };
957
930
  }, [t.currentPopup, t.currentPopup$]), !e)
958
931
  return null;
959
932
  if (e.showAll) {
960
- const s = i.getUnit(e.unitId, w.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(e.subUnitId), l = c == null ? void 0 : c.getCell(e.row, e.col), p = (o = (r = l == null ? void 0 : l.p) == null ? void 0 : r.body) == null ? void 0 : o.customRanges;
961
- return p != null && p.length ? /* @__PURE__ */ f.jsx("div", { children: p.map((u) => /* @__PURE__ */ f.jsx(Sn, { ...e, customRange: u }, u.rangeId)) }) : null;
933
+ const o = i.getUnit(e.unitId, w.UNIVER_SHEET), c = o == null ? void 0 : o.getSheetBySheetId(e.subUnitId), u = c == null ? void 0 : c.getCell(e.row, e.col), p = (s = (r = u == null ? void 0 : u.p) == null ? void 0 : r.body) == null ? void 0 : s.customRanges;
934
+ return p != null && p.length ? /* @__PURE__ */ m("div", { children: p.map((l) => /* @__PURE__ */ m(mn, { ...e, customRange: l }, l.rangeId)) }) : null;
962
935
  }
963
- return /* @__PURE__ */ f.jsx(Sn, { ...e });
936
+ return /* @__PURE__ */ m(mn, { ...e });
964
937
  };
965
- qe.componentKey = "univer.sheet.cell-link-popup";
966
- var Ji = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, Qi = (t, e, n, i) => {
967
- for (var r = i > 1 ? void 0 : i ? Xi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
968
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
969
- return i && r && Ji(e, n, r), r;
938
+ Xe.componentKey = "univer.sheet.cell-link-popup";
939
+ var Gi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, Yi = (t, e, n, i) => {
940
+ for (var r = i > 1 ? void 0 : i ? Ki(e, n) : e, s = t.length - 1, o; s >= 0; s--)
941
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
942
+ return i && r && Gi(e, n, r), r;
970
943
  }, ce = (t, e) => (n, i) => e(n, i, t);
971
- const Cn = (t, e) => {
944
+ const vn = (t, e) => {
972
945
  var n, i;
973
946
  return t.unitId === e.unitId && t.subUnitId === e.subUnitId && t.row === e.row && t.col === e.col && ((n = t.customRange) == null ? void 0 : n.rangeId) === ((i = e.customRange) == null ? void 0 : i.rangeId) && t.type === e.type;
974
947
  };
975
948
  let K = class extends z {
976
- constructor(e, n, i, r, o, s, c) {
949
+ constructor(e, n, i, r, s, o, c) {
977
950
  super();
978
- B(this, "_currentPopup", null);
979
- B(this, "_currentPopup$", new ui());
980
- B(this, "currentPopup$", this._currentPopup$.asObservable());
981
- B(this, "_currentEditingPopup", null);
982
- B(this, "_currentEditing$", new di(null));
983
- B(this, "currentEditing$", this._currentEditing$.asObservable());
984
- B(this, "_isKeepVisible", !1);
985
- this._sheetCanvasPopManagerService = e, this._injector = n, this._univerInstanceService = i, this._editorBridgeService = r, this._textSelectionManagerService = o, this._docCanvasPopManagerService = s, this._zenZoneService = c, this.disposeWithMe(() => {
951
+ V(this, "_currentPopup", null);
952
+ V(this, "_currentPopup$", new ai());
953
+ V(this, "currentPopup$", this._currentPopup$.asObservable());
954
+ V(this, "_currentEditingPopup", null);
955
+ V(this, "_currentEditing$", new ci(null));
956
+ V(this, "currentEditing$", this._currentEditing$.asObservable());
957
+ V(this, "_isKeepVisible", !1);
958
+ this._sheetCanvasPopManagerService = e, this._injector = n, this._univerInstanceService = i, this._editorBridgeService = r, this._textSelectionManagerService = s, this._docCanvasPopManagerService = o, this._zenZoneService = c, this.disposeWithMe(() => {
986
959
  this.hideCurrentPopup(), this.endEditing(), this._currentEditing$.complete(), this._currentPopup$.complete();
987
960
  });
988
961
  }
@@ -999,15 +972,15 @@ let K = class extends z {
999
972
  return this._isKeepVisible;
1000
973
  }
1001
974
  showPopup(e) {
1002
- if (this._currentPopup && Cn(e, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), e.type !== m.ZEN_EDITOR && this._zenZoneService.visible))
975
+ if (this._currentPopup && vn(e, this._currentPopup) || (this.hideCurrentPopup(void 0, !0), e.type !== f.ZEN_EDITOR && this._zenZoneService.visible))
1003
976
  return;
1004
977
  const n = this._currentEditing$.getValue();
1005
- if (n && Cn(e, n))
978
+ if (n && vn(e, n))
1006
979
  return;
1007
- const { unitId: i, subUnitId: r, row: o, col: s, customRangeRect: c, customRange: l } = e;
980
+ const { unitId: i, subUnitId: r, row: s, col: o, customRangeRect: c, customRange: u } = e;
1008
981
  let p;
1009
- const u = {
1010
- componentKey: qe.componentKey,
982
+ const l = {
983
+ componentKey: Xe.componentKey,
1011
984
  direction: "bottom",
1012
985
  onClickOutside: () => {
1013
986
  this.hideCurrentPopup();
@@ -1016,33 +989,33 @@ let K = class extends z {
1016
989
  this.hideCurrentPopup(e.type, !0);
1017
990
  }
1018
991
  };
1019
- if (e.type === m.EDITING) {
1020
- if (!l)
992
+ if (e.type === f.EDITING) {
993
+ if (!u)
1021
994
  return;
1022
995
  p = c && this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
1023
996
  c,
1024
- u
997
+ l
1025
998
  );
1026
- } else if (e.type === m.ZEN_EDITOR) {
1027
- if (!l)
999
+ } else if (e.type === f.ZEN_EDITOR) {
1000
+ if (!u)
1028
1001
  return;
1029
1002
  p = this._docCanvasPopManagerService.attachPopupToRange(
1030
1003
  {
1031
- startOffset: l.startIndex,
1032
- endOffset: l.endIndex + 1,
1004
+ startOffset: u.startIndex,
1005
+ endOffset: u.endIndex + 1,
1033
1006
  collapsed: !1
1034
1007
  },
1035
- u,
1036
- x
1008
+ l,
1009
+ N
1037
1010
  );
1038
1011
  } else if (e.showAll)
1039
- p = this._sheetCanvasPopManagerService.attachPopupToCell(e.row, e.col, u, i, r);
1012
+ p = this._sheetCanvasPopManagerService.attachPopupToCell(e.row, e.col, l, i, r);
1040
1013
  else {
1041
- if (!l)
1014
+ if (!u)
1042
1015
  return;
1043
1016
  p = c && this._sheetCanvasPopManagerService.attachPopupByPosition(
1044
1017
  c,
1045
- u,
1018
+ l,
1046
1019
  e
1047
1020
  );
1048
1021
  }
@@ -1050,11 +1023,11 @@ let K = class extends z {
1050
1023
  unitId: i,
1051
1024
  subUnitId: r,
1052
1025
  disposable: p,
1053
- row: o,
1054
- col: s,
1026
+ row: s,
1027
+ col: o,
1055
1028
  editPermission: !!e.editPermission,
1056
1029
  copyPermission: !!e.copyPermission,
1057
- customRange: l,
1030
+ customRange: u,
1058
1031
  type: e.type,
1059
1032
  showAll: e.showAll
1060
1033
  }, this._currentPopup$.next(this._currentPopup));
@@ -1064,28 +1037,28 @@ let K = class extends z {
1064
1037
  this._currentPopup && ((!e || e === this._currentPopup.type) && this._currentPopup.disposable.canDispose() || n) && ((r = (i = this._currentPopup) == null ? void 0 : i.disposable) == null || r.dispose(), this._currentPopup = null, this._currentPopup$.next(null));
1065
1038
  }
1066
1039
  _getEditingRange() {
1067
- var i, r, o;
1040
+ var i, r, s;
1068
1041
  const e = this._editorBridgeService.isVisible().visible, n = this._editorBridgeService.getEditCellState();
1069
1042
  if (e && n) {
1070
- const s = this._textSelectionManagerService.getActiveTextRange(), c = (i = n.documentLayoutObject.documentModel) == null ? void 0 : i.getBody();
1043
+ const o = this._textSelectionManagerService.getActiveTextRange(), c = (i = n.documentLayoutObject.documentModel) == null ? void 0 : i.getBody();
1071
1044
  if (!c)
1072
1045
  return null;
1073
- if (!s || s.collapsed)
1046
+ if (!o || o.collapsed)
1074
1047
  return {
1075
1048
  startOffset: 0,
1076
1049
  endOffset: c.dataStream.length - 2,
1077
1050
  collapsed: c.dataStream.length - 2 === 0,
1078
1051
  label: Se.transform.getPlainText(c.dataStream)
1079
1052
  };
1080
- const l = Se.customRange.getCustomRangesInterestsWithSelection(s, (o = (r = c.customRanges) == null ? void 0 : r.filter((g) => g.rangeType === Ge.HYPERLINK)) != null ? o : []);
1081
- let p = s.startOffset, u = s.endOffset;
1082
- return l.forEach((g) => {
1083
- p = Math.min(p, g.startIndex), u = Math.max(u, g.endIndex + 1);
1053
+ const u = Se.customRange.getCustomRangesInterestsWithSelection(o, (s = (r = c.customRanges) == null ? void 0 : r.filter((g) => g.rangeType === Ge.HYPERLINK)) != null ? s : []);
1054
+ let p = o.startOffset, l = o.endOffset;
1055
+ return u.forEach((g) => {
1056
+ p = Math.min(p, g.startIndex), l = Math.max(l, g.endIndex + 1);
1084
1057
  }), {
1085
1058
  startOffset: p,
1086
- endOffset: u,
1087
- collapsed: p === u,
1088
- label: Se.transform.getPlainText(c.dataStream.slice(p, u))
1059
+ endOffset: l,
1060
+ collapsed: p === l,
1061
+ label: Se.transform.getPlainText(c.dataStream.slice(p, l))
1089
1062
  };
1090
1063
  }
1091
1064
  return null;
@@ -1104,11 +1077,11 @@ let K = class extends z {
1104
1077
  };
1105
1078
  }
1106
1079
  startAddEditing(e) {
1107
- var o, s, c, l, p;
1080
+ var s, o, c, u, p;
1108
1081
  const { unitId: n, subUnitId: i, type: r } = e;
1109
- if (r === m.ZEN_EDITOR) {
1110
- const u = this._univerInstanceService.getUnit(x, w.UNIVER_DOC);
1111
- if (!u)
1082
+ if (r === f.ZEN_EDITOR) {
1083
+ const l = this._univerInstanceService.getUnit(N, w.UNIVER_DOC);
1084
+ if (!l)
1112
1085
  return;
1113
1086
  const g = this._textSelectionManagerService.getActiveTextRange();
1114
1087
  if (!g)
@@ -1116,22 +1089,22 @@ let K = class extends z {
1116
1089
  this._currentEditingPopup = this._docCanvasPopManagerService.attachPopupToRange(
1117
1090
  g,
1118
1091
  this._editPopup,
1119
- x
1092
+ N
1120
1093
  );
1121
- const d = (o = u.getBody()) == null ? void 0 : o.dataStream.slice(g.startOffset, g.endOffset);
1094
+ const d = (s = l.getBody()) == null ? void 0 : s.dataStream.slice(g.startOffset, g.endOffset);
1122
1095
  this._currentEditing$.next({
1123
1096
  ...e,
1124
1097
  label: d
1125
1098
  });
1126
- } else if (r === m.EDITING) {
1127
- const u = this._getEditingRange();
1128
- if (!u)
1099
+ } else if (r === f.EDITING) {
1100
+ const l = this._getEditingRange();
1101
+ if (!l)
1129
1102
  return;
1130
- this._textSelectionManagerService.replaceDocRanges([{ ...u }], { unitId: Ie, subUnitId: Ie });
1131
- const g = this._injector.get($e).getRenderById(Ie);
1103
+ this._textSelectionManagerService.replaceDocRanges([{ ...l }], { unitId: ye, subUnitId: ye });
1104
+ const g = this._injector.get($e).getRenderById(ye);
1132
1105
  if (!g)
1133
1106
  return;
1134
- const d = ci(u, g);
1107
+ const d = oi(l, g);
1135
1108
  if (!(d != null && d.length))
1136
1109
  return;
1137
1110
  this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(
@@ -1141,7 +1114,7 @@ let K = class extends z {
1141
1114
  i
1142
1115
  ), this._currentEditing$.next({
1143
1116
  ...e,
1144
- label: (s = u == null ? void 0 : u.label) != null ? s : ""
1117
+ label: (o = l == null ? void 0 : l.label) != null ? o : ""
1145
1118
  });
1146
1119
  } else {
1147
1120
  this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
@@ -1151,22 +1124,22 @@ let K = class extends z {
1151
1124
  n,
1152
1125
  i
1153
1126
  );
1154
- const u = this._univerInstanceService.getUnit(n, w.UNIVER_SHEET), g = u == null ? void 0 : u.getSheetBySheetId(i), d = g == null ? void 0 : g.getCellRaw(e.row, e.col);
1127
+ const l = this._univerInstanceService.getUnit(n, w.UNIVER_SHEET), g = l == null ? void 0 : l.getSheetBySheetId(i), d = g == null ? void 0 : g.getCellRaw(e.row, e.col);
1155
1128
  this._currentEditing$.next({
1156
1129
  ...e,
1157
- label: d != null && d.p ? Se.transform.getPlainText((l = (c = d.p.body) == null ? void 0 : c.dataStream) != null ? l : "") : ((p = d == null ? void 0 : d.v) != null ? p : "").toString()
1130
+ label: d != null && d.p ? Se.transform.getPlainText((u = (c = d.p.body) == null ? void 0 : c.dataStream) != null ? u : "") : ((p = d == null ? void 0 : d.v) != null ? p : "").toString()
1158
1131
  });
1159
1132
  }
1160
1133
  }
1161
1134
  // eslint-disable-next-line complexity, max-lines-per-function
1162
1135
  startEditing(e) {
1163
- var s, c, l, p, u, g;
1164
- (s = this._currentEditingPopup) == null || s.dispose(), this.hideCurrentPopup(void 0, !0);
1136
+ var o, c, u, p, l, g;
1137
+ (o = this._currentEditingPopup) == null || o.dispose(), this.hideCurrentPopup(void 0, !0);
1165
1138
  const { unitId: n, subUnitId: i } = e;
1166
- let r, o;
1167
- if (e.type === m.ZEN_EDITOR) {
1168
- const d = this._univerInstanceService.getUnit(x, w.UNIVER_DOC);
1169
- if (r = (l = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : l.find((v) => v.rangeId === e.customRangeId), o = r ? (p = d == null ? void 0 : d.getBody()) == null ? void 0 : p.dataStream.slice(r.startIndex, r.endIndex + 1) : "", !r || !o)
1139
+ let r, s;
1140
+ if (e.type === f.ZEN_EDITOR) {
1141
+ const d = this._univerInstanceService.getUnit(N, w.UNIVER_DOC);
1142
+ if (r = (u = (c = d == null ? void 0 : d.getBody()) == null ? void 0 : c.customRanges) == null ? void 0 : u.find((_) => _.rangeId === e.customRangeId), s = r ? (p = d == null ? void 0 : d.getBody()) == null ? void 0 : p.dataStream.slice(r.startIndex, r.endIndex + 1) : "", !r || !s)
1170
1143
  return;
1171
1144
  this._textSelectionManagerService.replaceTextRanges([
1172
1145
  {
@@ -1180,13 +1153,13 @@ let K = class extends z {
1180
1153
  collapsed: !1
1181
1154
  },
1182
1155
  this._editPopup,
1183
- x
1156
+ N
1184
1157
  );
1185
- } else if (e.type === m.EDITING) {
1186
- const d = kr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1187
- if (!d || !((u = d.rects) != null && u.length))
1158
+ } else if (e.type === f.EDITING) {
1159
+ const d = br(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1160
+ if (!d || !((l = d.rects) != null && l.length))
1188
1161
  return;
1189
- r = d.customRange, o = d.label, this._textSelectionManagerService.replaceTextRanges([
1162
+ r = d.customRange, s = d.label, this._textSelectionManagerService.replaceTextRanges([
1190
1163
  {
1191
1164
  startOffset: r.startIndex,
1192
1165
  endOffset: r.endIndex + 1
@@ -1198,10 +1171,10 @@ let K = class extends z {
1198
1171
  i
1199
1172
  );
1200
1173
  } else {
1201
- const d = this._univerInstanceService.getUnit(n, w.UNIVER_SHEET), v = d == null ? void 0 : d.getSheetBySheetId(i), C = v == null ? void 0 : v.getCellRaw(e.row, e.col), _ = d == null ? void 0 : d.getStyles().getStyleByCell(C), O = _ == null ? void 0 : _.tr, a = Tr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1174
+ const d = this._univerInstanceService.getUnit(n, w.UNIVER_SHEET), _ = d == null ? void 0 : d.getSheetBySheetId(i), C = _ == null ? void 0 : _.getCellRaw(e.row, e.col), v = d == null ? void 0 : d.getStyles().getStyleByCell(C), k = v == null ? void 0 : v.tr, a = wr(this._injector, e.unitId, e.subUnitId, e.row, e.col, e.customRangeId);
1202
1175
  if (!a || !((g = a.rects) != null && g.length))
1203
1176
  return;
1204
- r = a.customRange, o = a.label, O ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1177
+ r = a.customRange, s = a.label, k ? this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(
1205
1178
  e.row,
1206
1179
  e.col,
1207
1180
  this._editPopup,
@@ -1221,7 +1194,7 @@ let K = class extends z {
1221
1194
  this._currentEditing$.next({
1222
1195
  ...e,
1223
1196
  customRange: r,
1224
- label: o
1197
+ label: s
1225
1198
  });
1226
1199
  }
1227
1200
  endEditing(e) {
@@ -1230,43 +1203,43 @@ let K = class extends z {
1230
1203
  n && (!e || e === n.type) && ((i = this._currentEditingPopup) == null || i.dispose(), this._currentEditing$.next(null));
1231
1204
  }
1232
1205
  };
1233
- K = Qi([
1234
- ce(0, R(Or)),
1206
+ K = Yi([
1207
+ ce(0, R(Pr)),
1235
1208
  ce(1, R(lt)),
1236
1209
  ce(2, Y),
1237
1210
  ce(3, re),
1238
1211
  ce(4, R(De)),
1239
- ce(5, R(ai)),
1212
+ ce(5, R(ii)),
1240
1213
  ce(6, pt)
1241
1214
  ], K);
1242
- var Me = /* @__PURE__ */ ((t) => (t[t.ALLOWED = 0] = "ALLOWED", t[t.DISABLED_BY_CELL = 1] = "DISABLED_BY_CELL", t[t.ALLOW_ON_EDITING = 2] = "ALLOW_ON_EDITING", t))(Me || {});
1243
- const es = /* @__PURE__ */ new Set([
1215
+ var Ue = /* @__PURE__ */ ((t) => (t[t.ALLOWED = 0] = "ALLOWED", t[t.DISABLED_BY_CELL = 1] = "DISABLED_BY_CELL", t[t.ALLOW_ON_EDITING = 2] = "ALLOW_ON_EDITING", t))(Ue || {});
1216
+ const zi = /* @__PURE__ */ new Set([
1244
1217
  It.CHECKBOX,
1245
1218
  It.LIST,
1246
1219
  It.LIST_MULTIPLE
1247
- ]), $t = (t, e, n, i) => {
1248
- var c, l;
1220
+ ]), Dt = (t, e, n, i) => {
1221
+ var c, u;
1249
1222
  const r = e.getCell(n, i);
1250
1223
  if (r != null && r.f || r != null && r.si)
1251
1224
  return 1;
1252
- const o = t.has(hn) ? t.get(hn) : null, s = o == null ? void 0 : o.getRuleByLocation(e.getUnitId(), e.getSheetId(), n, i);
1253
- return s && es.has(s.type) ? !0 : (l = (c = r == null ? void 0 : r.p) == null ? void 0 : c.drawingsOrder) != null && l.length ? 2 : 0;
1254
- }, ts = (t) => {
1225
+ const s = t.has(pn) ? t.get(pn) : null, o = s == null ? void 0 : s.getRuleByLocation(e.getUnitId(), e.getSheetId(), n, i);
1226
+ return o && zi.has(o.type) ? !0 : (u = (c = r == null ? void 0 : r.p) == null ? void 0 : c.drawingsOrder) != null && u.length ? 2 : 0;
1227
+ }, Xi = (t) => {
1255
1228
  const e = t.get(Y).getCurrentUnitForType(w.UNIVER_SHEET);
1256
1229
  if (!e)
1257
1230
  return !0;
1258
- const n = e.getActiveSheet(), i = t.get(Tt).getCurrentSelections();
1231
+ const n = e.getActiveSheet(), i = t.get(Ot).getCurrentSelections();
1259
1232
  if (!i.length)
1260
1233
  return !0;
1261
- const r = i[0].range.startRow, o = i[0].range.startColumn;
1262
- return $t(t, n, r, o) === 1;
1263
- }, ns = (t) => {
1234
+ const r = i[0].range.startRow, s = i[0].range.startColumn;
1235
+ return Dt(t, n, r, s) === 1;
1236
+ }, qi = (t) => {
1264
1237
  const e = t.get(De), n = t.get(Y), i = e.getTextRanges();
1265
1238
  if (!(i != null && i.length))
1266
1239
  return !0;
1267
1240
  const r = n.getCurrentUnitForType(w.UNIVER_DOC);
1268
- return !!(!r || i.every((s) => s.collapsed) || !r.getSelfOrHeaderFooterModel(i[0].segmentId).getBody());
1269
- }, jt = {
1241
+ return !!(!r || i.every((o) => o.collapsed) || !r.getSelfOrHeaderFooterModel(i[0].segmentId).getBody());
1242
+ }, $t = {
1270
1243
  type: ut.OPERATION,
1271
1244
  id: "sheet.operation.open-hyper-link-edit-panel",
1272
1245
  handler(t, e) {
@@ -1275,7 +1248,7 @@ const es = /* @__PURE__ */ new Set([
1275
1248
  const n = t.get(K);
1276
1249
  return e.customRangeId ? n.startEditing(e) : n.startAddEditing(e), !0;
1277
1250
  }
1278
- }, Je = {
1251
+ }, qe = {
1279
1252
  type: ut.OPERATION,
1280
1253
  id: "sheet.operation.close-hyper-link-popup",
1281
1254
  handler(t) {
@@ -1286,112 +1259,112 @@ const es = /* @__PURE__ */ new Set([
1286
1259
  id: "sheet.operation.insert-hyper-link",
1287
1260
  handler(t) {
1288
1261
  var g;
1289
- const e = t.get(Y), n = xn(e), i = t.get(re);
1262
+ const e = t.get(Y), n = kn(e), i = t.get(re);
1290
1263
  if (!n)
1291
1264
  return !1;
1292
- const r = t.get(ie), s = t.get(Tt).getCurrentLastSelection();
1293
- if (!s)
1265
+ const r = t.get(ie), o = t.get(Ot).getCurrentLastSelection();
1266
+ if (!o)
1294
1267
  return !1;
1295
- const c = s.range.startRow, l = s.range.startColumn, p = i.isVisible(), u = ((g = e.getFocusedUnit()) == null ? void 0 : g.getUnitId()) === x;
1296
- return r.executeCommand(jt.id, {
1268
+ const c = o.range.startRow, u = o.range.startColumn, p = i.isVisible(), l = ((g = e.getFocusedUnit()) == null ? void 0 : g.getUnitId()) === N;
1269
+ return r.executeCommand($t.id, {
1297
1270
  unitId: n.unitId,
1298
1271
  subUnitId: n.subUnitId,
1299
1272
  row: c,
1300
- col: l,
1301
- type: u ? m.ZEN_EDITOR : p.visible ? m.EDITING : m.VIEWING
1273
+ col: u,
1274
+ type: l ? f.ZEN_EDITOR : p.visible ? f.EDITING : f.VIEWING
1302
1275
  });
1303
1276
  }
1304
1277
  }, de = {
1305
1278
  type: ut.OPERATION,
1306
1279
  id: "sheet.operation.insert-hyper-link-toolbar",
1307
1280
  handler(t) {
1308
- if (ts(t))
1281
+ if (Xi(t))
1309
1282
  return !1;
1310
1283
  const e = t.get(ie);
1311
- return t.get(K).currentEditing ? e.executeCommand(Je.id) : e.executeCommand(At.id);
1284
+ return t.get(K).currentEditing ? e.executeCommand(qe.id) : e.executeCommand(At.id);
1312
1285
  }
1313
- }, Bt = (t, e = x) => {
1286
+ }, Bt = (t, e = N) => {
1314
1287
  var r;
1315
- const n = t.get(Y), i = (r = t.get($e).getRenderById(e)) == null ? void 0 : r.with(Dn);
1288
+ const n = t.get(Y), i = (r = t.get($e).getRenderById(e)) == null ? void 0 : r.with(Un);
1316
1289
  return i ? i.textSelectionInner$.pipe(le(() => {
1317
- const s = t.get(re).getEditCellState();
1318
- if (!s)
1290
+ const o = t.get(re).getEditCellState();
1291
+ if (!o)
1319
1292
  return !0;
1320
- const c = xn(n, { unitId: s.unitId, subUnitId: s.sheetId });
1321
- return !(c != null && c.worksheet) || $t(t, c.worksheet, s.row, s.column) === 1 ? !0 : ns(t);
1322
- })) : Ne(!0);
1323
- }, Gn = (t) => {
1324
- const e = Nr(t, { workbookTypes: [xt], worksheetTypes: [Nt, Nn, Mt], rangeTypes: [Ut] }, !0), n = t.get(Y), i = t.get(Tt), r = t.has(re) ? t.get(re) : null, o = n.focused$.pipe(
1325
- dn((s) => !!s),
1326
- le((s) => n.getUnit(s, w.UNIVER_SHEET)),
1327
- dn((s) => !!s),
1328
- ue((s) => s.activeSheet$),
1329
- ue((s) => i.selectionMoveEnd$.pipe(le((c) => s && { selections: c, sheet: s }))),
1330
- le((s) => {
1331
- if (!s)
1332
- return Me.DISABLED_BY_CELL;
1333
- const { selections: c, sheet: l } = s;
1293
+ const c = kn(n, { unitId: o.unitId, subUnitId: o.sheetId });
1294
+ return !(c != null && c.worksheet) || Dt(t, c.worksheet, o.row, o.column) === 1 ? !0 : qi(t);
1295
+ })) : Me(!0);
1296
+ }, jn = (t) => {
1297
+ const e = Or(t, { workbookTypes: [Tt], worksheetTypes: [Nt, On, Mt], rangeTypes: [Ut] }, !0), n = t.get(Y), i = t.get(Ot), r = t.has(re) ? t.get(re) : null, s = n.focused$.pipe(
1298
+ un((o) => !!o),
1299
+ le((o) => n.getUnit(o, w.UNIVER_SHEET)),
1300
+ un((o) => !!o),
1301
+ ue((o) => o.activeSheet$),
1302
+ ue((o) => i.selectionMoveEnd$.pipe(le((c) => o && { selections: c, sheet: o }))),
1303
+ le((o) => {
1304
+ if (!o)
1305
+ return Ue.DISABLED_BY_CELL;
1306
+ const { selections: c, sheet: u } = o;
1334
1307
  if (!c.length)
1335
- return Me.DISABLED_BY_CELL;
1336
- const p = c[0].range.startRow, u = c[0].range.startColumn;
1337
- return $t(t, l, p, u);
1308
+ return Ue.DISABLED_BY_CELL;
1309
+ const p = c[0].range.startRow, l = c[0].range.startColumn;
1310
+ return Dt(t, u, p, l);
1338
1311
  }),
1339
- ue((s) => {
1340
- if (s === Me.DISABLED_BY_CELL)
1341
- return Ne(!0);
1342
- const c = (r ? r.visible$ : Ne(null)).pipe(le((p) => p != null && p.visible ? Ie : void 0)), l = t.get(bn).subscribeContextValue$(ur);
1343
- return pi([c, l]).pipe(
1312
+ ue((o) => {
1313
+ if (o === Ue.DISABLED_BY_CELL)
1314
+ return Me(!0);
1315
+ const c = (r ? r.visible$ : Me(null)).pipe(le((p) => p != null && p.visible ? ye : void 0)), u = t.get(Rn).subscribeContextValue$(ar);
1316
+ return li([c, u]).pipe(
1344
1317
  ue(
1345
- ([p, u]) => p ? u ? Ne(!0) : Bt(t, p) : Ne(s === Me.ALLOW_ON_EDITING)
1318
+ ([p, l]) => p ? l ? Me(!0) : Bt(t, p) : Me(o === Ue.ALLOW_ON_EDITING)
1346
1319
  )
1347
1320
  );
1348
1321
  })
1349
1322
  );
1350
1323
  return e.pipe(
1351
- hi(),
1352
- ue((s) => o.pipe(le((c) => s || c)))
1324
+ ui(),
1325
+ ue((o) => s.pipe(le((c) => o || c)))
1353
1326
  );
1354
- }, Xe = {
1327
+ }, Je = {
1355
1328
  commandId: At.id,
1356
- type: Hn.BUTTON,
1329
+ type: Mn.BUTTON,
1357
1330
  title: "hyperLink.menu.add",
1358
1331
  icon: "LinkSingle"
1359
- }, Qe = (t) => `${t}-zen-editor`, rs = (t) => ({
1360
- ...Xe,
1361
- id: Xe.commandId,
1332
+ }, Qe = (t) => `${t}-zen-editor`, Ji = (t) => ({
1333
+ ...Je,
1334
+ id: Je.commandId,
1362
1335
  hidden$: ht(t, w.UNIVER_SHEET),
1363
- disabled$: Gn(t)
1336
+ disabled$: jn(t)
1364
1337
  // disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission, WorksheetSetCellValuePermission, WorksheetInsertHyperlinkPermission], rangeTypes: [RangeProtectionPermissionEditPoint] })),
1365
- }), is = (t) => ({
1366
- ...Xe,
1367
- id: Qe(Xe.commandId),
1368
- hidden$: ht(t, w.UNIVER_DOC, x),
1338
+ }), Qi = (t) => ({
1339
+ ...Je,
1340
+ id: Qe(Je.commandId),
1341
+ hidden$: ht(t, w.UNIVER_DOC, N),
1369
1342
  disabled$: Bt(t)
1370
1343
  }), et = {
1371
1344
  tooltip: "hyperLink.form.addTitle",
1372
1345
  commandId: de.id,
1373
- type: Hn.BUTTON,
1346
+ type: Mn.BUTTON,
1374
1347
  icon: "LinkSingle"
1375
- }, ss = (t) => ({
1348
+ }, eo = (t) => ({
1376
1349
  ...et,
1377
1350
  id: et.commandId,
1378
1351
  hidden$: ht(t, w.UNIVER_SHEET),
1379
- disabled$: Gn(t)
1380
- }), os = (t) => ({
1352
+ disabled$: jn(t)
1353
+ }), to = (t) => ({
1381
1354
  ...et,
1382
1355
  id: Qe(et.commandId),
1383
- hidden$: ht(t, w.UNIVER_DOC, x),
1356
+ hidden$: ht(t, w.UNIVER_DOC, N),
1384
1357
  disabled$: Bt(t)
1385
- }), Kn = {
1358
+ }), Wn = {
1386
1359
  id: de.id,
1387
- binding: Pt.K | Qr.CTRL_COMMAND,
1388
- preconditions: xr
1360
+ binding: Lt.K | Xr.CTRL_COMMAND,
1361
+ preconditions: kr
1389
1362
  };
1390
- var as = Object.defineProperty, cs = Object.getOwnPropertyDescriptor, ls = (t, e, n, i) => {
1391
- for (var r = i > 1 ? void 0 : i ? cs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1392
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1393
- return i && r && as(e, n, r), r;
1394
- }, In = (t, e) => (n, i) => e(n, i, t);
1363
+ var no = Object.defineProperty, ro = Object.getOwnPropertyDescriptor, io = (t, e, n, i) => {
1364
+ for (var r = i > 1 ? void 0 : i ? ro(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1365
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1366
+ return i && r && no(e, n, r), r;
1367
+ }, _n = (t, e) => (n, i) => e(n, i, t);
1395
1368
  let tt = class extends z {
1396
1369
  constructor(t, e) {
1397
1370
  super(), this._autoFillService = t, this._hyperLinkModel = e, this._initAutoFill();
@@ -1399,95 +1372,95 @@ let tt = class extends z {
1399
1372
  // eslint-disable-next-line max-lines-per-function
1400
1373
  _initAutoFill() {
1401
1374
  const t = () => ({ redos: [], undos: [] }), e = (i, r) => {
1402
- const { source: o, target: s, unitId: c, subUnitId: l } = i, p = Lt([o, s]), [u, g] = p.ranges, { mapFunc: d } = p, v = {
1403
- row: u.startRow,
1404
- col: u.startColumn
1405
- }, C = Ur(u, g), _ = [], O = [];
1375
+ const { source: s, target: o, unitId: c, subUnitId: u } = i, p = Rt([s, o]), [l, g] = p.ranges, { mapFunc: d } = p, _ = {
1376
+ row: l.startRow,
1377
+ col: l.startColumn
1378
+ }, C = Nr(l, g), v = [], k = [];
1406
1379
  return C.forEach((a) => {
1407
- const b = a.repeatStartCell, M = a.relativeRange, k = {
1408
- startRow: v.row,
1409
- startColumn: v.col,
1410
- endColumn: v.col,
1411
- endRow: v.row
1380
+ const b = a.repeatStartCell, U = a.relativeRange, O = {
1381
+ startRow: _.row,
1382
+ startColumn: _.col,
1383
+ endColumn: _.col,
1384
+ endRow: _.row
1412
1385
  }, L = {
1413
1386
  startRow: b.row,
1414
1387
  startColumn: b.col,
1415
1388
  endColumn: b.col,
1416
1389
  endRow: b.row
1417
1390
  };
1418
- Pn.foreach(M, (j, D) => {
1419
- const q = ye.getPositionRange(
1391
+ En.foreach(U, (A, D) => {
1392
+ const X = Ee.getPositionRange(
1420
1393
  {
1421
- startRow: j,
1394
+ startRow: A,
1422
1395
  startColumn: D,
1423
1396
  endColumn: D,
1424
- endRow: j
1397
+ endRow: A
1425
1398
  },
1426
- k
1427
- ), { row: Ee, col: je } = d(q.startRow, q.startColumn), se = this._hyperLinkModel.getHyperLinkByLocation(c, l, Ee, je), Re = ye.getPositionRange(
1399
+ O
1400
+ ), { row: Re, col: Ae } = d(X.startRow, X.startColumn), oe = this._hyperLinkModel.getHyperLinkByLocation(c, u, Re, Ae), Le = Ee.getPositionRange(
1428
1401
  {
1429
- startRow: j,
1402
+ startRow: A,
1430
1403
  startColumn: D,
1431
1404
  endColumn: D,
1432
- endRow: j
1405
+ endRow: A
1433
1406
  },
1434
1407
  L
1435
- ), { row: Le, col: Pe } = d(Re.startRow, Re.startColumn), oe = Ce.generateRandomId(), A = this._hyperLinkModel.getHyperLinkByLocation(c, l, Le, Pe);
1436
- A && _.push({
1437
- id: Ue.id,
1408
+ ), { row: Pe, col: be } = d(Le.startRow, Le.startColumn), se = Ie.generateRandomId(), B = this._hyperLinkModel.getHyperLinkByLocation(c, u, Pe, be);
1409
+ B && v.push({
1410
+ id: He.id,
1438
1411
  params: {
1439
1412
  unitId: c,
1440
- subUnitId: l,
1441
- id: A.id
1413
+ subUnitId: u,
1414
+ id: B.id
1442
1415
  }
1443
- }), (Oe.COPY === r || Oe.SERIES === r) && se && (_.push({
1444
- id: He.id,
1416
+ }), (Oe.COPY === r || Oe.SERIES === r) && oe && (v.push({
1417
+ id: xe.id,
1445
1418
  params: {
1446
1419
  unitId: c,
1447
- subUnitId: l,
1420
+ subUnitId: u,
1448
1421
  link: {
1449
- ...se,
1450
- id: oe,
1451
- row: Le,
1452
- column: Pe
1422
+ ...oe,
1423
+ id: se,
1424
+ row: Pe,
1425
+ column: be
1453
1426
  }
1454
1427
  }
1455
- }), O.push({
1456
- id: Ue.id,
1428
+ }), k.push({
1429
+ id: He.id,
1457
1430
  params: {
1458
1431
  unitId: c,
1459
- subUnitId: l,
1460
- id: oe
1432
+ subUnitId: u,
1433
+ id: se
1461
1434
  }
1462
- })), A && O.push({
1463
- id: He.id,
1435
+ })), B && k.push({
1436
+ id: xe.id,
1464
1437
  params: {
1465
1438
  unitId: c,
1466
- subUnitId: l,
1467
- link: A
1439
+ subUnitId: u,
1440
+ link: B
1468
1441
  }
1469
1442
  });
1470
1443
  });
1471
1444
  }), {
1472
- undos: O,
1473
- redos: _
1445
+ undos: k,
1446
+ redos: v
1474
1447
  };
1475
1448
  }, n = {
1476
1449
  id: Ht,
1477
- onFillData: (i, r, o) => o === Oe.COPY || o === Oe.ONLY_FORMAT || o === Oe.SERIES ? e(i, o) : t()
1450
+ onFillData: (i, r, s) => s === Oe.COPY || s === Oe.ONLY_FORMAT || s === Oe.SERIES ? e(i, s) : t()
1478
1451
  };
1479
1452
  this.disposeWithMe(this._autoFillService.addHook(n));
1480
1453
  }
1481
1454
  };
1482
- tt = ls([
1483
- In(0, Mr),
1484
- In(1, R(dt))
1455
+ tt = io([
1456
+ _n(0, Tr),
1457
+ _n(1, R(dt))
1485
1458
  ], tt);
1486
- var us = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, ps = (t, e, n, i) => {
1487
- for (var r = i > 1 ? void 0 : i ? ds(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1488
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1489
- return i && r && us(e, n, r), r;
1490
- }, Rt = (t, e) => (n, i) => e(n, i, t);
1459
+ var oo = Object.defineProperty, so = Object.getOwnPropertyDescriptor, ao = (t, e, n, i) => {
1460
+ for (var r = i > 1 ? void 0 : i ? so(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1461
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1462
+ return i && r && oo(e, n, r), r;
1463
+ }, Et = (t, e) => (n, i) => e(n, i, t);
1491
1464
  let nt = class extends z {
1492
1465
  constructor(t, e, n) {
1493
1466
  super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController = n, this._commandExecutedListener();
@@ -1495,49 +1468,49 @@ let nt = class extends z {
1495
1468
  _commandExecutedListener() {
1496
1469
  this.disposeWithMe(
1497
1470
  this._commandService.beforeCommandExecuted((t) => {
1498
- t.id === Kn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1499
- workbookTypes: [xt],
1471
+ t.id === Wn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1472
+ workbookTypes: [Tt],
1500
1473
  rangeTypes: [Ut],
1501
- worksheetTypes: [Nt, Nn, Mt]
1474
+ worksheetTypes: [Nt, On, Mt]
1502
1475
  }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.hyperLinkErr")));
1503
1476
  })
1504
1477
  );
1505
1478
  }
1506
1479
  };
1507
- nt = ps([
1508
- Rt(0, R(ct)),
1509
- Rt(1, ie),
1510
- Rt(2, R(Mn))
1480
+ nt = ao([
1481
+ Et(0, R(ct)),
1482
+ Et(1, ie),
1483
+ Et(2, R(Tn))
1511
1484
  ], nt);
1512
- var hs = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, fs = (t, e, n, i) => {
1513
- for (var r = i > 1 ? void 0 : i ? gs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1514
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1515
- return i && r && hs(e, n, r), r;
1485
+ var co = Object.defineProperty, lo = Object.getOwnPropertyDescriptor, uo = (t, e, n, i) => {
1486
+ for (var r = i > 1 ? void 0 : i ? lo(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1487
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1488
+ return i && r && co(e, n, r), r;
1516
1489
  }, G = (t, e) => (n, i) => e(n, i, t);
1517
1490
  let rt = class extends z {
1518
- constructor(t, e, n, i, r, o, s, c, l, p) {
1519
- super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = i, this._sheetPermissionCheckController = r, this._commandService = o, this._editorBridgeService = s, this._textSelectionManagerService = c, this._univerInstanceService = l, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1491
+ constructor(t, e, n, i, r, s, o, c, u, p) {
1492
+ super(), this._hoverManagerService = t, this._sheetsHyperLinkPopupService = e, this._renderManagerService = n, this._permissionService = i, this._sheetPermissionCheckController = r, this._commandService = s, this._editorBridgeService = o, this._textSelectionManagerService = c, this._univerInstanceService = u, this._zenZoneService = p, this._initHoverListener(), this._initCommandListener(), this._initHoverEditingListener(), this._initTextSelectionListener(), this._initZenEditor();
1520
1493
  }
1521
1494
  _getLinkPermission(t) {
1522
- const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
1523
- if (!(o == null ? void 0 : o.getSheetBySheetId(n)))
1495
+ const { unitId: e, subUnitId: n, row: i, col: r } = t, s = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
1496
+ if (!(s == null ? void 0 : s.getSheetBySheetId(n)))
1524
1497
  return {
1525
1498
  viewPermission: !1,
1526
1499
  editPermission: !1,
1527
1500
  copyPermission: !1
1528
1501
  };
1529
1502
  const c = this._sheetPermissionCheckController.permissionCheckWithRanges({
1530
- workbookTypes: [Br],
1531
- worksheetTypes: [Vr],
1532
- rangeTypes: [Fr]
1533
- }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), l = this._sheetPermissionCheckController.permissionCheckWithRanges({
1534
- workbookTypes: [xt],
1503
+ workbookTypes: [$r],
1504
+ worksheetTypes: [Ar],
1505
+ rangeTypes: [Br]
1506
+ }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), u = this._sheetPermissionCheckController.permissionCheckWithRanges({
1507
+ workbookTypes: [Tt],
1535
1508
  worksheetTypes: [Nt, Mt],
1536
1509
  rangeTypes: [Ut]
1537
- }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), p = this._permissionService.composePermission([new Wr(e).id, new Zr(e, n).id]).every((u) => u.value);
1510
+ }, [{ startRow: i, startColumn: r, endRow: i, endColumn: r }]), p = this._permissionService.composePermission([new Vr(e).id, new Fr(e, n).id]).every((l) => l.value);
1538
1511
  return {
1539
1512
  viewPermission: c,
1540
- editPermission: l,
1513
+ editPermission: u,
1541
1514
  copyPermission: p
1542
1515
  };
1543
1516
  }
@@ -1545,47 +1518,47 @@ let rt = class extends z {
1545
1518
  this.disposeWithMe(
1546
1519
  // hover over not editing cell
1547
1520
  this._hoverManagerService.currentRichText$.pipe(We(200)).subscribe((t) => {
1548
- var k, L;
1521
+ var O, L;
1549
1522
  if (!t) {
1550
1523
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1551
1524
  return;
1552
1525
  }
1553
- const { unitId: e, subUnitId: n, row: i, col: r } = t, o = this._renderManagerService.getRenderById(e);
1554
- if (!o)
1526
+ const { unitId: e, subUnitId: n, row: i, col: r } = t, s = this._renderManagerService.getRenderById(e);
1527
+ if (!s)
1555
1528
  return;
1556
- const s = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET), c = s == null ? void 0 : s.getSheetBySheetId(n);
1529
+ const o = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET), c = o == null ? void 0 : o.getSheetBySheetId(n);
1557
1530
  if (!c)
1558
1531
  return;
1559
- if (!o.with(Dr).active) {
1560
- this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING);
1532
+ if (!s.with(Ur).active) {
1533
+ this._sheetsHyperLinkPopupService.hideCurrentPopup(f.VIEWING);
1561
1534
  return;
1562
1535
  }
1563
- const p = (k = o == null ? void 0 : o.with(an).getWorksheetSkeleton(n)) == null ? void 0 : k.skeleton, u = r, g = i;
1564
- let d = g, v = u;
1565
- p && p.overflowCache.forValue((j, D, q) => {
1566
- ye.contains(q, { startColumn: u, endColumn: u, startRow: g, endRow: g }) && (d = j, v = D);
1536
+ const p = (O = s == null ? void 0 : s.with(sn).getWorksheetSkeleton(n)) == null ? void 0 : O.skeleton, l = r, g = i;
1537
+ let d = g, _ = l;
1538
+ p && p.overflowCache.forValue((A, D, X) => {
1539
+ Ee.contains(X, { startColumn: l, endColumn: l, startRow: g, endRow: g }) && (d = A, _ = D);
1567
1540
  });
1568
- const { viewPermission: C, editPermission: _, copyPermission: O } = this._getLinkPermission(t);
1541
+ const { viewPermission: C, editPermission: v, copyPermission: k } = this._getLinkPermission(t);
1569
1542
  if (!C) {
1570
1543
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1571
1544
  return;
1572
1545
  }
1573
- const a = c.getCellStyleOnly(d, v), b = s.getStyles().getStyleByCell(a), M = (L = b == null ? void 0 : b.tr) == null ? void 0 : L.a;
1574
- if (!M && !t.customRange) {
1546
+ const a = c.getCellStyleOnly(d, _), b = o.getStyles().getStyleByCell(a), U = (L = b == null ? void 0 : b.tr) == null ? void 0 : L.a;
1547
+ if (!U && !t.customRange) {
1575
1548
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1576
1549
  return;
1577
1550
  }
1578
1551
  this._sheetsHyperLinkPopupService.showPopup({
1579
1552
  row: d,
1580
- col: v,
1581
- editPermission: _,
1582
- copyPermission: O,
1553
+ col: _,
1554
+ editPermission: v,
1555
+ copyPermission: k,
1583
1556
  customRange: t.customRange,
1584
1557
  customRangeRect: t.rect,
1585
- type: m.VIEWING,
1558
+ type: f.VIEWING,
1586
1559
  unitId: e,
1587
1560
  subUnitId: n,
1588
- showAll: !!M
1561
+ showAll: !!U
1589
1562
  });
1590
1563
  })
1591
1564
  );
@@ -1594,42 +1567,42 @@ let rt = class extends z {
1594
1567
  let t = null;
1595
1568
  this.disposeWithMe(
1596
1569
  this._editorBridgeService.currentEditCellState$.pipe(ue((e) => this._editorBridgeService.visible$.pipe(le((n) => ({ visible: n, state: e }))))).subscribe(({ visible: e, state: n }) => {
1597
- if (!n || n.editorUnitId !== Ie)
1570
+ if (!n || n.editorUnitId !== ye)
1598
1571
  return;
1599
1572
  if (!e.visible) {
1600
- t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1573
+ t == null || t.unsubscribe(), this._sheetsHyperLinkPopupService.hideCurrentPopup(f.EDITING), this._sheetsHyperLinkPopupService.endEditing(f.EDITING);
1601
1574
  return;
1602
1575
  }
1603
- const { editorUnitId: i, unitId: r, sheetId: o, row: s, column: c } = n, l = this._renderManagerService.getRenderById(i);
1604
- if (!l)
1576
+ const { editorUnitId: i, unitId: r, sheetId: s, row: o, column: c } = n, u = this._renderManagerService.getRenderById(i);
1577
+ if (!u)
1605
1578
  return;
1606
- const { editPermission: p, viewPermission: u, copyPermission: g } = this._getLinkPermission({ unitId: r, subUnitId: o, row: s, col: c }), d = l.with(un);
1607
- u && (t == null || t.unsubscribe(), t = d.hoverCustomRanges$.pipe(We(200)).subscribe((v) => {
1608
- var b, M;
1609
- const C = v.find((k) => k.range.rangeType === Ge.HYPERLINK);
1579
+ const { editPermission: p, viewPermission: l, copyPermission: g } = this._getLinkPermission({ unitId: r, subUnitId: s, row: o, col: c }), d = u.with(ln);
1580
+ l && (t == null || t.unsubscribe(), t = d.hoverCustomRanges$.pipe(We(200)).subscribe((_) => {
1581
+ var b, U;
1582
+ const C = _.find((O) => O.range.rangeType === Ge.HYPERLINK);
1610
1583
  if (!C) {
1611
1584
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1612
1585
  return;
1613
1586
  }
1614
- const _ = C.rects[C.rects.length - 1];
1615
- if (!((M = (b = this._renderManagerService.getRenderById(r)) == null ? void 0 : b.with(an).getWorksheetSkeleton(o)) == null ? void 0 : M.skeleton) || !_)
1587
+ const v = C.rects[C.rects.length - 1];
1588
+ if (!((U = (b = this._renderManagerService.getRenderById(r)) == null ? void 0 : b.with(sn).getWorksheetSkeleton(s)) == null ? void 0 : U.skeleton) || !v)
1616
1589
  return;
1617
- const a = l.engine.getCanvasElement().getBoundingClientRect();
1590
+ const a = u.engine.getCanvasElement().getBoundingClientRect();
1618
1591
  this._sheetsHyperLinkPopupService.showPopup({
1619
1592
  unitId: r,
1620
- subUnitId: o,
1621
- row: s,
1593
+ subUnitId: s,
1594
+ row: o,
1622
1595
  col: c,
1623
1596
  customRange: C.range,
1624
1597
  customRangeRect: {
1625
- left: _.left + a.left,
1626
- top: _.top + a.top,
1627
- bottom: _.bottom + a.top,
1628
- right: _.right + a.left
1598
+ left: v.left + a.left,
1599
+ top: v.top + a.top,
1600
+ bottom: v.bottom + a.top,
1601
+ right: v.right + a.left
1629
1602
  },
1630
1603
  editPermission: p,
1631
1604
  copyPermission: g,
1632
- type: m.EDITING
1605
+ type: f.EDITING
1633
1606
  });
1634
1607
  }));
1635
1608
  })
@@ -1640,67 +1613,67 @@ let rt = class extends z {
1640
1613
  _initZenEditor() {
1641
1614
  this.disposeWithMe(
1642
1615
  this._zenZoneService.visible$.subscribe((t) => {
1643
- t ? (this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.EDITING), this._sheetsHyperLinkPopupService.endEditing(m.EDITING), this._sheetsHyperLinkPopupService.hideCurrentPopup(m.VIEWING)) : (this._sheetsHyperLinkPopupService.hideCurrentPopup(m.ZEN_EDITOR), this._sheetsHyperLinkPopupService.endEditing(m.ZEN_EDITOR));
1616
+ t ? (this._sheetsHyperLinkPopupService.hideCurrentPopup(f.VIEWING), this._sheetsHyperLinkPopupService.hideCurrentPopup(f.EDITING), this._sheetsHyperLinkPopupService.endEditing(f.EDITING), this._sheetsHyperLinkPopupService.hideCurrentPopup(f.VIEWING)) : (this._sheetsHyperLinkPopupService.hideCurrentPopup(f.ZEN_EDITOR), this._sheetsHyperLinkPopupService.endEditing(f.ZEN_EDITOR));
1644
1617
  })
1645
1618
  ), this.disposeWithMe(
1646
1619
  this._univerInstanceService.focused$.pipe(
1647
1620
  ue((t) => {
1648
- const e = t === x ? this._renderManagerService.getRenderById(t) : null;
1649
- return e ? e.with(un).hoverCustomRanges$.pipe(We(200)) : new gi((n) => {
1621
+ const e = t === N ? this._renderManagerService.getRenderById(t) : null;
1622
+ return e ? e.with(ln).hoverCustomRanges$.pipe(We(200)) : new di((n) => {
1650
1623
  n.next(null);
1651
1624
  });
1652
1625
  })
1653
1626
  ).subscribe((t) => {
1654
1627
  const e = t == null ? void 0 : t.find((i) => i.range.rangeType === Ge.HYPERLINK), n = this._editorBridgeService.getEditCellState();
1655
1628
  if (e && n) {
1656
- const { unitId: i, sheetId: r, row: o, column: s } = n, { editPermission: c, viewPermission: l, copyPermission: p } = this._getLinkPermission({ unitId: i, subUnitId: r, row: o, col: s });
1657
- l && this._sheetsHyperLinkPopupService.showPopup({
1658
- type: m.ZEN_EDITOR,
1629
+ const { unitId: i, sheetId: r, row: s, column: o } = n, { editPermission: c, viewPermission: u, copyPermission: p } = this._getLinkPermission({ unitId: i, subUnitId: r, row: s, col: o });
1630
+ u && this._sheetsHyperLinkPopupService.showPopup({
1631
+ type: f.ZEN_EDITOR,
1659
1632
  unitId: i,
1660
1633
  subUnitId: r,
1661
- row: o,
1662
- col: s,
1634
+ row: s,
1635
+ col: o,
1663
1636
  customRange: e.range,
1664
1637
  editPermission: c,
1665
1638
  copyPermission: p
1666
1639
  });
1667
1640
  } else
1668
- this._sheetsHyperLinkPopupService.hideCurrentPopup(m.ZEN_EDITOR);
1641
+ this._sheetsHyperLinkPopupService.hideCurrentPopup(f.ZEN_EDITOR);
1669
1642
  })
1670
1643
  );
1671
1644
  }
1672
1645
  _initTextSelectionListener() {
1673
1646
  this.disposeWithMe(
1674
1647
  this._textSelectionManagerService.textSelection$.subscribe((t) => {
1675
- t && t.unitId === Ie && this._sheetsHyperLinkPopupService.endEditing(m.EDITING);
1648
+ t && t.unitId === ye && this._sheetsHyperLinkPopupService.endEditing(f.EDITING);
1676
1649
  })
1677
1650
  );
1678
1651
  }
1679
1652
  _initCommandListener() {
1680
- const t = [Gr.id, Kr.id, Yr.id];
1653
+ const t = [jr.id, Wr.id, Zr.id];
1681
1654
  this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
1682
1655
  t.includes(e.id) && this._sheetsHyperLinkPopupService.hideCurrentPopup();
1683
1656
  }));
1684
1657
  }
1685
1658
  };
1686
- rt = fs([
1687
- G(0, R(Hr)),
1659
+ rt = uo([
1660
+ G(0, R(Mr)),
1688
1661
  G(1, R(K)),
1689
1662
  G(2, R($e)),
1690
- G(3, R(dr)),
1691
- G(4, R(Mn)),
1663
+ G(3, R(cr)),
1664
+ G(4, R(Tn)),
1692
1665
  G(5, ie),
1693
1666
  G(6, re),
1694
1667
  G(7, R(De)),
1695
1668
  G(8, Y),
1696
1669
  G(9, pt)
1697
1670
  ], rt);
1698
- var ms = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Yn = (t, e, n, i) => {
1699
- for (var r = i > 1 ? void 0 : i ? _s(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1700
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1701
- return i && r && ms(e, n, r), r;
1702
- }, wt = (t, e) => (n, i) => e(n, i, t);
1703
- let Ot = class extends z {
1671
+ var po = Object.defineProperty, ho = Object.getOwnPropertyDescriptor, Zn = (t, e, n, i) => {
1672
+ for (var r = i > 1 ? void 0 : i ? ho(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1673
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1674
+ return i && r && po(e, n, r), r;
1675
+ }, bt = (t, e) => (n, i) => e(n, i, t);
1676
+ let wt = class extends z {
1704
1677
  constructor(t, e) {
1705
1678
  super(), this._context = t, this._hyperLinkModel = e, this._initSkeletonChange();
1706
1679
  }
@@ -1714,9 +1687,9 @@ let Ot = class extends z {
1714
1687
  }));
1715
1688
  }
1716
1689
  };
1717
- Ot = Yn([
1718
- wt(1, R(dt))
1719
- ], Ot);
1690
+ wt = Zn([
1691
+ bt(1, R(dt))
1692
+ ], wt);
1720
1693
  let it = class extends z {
1721
1694
  constructor(t, e) {
1722
1695
  super(), this._sheetInterceptorService = t, this._hyperLinkModel = e, this._initViewModelIntercept();
@@ -1724,12 +1697,12 @@ let it = class extends z {
1724
1697
  _initViewModelIntercept() {
1725
1698
  this.disposeWithMe(
1726
1699
  this._sheetInterceptorService.intercept(
1727
- qr.CELL_CONTENT,
1700
+ Kr.CELL_CONTENT,
1728
1701
  {
1729
- effect: pr.Value,
1702
+ effect: lr.Value,
1730
1703
  priority: 100,
1731
1704
  handler: (t, e, n) => {
1732
- const { row: i, col: r, unitId: o, subUnitId: s } = e, c = this._hyperLinkModel.getHyperLinkByLocation(o, s, i, r);
1705
+ const { row: i, col: r, unitId: s, subUnitId: o } = e, c = this._hyperLinkModel.getHyperLinkByLocation(s, o, i, r);
1733
1706
  return n(c ? {
1734
1707
  ...t,
1735
1708
  linkUrl: c.payload,
@@ -1741,57 +1714,57 @@ let it = class extends z {
1741
1714
  );
1742
1715
  }
1743
1716
  };
1744
- it = Yn([
1745
- wt(0, R(zr)),
1746
- wt(1, R(dt))
1717
+ it = Zn([
1718
+ bt(0, R(Gr)),
1719
+ bt(1, R(dt))
1747
1720
  ], it);
1748
- const vs = {
1749
- [ei.OTHERS]: {
1721
+ const go = {
1722
+ [qr.OTHERS]: {
1750
1723
  [de.id]: {
1751
1724
  order: 2,
1752
- menuItemFactory: ss
1725
+ menuItemFactory: eo
1753
1726
  },
1754
1727
  [Qe(de.id)]: {
1755
1728
  order: 2,
1756
- menuItemFactory: os
1729
+ menuItemFactory: to
1757
1730
  }
1758
1731
  },
1759
- [ti.MAIN_AREA]: {
1760
- [ni.OTHERS]: {
1732
+ [Jr.MAIN_AREA]: {
1733
+ [Qr.OTHERS]: {
1761
1734
  order: 1,
1762
1735
  [de.id]: {
1763
1736
  order: 0,
1764
- menuItemFactory: rs
1737
+ menuItemFactory: Ji
1765
1738
  },
1766
1739
  [Qe(de.id)]: {
1767
1740
  order: 0,
1768
- menuItemFactory: is
1741
+ menuItemFactory: Qi
1769
1742
  }
1770
1743
  }
1771
1744
  }
1772
1745
  };
1773
- var Ss = Object.defineProperty, Cs = Object.getOwnPropertyDescriptor, Is = (t, e, n, i) => {
1774
- for (var r = i > 1 ? void 0 : i ? Cs(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1775
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1776
- return i && r && Ss(e, n, r), r;
1746
+ var fo = Object.defineProperty, mo = Object.getOwnPropertyDescriptor, vo = (t, e, n, i) => {
1747
+ for (var r = i > 1 ? void 0 : i ? mo(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1748
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1749
+ return i && r && fo(e, n, r), r;
1777
1750
  }, Te = (t, e) => (n, i) => e(n, i, t);
1778
- let st = class extends z {
1751
+ let ot = class extends z {
1779
1752
  constructor(t, e, n, i, r) {
1780
1753
  super(), this._componentManager = t, this._commandService = e, this._menuManagerService = n, this._injector = i, this._shortcutService = r, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1781
1754
  }
1782
1755
  _initComponents() {
1783
1756
  [
1784
- [qe, qe.componentKey],
1757
+ [Xe, Xe.componentKey],
1785
1758
  [ze, ze.componentKey],
1786
- [Dt, "LinkSingle"]
1759
+ [xt, "LinkSingle"]
1787
1760
  ].forEach(([t, e]) => {
1788
1761
  this._componentManager.register(e, t);
1789
1762
  });
1790
1763
  }
1791
1764
  _initCommands() {
1792
1765
  [
1793
- jt,
1794
- Je,
1766
+ $t,
1767
+ qe,
1795
1768
  At,
1796
1769
  de
1797
1770
  ].forEach((t) => {
@@ -1799,25 +1772,25 @@ let st = class extends z {
1799
1772
  });
1800
1773
  }
1801
1774
  _initMenus() {
1802
- this._menuManagerService.mergeMenu(vs);
1775
+ this._menuManagerService.mergeMenu(go);
1803
1776
  }
1804
1777
  _initShortCut() {
1805
- this._shortcutService.registerShortcut(Kn);
1778
+ this._shortcutService.registerShortcut(Wn);
1806
1779
  }
1807
1780
  };
1808
- st = Is([
1809
- Te(0, R(ri)),
1781
+ ot = vo([
1782
+ Te(0, R(ei)),
1810
1783
  Te(1, ie),
1811
- Te(2, si),
1784
+ Te(2, ni),
1812
1785
  Te(3, R(lt)),
1813
- Te(4, R(ii))
1814
- ], st);
1815
- var ys = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Rs = (t, e, n, i) => {
1816
- for (var r = i > 1 ? void 0 : i ? Es(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1817
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1818
- return i && r && ys(e, n, r), r;
1819
- }, yn = (t, e) => (n, i) => e(n, i, t);
1820
- let ot = class extends z {
1786
+ Te(4, R(ti))
1787
+ ], ot);
1788
+ var _o = Object.defineProperty, So = Object.getOwnPropertyDescriptor, Co = (t, e, n, i) => {
1789
+ for (var r = i > 1 ? void 0 : i ? So(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1790
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1791
+ return i && r && _o(e, n, r), r;
1792
+ }, Sn = (t, e) => (n, i) => e(n, i, t);
1793
+ let st = class extends z {
1821
1794
  constructor(t, e) {
1822
1795
  super(), this._parserService = t, this._resolverService = e, this._handleInitUrl();
1823
1796
  }
@@ -1829,61 +1802,61 @@ let ot = class extends z {
1829
1802
  }
1830
1803
  }
1831
1804
  };
1832
- ot = Rs([
1833
- yn(0, R(kt)),
1834
- yn(1, R(pe))
1835
- ], ot);
1836
- var zn = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, Ps = (t, e, n) => e in t ? zn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, bs = (t, e, n, i) => {
1837
- for (var r = i > 1 ? void 0 : i ? Ls(e, n) : e, o = t.length - 1, s; o >= 0; o--)
1838
- (s = t[o]) && (r = (i ? s(e, n, r) : s(r)) || r);
1839
- return i && r && zn(e, n, r), r;
1840
- }, En = (t, e) => (n, i) => e(n, i, t), qn = (t, e, n) => Ps(t, typeof e != "symbol" ? e + "" : e, n);
1841
- let at = class extends gr {
1842
- constructor(t = gn, e, n) {
1805
+ st = Co([
1806
+ Sn(0, R(kt)),
1807
+ Sn(1, R(pe))
1808
+ ], st);
1809
+ var Gn = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, yo = (t, e, n) => e in t ? Gn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Eo = (t, e, n, i) => {
1810
+ for (var r = i > 1 ? void 0 : i ? Io(e, n) : e, s = t.length - 1, o; s >= 0; s--)
1811
+ (o = t[s]) && (r = (i ? o(e, n, r) : o(r)) || r);
1812
+ return i && r && Gn(e, n, r), r;
1813
+ }, Cn = (t, e) => (n, i) => e(n, i, t), Kn = (t, e, n) => yo(t, typeof e != "symbol" ? e + "" : e, n);
1814
+ let at = class extends dr {
1815
+ constructor(t = hn, e, n) {
1843
1816
  super(), this._config = t, this._injector = e, this._configService = n;
1844
- const { menu: i, ...r } = fr(
1817
+ const { menu: i, ...r } = pr(
1845
1818
  {},
1846
- gn,
1819
+ hn,
1847
1820
  this._config
1848
1821
  );
1849
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig($n, r);
1822
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Hn, r);
1850
1823
  }
1851
1824
  onStarting() {
1852
1825
  [
1853
1826
  [pe],
1854
1827
  [K],
1855
- [jn],
1828
+ [xn],
1856
1829
  [it],
1857
1830
  [rt],
1858
- [st],
1831
+ [ot],
1859
1832
  [tt],
1860
1833
  [Ye],
1861
1834
  [nt],
1862
- [ot]
1835
+ [st]
1863
1836
  ].forEach((e) => this._injector.add(e)), this._injector.get(it);
1864
1837
  }
1865
1838
  onReady() {
1866
- this._injector.get($e).registerRenderModule(w.UNIVER_SHEET, [Ot]), this._injector.get(tt), this._injector.get(Ye), this._injector.get(st);
1839
+ this._injector.get($e).registerRenderModule(w.UNIVER_SHEET, [wt]), this._injector.get(tt), this._injector.get(Ye), this._injector.get(ot);
1867
1840
  }
1868
1841
  onRendered() {
1869
- this._injector.get(nt), this._injector.get(ot), this._injector.get(rt);
1842
+ this._injector.get(nt), this._injector.get(st), this._injector.get(rt);
1870
1843
  }
1871
1844
  };
1872
- qn(at, "pluginName", Ht);
1873
- qn(at, "type", w.UNIVER_SHEET);
1874
- at = bs([
1875
- hr(Er, li),
1876
- En(1, R(lt)),
1877
- En(2, Ln)
1845
+ Kn(at, "pluginName", Ht);
1846
+ Kn(at, "type", w.UNIVER_SHEET);
1847
+ at = Eo([
1848
+ ur(Cr, si),
1849
+ Cn(1, R(lt)),
1850
+ Cn(2, yn)
1878
1851
  ], at);
1879
1852
  export {
1880
- Je as CloseHyperLinkPopupOperation,
1853
+ qe as CloseHyperLinkPopupOperation,
1881
1854
  At as InsertHyperLinkOperation,
1882
- Kn as InsertLinkShortcut,
1883
- jt as OpenHyperLinkEditPanelOperation,
1855
+ Wn as InsertLinkShortcut,
1856
+ $t as OpenHyperLinkEditPanelOperation,
1884
1857
  Ye as SheetsHyperLinkCopyPasteController,
1885
1858
  K as SheetsHyperLinkPopupService,
1886
1859
  pe as SheetsHyperLinkResolverService,
1887
- jn as SheetsHyperLinkSidePanelService,
1860
+ xn as SheetsHyperLinkSidePanelService,
1888
1861
  at as UniverSheetsHyperLinkUIPlugin
1889
1862
  };