@univerjs/sheets-drawing-ui 0.9.2-nightly.202507141607 → 0.9.2-nightly.202507161608

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,18 +1,18 @@
1
1
  var yr = Object.defineProperty;
2
2
  var Tr = (i, t, e) => t in i ? yr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
3
  var ee = (i, t, e) => Tr(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { precisionTo as mt, IRenderManagerService as J, transformObjectOutOfGroup as Er, getGroupState as Or, getCurrentTypeOfRenderer as sn, CURSOR_TYPE as Ur, RENDER_CLASS_TYPE as Ue, Rect as Pe, ObjectType as mn, DRAWING_OBJECT_LAYER_INDEX as Ft, SHEET_VIEWPORT_KEY as xn } from "@univerjs/engine-render";
5
- import { convertPositionSheetOverGridToAbsolute as Pr, SheetSkeletonManagerService as V, ISheetSelectionRenderService as xe, attachRangeWithCoord as Yn, SheetCanvasPopManagerService as Ar, HoverManagerService as Nr, IEditorBridgeService as kr, IAutoFillService as Wr, EditingRenderController as Br, SetCellEditVisibleOperation as pn, PREDEFINED_HOOK_NAME as Be, COPY_TYPE as ve, discreteRangeToRange as wn, virtualizeDiscreteRanges as jr, ISheetClipboardService as $r, SetZoomRatioOperation as _n, SetScrollOperation as Fr, SheetPrintInterceptorService as xr, getCurrentRangeDisable$ as Yr } from "@univerjs/sheets-ui";
6
- import { CommandType as Z, ICommandService as G, IUndoRedoService as Ye, sequenceExecute as Xn, DrawingTypeEnum as B, ArrangeTypeEnum as pt, Inject as A, IContextService as Gn, LocaleService as tt, Injector as Xe, Disposable as ne, createDocumentModelWithStyle as Vt, ObjectRelativeFromV as Sn, ObjectRelativeFromH as vn, WrapTextType as In, PositionedObjectLayoutType as Cn, BooleanNumber as Dn, BuildTextUtils as Ht, ImageSourceType as Rn, generateRandomId as Dt, FOCUSING_COMMON_DRAWINGS as $e, IUniverInstanceService as Se, UniverInstanceType as F, Direction as _e, IImageIoService as Xr, RxDisposable as Gr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ze, DOCS_ZEN_EDITOR_UNIT_ID_KEY as je, InterceptorEffectEnum as Lr, ObjectMatrix as Vr, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Hr, Tools as Re, IPermissionService as zr, UserManagerService as Kr, LifecycleService as Jr, LifecycleStages as Zr, DisposableCollection as wt, fromEventSubject as qr, PRINT_CHART_COMPONENT_KEY as Qr, Rectangle as ei, FOCUSING_FX_BAR_EDITOR as ti, EDITOR_ACTIVATED as ni, FOCUSING_PANEL_EDITOR as ri, DependentOn as ii, IConfigService as si, Plugin as oi, merge as ai, registerDependencies as ci, touchDependencies as xt } from "@univerjs/core";
4
+ import { precisionTo as pt, IRenderManagerService as J, transformObjectOutOfGroup as Er, getGroupState as Or, getCurrentTypeOfRenderer as sn, CURSOR_TYPE as Ur, RENDER_CLASS_TYPE as Oe, Rect as Ue, ObjectType as mn, DRAWING_OBJECT_LAYER_INDEX as Ft, SHEET_VIEWPORT_KEY as xn } from "@univerjs/engine-render";
5
+ import { convertPositionSheetOverGridToAbsolute as Pr, SheetSkeletonManagerService as V, ISheetSelectionRenderService as xe, attachRangeWithCoord as Yn, SheetCanvasPopManagerService as Ar, HoverManagerService as Nr, IEditorBridgeService as kr, IAutoFillService as Wr, EditingRenderController as Br, SetCellEditVisibleOperation as pn, PREDEFINED_HOOK_NAME as We, COPY_TYPE as ve, discreteRangeToRange as wn, virtualizeDiscreteRanges as jr, ISheetClipboardService as $r, SetZoomRatioOperation as _n, SetScrollOperation as Fr, SheetPrintInterceptorService as xr, getCurrentRangeDisable$ as Yr } from "@univerjs/sheets-ui";
6
+ import { CommandType as Z, ICommandService as G, IUndoRedoService as Ye, sequenceExecute as Xn, DrawingTypeEnum as B, ArrangeTypeEnum as wt, Inject as A, IContextService as Gn, LocaleService as nt, Injector as Xe, Disposable as ne, createDocumentModelWithStyle as Vt, ObjectRelativeFromV as Sn, ObjectRelativeFromH as vn, WrapTextType as In, PositionedObjectLayoutType as Cn, BooleanNumber as Dn, BuildTextUtils as Ht, ImageSourceType as Rn, generateRandomId as Qe, FOCUSING_COMMON_DRAWINGS as $e, IUniverInstanceService as Se, UniverInstanceType as F, Direction as _e, IImageIoService as Xr, RxDisposable as Gr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ze, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Be, InterceptorEffectEnum as Lr, ObjectMatrix as Vr, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Hr, IPermissionService as zr, UserManagerService as Kr, LifecycleService as Jr, LifecycleStages as Zr, DisposableCollection as _t, fromEventSubject as qr, Tools as je, PRINT_CHART_COMPONENT_KEY as Qr, Rectangle as ei, FOCUSING_FX_BAR_EDITOR as ti, EDITOR_ACTIVATED as ni, FOCUSING_PANEL_EDITOR as ri, DependentOn as ii, IConfigService as si, Plugin as oi, merge as ai, registerDependencies as ci, touchDependencies as xt } from "@univerjs/core";
7
7
  import { ISheetDrawingService as re, DrawingApplyType as U, SetDrawingApplyMutation as P, SheetDrawingAnchorType as O, UniverSheetsDrawingPlugin as di } from "@univerjs/sheets-drawing";
8
8
  import { SheetInterceptorService as At, SheetsSelectionsService as on, SetRangeValuesCommand as bn, getSheetCommandTarget as se, INTERCEPTOR_POINT as li, InterceptCellContentPriority as ui, WorkbookViewPermission as Mn, WorksheetViewPermission as yn, WorkbookEditablePermission as zt, WorksheetEditPermission as Kt, SetFrozenMutation as hi, SetWorksheetRowAutoHeightMutation as gi, COMMAND_LISTENER_SKELETON_CHANGE as fi, InsertRowCommand as Ln, InsertColCommand as Vn, RemoveRowCommand as Hn, RemoveColCommand as zn, DeleteRangeMoveLeftCommand as Kn, DeleteRangeMoveUpCommand as Jn, InsertRangeMoveDownCommand as Zn, InsertRangeMoveRightCommand as qn, DeltaRowHeightCommand as Jt, SetRowHeightCommand as Zt, DeltaColumnWidthCommand as Qn, SetColWidthCommand as er, SetRowHiddenCommand as tr, SetSpecificRowsVisibleCommand as nr, SetSpecificColsVisibleCommand as rr, SetColHiddenCommand as ir, MoveColsCommand as sr, MoveRowsCommand as or, MoveRangeCommand as ar, SetRowVisibleMutation as mi, SetRowHiddenMutation as pi, SetColVisibleMutation as wi, SetColHiddenMutation as _i, SetWorksheetRowHeightMutation as Si, SetWorksheetColWidthMutation as vi, SetWorksheetActiveOperation as Ii, RangeProtectionPermissionEditPoint as Ci } from "@univerjs/sheets";
9
9
  import { MessageType as pe, render as Di, unmount as Ri, clsx as bi, RadioGroup as Mi, Radio as Yt } from "@univerjs/design";
10
10
  import { docDrawingPositionToTransform as Tn, ReplaceSnapshotCommand as yi, InnerPasteCommand as Ti } from "@univerjs/docs-ui";
11
- import { IImageIoService as Ei, IDrawingManagerService as ie, DRAWING_IMAGE_ALLOW_IMAGE_LIST as En, DRAWING_IMAGE_COUNT_LIMIT as On, ImageUploadStatusType as Ae, DRAWING_IMAGE_ALLOW_SIZE as Un, getImageSize as Xt, SetDrawingSelectedOperation as Nt, DRAWING_IMAGE_WIDTH_LIMIT as Pn, DRAWING_IMAGE_HEIGHT_LIMIT as An, ImageSourceType as Oi, getDrawingShapeKeyByDrawingSearch as Ie, UniverDrawingPlugin as Ui } from "@univerjs/drawing";
11
+ import { IImageIoService as Ei, IDrawingManagerService as ie, DRAWING_IMAGE_ALLOW_IMAGE_LIST as En, DRAWING_IMAGE_COUNT_LIMIT as On, ImageUploadStatusType as Pe, DRAWING_IMAGE_ALLOW_SIZE as Un, getImageSize as Xt, SetDrawingSelectedOperation as Nt, DRAWING_IMAGE_WIDTH_LIMIT as Pn, DRAWING_IMAGE_HEIGHT_LIMIT as An, ImageSourceType as Oi, getDrawingShapeKeyByDrawingSearch as Ie, UniverDrawingPlugin as Ui } from "@univerjs/drawing";
12
12
  import { ILocalFileService as Pi, IMessageService as cr, ISidebarService as Ai, IDialogService as Ni, IClipboardInterfaceService as ki, CanvasFloatDomService as Wi, PrintFloatDomSingle as Bi, ComponentManager as dr, connectInjector as ji, useDependency as qe, getMenuHiddenObservable as an, MenuItemType as cn, RibbonInsertGroup as $i, KeyCode as Fe, IMenuManagerService as Fi, IShortcutService as xi } from "@univerjs/ui";
13
13
  import { DocDrawingController as Yi, UniverDocsDrawingPlugin as Xi } from "@univerjs/docs-drawing";
14
14
  import { ImageCropperObject as Gi, COMPONENT_IMAGE_POPUP_MENU as Li, OpenImageCropOperation as Vi, ImageResetSizeOperation as Hi, DrawingRenderService as lr, DrawingCommonPanel as zi, UniverDrawingUIPlugin as Ki } from "@univerjs/drawing-ui";
15
- import { takeUntil as Nn, throttleTime as Ji, combineLatest as _t, switchMap as we, EMPTY as fe, tap as kn, map as be, distinctUntilChanged as Wn, Subject as Gt, filter as Zi, take as qi, BehaviorSubject as We, of as Bn } from "rxjs";
15
+ import { takeUntil as Nn, throttleTime as Ji, combineLatest as St, switchMap as we, EMPTY as fe, tap as kn, map as Re, distinctUntilChanged as Wn, Subject as Gt, filter as Zi, take as qi, BehaviorSubject as ke, of as Bn } from "rxjs";
16
16
  import { jsx as oe, jsxs as qt } from "react/jsx-runtime";
17
17
  import { useMemo as Qi, useState as Qt, useEffect as ur } from "react";
18
18
  function z(i, t, e) {
@@ -45,17 +45,17 @@ function $(i, t) {
45
45
  return;
46
46
  const g = {
47
47
  column: l.actualColumn,
48
- columnOffset: mt(e - l.startX, 1),
48
+ columnOffset: pt(e - l.startX, 1),
49
49
  row: l.actualRow,
50
- rowOffset: mt(n - l.startY, 1)
50
+ rowOffset: pt(n - l.startY, 1)
51
51
  }, h = t.getCellWithCoordByOffset(e + r, n + s);
52
52
  if (h == null)
53
53
  return;
54
54
  const f = {
55
55
  column: h.actualColumn,
56
- columnOffset: mt(e + r - h.startX, 1),
56
+ columnOffset: pt(e + r - h.startX, 1),
57
57
  row: h.actualRow,
58
- rowOffset: mt(n + s - h.startY, 1)
58
+ rowOffset: pt(n + s - h.startY, 1)
59
59
  };
60
60
  return {
61
61
  flipY: o,
@@ -77,7 +77,7 @@ const Y = {
77
77
  (s = (r = e.getRenderById(n)) == null ? void 0 : r.scene.getTransformer()) == null || s.debounceRefreshControls();
78
78
  }), !0;
79
79
  }
80
- }, nt = {
80
+ }, rt = {
81
81
  id: "sheet.command.remove-sheet-image",
82
82
  type: Z.COMMAND,
83
83
  handler: (i, t) => {
@@ -89,7 +89,7 @@ const Y = {
89
89
  const { unitId: C } = S;
90
90
  a.push(C);
91
91
  });
92
- const d = s.getBatchRemoveOp(o), { unitId: u, subUnitId: c, undo: l, redo: g, objects: h } = d, f = r.onCommandExecute({ id: nt.id, params: t }), p = { id: P.id, params: { unitId: u, subUnitId: c, op: g, objects: h, type: U.REMOVE } }, m = { id: P.id, params: { unitId: u, subUnitId: c, op: l, objects: h, type: U.INSERT } };
92
+ const d = s.getBatchRemoveOp(o), { unitId: u, subUnitId: c, undo: l, redo: g, objects: h } = d, f = r.onCommandExecute({ id: rt.id, params: t }), p = { id: P.id, params: { unitId: u, subUnitId: c, op: g, objects: h, type: U.REMOVE } }, m = { id: P.id, params: { unitId: u, subUnitId: c, op: l, objects: h, type: U.INSERT } };
93
93
  return Xn([...(v = f.preRedos) != null ? v : [], p, ...f.redos], e) ? (n.pushUndoRedo({
94
94
  unitID: u,
95
95
  undoMutations: [
@@ -122,7 +122,7 @@ const Y = {
122
122
  drawingType: c
123
123
  };
124
124
  });
125
- return t.executeCommand(nt.id, {
125
+ return t.executeCommand(rt.id, {
126
126
  unitId: r,
127
127
  drawings: s
128
128
  });
@@ -245,7 +245,7 @@ const gr = {
245
245
  if (!t) return !1;
246
246
  const r = i.get(re), { unitId: s, subUnitId: o, drawingIds: a, arrangeType: d } = t, u = { unitId: s, subUnitId: o, drawingIds: a };
247
247
  let c;
248
- if (d === pt.forward ? c = r.getForwardDrawingsOp(u) : d === pt.backward ? c = r.getBackwardDrawingOp(u) : d === pt.front ? c = r.getFrontDrawingsOp(u) : d === pt.back && (c = r.getBackDrawingsOp(u)), c == null)
248
+ if (d === wt.forward ? c = r.getForwardDrawingsOp(u) : d === wt.backward ? c = r.getBackwardDrawingOp(u) : d === wt.front ? c = r.getFrontDrawingsOp(u) : d === wt.back && (c = r.getBackDrawingsOp(u)), c == null)
249
249
  return !1;
250
250
  const { objects: l, redo: g, undo: h } = c;
251
251
  return e.syncExecuteCommand(P.id, { op: g, unitId: s, subUnitId: o, objects: l, type: U.ARRANGE }) ? (n.pushUndoRedo({
@@ -326,7 +326,7 @@ function en(i, t, e, n, r) {
326
326
  height: n * _
327
327
  };
328
328
  }
329
- let Qe = class extends ne {
329
+ let et = class extends ne {
330
330
  constructor(t, e, n, r, s, o, a, d, u, c, l, g, h) {
331
331
  super();
332
332
  ee(this, "_workbookSelections");
@@ -358,13 +358,13 @@ let Qe = class extends ne {
358
358
  e = await this._imageIoService.saveImage(t);
359
359
  } catch (v) {
360
360
  const I = v.message;
361
- I === Ae.ERROR_EXCEED_SIZE ? this._messageService.show({
361
+ I === Pe.ERROR_EXCEED_SIZE ? this._messageService.show({
362
362
  type: pe.Error,
363
363
  content: this._localeService.t("update-status.exceedMaxSize", String(Un / (1024 * 1024)))
364
- }) : I === Ae.ERROR_IMAGE_TYPE ? this._messageService.show({
364
+ }) : I === Pe.ERROR_IMAGE_TYPE ? this._messageService.show({
365
365
  type: pe.Error,
366
366
  content: this._localeService.t("update-status.invalidImageType")
367
- }) : I === Ae.ERROR_IMAGE && this._messageService.show({
367
+ }) : I === Pe.ERROR_IMAGE && this._messageService.show({
368
368
  type: pe.Error,
369
369
  content: this._localeService.t("update-status.invalidImage")
370
370
  });
@@ -404,13 +404,13 @@ let Qe = class extends ne {
404
404
  n = await this._imageIoService.saveImage(t);
405
405
  } catch (S) {
406
406
  const C = S.message;
407
- C === Ae.ERROR_EXCEED_SIZE ? this._messageService.show({
407
+ C === Pe.ERROR_EXCEED_SIZE ? this._messageService.show({
408
408
  type: pe.Error,
409
409
  content: this._localeService.t("update-status.exceedMaxSize", String(Un / (1024 * 1024)))
410
- }) : C === Ae.ERROR_IMAGE_TYPE ? this._messageService.show({
410
+ }) : C === Pe.ERROR_IMAGE_TYPE ? this._messageService.show({
411
411
  type: pe.Error,
412
412
  content: this._localeService.t("update-status.invalidImageType")
413
- }) : C === Ae.ERROR_IMAGE && this._messageService.show({
413
+ }) : C === Pe.ERROR_IMAGE && this._messageService.show({
414
414
  type: pe.Error,
415
415
  content: this._localeService.t("update-status.invalidImage")
416
416
  });
@@ -532,7 +532,7 @@ let Qe = class extends ne {
532
532
  }, c = {
533
533
  unitId: a.getUnitId(),
534
534
  subUnitId: a.getUnitId(),
535
- drawingId: Dt(),
535
+ drawingId: Qe(),
536
536
  drawingType: B.DRAWING_IMAGE,
537
537
  imageSourceType: Rn.URL,
538
538
  source: t,
@@ -668,7 +668,7 @@ let Qe = class extends ne {
668
668
  );
669
669
  }
670
670
  };
671
- Qe = rs([
671
+ et = rs([
672
672
  te(1, A(V)),
673
673
  te(2, G),
674
674
  te(3, xe),
@@ -678,10 +678,10 @@ Qe = rs([
678
678
  te(7, ie),
679
679
  te(8, Gn),
680
680
  te(9, cr),
681
- te(10, A(tt)),
681
+ te(10, A(nt)),
682
682
  te(11, A(on)),
683
683
  te(12, A(Xe))
684
- ], Qe);
684
+ ], et);
685
685
  const Bt = {
686
686
  id: "sheet.command.insert-float-image",
687
687
  type: Z.COMMAND,
@@ -691,7 +691,7 @@ const Bt = {
691
691
  F.UNIVER_SHEET,
692
692
  e,
693
693
  n
694
- )) == null ? void 0 : o.with(Qe);
694
+ )) == null ? void 0 : o.with(et);
695
695
  if (!r)
696
696
  return !1;
697
697
  const s = t == null ? void 0 : t.files;
@@ -711,9 +711,9 @@ const Bt = {
711
711
  F.UNIVER_SHEET,
712
712
  t,
713
713
  e
714
- )) == null ? void 0 : n.with(Qe).insertCellImage()) != null ? r : !1;
714
+ )) == null ? void 0 : n.with(et).insertCellImage()) != null ? r : !1;
715
715
  }
716
- }, rt = {
716
+ }, it = {
717
717
  id: "sheet.command.move-drawing",
718
718
  type: Z.COMMAND,
719
719
  handler: (i, t) => {
@@ -740,7 +740,7 @@ const Bt = {
740
740
  id: "sidebar.operation.sheet-image",
741
741
  type: Z.COMMAND,
742
742
  handler: async (i, t) => {
743
- const e = i.get(Ai), n = i.get(tt), r = i.get(Se), s = i.get(G);
743
+ const e = i.get(Ai), n = i.get(nt), r = i.get(Se), s = i.get(G);
744
744
  if (!se(r)) return !1;
745
745
  switch (t.value) {
746
746
  case "open":
@@ -876,7 +876,7 @@ let Rt = class extends Gr {
876
876
  {
877
877
  label: "image-popup.delete",
878
878
  index: 1,
879
- commandId: nt.id,
879
+ commandId: rt.id,
880
880
  commandParams: { unitId: t, drawings: [{ unitId: t, subUnitId: e, drawingId: n }] },
881
881
  disable: !1
882
882
  },
@@ -899,7 +899,7 @@ let Rt = class extends Gr {
899
899
  };
900
900
  Rt = as([
901
901
  ce(0, A(Xe)),
902
- ce(1, A(tt)),
902
+ ce(1, A(nt)),
903
903
  ce(2, ie),
904
904
  ce(3, A(Ar)),
905
905
  ce(4, J),
@@ -913,7 +913,7 @@ var cs = Object.getOwnPropertyDescriptor, ds = (i, t, e, n) => {
913
913
  for (var r = n > 1 ? void 0 : n ? cs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
914
914
  (o = i[s]) && (r = o(r) || r);
915
915
  return r;
916
- }, St = (i, t) => (e, n) => t(e, n, i);
916
+ }, vt = (i, t) => (e, n) => t(e, n, i);
917
917
  let tn = class extends ne {
918
918
  constructor(t, e, n, r, s) {
919
919
  super();
@@ -939,16 +939,16 @@ let tn = class extends ne {
939
939
  }
940
940
  };
941
941
  tn = ds([
942
- St(1, A(Nr)),
943
- St(2, A(on)),
944
- St(3, A(lr)),
945
- St(4, A(V))
942
+ vt(1, A(Nr)),
943
+ vt(2, A(on)),
944
+ vt(3, A(lr)),
945
+ vt(4, A(V))
946
946
  ], tn);
947
947
  var ls = Object.getOwnPropertyDescriptor, us = (i, t, e, n) => {
948
948
  for (var r = n > 1 ? void 0 : n ? ls(t, e) : t, s = i.length - 1, o; s >= 0; s--)
949
949
  (o = i[s]) && (r = o(r) || r);
950
950
  return r;
951
- }, vt = (i, t) => (e, n) => t(e, n, i);
951
+ }, It = (i, t) => (e, n) => t(e, n, i);
952
952
  let nn = class extends ne {
953
953
  constructor(i, t, e, n, r) {
954
954
  super(), this._context = i, this._sheetDrawingService = t, this._drawingManagerService = e, this._sheetSelectionRenderService = n, this._sheetSkeletonManagerService = r, this._init();
@@ -970,16 +970,16 @@ let nn = class extends ne {
970
970
  }
971
971
  };
972
972
  nn = us([
973
- vt(1, re),
974
- vt(2, ie),
975
- vt(3, A(xe)),
976
- vt(4, A(V))
973
+ It(1, re),
974
+ It(2, ie),
975
+ It(3, A(xe)),
976
+ It(4, A(V))
977
977
  ], nn);
978
978
  var hs = Object.getOwnPropertyDescriptor, gs = (i, t, e, n) => {
979
979
  for (var r = n > 1 ? void 0 : n ? hs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
980
980
  (o = i[s]) && (r = o(r) || r);
981
981
  return r;
982
- }, Ne = (i, t) => (e, n) => t(e, n, i);
982
+ }, Ae = (i, t) => (e, n) => t(e, n, i);
983
983
  function Sr(i, t, e) {
984
984
  var n, r, s, o;
985
985
  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) {
@@ -1008,7 +1008,7 @@ let bt = class extends ne {
1008
1008
  this.disposeWithMe(this._editorBridgeService.visible$.subscribe((i) => {
1009
1009
  i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(Ze), this._docDrawingController.loadDrawingDataForUnit(Ze), this._drawingManagerService.initializeNotification(Ze)) : this._drawingManagerService.removeDrawingDataForUnit(Ze);
1010
1010
  })), this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
1011
- i.id === yi.id && i.params.unitId === je && (this._drawingManagerService.removeDrawingDataForUnit(je), this._docDrawingController.loadDrawingDataForUnit(je), this._drawingManagerService.initializeNotification(je));
1011
+ i.id === yi.id && i.params.unitId === Be && (this._drawingManagerService.removeDrawingDataForUnit(Be), this._docDrawingController.loadDrawingDataForUnit(Be), this._drawingManagerService.initializeNotification(Be));
1012
1012
  }));
1013
1013
  }
1014
1014
  _initCellContentInterceptor() {
@@ -1028,12 +1028,12 @@ let bt = class extends ne {
1028
1028
  }
1029
1029
  };
1030
1030
  bt = gs([
1031
- Ne(0, G),
1032
- Ne(1, A(At)),
1033
- Ne(2, A(Xe)),
1034
- Ne(3, ie),
1035
- Ne(4, A(Yi)),
1036
- Ne(5, A(kr))
1031
+ Ae(0, G),
1032
+ Ae(1, A(At)),
1033
+ Ae(2, A(Xe)),
1034
+ Ae(3, ie),
1035
+ Ae(4, A(Yi)),
1036
+ Ae(5, A(kr))
1037
1037
  ], bt);
1038
1038
  var fs = Object.getOwnPropertyDescriptor, ms = (i, t, e, n) => {
1039
1039
  for (var r = n > 1 ? void 0 : n ? fs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
@@ -1069,7 +1069,7 @@ var ps = Object.getOwnPropertyDescriptor, ws = (i, t, e, n) => {
1069
1069
  const _s = [
1070
1070
  Ze,
1071
1071
  Hr,
1072
- je
1072
+ Be
1073
1073
  ];
1074
1074
  let yt = class extends ne {
1075
1075
  constructor(i, t, e, n, r) {
@@ -1098,7 +1098,7 @@ let yt = class extends ne {
1098
1098
  return;
1099
1099
  const o = s.getUnitId();
1100
1100
  if (_s.includes(o)) {
1101
- if (o !== je) {
1101
+ if (o !== Be) {
1102
1102
  const a = () => {
1103
1103
  this._dialogService.close("sheet-cell-image-copy-paste"), this._commandService.syncExecuteCommand(pn.id, {
1104
1104
  visible: !1
@@ -1138,7 +1138,7 @@ yt = ws([
1138
1138
  He(1, Se),
1139
1139
  He(2, Ni),
1140
1140
  He(3, J),
1141
- He(4, A(tt))
1141
+ He(4, A(nt))
1142
1142
  ], yt);
1143
1143
  var Ss = Object.getOwnPropertyDescriptor, vs = (i, t, e, n) => {
1144
1144
  for (var r = n > 1 ? void 0 : n ? Ss(t, e) : t, s = i.length - 1, o; s >= 0; s--)
@@ -1169,10 +1169,10 @@ function Ds() {
1169
1169
  };
1170
1170
  }
1171
1171
  const Fn = [
1172
- Be.SPECIAL_PASTE_COL_WIDTH,
1173
- Be.SPECIAL_PASTE_VALUE,
1174
- Be.SPECIAL_PASTE_FORMAT,
1175
- Be.SPECIAL_PASTE_FORMULA
1172
+ We.SPECIAL_PASTE_COL_WIDTH,
1173
+ We.SPECIAL_PASTE_VALUE,
1174
+ We.SPECIAL_PASTE_FORMAT,
1175
+ We.SPECIAL_PASTE_FORMULA
1176
1176
  ];
1177
1177
  let Tt = class extends ne {
1178
1178
  constructor(t, e, n, r, s) {
@@ -1196,7 +1196,7 @@ let Tt = class extends ne {
1196
1196
  unitId: t,
1197
1197
  drawings: [o]
1198
1198
  };
1199
- this._commandService.executeCommand(nt.id, d);
1199
+ this._commandService.executeCommand(rt.id, d);
1200
1200
  }
1201
1201
  setTimeout(() => {
1202
1202
  const d = Ds();
@@ -1220,10 +1220,10 @@ let Tt = class extends ne {
1220
1220
  return this._copyInfo.copyRange ? this._generateRangeDrawingsPasteMutations({ pasteType: o, unitId: u, subUnitId: c, pasteRange: d }, { copyRange: a, copyType: s }) : this._generateSingleDrawingPasteMutations({ pasteTo: e, pasteType: o }, ve.COPY);
1221
1221
  },
1222
1222
  onPastePlainText: (t, e) => ({ undos: [], redos: [] }),
1223
- onPasteUnrecognized: (t) => this._copyInfo ? this._generateSingleDrawingPasteMutations({ pasteTo: t, pasteType: Be.DEFAULT_PASTE }, ve.COPY) : { undos: [], redos: [] },
1223
+ onPasteUnrecognized: (t) => this._copyInfo ? this._generateSingleDrawingPasteMutations({ pasteTo: t, pasteType: We.DEFAULT_PASTE }, ve.COPY) : { undos: [], redos: [] },
1224
1224
  onPasteFiles: (t, e) => {
1225
1225
  if (this._copyInfo)
1226
- return this._generateSingleDrawingPasteMutations({ pasteTo: t, pasteType: Be.DEFAULT_PASTE }, ve.COPY);
1226
+ return this._generateSingleDrawingPasteMutations({ pasteTo: t, pasteType: We.DEFAULT_PASTE }, ve.COPY);
1227
1227
  {
1228
1228
  const n = e.filter((r) => r.type.includes("image"));
1229
1229
  if (n.length)
@@ -1314,7 +1314,7 @@ let Tt = class extends ne {
1314
1314
  ...c,
1315
1315
  unitId: n,
1316
1316
  subUnitId: r,
1317
- drawingId: o ? c.drawingId : Re.generateRandomId(),
1317
+ drawingId: o ? c.drawingId : Qe(),
1318
1318
  transform: h.transform,
1319
1319
  sheetTransform: h.sheetTransform
1320
1320
  };
@@ -1429,7 +1429,7 @@ let Et = class extends ne {
1429
1429
  super(), this._drawingManagerService = i, this._renderManagerService = t, this._permissionService = e, this._univerInstanceService = n, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
1430
1430
  }
1431
1431
  _initDrawingVisible() {
1432
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(F.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = _t([i, t]);
1432
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(F.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = St([i, t]);
1433
1433
  this.disposeWithMe(
1434
1434
  e.pipe(
1435
1435
  we(([n, r]) => n ? n.activeSheet$.pipe(
@@ -1454,11 +1454,11 @@ let Et = class extends ne {
1454
1454
  if (!a)
1455
1455
  return;
1456
1456
  a.getAllObjectsByOrder().forEach((u) => {
1457
- u.classType === Ue.IMAGE && s.some((c) => u.oKey.includes(c.drawingId)) && a.removeObject(u);
1457
+ u.classType === Oe.IMAGE && s.some((c) => u.oKey.includes(c.drawingId)) && a.removeObject(u);
1458
1458
  });
1459
1459
  }
1460
1460
  _initDrawingEditable() {
1461
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(F.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = _t([i, t]);
1461
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(F.UNIVER_SHEET), t = this._userManagerService.currentUser$, e = St([i, t]);
1462
1462
  this.disposeWithMe(
1463
1463
  e.pipe(
1464
1464
  we(([n, r]) => n ? n.activeSheet$.pipe(
@@ -1483,13 +1483,13 @@ let Et = class extends ne {
1483
1483
  if (!a)
1484
1484
  return;
1485
1485
  a.getAllObjectsByOrder().forEach((u) => {
1486
- u.classType === Ue.IMAGE && s.some((c) => u.oKey.includes(c.drawingId)) && a.detachTransformerFrom(u);
1486
+ u.classType === Oe.IMAGE && s.some((c) => u.oKey.includes(c.drawingId)) && a.detachTransformerFrom(u);
1487
1487
  });
1488
1488
  }
1489
1489
  _initViewPermissionChange() {
1490
1490
  const i = this._univerInstanceService.getCurrentTypeOfUnit$(F.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1491
1491
  this.disposeWithMe(
1492
- _t([i, t]).pipe(
1492
+ St([i, t]).pipe(
1493
1493
  we(([e, n]) => e ? e.activeSheet$.pipe(
1494
1494
  we((r) => {
1495
1495
  if (!r)
@@ -1502,10 +1502,10 @@ let Et = class extends ne {
1502
1502
  new Mn(s).id,
1503
1503
  new yn(s, o).id
1504
1504
  ]).pipe(
1505
- be((l) => l.every((g) => g.value)),
1505
+ Re((l) => l.every((g) => g.value)),
1506
1506
  Wn()
1507
1507
  ).pipe(
1508
- be((l) => ({
1508
+ Re((l) => ({
1509
1509
  permission: l,
1510
1510
  scene: d,
1511
1511
  transformer: u,
@@ -1520,7 +1520,7 @@ let Et = class extends ne {
1520
1520
  this._drawingManagerService.setDrawingVisible(e);
1521
1521
  const a = n.getAllObjectsByOrder(), d = this._drawingManagerService.getDrawingData(s, o), u = Object.values(d);
1522
1522
  e ? this._drawingManagerService.addNotification(u) : (a.forEach((c) => {
1523
- c.classType === Ue.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.removeObject(c);
1523
+ c.classType === Oe.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.removeObject(c);
1524
1524
  }), r.clearSelectedObjects());
1525
1525
  },
1526
1526
  complete: () => {
@@ -1537,7 +1537,7 @@ let Et = class extends ne {
1537
1537
  _initEditPermissionChange() {
1538
1538
  const i = this._univerInstanceService.getCurrentTypeOfUnit$(F.UNIVER_SHEET), t = this._userManagerService.currentUser$;
1539
1539
  this.disposeWithMe(
1540
- _t([i, t]).pipe(
1540
+ St([i, t]).pipe(
1541
1541
  we(([e, n]) => e ? e.activeSheet$.pipe(
1542
1542
  we((r) => {
1543
1543
  if (!r)
@@ -1550,10 +1550,10 @@ let Et = class extends ne {
1550
1550
  new zt(s).id,
1551
1551
  new Kt(s, o).id
1552
1552
  ]).pipe(
1553
- be((l) => l.every((g) => g.value)),
1553
+ Re((l) => l.every((g) => g.value)),
1554
1554
  Wn()
1555
1555
  ).pipe(
1556
- be((l) => ({
1556
+ Re((l) => ({
1557
1557
  permission: l,
1558
1558
  scene: d,
1559
1559
  transformer: u,
@@ -1568,9 +1568,9 @@ let Et = class extends ne {
1568
1568
  this._drawingManagerService.setDrawingEditable(e);
1569
1569
  const a = n.getAllObjectsByOrder(), d = this._drawingManagerService.getDrawingData(s, o), u = Object.values(d);
1570
1570
  e ? (a.forEach((c) => {
1571
- c.classType === Ue.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.attachTransformerTo(c);
1571
+ c.classType === Oe.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.attachTransformerTo(c);
1572
1572
  }), this._drawingManagerService.addNotification(u)) : (a.forEach((c) => {
1573
- c.classType === Ue.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.detachTransformerFrom(c);
1573
+ c.classType === Oe.IMAGE && u.some((l) => c.oKey.includes(l.drawingId)) && n.detachTransformerFrom(c);
1574
1574
  }), r.clearSelectedObjects());
1575
1575
  },
1576
1576
  complete: () => {
@@ -1585,7 +1585,7 @@ let Et = class extends ne {
1585
1585
  return;
1586
1586
  const d = this._drawingManagerService.getDrawingData(n, s), u = Object.values(d);
1587
1587
  this._drawingManagerService.setDrawingEditable(!0), a.getAllObjectsByOrder().forEach((l) => {
1588
- l.classType === Ue.IMAGE && u.some((g) => l.oKey.includes(g.drawingId)) && a.detachTransformerFrom(l);
1588
+ l.classType === Oe.IMAGE && u.some((g) => l.oKey.includes(g.drawingId)) && a.detachTransformerFrom(l);
1589
1589
  });
1590
1590
  }
1591
1591
  })
@@ -1621,7 +1621,7 @@ function Ir(i, t, e, n, r, s = !1) {
1621
1621
  top: s ? 0 : T,
1622
1622
  left: s ? 0 : D
1623
1623
  };
1624
- w && (Re.isDefine(E.top) && (E.top = w.top), Re.isDefine(E.left) && (E.left = w.left)), y === "HORIZONTAL" && (C = 0), y === "VERTICAL" && (S = 0);
1624
+ w && (je.isDefine(E.top) && (E.top = w.top), je.isDefine(E.left) && (E.left = w.left)), y === "HORIZONTAL" && (C = 0), y === "VERTICAL" && (S = 0);
1625
1625
  let M = 0, b = 0;
1626
1626
  const N = e.rowStartY(l - h) + T, x = e.colStartX(c - g) + D, q = e.rowStartY(l) + T, H = e.colStartX(c) + D;
1627
1627
  if (g === 0)
@@ -1663,7 +1663,7 @@ const ge = (i, t, e, n, r) => {
1663
1663
  absolute: l.absolute
1664
1664
  };
1665
1665
  };
1666
- let et = class extends ne {
1666
+ let tt = class extends ne {
1667
1667
  constructor(t, e, n, r, s, o, a) {
1668
1668
  super();
1669
1669
  /**
@@ -1741,9 +1741,9 @@ let et = class extends ne {
1741
1741
  const k = h ? h.backgroundColor : "white";
1742
1742
  M.fill = k, h && h.border && (M.stroke = h.border), M.paintFirst = "stroke", M.strokeWidth = 1, M.borderEnabled = !1, M.radius = 8;
1743
1743
  }
1744
- const N = new Pe(T, M);
1744
+ const N = new Ue(T, M);
1745
1745
  b && N.setObjectType(mn.CHART), p.addObject(N, Ft), a.allowTransform !== !1 && p.attachTransformerTo(N);
1746
- const x = new wt(), q = ge(N, f.renderUnit.scene, c.skeleton, o.worksheet), H = new We(q), L = {
1746
+ const x = new _t(), q = ge(N, f.renderUnit.scene, c.skeleton, o.worksheet), H = new ke(q), L = {
1747
1747
  dispose: x,
1748
1748
  rect: N,
1749
1749
  position$: H,
@@ -1809,13 +1809,13 @@ let et = class extends ne {
1809
1809
  this.disposeWithMe(
1810
1810
  this._univerInstanceService.getCurrentTypeOfUnit$(F.UNIVER_SHEET).pipe(
1811
1811
  we((e) => e ? e.activeSheet$ : Bn(null)),
1812
- be((e) => {
1812
+ Re((e) => {
1813
1813
  if (!e) return null;
1814
1814
  const n = e.getUnitId(), r = this._renderManagerService.getRenderById(n);
1815
1815
  return r ? { render: r, unitId: n, subUnitId: e.getSheetId() } : null;
1816
1816
  }),
1817
1817
  we(
1818
- (e) => e ? qr(e.render.scene.getViewport(xn.VIEW_MAIN).onScrollAfter$).pipe(be(() => ({ unitId: e.unitId, subUnitId: e.subUnitId }))) : Bn(null)
1818
+ (e) => e ? qr(e.render.scene.getViewport(xn.VIEW_MAIN).onScrollAfter$).pipe(Re(() => ({ unitId: e.unitId, subUnitId: e.subUnitId }))) : Bn(null)
1819
1819
  )
1820
1820
  ).subscribe((e) => {
1821
1821
  if (!e) return;
@@ -1838,7 +1838,7 @@ let et = class extends ne {
1838
1838
  const s = this._domLayerInfoMap.get(n), o = this._getSceneAndTransformerByDrawingSearch(t);
1839
1839
  if (s && o) {
1840
1840
  const { scene: a } = o, d = Ie({ unitId: t, subUnitId: e, drawingId: n }), u = a.getObject(d);
1841
- u && u instanceof Pe && u.setProps(r);
1841
+ u && u instanceof Ue && u.setProps(r);
1842
1842
  }
1843
1843
  }
1844
1844
  _getPosition(t, e) {
@@ -1907,7 +1907,7 @@ let et = class extends ne {
1907
1907
  });
1908
1908
  if (!n)
1909
1909
  throw new Error("cannot find current target!");
1910
- const { unitId: r, subUnitId: s } = n, { initPosition: o, componentKey: a, data: d, allowTransform: u = !0 } = t, c = e != null ? e : Dt(), l = this._getPosition(o, r);
1910
+ const { unitId: r, subUnitId: s } = n, { initPosition: o, componentKey: a, data: d, allowTransform: u = !0 } = t, c = e != null ? e : Qe(), l = this._getPosition(o, r);
1911
1911
  if (l == null)
1912
1912
  return;
1913
1913
  const g = {
@@ -1966,10 +1966,10 @@ let et = class extends ne {
1966
1966
  if (!u) return;
1967
1967
  const c = (C = this._renderManagerService.getRenderById(o)) == null ? void 0 : C.with(V).getWorksheetSkeleton(a);
1968
1968
  if (!c) return;
1969
- const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Dt(), { position: p, position$: m } = this._createRangePositionObserver(t, u, c.skeleton);
1969
+ const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Qe(), { position: p, position$: m } = this._createRangePositionObserver(t, u, c.skeleton);
1970
1970
  if (this._getPosition(p, o) == null)
1971
1971
  return;
1972
- const v = d.scene, { scaleX: I } = v.getAncestorScale(), R = It(p, n, I), S = {
1972
+ const v = d.scene, { scaleX: I } = v.getAncestorScale(), R = Ct(p, n, I), S = {
1973
1973
  unitId: o,
1974
1974
  subUnitId: a,
1975
1975
  drawingId: f,
@@ -2003,44 +2003,44 @@ let et = class extends ne {
2003
2003
  const k = this._getSceneAndTransformerByDrawingSearch(D);
2004
2004
  if (k == null)
2005
2005
  return;
2006
- const { scene: ae, canvas: Me } = k;
2006
+ const { scene: ae, canvas: be } = k;
2007
2007
  if (L == null || x !== T)
2008
2008
  return;
2009
- const { left: st, top: ot, width: at, height: ct, angle: jt, flipX: $t, flipY: dt, skewX: lt, skewY: ye } = L, ut = Ie({ unitId: D, subUnitId: T, drawingId: E }), de = ae.getObject(ut);
2009
+ const { left: ot, top: at, width: ct, height: dt, angle: jt, flipX: $t, flipY: lt, skewX: ut, skewY: Me } = L, ht = Ie({ unitId: D, subUnitId: T, drawingId: E }), de = ae.getObject(ht);
2010
2010
  if (de != null) {
2011
- de.transformByState({ left: st, top: ot, width: at, height: ct, angle: jt, flipX: $t, flipY: dt, skewX: lt, skewY: ye });
2011
+ de.transformByState({ left: ot, top: at, width: ct, height: dt, angle: jt, flipX: $t, flipY: lt, skewX: ut, skewY: Me });
2012
2012
  return;
2013
2013
  }
2014
2014
  const Q = {
2015
- left: st,
2015
+ left: ot,
2016
2016
  // from floatDomParam.transform
2017
- top: ot,
2018
- width: at,
2019
- height: ct,
2017
+ top: at,
2018
+ width: ct,
2019
+ height: dt,
2020
2020
  zIndex: this._drawingManagerService.getDrawingOrder(D, T).length - 1
2021
- }, Te = X === B.DRAWING_CHART;
2022
- if (Te) {
2021
+ }, ye = X === B.DRAWING_CHART;
2022
+ if (ye) {
2023
2023
  const W = K ? K.backgroundColor : "white";
2024
2024
  Q.fill = W, Q.rotateEnabled = !1, K && K.border && (Q.stroke = K.border), Q.paintFirst = "stroke", Q.strokeWidth = 1, Q.borderEnabled = !1, Q.radius = 8;
2025
2025
  }
2026
- const le = new Pe(ut, Q);
2027
- Te && le.setObjectType(mn.CHART), ae.addObject(le, Ft), b.allowTransform !== !1 && ae.attachTransformerTo(le);
2028
- const ue = new wt(), ht = ae.getMainViewport(), { rowHeaderWidth: Ee, columnHeaderHeight: Ge } = H.skeleton, gt = {
2026
+ const le = new Ue(ht, Q);
2027
+ ye && le.setObjectType(mn.CHART), ae.addObject(le, Ft), b.allowTransform !== !1 && ae.attachTransformerTo(le);
2028
+ const ue = new _t(), gt = ae.getMainViewport(), { rowHeaderWidth: Te, columnHeaderHeight: Ge } = H.skeleton, ft = {
2029
2029
  top: Ge,
2030
- left: Ee,
2031
- bottom: ht.bottom,
2032
- right: ht.right
2030
+ left: Te,
2031
+ bottom: gt.bottom,
2032
+ right: gt.right
2033
2033
  }, he = {
2034
2034
  dispose: ue,
2035
2035
  rect: le,
2036
- boundsOfViewArea: gt,
2036
+ boundsOfViewArea: ft,
2037
2037
  domAnchor: n,
2038
2038
  unitId: D,
2039
2039
  subUnitId: T
2040
- }, j = ge(le, k.renderUnit.scene, H.skeleton, M.worksheet, he), Oe = new We(j);
2041
- he.position$ = Oe;
2040
+ }, j = ge(le, k.renderUnit.scene, H.skeleton, M.worksheet, he), Ee = new ke(j);
2041
+ he.position$ = Ee;
2042
2042
  let Le = {
2043
- position$: Oe,
2043
+ position$: Ee,
2044
2044
  id: E,
2045
2045
  componentKey: b.componentKey,
2046
2046
  onPointerDown: () => {
@@ -2050,7 +2050,7 @@ let et = class extends ne {
2050
2050
  onPointerUp: () => {
2051
2051
  },
2052
2052
  onWheel: (W) => {
2053
- Me.dispatchEvent(new WheelEvent(W.type, W));
2053
+ be.dispatchEvent(new WheelEvent(W.type, W));
2054
2054
  },
2055
2055
  data: K,
2056
2056
  unitId: D
@@ -2058,17 +2058,17 @@ let et = class extends ne {
2058
2058
  e.eventPassThrough && (Le = {
2059
2059
  ...Le,
2060
2060
  onPointerDown: (W) => {
2061
- Me.dispatchEvent(new PointerEvent(W.type, W));
2061
+ be.dispatchEvent(new PointerEvent(W.type, W));
2062
2062
  },
2063
2063
  onPointerMove: (W) => {
2064
- Me.dispatchEvent(new PointerEvent(W.type, W));
2064
+ be.dispatchEvent(new PointerEvent(W.type, W));
2065
2065
  },
2066
2066
  onPointerUp: (W) => {
2067
- Me.dispatchEvent(new PointerEvent(W.type, W));
2067
+ be.dispatchEvent(new PointerEvent(W.type, W));
2068
2068
  }
2069
2069
  }), this._canvasFloatDomService.addFloatDom(Le), this.disposeWithMe(m.subscribe((W) => {
2070
2070
  var un, hn, gn, fn;
2071
- const ln = It({
2071
+ const ln = Ct({
2072
2072
  startX: W.startX,
2073
2073
  startY: W.startY,
2074
2074
  endX: W.endX,
@@ -2079,28 +2079,28 @@ let et = class extends ne {
2079
2079
  left: p.absolute.left,
2080
2080
  top: p.absolute.top
2081
2081
  }
2082
- }, n), Rr = Ie({ unitId: D, subUnitId: T, drawingId: E }), br = new Pe(Rr, {
2082
+ }, n), Rr = Ie({ unitId: D, subUnitId: T, drawingId: E }), br = new Ue(Rr, {
2083
2083
  left: ln.startX,
2084
2084
  top: ln.startY,
2085
2085
  width: (gn = n.width) != null ? gn : W.width,
2086
2086
  height: (fn = n.height) != null ? fn : W.height,
2087
2087
  zIndex: this._drawingManagerService.getDrawingOrder(D, T).length - 1
2088
2088
  }), Mr = ge(br, k.renderUnit.scene, H.skeleton, M.worksheet, he);
2089
- Oe.next(Mr);
2089
+ Ee.next(Mr);
2090
2090
  }));
2091
2091
  const Ve = (y = this._renderManagerService.getRenderById(D)) == null ? void 0 : y.with(V);
2092
2092
  Ve == null || Ve.currentSkeleton$.subscribe((W) => {
2093
2093
  W && H.sheetId !== W.sheetId && this._removeDom(f, !0);
2094
2094
  });
2095
- const ft = le.onTransformChange$.subscribeEvent(() => {
2095
+ const mt = le.onTransformChange$.subscribeEvent(() => {
2096
2096
  const W = ge(le, k.renderUnit.scene, H.skeleton, M.worksheet, he);
2097
- Oe.next(
2097
+ Ee.next(
2098
2098
  W
2099
2099
  );
2100
2100
  });
2101
2101
  ue.add(() => {
2102
2102
  this._canvasFloatDomService.removeFloatDom(E);
2103
- }), ft && ue.add(ft), this._domLayerInfoMap.set(E, he);
2103
+ }), mt && ue.add(mt), this._domLayerInfoMap.set(E, he);
2104
2104
  }
2105
2105
  return {
2106
2106
  id: f,
@@ -2124,7 +2124,7 @@ let et = class extends ne {
2124
2124
  if (!u) return;
2125
2125
  const c = (R = this._renderManagerService.getRenderById(o)) == null ? void 0 : R.with(V).getWorksheetSkeleton(a);
2126
2126
  if (!c) return;
2127
- const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Dt(), { position: p, position$: m } = this._createRangePositionObserver({
2127
+ const { componentKey: l, data: g, allowTransform: h = !0 } = e, f = r != null ? r : Qe(), { position: p, position$: m } = this._createRangePositionObserver({
2128
2128
  startRow: 0,
2129
2129
  endRow: 0,
2130
2130
  startColumn: t,
@@ -2166,12 +2166,12 @@ let et = class extends ne {
2166
2166
  const { scene: X, canvas: K } = L;
2167
2167
  if (q == null || b !== y)
2168
2168
  return;
2169
- const { left: k, top: ae, width: Me, height: st, angle: ot, flipX: at, flipY: ct, skewX: jt, skewY: $t } = q, dt = Ie({ unitId: w, subUnitId: y, drawingId: D }), lt = X.getObject(dt);
2170
- if (lt != null) {
2171
- lt.transformByState({ left: k, top: ae, width: Me, height: st, angle: ot, flipX: at, flipY: ct, skewX: jt, skewY: $t });
2169
+ const { left: k, top: ae, width: be, height: ot, angle: at, flipX: ct, flipY: dt, skewX: jt, skewY: $t } = q, lt = Ie({ unitId: w, subUnitId: y, drawingId: D }), ut = X.getObject(lt);
2170
+ if (ut != null) {
2171
+ ut.transformByState({ left: k, top: ae, width: be, height: ot, angle: at, flipX: ct, flipY: dt, skewX: jt, skewY: $t });
2172
2172
  return;
2173
2173
  }
2174
- const ye = It({
2174
+ const Me = Ct({
2175
2175
  startX: _.startX,
2176
2176
  startY: 0,
2177
2177
  endX: p.endX,
@@ -2182,20 +2182,20 @@ let et = class extends ne {
2182
2182
  left: p.absolute.left,
2183
2183
  top: p.absolute.top
2184
2184
  }
2185
- }, n), ut = {
2186
- left: ye.startX,
2187
- top: ye.startY,
2188
- width: ye.width,
2189
- height: ye.height,
2185
+ }, n), ht = {
2186
+ left: Me.startX,
2187
+ top: Me.startY,
2188
+ width: Me.width,
2189
+ height: Me.height,
2190
2190
  zIndex: this._drawingManagerService.getDrawingOrder(w, y).length - 1
2191
- }, de = new Pe(dt, ut);
2191
+ }, de = new Ue(lt, ht);
2192
2192
  X.addObject(de, Ft), E.allowTransform !== !1 && X.attachTransformerTo(de);
2193
- const Q = new wt(), Te = X.getMainViewport(), le = {
2193
+ const Q = new _t(), ye = X.getMainViewport(), le = {
2194
2194
  top: 0,
2195
2195
  //viewMain.top,
2196
- left: Te.left,
2197
- bottom: Te.bottom,
2198
- right: Te.right
2196
+ left: ye.left,
2197
+ bottom: ye.bottom,
2198
+ right: ye.right
2199
2199
  }, ue = {
2200
2200
  dispose: Q,
2201
2201
  rect: de,
@@ -2206,10 +2206,10 @@ let et = class extends ne {
2206
2206
  domAnchor: n,
2207
2207
  scrollDirectionResponse: "HORIZONTAL"
2208
2208
  /* HORIZONTAL */
2209
- }, ht = ge(de, L.renderUnit.scene, x.skeleton, T.worksheet, ue), Ee = new We(ht);
2210
- ue.position$ = Ee;
2209
+ }, gt = ge(de, L.renderUnit.scene, x.skeleton, T.worksheet, ue), Te = new ke(gt);
2210
+ ue.position$ = Te;
2211
2211
  let Ge = {
2212
- position$: Ee,
2212
+ position$: Te,
2213
2213
  id: D,
2214
2214
  componentKey: E.componentKey,
2215
2215
  onPointerDown: () => {
@@ -2236,14 +2236,14 @@ let et = class extends ne {
2236
2236
  K.dispatchEvent(new PointerEvent(j.type, j));
2237
2237
  }
2238
2238
  }), this._canvasFloatDomService.addFloatDom(Ge);
2239
- const gt = de.onTransformChange$.subscribeEvent(() => {
2239
+ const ft = de.onTransformChange$.subscribeEvent(() => {
2240
2240
  const j = ge(de, L.renderUnit.scene, x.skeleton, T.worksheet, ue);
2241
- Ee.next(
2241
+ Te.next(
2242
2242
  j
2243
2243
  );
2244
2244
  });
2245
2245
  this.disposeWithMe(m.subscribe((j) => {
2246
- const Oe = It({
2246
+ const Ee = Ct({
2247
2247
  startX: j.startX,
2248
2248
  startY: 0,
2249
2249
  endX: j.endX,
@@ -2254,21 +2254,21 @@ let et = class extends ne {
2254
2254
  left: p.absolute.left,
2255
2255
  top: p.absolute.top
2256
2256
  }
2257
- }, n), Le = Ie({ unitId: w, subUnitId: y, drawingId: D }), Ve = new Pe(Le, {
2258
- left: Oe.startX,
2257
+ }, n), Le = Ie({ unitId: w, subUnitId: y, drawingId: D }), Ve = new Ue(Le, {
2258
+ left: Ee.startX,
2259
2259
  top: 0,
2260
2260
  width: n.width,
2261
2261
  height: n.height,
2262
2262
  zIndex: this._drawingManagerService.getDrawingOrder(w, y).length - 1
2263
- }), ft = ge(Ve, L.renderUnit.scene, x.skeleton, T.worksheet, ue);
2264
- Ee.next(ft);
2263
+ }), mt = ge(Ve, L.renderUnit.scene, x.skeleton, T.worksheet, ue);
2264
+ Te.next(mt);
2265
2265
  }));
2266
2266
  const he = (C = this._renderManagerService.getRenderById(w)) == null ? void 0 : C.with(V);
2267
2267
  he == null || he.currentSkeleton$.subscribe((j) => {
2268
2268
  j && c.sheetId !== j.sheetId && this._removeDom(f, !0);
2269
2269
  }), Q.add(() => {
2270
2270
  this._canvasFloatDomService.removeFloatDom(D);
2271
- }), gt && Q.add(gt), this._domLayerInfoMap.set(D, ue);
2271
+ }), ft && Q.add(ft), this._domLayerInfoMap.set(D, ue);
2272
2272
  }
2273
2273
  return {
2274
2274
  id: f,
@@ -2290,10 +2290,10 @@ let et = class extends ne {
2290
2290
  // eslint-disable-next-line max-lines-per-function
2291
2291
  _createRangePositionObserver(t, e, n) {
2292
2292
  let { startRow: r, startColumn: s } = t;
2293
- const o = Je(r, s, n), a = new We(o), d = Je(t.endRow, t.endColumn, n), u = new We(d), c = () => {
2293
+ const o = Je(r, s, n), a = new ke(o), d = Je(t.endRow, t.endColumn, n), u = new ke(d), c = () => {
2294
2294
  const m = Je(r, s, n), _ = Je(t.endRow, t.endColumn, n);
2295
2295
  a.next(m), u.next(_);
2296
- }, l = new wt();
2296
+ }, l = new _t();
2297
2297
  l.add(e.engine.clientRect$.subscribe(() => c())), l.add(this._commandService.onCommandExecuted((m) => {
2298
2298
  if (m.id === gi.id && m.params.rowsAutoHeightInfo.findIndex((v) => v.row === r) > -1) {
2299
2299
  c();
@@ -2316,7 +2316,7 @@ let et = class extends ne {
2316
2316
  endX: d.right,
2317
2317
  endY: d.bottom
2318
2318
  }), f = a.pipe(
2319
- be((m) => {
2319
+ Re((m) => {
2320
2320
  const _ = Je(t.endRow, t.endColumn, n);
2321
2321
  return {
2322
2322
  rotate: 0,
@@ -2343,7 +2343,7 @@ let et = class extends ne {
2343
2343
  };
2344
2344
  }
2345
2345
  };
2346
- et = ys([
2346
+ tt = ys([
2347
2347
  Ce(0, A(J)),
2348
2348
  Ce(1, Se),
2349
2349
  Ce(2, A(G)),
@@ -2351,7 +2351,7 @@ et = ys([
2351
2351
  Ce(4, A(Wi)),
2352
2352
  Ce(5, re),
2353
2353
  Ce(6, A(Jr))
2354
- ], et);
2354
+ ], tt);
2355
2355
  function Je(i, t, e) {
2356
2356
  const n = e.getCellWithCoordByIndex(i, t), r = n.isMergedMainCell ? n.mergeInfo : n;
2357
2357
  return {
@@ -2361,22 +2361,22 @@ function Je(i, t, e) {
2361
2361
  bottom: r.endY
2362
2362
  };
2363
2363
  }
2364
- function It(i, t, e) {
2364
+ function Ct(i, t, e) {
2365
2365
  var u, c;
2366
2366
  e = e != null ? e : 1;
2367
2367
  const n = i.endX - i.startX, r = i.endY - i.startY, s = (u = t == null ? void 0 : t.width) != null ? u : n, o = (c = t == null ? void 0 : t.height) != null ? c : r;
2368
2368
  let a = 0, d = 0;
2369
2369
  if (t) {
2370
2370
  if (t.horizonOffsetAlign === "right") {
2371
- const l = Ct(t.marginX, n * e);
2371
+ const l = Dt(t.marginX, n * e);
2372
2372
  a = i.endX - l - s;
2373
2373
  } else
2374
- a = i.startX + Ct(t.marginX, n);
2374
+ a = i.startX + Dt(t.marginX, n);
2375
2375
  if (t.verticalOffsetAlign === "bottom") {
2376
- const l = Ct(t.marginY, r * e);
2376
+ const l = Dt(t.marginY, r * e);
2377
2377
  d = i.endY - l - o;
2378
2378
  } else
2379
- d = i.startY + Ct(t.marginY, r);
2379
+ d = i.startY + Dt(t.marginY, r);
2380
2380
  }
2381
2381
  return {
2382
2382
  rotate: 0,
@@ -2392,7 +2392,7 @@ function It(i, t, e) {
2392
2392
  }
2393
2393
  };
2394
2394
  }
2395
- function Ct(i, t) {
2395
+ function Dt(i, t) {
2396
2396
  if (i === void 0) return 0;
2397
2397
  if (typeof i == "number") return i;
2398
2398
  const e = Number.parseFloat(i);
@@ -2422,7 +2422,7 @@ const Ts = (i) => {
2422
2422
  height: d * f,
2423
2423
  absolute: g.absolute
2424
2424
  }, m = {
2425
- position$: new We(p),
2425
+ position$: new ke(p),
2426
2426
  position: p,
2427
2427
  id: o.drawingId,
2428
2428
  componentKey: o.componentKey,
@@ -2480,7 +2480,7 @@ let Ot = class extends ne {
2480
2480
  return e(i);
2481
2481
  const { scaleX: u, scaleY: c } = s.scene, l = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, g = d.order.map((h) => d.data[h]);
2482
2482
  return g.length ? (g.forEach((h) => {
2483
- if (!h.groupId && h.transform && Re.isDefine(h.transform.left) && Re.isDefine(h.transform.top) && Re.isDefine(h.transform.width) && Re.isDefine(h.transform.height)) {
2483
+ if (!h.groupId && h.transform && je.isDefine(h.transform.left) && je.isDefine(h.transform.top) && je.isDefine(h.transform.width) && je.isDefine(h.transform.height)) {
2484
2484
  const f = o.skeleton.getCellIndexByOffset(h.transform.left, h.transform.top, u, c, { x: 0, y: 0 }), p = o.skeleton.getCellIndexByOffset(h.transform.left + h.transform.width, h.transform.top + h.transform.height, u, c, { x: 0, y: 0 });
2485
2485
  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);
2486
2486
  }
@@ -2532,7 +2532,7 @@ Ot = Os([
2532
2532
  De(1, A(lr)),
2533
2533
  De(2, ie),
2534
2534
  De(3, J),
2535
- De(4, A(et)),
2535
+ De(4, A(tt)),
2536
2536
  De(5, A(dr)),
2537
2537
  De(6, A(Xe))
2538
2538
  ], Ot);
@@ -3325,7 +3325,7 @@ rn = Ps([
3325
3325
  ], rn);
3326
3326
  const ks = (i) => {
3327
3327
  var v;
3328
- const t = qe(G), e = qe(tt), n = qe(ie), r = qe(J), { drawings: s } = i, o = s[0];
3328
+ const t = qe(G), e = qe(nt), n = qe(ie), r = qe(J), { drawings: s } = i, o = s[0];
3329
3329
  if (o == null)
3330
3330
  return;
3331
3331
  const { unitId: a } = o, d = r.getRenderById(a), u = d == null ? void 0 : d.scene;
@@ -3461,46 +3461,46 @@ const Fs = {
3461
3461
  }
3462
3462
  }
3463
3463
  };
3464
- function it(i) {
3464
+ function st(i) {
3465
3465
  return !i.getContextValue(ti) && !i.getContextValue(ni) && !i.getContextValue(ri) && i.getContextValue($e);
3466
3466
  }
3467
3467
  const xs = {
3468
- id: rt.id,
3468
+ id: it.id,
3469
3469
  description: "shortcut.drawing-move-down",
3470
3470
  group: "4_drawing-view",
3471
3471
  binding: Fe.ARROW_DOWN,
3472
3472
  priority: 100,
3473
- preconditions: it,
3473
+ preconditions: st,
3474
3474
  staticParameters: {
3475
3475
  direction: _e.DOWN
3476
3476
  }
3477
3477
  }, Ys = {
3478
- id: rt.id,
3478
+ id: it.id,
3479
3479
  description: "shortcut.drawing-move-up",
3480
3480
  group: "4_drawing-view",
3481
3481
  binding: Fe.ARROW_UP,
3482
3482
  priority: 100,
3483
- preconditions: it,
3483
+ preconditions: st,
3484
3484
  staticParameters: {
3485
3485
  direction: _e.UP
3486
3486
  }
3487
3487
  }, Xs = {
3488
- id: rt.id,
3488
+ id: it.id,
3489
3489
  description: "shortcut.drawing-move-left",
3490
3490
  group: "4_drawing-view",
3491
3491
  binding: Fe.ARROW_LEFT,
3492
3492
  priority: 100,
3493
- preconditions: it,
3493
+ preconditions: st,
3494
3494
  staticParameters: {
3495
3495
  direction: _e.LEFT
3496
3496
  }
3497
3497
  }, Gs = {
3498
- id: rt.id,
3498
+ id: it.id,
3499
3499
  description: "shortcut.drawing-move-right",
3500
3500
  group: "4_drawing-view",
3501
3501
  binding: Fe.ARROW_RIGHT,
3502
3502
  priority: 100,
3503
- preconditions: it,
3503
+ preconditions: st,
3504
3504
  staticParameters: {
3505
3505
  direction: _e.RIGHT
3506
3506
  }
@@ -3509,7 +3509,7 @@ const xs = {
3509
3509
  description: "shortcut.drawing-delete",
3510
3510
  group: "4_drawing-view",
3511
3511
  // when focusing on any other input tag do not trigger this shortcut
3512
- preconditions: it,
3512
+ preconditions: st,
3513
3513
  binding: Fe.DELETE,
3514
3514
  mac: Fe.BACKSPACE
3515
3515
  };
@@ -3517,7 +3517,7 @@ var Vs = Object.getOwnPropertyDescriptor, Hs = (i, t, e, n) => {
3517
3517
  for (var r = n > 1 ? void 0 : n ? Vs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
3518
3518
  (o = i[s]) && (r = o(r) || r);
3519
3519
  return r;
3520
- }, ke = (i, t) => (e, n) => t(e, n, i);
3520
+ }, Ne = (i, t) => (e, n) => t(e, n, i);
3521
3521
  let Ut = class extends ne {
3522
3522
  constructor(i, t, e, n, r, s) {
3523
3523
  super(), this._componentManager = i, this._menuManagerService = t, this._commandService = e, this._shortcutService = n, this._drawingManagerService = r, this._sheetsSelectionsService = s, this._init();
@@ -3534,14 +3534,14 @@ let Ut = class extends ne {
3534
3534
  Bt,
3535
3535
  dn,
3536
3536
  kt,
3537
- nt,
3537
+ rt,
3538
3538
  Wt,
3539
3539
  wr,
3540
3540
  Y,
3541
3541
  _r,
3542
3542
  gr,
3543
3543
  mr,
3544
- rt,
3544
+ it,
3545
3545
  hr,
3546
3546
  fr
3547
3547
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
@@ -3563,12 +3563,12 @@ let Ut = class extends ne {
3563
3563
  }
3564
3564
  };
3565
3565
  Ut = Hs([
3566
- ke(0, A(dr)),
3567
- ke(1, Fi),
3568
- ke(2, G),
3569
- ke(3, xi),
3570
- ke(4, ie),
3571
- ke(5, A(on))
3566
+ Ne(0, A(dr)),
3567
+ Ne(1, Fi),
3568
+ Ne(2, G),
3569
+ Ne(3, xi),
3570
+ Ne(4, ie),
3571
+ Ne(5, A(on))
3572
3572
  ], Ut);
3573
3573
  var zs = Object.defineProperty, Ks = Object.getOwnPropertyDescriptor, Js = (i, t, e) => t in i ? zs(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, Zs = (i, t, e, n) => {
3574
3574
  for (var r = n > 1 ? void 0 : n ? Ks(t, e) : t, s = i.length - 1, o; s >= 0; s--)
@@ -3588,7 +3588,7 @@ let Pt = class extends oi {
3588
3588
  }
3589
3589
  onStarting() {
3590
3590
  ci(this._injector, [
3591
- [et],
3591
+ [tt],
3592
3592
  [Ut],
3593
3593
  [Rt],
3594
3594
  [Ot],
@@ -3598,7 +3598,7 @@ let Pt = class extends oi {
3598
3598
  [Mt],
3599
3599
  [yt]
3600
3600
  ]), xt(this._injector, [
3601
- [et]
3601
+ [tt]
3602
3602
  ]);
3603
3603
  }
3604
3604
  onReady() {
@@ -3621,7 +3621,7 @@ let Pt = class extends oi {
3621
3621
  }
3622
3622
  _registerRenderModules() {
3623
3623
  [
3624
- [Qe],
3624
+ [et],
3625
3625
  [rn],
3626
3626
  [nn],
3627
3627
  [tn]
@@ -3645,13 +3645,13 @@ export {
3645
3645
  gr as GroupSheetDrawingCommand,
3646
3646
  Bt as InsertFloatImageCommand,
3647
3647
  kt as InsertSheetDrawingCommand,
3648
- rt as MoveDrawingsCommand,
3649
- nt as RemoveSheetDrawingCommand,
3648
+ it as MoveDrawingsCommand,
3649
+ rt as RemoveSheetDrawingCommand,
3650
3650
  Cr as SHEETS_IMAGE_MENU_ID,
3651
3651
  fr as SetDrawingArrangeCommand,
3652
3652
  Wt as SetSheetDrawingCommand,
3653
- et as SheetCanvasFloatDomManagerService,
3654
- Qe as SheetDrawingUpdateController,
3653
+ tt as SheetCanvasFloatDomManagerService,
3654
+ et as SheetDrawingUpdateController,
3655
3655
  wr as SidebarSheetDrawingOperation,
3656
3656
  mr as UngroupSheetDrawingCommand,
3657
3657
  Pt as UniverSheetsDrawingUIPlugin,