@univerjs/sheets-hyper-link-ui 0.1.15 → 0.1.16

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,26 +1,26 @@
1
- var Kt = Object.defineProperty;
2
- var Yt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var V = (e, t, n) => (Yt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { Disposable as O, UniverInstanceType as E, OnLifecycle as N, LifecycleStages as $, IUniverInstanceService as de, BooleanNumber as Gt, ThemeService as qt, isValidRange as We, LocaleService as ue, RANGE_TYPE as lt, Rectangle as ee, ICommandService as W, DEFAULT_EMPTY_DOCUMENT_VALUE as Xt, createInternalEditorID as Jt, Tools as ce, CommandType as Te, CellValueType as dt, ObjectMatrix as yt, Range as Ge, Plugin as Qt, DependentOn as en } from "@univerjs/core";
5
- import { RemoveSheetCommand as tn, SheetInterceptorService as qe, INTERCEPTOR_POINT as nn, SetSelectionsOperation as rn, NORMAL_SELECTION_PLUGIN_NAME as on, SetWorksheetActiveOperation as Re, getSheetCommandTarget as Ct, SelectionManagerService as St, SetRangeValuesMutation as ge, SetRangeValuesUndoMutationFactory as ut, SetRangeValuesCommand as sn, ClearSelectionContentCommand as an, ClearSelectionAllCommand as cn, WorkbookEditablePermission as Xe, WorksheetEditPermission as Je, WorksheetSetCellValuePermission as Qe, WorksheetInsertHyperlinkPermission as et, RangeProtectionPermissionEditPoint as tt } from "@univerjs/sheets";
6
- import { Inject as m, Injector as Ue } from "@wendellhu/redi";
7
- import { RemoveHyperLinkMutation as M, AddHyperLinkMutation as x, HyperLinkModel as T, ERROR_RANGE as Ze, UpdateHyperLinkCommand as Lt, AddHyperLinkCommand as It, CancelHyperLinkCommand as ln, UniverSheetsHyperLinkPlugin as dn } from "@univerjs/sheets-hyper-link";
8
- import { SheetSkeletonManagerService as kt, ScrollToRangeOperation as bt, SheetCanvasPopManagerService as un, HoverManagerService as pn, whenSheetEditorFocused as hn, getCurrentRangeDisable$ as Rt, APPLY_TYPE as ne, IAutoFillService as mn, virtualizeDiscreteRanges as ze, getAutoFillRepeatRange as gn, COPY_TYPE as pt, rangeToDiscreteRange as fn, PREDEFINED_HOOK_NAME as $e, getRepeatRange as vn, ISheetClipboardService as _n, SheetPermissionInterceptorBaseController as yn } from "@univerjs/sheets-ui";
1
+ var Yt = Object.defineProperty;
2
+ var Gt = (e, t, n) => t in e ? Yt(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 Ye, LocaleService as pe, RANGE_TYPE as lt, Rectangle as ee, ICommandService as F, DEFAULT_EMPTY_DOCUMENT_VALUE as Jt, createInternalEditorID as Qt, Tools as le, CommandType as je, 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 we, 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 He, WorksheetEditPermission as Ne, WorksheetInsertHyperlinkPermission as $e, RangeProtectionPermissionEditPoint as Ae, WorkbookCopyPermission as fn, WorksheetCopyPermission as vn, WorksheetSetCellValuePermission as tt } from "@univerjs/sheets";
6
+ import { Inject as h, Injector as Be } 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 ne, IAutoFillService as In, virtualizeDiscreteRanges as qe, getAutoFillRepeatRange as kn, COPY_TYPE as ut, rangeToDiscreteRange as Pn, PREDEFINED_HOOK_NAME as Fe, getRepeatRange as bn, ISheetClipboardService as Rn } from "@univerjs/sheets-ui";
9
9
  import { IRenderManagerService as nt } from "@univerjs/engine-render";
10
- import { Subject as Cn, BehaviorSubject as Sn, debounceTime as Ln } from "rxjs";
11
- import In, { forwardRef as Z, useRef as Pt, createElement as z, useState as re, useEffect as kn, useMemo as bn } from "react";
12
- import { useDependency as k, useObservable as Rn } from "@wendellhu/redi/react-bindings";
13
- import ht from "clsx";
14
- import { MessageType as se, FormLayout as X, Input as mt, Select as Ae, Button as gt, Tooltip as Be } from "@univerjs/design";
15
- import { IMessageService as Ot, useObservable as Pn, useEvent as On, RangeSelector as wn, ISidebarService as wt, KeyCode as En, MetaKeys as Mn, MenuItemType as Et, MenuPosition as Mt, getMenuHiddenObservable as xt, MenuGroup as xn, ComponentManager as Tn, IShortcutService as Un, IMenuService as jn } from "@univerjs/ui";
16
- import { deserializeRangeWithSheet as Pe, serializeRangeWithSheet as Tt, IDefinedNamesService as Ut, serializeRangeToRefString as Hn, serializeRange as Nn } from "@univerjs/engine-formula";
17
- import { SPECIAL_PASTE_FORMULA as $n } from "@univerjs/sheets-formula";
18
- var An = Object.defineProperty, Bn = Object.getOwnPropertyDescriptor, Dn = (e, t, n, i) => {
19
- for (var r = i > 1 ? void 0 : i ? Bn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
20
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
21
- return i && r && An(t, n, r), r;
22
- }, De = (e, t) => (n, i) => t(n, i, e);
23
- let ve = class extends O {
10
+ import { Subject as wn, BehaviorSubject as On, debounceTime as En } from "rxjs";
11
+ import Mn, { forwardRef as Z, useRef as Rt, createElement as z, useState as re, useEffect as xn, useMemo as Tn } from "react";
12
+ import { useDependency as k } from "@wendellhu/redi/react-bindings";
13
+ import pt from "clsx";
14
+ import { MessageType as ae, FormLayout as X, Input as ht, Select as Ze, Button as mt, Tooltip as ve } 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 An, IShortcutService as Bn, IMenuService as Vn } from "@univerjs/ui";
16
+ import { deserializeRangeWithSheet as Oe, serializeRangeWithSheet as Ut, IDefinedNamesService as jt, serializeRangeToRefString as Dn, serializeRange as Wn } from "@univerjs/engine-formula";
17
+ import { SPECIAL_PASTE_FORMULA as Fn } from "@univerjs/sheets-formula";
18
+ var Zn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, Kn = (e, t, n, r) => {
19
+ for (var i = r > 1 ? void 0 : r ? zn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
20
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
21
+ return r && i && Zn(t, n, i), i;
22
+ }, ze = (e, t) => (n, r) => t(n, r, e);
23
+ let Ce = class extends O {
24
24
  constructor(e, t, n) {
25
25
  super(), this._sheetInterceptorService = e, this._univerInstanceService = t, this._hyperLinkModel = n, this._initSheetChange();
26
26
  }
@@ -28,26 +28,30 @@ let ve = class extends O {
28
28
  this.disposeWithMe(
29
29
  this._sheetInterceptorService.interceptCommand({
30
30
  getMutations: (e) => {
31
- if (e.id === tn.id) {
32
- const t = e.params, n = t.unitId ? this._univerInstanceService.getUnit(t.unitId) : this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
33
- if (!n)
31
+ var t;
32
+ if (e.id === on.id) {
33
+ const n = e.params, r = n.unitId ? this._univerInstanceService.getUnit(n.unitId) : this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
34
+ if (!r)
35
+ return { redos: [], undos: [] };
36
+ const i = r.getUnitId(), o = n.subUnitId || ((t = r.getActiveSheet()) == null ? void 0 : t.getSheetId());
37
+ if (!o)
34
38
  return { redos: [], undos: [] };
35
- const i = n.getUnitId(), r = t.subUnitId || n.getActiveSheet().getSheetId(), o = this._hyperLinkModel.getSubUnit(i, r), s = o.map((a) => ({
39
+ const s = this._hyperLinkModel.getSubUnit(i, o), c = s.map((p) => ({
36
40
  id: M.id,
37
41
  params: {
38
42
  unitId: i,
39
- subUnitId: r,
40
- id: a.id
43
+ subUnitId: o,
44
+ id: p.id
41
45
  }
42
- })), c = o.map((a) => ({
46
+ })), a = s.map((p) => ({
43
47
  id: x.id,
44
48
  params: {
45
49
  unitId: i,
46
- subUnitId: r,
47
- link: a
50
+ subUnitId: o,
51
+ link: p
48
52
  }
49
53
  }));
50
- return { redos: s, undos: c };
54
+ return { redos: c, undos: a };
51
55
  }
52
56
  return { redos: [], undos: [] };
53
57
  }
@@ -55,52 +59,58 @@ let ve = class extends O {
55
59
  );
56
60
  }
57
61
  };
58
- ve = Dn([
59
- N($.Ready, ve),
60
- De(0, m(qe)),
61
- De(1, de),
62
- De(2, m(T))
63
- ], ve);
64
- var Vn = Object.defineProperty, Fn = Object.getOwnPropertyDescriptor, jt = (e, t, n, i) => {
65
- for (var r = i > 1 ? void 0 : i ? Fn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
66
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
67
- return i && r && Vn(t, n, r), r;
68
- }, Q = (e, t) => (n, i) => t(n, i, e);
69
- let Ke = class extends O {
70
- constructor(e, t, n, i) {
71
- super(), this._context = e, this._hyperLinkModel = t, this._sheetSkeletonManagerService = n, this._renderManagerService = i, this._initSkeletonChange();
62
+ Ce = Kn([
63
+ N($.Ready, Ce),
64
+ ze(0, h(et)),
65
+ ze(1, ue),
66
+ ze(2, h(T))
67
+ ], Ce);
68
+ var Yn = Object.defineProperty, Gn = Object.getOwnPropertyDescriptor, Ht = (e, t, n, r) => {
69
+ for (var i = r > 1 ? void 0 : r ? Gn(t, n) : t, o = e.length - 1, s; o >= 0; o--)
70
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
71
+ return r && i && Yn(t, n, i), i;
72
+ }, Q = (e, t) => (n, r) => t(n, r, e);
73
+ let Xe = class extends O {
74
+ constructor(e, t, n, r) {
75
+ super(), this._context = e, this._hyperLinkModel = t, this._sheetSkeletonManagerService = n, this._renderManagerService = r, this._initSkeletonChange();
72
76
  }
73
77
  _initSkeletonChange() {
74
78
  const e = () => {
75
- const t = this._context.unit, n = t.getUnitId(), i = t.getActiveSheet().getSheetId(), r = this._sheetSkeletonManagerService.getOrCreateSkeleton({ sheetId: i }), o = this._renderManagerService.getRenderById(n);
76
- r == null || r.makeDirty(!0), r == null || r.calculate(), o && o.mainComponent.makeForceDirty();
79
+ var s;
80
+ const t = this._context.unit, n = t.getUnitId(), r = (s = t.getActiveSheet()) == null ? void 0 : s.getSheetId();
81
+ if (!r) {
82
+ console.warn("No active sheet found");
83
+ return;
84
+ }
85
+ const i = this._sheetSkeletonManagerService.getOrCreateSkeleton({ sheetId: r }), o = this._renderManagerService.getRenderById(n);
86
+ i == null || i.makeDirty(!0), i == null || i.calculate(), o && o.mainComponent.makeForceDirty();
77
87
  };
78
88
  this.disposeWithMe(this._hyperLinkModel.linkUpdate$.subscribe(() => {
79
89
  e();
80
90
  }));
81
91
  }
82
92
  };
83
- Ke = jt([
84
- Q(1, m(T)),
85
- Q(2, m(kt)),
93
+ Xe = Ht([
94
+ Q(1, h(T)),
95
+ Q(2, h(It)),
86
96
  Q(3, nt)
87
- ], Ke);
88
- let _e = class extends O {
97
+ ], Xe);
98
+ let ye = class extends O {
89
99
  constructor(e, t, n) {
90
100
  super(), this._sheetInterceptorService = e, this._hyperLinkModel = t, this._themeService = n, this._initViewModelIntercept();
91
101
  }
92
102
  _initViewModelIntercept() {
93
103
  this.disposeWithMe(
94
104
  this._sheetInterceptorService.intercept(
95
- nn.CELL_CONTENT,
105
+ sn.CELL_CONTENT,
96
106
  {
97
107
  handler: (e, t, n) => {
98
- const { row: i, col: r, unitId: o, subUnitId: s } = t, c = this._hyperLinkModel.getHyperLinkByLocation(o, s, i, r), a = this._themeService.getCurrentTheme();
108
+ const { row: r, col: i, unitId: o, subUnitId: s } = t, c = this._hyperLinkModel.getHyperLinkByLocation(o, s, r, i), a = this._themeService.getCurrentTheme();
99
109
  return n(c ? {
100
110
  ...e,
101
111
  interceptorStyle: {
102
112
  ul: {
103
- s: Gt.TRUE
113
+ s: qt.TRUE
104
114
  },
105
115
  cl: {
106
116
  rgb: a.blue500
@@ -114,13 +124,13 @@ let _e = class extends O {
114
124
  );
115
125
  }
116
126
  };
117
- _e = jt([
118
- N($.Ready, _e),
119
- Q(0, m(qe)),
120
- Q(1, m(T)),
121
- Q(2, m(qt))
122
- ], _e);
123
- var Ht = { exports: {} }, je = {};
127
+ ye = Ht([
128
+ N($.Ready, ye),
129
+ Q(0, h(et)),
130
+ Q(1, h(T)),
131
+ Q(2, h(Xt))
132
+ ], ye);
133
+ var Nt = { exports: {} }, Ve = {};
124
134
  /**
125
135
  * @license React
126
136
  * react-jsx-runtime.production.min.js
@@ -130,150 +140,145 @@ var Ht = { exports: {} }, je = {};
130
140
  * This source code is licensed under the MIT license found in the
131
141
  * LICENSE file in the root directory of this source tree.
132
142
  */
133
- var Wn = In, Zn = Symbol.for("react.element"), zn = Symbol.for("react.fragment"), Kn = Object.prototype.hasOwnProperty, Yn = Wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Gn = { key: !0, ref: !0, __self: !0, __source: !0 };
134
- function Nt(e, t, n) {
135
- var i, r = {}, o = null, s = null;
143
+ var qn = Mn, Xn = Symbol.for("react.element"), Jn = Symbol.for("react.fragment"), Qn = Object.prototype.hasOwnProperty, er = qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, tr = { key: !0, ref: !0, __self: !0, __source: !0 };
144
+ function $t(e, t, n) {
145
+ var r, i = {}, o = null, s = null;
136
146
  n !== void 0 && (o = "" + n), t.key !== void 0 && (o = "" + t.key), t.ref !== void 0 && (s = t.ref);
137
- for (i in t)
138
- Kn.call(t, i) && !Gn.hasOwnProperty(i) && (r[i] = t[i]);
139
- if (e && e.defaultProps)
140
- for (i in t = e.defaultProps, t)
141
- r[i] === void 0 && (r[i] = t[i]);
142
- return { $$typeof: Zn, type: e, key: o, ref: s, props: r, _owner: Yn.current };
147
+ for (r in t) Qn.call(t, r) && !tr.hasOwnProperty(r) && (i[r] = t[r]);
148
+ if (e && e.defaultProps) for (r in t = e.defaultProps, t) i[r] === void 0 && (i[r] = t[r]);
149
+ return { $$typeof: Xn, type: e, key: o, ref: s, props: i, _owner: er.current };
143
150
  }
144
- je.Fragment = zn;
145
- je.jsx = Nt;
146
- je.jsxs = Nt;
147
- Ht.exports = je;
148
- var u = Ht.exports, R = function() {
149
- return R = Object.assign || function(e) {
150
- for (var t, n = 1, i = arguments.length; n < i; n++) {
151
+ Ve.Fragment = Jn;
152
+ Ve.jsx = $t;
153
+ Ve.jsxs = $t;
154
+ Nt.exports = Ve;
155
+ var d = Nt.exports, b = function() {
156
+ return b = Object.assign || function(e) {
157
+ for (var t, n = 1, r = arguments.length; n < r; n++) {
151
158
  t = arguments[n];
152
- for (var r in t)
153
- Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
159
+ for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
154
160
  }
155
161
  return e;
156
- }, R.apply(this, arguments);
157
- }, qn = function(e, t) {
162
+ }, b.apply(this, arguments);
163
+ }, nr = function(e, t) {
158
164
  var n = {};
159
- for (var i in e)
160
- Object.prototype.hasOwnProperty.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
165
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
161
166
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
162
- for (var r = 0, i = Object.getOwnPropertySymbols(e); r < i.length; r++)
163
- t.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[r]) && (n[i[r]] = e[i[r]]);
167
+ for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
168
+ t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
164
169
  return n;
165
170
  }, K = Z(function(e, t) {
166
- var n = e.icon, i = e.id, r = e.className, o = e.extend, s = qn(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), a = Pt("_".concat(Qn()));
167
- return $t(n, "".concat(i), { defIds: n.defIds, idSuffix: a.current }, R({ ref: t, className: c }, s), o);
171
+ var n = e.icon, r = e.id, i = e.className, o = e.extend, s = nr(e, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(r, " ").concat(i || "").trim(), a = Rt("_".concat(or()));
172
+ return At(n, "".concat(r), { defIds: n.defIds, idSuffix: a.current }, b({ ref: t, className: c }, s), o);
168
173
  });
169
- function $t(e, t, n, i, r) {
170
- return z(e.tag, R(R({ key: t }, Xn(e, n, r)), i), (Jn(e, n).children || []).map(function(o, s) {
171
- return $t(o, "".concat(t, "-").concat(e.tag, "-").concat(s), n, void 0, r);
174
+ function At(e, t, n, r, i) {
175
+ return z(e.tag, b(b({ key: t }, rr(e, n, i)), r), (ir(e, n).children || []).map(function(o, s) {
176
+ return At(o, "".concat(t, "-").concat(e.tag, "-").concat(s), n, void 0, i);
172
177
  }));
173
178
  }
174
- function Xn(e, t, n) {
175
- var i = R({}, e.attrs);
176
- n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1);
177
- var r = t.defIds;
178
- return !r || r.length === 0 || (e.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + t.idSuffix), Object.entries(i).forEach(function(o) {
179
+ function rr(e, t, n) {
180
+ var r = b({}, e.attrs);
181
+ n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
182
+ var i = t.defIds;
183
+ return !i || i.length === 0 || (e.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + t.idSuffix), Object.entries(r).forEach(function(o) {
179
184
  var s = o[0], c = o[1];
180
- typeof c == "string" && (i[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
181
- })), i;
185
+ typeof c == "string" && (r[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
186
+ })), r;
182
187
  }
183
- function Jn(e, t) {
184
- var n, i = t.defIds;
185
- return !i || i.length === 0 ? e : e.tag === "defs" && (!((n = e.children) === null || n === void 0) && n.length) ? R(R({}, e), { children: e.children.map(function(r) {
186
- return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? R(R({}, r), { attrs: R(R({}, r.attrs), { id: r.attrs.id + t.idSuffix }) }) : r;
188
+ function ir(e, t) {
189
+ var n, r = t.defIds;
190
+ 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) {
191
+ 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;
187
192
  }) }) : e;
188
193
  }
189
- function Qn() {
194
+ function or() {
190
195
  return Math.random().toString(36).substring(2, 8);
191
196
  }
192
197
  K.displayName = "UniverIcon";
193
- var er = { 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" } }] }, ye = Z(function(e, t) {
198
+ var sr = { 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" } }] }, Se = Z(function(e, t) {
194
199
  return z(K, Object.assign({}, e, {
195
200
  id: "all-border-single",
196
201
  ref: t,
197
- icon: er
202
+ icon: sr
198
203
  }));
199
204
  });
200
- ye.displayName = "AllBorderSingle";
201
- var tr = { 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" } }] }, At = Z(function(e, t) {
205
+ Se.displayName = "AllBorderSingle";
206
+ var ar = { 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" } }] }, Bt = Z(function(e, t) {
202
207
  return z(K, Object.assign({}, e, {
203
208
  id: "copy-single",
204
209
  ref: t,
205
- icon: tr
210
+ icon: ar
206
211
  }));
207
212
  });
208
- At.displayName = "CopySingle";
209
- var nr = { 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" } }] }, Oe = Z(function(e, t) {
213
+ Bt.displayName = "CopySingle";
214
+ var cr = { 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" } }] }, Ee = Z(function(e, t) {
210
215
  return z(K, Object.assign({}, e, {
211
216
  id: "link-single",
212
217
  ref: t,
213
- icon: nr
218
+ icon: cr
214
219
  }));
215
220
  });
216
- Oe.displayName = "LinkSingle";
217
- var rr = { 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" } }] }, Bt = Z(function(e, t) {
221
+ Ee.displayName = "LinkSingle";
222
+ var lr = { 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 = Z(function(e, t) {
218
223
  return z(K, Object.assign({}, e, {
219
224
  id: "unlink-single",
220
225
  ref: t,
221
- icon: rr
226
+ icon: lr
222
227
  }));
223
228
  });
224
- Bt.displayName = "UnlinkSingle";
225
- var ir = { 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) {
229
+ Vt.displayName = "UnlinkSingle";
230
+ var dr = { 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) {
226
231
  return z(K, Object.assign({}, e, {
227
232
  id: "write-single",
228
233
  ref: t,
229
- icon: ir
234
+ icon: dr
230
235
  }));
231
236
  });
232
237
  Dt.displayName = "WriteSingle";
233
- var or = { 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" } }] }, Ye = Z(function(e, t) {
238
+ var ur = { 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) {
234
239
  return z(K, Object.assign({}, e, {
235
240
  id: "xlsx",
236
241
  ref: t,
237
- icon: or
242
+ icon: ur
238
243
  }));
239
244
  });
240
- Ye.displayName = "Xlsx";
241
- var sr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, cr = (e, t, n, i) => {
242
- for (var r = i > 1 ? void 0 : i ? ar(t, n) : t, o = e.length - 1, s; o >= 0; o--)
243
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
244
- return i && r && sr(t, n, r), r;
245
- }, ie = (e, t) => (n, i) => t(n, i, e);
246
- function lr(e, t) {
247
- const n = t.getMergeData(), i = t.getMaxColumns() - 1, r = t.getMaxRows() - 1;
248
- if (i < e.endColumn && (e.endColumn = i), r < e.endRow && (e.endRow = r), e.rangeType === lt.COLUMN || lt.ROW)
245
+ Je.displayName = "Xlsx";
246
+ var pr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, mr = (e, t, n, r) => {
247
+ for (var i = r > 1 ? void 0 : r ? hr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
248
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
249
+ return r && i && pr(t, n, i), i;
250
+ }, ie = (e, t) => (n, r) => t(n, r, e);
251
+ function gr(e, t) {
252
+ const n = t.getMergeData(), r = t.getMaxColumns() - 1, i = t.getMaxRows() - 1;
253
+ if (r < e.endColumn && (e.endColumn = r), i < e.endRow && (e.endRow = i), e.rangeType === lt.COLUMN || lt.ROW)
249
254
  return e;
250
255
  const o = [];
251
256
  return n.forEach((s) => {
252
257
  ee.intersects(e, s) && o.push(s);
253
258
  }), ee.realUnion(e, ...o);
254
259
  }
255
- let F = class {
256
- constructor(e, t, n, i, r) {
257
- this._univerInstanceService = e, this._commandService = t, this._definedNamesService = n, this._messageService = i, this._localeService = r;
260
+ let W = class {
261
+ constructor(e, t, n, r, i) {
262
+ this._univerInstanceService = e, this._commandService = t, this._definedNamesService = n, this._messageService = r, this._localeService = i;
258
263
  }
259
264
  _getURLName(e) {
260
265
  var c;
261
- const { gid: t, range: n, rangeid: i } = e, r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
262
- if (!r)
266
+ const { gid: t, range: n, rangeid: r } = e, i = this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
267
+ if (!i)
263
268
  return null;
264
- const o = t ? r.getSheetBySheetId(t) : r.getActiveSheet(), s = (c = o == null ? void 0 : o.getName()) != null ? c : "";
269
+ const o = t ? i.getSheetBySheetId(t) : i.getActiveSheet(), s = (c = o == null ? void 0 : o.getName()) != null ? c : "";
265
270
  if (n) {
266
- const a = Pe(n).range;
267
- return We(a) && n !== Ze ? {
271
+ const a = Oe(n).range;
272
+ return Ye(a) && n !== Ge ? {
268
273
  type: "range",
269
- name: Tt(s, a)
274
+ name: Ut(s, a)
270
275
  } : {
271
276
  type: "range-error",
272
277
  name: this._localeService.t("hyperLink.message.refError")
273
278
  };
274
279
  }
275
- if (i) {
276
- const a = this._definedNamesService.getValueById(r.getUnitId(), i);
280
+ if (r) {
281
+ const a = this._definedNamesService.getValueById(i.getUnitId(), r);
277
282
  return a ? {
278
283
  type: "defineName",
279
284
  name: a.formulaOrRefString
@@ -283,7 +288,7 @@ let F = class {
283
288
  };
284
289
  }
285
290
  if (t) {
286
- const a = r.getSheetBySheetId(t);
291
+ const a = i.getSheetBySheetId(t);
287
292
  return a ? {
288
293
  type: "sheet",
289
294
  name: a.getName()
@@ -295,26 +300,26 @@ let F = class {
295
300
  return null;
296
301
  }
297
302
  navigateTo(e) {
298
- const { gid: t, range: n, rangeid: i } = e, r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SHEET);
299
- if (!r)
303
+ const { gid: t, range: n, rangeid: r } = e, i = this._univerInstanceService.getCurrentUnitForType(w.UNIVER_SHEET);
304
+ if (!i)
300
305
  return;
301
- const o = r.getUnitId();
302
- if (i && this.navigateToDefineName(o, i), !!t) {
306
+ const o = i.getUnitId();
307
+ if (r && this.navigateToDefineName(o, r), !!t) {
303
308
  if (n) {
304
- const s = Pe(n);
305
- We(s.range) && n !== Ze && this.navigateToRange(o, t, s.range);
309
+ const s = Oe(n);
310
+ Ye(s.range) && n !== Ge && this.navigateToRange(o, t, s.range);
306
311
  return;
307
312
  }
308
313
  this.navigateToSheetById(o, t);
309
314
  }
310
315
  }
311
316
  parseHyperLink(e) {
312
- var t, n, i;
317
+ var t, n, r;
313
318
  if (e != null && e.startsWith("#")) {
314
- const r = new URLSearchParams(e.slice(1)), o = {
315
- gid: (t = r.get("gid")) != null ? t : "",
316
- range: (n = r.get("range")) != null ? n : "",
317
- rangeid: (i = r.get("rangeid")) != null ? i : ""
319
+ const i = new URLSearchParams(e.slice(1)), o = {
320
+ gid: (t = i.get("gid")) != null ? t : "",
321
+ range: (n = i.get("range")) != null ? n : "",
322
+ rangeid: (r = i.get("rangeid")) != null ? r : ""
318
323
  }, s = this._getURLName(o);
319
324
  return {
320
325
  type: (s == null ? void 0 : s.type) || "link",
@@ -336,59 +341,61 @@ let F = class {
336
341
  };
337
342
  }
338
343
  async navigateToRange(e, t, n) {
339
- const i = await this.navigateToSheetById(e, t);
340
- if (i) {
341
- const r = lr(n, i);
344
+ const r = await this.navigateToSheetById(e, t);
345
+ if (r) {
346
+ const i = gr(n, r);
342
347
  await this._commandService.executeCommand(
343
- rn.id,
348
+ an.id,
344
349
  {
345
350
  unitId: e,
346
351
  subUnitId: t,
347
- pluginName: on,
352
+ pluginName: cn,
348
353
  selections: [{
349
- range: r
354
+ range: i
350
355
  }]
351
356
  }
352
- ), await this._commandService.executeCommand(bt.id, {
353
- range: r
357
+ ), await this._commandService.executeCommand(kt.id, {
358
+ range: i
354
359
  });
355
360
  }
356
361
  }
357
362
  async navigateToSheet(e, t) {
358
- const n = this._univerInstanceService.getUnit(e, E.UNIVER_SHEET);
363
+ const n = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
359
364
  if (!n)
360
365
  return !1;
361
- const i = n.getActiveSheet();
362
- if ((i == null ? void 0 : i.getName()) === t)
366
+ const r = n.getActiveSheet();
367
+ if ((r == null ? void 0 : r.getName()) === t)
363
368
  return !0;
364
- const r = n.getSheetBySheetName(t);
365
- if (!r) {
369
+ const i = n.getSheetBySheetName(t);
370
+ if (!i) {
366
371
  this._messageService.show({
367
372
  content: this._localeService.t("hyperLink.message.noSheet"),
368
- type: se.Error
373
+ type: ae.Error
369
374
  });
370
375
  return;
371
376
  }
372
- const o = r.getSheetId();
377
+ const o = i.getSheetId();
373
378
  return n.getHiddenWorksheets().indexOf(o) > -1 && this._messageService.show({
374
379
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
375
- type: se.Error
376
- }), await this._commandService.executeCommand(Re.id, { unitId: e, subUnitId: o });
380
+ type: ae.Error
381
+ }), await this._commandService.executeCommand(we.id, { unitId: e, subUnitId: o });
377
382
  }
378
383
  async navigateToSheetById(e, t) {
379
- const n = this._univerInstanceService.getUnit(e, E.UNIVER_SHEET);
384
+ const n = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET);
380
385
  if (!n)
381
386
  return !1;
382
- const i = n.getActiveSheet();
383
- if (i.getSheetId() === t)
384
- return i;
385
- const r = n.getSheetBySheetId(t);
386
- return r ? n.getHiddenWorksheets().indexOf(t) > -1 ? (this._messageService.show({
387
+ const r = n.getActiveSheet();
388
+ if (!r)
389
+ return !1;
390
+ if (r.getSheetId() === t)
391
+ return r;
392
+ const i = n.getSheetBySheetId(t);
393
+ return i ? n.getHiddenWorksheets().indexOf(t) > -1 ? (this._messageService.show({
387
394
  content: this._localeService.t("hyperLink.message.hiddenSheet"),
388
- type: se.Error
389
- }), !1) : await this._commandService.executeCommand(Re.id, { unitId: e, subUnitId: t }) ? r : !1 : (this._messageService.show({
395
+ type: ae.Error
396
+ }), !1) : await this._commandService.executeCommand(we.id, { unitId: e, subUnitId: t }) ? i : !1 : (this._messageService.show({
390
397
  content: this._localeService.t("hyperLink.message.noSheet"),
391
- type: se.Error
398
+ type: ae.Error
392
399
  }), !1);
393
400
  }
394
401
  async navigateToDefineName(e, t) {
@@ -398,32 +405,31 @@ let F = class {
398
405
  window.open(e, "_blank", "noopener noreferrer");
399
406
  }
400
407
  };
401
- F = cr([
402
- ie(0, de),
403
- ie(1, W),
404
- ie(2, Ut),
405
- ie(3, Ot),
406
- ie(4, m(ue))
407
- ], F);
408
- const dr = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi, ur = new RegExp(dr);
409
- function le(e) {
410
- return Number.isNaN(+e) ? e.startsWith("http://localhost:3002") || e.startsWith("localhost:3002") ? !0 : !!e.match(ur) : !1;
408
+ W = mr([
409
+ ie(0, ue),
410
+ ie(1, F),
411
+ ie(2, jt),
412
+ ie(3, wt),
413
+ ie(4, h(pe))
414
+ ], W);
415
+ const fr = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi, vr = new RegExp(fr);
416
+ function de(e) {
417
+ return Number.isNaN(+e) ? e.startsWith("http://localhost:3002") || e.startsWith("localhost:3002") ? !0 : !!e.match(vr) : !1;
411
418
  }
412
- function pr(e) {
419
+ function _r(e) {
413
420
  return /^[a-zA-Z]+:\/\//.test(e);
414
421
  }
415
- function hr(e) {
422
+ function Cr(e) {
416
423
  return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(e);
417
424
  }
418
425
  function rt(e) {
419
- if (le(e)) {
420
- const t = pr(e) ? e : hr(e) ? `mailto://${e}` : `http://${e}`, n = new URL(t);
421
- if (n.hostname === location.hostname && n.port === location.port && n.protocol === location.protocol && n.pathname === location.pathname && n.hash && !n.search)
422
- return n.hash;
426
+ if (de(e)) {
427
+ const t = _r(e) ? e : Cr(e) ? `mailto://${e}` : `http://${e}`, n = new URL(t);
428
+ return n.hostname === location.hostname && n.port === location.port && n.protocol === location.protocol && n.pathname === location.pathname && n.hash && !n.search ? n.hash : t;
423
429
  }
424
430
  return e;
425
431
  }
426
- function mr(e) {
432
+ function yr(e) {
427
433
  if (e === null)
428
434
  return "";
429
435
  if (e != null && e.p) {
@@ -431,32 +437,32 @@ function mr(e) {
431
437
  if (t == null)
432
438
  return "";
433
439
  const n = t.dataStream;
434
- return n.substring(n.length - 2, n.length) === Xt ? n.substring(0, n.length - 2) : n;
440
+ return n.substring(n.length - 2, n.length) === Jt ? n.substring(0, n.length - 2) : n;
435
441
  }
436
442
  return e == null ? void 0 : e.v;
437
443
  }
438
- const gr = "univer-cell-link-edit-buttons", fr = {
439
- cellLinkEditButtons: gr
440
- }, we = () => {
444
+ const Sr = "univer-cell-link-edit-buttons", Lr = {
445
+ cellLinkEditButtons: Sr
446
+ }, Me = () => {
441
447
  var te;
442
- const [e, t] = re(""), [n, i] = re(""), [r, o] = re(
448
+ const [e, t] = re(""), [n, r] = re(""), [i, o] = re(
443
449
  "link"
444
450
  /* link */
445
- ), [s, c] = re(""), a = k(ue), p = k(Ut), h = k(de), f = k(H), l = Pn(f.currentEditing$), g = k(T), S = k(F), v = k(W), [I, D] = re(!1), C = Pt(!1);
446
- kn(() => {
447
- var d, _, L;
451
+ ), [s, c] = re(""), a = k(pe), p = k(jt), m = k(ue), f = k(H), l = Ot(f.currentEditing$), g = k(T), S = k(W), v = k(F), [I, V] = re(!1), y = Rt(!1);
452
+ xn(() => {
453
+ var u, C, L;
448
454
  if ((l == null ? void 0 : l.row) !== void 0 && l.column !== void 0) {
449
- const y = g.getHyperLinkByLocationSync(l.unitId, l.subUnitId, l.row, l.column);
450
- if (y) {
451
- const me = S.parseHyperLink(y.payload);
452
- if (t(y.id), i(y.display), me.type === "outer") {
455
+ const _ = g.getHyperLinkByLocationSync(l.unitId, l.subUnitId, l.row, l.column);
456
+ if (_) {
457
+ const ge = S.parseHyperLink(_.payload);
458
+ if (t(_.id), r(_.display), ge.type === "outer") {
453
459
  o(
454
460
  "link"
455
461
  /* link */
456
- ), c(me.url), me.url === y.display && (C.current = !0);
462
+ ), c(ge.url), ge.url === _.display && (y.current = !0);
457
463
  return;
458
464
  } else {
459
- const j = me.searchObj;
465
+ const j = ge.searchObj;
460
466
  if (j.rangeid) {
461
467
  o(
462
468
  "rangeid"
@@ -465,15 +471,15 @@ const gr = "univer-cell-link-edit-buttons", fr = {
465
471
  return;
466
472
  }
467
473
  if (j.range) {
468
- const zt = j.gid && (L = (_ = (d = h.getUnit(l.unitId)) == null ? void 0 : d.getSheetBySheetId(j.gid)) == null ? void 0 : _.getName()) != null ? L : "";
474
+ const Kt = j.gid && (L = (C = (u = m.getUnit(l.unitId)) == null ? void 0 : u.getSheetBySheetId(j.gid)) == null ? void 0 : C.getName()) != null ? L : "";
469
475
  if (o(
470
476
  "range"
471
477
  /* range */
472
- ), j.range === Ze)
478
+ ), j.range === Ge)
473
479
  c("");
474
480
  else {
475
- const ct = Tt(zt, Pe(j.range).range);
476
- c(ct), ct === y.display && (C.current = !0);
481
+ const ct = Ut(Kt, Oe(j.range).range);
482
+ c(ct), ct === _.display && (y.current = !0);
477
483
  }
478
484
  return;
479
485
  }
@@ -486,19 +492,19 @@ const gr = "univer-cell-link-edit-buttons", fr = {
486
492
  }
487
493
  }
488
494
  }
489
- const U = h.getUnit(l.unitId), P = U == null ? void 0 : U.getSheetBySheetId(l.subUnitId), Zt = P == null ? void 0 : P.getCellRaw(l.row, l.column), Ne = mr(Zt);
495
+ const U = m.getUnit(l.unitId), R = U == null ? void 0 : U.getSheetBySheetId(l.subUnitId), zt = R == null ? void 0 : R.getCellRaw(l.row, l.column), We = yr(zt);
490
496
  o(
491
497
  "link"
492
498
  /* link */
493
- ), c(""), i((Ne != null ? Ne : "").toString()), t("");
499
+ ), c(""), r((We != null ? We : "").toString()), t("");
494
500
  return;
495
501
  }
496
502
  o(
497
503
  "link"
498
504
  /* link */
499
- ), c(""), i(""), t("");
500
- }, [l, g, S, h]);
501
- const Y = bn(() => s, [r]), A = [
505
+ ), c(""), r(""), t("");
506
+ }, [l, g, S, m]);
507
+ const Y = Tn(() => s, [i]), A = [
502
508
  {
503
509
  label: a.t("hyperLink.form.link"),
504
510
  value: "link"
@@ -519,168 +525,169 @@ const gr = "univer-cell-link-edit-buttons", fr = {
519
525
  value: "rangeid"
520
526
  /* definedName */
521
527
  }
522
- ], b = h.getCurrentUnitForType(E.UNIVER_SHEET);
523
- if (!b)
528
+ ], P = m.getCurrentUnitForType(w.UNIVER_SHEET);
529
+ if (!P)
524
530
  return;
525
- const G = b.getHiddenWorksheets(), B = b.getSheets().map((d) => ({ label: d.getName(), value: d.getSheetId() })).filter((d) => G.indexOf(d.value) === -1), q = Object.values((te = p.getDefinedNameMap(b.getUnitId())) != null ? te : {}).map((d) => ({
526
- label: d.name,
527
- value: d.id
528
- })), pe = (d, _) => {
529
- if (d === "link")
530
- return rt(_);
531
- if (d === "range") {
532
- const L = Pe(_), y = b.getSheetBySheetName(L.sheetName);
533
- if (y)
534
- return `#gid=${y.getSheetId()}&range=${Nn(L.range)}`;
531
+ const G = P.getHiddenWorksheets(), B = P.getSheets().map((u) => ({ label: u.getName(), value: u.getSheetId() })).filter((u) => G.indexOf(u.value) === -1), q = Object.values((te = p.getDefinedNameMap(P.getUnitId())) != null ? te : {}).map((u) => ({
532
+ label: u.name,
533
+ value: u.id
534
+ })), he = (u, C) => {
535
+ if (u === "link")
536
+ return rt(C);
537
+ if (u === "range") {
538
+ const L = Oe(C), _ = P.getSheetBySheetName(L.sheetName);
539
+ if (_)
540
+ return `#gid=${_.getSheetId()}&range=${Wn(L.range)}`;
535
541
  }
536
- return `#${d}=${_}`;
537
- }, He = On((d) => {
538
- const _ = d[0];
539
- if (!_ || !We(_.range))
542
+ return `#${u}=${C}`;
543
+ }, De = Un((u) => {
544
+ var _;
545
+ const C = u[0];
546
+ if (!C || !Ye(C.range))
540
547
  return;
541
- _.sheetName || (_.sheetName = b.getActiveSheet().getName());
542
- const L = Hn(_);
543
- c(L), L && (C.current || !n) && (i(L), C.current = !0);
544
- }), he = async () => {
545
- if (l && (e ? await v.executeCommand(Lt.id, {
548
+ C.sheetName || (C.sheetName = ((_ = P.getActiveSheet()) == null ? void 0 : _.getName()) || "");
549
+ const L = Dn(C);
550
+ c(L), L && (y.current || !n) && (r(L), y.current = !0);
551
+ }), me = async () => {
552
+ if (l && (e ? await v.executeCommand(St.id, {
546
553
  unitId: l.unitId,
547
554
  subUnitId: l.subUnitId,
548
555
  id: e,
549
556
  payload: {
550
557
  display: n,
551
- payload: pe(r, s)
558
+ payload: he(i, s)
552
559
  }
553
- }) : await v.executeCommand(It.id, {
560
+ }) : await v.executeCommand(Lt.id, {
554
561
  unitId: l.unitId,
555
562
  subUnitId: l.subUnitId,
556
563
  link: {
557
- id: ce.generateRandomId(),
564
+ id: le.generateRandomId(),
558
565
  row: l.row,
559
566
  column: l.column,
560
- payload: pe(r, s),
567
+ payload: he(i, s),
561
568
  display: n
562
569
  }
563
570
  })), l) {
564
- await v.executeCommand(Re.id, {
571
+ await v.executeCommand(we.id, {
565
572
  unitId: l.unitId,
566
573
  subUnitId: l.subUnitId
567
574
  });
568
- const d = 5;
569
- await v.executeCommand(bt.id, {
575
+ const u = 5;
576
+ await v.executeCommand(kt.id, {
570
577
  range: {
571
- startRow: Math.max(l.row - d, 0),
572
- endRow: l.row + d,
573
- startColumn: Math.max(l.column - d, 0),
574
- endColumn: l.column + d
578
+ startRow: Math.max(l.row - u, 0),
579
+ endRow: l.row + u,
580
+ startColumn: Math.max(l.column - u, 0),
581
+ endColumn: l.column + u
575
582
  }
576
583
  });
577
584
  }
578
- v.executeCommand(Ee.id);
585
+ v.executeCommand(xe.id);
579
586
  };
580
- return /* @__PURE__ */ u.jsxs("div", { children: [
581
- /* @__PURE__ */ u.jsx(
587
+ return /* @__PURE__ */ d.jsxs("div", { children: [
588
+ /* @__PURE__ */ d.jsx(
582
589
  X,
583
590
  {
584
591
  label: a.t("hyperLink.form.label"),
585
592
  error: I && !n ? a.t("hyperLink.form.inputError") : "",
586
- children: /* @__PURE__ */ u.jsx(
587
- mt,
593
+ children: /* @__PURE__ */ d.jsx(
594
+ ht,
588
595
  {
589
596
  value: n,
590
- onChange: (d) => {
591
- i(d), C.current = !1;
597
+ onChange: (u) => {
598
+ r(u), y.current = !1;
592
599
  },
593
600
  placeholder: a.t("hyperLink.form.labelPlaceholder")
594
601
  }
595
602
  )
596
603
  }
597
604
  ),
598
- /* @__PURE__ */ u.jsx(X, { label: a.t("hyperLink.form.type"), children: /* @__PURE__ */ u.jsx(
599
- Ae,
605
+ /* @__PURE__ */ d.jsx(X, { label: a.t("hyperLink.form.type"), children: /* @__PURE__ */ d.jsx(
606
+ Ze,
600
607
  {
601
608
  options: A,
602
- value: r,
603
- onChange: (d) => {
604
- o(d), c("");
609
+ value: i,
610
+ onChange: (u) => {
611
+ o(u), c("");
605
612
  }
606
613
  }
607
614
  ) }),
608
- r === "link" && /* @__PURE__ */ u.jsx(
615
+ i === "link" && /* @__PURE__ */ d.jsx(
609
616
  X,
610
617
  {
611
- error: I ? s ? le(s) ? "" : a.t("hyperLink.form.linkError") : a.t("hyperLink.form.inputError") : "",
612
- children: /* @__PURE__ */ u.jsx(
613
- mt,
618
+ error: I ? s ? de(s) ? "" : a.t("hyperLink.form.linkError") : a.t("hyperLink.form.inputError") : "",
619
+ children: /* @__PURE__ */ d.jsx(
620
+ ht,
614
621
  {
615
622
  value: s,
616
- onChange: (d) => {
617
- c(d), d && (C.current || !n || n === s) && (i(d), C.current = !0);
623
+ onChange: (u) => {
624
+ c(u), u && (y.current || !n || n === s) && (r(u), y.current = !0);
618
625
  },
619
626
  placeholder: a.t("hyperLink.form.linkPlaceholder")
620
627
  }
621
628
  )
622
629
  }
623
630
  ),
624
- r === "range" && /* @__PURE__ */ u.jsx(X, { error: I && !s ? a.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ u.jsx(
625
- wn,
631
+ i === "range" && /* @__PURE__ */ d.jsx(X, { error: I && !s ? a.t("hyperLink.form.inputError") : "", children: /* @__PURE__ */ d.jsx(
632
+ jn,
626
633
  {
627
- openForSheetUnitId: b.getUnitId(),
628
- id: Jt("hyper-link-edit"),
634
+ openForSheetUnitId: P.getUnitId(),
635
+ id: Qt("hyper-link-edit"),
629
636
  isSingleChoice: !0,
630
637
  value: Y,
631
- onChange: He
638
+ onChange: De
632
639
  }
633
640
  ) }),
634
- r === "gid" && /* @__PURE__ */ u.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ u.jsx(
635
- Ae,
641
+ i === "gid" && /* @__PURE__ */ d.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
642
+ Ze,
636
643
  {
637
644
  options: B,
638
645
  value: s,
639
- onChange: (d) => {
640
- var y, U;
641
- c(d);
642
- const _ = (y = B.find((P) => P.value === d)) == null ? void 0 : y.label, L = (U = B.find((P) => P.value === s)) == null ? void 0 : U.label;
643
- _ && (C.current || !n || n === L) && (i(_), C.current = !0);
646
+ onChange: (u) => {
647
+ var _, U;
648
+ c(u);
649
+ const C = (_ = B.find((R) => R.value === u)) == null ? void 0 : _.label, L = (U = B.find((R) => R.value === s)) == null ? void 0 : U.label;
650
+ C && (y.current || !n || n === L) && (r(C), y.current = !0);
644
651
  }
645
652
  }
646
653
  ) }),
647
- r === "rangeid" && /* @__PURE__ */ u.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ u.jsx(
648
- Ae,
654
+ i === "rangeid" && /* @__PURE__ */ d.jsx(X, { error: I && !s ? a.t("hyperLink.form.selectError") : "", children: /* @__PURE__ */ d.jsx(
655
+ Ze,
649
656
  {
650
657
  options: q,
651
658
  value: s,
652
- onChange: (d) => {
653
- var y, U;
654
- c(d);
655
- const _ = (y = q.find((P) => P.value === d)) == null ? void 0 : y.label, L = (U = q.find((P) => P.value === s)) == null ? void 0 : U.label;
656
- _ && (C.current || !n || n === L) && (i(_), C.current = !0);
659
+ onChange: (u) => {
660
+ var _, U;
661
+ c(u);
662
+ 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;
663
+ C && (y.current || !n || n === L) && (r(C), y.current = !0);
657
664
  }
658
665
  }
659
666
  ) }),
660
- /* @__PURE__ */ u.jsxs("div", { className: fr.cellLinkEditButtons, children: [
661
- /* @__PURE__ */ u.jsx(
662
- gt,
667
+ /* @__PURE__ */ d.jsxs("div", { className: Lr.cellLinkEditButtons, children: [
668
+ /* @__PURE__ */ d.jsx(
669
+ mt,
663
670
  {
664
671
  onClick: () => {
665
- l && v.executeCommand(Re.id, {
672
+ l && v.executeCommand(we.id, {
666
673
  unitId: l.unitId,
667
674
  subUnitId: l.subUnitId
668
- }), v.executeCommand(Ee.id);
675
+ }), v.executeCommand(xe.id);
669
676
  },
670
677
  children: a.t("hyperLink.form.cancel")
671
678
  }
672
679
  ),
673
- /* @__PURE__ */ u.jsx(
674
- gt,
680
+ /* @__PURE__ */ d.jsx(
681
+ mt,
675
682
  {
676
683
  type: "primary",
677
684
  style: { marginLeft: 8 },
678
685
  onClick: async () => {
679
- if (!n || !s || r === "link" && !le(s)) {
680
- D(!0);
686
+ if (!n || !s || i === "link" && !de(s)) {
687
+ V(!0);
681
688
  return;
682
689
  }
683
- he();
690
+ me();
684
691
  },
685
692
  children: a.t("hyperLink.form.ok")
686
693
  }
@@ -688,42 +695,42 @@ const gr = "univer-cell-link-edit-buttons", fr = {
688
695
  ] })
689
696
  ] });
690
697
  };
691
- we.componentKey = "univer.sheet.cell-link-edit";
698
+ Me.componentKey = "univer.sheet.cell-link-edit";
692
699
  const it = {
693
- type: Te.OPERATION,
700
+ type: je.OPERATION,
694
701
  id: "sheet.operation.open-hyper-link-sidebar",
695
702
  handler(e, t) {
696
703
  if (!t)
697
704
  return !1;
698
- const { unitId: n, subUnitId: i, row: r, column: o } = t, s = e.get(T), c = e.get(wt), a = e.get(H), p = s.getHyperLinkByLocation(n, i, r, o);
705
+ 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);
699
706
  return a.startEditing(t), c.open({
700
707
  header: {
701
708
  title: p ? "hyperLink.form.editTitle" : "hyperLink.form.addTitle"
702
709
  },
703
710
  children: {
704
- label: we.componentKey
711
+ label: Me.componentKey
705
712
  }
706
713
  }), !0;
707
714
  }
708
- }, Ee = {
709
- type: Te.OPERATION,
715
+ }, xe = {
716
+ type: je.OPERATION,
710
717
  id: "sheet.operation.close-hyper-link-sidebar",
711
718
  handler(e) {
712
- const t = e.get(wt), n = e.get(H);
719
+ const t = e.get(Et), n = e.get(H);
713
720
  return t.close(), n.endEditing(), !0;
714
721
  }
715
722
  }, ot = {
716
- type: Te.OPERATION,
723
+ type: je.OPERATION,
717
724
  id: "sheet.operation.insert-hyper-link",
718
725
  handler(e) {
719
- const t = e.get(de), n = Ct(t);
726
+ const t = e.get(ue), n = Ct(t);
720
727
  if (!n)
721
728
  return !1;
722
- const i = e.get(W), o = e.get(St).getFirst();
729
+ const r = e.get(F), o = e.get(yt).getFirst();
723
730
  if (!(o != null && o.primary))
724
731
  return !1;
725
732
  const s = o.primary.startRow, c = o.primary.startColumn;
726
- return i.executeCommand(it.id, {
733
+ return r.executeCommand(it.id, {
727
734
  unitId: n.unitId,
728
735
  subUnitId: n.subUnitId,
729
736
  row: s,
@@ -731,47 +738,47 @@ const it = {
731
738
  });
732
739
  }
733
740
  }, st = {
734
- type: Te.OPERATION,
741
+ type: je.OPERATION,
735
742
  id: "sheet.operation.insert-hyper-link-toolbar",
736
743
  handler(e) {
737
- const t = e.get(W);
738
- return e.get(H).currentEditing ? t.executeCommand(Ee.id) : t.executeCommand(ot.id);
744
+ const t = e.get(F);
745
+ return e.get(H).currentEditing ? t.executeCommand(xe.id) : t.executeCommand(ot.id);
739
746
  }
740
- }, vr = "univer-cell-link", _r = "univer-cell-link-type", yr = "univer-cell-link-content", Cr = "univer-cell-link-content-error", Sr = "univer-cell-link-url", Lr = "univer-cell-link-operations", Ir = "univer-cell-link-operation", kr = "univer-cell-link-operation-error", w = {
741
- cellLink: vr,
742
- cellLinkType: _r,
743
- cellLinkContent: yr,
744
- cellLinkContentError: Cr,
745
- cellLinkUrl: Sr,
746
- cellLinkOperations: Lr,
747
- cellLinkOperation: Ir,
748
- cellLinkOperationError: kr
749
- }, br = {
750
- outer: /* @__PURE__ */ u.jsx(Oe, {}),
751
- link: /* @__PURE__ */ u.jsx(Oe, {}),
752
- sheet: /* @__PURE__ */ u.jsx(Ye, {}),
753
- range: /* @__PURE__ */ u.jsx(ye, {}),
754
- defineName: /* @__PURE__ */ u.jsx(ye, {}),
755
- "range-error": /* @__PURE__ */ u.jsx(ye, {}),
756
- "sheet-error": /* @__PURE__ */ u.jsx(Ye, {})
757
- }, Me = () => {
758
- const e = k(H), t = k(T), n = k(W), i = k(Ot), r = k(ue), o = Rn(e.currentPopup$, e.currentPopup), s = k(F);
747
+ }, 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", Or = "univer-cell-link-operation", Er = "univer-cell-link-operation-error", E = {
748
+ cellLink: Ir,
749
+ cellLinkType: kr,
750
+ cellLinkContent: Pr,
751
+ cellLinkContentError: br,
752
+ cellLinkUrl: Rr,
753
+ cellLinkOperations: wr,
754
+ cellLinkOperation: Or,
755
+ cellLinkOperationError: Er
756
+ }, Mr = {
757
+ outer: /* @__PURE__ */ d.jsx(Ee, {}),
758
+ link: /* @__PURE__ */ d.jsx(Ee, {}),
759
+ sheet: /* @__PURE__ */ d.jsx(Je, {}),
760
+ range: /* @__PURE__ */ d.jsx(Se, {}),
761
+ defineName: /* @__PURE__ */ d.jsx(Se, {}),
762
+ "range-error": /* @__PURE__ */ d.jsx(Se, {}),
763
+ "sheet-error": /* @__PURE__ */ d.jsx(Je, {})
764
+ }, Te = () => {
765
+ const e = k(H), t = k(T), n = k(F), r = k(wt), i = k(pe), o = Ot(e.currentPopup$, e.currentPopup), s = k(W);
759
766
  if (!o)
760
767
  return null;
761
- const { unitId: c, subUnitId: a, id: p } = o, h = t.getHyperLink(c, a, p);
762
- if (!h)
768
+ const { unitId: c, subUnitId: a, id: p } = o, m = t.getHyperLink(c, a, p);
769
+ if (!m)
763
770
  return null;
764
- const f = s.parseHyperLink(h.payload), l = f.type.indexOf("error") > -1;
765
- return /* @__PURE__ */ u.jsxs("div", { className: w.cellLink, onClick: () => e.hideCurrentPopup(), children: [
766
- /* @__PURE__ */ u.jsxs("div", { className: ht(w.cellLinkContent, { [w.cellLinkContentError]: l }), onClick: f.handler, children: [
767
- /* @__PURE__ */ u.jsx("div", { className: w.cellLinkType, children: br[f.type] }),
768
- /* @__PURE__ */ u.jsx("div", { className: w.cellLinkUrl, children: f.name })
771
+ const f = s.parseHyperLink(m.payload), l = f.type.indexOf("error") > -1;
772
+ return /* @__PURE__ */ d.jsxs("div", { className: E.cellLink, onClick: () => e.hideCurrentPopup(), children: [
773
+ /* @__PURE__ */ d.jsxs("div", { className: pt(E.cellLinkContent, { [E.cellLinkContentError]: l }), onClick: f.handler, children: [
774
+ /* @__PURE__ */ d.jsx("div", { className: E.cellLinkType, children: Mr[f.type] }),
775
+ /* @__PURE__ */ d.jsx(ve, { showIfEllipsis: !0, title: f.name, children: /* @__PURE__ */ d.jsx("span", { className: E.cellLinkUrl, children: f.name }) })
769
776
  ] }),
770
- /* @__PURE__ */ u.jsxs("div", { className: w.cellLinkOperations, children: [
771
- /* @__PURE__ */ u.jsx(
777
+ /* @__PURE__ */ d.jsxs("div", { className: E.cellLinkOperations, children: [
778
+ o.copyPermission && /* @__PURE__ */ d.jsx(
772
779
  "div",
773
780
  {
774
- className: ht(w.cellLinkOperation, { [w.cellLinkOperationError]: l }),
781
+ className: pt(E.cellLinkOperation, { [E.cellLinkOperationError]: l }),
775
782
  onClick: () => {
776
783
  if (!l) {
777
784
  if (f.type !== "outer") {
@@ -779,62 +786,64 @@ const it = {
779
786
  g.hash = f.url.slice(1), navigator.clipboard.writeText(g.href);
780
787
  } else
781
788
  navigator.clipboard.writeText(f.url);
782
- i.show({
783
- content: r.t("hyperLink.message.coped"),
784
- type: se.Info
789
+ r.show({
790
+ content: i.t("hyperLink.message.coped"),
791
+ type: ae.Info
785
792
  });
786
793
  }
787
794
  },
788
- children: /* @__PURE__ */ u.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.copy"), children: /* @__PURE__ */ u.jsx(At, {}) })
789
- }
790
- ),
791
- /* @__PURE__ */ u.jsx(
792
- "div",
793
- {
794
- className: w.cellLinkOperation,
795
- onClick: () => {
796
- n.executeCommand(it.id, {
797
- unitId: c,
798
- subUnitId: a,
799
- row: h.row,
800
- column: h.column
801
- });
802
- },
803
- children: /* @__PURE__ */ u.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.edit"), children: /* @__PURE__ */ u.jsx(Dt, {}) })
795
+ children: /* @__PURE__ */ d.jsx(ve, { placement: "bottom", title: i.t("hyperLink.popup.copy"), children: /* @__PURE__ */ d.jsx(Bt, {}) })
804
796
  }
805
797
  ),
806
- /* @__PURE__ */ u.jsx(
807
- "div",
808
- {
809
- className: w.cellLinkOperation,
810
- onClick: () => {
811
- n.executeCommand(ln.id, {
812
- unitId: c,
813
- subUnitId: a,
814
- id: h.id
815
- });
816
- },
817
- children: /* @__PURE__ */ u.jsx(Be, { placement: "bottom", title: r.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ u.jsx(Bt, {}) })
818
- }
819
- )
798
+ o.editPermission && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
799
+ /* @__PURE__ */ d.jsx(
800
+ "div",
801
+ {
802
+ className: E.cellLinkOperation,
803
+ onClick: () => {
804
+ n.executeCommand(it.id, {
805
+ unitId: c,
806
+ subUnitId: a,
807
+ row: m.row,
808
+ column: m.column
809
+ });
810
+ },
811
+ children: /* @__PURE__ */ d.jsx(ve, { placement: "bottom", title: i.t("hyperLink.popup.edit"), children: /* @__PURE__ */ d.jsx(Dt, {}) })
812
+ }
813
+ ),
814
+ /* @__PURE__ */ d.jsx(
815
+ "div",
816
+ {
817
+ className: E.cellLinkOperation,
818
+ onClick: () => {
819
+ n.executeCommand(_n.id, {
820
+ unitId: c,
821
+ subUnitId: a,
822
+ id: m.id
823
+ });
824
+ },
825
+ children: /* @__PURE__ */ d.jsx(ve, { placement: "bottom", title: i.t("hyperLink.popup.cancel"), children: /* @__PURE__ */ d.jsx(Vt, {}) })
826
+ }
827
+ )
828
+ ] })
820
829
  ] })
821
830
  ] });
822
831
  };
823
- Me.componentKey = "univer.sheet.cell-link-popup";
824
- var Rr = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, Or = (e, t, n, i) => {
825
- for (var r = i > 1 ? void 0 : i ? Pr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
826
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
827
- return i && r && Rr(t, n, r), r;
828
- }, ft = (e, t) => (n, i) => t(n, i, e);
829
- const wr = (e, t) => e.unitId === t.unitId && e.subUnitId === t.subUnitId && e.row === t.row && e.col === t.col;
832
+ Te.componentKey = "univer.sheet.cell-link-popup";
833
+ var xr = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, Ur = (e, t, n, r) => {
834
+ for (var i = r > 1 ? void 0 : r ? Tr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
835
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
836
+ return r && i && xr(t, n, i), i;
837
+ }, gt = (e, t) => (n, r) => t(n, r, e);
838
+ const jr = (e, t) => e.unitId === t.unitId && e.subUnitId === t.subUnitId && e.row === t.row && e.col === t.col;
830
839
  let H = class extends O {
831
840
  constructor(t, n) {
832
841
  super();
833
- V(this, "_currentPopup", null);
834
- V(this, "_currentPopup$", new Cn());
835
- V(this, "currentPopup$", this._currentPopup$.asObservable());
836
- V(this, "_currentEditing$", new Sn(null));
837
- V(this, "currentEditing$", this._currentEditing$.asObservable());
842
+ D(this, "_currentPopup", null);
843
+ D(this, "_currentPopup$", new wn());
844
+ D(this, "currentPopup$", this._currentPopup$.asObservable());
845
+ D(this, "_currentEditing$", new On(null));
846
+ D(this, "currentEditing$", this._currentEditing$.asObservable());
838
847
  this._hyperLinkModel = t, this._sheetCanvasPopManagerService = n, this.disposeWithMe(() => {
839
848
  this.hideCurrentPopup(), this.endEditing(), this._currentEditing$.complete(), this._currentPopup$.complete();
840
849
  });
@@ -846,24 +855,29 @@ let H = class extends O {
846
855
  return this._currentEditing$.getValue();
847
856
  }
848
857
  showPopup(t) {
849
- if (this._currentPopup && wr(t, this._currentPopup))
858
+ if (this._currentPopup && jr(t, this._currentPopup))
850
859
  return;
851
860
  this.hideCurrentPopup();
852
- const { unitId: n, subUnitId: i, row: r, col: o } = t, s = this._hyperLinkModel.getHyperLinkByLocation(n, i, r, o);
861
+ const { unitId: n, subUnitId: r, row: i, col: o } = t, s = this._hyperLinkModel.getHyperLinkByLocation(n, r, i, o);
853
862
  if (!s)
854
863
  return;
855
- const c = this._sheetCanvasPopManagerService.attachPopupToCell(r, o, {
856
- componentKey: Me.componentKey,
864
+ const c = this._sheetCanvasPopManagerService.attachPopupToCell(i, o, {
865
+ componentKey: Te.componentKey,
857
866
  direction: "bottom",
858
- closeOnSelfTarget: !0
867
+ closeOnSelfTarget: !0,
868
+ onClickOutside: () => {
869
+ this.hideCurrentPopup();
870
+ }
859
871
  });
860
872
  c && (this._currentPopup = {
861
873
  unitId: n,
862
- subUnitId: i,
874
+ subUnitId: r,
863
875
  id: s.id,
864
876
  disposable: c,
865
- row: r,
866
- col: o
877
+ row: i,
878
+ col: o,
879
+ editPermission: !!t.editPermission,
880
+ copyPermission: !!t.copyPermission
867
881
  }, this._currentPopup$.next(this._currentPopup));
868
882
  }
869
883
  hideCurrentPopup() {
@@ -877,18 +891,18 @@ let H = class extends O {
877
891
  this._currentEditing$.next(null);
878
892
  }
879
893
  };
880
- H = Or([
881
- ft(0, m(T)),
882
- ft(1, m(un))
894
+ H = Ur([
895
+ gt(0, h(T)),
896
+ gt(1, h(yn))
883
897
  ], H);
884
- var Er = Object.defineProperty, Mr = Object.getOwnPropertyDescriptor, xr = (e, t, n, i) => {
885
- for (var r = i > 1 ? void 0 : i ? Mr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
886
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
887
- return i && r && Er(t, n, r), r;
888
- }, oe = (e, t) => (n, i) => t(n, i, e);
889
- let Ce = class extends O {
890
- constructor(e, t, n, i, r) {
891
- super(), this._sheetInterceptorService = e, this._injector = t, this._hyperLinkModel = n, this._selectionManagerService = i, this._univerInstanceService = r, this._initCommandInterceptor();
898
+ var Hr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, $r = (e, t, n, r) => {
899
+ for (var i = r > 1 ? void 0 : r ? Nr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
900
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
901
+ return r && i && Hr(t, n, i), i;
902
+ }, oe = (e, t) => (n, r) => t(n, r, e);
903
+ let Le = class extends O {
904
+ constructor(e, t, n, r, i) {
905
+ super(), this._sheetInterceptorService = e, this._injector = t, this._hyperLinkModel = n, this._selectionManagerService = r, this._univerInstanceService = i, this._initCommandInterceptor();
892
906
  }
893
907
  _initCommandInterceptor() {
894
908
  this._initAddHyperLinkCommandInterceptor(), this._initSetRangeValuesCommandInterceptor(), this._initUpdateHyperLinkCommandInterceptor(), this._initClearSelectionCommandInterceptor();
@@ -896,28 +910,31 @@ let Ce = class extends O {
896
910
  _initAddHyperLinkCommandInterceptor() {
897
911
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
898
912
  getMutations: (e) => {
899
- if (e.id === It.id) {
900
- const t = e.params, { unitId: n, subUnitId: i, link: r } = t, o = {
901
- unitId: n,
913
+ var t;
914
+ if (e.id === Lt.id) {
915
+ const n = e.params, { unitId: r, subUnitId: i, link: o } = n, s = this._getCurrentCell(r, i, o.row, o.column), c = {
916
+ unitId: r,
902
917
  subUnitId: i,
903
918
  cellValue: {
904
- [r.row]: {
905
- [r.column]: {
906
- v: r.display,
907
- t: dt.STRING,
908
- p: null
919
+ [o.row]: {
920
+ [o.column]: {
921
+ v: o.display,
922
+ // t: CellValueType.STRING, // Setting a link to a number is still a number
923
+ p: null,
924
+ t: (t = s == null ? void 0 : s.t) != null ? t : void 0
925
+ // Keep force string type
909
926
  }
910
927
  }
911
928
  }
912
929
  };
913
930
  return {
914
931
  redos: [{
915
- id: ge.id,
916
- params: o
932
+ id: fe.id,
933
+ params: c
917
934
  }],
918
935
  undos: [{
919
- id: ge.id,
920
- params: ut(this._injector, o)
936
+ id: fe.id,
937
+ params: dt(this._injector, c)
921
938
  }]
922
939
  };
923
940
  }
@@ -931,17 +948,17 @@ let Ce = class extends O {
931
948
  _initUpdateHyperLinkCommandInterceptor() {
932
949
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
933
950
  getMutations: (e) => {
934
- if (e.id === Lt.id) {
935
- const t = e.params, { unitId: n, subUnitId: i, id: r, payload: o } = t, s = this._hyperLinkModel.getHyperLink(n, i, r);
951
+ if (e.id === St.id) {
952
+ const t = e.params, { unitId: n, subUnitId: r, id: i, payload: o } = t, s = this._hyperLinkModel.getHyperLink(n, r, i);
936
953
  if (s && s.display !== o.display) {
937
954
  const c = {
938
955
  unitId: n,
939
- subUnitId: i,
956
+ subUnitId: r,
940
957
  cellValue: {
941
958
  [s.row]: {
942
959
  [s.column]: {
943
960
  v: o.display,
944
- t: dt.STRING,
961
+ t: en.STRING,
945
962
  p: null
946
963
  }
947
964
  }
@@ -949,12 +966,12 @@ let Ce = class extends O {
949
966
  };
950
967
  return {
951
968
  redos: [{
952
- id: ge.id,
969
+ id: fe.id,
953
970
  params: c
954
971
  }],
955
972
  undos: [{
956
- id: ge.id,
957
- params: ut(this._injector, c)
973
+ id: fe.id,
974
+ params: dt(this._injector, c)
958
975
  }]
959
976
  };
960
977
  }
@@ -969,56 +986,56 @@ let Ce = class extends O {
969
986
  _initSetRangeValuesCommandInterceptor() {
970
987
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
971
988
  getMutations: (e) => {
972
- if (e.id === sn.id) {
973
- const t = e.params, { unitId: n, subUnitId: i } = t, r = [], o = [];
974
- return t.cellValue && new yt(t.cellValue).forValue((s, c, a) => {
989
+ if (e.id === ln.id) {
990
+ const t = e.params, { unitId: n, subUnitId: r } = t, i = [], o = [];
991
+ return t.cellValue && new _t(t.cellValue).forValue((s, c, a) => {
975
992
  var l, g, S;
976
- 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), h = (p != null ? p : "").toString(), f = this._hyperLinkModel.getHyperLinkByLocation(n, i, s, c);
993
+ 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);
977
994
  if (!f) {
978
- if (le(h)) {
979
- const v = ce.generateRandomId();
995
+ if (de(m)) {
996
+ const v = le.generateRandomId();
980
997
  o.push({
981
998
  id: M.id,
982
999
  params: {
983
1000
  unitId: n,
984
- subUnitId: i,
1001
+ subUnitId: r,
985
1002
  id: v
986
1003
  }
987
- }), r.push({
1004
+ }), i.push({
988
1005
  id: x.id,
989
1006
  params: {
990
1007
  unitId: n,
991
- subUnitId: i,
1008
+ subUnitId: r,
992
1009
  link: {
993
1010
  id: v,
994
1011
  row: s,
995
1012
  column: c,
996
- display: h,
997
- payload: rt(h)
1013
+ display: m,
1014
+ payload: rt(m)
998
1015
  }
999
1016
  }
1000
1017
  });
1001
1018
  }
1002
1019
  return;
1003
1020
  }
1004
- p === "" && (r.push({
1021
+ p === "" && (i.push({
1005
1022
  id: M.id,
1006
1023
  params: {
1007
1024
  unitId: n,
1008
- subUnitId: i,
1025
+ subUnitId: r,
1009
1026
  id: f.id
1010
1027
  }
1011
1028
  }), o.push({
1012
1029
  id: x.id,
1013
1030
  params: {
1014
1031
  unitId: n,
1015
- subUnitId: i,
1032
+ subUnitId: r,
1016
1033
  link: f
1017
1034
  }
1018
1035
  }));
1019
1036
  }), {
1020
1037
  undos: o,
1021
- redos: r
1038
+ redos: i
1022
1039
  };
1023
1040
  }
1024
1041
  return {
@@ -1031,11 +1048,11 @@ let Ce = class extends O {
1031
1048
  _initClearSelectionCommandInterceptor() {
1032
1049
  this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
1033
1050
  getMutations: (e) => {
1034
- if (e.id === an.id || e.id === cn.id) {
1035
- const t = [], n = [], i = this._selectionManagerService.getFirst(), r = Ct(this._univerInstanceService);
1036
- if (i && r) {
1037
- const { unitId: o, subUnitId: s } = r;
1038
- Ge.foreach(i.range, (c, a) => {
1051
+ if (e.id === dn.id || e.id === un.id || e.id === pn.id) {
1052
+ const t = [], n = [], r = this._selectionManagerService.getFirst(), i = Ct(this._univerInstanceService);
1053
+ if (r && i) {
1054
+ const { unitId: o, subUnitId: s } = i;
1055
+ Qe.foreach(r.range, (c, a) => {
1039
1056
  const p = this._hyperLinkModel.getHyperLinkByLocation(o, s, c, a);
1040
1057
  p && (t.push({
1041
1058
  id: M.id,
@@ -1066,87 +1083,108 @@ let Ce = class extends O {
1066
1083
  }
1067
1084
  }));
1068
1085
  }
1086
+ _getCurrentCell(e, t, n, r) {
1087
+ var i, o;
1088
+ return (o = (i = this._univerInstanceService.getUnit(e, w.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetId(t)) == null ? void 0 : o.getCell(n, r);
1089
+ }
1069
1090
  };
1070
- Ce = xr([
1071
- N($.Starting, Ce),
1072
- oe(0, m(qe)),
1073
- oe(1, m(Ue)),
1074
- oe(2, m(T)),
1075
- oe(3, m(St)),
1076
- oe(4, de)
1077
- ], Ce);
1078
- var Tr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, jr = (e, t, n, i) => {
1079
- for (var r = i > 1 ? void 0 : i ? Ur(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1080
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1081
- return i && r && Tr(t, n, r), r;
1082
- }, Ve = (e, t) => (n, i) => t(n, i, e);
1083
- let Se = class extends O {
1084
- constructor(e, t, n) {
1085
- super(), this._hoverManagerService = e, this._sheetsHyperLinkPopupService = t, this._renderManagerService = n, this._initHoverListener();
1091
+ Le = $r([
1092
+ N($.Starting, Le),
1093
+ oe(0, h(et)),
1094
+ oe(1, h(Be)),
1095
+ oe(2, h(T)),
1096
+ oe(3, h(yt)),
1097
+ oe(4, ue)
1098
+ ], Le);
1099
+ var Ar = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, Vr = (e, t, n, r) => {
1100
+ for (var i = r > 1 ? void 0 : r ? Br(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1101
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1102
+ return r && i && Ar(t, n, i), i;
1103
+ }, se = (e, t) => (n, r) => t(n, r, e);
1104
+ let Ie = class extends O {
1105
+ constructor(e, t, n, r, i) {
1106
+ super(), this._hoverManagerService = e, this._sheetsHyperLinkPopupService = t, this._renderManagerService = n, this._permissionService = r, this._sheetPermissionInterceptorBaseController = i, this._initHoverListener();
1086
1107
  }
1087
1108
  _initHoverListener() {
1088
1109
  this.disposeWithMe(
1089
- this._hoverManagerService.currentCell$.pipe(Ln(100)).subscribe((e) => {
1090
- var s, c;
1110
+ this._hoverManagerService.currentCell$.pipe(En(100)).subscribe((e) => {
1111
+ var f, l;
1091
1112
  if (!e) {
1092
1113
  this._sheetsHyperLinkPopupService.hideCurrentPopup();
1093
1114
  return;
1094
1115
  }
1095
- const t = (c = (s = this._renderManagerService.getRenderById(e.location.unitId)) == null ? void 0 : s.with(kt).getUnitSkeleton(e.location.unitId, e.location.subUnitId)) == null ? void 0 : c.skeleton, n = e.location.col, i = e.location.row;
1096
- let r = i, o = n;
1097
- t && t.overflowCache.forValue((a, p, h) => {
1098
- ee.contains(h, { startColumn: n, endColumn: n, startRow: i, endRow: i }) && (r = a, o = p);
1099
- }), this._sheetsHyperLinkPopupService.showPopup({
1116
+ 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;
1117
+ let i = r, o = n;
1118
+ if (t && t.overflowCache.forValue((g, S, v) => {
1119
+ ee.contains(v, { startColumn: n, endColumn: n, startRow: r, endRow: r }) && (i = g, o = S);
1120
+ }), !this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1121
+ workbookTypes: [hn],
1122
+ worksheetTypes: [mn],
1123
+ rangeTypes: [gn]
1124
+ }, [{ startRow: r, startColumn: n, endRow: r, endColumn: n }])) {
1125
+ this._sheetsHyperLinkPopupService.hideCurrentPopup();
1126
+ return;
1127
+ }
1128
+ const c = this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1129
+ workbookTypes: [He],
1130
+ worksheetTypes: [Ne, $e],
1131
+ rangeTypes: [Ae]
1132
+ }, [{ 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);
1133
+ this._sheetsHyperLinkPopupService.showPopup({
1100
1134
  ...e.location,
1101
- row: r,
1102
- col: o
1135
+ row: i,
1136
+ col: o,
1137
+ editPermission: c,
1138
+ copyPermission: m
1103
1139
  });
1104
1140
  })
1105
1141
  );
1106
1142
  }
1107
1143
  };
1108
- Se = jr([
1109
- N($.Rendered, Se),
1110
- Ve(0, m(pn)),
1111
- Ve(1, m(H)),
1112
- Ve(2, m(nt))
1113
- ], Se);
1114
- const Hr = (e) => ({
1144
+ Ie = Vr([
1145
+ N($.Rendered, Ie),
1146
+ se(0, h(Sn)),
1147
+ se(1, h(H)),
1148
+ se(2, h(nt)),
1149
+ se(3, h(tn)),
1150
+ se(4, h(Pt))
1151
+ ], Ie);
1152
+ const Dr = (e) => ({
1115
1153
  id: ot.id,
1116
- type: Et.BUTTON,
1117
- positions: [Mt.CONTEXT_MENU],
1154
+ type: Mt.BUTTON,
1155
+ positions: [xt.CONTEXT_MENU],
1118
1156
  title: "hyperLink.menu.add",
1119
- hidden$: xt(e, E.UNIVER_SHEET),
1157
+ hidden$: Tt(e, w.UNIVER_SHEET),
1120
1158
  icon: "LinkSingle",
1121
- disabled$: Rt(e, { workbookTypes: [Xe], worksheetTypes: [Je, Qe, et], rangeTypes: [tt] })
1122
- }), Nr = (e) => ({
1159
+ disabled$: bt(e, { workbookTypes: [He], worksheetTypes: [Ne, tt, $e], rangeTypes: [Ae] })
1160
+ }), Wr = (e) => ({
1123
1161
  tooltip: "hyperLink.form.addTitle",
1124
- positions: Mt.TOOLBAR_START,
1125
- group: xn.TOOLBAR_OTHERS,
1162
+ positions: xt.TOOLBAR_START,
1163
+ group: $n.TOOLBAR_OTHERS,
1126
1164
  id: st.id,
1127
- type: Et.BUTTON,
1165
+ type: Mt.BUTTON,
1128
1166
  icon: "LinkSingle",
1129
- hidden$: xt(e, E.UNIVER_SHEET),
1130
- disabled$: Rt(e, { workbookTypes: [Xe], worksheetTypes: [Je, Qe, et], rangeTypes: [tt] })
1131
- }), Vt = {
1167
+ hidden$: Tt(e, w.UNIVER_SHEET),
1168
+ disabled$: bt(e, { workbookTypes: [He], worksheetTypes: [Ne, tt, $e], rangeTypes: [Ae] })
1169
+ }), Wt = {
1132
1170
  id: st.id,
1133
- binding: En.K | Mn.CTRL_COMMAND,
1134
- preconditions: hn
1171
+ binding: Hn.K | Nn.CTRL_COMMAND,
1172
+ preconditions: Ln
1135
1173
  };
1136
- var $r = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, Br = (e, t, n, i) => {
1137
- for (var r = i > 1 ? void 0 : i ? Ar(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1138
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1139
- return i && r && $r(t, n, r), r;
1140
- }, J = (e, t) => (n, i) => t(n, i, e);
1141
- let ae = class extends O {
1142
- constructor(e, t, n, i, r, o, s) {
1143
- super(), this._config = e, this._componentManager = t, this._commandService = n, this._localeService = i, this._menuService = r, this._injector = o, this._shortcutService = s, this._initComponents(), this._initCommands(), this._initMenus(), this._initShortCut();
1174
+ var Fr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, zr = (e, t, n, r) => {
1175
+ for (var i = r > 1 ? void 0 : r ? Zr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1176
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1177
+ return r && i && Fr(t, n, i), i;
1178
+ }, J = (e, t) => (n, r) => t(n, r, e);
1179
+ let ce = class extends O {
1180
+ constructor(e, t, n, r, i, o, s) {
1181
+ 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();
1144
1182
  }
1145
1183
  _initComponents() {
1146
1184
  [
1185
+ [Te, Te.componentKey],
1147
1186
  [Me, Me.componentKey],
1148
- [we, we.componentKey],
1149
- [Oe, "LinkSingle"]
1187
+ [Ee, "LinkSingle"]
1150
1188
  ].forEach(([e, t]) => {
1151
1189
  this._componentManager.register(t, e);
1152
1190
  });
@@ -1154,7 +1192,7 @@ let ae = class extends O {
1154
1192
  _initCommands() {
1155
1193
  [
1156
1194
  it,
1157
- Ee,
1195
+ xe,
1158
1196
  ot,
1159
1197
  st
1160
1198
  ].forEach((e) => {
@@ -1162,52 +1200,52 @@ let ae = class extends O {
1162
1200
  });
1163
1201
  }
1164
1202
  _initMenus() {
1165
- var e, t, n, i;
1166
- this._menuService.addMenuItem(Hr(this._injector), (t = (e = this._config) == null ? void 0 : e.menu) != null ? t : {}), this._menuService.addMenuItem(Nr(this._injector), (i = (n = this._config) == null ? void 0 : n.menu) != null ? i : {});
1203
+ var e, t, n, r;
1204
+ this._menuService.addMenuItem(Dr(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 : {});
1167
1205
  }
1168
1206
  _initShortCut() {
1169
- this._shortcutService.registerShortcut(Vt);
1207
+ this._shortcutService.registerShortcut(Wt);
1170
1208
  }
1171
1209
  };
1172
- ae = Br([
1173
- N($.Ready, ae),
1174
- J(1, m(Tn)),
1175
- J(2, W),
1176
- J(3, m(ue)),
1177
- J(4, jn),
1178
- J(5, m(Ue)),
1179
- J(6, m(Un))
1180
- ], ae);
1210
+ ce = zr([
1211
+ N($.Ready, ce),
1212
+ J(1, h(An)),
1213
+ J(2, F),
1214
+ J(3, h(pe)),
1215
+ J(4, Vn),
1216
+ J(5, h(Be)),
1217
+ J(6, h(Bn))
1218
+ ], ce);
1181
1219
  const at = "SHEET_HYPER_LINK_UI_PLUGIN";
1182
- var Dr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, Fr = (e, t, n, i) => {
1183
- for (var r = i > 1 ? void 0 : i ? Vr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1184
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1185
- return i && r && Dr(t, n, r), r;
1186
- }, vt = (e, t) => (n, i) => t(n, i, e);
1187
- let Le = class extends O {
1220
+ var Kr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Gr = (e, t, n, r) => {
1221
+ for (var i = r > 1 ? void 0 : r ? Yr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1222
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1223
+ return r && i && Kr(t, n, i), i;
1224
+ }, ft = (e, t) => (n, r) => t(n, r, e);
1225
+ let ke = class extends O {
1188
1226
  constructor(e, t) {
1189
1227
  super(), this._autoFillService = e, this._hyperLinkModel = t, this._initAutoFill();
1190
1228
  }
1191
1229
  // eslint-disable-next-line max-lines-per-function
1192
1230
  _initAutoFill() {
1193
- const e = () => ({ redos: [], undos: [] }), t = (i, r) => {
1194
- const { source: o, target: s, unitId: c, subUnitId: a } = i, p = ze([o, s]), [h, f] = p.ranges, { mapFunc: l } = p, g = {
1195
- row: h.startRow,
1196
- col: h.startColumn
1197
- }, S = gn(h, f), v = [], I = [];
1198
- return S.forEach((D) => {
1199
- const C = D.repeatStartCell, Y = D.relativeRange, A = {
1231
+ const e = () => ({ redos: [], undos: [] }), t = (r, i) => {
1232
+ const { source: o, target: s, unitId: c, subUnitId: a } = r, p = qe([o, s]), [m, f] = p.ranges, { mapFunc: l } = p, g = {
1233
+ row: m.startRow,
1234
+ col: m.startColumn
1235
+ }, S = kn(m, f), v = [], I = [];
1236
+ return S.forEach((V) => {
1237
+ const y = V.repeatStartCell, Y = V.relativeRange, A = {
1200
1238
  startRow: g.row,
1201
1239
  startColumn: g.col,
1202
1240
  endColumn: g.col,
1203
1241
  endRow: g.row
1204
- }, b = {
1205
- startRow: C.row,
1206
- startColumn: C.col,
1207
- endColumn: C.col,
1208
- endRow: C.row
1242
+ }, P = {
1243
+ startRow: y.row,
1244
+ startColumn: y.col,
1245
+ endColumn: y.col,
1246
+ endRow: y.row
1209
1247
  };
1210
- Ge.foreach(Y, (G, B) => {
1248
+ Qe.foreach(Y, (G, B) => {
1211
1249
  const q = ee.getPositionRange(
1212
1250
  {
1213
1251
  startRow: G,
@@ -1216,8 +1254,8 @@ let Le = class extends O {
1216
1254
  endRow: G
1217
1255
  },
1218
1256
  A
1219
- ), { row: pe, col: He } = l(q.startRow, q.startColumn), he = this._hyperLinkModel.getHyperLinkByLocation(c, a, pe, He);
1220
- if (he) {
1257
+ ), { row: he, col: De } = l(q.startRow, q.startColumn), me = this._hyperLinkModel.getHyperLinkByLocation(c, a, he, De);
1258
+ if (me) {
1221
1259
  const te = ee.getPositionRange(
1222
1260
  {
1223
1261
  startRow: G,
@@ -1225,25 +1263,25 @@ let Le = class extends O {
1225
1263
  endColumn: B,
1226
1264
  endRow: G
1227
1265
  },
1228
- b
1229
- ), { row: d, col: _ } = l(te.startRow, te.startColumn), L = ce.generateRandomId(), y = this._hyperLinkModel.getHyperLinkByLocation(c, a, d, _);
1230
- y && v.push({
1266
+ P
1267
+ ), { row: u, col: C } = l(te.startRow, te.startColumn), L = le.generateRandomId(), _ = this._hyperLinkModel.getHyperLinkByLocation(c, a, u, C);
1268
+ _ && v.push({
1231
1269
  id: M.id,
1232
1270
  params: {
1233
1271
  unitId: c,
1234
1272
  subUnitId: a,
1235
- id: y.id
1273
+ id: _.id
1236
1274
  }
1237
- }), (ne.COPY === r || ne.SERIES === r) && (v.push({
1275
+ }), (ne.COPY === i || ne.SERIES === i) && (v.push({
1238
1276
  id: x.id,
1239
1277
  params: {
1240
1278
  unitId: c,
1241
1279
  subUnitId: a,
1242
1280
  link: {
1243
- ...he,
1281
+ ...me,
1244
1282
  id: L,
1245
- row: d,
1246
- column: _
1283
+ row: u,
1284
+ column: C
1247
1285
  }
1248
1286
  }
1249
1287
  }), I.push({
@@ -1253,12 +1291,12 @@ let Le = class extends O {
1253
1291
  subUnitId: a,
1254
1292
  id: L
1255
1293
  }
1256
- })), y && I.push({
1294
+ })), _ && I.push({
1257
1295
  id: x.id,
1258
1296
  params: {
1259
1297
  unitId: c,
1260
1298
  subUnitId: a,
1261
- link: y
1299
+ link: _
1262
1300
  }
1263
1301
  });
1264
1302
  }
@@ -1269,39 +1307,39 @@ let Le = class extends O {
1269
1307
  };
1270
1308
  }, n = {
1271
1309
  id: at,
1272
- onFillData: (i, r, o) => o === ne.COPY || o === ne.ONLY_FORMAT || o === ne.SERIES ? t(i, o) : e()
1310
+ onFillData: (r, i, o) => o === ne.COPY || o === ne.ONLY_FORMAT || o === ne.SERIES ? t(r, o) : e()
1273
1311
  };
1274
1312
  this.disposeWithMe(this._autoFillService.addHook(n));
1275
1313
  }
1276
1314
  };
1277
- Le = Fr([
1278
- N($.Ready, Le),
1279
- vt(0, mn),
1280
- vt(1, m(T))
1281
- ], Le);
1282
- var Wr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, zr = (e, t, n, i) => {
1283
- for (var r = i > 1 ? void 0 : i ? Zr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1284
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1285
- return i && r && Wr(t, n, r), r;
1286
- }, fe = (e, t) => (n, i) => t(n, i, e);
1287
- let Ie = class extends O {
1288
- constructor(t, n, i, r) {
1315
+ ke = Gr([
1316
+ N($.Ready, ke),
1317
+ ft(0, In),
1318
+ ft(1, h(T))
1319
+ ], ke);
1320
+ var qr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, Jr = (e, t, n, r) => {
1321
+ for (var i = r > 1 ? void 0 : r ? Xr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1322
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1323
+ return r && i && qr(t, n, i), i;
1324
+ }, _e = (e, t) => (n, r) => t(n, r, e);
1325
+ let Pe = class extends O {
1326
+ constructor(t, n, r, i) {
1289
1327
  super();
1290
- V(this, "_copyInfo");
1291
- this._sheetClipboardService = t, this._hyperLinkModel = n, this._injector = i, this._resolverService = r, this._initCopyPaste();
1328
+ D(this, "_copyInfo");
1329
+ this._sheetClipboardService = t, this._hyperLinkModel = n, this._injector = r, this._resolverService = i, this._initCopyPaste();
1292
1330
  }
1293
1331
  _initCopyPaste() {
1294
1332
  this._sheetClipboardService.addClipboardHook({
1295
1333
  id: at,
1296
- onBeforeCopy: (t, n, i) => this._collect(t, n, i),
1297
- onPasteCells: (t, n, i, r) => {
1298
- const { copyType: o = pt.COPY, pasteType: s } = r, { range: c } = t || {}, { range: a, unitId: p, subUnitId: h } = n;
1299
- return this._generateMutations(a, { copyType: o, pasteType: s, copyRange: c, unitId: p, subUnitId: h });
1334
+ onBeforeCopy: (t, n, r) => this._collect(t, n, r),
1335
+ onPasteCells: (t, n, r, i) => {
1336
+ const { copyType: o = ut.COPY, pasteType: s } = i, { range: c } = t || {}, { range: a, unitId: p, subUnitId: m } = n;
1337
+ return this._generateMutations(a, { copyType: o, pasteType: s, copyRange: c, unitId: p, subUnitId: m });
1300
1338
  },
1301
1339
  onPastePlainText: (t, n) => {
1302
- if (le(n)) {
1303
- const i = rt(n), { range: r, unitId: o, subUnitId: s } = t, { ranges: [c], mapFunc: a } = ze([r]), p = [], h = [];
1304
- return Ge.foreach(c, (f, l) => {
1340
+ if (de(n)) {
1341
+ const r = rt(n), { range: i, unitId: o, subUnitId: s } = t, { ranges: [c], mapFunc: a } = qe([i]), p = [], m = [];
1342
+ return Qe.foreach(c, (f, l) => {
1305
1343
  const { row: g, col: S } = a(f, l), v = this._hyperLinkModel.getHyperLinkByLocation(o, s, g, S);
1306
1344
  v && p.push({
1307
1345
  id: M.id,
@@ -1311,7 +1349,7 @@ let Ie = class extends O {
1311
1349
  id: v.id
1312
1350
  }
1313
1351
  });
1314
- const I = ce.generateRandomId();
1352
+ const I = le.generateRandomId();
1315
1353
  p.push({
1316
1354
  id: x.id,
1317
1355
  params: {
@@ -1321,17 +1359,17 @@ let Ie = class extends O {
1321
1359
  id: I,
1322
1360
  row: g,
1323
1361
  column: S,
1324
- payload: i
1362
+ payload: r
1325
1363
  }
1326
1364
  }
1327
- }), h.push({
1365
+ }), m.push({
1328
1366
  id: M.id,
1329
1367
  params: {
1330
1368
  unitId: o,
1331
1369
  subUnitId: s,
1332
1370
  id: I
1333
1371
  }
1334
- }), v && h.push({
1372
+ }), v && m.push({
1335
1373
  id: x.id,
1336
1374
  params: {
1337
1375
  unitId: o,
@@ -1339,30 +1377,30 @@ let Ie = class extends O {
1339
1377
  link: v
1340
1378
  }
1341
1379
  });
1342
- }), { redos: p, undos: h };
1380
+ }), { redos: p, undos: m };
1343
1381
  }
1344
1382
  return { undos: [], redos: [] };
1345
1383
  }
1346
1384
  });
1347
1385
  }
1348
- _collect(t, n, i) {
1349
- const r = new yt();
1386
+ _collect(t, n, r) {
1387
+ const i = new _t();
1350
1388
  this._copyInfo = {
1351
1389
  unitId: t,
1352
1390
  subUnitId: n,
1353
- matrix: r
1391
+ matrix: i
1354
1392
  };
1355
1393
  const o = {
1356
1394
  get: this._injector.get.bind(this._injector)
1357
- }, s = fn(i, o, t, n);
1395
+ }, s = Pn(r, o, t, n);
1358
1396
  if (!s)
1359
1397
  return;
1360
1398
  const { rows: c, cols: a } = s;
1361
- c.forEach((p, h) => {
1399
+ c.forEach((p, m) => {
1362
1400
  a.forEach((f, l) => {
1363
1401
  var S;
1364
1402
  const g = this._hyperLinkModel.getHyperLinkByLocation(t, n, p, f);
1365
- r.setValue(h, l, (S = g == null ? void 0 : g.id) != null ? S : "");
1403
+ i.setValue(m, l, (S = g == null ? void 0 : g.id) != null ? S : "");
1366
1404
  });
1367
1405
  });
1368
1406
  }
@@ -1370,21 +1408,21 @@ let Ie = class extends O {
1370
1408
  _generateMutations(t, n) {
1371
1409
  if (!this._copyInfo)
1372
1410
  return { redos: [], undos: [] };
1373
- if (n.copyType === pt.CUT)
1411
+ if (n.copyType === ut.CUT)
1374
1412
  return this._copyInfo = null, { redos: [], undos: [] };
1375
1413
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
1376
1414
  return { redos: [], undos: [] };
1377
1415
  if ([
1378
- $e.SPECIAL_PASTE_COL_WIDTH,
1379
- $e.SPECIAL_PASTE_VALUE,
1380
- $e.SPECIAL_PASTE_FORMAT,
1381
- $n
1416
+ Fe.SPECIAL_PASTE_COL_WIDTH,
1417
+ Fe.SPECIAL_PASTE_VALUE,
1418
+ Fe.SPECIAL_PASTE_FORMAT,
1419
+ Fn
1382
1420
  ].includes(
1383
1421
  n.pasteType
1384
1422
  ))
1385
1423
  return { redos: [], undos: [] };
1386
- const { unitId: i, subUnitId: r } = this._copyInfo, o = [], s = [], { ranges: [c, a], mapFunc: p } = ze([n.copyRange, t]);
1387
- return vn(c, a, !0).forEach(({ startRange: f }) => {
1424
+ const { unitId: r, subUnitId: i } = this._copyInfo, o = [], s = [], { ranges: [c, a], mapFunc: p } = qe([n.copyRange, t]);
1425
+ return bn(c, a, !0).forEach(({ startRange: f }) => {
1388
1426
  var l;
1389
1427
  (l = this._copyInfo) == null || l.matrix.forValue((g, S, v) => {
1390
1428
  const I = ee.getPositionRange(
@@ -1395,7 +1433,7 @@ let Ie = class extends O {
1395
1433
  endColumn: S
1396
1434
  },
1397
1435
  f
1398
- ), D = this._hyperLinkModel.getHyperLink(i, r, v), { row: C, col: Y } = p(I.startRow, I.startColumn), A = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, C, Y), b = ce.generateRandomId();
1436
+ ), V = this._hyperLinkModel.getHyperLink(r, i, v), { row: y, col: Y } = p(I.startRow, I.startColumn), A = this._hyperLinkModel.getHyperLinkByLocation(n.unitId, n.subUnitId, y, Y), P = le.generateRandomId();
1399
1437
  A && o.push({
1400
1438
  id: M.id,
1401
1439
  params: {
@@ -1403,15 +1441,15 @@ let Ie = class extends O {
1403
1441
  subUnitId: n.subUnitId,
1404
1442
  id: A.id
1405
1443
  }
1406
- }), D && (o.push({
1444
+ }), V && (o.push({
1407
1445
  id: x.id,
1408
1446
  params: {
1409
1447
  unitId: n.unitId,
1410
1448
  subUnitId: n.subUnitId,
1411
1449
  link: {
1412
- ...D,
1413
- id: b,
1414
- row: C,
1450
+ ...V,
1451
+ id: P,
1452
+ row: y,
1415
1453
  column: Y
1416
1454
  }
1417
1455
  }
@@ -1420,7 +1458,7 @@ let Ie = class extends O {
1420
1458
  params: {
1421
1459
  unitId: n.unitId,
1422
1460
  subUnitId: n.subUnitId,
1423
- id: b
1461
+ id: P
1424
1462
  }
1425
1463
  })), A && s.push({
1426
1464
  id: x.id,
@@ -1437,19 +1475,19 @@ let Ie = class extends O {
1437
1475
  };
1438
1476
  }
1439
1477
  };
1440
- Ie = zr([
1441
- N($.Ready, Ie),
1442
- fe(0, _n),
1443
- fe(1, m(T)),
1444
- fe(2, m(Ue)),
1445
- fe(3, m(F))
1446
- ], Ie);
1447
- var Kr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Gr = (e, t, n, i) => {
1448
- for (var r = i > 1 ? void 0 : i ? Yr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1449
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1450
- return i && r && Kr(t, n, r), r;
1451
- }, qr = (e, t) => (n, i) => t(n, i, e);
1452
- let ke = class extends O {
1478
+ Pe = Jr([
1479
+ N($.Ready, Pe),
1480
+ _e(0, Rn),
1481
+ _e(1, h(T)),
1482
+ _e(2, h(Be)),
1483
+ _e(3, h(W))
1484
+ ], Pe);
1485
+ var Qr = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (e, t, n, r) => {
1486
+ for (var i = r > 1 ? void 0 : r ? ei(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1487
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1488
+ return r && i && Qr(t, n, i), i;
1489
+ }, ni = (e, t) => (n, r) => t(n, r, e);
1490
+ let be = class extends O {
1453
1491
  constructor(e) {
1454
1492
  super(), this._resolverService = e, this._handleInitUrl();
1455
1493
  }
@@ -1458,89 +1496,89 @@ let ke = class extends O {
1458
1496
  e && this._resolverService.parseHyperLink(e).handler();
1459
1497
  }
1460
1498
  };
1461
- ke = Gr([
1462
- N($.Rendered, ke),
1463
- qr(0, m(F))
1464
- ], ke);
1465
- var Xr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Qr = (e, t, n, i) => {
1466
- for (var r = i > 1 ? void 0 : i ? Jr(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1467
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1468
- return i && r && Xr(t, n, r), r;
1469
- }, Fe = (e, t) => (n, i) => t(n, i, e);
1470
- let be = class extends O {
1499
+ be = ti([
1500
+ N($.Rendered, be),
1501
+ ni(0, h(W))
1502
+ ], be);
1503
+ var ri = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, oi = (e, t, n, r) => {
1504
+ for (var i = r > 1 ? void 0 : r ? ii(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1505
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1506
+ return r && i && ri(t, n, i), i;
1507
+ }, Ke = (e, t) => (n, r) => t(n, r, e);
1508
+ let Re = class extends O {
1471
1509
  constructor(e, t, n) {
1472
1510
  super(), this._localeService = e, this._commandService = t, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
1473
1511
  }
1474
1512
  _commandExecutedListener() {
1475
1513
  this.disposeWithMe(
1476
1514
  this._commandService.beforeCommandExecuted((e) => {
1477
- e.id === Vt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1478
- workbookTypes: [Xe],
1479
- rangeTypes: [tt],
1480
- worksheetTypes: [Je, Qe, et]
1515
+ e.id === Wt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1516
+ workbookTypes: [He],
1517
+ rangeTypes: [Ae],
1518
+ worksheetTypes: [Ne, tt, $e]
1481
1519
  }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.hyperLinkErr")));
1482
1520
  })
1483
1521
  );
1484
1522
  }
1485
1523
  };
1486
- be = Qr([
1487
- N($.Rendered, be),
1488
- Fe(0, m(ue)),
1489
- Fe(1, W),
1490
- Fe(2, m(yn))
1491
- ], be);
1492
- var Ft = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (e, t, n) => t in e ? Ft(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ni = (e, t, n, i) => {
1493
- for (var r = i > 1 ? void 0 : i ? ei(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1494
- (s = e[o]) && (r = (i ? s(t, n, r) : s(r)) || r);
1495
- return i && r && Ft(t, n, r), r;
1496
- }, _t = (e, t) => (n, i) => t(n, i, e), Wt = (e, t, n) => (ti(e, typeof t != "symbol" ? t + "" : t, n), n);
1497
- let xe = class extends Qt {
1524
+ Re = oi([
1525
+ N($.Rendered, Re),
1526
+ Ke(0, h(pe)),
1527
+ Ke(1, F),
1528
+ Ke(2, h(Pt))
1529
+ ], Re);
1530
+ 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) => {
1531
+ for (var i = r > 1 ? void 0 : r ? si(t, n) : t, o = e.length - 1, s; o >= 0; o--)
1532
+ (s = e[o]) && (i = (r ? s(t, n, i) : s(i)) || i);
1533
+ return r && i && Ft(t, n, i), i;
1534
+ }, vt = (e, t) => (n, r) => t(n, r, e), Zt = (e, t, n) => ai(e, typeof t != "symbol" ? t + "" : t, n);
1535
+ let Ue = class extends nn {
1498
1536
  constructor(e, t, n) {
1499
1537
  super(), this._config = e, this._injector = t, this._renderManagerService = n;
1500
1538
  }
1501
1539
  onStarting(e) {
1502
1540
  [
1503
- [F],
1541
+ [W],
1504
1542
  [H],
1505
- [ve],
1506
- [_e],
1507
1543
  [Ce],
1508
- [Se],
1544
+ [ye],
1545
+ [Le],
1546
+ [Ie],
1509
1547
  [
1510
- ae,
1548
+ ce,
1511
1549
  {
1512
- useFactory: () => this._injector.createInstance(ae, this._config)
1550
+ useFactory: () => this._injector.createInstance(ce, this._config)
1513
1551
  }
1514
1552
  ],
1515
- [Le],
1516
- [Ie],
1517
- [be],
1518
- [ke]
1519
- ].forEach((n) => e.add(n)), this._renderManagerService.registerRenderController(E.UNIVER_SHEET, Ke);
1553
+ [ke],
1554
+ [Pe],
1555
+ [Re],
1556
+ [be]
1557
+ ].forEach((n) => e.add(n)), this._renderManagerService.registerRenderController(w.UNIVER_SHEET, Xe);
1520
1558
  }
1521
1559
  };
1522
- Wt(xe, "pluginName", at);
1523
- Wt(xe, "type", E.UNIVER_SHEET);
1524
- xe = ni([
1525
- en(dn),
1526
- _t(1, m(Ue)),
1527
- _t(2, nt)
1528
- ], xe);
1560
+ Zt(Ue, "pluginName", at);
1561
+ Zt(Ue, "type", w.UNIVER_SHEET);
1562
+ Ue = ci([
1563
+ rn(Cn),
1564
+ vt(1, h(Be)),
1565
+ vt(2, nt)
1566
+ ], Ue);
1529
1567
  export {
1530
- Ee as CloseHyperLinkSidebarOperation,
1568
+ xe as CloseHyperLinkSidebarOperation,
1531
1569
  ot as InsertHyperLinkOperation,
1532
- Vt as InsertLinkShortcut,
1570
+ Wt as InsertLinkShortcut,
1533
1571
  it as OpenHyperLinkSidebarOperation,
1534
- Ce as SheetHyperLinkSetRangeController,
1535
- ke as SheetHyperLinkUrlController,
1536
- Le as SheetsHyperLinkAutoFillController,
1537
- Ie as SheetsHyperLinkCopyPasteController,
1538
- Se as SheetsHyperLinkPopupController,
1572
+ Le as SheetHyperLinkSetRangeController,
1573
+ be as SheetHyperLinkUrlController,
1574
+ ke as SheetsHyperLinkAutoFillController,
1575
+ Pe as SheetsHyperLinkCopyPasteController,
1576
+ Ie as SheetsHyperLinkPopupController,
1539
1577
  H as SheetsHyperLinkPopupService,
1540
- ve as SheetsHyperLinkRemoveSheetController,
1541
- Ke as SheetsHyperLinkRenderController,
1542
- _e as SheetsHyperLinkRenderManagerController,
1543
- F as SheetsHyperLinkResolverService,
1544
- ae as SheetsHyperLinkUIController,
1545
- xe as UniverSheetsHyperLinkUIPlugin
1578
+ Ce as SheetsHyperLinkRemoveSheetController,
1579
+ Xe as SheetsHyperLinkRenderController,
1580
+ ye as SheetsHyperLinkRenderManagerController,
1581
+ W as SheetsHyperLinkResolverService,
1582
+ ce as SheetsHyperLinkUIController,
1583
+ Ue as UniverSheetsHyperLinkUIPlugin
1546
1584
  };