@univerjs/sheets-drawing-ui 0.6.10-nightly.202504161609 → 0.6.10-nightly.202504171607

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,21 +1,21 @@
1
- var Wr = Object.defineProperty;
2
- var $r = (i, t, e) => t in i ? Wr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var te = (i, t, e) => $r(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { CommandType as J, ICommandService as X, IUndoRedoService as Xe, sequenceExecute as Vn, LocaleService as rt, IUniverInstanceService as Se, Inject as A, Injector as Ge, IContextService as Hn, RxDisposable as xr, UniverInstanceType as x, toDisposable as Lr, FOCUSING_COMMON_DRAWINGS as Fe, DrawingTypeEnum as L, Disposable as ie, ArrangeTypeEnum as wt, createDocumentModelWithStyle as Jt, ObjectRelativeFromV as Sn, ObjectRelativeFromH as In, WrapTextType as Cn, PositionedObjectLayoutType as Dn, BooleanNumber as bn, BuildTextUtils as qt, ImageSourceType as Rn, generateRandomId as Mt, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as et, DOCS_ZEN_EDITOR_UNIT_ID_KEY as xe, InterceptorEffectEnum as Fr, ObjectMatrix as Yr, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Xr, Tools as ye, IPermissionService as Gr, UserManagerService as Vr, LifecycleService as Hr, LifecycleStages as zr, DisposableCollection as _t, fromEventSubject as Kr, PRINT_CHART_COMPONENT_KEY as Zr, Rectangle as Jr, Direction as ve, FOCUSING_FX_BAR_EDITOR as qr, EDITOR_ACTIVATED as Qr, FOCUSING_PANEL_EDITOR as ei, DependentOn as ti, IConfigService as ni, Plugin as ri, merge as ii, registerDependencies as si, touchDependencies as Gt } from "@univerjs/core";
5
- import { DocDrawingController as oi, UniverDocsDrawingPlugin as ai } from "@univerjs/docs-drawing";
6
- import { SetDrawingSelectedOperation as Wt, IImageIoService as zn, IDrawingManagerService as se, DRAWING_IMAGE_ALLOW_IMAGE_LIST as yn, DRAWING_IMAGE_COUNT_LIMIT as Mn, ImageUploadStatusType as Ne, DRAWING_IMAGE_ALLOW_SIZE as En, getImageSize as Vt, DRAWING_IMAGE_WIDTH_LIMIT as Tn, DRAWING_IMAGE_HEIGHT_LIMIT as On, ImageSourceType as ci, getDrawingShapeKeyByDrawingSearch as Ie, UniverDrawingPlugin as di } from "@univerjs/drawing";
7
- import { ImageCropperObject as li, COMPONENT_IMAGE_POPUP_MENU as ui, OpenImageCropOperation as hi, ImageResetSizeOperation as gi, DrawingRenderService as Kn, DrawingCommonPanel as mi, UniverDrawingUIPlugin as fi } from "@univerjs/drawing-ui";
8
- import { IRenderManagerService as q, CURSOR_TYPE as pi, precisionTo as vt, transformObjectOutOfGroup as wi, getGroupState as _i, getCurrentTypeOfRenderer as dn, RENDER_CLASS_TYPE as ke, Rect as Be, ObjectType as Pn, DRAWING_OBJECT_LAYER_INDEX as Ht, SHEET_VIEWPORT_KEY as Zn } from "@univerjs/engine-render";
9
- import { ISheetDrawingService as oe, DrawingApplyType as P, SetDrawingApplyMutation as U, SheetDrawingAnchorType as O, UniverSheetsDrawingPlugin as vi } from "@univerjs/sheets-drawing";
10
- import { SheetCanvasPopManagerService as Si, HoverManagerService as Ii, SheetSkeletonManagerService as V, convertPositionSheetOverGridToAbsolute as Ci, ISheetSelectionRenderService as Ve, attachRangeWithCoord as Jn, IEditorBridgeService as Di, IAutoFillService as bi, EditingRenderController as Ri, SetCellEditVisibleOperation as Un, PREDEFINED_HOOK_NAME as Le, COPY_TYPE as Ce, discreteRangeToRange as An, virtualizeDiscreteRanges as yi, ISheetClipboardService as Mi, SetZoomRatioOperation as Nn, SetScrollOperation as Ei, SheetPrintInterceptorService as Ti, getCurrentRangeDisable$ as Oi } from "@univerjs/sheets-ui";
11
- import { ISidebarService as Pi, useDependency as Me, IUIPartsService as Ui, BuiltInUIPart as Ai, connectInjector as qn, ILocalFileService as Ni, IMessageService as ki, IDialogService as Bi, IClipboardInterfaceService as ji, CanvasFloatDomService as Wi, FloatDomSingle as $i, ComponentManager as Qn, getMenuHiddenObservable as ln, MenuItemType as un, RibbonStartGroup as xi, KeyCode as Ye, IMenuManagerService as Li, IShortcutService as Fi } from "@univerjs/ui";
12
- import { takeUntil as kn, throttleTime as Yi, combineLatest as St, switchMap as _e, EMPTY as me, tap as Bn, map as Ee, distinctUntilChanged as jn, Subject as zt, filter as Xi, take as Gi, BehaviorSubject as $e, of as Wn } from "rxjs";
13
- import { SheetInterceptorService as $t, getSheetCommandTarget as ae, SheetsSelectionsService as hn, SetRangeValuesCommand as $n, INTERCEPTOR_POINT as Vi, InterceptCellContentPriority as Hi, WorkbookViewPermission as xn, WorksheetViewPermission as Ln, WorkbookEditablePermission as Qt, WorksheetEditPermission as en, SetFrozenMutation as zi, SetWorksheetRowAutoHeightMutation as Ki, COMMAND_LISTENER_SKELETON_CHANGE as Zi, InsertRowCommand as er, InsertColCommand as tr, RemoveRowCommand as nr, RemoveColCommand as rr, DeleteRangeMoveLeftCommand as ir, DeleteRangeMoveUpCommand as sr, InsertRangeMoveDownCommand as or, InsertRangeMoveRightCommand as ar, DeltaRowHeightCommand as tn, SetRowHeightCommand as nn, DeltaColumnWidthCommand as cr, SetColWidthCommand as dr, SetRowHiddenCommand as lr, SetSpecificRowsVisibleCommand as ur, SetSpecificColsVisibleCommand as hr, SetColHiddenCommand as gr, MoveColsCommand as mr, MoveRowsCommand as fr, MoveRangeCommand as pr, SetRowVisibleMutation as Ji, SetRowHiddenMutation as qi, SetColVisibleMutation as Qi, SetColHiddenMutation as es, SetWorksheetRowHeightMutation as ts, SetWorksheetColWidthMutation as ns, SetWorksheetActiveOperation as rs, RangeProtectionPermissionEditPoint as is } from "@univerjs/sheets";
14
- import { jsx as K, jsxs as Et } from "react/jsx-runtime";
15
- import ss, { useEffect as gn, useMemo as os, forwardRef as wr, useRef as as, createElement as _r, useState as rn } from "react";
16
- import { docDrawingPositionToTransform as Fn, ReplaceSnapshotCommand as cs, InnerPasteCommand as ds } from "@univerjs/docs-ui";
17
- import { MessageType as De, render as ls, unmount as us, clsx as It, RadioGroup as hs, Radio as Kt } from "@univerjs/design";
18
- const gs = "sheets-drawing-ui.config", Yn = {}, F = {
1
+ var xr = Object.defineProperty;
2
+ var Lr = (i, t, e) => t in i ? xr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var te = (i, t, e) => Lr(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { CommandType as J, ICommandService as G, IUndoRedoService as Ge, sequenceExecute as Kn, LocaleService as it, IUniverInstanceService as fe, Inject as A, Injector as Ve, IContextService as Zn, RxDisposable as Fr, UniverInstanceType as L, toDisposable as Yr, FOCUSING_COMMON_DRAWINGS as Ye, DrawingTypeEnum as W, Disposable as ie, ArrangeTypeEnum as _t, createDocumentModelWithStyle as qt, ObjectRelativeFromV as Dn, ObjectRelativeFromH as bn, WrapTextType as Rn, PositionedObjectLayoutType as yn, BooleanNumber as Mn, BuildTextUtils as Qt, ImageSourceType as En, generateRandomId as Et, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as tt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Le, InterceptorEffectEnum as Xr, ObjectMatrix as Gr, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Vr, Tools as Me, IPermissionService as Hr, UserManagerService as zr, LifecycleService as Kr, LifecycleStages as Zr, DisposableCollection as vt, fromEventSubject as Jr, PRINT_CHART_COMPONENT_KEY as qr, Rectangle as Qr, Direction as Ie, FOCUSING_FX_BAR_EDITOR as ei, EDITOR_ACTIVATED as ti, FOCUSING_PANEL_EDITOR as ni, DependentOn as ri, IConfigService as ii, Plugin as si, merge as oi, registerDependencies as ai, touchDependencies as Vt } from "@univerjs/core";
5
+ import { DocDrawingController as ci, UniverDocsDrawingPlugin as di } from "@univerjs/docs-drawing";
6
+ import { SetDrawingSelectedOperation as $t, IImageIoService as Jn, IDrawingManagerService as se, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Tn, DRAWING_IMAGE_COUNT_LIMIT as On, ImageUploadStatusType as Ne, DRAWING_IMAGE_ALLOW_SIZE as Pn, getImageSize as Ht, DRAWING_IMAGE_WIDTH_LIMIT as Un, DRAWING_IMAGE_HEIGHT_LIMIT as An, ImageSourceType as li, getDrawingShapeKeyByDrawingSearch as Ce, UniverDrawingPlugin as ui } from "@univerjs/drawing";
7
+ import { ImageCropperObject as hi, COMPONENT_IMAGE_POPUP_MENU as gi, OpenImageCropOperation as mi, ImageResetSizeOperation as fi, DrawingRenderService as qn, DrawingCommonPanel as pi, UniverDrawingUIPlugin as wi } from "@univerjs/drawing-ui";
8
+ import { IRenderManagerService as q, CURSOR_TYPE as _i, precisionTo as St, transformObjectOutOfGroup as vi, getGroupState as Si, getCurrentTypeOfRenderer as un, RENDER_CLASS_TYPE as ke, Rect as Be, ObjectType as Nn, DRAWING_OBJECT_LAYER_INDEX as zt, SHEET_VIEWPORT_KEY as Qn } from "@univerjs/engine-render";
9
+ import { ISheetDrawingService as oe, DrawingApplyType as P, SetDrawingApplyMutation as U, SheetDrawingAnchorType as O, UniverSheetsDrawingPlugin as Ii } from "@univerjs/sheets-drawing";
10
+ import { SheetCanvasPopManagerService as Ci, HoverManagerService as Di, SheetSkeletonManagerService as H, convertPositionSheetOverGridToAbsolute as bi, ISheetSelectionRenderService as He, attachRangeWithCoord as er, IEditorBridgeService as Ri, IAutoFillService as yi, EditingRenderController as Mi, SetCellEditVisibleOperation as kn, PREDEFINED_HOOK_NAME as Fe, COPY_TYPE as De, discreteRangeToRange as Bn, virtualizeDiscreteRanges as Ei, ISheetClipboardService as Ti, SetZoomRatioOperation as Wn, SetScrollOperation as Oi, SheetPrintInterceptorService as Pi, getCurrentRangeDisable$ as Ui } from "@univerjs/sheets-ui";
11
+ import { ISidebarService as Ai, useDependency as me, IUIPartsService as Ni, BuiltInUIPart as ki, connectInjector as tr, ILocalFileService as Bi, IMessageService as Wi, IDialogService as ji, IClipboardInterfaceService as $i, CanvasFloatDomService as xi, ComponentManager as hn, getMenuHiddenObservable as gn, MenuItemType as mn, RibbonStartGroup as Li, KeyCode as Xe, IMenuManagerService as Fi, IShortcutService as Yi } from "@univerjs/ui";
12
+ import { takeUntil as jn, throttleTime as Xi, combineLatest as It, switchMap as Se, EMPTY as pe, tap as $n, map as Ee, distinctUntilChanged as xn, Subject as Kt, filter as Gi, take as Vi, BehaviorSubject as $e, of as Ln } from "rxjs";
13
+ import { SheetInterceptorService as xt, getSheetCommandTarget as ae, SheetsSelectionsService as fn, SetRangeValuesCommand as Fn, INTERCEPTOR_POINT as Hi, InterceptCellContentPriority as zi, WorkbookViewPermission as Yn, WorksheetViewPermission as Xn, WorkbookEditablePermission as en, WorksheetEditPermission as tn, SetFrozenMutation as Ki, SetWorksheetRowAutoHeightMutation as Zi, COMMAND_LISTENER_SKELETON_CHANGE as Ji, InsertRowCommand as nr, InsertColCommand as rr, RemoveRowCommand as ir, RemoveColCommand as sr, DeleteRangeMoveLeftCommand as or, DeleteRangeMoveUpCommand as ar, InsertRangeMoveDownCommand as cr, InsertRangeMoveRightCommand as dr, DeltaRowHeightCommand as nn, SetRowHeightCommand as rn, DeltaColumnWidthCommand as lr, SetColWidthCommand as ur, SetRowHiddenCommand as hr, SetSpecificRowsVisibleCommand as gr, SetSpecificColsVisibleCommand as mr, SetColHiddenCommand as fr, MoveColsCommand as pr, MoveRowsCommand as wr, MoveRangeCommand as _r, SetRowVisibleMutation as qi, SetRowHiddenMutation as Qi, SetColVisibleMutation as es, SetColHiddenMutation as ts, SetWorksheetRowHeightMutation as ns, SetWorksheetColWidthMutation as rs, SetWorksheetActiveOperation as is, RangeProtectionPermissionEditPoint as ss } from "@univerjs/sheets";
14
+ import { jsx as X, jsxs as Tt } from "react/jsx-runtime";
15
+ import os, { useEffect as pn, memo as as, useRef as xe, useMemo as sn, forwardRef as vr, createElement as Sr, useState as on } from "react";
16
+ import { docDrawingPositionToTransform as Gn, ReplaceSnapshotCommand as cs, InnerPasteCommand as ds } from "@univerjs/docs-ui";
17
+ import { MessageType as be, render as ls, unmount as us, clsx as Ct, RadioGroup as hs, Radio as Zt } from "@univerjs/design";
18
+ const gs = "sheets-drawing-ui.config", Vn = {}, F = {
19
19
  id: "sheet.operation.clear-drawing-transformer",
20
20
  type: J.MUTATION,
21
21
  handler: (i, t) => {
@@ -25,20 +25,20 @@ const gs = "sheets-drawing-ui.config", Yn = {}, F = {
25
25
  (s = (r = e.getRenderById(n)) == null ? void 0 : r.scene.getTransformer()) == null || s.debounceRefreshControls();
26
26
  }), !0;
27
27
  }
28
- }, it = {
28
+ }, st = {
29
29
  id: "sheet.command.remove-sheet-image",
30
30
  type: J.COMMAND,
31
31
  handler: (i, t) => {
32
32
  var S, C, b;
33
- const e = i.get(X), n = i.get(Xe), r = i.get($t), s = i.get(oe);
33
+ const e = i.get(G), n = i.get(Ge), r = i.get(xt), s = i.get(oe);
34
34
  if (!t) return !1;
35
35
  const { drawings: o } = t, a = [];
36
36
  o.forEach((v) => {
37
37
  const { unitId: D } = v;
38
38
  a.push(D);
39
39
  });
40
- const c = s.getBatchRemoveOp(o), { unitId: u, subUnitId: d, undo: l, redo: g, objects: h } = c, f = r.onCommandExecute({ id: it.id, params: t }), p = { id: U.id, params: { unitId: u, subUnitId: d, op: g, objects: h, type: P.REMOVE } }, m = { id: U.id, params: { unitId: u, subUnitId: d, op: l, objects: h, type: P.INSERT } };
41
- return Vn([...(S = f.preRedos) != null ? S : [], p, ...f.redos], e) ? (n.pushUndoRedo({
40
+ const c = s.getBatchRemoveOp(o), { unitId: u, subUnitId: d, undo: l, redo: g, objects: h } = c, f = r.onCommandExecute({ id: st.id, params: t }), p = { id: U.id, params: { unitId: u, subUnitId: d, op: g, objects: h, type: P.REMOVE } }, m = { id: U.id, params: { unitId: u, subUnitId: d, op: l, objects: h, type: P.INSERT } };
41
+ return Kn([...(S = f.preRedos) != null ? S : [], p, ...f.redos], e) ? (n.pushUndoRedo({
42
42
  unitID: u,
43
43
  undoMutations: [
44
44
  ...(C = f.preUndos) != null ? C : [],
@@ -54,19 +54,19 @@ const gs = "sheets-drawing-ui.config", Yn = {}, F = {
54
54
  ]
55
55
  }), !0) : !1;
56
56
  }
57
- }, vr = "COMPONENT_SHEET_DRAWING_PANEL", Sr = {
57
+ }, Ir = "COMPONENT_SHEET_DRAWING_PANEL", Cr = {
58
58
  id: "sidebar.operation.sheet-image",
59
59
  type: J.COMMAND,
60
60
  handler: async (i, t) => {
61
- const e = i.get(Pi), n = i.get(rt), r = i.get(Se), s = i.get(X);
61
+ const e = i.get(Ai), n = i.get(it), r = i.get(fe), s = i.get(G);
62
62
  if (!ae(r)) return !1;
63
63
  switch (t.value) {
64
64
  case "open":
65
65
  e.open({
66
66
  header: { title: n.t("sheetImage.panel.title") },
67
- children: { label: vr },
67
+ children: { label: Ir },
68
68
  onClose: () => {
69
- s.syncExecuteCommand(Wt.id, []);
69
+ s.syncExecuteCommand($t.id, []);
70
70
  },
71
71
  width: 360
72
72
  });
@@ -78,45 +78,45 @@ const gs = "sheets-drawing-ui.config", Yn = {}, F = {
78
78
  }
79
79
  return !0;
80
80
  }
81
- }, Ir = {
81
+ }, Dr = {
82
82
  id: "sheet.operation.edit-sheet-image",
83
83
  type: J.OPERATION,
84
84
  handler: (i, t) => {
85
- const e = i.get(X);
86
- return t == null ? !1 : (e.syncExecuteCommand(Wt.id, [t]), e.executeCommand(Sr.id, { value: "open" }), !0);
85
+ const e = i.get(G);
86
+ return t == null ? !1 : (e.syncExecuteCommand($t.id, [t]), e.executeCommand(Cr.id, { value: "open" }), !0);
87
87
  }
88
- }, ms = "univer-upload-loading", fs = "univer-upload-loading-body", ps = "univer-upload-loading-body-animation", ws = "univer-upload-loading-body-text", Ct = {
88
+ }, ms = "univer-upload-loading", fs = "univer-upload-loading-body", ps = "univer-upload-loading-body-animation", ws = "univer-upload-loading-body-text", Dt = {
89
89
  uploadLoading: ms,
90
90
  uploadLoadingBody: fs,
91
91
  uploadLoadingBodyAnimation: ps,
92
92
  uploadLoadingBodyText: ws
93
93
  }, _s = () => {
94
- const i = Me(zn), t = Me(rt), [e, n] = ss.useState(0);
95
- return gn(() => {
94
+ const i = me(Jn), t = me(it), [e, n] = os.useState(0);
95
+ return pn(() => {
96
96
  const r = i.change$.subscribe((s) => {
97
97
  n(s);
98
98
  });
99
99
  return () => {
100
100
  r.unsubscribe();
101
101
  };
102
- }, [i]), /* @__PURE__ */ K("div", { style: { display: e > 0 ? "block" : "none" }, className: Ct.uploadLoading, children: /* @__PURE__ */ Et("div", { className: Ct.uploadLoadingBody, children: [
103
- /* @__PURE__ */ K("div", { className: Ct.uploadLoadingBodyAnimation }),
104
- /* @__PURE__ */ K("div", { className: Ct.uploadLoadingBodyText, children: `${t.t("uploadLoading.loading")}: ${e}` })
102
+ }, [i]), /* @__PURE__ */ X("div", { style: { display: e > 0 ? "block" : "none" }, className: Dt.uploadLoading, children: /* @__PURE__ */ Tt("div", { className: Dt.uploadLoadingBody, children: [
103
+ /* @__PURE__ */ X("div", { className: Dt.uploadLoadingBodyAnimation }),
104
+ /* @__PURE__ */ X("div", { className: Dt.uploadLoadingBodyText, children: `${t.t("uploadLoading.loading")}: ${e}` })
105
105
  ] }) });
106
106
  };
107
107
  var vs = Object.getOwnPropertyDescriptor, Ss = (i, t, e, n) => {
108
108
  for (var r = n > 1 ? void 0 : n ? vs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
109
109
  (o = i[s]) && (r = o(r) || r);
110
110
  return r;
111
- }, fe = (i, t) => (e, n) => t(e, n, i);
112
- let Tt = class extends xr {
111
+ }, we = (i, t) => (e, n) => t(e, n, i);
112
+ let Ot = class extends Fr {
113
113
  constructor(t, e, n, r, s, o, a, c) {
114
114
  super();
115
115
  te(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
116
116
  this._injector = t, this._drawingManagerService = e, this._canvasPopManagerService = n, this._renderManagerService = r, this._univerInstanceService = s, this._contextService = o, this._uiPartsService = a, this._commandService = c, this._init();
117
117
  }
118
118
  _init() {
119
- this._univerInstanceService.getCurrentTypeOfUnit$(x.UNIVER_SHEET).pipe(kn(this.dispose$)).subscribe((t) => this._create(t)), this._univerInstanceService.getTypeOfUnitDisposed$(x.UNIVER_SHEET).pipe(kn(this.dispose$)).subscribe((t) => this._dispose(t)), this._univerInstanceService.getAllUnitsForType(x.UNIVER_SHEET).forEach((t) => this._create(t)), this._uiPartsService.registerComponent(Ai.CONTENT, () => qn(_s, this._injector));
119
+ this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET).pipe(jn(this.dispose$)).subscribe((t) => this._create(t)), this._univerInstanceService.getTypeOfUnitDisposed$(L.UNIVER_SHEET).pipe(jn(this.dispose$)).subscribe((t) => this._dispose(t)), this._univerInstanceService.getAllUnitsForType(L.UNIVER_SHEET).forEach((t) => this._create(t)), this._uiPartsService.registerComponent(ki.CONTENT, () => tr(_s, this._injector));
120
120
  }
121
121
  _dispose(t) {
122
122
  const e = t.getUnitId();
@@ -131,7 +131,7 @@ let Tt = class extends xr {
131
131
  _hasCropObject(t) {
132
132
  const e = t.getAllObjectsByOrder();
133
133
  for (const n of e)
134
- if (n instanceof li)
134
+ if (n instanceof hi)
135
135
  return !0;
136
136
  return !1;
137
137
  }
@@ -145,9 +145,9 @@ let Tt = class extends xr {
145
145
  return;
146
146
  let r;
147
147
  this.disposeWithMe(
148
- Lr(
148
+ Yr(
149
149
  n.createControl$.subscribe(() => {
150
- if (this._contextService.setContextValue(Fe, !0), this._hasCropObject(e))
150
+ if (this._contextService.setContextValue(Ye, !0), this._hasCropObject(e))
151
151
  return;
152
152
  const o = n.getSelectedObjectMap();
153
153
  if (o.size > 1) {
@@ -166,7 +166,7 @@ let Tt = class extends xr {
166
166
  r == null || r.dispose();
167
167
  const p = this._canvasPopManagerService.getFeatureMenu(d, l, g, h);
168
168
  r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(a, {
169
- componentKey: ui,
169
+ componentKey: gi,
170
170
  direction: "horizontal",
171
171
  offset: [2, 0],
172
172
  extraProps: {
@@ -177,11 +177,11 @@ let Tt = class extends xr {
177
177
  )
178
178
  ), this.disposeWithMe(
179
179
  n.clearControl$.subscribe(() => {
180
- r == null || r.dispose(), this._contextService.setContextValue(Fe, !1), this._commandService.syncExecuteCommand(Wt.id, []);
180
+ r == null || r.dispose(), this._contextService.setContextValue(Ye, !1), this._commandService.syncExecuteCommand($t.id, []);
181
181
  })
182
182
  ), this.disposeWithMe(
183
183
  this._contextService.contextChanged$.subscribe((o) => {
184
- o[Fe] === !1 && (r == null || r.dispose());
184
+ o[Ye] === !1 && (r == null || r.dispose());
185
185
  })
186
186
  ), this.disposeWithMe(
187
187
  n.changing$.subscribe(() => {
@@ -194,60 +194,60 @@ let Tt = class extends xr {
194
194
  {
195
195
  label: "image-popup.edit",
196
196
  index: 0,
197
- commandId: Ir.id,
197
+ commandId: Dr.id,
198
198
  commandParams: { unitId: t, subUnitId: e, drawingId: n },
199
- disable: r === L.DRAWING_DOM
199
+ disable: r === W.DRAWING_DOM
200
200
  },
201
201
  {
202
202
  label: "image-popup.delete",
203
203
  index: 1,
204
- commandId: it.id,
204
+ commandId: st.id,
205
205
  commandParams: { unitId: t, drawings: [{ unitId: t, subUnitId: e, drawingId: n }] },
206
206
  disable: !1
207
207
  },
208
208
  {
209
209
  label: "image-popup.crop",
210
210
  index: 2,
211
- commandId: hi.id,
211
+ commandId: mi.id,
212
212
  commandParams: { unitId: t, subUnitId: e, drawingId: n },
213
- disable: r === L.DRAWING_DOM
213
+ disable: r === W.DRAWING_DOM
214
214
  },
215
215
  {
216
216
  label: "image-popup.reset",
217
217
  index: 3,
218
- commandId: gi.id,
218
+ commandId: fi.id,
219
219
  commandParams: [{ unitId: t, subUnitId: e, drawingId: n }],
220
- disable: r === L.DRAWING_DOM
220
+ disable: r === W.DRAWING_DOM
221
221
  }
222
222
  ];
223
223
  }
224
224
  };
225
- Tt = Ss([
226
- fe(0, A(Ge)),
227
- fe(1, se),
228
- fe(2, A(Si)),
229
- fe(3, q),
230
- fe(4, Se),
231
- fe(5, Hn),
232
- fe(6, A(Ui)),
233
- fe(7, X)
234
- ], Tt);
225
+ Ot = Ss([
226
+ we(0, A(Ve)),
227
+ we(1, se),
228
+ we(2, A(Ci)),
229
+ we(3, q),
230
+ we(4, fe),
231
+ we(5, Zn),
232
+ we(6, A(Ni)),
233
+ we(7, G)
234
+ ], Ot);
235
235
  var Is = Object.getOwnPropertyDescriptor, Cs = (i, t, e, n) => {
236
236
  for (var r = n > 1 ? void 0 : n ? Is(t, e) : t, s = i.length - 1, o; s >= 0; s--)
237
237
  (o = i[s]) && (r = o(r) || r);
238
238
  return r;
239
- }, Dt = (i, t) => (e, n) => t(e, n, i);
240
- let sn = class extends ie {
239
+ }, bt = (i, t) => (e, n) => t(e, n, i);
240
+ let an = class extends ie {
241
241
  constructor(t, e, n, r, s) {
242
242
  super();
243
243
  te(this, "_isSetCursor", !1);
244
244
  this._context = t, this._hoverManagerService = e, this._selectionsService = n, this._drawingRenderService = r, this._sheetSkeletonManagerService = s, this._initHover(), this._initImageClick();
245
245
  }
246
246
  _initHover() {
247
- this.disposeWithMe(this._hoverManagerService.currentRichTextNoDistinct$.pipe(Yi(33)).subscribe((t) => {
247
+ this.disposeWithMe(this._hoverManagerService.currentRichTextNoDistinct$.pipe(Xi(33)).subscribe((t) => {
248
248
  var n, r;
249
249
  let e = [];
250
- t !== null && (e = this._selectionsService.getWorkbookSelections(this._context.unitId).getCurrentSelections()), e.length > 0 && (t == null ? void 0 : t.unitId) === this._context.unitId && (t != null && t.drawing) && e.length === 1 && ((n = e[0].primary) == null ? void 0 : n.actualRow) === t.row && ((r = e[0].primary) == null ? void 0 : r.actualColumn) === t.col ? (this._isSetCursor = !0, this._context.scene.setCursor(pi.ZOOM_IN)) : this._isSetCursor && (this._isSetCursor = !1, this._context.scene.resetCursor());
250
+ t !== null && (e = this._selectionsService.getWorkbookSelections(this._context.unitId).getCurrentSelections()), e.length > 0 && (t == null ? void 0 : t.unitId) === this._context.unitId && (t != null && t.drawing) && e.length === 1 && ((n = e[0].primary) == null ? void 0 : n.actualRow) === t.row && ((r = e[0].primary) == null ? void 0 : r.actualColumn) === t.col ? (this._isSetCursor = !0, this._context.scene.setCursor(_i.ZOOM_IN)) : this._isSetCursor && (this._isSetCursor = !1, this._context.scene.resetCursor());
251
251
  }));
252
252
  }
253
253
  _initImageClick() {
@@ -261,25 +261,25 @@ let sn = class extends ie {
261
261
  }));
262
262
  }
263
263
  };
264
- sn = Cs([
265
- Dt(1, A(Ii)),
266
- Dt(2, A(hn)),
267
- Dt(3, A(Kn)),
268
- Dt(4, A(V))
269
- ], sn);
270
- function z(i, t, e) {
264
+ an = Cs([
265
+ bt(1, A(Di)),
266
+ bt(2, A(fn)),
267
+ bt(3, A(qn)),
268
+ bt(4, A(H))
269
+ ], an);
270
+ function K(i, t, e) {
271
271
  const { from: n, to: r, flipY: s = !1, flipX: o = !1, angle: a = 0, skewX: c = 0, skewY: u = 0 } = i, d = e.getCurrent();
272
272
  if (d == null)
273
273
  return;
274
- const l = Ci(
274
+ const l = bi(
275
275
  d.unitId,
276
276
  d.sheetId,
277
277
  { from: n, to: r },
278
278
  e
279
279
  );
280
280
  let { left: g, top: h, width: f, height: p } = l;
281
- const m = e.getCurrentSkeleton(), _ = m.rowHeaderWidth + m.columnTotalWidth, S = m.columnHeaderHeight + m.rowTotalHeight;
282
- return g + f > _ && (g = _ - f), h + p > S && (h = S - p), {
281
+ const m = e.getCurrentSkeleton(), w = m.rowHeaderWidth + m.columnTotalWidth, S = m.columnHeaderHeight + m.rowTotalHeight;
282
+ return g + f > w && (g = w - f), h + p > S && (h = S - p), {
283
283
  flipY: s,
284
284
  flipX: o,
285
285
  angle: a,
@@ -291,23 +291,23 @@ function z(i, t, e) {
291
291
  height: p
292
292
  };
293
293
  }
294
- function $(i, t) {
294
+ function x(i, t) {
295
295
  const { left: e = 0, top: n = 0, width: r = 0, height: s = 0, flipY: o = !1, flipX: a = !1, angle: c = 0, skewX: u = 0, skewY: d = 0 } = i, l = t.getCellWithCoordByOffset(e, n);
296
296
  if (l == null)
297
297
  return;
298
298
  const g = {
299
299
  column: l.actualColumn,
300
- columnOffset: vt(e - l.startX, 1),
300
+ columnOffset: St(e - l.startX, 1),
301
301
  row: l.actualRow,
302
- rowOffset: vt(n - l.startY, 1)
302
+ rowOffset: St(n - l.startY, 1)
303
303
  }, h = t.getCellWithCoordByOffset(e + r, n + s);
304
304
  if (h == null)
305
305
  return;
306
306
  const f = {
307
307
  column: h.actualColumn,
308
- columnOffset: vt(e + r - h.startX, 1),
308
+ columnOffset: St(e + r - h.startX, 1),
309
309
  row: h.actualRow,
310
- rowOffset: vt(n + s - h.startY, 1)
310
+ rowOffset: St(n + s - h.startY, 1)
311
311
  };
312
312
  return {
313
313
  flipY: o,
@@ -323,8 +323,8 @@ var Ds = Object.getOwnPropertyDescriptor, bs = (i, t, e, n) => {
323
323
  for (var r = n > 1 ? void 0 : n ? Ds(t, e) : t, s = i.length - 1, o; s >= 0; s--)
324
324
  (o = i[s]) && (r = o(r) || r);
325
325
  return r;
326
- }, bt = (i, t) => (e, n) => t(e, n, i);
327
- let on = class extends ie {
326
+ }, Rt = (i, t) => (e, n) => t(e, n, i);
327
+ let cn = class extends ie {
328
328
  constructor(i, t, e, n, r) {
329
329
  super(), this._context = i, this._sheetDrawingService = t, this._drawingManagerService = e, this._sheetSelectionRenderService = n, this._sheetSkeletonManagerService = r, this._init();
330
330
  }
@@ -338,22 +338,22 @@ let on = class extends ie {
338
338
  const e = i[t];
339
339
  for (const n in e.data) {
340
340
  const r = e.data[n];
341
- r.transform = z(r.sheetTransform, this._sheetSelectionRenderService, this._sheetSkeletonManagerService);
341
+ r.transform = K(r.sheetTransform, this._sheetSelectionRenderService, this._sheetSkeletonManagerService);
342
342
  }
343
343
  }
344
344
  this._drawingManagerService.registerDrawingData(this._context.unitId, this._sheetDrawingService.getDrawingDataForUnit(this._context.unitId)), this._drawingManagerService.initializeNotification(this._context.unitId);
345
345
  }
346
346
  };
347
- on = bs([
348
- bt(1, oe),
349
- bt(2, se),
350
- bt(3, A(Ve)),
351
- bt(4, A(V))
352
- ], on);
347
+ cn = bs([
348
+ Rt(1, oe),
349
+ Rt(2, se),
350
+ Rt(3, A(He)),
351
+ Rt(4, A(H))
352
+ ], cn);
353
353
  function Rs(i) {
354
354
  const t = [];
355
355
  return i.forEach((e) => {
356
- const { parent: n, children: r } = e, { unitId: s, subUnitId: o, drawingId: a } = n, c = _i(0, 0, r.map((l) => l.transform || {})), u = r.map((l) => {
356
+ const { parent: n, children: r } = e, { unitId: s, subUnitId: o, drawingId: a } = n, c = Si(0, 0, r.map((l) => l.transform || {})), u = r.map((l) => {
357
357
  const g = l.transform || { left: 0, top: 0 }, { unitId: h, subUnitId: f, drawingId: p } = l;
358
358
  return {
359
359
  unitId: h,
@@ -370,7 +370,7 @@ function Rs(i) {
370
370
  unitId: s,
371
371
  subUnitId: o,
372
372
  drawingId: a,
373
- drawingType: L.DRAWING_GROUP,
373
+ drawingType: W.DRAWING_GROUP,
374
374
  transform: c
375
375
  };
376
376
  t.push({
@@ -386,7 +386,7 @@ function ys(i) {
386
386
  if (c == null)
387
387
  return;
388
388
  const u = r.map((l) => {
389
- const { transform: g } = l, { unitId: h, subUnitId: f, drawingId: p } = l, m = wi(g || {}, c, c.width || 0, c.height || 0);
389
+ const { transform: g } = l, { unitId: h, subUnitId: f, drawingId: p } = l, m = vi(g || {}, c, c.width || 0, c.height || 0);
390
390
  return {
391
391
  unitId: h,
392
392
  subUnitId: f,
@@ -398,7 +398,7 @@ function ys(i) {
398
398
  unitId: s,
399
399
  subUnitId: o,
400
400
  drawingId: a,
401
- drawingType: L.DRAWING_GROUP,
401
+ drawingType: W.DRAWING_GROUP,
402
402
  transform: {
403
403
  left: 0,
404
404
  top: 0
@@ -410,11 +410,11 @@ function ys(i) {
410
410
  });
411
411
  }), t;
412
412
  }
413
- const Cr = {
413
+ const br = {
414
414
  id: "sheet.command.group-sheet-image",
415
415
  type: J.COMMAND,
416
416
  handler: (i, t) => {
417
- const e = i.get(X), n = i.get(Xe), r = i.get(oe);
417
+ const e = i.get(G), n = i.get(Ge), r = i.get(oe);
418
418
  if (!t) return !1;
419
419
  const s = [];
420
420
  t.forEach(({ parent: h, children: f }) => {
@@ -435,15 +435,15 @@ const Cr = {
435
435
  ]
436
436
  }), !0) : !1;
437
437
  }
438
- }, xt = {
438
+ }, Lt = {
439
439
  id: "sheet.command.insert-sheet-image",
440
440
  type: J.COMMAND,
441
441
  handler: (i, t) => {
442
442
  var S, C, b;
443
- const e = i.get(X), n = i.get(Xe), r = i.get(oe), s = i.get($t);
443
+ const e = i.get(G), n = i.get(Ge), r = i.get(oe), s = i.get(xt);
444
444
  if (!t) return !1;
445
- const o = t.drawings, a = o.map((v) => v.unitId), c = r.getBatchAddOp(o), { unitId: u, subUnitId: d, undo: l, redo: g, objects: h } = c, f = s.onCommandExecute({ id: xt.id, params: t }), p = { id: U.id, params: { op: g, unitId: u, subUnitId: d, objects: h, type: P.INSERT } }, m = { id: U.id, params: { op: l, unitId: u, subUnitId: d, objects: h, type: P.REMOVE } };
446
- return Vn([...(S = f.preRedos) != null ? S : [], p, ...f.redos], e) ? (n.pushUndoRedo({
445
+ const o = t.drawings, a = o.map((v) => v.unitId), c = r.getBatchAddOp(o), { unitId: u, subUnitId: d, undo: l, redo: g, objects: h } = c, f = s.onCommandExecute({ id: Lt.id, params: t }), p = { id: U.id, params: { op: g, unitId: u, subUnitId: d, objects: h, type: P.INSERT } }, m = { id: U.id, params: { op: l, unitId: u, subUnitId: d, objects: h, type: P.REMOVE } };
446
+ return Kn([...(S = f.preRedos) != null ? S : [], p, ...f.redos], e) ? (n.pushUndoRedo({
447
447
  unitID: u,
448
448
  undoMutations: [
449
449
  ...(C = f.preUndos) != null ? C : [],
@@ -459,15 +459,15 @@ const Cr = {
459
459
  ]
460
460
  }), !0) : !1;
461
461
  }
462
- }, Dr = {
462
+ }, Rr = {
463
463
  id: "sheet.command.set-drawing-arrange",
464
464
  type: J.COMMAND,
465
465
  handler: (i, t) => {
466
- const e = i.get(X), n = i.get(Xe);
466
+ const e = i.get(G), n = i.get(Ge);
467
467
  if (!t) return !1;
468
468
  const r = i.get(oe), { unitId: s, subUnitId: o, drawingIds: a, arrangeType: c } = t, u = { unitId: s, subUnitId: o, drawingIds: a };
469
469
  let d;
470
- if (c === wt.forward ? d = r.getForwardDrawingsOp(u) : c === wt.backward ? d = r.getBackwardDrawingOp(u) : c === wt.front ? d = r.getFrontDrawingsOp(u) : c === wt.back && (d = r.getBackDrawingsOp(u)), d == null)
470
+ if (c === _t.forward ? d = r.getForwardDrawingsOp(u) : c === _t.backward ? d = r.getBackwardDrawingOp(u) : c === _t.front ? d = r.getFrontDrawingsOp(u) : c === _t.back && (d = r.getBackDrawingsOp(u)), d == null)
471
471
  return !1;
472
472
  const { objects: l, redo: g, undo: h } = d;
473
473
  return e.syncExecuteCommand(U.id, { op: g, unitId: s, subUnitId: o, objects: l, type: P.ARRANGE }) ? (n.pushUndoRedo({
@@ -480,11 +480,11 @@ const Cr = {
480
480
  ]
481
481
  }), !0) : !1;
482
482
  }
483
- }, Lt = {
483
+ }, Ft = {
484
484
  id: "sheet.command.set-sheet-image",
485
485
  type: J.COMMAND,
486
486
  handler: (i, t) => {
487
- const e = i.get(X), n = i.get(Xe), r = i.get(oe);
487
+ const e = i.get(G), n = i.get(Ge), r = i.get(oe);
488
488
  if (!t) return !1;
489
489
  const { drawings: s } = t, o = r.getBatchUpdateOp(s), { unitId: a, subUnitId: c, undo: u, redo: d, objects: l } = o;
490
490
  return e.syncExecuteCommand(U.id, { unitId: a, subUnitId: c, op: d, objects: l, type: P.UPDATE }) ? (n.pushUndoRedo({
@@ -499,11 +499,11 @@ const Cr = {
499
499
  ]
500
500
  }), !0) : !1;
501
501
  }
502
- }, br = {
502
+ }, yr = {
503
503
  id: "sheet.command.ungroup-sheet-image",
504
504
  type: J.COMMAND,
505
505
  handler: (i, t) => {
506
- const e = i.get(X), n = i.get(Xe), r = i.get(oe);
506
+ const e = i.get(G), n = i.get(Ge), r = i.get(oe);
507
507
  if (!t) return !1;
508
508
  const s = [];
509
509
  t.forEach(({ parent: h, children: f }) => {
@@ -534,21 +534,21 @@ function Ts(i, t, e) {
534
534
  const n = e * Math.PI / 180, r = Math.abs(i * Math.cos(n)) + Math.abs(t * Math.sin(n)), s = Math.abs(i * Math.sin(n)) + Math.abs(t * Math.cos(n));
535
535
  return { rotatedWidth: r, rotatedHeight: s };
536
536
  }
537
- function an(i, t, e, n, r) {
537
+ function dn(i, t, e, n, r) {
538
538
  var S;
539
539
  const { rotatedHeight: s, rotatedWidth: o } = Ts(e, n, r), c = i.get(q).getRenderById(t.unitId);
540
540
  if (!c)
541
541
  return !1;
542
- const d = (S = c.with(V).getSkeletonParam(t.subUnitId)) == null ? void 0 : S.skeleton;
542
+ const d = (S = c.with(H).getSkeletonParam(t.subUnitId)) == null ? void 0 : S.skeleton;
543
543
  if (d == null)
544
544
  return !1;
545
- const l = d.getCellByIndex(t.row, t.col), g = l.mergeInfo.endX - l.mergeInfo.startX - 2, h = l.mergeInfo.endY - l.mergeInfo.startY - 2, f = o / s, m = Math.ceil(Math.min(g, h * f)) / o, _ = !m || Number.isNaN(m) ? 1e-3 : m;
545
+ const l = d.getCellByIndex(t.row, t.col), g = l.mergeInfo.endX - l.mergeInfo.startX - 2, h = l.mergeInfo.endY - l.mergeInfo.startY - 2, f = o / s, m = Math.ceil(Math.min(g, h * f)) / o, w = !m || Number.isNaN(m) ? 1e-3 : m;
546
546
  return {
547
- width: e * _,
548
- height: n * _
547
+ width: e * w,
548
+ height: n * w
549
549
  };
550
550
  }
551
- let tt = class extends ie {
551
+ let nt = class extends ie {
552
552
  constructor(t, e, n, r, s, o, a, c, u, d, l, g, h) {
553
553
  super();
554
554
  te(this, "_workbookSelections");
@@ -557,17 +557,17 @@ let tt = class extends ie {
557
557
  async insertFloatImage() {
558
558
  const t = await this._fileOpenerService.openFile({
559
559
  multiple: !0,
560
- accept: yn.map((n) => `.${n.replace("image/", "")}`).join(",")
560
+ accept: Tn.map((n) => `.${n.replace("image/", "")}`).join(",")
561
561
  }), e = t.length;
562
- return e > Mn ? (this._messageService.show({
563
- type: De.Error,
564
- content: this._localeService.t("update-status.exceedMaxCount", String(Mn))
562
+ return e > On ? (this._messageService.show({
563
+ type: be.Error,
564
+ content: this._localeService.t("update-status.exceedMaxCount", String(On))
565
565
  }), !1) : e === 0 ? !1 : (t.forEach(async (n) => await this.insertFloatImageByFile(n)), !0);
566
566
  }
567
567
  async insertCellImage() {
568
568
  const e = (await this._fileOpenerService.openFile({
569
569
  multiple: !1,
570
- accept: yn.map((n) => `.${n.replace("image/", "")}`).join(",")
570
+ accept: Tn.map((n) => `.${n.replace("image/", "")}`).join(",")
571
571
  }))[0];
572
572
  return e ? (await this._insertCellImage(e), !0) : !1;
573
573
  }
@@ -581,70 +581,70 @@ let tt = class extends ie {
581
581
  } catch (S) {
582
582
  const C = S.message;
583
583
  C === Ne.ERROR_EXCEED_SIZE ? this._messageService.show({
584
- type: De.Error,
585
- content: this._localeService.t("update-status.exceedMaxSize", String(En / (1024 * 1024)))
584
+ type: be.Error,
585
+ content: this._localeService.t("update-status.exceedMaxSize", String(Pn / (1024 * 1024)))
586
586
  }) : C === Ne.ERROR_IMAGE_TYPE ? this._messageService.show({
587
- type: De.Error,
587
+ type: be.Error,
588
588
  content: this._localeService.t("update-status.invalidImageType")
589
589
  }) : C === Ne.ERROR_IMAGE && this._messageService.show({
590
- type: De.Error,
590
+ type: be.Error,
591
591
  content: this._localeService.t("update-status.invalidImage")
592
592
  });
593
593
  }
594
594
  if (e == null)
595
595
  return;
596
- const n = this._getUnitInfo(), { unitId: r, subUnitId: s } = n, { imageId: o, imageSourceType: a, source: c, base64Cache: u } = e, { width: d, height: l, image: g } = await Vt(u || ""), { width: h, height: f } = this._context.scene;
596
+ const n = this._getUnitInfo(), { unitId: r, subUnitId: s } = n, { imageId: o, imageSourceType: a, source: c, base64Cache: u } = e, { width: d, height: l, image: g } = await Ht(u || ""), { width: h, height: f } = this._context.scene;
597
597
  this._imageIoService.addImageSourceCache(c, a, g);
598
598
  let p = 1;
599
- if (d > Tn || l > On) {
600
- const S = Tn / d, C = On / l;
599
+ if (d > Un || l > An) {
600
+ const S = Un / d, C = An / l;
601
601
  p = Math.max(S, C);
602
602
  }
603
603
  const m = this._getImagePosition(d * p, l * p, h, f);
604
604
  if (m == null)
605
605
  return;
606
- const _ = {
606
+ const w = {
607
607
  unitId: r,
608
608
  subUnitId: s,
609
609
  drawingId: o,
610
- drawingType: L.DRAWING_IMAGE,
610
+ drawingType: W.DRAWING_IMAGE,
611
611
  imageSourceType: a,
612
612
  source: c,
613
- transform: z(m, this._selectionRenderService, this._skeletonManagerService),
613
+ transform: K(m, this._selectionRenderService, this._skeletonManagerService),
614
614
  sheetTransform: m
615
615
  };
616
- return this._commandService.executeCommand(xt.id, {
616
+ return this._commandService.executeCommand(Lt.id, {
617
617
  unitId: r,
618
- drawings: [_]
618
+ drawings: [w]
619
619
  });
620
620
  }
621
621
  // eslint-disable-next-line max-lines-per-function
622
622
  async _insertCellImage(t, e) {
623
- var _, S;
623
+ var w, S;
624
624
  let n;
625
625
  try {
626
626
  n = await this._imageIoService.saveImage(t);
627
627
  } catch (C) {
628
628
  const b = C.message;
629
629
  b === Ne.ERROR_EXCEED_SIZE ? this._messageService.show({
630
- type: De.Error,
631
- content: this._localeService.t("update-status.exceedMaxSize", String(En / (1024 * 1024)))
630
+ type: be.Error,
631
+ content: this._localeService.t("update-status.exceedMaxSize", String(Pn / (1024 * 1024)))
632
632
  }) : b === Ne.ERROR_IMAGE_TYPE ? this._messageService.show({
633
- type: De.Error,
633
+ type: be.Error,
634
634
  content: this._localeService.t("update-status.invalidImageType")
635
635
  }) : b === Ne.ERROR_IMAGE && this._messageService.show({
636
- type: De.Error,
636
+ type: be.Error,
637
637
  content: this._localeService.t("update-status.invalidImage")
638
638
  });
639
639
  }
640
640
  if (n == null)
641
641
  return !1;
642
- const { imageId: r, imageSourceType: s, source: o, base64Cache: a } = n, { width: c, height: u, image: d } = await Vt(a || "");
642
+ const { imageId: r, imageSourceType: s, source: o, base64Cache: a } = n, { width: c, height: u, image: d } = await Ht(a || "");
643
643
  this._imageIoService.addImageSourceCache(o, s, d);
644
644
  const l = this._workbookSelections.getCurrentLastSelection();
645
645
  if (!l)
646
646
  return !1;
647
- const g = Jt("", {}), h = an(
647
+ const g = qt("", {}), h = dn(
648
648
  this._injector,
649
649
  {
650
650
  unitId: this._context.unitId,
@@ -664,11 +664,11 @@ let tt = class extends ie {
664
664
  height: h.height
665
665
  },
666
666
  positionH: {
667
- relativeFrom: In.PAGE,
667
+ relativeFrom: bn.PAGE,
668
668
  posOffset: 0
669
669
  },
670
670
  positionV: {
671
- relativeFrom: Sn.PARAGRAPH,
671
+ relativeFrom: Dn.PARAGRAPH,
672
672
  posOffset: 0
673
673
  },
674
674
  angle: 0
@@ -676,22 +676,22 @@ let tt = class extends ie {
676
676
  unitId: g.getUnitId(),
677
677
  subUnitId: g.getUnitId(),
678
678
  drawingId: r,
679
- drawingType: L.DRAWING_IMAGE,
679
+ drawingType: W.DRAWING_IMAGE,
680
680
  imageSourceType: s,
681
681
  source: o,
682
- transform: Fn(f),
682
+ transform: Gn(f),
683
683
  docTransform: f,
684
- behindDoc: bn.FALSE,
684
+ behindDoc: Mn.FALSE,
685
685
  title: "",
686
686
  description: "",
687
- layoutType: Dn.INLINE,
687
+ layoutType: yn.INLINE,
688
688
  // Insert inline drawing by default.
689
- wrapText: Cn.BOTH_SIDES,
689
+ wrapText: Rn.BOTH_SIDES,
690
690
  distB: 0,
691
691
  distL: 0,
692
692
  distR: 0,
693
693
  distT: 0
694
- }, m = qt.drawing.add({
694
+ }, m = Qt.drawing.add({
695
695
  documentDataModel: g,
696
696
  drawings: [p],
697
697
  selection: {
@@ -700,9 +700,9 @@ let tt = class extends ie {
700
700
  endOffset: 0
701
701
  }
702
702
  });
703
- return m ? (g.apply(m), this._commandService.syncExecuteCommand($n.id, {
703
+ return m ? (g.apply(m), this._commandService.syncExecuteCommand(Fn.id, {
704
704
  value: {
705
- [(_ = e == null ? void 0 : e.row) != null ? _ : l.primary.actualRow]: {
705
+ [(w = e == null ? void 0 : e.row) != null ? w : l.primary.actualRow]: {
706
706
  [(S = e == null ? void 0 : e.col) != null ? S : l.primary.actualColumn]: {
707
707
  p: g.getSnapshot(),
708
708
  t: 1
@@ -716,12 +716,12 @@ let tt = class extends ie {
716
716
  // eslint-disable-next-line max-lines-per-function
717
717
  async insertCellImageByUrl(t, e) {
718
718
  var g, h;
719
- const { width: n, height: r, image: s } = await Vt(t || "");
720
- this._imageIoService.addImageSourceCache(t, Rn.URL, s);
719
+ const { width: n, height: r, image: s } = await Ht(t || "");
720
+ this._imageIoService.addImageSourceCache(t, En.URL, s);
721
721
  const o = this._workbookSelections.getCurrentLastSelection();
722
722
  if (!o)
723
723
  return !1;
724
- const a = Jt("", {}), c = an(
724
+ const a = qt("", {}), c = dn(
725
725
  this._injector,
726
726
  {
727
727
  unitId: this._context.unitId,
@@ -741,34 +741,34 @@ let tt = class extends ie {
741
741
  height: c.height
742
742
  },
743
743
  positionH: {
744
- relativeFrom: In.PAGE,
744
+ relativeFrom: bn.PAGE,
745
745
  posOffset: 0
746
746
  },
747
747
  positionV: {
748
- relativeFrom: Sn.PARAGRAPH,
748
+ relativeFrom: Dn.PARAGRAPH,
749
749
  posOffset: 0
750
750
  },
751
751
  angle: 0
752
752
  }, d = {
753
753
  unitId: a.getUnitId(),
754
754
  subUnitId: a.getUnitId(),
755
- drawingId: Mt(),
756
- drawingType: L.DRAWING_IMAGE,
757
- imageSourceType: Rn.URL,
755
+ drawingId: Et(),
756
+ drawingType: W.DRAWING_IMAGE,
757
+ imageSourceType: En.URL,
758
758
  source: t,
759
- transform: Fn(u),
759
+ transform: Gn(u),
760
760
  docTransform: u,
761
- behindDoc: bn.FALSE,
761
+ behindDoc: Mn.FALSE,
762
762
  title: "",
763
763
  description: "",
764
- layoutType: Dn.INLINE,
764
+ layoutType: yn.INLINE,
765
765
  // Insert inline drawing by default.
766
- wrapText: Cn.BOTH_SIDES,
766
+ wrapText: Rn.BOTH_SIDES,
767
767
  distB: 0,
768
768
  distL: 0,
769
769
  distR: 0,
770
770
  distT: 0
771
- }, l = qt.drawing.add({
771
+ }, l = Qt.drawing.add({
772
772
  documentDataModel: a,
773
773
  drawings: [d],
774
774
  selection: {
@@ -777,7 +777,7 @@ let tt = class extends ie {
777
777
  endOffset: 0
778
778
  }
779
779
  });
780
- return l ? (a.apply(l), this._commandService.syncExecuteCommand($n.id, {
780
+ return l ? (a.apply(l), this._commandService.syncExecuteCommand(Fn.id, {
781
781
  value: {
782
782
  [(g = e == null ? void 0 : e.row) != null ? g : o.primary.actualRow]: {
783
783
  [(h = e == null ? void 0 : e.col) != null ? h : o.primary.actualColumn]: {
@@ -806,7 +806,7 @@ let tt = class extends ie {
806
806
  endColumn: 0
807
807
  };
808
808
  s && s.length > 0 && (o = s[s.length - 1].range);
809
- const a = Jn(this._skeletonManagerService.getCurrent().skeleton, o);
809
+ const a = er(this._skeletonManagerService.getCurrent().skeleton, o);
810
810
  if (a == null)
811
811
  return;
812
812
  let { startColumn: c, startRow: u, startX: d, startY: l } = a, g = !1;
@@ -838,7 +838,7 @@ let tt = class extends ie {
838
838
  _updateOrderListener() {
839
839
  this.disposeWithMe(this._drawingManagerService.featurePluginOrderUpdate$.subscribe((t) => {
840
840
  const { unitId: e, subUnitId: n, drawingIds: r, arrangeType: s } = t;
841
- this._commandService.executeCommand(Dr.id, {
841
+ this._commandService.executeCommand(Rr.id, {
842
842
  unitId: e,
843
843
  subUnitId: n,
844
844
  drawingIds: r,
@@ -856,16 +856,16 @@ let tt = class extends ie {
856
856
  const u = this._sheetDrawingService.getDrawingByParam({ unitId: r, subUnitId: s, drawingId: o });
857
857
  if (u == null || u.unitId !== this._context.unitId)
858
858
  return;
859
- const d = $({ ...u.transform, ...c }, this._selectionRenderService);
859
+ const d = x({ ...u.transform, ...c }, this._selectionRenderService);
860
860
  if (d == null)
861
861
  return;
862
862
  const l = {
863
863
  ...n,
864
- transform: { ...u.transform, ...c, ...z(d, this._selectionRenderService, this._skeletonManagerService) },
864
+ transform: { ...u.transform, ...c, ...K(d, this._selectionRenderService, this._skeletonManagerService) },
865
865
  sheetTransform: { ...d }
866
866
  };
867
867
  e.push(l);
868
- }), e.length > 0 && this._commandService.executeCommand(Lt.id, {
868
+ }), e.length > 0 && this._commandService.executeCommand(Ft.id, {
869
869
  unitId: t[0].unitId,
870
870
  drawings: e
871
871
  }));
@@ -873,44 +873,44 @@ let tt = class extends ie {
873
873
  }
874
874
  _groupDrawingListener() {
875
875
  this.disposeWithMe(this._drawingManagerService.featurePluginGroupUpdate$.subscribe((t) => {
876
- this._commandService.executeCommand(Cr.id, t);
876
+ this._commandService.executeCommand(br.id, t);
877
877
  const { unitId: e, subUnitId: n, drawingId: r } = t[0].parent;
878
- this._commandService.syncExecuteCommand(Wt.id, [{ unitId: e, subUnitId: n, drawingId: r }]);
878
+ this._commandService.syncExecuteCommand($t.id, [{ unitId: e, subUnitId: n, drawingId: r }]);
879
879
  })), this.disposeWithMe(this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((t) => {
880
- this._commandService.executeCommand(br.id, t);
880
+ this._commandService.executeCommand(yr.id, t);
881
881
  }));
882
882
  }
883
883
  _focusDrawingListener() {
884
884
  this.disposeWithMe(
885
885
  this._drawingManagerService.focus$.subscribe((t) => {
886
- t == null || t.length === 0 ? (this._contextService.setContextValue(Fe, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(Fe, !0), this._sheetDrawingService.focusDrawing(t));
886
+ t == null || t.length === 0 ? (this._contextService.setContextValue(Ye, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(Ye, !0), this._sheetDrawingService.focusDrawing(t));
887
887
  })
888
888
  );
889
889
  }
890
890
  };
891
- tt = Es([
892
- ne(1, A(V)),
893
- ne(2, X),
894
- ne(3, Ve),
895
- ne(4, zn),
896
- ne(5, Ni),
891
+ nt = Es([
892
+ ne(1, A(H)),
893
+ ne(2, G),
894
+ ne(3, He),
895
+ ne(4, Jn),
896
+ ne(5, Bi),
897
897
  ne(6, oe),
898
898
  ne(7, se),
899
- ne(8, Hn),
900
- ne(9, ki),
901
- ne(10, A(rt)),
902
- ne(11, A(hn)),
903
- ne(12, A(Ge))
904
- ], tt);
899
+ ne(8, Zn),
900
+ ne(9, Wi),
901
+ ne(10, A(it)),
902
+ ne(11, A(fn)),
903
+ ne(12, A(Ve))
904
+ ], nt);
905
905
  var Os = Object.getOwnPropertyDescriptor, Ps = (i, t, e, n) => {
906
906
  for (var r = n > 1 ? void 0 : n ? Os(t, e) : t, s = i.length - 1, o; s >= 0; s--)
907
907
  (o = i[s]) && (r = o(r) || r);
908
908
  return r;
909
- }, je = (i, t) => (e, n) => t(e, n, i);
910
- function Rr(i, t, e) {
909
+ }, We = (i, t) => (e, n) => t(e, n, i);
910
+ function Mr(i, t, e) {
911
911
  var n, r, s, o;
912
912
  if (((r = (n = e == null ? void 0 : e.p) == null ? void 0 : n.body) == null ? void 0 : r.dataStream.length) === 3 && ((o = (s = e.p) == null ? void 0 : s.drawingsOrder) == null ? void 0 : o.length) === 1) {
913
- const a = e.p.drawings[e.p.drawingsOrder[0]], c = an(
913
+ const a = e.p.drawings[e.p.drawingsOrder[0]], c = dn(
914
914
  i,
915
915
  {
916
916
  unitId: t.unitId,
@@ -927,47 +927,47 @@ function Rr(i, t, e) {
927
927
  }
928
928
  return !1;
929
929
  }
930
- let Ot = class extends ie {
930
+ let Pt = class extends ie {
931
931
  constructor(i, t, e, n, r, s) {
932
932
  super(), this._commandService = i, this._sheetInterceptorService = t, this._injector = e, this._drawingManagerService = n, this._docDrawingController = r, this._editorBridgeService = s, this._handleInitEditor(), this._initCellContentInterceptor();
933
933
  }
934
934
  _handleInitEditor() {
935
935
  this.disposeWithMe(this._editorBridgeService.visible$.subscribe((i) => {
936
- i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(et), this._docDrawingController.loadDrawingDataForUnit(et), this._drawingManagerService.initializeNotification(et)) : this._drawingManagerService.removeDrawingDataForUnit(et);
936
+ i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(tt), this._docDrawingController.loadDrawingDataForUnit(tt), this._drawingManagerService.initializeNotification(tt)) : this._drawingManagerService.removeDrawingDataForUnit(tt);
937
937
  })), this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
938
- i.id === cs.id && i.params.unitId === xe && (this._drawingManagerService.removeDrawingDataForUnit(xe), this._docDrawingController.loadDrawingDataForUnit(xe), this._drawingManagerService.initializeNotification(xe));
938
+ i.id === cs.id && i.params.unitId === Le && (this._drawingManagerService.removeDrawingDataForUnit(Le), this._docDrawingController.loadDrawingDataForUnit(Le), this._drawingManagerService.initializeNotification(Le));
939
939
  }));
940
940
  }
941
941
  _initCellContentInterceptor() {
942
942
  this.disposeWithMe(
943
943
  this._sheetInterceptorService.intercept(
944
- Vi.CELL_CONTENT,
944
+ Hi.CELL_CONTENT,
945
945
  {
946
- effect: Fr.Style,
947
- priority: Hi.CELL_IMAGE,
946
+ effect: Xr.Style,
947
+ priority: zi.CELL_IMAGE,
948
948
  handler: (i, t, e) => {
949
949
  var n;
950
- return i != null && i.p && ((n = i.p.drawingsOrder) != null && n.length) && (i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }, Rr(this._injector, { unitId: t.unitId, subUnitId: t.subUnitId, row: t.row, col: t.col }, i)), e(i);
950
+ return i != null && i.p && ((n = i.p.drawingsOrder) != null && n.length) && (i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }, Mr(this._injector, { unitId: t.unitId, subUnitId: t.subUnitId, row: t.row, col: t.col }, i)), e(i);
951
951
  }
952
952
  }
953
953
  )
954
954
  );
955
955
  }
956
956
  };
957
- Ot = Ps([
958
- je(0, X),
959
- je(1, A($t)),
960
- je(2, A(Ge)),
961
- je(3, se),
962
- je(4, A(oi)),
963
- je(5, A(Di))
964
- ], Ot);
957
+ Pt = Ps([
958
+ We(0, G),
959
+ We(1, A(xt)),
960
+ We(2, A(Ve)),
961
+ We(3, se),
962
+ We(4, A(ci)),
963
+ We(5, A(Ri))
964
+ ], Pt);
965
965
  var Us = Object.getOwnPropertyDescriptor, As = (i, t, e, n) => {
966
966
  for (var r = n > 1 ? void 0 : n ? Us(t, e) : t, s = i.length - 1, o; s >= 0; s--)
967
967
  (o = i[s]) && (r = o(r) || r);
968
968
  return r;
969
- }, Xn = (i, t) => (e, n) => t(e, n, i);
970
- let Pt = class extends ie {
969
+ }, Hn = (i, t) => (e, n) => t(e, n, i);
970
+ let Ut = class extends ie {
971
971
  constructor(i, t) {
972
972
  super(), this._autoFillService = i, this._injector = t, this._initAutoFillHooks();
973
973
  }
@@ -976,35 +976,35 @@ let Pt = class extends ie {
976
976
  this._autoFillService.addHook({
977
977
  id: "sheet-cell-image-autofill",
978
978
  onBeforeSubmit: (i, t, e, n) => {
979
- new Yr(n).forValue((r, s, o) => {
980
- Rr(this._injector, { unitId: i.unitId, subUnitId: i.subUnitId, row: r, col: s }, o);
979
+ new Gr(n).forValue((r, s, o) => {
980
+ Mr(this._injector, { unitId: i.unitId, subUnitId: i.subUnitId, row: r, col: s }, o);
981
981
  });
982
982
  }
983
983
  })
984
984
  );
985
985
  }
986
986
  };
987
- Pt = As([
988
- Xn(0, A(bi)),
989
- Xn(1, A(Ge))
990
- ], Pt);
987
+ Ut = As([
988
+ Hn(0, A(yi)),
989
+ Hn(1, A(Ve))
990
+ ], Ut);
991
991
  var Ns = Object.getOwnPropertyDescriptor, ks = (i, t, e, n) => {
992
992
  for (var r = n > 1 ? void 0 : n ? Ns(t, e) : t, s = i.length - 1, o; s >= 0; s--)
993
993
  (o = i[s]) && (r = o(r) || r);
994
994
  return r;
995
- }, Ze = (i, t) => (e, n) => t(e, n, i);
995
+ }, Je = (i, t) => (e, n) => t(e, n, i);
996
996
  const Bs = [
997
- et,
998
- Xr,
999
- xe
997
+ tt,
998
+ Vr,
999
+ Le
1000
1000
  ];
1001
- let Ut = class extends ie {
1001
+ let At = class extends ie {
1002
1002
  constructor(i, t, e, n, r) {
1003
1003
  super(), this._commandService = i, this._univerInstanceService = t, this._dialogService = e, this._renderManagerService = n, this._localeService = r, this._initDocImageCopyPasteHooks();
1004
1004
  }
1005
1005
  _setCellImage(i) {
1006
1006
  var r;
1007
- const t = Jt("", {}), e = (r = dn(x.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.with(Ri), n = qt.drawing.add({
1007
+ const t = qt("", {}), e = (r = un(L.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.with(Mi), n = Qt.drawing.add({
1008
1008
  documentDataModel: t,
1009
1009
  drawings: [i],
1010
1010
  selection: {
@@ -1020,19 +1020,19 @@ let Ut = class extends ie {
1020
1020
  this._commandService.beforeCommandExecuted((i) => {
1021
1021
  var t, e;
1022
1022
  if (i.id === ds.id) {
1023
- const n = i.params, { doc: r } = n, s = this._univerInstanceService.getCurrentUnitOfType(x.UNIVER_DOC);
1023
+ const n = i.params, { doc: r } = n, s = this._univerInstanceService.getCurrentUnitOfType(L.UNIVER_DOC);
1024
1024
  if (s == null || !Object.keys((t = r.drawings) != null ? t : {}).length)
1025
1025
  return;
1026
1026
  const o = s.getUnitId();
1027
1027
  if (Bs.includes(o)) {
1028
- if (o !== xe) {
1028
+ if (o !== Le) {
1029
1029
  const a = () => {
1030
- this._dialogService.close("sheet-cell-image-copy-paste"), this._commandService.syncExecuteCommand(Un.id, {
1030
+ this._dialogService.close("sheet-cell-image-copy-paste"), this._commandService.syncExecuteCommand(kn.id, {
1031
1031
  visible: !1
1032
1032
  });
1033
1033
  };
1034
1034
  ((e = s.getBody()) == null ? void 0 : e.dataStream) === `\r
1035
- ` ? (this._commandService.syncExecuteCommand(Un.id, {
1035
+ ` ? (this._commandService.syncExecuteCommand(kn.id, {
1036
1036
  visible: !1
1037
1037
  }), this._setCellImage(Object.values(r.drawings)[0])) : this._dialogService.open({
1038
1038
  id: "sheet-cell-image-copy-paste",
@@ -1060,23 +1060,23 @@ let Ut = class extends ie {
1060
1060
  );
1061
1061
  }
1062
1062
  };
1063
- Ut = ks([
1064
- Ze(0, X),
1065
- Ze(1, Se),
1066
- Ze(2, Bi),
1067
- Ze(3, q),
1068
- Ze(4, A(rt))
1069
- ], Ut);
1070
- const Ft = {
1063
+ At = ks([
1064
+ Je(0, G),
1065
+ Je(1, fe),
1066
+ Je(2, ji),
1067
+ Je(3, q),
1068
+ Je(4, A(it))
1069
+ ], At);
1070
+ const Yt = {
1071
1071
  id: "sheet.command.insert-float-image",
1072
1072
  type: J.COMMAND,
1073
1073
  handler: async (i, t) => {
1074
1074
  var o, a;
1075
- const e = i.get(Se), n = i.get(q), r = (o = dn(
1076
- x.UNIVER_SHEET,
1075
+ const e = i.get(fe), n = i.get(q), r = (o = un(
1076
+ L.UNIVER_SHEET,
1077
1077
  e,
1078
1078
  n
1079
- )) == null ? void 0 : o.with(tt);
1079
+ )) == null ? void 0 : o.with(nt);
1080
1080
  if (!r)
1081
1081
  return !1;
1082
1082
  const s = t == null ? void 0 : t.files;
@@ -1086,33 +1086,33 @@ const Ft = {
1086
1086
  } else
1087
1087
  return (a = r.insertFloatImage()) != null ? a : !1;
1088
1088
  }
1089
- }, mn = {
1089
+ }, wn = {
1090
1090
  id: "sheet.command.insert-cell-image",
1091
1091
  type: J.COMMAND,
1092
1092
  handler: (i) => {
1093
1093
  var n, r;
1094
- const t = i.get(Se), e = i.get(q);
1095
- return (r = (n = dn(
1096
- x.UNIVER_SHEET,
1094
+ const t = i.get(fe), e = i.get(q);
1095
+ return (r = (n = un(
1096
+ L.UNIVER_SHEET,
1097
1097
  t,
1098
1098
  e
1099
- )) == null ? void 0 : n.with(tt).insertCellImage()) != null ? r : !1;
1099
+ )) == null ? void 0 : n.with(nt).insertCellImage()) != null ? r : !1;
1100
1100
  }
1101
1101
  };
1102
- var js = Object.getOwnPropertyDescriptor, Ws = (i, t, e, n) => {
1103
- for (var r = n > 1 ? void 0 : n ? js(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1102
+ var Ws = Object.getOwnPropertyDescriptor, js = (i, t, e, n) => {
1103
+ for (var r = n > 1 ? void 0 : n ? Ws(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1104
1104
  (o = i[s]) && (r = o(r) || r);
1105
1105
  return r;
1106
- }, Je = (i, t) => (e, n) => t(e, n, i);
1107
- const yr = "image/png";
1106
+ }, qe = (i, t) => (e, n) => t(e, n, i);
1107
+ const Er = "image/png";
1108
1108
  function $s(i) {
1109
1109
  const t = i.split(","), e = atob(t[1]), n = e.length, r = new Uint8Array(n);
1110
1110
  for (let s = 0; s < n; s++)
1111
1111
  r[s] = e.charCodeAt(s);
1112
- return new Blob([r], { type: yr });
1112
+ return new Blob([r], { type: Er });
1113
1113
  }
1114
1114
  function xs(i) {
1115
- const t = new ClipboardItem({ [yr]: $s(i) });
1115
+ const t = new ClipboardItem({ [Er]: $s(i) });
1116
1116
  navigator.clipboard.write([t]).catch((e) => {
1117
1117
  console.error("Could not copy image using clipboard API: ", e);
1118
1118
  });
@@ -1127,13 +1127,13 @@ function Ls() {
1127
1127
  e.blur(), document.body.removeChild(e), t instanceof HTMLElement && t.focus();
1128
1128
  };
1129
1129
  }
1130
- const Gn = [
1131
- Le.SPECIAL_PASTE_COL_WIDTH,
1132
- Le.SPECIAL_PASTE_VALUE,
1133
- Le.SPECIAL_PASTE_FORMAT,
1134
- Le.SPECIAL_PASTE_FORMULA
1130
+ const zn = [
1131
+ Fe.SPECIAL_PASTE_COL_WIDTH,
1132
+ Fe.SPECIAL_PASTE_VALUE,
1133
+ Fe.SPECIAL_PASTE_FORMAT,
1134
+ Fe.SPECIAL_PASTE_FORMULA
1135
1135
  ];
1136
- let At = class extends ie {
1136
+ let Nt = class extends ie {
1137
1137
  constructor(t, e, n, r, s) {
1138
1138
  super();
1139
1139
  te(this, "_copyInfo");
@@ -1150,16 +1150,16 @@ let At = class extends ie {
1150
1150
  const s = this._focusedDrawings;
1151
1151
  if (s.length > 0) {
1152
1152
  const [o] = s;
1153
- if (r === Ce.CUT) {
1153
+ if (r === De.CUT) {
1154
1154
  const c = {
1155
1155
  unitId: t,
1156
1156
  drawings: [o]
1157
1157
  };
1158
- this._commandService.executeCommand(it.id, c);
1158
+ this._commandService.executeCommand(st.id, c);
1159
1159
  }
1160
1160
  setTimeout(() => {
1161
1161
  const c = Ls();
1162
- o.drawingType === L.DRAWING_IMAGE && o.imageSourceType === ci.BASE64 ? xs(o.source) : this._clipboardInterfaceService.writeText(""), c();
1162
+ o.drawingType === W.DRAWING_IMAGE && o.imageSourceType === li.BASE64 ? xs(o.source) : this._clipboardInterfaceService.writeText(""), c();
1163
1163
  }, 200);
1164
1164
  const a = {
1165
1165
  unitId: o.unitId,
@@ -1175,14 +1175,14 @@ let At = class extends ie {
1175
1175
  onPasteCells: (t, e, n, r) => {
1176
1176
  if (!this._copyInfo)
1177
1177
  return { redos: [], undos: [] };
1178
- const { copyType: s = Ce.COPY, pasteType: o } = r, { range: a } = t || {}, { range: c, unitId: u, subUnitId: d } = e;
1179
- return this._copyInfo.copyRange ? this._generateRangeDrawingsPasteMutations({ pasteType: o, unitId: u, subUnitId: d, pasteRange: c }, { copyRange: a, copyType: s }) : this._generateSingleDrawingPasteMutations({ pasteTo: e, pasteType: o }, Ce.COPY);
1178
+ const { copyType: s = De.COPY, pasteType: o } = r, { range: a } = t || {}, { range: c, unitId: u, subUnitId: d } = e;
1179
+ return this._copyInfo.copyRange ? this._generateRangeDrawingsPasteMutations({ pasteType: o, unitId: u, subUnitId: d, pasteRange: c }, { copyRange: a, copyType: s }) : this._generateSingleDrawingPasteMutations({ pasteTo: e, pasteType: o }, De.COPY);
1180
1180
  },
1181
1181
  onPastePlainText: (t, e) => ({ undos: [], redos: [] }),
1182
- onPasteUnrecognized: (t) => this._copyInfo ? this._generateSingleDrawingPasteMutations({ pasteTo: t, pasteType: Le.DEFAULT_PASTE }, Ce.COPY) : { undos: [], redos: [] },
1182
+ onPasteUnrecognized: (t) => this._copyInfo ? this._generateSingleDrawingPasteMutations({ pasteTo: t, pasteType: Fe.DEFAULT_PASTE }, De.COPY) : { undos: [], redos: [] },
1183
1183
  onPasteFiles: (t, e) => {
1184
1184
  if (this._copyInfo)
1185
- return this._generateSingleDrawingPasteMutations({ pasteTo: t, pasteType: Le.DEFAULT_PASTE }, Ce.COPY);
1185
+ return this._generateSingleDrawingPasteMutations({ pasteTo: t, pasteType: Fe.DEFAULT_PASTE }, De.COPY);
1186
1186
  {
1187
1187
  const n = e.filter((r) => r.type.includes("image"));
1188
1188
  if (n.length)
@@ -1190,7 +1190,7 @@ let At = class extends ie {
1190
1190
  undos: [],
1191
1191
  redos: [
1192
1192
  {
1193
- id: Ft.id,
1193
+ id: Yt.id,
1194
1194
  params: { files: n }
1195
1195
  }
1196
1196
  ]
@@ -1202,7 +1202,7 @@ let At = class extends ie {
1202
1202
  }
1203
1203
  _createDrawingsCopyInfoByRange(t, e, n) {
1204
1204
  var g;
1205
- const r = (g = this._renderManagerService.getRenderById(t)) == null ? void 0 : g.with(V);
1205
+ const r = (g = this._renderManagerService.getRenderById(t)) == null ? void 0 : g.with(H);
1206
1206
  if (!r) return;
1207
1207
  const s = r.attachRangeWithCoord(n);
1208
1208
  if (!s)
@@ -1212,13 +1212,13 @@ let At = class extends ie {
1212
1212
  const f = d[h], { transform: p } = f;
1213
1213
  if (f.anchorType !== O.Both || !p)
1214
1214
  return;
1215
- const { left: m = 0, top: _ = 0, width: S = 0, height: C = 0 } = p, { drawingStartX: b, drawingEndX: v, drawingStartY: D, drawingEndY: w } = {
1215
+ const { left: m = 0, top: w = 0, width: S = 0, height: C = 0 } = p, { drawingStartX: b, drawingEndX: v, drawingStartY: D, drawingEndY: _ } = {
1216
1216
  drawingStartX: m,
1217
1217
  drawingEndX: m + S,
1218
- drawingStartY: _,
1219
- drawingEndY: _ + C
1218
+ drawingStartY: w,
1219
+ drawingEndY: w + C
1220
1220
  };
1221
- o <= b && v <= a && c <= D && w <= u && l.push(f);
1221
+ o <= b && v <= a && c <= D && _ <= u && l.push(f);
1222
1222
  }), l.length)
1223
1223
  return {
1224
1224
  copyRange: n,
@@ -1229,16 +1229,16 @@ let At = class extends ie {
1229
1229
  }
1230
1230
  _generateSingleDrawingPasteMutations(t, e) {
1231
1231
  const { pasteType: n, pasteTo: r } = t;
1232
- if (Gn.includes(n))
1232
+ if (zn.includes(n))
1233
1233
  return { redos: [], undos: [] };
1234
- const { unitId: s, subUnitId: o, range: a } = r, c = this._renderManagerService.getRenderById(s), u = c == null ? void 0 : c.with(V), d = c == null ? void 0 : c.with(Ve), l = this._copyInfo;
1234
+ const { unitId: s, subUnitId: o, range: a } = r, c = this._renderManagerService.getRenderById(s), u = c == null ? void 0 : c.with(H), d = c == null ? void 0 : c.with(He), l = this._copyInfo;
1235
1235
  if (!u || !d)
1236
1236
  return { redos: [], undos: [] };
1237
- const { drawings: g } = l, h = An(a);
1237
+ const { drawings: g } = l, h = Bn(a);
1238
1238
  return this._generateMutations(g, {
1239
1239
  unitId: s,
1240
1240
  subUnitId: o,
1241
- isCut: e === Ce.CUT,
1241
+ isCut: e === De.CUT,
1242
1242
  getTransform: (f, p) => {
1243
1243
  var S;
1244
1244
  const m = u.attachRangeWithCoord({
@@ -1246,14 +1246,14 @@ let At = class extends ie {
1246
1246
  endRow: h.endRow,
1247
1247
  startColumn: h.startColumn,
1248
1248
  endColumn: h.endColumn
1249
- }), _ = {
1249
+ }), w = {
1250
1250
  ...f,
1251
1251
  left: m == null ? void 0 : m.startX,
1252
1252
  top: m == null ? void 0 : m.startY
1253
1253
  };
1254
1254
  return {
1255
- transform: _,
1256
- sheetTransform: (S = $(_, d)) != null ? S : p
1255
+ transform: w,
1256
+ sheetTransform: (S = x(w, d)) != null ? S : p
1257
1257
  };
1258
1258
  }
1259
1259
  });
@@ -1273,12 +1273,12 @@ let At = class extends ie {
1273
1273
  ...d,
1274
1274
  unitId: n,
1275
1275
  subUnitId: r,
1276
- drawingId: o ? d.drawingId : ye.generateRandomId(),
1276
+ drawingId: o ? d.drawingId : Me.generateRandomId(),
1277
1277
  transform: h.transform,
1278
1278
  sheetTransform: h.sheetTransform
1279
1279
  };
1280
1280
  if (o) {
1281
- const { undo: p, redo: m, objects: _ } = u.getBatchUpdateOp([f]);
1281
+ const { undo: p, redo: m, objects: w } = u.getBatchUpdateOp([f]);
1282
1282
  a.push({
1283
1283
  id: U.id,
1284
1284
  params: {
@@ -1286,7 +1286,7 @@ let At = class extends ie {
1286
1286
  subUnitId: r,
1287
1287
  type: P.UPDATE,
1288
1288
  op: m,
1289
- objects: _
1289
+ objects: w
1290
1290
  }
1291
1291
  }), c.push({
1292
1292
  id: U.id,
@@ -1295,12 +1295,12 @@ let At = class extends ie {
1295
1295
  subUnitId: r,
1296
1296
  type: P.UPDATE,
1297
1297
  op: p,
1298
- objects: _
1298
+ objects: w
1299
1299
  }
1300
1300
  });
1301
1301
  } else {
1302
- const { undo: p, redo: m, objects: _ } = u.getBatchAddOp([f]);
1303
- a.push({ id: U.id, params: { op: m, unitId: n, subUnitId: r, objects: _, type: P.INSERT } }), c.push({ id: U.id, params: { op: p, unitId: n, subUnitId: r, objects: _, type: P.REMOVE } });
1302
+ const { undo: p, redo: m, objects: w } = u.getBatchAddOp([f]);
1303
+ a.push({ id: U.id, params: { op: m, unitId: n, subUnitId: r, objects: w, type: P.INSERT } }), c.push({ id: U.id, params: { op: p, unitId: n, subUnitId: r, objects: w, type: P.REMOVE } });
1304
1304
  }
1305
1305
  }), { redos: a, undos: c };
1306
1306
  }
@@ -1316,18 +1316,18 @@ let At = class extends ie {
1316
1316
  copyRange: a,
1317
1317
  copyType: c
1318
1318
  } = e;
1319
- if (Gn.includes(s))
1319
+ if (zn.includes(s))
1320
1320
  return { redos: [], undos: [] };
1321
- const u = (M = this._renderManagerService.getRenderById(n)) == null ? void 0 : M.with(V);
1321
+ const u = (M = this._renderManagerService.getRenderById(n)) == null ? void 0 : M.with(H);
1322
1322
  if (!u || !this._copyInfo)
1323
1323
  return { redos: [], undos: [] };
1324
1324
  const { drawings: d } = this._copyInfo;
1325
1325
  if (!a)
1326
1326
  return this._generateSingleDrawingPasteMutations({
1327
- pasteTo: { unitId: n, subUnitId: r, range: An(o) },
1327
+ pasteTo: { unitId: n, subUnitId: r, range: Bn(o) },
1328
1328
  pasteType: s
1329
1329
  }, c);
1330
- const { ranges: [l, g], mapFunc: h } = yi([a, o]), { row: f, col: p } = h(l.startRow, l.startColumn), { row: m, col: _ } = h(g.startRow, g.startColumn), S = u.attachRangeWithCoord({
1330
+ const { ranges: [l, g], mapFunc: h } = Ei([a, o]), { row: f, col: p } = h(l.startRow, l.startColumn), { row: m, col: w } = h(g.startRow, g.startColumn), S = u.attachRangeWithCoord({
1331
1331
  startRow: f,
1332
1332
  endRow: f,
1333
1333
  startColumn: p,
@@ -1335,12 +1335,12 @@ let At = class extends ie {
1335
1335
  }), C = u.attachRangeWithCoord({
1336
1336
  startRow: m,
1337
1337
  endRow: m,
1338
- startColumn: _,
1339
- endColumn: _
1338
+ startColumn: w,
1339
+ endColumn: w
1340
1340
  });
1341
1341
  if (!S || !C || !this._copyInfo)
1342
1342
  return { redos: [], undos: [] };
1343
- const b = C.startX - S.startX, v = C.startY - S.startY, D = m - f, w = _ - p;
1343
+ const b = C.startX - S.startX, v = C.startY - S.startY, D = m - f, _ = w - p;
1344
1344
  return this._generateMutations(d, {
1345
1345
  unitId: n,
1346
1346
  subUnitId: r,
@@ -1357,53 +1357,53 @@ let At = class extends ie {
1357
1357
  to: {
1358
1358
  ...E.to,
1359
1359
  row: E.to.row + D,
1360
- column: E.to.column + w
1360
+ column: E.to.column + _
1361
1361
  },
1362
1362
  from: {
1363
1363
  ...E.from,
1364
1364
  row: E.from.row + D,
1365
- column: E.from.column + w
1365
+ column: E.from.column + _
1366
1366
  }
1367
1367
  }
1368
1368
  };
1369
1369
  },
1370
- isCut: c === Ce.CUT
1370
+ isCut: c === De.CUT
1371
1371
  });
1372
1372
  }
1373
1373
  };
1374
- At = Ws([
1375
- Je(0, Mi),
1376
- Je(1, q),
1377
- Je(2, se),
1378
- Je(3, ji),
1379
- Je(4, X)
1380
- ], At);
1374
+ Nt = js([
1375
+ qe(0, Ti),
1376
+ qe(1, q),
1377
+ qe(2, se),
1378
+ qe(3, $i),
1379
+ qe(4, G)
1380
+ ], Nt);
1381
1381
  var Fs = Object.getOwnPropertyDescriptor, Ys = (i, t, e, n) => {
1382
1382
  for (var r = n > 1 ? void 0 : n ? Fs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1383
1383
  (o = i[s]) && (r = o(r) || r);
1384
1384
  return r;
1385
- }, qe = (i, t) => (e, n) => t(e, n, i);
1386
- let Nt = class extends ie {
1385
+ }, Qe = (i, t) => (e, n) => t(e, n, i);
1386
+ let kt = class extends ie {
1387
1387
  constructor(i, t, e, n, r) {
1388
1388
  super(), this._drawingManagerService = i, this._renderManagerService = t, this._permissionService = e, this._univerInstanceService = n, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
1389
1389
  }
1390
1390
  _initDrawingVisible() {
1391
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(x.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = St([i, t]);
1391
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = It([i, t]);
1392
1392
  this.disposeWithMe(
1393
1393
  e.pipe(
1394
- _e(([n, r]) => n ? n.activeSheet$.pipe(
1395
- Bn((s) => {
1394
+ Se(([n, r]) => n ? n.activeSheet$.pipe(
1395
+ $n((s) => {
1396
1396
  if (!s) {
1397
1397
  this._drawingManagerService.setDrawingVisible(!1);
1398
1398
  return;
1399
1399
  }
1400
1400
  const o = n.getUnitId(), a = s.getSheetId();
1401
1401
  this._permissionService.composePermission([
1402
- new xn(o).id,
1403
- new Ln(o, a).id
1402
+ new Yn(o).id,
1403
+ new Xn(o, a).id
1404
1404
  ]).every((u) => u.value) ? this._drawingManagerService.setDrawingVisible(!0) : this._handleDrawingVisibilityFalse(n, s);
1405
1405
  })
1406
- ) : (this._drawingManagerService.setDrawingVisible(!1), me))
1406
+ ) : (this._drawingManagerService.setDrawingVisible(!1), pe))
1407
1407
  ).subscribe()
1408
1408
  );
1409
1409
  }
@@ -1417,22 +1417,22 @@ let Nt = class extends ie {
1417
1417
  });
1418
1418
  }
1419
1419
  _initDrawingEditable() {
1420
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(x.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = St([i, t]);
1420
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = It([i, t]);
1421
1421
  this.disposeWithMe(
1422
1422
  e.pipe(
1423
- _e(([n, r]) => n ? n.activeSheet$.pipe(
1424
- Bn((s) => {
1423
+ Se(([n, r]) => n ? n.activeSheet$.pipe(
1424
+ $n((s) => {
1425
1425
  if (!s) {
1426
1426
  this._drawingManagerService.setDrawingEditable(!1);
1427
1427
  return;
1428
1428
  }
1429
1429
  const o = n.getUnitId(), a = s.getSheetId();
1430
1430
  this._permissionService.composePermission([
1431
- new Qt(o).id,
1432
- new en(o, a).id
1431
+ new en(o).id,
1432
+ new tn(o, a).id
1433
1433
  ]).every((u) => u.value) ? this._drawingManagerService.setDrawingEditable(!0) : this._handleDrawingEditableFalse(n, s);
1434
1434
  })
1435
- ) : (this._drawingManagerService.setDrawingEditable(!1), me))
1435
+ ) : (this._drawingManagerService.setDrawingEditable(!1), pe))
1436
1436
  ).subscribe()
1437
1437
  );
1438
1438
  }
@@ -1446,23 +1446,23 @@ let Nt = class extends ie {
1446
1446
  });
1447
1447
  }
1448
1448
  _initViewPermissionChange() {
1449
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(x.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1449
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1450
1450
  this.disposeWithMe(
1451
- St([i, t]).pipe(
1452
- _e(([e, n]) => e ? e.activeSheet$.pipe(
1453
- _e((r) => {
1451
+ It([i, t]).pipe(
1452
+ Se(([e, n]) => e ? e.activeSheet$.pipe(
1453
+ Se((r) => {
1454
1454
  if (!r)
1455
- return me;
1455
+ return pe;
1456
1456
  const s = e.getUnitId(), o = r.getSheetId(), a = this._renderManagerService.getRenderById(s), c = a == null ? void 0 : a.scene;
1457
1457
  if (!c)
1458
- return me;
1458
+ return pe;
1459
1459
  const u = c.getTransformerByCreate();
1460
1460
  return this._permissionService.composePermission$([
1461
- new xn(s).id,
1462
- new Ln(s, o).id
1461
+ new Yn(s).id,
1462
+ new Xn(s, o).id
1463
1463
  ]).pipe(
1464
1464
  Ee((l) => l.every((g) => g.value)),
1465
- jn()
1465
+ xn()
1466
1466
  ).pipe(
1467
1467
  Ee((l) => ({
1468
1468
  permission: l,
@@ -1473,7 +1473,7 @@ let Nt = class extends ie {
1473
1473
  }))
1474
1474
  );
1475
1475
  })
1476
- ) : me)
1476
+ ) : pe)
1477
1477
  ).subscribe({
1478
1478
  next: ({ permission: e, scene: n, transformer: r, unitId: s, subUnitId: o }) => {
1479
1479
  this._drawingManagerService.setDrawingVisible(e);
@@ -1484,7 +1484,7 @@ let Nt = class extends ie {
1484
1484
  },
1485
1485
  complete: () => {
1486
1486
  this._drawingManagerService.setDrawingVisible(!0);
1487
- const e = this._univerInstanceService.getCurrentUnitForType(x.UNIVER_SHEET), n = e == null ? void 0 : e.getActiveSheet(), r = e == null ? void 0 : e.getUnitId(), s = n == null ? void 0 : n.getSheetId();
1487
+ const e = this._univerInstanceService.getCurrentUnitForType(L.UNIVER_SHEET), n = e == null ? void 0 : e.getActiveSheet(), r = e == null ? void 0 : e.getUnitId(), s = n == null ? void 0 : n.getSheetId();
1488
1488
  if (!r || !s)
1489
1489
  return;
1490
1490
  const o = this._drawingManagerService.getDrawingData(r, s), a = Object.values(o);
@@ -1494,23 +1494,23 @@ let Nt = class extends ie {
1494
1494
  );
1495
1495
  }
1496
1496
  _initEditPermissionChange() {
1497
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(x.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1497
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1498
1498
  this.disposeWithMe(
1499
- St([i, t]).pipe(
1500
- _e(([e, n]) => e ? e.activeSheet$.pipe(
1501
- _e((r) => {
1499
+ It([i, t]).pipe(
1500
+ Se(([e, n]) => e ? e.activeSheet$.pipe(
1501
+ Se((r) => {
1502
1502
  if (!r)
1503
- return me;
1503
+ return pe;
1504
1504
  const s = e.getUnitId(), o = r.getSheetId(), a = this._renderManagerService.getRenderById(s), c = a == null ? void 0 : a.scene;
1505
1505
  if (!c)
1506
- return me;
1506
+ return pe;
1507
1507
  const u = c.getTransformerByCreate();
1508
1508
  return this._permissionService.composePermission$([
1509
- new Qt(s).id,
1510
- new en(s, o).id
1509
+ new en(s).id,
1510
+ new tn(s, o).id
1511
1511
  ]).pipe(
1512
1512
  Ee((l) => l.every((g) => g.value)),
1513
- jn()
1513
+ xn()
1514
1514
  ).pipe(
1515
1515
  Ee((l) => ({
1516
1516
  permission: l,
@@ -1521,7 +1521,7 @@ let Nt = class extends ie {
1521
1521
  }))
1522
1522
  );
1523
1523
  })
1524
- ) : me)
1524
+ ) : pe)
1525
1525
  ).subscribe({
1526
1526
  next: ({ permission: e, scene: n, transformer: r, unitId: s, subUnitId: o }) => {
1527
1527
  this._drawingManagerService.setDrawingEditable(e);
@@ -1533,7 +1533,7 @@ let Nt = class extends ie {
1533
1533
  }), r.clearSelectedObjects());
1534
1534
  },
1535
1535
  complete: () => {
1536
- const e = this._univerInstanceService.getCurrentUnitForType(x.UNIVER_SHEET);
1536
+ const e = this._univerInstanceService.getCurrentUnitForType(L.UNIVER_SHEET);
1537
1537
  if (!e)
1538
1538
  return;
1539
1539
  const n = e.getUnitId(), r = e.getActiveSheet();
@@ -1551,20 +1551,20 @@ let Nt = class extends ie {
1551
1551
  );
1552
1552
  }
1553
1553
  };
1554
- Nt = Ys([
1555
- qe(0, se),
1556
- qe(1, q),
1557
- qe(2, Gr),
1558
- qe(3, Se),
1559
- qe(4, A(Vr))
1560
- ], Nt);
1554
+ kt = Ys([
1555
+ Qe(0, se),
1556
+ Qe(1, q),
1557
+ Qe(2, Hr),
1558
+ Qe(3, fe),
1559
+ Qe(4, A(zr))
1560
+ ], kt);
1561
1561
  var Xs = Object.getOwnPropertyDescriptor, Gs = (i, t, e, n) => {
1562
1562
  for (var r = n > 1 ? void 0 : n ? Xs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
1563
1563
  (o = i[s]) && (r = o(r) || r);
1564
1564
  return r;
1565
- }, be = (i, t) => (e, n) => t(e, n, i);
1566
- function Mr(i, t, e, n, r, s = !1) {
1567
- const { scaleX: o, scaleY: a } = t.getAncestorScale(), c = t.getViewport(Zn.VIEW_MAIN), u = n.getFreeze(), { startColumn: d, startRow: l, xSplit: g, ySplit: h } = u, f = {
1565
+ }, Re = (i, t) => (e, n) => t(e, n, i);
1566
+ function Tr(i, t, e, n, r, s = !1) {
1567
+ const { scaleX: o, scaleY: a } = t.getAncestorScale(), c = t.getViewport(Qn.VIEW_MAIN), u = n.getFreeze(), { startColumn: d, startRow: l, xSplit: g, ySplit: h } = u, f = {
1568
1568
  left: !0,
1569
1569
  // left means the left of pic is in a viewMainLeft
1570
1570
  top: !0
@@ -1574,32 +1574,32 @@ function Mr(i, t, e, n, r, s = !1) {
1574
1574
  ...i,
1575
1575
  absolute: f
1576
1576
  };
1577
- const { left: p, right: m, top: _, bottom: S } = i;
1577
+ const { left: p, right: m, top: w, bottom: S } = i;
1578
1578
  let { top: C, left: b, viewportScrollX: v, viewportScrollY: D } = c;
1579
- const { boundsOfViewArea: w, scrollDirectionResponse: M } = r || {}, { rowHeaderWidth: I, columnHeaderHeight: E } = e, T = {
1579
+ const { boundsOfViewArea: _, scrollDirectionResponse: M } = r || {}, { rowHeaderWidth: I, columnHeaderHeight: E } = e, T = {
1580
1580
  top: s ? 0 : E,
1581
1581
  left: s ? 0 : I
1582
1582
  };
1583
- w && (ye.isDefine(T.top) && (T.top = w.top), ye.isDefine(T.left) && (T.left = w.left)), M === "HORIZONTAL" && (D = 0), M === "VERTICAL" && (v = 0);
1583
+ _ && (Me.isDefine(T.top) && (T.top = _.top), Me.isDefine(T.left) && (T.left = _.left)), M === "HORIZONTAL" && (D = 0), M === "VERTICAL" && (v = 0);
1584
1584
  let y = 0, R = 0;
1585
- const N = e.rowStartY(l - h) + E, j = e.colStartX(d - g) + I, Q = e.rowStartY(l) + E, H = e.colStartX(d) + I;
1585
+ const N = e.rowStartY(l - h) + E, j = e.colStartX(d - g) + I, Q = e.rowStartY(l) + E, z = e.colStartX(d) + I;
1586
1586
  if (g === 0)
1587
1587
  f.left = !1, y = (p - v) * o, R = (m - v) * o;
1588
1588
  else {
1589
1589
  const k = p - (j - I), ce = m - (j - I);
1590
- m < H ? (y = k * o, R = ce * o) : p <= H && m >= H ? (y = k * o, R = Math.max(b, (m - v) * o)) : p > H && (f.left = !1, y = Math.max((p - v) * o, b), R = Math.max((m - v) * o, b));
1590
+ m < z ? (y = k * o, R = ce * o) : p <= z && m >= z ? (y = k * o, R = Math.max(b, (m - v) * o)) : p > z && (f.left = !1, y = Math.max((p - v) * o, b), R = Math.max((m - v) * o, b));
1591
1591
  }
1592
- let G = 0, Y = 0;
1592
+ let V = 0, Y = 0;
1593
1593
  if (h === 0)
1594
- f.top = !1, G = (_ - D) * a, Y = (S - D) * a;
1594
+ f.top = !1, V = (w - D) * a, Y = (S - D) * a;
1595
1595
  else {
1596
- const k = _ - (N - E), ce = S - (N - E);
1597
- S < Q ? (G = k * a, Y = ce * a) : _ <= Q && S >= Q ? (G = k * a, Y = Math.max(C, (S - D) * a)) : _ > Q && (f.top = !1, G = Math.max((_ - D) * a, C), Y = Math.max((S - D) * a, C));
1596
+ const k = w - (N - E), ce = S - (N - E);
1597
+ S < Q ? (V = k * a, Y = ce * a) : w <= Q && S >= Q ? (V = k * a, Y = Math.max(C, (S - D) * a)) : w > Q && (f.top = !1, V = Math.max((w - D) * a, C), Y = Math.max((S - D) * a, C));
1598
1598
  }
1599
- return y = Math.max(y, T.left), G = Math.max(G, T.top), R = Math.max(R, T.left), Y = Math.max(Y, T.top), {
1599
+ return y = Math.max(y, T.left), V = Math.max(V, T.top), R = Math.max(R, T.left), Y = Math.max(Y, T.top), {
1600
1600
  left: y,
1601
1601
  right: R,
1602
- top: G,
1602
+ top: V,
1603
1603
  bottom: Y,
1604
1604
  absolute: f
1605
1605
  };
@@ -1610,7 +1610,7 @@ const ge = (i, t, e, n, r) => {
1610
1610
  right: s + a,
1611
1611
  top: o,
1612
1612
  bottom: o + c
1613
- }, l = Mr(d, t, e, n, r), { scaleX: g, scaleY: h } = t.getAncestorScale();
1613
+ }, l = Tr(d, t, e, n, r), { scaleX: g, scaleY: h } = t.getAncestorScale();
1614
1614
  return {
1615
1615
  startX: l.left,
1616
1616
  endX: l.right,
@@ -1622,23 +1622,23 @@ const ge = (i, t, e, n, r) => {
1622
1622
  absolute: l.absolute
1623
1623
  };
1624
1624
  };
1625
- let nt = class extends ie {
1625
+ let rt = class extends ie {
1626
1626
  constructor(t, e, n, r, s, o, a) {
1627
1627
  super();
1628
1628
  /**
1629
1629
  * for update dom container position when scrolling and zoom
1630
1630
  */
1631
1631
  te(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
1632
- te(this, "_transformChange$", new zt());
1632
+ te(this, "_transformChange$", new Kt());
1633
1633
  te(this, "transformChange$", this._transformChange$.asObservable());
1634
- te(this, "_add$", new zt());
1634
+ te(this, "_add$", new Kt());
1635
1635
  te(this, "add$", this._add$.asObservable());
1636
- te(this, "_remove$", new zt());
1636
+ te(this, "_remove$", new Kt());
1637
1637
  te(this, "remove$", this._remove$.asObservable());
1638
1638
  this._renderManagerService = t, this._univerInstanceService = e, this._commandService = n, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._lifecycleService = a, this._drawingAddListener(), this._featureUpdateListener(), this._deleteListener(), this._bindScrollEvent();
1639
1639
  }
1640
1640
  _bindScrollEvent() {
1641
- this._lifecycleService.lifecycle$.pipe(Xi((t) => t === zr.Rendered), Gi(1)).subscribe(() => {
1641
+ this._lifecycleService.lifecycle$.pipe(Gi((t) => t === Zr.Rendered), Vi(1)).subscribe(() => {
1642
1642
  this._scrollUpdateListener();
1643
1643
  });
1644
1644
  }
@@ -1664,17 +1664,17 @@ let nt = class extends ie {
1664
1664
  this._drawingManagerService.add$.subscribe((t) => {
1665
1665
  t.forEach((e) => {
1666
1666
  var Z;
1667
- const { unitId: n, subUnitId: r, drawingId: s } = e, o = ae(this._univerInstanceService, { unitId: n, subUnitId: r }), a = this._drawingManagerService.getDrawingByParam(e), c = this._univerInstanceService.getUnit(n, x.UNIVER_SHEET);
1667
+ const { unitId: n, subUnitId: r, drawingId: s } = e, o = ae(this._univerInstanceService, { unitId: n, subUnitId: r }), a = this._drawingManagerService.getDrawingByParam(e), c = this._univerInstanceService.getUnit(n, L.UNIVER_SHEET);
1668
1668
  if (!c)
1669
1669
  return;
1670
1670
  const u = c.getActiveSheet().getSheetId();
1671
1671
  if (!a || !o)
1672
1672
  return;
1673
- const d = (Z = this._renderManagerService.getRenderById(n)) == null ? void 0 : Z.with(V).getSkeletonParam(r);
1673
+ const d = (Z = this._renderManagerService.getRenderById(n)) == null ? void 0 : Z.with(H).getSkeletonParam(r);
1674
1674
  if (!d)
1675
1675
  return;
1676
1676
  const { transform: l, drawingType: g, data: h } = a;
1677
- if (g !== L.DRAWING_DOM && g !== L.DRAWING_CHART)
1677
+ if (g !== W.DRAWING_DOM && g !== W.DRAWING_CHART)
1678
1678
  return;
1679
1679
  const f = this._getSceneAndTransformerByDrawingSearch(n);
1680
1680
  if (f == null)
@@ -1684,34 +1684,34 @@ let nt = class extends ie {
1684
1684
  return !0;
1685
1685
  if (u !== r)
1686
1686
  return;
1687
- const { left: _, top: S, width: C, height: b, angle: v, flipX: D, flipY: w, skewX: M, skewY: I } = l, E = Ie({ unitId: n, subUnitId: r, drawingId: s }), T = p.getObject(E);
1687
+ const { left: w, top: S, width: C, height: b, angle: v, flipX: D, flipY: _, skewX: M, skewY: I } = l, E = Ce({ unitId: n, subUnitId: r, drawingId: s }), T = p.getObject(E);
1688
1688
  if (T != null) {
1689
- T.transformByState({ left: _, top: S, width: C, height: b, angle: v, flipX: D, flipY: w, skewX: M, skewY: I });
1689
+ T.transformByState({ left: w, top: S, width: C, height: b, angle: v, flipX: D, flipY: _, skewX: M, skewY: I });
1690
1690
  return;
1691
1691
  }
1692
1692
  const y = {
1693
- left: _,
1693
+ left: w,
1694
1694
  top: S,
1695
1695
  width: C,
1696
1696
  height: b,
1697
1697
  zIndex: this._drawingManagerService.getDrawingOrder(n, r).length - 1
1698
- }, R = g === L.DRAWING_CHART;
1698
+ }, R = g === W.DRAWING_CHART;
1699
1699
  if (y.rotateEnabled = !1, R) {
1700
1700
  const k = h ? h.backgroundColor : "white";
1701
1701
  y.fill = k, h && h.border && (y.stroke = h.border), y.paintFirst = "stroke", y.strokeWidth = 1, y.borderEnabled = !1, y.radius = 8;
1702
1702
  }
1703
1703
  const N = new Be(E, y);
1704
- R && N.setObjectType(Pn.CHART), p.addObject(N, Ht), a.allowTransform !== !1 && p.attachTransformerTo(N);
1705
- const j = new _t(), Q = ge(N, f.renderUnit.scene, d.skeleton, o.worksheet), H = new $e(Q), G = {
1704
+ R && N.setObjectType(Nn.CHART), p.addObject(N, zt), a.allowTransform !== !1 && p.attachTransformerTo(N);
1705
+ const j = new vt(), Q = ge(N, f.renderUnit.scene, d.skeleton, o.worksheet), z = new $e(Q), V = {
1706
1706
  dispose: j,
1707
1707
  rect: N,
1708
- position$: H,
1708
+ position$: z,
1709
1709
  unitId: n,
1710
1710
  subUnitId: r,
1711
1711
  id: s
1712
1712
  };
1713
1713
  this._canvasFloatDomService.addFloatDom({
1714
- position$: H,
1714
+ position$: z,
1715
1715
  id: s,
1716
1716
  componentKey: a.componentKey,
1717
1717
  onPointerDown: (k) => {
@@ -1731,19 +1731,19 @@ let nt = class extends ie {
1731
1731
  });
1732
1732
  const Y = N.onTransformChange$.subscribeEvent(() => {
1733
1733
  const k = ge(N, f.renderUnit.scene, d.skeleton, o.worksheet);
1734
- H.next(
1734
+ z.next(
1735
1735
  k
1736
1736
  );
1737
1737
  });
1738
1738
  j.add(() => {
1739
1739
  this._canvasFloatDomService.removeFloatDom(s);
1740
- }), Y && j.add(Y), this._domLayerInfoMap.set(s, G);
1740
+ }), Y && j.add(Y), this._domLayerInfoMap.set(s, V);
1741
1741
  });
1742
1742
  })
1743
1743
  ), this.disposeWithMe(
1744
1744
  this._drawingManagerService.remove$.subscribe((t) => {
1745
1745
  t.forEach((e) => {
1746
- const { unitId: n, subUnitId: r, drawingId: s } = e, o = Ie({ unitId: n, subUnitId: r, drawingId: s }), a = this._getSceneAndTransformerByDrawingSearch(n);
1746
+ const { unitId: n, subUnitId: r, drawingId: s } = e, o = Ce({ unitId: n, subUnitId: r, drawingId: s }), a = this._getSceneAndTransformerByDrawingSearch(n);
1747
1747
  if (a == null)
1748
1748
  return;
1749
1749
  const { transformer: c, scene: u } = a, d = u.getObject(o);
@@ -1755,7 +1755,7 @@ let nt = class extends ie {
1755
1755
  _scrollUpdateListener() {
1756
1756
  const t = (e, n) => {
1757
1757
  var c;
1758
- const r = this._getSceneAndTransformerByDrawingSearch(e), s = Array.from(this._domLayerInfoMap.keys()).map((u) => ({ id: u, ...this._domLayerInfoMap.get(u) })).filter((u) => u.subUnitId === n && u.unitId === e).map((u) => u.id), o = ae(this._univerInstanceService, { unitId: e, subUnitId: n }), a = (c = this._renderManagerService.getRenderById(e)) == null ? void 0 : c.with(V).getSkeletonParam(n);
1758
+ const r = this._getSceneAndTransformerByDrawingSearch(e), s = Array.from(this._domLayerInfoMap.keys()).map((u) => ({ id: u, ...this._domLayerInfoMap.get(u) })).filter((u) => u.subUnitId === n && u.unitId === e).map((u) => u.id), o = ae(this._univerInstanceService, { unitId: e, subUnitId: n }), a = (c = this._renderManagerService.getRenderById(e)) == null ? void 0 : c.with(H).getSkeletonParam(n);
1759
1759
  !r || !o || !a || s.forEach((u) => {
1760
1760
  const d = this._domLayerInfoMap.get(u);
1761
1761
  if (d) {
@@ -1765,15 +1765,15 @@ let nt = class extends ie {
1765
1765
  });
1766
1766
  };
1767
1767
  this.disposeWithMe(
1768
- this._univerInstanceService.getCurrentTypeOfUnit$(x.UNIVER_SHEET).pipe(
1769
- _e((e) => e ? e.activeSheet$ : Wn(null)),
1768
+ this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET).pipe(
1769
+ Se((e) => e ? e.activeSheet$ : Ln(null)),
1770
1770
  Ee((e) => {
1771
1771
  if (!e) return null;
1772
1772
  const n = e.getUnitId(), r = this._renderManagerService.getRenderById(n);
1773
1773
  return r ? { render: r, unitId: n, subUnitId: e.getSheetId() } : null;
1774
1774
  }),
1775
- _e(
1776
- (e) => e ? Kr(e.render.scene.getViewport(Zn.VIEW_MAIN).onScrollAfter$).pipe(Ee(() => ({ unitId: e.unitId, subUnitId: e.subUnitId }))) : Wn(null)
1775
+ Se(
1776
+ (e) => e ? Jr(e.render.scene.getViewport(Qn.VIEW_MAIN).onScrollAfter$).pipe(Ee(() => ({ unitId: e.unitId, subUnitId: e.subUnitId }))) : Ln(null)
1777
1777
  )
1778
1778
  ).subscribe((e) => {
1779
1779
  if (!e) return;
@@ -1781,12 +1781,12 @@ let nt = class extends ie {
1781
1781
  t(n, r);
1782
1782
  })
1783
1783
  ), this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
1784
- if (e.id === Nn.id) {
1784
+ if (e.id === Wn.id) {
1785
1785
  const n = e.params, { unitId: r } = n;
1786
1786
  Array.from(this._domLayerInfoMap.values()).filter((o) => o.unitId === r).map((o) => o.subUnitId).forEach((o) => {
1787
1787
  t(r, o);
1788
1788
  });
1789
- } else if (e.id === zi.id) {
1789
+ } else if (e.id === Ki.id) {
1790
1790
  const { unitId: n, subUnitId: r } = e.params;
1791
1791
  t(n, r);
1792
1792
  }
@@ -1794,7 +1794,7 @@ let nt = class extends ie {
1794
1794
  }
1795
1795
  _getPosition(t, e) {
1796
1796
  var g;
1797
- const { startX: n, endX: r, startY: s, endY: o } = t, a = (g = this._renderManagerService.getRenderById(e)) == null ? void 0 : g.with(Ve);
1797
+ const { startX: n, endX: r, startY: s, endY: o } = t, a = (g = this._renderManagerService.getRenderById(e)) == null ? void 0 : g.with(He);
1798
1798
  if (a == null)
1799
1799
  return;
1800
1800
  const c = a.getCellWithCoordByOffset(n, s);
@@ -1824,7 +1824,7 @@ let nt = class extends ie {
1824
1824
  this._drawingManagerService.update$.subscribe((t) => {
1825
1825
  t.forEach((e) => {
1826
1826
  const n = this._drawingManagerService.getDrawingByParam(e);
1827
- if (!n || n.drawingType !== L.DRAWING_DOM && n.drawingType !== L.DRAWING_CHART)
1827
+ if (!n || n.drawingType !== W.DRAWING_DOM && n.drawingType !== W.DRAWING_CHART)
1828
1828
  return;
1829
1829
  const r = {
1830
1830
  ...n.transform
@@ -1846,7 +1846,7 @@ let nt = class extends ie {
1846
1846
  updateFloatDomProps(t, e, n, r) {
1847
1847
  const s = this._domLayerInfoMap.get(n), o = this._getSceneAndTransformerByDrawingSearch(t);
1848
1848
  if (s && o) {
1849
- const { scene: a } = o, c = Ie({ unitId: t, subUnitId: e, drawingId: n }), u = a.getObject(c);
1849
+ const { scene: a } = o, c = Ce({ unitId: t, subUnitId: e, drawingId: n }), u = a.getObject(c);
1850
1850
  u && u instanceof Be && u.setProps(r);
1851
1851
  }
1852
1852
  }
@@ -1858,14 +1858,14 @@ let nt = class extends ie {
1858
1858
  });
1859
1859
  if (!n)
1860
1860
  throw new Error("cannot find current target!");
1861
- const { unitId: r, subUnitId: s } = n, { initPosition: o, componentKey: a, data: c, allowTransform: u = !0 } = t, d = e != null ? e : Mt(), l = this._getPosition(o, r);
1861
+ const { unitId: r, subUnitId: s } = n, { initPosition: o, componentKey: a, data: c, allowTransform: u = !0 } = t, d = e != null ? e : Et(), l = this._getPosition(o, r);
1862
1862
  if (l == null)
1863
1863
  return;
1864
1864
  const g = {
1865
1865
  unitId: r,
1866
1866
  subUnitId: s,
1867
1867
  drawingId: d,
1868
- drawingType: t.type || L.DRAWING_DOM,
1868
+ drawingType: t.type || W.DRAWING_DOM,
1869
1869
  componentKey: a,
1870
1870
  sheetTransform: l,
1871
1871
  transform: {
@@ -1877,7 +1877,7 @@ let nt = class extends ie {
1877
1877
  data: c,
1878
1878
  allowTransform: u
1879
1879
  };
1880
- return this._commandService.executeCommand(xt.id, {
1880
+ return this._commandService.executeCommand(Lt.id, {
1881
1881
  unitId: r,
1882
1882
  drawings: [g]
1883
1883
  }), this._add$.next({ unitId: r, subUnitId: s, id: d }), {
@@ -1904,7 +1904,7 @@ let nt = class extends ie {
1904
1904
  }
1905
1905
  // eslint-disable-next-line max-lines-per-function, complexity
1906
1906
  addFloatDomToRange(t, e, n, r) {
1907
- var D, w, M;
1907
+ var D, _, M;
1908
1908
  const s = ae(this._univerInstanceService, {
1909
1909
  unitId: e.unitId,
1910
1910
  subUnitId: e.subUnitId
@@ -1915,16 +1915,16 @@ let nt = class extends ie {
1915
1915
  if (!c) return;
1916
1916
  const u = this._renderManagerService.getRenderById(o);
1917
1917
  if (!u) return;
1918
- const d = (D = this._renderManagerService.getRenderById(o)) == null ? void 0 : D.with(V).getWorksheetSkeleton(a);
1918
+ const d = (D = this._renderManagerService.getRenderById(o)) == null ? void 0 : D.with(H).getWorksheetSkeleton(a);
1919
1919
  if (!d) return;
1920
- const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Mt(), { position: p, position$: m } = this._createRangePositionObserver(t, u, d.skeleton);
1920
+ const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Et(), { position: p, position$: m } = this._createRangePositionObserver(t, u, d.skeleton);
1921
1921
  if (this._getPosition(p, o) == null)
1922
1922
  return;
1923
- const S = c.scene, { scaleX: C } = S.getAncestorScale(), b = Rt(p, n, C), v = {
1923
+ const S = c.scene, { scaleX: C } = S.getAncestorScale(), b = yt(p, n, C), v = {
1924
1924
  unitId: o,
1925
1925
  subUnitId: a,
1926
1926
  drawingId: f,
1927
- drawingType: e.type || L.DRAWING_DOM,
1927
+ drawingType: e.type || W.DRAWING_DOM,
1928
1928
  componentKey: l,
1929
1929
  transform: {
1930
1930
  left: b.startX,
@@ -1936,61 +1936,61 @@ let nt = class extends ie {
1936
1936
  allowTransform: h
1937
1937
  };
1938
1938
  {
1939
- const { unitId: I, subUnitId: E, drawingId: T } = v, y = ae(this._univerInstanceService, { unitId: I, subUnitId: E }), R = v, N = this._univerInstanceService.getUnit(I, x.UNIVER_SHEET);
1939
+ const { unitId: I, subUnitId: E, drawingId: T } = v, y = ae(this._univerInstanceService, { unitId: I, subUnitId: E }), R = v, N = this._univerInstanceService.getUnit(I, L.UNIVER_SHEET);
1940
1940
  if (!N)
1941
1941
  return;
1942
1942
  const j = N.getActiveSheet().getSheetId();
1943
1943
  if (!R || !y)
1944
1944
  return;
1945
- const Q = (w = this._renderManagerService.getRenderById(I)) == null ? void 0 : w.with(V);
1945
+ const Q = (_ = this._renderManagerService.getRenderById(I)) == null ? void 0 : _.with(H);
1946
1946
  if (!Q)
1947
1947
  return;
1948
- const H = Q.getWorksheetSkeleton(E);
1949
- if (!H)
1948
+ const z = Q.getWorksheetSkeleton(E);
1949
+ if (!z)
1950
1950
  return;
1951
- const { transform: G, drawingType: Y, data: Z } = R;
1952
- if (Y !== L.DRAWING_DOM && Y !== L.DRAWING_CHART)
1951
+ const { transform: V, drawingType: Y, data: Z } = R;
1952
+ if (Y !== W.DRAWING_DOM && Y !== W.DRAWING_CHART)
1953
1953
  return;
1954
1954
  const k = this._getSceneAndTransformerByDrawingSearch(I);
1955
1955
  if (k == null)
1956
1956
  return;
1957
1957
  const { scene: ce, canvas: Te } = k;
1958
- if (G == null || j !== E)
1958
+ if (V == null || j !== E)
1959
1959
  return;
1960
- const { left: at, top: ct, width: dt, height: lt, angle: Yt, flipX: Xt, flipY: ut, skewX: ht, skewY: Oe } = G, gt = Ie({ unitId: I, subUnitId: E, drawingId: T }), de = ce.getObject(gt);
1960
+ const { left: ct, top: dt, width: lt, height: ut, angle: Xt, flipX: Gt, flipY: ht, skewX: gt, skewY: Oe } = V, mt = Ce({ unitId: I, subUnitId: E, drawingId: T }), de = ce.getObject(mt);
1961
1961
  if (de != null) {
1962
- de.transformByState({ left: at, top: ct, width: dt, height: lt, angle: Yt, flipX: Xt, flipY: ut, skewX: ht, skewY: Oe });
1962
+ de.transformByState({ left: ct, top: dt, width: lt, height: ut, angle: Xt, flipX: Gt, flipY: ht, skewX: gt, skewY: Oe });
1963
1963
  return;
1964
1964
  }
1965
1965
  const ee = {
1966
- left: at,
1966
+ left: ct,
1967
1967
  // from floatDomParam.transform
1968
- top: ct,
1969
- width: dt,
1970
- height: lt,
1968
+ top: dt,
1969
+ width: lt,
1970
+ height: ut,
1971
1971
  zIndex: this._drawingManagerService.getDrawingOrder(I, E).length - 1
1972
- }, Pe = Y === L.DRAWING_CHART;
1972
+ }, Pe = Y === W.DRAWING_CHART;
1973
1973
  if (Pe) {
1974
1974
  const B = Z ? Z.backgroundColor : "white";
1975
1975
  ee.fill = B, ee.rotateEnabled = !1, Z && Z.border && (ee.stroke = Z.border), ee.paintFirst = "stroke", ee.strokeWidth = 1, ee.borderEnabled = !1, ee.radius = 8;
1976
1976
  }
1977
- const le = new Be(gt, ee);
1978
- Pe && le.setObjectType(Pn.CHART), ce.addObject(le, Ht), R.allowTransform !== !1 && ce.attachTransformerTo(le);
1979
- const ue = new _t(), mt = ce.getMainViewport(), { rowHeaderWidth: Ue, columnHeaderHeight: He } = H.skeleton, ft = {
1980
- top: He,
1977
+ const le = new Be(mt, ee);
1978
+ Pe && le.setObjectType(Nn.CHART), ce.addObject(le, zt), R.allowTransform !== !1 && ce.attachTransformerTo(le);
1979
+ const ue = new vt(), ft = ce.getMainViewport(), { rowHeaderWidth: Ue, columnHeaderHeight: ze } = z.skeleton, pt = {
1980
+ top: ze,
1981
1981
  left: Ue,
1982
- bottom: mt.bottom,
1983
- right: mt.right
1982
+ bottom: ft.bottom,
1983
+ right: ft.right
1984
1984
  }, he = {
1985
1985
  dispose: ue,
1986
1986
  rect: le,
1987
- boundsOfViewArea: ft,
1987
+ boundsOfViewArea: pt,
1988
1988
  domAnchor: n,
1989
1989
  unitId: I,
1990
1990
  subUnitId: E
1991
- }, W = ge(le, k.renderUnit.scene, H.skeleton, y.worksheet, he), Ae = new $e(W);
1991
+ }, $ = ge(le, k.renderUnit.scene, z.skeleton, y.worksheet, he), Ae = new $e($);
1992
1992
  he.position$ = Ae;
1993
- let ze = {
1993
+ let Ke = {
1994
1994
  position$: Ae,
1995
1995
  id: T,
1996
1996
  componentKey: R.componentKey,
@@ -2006,8 +2006,8 @@ let nt = class extends ie {
2006
2006
  data: Z,
2007
2007
  unitId: I
2008
2008
  };
2009
- e.eventPassThrough && (ze = {
2010
- ...ze,
2009
+ e.eventPassThrough && (Ke = {
2010
+ ...Ke,
2011
2011
  onPointerDown: (B) => {
2012
2012
  Te.dispatchEvent(new PointerEvent(B.type, B));
2013
2013
  },
@@ -2017,41 +2017,41 @@ let nt = class extends ie {
2017
2017
  onPointerUp: (B) => {
2018
2018
  Te.dispatchEvent(new PointerEvent(B.type, B));
2019
2019
  }
2020
- }), this._canvasFloatDomService.addFloatDom(ze), this.disposeWithMe(m.subscribe((B) => {
2021
- var pn, wn, _n, vn;
2022
- const fn = Rt({
2020
+ }), this._canvasFloatDomService.addFloatDom(Ke), this.disposeWithMe(m.subscribe((B) => {
2021
+ var vn, Sn, In, Cn;
2022
+ const _n = yt({
2023
2023
  startX: B.startX,
2024
2024
  startY: B.startY,
2025
2025
  endX: B.endX,
2026
2026
  endY: B.endY,
2027
- width: (pn = n.width) != null ? pn : B.width,
2028
- height: (wn = n.height) != null ? wn : B.height,
2027
+ width: (vn = n.width) != null ? vn : B.width,
2028
+ height: (Sn = n.height) != null ? Sn : B.height,
2029
2029
  absolute: {
2030
2030
  left: p.absolute.left,
2031
2031
  top: p.absolute.top
2032
2032
  }
2033
- }, n), kr = Ie({ unitId: I, subUnitId: E, drawingId: T }), Br = new Be(kr, {
2034
- left: fn.startX,
2035
- top: fn.startY,
2036
- width: (_n = n.width) != null ? _n : B.width,
2037
- height: (vn = n.height) != null ? vn : B.height,
2033
+ }, n), Wr = Ce({ unitId: I, subUnitId: E, drawingId: T }), jr = new Be(Wr, {
2034
+ left: _n.startX,
2035
+ top: _n.startY,
2036
+ width: (In = n.width) != null ? In : B.width,
2037
+ height: (Cn = n.height) != null ? Cn : B.height,
2038
2038
  zIndex: this._drawingManagerService.getDrawingOrder(I, E).length - 1
2039
- }), jr = ge(Br, k.renderUnit.scene, H.skeleton, y.worksheet, he);
2040
- Ae.next(jr);
2039
+ }), $r = ge(jr, k.renderUnit.scene, z.skeleton, y.worksheet, he);
2040
+ Ae.next($r);
2041
2041
  }));
2042
- const Ke = (M = this._renderManagerService.getRenderById(I)) == null ? void 0 : M.with(V);
2043
- Ke == null || Ke.currentSkeleton$.subscribe((B) => {
2044
- B && H.sheetId !== B.sheetId && this._removeDom(f, !0);
2042
+ const Ze = (M = this._renderManagerService.getRenderById(I)) == null ? void 0 : M.with(H);
2043
+ Ze == null || Ze.currentSkeleton$.subscribe((B) => {
2044
+ B && z.sheetId !== B.sheetId && this._removeDom(f, !0);
2045
2045
  });
2046
- const pt = le.onTransformChange$.subscribeEvent(() => {
2047
- const B = ge(le, k.renderUnit.scene, H.skeleton, y.worksheet, he);
2046
+ const wt = le.onTransformChange$.subscribeEvent(() => {
2047
+ const B = ge(le, k.renderUnit.scene, z.skeleton, y.worksheet, he);
2048
2048
  Ae.next(
2049
2049
  B
2050
2050
  );
2051
2051
  });
2052
2052
  ue.add(() => {
2053
2053
  this._canvasFloatDomService.removeFloatDom(T);
2054
- }), pt && ue.add(pt), this._domLayerInfoMap.set(T, he);
2054
+ }), wt && ue.add(wt), this._domLayerInfoMap.set(T, he);
2055
2055
  }
2056
2056
  return {
2057
2057
  id: f,
@@ -2073,57 +2073,57 @@ let nt = class extends ie {
2073
2073
  if (!this._getSceneAndTransformerByDrawingSearch(o)) return;
2074
2074
  const u = this._renderManagerService.getRenderById(o);
2075
2075
  if (!u) return;
2076
- const d = (b = this._renderManagerService.getRenderById(o)) == null ? void 0 : b.with(V).getWorksheetSkeleton(a);
2076
+ const d = (b = this._renderManagerService.getRenderById(o)) == null ? void 0 : b.with(H).getWorksheetSkeleton(a);
2077
2077
  if (!d) return;
2078
- const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Mt(), { position: p, position$: m } = this._createRangePositionObserver({
2078
+ const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Et(), { position: p, position$: m } = this._createRangePositionObserver({
2079
2079
  startRow: 0,
2080
2080
  endRow: 0,
2081
2081
  startColumn: t,
2082
2082
  endColumn: t
2083
- }, u, d.skeleton), _ = p;
2084
- if (_.startY = 0, this._getPosition(p, o) == null)
2083
+ }, u, d.skeleton), w = p;
2084
+ if (w.startY = 0, this._getPosition(p, o) == null)
2085
2085
  return;
2086
2086
  const C = {
2087
2087
  unitId: o,
2088
2088
  subUnitId: a,
2089
2089
  drawingId: f,
2090
- drawingType: e.type || L.DRAWING_DOM,
2090
+ drawingType: e.type || W.DRAWING_DOM,
2091
2091
  componentKey: l,
2092
2092
  transform: {
2093
- left: _.startX,
2094
- top: _.startY,
2095
- width: _.width,
2096
- height: _.height
2093
+ left: w.startX,
2094
+ top: w.startY,
2095
+ width: w.width,
2096
+ height: w.height
2097
2097
  },
2098
2098
  data: g,
2099
2099
  allowTransform: h
2100
2100
  };
2101
2101
  {
2102
- const { unitId: w, subUnitId: M, drawingId: I } = C, E = ae(this._univerInstanceService, { unitId: w, subUnitId: M }), T = C, y = this._univerInstanceService.getUnit(w, x.UNIVER_SHEET);
2102
+ const { unitId: _, subUnitId: M, drawingId: I } = C, E = ae(this._univerInstanceService, { unitId: _, subUnitId: M }), T = C, y = this._univerInstanceService.getUnit(_, L.UNIVER_SHEET);
2103
2103
  if (!y)
2104
2104
  return;
2105
2105
  const R = y.getActiveSheet().getSheetId();
2106
2106
  if (!T || !E)
2107
2107
  return;
2108
- const N = (v = this._renderManagerService.getRenderById(w)) == null ? void 0 : v.with(V);
2108
+ const N = (v = this._renderManagerService.getRenderById(_)) == null ? void 0 : v.with(H);
2109
2109
  if (!N)
2110
2110
  return;
2111
2111
  const j = N.getWorksheetSkeleton(M);
2112
2112
  if (!j)
2113
2113
  return;
2114
- const { transform: Q, data: H } = T, G = this._getSceneAndTransformerByDrawingSearch(w);
2115
- if (G == null)
2114
+ const { transform: Q, data: z } = T, V = this._getSceneAndTransformerByDrawingSearch(_);
2115
+ if (V == null)
2116
2116
  return;
2117
- const { scene: Y, canvas: Z } = G;
2117
+ const { scene: Y, canvas: Z } = V;
2118
2118
  if (Q == null || R !== M)
2119
2119
  return;
2120
- const { left: k, top: ce, width: Te, height: at, angle: ct, flipX: dt, flipY: lt, skewX: Yt, skewY: Xt } = Q, ut = Ie({ unitId: w, subUnitId: M, drawingId: I }), ht = Y.getObject(ut);
2121
- if (ht != null) {
2122
- ht.transformByState({ left: k, top: ce, width: Te, height: at, angle: ct, flipX: dt, flipY: lt, skewX: Yt, skewY: Xt });
2120
+ const { left: k, top: ce, width: Te, height: ct, angle: dt, flipX: lt, flipY: ut, skewX: Xt, skewY: Gt } = Q, ht = Ce({ unitId: _, subUnitId: M, drawingId: I }), gt = Y.getObject(ht);
2121
+ if (gt != null) {
2122
+ gt.transformByState({ left: k, top: ce, width: Te, height: ct, angle: dt, flipX: lt, flipY: ut, skewX: Xt, skewY: Gt });
2123
2123
  return;
2124
2124
  }
2125
- const Oe = Rt({
2126
- startX: _.startX,
2125
+ const Oe = yt({
2126
+ startX: w.startX,
2127
2127
  startY: 0,
2128
2128
  endX: p.endX,
2129
2129
  endY: p.endY,
@@ -2133,15 +2133,15 @@ let nt = class extends ie {
2133
2133
  left: p.absolute.left,
2134
2134
  top: p.absolute.top
2135
2135
  }
2136
- }, n), gt = {
2136
+ }, n), mt = {
2137
2137
  left: Oe.startX,
2138
2138
  top: Oe.startY,
2139
2139
  width: Oe.width,
2140
2140
  height: Oe.height,
2141
- zIndex: this._drawingManagerService.getDrawingOrder(w, M).length - 1
2142
- }, de = new Be(ut, gt);
2143
- Y.addObject(de, Ht), T.allowTransform !== !1 && Y.attachTransformerTo(de);
2144
- const ee = new _t(), Pe = Y.getMainViewport(), le = {
2141
+ zIndex: this._drawingManagerService.getDrawingOrder(_, M).length - 1
2142
+ }, de = new Be(ht, mt);
2143
+ Y.addObject(de, zt), T.allowTransform !== !1 && Y.attachTransformerTo(de);
2144
+ const ee = new vt(), Pe = Y.getMainViewport(), le = {
2145
2145
  top: 0,
2146
2146
  //viewMain.top,
2147
2147
  left: Pe.left,
@@ -2151,15 +2151,15 @@ let nt = class extends ie {
2151
2151
  dispose: ee,
2152
2152
  rect: de,
2153
2153
  // position$,
2154
- unitId: w,
2154
+ unitId: _,
2155
2155
  subUnitId: M,
2156
2156
  boundsOfViewArea: le,
2157
2157
  domAnchor: n,
2158
2158
  scrollDirectionResponse: "HORIZONTAL"
2159
2159
  /* HORIZONTAL */
2160
- }, mt = ge(de, G.renderUnit.scene, j.skeleton, E.worksheet, ue), Ue = new $e(mt);
2160
+ }, ft = ge(de, V.renderUnit.scene, j.skeleton, E.worksheet, ue), Ue = new $e(ft);
2161
2161
  ue.position$ = Ue;
2162
- let He = {
2162
+ let ze = {
2163
2163
  position$: Ue,
2164
2164
  id: I,
2165
2165
  componentKey: T.componentKey,
@@ -2169,57 +2169,57 @@ let nt = class extends ie {
2169
2169
  },
2170
2170
  onPointerUp: () => {
2171
2171
  },
2172
- onWheel: (W) => {
2173
- Z.dispatchEvent(new WheelEvent(W.type, W));
2172
+ onWheel: ($) => {
2173
+ Z.dispatchEvent(new WheelEvent($.type, $));
2174
2174
  },
2175
- data: H,
2176
- unitId: w
2175
+ data: z,
2176
+ unitId: _
2177
2177
  };
2178
- e.eventPassThrough && (He = {
2179
- ...He,
2180
- onPointerDown: (W) => {
2181
- Z.dispatchEvent(new PointerEvent(W.type, W));
2178
+ e.eventPassThrough && (ze = {
2179
+ ...ze,
2180
+ onPointerDown: ($) => {
2181
+ Z.dispatchEvent(new PointerEvent($.type, $));
2182
2182
  },
2183
- onPointerMove: (W) => {
2184
- Z.dispatchEvent(new PointerEvent(W.type, W));
2183
+ onPointerMove: ($) => {
2184
+ Z.dispatchEvent(new PointerEvent($.type, $));
2185
2185
  },
2186
- onPointerUp: (W) => {
2187
- Z.dispatchEvent(new PointerEvent(W.type, W));
2186
+ onPointerUp: ($) => {
2187
+ Z.dispatchEvent(new PointerEvent($.type, $));
2188
2188
  }
2189
- }), this._canvasFloatDomService.addFloatDom(He);
2190
- const ft = de.onTransformChange$.subscribeEvent(() => {
2191
- const W = ge(de, G.renderUnit.scene, j.skeleton, E.worksheet, ue);
2189
+ }), this._canvasFloatDomService.addFloatDom(ze);
2190
+ const pt = de.onTransformChange$.subscribeEvent(() => {
2191
+ const $ = ge(de, V.renderUnit.scene, j.skeleton, E.worksheet, ue);
2192
2192
  Ue.next(
2193
- W
2193
+ $
2194
2194
  );
2195
2195
  });
2196
- this.disposeWithMe(m.subscribe((W) => {
2197
- const Ae = Rt({
2198
- startX: W.startX,
2196
+ this.disposeWithMe(m.subscribe(($) => {
2197
+ const Ae = yt({
2198
+ startX: $.startX,
2199
2199
  startY: 0,
2200
- endX: W.endX,
2201
- endY: W.endY,
2200
+ endX: $.endX,
2201
+ endY: $.endY,
2202
2202
  width: n.width,
2203
2203
  height: n.height,
2204
2204
  absolute: {
2205
2205
  left: p.absolute.left,
2206
2206
  top: p.absolute.top
2207
2207
  }
2208
- }, n), ze = Ie({ unitId: w, subUnitId: M, drawingId: I }), Ke = new Be(ze, {
2208
+ }, n), Ke = Ce({ unitId: _, subUnitId: M, drawingId: I }), Ze = new Be(Ke, {
2209
2209
  left: Ae.startX,
2210
2210
  top: 0,
2211
2211
  width: n.width,
2212
2212
  height: n.height,
2213
- zIndex: this._drawingManagerService.getDrawingOrder(w, M).length - 1
2214
- }), pt = ge(Ke, G.renderUnit.scene, j.skeleton, E.worksheet, ue);
2215
- Ue.next(pt);
2213
+ zIndex: this._drawingManagerService.getDrawingOrder(_, M).length - 1
2214
+ }), wt = ge(Ze, V.renderUnit.scene, j.skeleton, E.worksheet, ue);
2215
+ Ue.next(wt);
2216
2216
  }));
2217
- const he = (D = this._renderManagerService.getRenderById(w)) == null ? void 0 : D.with(V);
2218
- he == null || he.currentSkeleton$.subscribe((W) => {
2219
- W && d.sheetId !== W.sheetId && this._removeDom(f, !0);
2217
+ const he = (D = this._renderManagerService.getRenderById(_)) == null ? void 0 : D.with(H);
2218
+ he == null || he.currentSkeleton$.subscribe(($) => {
2219
+ $ && d.sheetId !== $.sheetId && this._removeDom(f, !0);
2220
2220
  }), ee.add(() => {
2221
2221
  this._canvasFloatDomService.removeFloatDom(I);
2222
- }), ft && ee.add(ft), this._domLayerInfoMap.set(I, ue);
2222
+ }), pt && ee.add(pt), this._domLayerInfoMap.set(I, ue);
2223
2223
  }
2224
2224
  return {
2225
2225
  id: f,
@@ -2241,19 +2241,19 @@ let nt = class extends ie {
2241
2241
  // eslint-disable-next-line max-lines-per-function
2242
2242
  _createRangePositionObserver(t, e, n) {
2243
2243
  let { startRow: r, startColumn: s } = t;
2244
- const o = Qe(r, s, n), a = new $e(o), c = Qe(t.endRow, t.endColumn, n), u = new $e(c), d = () => {
2245
- const m = Qe(r, s, n), _ = Qe(t.endRow, t.endColumn, n);
2246
- a.next(m), u.next(_);
2247
- }, l = new _t();
2244
+ const o = et(r, s, n), a = new $e(o), c = et(t.endRow, t.endColumn, n), u = new $e(c), d = () => {
2245
+ const m = et(r, s, n), w = et(t.endRow, t.endColumn, n);
2246
+ a.next(m), u.next(w);
2247
+ }, l = new vt();
2248
2248
  l.add(e.engine.clientRect$.subscribe(() => d())), l.add(this._commandService.onCommandExecuted((m) => {
2249
- if (m.id === Ki.id && m.params.rowsAutoHeightInfo.findIndex((S) => S.row === r) > -1) {
2249
+ if (m.id === Zi.id && m.params.rowsAutoHeightInfo.findIndex((S) => S.row === r) > -1) {
2250
2250
  d();
2251
2251
  return;
2252
2252
  }
2253
- (Zi.indexOf(m.id) > -1 || m.id === Ei.id || m.id === Nn.id) && d();
2253
+ (Ji.indexOf(m.id) > -1 || m.id === Oi.id || m.id === Wn.id) && d();
2254
2254
  }));
2255
- const g = (m, _) => {
2256
- r = m, s = _, d();
2255
+ const g = (m, w) => {
2256
+ r = m, s = w, d();
2257
2257
  }, h = () => ({
2258
2258
  rotate: 0,
2259
2259
  width: c.right - o.left,
@@ -2268,19 +2268,19 @@ let nt = class extends ie {
2268
2268
  endY: c.bottom
2269
2269
  }), f = a.pipe(
2270
2270
  Ee((m) => {
2271
- const _ = Qe(t.endRow, t.endColumn, n);
2271
+ const w = et(t.endRow, t.endColumn, n);
2272
2272
  return {
2273
2273
  rotate: 0,
2274
- width: _.right - m.left,
2275
- height: _.bottom - m.top,
2274
+ width: w.right - m.left,
2275
+ height: w.bottom - m.top,
2276
2276
  absolute: {
2277
2277
  left: !0,
2278
2278
  top: !0
2279
2279
  },
2280
2280
  startX: m.left,
2281
2281
  startY: m.top,
2282
- endX: _.right,
2283
- endY: _.bottom
2282
+ endX: w.right,
2283
+ endY: w.bottom
2284
2284
  };
2285
2285
  })
2286
2286
  ), p = h();
@@ -2294,16 +2294,16 @@ let nt = class extends ie {
2294
2294
  };
2295
2295
  }
2296
2296
  };
2297
- nt = Gs([
2298
- be(0, A(q)),
2299
- be(1, Se),
2300
- be(2, A(X)),
2301
- be(3, se),
2302
- be(4, A(Wi)),
2303
- be(5, oe),
2304
- be(6, A(Hr))
2305
- ], nt);
2306
- function Qe(i, t, e) {
2297
+ rt = Gs([
2298
+ Re(0, A(q)),
2299
+ Re(1, fe),
2300
+ Re(2, A(G)),
2301
+ Re(3, se),
2302
+ Re(4, A(xi)),
2303
+ Re(5, oe),
2304
+ Re(6, A(Kr))
2305
+ ], rt);
2306
+ function et(i, t, e) {
2307
2307
  const n = e.getCellWithCoordByIndex(i, t), r = n.isMergedMainCell ? n.mergeInfo : n;
2308
2308
  return {
2309
2309
  left: r.startX,
@@ -2312,22 +2312,22 @@ function Qe(i, t, e) {
2312
2312
  bottom: r.endY
2313
2313
  };
2314
2314
  }
2315
- function Rt(i, t, e) {
2315
+ function yt(i, t, e) {
2316
2316
  var u, d;
2317
2317
  e = e != null ? e : 1;
2318
2318
  const n = i.endX - i.startX, r = i.endY - i.startY, s = (u = t == null ? void 0 : t.width) != null ? u : n, o = (d = t == null ? void 0 : t.height) != null ? d : r;
2319
2319
  let a = 0, c = 0;
2320
2320
  if (t) {
2321
2321
  if (t.horizonOffsetAlign === "right") {
2322
- const l = yt(t.marginX, n * e);
2322
+ const l = Mt(t.marginX, n * e);
2323
2323
  a = i.endX - l - s;
2324
2324
  } else
2325
- a = i.startX + yt(t.marginX, n);
2325
+ a = i.startX + Mt(t.marginX, n);
2326
2326
  if (t.verticalOffsetAlign === "bottom") {
2327
- const l = yt(t.marginY, r * e);
2327
+ const l = Mt(t.marginY, r * e);
2328
2328
  c = i.endY - l - o;
2329
2329
  } else
2330
- c = i.startY + yt(t.marginY, r);
2330
+ c = i.startY + Mt(t.marginY, r);
2331
2331
  }
2332
2332
  return {
2333
2333
  rotate: 0,
@@ -2343,15 +2343,80 @@ function Rt(i, t, e) {
2343
2343
  }
2344
2344
  };
2345
2345
  }
2346
- function yt(i, t) {
2346
+ function Mt(i, t) {
2347
2347
  if (i === void 0) return 0;
2348
2348
  if (typeof i == "number") return i;
2349
2349
  const e = Number.parseFloat(i);
2350
2350
  return t * e / 100;
2351
2351
  }
2352
- const Vs = (i) => {
2353
- const { floatDomInfos: t, scene: e, skeleton: n, worksheet: r } = i, s = os(() => t.map((o) => {
2354
- const { width: a, height: c, angle: u, left: d, top: l } = o.transform, g = Mr(
2352
+ const Vs = as((i) => {
2353
+ var p, m;
2354
+ const { layer: t, id: e, position: n } = i, r = me(fe), s = xe(null), o = xe(null), a = xe(`transform: rotate(${n == null ? void 0 : n.rotate}deg) translate(${n == null ? void 0 : n.startX}px, ${n == null ? void 0 : n.startY}px)`), c = xe((p = n == null ? void 0 : n.startY) != null ? p : 0), u = xe((m = n == null ? void 0 : n.startX) != null ? m : 0), d = typeof t.componentKey == "string" ? me(hn).get(t.componentKey) : t.componentKey, l = sn(() => ({
2355
+ data: t.data,
2356
+ ...t.props
2357
+ }), [t.data, t.props]), g = {
2358
+ width: `${n.width - 4}px`,
2359
+ height: `${n.height - 4}px`,
2360
+ left: `${n.absolute.left ? 0 : "auto"}`,
2361
+ top: `${n.absolute.top ? 0 : "auto"}`,
2362
+ right: `${n.absolute.left ? "auto" : 0}`,
2363
+ bottom: `${n.absolute.top ? "auto" : 0}`
2364
+ };
2365
+ a.current = `rotate(${n.rotate}deg)`, c.current = n.startY, u.current = n.startX;
2366
+ const h = r.getUnit(t.unitId), f = sn(() => d ? /* @__PURE__ */ X(
2367
+ d,
2368
+ {
2369
+ ...l,
2370
+ unitId: t.unitId,
2371
+ unit: h,
2372
+ floatDomId: t.id,
2373
+ context: {
2374
+ root: o
2375
+ }
2376
+ }
2377
+ ) : null, [d, l]);
2378
+ return n ? /* @__PURE__ */ X(
2379
+ "div",
2380
+ {
2381
+ ref: s,
2382
+ className: "univer-z-10",
2383
+ style: {
2384
+ position: "absolute",
2385
+ top: c.current,
2386
+ left: u.current,
2387
+ width: Math.max(n.endX - n.startX - 2, 0),
2388
+ height: Math.max(n.endY - n.startY - 2, 0),
2389
+ transform: a.current,
2390
+ overflow: "hidden",
2391
+ transformOrigin: "center center"
2392
+ },
2393
+ onPointerMove: (w) => {
2394
+ t.onPointerMove(w.nativeEvent);
2395
+ },
2396
+ onPointerDown: (w) => {
2397
+ t.onPointerDown(w.nativeEvent);
2398
+ },
2399
+ onPointerUp: (w) => {
2400
+ t.onPointerUp(w.nativeEvent);
2401
+ },
2402
+ onWheel: (w) => {
2403
+ t.onWheel(w.nativeEvent);
2404
+ },
2405
+ children: /* @__PURE__ */ X(
2406
+ "div",
2407
+ {
2408
+ id: e,
2409
+ ref: o,
2410
+ className: "univer-overflow-hidden",
2411
+ style: { position: "absolute", ...g },
2412
+ children: f
2413
+ }
2414
+ )
2415
+ }
2416
+ ) : null;
2417
+ }), Hs = (i) => {
2418
+ const { floatDomInfos: t, scene: e, skeleton: n, worksheet: r } = i, s = sn(() => t.map((o) => {
2419
+ const { width: a, height: c, angle: u, left: d, top: l } = o.transform, g = Tr(
2355
2420
  {
2356
2421
  left: d != null ? d : 0,
2357
2422
  right: (d != null ? d : 0) + (a != null ? a : 0),
@@ -2374,6 +2439,7 @@ const Vs = (i) => {
2374
2439
  absolute: g.absolute
2375
2440
  }, m = {
2376
2441
  position$: new $e(p),
2442
+ position: p,
2377
2443
  id: o.drawingId,
2378
2444
  componentKey: o.componentKey,
2379
2445
  onPointerMove: () => {
@@ -2388,14 +2454,14 @@ const Vs = (i) => {
2388
2454
  };
2389
2455
  return [o.drawingId, m];
2390
2456
  }), [t, e, n, r]);
2391
- return /* @__PURE__ */ K("div", { style: { position: "absolute", top: 0, left: 0 }, children: s.map(([o, a]) => /* @__PURE__ */ K($i, { layer: a, id: o }, o)) });
2457
+ return /* @__PURE__ */ X("div", { style: { position: "absolute", top: 0, left: 0 }, children: s.map(([o, a]) => /* @__PURE__ */ X(Vs, { layer: a, id: o, position: a.position }, o)) });
2392
2458
  };
2393
- var Hs = Object.getOwnPropertyDescriptor, zs = (i, t, e, n) => {
2394
- for (var r = n > 1 ? void 0 : n ? Hs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
2459
+ var zs = Object.getOwnPropertyDescriptor, Ks = (i, t, e, n) => {
2460
+ for (var r = n > 1 ? void 0 : n ? zs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
2395
2461
  (o = i[s]) && (r = o(r) || r);
2396
2462
  return r;
2397
- }, Re = (i, t) => (e, n) => t(e, n, i);
2398
- let kt = class extends ie {
2463
+ }, ye = (i, t) => (e, n) => t(e, n, i);
2464
+ let Bt = class extends ie {
2399
2465
  constructor(i, t, e, n, r, s, o) {
2400
2466
  super(), this._sheetPrintInterceptorService = i, this._drawingRenderService = t, this._drawingManagerService = e, this._renderManagerService = n, this._canvasFloatDomManagerService = r, this._componetManager = s, this._injector = o, this._initPrinting(), this._initPrintingDom();
2401
2467
  }
@@ -2407,7 +2473,8 @@ let kt = class extends ie {
2407
2473
  handler: (i, t, e) => {
2408
2474
  const { unitId: n, scene: r, subUnitId: s } = t, o = this._drawingManagerService.getDrawingDataForUnit(n), a = o == null ? void 0 : o[s];
2409
2475
  return a && a.order.forEach((c) => {
2410
- this._drawingRenderService.renderDrawing(a.data[c], r);
2476
+ const u = a.data[c];
2477
+ u.drawingType !== W.DRAWING_CHART && u.drawingType !== W.DRAWING_DOM && this._drawingRenderService.renderDrawing(u, r);
2411
2478
  }), e();
2412
2479
  }
2413
2480
  }
@@ -2420,7 +2487,7 @@ let kt = class extends ie {
2420
2487
  const { unitId: n, subUnitId: r } = t, s = this._renderManagerService.getRenderById(n);
2421
2488
  if (!s)
2422
2489
  return e(i);
2423
- const o = s.with(V).getSkeletonParam(r);
2490
+ const o = s.with(H).getSkeletonParam(r);
2424
2491
  if (!o)
2425
2492
  return e(i);
2426
2493
  const a = this._drawingManagerService.getDrawingDataForUnit(n), c = a == null ? void 0 : a[t.subUnitId];
@@ -2428,7 +2495,7 @@ let kt = class extends ie {
2428
2495
  return e(i);
2429
2496
  const { scaleX: u, scaleY: d } = s.scene, l = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, g = c.order.map((h) => c.data[h]);
2430
2497
  return g.length ? (g.forEach((h) => {
2431
- if (!h.groupId && h.transform && ye.isDefine(h.transform.left) && ye.isDefine(h.transform.top) && ye.isDefine(h.transform.width) && ye.isDefine(h.transform.height)) {
2498
+ if (!h.groupId && h.transform && Me.isDefine(h.transform.left) && Me.isDefine(h.transform.top) && Me.isDefine(h.transform.width) && Me.isDefine(h.transform.height)) {
2432
2499
  const f = o.skeleton.getCellIndexByOffset(h.transform.left, h.transform.top, u, d, { x: 0, y: 0 }), p = o.skeleton.getCellIndexByOffset(h.transform.left + h.transform.width, h.transform.top + h.transform.height, u, d, { x: 0, y: 0 });
2433
2500
  f.column < l.startColumn && (l.startColumn = f.column), f.row < l.startRow && (l.startRow = f.row), l.endRow < p.row && (l.endRow = p.row), l.endColumn < p.column && (l.endColumn = p.column);
2434
2501
  }
@@ -2444,68 +2511,74 @@ let kt = class extends ie {
2444
2511
  this._sheetPrintInterceptorService.interceptor.getInterceptPoints().PRINTING_DOM_COLLECT,
2445
2512
  {
2446
2513
  handler: (i, t, e) => {
2447
- const { unitId: n, subUnitId: r } = t, s = this._canvasFloatDomManagerService.getFloatDomsBySubUnitId(n, r).map((a) => {
2448
- const c = this._drawingManagerService.getDrawingByParam({ drawingId: a.id, unitId: n, subUnitId: r });
2449
- return c && {
2450
- ...c,
2451
- componentKey: this._componetManager.get(c.drawingType === L.DRAWING_CHART ? Zr : c.componentKey)
2452
- };
2453
- }).filter(Boolean), o = qn(Vs, this._injector);
2454
- return ls(
2455
- /* @__PURE__ */ K(o, { floatDomInfos: s, scene: t.scene, skeleton: t.skeleton, worksheet: t.worksheet }),
2456
- t.root
2457
- ), i == null || i.add(() => {
2458
- us(t.root);
2459
- }), e(i);
2514
+ const { unitId: n, subUnitId: r } = t, s = this._drawingManagerService.getDrawingDataForUnit(n), o = s == null ? void 0 : s[r];
2515
+ if (o) {
2516
+ const a = o.order.map((u) => {
2517
+ const d = o.data[u];
2518
+ return d.drawingType === W.DRAWING_CHART ? {
2519
+ ...d,
2520
+ componentKey: this._componetManager.get(qr)
2521
+ } : d.drawingType === W.DRAWING_DOM ? {
2522
+ ...d,
2523
+ componentKey: this._componetManager.get(d.componentKey)
2524
+ } : null;
2525
+ }).filter(Boolean), c = tr(Hs, this._injector);
2526
+ return ls(
2527
+ /* @__PURE__ */ X(c, { floatDomInfos: a, scene: t.scene, skeleton: t.skeleton, worksheet: t.worksheet }),
2528
+ t.root
2529
+ ), i == null || i.add(() => {
2530
+ us(t.root);
2531
+ }), e(i);
2532
+ }
2460
2533
  }
2461
2534
  }
2462
2535
  )
2463
2536
  );
2464
2537
  }
2465
2538
  };
2466
- kt = zs([
2467
- Re(0, A(Ti)),
2468
- Re(1, A(Kn)),
2469
- Re(2, se),
2470
- Re(3, q),
2471
- Re(4, A(nt)),
2472
- Re(5, A(Qn)),
2473
- Re(6, A(Ge))
2474
- ], kt);
2475
- var Ks = Object.getOwnPropertyDescriptor, Zs = (i, t, e, n) => {
2476
- for (var r = n > 1 ? void 0 : n ? Ks(t, e) : t, s = i.length - 1, o; s >= 0; s--)
2539
+ Bt = Ks([
2540
+ ye(0, A(Pi)),
2541
+ ye(1, A(qn)),
2542
+ ye(2, se),
2543
+ ye(3, q),
2544
+ ye(4, A(rt)),
2545
+ ye(5, A(hn)),
2546
+ ye(6, A(Ve))
2547
+ ], Bt);
2548
+ var Zs = Object.getOwnPropertyDescriptor, Js = (i, t, e, n) => {
2549
+ for (var r = n > 1 ? void 0 : n ? Zs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
2477
2550
  (o = i[s]) && (r = o(r) || r);
2478
2551
  return r;
2479
- }, pe = (i, t) => (e, n) => t(e, n, i);
2480
- const Js = [
2481
- er.id,
2482
- tr.id,
2552
+ }, _e = (i, t) => (e, n) => t(e, n, i);
2553
+ const qs = [
2483
2554
  nr.id,
2484
2555
  rr.id,
2485
2556
  ir.id,
2486
2557
  sr.id,
2487
2558
  or.id,
2488
2559
  ar.id,
2489
- tn.id,
2490
- nn.id,
2491
2560
  cr.id,
2492
2561
  dr.id,
2562
+ nn.id,
2563
+ rn.id,
2493
2564
  lr.id,
2494
2565
  ur.id,
2495
2566
  hr.id,
2496
2567
  gr.id,
2497
2568
  mr.id,
2498
2569
  fr.id,
2499
- pr.id
2500
- ], qs = [
2501
- Ji.id,
2570
+ pr.id,
2571
+ wr.id,
2572
+ _r.id
2573
+ ], Qs = [
2502
2574
  qi.id,
2503
2575
  Qi.id,
2504
2576
  es.id,
2505
2577
  ts.id,
2506
- ns.id
2578
+ ns.id,
2579
+ rs.id
2507
2580
  ];
2508
- let cn = class extends ie {
2581
+ let ln = class extends ie {
2509
2582
  constructor(i, t, e, n, r, s, o, a, c) {
2510
2583
  super(), this._context = i, this._renderManagerService = t, this._commandService = e, this._selectionRenderService = n, this._skeletonManagerService = r, this._sheetInterceptorService = s, this._sheetDrawingService = o, this._drawingManagerService = a, this._univerInstanceService = c, this._sheetInterceptorListener(), this._commandListener(), this._sheetRefreshListener();
2511
2584
  }
@@ -2513,57 +2586,57 @@ let cn = class extends ie {
2513
2586
  this.disposeWithMe(
2514
2587
  this._sheetInterceptorService.interceptCommand({
2515
2588
  getMutations: (i) => {
2516
- if (!Js.includes(i.id))
2589
+ if (!qs.includes(i.id))
2517
2590
  return { redos: [], undos: [] };
2518
2591
  if (i.params == null)
2519
2592
  return { redos: [], undos: [] };
2520
2593
  const t = i.id;
2521
- if (t === er.id)
2594
+ if (t === nr.id)
2522
2595
  return this._moveRowInterceptor(i.params, "insert");
2523
- if ([mr.id, fr.id, pr.id].includes(t))
2596
+ if ([pr.id, wr.id, _r.id].includes(t))
2524
2597
  return this._moveRangeInterceptor(i.params);
2525
- if (t === tr.id)
2598
+ if (t === rr.id)
2526
2599
  return this._moveColInterceptor(i.params, "insert");
2527
- if (t === nr.id)
2600
+ if (t === ir.id)
2528
2601
  return this._moveRowInterceptor(i.params, "remove");
2529
- if (t === rr.id)
2602
+ if (t === sr.id)
2530
2603
  return this._moveColInterceptor(i.params, "remove");
2531
- if (t === ir.id) {
2604
+ if (t === or.id) {
2532
2605
  const { range: e } = i.params;
2533
2606
  return this._getRangeMoveUndo(
2534
2607
  e,
2535
2608
  0
2536
2609
  /* deleteLeft */
2537
2610
  );
2538
- } else if (t === sr.id) {
2611
+ } else if (t === ar.id) {
2539
2612
  const { range: e } = i.params;
2540
2613
  return this._getRangeMoveUndo(
2541
2614
  e,
2542
2615
  1
2543
2616
  /* deleteUp */
2544
2617
  );
2545
- } else if (t === or.id) {
2618
+ } else if (t === cr.id) {
2546
2619
  const { range: e } = i.params;
2547
2620
  return this._getRangeMoveUndo(
2548
2621
  e,
2549
2622
  2
2550
2623
  /* insertDown */
2551
2624
  );
2552
- } else if (t === ar.id) {
2625
+ } else if (t === dr.id) {
2553
2626
  const { range: e } = i.params;
2554
2627
  return this._getRangeMoveUndo(
2555
2628
  e,
2556
2629
  3
2557
2630
  /* insertRight */
2558
2631
  );
2559
- } else if (t === lr.id || t === ur.id) {
2632
+ } else if (t === hr.id || t === gr.id) {
2560
2633
  const e = i.params, { unitId: n, subUnitId: r, ranges: s } = e;
2561
2634
  return this._getDrawingUndoForRowVisible(n, r, s);
2562
- } else if (t === hr.id || t === gr.id) {
2635
+ } else if (t === mr.id || t === fr.id) {
2563
2636
  const e = i.params, { unitId: n, subUnitId: r, ranges: s } = e;
2564
2637
  return this._getDrawingUndoForColVisible(n, r, s);
2565
- } else if (t === tn.id || t === nn.id || t === cr.id || t === dr.id) {
2566
- const e = i.params, { unitId: n, subUnitId: r, ranges: s } = e, o = t === tn.id || t === nn.id;
2638
+ } else if (t === nn.id || t === rn.id || t === lr.id || t === ur.id) {
2639
+ const e = i.params, { unitId: n, subUnitId: r, ranges: s } = e, o = t === nn.id || t === rn.id;
2567
2640
  return this._getDrawingUndoForRowAndColSize(n, r, s, o);
2568
2641
  }
2569
2642
  return { redos: [], undos: [] };
@@ -2601,37 +2674,37 @@ let cn = class extends ie {
2601
2674
  updateDrawings: n,
2602
2675
  deleteDrawings: r
2603
2676
  };
2604
- const { startRow: _, endRow: S, startColumn: C, endColumn: b } = i;
2677
+ const { startRow: w, endRow: S, startColumn: C, endColumn: b } = i;
2605
2678
  let v = null, D = null;
2606
- if (t === 0 && h >= _ && p <= S)
2679
+ if (t === 0 && h >= w && p <= S)
2607
2680
  if (f >= C && m <= b)
2608
2681
  r.push({ unitId: c, subUnitId: u, drawingId: d });
2609
2682
  else {
2610
- const w = this._shrinkCol(s, a, C, b, o);
2611
- v = w == null ? void 0 : w.newSheetTransform, D = w == null ? void 0 : w.newTransform;
2683
+ const _ = this._shrinkCol(s, a, C, b, o);
2684
+ v = _ == null ? void 0 : _.newSheetTransform, D = _ == null ? void 0 : _.newTransform;
2612
2685
  }
2613
2686
  else if (t === 1 && f >= C && m <= b)
2614
- if (h >= _ && p <= S)
2687
+ if (h >= w && p <= S)
2615
2688
  r.push({ unitId: c, subUnitId: u, drawingId: d });
2616
2689
  else {
2617
- const w = this._shrinkRow(s, a, _, S, o);
2618
- v = w == null ? void 0 : w.newSheetTransform, D = w == null ? void 0 : w.newTransform;
2690
+ const _ = this._shrinkRow(s, a, w, S, o);
2691
+ v = _ == null ? void 0 : _.newSheetTransform, D = _ == null ? void 0 : _.newTransform;
2619
2692
  }
2620
2693
  else if (t === 2) {
2621
- const w = this._expandRow(s, a, _, S, o);
2622
- v = w == null ? void 0 : w.newSheetTransform, D = w == null ? void 0 : w.newTransform;
2694
+ const _ = this._expandRow(s, a, w, S, o);
2695
+ v = _ == null ? void 0 : _.newSheetTransform, D = _ == null ? void 0 : _.newTransform;
2623
2696
  } else if (t === 3) {
2624
- const w = this._expandCol(s, a, C, b, o);
2625
- v = w == null ? void 0 : w.newSheetTransform, D = w == null ? void 0 : w.newTransform;
2697
+ const _ = this._expandCol(s, a, C, b, o);
2698
+ v = _ == null ? void 0 : _.newSheetTransform, D = _ == null ? void 0 : _.newTransform;
2626
2699
  }
2627
2700
  if (v != null && D != null) {
2628
- const w = z(v, this._selectionRenderService, this._skeletonManagerService);
2629
- n.push({ ...e, sheetTransform: v, transform: w });
2701
+ const _ = K(v, this._selectionRenderService, this._skeletonManagerService);
2702
+ n.push({ ...e, sheetTransform: v, transform: _ });
2630
2703
  }
2631
2704
  return { updateDrawings: n, deleteDrawings: r };
2632
2705
  }
2633
2706
  _remainDrawingSize(i, t, e) {
2634
- const n = $({ ...i }, this._selectionRenderService);
2707
+ const n = x({ ...i }, this._selectionRenderService);
2635
2708
  n != null && t.push({
2636
2709
  ...e,
2637
2710
  sheetTransform: n
@@ -2645,9 +2718,9 @@ let cn = class extends ie {
2645
2718
  if (f === O.None)
2646
2719
  this._remainDrawingSize(h, r, l);
2647
2720
  else {
2648
- const { from: p, to: m } = g, { row: _, column: S } = p, { row: C, column: b } = m;
2721
+ const { from: p, to: m } = g, { row: w, column: S } = p, { row: C, column: b } = m;
2649
2722
  for (let v = 0; v < e.length; v++) {
2650
- const D = e[v], { startRow: w, endRow: M, startColumn: I, endColumn: E } = D;
2723
+ const D = e[v], { startRow: _, endRow: M, startColumn: I, endColumn: E } = D;
2651
2724
  if (b < I)
2652
2725
  continue;
2653
2726
  if (f === O.Position) {
@@ -2658,7 +2731,7 @@ let cn = class extends ie {
2658
2731
  return;
2659
2732
  N = { ...h, left: j.startX };
2660
2733
  }
2661
- if (N != null && (R = $(N, this._selectionRenderService), R != null && N != null)) {
2734
+ if (N != null && (R = x(N, this._selectionRenderService), R != null && N != null)) {
2662
2735
  r.push({ ...l, sheetTransform: R, transform: N });
2663
2736
  break;
2664
2737
  }
@@ -2692,12 +2765,12 @@ let cn = class extends ie {
2692
2765
  if (y = {
2693
2766
  ...h,
2694
2767
  width: ((h == null ? void 0 : h.width) || 0) - R.endX + R.startX
2695
- }, T = $(y, this._selectionRenderService), T != null && y != null) {
2768
+ }, T = x(y, this._selectionRenderService), T != null && y != null) {
2696
2769
  s.push({ ...l, sheetTransform: T, transform: y });
2697
2770
  break;
2698
2771
  }
2699
2772
  }
2700
- if (y != null && (T = $(y, this._selectionRenderService)), y != null && T != null) {
2773
+ if (y != null && (T = x(y, this._selectionRenderService)), y != null && T != null) {
2701
2774
  r.push({ ...l, sheetTransform: T, transform: y });
2702
2775
  break;
2703
2776
  } else
@@ -2739,31 +2812,31 @@ let cn = class extends ie {
2739
2812
  if (f === O.None)
2740
2813
  this._remainDrawingSize(h, r, l);
2741
2814
  else {
2742
- const { from: p, to: m } = g, { row: _, column: S } = p, { row: C, column: b } = m;
2815
+ const { from: p, to: m } = g, { row: w, column: S } = p, { row: C, column: b } = m;
2743
2816
  for (let v = 0; v < e.length; v++) {
2744
- const D = e[v], { startRow: w, endRow: M, startColumn: I, endColumn: E } = D;
2745
- if (C < w)
2817
+ const D = e[v], { startRow: _, endRow: M, startColumn: I, endColumn: E } = D;
2818
+ if (C < _)
2746
2819
  continue;
2747
2820
  if (f === O.Position) {
2748
2821
  let R = null, N = null;
2749
- if (_ >= w && _ <= M) {
2750
- const j = this._skeletonManagerService.attachRangeWithCoord({ startColumn: p.column, endColumn: m.column, startRow: _, endRow: M });
2822
+ if (w >= _ && w <= M) {
2823
+ const j = this._skeletonManagerService.attachRangeWithCoord({ startColumn: p.column, endColumn: m.column, startRow: w, endRow: M });
2751
2824
  if (j == null)
2752
2825
  return;
2753
2826
  N = { ...h, top: j.startY };
2754
2827
  }
2755
- if (N != null && (R = $(N, this._selectionRenderService), R != null && N != null)) {
2828
+ if (N != null && (R = x(N, this._selectionRenderService), R != null && N != null)) {
2756
2829
  r.push({ ...l, sheetTransform: R, transform: N });
2757
2830
  break;
2758
2831
  }
2759
2832
  this._remainDrawingSize(h, r, l);
2760
2833
  continue;
2761
2834
  }
2762
- if (_ >= w && C <= M)
2835
+ if (w >= _ && C <= M)
2763
2836
  continue;
2764
2837
  let T = null, y = null;
2765
- if (_ >= w && _ <= M) {
2766
- const R = this._skeletonManagerService.attachRangeWithCoord({ startColumn: p.column, endColumn: m.column, startRow: _, endRow: M });
2838
+ if (w >= _ && w <= M) {
2839
+ const R = this._skeletonManagerService.attachRangeWithCoord({ startColumn: p.column, endColumn: m.column, startRow: w, endRow: M });
2767
2840
  if (R == null)
2768
2841
  return;
2769
2842
  y = {
@@ -2771,8 +2844,8 @@ let cn = class extends ie {
2771
2844
  top: (R == null ? void 0 : R.startY) || 0,
2772
2845
  height: ((h == null ? void 0 : h.height) || 0) - R.endY + R.startY
2773
2846
  };
2774
- } else if (C >= w && C <= M) {
2775
- const R = this._skeletonManagerService.attachRangeWithCoord({ startColumn: p.column, endColumn: m.column, startRow: w, endRow: C });
2847
+ } else if (C >= _ && C <= M) {
2848
+ const R = this._skeletonManagerService.attachRangeWithCoord({ startColumn: p.column, endColumn: m.column, startRow: _, endRow: C });
2776
2849
  if (R == null)
2777
2850
  return;
2778
2851
  y = {
@@ -2780,18 +2853,18 @@ let cn = class extends ie {
2780
2853
  top: R.startY - ((h == null ? void 0 : h.height) || 0)
2781
2854
  };
2782
2855
  } else {
2783
- const R = this._skeletonManagerService.attachRangeWithCoord({ startColumn: p.column, endColumn: m.column, startRow: w, endRow: M });
2856
+ const R = this._skeletonManagerService.attachRangeWithCoord({ startColumn: p.column, endColumn: m.column, startRow: _, endRow: M });
2784
2857
  if (R == null)
2785
2858
  return;
2786
2859
  if (y = {
2787
2860
  ...h,
2788
2861
  height: ((h == null ? void 0 : h.height) || 0) - R.endY + R.startY
2789
- }, T = $(y, this._selectionRenderService), T != null && y != null) {
2862
+ }, T = x(y, this._selectionRenderService), T != null && y != null) {
2790
2863
  s.push({ ...l, sheetTransform: T, transform: y });
2791
2864
  break;
2792
2865
  }
2793
2866
  }
2794
- if (y != null && (T = $(y, this._selectionRenderService)), y != null && T != null) {
2867
+ if (y != null && (T = x(y, this._selectionRenderService)), y != null && T != null) {
2795
2868
  r.push({ ...l, sheetTransform: T, transform: y });
2796
2869
  break;
2797
2870
  } else
@@ -2820,19 +2893,19 @@ let cn = class extends ie {
2820
2893
  this._remainDrawingSize(u, s, a);
2821
2894
  else {
2822
2895
  const { from: l, to: g } = c, { row: h, column: f } = l, { row: p, column: m } = g;
2823
- for (let _ = 0; _ < e.length; _++) {
2824
- const S = e[_], { startRow: C, endRow: b, startColumn: v, endColumn: D } = S;
2896
+ for (let w = 0; w < e.length; w++) {
2897
+ const S = e[w], { startRow: C, endRow: b, startColumn: v, endColumn: D } = S;
2825
2898
  if (p < C || m < v)
2826
2899
  continue;
2827
2900
  if (d === O.Position && (h <= C && p >= b || f <= v && m >= D)) {
2828
2901
  this._remainDrawingSize(u, s, a);
2829
2902
  continue;
2830
2903
  }
2831
- const w = z({ ...c }, this._selectionRenderService, this._skeletonManagerService);
2832
- if (w != null) {
2904
+ const _ = K({ ...c }, this._selectionRenderService, this._skeletonManagerService);
2905
+ if (_ != null) {
2833
2906
  s.push({
2834
2907
  ...a,
2835
- transform: w
2908
+ transform: _
2836
2909
  });
2837
2910
  break;
2838
2911
  }
@@ -2857,10 +2930,10 @@ let cn = class extends ie {
2857
2930
  const { toRange: t, fromRange: e } = i, n = ae(this._univerInstanceService);
2858
2931
  if (!n)
2859
2932
  return { redos: [], undos: [] };
2860
- const { unitId: r, subUnitId: s } = n, o = (b = (C = this._renderManagerService.getRenderById(r)) == null ? void 0 : C.with(V)) == null ? void 0 : b.getCurrentSkeleton();
2933
+ const { unitId: r, subUnitId: s } = n, o = (b = (C = this._renderManagerService.getRenderById(r)) == null ? void 0 : C.with(H)) == null ? void 0 : b.getCurrentSkeleton();
2861
2934
  if (!o)
2862
2935
  return { redos: [], undos: [] };
2863
- const a = Jn(o, e);
2936
+ const a = er(o, e);
2864
2937
  if (!a)
2865
2938
  return { redos: [], undos: [] };
2866
2939
  const { startX: c, endX: u, startY: d, endY: l } = a, g = this._sheetDrawingService.getDrawingData(r, s), h = [];
@@ -2868,10 +2941,10 @@ let cn = class extends ie {
2868
2941
  const D = g[v];
2869
2942
  if (D.anchorType !== O.Both)
2870
2943
  return;
2871
- const { transform: w } = D;
2872
- if (!w)
2944
+ const { transform: _ } = D;
2945
+ if (!_)
2873
2946
  return;
2874
- const { left: M = 0, top: I = 0, width: E = 0, height: T = 0 } = w, { drawingStartX: y, drawingEndX: R, drawingStartY: N, drawingEndY: j } = {
2947
+ const { left: M = 0, top: I = 0, width: E = 0, height: T = 0 } = _, { drawingStartX: y, drawingEndX: R, drawingStartY: N, drawingEndY: j } = {
2875
2948
  drawingStartX: M,
2876
2949
  drawingEndX: M + E,
2877
2950
  drawingStartY: I,
@@ -2879,22 +2952,22 @@ let cn = class extends ie {
2879
2952
  };
2880
2953
  c <= y && R <= u && d <= N && j <= l && h.push(D);
2881
2954
  });
2882
- const f = [], p = [], m = t.startRow - e.startRow, _ = t.startColumn - e.startColumn, S = h.map((v) => {
2883
- const D = v.sheetTransform, w = {
2884
- to: { ...D.to, row: D.to.row + m, column: D.to.column + _ },
2885
- from: { ...D.from, row: D.from.row + m, column: D.from.column + _ }
2886
- }, M = z(w, this._selectionRenderService, this._skeletonManagerService);
2955
+ const f = [], p = [], m = t.startRow - e.startRow, w = t.startColumn - e.startColumn, S = h.map((v) => {
2956
+ const D = v.sheetTransform, _ = {
2957
+ to: { ...D.to, row: D.to.row + m, column: D.to.column + w },
2958
+ from: { ...D.from, row: D.from.row + m, column: D.from.column + w }
2959
+ }, M = K(_, this._selectionRenderService, this._skeletonManagerService);
2887
2960
  return {
2888
2961
  unitId: r,
2889
2962
  subUnitId: s,
2890
2963
  drawingId: v.drawingId,
2891
2964
  transform: M,
2892
- sheetTransform: w
2965
+ sheetTransform: _
2893
2966
  };
2894
2967
  });
2895
2968
  if (S.length) {
2896
- const v = this._sheetDrawingService.getBatchUpdateOp(S), { undo: D, redo: w, objects: M } = v;
2897
- f.push({ id: U.id, params: { unitId: r, subUnitId: s, op: w, objects: M, type: P.UPDATE } }), p.push({ id: U.id, params: { unitId: r, subUnitId: s, op: D, objects: M, type: P.UPDATE } });
2969
+ const v = this._sheetDrawingService.getBatchUpdateOp(S), { undo: D, redo: _, objects: M } = v;
2970
+ f.push({ id: U.id, params: { unitId: r, subUnitId: s, op: _, objects: M, type: P.UPDATE } }), p.push({ id: U.id, params: { unitId: r, subUnitId: s, op: D, objects: M, type: P.UPDATE } });
2898
2971
  }
2899
2972
  return { redos: f, undos: p };
2900
2973
  }
@@ -2904,19 +2977,19 @@ let cn = class extends ie {
2904
2977
  return { redos: [], undos: [] };
2905
2978
  const { unitId: n, subUnitId: r } = e, { range: s } = i, o = s.startRow, a = s.endRow, c = [], u = [], d = this._sheetDrawingService.getDrawingData(n, r), l = [], g = [];
2906
2979
  if (Object.keys(d).forEach((h) => {
2907
- const f = d[h], { sheetTransform: p, transform: m, anchorType: _ = O.Position } = f;
2980
+ const f = d[h], { sheetTransform: p, transform: m, anchorType: w = O.Position } = f;
2908
2981
  if (p == null || m == null)
2909
2982
  return;
2910
2983
  let S, C;
2911
2984
  if (t === "insert") {
2912
- const v = this._expandRow(p, m, o, a, _);
2985
+ const v = this._expandRow(p, m, o, a, w);
2913
2986
  S = v == null ? void 0 : v.newSheetTransform, C = v == null ? void 0 : v.newTransform;
2914
2987
  } else {
2915
- const { from: v, to: D } = p, { row: w } = v, { row: M } = D;
2916
- if (_ === O.Both && w >= o && M <= a)
2988
+ const { from: v, to: D } = p, { row: _ } = v, { row: M } = D;
2989
+ if (w === O.Both && _ >= o && M <= a)
2917
2990
  g.push({ unitId: n, subUnitId: r, drawingId: h });
2918
2991
  else {
2919
- const I = this._shrinkRow(p, m, o, a, _);
2992
+ const I = this._shrinkRow(p, m, o, a, w);
2920
2993
  S = I == null ? void 0 : I.newSheetTransform, C = I == null ? void 0 : I.newTransform;
2921
2994
  }
2922
2995
  }
@@ -2945,19 +3018,19 @@ let cn = class extends ie {
2945
3018
  return { redos: [], undos: [] };
2946
3019
  const { unitId: n, subUnitId: r } = e, { range: s } = i, o = s.startColumn, a = s.endColumn, c = [], u = [], d = this._sheetDrawingService.getDrawingData(n, r), l = [], g = [];
2947
3020
  if (Object.keys(d).forEach((h) => {
2948
- const f = d[h], { sheetTransform: p, transform: m, anchorType: _ = O.Position } = f;
3021
+ const f = d[h], { sheetTransform: p, transform: m, anchorType: w = O.Position } = f;
2949
3022
  if (p == null || m == null)
2950
3023
  return;
2951
3024
  let S, C;
2952
3025
  if (t === "insert") {
2953
- const v = this._expandCol(p, m, o, a, _);
3026
+ const v = this._expandCol(p, m, o, a, w);
2954
3027
  S = v == null ? void 0 : v.newSheetTransform, C = v == null ? void 0 : v.newTransform;
2955
3028
  } else {
2956
- const { from: v, to: D } = p, { column: w } = v, { column: M } = D;
2957
- if (_ === O.Both && w >= o && M <= a)
3029
+ const { from: v, to: D } = p, { column: _ } = v, { column: M } = D;
3030
+ if (w === O.Both && _ >= o && M <= a)
2958
3031
  g.push({ unitId: n, subUnitId: r, drawingId: h });
2959
3032
  else {
2960
- const I = this._shrinkCol(p, m, o, a, _);
3033
+ const I = this._shrinkCol(p, m, o, a, w);
2961
3034
  S = I == null ? void 0 : I.newSheetTransform, C = I == null ? void 0 : I.newTransform;
2962
3035
  }
2963
3036
  }
@@ -2981,7 +3054,7 @@ let cn = class extends ie {
2981
3054
  const s = n - e + 1, { from: o, to: a } = i, { column: c } = o, { column: u } = a;
2982
3055
  if (r === O.None)
2983
3056
  return {
2984
- newSheetTransform: $({ ...t }, this._selectionRenderService),
3057
+ newSheetTransform: x({ ...t }, this._selectionRenderService),
2985
3058
  newTransform: t
2986
3059
  };
2987
3060
  let d = null, l = null;
@@ -2989,16 +3062,16 @@ let cn = class extends ie {
2989
3062
  const g = this._skeletonManagerService.attachRangeWithCoord({ startColumn: e, endColumn: n, startRow: o.row, endRow: a.row });
2990
3063
  if (g == null)
2991
3064
  return;
2992
- l = { ...t, left: (t.left || 0) + g.endX - g.startX }, d = $(l, this._selectionRenderService);
3065
+ l = { ...t, left: (t.left || 0) + g.endX - g.startX }, d = x(l, this._selectionRenderService);
2993
3066
  } else if (u >= n)
2994
3067
  if (r === O.Both)
2995
3068
  d = {
2996
3069
  from: { ...o },
2997
3070
  to: { ...a, column: u + s }
2998
- }, l = z(d, this._selectionRenderService, this._skeletonManagerService);
3071
+ }, l = K(d, this._selectionRenderService, this._skeletonManagerService);
2999
3072
  else
3000
3073
  return {
3001
- newSheetTransform: $({ ...t }, this._selectionRenderService),
3074
+ newSheetTransform: x({ ...t }, this._selectionRenderService),
3002
3075
  newTransform: t
3003
3076
  };
3004
3077
  return d != null && l != null ? {
@@ -3010,7 +3083,7 @@ let cn = class extends ie {
3010
3083
  const s = n - e + 1, { from: o, to: a } = i, { column: c } = o, { column: u } = a;
3011
3084
  if (r === O.None)
3012
3085
  return {
3013
- newSheetTransform: $({ ...t }, this._selectionRenderService),
3086
+ newSheetTransform: x({ ...t }, this._selectionRenderService),
3014
3087
  newTransform: t
3015
3088
  };
3016
3089
  let d = null, l = null;
@@ -3018,7 +3091,7 @@ let cn = class extends ie {
3018
3091
  d = {
3019
3092
  from: { ...o, column: c - s },
3020
3093
  to: { ...a, column: u - s }
3021
- }, l = z(d, this._selectionRenderService, this._skeletonManagerService);
3094
+ }, l = K(d, this._selectionRenderService, this._skeletonManagerService);
3022
3095
  else {
3023
3096
  if (c >= e && u <= n)
3024
3097
  return null;
@@ -3027,10 +3100,10 @@ let cn = class extends ie {
3027
3100
  d = {
3028
3101
  from: { ...o },
3029
3102
  to: { ...a, column: u - s }
3030
- }, l = z(d, this._selectionRenderService, this._skeletonManagerService);
3103
+ }, l = K(d, this._selectionRenderService, this._skeletonManagerService);
3031
3104
  else
3032
3105
  return {
3033
- newSheetTransform: $({ ...t }, this._selectionRenderService),
3106
+ newSheetTransform: x({ ...t }, this._selectionRenderService),
3034
3107
  newTransform: t
3035
3108
  };
3036
3109
  else if (c >= e && c <= n) {
@@ -3042,7 +3115,7 @@ let cn = class extends ie {
3042
3115
  return;
3043
3116
  l = { ...t, left: (t.left || 0) - g.endX + g.startX - i.from.columnOffset };
3044
3117
  }
3045
- d = $(l, this._selectionRenderService);
3118
+ d = x(l, this._selectionRenderService);
3046
3119
  } else if (u >= e && u <= n && r === O.Both) {
3047
3120
  const g = this._skeletonManagerService.attachRangeWithCoord({
3048
3121
  startColumn: e - 1,
@@ -3055,7 +3128,7 @@ let cn = class extends ie {
3055
3128
  d = {
3056
3129
  from: { ...o },
3057
3130
  to: { ...a, column: e - 1, columnOffset: g.endX - g.startX }
3058
- }, l = z(d, this._selectionRenderService, this._skeletonManagerService);
3131
+ }, l = K(d, this._selectionRenderService, this._skeletonManagerService);
3059
3132
  }
3060
3133
  }
3061
3134
  return d != null && l != null ? {
@@ -3067,7 +3140,7 @@ let cn = class extends ie {
3067
3140
  const s = n - e + 1, { from: o, to: a } = i, { row: c } = o, { row: u } = a;
3068
3141
  if (r === O.None)
3069
3142
  return {
3070
- newSheetTransform: $({ ...t }, this._selectionRenderService),
3143
+ newSheetTransform: x({ ...t }, this._selectionRenderService),
3071
3144
  newTransform: t
3072
3145
  };
3073
3146
  let d = null, l = null;
@@ -3075,7 +3148,7 @@ let cn = class extends ie {
3075
3148
  const g = this._skeletonManagerService.attachRangeWithCoord({ startRow: e, endRow: n, startColumn: o.column, endColumn: a.column });
3076
3149
  if (g == null)
3077
3150
  return;
3078
- l = { ...t, top: (t.top || 0) + g.endY - g.startY }, d = $(l, this._selectionRenderService);
3151
+ l = { ...t, top: (t.top || 0) + g.endY - g.startY }, d = x(l, this._selectionRenderService);
3079
3152
  } else if (u >= n)
3080
3153
  if (r === O.Both)
3081
3154
  d = {
@@ -3084,10 +3157,10 @@ let cn = class extends ie {
3084
3157
  ...a,
3085
3158
  row: u + s
3086
3159
  }
3087
- }, l = z(d, this._selectionRenderService, this._skeletonManagerService);
3160
+ }, l = K(d, this._selectionRenderService, this._skeletonManagerService);
3088
3161
  else
3089
3162
  return {
3090
- newSheetTransform: $({ ...t }, this._selectionRenderService),
3163
+ newSheetTransform: x({ ...t }, this._selectionRenderService),
3091
3164
  newTransform: t
3092
3165
  };
3093
3166
  return d != null && l != null ? {
@@ -3099,7 +3172,7 @@ let cn = class extends ie {
3099
3172
  const s = n - e + 1, { from: o, to: a } = i, { row: c } = o, { row: u } = a;
3100
3173
  if (r === O.None)
3101
3174
  return {
3102
- newSheetTransform: $({ ...t }, this._selectionRenderService),
3175
+ newSheetTransform: x({ ...t }, this._selectionRenderService),
3103
3176
  newTransform: t
3104
3177
  };
3105
3178
  let d = null, l = null;
@@ -3107,7 +3180,7 @@ let cn = class extends ie {
3107
3180
  d = {
3108
3181
  from: { ...o, row: c - s },
3109
3182
  to: { ...a, row: u - s }
3110
- }, l = z(d, this._selectionRenderService, this._skeletonManagerService);
3183
+ }, l = K(d, this._selectionRenderService, this._skeletonManagerService);
3111
3184
  else {
3112
3185
  if (c >= e && u <= n)
3113
3186
  return null;
@@ -3116,10 +3189,10 @@ let cn = class extends ie {
3116
3189
  d = {
3117
3190
  from: { ...o },
3118
3191
  to: { ...a, row: u - s }
3119
- }, l = z(d, this._selectionRenderService, this._skeletonManagerService);
3192
+ }, l = K(d, this._selectionRenderService, this._skeletonManagerService);
3120
3193
  else
3121
3194
  return {
3122
- newSheetTransform: $({ ...t }, this._selectionRenderService),
3195
+ newSheetTransform: x({ ...t }, this._selectionRenderService),
3123
3196
  newTransform: t
3124
3197
  };
3125
3198
  else if (c >= e && c <= n) {
@@ -3131,7 +3204,7 @@ let cn = class extends ie {
3131
3204
  return;
3132
3205
  l = { ...t, top: (t.top || 0) - g.endY + g.startY - i.from.rowOffset };
3133
3206
  }
3134
- d = $(l, this._selectionRenderService);
3207
+ d = x(l, this._selectionRenderService);
3135
3208
  } else if (u >= e && u <= n && r === O.Both) {
3136
3209
  const g = this._skeletonManagerService.attachRangeWithCoord({ startColumn: o.column, endColumn: o.column, startRow: e - 1, endRow: e - 1 });
3137
3210
  if (g == null)
@@ -3139,7 +3212,7 @@ let cn = class extends ie {
3139
3212
  d = {
3140
3213
  from: { ...o },
3141
3214
  to: { ...a, row: e - 1, rowOffset: g.endY - g.startY }
3142
- }, l = z(d, this._selectionRenderService, this._skeletonManagerService);
3215
+ }, l = K(d, this._selectionRenderService, this._skeletonManagerService);
3143
3216
  }
3144
3217
  }
3145
3218
  return d != null && l != null ? {
@@ -3153,7 +3226,7 @@ let cn = class extends ie {
3153
3226
  // but the skeleton changes like other render modules. These two signals are not equivalent.
3154
3227
  // As a temp solution, I subscribed to activate$ here.
3155
3228
  this._commandService.onCommandExecuted((i) => {
3156
- if (i.id === rs.id) {
3229
+ if (i.id === is.id) {
3157
3230
  const { unitId: t, subUnitId: e } = i.params;
3158
3231
  this._updateDrawings(t, e);
3159
3232
  }
@@ -3193,7 +3266,7 @@ let cn = class extends ie {
3193
3266
  c != null && Object.keys(c).forEach((u) => {
3194
3267
  if (s === i && a === t) {
3195
3268
  const d = c[u];
3196
- d.transform = z(d.sheetTransform, this._selectionRenderService, this._skeletonManagerService), n.push(c[u]);
3269
+ d.transform = K(d.sheetTransform, this._selectionRenderService, this._skeletonManagerService), n.push(c[u]);
3197
3270
  } else
3198
3271
  r.push(c[u]);
3199
3272
  });
@@ -3204,7 +3277,7 @@ let cn = class extends ie {
3204
3277
  _sheetRefreshListener() {
3205
3278
  this.disposeWithMe(
3206
3279
  this._commandService.onCommandExecuted((i) => {
3207
- qs.includes(i.id) && requestIdleCallback(() => {
3280
+ Qs.includes(i.id) && requestIdleCallback(() => {
3208
3281
  const t = i.params, { unitId: e, subUnitId: n, ranges: r } = t;
3209
3282
  this._refreshDrawingTransform(e, n, r);
3210
3283
  });
@@ -3219,8 +3292,8 @@ let cn = class extends ie {
3219
3292
  return !0;
3220
3293
  const { from: d, to: l } = a, { row: g, column: h } = d, { row: f, column: p } = l;
3221
3294
  for (let m = 0; m < e.length; m++) {
3222
- const _ = e[m], { startRow: S, endRow: C, startColumn: b, endColumn: v } = _;
3223
- if (Jr.intersects(
3295
+ const w = e[m], { startRow: S, endRow: C, startColumn: b, endColumn: v } = w;
3296
+ if (Qr.intersects(
3224
3297
  {
3225
3298
  startRow: S,
3226
3299
  endRow: C,
@@ -3234,13 +3307,13 @@ let cn = class extends ie {
3234
3307
  endColumn: p
3235
3308
  }
3236
3309
  ) || g > C || h > v) {
3237
- const D = u === O.Position, w = z(a, this._selectionRenderService, this._skeletonManagerService);
3310
+ const D = u === O.Position, _ = K(a, this._selectionRenderService, this._skeletonManagerService);
3238
3311
  r.push({
3239
3312
  ...o,
3240
3313
  transform: {
3241
- ...w,
3242
- width: D ? c == null ? void 0 : c.width : w == null ? void 0 : w.width,
3243
- height: D ? c == null ? void 0 : c.height : w == null ? void 0 : w.height
3314
+ ..._,
3315
+ width: D ? c == null ? void 0 : c.width : _ == null ? void 0 : _.width,
3316
+ height: D ? c == null ? void 0 : c.height : _ == null ? void 0 : _.height
3244
3317
  }
3245
3318
  });
3246
3319
  break;
@@ -3249,16 +3322,16 @@ let cn = class extends ie {
3249
3322
  }), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(F.id, [i]));
3250
3323
  }
3251
3324
  };
3252
- cn = Zs([
3253
- pe(1, q),
3254
- pe(2, X),
3255
- pe(3, Ve),
3256
- pe(4, A(V)),
3257
- pe(5, A($t)),
3258
- pe(6, oe),
3259
- pe(7, se),
3260
- pe(8, Se)
3261
- ], cn);
3325
+ ln = Js([
3326
+ _e(1, q),
3327
+ _e(2, G),
3328
+ _e(3, He),
3329
+ _e(4, A(H)),
3330
+ _e(5, A(xt)),
3331
+ _e(6, oe),
3332
+ _e(7, se),
3333
+ _e(8, fe)
3334
+ ], ln);
3262
3335
  var re = function() {
3263
3336
  return re = Object.assign || function(i) {
3264
3337
  for (var t, e = 1, n = arguments.length; e < n; e++) {
@@ -3267,23 +3340,23 @@ var re = function() {
3267
3340
  }
3268
3341
  return i;
3269
3342
  }, re.apply(this, arguments);
3270
- }, Qs = function(i, t) {
3343
+ }, eo = function(i, t) {
3271
3344
  var e = {};
3272
3345
  for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && t.indexOf(n) < 0 && (e[n] = i[n]);
3273
3346
  if (i != null && typeof Object.getOwnPropertySymbols == "function")
3274
3347
  for (var r = 0, n = Object.getOwnPropertySymbols(i); r < n.length; r++)
3275
3348
  t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, n[r]) && (e[n[r]] = i[n[r]]);
3276
3349
  return e;
3277
- }, Er = wr(function(i, t) {
3278
- var e = i.icon, n = i.id, r = i.className, s = i.extend, o = Qs(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), c = as("_".concat(no()));
3279
- return Tr(e, "".concat(n), { defIds: e.defIds, idSuffix: c.current }, re({ ref: t, className: a }, o), s);
3350
+ }, Or = vr(function(i, t) {
3351
+ var e = i.icon, n = i.id, r = i.className, s = i.extend, o = eo(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), c = xe("_".concat(ro()));
3352
+ return Pr(e, "".concat(n), { defIds: e.defIds, idSuffix: c.current }, re({ ref: t, className: a }, o), s);
3280
3353
  });
3281
- function Tr(i, t, e, n, r) {
3282
- return _r(i.tag, re(re({ key: t }, eo(i, e, r)), n), (to(i, e).children || []).map(function(s, o) {
3283
- return Tr(s, "".concat(t, "-").concat(i.tag, "-").concat(o), e, void 0, r);
3354
+ function Pr(i, t, e, n, r) {
3355
+ return Sr(i.tag, re(re({ key: t }, to(i, e, r)), n), (no(i, e).children || []).map(function(s, o) {
3356
+ return Pr(s, "".concat(t, "-").concat(i.tag, "-").concat(o), e, void 0, r);
3284
3357
  }));
3285
3358
  }
3286
- function eo(i, t, e) {
3359
+ function to(i, t, e) {
3287
3360
  var n = re({}, i.attrs);
3288
3361
  e != null && e.colorChannel1 && n.fill === "colorChannel1" && (n.fill = e.colorChannel1), i.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(function(s) {
3289
3362
  var o = s[0], a = s[1];
@@ -3295,29 +3368,29 @@ function eo(i, t, e) {
3295
3368
  typeof a == "string" && (n[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
3296
3369
  })), n;
3297
3370
  }
3298
- function to(i, t) {
3371
+ function no(i, t) {
3299
3372
  var e, n = t.defIds;
3300
3373
  return !n || n.length === 0 ? i : i.tag === "defs" && (!((e = i.children) === null || e === void 0) && e.length) ? re(re({}, i), { children: i.children.map(function(r) {
3301
3374
  return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? re(re({}, r), { attrs: re(re({}, r.attrs), { id: r.attrs.id + t.idSuffix }) }) : r;
3302
3375
  }) }) : i;
3303
3376
  }
3304
- function no() {
3377
+ function ro() {
3305
3378
  return Math.random().toString(36).substring(2, 8);
3306
3379
  }
3307
- Er.displayName = "UniverIcon";
3308
- var ro = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, Or = wr(function(i, t) {
3309
- return _r(Er, Object.assign({}, i, {
3380
+ Or.displayName = "UniverIcon";
3381
+ var io = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, Ur = vr(function(i, t) {
3382
+ return Sr(Or, Object.assign({}, i, {
3310
3383
  id: "add-image-single",
3311
3384
  ref: t,
3312
- icon: ro
3385
+ icon: io
3313
3386
  }));
3314
3387
  });
3315
- Or.displayName = "AddImageSingle";
3316
- const Pr = {
3388
+ Ur.displayName = "AddImageSingle";
3389
+ const Ar = {
3317
3390
  id: "sheet.command.delete-drawing",
3318
3391
  type: J.COMMAND,
3319
3392
  handler: (i) => {
3320
- const t = i.get(X), n = i.get(oe).getFocusDrawings();
3393
+ const t = i.get(G), n = i.get(oe).getFocusDrawings();
3321
3394
  if (n.length === 0)
3322
3395
  return !1;
3323
3396
  const r = n[0].unitId, s = n.map((o) => {
@@ -3329,16 +3402,16 @@ const Pr = {
3329
3402
  drawingType: d
3330
3403
  };
3331
3404
  });
3332
- return t.executeCommand(it.id, {
3405
+ return t.executeCommand(st.id, {
3333
3406
  unitId: r,
3334
3407
  drawings: s
3335
3408
  });
3336
3409
  }
3337
- }, st = {
3410
+ }, ot = {
3338
3411
  id: "sheet.command.move-drawing",
3339
3412
  type: J.COMMAND,
3340
3413
  handler: (i, t) => {
3341
- const e = i.get(X), n = i.get(oe), r = i.get(Ve), { direction: s } = t, o = n.getFocusDrawings();
3414
+ const e = i.get(G), n = i.get(oe), r = i.get(He), { direction: s } = t, o = n.getFocusDrawings();
3342
3415
  if (o.length === 0)
3343
3416
  return !1;
3344
3417
  const a = o[0].unitId, c = o.map((d) => {
@@ -3346,64 +3419,64 @@ const Pr = {
3346
3419
  if (l == null)
3347
3420
  return null;
3348
3421
  const g = { ...l }, { left: h = 0, top: f = 0 } = l;
3349
- return s === ve.UP ? g.top = f - 1 : s === ve.DOWN ? g.top = f + 1 : s === ve.LEFT ? g.left = h - 1 : s === ve.RIGHT && (g.left = h + 1), {
3422
+ return s === Ie.UP ? g.top = f - 1 : s === Ie.DOWN ? g.top = f + 1 : s === Ie.LEFT ? g.left = h - 1 : s === Ie.RIGHT && (g.left = h + 1), {
3350
3423
  ...d,
3351
3424
  transform: g,
3352
- sheetTransform: $(g, r)
3425
+ sheetTransform: x(g, r)
3353
3426
  };
3354
3427
  }).filter((d) => d != null);
3355
- return e.syncExecuteCommand(Lt.id, {
3428
+ return e.syncExecuteCommand(Ft.id, {
3356
3429
  unitId: a,
3357
3430
  drawings: c
3358
3431
  }) ? (e.syncExecuteCommand(F.id, [a]), !0) : !1;
3359
3432
  }
3360
- }, Ur = "addition-and-subtraction-single", Ar = "sheet.menu.image";
3361
- function io(i) {
3433
+ }, Nr = "addition-and-subtraction-single", kr = "sheet.menu.image";
3434
+ function so(i) {
3362
3435
  return {
3363
- id: Ar,
3364
- type: un.SUBITEMS,
3365
- icon: Ur,
3436
+ id: kr,
3437
+ type: mn.SUBITEMS,
3438
+ icon: Nr,
3366
3439
  tooltip: "sheetImage.title",
3367
- hidden$: ln(i, x.UNIVER_SHEET),
3368
- disabled$: Oi(i, { workbookTypes: [Qt], worksheetTypes: [en], rangeTypes: [is] })
3440
+ hidden$: gn(i, L.UNIVER_SHEET),
3441
+ disabled$: Ui(i, { workbookTypes: [en], worksheetTypes: [tn], rangeTypes: [ss] })
3369
3442
  };
3370
3443
  }
3371
- function so(i) {
3444
+ function oo(i) {
3372
3445
  return {
3373
- id: Ft.id,
3446
+ id: Yt.id,
3374
3447
  title: "sheetImage.upload.float",
3375
- type: un.BUTTON,
3376
- hidden$: ln(i, x.UNIVER_SHEET)
3448
+ type: mn.BUTTON,
3449
+ hidden$: gn(i, L.UNIVER_SHEET)
3377
3450
  };
3378
3451
  }
3379
- function oo(i) {
3452
+ function ao(i) {
3380
3453
  return {
3381
- id: mn.id,
3454
+ id: wn.id,
3382
3455
  title: "sheetImage.upload.cell",
3383
- type: un.BUTTON,
3384
- hidden$: ln(i, x.UNIVER_SHEET)
3456
+ type: mn.BUTTON,
3457
+ hidden$: gn(i, L.UNIVER_SHEET)
3385
3458
  };
3386
3459
  }
3387
- const ao = "univer-image-common-panel", co = "univer-image-common-panel-grid", lo = "univer-image-common-panel-border", uo = "univer-image-common-panel-title", ho = "univer-image-common-panel-row", go = "univer-image-common-panel-column", we = {
3388
- imageCommonPanel: ao,
3389
- imageCommonPanelGrid: co,
3390
- imageCommonPanelBorder: lo,
3391
- imageCommonPanelTitle: uo,
3392
- imageCommonPanelRow: ho,
3393
- imageCommonPanelColumn: go
3394
- }, mo = (i) => {
3460
+ const co = "univer-image-common-panel", lo = "univer-image-common-panel-grid", uo = "univer-image-common-panel-border", ho = "univer-image-common-panel-title", go = "univer-image-common-panel-row", mo = "univer-image-common-panel-column", ve = {
3461
+ imageCommonPanel: co,
3462
+ imageCommonPanelGrid: lo,
3463
+ imageCommonPanelBorder: uo,
3464
+ imageCommonPanelTitle: ho,
3465
+ imageCommonPanelRow: go,
3466
+ imageCommonPanelColumn: mo
3467
+ }, fo = (i) => {
3395
3468
  var C;
3396
- const t = Me(X), e = Me(rt), n = Me(se), r = Me(q), { drawings: s } = i, o = s[0];
3469
+ const t = me(G), e = me(it), n = me(se), r = me(q), { drawings: s } = i, o = s[0];
3397
3470
  if (o == null)
3398
3471
  return;
3399
3472
  const { unitId: a } = o, c = r.getRenderById(a), u = c == null ? void 0 : c.scene;
3400
3473
  if (u == null)
3401
3474
  return;
3402
- const d = u.getTransformerByCreate(), [l, g] = rn(!0), h = (C = o.anchorType) != null ? C : O.Position, [f, p] = rn(h);
3475
+ const d = u.getTransformerByCreate(), [l, g] = on(!0), h = (C = o.anchorType) != null ? C : O.Position, [f, p] = on(h);
3403
3476
  function m(b, v) {
3404
3477
  const D = [];
3405
- return b.forEach((w) => {
3406
- const { oKey: M } = w, I = v.getDrawingOKey(M);
3478
+ return b.forEach((_) => {
3479
+ const { oKey: M } = _, I = v.getDrawingOKey(M);
3407
3480
  if (I == null)
3408
3481
  return D.push(null), !0;
3409
3482
  const { unitId: E, subUnitId: T, drawingId: y, drawingType: R, anchorType: N, sheetTransform: j } = I;
@@ -3417,12 +3490,12 @@ const ao = "univer-image-common-panel", co = "univer-image-common-panel-grid", l
3417
3490
  });
3418
3491
  }), D;
3419
3492
  }
3420
- gn(() => {
3493
+ pn(() => {
3421
3494
  const b = d.clearControl$.subscribe((D) => {
3422
3495
  D === !0 && g(!1);
3423
3496
  }), v = d.changeStart$.subscribe((D) => {
3424
3497
  var I;
3425
- const { objects: w } = D, M = m(w, n);
3498
+ const { objects: _ } = D, M = m(_, n);
3426
3499
  if (M.length === 0)
3427
3500
  g(!1);
3428
3501
  else if (M.length >= 1) {
@@ -3435,153 +3508,153 @@ const ao = "univer-image-common-panel", co = "univer-image-common-panel-grid", l
3435
3508
  v.unsubscribe(), b.unsubscribe();
3436
3509
  };
3437
3510
  }, []);
3438
- function _(b) {
3511
+ function w(b) {
3439
3512
  p(b);
3440
3513
  const v = n.getFocusDrawings();
3441
3514
  if (v.length === 0)
3442
3515
  return;
3443
- const D = v.map((w) => ({
3444
- unitId: w.unitId,
3445
- subUnitId: w.subUnitId,
3446
- drawingId: w.drawingId,
3516
+ const D = v.map((_) => ({
3517
+ unitId: _.unitId,
3518
+ subUnitId: _.subUnitId,
3519
+ drawingId: _.drawingId,
3447
3520
  anchorType: b
3448
3521
  }));
3449
- t.executeCommand(Lt.id, {
3522
+ t.executeCommand(Ft.id, {
3450
3523
  unitId: v[0].unitId,
3451
3524
  drawings: D
3452
3525
  });
3453
3526
  }
3454
3527
  const S = (b) => b ? "block" : "none";
3455
- return /* @__PURE__ */ Et("div", { className: It(we.imageCommonPanelGrid, we.imageCommonPanelBorder), style: { display: S(l) }, children: [
3456
- /* @__PURE__ */ K("div", { className: we.imageCommonPanelRow, children: /* @__PURE__ */ K("div", { className: It(we.imageCommonPanelColumn, we.imageCommonPanelTitle), children: /* @__PURE__ */ K("div", { children: e.t("drawing-anchor.title") }) }) }),
3457
- /* @__PURE__ */ K("div", { className: It(we.imageCommonPanelRow), children: /* @__PURE__ */ K("div", { className: It(we.imageCommonPanelColumn), children: /* @__PURE__ */ Et(hs, { value: f, onChange: _, direction: "vertical", children: [
3458
- /* @__PURE__ */ K(Kt, { value: O.Both, children: e.t("drawing-anchor.both") }),
3459
- /* @__PURE__ */ K(Kt, { value: O.Position, children: e.t("drawing-anchor.position") }),
3460
- /* @__PURE__ */ K(Kt, { value: O.None, children: e.t("drawing-anchor.none") })
3528
+ return /* @__PURE__ */ Tt("div", { className: Ct(ve.imageCommonPanelGrid, ve.imageCommonPanelBorder), style: { display: S(l) }, children: [
3529
+ /* @__PURE__ */ X("div", { className: ve.imageCommonPanelRow, children: /* @__PURE__ */ X("div", { className: Ct(ve.imageCommonPanelColumn, ve.imageCommonPanelTitle), children: /* @__PURE__ */ X("div", { children: e.t("drawing-anchor.title") }) }) }),
3530
+ /* @__PURE__ */ X("div", { className: Ct(ve.imageCommonPanelRow), children: /* @__PURE__ */ X("div", { className: Ct(ve.imageCommonPanelColumn), children: /* @__PURE__ */ Tt(hs, { value: f, onChange: w, direction: "vertical", children: [
3531
+ /* @__PURE__ */ X(Zt, { value: O.Both, children: e.t("drawing-anchor.both") }),
3532
+ /* @__PURE__ */ X(Zt, { value: O.Position, children: e.t("drawing-anchor.position") }),
3533
+ /* @__PURE__ */ X(Zt, { value: O.None, children: e.t("drawing-anchor.none") })
3461
3534
  ] }) }) })
3462
3535
  ] });
3463
- }, fo = () => {
3464
- const i = Me(se), t = i.getFocusDrawings(), [e, n] = rn(t);
3465
- return gn(() => {
3536
+ }, po = () => {
3537
+ const i = me(se), t = i.getFocusDrawings(), [e, n] = on(t);
3538
+ return pn(() => {
3466
3539
  const r = i.focus$.subscribe((s) => {
3467
3540
  n(s);
3468
3541
  });
3469
3542
  return () => {
3470
3543
  r.unsubscribe();
3471
3544
  };
3472
- }, []), !!(e != null && e.length) && /* @__PURE__ */ Et("div", { className: we.imageCommonPanel, children: [
3473
- /* @__PURE__ */ K(mi, { drawings: e }),
3474
- /* @__PURE__ */ K(mo, { drawings: e })
3545
+ }, []), !!(e != null && e.length) && /* @__PURE__ */ Tt("div", { className: ve.imageCommonPanel, children: [
3546
+ /* @__PURE__ */ X(pi, { drawings: e }),
3547
+ /* @__PURE__ */ X(fo, { drawings: e })
3475
3548
  ] });
3476
- }, po = {
3477
- [xi.FORMULAS_INSERT]: {
3478
- [Ar]: {
3549
+ }, wo = {
3550
+ [Li.FORMULAS_INSERT]: {
3551
+ [kr]: {
3479
3552
  order: 3,
3480
- menuItemFactory: io,
3481
- [Ft.id]: {
3553
+ menuItemFactory: so,
3554
+ [Yt.id]: {
3482
3555
  order: 0,
3483
- menuItemFactory: so
3556
+ menuItemFactory: oo
3484
3557
  },
3485
- [mn.id]: {
3558
+ [wn.id]: {
3486
3559
  order: 1,
3487
- menuItemFactory: oo
3560
+ menuItemFactory: ao
3488
3561
  }
3489
3562
  }
3490
3563
  }
3491
3564
  };
3492
- function ot(i) {
3493
- return !i.getContextValue(qr) && !i.getContextValue(Qr) && !i.getContextValue(ei) && i.getContextValue(Fe);
3565
+ function at(i) {
3566
+ return !i.getContextValue(ei) && !i.getContextValue(ti) && !i.getContextValue(ni) && i.getContextValue(Ye);
3494
3567
  }
3495
- const wo = {
3496
- id: st.id,
3497
- description: "shortcut.sheet.drawing-move-down",
3498
- group: "4_sheet-drawing-view",
3499
- binding: Ye.ARROW_DOWN,
3500
- priority: 100,
3501
- preconditions: ot,
3502
- staticParameters: {
3503
- direction: ve.DOWN
3504
- }
3505
- }, _o = {
3506
- id: st.id,
3507
- description: "shortcut.sheet.drawing-move-up",
3508
- group: "4_sheet-drawing-view",
3509
- binding: Ye.ARROW_UP,
3568
+ const _o = {
3569
+ id: ot.id,
3570
+ description: "shortcut.drawing-move-down",
3571
+ group: "4_drawing-view",
3572
+ binding: Xe.ARROW_DOWN,
3510
3573
  priority: 100,
3511
- preconditions: ot,
3574
+ preconditions: at,
3512
3575
  staticParameters: {
3513
- direction: ve.UP
3576
+ direction: Ie.DOWN
3514
3577
  }
3515
3578
  }, vo = {
3516
- id: st.id,
3517
- description: "shortcut.sheet.drawing-move-left",
3518
- group: "4_sheet-drawing-view",
3519
- binding: Ye.ARROW_LEFT,
3579
+ id: ot.id,
3580
+ description: "shortcut.drawing-move-up",
3581
+ group: "4_drawing-view",
3582
+ binding: Xe.ARROW_UP,
3520
3583
  priority: 100,
3521
- preconditions: ot,
3584
+ preconditions: at,
3522
3585
  staticParameters: {
3523
- direction: ve.LEFT
3586
+ direction: Ie.UP
3524
3587
  }
3525
3588
  }, So = {
3526
- id: st.id,
3527
- description: "shortcut.sheet.drawing-move-right",
3528
- group: "4_sheet-drawing-view",
3529
- binding: Ye.ARROW_RIGHT,
3589
+ id: ot.id,
3590
+ description: "shortcut.drawing-move-left",
3591
+ group: "4_drawing-view",
3592
+ binding: Xe.ARROW_LEFT,
3530
3593
  priority: 100,
3531
- preconditions: ot,
3594
+ preconditions: at,
3532
3595
  staticParameters: {
3533
- direction: ve.RIGHT
3596
+ direction: Ie.LEFT
3534
3597
  }
3535
3598
  }, Io = {
3536
- id: Pr.id,
3537
- description: "shortcut.sheet.drawing-delete",
3538
- group: "4_sheet-drawing-view",
3599
+ id: ot.id,
3600
+ description: "shortcut.drawing-move-right",
3601
+ group: "4_drawing-view",
3602
+ binding: Xe.ARROW_RIGHT,
3603
+ priority: 100,
3604
+ preconditions: at,
3605
+ staticParameters: {
3606
+ direction: Ie.RIGHT
3607
+ }
3608
+ }, Co = {
3609
+ id: Ar.id,
3610
+ description: "shortcut.drawing-delete",
3611
+ group: "4_drawing-view",
3539
3612
  // when focusing on any other input tag do not trigger this shortcut
3540
- preconditions: ot,
3541
- binding: Ye.DELETE,
3542
- mac: Ye.BACKSPACE
3613
+ preconditions: at,
3614
+ binding: Xe.DELETE,
3615
+ mac: Xe.BACKSPACE
3543
3616
  };
3544
- var Co = Object.getOwnPropertyDescriptor, Do = (i, t, e, n) => {
3545
- for (var r = n > 1 ? void 0 : n ? Co(t, e) : t, s = i.length - 1, o; s >= 0; s--)
3617
+ var Do = Object.getOwnPropertyDescriptor, bo = (i, t, e, n) => {
3618
+ for (var r = n > 1 ? void 0 : n ? Do(t, e) : t, s = i.length - 1, o; s >= 0; s--)
3546
3619
  (o = i[s]) && (r = o(r) || r);
3547
3620
  return r;
3548
- }, We = (i, t) => (e, n) => t(e, n, i);
3549
- let Bt = class extends ie {
3621
+ }, je = (i, t) => (e, n) => t(e, n, i);
3622
+ let Wt = class extends ie {
3550
3623
  constructor(i, t, e, n, r, s) {
3551
3624
  super(), this._componentManager = i, this._menuManagerService = t, this._commandService = e, this._shortcutService = n, this._drawingManagerService = r, this._sheetsSelectionsService = s, this._init();
3552
3625
  }
3553
3626
  _initCustomComponents() {
3554
3627
  const i = this._componentManager;
3555
- this.disposeWithMe(i.register(Ur, Or)), this.disposeWithMe(i.register(vr, fo));
3628
+ this.disposeWithMe(i.register(Nr, Ur)), this.disposeWithMe(i.register(Ir, po));
3556
3629
  }
3557
3630
  _initMenus() {
3558
- this._menuManagerService.mergeMenu(po);
3631
+ this._menuManagerService.mergeMenu(wo);
3559
3632
  }
3560
3633
  _initCommands() {
3561
3634
  [
3562
- Ft,
3563
- mn,
3564
- xt,
3565
- it,
3635
+ Yt,
3636
+ wn,
3566
3637
  Lt,
3567
- Sr,
3568
- F,
3569
- Ir,
3638
+ st,
3639
+ Ft,
3570
3640
  Cr,
3641
+ F,
3642
+ Dr,
3571
3643
  br,
3572
- st,
3573
- Pr,
3574
- Dr
3644
+ yr,
3645
+ ot,
3646
+ Ar,
3647
+ Rr
3575
3648
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
3576
3649
  }
3577
3650
  _initShortcuts() {
3578
3651
  [
3579
3652
  // sheet drawing shortcuts
3580
- wo,
3581
3653
  _o,
3582
3654
  vo,
3583
3655
  So,
3584
- Io
3656
+ Io,
3657
+ Co
3585
3658
  ].forEach((i) => {
3586
3659
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
3587
3660
  });
@@ -3590,97 +3663,97 @@ let Bt = class extends ie {
3590
3663
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
3591
3664
  }
3592
3665
  };
3593
- Bt = Do([
3594
- We(0, A(Qn)),
3595
- We(1, Li),
3596
- We(2, X),
3597
- We(3, Fi),
3598
- We(4, se),
3599
- We(5, A(hn))
3600
- ], Bt);
3601
- var bo = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, yo = (i, t, e) => t in i ? bo(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, Mo = (i, t, e, n) => {
3602
- for (var r = n > 1 ? void 0 : n ? Ro(t, e) : t, s = i.length - 1, o; s >= 0; s--)
3666
+ Wt = bo([
3667
+ je(0, A(hn)),
3668
+ je(1, Fi),
3669
+ je(2, G),
3670
+ je(3, Yi),
3671
+ je(4, se),
3672
+ je(5, A(fn))
3673
+ ], Wt);
3674
+ var Ro = Object.defineProperty, yo = Object.getOwnPropertyDescriptor, Mo = (i, t, e) => t in i ? Ro(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, Eo = (i, t, e, n) => {
3675
+ for (var r = n > 1 ? void 0 : n ? yo(t, e) : t, s = i.length - 1, o; s >= 0; s--)
3603
3676
  (o = i[s]) && (r = o(r) || r);
3604
3677
  return r;
3605
- }, Zt = (i, t) => (e, n) => t(e, n, i), Nr = (i, t, e) => yo(i, typeof t != "symbol" ? t + "" : t, e);
3606
- const Eo = "SHEET_IMAGE_UI_PLUGIN";
3607
- let jt = class extends ri {
3608
- constructor(i = Yn, t, e, n) {
3678
+ }, Jt = (i, t) => (e, n) => t(e, n, i), Br = (i, t, e) => Mo(i, typeof t != "symbol" ? t + "" : t, e);
3679
+ const To = "SHEET_IMAGE_UI_PLUGIN";
3680
+ let jt = class extends si {
3681
+ constructor(i = Vn, t, e, n) {
3609
3682
  super(), this._config = i, this._injector = t, this._renderManagerService = e, this._configService = n;
3610
- const { menu: r, ...s } = ii(
3683
+ const { menu: r, ...s } = oi(
3611
3684
  {},
3612
- Yn,
3685
+ Vn,
3613
3686
  this._config
3614
3687
  );
3615
3688
  r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(gs, s);
3616
3689
  }
3617
3690
  onStarting() {
3618
- si(this._injector, [
3619
- [nt],
3691
+ ai(this._injector, [
3692
+ [rt],
3693
+ [Wt],
3694
+ [Ot],
3620
3695
  [Bt],
3621
- [Tt],
3622
3696
  [kt],
3623
3697
  [Nt],
3624
- [At],
3625
- [Ot],
3626
3698
  [Pt],
3627
- [Ut]
3628
- ]), Gt(this._injector, [
3629
- [nt]
3699
+ [Ut],
3700
+ [At]
3701
+ ]), Vt(this._injector, [
3702
+ [rt]
3630
3703
  ]);
3631
3704
  }
3632
3705
  onReady() {
3633
- Gt(this._injector, [
3634
- [At],
3635
- [Ut]
3706
+ Vt(this._injector, [
3707
+ [Nt],
3708
+ [At]
3636
3709
  ]);
3637
3710
  }
3638
3711
  onRendered() {
3639
- this._registerRenderModules(), Gt(this._injector, [
3640
- [Nt],
3712
+ this._registerRenderModules(), Vt(this._injector, [
3641
3713
  [kt],
3642
3714
  [Bt],
3643
- [Ot],
3644
- [Pt]
3715
+ [Wt],
3716
+ [Pt],
3717
+ [Ut]
3645
3718
  ]);
3646
3719
  }
3647
3720
  onSteady() {
3648
- this._injector.get(Tt);
3721
+ this._injector.get(Ot);
3649
3722
  }
3650
3723
  _registerRenderModules() {
3651
3724
  [
3652
- [tt],
3725
+ [nt],
3726
+ [ln],
3653
3727
  [cn],
3654
- [on],
3655
- [sn]
3728
+ [an]
3656
3729
  ].forEach((i) => {
3657
- this.disposeWithMe(this._renderManagerService.registerRenderModule(x.UNIVER_SHEET, i));
3730
+ this.disposeWithMe(this._renderManagerService.registerRenderModule(L.UNIVER_SHEET, i));
3658
3731
  });
3659
3732
  }
3660
3733
  };
3661
- Nr(jt, "type", x.UNIVER_SHEET);
3662
- Nr(jt, "pluginName", Eo);
3663
- jt = Mo([
3664
- ti(di, ai, fi, vi),
3665
- Zt(1, A(Ge)),
3666
- Zt(2, q),
3667
- Zt(3, ni)
3734
+ Br(jt, "type", L.UNIVER_SHEET);
3735
+ Br(jt, "pluginName", To);
3736
+ jt = Eo([
3737
+ ri(ui, di, wi, Ii),
3738
+ Jt(1, A(Ve)),
3739
+ Jt(2, q),
3740
+ Jt(3, ii)
3668
3741
  ], jt);
3669
3742
  export {
3670
3743
  F as ClearSheetDrawingTransformerOperation,
3671
- Pr as DeleteDrawingsCommand,
3672
- Ir as EditSheetDrawingOperation,
3673
- Cr as GroupSheetDrawingCommand,
3674
- Ft as InsertFloatImageCommand,
3675
- xt as InsertSheetDrawingCommand,
3676
- st as MoveDrawingsCommand,
3677
- it as RemoveSheetDrawingCommand,
3678
- Ar as SHEETS_IMAGE_MENU_ID,
3679
- Dr as SetDrawingArrangeCommand,
3680
- Lt as SetSheetDrawingCommand,
3681
- nt as SheetCanvasFloatDomManagerService,
3682
- tt as SheetDrawingUpdateController,
3683
- Sr as SidebarSheetDrawingOperation,
3684
- br as UngroupSheetDrawingCommand,
3744
+ Ar as DeleteDrawingsCommand,
3745
+ Dr as EditSheetDrawingOperation,
3746
+ br as GroupSheetDrawingCommand,
3747
+ Yt as InsertFloatImageCommand,
3748
+ Lt as InsertSheetDrawingCommand,
3749
+ ot as MoveDrawingsCommand,
3750
+ st as RemoveSheetDrawingCommand,
3751
+ kr as SHEETS_IMAGE_MENU_ID,
3752
+ Rr as SetDrawingArrangeCommand,
3753
+ Ft as SetSheetDrawingCommand,
3754
+ rt as SheetCanvasFloatDomManagerService,
3755
+ nt as SheetDrawingUpdateController,
3756
+ Cr as SidebarSheetDrawingOperation,
3757
+ yr as UngroupSheetDrawingCommand,
3685
3758
  jt as UniverSheetsDrawingUIPlugin
3686
3759
  };