@univerjs/sheets-thread-comment 0.1.13 → 0.1.14

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,140 +1,140 @@
1
- var De = Object.defineProperty;
2
- var Ne = (o, e, n) => e in o ? De(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n;
3
- var _ = (o, e, n) => (Ne(o, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { Inject as h, Injector as le } from "@wendellhu/redi";
5
- import { Inject as bn, Injector as Tn } from "@wendellhu/redi";
6
- import { Disposable as O, ObjectMatrix as je, UniverInstanceType as g, IUniverInstanceService as $, DisposableCollection as Ve, Tools as _e, CommandType as Ae, ICommandService as Q, OnLifecycle as x, LifecycleStages as D, LocaleService as Le, toDisposable as He, Range as Be } from "@univerjs/core";
7
- import { ICommandService as yn, Plugin as Un, UniverInstanceType as On } from "@univerjs/core";
8
- import { ThreadCommentTree as We, ThreadCommentPanelService as ee, ThreadCommentPanel as Fe, ToggleSheetCommentPanelOperation as Ze, SetActiveCommentOperation as re, THREAD_COMMENT_PANEL as ke, UniverThreadCommentUIPlugin as ze } from "@univerjs/thread-comment-ui";
9
- import { IThreadCommentMentionDataService as En, UniverThreadCommentUIPlugin as $n } from "@univerjs/thread-comment-ui";
10
- import { IZenZoneService as Ge, useObservable as oe, KeyCode as Ke, MetaKeys as ie, MenuItemType as ve, MenuPosition as fe, getMenuHiddenObservable as Ce, MenuGroup as Ye, ComponentManager as qe, IMenuService as Xe, IShortcutService as Je } from "@univerjs/ui";
11
- import { SelectionManagerService as Qe, getSheetCommandTarget as et, WorkbookCommentPermission as ge, WorksheetViewPermission as Se, RangeProtectionPermissionEditPoint as Ie, SetSelectionsOperation as tt, SelectionMoveType as nt, SetWorksheetActiveOperation as rt, RefRangeService as ot, handleDefaultRangeChangeWithEffectRefCommands as it, SheetInterceptorService as Me, INTERCEPTOR_POINT as st, RemoveSheetCommand as at } from "@univerjs/sheets";
1
+ var Ne = Object.defineProperty;
2
+ var je = (o, e, t) => e in o ? Ne(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var v = (o, e, t) => (je(o, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { Inject as h, Injector as pe } from "@wendellhu/redi";
5
+ import { Inject as yn, Injector as Un } from "@wendellhu/redi";
6
+ import { Disposable as O, ObjectMatrix as Ve, UniverInstanceType as g, IUniverInstanceService as $, DisposableCollection as Ae, Tools as le, CommandType as Le, ICommandService as Q, OnLifecycle as x, LifecycleStages as D, LocaleService as He, toDisposable as Be, Range as We, DependentOn as Fe, Plugin as Ze } from "@univerjs/core";
7
+ import { ICommandService as Rn, Plugin as En, UniverInstanceType as $n } from "@univerjs/core";
8
+ import { ThreadCommentTree as ze, ThreadCommentPanelService as ee, ThreadCommentPanel as ke, ToggleSheetCommentPanelOperation as Ge, SetActiveCommentOperation as re, THREAD_COMMENT_PANEL as Ke, UniverThreadCommentUIPlugin as Ye } from "@univerjs/thread-comment-ui";
9
+ import { IThreadCommentMentionDataService as Dn, UniverThreadCommentUIPlugin as Nn } from "@univerjs/thread-comment-ui";
10
+ import { IZenZoneService as qe, useObservable as oe, KeyCode as Xe, MetaKeys as ie, MenuItemType as _e, MenuPosition as ve, getMenuHiddenObservable as fe, MenuGroup as Je, ComponentManager as Qe, IMenuService as et, IShortcutService as tt } from "@univerjs/ui";
11
+ import { SelectionManagerService as nt, getSheetCommandTarget as rt, WorkbookCommentPermission as Ce, WorksheetViewPermission as ge, RangeProtectionPermissionEditPoint as Se, SetSelectionsOperation as ot, SelectionMoveType as it, SetWorksheetActiveOperation as st, RefRangeService as at, handleDefaultRangeChangeWithEffectRefCommands as ct, SheetInterceptorService as Ie, INTERCEPTOR_POINT as dt, RemoveSheetCommand as mt } from "@univerjs/sheets";
12
12
  import { singleReferenceToGrid as y, serializeRange as J } from "@univerjs/engine-formula";
13
- import { SheetCanvasPopManagerService as ct, IMarkSelectionService as dt, whenSheetEditorFocused as mt, getCommentDisable$ as Pe, ScrollToCellCommand as ut, SheetSkeletonManagerService as ht, ISheetClipboardService as pt, COPY_TYPE as lt, HoverManagerService as _t } from "@univerjs/sheets-ui";
14
- import { ThreadCommentModel as G, DeleteCommentMutation as V, AddCommentMutation as z, UpdateCommentRefMutation as se } from "@univerjs/thread-comment";
15
- import { IThreadCommentDataSourceService as Dn } from "@univerjs/thread-comment";
13
+ import { SheetCanvasPopManagerService as ut, IMarkSelectionService as ht, whenSheetEditorFocused as pt, getCurrentRangeDisable$ as Pe, ScrollToCellCommand as lt, SheetSkeletonManagerService as _t, ISheetClipboardService as vt, COPY_TYPE as ft, HoverManagerService as Ct } from "@univerjs/sheets-ui";
14
+ import { ThreadCommentModel as G, DeleteCommentMutation as j, AddCommentMutation as z, UpdateCommentRefMutation as se } from "@univerjs/thread-comment";
15
+ import { IThreadCommentDataSourceService as Vn } from "@univerjs/thread-comment";
16
16
  import { useDependency as w, useObservable as ae } from "@wendellhu/redi/react-bindings";
17
- import be, { forwardRef as Te, useRef as we, createElement as ye, useMemo as vt, useCallback as ce, useEffect as ft } from "react";
18
- import { Subject as Ct, BehaviorSubject as gt, map as St, debounceTime as It } from "rxjs";
19
- import { IRenderManagerService as Mt } from "@univerjs/engine-render";
17
+ import Me, { forwardRef as be, useRef as Te, createElement as we, useMemo as gt, useCallback as ce, useEffect as St } from "react";
18
+ import { Subject as It, BehaviorSubject as Pt, map as Mt, debounceTime as bt } from "rxjs";
19
+ import { IRenderManagerService as Tt } from "@univerjs/engine-render";
20
20
  var f = function() {
21
21
  return f = Object.assign || function(o) {
22
- for (var e, n = 1, r = arguments.length; n < r; n++) {
23
- e = arguments[n];
24
- for (var t in e)
25
- Object.prototype.hasOwnProperty.call(e, t) && (o[t] = e[t]);
22
+ for (var e, t = 1, r = arguments.length; t < r; t++) {
23
+ e = arguments[t];
24
+ for (var n in e)
25
+ Object.prototype.hasOwnProperty.call(e, n) && (o[n] = e[n]);
26
26
  }
27
27
  return o;
28
28
  }, f.apply(this, arguments);
29
- }, Pt = function(o, e) {
30
- var n = {};
29
+ }, wt = function(o, e) {
30
+ var t = {};
31
31
  for (var r in o)
32
- Object.prototype.hasOwnProperty.call(o, r) && e.indexOf(r) < 0 && (n[r] = o[r]);
32
+ Object.prototype.hasOwnProperty.call(o, r) && e.indexOf(r) < 0 && (t[r] = o[r]);
33
33
  if (o != null && typeof Object.getOwnPropertySymbols == "function")
34
- for (var t = 0, r = Object.getOwnPropertySymbols(o); t < r.length; t++)
35
- e.indexOf(r[t]) < 0 && Object.prototype.propertyIsEnumerable.call(o, r[t]) && (n[r[t]] = o[r[t]]);
36
- return n;
37
- }, Ue = Te(function(o, e) {
38
- var n = o.icon, r = o.id, t = o.className, i = o.extend, s = Pt(o, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(r, " ").concat(t || "").trim(), c = we("_".concat(wt()));
39
- return Oe(n, "".concat(r), { defIds: n.defIds, idSuffix: c.current }, f({ ref: e, className: a }, s), i);
34
+ for (var n = 0, r = Object.getOwnPropertySymbols(o); n < r.length; n++)
35
+ e.indexOf(r[n]) < 0 && Object.prototype.propertyIsEnumerable.call(o, r[n]) && (t[r[n]] = o[r[n]]);
36
+ return t;
37
+ }, ye = be(function(o, e) {
38
+ var t = o.icon, r = o.id, n = o.className, i = o.extend, s = wt(o, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(r, " ").concat(n || "").trim(), c = Te("_".concat(Ot()));
39
+ return Ue(t, "".concat(r), { defIds: t.defIds, idSuffix: c.current }, f({ ref: e, className: a }, s), i);
40
40
  });
41
- function Oe(o, e, n, r, t) {
42
- return ye(o.tag, f(f({ key: e }, bt(o, n, t)), r), (Tt(o, n).children || []).map(function(i, s) {
43
- return Oe(i, "".concat(e, "-").concat(o.tag, "-").concat(s), n, void 0, t);
41
+ function Ue(o, e, t, r, n) {
42
+ return we(o.tag, f(f({ key: e }, yt(o, t, n)), r), (Ut(o, t).children || []).map(function(i, s) {
43
+ return Ue(i, "".concat(e, "-").concat(o.tag, "-").concat(s), t, void 0, n);
44
44
  }));
45
45
  }
46
- function bt(o, e, n) {
46
+ function yt(o, e, t) {
47
47
  var r = f({}, o.attrs);
48
- n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1);
49
- var t = e.defIds;
50
- return !t || t.length === 0 || (o.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(function(i) {
48
+ t != null && t.colorChannel1 && r.fill === "colorChannel1" && (r.fill = t.colorChannel1);
49
+ var n = e.defIds;
50
+ return !n || n.length === 0 || (o.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(function(i) {
51
51
  var s = i[0], a = i[1];
52
52
  typeof a == "string" && (r[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
53
53
  })), r;
54
54
  }
55
- function Tt(o, e) {
56
- var n, r = e.defIds;
57
- return !r || r.length === 0 ? o : o.tag === "defs" && (!((n = o.children) === null || n === void 0) && n.length) ? f(f({}, o), { children: o.children.map(function(t) {
58
- return typeof t.attrs.id == "string" && r && r.indexOf(t.attrs.id) > -1 ? f(f({}, t), { attrs: f(f({}, t.attrs), { id: t.attrs.id + e.idSuffix }) }) : t;
55
+ function Ut(o, e) {
56
+ var t, r = e.defIds;
57
+ return !r || r.length === 0 ? o : o.tag === "defs" && (!((t = o.children) === null || t === void 0) && t.length) ? f(f({}, o), { children: o.children.map(function(n) {
58
+ return typeof n.attrs.id == "string" && r && r.indexOf(n.attrs.id) > -1 ? f(f({}, n), { attrs: f(f({}, n.attrs), { id: n.attrs.id + e.idSuffix }) }) : n;
59
59
  }) }) : o;
60
60
  }
61
- function wt() {
61
+ function Ot() {
62
62
  return Math.random().toString(36).substring(2, 8);
63
63
  }
64
- Ue.displayName = "UniverIcon";
65
- var yt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Re = Te(function(o, e) {
66
- return ye(Ue, Object.assign({}, o, {
64
+ ye.displayName = "UniverIcon";
65
+ var Rt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Oe = be(function(o, e) {
66
+ return we(ye, Object.assign({}, o, {
67
67
  id: "comment-single",
68
68
  ref: e,
69
- icon: yt
69
+ icon: Rt
70
70
  }));
71
71
  });
72
- Re.displayName = "CommentSingle";
73
- var Ut = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, Rt = (o, e, n, r) => {
74
- for (var t = r > 1 ? void 0 : r ? Ot(e, n) : e, i = o.length - 1, s; i >= 0; i--)
75
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
76
- return r && t && Ut(e, n, t), t;
77
- }, de = (o, e) => (n, r) => e(n, r, o);
72
+ Oe.displayName = "CommentSingle";
73
+ var Et = Object.defineProperty, $t = Object.getOwnPropertyDescriptor, xt = (o, e, t, r) => {
74
+ for (var n = r > 1 ? void 0 : r ? $t(e, t) : e, i = o.length - 1, s; i >= 0; i--)
75
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
76
+ return r && n && Et(e, t, n), n;
77
+ }, de = (o, e) => (t, r) => e(t, r, o);
78
78
  let T = class extends O {
79
- constructor(e, n) {
79
+ constructor(e, t) {
80
80
  super();
81
- _(this, "_matrixMap", /* @__PURE__ */ new Map());
82
- _(this, "_locationMap", /* @__PURE__ */ new Map());
83
- _(this, "_commentUpdate$", new Ct());
84
- _(this, "commentUpdate$", this._commentUpdate$.asObservable());
85
- this._threadCommentModel = e, this._univerInstanceService = n, this._init();
81
+ v(this, "_matrixMap", /* @__PURE__ */ new Map());
82
+ v(this, "_locationMap", /* @__PURE__ */ new Map());
83
+ v(this, "_commentUpdate$", new It());
84
+ v(this, "commentUpdate$", this._commentUpdate$.asObservable());
85
+ this._threadCommentModel = e, this._univerInstanceService = t, this._init();
86
86
  }
87
87
  _init() {
88
88
  this._initData(), this._initUpdateTransform();
89
89
  }
90
- _ensureCommentMatrix(e, n) {
90
+ _ensureCommentMatrix(e, t) {
91
91
  let r = this._matrixMap.get(e);
92
92
  r || (r = /* @__PURE__ */ new Map(), this._matrixMap.set(e, r));
93
- let t = r.get(n);
94
- return t || (t = new je(), r.set(n, t)), t;
93
+ let n = r.get(t);
94
+ return n || (n = new Ve(), r.set(t, n)), n;
95
95
  }
96
- _ensureCommentLocationMap(e, n) {
96
+ _ensureCommentLocationMap(e, t) {
97
97
  let r = this._locationMap.get(e);
98
98
  r || (r = /* @__PURE__ */ new Map(), this._locationMap.set(e, r));
99
- let t = r.get(n);
100
- return t || (t = /* @__PURE__ */ new Map(), r.set(n, t)), t;
99
+ let n = r.get(t);
100
+ return n || (n = /* @__PURE__ */ new Map(), r.set(t, n)), n;
101
101
  }
102
- _ensure(e, n) {
103
- const r = this._ensureCommentMatrix(e, n), t = this._ensureCommentLocationMap(e, n);
104
- return { matrix: r, locationMap: t };
102
+ _ensure(e, t) {
103
+ const r = this._ensureCommentMatrix(e, t), n = this._ensureCommentLocationMap(e, t);
104
+ return { matrix: r, locationMap: n };
105
105
  }
106
106
  _initData() {
107
107
  const e = this._threadCommentModel.getAll();
108
- for (const n in e) {
109
- const r = e[n];
110
- for (const t in r) {
111
- const i = r[t];
108
+ for (const t in e) {
109
+ const r = e[t];
110
+ for (const n in r) {
111
+ const i = r[n];
112
112
  for (const s in i) {
113
113
  const a = i[s];
114
- this._addComment(n, t, a);
114
+ this._addComment(t, n, a);
115
115
  }
116
116
  }
117
117
  }
118
118
  }
119
- _addComment(e, n, r) {
120
- const t = y(r.ref), i = r.parentId, { row: s, column: a } = t, c = r.id, { matrix: d, locationMap: u } = this._ensure(e, n);
119
+ _addComment(e, t, r) {
120
+ const n = y(r.ref), i = r.parentId, { row: s, column: a } = n, c = r.id, { matrix: d, locationMap: u } = this._ensure(e, t);
121
121
  !i && s >= 0 && a >= 0 && (d.setValue(s, a, c), u.set(c, { row: s, column: a })), this._commentUpdate$.next({
122
122
  unitId: e,
123
- subUnitId: n,
123
+ subUnitId: t,
124
124
  payload: r,
125
125
  type: "add",
126
- ...t
126
+ ...n
127
127
  });
128
128
  }
129
129
  _initUpdateTransform() {
130
130
  this.disposeWithMe(this._threadCommentModel.commentUpdate$.subscribe((e) => {
131
- const { unitId: n, subUnitId: r } = e;
131
+ const { unitId: t, subUnitId: r } = e;
132
132
  try {
133
- if (this._univerInstanceService.getUnitType(n) !== g.UNIVER_SHEET)
133
+ if (this._univerInstanceService.getUnitType(t) !== g.UNIVER_SHEET)
134
134
  return;
135
135
  } catch {
136
136
  }
137
- const { matrix: t, locationMap: i } = this._ensure(n, r);
137
+ const { matrix: n, locationMap: i } = this._ensure(t, r);
138
138
  switch (e.type) {
139
139
  case "add": {
140
140
  this._addComment(e.unitId, e.subUnitId, e.payload);
@@ -144,7 +144,7 @@ let T = class extends O {
144
144
  const { isRoot: s, comment: a } = e.payload, c = y(a.ref);
145
145
  if (s) {
146
146
  const { row: d, column: u } = c;
147
- d >= 0 && u >= 0 && t.realDeleteValue(d, u);
147
+ d >= 0 && u >= 0 && n.realDeleteValue(d, u);
148
148
  }
149
149
  this._commentUpdate$.next({
150
150
  ...e,
@@ -153,7 +153,7 @@ let T = class extends O {
153
153
  break;
154
154
  }
155
155
  case "update": {
156
- const { commentId: s } = e.payload, a = this._threadCommentModel.getComment(n, r, s);
156
+ const { commentId: s } = e.payload, a = this._threadCommentModel.getComment(t, r, s);
157
157
  if (!a)
158
158
  return;
159
159
  const c = y(a.ref);
@@ -168,7 +168,7 @@ let T = class extends O {
168
168
  if (!c)
169
169
  return;
170
170
  const { row: d, column: u } = c;
171
- t.getValue(d, u) === a && (t.realDeleteValue(d, u), i.delete(a)), s.row >= 0 && s.column >= 0 && (t.setValue(s.row, s.column, a), i.set(a, { row: s.row, column: s.column })), this._commentUpdate$.next({
171
+ n.getValue(d, u) === a && (n.realDeleteValue(d, u), i.delete(a)), s.row >= 0 && s.column >= 0 && (n.setValue(s.row, s.column, a), i.set(a, { row: s.row, column: s.column })), this._commentUpdate$.next({
172
172
  ...e,
173
173
  ...s
174
174
  });
@@ -177,43 +177,43 @@ let T = class extends O {
177
177
  }
178
178
  }));
179
179
  }
180
- getByLocation(e, n, r, t) {
181
- return this._ensureCommentMatrix(e, n).getValue(r, t);
180
+ getByLocation(e, t, r, n) {
181
+ return this._ensureCommentMatrix(e, t).getValue(r, n);
182
182
  }
183
- getComment(e, n, r) {
184
- return this._threadCommentModel.getComment(e, n, r);
183
+ getComment(e, t, r) {
184
+ return this._threadCommentModel.getComment(e, t, r);
185
185
  }
186
- getCommentWithChildren(e, n, r, t) {
187
- const s = this._ensureCommentMatrix(e, n).getValue(r, t);
186
+ getCommentWithChildren(e, t, r, n) {
187
+ const s = this._ensureCommentMatrix(e, t).getValue(r, n);
188
188
  if (s)
189
- return this._threadCommentModel.getCommentWithChildren(e, n, s);
189
+ return this._threadCommentModel.getCommentWithChildren(e, t, s);
190
190
  }
191
- showCommentMarker(e, n, r, t) {
192
- const i = this.getByLocation(e, n, r, t);
191
+ showCommentMarker(e, t, r, n) {
192
+ const i = this.getByLocation(e, t, r, n);
193
193
  if (!i)
194
194
  return !1;
195
- const s = this.getComment(e, n, i);
195
+ const s = this.getComment(e, t, i);
196
196
  return !!(s && !s.resolved);
197
197
  }
198
198
  };
199
- T = Rt([
199
+ T = xt([
200
200
  de(0, h(G)),
201
201
  de(1, $)
202
202
  ], T);
203
- const Ee = "univer.sheet.thread-comment-modal", te = "comment-single", $e = "univer.sheet.thread-comment";
204
- var Et = Object.defineProperty, $t = Object.getOwnPropertyDescriptor, xt = (o, e, n, r) => {
205
- for (var t = r > 1 ? void 0 : r ? $t(e, n) : e, i = o.length - 1, s; i >= 0; i--)
206
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
207
- return r && t && Et(e, n, t), t;
208
- }, me = (o, e) => (n, r) => e(n, r, o);
203
+ const Re = "univer.sheet.thread-comment-modal", te = "comment-single", Ee = "univer.sheet.thread-comment";
204
+ var Dt = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, jt = (o, e, t, r) => {
205
+ for (var n = r > 1 ? void 0 : r ? Nt(e, t) : e, i = o.length - 1, s; i >= 0; i--)
206
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
207
+ return r && n && Dt(e, t, n), n;
208
+ }, me = (o, e) => (t, r) => e(t, r, o);
209
209
  let U = class extends O {
210
- constructor(e, n) {
210
+ constructor(e, t) {
211
211
  super();
212
- _(this, "_lastPopup", null);
213
- _(this, "_activePopup");
214
- _(this, "_activePopup$", new gt(null));
215
- _(this, "activePopup$", this._activePopup$.asObservable());
216
- this._canvasPopupManagerService = e, this._zenZoneService = n, this._initZenVisible();
212
+ v(this, "_lastPopup", null);
213
+ v(this, "_activePopup");
214
+ v(this, "_activePopup$", new Pt(null));
215
+ v(this, "activePopup$", this._activePopup$.asObservable());
216
+ this._canvasPopupManagerService = e, this._zenZoneService = t, this._initZenVisible();
217
217
  }
218
218
  get activePopup() {
219
219
  return this._activePopup;
@@ -223,10 +223,10 @@ let U = class extends O {
223
223
  e && this.hidePopup();
224
224
  }));
225
225
  }
226
- showPopup(e, n) {
226
+ showPopup(e, t) {
227
227
  var d;
228
- const { row: r, col: t, unitId: i, subUnitId: s } = e;
229
- if (this._activePopup && r === this._activePopup.row && t === this._activePopup.col && i === this._activePopup.unitId && s === ((d = this.activePopup) == null ? void 0 : d.subUnitId)) {
228
+ const { row: r, col: n, unitId: i, subUnitId: s } = e;
229
+ if (this._activePopup && r === this._activePopup.row && n === this._activePopup.col && i === this._activePopup.unitId && s === ((d = this.activePopup) == null ? void 0 : d.subUnitId)) {
230
230
  this._activePopup = e, this._activePopup$.next(e);
231
231
  return;
232
232
  }
@@ -235,9 +235,9 @@ let U = class extends O {
235
235
  this._activePopup = e, this._activePopup$.next(e);
236
236
  const a = this._canvasPopupManagerService.attachPopupToCell(
237
237
  r,
238
- t,
238
+ n,
239
239
  {
240
- componentKey: Ee,
240
+ componentKey: Re,
241
241
  onClickOutside: () => {
242
242
  this.hidePopup();
243
243
  },
@@ -250,10 +250,10 @@ let U = class extends O {
250
250
  );
251
251
  if (!a)
252
252
  throw new Error("[SheetsThreadCommentPopupService]: cannot show popup!");
253
- const c = new Ve();
253
+ const c = new Ae();
254
254
  c.add(a), c.add({
255
255
  dispose: () => {
256
- n == null || n();
256
+ t == null || t();
257
257
  }
258
258
  }), this._lastPopup = c;
259
259
  }
@@ -267,22 +267,22 @@ let U = class extends O {
267
267
  }, this._activePopup$.next(this._activePopup));
268
268
  }
269
269
  };
270
- U = xt([
271
- me(0, h(ct)),
272
- me(1, Ge)
270
+ U = jt([
271
+ me(0, h(ut)),
272
+ me(1, qe)
273
273
  ], U);
274
- const Dt = () => {
275
- const o = w($), e = w(U), n = oe(e.activePopup$), r = w(T);
276
- if (oe(r.commentUpdate$), !n)
274
+ const Vt = () => {
275
+ const o = w($), e = w(U), t = oe(e.activePopup$), r = w(T);
276
+ if (oe(r.commentUpdate$), !t)
277
277
  return null;
278
- const { row: t, col: i, unitId: s, subUnitId: a, trigger: c } = n, d = r.getByLocation(s, a, t, i), u = `${_e.chatAtABC(i)}${t + 1}`, p = () => {
278
+ const { row: n, col: i, unitId: s, subUnitId: a, trigger: c } = t, d = r.getByLocation(s, a, n, i), u = `${le.chatAtABC(i)}${n + 1}`, p = () => {
279
279
  e.hidePopup();
280
280
  }, R = (S) => {
281
- var I, M, E;
282
- return (E = (M = (I = o.getCurrentUnitForType(g.UNIVER_SHEET)) == null ? void 0 : I.getSheetBySheetId(S)) == null ? void 0 : M.getName()) != null ? E : "";
281
+ var I, P, E;
282
+ return (E = (P = (I = o.getCurrentUnitForType(g.UNIVER_SHEET)) == null ? void 0 : I.getSheetBySheetId(S)) == null ? void 0 : P.getName()) != null ? E : "";
283
283
  };
284
- return /* @__PURE__ */ be.createElement(
285
- We,
284
+ return /* @__PURE__ */ Me.createElement(
285
+ ze,
286
286
  {
287
287
  onClick: () => {
288
288
  e.persistPopup();
@@ -299,14 +299,14 @@ const Dt = () => {
299
299
  }
300
300
  );
301
301
  }, K = {
302
- type: Ae.OPERATION,
302
+ type: Le.OPERATION,
303
303
  id: "sheets.operation.show-comment-modal",
304
304
  handler(o) {
305
- var M;
306
- const e = o.get(Qe), n = o.get($), r = o.get(U), t = o.get(ee), i = (M = e.getFirst()) == null ? void 0 : M.primary, s = e.getCurrent(), a = o.get(T);
305
+ var P;
306
+ const e = o.get(nt), t = o.get($), r = o.get(U), n = o.get(ee), i = (P = e.getFirst()) == null ? void 0 : P.primary, s = e.getCurrent(), a = o.get(T);
307
307
  if (!s || !i)
308
308
  return !1;
309
- const { unitId: c, sheetId: d } = s, u = et(n, { unitId: c, subUnitId: d });
309
+ const { unitId: c, sheetId: d } = s, u = rt(t, { unitId: c, subUnitId: d });
310
310
  if (!u)
311
311
  return !1;
312
312
  const { workbook: p, worksheet: R } = u, S = {
@@ -319,34 +319,34 @@ const Dt = () => {
319
319
  };
320
320
  r.showPopup(S);
321
321
  const I = a.getByLocation(c, d, i.actualRow, i.startColumn);
322
- return I && t.setActiveComment({
322
+ return I && n.setActiveComment({
323
323
  unitId: c,
324
324
  subUnitId: d,
325
325
  commentId: I,
326
326
  trigger: "context-menu"
327
327
  }), !0;
328
328
  }
329
- }, Nt = () => {
330
- const o = w(dt), e = w($), n = w(G), r = w(U), t = e.getCurrentUnitForType(g.UNIVER_SHEET);
331
- if (!t)
329
+ }, At = () => {
330
+ const o = w(ht), e = w($), t = w(G), r = w(U), n = e.getCurrentUnitForType(g.UNIVER_SHEET);
331
+ if (!n)
332
332
  return null;
333
- const i = t.getUnitId(), s = w(Q), a = vt(() => t.activeSheet$.pipe(St((m) => m == null ? void 0 : m.getSheetId())), [t.activeSheet$]), c = ae(a, t.getActiveSheet().getSheetId()), d = we(), u = w(ee), p = ae(u.activeCommentId$), R = ce((m) => {
334
- const l = t.getSheets(), v = {};
335
- return l.forEach((C, P) => {
336
- v[C.getSheetId()] = P;
333
+ const i = n.getUnitId(), s = w(Q), a = gt(() => n.activeSheet$.pipe(Mt((m) => m == null ? void 0 : m.getSheetId())), [n.activeSheet$]), c = ae(a, n.getActiveSheet().getSheetId()), d = Te(), u = w(ee), p = ae(u.activeCommentId$), R = ce((m) => {
334
+ const l = n.getSheets(), _ = {};
335
+ return l.forEach((C, M) => {
336
+ _[C.getSheetId()] = M;
337
337
  }), m.map((C) => {
338
338
  var ne;
339
- const P = y(C.ref), xe = [(ne = v[C.subUnitId]) != null ? ne : 0, P.row, P.column];
340
- return { ...C, p: xe };
341
- }).sort((C, P) => C.p[0] === P.p[0] ? C.p[1] === P.p[1] ? C.p[2] - P.p[2] : C.p[1] - P.p[1] : C.p[0] - P.p[0]);
342
- }, [t]), S = ce((m) => {
339
+ const M = y(C.ref), De = [(ne = _[C.subUnitId]) != null ? ne : 0, M.row, M.column];
340
+ return { ...C, p: De };
341
+ }).sort((C, M) => C.p[0] === M.p[0] ? C.p[1] === M.p[1] ? C.p[2] - M.p[2] : C.p[1] - M.p[1] : C.p[0] - M.p[0]);
342
+ }, [n]), S = ce((m) => {
343
343
  if (m.unitId === i && m.subUnitId === c && !m.resolved) {
344
- const { row: l, column: v } = y(m.ref);
345
- if (!Number.isNaN(l) && !Number.isNaN(v))
344
+ const { row: l, column: _ } = y(m.ref);
345
+ if (!Number.isNaN(l) && !Number.isNaN(_))
346
346
  return o.addShape({
347
347
  range: {
348
- startColumn: v,
349
- endColumn: v,
348
+ startColumn: _,
349
+ endColumn: _,
350
350
  startRow: l,
351
351
  endRow: l
352
352
  },
@@ -361,125 +361,125 @@ const Dt = () => {
361
361
  });
362
362
  }
363
363
  }, [o, c, i]), I = (m) => {
364
- var l, v;
365
- return (v = (l = t.getSheetBySheetId(m)) == null ? void 0 : l.getName()) != null ? v : "";
366
- }, M = () => {
364
+ var l, _;
365
+ return (_ = (l = n.getSheetBySheetId(m)) == null ? void 0 : l.getName()) != null ? _ : "";
366
+ }, P = () => {
367
367
  s.executeCommand(K.id);
368
368
  }, E = () => {
369
369
  r.hidePopup();
370
- }, A = (m) => {
370
+ }, V = (m) => {
371
371
  p && p.unitId === m.unitId && p.subUnitId === m.subUnitId && p.commentId === m.id || (d.current && (o.removeShape(d.current), d.current = null), d.current = S(m));
372
- }, L = () => {
372
+ }, A = () => {
373
373
  d.current && (o.removeShape(d.current), d.current = null);
374
374
  };
375
- return ft(() => {
375
+ return St(() => {
376
376
  if (!p)
377
377
  return;
378
- const m = n.getComment(p.unitId, p.subUnitId, p.commentId);
378
+ const m = t.getComment(p.unitId, p.subUnitId, p.commentId);
379
379
  if (!m)
380
380
  return;
381
381
  const l = S(m);
382
382
  return () => {
383
383
  l && o.removeShape(l);
384
384
  };
385
- }, [S, p, n, o]), /* @__PURE__ */ be.createElement(
386
- Fe,
385
+ }, [S, p, t, o]), /* @__PURE__ */ Me.createElement(
386
+ ke,
387
387
  {
388
388
  unitId: i,
389
389
  subUnitId$: a,
390
390
  type: g.UNIVER_SHEET,
391
- onAdd: M,
391
+ onAdd: P,
392
392
  getSubUnitName: I,
393
393
  onResolve: E,
394
394
  sortComments: R,
395
- onItemEnter: A,
396
- onItemLeave: L
395
+ onItemEnter: V,
396
+ onItemLeave: A
397
397
  }
398
398
  );
399
- }, jt = (o) => ({
399
+ }, Lt = (o) => ({
400
400
  id: K.id,
401
- type: ve.BUTTON,
402
- positions: [fe.CONTEXT_MENU],
401
+ type: _e.BUTTON,
402
+ positions: [ve.CONTEXT_MENU],
403
403
  icon: te,
404
404
  title: "sheetThreadComment.menu.addComment",
405
- hidden$: Ce(o, g.UNIVER_SHEET),
405
+ hidden$: fe(o, g.UNIVER_SHEET),
406
406
  disabled$: Pe(o, {
407
- workbookTypes: [ge],
408
- worksheetTypes: [Se],
409
- rangeTypes: [Ie]
407
+ workbookTypes: [Ce],
408
+ worksheetTypes: [ge],
409
+ rangeTypes: [Se]
410
410
  })
411
- }), Vt = (o) => ({
412
- id: Ze.id,
413
- type: ve.BUTTON,
411
+ }), Ht = (o) => ({
412
+ id: Ge.id,
413
+ type: _e.BUTTON,
414
414
  icon: te,
415
415
  tooltip: "sheetThreadComment.menu.commentManagement",
416
- positions: fe.TOOLBAR_START,
417
- group: Ye.TOOLBAR_OTHERS,
416
+ positions: ve.TOOLBAR_START,
417
+ group: Je.TOOLBAR_OTHERS,
418
418
  disabled$: Pe(o, {
419
- workbookTypes: [ge],
420
- worksheetTypes: [Se],
421
- rangeTypes: [Ie]
419
+ workbookTypes: [Ce],
420
+ worksheetTypes: [ge],
421
+ rangeTypes: [Se]
422
422
  }),
423
- hidden$: Ce(o, g.UNIVER_SHEET)
424
- }), At = {
423
+ hidden$: fe(o, g.UNIVER_SHEET)
424
+ }), Bt = {
425
425
  id: K.id,
426
- binding: Ke.M | ie.CTRL_COMMAND | ie.ALT,
427
- preconditions: mt
426
+ binding: Xe.M | ie.CTRL_COMMAND | ie.ALT,
427
+ preconditions: pt
428
428
  };
429
- var Lt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, Bt = (o, e, n, r) => {
430
- for (var t = r > 1 ? void 0 : r ? Ht(e, n) : e, i = o.length - 1, s; i >= 0; i--)
431
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
432
- return r && t && Lt(e, n, t), t;
433
- }, b = (o, e) => (n, r) => e(n, r, o);
434
- const Wt = {};
435
- let j = class extends O {
436
- constructor(o, e, n, r, t, i, s, a, c, d, u) {
437
- super(), this._config = o, this._menuService = e, this._injector = n, this._componentManager = r, this._localeService = t, this._commandService = i, this._sheetsThreadCommentPopupService = s, this._sheetsThreadCommentModel = a, this._threadCommentPanelService = c, this._shortcutService = d, this._univerInstanceService = u, this._initMenu(), this._initShortcut(), this._initComponent(), this._initCommandListener(), this._initPanelListener();
429
+ var Wt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, Zt = (o, e, t, r) => {
430
+ for (var n = r > 1 ? void 0 : r ? Ft(e, t) : e, i = o.length - 1, s; i >= 0; i--)
431
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
432
+ return r && n && Wt(e, t, n), n;
433
+ }, b = (o, e) => (t, r) => e(t, r, o);
434
+ const zt = {};
435
+ let N = class extends O {
436
+ constructor(o, e, t, r, n, i, s, a, c, d, u) {
437
+ super(), this._config = o, this._menuService = e, this._injector = t, this._componentManager = r, this._localeService = n, this._commandService = i, this._sheetsThreadCommentPopupService = s, this._sheetsThreadCommentModel = a, this._threadCommentPanelService = c, this._shortcutService = d, this._univerInstanceService = u, this._initMenu(), this._initShortcut(), this._initComponent(), this._initCommandListener(), this._initPanelListener();
438
438
  }
439
439
  _initShortcut() {
440
- this._shortcutService.registerShortcut(At);
440
+ this._shortcutService.registerShortcut(Bt);
441
441
  }
442
442
  _initCommandListener() {
443
443
  this._commandService.onCommandExecuted((o) => {
444
- if (o.id === tt.id) {
445
- const e = o.params, { unitId: n, subUnitId: r, selections: t, type: i } = e;
446
- if ((i === nt.MOVE_END || i === void 0) && t[0].primary) {
447
- const s = t[0].primary.actualRow, a = t[0].primary.actualColumn;
448
- if (!this._sheetsThreadCommentModel.showCommentMarker(n, r, s, a)) {
444
+ if (o.id === ot.id) {
445
+ const e = o.params, { unitId: t, subUnitId: r, selections: n, type: i } = e;
446
+ if ((i === it.MOVE_END || i === void 0) && n[0].primary) {
447
+ const s = n[0].primary.actualRow, a = n[0].primary.actualColumn;
448
+ if (!this._sheetsThreadCommentModel.showCommentMarker(t, r, s, a)) {
449
449
  this._threadCommentPanelService.activeCommentId && this._commandService.executeCommand(re.id);
450
450
  return;
451
451
  }
452
- const c = this._sheetsThreadCommentModel.getByLocation(n, r, s, a);
452
+ const c = this._sheetsThreadCommentModel.getByLocation(t, r, s, a);
453
453
  c && this._commandService.executeCommand(re.id, {
454
- unitId: n,
454
+ unitId: t,
455
455
  subUnitId: r,
456
456
  commentId: c
457
457
  });
458
458
  }
459
459
  }
460
- if (o.id === V.id) {
461
- const e = o.params, n = this._sheetsThreadCommentPopupService.activePopup;
462
- if (!n)
460
+ if (o.id === j.id) {
461
+ const e = o.params, t = this._sheetsThreadCommentPopupService.activePopup;
462
+ if (!t)
463
463
  return;
464
- const { unitId: r, subUnitId: t, commentId: i } = n;
465
- e.unitId === r && e.subUnitId === t && e.commentId === i && this._sheetsThreadCommentPopupService.hidePopup();
464
+ const { unitId: r, subUnitId: n, commentId: i } = t;
465
+ e.unitId === r && e.subUnitId === n && e.commentId === i && this._sheetsThreadCommentPopupService.hidePopup();
466
466
  }
467
467
  });
468
468
  }
469
469
  _initMenu() {
470
470
  const { menu: o = {} } = this._config;
471
471
  [
472
- jt,
473
- Vt
472
+ Lt,
473
+ Ht
474
474
  ].forEach((e) => {
475
475
  this._menuService.addMenuItem(e(this._injector), o);
476
476
  });
477
477
  }
478
478
  _initComponent() {
479
479
  [
480
- [Ee, Dt],
481
- [ke, Nt],
482
- [te, Re]
480
+ [Re, Vt],
481
+ [Ke, At],
482
+ [te, Oe]
483
483
  ].forEach(([o, e]) => {
484
484
  this._componentManager.register(o, e);
485
485
  });
@@ -487,18 +487,18 @@ let j = class extends O {
487
487
  _initPanelListener() {
488
488
  this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(async (o) => {
489
489
  if (o) {
490
- const { unitId: e, subUnitId: n, commentId: r, trigger: t } = o, i = this._sheetsThreadCommentModel.getComment(e, n, r);
490
+ const { unitId: e, subUnitId: t, commentId: r, trigger: n } = o, i = this._sheetsThreadCommentModel.getComment(e, t, r);
491
491
  if (!i || i.resolved)
492
492
  return;
493
493
  const s = this._univerInstanceService.getCurrentUnitForType(g.UNIVER_SHEET);
494
494
  if (!s || s.getUnitId() !== e)
495
495
  return;
496
- s.getActiveSheet().getSheetId() !== n && await this._commandService.executeCommand(rt.id, {
496
+ s.getActiveSheet().getSheetId() !== t && await this._commandService.executeCommand(st.id, {
497
497
  unitId: e,
498
- subUnitId: n
498
+ subUnitId: t
499
499
  });
500
500
  const d = y(i.ref);
501
- await this._commandService.executeCommand(ut.id, {
501
+ await this._commandService.executeCommand(lt.id, {
502
502
  range: {
503
503
  startColumn: d.column,
504
504
  endColumn: d.column,
@@ -507,52 +507,52 @@ let j = class extends O {
507
507
  }
508
508
  }), this._sheetsThreadCommentPopupService.showPopup({
509
509
  unitId: e,
510
- subUnitId: n,
510
+ subUnitId: t,
511
511
  row: d.row,
512
512
  col: d.column,
513
513
  commentId: i.id,
514
- trigger: t
514
+ trigger: n
515
515
  });
516
516
  } else
517
517
  this._sheetsThreadCommentPopupService.hidePopup();
518
518
  }));
519
519
  }
520
520
  };
521
- j = Bt([
522
- x(D.Starting, j),
523
- b(1, Xe),
524
- b(2, h(le)),
525
- b(3, h(qe)),
526
- b(4, h(Le)),
521
+ N = Zt([
522
+ x(D.Starting, N),
523
+ b(1, et),
524
+ b(2, h(pe)),
525
+ b(3, h(Qe)),
526
+ b(4, h(He)),
527
527
  b(5, Q),
528
528
  b(6, h(U)),
529
529
  b(7, h(T)),
530
530
  b(8, h(ee)),
531
- b(9, Je),
531
+ b(9, tt),
532
532
  b(10, $)
533
- ], j);
534
- var Ft = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, kt = (o, e, n, r) => {
535
- for (var t = r > 1 ? void 0 : r ? Zt(e, n) : e, i = o.length - 1, s; i >= 0; i--)
536
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
537
- return r && t && Ft(e, n, t), t;
538
- }, Y = (o, e) => (n, r) => e(n, r, o);
539
- let B = class extends O {
540
- constructor(e, n, r) {
533
+ ], N);
534
+ var kt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, Kt = (o, e, t, r) => {
535
+ for (var n = r > 1 ? void 0 : r ? Gt(e, t) : e, i = o.length - 1, s; i >= 0; i--)
536
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
537
+ return r && n && kt(e, t, n), n;
538
+ }, Y = (o, e) => (t, r) => e(t, r, o);
539
+ let H = class extends O {
540
+ constructor(e, t, r) {
541
541
  super();
542
- _(this, "_disposableMap", /* @__PURE__ */ new Map());
543
- this._refRangeService = e, this._sheetsThreadCommentModel = n, this._threadCommentModel = r, this._initData(), this._initRefRange();
542
+ v(this, "_disposableMap", /* @__PURE__ */ new Map());
543
+ this._refRangeService = e, this._sheetsThreadCommentModel = t, this._threadCommentModel = r, this._initData(), this._initRefRange();
544
544
  }
545
- _getIdWithUnitId(e, n, r) {
546
- return `${e}-${n}-${r}`;
545
+ _getIdWithUnitId(e, t, r) {
546
+ return `${e}-${t}-${r}`;
547
547
  }
548
- _register(e, n, r) {
549
- const t = r.id, i = {
548
+ _register(e, t, r) {
549
+ const n = r.id, i = {
550
550
  startColumn: r.column,
551
551
  endColumn: r.column,
552
552
  startRow: r.row,
553
553
  endRow: r.row
554
554
  }, s = (a) => {
555
- const c = it(i, a);
555
+ const c = ct(i, a);
556
556
  return c && c.startColumn === i.startColumn && c.startRow === i.startRow ? {
557
557
  undos: [],
558
558
  redos: []
@@ -561,10 +561,10 @@ let B = class extends O {
561
561
  id: se.id,
562
562
  params: {
563
563
  unitId: e,
564
- subUnitId: n,
564
+ subUnitId: t,
565
565
  payload: {
566
566
  ref: J(c),
567
- commentId: t
567
+ commentId: n
568
568
  }
569
569
  }
570
570
  }],
@@ -572,46 +572,46 @@ let B = class extends O {
572
572
  id: se.id,
573
573
  params: {
574
574
  unitId: e,
575
- subUnitId: n,
575
+ subUnitId: t,
576
576
  payload: {
577
577
  ref: J(i),
578
- commentId: t
578
+ commentId: n
579
579
  }
580
580
  }
581
581
  }]
582
582
  } : {
583
583
  redos: [{
584
- id: V.id,
584
+ id: j.id,
585
585
  params: {
586
586
  unitId: e,
587
- subUnitId: n,
588
- commentId: t
587
+ subUnitId: t,
588
+ commentId: n
589
589
  }
590
590
  }],
591
591
  undos: [{
592
592
  id: z.id,
593
593
  params: {
594
594
  unitId: e,
595
- subUnitId: n,
595
+ subUnitId: t,
596
596
  comment: r
597
597
  }
598
598
  }]
599
599
  };
600
600
  };
601
601
  this._disposableMap.set(
602
- this._getIdWithUnitId(e, n, t),
603
- this._refRangeService.registerRefRange(i, s, e, n)
602
+ this._getIdWithUnitId(e, t, n),
603
+ this._refRangeService.registerRefRange(i, s, e, t)
604
604
  );
605
605
  }
606
606
  _initData() {
607
607
  const e = this._threadCommentModel.getAll();
608
- for (const n in e) {
609
- const r = e[n];
610
- for (const t in r) {
611
- const i = r[t];
608
+ for (const t in e) {
609
+ const r = e[t];
610
+ for (const n in r) {
611
+ const i = r[n];
612
612
  for (const s in i) {
613
613
  const a = i[s], c = a.ref, d = y(c);
614
- this._register(n, t, {
614
+ this._register(t, n, {
615
615
  ...a,
616
616
  ...d
617
617
  });
@@ -622,29 +622,29 @@ let B = class extends O {
622
622
  _initRefRange() {
623
623
  this.disposeWithMe(
624
624
  this._sheetsThreadCommentModel.commentUpdate$.subscribe((e) => {
625
- const { unitId: n, subUnitId: r } = e;
625
+ const { unitId: t, subUnitId: r } = e;
626
626
  switch (e.type) {
627
627
  case "add": {
628
- const t = e.payload;
628
+ const n = e.payload;
629
629
  this._register(e.unitId, e.subUnitId, {
630
- ...t,
630
+ ...n,
631
631
  row: e.row,
632
632
  column: e.column
633
633
  });
634
634
  break;
635
635
  }
636
636
  case "delete": {
637
- const t = this._disposableMap.get(this._getIdWithUnitId(n, r, e.payload.commentId));
638
- t == null || t.dispose();
637
+ const n = this._disposableMap.get(this._getIdWithUnitId(t, r, e.payload.commentId));
638
+ n == null || n.dispose();
639
639
  break;
640
640
  }
641
641
  case "updateRef": {
642
- const t = this._sheetsThreadCommentModel.getComment(n, r, e.payload.commentId);
643
- if (!t)
642
+ const n = this._sheetsThreadCommentModel.getComment(t, r, e.payload.commentId);
643
+ if (!n)
644
644
  return;
645
- const i = this._disposableMap.get(this._getIdWithUnitId(n, r, t.id));
645
+ const i = this._disposableMap.get(this._getIdWithUnitId(t, r, n.id));
646
646
  i == null || i.dispose(), this._register(e.unitId, e.subUnitId, {
647
- ...t,
647
+ ...n,
648
648
  row: e.row,
649
649
  column: e.column
650
650
  });
@@ -652,36 +652,36 @@ let B = class extends O {
652
652
  }
653
653
  }
654
654
  })
655
- ), this.disposeWithMe(He(() => {
655
+ ), this.disposeWithMe(Be(() => {
656
656
  this._disposableMap.forEach((e) => {
657
657
  e.dispose();
658
658
  }), this._disposableMap.clear();
659
659
  }));
660
660
  }
661
661
  };
662
- B = kt([
663
- x(D.Starting, B),
664
- Y(0, h(ot)),
662
+ H = Kt([
663
+ x(D.Starting, H),
664
+ Y(0, h(at)),
665
665
  Y(1, h(T)),
666
666
  Y(2, h(G))
667
- ], B);
668
- var zt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, Kt = (o, e, n, r) => {
669
- for (var t = r > 1 ? void 0 : r ? Gt(e, n) : e, i = o.length - 1, s; i >= 0; i--)
670
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
671
- return r && t && zt(e, n, t), t;
672
- }, N = (o, e) => (n, r) => e(n, r, o);
673
- let W = class extends O {
674
- constructor(o, e, n, r, t) {
675
- super(), this._sheetInterceptorService = o, this._sheetsThreadCommentModel = e, this._univerInstanceService = n, this._sheetSkeletonManagerService = r, this._renderManagerService = t, this._initViewModelIntercept(), this._initSkeletonChange();
667
+ ], H);
668
+ var Yt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Xt = (o, e, t, r) => {
669
+ for (var n = r > 1 ? void 0 : r ? qt(e, t) : e, i = o.length - 1, s; i >= 0; i--)
670
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
671
+ return r && n && Yt(e, t, n), n;
672
+ }, L = (o, e) => (t, r) => e(t, r, o);
673
+ let B = class extends O {
674
+ constructor(o, e, t, r) {
675
+ super(), this._sheetInterceptorService = o, this._sheetsThreadCommentModel = e, this._univerInstanceService = t, this._renderManagerService = r, this._initViewModelIntercept(), this._initSkeletonChange();
676
676
  }
677
677
  _initViewModelIntercept() {
678
678
  this.disposeWithMe(
679
679
  this._sheetInterceptorService.intercept(
680
- st.CELL_CONTENT,
680
+ dt.CELL_CONTENT,
681
681
  {
682
- handler: (o, e, n) => {
683
- const { row: r, col: t, unitId: i, subUnitId: s } = e;
684
- return this._sheetsThreadCommentModel.showCommentMarker(i, s, r, t) ? n({
682
+ handler: (o, e, t) => {
683
+ const { row: r, col: n, unitId: i, subUnitId: s } = e;
684
+ return this._sheetsThreadCommentModel.showCommentMarker(i, s, r, n) ? t({
685
685
  ...o,
686
686
  markers: {
687
687
  ...o == null ? void 0 : o.markers,
@@ -690,7 +690,7 @@ let W = class extends O {
690
690
  size: 6
691
691
  }
692
692
  }
693
- }) : n(o);
693
+ }) : t(o);
694
694
  },
695
695
  priority: 100
696
696
  }
@@ -702,74 +702,73 @@ let W = class extends O {
702
702
  const e = this._univerInstanceService.getCurrentUnitForType(g.UNIVER_SHEET);
703
703
  if (!e)
704
704
  return;
705
- const n = e.getUnitId(), r = e.getActiveSheet().getSheetId(), t = this._sheetSkeletonManagerService.getOrCreateSkeleton({ unitId: n, sheetId: r }), i = this._renderManagerService.getRenderById(n);
706
- t == null || t.makeDirty(!0), t == null || t.calculate(), i && i.mainComponent.makeForceDirty();
705
+ const t = e.getUnitId(), r = e.getActiveSheet().getSheetId(), n = this._renderManagerService.getRenderById(t), i = n == null ? void 0 : n.with(_t).getOrCreateSkeleton({ sheetId: r });
706
+ i == null || i.makeDirty(!0), i == null || i.calculate(), n && n.mainComponent.makeForceDirty();
707
707
  };
708
708
  this.disposeWithMe(this._sheetsThreadCommentModel.commentUpdate$.subscribe(() => {
709
709
  o();
710
710
  }));
711
711
  }
712
712
  };
713
- W = Kt([
714
- x(D.Ready, W),
715
- N(0, h(Me)),
716
- N(1, h(T)),
717
- N(2, $),
718
- N(3, h(ht)),
719
- N(4, Mt)
720
- ], W);
721
- var Yt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Xt = (o, e, n, r) => {
722
- for (var t = r > 1 ? void 0 : r ? qt(e, n) : e, i = o.length - 1, s; i >= 0; i--)
723
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
724
- return r && t && Yt(e, n, t), t;
725
- }, ue = (o, e) => (n, r) => e(n, r, o);
726
- const Jt = (o, e, n) => {
727
- const r = y(o), t = n.row - e.row, i = n.column - e.column, s = {
713
+ B = Xt([
714
+ x(D.Ready, B),
715
+ L(0, h(Ie)),
716
+ L(1, h(T)),
717
+ L(2, $),
718
+ L(3, Tt)
719
+ ], B);
720
+ var Jt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, en = (o, e, t, r) => {
721
+ for (var n = r > 1 ? void 0 : r ? Qt(e, t) : e, i = o.length - 1, s; i >= 0; i--)
722
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
723
+ return r && n && Jt(e, t, n), n;
724
+ }, ue = (o, e) => (t, r) => e(t, r, o);
725
+ const tn = (o, e, t) => {
726
+ const r = y(o), n = t.row - e.row, i = t.column - e.column, s = {
728
727
  startColumn: r.column + i,
729
- startRow: r.row + t,
728
+ startRow: r.row + n,
730
729
  endColumn: r.column + i,
731
- endRow: r.row + t
730
+ endRow: r.row + n
732
731
  };
733
732
  return J(s);
734
733
  };
735
- let F = class extends O {
736
- constructor(e, n) {
734
+ let W = class extends O {
735
+ constructor(e, t) {
737
736
  super();
738
- _(this, "_copyInfo");
739
- this._sheetClipboardService = e, this._sheetsThreadCommentModel = n, this._initClipboardHook();
737
+ v(this, "_copyInfo");
738
+ this._sheetClipboardService = e, this._sheetsThreadCommentModel = t, this._initClipboardHook();
740
739
  }
741
740
  // eslint-disable-next-line max-lines-per-function
742
741
  _initClipboardHook() {
743
742
  this.disposeWithMe(
744
743
  this._sheetClipboardService.addClipboardHook({
745
- id: $e,
746
- onBeforeCopy: (e, n, r) => {
744
+ id: Ee,
745
+ onBeforeCopy: (e, t, r) => {
747
746
  this._copyInfo = {
748
747
  unitId: e,
749
- subUnitId: n,
748
+ subUnitId: t,
750
749
  range: r
751
750
  };
752
751
  },
753
752
  // eslint-disable-next-line max-lines-per-function
754
- onPasteCells: (e, n, r, t) => {
755
- const { unitId: i, subUnitId: s, range: a } = n, c = {
753
+ onPasteCells: (e, t, r, n) => {
754
+ const { unitId: i, subUnitId: s, range: a } = t, c = {
756
755
  row: a.rows[0],
757
756
  column: a.cols[0]
758
757
  };
759
- if (t.copyType === lt.CUT && this._copyInfo) {
758
+ if (n.copyType === ft.CUT && this._copyInfo) {
760
759
  const { range: d, unitId: u, subUnitId: p } = this._copyInfo, R = {
761
760
  row: d.startRow,
762
761
  column: d.startColumn
763
762
  };
764
763
  if (!(i === u && s === p)) {
765
764
  const S = [];
766
- Be.foreach(d, (m, l) => {
767
- const v = this._sheetsThreadCommentModel.getCommentWithChildren(u, p, m, l);
768
- v && S.push(v);
765
+ We.foreach(d, (m, l) => {
766
+ const _ = this._sheetsThreadCommentModel.getCommentWithChildren(u, p, m, l);
767
+ _ && S.push(_);
769
768
  });
770
- const I = [], M = [], E = [], A = [], L = (m) => {
769
+ const I = [], P = [], E = [], V = [], A = (m) => {
771
770
  I.unshift({
772
- id: V.id,
771
+ id: j.id,
773
772
  params: {
774
773
  unitId: u,
775
774
  subUnitId: p,
@@ -782,20 +781,20 @@ let F = class extends O {
782
781
  subUnitId: s,
783
782
  comment: {
784
783
  ...m,
785
- ref: Jt(m.ref, R, c),
784
+ ref: tn(m.ref, R, c),
786
785
  unitId: i,
787
786
  subUnitId: s
788
787
  }
789
788
  }
790
- }), M.push({
789
+ }), P.push({
791
790
  id: z.id,
792
791
  params: {
793
792
  unitId: u,
794
793
  subUnitId: p,
795
794
  comment: m
796
795
  }
797
- }), A.unshift({
798
- id: V.id,
796
+ }), V.unshift({
797
+ id: j.id,
799
798
  params: {
800
799
  unitId: i,
801
800
  subUnitId: s,
@@ -804,12 +803,12 @@ let F = class extends O {
804
803
  });
805
804
  };
806
805
  return S.forEach((m) => {
807
- L(m.root), m.children.forEach((l) => {
808
- L(l);
806
+ A(m.root), m.children.forEach((l) => {
807
+ A(l);
809
808
  });
810
809
  }), {
811
810
  redos: [...I, ...E],
812
- undos: [...A, ...M]
811
+ undos: [...V, ...P]
813
812
  };
814
813
  }
815
814
  }
@@ -822,31 +821,31 @@ let F = class extends O {
822
821
  );
823
822
  }
824
823
  };
825
- F = Xt([
826
- x(D.Rendered, F),
827
- ue(0, h(pt)),
824
+ W = en([
825
+ x(D.Rendered, W),
826
+ ue(0, h(vt)),
828
827
  ue(1, h(T))
829
- ], F);
830
- var Qt = Object.defineProperty, en = Object.getOwnPropertyDescriptor, tn = (o, e, n, r) => {
831
- for (var t = r > 1 ? void 0 : r ? en(e, n) : e, i = o.length - 1, s; i >= 0; i--)
832
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
833
- return r && t && Qt(e, n, t), t;
834
- }, q = (o, e) => (n, r) => e(n, r, o);
835
- let Z = class extends O {
836
- constructor(o, e, n) {
837
- super(), this._hoverManagerService = o, this._sheetsThreadCommentPopupService = e, this._sheetsThreadCommentModel = n, this._initHoverEvent();
828
+ ], W);
829
+ var nn = Object.defineProperty, rn = Object.getOwnPropertyDescriptor, on = (o, e, t, r) => {
830
+ for (var n = r > 1 ? void 0 : r ? rn(e, t) : e, i = o.length - 1, s; i >= 0; i--)
831
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
832
+ return r && n && nn(e, t, n), n;
833
+ }, q = (o, e) => (t, r) => e(t, r, o);
834
+ let F = class extends O {
835
+ constructor(o, e, t) {
836
+ super(), this._hoverManagerService = o, this._sheetsThreadCommentPopupService = e, this._sheetsThreadCommentModel = t, this._initHoverEvent();
838
837
  }
839
838
  _initHoverEvent() {
840
839
  this.disposeWithMe(
841
- this._hoverManagerService.currentCell$.pipe(It(100)).subscribe((o) => {
840
+ this._hoverManagerService.currentCell$.pipe(bt(100)).subscribe((o) => {
842
841
  const e = this._sheetsThreadCommentPopupService.activePopup;
843
842
  if (o && (e && e.temp || !e)) {
844
- const { location: n } = o, { unitId: r, subUnitId: t, row: i, col: s } = n, a = this._sheetsThreadCommentModel.getByLocation(r, t, i, s);
843
+ const { location: t } = o, { unitId: r, subUnitId: n, row: i, col: s } = t, a = this._sheetsThreadCommentModel.getByLocation(r, n, i, s);
845
844
  if (a) {
846
- const c = this._sheetsThreadCommentModel.getComment(r, t, a);
845
+ const c = this._sheetsThreadCommentModel.getComment(r, n, a);
847
846
  c && !c.resolved && this._sheetsThreadCommentPopupService.showPopup({
848
847
  unitId: r,
849
- subUnitId: t,
848
+ subUnitId: n,
850
849
  row: i,
851
850
  col: s,
852
851
  commentId: a,
@@ -859,41 +858,41 @@ let Z = class extends O {
859
858
  );
860
859
  }
861
860
  };
862
- Z = tn([
863
- x(D.Rendered, Z),
864
- q(0, h(_t)),
861
+ F = on([
862
+ x(D.Rendered, F),
863
+ q(0, h(Ct)),
865
864
  q(1, h(U)),
866
865
  q(2, h(T))
867
- ], Z);
868
- var nn = Object.defineProperty, rn = Object.getOwnPropertyDescriptor, on = (o, e, n, r) => {
869
- for (var t = r > 1 ? void 0 : r ? rn(e, n) : e, i = o.length - 1, s; i >= 0; i--)
870
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
871
- return r && t && nn(e, n, t), t;
872
- }, X = (o, e) => (n, r) => e(n, r, o);
873
- let k = class extends O {
874
- constructor(o, e, n) {
875
- super(), this._sheetInterceptorService = o, this._univerInstanceService = e, this._threadCommentModel = n, this._initSheetChange();
866
+ ], F);
867
+ var sn = Object.defineProperty, an = Object.getOwnPropertyDescriptor, cn = (o, e, t, r) => {
868
+ for (var n = r > 1 ? void 0 : r ? an(e, t) : e, i = o.length - 1, s; i >= 0; i--)
869
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
870
+ return r && n && sn(e, t, n), n;
871
+ }, X = (o, e) => (t, r) => e(t, r, o);
872
+ let Z = class extends O {
873
+ constructor(o, e, t) {
874
+ super(), this._sheetInterceptorService = o, this._univerInstanceService = e, this._threadCommentModel = t, this._initSheetChange();
876
875
  }
877
876
  _initSheetChange() {
878
877
  this.disposeWithMe(
879
878
  this._sheetInterceptorService.interceptCommand({
880
879
  getMutations: (o) => {
881
- if (o.id === at.id) {
882
- const e = o.params, n = e.unitId ? this._univerInstanceService.getUnit(e.unitId) : this._univerInstanceService.getCurrentUnitForType(g.UNIVER_SHEET);
883
- if (!n)
880
+ if (o.id === mt.id) {
881
+ const e = o.params, t = e.unitId ? this._univerInstanceService.getUnit(e.unitId) : this._univerInstanceService.getCurrentUnitForType(g.UNIVER_SHEET);
882
+ if (!t)
884
883
  return { redos: [], undos: [] };
885
- const r = n.getUnitId(), t = e.subUnitId || n.getActiveSheet().getSheetId(), { commentMap: i } = this._threadCommentModel.ensureMap(r, t), s = Array.from(Object.keys(i)), a = Array.from(Object.values(i)), c = s.map((u) => ({
886
- id: V.id,
884
+ const r = t.getUnitId(), n = e.subUnitId || t.getActiveSheet().getSheetId(), { commentMap: i } = this._threadCommentModel.ensureMap(r, n), s = Array.from(Object.keys(i)), a = Array.from(Object.values(i)), c = s.map((u) => ({
885
+ id: j.id,
887
886
  params: {
888
887
  unitId: r,
889
- subUnitId: t,
888
+ subUnitId: n,
890
889
  commentId: u
891
890
  }
892
891
  })), d = a.map((u) => ({
893
892
  id: z.id,
894
893
  params: {
895
894
  unitId: r,
896
- subUnitId: t,
895
+ subUnitId: n,
897
896
  comment: u
898
897
  }
899
898
  }));
@@ -905,65 +904,68 @@ let k = class extends O {
905
904
  );
906
905
  }
907
906
  };
908
- k = on([
909
- x(D.Ready, k),
910
- X(0, h(Me)),
907
+ Z = cn([
908
+ x(D.Ready, Z),
909
+ X(0, h(Ie)),
911
910
  X(1, $),
912
911
  X(2, h(G))
913
- ], k);
914
- var sn = Object.defineProperty, an = Object.getOwnPropertyDescriptor, cn = (o, e, n, r) => {
915
- for (var t = r > 1 ? void 0 : r ? an(e, n) : e, i = o.length - 1, s; i >= 0; i--)
916
- (s = o[i]) && (t = (r ? s(e, n, t) : s(t)) || t);
917
- return r && t && sn(e, n, t), t;
918
- }, he = (o, e) => (n, r) => e(n, r, o), H;
919
- let pe = (H = class extends ze {
920
- constructor(e = {}, n, r) {
921
- super(e, n, r);
922
- _(this, "_pluginConfig");
923
- this._injector = n, this._commandService = r, this._pluginConfig = _e.deepMerge({}, Wt, e);
912
+ ], Z);
913
+ var $e = Object.defineProperty, dn = Object.getOwnPropertyDescriptor, mn = (o, e, t) => e in o ? $e(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, un = (o, e, t, r) => {
914
+ for (var n = r > 1 ? void 0 : r ? dn(e, t) : e, i = o.length - 1, s; i >= 0; i--)
915
+ (s = o[i]) && (n = (r ? s(e, t, n) : s(n)) || n);
916
+ return r && n && $e(e, t, n), n;
917
+ }, he = (o, e) => (t, r) => e(t, r, o), xe = (o, e, t) => (mn(o, typeof e != "symbol" ? e + "" : e, t), t);
918
+ let k = class extends Ze {
919
+ constructor(e = {}, t, r) {
920
+ super();
921
+ v(this, "_pluginConfig");
922
+ this._injector = t, this._commandService = r, this._pluginConfig = le.deepMerge({}, zt, e);
924
923
  }
925
924
  onStarting(e) {
926
- super.onStarting(e), [
925
+ [
927
926
  [T],
928
927
  [
929
- j,
928
+ N,
930
929
  {
931
- useFactory: () => this._injector.createInstance(j, this._pluginConfig)
930
+ useFactory: () => this._injector.createInstance(N, this._pluginConfig)
932
931
  }
933
932
  ],
933
+ [H],
934
934
  [B],
935
935
  [W],
936
936
  [F],
937
937
  [Z],
938
- [k],
939
938
  [U]
940
- ].forEach((n) => {
941
- this._injector.add(n);
942
- }), [K].forEach((n) => {
943
- this._commandService.registerCommand(n);
939
+ ].forEach((t) => {
940
+ e.add(t);
941
+ }), [K].forEach((t) => {
942
+ this._commandService.registerCommand(t);
944
943
  });
945
944
  }
946
- }, _(H, "pluginName", $e), _(H, "type", g.UNIVER_SHEET), H);
947
- pe = cn([
948
- he(1, h(le)),
945
+ };
946
+ xe(k, "pluginName", Ee);
947
+ xe(k, "type", g.UNIVER_SHEET);
948
+ k = un([
949
+ Fe(Ye),
950
+ he(1, h(pe)),
949
951
  he(2, h(Q))
950
- ], pe);
952
+ ], k);
951
953
  export {
952
- yn as ICommandService,
953
- Dn as IThreadCommentDataSourceService,
954
- En as IThreadCommentMentionDataService,
955
- bn as Inject,
956
- Tn as Injector,
957
- Un as Plugin,
958
- $e as SHEETS_THREAD_COMMENT,
959
- j as SheetsThreadCommentController,
960
- F as SheetsThreadCommentCopyPasteController,
961
- Z as SheetsThreadCommentHoverController,
954
+ Rn as ICommandService,
955
+ Vn as IThreadCommentDataSourceService,
956
+ Dn as IThreadCommentMentionDataService,
957
+ yn as Inject,
958
+ Un as Injector,
959
+ En as Plugin,
960
+ Ee as SHEETS_THREAD_COMMENT,
961
+ N as SheetsThreadCommentController,
962
+ W as SheetsThreadCommentCopyPasteController,
963
+ F as SheetsThreadCommentHoverController,
962
964
  T as SheetsThreadCommentModel,
963
965
  U as SheetsThreadCommentPopupService,
964
- B as SheetsThreadCommentRefRangeController,
965
- k as ThreadCommentRemoveSheetsController,
966
- On as UniverInstanceType,
967
- pe as UniverSheetsThreadCommentPlugin,
968
- $n as UniverThreadCommentUIPlugin
966
+ H as SheetsThreadCommentRefRangeController,
967
+ Z as ThreadCommentRemoveSheetsController,
968
+ $n as UniverInstanceType,
969
+ k as UniverSheetsThreadCommentPlugin,
970
+ Nn as UniverThreadCommentUIPlugin
969
971
  };