@univerjs/sheets-hyper-link-ui 0.2.2 → 0.2.4-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,24 +1,24 @@
1
1
  var zt = Object.defineProperty;
2
2
  var Gt = (e, t, n) => t in e ? zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var D = (e, t, n) => Gt(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { Disposable as O, UniverInstanceType as w, OnLifecycle as N, LifecycleStages as $, IUniverInstanceService as ue, BooleanNumber as qt, ThemeService as Xt, isValidRange as ze, LocaleService as pe, RANGE_TYPE as lt, Rectangle as ee, ICommandService as W, Tools as te, DEFAULT_EMPTY_DOCUMENT_VALUE as Jt, createInternalEditorID as Qt, CommandType as He, CellValueType as en, ObjectMatrix as _t, Range as Qe, IPermissionService as tn, Plugin as nn, DependentOn as rn } from "@univerjs/core";
5
- import { RemoveSheetCommand as on, SheetInterceptorService as et, INTERCEPTOR_POINT as sn, SetSelectionsOperation as an, NORMAL_SELECTION_PLUGIN_NAME as cn, SetWorksheetActiveOperation as Oe, getSheetCommandTarget as Ct, SelectionManagerService as yt, SetRangeValuesMutation as fe, SetRangeValuesUndoMutationFactory as dt, SetRangeValuesCommand as ln, ClearSelectionContentCommand as dn, ClearSelectionAllCommand as un, ClearSelectionFormatCommand as pn, WorkbookViewPermission as hn, WorksheetViewPermission as mn, RangeProtectionPermissionViewPoint as gn, WorkbookEditablePermission as Ne, WorksheetEditPermission as $e, WorksheetInsertHyperlinkPermission as Be, RangeProtectionPermissionEditPoint as Ve, WorkbookCopyPermission as fn, WorksheetCopyPermission as vn, WorksheetSetCellValuePermission as tt } from "@univerjs/sheets";
6
- import { Inject as h, Injector as Ae } from "@wendellhu/redi";
7
- import { RemoveHyperLinkMutation as M, AddHyperLinkMutation as x, HyperLinkModel as T, ERROR_RANGE as Ge, UpdateHyperLinkCommand as St, AddHyperLinkCommand as Lt, CancelHyperLinkCommand as _n, UniverSheetsHyperLinkPlugin as Cn } from "@univerjs/sheets-hyper-link";
8
- import { SheetSkeletonManagerService as It, ScrollToRangeOperation as kt, SheetCanvasPopManagerService as yn, HoverManagerService as Sn, SheetPermissionInterceptorBaseController as Pt, whenSheetEditorFocused as Ln, getCurrentRangeDisable$ as bt, APPLY_TYPE as re, IAutoFillService as In, virtualizeDiscreteRanges as qe, getAutoFillRepeatRange as kn, COPY_TYPE as ut, rangeToDiscreteRange as Pn, PREDEFINED_HOOK_NAME as ve, getRepeatRange as bn, ISheetClipboardService as Rn } from "@univerjs/sheets-ui";
3
+ var W = (e, t, n) => Gt(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { Disposable as O, UniverInstanceType as E, OnLifecycle as B, LifecycleStages as D, Inject as h, IUniverInstanceService as ue, BooleanNumber as qt, ThemeService as Xt, isValidRange as ze, LocaleService as pe, RANGE_TYPE as lt, Rectangle as ne, ICommandService as K, Tools as re, DEFAULT_EMPTY_DOCUMENT_VALUE as Jt, useDependency as k, createInternalEditorID as Qt, CommandType as je, CellValueType as dt, ObjectMatrix as _t, Range as Qe, CustomRangeType as en, Injector as Ne, IPermissionService as tn, Plugin as nn, DependentOn as rn } from "@univerjs/core";
5
+ import { RemoveSheetCommand as on, SheetInterceptorService as et, INTERCEPTOR_POINT as sn, SetSelectionsOperation as an, SetWorksheetActiveOperation as Ee, getSheetCommandTarget as Ct, SheetsSelectionsService as yt, SetRangeValuesMutation as fe, SetRangeValuesUndoMutationFactory as ut, SetRangeValuesCommand as cn, ClearSelectionContentCommand as ln, ClearSelectionAllCommand as dn, ClearSelectionFormatCommand as un, WorkbookViewPermission as pn, WorksheetViewPermission as hn, RangeProtectionPermissionViewPoint as mn, WorkbookEditablePermission as $e, WorksheetEditPermission as Be, WorksheetInsertHyperlinkPermission as De, RangeProtectionPermissionEditPoint as Ve, WorkbookCopyPermission as gn, WorksheetCopyPermission as fn, WorksheetSetCellValuePermission as tt } from "@univerjs/sheets";
6
+ import { RemoveHyperLinkMutation as T, AddHyperLinkMutation as U, HyperLinkModel as H, ERROR_RANGE as Ge, UpdateHyperLinkCommand as St, AddHyperLinkCommand as Lt, CancelHyperLinkCommand as vn, UniverSheetsHyperLinkPlugin as _n } from "@univerjs/sheets-hyper-link";
7
+ import { SheetSkeletonManagerService as It, ScrollToRangeOperation as kt, SheetCanvasPopManagerService as Cn, IEditorBridgeService as yn, HoverManagerService as Sn, SheetPermissionInterceptorBaseController as Pt, whenSheetEditorFocused as Ln, getCurrentRangeDisable$ as bt, APPLY_TYPE as oe, IAutoFillService as In, virtualizeDiscreteRanges as qe, getAutoFillRepeatRange as kn, COPY_TYPE as Pn, rangeToDiscreteRange as bn, PREDEFINED_HOOK_NAME as ve, getRepeatRange as Rn, ISheetClipboardService as wn } from "@univerjs/sheets-ui";
9
8
  import { IRenderManagerService as nt } from "@univerjs/engine-render";
10
- import { Subject as wn, BehaviorSubject as On, debounceTime as En } from "rxjs";
11
- import Mn, { forwardRef as Z, useRef as Rt, createElement as K, useState as ie, useEffect as xn, useMemo as Tn } from "react";
12
- import { useDependency as k } from "@wendellhu/redi/react-bindings";
9
+ import { Subject as En, BehaviorSubject as On, debounceTime as Mn } from "rxjs";
10
+ import xn, { forwardRef as Y, useRef as Rt, createElement as Z, useState as ee, useEffect as wt, useMemo as Tn } from "react";
13
11
  import pt from "clsx";
14
- import { MessageType as ce, FormLayout as X, Input as ht, Select as Ze, Button as mt, Tooltip as _e } from "@univerjs/design";
15
- import { IMessageService as wt, useObservable as Ot, useEvent as Un, RangeSelector as jn, ISidebarService as Et, KeyCode as Hn, MetaKeys as Nn, MenuItemType as Mt, MenuPosition as xt, getMenuHiddenObservable as Tt, MenuGroup as $n, ComponentManager as Bn, IShortcutService as Vn, IMenuService as An } from "@univerjs/ui";
16
- import { deserializeRangeWithSheet as Ee, serializeRangeWithSheet as Ut, IDefinedNamesService as jt, serializeRangeToRefString as Dn, serializeRange as Fn } from "@univerjs/engine-formula";
17
- var Wn = Object.defineProperty, Zn = Object.getOwnPropertyDescriptor, Kn = (e, t, n, r) => {
18
- for (var i = r > 1 ? void 0 : r ? Zn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
12
+ import { MessageType as ce, FormLayout as X, Input as ht, Select as Ke, Button as mt, Tooltip as _e } from "@univerjs/design";
13
+ import { IMessageService as Et, useObservable as Un, useEvent as Hn, RangeSelector as jn, ISidebarService as Ot, KeyCode as Nn, MetaKeys as $n, MenuItemType as Mt, MenuPosition as xt, getMenuHiddenObservable as Tt, MenuGroup as Bn, ComponentManager as Dn, IShortcutService as Vn, IMenuService as An } from "@univerjs/ui";
14
+ import { deserializeRangeWithSheet as Oe, serializeRangeWithSheet as Ut, IDefinedNamesService as Ht, serializeRangeToRefString as Wn, serializeRange as Fn } from "@univerjs/engine-formula";
15
+ import { DOC_HYPER_LINK_PLUGIN as Kn } from "@univerjs/docs-hyper-link";
16
+ import { getPlainTextFormDocument as Yn } from "@univerjs/docs";
17
+ var Zn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Gn = (e, t, n, r) => {
18
+ for (var i = r > 1 ? void 0 : r ? zn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
19
19
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
20
- return r && i && Wn(t, n, i), i;
21
- }, Ke = (e, t) => (n, r) => t(n, r, e);
20
+ return r && i && Zn(t, n, i), i;
21
+ }, Ye = (e, t) => (n, r) => t(n, r, e);
22
22
  let ye = class extends O {
23
23
  constructor(e, t, n) {
24
24
  super(), this._sheetInterceptorService = e, this._univerInstanceService = t, this._hyperLinkModel = n, this._initSheetChange();
@@ -29,25 +29,25 @@ let ye = class extends O {
29
29
  getMutations: (e) => {
30
30
  var t;
31
31
  if (e.id === on.id) {
32
- const n = e.params, r = n.unitId ? this._univerInstanceService.getUnit(n.unitId) : this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
32
+ const n = e.params, r = n.unitId ? this._univerInstanceService.getUnit(n.unitId) : this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
33
33
  if (!r)
34
34
  return { redos: [], undos: [] };
35
35
  const i = r.getUnitId(), o = n.subUnitId || ((t = r.getActiveSheet()) == null ? void 0 : t.getSheetId());
36
36
  if (!o)
37
37
  return { redos: [], undos: [] };
38
- const s = this._hyperLinkModel.getSubUnit(i, o), c = s.map((p) => ({
39
- id: M.id,
38
+ const s = this._hyperLinkModel.getSubUnit(i, o), c = s.map((u) => ({
39
+ id: T.id,
40
40
  params: {
41
41
  unitId: i,
42
42
  subUnitId: o,
43
- id: p.id
43
+ id: u.id
44
44
  }
45
- })), a = s.map((p) => ({
46
- id: x.id,
45
+ })), a = s.map((u) => ({
46
+ id: U.id,
47
47
  params: {
48
48
  unitId: i,
49
49
  subUnitId: o,
50
- link: p
50
+ link: u
51
51
  }
52
52
  }));
53
53
  return { redos: c, undos: a };
@@ -58,17 +58,17 @@ let ye = class extends O {
58
58
  );
59
59
  }
60
60
  };
61
- ye = Kn([
62
- N($.Ready, ye),
63
- Ke(0, h(et)),
64
- Ke(1, ue),
65
- Ke(2, h(T))
61
+ ye = Gn([
62
+ B(D.Ready, ye),
63
+ Ye(0, h(et)),
64
+ Ye(1, ue),
65
+ Ye(2, h(H))
66
66
  ], ye);
67
- var Yn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Ht = (e, t, n, r) => {
68
- for (var i = r > 1 ? void 0 : r ? zn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
67
+ var qn = Object.defineProperty, Xn = Object.getOwnPropertyDescriptor, jt = (e, t, n, r) => {
68
+ for (var i = r > 1 ? void 0 : r ? Xn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
69
69
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
70
- return r && i && Yn(t, n, i), i;
71
- }, Q = (e, t) => (n, r) => t(n, r, e);
70
+ return r && i && qn(t, n, i), i;
71
+ }, te = (e, t) => (n, r) => t(n, r, e);
72
72
  let Xe = class extends O {
73
73
  constructor(e, t, n, r) {
74
74
  super(), this._context = e, this._hyperLinkModel = t, this._sheetSkeletonManagerService = n, this._renderManagerService = r, this._initSkeletonChange();
@@ -89,10 +89,10 @@ let Xe = class extends O {
89
89
  }));
90
90
  }
91
91
  };
92
- Xe = Ht([
93
- Q(1, h(T)),
94
- Q(2, h(It)),
95
- Q(3, nt)
92
+ Xe = jt([
93
+ te(1, h(H)),
94
+ te(2, h(It)),
95
+ te(3, nt)
96
96
  ], Xe);
97
97
  let Se = class extends O {
98
98
  constructor(e, t, n) {
@@ -123,13 +123,13 @@ let Se = class extends O {
123
123
  );
124
124
  }
125
125
  };
126
- Se = Ht([
127
- N($.Ready, Se),
128
- Q(0, h(et)),
129
- Q(1, h(T)),
130
- Q(2, h(Xt))
126
+ Se = jt([
127
+ B(D.Ready, Se),
128
+ te(0, h(et)),
129
+ te(1, h(H)),
130
+ te(2, h(Xt))
131
131
  ], Se);
132
- var Nt = { exports: {} }, De = {};
132
+ var Nt = { exports: {} }, Ae = {};
133
133
  /**
134
134
  * @license React
135
135
  * react-jsx-runtime.production.min.js
@@ -139,18 +139,18 @@ var Nt = { exports: {} }, De = {};
139
139
  * This source code is licensed under the MIT license found in the
140
140
  * LICENSE file in the root directory of this source tree.
141
141
  */
142
- var Gn = Mn, qn = Symbol.for("react.element"), Xn = Symbol.for("react.fragment"), Jn = Object.prototype.hasOwnProperty, Qn = Gn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, er = { key: !0, ref: !0, __self: !0, __source: !0 };
142
+ var Jn = xn, Qn = Symbol.for("react.element"), er = Symbol.for("react.fragment"), tr = Object.prototype.hasOwnProperty, nr = Jn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, rr = { key: !0, ref: !0, __self: !0, __source: !0 };
143
143
  function $t(e, t, n) {
144
144
  var r, i = {}, o = null, s = null;
145
145
  n !== void 0 && (o = "" + n), t.key !== void 0 && (o = "" + t.key), t.ref !== void 0 && (s = t.ref);
146
- for (r in t) Jn.call(t, r) && !er.hasOwnProperty(r) && (i[r] = t[r]);
146
+ for (r in t) tr.call(t, r) && !rr.hasOwnProperty(r) && (i[r] = t[r]);
147
147
  if (e && e.defaultProps) for (r in t = e.defaultProps, t) i[r] === void 0 && (i[r] = t[r]);
148
- return { $$typeof: qn, type: e, key: o, ref: s, props: i, _owner: Qn.current };
148
+ return { $$typeof: Qn, type: e, key: o, ref: s, props: i, _owner: nr.current };
149
149
  }
150
- De.Fragment = Xn;
151
- De.jsx = $t;
152
- De.jsxs = $t;
153
- Nt.exports = De;
150
+ Ae.Fragment = er;
151
+ Ae.jsx = $t;
152
+ Ae.jsxs = $t;
153
+ Nt.exports = Ae;
154
154
  var d = Nt.exports, b = function() {
155
155
  return b = Object.assign || function(e) {
156
156
  for (var t, n = 1, r = arguments.length; n < r; n++) {
@@ -159,23 +159,23 @@ var d = Nt.exports, b = function() {
159
159
  }
160
160
  return e;
161
161
  }, b.apply(this, arguments);
162
- }, tr = function(e, t) {
162
+ }, ir = function(e, t) {
163
163
  var n = {};
164
164
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
165
165
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
166
166
  for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
167
167
  t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
168
168
  return n;
169
- }, Y = Z(function(e, t) {
170
- var n = e.icon, r = e.id, i = e.className, o = e.extend, s = tr(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), a = Rt("_".concat(ir()));
169
+ }, z = Y(function(e, t) {
170
+ var n = e.icon, r = e.id, i = e.className, o = e.extend, s = ir(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), a = Rt("_".concat(ar()));
171
171
  return Bt(n, "".concat(r), { defIds: n.defIds, idSuffix: a.current }, b({ ref: t, className: c }, s), o);
172
172
  });
173
173
  function Bt(e, t, n, r, i) {
174
- return K(e.tag, b(b({ key: t }, nr(e, n, i)), r), (rr(e, n).children || []).map(function(o, s) {
174
+ return Z(e.tag, b(b({ key: t }, or(e, n, i)), r), (sr(e, n).children || []).map(function(o, s) {
175
175
  return Bt(o, "".concat(t, "-").concat(e.tag, "-").concat(s), n, void 0, i);
176
176
  }));
177
177
  }
178
- function nr(e, t, n) {
178
+ function or(e, t, n) {
179
179
  var r = b({}, e.attrs);
180
180
  n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
181
181
  var i = t.defIds;
@@ -184,77 +184,77 @@ function nr(e, t, n) {
184
184
  typeof c == "string" && (r[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
185
185
  })), r;
186
186
  }
187
- function rr(e, t) {
187
+ function sr(e, t) {
188
188
  var n, r = t.defIds;
189
189
  return !r || r.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? b(b({}, e), { children: e.children.map(function(i) {
190
190
  return typeof i.attrs.id == "string" && r && r.indexOf(i.attrs.id) > -1 ? b(b({}, i), { attrs: b(b({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
191
191
  }) }) : e;
192
192
  }
193
- function ir() {
193
+ function ar() {
194
194
  return Math.random().toString(36).substring(2, 8);
195
195
  }
196
- Y.displayName = "UniverIcon";
197
- var or = { 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" } }] }, Le = Z(function(e, t) {
198
- return K(Y, Object.assign({}, e, {
196
+ z.displayName = "UniverIcon";
197
+ var cr = { 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" } }] }, Le = Y(function(e, t) {
198
+ return Z(z, Object.assign({}, e, {
199
199
  id: "all-border-single",
200
200
  ref: t,
201
- icon: or
201
+ icon: cr
202
202
  }));
203
203
  });
204
204
  Le.displayName = "AllBorderSingle";
205
- var sr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.02547 12.4251C5.15328 13.7417 6.26305 14.7708 7.61318 14.7708H12.6132C14.0491 14.7708 15.2132 13.6067 15.2132 12.1708V6.1708C15.2132 4.78586 14.1303 3.65383 12.7651 3.57517C12.6373 2.25858 11.5275 1.22949 10.1774 1.22949H5.17739C3.74145 1.22949 2.57739 2.39355 2.57739 3.82949V9.82949C2.57739 11.2144 3.66024 12.3465 5.02547 12.4251ZM11.5535 3.5708H7.61318C6.17724 3.5708 5.01318 4.73486 5.01318 6.1708V11.22C4.31736 11.1387 3.77739 10.5471 3.77739 9.82949V3.82949C3.77739 3.05629 4.40419 2.42949 5.17739 2.42949H10.1774C10.8622 2.42949 11.4322 2.92119 11.5535 3.5708ZM14.0132 6.1708C14.0132 5.3976 13.3864 4.7708 12.6132 4.7708H7.61318C6.83998 4.7708 6.21318 5.3976 6.21318 6.1708V12.1708C6.21318 12.944 6.83998 13.5708 7.61318 13.5708H12.6132C13.3864 13.5708 14.0132 12.944 14.0132 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Vt = Z(function(e, t) {
206
- return K(Y, Object.assign({}, e, {
205
+ var lr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.02547 12.4251C5.15328 13.7417 6.26305 14.7708 7.61318 14.7708H12.6132C14.0491 14.7708 15.2132 13.6067 15.2132 12.1708V6.1708C15.2132 4.78586 14.1303 3.65383 12.7651 3.57517C12.6373 2.25858 11.5275 1.22949 10.1774 1.22949H5.17739C3.74145 1.22949 2.57739 2.39355 2.57739 3.82949V9.82949C2.57739 11.2144 3.66024 12.3465 5.02547 12.4251ZM11.5535 3.5708H7.61318C6.17724 3.5708 5.01318 4.73486 5.01318 6.1708V11.22C4.31736 11.1387 3.77739 10.5471 3.77739 9.82949V3.82949C3.77739 3.05629 4.40419 2.42949 5.17739 2.42949H10.1774C10.8622 2.42949 11.4322 2.92119 11.5535 3.5708ZM14.0132 6.1708C14.0132 5.3976 13.3864 4.7708 12.6132 4.7708H7.61318C6.83998 4.7708 6.21318 5.3976 6.21318 6.1708V12.1708C6.21318 12.944 6.83998 13.5708 7.61318 13.5708H12.6132C13.3864 13.5708 14.0132 12.944 14.0132 12.1708V6.1708Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Dt = Y(function(e, t) {
206
+ return Z(z, Object.assign({}, e, {
207
207
  id: "copy-single",
208
208
  ref: t,
209
- icon: sr
209
+ icon: lr
210
210
  }));
211
211
  });
212
- Vt.displayName = "CopySingle";
213
- var ar = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, Me = Z(function(e, t) {
214
- return K(Y, Object.assign({}, e, {
212
+ Dt.displayName = "CopySingle";
213
+ var dr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.9564 2.91332C4.91407 1.87102 3.22413 1.87101 2.18182 2.91333L2.18182 2.91333C1.13953 3.95567 1.13952 5.6456 2.18182 6.68791L8.27777 12.7838C9.72408 14.2302 12.069 14.2302 13.5154 12.7839L13.0911 12.3596L13.5154 12.7839C14.9617 11.3375 14.9617 8.99257 13.5154 7.54626L8.39476 2.42566C8.16044 2.19134 7.78054 2.19134 7.54623 2.42566C7.31191 2.65997 7.31191 3.03987 7.54623 3.27419L12.6668 8.39479L13.0911 7.97052L12.6668 8.39479C13.6445 9.37247 13.6445 10.9576 12.6668 11.9353L13.0399 12.3084L12.6668 11.9353C11.6891 12.913 10.104 12.913 9.1263 11.9353L3.03035 5.83938C2.45668 5.26571 2.45667 4.33556 3.03036 3.76184C3.60403 3.18818 4.53416 3.18817 5.10788 3.76185C5.10788 3.76186 5.10788 3.76186 5.10789 3.76186L11.2038 9.8578L11.601 9.46061L11.2038 9.8578C11.3735 10.0275 11.3735 10.3026 11.2038 10.4723L11.2038 10.4723C11.0341 10.642 10.759 10.642 10.5893 10.4723L5.46874 5.35171C5.23442 5.1174 4.85452 5.1174 4.62021 5.35171C4.38589 5.58602 4.38589 5.96592 4.62021 6.20024L9.74078 11.3208C10.3791 11.9591 11.414 11.9591 12.0523 11.3208C12.0523 11.3208 12.0523 11.3208 12.0523 11.3208M12.0523 11.3208C12.6907 10.6825 12.6906 9.64757 12.0523 9.00927L5.95641 2.91333L5.9564 2.91332", fillRule: "evenodd", clipRule: "evenodd" } }] }, Me = Y(function(e, t) {
214
+ return Z(z, Object.assign({}, e, {
215
215
  id: "link-single",
216
216
  ref: t,
217
- icon: ar
217
+ icon: dr
218
218
  }));
219
219
  });
220
220
  Me.displayName = "LinkSingle";
221
- var cr = { 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" } }] }, At = Z(function(e, t) {
222
- return K(Y, Object.assign({}, e, {
221
+ var ur = { 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" } }] }, Vt = Y(function(e, t) {
222
+ return Z(z, Object.assign({}, e, {
223
223
  id: "unlink-single",
224
224
  ref: t,
225
- icon: cr
225
+ icon: ur
226
226
  }));
227
227
  });
228
- At.displayName = "UnlinkSingle";
229
- var lr = { 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" } }] }, Dt = Z(function(e, t) {
230
- return K(Y, Object.assign({}, e, {
228
+ Vt.displayName = "UnlinkSingle";
229
+ var pr = { 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" } }] }, At = Y(function(e, t) {
230
+ return Z(z, Object.assign({}, e, {
231
231
  id: "write-single",
232
232
  ref: t,
233
- icon: lr
233
+ icon: pr
234
234
  }));
235
235
  });
236
- Dt.displayName = "WriteSingle";
237
- var dr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.36396 1.12549C2.61066 1.12549 2 1.73615 2 2.48945V13.5104C2 14.2637 2.61066 14.8744 3.36396 14.8744H12.457C13.2103 14.8744 13.821 14.2637 13.821 13.5104V5.0992L9.91954 1.12549H3.36396Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M9.91797 1.12549L13.8209 5.09842H10.5846C10.2164 5.09842 9.91797 4.79994 9.91797 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.71926 10.2949L6.28687 12.403C6.17306 12.5705 5.94501 12.614 5.77751 12.5002C5.61002 12.3864 5.56649 12.1584 5.6803 11.9909L7.27596 9.64252L5.85088 7.54519C5.73707 7.37769 5.78059 7.14964 5.94809 7.03583C6.11558 6.92202 6.34363 6.96555 6.45744 7.13304L7.71926 8.9901L8.98108 7.13304C9.09489 6.96555 9.32294 6.92202 9.49044 7.03583C9.65793 7.14964 9.70146 7.37769 9.58765 7.54519L8.16256 9.64252L9.75822 11.9909C9.87203 12.1584 9.82851 12.3864 9.66101 12.5002C9.49351 12.614 9.26547 12.5705 9.15166 12.403L7.71926 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Je = Z(function(e, t) {
238
- return K(Y, Object.assign({}, e, {
236
+ At.displayName = "WriteSingle";
237
+ var hr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "#35BD4B", d: "M3.36396 1.12549C2.61066 1.12549 2 1.73615 2 2.48945V13.5104C2 14.2637 2.61066 14.8744 3.36396 14.8744H12.457C13.2103 14.8744 13.821 14.2637 13.821 13.5104V5.0992L9.91954 1.12549H3.36396Z" } }, { tag: "path", attrs: { fill: "#32A846", d: "M9.91797 1.12549L13.8209 5.09842H10.5846C10.2164 5.09842 9.91797 4.79994 9.91797 4.43175V1.12549Z" } }, { tag: "path", attrs: { fill: "#fff", d: "M7.71926 10.2949L6.28687 12.403C6.17306 12.5705 5.94501 12.614 5.77751 12.5002C5.61002 12.3864 5.56649 12.1584 5.6803 11.9909L7.27596 9.64252L5.85088 7.54519C5.73707 7.37769 5.78059 7.14964 5.94809 7.03583C6.11558 6.92202 6.34363 6.96555 6.45744 7.13304L7.71926 8.9901L8.98108 7.13304C9.09489 6.96555 9.32294 6.92202 9.49044 7.03583C9.65793 7.14964 9.70146 7.37769 9.58765 7.54519L8.16256 9.64252L9.75822 11.9909C9.87203 12.1584 9.82851 12.3864 9.66101 12.5002C9.49351 12.614 9.26547 12.5705 9.15166 12.403L7.71926 10.2949Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Je = Y(function(e, t) {
238
+ return Z(z, Object.assign({}, e, {
239
239
  id: "xlsx",
240
240
  ref: t,
241
- icon: dr
241
+ icon: hr
242
242
  }));
243
243
  });
244
244
  Je.displayName = "Xlsx";
245
- var ur = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, hr = (e, t, n, r) => {
246
- for (var i = r > 1 ? void 0 : r ? pr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
245
+ var mr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, fr = (e, t, n, r) => {
246
+ for (var i = r > 1 ? void 0 : r ? gr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
247
247
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
248
- return r && i && ur(t, n, i), i;
249
- }, oe = (e, t) => (n, r) => t(n, r, e);
250
- function mr(e, t) {
248
+ return r && i && mr(t, n, i), i;
249
+ }, se = (e, t) => (n, r) => t(n, r, e);
250
+ function vr(e, t) {
251
251
  const n = t.getMergeData(), r = t.getMaxColumns() - 1, i = t.getMaxRows() - 1;
252
252
  if (r < e.endColumn && (e.endColumn = r), i < e.endRow && (e.endRow = i), e.rangeType === lt.COLUMN || lt.ROW)
253
253
  return e;
254
254
  const o = [];
255
255
  return n.forEach((s) => {
256
- ee.intersects(e, s) && o.push(s);
257
- }), ee.realUnion(e, ...o);
256
+ ne.intersects(e, s) && o.push(s);
257
+ }), ne.realUnion(e, ...o);
258
258
  }
259
259
  let F = class {
260
260
  constructor(e, t, n, r, i) {
@@ -262,12 +262,12 @@ let F = class {
262
262
  }
263
263
  _getURLName(e) {
264
264
  var c;
265
- const { gid: t, range: n, rangeid: r } = e, i = this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
265
+ const { gid: t, range: n, rangeid: r } = e, i = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
266
266
  if (!i)
267
267
  return null;
268
268
  const o = t ? i.getSheetBySheetId(t) : i.getActiveSheet(), s = (c = o == null ? void 0 : o.getName()) != null ? c : "";
269
269
  if (n) {
270
- const a = Ee(n).range;
270
+ const a = Oe(n).range;
271
271
  return ze(a) && n !== Ge ? {
272
272
  type: "range",
273
273
  name: Ut(s, a)
@@ -299,13 +299,13 @@ let F = class {
299
299
  return null;
300
300
  }
301
301
  navigateTo(e) {
302
- const { gid: t, range: n, rangeid: r } = e, i = this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
302
+ const { gid: t, range: n, rangeid: r } = e, i = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
303
303
  if (!i)
304
304
  return;
305
305
  const o = i.getUnitId();
306
306
  if (r && this.navigateToDefineName(o, r), !!t) {
307
307
  if (n) {
308
- const s = Ee(n);
308
+ const s = Oe(n);
309
309
  ze(s.range) && n !== Ge && this.navigateToRange(o, t, s.range);
310
310
  return;
311
311
  }
@@ -342,13 +342,12 @@ let F = class {
342
342
  async navigateToRange(e, t, n) {
343
343
  const r = await this.navigateToSheetById(e, t);
344
344
  if (r) {
345
- const i = mr(n, r);
345
+ const i = vr(n, r);
346
346
  await this._commandService.executeCommand(
347
347
  an.id,
348
348
  {
349
349
  unitId: e,
350
350
  subUnitId: t,
351
- pluginName: cn,
352
351
  selections: [{
353
352
  range: i
354
353
  }]
@@ -359,7 +358,7 @@ let F = class {
359
358
  }
360
359
  }
361
360
  async navigateToSheet(e, t) {
362
- const n = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
361
+ const n = this._univerInstanceService.getUnit(e, E.UNIVER_SHEET);
363
362
  if (!n)
364
363
  return !1;
365
364
  const r = n.getActiveSheet();
@@ -377,10 +376,10 @@ let F = class {
377
376
  return n.getHiddenWorksheets().indexOf(o) > -1 && this._messageService.show({
378
377
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
379
378
  type: ce.Error
380
- }), await this._commandService.executeCommand(Oe.id, { unitId: e, subUnitId: o });
379
+ }), await this._commandService.executeCommand(Ee.id, { unitId: e, subUnitId: o });
381
380
  }
382
381
  async navigateToSheetById(e, t) {
383
- const n = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
382
+ const n = this._univerInstanceService.getUnit(e, E.UNIVER_SHEET);
384
383
  if (!n)
385
384
  return !1;
386
385
  const r = n.getActiveSheet();
@@ -392,7 +391,7 @@ let F = class {
392
391
  return i ? n.getHiddenWorksheets().indexOf(t) > -1 ? (this._messageService.show({
393
392
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
394
393
  type: ce.Error
395
- }), !1) : await this._commandService.executeCommand(Oe.id, { unitId: e, subUnitId: t }) ? i : !1 : (this._messageService.show({
394
+ }), !1) : await this._commandService.executeCommand(Ee.id, { unitId: e, subUnitId: t }) ? i : !1 : (this._messageService.show({
396
395
  content: this._localeService.t("hyperLink.message.noSheet"),
397
396
  type: ce.Error
398
397
  }), !1);
@@ -404,30 +403,30 @@ let F = class {
404
403
  window.open(e, "_blank", "noopener noreferrer");
405
404
  }
406
405
  };
407
- F = hr([
408
- oe(0, ue),
409
- oe(1, W),
410
- oe(2, jt),
411
- oe(3, wt),
412
- oe(4, h(pe))
406
+ F = fr([
407
+ se(0, ue),
408
+ se(1, K),
409
+ se(2, Ht),
410
+ se(3, Et),
411
+ se(4, h(pe))
413
412
  ], F);
414
413
  function de(e) {
415
- return te.isLegalUrl(e);
414
+ return re.isLegalUrl(e);
416
415
  }
417
- function gr(e) {
416
+ function _r(e) {
418
417
  return /^[a-zA-Z]+:\/\//.test(e);
419
418
  }
420
- function fr(e) {
419
+ function Cr(e) {
421
420
  return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(e);
422
421
  }
423
422
  function rt(e) {
424
423
  if (de(e)) {
425
- const t = gr(e) ? e : fr(e) ? `mailto://${e}` : `http://${e}`, n = new URL(t);
424
+ const t = _r(e) ? e : Cr(e) ? `mailto://${e}` : `http://${e}`, n = new URL(t);
426
425
  return n.hostname === location.hostname && n.port === location.port && n.protocol === location.protocol && n.pathname === location.pathname && n.hash && !n.search ? n.hash : t;
427
426
  }
428
427
  return e;
429
428
  }
430
- function vr(e) {
429
+ function yr(e) {
431
430
  if (e === null)
432
431
  return "";
433
432
  if (e != null && e.p) {
@@ -439,70 +438,70 @@ function vr(e) {
439
438
  }
440
439
  return e == null ? void 0 : e.v;
441
440
  }
442
- const _r = "univer-cell-link-edit-buttons", Cr = {
443
- cellLinkEditButtons: _r
441
+ const Sr = "univer-cell-link-edit-buttons", Lr = {
442
+ cellLinkEditButtons: Sr
444
443
  }, xe = () => {
445
- var ne;
446
- const [e, t] = ie(""), [n, r] = ie(""), [i, o] = ie(
444
+ var ie;
445
+ const [e, t] = ee(""), [n, r] = ee(""), [i, o] = ee(
447
446
  "link"
448
447
  /* link */
449
- ), [s, c] = ie(""), a = k(pe), p = k(jt), m = k(ue), f = k(H), l = Ot(f.currentEditing$), g = k(T), S = k(F), v = k(W), [I, A] = ie(!1), y = Rt(!1);
450
- xn(() => {
451
- var u, C, L;
448
+ ), [s, c] = ee(""), a = k(pe), u = k(Ht), g = k(ue), f = k($), l = Un(f.currentEditing$), m = k(H), _ = k(F), v = k(K), [L, M] = ee(!1), y = Rt(!1);
449
+ wt(() => {
450
+ var p, S, I;
452
451
  if ((l == null ? void 0 : l.row) !== void 0 && l.column !== void 0) {
453
- const _ = g.getHyperLinkByLocationSync(l.unitId, l.subUnitId, l.row, l.column);
454
- if (_) {
455
- const ge = S.parseHyperLink(_.payload);
456
- if (t(_.id), r(_.display), ge.type === "outer") {
452
+ const C = m.getHyperLinkByLocationSync(l.unitId, l.subUnitId, l.row, l.column);
453
+ if (C) {
454
+ const ge = _.parseHyperLink(C.payload);
455
+ if (t(C.id), r(C.display), ge.type === "outer") {
457
456
  o(
458
457
  "link"
459
458
  /* link */
460
- ), c(ge.url), ge.url === _.display && (y.current = !0);
459
+ ), c(ge.url), ge.url === C.display && (y.current = !0);
461
460
  return;
462
461
  } else {
463
- const j = ge.searchObj;
464
- if (j.rangeid) {
462
+ const N = ge.searchObj;
463
+ if (N.rangeid) {
465
464
  o(
466
465
  "rangeid"
467
466
  /* definedName */
468
- ), c(j.rangeid);
467
+ ), c(N.rangeid);
469
468
  return;
470
469
  }
471
- if (j.range) {
472
- const Yt = j.gid && (L = (C = (u = m.getUnit(l.unitId)) == null ? void 0 : u.getSheetBySheetId(j.gid)) == null ? void 0 : C.getName()) != null ? L : "";
470
+ if (N.range) {
471
+ const Zt = N.gid && (I = (S = (p = g.getUnit(l.unitId)) == null ? void 0 : p.getSheetBySheetId(N.gid)) == null ? void 0 : S.getName()) != null ? I : "";
473
472
  if (o(
474
473
  "range"
475
474
  /* range */
476
- ), j.range === Ge)
475
+ ), N.range === Ge)
477
476
  c("");
478
477
  else {
479
- const ct = Ut(Yt, Ee(j.range).range);
480
- c(ct), ct === _.display && (y.current = !0);
478
+ const ct = Ut(Zt, Oe(N.range).range);
479
+ c(ct), ct === C.display && (y.current = !0);
481
480
  }
482
481
  return;
483
482
  }
484
- if (j.gid) {
483
+ if (N.gid) {
485
484
  o(
486
485
  "gid"
487
486
  /* sheet */
488
- ), c(j.gid);
487
+ ), c(N.gid);
489
488
  return;
490
489
  }
491
490
  }
492
491
  }
493
- const U = m.getUnit(l.unitId), R = U == null ? void 0 : U.getSheetBySheetId(l.subUnitId), Kt = R == null ? void 0 : R.getCellRaw(l.row, l.column), We = vr(Kt);
492
+ const j = g.getUnit(l.unitId), w = j == null ? void 0 : j.getSheetBySheetId(l.subUnitId), Yt = w == null ? void 0 : w.getCellRaw(l.row, l.column), Fe = yr(Yt);
494
493
  o(
495
494
  "link"
496
495
  /* link */
497
- ), c(""), r((We != null ? We : "").toString()), t("");
496
+ ), c(""), r((Fe != null ? Fe : "").toString()), t("");
498
497
  return;
499
498
  }
500
499
  o(
501
500
  "link"
502
501
  /* link */
503
502
  ), c(""), r(""), t("");
504
- }, [l, g, S, m]);
505
- const z = Tn(() => s, [i]), B = [
503
+ }, [l, m, _, g]);
504
+ const V = Tn(() => s, [i]), R = [
506
505
  {
507
506
  label: a.t("hyperLink.form.link"),
508
507
  value: "link"
@@ -523,29 +522,29 @@ const _r = "univer-cell-link-edit-buttons", Cr = {
523
522
  value: "rangeid"
524
523
  /* definedName */
525
524
  }
526
- ], P = m.getCurrentUnitForType(w.UNIVER_SHEET);
525
+ ], P = g.getCurrentUnitForType(E.UNIVER_SHEET);
527
526
  if (!P)
528
527
  return;
529
- const G = P.getHiddenWorksheets(), V = P.getSheets().map((u) => ({ label: u.getName(), value: u.getSheetId() })).filter((u) => G.indexOf(u.value) === -1), q = Object.values((ne = p.getDefinedNameMap(P.getUnitId())) != null ? ne : {}).map((u) => ({
530
- label: u.name,
531
- value: u.id
532
- })), he = (u, C) => {
533
- if (u === "link")
534
- return rt(C);
535
- if (u === "range") {
536
- const L = Ee(C), _ = P.getSheetBySheetName(L.sheetName);
537
- if (_)
538
- return `#gid=${_.getSheetId()}&range=${Fn(L.range)}`;
528
+ const G = P.getHiddenWorksheets(), A = P.getSheets().map((p) => ({ label: p.getName(), value: p.getSheetId() })).filter((p) => G.indexOf(p.value) === -1), q = Object.values((ie = u.getDefinedNameMap(P.getUnitId())) != null ? ie : {}).map((p) => ({
529
+ label: p.name,
530
+ value: p.id
531
+ })), he = (p, S) => {
532
+ if (p === "link")
533
+ return rt(S);
534
+ if (p === "range") {
535
+ const I = Oe(S), C = P.getSheetBySheetName(I.sheetName);
536
+ if (C)
537
+ return `#gid=${C.getSheetId()}&range=${Fn(I.range)}`;
539
538
  }
540
- return `#${u}=${C}`;
541
- }, Fe = Un((u) => {
542
- var _;
543
- const C = u[0];
544
- if (!C || !ze(C.range))
539
+ return `#${p}=${S}`;
540
+ }, We = Hn((p) => {
541
+ var C;
542
+ const S = p[0];
543
+ if (!S || !ze(S.range))
545
544
  return;
546
- C.sheetName || (C.sheetName = ((_ = P.getActiveSheet()) == null ? void 0 : _.getName()) || "");
547
- const L = Dn(C);
548
- c(L), L && (y.current || !n) && (r(L), y.current = !0);
545
+ S.sheetName || (S.sheetName = ((C = P.getActiveSheet()) == null ? void 0 : C.getName()) || "");
546
+ const I = Wn(S);
547
+ c(I), I && (y.current || !n) && (r(I), y.current = !0);
549
548
  }), me = async () => {
550
549
  if (l && (e ? await v.executeCommand(St.id, {
551
550
  unitId: l.unitId,
@@ -559,24 +558,24 @@ const _r = "univer-cell-link-edit-buttons", Cr = {
559
558
  unitId: l.unitId,
560
559
  subUnitId: l.subUnitId,
561
560
  link: {
562
- id: te.generateRandomId(),
561
+ id: re.generateRandomId(),
563
562
  row: l.row,
564
563
  column: l.column,
565
564
  payload: he(i, s),
566
565
  display: n
567
566
  }
568
567
  })), l) {
569
- await v.executeCommand(Oe.id, {
568
+ await v.executeCommand(Ee.id, {
570
569
  unitId: l.unitId,
571
570
  subUnitId: l.subUnitId
572
571
  });
573
- const u = 1;
572
+ const p = 1;
574
573
  await v.executeCommand(kt.id, {
575
574
  range: {
576
- startRow: Math.max(l.row - u, 0),
577
- endRow: l.row + u,
578
- startColumn: Math.max(l.column - u, 0),
579
- endColumn: l.column + u
575
+ startRow: Math.max(l.row - p, 0),
576
+ endRow: l.row + p,
577
+ startColumn: Math.max(l.column - p, 0),
578
+ endColumn: l.column + p
580
579
  }
581
580
  });
582
581
  }
@@ -587,13 +586,13 @@ const _r = "univer-cell-link-edit-buttons", Cr = {
587
586
  X,
588
587
  {
589
588
  label: a.t("hyperLink.form.label"),
590
- error: I && !n ? a.t("hyperLink.form.inputError") : "",
589
+ error: L && !n ? a.t("hyperLink.form.inputError") : "",
591
590
  children: /* @__PURE__ */ d.jsx(
592
591
  ht,
593
592
  {
594
593
  value: n,
595
- onChange: (u) => {
596
- r(u), y.current = !1;
594
+ onChange: (p) => {
595
+ r(p), y.current = !1;
597
596
  },
598
597
  placeholder: a.t("hyperLink.form.labelPlaceholder")
599
598
  }
@@ -601,73 +600,73 @@ const _r = "univer-cell-link-edit-buttons", Cr = {
601
600
  }
602
601
  ),
603
602
  /* @__PURE__ */ d.jsx(X, { label: a.t("hyperLink.form.type"), children: /* @__PURE__ */ d.jsx(
604
- Ze,
603
+ Ke,
605
604
  {
606
- options: B,
605
+ options: R,
607
606
  value: i,
608
- onChange: (u) => {
609
- o(u), c("");
607
+ onChange: (p) => {
608
+ o(p), c("");
610
609
  }
611
610
  }
612
611
  ) }),
613
612
  i === "link" && /* @__PURE__ */ d.jsx(
614
613
  X,
615
614
  {
616
- error: I ? s ? de(s) ? "" : a.t("hyperLink.form.linkError") : a.t("hyperLink.form.inputError") : "",
615
+ error: L ? s ? de(s) ? "" : a.t("hyperLink.form.linkError") : a.t("hyperLink.form.inputError") : "",
617
616
  children: /* @__PURE__ */ d.jsx(
618
617
  ht,
619
618
  {
620
619
  value: s,
621
- onChange: (u) => {
622
- c(u), u && (y.current || !n || n === s) && (r(u), y.current = !0);
620
+ onChange: (p) => {
621
+ c(p), p && (y.current || !n || n === s) && (r(p), y.current = !0);
623
622
  },
624
623
  placeholder: a.t("hyperLink.form.linkPlaceholder")
625
624
  }
626
625
  )
627
626
  }
628
627
  ),
629
- i === "range" && /* @__PURE__ */ d.jsx(X, { error: I && !s ? a.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ d.jsx(
628
+ i === "range" && /* @__PURE__ */ d.jsx(X, { error: L && !s ? a.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ d.jsx(
630
629
  jn,
631
630
  {
632
631
  openForSheetUnitId: P.getUnitId(),
633
632
  id: Qt("hyper-link-edit"),
634
633
  isSingleChoice: !0,
635
- value: z,
636
- onChange: Fe
634
+ value: V,
635
+ onChange: We
637
636
  }
638
637
  ) }),
639
- i === "gid" && /* @__PURE__ */ d.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
640
- Ze,
638
+ i === "gid" && /* @__PURE__ */ d.jsx(X, { error: L && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
639
+ Ke,
641
640
  {
642
- options: V,
641
+ options: A,
643
642
  value: s,
644
- onChange: (u) => {
645
- var _, U;
646
- c(u);
647
- const C = (_ = V.find((R) => R.value === u)) == null ? void 0 : _.label, L = (U = V.find((R) => R.value === s)) == null ? void 0 : U.label;
648
- C && (y.current || !n || n === L) && (r(C), y.current = !0);
643
+ onChange: (p) => {
644
+ var C, j;
645
+ c(p);
646
+ const S = (C = A.find((w) => w.value === p)) == null ? void 0 : C.label, I = (j = A.find((w) => w.value === s)) == null ? void 0 : j.label;
647
+ S && (y.current || !n || n === I) && (r(S), y.current = !0);
649
648
  }
650
649
  }
651
650
  ) }),
652
- i === "rangeid" && /* @__PURE__ */ d.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
653
- Ze,
651
+ i === "rangeid" && /* @__PURE__ */ d.jsx(X, { error: L && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
652
+ Ke,
654
653
  {
655
654
  options: q,
656
655
  value: s,
657
- onChange: (u) => {
658
- var _, U;
659
- c(u);
660
- const C = (_ = q.find((R) => R.value === u)) == null ? void 0 : _.label, L = (U = q.find((R) => R.value === s)) == null ? void 0 : U.label;
661
- C && (y.current || !n || n === L) && (r(C), y.current = !0);
656
+ onChange: (p) => {
657
+ var C, j;
658
+ c(p);
659
+ const S = (C = q.find((w) => w.value === p)) == null ? void 0 : C.label, I = (j = q.find((w) => w.value === s)) == null ? void 0 : j.label;
660
+ S && (y.current || !n || n === I) && (r(S), y.current = !0);
662
661
  }
663
662
  }
664
663
  ) }),
665
- /* @__PURE__ */ d.jsxs("div", { className: Cr.cellLinkEditButtons, children: [
664
+ /* @__PURE__ */ d.jsxs("div", { className: Lr.cellLinkEditButtons, children: [
666
665
  /* @__PURE__ */ d.jsx(
667
666
  mt,
668
667
  {
669
668
  onClick: () => {
670
- l && v.executeCommand(Oe.id, {
669
+ l && v.executeCommand(Ee.id, {
671
670
  unitId: l.unitId,
672
671
  subUnitId: l.subUnitId
673
672
  }), v.executeCommand(Te.id);
@@ -682,7 +681,7 @@ const _r = "univer-cell-link-edit-buttons", Cr = {
682
681
  style: { marginLeft: 8 },
683
682
  onClick: async () => {
684
683
  if (!n || !s || i === "link" && !de(s)) {
685
- A(!0);
684
+ M(!0);
686
685
  return;
687
686
  }
688
687
  me();
@@ -695,15 +694,15 @@ const _r = "univer-cell-link-edit-buttons", Cr = {
695
694
  };
696
695
  xe.componentKey = "univer.sheet.cell-link-edit";
697
696
  const it = {
698
- type: He.OPERATION,
697
+ type: je.OPERATION,
699
698
  id: "sheet.operation.open-hyper-link-sidebar",
700
699
  handler(e, t) {
701
700
  if (!t)
702
701
  return !1;
703
- const { unitId: n, subUnitId: r, row: i, column: o } = t, s = e.get(T), c = e.get(Et), a = e.get(H), p = s.getHyperLinkByLocation(n, r, i, o);
702
+ const { unitId: n, subUnitId: r, row: i, column: o } = t, s = e.get(H), c = e.get(Ot), a = e.get($), u = s.getHyperLinkByLocation(n, r, i, o);
704
703
  return a.startEditing(t), c.open({
705
704
  header: {
706
- title: p ? "hyperLink.form.editTitle" : "hyperLink.form.addTitle"
705
+ title: u ? "hyperLink.form.editTitle" : "hyperLink.form.addTitle"
707
706
  },
708
707
  children: {
709
708
  label: xe.componentKey
@@ -711,21 +710,21 @@ const it = {
711
710
  }), !0;
712
711
  }
713
712
  }, Te = {
714
- type: He.OPERATION,
713
+ type: je.OPERATION,
715
714
  id: "sheet.operation.close-hyper-link-sidebar",
716
715
  handler(e) {
717
- const t = e.get(Et), n = e.get(H);
716
+ const t = e.get(Ot), n = e.get($);
718
717
  return t.close(), n.endEditing(), !0;
719
718
  }
720
719
  }, ot = {
721
- type: He.OPERATION,
720
+ type: je.OPERATION,
722
721
  id: "sheet.operation.insert-hyper-link",
723
722
  handler(e) {
724
723
  const t = e.get(ue), n = Ct(t);
725
724
  if (!n)
726
725
  return !1;
727
- const r = e.get(W), o = e.get(yt).getFirst();
728
- if (!(o != null && o.primary))
726
+ const r = e.get(K), o = e.get(yt).getCurrentLastSelection();
727
+ if (!o)
729
728
  return !1;
730
729
  const s = o.primary.startRow, c = o.primary.startColumn;
731
730
  return r.executeCommand(it.id, {
@@ -736,22 +735,22 @@ const it = {
736
735
  });
737
736
  }
738
737
  }, st = {
739
- type: He.OPERATION,
738
+ type: je.OPERATION,
740
739
  id: "sheet.operation.insert-hyper-link-toolbar",
741
740
  handler(e) {
742
- const t = e.get(W);
743
- return e.get(H).currentEditing ? t.executeCommand(Te.id) : t.executeCommand(ot.id);
741
+ const t = e.get(K);
742
+ return e.get($).currentEditing ? t.executeCommand(Te.id) : t.executeCommand(ot.id);
744
743
  }
745
- }, yr = "univer-cell-link", Sr = "univer-cell-link-type", Lr = "univer-cell-link-content", Ir = "univer-cell-link-content-error", kr = "univer-cell-link-url", Pr = "univer-cell-link-operations", br = "univer-cell-link-operation", Rr = "univer-cell-link-operation-error", E = {
746
- cellLink: yr,
747
- cellLinkType: Sr,
748
- cellLinkContent: Lr,
749
- cellLinkContentError: Ir,
750
- cellLinkUrl: kr,
751
- cellLinkOperations: Pr,
752
- cellLinkOperation: br,
753
- cellLinkOperationError: Rr
754
- }, wr = {
744
+ }, Ir = "univer-cell-link", kr = "univer-cell-link-type", Pr = "univer-cell-link-content", br = "univer-cell-link-content-error", Rr = "univer-cell-link-url", wr = "univer-cell-link-operations", Er = "univer-cell-link-operation", Or = "univer-cell-link-operation-error", x = {
745
+ cellLink: Ir,
746
+ cellLinkType: kr,
747
+ cellLinkContent: Pr,
748
+ cellLinkContentError: br,
749
+ cellLinkUrl: Rr,
750
+ cellLinkOperations: wr,
751
+ cellLinkOperation: Er,
752
+ cellLinkOperationError: Or
753
+ }, Mr = {
755
754
  outer: /* @__PURE__ */ d.jsx(Me, {}),
756
755
  link: /* @__PURE__ */ d.jsx(Me, {}),
757
756
  sheet: /* @__PURE__ */ d.jsx(Je, {}),
@@ -760,67 +759,75 @@ const it = {
760
759
  "range-error": /* @__PURE__ */ d.jsx(Le, {}),
761
760
  "sheet-error": /* @__PURE__ */ d.jsx(Je, {})
762
761
  }, Ue = () => {
763
- const e = k(H), t = k(T), n = k(W), r = k(wt), i = k(pe), o = Ot(e.currentPopup$, e.currentPopup), s = k(F);
764
- if (!o)
762
+ const e = k($), t = k(H), n = k(K), r = k(Et), i = k(pe), [o, s] = ee(null), c = k(F);
763
+ if (wt(() => {
764
+ s(e.currentPopup);
765
+ const _ = e.currentPopup$.subscribe((v) => {
766
+ s(v);
767
+ });
768
+ return () => {
769
+ _.unsubscribe();
770
+ };
771
+ }, [e.currentPopup, e.currentPopup$]), !o)
765
772
  return null;
766
- const { unitId: c, subUnitId: a, id: p } = o, m = t.getHyperLink(c, a, p);
767
- if (!m)
773
+ const { unitId: a, subUnitId: u, id: g } = o, f = t.getHyperLink(a, u, g);
774
+ if (!f)
768
775
  return null;
769
- const f = s.parseHyperLink(m.payload), l = f.type.indexOf("error") > -1;
770
- return /* @__PURE__ */ d.jsxs("div", { className: E.cellLink, onClick: () => e.hideCurrentPopup(), children: [
771
- /* @__PURE__ */ d.jsxs("div", { className: pt(E.cellLinkContent, { [E.cellLinkContentError]: l }), onClick: f.handler, children: [
772
- /* @__PURE__ */ d.jsx("div", { className: E.cellLinkType, children: wr[f.type] }),
773
- /* @__PURE__ */ d.jsx(_e, { showIfEllipsis: !0, title: f.name, children: /* @__PURE__ */ d.jsx("span", { className: E.cellLinkUrl, children: f.name }) })
776
+ const l = c.parseHyperLink(f.payload), m = l.type.indexOf("error") > -1;
777
+ return /* @__PURE__ */ d.jsxs("div", { className: x.cellLink, onClick: () => e.hideCurrentPopup(), children: [
778
+ /* @__PURE__ */ d.jsxs("div", { className: pt(x.cellLinkContent, { [x.cellLinkContentError]: m }), onClick: l.handler, children: [
779
+ /* @__PURE__ */ d.jsx("div", { className: x.cellLinkType, children: Mr[l.type] }),
780
+ /* @__PURE__ */ d.jsx(_e, { showIfEllipsis: !0, title: l.name, children: /* @__PURE__ */ d.jsx("span", { className: x.cellLinkUrl, children: l.name }) })
774
781
  ] }),
775
- /* @__PURE__ */ d.jsxs("div", { className: E.cellLinkOperations, children: [
782
+ /* @__PURE__ */ d.jsxs("div", { className: x.cellLinkOperations, children: [
776
783
  o.copyPermission && /* @__PURE__ */ d.jsx(
777
784
  "div",
778
785
  {
779
- className: pt(E.cellLinkOperation, { [E.cellLinkOperationError]: l }),
786
+ className: pt(x.cellLinkOperation, { [x.cellLinkOperationError]: m }),
780
787
  onClick: () => {
781
- if (!l) {
782
- if (f.type !== "outer") {
783
- const g = new URL(window.location.href);
784
- g.hash = f.url.slice(1), navigator.clipboard.writeText(g.href);
788
+ if (!m) {
789
+ if (l.type !== "outer") {
790
+ const _ = new URL(window.location.href);
791
+ _.hash = l.url.slice(1), navigator.clipboard.writeText(_.href);
785
792
  } else
786
- navigator.clipboard.writeText(f.url);
793
+ navigator.clipboard.writeText(l.url);
787
794
  r.show({
788
795
  content: i.t("hyperLink.message.coped"),
789
796
  type: ce.Info
790
797
  });
791
798
  }
792
799
  },
793
- children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(Vt, {}) })
800
+ children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(Dt, {}) })
794
801
  }
795
802
  ),
796
803
  o.editPermission && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
797
804
  /* @__PURE__ */ d.jsx(
798
805
  "div",
799
806
  {
800
- className: E.cellLinkOperation,
807
+ className: x.cellLinkOperation,
801
808
  onClick: () => {
802
809
  n.executeCommand(it.id, {
803
- unitId: c,
804
- subUnitId: a,
805
- row: m.row,
806
- column: m.column
810
+ unitId: a,
811
+ subUnitId: u,
812
+ row: f.row,
813
+ column: f.column
807
814
  });
808
815
  },
809
- children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(Dt, {}) })
816
+ children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(At, {}) })
810
817
  }
811
818
  ),
812
819
  /* @__PURE__ */ d.jsx(
813
820
  "div",
814
821
  {
815
- className: E.cellLinkOperation,
822
+ className: x.cellLinkOperation,
816
823
  onClick: () => {
817
- n.executeCommand(_n.id, {
818
- unitId: c,
819
- subUnitId: a,
820
- id: m.id
824
+ n.executeCommand(vn.id, {
825
+ unitId: a,
826
+ subUnitId: u,
827
+ id: f.id
821
828
  });
822
829
  },
823
- children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(At, {}) })
830
+ children: /* @__PURE__ */ d.jsx(_e, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(Vt, {}) })
824
831
  }
825
832
  )
826
833
  ] })
@@ -828,20 +835,20 @@ const it = {
828
835
  ] });
829
836
  };
830
837
  Ue.componentKey = "univer.sheet.cell-link-popup";
831
- var Or = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, Mr = (e, t, n, r) => {
832
- for (var i = r > 1 ? void 0 : r ? Er(t, n) : t, o = e.length - 1, s; o >= 0; o--)
838
+ var xr = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, Ur = (e, t, n, r) => {
839
+ for (var i = r > 1 ? void 0 : r ? Tr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
833
840
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
834
- return r && i && Or(t, n, i), i;
841
+ return r && i && xr(t, n, i), i;
835
842
  }, gt = (e, t) => (n, r) => t(n, r, e);
836
- const xr = (e, t) => e.unitId === t.unitId && e.subUnitId === t.subUnitId && e.row === t.row && e.col === t.col;
837
- let H = class extends O {
843
+ const Hr = (e, t) => e.unitId === t.unitId && e.subUnitId === t.subUnitId && e.row === t.row && e.col === t.col;
844
+ let $ = class extends O {
838
845
  constructor(t, n) {
839
846
  super();
840
- D(this, "_currentPopup", null);
841
- D(this, "_currentPopup$", new wn());
842
- D(this, "currentPopup$", this._currentPopup$.asObservable());
843
- D(this, "_currentEditing$", new On(null));
844
- D(this, "currentEditing$", this._currentEditing$.asObservable());
847
+ W(this, "_currentPopup", null);
848
+ W(this, "_currentPopup$", new En());
849
+ W(this, "currentPopup$", this._currentPopup$.asObservable());
850
+ W(this, "_currentEditing$", new On(null));
851
+ W(this, "currentEditing$", this._currentEditing$.asObservable());
845
852
  this._hyperLinkModel = t, this._sheetCanvasPopManagerService = n, this.disposeWithMe(() => {
846
853
  this.hideCurrentPopup(), this.endEditing(), this._currentEditing$.complete(), this._currentPopup$.complete();
847
854
  });
@@ -853,7 +860,7 @@ let H = class extends O {
853
860
  return this._currentEditing$.getValue();
854
861
  }
855
862
  showPopup(t) {
856
- if (this._currentPopup && xr(t, this._currentPopup))
863
+ if (this._currentPopup && Hr(t, this._currentPopup))
857
864
  return;
858
865
  this.hideCurrentPopup();
859
866
  const { unitId: n, subUnitId: r, row: i, col: o } = t, s = this._hyperLinkModel.getHyperLinkByLocation(n, r, i, o);
@@ -889,21 +896,25 @@ let H = class extends O {
889
896
  this._currentEditing$.next(null);
890
897
  }
891
898
  };
892
- H = Mr([
893
- gt(0, h(T)),
894
- gt(1, h(yn))
895
- ], H);
896
- var Tr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, jr = (e, t, n, r) => {
897
- for (var i = r > 1 ? void 0 : r ? Ur(t, n) : t, o = e.length - 1, s; o >= 0; o--)
899
+ $ = Ur([
900
+ gt(0, h(H)),
901
+ gt(1, h(Cn))
902
+ ], $);
903
+ var jr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, $r = (e, t, n, r) => {
904
+ for (var i = r > 1 ? void 0 : r ? Nr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
898
905
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
899
- return r && i && Tr(t, n, i), i;
900
- }, se = (e, t) => (n, r) => t(n, r, e);
906
+ return r && i && jr(t, n, i), i;
907
+ }, J = (e, t) => (n, r) => t(n, r, e);
901
908
  let Ie = class extends O {
902
- constructor(e, t, n, r, i) {
903
- super(), this._sheetInterceptorService = e, this._injector = t, this._hyperLinkModel = n, this._selectionManagerService = r, this._univerInstanceService = i, this._initCommandInterceptor();
909
+ constructor(e, t, n, r, i, o) {
910
+ super(), this._sheetInterceptorService = e, this._injector = t, this._hyperLinkModel = n, this._selectionManagerService = r, this._univerInstanceService = i, this._editorBridgeService = o, this._initCommandInterceptor();
904
911
  }
905
912
  _initCommandInterceptor() {
906
- this._initAddHyperLinkCommandInterceptor(), this._initSetRangeValuesCommandInterceptor(), this._initUpdateHyperLinkCommandInterceptor(), this._initClearSelectionCommandInterceptor();
913
+ this._initAddHyperLinkCommandInterceptor(), this._initSetRangeValuesCommandInterceptor(), this._initUpdateHyperLinkCommandInterceptor(), this._initClearSelectionCommandInterceptor(), this._initRichTextEditorInterceptor();
914
+ }
915
+ _getCurrentCell(e, t, n, r) {
916
+ var i, o;
917
+ return (o = (i = this._univerInstanceService.getUnit(e, E.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetId(t)) == null ? void 0 : o.getCell(n, r);
907
918
  }
908
919
  _initAddHyperLinkCommandInterceptor() {
909
920
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
@@ -932,7 +943,7 @@ let Ie = class extends O {
932
943
  }],
933
944
  undos: [{
934
945
  id: fe.id,
935
- params: dt(this._injector, c)
946
+ params: ut(this._injector, c)
936
947
  }]
937
948
  };
938
949
  }
@@ -956,7 +967,7 @@ let Ie = class extends O {
956
967
  [s.row]: {
957
968
  [s.column]: {
958
969
  v: o.display,
959
- t: en.STRING,
970
+ t: dt.STRING,
960
971
  p: null
961
972
  }
962
973
  }
@@ -969,7 +980,7 @@ let Ie = class extends O {
969
980
  }],
970
981
  undos: [{
971
982
  id: fe.id,
972
- params: dt(this._injector, c)
983
+ params: ut(this._injector, c)
973
984
  }]
974
985
  };
975
986
  }
@@ -984,47 +995,47 @@ let Ie = class extends O {
984
995
  _initSetRangeValuesCommandInterceptor() {
985
996
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
986
997
  getMutations: (e) => {
987
- if (e.id === ln.id) {
998
+ if (e.id === cn.id) {
988
999
  const t = e.params, { unitId: n, subUnitId: r } = t, i = [], o = [];
989
1000
  return t.cellValue && new _t(t.cellValue).forValue((s, c, a) => {
990
- var l, g, S;
991
- const p = (S = a == null ? void 0 : a.v) != null ? S : (g = (l = a == null ? void 0 : a.p) == null ? void 0 : l.body) == null ? void 0 : g.dataStream.slice(0, -2), m = (p != null ? p : "").toString(), f = this._hyperLinkModel.getHyperLinkByLocation(n, r, s, c);
1001
+ var l, m, _, v, L, M, y;
1002
+ const u = (_ = a == null ? void 0 : a.v) != null ? _ : (m = (l = a == null ? void 0 : a.p) == null ? void 0 : l.body) == null ? void 0 : m.dataStream.slice(0, -2), g = (u != null ? u : "").toString(), f = this._hyperLinkModel.getHyperLinkByLocation(n, r, s, c);
992
1003
  if (!f) {
993
- if (de(m)) {
994
- const v = te.generateRandomId();
1004
+ if (de(g) || (v = a == null ? void 0 : a.custom) != null && v.__link_url) {
1005
+ const V = (M = (L = a == null ? void 0 : a.custom) == null ? void 0 : L.__link_url) != null ? M : g, R = re.generateRandomId();
995
1006
  o.push({
996
- id: M.id,
1007
+ id: T.id,
997
1008
  params: {
998
1009
  unitId: n,
999
1010
  subUnitId: r,
1000
- id: v
1011
+ id: R
1001
1012
  }
1002
1013
  }), i.push({
1003
- id: x.id,
1014
+ id: U.id,
1004
1015
  params: {
1005
1016
  unitId: n,
1006
1017
  subUnitId: r,
1007
1018
  link: {
1008
- id: v,
1019
+ id: R,
1009
1020
  row: s,
1010
1021
  column: c,
1011
- display: m,
1012
- payload: rt(m)
1022
+ display: g,
1023
+ payload: rt(V)
1013
1024
  }
1014
1025
  }
1015
1026
  });
1016
1027
  }
1017
1028
  return;
1018
1029
  }
1019
- p === "" && (i.push({
1020
- id: M.id,
1030
+ (u === "" || ((y = a == null ? void 0 : a.custom) == null ? void 0 : y.__link_url) === "") && (i.push({
1031
+ id: T.id,
1021
1032
  params: {
1022
1033
  unitId: n,
1023
1034
  subUnitId: r,
1024
1035
  id: f.id
1025
1036
  }
1026
1037
  }), o.push({
1027
- id: x.id,
1038
+ id: U.id,
1028
1039
  params: {
1029
1040
  unitId: n,
1030
1041
  subUnitId: r,
@@ -1046,25 +1057,25 @@ let Ie = class extends O {
1046
1057
  _initClearSelectionCommandInterceptor() {
1047
1058
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1048
1059
  getMutations: (e) => {
1049
- if (e.id === dn.id || e.id === un.id || e.id === pn.id) {
1050
- const t = [], n = [], r = this._selectionManagerService.getFirst(), i = Ct(this._univerInstanceService);
1060
+ if (e.id === ln.id || e.id === dn.id || e.id === un.id) {
1061
+ const t = [], n = [], r = this._selectionManagerService.getCurrentLastSelection(), i = Ct(this._univerInstanceService);
1051
1062
  if (r && i) {
1052
1063
  const { unitId: o, subUnitId: s } = i;
1053
1064
  Qe.foreach(r.range, (c, a) => {
1054
- const p = this._hyperLinkModel.getHyperLinkByLocation(o, s, c, a);
1055
- p && (t.push({
1056
- id: M.id,
1065
+ const u = this._hyperLinkModel.getHyperLinkByLocation(o, s, c, a);
1066
+ u && (t.push({
1067
+ id: T.id,
1057
1068
  params: {
1058
1069
  unitId: o,
1059
1070
  subUnitId: s,
1060
- id: p.id
1071
+ id: u.id
1061
1072
  }
1062
1073
  }), n.push({
1063
- id: x.id,
1074
+ id: U.id,
1064
1075
  params: {
1065
1076
  unitId: o,
1066
1077
  subUnitId: s,
1067
- link: p
1078
+ link: u
1068
1079
  }
1069
1080
  }));
1070
1081
  });
@@ -1081,23 +1092,48 @@ let Ie = class extends O {
1081
1092
  }
1082
1093
  }));
1083
1094
  }
1084
- _getCurrentCell(e, t, n, r) {
1085
- var i, o;
1086
- return (o = (i = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetId(t)) == null ? void 0 : o.getCell(n, r);
1095
+ _initRichTextEditorInterceptor() {
1096
+ this.disposeWithMe(
1097
+ this._editorBridgeService.interceptor.intercept(
1098
+ this._editorBridgeService.interceptor.getInterceptPoints().AFTER_CELL_EDIT,
1099
+ {
1100
+ handler: (e, t, n) => {
1101
+ var r, i, o, s, c, a;
1102
+ if (e != null && e.p) {
1103
+ const u = (i = (r = e.p.body) == null ? void 0 : r.customRanges) == null ? void 0 : i.find((f) => f.rangeType === en.HYPERLINK), g = (o = e.p.resources) == null ? void 0 : o.find((f) => f.name === Kn);
1104
+ if (u && g) {
1105
+ const f = u.rangeId, l = (a = (c = (s = JSON.parse(g.data)) == null ? void 0 : s.links) == null ? void 0 : c.find((m) => m.id === f)) == null ? void 0 : a.payload;
1106
+ return n({
1107
+ ...e,
1108
+ p: null,
1109
+ v: Yn(e.p),
1110
+ t: dt.STRING,
1111
+ custom: {
1112
+ __link_url: l
1113
+ }
1114
+ });
1115
+ }
1116
+ }
1117
+ return n(e);
1118
+ }
1119
+ }
1120
+ )
1121
+ );
1087
1122
  }
1088
1123
  };
1089
- Ie = jr([
1090
- N($.Starting, Ie),
1091
- se(0, h(et)),
1092
- se(1, h(Ae)),
1093
- se(2, h(T)),
1094
- se(3, h(yt)),
1095
- se(4, ue)
1124
+ Ie = $r([
1125
+ B(D.Starting, Ie),
1126
+ J(0, h(et)),
1127
+ J(1, h(Ne)),
1128
+ J(2, h(H)),
1129
+ J(3, h(yt)),
1130
+ J(4, ue),
1131
+ J(5, yn)
1096
1132
  ], Ie);
1097
- var Hr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, $r = (e, t, n, r) => {
1098
- for (var i = r > 1 ? void 0 : r ? Nr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1133
+ var Br = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, Vr = (e, t, n, r) => {
1134
+ for (var i = r > 1 ? void 0 : r ? Dr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1099
1135
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1100
- return r && i && Hr(t, n, i), i;
1136
+ return r && i && Br(t, n, i), i;
1101
1137
  }, ae = (e, t) => (n, r) => t(n, r, e);
1102
1138
  let ke = class extends O {
1103
1139
  constructor(e, t, n, r, i) {
@@ -1105,75 +1141,75 @@ let ke = class extends O {
1105
1141
  }
1106
1142
  _initHoverListener() {
1107
1143
  this.disposeWithMe(
1108
- this._hoverManagerService.currentCell$.pipe(En(100)).subscribe((e) => {
1144
+ this._hoverManagerService.currentCell$.pipe(Mn(100)).subscribe((e) => {
1109
1145
  var f, l;
1110
1146
  if (!e) {
1111
1147
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1112
1148
  return;
1113
1149
  }
1114
- const t = (l = (f = this._renderManagerService.getRenderById(e.location.unitId)) == null ? void 0 : f.with(It).getUnitSkeleton(e.location.unitId, e.location.subUnitId)) == null ? void 0 : l.skeleton, n = e.location.col, r = e.location.row;
1150
+ const t = (l = (f = this._renderManagerService.getRenderById(e.location.unitId)) == null ? void 0 : f.with(It).getWorksheetSkeleton(e.location.subUnitId)) == null ? void 0 : l.skeleton, n = e.location.col, r = e.location.row;
1115
1151
  let i = r, o = n;
1116
- if (t && t.overflowCache.forValue((g, S, v) => {
1117
- ee.contains(v, { startColumn: n, endColumn: n, startRow: r, endRow: r }) && (i = g, o = S);
1152
+ if (t && t.overflowCache.forValue((m, _, v) => {
1153
+ ne.contains(v, { startColumn: n, endColumn: n, startRow: r, endRow: r }) && (i = m, o = _);
1118
1154
  }), !this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1119
- workbookTypes: [hn],
1120
- worksheetTypes: [mn],
1121
- rangeTypes: [gn]
1155
+ workbookTypes: [pn],
1156
+ worksheetTypes: [hn],
1157
+ rangeTypes: [mn]
1122
1158
  }, [{ startRow: r, startColumn: n, endRow: r, endColumn: n }])) {
1123
1159
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1124
1160
  return;
1125
1161
  }
1126
1162
  const c = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1127
- workbookTypes: [Ne],
1128
- worksheetTypes: [$e, Be],
1163
+ workbookTypes: [$e],
1164
+ worksheetTypes: [Be, De],
1129
1165
  rangeTypes: [Ve]
1130
- }, [{ startRow: r, startColumn: n, endRow: r, endColumn: n }]), a = e.location.unitId, p = e.location.subUnitId, m = this._permissionService.composePermission([new fn(a).id, new vn(a, p).id]).every((g) => g.value);
1166
+ }, [{ startRow: r, startColumn: n, endRow: r, endColumn: n }]), a = e.location.unitId, u = e.location.subUnitId, g = this._permissionService.composePermission([new gn(a).id, new fn(a, u).id]).every((m) => m.value);
1131
1167
  this._sheetsHyperLinkPopupService.showPopup({
1132
1168
  ...e.location,
1133
1169
  row: i,
1134
1170
  col: o,
1135
1171
  editPermission: c,
1136
- copyPermission: m
1172
+ copyPermission: g
1137
1173
  });
1138
1174
  })
1139
1175
  );
1140
1176
  }
1141
1177
  };
1142
- ke = $r([
1143
- N($.Rendered, ke),
1178
+ ke = Vr([
1179
+ B(D.Rendered, ke),
1144
1180
  ae(0, h(Sn)),
1145
- ae(1, h(H)),
1181
+ ae(1, h($)),
1146
1182
  ae(2, h(nt)),
1147
1183
  ae(3, h(tn)),
1148
1184
  ae(4, h(Pt))
1149
1185
  ], ke);
1150
- const Br = (e) => ({
1186
+ const Ar = (e) => ({
1151
1187
  id: ot.id,
1152
1188
  type: Mt.BUTTON,
1153
1189
  positions: [xt.CONTEXT_MENU],
1154
1190
  title: "hyperLink.menu.add",
1155
- hidden$: Tt(e, w.UNIVER_SHEET),
1191
+ hidden$: Tt(e, E.UNIVER_SHEET),
1156
1192
  icon: "LinkSingle",
1157
- disabled$: bt(e, { workbookTypes: [Ne], worksheetTypes: [$e, tt, Be], rangeTypes: [Ve] })
1158
- }), Vr = (e) => ({
1193
+ disabled$: bt(e, { workbookTypes: [$e], worksheetTypes: [Be, tt, De], rangeTypes: [Ve] })
1194
+ }), Wr = (e) => ({
1159
1195
  tooltip: "hyperLink.form.addTitle",
1160
1196
  positions: xt.TOOLBAR_START,
1161
- group: $n.TOOLBAR_OTHERS,
1197
+ group: Bn.TOOLBAR_OTHERS,
1162
1198
  id: st.id,
1163
1199
  type: Mt.BUTTON,
1164
1200
  icon: "LinkSingle",
1165
- hidden$: Tt(e, w.UNIVER_SHEET),
1166
- disabled$: bt(e, { workbookTypes: [Ne], worksheetTypes: [$e, tt, Be], rangeTypes: [Ve] })
1167
- }), Ft = {
1201
+ hidden$: Tt(e, E.UNIVER_SHEET),
1202
+ disabled$: bt(e, { workbookTypes: [$e], worksheetTypes: [Be, tt, De], rangeTypes: [Ve] })
1203
+ }), Wt = {
1168
1204
  id: st.id,
1169
- binding: Hn.K | Nn.CTRL_COMMAND,
1205
+ binding: Nn.K | $n.CTRL_COMMAND,
1170
1206
  preconditions: Ln
1171
1207
  };
1172
- var Ar = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, Fr = (e, t, n, r) => {
1173
- for (var i = r > 1 ? void 0 : r ? Dr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1208
+ var Fr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, Yr = (e, t, n, r) => {
1209
+ for (var i = r > 1 ? void 0 : r ? Kr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1174
1210
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1175
- return r && i && Ar(t, n, i), i;
1176
- }, J = (e, t) => (n, r) => t(n, r, e);
1211
+ return r && i && Fr(t, n, i), i;
1212
+ }, Q = (e, t) => (n, r) => t(n, r, e);
1177
1213
  let le = class extends O {
1178
1214
  constructor(e, t, n, r, i, o, s) {
1179
1215
  super(), this._config = e, this._componentManager = t, this._commandService = n, this._localeService = r, this._menuService = i, this._injector = o, this._shortcutService = s, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
@@ -1199,26 +1235,26 @@ let le = class extends O {
1199
1235
  }
1200
1236
  _initMenus() {
1201
1237
  var e, t, n, r;
1202
- this._menuService.addMenuItem(Br(this._injector), (t = (e = this._config) == null ? void 0 : e.menu) != null ? t : {}), this._menuService.addMenuItem(Vr(this._injector), (r = (n = this._config) == null ? void 0 : n.menu) != null ? r : {});
1238
+ this._menuService.addMenuItem(Ar(this._injector), (t = (e = this._config) == null ? void 0 : e.menu) != null ? t : {}), this._menuService.addMenuItem(Wr(this._injector), (r = (n = this._config) == null ? void 0 : n.menu) != null ? r : {});
1203
1239
  }
1204
1240
  _initShortCut() {
1205
- this._shortcutService.registerShortcut(Ft);
1241
+ this._shortcutService.registerShortcut(Wt);
1206
1242
  }
1207
1243
  };
1208
- le = Fr([
1209
- N($.Ready, le),
1210
- J(1, h(Bn)),
1211
- J(2, W),
1212
- J(3, h(pe)),
1213
- J(4, An),
1214
- J(5, h(Ae)),
1215
- J(6, h(Vn))
1244
+ le = Yr([
1245
+ B(D.Ready, le),
1246
+ Q(1, h(Dn)),
1247
+ Q(2, K),
1248
+ Q(3, h(pe)),
1249
+ Q(4, An),
1250
+ Q(5, h(Ne)),
1251
+ Q(6, h(Vn))
1216
1252
  ], le);
1217
1253
  const at = "SHEET_HYPER_LINK_UI_PLUGIN";
1218
- var Wr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, Kr = (e, t, n, r) => {
1219
- for (var i = r > 1 ? void 0 : r ? Zr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1254
+ var Zr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Gr = (e, t, n, r) => {
1255
+ for (var i = r > 1 ? void 0 : r ? zr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1220
1256
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1221
- return r && i && Wr(t, n, i), i;
1257
+ return r && i && Zr(t, n, i), i;
1222
1258
  }, ft = (e, t) => (n, r) => t(n, r, e);
1223
1259
  let Pe = class extends O {
1224
1260
  constructor(e, t) {
@@ -1227,103 +1263,103 @@ let Pe = class extends O {
1227
1263
  // eslint-disable-next-line max-lines-per-function
1228
1264
  _initAutoFill() {
1229
1265
  const e = () => ({ redos: [], undos: [] }), t = (r, i) => {
1230
- const { source: o, target: s, unitId: c, subUnitId: a } = r, p = qe([o, s]), [m, f] = p.ranges, { mapFunc: l } = p, g = {
1231
- row: m.startRow,
1232
- col: m.startColumn
1233
- }, S = kn(m, f), v = [], I = [];
1234
- return S.forEach((A) => {
1235
- const y = A.repeatStartCell, z = A.relativeRange, B = {
1236
- startRow: g.row,
1237
- startColumn: g.col,
1238
- endColumn: g.col,
1239
- endRow: g.row
1266
+ const { source: o, target: s, unitId: c, subUnitId: a } = r, u = qe([o, s]), [g, f] = u.ranges, { mapFunc: l } = u, m = {
1267
+ row: g.startRow,
1268
+ col: g.startColumn
1269
+ }, _ = kn(g, f), v = [], L = [];
1270
+ return _.forEach((M) => {
1271
+ const y = M.repeatStartCell, V = M.relativeRange, R = {
1272
+ startRow: m.row,
1273
+ startColumn: m.col,
1274
+ endColumn: m.col,
1275
+ endRow: m.row
1240
1276
  }, P = {
1241
1277
  startRow: y.row,
1242
1278
  startColumn: y.col,
1243
1279
  endColumn: y.col,
1244
1280
  endRow: y.row
1245
1281
  };
1246
- Qe.foreach(z, (G, V) => {
1247
- const q = ee.getPositionRange(
1282
+ Qe.foreach(V, (G, A) => {
1283
+ const q = ne.getPositionRange(
1248
1284
  {
1249
1285
  startRow: G,
1250
- startColumn: V,
1251
- endColumn: V,
1286
+ startColumn: A,
1287
+ endColumn: A,
1252
1288
  endRow: G
1253
1289
  },
1254
- B
1255
- ), { row: he, col: Fe } = l(q.startRow, q.startColumn), me = this._hyperLinkModel.getHyperLinkByLocation(c, a, he, Fe);
1290
+ R
1291
+ ), { row: he, col: We } = l(q.startRow, q.startColumn), me = this._hyperLinkModel.getHyperLinkByLocation(c, a, he, We);
1256
1292
  if (me) {
1257
- const ne = ee.getPositionRange(
1293
+ const ie = ne.getPositionRange(
1258
1294
  {
1259
1295
  startRow: G,
1260
- startColumn: V,
1261
- endColumn: V,
1296
+ startColumn: A,
1297
+ endColumn: A,
1262
1298
  endRow: G
1263
1299
  },
1264
1300
  P
1265
- ), { row: u, col: C } = l(ne.startRow, ne.startColumn), L = te.generateRandomId(), _ = this._hyperLinkModel.getHyperLinkByLocation(c, a, u, C);
1266
- _ && v.push({
1267
- id: M.id,
1301
+ ), { row: p, col: S } = l(ie.startRow, ie.startColumn), I = re.generateRandomId(), C = this._hyperLinkModel.getHyperLinkByLocation(c, a, p, S);
1302
+ C && v.push({
1303
+ id: T.id,
1268
1304
  params: {
1269
1305
  unitId: c,
1270
1306
  subUnitId: a,
1271
- id: _.id
1307
+ id: C.id
1272
1308
  }
1273
- }), (re.COPY === i || re.SERIES === i) && (v.push({
1274
- id: x.id,
1309
+ }), (oe.COPY === i || oe.SERIES === i) && (v.push({
1310
+ id: U.id,
1275
1311
  params: {
1276
1312
  unitId: c,
1277
1313
  subUnitId: a,
1278
1314
  link: {
1279
1315
  ...me,
1280
- id: L,
1281
- row: u,
1282
- column: C
1316
+ id: I,
1317
+ row: p,
1318
+ column: S
1283
1319
  }
1284
1320
  }
1285
- }), I.push({
1286
- id: M.id,
1321
+ }), L.push({
1322
+ id: T.id,
1287
1323
  params: {
1288
1324
  unitId: c,
1289
1325
  subUnitId: a,
1290
- id: L
1326
+ id: I
1291
1327
  }
1292
- })), _ && I.push({
1293
- id: x.id,
1328
+ })), C && L.push({
1329
+ id: U.id,
1294
1330
  params: {
1295
1331
  unitId: c,
1296
1332
  subUnitId: a,
1297
- link: _
1333
+ link: C
1298
1334
  }
1299
1335
  });
1300
1336
  }
1301
1337
  });
1302
1338
  }), {
1303
- undos: I,
1339
+ undos: L,
1304
1340
  redos: v
1305
1341
  };
1306
1342
  }, n = {
1307
1343
  id: at,
1308
- onFillData: (r, i, o) => o === re.COPY || o === re.ONLY_FORMAT || o === re.SERIES ? t(r, o) : e()
1344
+ onFillData: (r, i, o) => o === oe.COPY || o === oe.ONLY_FORMAT || o === oe.SERIES ? t(r, o) : e()
1309
1345
  };
1310
1346
  this.disposeWithMe(this._autoFillService.addHook(n));
1311
1347
  }
1312
1348
  };
1313
- Pe = Kr([
1314
- N($.Ready, Pe),
1349
+ Pe = Gr([
1350
+ B(D.Ready, Pe),
1315
1351
  ft(0, In),
1316
- ft(1, h(T))
1352
+ ft(1, h(H))
1317
1353
  ], Pe);
1318
- var Yr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Gr = (e, t, n, r) => {
1319
- for (var i = r > 1 ? void 0 : r ? zr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1354
+ var qr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, Jr = (e, t, n, r) => {
1355
+ for (var i = r > 1 ? void 0 : r ? Xr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1320
1356
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1321
- return r && i && Yr(t, n, i), i;
1357
+ return r && i && qr(t, n, i), i;
1322
1358
  }, Ce = (e, t) => (n, r) => t(n, r, e);
1323
1359
  let be = class extends O {
1324
1360
  constructor(t, n, r, i) {
1325
1361
  super();
1326
- D(this, "_copyInfo");
1362
+ W(this, "_copyInfo");
1327
1363
  this._sheetClipboardService = t, this._hyperLinkModel = n, this._injector = r, this._resolverService = i, this._initCopyPaste();
1328
1364
  }
1329
1365
  _initCopyPaste() {
@@ -1331,51 +1367,51 @@ let be = class extends O {
1331
1367
  id: at,
1332
1368
  onBeforeCopy: (t, n, r) => this._collect(t, n, r),
1333
1369
  onPasteCells: (t, n, r, i) => {
1334
- const { copyType: o = ut.COPY, pasteType: s } = i, { range: c } = t || {}, { range: a, unitId: p, subUnitId: m } = n;
1335
- return this._generateMutations(a, { copyType: o, pasteType: s, copyRange: c, unitId: p, subUnitId: m });
1370
+ const { copyType: o = Pn.COPY, pasteType: s } = i, { range: c } = t || {}, { range: a, unitId: u, subUnitId: g } = n;
1371
+ return this._generateMutations(a, { copyType: o, pasteType: s, copyRange: c, unitId: u, subUnitId: g });
1336
1372
  },
1337
1373
  onPastePlainText: (t, n) => {
1338
1374
  if (de(n)) {
1339
- const r = rt(n), { range: i, unitId: o, subUnitId: s } = t, { ranges: [c], mapFunc: a } = qe([i]), p = [], m = [];
1375
+ const r = rt(n), { range: i, unitId: o, subUnitId: s } = t, { ranges: [c], mapFunc: a } = qe([i]), u = [], g = [];
1340
1376
  return Qe.foreach(c, (f, l) => {
1341
- const { row: g, col: S } = a(f, l), v = this._hyperLinkModel.getHyperLinkByLocation(o, s, g, S);
1342
- v && p.push({
1343
- id: M.id,
1377
+ const { row: m, col: _ } = a(f, l), v = this._hyperLinkModel.getHyperLinkByLocation(o, s, m, _);
1378
+ v && u.push({
1379
+ id: T.id,
1344
1380
  params: {
1345
1381
  unitId: o,
1346
1382
  subUnitId: s,
1347
1383
  id: v.id
1348
1384
  }
1349
1385
  });
1350
- const I = te.generateRandomId();
1351
- p.push({
1352
- id: x.id,
1386
+ const L = re.generateRandomId();
1387
+ u.push({
1388
+ id: U.id,
1353
1389
  params: {
1354
1390
  unitId: o,
1355
1391
  subUnitId: s,
1356
1392
  link: {
1357
- id: I,
1358
- row: g,
1359
- column: S,
1393
+ id: L,
1394
+ row: m,
1395
+ column: _,
1360
1396
  payload: r
1361
1397
  }
1362
1398
  }
1363
- }), m.push({
1364
- id: M.id,
1399
+ }), g.push({
1400
+ id: T.id,
1365
1401
  params: {
1366
1402
  unitId: o,
1367
1403
  subUnitId: s,
1368
- id: I
1404
+ id: L
1369
1405
  }
1370
- }), v && m.push({
1371
- id: x.id,
1406
+ }), v && g.push({
1407
+ id: U.id,
1372
1408
  params: {
1373
1409
  unitId: o,
1374
1410
  subUnitId: s,
1375
1411
  link: v
1376
1412
  }
1377
1413
  });
1378
- }), { redos: p, undos: m };
1414
+ }), { redos: u, undos: g };
1379
1415
  }
1380
1416
  return { undos: [], redos: [] };
1381
1417
  }
@@ -1390,15 +1426,15 @@ let be = class extends O {
1390
1426
  };
1391
1427
  const o = {
1392
1428
  get: this._injector.get.bind(this._injector)
1393
- }, s = Pn(r, o, t, n);
1429
+ }, s = bn(r, o, t, n);
1394
1430
  if (!s)
1395
1431
  return;
1396
1432
  const { rows: c, cols: a } = s;
1397
- c.forEach((p, m) => {
1433
+ c.forEach((u, g) => {
1398
1434
  a.forEach((f, l) => {
1399
- var S;
1400
- const g = this._hyperLinkModel.getHyperLinkByLocation(t, n, p, f);
1401
- i.setValue(m, l, (S = g == null ? void 0 : g.id) != null ? S : "");
1435
+ var _;
1436
+ const m = this._hyperLinkModel.getHyperLinkByLocation(t, n, u, f);
1437
+ i.setValue(g, l, (_ = m == null ? void 0 : m.id) != null ? _ : "");
1402
1438
  });
1403
1439
  });
1404
1440
  }
@@ -1406,8 +1442,6 @@ let be = class extends O {
1406
1442
  _generateMutations(t, n) {
1407
1443
  if (!this._copyInfo)
1408
1444
  return { redos: [], undos: [] };
1409
- if (n.copyType === ut.CUT)
1410
- return this._copyInfo = null, { redos: [], undos: [] };
1411
1445
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
1412
1446
  return { redos: [], undos: [] };
1413
1447
  if ([
@@ -1419,72 +1453,69 @@ let be = class extends O {
1419
1453
  n.pasteType
1420
1454
  ))
1421
1455
  return { redos: [], undos: [] };
1422
- const { unitId: r, subUnitId: i } = this._copyInfo, o = [], s = [], { ranges: [c, a], mapFunc: p } = qe([n.copyRange, t]);
1423
- return bn(c, a, !0).forEach(({ startRange: f }) => {
1456
+ const { unitId: r, subUnitId: i } = this._copyInfo, o = [], s = [], { ranges: [c, a], mapFunc: u } = qe([n.copyRange, t]);
1457
+ return Rn(c, a, !0).forEach(({ startRange: f }) => {
1424
1458
  var l;
1425
- (l = this._copyInfo) == null || l.matrix.forValue((g, S, v) => {
1426
- const I = ee.getPositionRange(
1459
+ (l = this._copyInfo) == null || l.matrix.forValue((m, _, v) => {
1460
+ const L = ne.getPositionRange(
1427
1461
  {
1428
- startRow: g,
1429
- endRow: g,
1430
- startColumn: S,
1431
- endColumn: S
1462
+ startRow: m,
1463
+ endRow: m,
1464
+ startColumn: _,
1465
+ endColumn: _
1432
1466
  },
1433
1467
  f
1434
- ), A = this._hyperLinkModel.getHyperLink(r, i, v), { row: y, col: z } = p(I.startRow, I.startColumn), B = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, y, z), P = te.generateRandomId();
1435
- B && o.push({
1436
- id: M.id,
1468
+ ), M = this._hyperLinkModel.getHyperLink(r, i, v), { row: y, col: V } = u(L.startRow, L.startColumn), R = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, y, V), P = re.generateRandomId();
1469
+ R && o.push({
1470
+ id: T.id,
1437
1471
  params: {
1438
1472
  unitId: n.unitId,
1439
1473
  subUnitId: n.subUnitId,
1440
- id: B.id
1474
+ id: R.id
1441
1475
  }
1442
- }), A && (o.push({
1443
- id: x.id,
1476
+ }), M && (o.push({
1477
+ id: U.id,
1444
1478
  params: {
1445
1479
  unitId: n.unitId,
1446
1480
  subUnitId: n.subUnitId,
1447
1481
  link: {
1448
- ...A,
1482
+ ...M,
1449
1483
  id: P,
1450
1484
  row: y,
1451
- column: z
1485
+ column: V
1452
1486
  }
1453
1487
  }
1454
1488
  }), s.push({
1455
- id: M.id,
1489
+ id: T.id,
1456
1490
  params: {
1457
1491
  unitId: n.unitId,
1458
1492
  subUnitId: n.subUnitId,
1459
1493
  id: P
1460
1494
  }
1461
- })), B && s.push({
1462
- id: x.id,
1495
+ })), R && s.push({
1496
+ id: U.id,
1463
1497
  params: {
1464
1498
  unitId: n.unitId,
1465
1499
  subUnitId: n.subUnitId,
1466
- link: B
1500
+ link: R
1467
1501
  }
1468
1502
  });
1469
1503
  });
1470
- }), {
1471
- redos: o,
1472
- undos: s
1473
- };
1504
+ }), { redos: o, undos: s };
1474
1505
  }
1475
1506
  };
1476
- be = Gr([
1477
- N($.Ready, be),
1478
- Ce(0, Rn),
1479
- Ce(1, h(T)),
1480
- Ce(2, h(Ae)),
1507
+ be = Jr([
1508
+ B(D.Ready, be),
1509
+ Ce(0, wn),
1510
+ Ce(1, h(H)),
1511
+ Ce(2, h(Ne)),
1481
1512
  Ce(3, h(F))
1482
1513
  ], be);
1483
- var qr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, Jr = (e, t, n, r) => {
1484
- for (var i = r > 1 ? void 0 : r ? Xr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1514
+ var Qr = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (e, t, n, r) => {
1515
+ for (var i = r > 1 ? void 0 : r ? ei(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1485
1516
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1486
- return r && i && qr(t, n, i), i;
1487
- }, Qr = (e, t) => (n, r) => t(n, r, e);
1517
+ return r && i && Qr(t, n, i), i;
1518
+ }, ni = (e, t) => (n, r) => t(n, r, e);
1488
1519
  let Re = class extends O {
1489
1520
  constructor(e) {
1490
1521
  super(), this._resolverService = e, this._handleInitUrl();
@@ -1494,15 +1525,15 @@ let Re = class extends O {
1494
1525
  e && this._resolverService.parseHyperLink(e).handler();
1495
1526
  }
1496
1527
  };
1497
- Re = Jr([
1498
- N($.Rendered, Re),
1499
- Qr(0, h(F))
1528
+ Re = ti([
1529
+ B(D.Rendered, Re),
1530
+ ni(0, h(F))
1500
1531
  ], Re);
1501
- var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ni = (e, t, n, r) => {
1502
- for (var i = r > 1 ? void 0 : r ? ti(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1532
+ var ri = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, oi = (e, t, n, r) => {
1533
+ for (var i = r > 1 ? void 0 : r ? ii(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1503
1534
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1504
- return r && i && ei(t, n, i), i;
1505
- }, Ye = (e, t) => (n, r) => t(n, r, e);
1535
+ return r && i && ri(t, n, i), i;
1536
+ }, Ze = (e, t) => (n, r) => t(n, r, e);
1506
1537
  let we = class extends O {
1507
1538
  constructor(e, t, n) {
1508
1539
  super(), this._localeService = e, this._commandService = t, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
@@ -1510,34 +1541,34 @@ let we = class extends O {
1510
1541
  _commandExecutedListener() {
1511
1542
  this.disposeWithMe(
1512
1543
  this._commandService.beforeCommandExecuted((e) => {
1513
- e.id === Ft.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1514
- workbookTypes: [Ne],
1544
+ e.id === Wt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1545
+ workbookTypes: [$e],
1515
1546
  rangeTypes: [Ve],
1516
- worksheetTypes: [$e, tt, Be]
1547
+ worksheetTypes: [Be, tt, De]
1517
1548
  }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
1518
1549
  })
1519
1550
  );
1520
1551
  }
1521
1552
  };
1522
- we = ni([
1523
- N($.Rendered, we),
1524
- Ye(0, h(pe)),
1525
- Ye(1, W),
1526
- Ye(2, h(Pt))
1553
+ we = oi([
1554
+ B(D.Rendered, we),
1555
+ Ze(0, h(pe)),
1556
+ Ze(1, K),
1557
+ Ze(2, h(Pt))
1527
1558
  ], we);
1528
- var Wt = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, ii = (e, t, n) => t in e ? Wt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, oi = (e, t, n, r) => {
1529
- for (var i = r > 1 ? void 0 : r ? ri(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1559
+ var Ft = Object.defineProperty, si = Object.getOwnPropertyDescriptor, ai = (e, t, n) => t in e ? Ft(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ci = (e, t, n, r) => {
1560
+ for (var i = r > 1 ? void 0 : r ? si(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1530
1561
  (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1531
- return r && i && Wt(t, n, i), i;
1532
- }, vt = (e, t) => (n, r) => t(n, r, e), Zt = (e, t, n) => ii(e, typeof t != "symbol" ? t + "" : t, n);
1533
- let je = class extends nn {
1562
+ return r && i && Ft(t, n, i), i;
1563
+ }, vt = (e, t) => (n, r) => t(n, r, e), Kt = (e, t, n) => ai(e, typeof t != "symbol" ? t + "" : t, n);
1564
+ let He = class extends nn {
1534
1565
  constructor(e, t, n) {
1535
1566
  super(), this._config = e, this._injector = t, this._renderManagerService = n;
1536
1567
  }
1537
1568
  onStarting(e) {
1538
1569
  [
1539
1570
  [F],
1540
- [H],
1571
+ [$],
1541
1572
  [ye],
1542
1573
  [Se],
1543
1574
  [Ie],
@@ -1552,31 +1583,36 @@ let je = class extends nn {
1552
1583
  [be],
1553
1584
  [we],
1554
1585
  [Re]
1555
- ].forEach((n) => e.add(n)), this._renderManagerService.registerRenderModule(w.UNIVER_SHEET, Xe);
1586
+ ].forEach((n) => e.add(n));
1587
+ }
1588
+ onReady() {
1589
+ [
1590
+ [Xe]
1591
+ ].forEach((t) => this._renderManagerService.registerRenderModule(E.UNIVER_SHEET, t));
1556
1592
  }
1557
1593
  };
1558
- Zt(je, "pluginName", at);
1559
- Zt(je, "type", w.UNIVER_SHEET);
1560
- je = oi([
1561
- rn(Cn),
1562
- vt(1, h(Ae)),
1594
+ Kt(He, "pluginName", at);
1595
+ Kt(He, "type", E.UNIVER_SHEET);
1596
+ He = ci([
1597
+ rn(_n),
1598
+ vt(1, h(Ne)),
1563
1599
  vt(2, nt)
1564
- ], je);
1600
+ ], He);
1565
1601
  export {
1566
1602
  Te as CloseHyperLinkSidebarOperation,
1567
1603
  ot as InsertHyperLinkOperation,
1568
- Ft as InsertLinkShortcut,
1604
+ Wt as InsertLinkShortcut,
1569
1605
  it as OpenHyperLinkSidebarOperation,
1570
1606
  Ie as SheetHyperLinkSetRangeController,
1571
1607
  Re as SheetHyperLinkUrlController,
1572
1608
  Pe as SheetsHyperLinkAutoFillController,
1573
1609
  be as SheetsHyperLinkCopyPasteController,
1574
1610
  ke as SheetsHyperLinkPopupController,
1575
- H as SheetsHyperLinkPopupService,
1611
+ $ as SheetsHyperLinkPopupService,
1576
1612
  ye as SheetsHyperLinkRemoveSheetController,
1577
1613
  Xe as SheetsHyperLinkRenderController,
1578
1614
  Se as SheetsHyperLinkRenderManagerController,
1579
1615
  F as SheetsHyperLinkResolverService,
1580
1616
  le as SheetsHyperLinkUIController,
1581
- je as UniverSheetsHyperLinkUIPlugin
1617
+ He as UniverSheetsHyperLinkUIPlugin
1582
1618
  };