@univerjs/docs-drawing-ui 0.7.0-nightly.202505081607 → 0.7.0-nightly.202505101606

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/index.js CHANGED
@@ -1,45 +1,45 @@
1
1
  var kn = Object.defineProperty;
2
- var Fn = (i, e, t) => e in i ? kn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var _e = (i, e, t) => Fn(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { CommandType as q, ICommandService as G, IUniverInstanceService as z, TextX as Dt, JSONX as $, MemoryCursor as jn, TextXActionType as Y, IUndoRedoService as Zt, BuildTextUtils as Wn, ArrangeTypeEnum as Je, Tools as Ce, Inject as Z, IContextService as Qt, LocaleService as ft, Disposable as Ue, WrapTextType as qe, PositionedObjectLayoutType as F, BooleanNumber as se, DrawingTypeEnum as Le, ObjectRelativeFromV as j, ObjectRelativeFromH as J, FOCUSING_COMMON_DRAWINGS as rt, UniverInstanceType as Ie, Direction as he, DocumentFlavor as pt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as yt, FOCUSING_UNIVER_EDITOR as Hn, UndoCommand as Gn, RedoCommand as Vn, DisposableCollection as $n, toDisposable as ye, fromEventSubject as Jt, generateRandomId as zn, Injector as en, DOC_DRAWING_PRINTING_COMPONENT_KEY as Xn, throttle as Et, COLORS as qn, RxDisposable as Kn, LifecycleService as Yn, LifecycleStages as Rt, DependentOn as Zn, IConfigService as Qn, Plugin as Jn, merge as ei } from "@univerjs/core";
5
- import { IDocDrawingService as Be, UniverDocsDrawingPlugin as ti } from "@univerjs/docs-drawing";
6
- import { IImageIoService as ni, IDrawingManagerService as ve, DRAWING_IMAGE_ALLOW_IMAGE_LIST as ii, DRAWING_IMAGE_COUNT_LIMIT as At, ImageUploadStatusType as wt, DRAWING_IMAGE_ALLOW_SIZE as ri, getImageSize as si, getDrawingShapeKeyByDrawingSearch as oi, DRAWING_IMAGE_WIDTH_LIMIT as Pt, DRAWING_IMAGE_HEIGHT_LIMIT as Lt, UniverDrawingPlugin as ai } from "@univerjs/drawing";
7
- import { DrawingCommonPanel as ci, DrawingRenderService as tn, ImageCropperObject as di, COMPONENT_IMAGE_POPUP_MENU as li, OpenImageCropOperation as ui, ImageResetSizeOperation as gi, UniverDrawingUIPlugin as fi } from "@univerjs/drawing-ui";
8
- import { IRenderManagerService as Q, DocumentEditArea as We, getCurrentTypeOfRenderer as hi, CURSOR_TYPE as Ut, Liquid as nn, PageLayoutType as Bt, DocumentSkeletonPageType as kt, Vector2 as mi, Rect as vi, getColor as pi, TRANSFORM_CHANGE_OBSERVABLE_TYPE as wi } from "@univerjs/engine-render";
9
- import { IMessageService as Ii, ILocalFileService as _i, ISidebarService as Si, useDependency as we, getMenuHiddenObservable as rn, MenuItemType as sn, RibbonStartGroup as Di, KeyCode as He, ComponentManager as on, IMenuManagerService as yi, IShortcutService as Oi, CanvasFloatDomService as Ti, PrintFloatDomSingle as Mi, connectInjector as bi, UniverUIPlugin as Ci } from "@univerjs/ui";
10
- import { RichTextEditingMutation as ee, DocSelectionManagerService as Ot, DocSkeletonManagerService as te } from "@univerjs/docs";
11
- import { DocSelectionRenderService as xe, getRichTextEditPath as Ke, getCustomBlockIdsInSelections as xi, docDrawingPositionToTransform as an, VIEWPORT_KEY as cn, SetDocZoomRatioOperation as dn, DocPrintInterceptorService as Ni, NodePositionConvertToCursor as Ft, getOneTextSelectionRange as jt, getAnchorBounding as Ei, TEXT_RANGE_LAYER_INDEX as Ri, getDocObject as Ai, DocCanvasPopManagerService as Pi, IEditorService as Li } from "@univerjs/docs-ui";
12
- import { MessageType as Wt, InputNumber as je, Select as Ht, Checkbox as Ui, clsx as ue, RadioGroup as Gt, Radio as be, render as Bi, unmount as ki } from "@univerjs/design";
13
- import { BehaviorSubject as Tt, debounceTime as ln, Observable as Fi, map as Vt, switchMap as ji, of as Wi, takeUntil as $t, filter as zt } from "rxjs";
2
+ var Wn = (i, e, t) => e in i ? kn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var Ie = (i, e, t) => Wn(i, typeof e != "symbol" ? e + "" : e, t);
4
+ import { CommandType as q, ICommandService as j, IUniverInstanceService as z, TextX as Dt, JSONX as $, MemoryCursor as Hn, TextXActionType as Y, IUndoRedoService as Zt, BuildTextUtils as Gn, ArrangeTypeEnum as Qe, Tools as be, Inject as Z, IContextService as Qt, LocaleService as gt, Disposable as Le, WrapTextType as Xe, PositionedObjectLayoutType as k, BooleanNumber as se, DrawingTypeEnum as Pe, ObjectRelativeFromV as W, ObjectRelativeFromH as J, FOCUSING_COMMON_DRAWINGS as it, UniverInstanceType as we, Direction as fe, DocumentFlavor as pt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Ot, FOCUSING_UNIVER_EDITOR as jn, UndoCommand as Vn, RedoCommand as $n, DisposableCollection as zn, toDisposable as De, fromEventSubject as Jt, generateRandomId as Xn, Injector as en, DOC_DRAWING_PRINTING_COMPONENT_KEY as qn, throttle as Et, COLORS as Kn, RxDisposable as Yn, LifecycleService as Zn, LifecycleStages as Rt, DependentOn as Qn, IConfigService as Jn, Plugin as ei, merge as ti } from "@univerjs/core";
5
+ import { IDocDrawingService as Ue, UniverDocsDrawingPlugin as ni } from "@univerjs/docs-drawing";
6
+ import { IImageIoService as ii, IDrawingManagerService as me, DRAWING_IMAGE_ALLOW_IMAGE_LIST as ri, DRAWING_IMAGE_COUNT_LIMIT as At, ImageUploadStatusType as vt, DRAWING_IMAGE_ALLOW_SIZE as si, getImageSize as oi, getDrawingShapeKeyByDrawingSearch as ai, DRAWING_IMAGE_WIDTH_LIMIT as Pt, DRAWING_IMAGE_HEIGHT_LIMIT as Lt, UniverDrawingPlugin as ci } from "@univerjs/drawing";
7
+ import { DrawingCommonPanel as di, DrawingRenderService as tn, ImageCropperObject as li, COMPONENT_IMAGE_POPUP_MENU as ui, OpenImageCropOperation as gi, ImageResetSizeOperation as fi, UniverDrawingUIPlugin as hi } from "@univerjs/drawing-ui";
8
+ import { IRenderManagerService as Q, DocumentEditArea as We, getCurrentTypeOfRenderer as mi, CURSOR_TYPE as Ut, Liquid as nn, PageLayoutType as Bt, DocumentSkeletonPageType as Ft, Vector2 as pi, Rect as vi, getColor as wi, TRANSFORM_CHANGE_OBSERVABLE_TYPE as Ii } from "@univerjs/engine-render";
9
+ import { IMessageService as _i, ILocalFileService as Si, ISidebarService as Di, useDependency as ve, getMenuHiddenObservable as rn, MenuItemType as sn, RibbonStartGroup as Oi, KeyCode as He, ComponentManager as on, IMenuManagerService as yi, IShortcutService as Ti, CanvasFloatDomService as Mi, PrintFloatDomSingle as bi, connectInjector as xi, UniverUIPlugin as Ci } from "@univerjs/ui";
10
+ import { RichTextEditingMutation as ee, DocSelectionManagerService as yt, DocSkeletonManagerService as te } from "@univerjs/docs";
11
+ import { DocSelectionRenderService as xe, getRichTextEditPath as qe, getCustomBlockIdsInSelections as Ni, docDrawingPositionToTransform as an, VIEWPORT_KEY as cn, SetDocZoomRatioOperation as dn, DocPrintInterceptorService as Ei, NodePositionConvertToCursor as kt, getOneTextSelectionRange as Wt, getAnchorBounding as Ri, TEXT_RANGE_LAYER_INDEX as Ai, getDocObject as Pi, DocCanvasPopManagerService as Li, IEditorService as Ui } from "@univerjs/docs-ui";
12
+ import { MessageType as Ht, clsx as _t, InputNumber as ke, Select as Gt, Checkbox as Bi, borderTopClassName as ln, RadioGroup as jt, Radio as Me, render as Fi, unmount as ki } from "@univerjs/design";
13
+ import { BehaviorSubject as Tt, debounceTime as un, Observable as Wi, map as Vt, switchMap as Hi, of as Gi, takeUntil as $t, filter as zt } from "rxjs";
14
14
  import { jsxs as X, jsx as m } from "react/jsx-runtime";
15
- import { forwardRef as un, useRef as Hi, createElement as gn, useState as re, useEffect as Mt, useMemo as Gi } from "react";
16
- const Vi = "docs-drawing-ui.config", Xt = {};
17
- var me = function() {
18
- return me = Object.assign || function(i) {
15
+ import { forwardRef as gn, useRef as ji, createElement as fn, useState as re, useEffect as Mt, useMemo as Vi } from "react";
16
+ const $i = "docs-drawing-ui.config", Xt = {};
17
+ var he = function() {
18
+ return he = Object.assign || function(i) {
19
19
  for (var e, t = 1, n = arguments.length; t < n; t++) {
20
20
  e = arguments[t];
21
21
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (i[r] = e[r]);
22
22
  }
23
23
  return i;
24
- }, me.apply(this, arguments);
25
- }, $i = function(i, e) {
24
+ }, he.apply(this, arguments);
25
+ }, zi = function(i, e) {
26
26
  var t = {};
27
27
  for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]);
28
28
  if (i != null && typeof Object.getOwnPropertySymbols == "function")
29
29
  for (var r = 0, n = Object.getOwnPropertySymbols(i); r < n.length; r++)
30
30
  e.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, n[r]) && (t[n[r]] = i[n[r]]);
31
31
  return t;
32
- }, fn = un(function(i, e) {
33
- var t = i.icon, n = i.id, r = i.className, s = i.extend, o = $i(i, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), d = Hi("_".concat(qi()));
34
- return hn(t, "".concat(n), { defIds: t.defIds, idSuffix: d.current }, me({ ref: e, className: c }, o), s);
32
+ }, hn = gn(function(i, e) {
33
+ var t = i.icon, n = i.id, r = i.className, s = i.extend, o = zi(i, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), d = ji("_".concat(Ki()));
34
+ return mn(t, "".concat(n), { defIds: t.defIds, idSuffix: d.current }, he({ ref: e, className: c }, o), s);
35
35
  });
36
- function hn(i, e, t, n, r) {
37
- return gn(i.tag, me(me({ key: e }, zi(i, t, r)), n), (Xi(i, t).children || []).map(function(s, o) {
38
- return hn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), t, void 0, r);
36
+ function mn(i, e, t, n, r) {
37
+ return fn(i.tag, he(he({ key: e }, Xi(i, t, r)), n), (qi(i, t).children || []).map(function(s, o) {
38
+ return mn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), t, void 0, r);
39
39
  }));
40
40
  }
41
- function zi(i, e, t) {
42
- var n = me({}, i.attrs);
41
+ function Xi(i, e, t) {
42
+ var n = he({}, i.attrs);
43
43
  t != null && t.colorChannel1 && n.fill === "colorChannel1" && (n.fill = t.colorChannel1), i.tag === "mask" && n.id && (n.id = n.id + e.idSuffix), Object.entries(n).forEach(function(s) {
44
44
  var o = s[0], c = s[1];
45
45
  o === "mask" && typeof c == "string" && (n[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
@@ -50,48 +50,48 @@ function zi(i, e, t) {
50
50
  typeof c == "string" && (n[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
51
51
  })), n;
52
52
  }
53
- function Xi(i, e) {
53
+ function qi(i, e) {
54
54
  var t, n = e.defIds;
55
- return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? me(me({}, i), { children: i.children.map(function(r) {
56
- return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? me(me({}, r), { attrs: me(me({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
55
+ return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? he(he({}, i), { children: i.children.map(function(r) {
56
+ return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? he(he({}, r), { attrs: he(he({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
57
57
  }) }) : i;
58
58
  }
59
- function qi() {
59
+ function Ki() {
60
60
  return Math.random().toString(36).substring(2, 8);
61
61
  }
62
- fn.displayName = "UniverIcon";
63
- var Ki = { 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" } }] }, mn = un(function(i, e) {
64
- return gn(fn, Object.assign({}, i, {
62
+ hn.displayName = "UniverIcon";
63
+ var Yi = { 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" } }] }, pn = gn(function(i, e) {
64
+ return fn(hn, Object.assign({}, i, {
65
65
  id: "add-image-single",
66
66
  ref: e,
67
- icon: Ki
67
+ icon: Yi
68
68
  }));
69
69
  });
70
- mn.displayName = "AddImageSingle";
70
+ pn.displayName = "AddImageSingle";
71
71
  const bt = {
72
72
  id: "doc.command.remove-doc-image",
73
73
  type: q.COMMAND,
74
74
  // eslint-disable-next-line max-lines-per-function
75
75
  handler: (i, e) => {
76
- var C, M, E, U;
77
- const t = i.get(G), n = i.get(z), r = i.get(Q), s = n.getCurrentUniverDocInstance();
76
+ var x, M, E, U;
77
+ const t = i.get(j), n = i.get(z), r = i.get(Q), s = n.getCurrentUniverDocInstance();
78
78
  if (e == null || s == null)
79
79
  return !1;
80
- const o = r.getRenderById(e.unitId).with(xe), { drawings: c } = e, d = (C = o.getSegment()) != null ? C : "", a = new Dt(), l = $.getInstance(), g = (E = (M = s.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : M.customBlocks) != null ? E : [], u = c.map((N) => g.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), h = c[0].unitId, f = new jn();
80
+ const o = r.getRenderById(e.unitId).with(xe), { drawings: c } = e, d = (x = o.getSegment()) != null ? x : "", a = new Dt(), l = $.getInstance(), g = (E = (M = s.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : M.customBlocks) != null ? E : [], u = c.map((N) => g.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), h = c[0].unitId, f = new Hn();
81
81
  f.reset();
82
- const p = u[0].startIndex, v = [
82
+ const v = u[0].startIndex, p = [
83
83
  {
84
- startOffset: p,
85
- endOffset: p
84
+ startOffset: v,
85
+ endOffset: v
86
86
  }
87
87
  ], w = {
88
88
  id: ee.id,
89
89
  params: {
90
90
  unitId: h,
91
91
  actions: [],
92
- textRanges: v
92
+ textRanges: p
93
93
  }
94
- }, y = [];
94
+ }, O = [];
95
95
  for (const N of u) {
96
96
  const { startIndex: I } = N;
97
97
  I > f.cursor && a.push({
@@ -102,19 +102,19 @@ const bt = {
102
102
  len: 1
103
103
  }), f.moveCursorTo(I + 1);
104
104
  }
105
- const D = Ke(s, d);
106
- y.push(l.editOp(a.serialize(), D));
105
+ const D = qe(s, d);
106
+ O.push(l.editOp(a.serialize(), D));
107
107
  for (const N of u) {
108
- const { blockId: I } = N, P = ((U = s.getDrawings()) != null ? U : {})[I], A = s.getDrawingsOrder().indexOf(I), H = l.removeOp(["drawings", I], P), _ = l.removeOp(["drawingsOrder", A], I);
109
- y.push(H), y.push(_);
108
+ const { blockId: I } = N, P = ((U = s.getDrawings()) != null ? U : {})[I], A = s.getDrawingsOrder().indexOf(I), G = l.removeOp(["drawings", I], P), _ = l.removeOp(["drawingsOrder", A], I);
109
+ O.push(G), O.push(_);
110
110
  }
111
- return w.params.actions = y.reduce((N, I) => $.compose(N, I), null), !!t.syncExecuteCommand(w.id, w.params);
111
+ return w.params.actions = O.reduce((N, I) => $.compose(N, I), null), !!t.syncExecuteCommand(w.id, w.params);
112
112
  }
113
113
  }, vn = {
114
114
  id: "doc.command.delete-drawing",
115
115
  type: q.COMMAND,
116
116
  handler: (i) => {
117
- const e = i.get(G), n = i.get(Be).getFocusDrawings();
117
+ const e = i.get(j), n = i.get(Ue).getFocusDrawings();
118
118
  if (n.length === 0)
119
119
  return !1;
120
120
  const { unitId: r } = n[0], s = n.map((o) => {
@@ -131,12 +131,12 @@ const bt = {
131
131
  drawings: s
132
132
  });
133
133
  }
134
- }, pn = {
134
+ }, wn = {
135
135
  id: "doc.command.group-doc-image",
136
136
  type: q.COMMAND,
137
137
  handler: (i, e) => {
138
- i.get(G), i.get(Zt);
139
- const t = i.get(Be);
138
+ i.get(j), i.get(Zt);
139
+ const t = i.get(Ue);
140
140
  if (!e) return !1;
141
141
  const n = [];
142
142
  e.forEach(({ parent: l, children: g }) => {
@@ -147,7 +147,7 @@ const bt = {
147
147
  const r = t.getGroupDrawingOp(e), { unitId: s, subUnitId: o, undo: c, redo: d, objects: a } = r;
148
148
  return !1;
149
149
  }
150
- }, Ct = {
150
+ }, xt = {
151
151
  id: "doc.command.insert-doc-image",
152
152
  type: q.COMMAND,
153
153
  // eslint-disable-next-line max-lines-per-function
@@ -155,13 +155,13 @@ const bt = {
155
155
  var M, E, U, N;
156
156
  if (e == null)
157
157
  return !1;
158
- const t = i.get(G), n = i.get(Ot), r = i.get(z), s = n.getActiveTextRange(), o = r.getCurrentUniverDocInstance();
158
+ const t = i.get(j), n = i.get(yt), r = i.get(z), s = n.getActiveTextRange(), o = r.getCurrentUniverDocInstance();
159
159
  if (s == null || o == null)
160
160
  return !1;
161
161
  const c = o.getUnitId(), { drawings: d } = e, { collapsed: a, startOffset: l, segmentId: g } = s, u = o.getSelfOrHeaderFooterModel(g).getBody();
162
162
  if (u == null)
163
163
  return !1;
164
- const h = new Dt(), f = $.getInstance(), p = [], v = (E = (M = o.getSnapshot().drawingsOrder) == null ? void 0 : M.length) != null ? E : 0;
164
+ const h = new Dt(), f = $.getInstance(), v = [], p = (E = (M = o.getSnapshot().drawingsOrder) == null ? void 0 : M.length) != null ? E : 0;
165
165
  let w = 0;
166
166
  if (a)
167
167
  l > 0 && h.push({
@@ -169,16 +169,16 @@ const bt = {
169
169
  len: l
170
170
  });
171
171
  else {
172
- const I = Wn.selection.delete([s], u, 0, null, !1);
172
+ const I = Gn.selection.delete([s], u, 0, null, !1);
173
173
  h.push(...I);
174
- const P = xi(u, [s]), W = (U = o.getDrawings()) != null ? U : {}, A = (N = o.getDrawingsOrder()) != null ? N : [], H = P.sort((_, S) => A.indexOf(_) > A.indexOf(S) ? -1 : A.indexOf(_) < A.indexOf(S) ? 1 : 0);
175
- if (H.length > 0)
176
- for (const _ of H) {
177
- const S = W[_], x = A.indexOf(_);
178
- if (S == null || x < 0)
174
+ const P = Ni(u, [s]), H = (U = o.getDrawings()) != null ? U : {}, A = (N = o.getDrawingsOrder()) != null ? N : [], G = P.sort((_, S) => A.indexOf(_) > A.indexOf(S) ? -1 : A.indexOf(_) < A.indexOf(S) ? 1 : 0);
175
+ if (G.length > 0)
176
+ for (const _ of G) {
177
+ const S = H[_], C = A.indexOf(_);
178
+ if (S == null || C < 0)
179
179
  continue;
180
- const T = f.removeOp(["drawings", _], S), L = f.removeOp(["drawingsOrder", x], _);
181
- p.push(T), p.push(L), w++;
180
+ const T = f.removeOp(["drawings", _], S), L = f.removeOp(["drawingsOrder", C], _);
181
+ v.push(T), v.push(L), w++;
182
182
  }
183
183
  }
184
184
  h.push({
@@ -192,13 +192,13 @@ const bt = {
192
192
  },
193
193
  len: d.length
194
194
  });
195
- const y = Ke(o, g), D = f.editOp(h.serialize(), y);
196
- p.push(D);
195
+ const O = qe(o, g), D = f.editOp(h.serialize(), O);
196
+ v.push(D);
197
197
  for (const I of d) {
198
- const { drawingId: P } = I, W = f.insertOp(["drawings", P], I), A = f.insertOp(["drawingsOrder", v - w], P);
199
- p.push(W), p.push(A);
198
+ const { drawingId: P } = I, H = f.insertOp(["drawings", P], I), A = f.insertOp(["drawingsOrder", p - w], P);
199
+ v.push(H), v.push(A);
200
200
  }
201
- const O = {
201
+ const y = {
202
202
  id: ee.id,
203
203
  params: {
204
204
  unitId: c,
@@ -206,24 +206,24 @@ const bt = {
206
206
  textRanges: []
207
207
  }
208
208
  };
209
- return O.params.actions = p.reduce((I, P) => $.compose(I, P), null), !!t.syncExecuteCommand(O.id, O.params);
209
+ return y.params.actions = v.reduce((I, P) => $.compose(I, P), null), !!t.syncExecuteCommand(y.id, y.params);
210
210
  }
211
- }, wn = {
211
+ }, In = {
212
212
  id: "doc.command.set-drawing-arrange",
213
213
  type: q.COMMAND,
214
214
  handler: (i, e) => {
215
- const t = i.get(G), n = i.get(Be);
215
+ const t = i.get(j), n = i.get(Ue);
216
216
  if (e == null)
217
217
  return !1;
218
218
  const { unitId: r, subUnitId: s, drawingIds: o, arrangeType: c } = e, d = { unitId: r, subUnitId: s, drawingIds: o };
219
219
  let a;
220
- if (c === Je.forward ? a = n.getForwardDrawingsOp(d) : c === Je.backward ? a = n.getBackwardDrawingOp(d) : c === Je.front ? a = n.getFrontDrawingsOp(d) : c === Je.back && (a = n.getBackDrawingsOp(d)), a == null)
220
+ if (c === Qe.forward ? a = n.getForwardDrawingsOp(d) : c === Qe.backward ? a = n.getBackwardDrawingOp(d) : c === Qe.front ? a = n.getFrontDrawingsOp(d) : c === Qe.back && (a = n.getBackDrawingsOp(d)), a == null)
221
221
  return !1;
222
222
  const { redo: l } = a;
223
223
  if (l == null)
224
224
  return !1;
225
225
  const g = [];
226
- let u = Ce.deepClone(l);
226
+ let u = be.deepClone(l);
227
227
  u = u.slice(3), u.unshift("drawingsOrder"), g.push(u);
228
228
  const h = {
229
229
  id: ee.id,
@@ -233,14 +233,14 @@ const bt = {
233
233
  textRanges: null
234
234
  }
235
235
  };
236
- return h.params.actions = g.reduce((p, v) => $.compose(p, v), null), !!t.syncExecuteCommand(h.id, h.params);
236
+ return h.params.actions = g.reduce((v, p) => $.compose(v, p), null), !!t.syncExecuteCommand(h.id, h.params);
237
237
  }
238
- }, In = {
238
+ }, _n = {
239
239
  id: "doc.command.ungroup-doc-image",
240
240
  type: q.COMMAND,
241
241
  handler: (i, e) => {
242
- i.get(G), i.get(Zt);
243
- const t = i.get(Be);
242
+ i.get(j), i.get(Zt);
243
+ const t = i.get(Ue);
244
244
  if (!e) return !1;
245
245
  const n = [];
246
246
  e.forEach(({ parent: l, children: g }) => {
@@ -252,31 +252,31 @@ const bt = {
252
252
  return !1;
253
253
  }
254
254
  };
255
- class ht {
255
+ class ft {
256
256
  constructor() {
257
- _e(this, "_refreshDrawings$", new Tt(null));
258
- _e(this, "refreshDrawings$", this._refreshDrawings$.asObservable());
257
+ Ie(this, "_refreshDrawings$", new Tt(null));
258
+ Ie(this, "refreshDrawings$", this._refreshDrawings$.asObservable());
259
259
  }
260
260
  refreshDrawings(e) {
261
261
  this._refreshDrawings$.next(e);
262
262
  }
263
263
  }
264
- var Yi = Object.getOwnPropertyDescriptor, Zi = (i, e, t, n) => {
265
- for (var r = n > 1 ? void 0 : n ? Yi(e, t) : e, s = i.length - 1, o; s >= 0; s--)
264
+ var Zi = Object.getOwnPropertyDescriptor, Qi = (i, e, t, n) => {
265
+ for (var r = n > 1 ? void 0 : n ? Zi(e, t) : e, s = i.length - 1, o; s >= 0; s--)
266
266
  (o = i[s]) && (r = o(r) || r);
267
267
  return r;
268
- }, ge = (i, e) => (t, n) => e(t, n, i);
269
- let st = class extends Ue {
268
+ }, ue = (i, e) => (t, n) => e(t, n, i);
269
+ let rt = class extends Le {
270
270
  constructor(i, e, t, n, r, s, o, c, d, a, l, g, u) {
271
271
  super(), this._context = i, this._commandService = e, this._docSelectionManagerService = t, this._renderManagerSrv = n, this._imageIoService = r, this._docDrawingService = s, this._drawingManagerService = o, this._contextService = c, this._messageService = d, this._localeService = a, this._docSelectionRenderService = l, this._docRefreshDrawingsService = g, this._fileOpenerService = u, this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener(), this._transformDrawingListener(), this._editAreaChangeListener();
272
272
  }
273
273
  async insertDocImage() {
274
274
  const i = await this._fileOpenerService.openFile({
275
275
  multiple: !0,
276
- accept: ii.map((t) => `.${t.replace("image/", "")}`).join(",")
276
+ accept: ri.map((t) => `.${t.replace("image/", "")}`).join(",")
277
277
  }), e = i.length;
278
278
  return e > At ? (this._messageService.show({
279
- type: Wt.Error,
279
+ type: Ht.Error,
280
280
  content: this._localeService.t("update-status.exceedMaxCount", String(At))
281
281
  }), !1) : e === 0 ? !1 : (await this._insertFloatImages(i), !0);
282
282
  }
@@ -289,18 +289,18 @@ let st = class extends Ue {
289
289
  const s = r.message;
290
290
  let o = "";
291
291
  switch (s) {
292
- case wt.ERROR_EXCEED_SIZE:
293
- o = this._localeService.t("update-status.exceedMaxSize", String(ri / (1024 * 1024)));
292
+ case vt.ERROR_EXCEED_SIZE:
293
+ o = this._localeService.t("update-status.exceedMaxSize", String(si / (1024 * 1024)));
294
294
  break;
295
- case wt.ERROR_IMAGE_TYPE:
295
+ case vt.ERROR_IMAGE_TYPE:
296
296
  o = this._localeService.t("update-status.invalidImageType");
297
297
  break;
298
- case wt.ERROR_IMAGE:
298
+ case vt.ERROR_IMAGE:
299
299
  o = this._localeService.t("update-status.invalidImage");
300
300
  break;
301
301
  }
302
302
  this._messageService.show({
303
- type: Wt.Error,
303
+ type: Ht.Error,
304
304
  content: o
305
305
  });
306
306
  }
@@ -310,12 +310,12 @@ let st = class extends Ue {
310
310
  for (const r of e) {
311
311
  if (r == null)
312
312
  continue;
313
- const { imageId: s, imageSourceType: o, source: c, base64Cache: d } = r, { width: a, height: l, image: g } = await si(d || "");
313
+ const { imageId: s, imageSourceType: o, source: c, base64Cache: d } = r, { width: a, height: l, image: g } = await oi(d || "");
314
314
  this._imageIoService.addImageSourceCache(s, o, g);
315
315
  let u = 1;
316
316
  if (a > Pt || l > Lt) {
317
- const v = Pt / a, w = Lt / l;
318
- u = Math.min(v, w);
317
+ const p = Pt / a, w = Lt / l;
318
+ u = Math.min(p, w);
319
319
  }
320
320
  const h = this._getImagePosition(a * u, l * u);
321
321
  if (h == null)
@@ -324,7 +324,7 @@ let st = class extends Ue {
324
324
  unitId: t,
325
325
  subUnitId: t,
326
326
  drawingId: s,
327
- drawingType: Le.DRAWING_IMAGE,
327
+ drawingType: Pe.DRAWING_IMAGE,
328
328
  imageSourceType: o,
329
329
  source: c,
330
330
  transform: an(h),
@@ -332,9 +332,9 @@ let st = class extends Ue {
332
332
  behindDoc: se.FALSE,
333
333
  title: "",
334
334
  description: "",
335
- layoutType: F.INLINE,
335
+ layoutType: k.INLINE,
336
336
  // Insert inline drawing by default.
337
- wrapText: qe.BOTH_SIDES,
337
+ wrapText: Xe.BOTH_SIDES,
338
338
  distB: 0,
339
339
  distL: 0,
340
340
  distR: 0,
@@ -342,7 +342,7 @@ let st = class extends Ue {
342
342
  };
343
343
  this._isInsertInHeaderFooter() && (f.isMultiTransform = se.TRUE, f.transforms = f.transform ? [f.transform] : null), n.push(f);
344
344
  }
345
- this._commandService.executeCommand(Ct.id, {
345
+ this._commandService.executeCommand(xt.id, {
346
346
  unitId: t,
347
347
  drawings: n
348
348
  });
@@ -366,7 +366,7 @@ let st = class extends Ue {
366
366
  posOffset: n.left
367
367
  },
368
368
  positionV: {
369
- relativeFrom: j.PARAGRAPH,
369
+ relativeFrom: W.PARAGRAPH,
370
370
  posOffset: 0
371
371
  },
372
372
  angle: 0
@@ -375,7 +375,7 @@ let st = class extends Ue {
375
375
  _updateOrderListener() {
376
376
  this._drawingManagerService.featurePluginOrderUpdate$.subscribe((i) => {
377
377
  const { unitId: e, subUnitId: t, drawingIds: n, arrangeType: r } = i;
378
- this._commandService.executeCommand(wn.id, {
378
+ this._commandService.executeCommand(In.id, {
379
379
  unitId: e,
380
380
  subUnitId: t,
381
381
  drawingIds: n,
@@ -385,9 +385,9 @@ let st = class extends Ue {
385
385
  }
386
386
  _groupDrawingListener() {
387
387
  this._drawingManagerService.featurePluginGroupUpdate$.subscribe((i) => {
388
- this._commandService.executeCommand(pn.id, i);
388
+ this._commandService.executeCommand(wn.id, i);
389
389
  }), this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((i) => {
390
- this._commandService.executeCommand(In.id, i);
390
+ this._commandService.executeCommand(_n.id, i);
391
391
  });
392
392
  }
393
393
  _getCurrentSceneAndTransformer() {
@@ -400,7 +400,7 @@ let st = class extends Ue {
400
400
  _transformDrawingListener() {
401
401
  const i = this._getCurrentSceneAndTransformer();
402
402
  if (i && i.transformer)
403
- this.disposeWithMe(i.transformer.changeEnd$.pipe(ln(30)).subscribe((e) => {
403
+ this.disposeWithMe(i.transformer.changeEnd$.pipe(un(30)).subscribe((e) => {
404
404
  this._docSelectionManagerService.refreshSelection();
405
405
  }));
406
406
  else
@@ -412,12 +412,12 @@ let st = class extends Ue {
412
412
  var r;
413
413
  const { transformer: e, docsLeft: t, docsTop: n } = (r = this._getCurrentSceneAndTransformer()) != null ? r : {};
414
414
  if (i == null || i.length === 0)
415
- this._contextService.setContextValue(rt, !1), this._docDrawingService.focusDrawing([]), e && e.resetProps({
415
+ this._contextService.setContextValue(it, !1), this._docDrawingService.focusDrawing([]), e && e.resetProps({
416
416
  zeroTop: 0,
417
417
  zeroLeft: 0
418
418
  });
419
419
  else {
420
- this._contextService.setContextValue(rt, !0), this._docDrawingService.focusDrawing(i), this._setDrawingSelections(i);
420
+ this._contextService.setContextValue(it, !0), this._docDrawingService.focusDrawing(i), this._setDrawingSelections(i);
421
421
  const s = this._docSelectionRenderService.getSegment(), o = this._findSegmentIdByDrawingId(i[0].drawingId);
422
422
  s !== o && this._docSelectionRenderService.setSegment(o), e && e.resetProps({
423
423
  zeroTop: n,
@@ -448,7 +448,7 @@ let st = class extends Ue {
448
448
  return;
449
449
  const r = i.getSnapshot(), { drawings: s = {} } = r, o = n.getEditArea() === We.BODY;
450
450
  for (const d of Object.keys(s)) {
451
- const a = s[d], l = oi({ unitId: t, drawingId: a.drawingId, subUnitId: t }), g = e.fuzzyMathObjects(l, !0);
451
+ const a = s[d], l = ai({ unitId: t, drawingId: a.drawingId, subUnitId: t }), g = e.fuzzyMathObjects(l, !0);
452
452
  if (g.length)
453
453
  for (const u of g) {
454
454
  e.detachTransformerFrom(u);
@@ -494,43 +494,43 @@ let st = class extends Ue {
494
494
  this._docSelectionManagerService.replaceDocRanges(n);
495
495
  }
496
496
  };
497
- st = Zi([
498
- ge(1, G),
499
- ge(2, Z(Ot)),
500
- ge(3, Q),
501
- ge(4, ni),
502
- ge(5, Be),
503
- ge(6, ve),
504
- ge(7, Qt),
505
- ge(8, Ii),
506
- ge(9, Z(ft)),
507
- ge(10, Z(xe)),
508
- ge(11, Z(ht)),
509
- ge(12, _i)
510
- ], st);
511
- const _n = {
497
+ rt = Qi([
498
+ ue(1, j),
499
+ ue(2, Z(yt)),
500
+ ue(3, Q),
501
+ ue(4, ii),
502
+ ue(5, Ue),
503
+ ue(6, me),
504
+ ue(7, Qt),
505
+ ue(8, _i),
506
+ ue(9, Z(gt)),
507
+ ue(10, Z(xe)),
508
+ ue(11, Z(ft)),
509
+ ue(12, Si)
510
+ ], rt);
511
+ const Sn = {
512
512
  id: "doc.command.insert-float-image",
513
513
  type: q.COMMAND,
514
514
  handler: (i) => {
515
515
  var n, r;
516
516
  const e = i.get(z), t = i.get(Q);
517
- return (r = (n = hi(Ie.UNIVER_DOC, e, t)) == null ? void 0 : n.with(st).insertDocImage()) != null ? r : !1;
517
+ return (r = (n = mi(we.UNIVER_DOC, e, t)) == null ? void 0 : n.with(rt).insertDocImage()) != null ? r : !1;
518
518
  }
519
519
  };
520
- var fe = /* @__PURE__ */ ((i) => (i.INLINE = "inline", i.BEHIND_TEXT = "behindText", i.IN_FRONT_OF_TEXT = "inFrontOfText", i.WRAP_SQUARE = "wrapSquare", i.WRAP_TOP_AND_BOTTOM = "wrapTopAndBottom", i))(fe || {});
521
- const Qi = {
522
- inline: F.INLINE,
523
- wrapSquare: F.WRAP_SQUARE,
524
- wrapTopAndBottom: F.WRAP_TOP_AND_BOTTOM,
525
- inFrontOfText: F.WRAP_NONE,
526
- behindText: F.WRAP_NONE
520
+ var ge = /* @__PURE__ */ ((i) => (i.INLINE = "inline", i.BEHIND_TEXT = "behindText", i.IN_FRONT_OF_TEXT = "inFrontOfText", i.WRAP_SQUARE = "wrapSquare", i.WRAP_TOP_AND_BOTTOM = "wrapTopAndBottom", i))(ge || {});
521
+ const Ji = {
522
+ inline: k.INLINE,
523
+ wrapSquare: k.WRAP_SQUARE,
524
+ wrapTopAndBottom: k.WRAP_TOP_AND_BOTTOM,
525
+ inFrontOfText: k.WRAP_NONE,
526
+ behindText: k.WRAP_NONE
527
527
  };
528
- function Sn(i, e, t, n, r, s, o) {
528
+ function Dn(i, e, t, n, r, s, o) {
529
529
  var h, f;
530
530
  const c = new Dt(), d = $.getInstance(), a = [], l = s.getSelfOrHeaderFooterModel(e).getBody(), g = s.getSelfOrHeaderFooterModel(i).getBody();
531
531
  if (l == null || g == null)
532
532
  return;
533
- const u = (f = (h = l.customBlocks) == null ? void 0 : h.find((p) => p.blockId === r)) == null ? void 0 : f.startIndex;
533
+ const u = (f = (h = l.customBlocks) == null ? void 0 : h.find((v) => v.blockId === r)) == null ? void 0 : f.startIndex;
534
534
  if (u != null) {
535
535
  if (n = Math.min(g.dataStream.length - 2, n), i === e) {
536
536
  if (n < u ? (n > 0 && c.push({
@@ -572,8 +572,8 @@ function Sn(i, e, t, n, r, s, o) {
572
572
  },
573
573
  len: 1
574
574
  })), n !== u) {
575
- const p = Ke(s, e), v = d.editOp(c.serialize(), p);
576
- a.push(v);
575
+ const v = qe(s, e), p = d.editOp(c.serialize(), v);
576
+ a.push(p);
577
577
  }
578
578
  } else {
579
579
  u > 0 && c.push({
@@ -583,8 +583,8 @@ function Sn(i, e, t, n, r, s, o) {
583
583
  t: Y.DELETE,
584
584
  len: 1
585
585
  });
586
- let p = Ke(s, e), v = d.editOp(c.serialize(), p);
587
- a.push(v), c.empty(), n > 0 && c.push({
586
+ let v = qe(s, e), p = d.editOp(c.serialize(), v);
587
+ a.push(p), c.empty(), n > 0 && c.push({
588
588
  t: Y.RETAIN,
589
589
  len: n
590
590
  }), c.push({
@@ -597,12 +597,12 @@ function Sn(i, e, t, n, r, s, o) {
597
597
  }]
598
598
  },
599
599
  len: 1
600
- }), p = Ke(s, i), v = d.editOp(c.serialize(), p), a.push(v), o.setSegment(i), o.setSegmentPage(t);
600
+ }), v = qe(s, i), p = d.editOp(c.serialize(), v), a.push(p), o.setSegment(i), o.setSegmentPage(t);
601
601
  }
602
602
  return a;
603
603
  }
604
604
  }
605
- const Dn = {
605
+ const On = {
606
606
  id: "doc.command.update-doc-drawing-wrapping-style",
607
607
  type: q.COMMAND,
608
608
  // eslint-disable-next-line max-lines-per-function, complexity
@@ -610,41 +610,41 @@ const Dn = {
610
610
  var E, U;
611
611
  if (e == null)
612
612
  return !1;
613
- const { drawings: t, wrappingStyle: n, unitId: r } = e, s = i.get(G), o = i.get(z), d = i.get(Q).getRenderById(r), a = d == null ? void 0 : d.with(te).getSkeleton().getSkeletonData(), l = d == null ? void 0 : d.with(te).getViewModel(), g = d == null ? void 0 : d.scene, u = o.getCurrentUniverDocInstance();
613
+ const { drawings: t, wrappingStyle: n, unitId: r } = e, s = i.get(j), o = i.get(z), d = i.get(Q).getRenderById(r), a = d == null ? void 0 : d.with(te).getSkeleton().getSkeletonData(), l = d == null ? void 0 : d.with(te).getViewModel(), g = d == null ? void 0 : d.scene, u = o.getCurrentUniverDocInstance();
614
614
  if (u == null || a == null || g == null || l == null)
615
615
  return !1;
616
- const h = l.getEditArea(), f = g.getTransformerByCreate(), { pages: p, skeHeaders: v, skeFooters: w } = a, y = $.getInstance(), D = [], { drawings: O = {} } = u.getSnapshot();
616
+ const h = l.getEditArea(), f = g.getTransformerByCreate(), { pages: v, skeHeaders: p, skeFooters: w } = a, O = $.getInstance(), D = [], { drawings: y = {} } = u.getSnapshot();
617
617
  for (const N of t) {
618
- const { drawingId: I } = N, P = O[I].layoutType, W = Qi[n];
619
- if (P !== W) {
620
- const S = y.replaceOp(["drawings", I, "layoutType"], P, W);
618
+ const { drawingId: I } = N, P = y[I].layoutType, H = Ji[n];
619
+ if (P !== H) {
620
+ const S = O.replaceOp(["drawings", I, "layoutType"], P, H);
621
621
  D.push(S);
622
622
  }
623
623
  if (n === "behindText" || n === "inFrontOfText") {
624
- const S = O[I].behindDoc, x = n === "behindText" ? se.TRUE : se.FALSE;
625
- if (S !== x) {
626
- const T = y.replaceOp(["drawings", I, "behindDoc"], S, x);
624
+ const S = y[I].behindDoc, C = n === "behindText" ? se.TRUE : se.FALSE;
625
+ if (S !== C) {
626
+ const T = O.replaceOp(["drawings", I, "behindDoc"], S, C);
627
627
  D.push(T);
628
628
  }
629
629
  }
630
630
  if (n === "inline")
631
631
  continue;
632
- let A = null, H = 0, _ = 0;
633
- for (const S of p) {
634
- const { headerId: x, footerId: T, marginTop: L, marginLeft: B, marginBottom: b, pageWidth: R, pageHeight: V } = S;
632
+ let A = null, G = 0, _ = 0;
633
+ for (const S of v) {
634
+ const { headerId: C, footerId: T, marginTop: L, marginLeft: B, marginBottom: b, pageWidth: R, pageHeight: V } = S;
635
635
  switch (h) {
636
636
  case We.HEADER: {
637
- const k = (E = v.get(x)) == null ? void 0 : E.get(R);
638
- k != null && k.skeDrawings.has(I) && (A = k.skeDrawings.get(I), H = k.marginTop, _ = B);
637
+ const F = (E = p.get(C)) == null ? void 0 : E.get(R);
638
+ F != null && F.skeDrawings.has(I) && (A = F.skeDrawings.get(I), G = F.marginTop, _ = B);
639
639
  break;
640
640
  }
641
641
  case We.FOOTER: {
642
- const k = (U = w.get(T)) == null ? void 0 : U.get(R);
643
- k != null && k.skeDrawings.has(I) && (A = k.skeDrawings.get(I), H = V - b + k.marginTop, _ = B);
642
+ const F = (U = w.get(T)) == null ? void 0 : U.get(R);
643
+ F != null && F.skeDrawings.has(I) && (A = F.skeDrawings.get(I), G = V - b + F.marginTop, _ = B);
644
644
  break;
645
645
  }
646
646
  case We.BODY: {
647
- S.skeDrawings.has(I) && (A = S.skeDrawings.get(I), H = L, _ = B);
647
+ S.skeDrawings.has(I) && (A = S.skeDrawings.get(I), G = L, _ = B);
648
648
  break;
649
649
  }
650
650
  }
@@ -652,31 +652,31 @@ const Dn = {
652
652
  break;
653
653
  }
654
654
  if (A != null) {
655
- const { aTop: S, aLeft: x } = A, T = O[I].docTransform.positionH;
656
- let L = x;
655
+ const { aTop: S, aLeft: C } = A, T = y[I].docTransform.positionH;
656
+ let L = C;
657
657
  T.relativeFrom === J.MARGIN ? L -= _ : T.relativeFrom === J.COLUMN && (L -= A.columnLeft);
658
658
  const B = {
659
659
  relativeFrom: T.relativeFrom,
660
660
  posOffset: L
661
661
  };
662
662
  if (T.posOffset !== B.posOffset) {
663
- const k = y.replaceOp(["drawings", I, "docTransform", "positionH"], T, B);
664
- D.push(k);
663
+ const F = O.replaceOp(["drawings", I, "docTransform", "positionH"], T, B);
664
+ D.push(F);
665
665
  }
666
- const b = O[I].docTransform.positionV;
666
+ const b = y[I].docTransform.positionV;
667
667
  let R = S;
668
- b.relativeFrom === j.PAGE ? R += H : b.relativeFrom === j.LINE ? R -= A.lineTop : b.relativeFrom === j.PARAGRAPH && (R -= A.blockAnchorTop);
668
+ b.relativeFrom === W.PAGE ? R += G : b.relativeFrom === W.LINE ? R -= A.lineTop : b.relativeFrom === W.PARAGRAPH && (R -= A.blockAnchorTop);
669
669
  const V = {
670
670
  relativeFrom: b.relativeFrom,
671
671
  posOffset: R
672
672
  };
673
673
  if (b.posOffset !== V.posOffset) {
674
- const k = y.replaceOp(["drawings", I, "docTransform", "positionV"], b, V);
675
- D.push(k);
674
+ const F = O.replaceOp(["drawings", I, "docTransform", "positionV"], b, V);
675
+ D.push(F);
676
676
  }
677
677
  }
678
678
  }
679
- const C = {
679
+ const x = {
680
680
  id: ee.id,
681
681
  params: {
682
682
  unitId: r,
@@ -684,8 +684,8 @@ const Dn = {
684
684
  textRanges: null
685
685
  }
686
686
  };
687
- C.params.actions = D.reduce((N, I) => $.compose(N, I), null);
688
- const M = s.syncExecuteCommand(C.id, C.params);
687
+ x.params.actions = D.reduce((N, I) => $.compose(N, I), null);
688
+ const M = s.syncExecuteCommand(x.id, x.params);
689
689
  return f.refreshControls(), !!M;
690
690
  }
691
691
  }, yn = {
@@ -694,17 +694,17 @@ const Dn = {
694
694
  handler: (i, e) => {
695
695
  if (e == null)
696
696
  return !1;
697
- const t = i.get(G), r = i.get(z).getCurrentUniverDocInstance();
697
+ const t = i.get(j), r = i.get(z).getCurrentUniverDocInstance();
698
698
  if (r == null)
699
699
  return !1;
700
700
  const { drawings: s, dist: o, unitId: c } = e, d = $.getInstance(), a = [], { drawings: l = {} } = r.getSnapshot();
701
701
  for (const h of s) {
702
702
  const { drawingId: f } = h;
703
- for (const [p, v] of Object.entries(o)) {
704
- const w = l[f][p];
705
- if (w !== v) {
706
- const y = d.replaceOp(["drawings", f, p], w, v);
707
- a.push(y);
703
+ for (const [v, p] of Object.entries(o)) {
704
+ const w = l[f][v];
705
+ if (w !== p) {
706
+ const O = d.replaceOp(["drawings", f, v], w, p);
707
+ a.push(O);
708
708
  }
709
709
  }
710
710
  }
@@ -718,21 +718,21 @@ const Dn = {
718
718
  };
719
719
  return g.params.actions = a.reduce((h, f) => $.compose(h, f), null), !!t.syncExecuteCommand(g.id, g.params);
720
720
  }
721
- }, On = {
721
+ }, Tn = {
722
722
  id: "doc.command.update-doc-drawing-wrap-text",
723
723
  type: q.COMMAND,
724
724
  handler: (i, e) => {
725
725
  if (e == null)
726
726
  return !1;
727
- const t = i.get(G), r = i.get(z).getCurrentUniverDocInstance();
727
+ const t = i.get(j), r = i.get(z).getCurrentUniverDocInstance();
728
728
  if (r == null)
729
729
  return !1;
730
730
  const { drawings: s, wrapText: o, unitId: c } = e, d = $.getInstance(), a = [], { drawings: l = {} } = r.getSnapshot();
731
731
  for (const h of s) {
732
- const { drawingId: f } = h, p = l[f].wrapText;
733
- if (p !== o) {
734
- const v = d.replaceOp(["drawings", f, "wrapText"], p, o);
735
- a.push(v);
732
+ const { drawingId: f } = h, v = l[f].wrapText;
733
+ if (v !== o) {
734
+ const p = d.replaceOp(["drawings", f, "wrapText"], v, o);
735
+ a.push(p);
736
736
  }
737
737
  }
738
738
  const g = {
@@ -745,24 +745,24 @@ const Dn = {
745
745
  };
746
746
  return g.params.actions = a.reduce((h, f) => $.compose(h, f), null), !!t.syncExecuteCommand(g.id, g.params);
747
747
  }
748
- }, Ye = {
748
+ }, Ke = {
749
749
  id: "doc.command.update-drawing-doc-transform",
750
750
  type: q.COMMAND,
751
751
  handler: (i, e) => {
752
752
  if (e == null)
753
753
  return !1;
754
- const t = i.get(G), n = i.get(z), s = i.get(Q).getRenderById(e.unitId), o = s == null ? void 0 : s.scene;
754
+ const t = i.get(j), n = i.get(z), s = i.get(Q).getRenderById(e.unitId), o = s == null ? void 0 : s.scene;
755
755
  if (o == null)
756
756
  return !1;
757
757
  const c = o.getTransformerByCreate(), d = n.getCurrentUniverDocInstance();
758
758
  if (d == null)
759
759
  return !1;
760
760
  const { drawings: a, unitId: l } = e, g = $.getInstance(), u = [], { drawings: h = {} } = d.getSnapshot();
761
- for (const v of a) {
762
- const { drawingId: w, key: y, value: D } = v, O = h[w].docTransform[y];
763
- if (!Ce.diffValue(O, D)) {
764
- const C = g.replaceOp(["drawings", w, "docTransform", y], O, D);
765
- u.push(C);
761
+ for (const p of a) {
762
+ const { drawingId: w, key: O, value: D } = p, y = h[w].docTransform[O];
763
+ if (!be.diffValue(y, D)) {
764
+ const x = g.replaceOp(["drawings", w, "docTransform", O], y, D);
765
+ u.push(x);
766
766
  }
767
767
  }
768
768
  const f = {
@@ -774,38 +774,38 @@ const Dn = {
774
774
  debounce: !0
775
775
  }
776
776
  };
777
- f.params.actions = u.reduce((v, w) => $.compose(v, w), null);
778
- const p = t.syncExecuteCommand(f.id, f.params);
779
- return c.refreshControls(), !!p;
777
+ f.params.actions = u.reduce((p, w) => $.compose(p, w), null);
778
+ const v = t.syncExecuteCommand(f.id, f.params);
779
+ return c.refreshControls(), !!v;
780
780
  }
781
- }, Tn = {
781
+ }, Mn = {
782
782
  id: "doc.command.move-inline-drawing",
783
783
  type: q.COMMAND,
784
784
  handler: (i, e) => {
785
785
  var U, N;
786
786
  if (e == null)
787
787
  return !1;
788
- const t = i.get(Q), n = (U = t.getRenderById(e.unitId)) == null ? void 0 : U.with(xe), r = i.get(ht), s = t.getRenderById(e.unitId), o = s == null ? void 0 : s.scene, c = s == null ? void 0 : s.with(te).getSkeleton();
788
+ const t = i.get(Q), n = (U = t.getRenderById(e.unitId)) == null ? void 0 : U.with(xe), r = i.get(ft), s = t.getRenderById(e.unitId), o = s == null ? void 0 : s.scene, c = s == null ? void 0 : s.with(te).getSkeleton();
789
789
  if (o == null || n == null)
790
790
  return !1;
791
- const d = o.getTransformerByCreate(), a = i.get(G), g = i.get(z).getCurrentUniverDocInstance();
791
+ const d = o.getTransformerByCreate(), a = i.get(j), g = i.get(z).getCurrentUniverDocInstance();
792
792
  if (g == null)
793
793
  return !1;
794
- const { drawing: u, unitId: h, offset: f, segmentId: p, segmentPage: v, needRefreshDrawings: w } = e;
794
+ const { drawing: u, unitId: h, offset: f, segmentId: v, segmentPage: p, needRefreshDrawings: w } = e;
795
795
  if (w)
796
796
  return r.refreshDrawings(c), d.refreshControls(), !0;
797
- const y = [], { drawingId: D } = u, O = (N = n.getSegment()) != null ? N : "", C = Sn(
798
- p,
799
- O,
797
+ const O = [], { drawingId: D } = u, y = (N = n.getSegment()) != null ? N : "", x = Dn(
800
798
  v,
799
+ y,
800
+ p,
801
801
  f,
802
802
  D,
803
803
  g,
804
804
  n
805
805
  );
806
- if (C == null || C.length === 0)
806
+ if (x == null || x.length === 0)
807
807
  return r.refreshDrawings(c), d.refreshControls(), !1;
808
- y.push(...C);
808
+ O.push(...x);
809
809
  const M = {
810
810
  id: ee.id,
811
811
  params: {
@@ -814,28 +814,28 @@ const Dn = {
814
814
  textRanges: null
815
815
  }
816
816
  };
817
- M.params.actions = y.reduce((I, P) => $.compose(I, P), null);
817
+ M.params.actions = O.reduce((I, P) => $.compose(I, P), null);
818
818
  const E = a.syncExecuteCommand(M.id, M.params);
819
819
  return d.refreshControls(), !!E;
820
820
  }
821
- }, Mn = {
821
+ }, bn = {
822
822
  id: "doc.command.transform-non-inline-drawing",
823
823
  type: q.COMMAND,
824
824
  // eslint-disable-next-line max-lines-per-function
825
825
  handler: (i, e) => {
826
- var A, H;
826
+ var A, G;
827
827
  if (e == null)
828
828
  return !1;
829
829
  const t = i.get(Q), n = (A = t.getRenderById(e.unitId)) == null ? void 0 : A.with(xe), r = t.getRenderById(e.unitId), s = r == null ? void 0 : r.scene;
830
830
  if (s == null || n == null)
831
831
  return !1;
832
- const o = s.getTransformerByCreate(), c = i.get(G), a = i.get(z).getCurrentUniverDocInstance();
832
+ const o = s.getTransformerByCreate(), c = i.get(j), a = i.get(z).getCurrentUniverDocInstance();
833
833
  if (a == null)
834
834
  return !1;
835
- const { drawing: l, unitId: g, offset: u, docTransform: h, segmentId: f, segmentPage: p } = e, v = [], { drawingId: w } = l, y = (H = n.getSegment()) != null ? H : "", D = Sn(
835
+ const { drawing: l, unitId: g, offset: u, docTransform: h, segmentId: f, segmentPage: v } = e, p = [], { drawingId: w } = l, O = (G = n.getSegment()) != null ? G : "", D = Dn(
836
836
  f,
837
- y,
838
- p,
837
+ O,
838
+ v,
839
839
  u,
840
840
  w,
841
841
  a,
@@ -843,23 +843,23 @@ const Dn = {
843
843
  );
844
844
  if (D == null)
845
845
  return !1;
846
- D.length > 0 && v.push(...D);
847
- const O = $.getInstance(), { drawings: C = {} } = a.getSnapshot(), M = C[w].docTransform, { positionH: E, positionV: U, size: N, angle: I } = M;
848
- if (!Ce.diffValue(E, h.positionH)) {
849
- const _ = O.replaceOp(["drawings", w, "docTransform", "positionH"], E, h.positionH);
850
- v.push(_);
846
+ D.length > 0 && p.push(...D);
847
+ const y = $.getInstance(), { drawings: x = {} } = a.getSnapshot(), M = x[w].docTransform, { positionH: E, positionV: U, size: N, angle: I } = M;
848
+ if (!be.diffValue(E, h.positionH)) {
849
+ const _ = y.replaceOp(["drawings", w, "docTransform", "positionH"], E, h.positionH);
850
+ p.push(_);
851
851
  }
852
- if (!Ce.diffValue(U, h.positionV)) {
853
- const _ = O.replaceOp(["drawings", w, "docTransform", "positionV"], U, h.positionV);
854
- v.push(_);
852
+ if (!be.diffValue(U, h.positionV)) {
853
+ const _ = y.replaceOp(["drawings", w, "docTransform", "positionV"], U, h.positionV);
854
+ p.push(_);
855
855
  }
856
- if (!Ce.diffValue(N, h.size)) {
857
- const _ = O.replaceOp(["drawings", w, "docTransform", "size"], N, h.size);
858
- v.push(_);
856
+ if (!be.diffValue(N, h.size)) {
857
+ const _ = y.replaceOp(["drawings", w, "docTransform", "size"], N, h.size);
858
+ p.push(_);
859
859
  }
860
- if (!Ce.diffValue(I, h.angle)) {
861
- const _ = O.replaceOp(["drawings", w, "docTransform", "angle"], I, h.angle);
862
- v.push(_);
860
+ if (!be.diffValue(I, h.angle)) {
861
+ const _ = y.replaceOp(["drawings", w, "docTransform", "angle"], I, h.angle);
862
+ p.push(_);
863
863
  }
864
864
  const P = {
865
865
  id: ee.id,
@@ -870,42 +870,42 @@ const Dn = {
870
870
  debounce: !0
871
871
  }
872
872
  };
873
- P.params.actions = v.reduce((_, S) => $.compose(_, S), null);
874
- const W = c.syncExecuteCommand(P.id, P.params);
875
- return o.refreshControls(), !!W;
873
+ P.params.actions = p.reduce((_, S) => $.compose(_, S), null);
874
+ const H = c.syncExecuteCommand(P.id, P.params);
875
+ return o.refreshControls(), !!H;
876
876
  }
877
- }, Ze = {
877
+ }, Ye = {
878
878
  id: "doc.command.move-drawing",
879
879
  type: q.COMMAND,
880
880
  handler: (i, e) => {
881
- const t = i.get(G), n = i.get(Be), r = i.get(z), s = i.get(Q), { direction: o } = e, c = n.getFocusDrawings();
881
+ const t = i.get(j), n = i.get(Ue), r = i.get(z), s = i.get(Q), { direction: o } = e, c = n.getFocusDrawings();
882
882
  if (c.length === 0)
883
883
  return !1;
884
884
  const d = c[0].unitId, a = s.getRenderById(d), l = a == null ? void 0 : a.scene;
885
885
  if (l == null)
886
886
  return !1;
887
- const g = l.getTransformerByCreate(), u = r.getUniverDocInstance(d), h = c.map((p) => {
887
+ const g = l.getTransformerByCreate(), u = r.getUniverDocInstance(d), h = c.map((v) => {
888
888
  var M, E, U, N, I;
889
- const { drawingId: v } = p, w = (M = u == null ? void 0 : u.getSnapshot().drawings) == null ? void 0 : M[v];
890
- if (w == null || w.layoutType === F.INLINE)
889
+ const { drawingId: p } = v, w = (M = u == null ? void 0 : u.getSnapshot().drawings) == null ? void 0 : M[p];
890
+ if (w == null || w.layoutType === k.INLINE)
891
891
  return null;
892
- const { positionH: y, positionV: D } = w.docTransform, O = { ...y }, C = { ...D };
893
- return o === he.UP ? C.posOffset = ((E = C.posOffset) != null ? E : 0) - 2 : o === he.DOWN ? C.posOffset = ((U = C.posOffset) != null ? U : 0) + 2 : o === he.LEFT ? O.posOffset = ((N = O.posOffset) != null ? N : 0) - 2 : o === he.RIGHT && (O.posOffset = ((I = O.posOffset) != null ? I : 0) + 2), {
894
- drawingId: v,
895
- key: o === he.UP || o === he.DOWN ? "positionV" : "positionH",
896
- value: o === he.UP || o === he.DOWN ? C : O
892
+ const { positionH: O, positionV: D } = w.docTransform, y = { ...O }, x = { ...D };
893
+ return o === fe.UP ? x.posOffset = ((E = x.posOffset) != null ? E : 0) - 2 : o === fe.DOWN ? x.posOffset = ((U = x.posOffset) != null ? U : 0) + 2 : o === fe.LEFT ? y.posOffset = ((N = y.posOffset) != null ? N : 0) - 2 : o === fe.RIGHT && (y.posOffset = ((I = y.posOffset) != null ? I : 0) + 2), {
894
+ drawingId: p,
895
+ key: o === fe.UP || o === fe.DOWN ? "positionV" : "positionH",
896
+ value: o === fe.UP || o === fe.DOWN ? x : y
897
897
  };
898
- }).filter((p) => p != null);
898
+ }).filter((v) => v != null);
899
899
  if (h.length === 0)
900
900
  return !1;
901
- const f = t.syncExecuteCommand(Ye.id, {
901
+ const f = t.syncExecuteCommand(Ke.id, {
902
902
  unitId: d,
903
903
  subUnitId: d,
904
904
  drawings: h
905
905
  });
906
906
  return g.refreshControls(), !!f;
907
907
  }
908
- }, Ji = {
908
+ }, er = {
909
909
  id: "doc.operation.clear-drawing-transformer",
910
910
  type: q.MUTATION,
911
911
  handler: (i, e) => {
@@ -915,16 +915,16 @@ const Dn = {
915
915
  (s = (r = t.getRenderById(n)) == null ? void 0 : r.scene.getTransformer()) == null || s.debounceRefreshControls();
916
916
  }), !0;
917
917
  }
918
- }, bn = "COMPONENT_DOC_DRAWING_PANEL", Cn = {
918
+ }, xn = "COMPONENT_DOC_DRAWING_PANEL", Cn = {
919
919
  id: "sidebar.operation.doc-image",
920
920
  type: q.COMMAND,
921
921
  handler: async (i, e) => {
922
- const t = i.get(Si), n = i.get(ft), r = i.get(ve);
922
+ const t = i.get(Di), n = i.get(gt), r = i.get(me);
923
923
  switch (e.value) {
924
924
  case "open":
925
925
  t.open({
926
926
  header: { title: n.t("docImage.panel.title") },
927
- children: { label: bn },
927
+ children: { label: xn },
928
928
  onClose: () => {
929
929
  r.focusDrawing(null);
930
930
  },
@@ -938,15 +938,15 @@ const Dn = {
938
938
  }
939
939
  return !0;
940
940
  }
941
- }, xn = {
941
+ }, Nn = {
942
942
  id: "doc.operation.edit-doc-image",
943
943
  type: q.OPERATION,
944
944
  handler: (i, e) => {
945
- const t = i.get(ve), n = i.get(G);
945
+ const t = i.get(me), n = i.get(j);
946
946
  return e == null ? !1 : (t.focusDrawing([e]), n.executeCommand(Cn.id, { value: "open" }), !0);
947
947
  }
948
- }, qt = -1e3, Kt = 1e3, er = (i) => {
949
- const e = we(G), t = we(ft), n = we(ve), r = we(Q), s = we(z), { drawings: o } = i, c = o[0];
948
+ }, qt = -1e3, Kt = 1e3, tr = (i) => {
949
+ const e = ve(j), t = ve(gt), n = ve(me), r = ve(Q), s = ve(z), { drawings: o } = i, c = o[0];
950
950
  if (c == null)
951
951
  return;
952
952
  const { unitId: d } = c, a = s.getUniverDocInstance(d), l = a == null ? void 0 : a.getSnapshot().documentStyle.documentFlavor, g = r.getRenderById(d), u = g == null ? void 0 : g.scene;
@@ -961,31 +961,31 @@ const Dn = {
961
961
  }, {
962
962
  label: t.t("image-position.margin"),
963
963
  value: String(J.MARGIN)
964
- }], p = [{
964
+ }], v = [{
965
965
  label: t.t("image-position.line"),
966
- value: String(j.LINE),
966
+ value: String(W.LINE),
967
967
  disabled: l === pt.MODERN
968
968
  }, {
969
969
  label: t.t("image-position.page"),
970
- value: String(j.PAGE),
970
+ value: String(W.PAGE),
971
971
  disabled: l === pt.MODERN
972
972
  }, {
973
973
  label: t.t("image-position.margin"),
974
- value: String(j.MARGIN),
974
+ value: String(W.MARGIN),
975
975
  disabled: l === pt.MODERN
976
976
  }, {
977
977
  label: t.t("image-position.paragraph"),
978
- value: String(j.PARAGRAPH)
979
- }], [v, w] = re(!0), [y, D] = re({
978
+ value: String(W.PARAGRAPH)
979
+ }], [p, w] = re(!0), [O, D] = re({
980
980
  relativeFrom: J.PAGE,
981
981
  posOffset: 0
982
- }), [O, C] = re({
983
- relativeFrom: j.PAGE,
982
+ }), [y, x] = re({
983
+ relativeFrom: W.PAGE,
984
984
  posOffset: 0
985
985
  }), [M, E] = re(!0), [U, N] = re(!0);
986
- function I(S, x) {
986
+ function I(S, C) {
987
987
  var b;
988
- S === "positionH" ? D(x) : C(x);
988
+ S === "positionH" ? D(C) : x(C);
989
989
  const T = n.getFocusDrawings();
990
990
  if (T.length === 0)
991
991
  return;
@@ -994,75 +994,75 @@ const Dn = {
994
994
  subUnitId: R.subUnitId,
995
995
  drawingId: R.drawingId
996
996
  }));
997
- e.executeCommand(Ye.id, {
997
+ e.executeCommand(Ke.id, {
998
998
  unitId: T[0].unitId,
999
999
  subUnitId: T[0].unitId,
1000
1000
  drawings: L.map((R) => ({
1001
1001
  drawingId: R.drawingId,
1002
1002
  key: S,
1003
- value: x
1003
+ value: C
1004
1004
  }))
1005
1005
  });
1006
1006
  const B = (b = r.getRenderById(d)) == null ? void 0 : b.with(xe);
1007
1007
  B && B.blur(), h.refreshControls();
1008
1008
  }
1009
1009
  function P(S) {
1010
- var ie, Se, De;
1011
- const x = y.relativeFrom, T = y.posOffset, L = Number(S);
1012
- if (x === L)
1010
+ var ie, _e, Se;
1011
+ const C = O.relativeFrom, T = O.posOffset, L = Number(S);
1012
+ if (C === L)
1013
1013
  return;
1014
1014
  const B = n.getFocusDrawings();
1015
1015
  if (B.length === 0)
1016
1016
  return;
1017
1017
  const b = B[0].drawingId, R = B[0].unitId;
1018
- let V = null, k = 0;
1018
+ let V = null, F = 0;
1019
1019
  const K = (ie = r.getRenderById(R)) == null ? void 0 : ie.with(te).getSkeleton(), oe = K == null ? void 0 : K.getSkeletonData();
1020
1020
  if (oe == null)
1021
1021
  return;
1022
- const { pages: ke, skeHeaders: Ne, skeFooters: Ge } = oe;
1023
- for (const ce of ke) {
1024
- const { marginLeft: Oe, skeDrawings: Te, headerId: Ee, footerId: Re, pageWidth: Me } = ce;
1025
- if (Te.has(b)) {
1026
- V = Te.get(b), k = Oe;
1022
+ const { pages: Be, skeHeaders: Ce, skeFooters: Ge } = oe;
1023
+ for (const ce of Be) {
1024
+ const { marginLeft: Oe, skeDrawings: ye, headerId: Ne, footerId: Ee, pageWidth: Te } = ce;
1025
+ if (ye.has(b)) {
1026
+ V = ye.get(b), F = Oe;
1027
1027
  break;
1028
1028
  }
1029
- const de = (Se = Ne.get(Ee)) == null ? void 0 : Se.get(Me);
1029
+ const de = (_e = Ce.get(Ne)) == null ? void 0 : _e.get(Te);
1030
1030
  if (de != null && de.skeDrawings.has(b)) {
1031
- V = de == null ? void 0 : de.skeDrawings.get(b), k = Oe;
1031
+ V = de == null ? void 0 : de.skeDrawings.get(b), F = Oe;
1032
1032
  break;
1033
1033
  }
1034
- const le = (De = Ge.get(Re)) == null ? void 0 : De.get(Me);
1034
+ const le = (Se = Ge.get(Ee)) == null ? void 0 : Se.get(Te);
1035
1035
  if (le != null && le.skeDrawings.has(b)) {
1036
- V = le == null ? void 0 : le.skeDrawings.get(b), k = Oe;
1036
+ V = le == null ? void 0 : le.skeDrawings.get(b), F = Oe;
1037
1037
  break;
1038
1038
  }
1039
1039
  }
1040
1040
  if (V == null)
1041
1041
  return;
1042
1042
  let ae = 0;
1043
- x === J.COLUMN ? ae -= V.columnLeft : x === J.MARGIN && (ae -= k), L === J.COLUMN ? ae += V.columnLeft : L === J.MARGIN ? ae += k : J.PAGE;
1043
+ C === J.COLUMN ? ae -= V.columnLeft : C === J.MARGIN && (ae -= F), L === J.COLUMN ? ae += V.columnLeft : L === J.MARGIN ? ae += F : J.PAGE;
1044
1044
  const ne = {
1045
1045
  relativeFrom: L,
1046
1046
  posOffset: (T != null ? T : 0) - ae
1047
1047
  };
1048
1048
  I("positionH", ne);
1049
1049
  }
1050
- function W(S) {
1051
- var Te, Ee, Re, Me, de, le;
1052
- const x = O.relativeFrom, T = O.posOffset, L = Number(S);
1053
- if (x === L)
1050
+ function H(S) {
1051
+ var ye, Ne, Ee, Te, de, le;
1052
+ const C = y.relativeFrom, T = y.posOffset, L = Number(S);
1053
+ if (C === L)
1054
1054
  return;
1055
1055
  const B = n.getFocusDrawings();
1056
1056
  if (B.length === 0)
1057
1057
  return;
1058
- const { drawingId: b, unitId: R } = B[0], V = s.getUniverDocInstance(R), k = (Te = r.getRenderById(R)) == null ? void 0 : Te.with(te).getSkeleton(), K = (Ee = r.getRenderById(R)) == null ? void 0 : Ee.with(xe), oe = K == null ? void 0 : K.getSegment(), ke = K == null ? void 0 : K.getSegmentPage(), Ne = (Me = (Re = V == null ? void 0 : V.getSelfOrHeaderFooterModel(oe).getBody()) == null ? void 0 : Re.customBlocks) == null ? void 0 : Me.find((Ae) => Ae.blockId === b);
1059
- if (Ne == null || k == null || K == null)
1058
+ const { drawingId: b, unitId: R } = B[0], V = s.getUniverDocInstance(R), F = (ye = r.getRenderById(R)) == null ? void 0 : ye.with(te).getSkeleton(), K = (Ne = r.getRenderById(R)) == null ? void 0 : Ne.with(xe), oe = K == null ? void 0 : K.getSegment(), Be = K == null ? void 0 : K.getSegmentPage(), Ce = (Te = (Ee = V == null ? void 0 : V.getSelfOrHeaderFooterModel(oe).getBody()) == null ? void 0 : Ee.customBlocks) == null ? void 0 : Te.find((Re) => Re.blockId === b);
1059
+ if (Ce == null || F == null || K == null)
1060
1060
  return;
1061
- const { startIndex: Ge } = Ne, ae = k.findNodeByCharIndex(Ge, oe, ke), ne = (de = ae == null ? void 0 : ae.parent) == null ? void 0 : de.parent, ie = ne == null ? void 0 : ne.parent, Se = ie == null ? void 0 : ie.lines.find((Ae) => Ae.paragraphIndex === (ne == null ? void 0 : ne.paragraphIndex) && Ae.paragraphStart), De = (le = ie == null ? void 0 : ie.parent) == null ? void 0 : le.parent;
1062
- if (ae == null || ne == null || Se == null || ie == null || De == null)
1061
+ const { startIndex: Ge } = Ce, ae = F.findNodeByCharIndex(Ge, oe, Be), ne = (de = ae == null ? void 0 : ae.parent) == null ? void 0 : de.parent, ie = ne == null ? void 0 : ne.parent, _e = ie == null ? void 0 : ie.lines.find((Re) => Re.paragraphIndex === (ne == null ? void 0 : ne.paragraphIndex) && Re.paragraphStart), Se = (le = ie == null ? void 0 : ie.parent) == null ? void 0 : le.parent;
1062
+ if (ae == null || ne == null || _e == null || ie == null || Se == null)
1063
1063
  return;
1064
1064
  let ce = 0;
1065
- x === j.PARAGRAPH ? ce -= Se.top : x === j.LINE ? ce -= ne.top : x === j.PAGE && (ce += De.marginTop), L === j.PARAGRAPH ? ce += Se.top : L === j.LINE ? ce += ne.top : L === j.PAGE && (ce -= De.marginTop);
1065
+ C === W.PARAGRAPH ? ce -= _e.top : C === W.LINE ? ce -= ne.top : C === W.PAGE && (ce += Se.marginTop), L === W.PARAGRAPH ? ce += _e.top : L === W.LINE ? ce += ne.top : L === W.PAGE && (ce -= Se.marginTop);
1066
1066
  const Oe = {
1067
1067
  relativeFrom: L,
1068
1068
  posOffset: (T != null ? T : 0) - ce
@@ -1071,98 +1071,88 @@ const Dn = {
1071
1071
  }
1072
1072
  function A(S) {
1073
1073
  var R;
1074
- const x = a == null ? void 0 : a.getSnapshot(), T = (R = x == null ? void 0 : x.drawings) == null ? void 0 : R[S.drawingId];
1074
+ const C = a == null ? void 0 : a.getSnapshot(), T = (R = C == null ? void 0 : C.drawings) == null ? void 0 : R[S.drawingId];
1075
1075
  if (T == null)
1076
1076
  return;
1077
1077
  const { layoutType: L } = T, {
1078
1078
  positionH: B,
1079
1079
  positionV: b
1080
1080
  } = T.docTransform;
1081
- D(B), C(b), w(L === F.INLINE), E(b.relativeFrom === j.PARAGRAPH || b.relativeFrom === j.LINE);
1081
+ D(B), x(b), w(L === k.INLINE), E(b.relativeFrom === W.PARAGRAPH || b.relativeFrom === W.LINE);
1082
1082
  }
1083
- function H() {
1083
+ function G() {
1084
1084
  const S = n.getFocusDrawings();
1085
1085
  S.length !== 0 && A(S[0]);
1086
1086
  }
1087
1087
  function _(S) {
1088
- E(S), W(String(S ? j.PARAGRAPH : j.PAGE));
1088
+ E(S), H(String(S ? W.PARAGRAPH : W.PAGE));
1089
1089
  }
1090
1090
  return Mt(() => {
1091
- H();
1091
+ G();
1092
1092
  const S = n.focus$.subscribe((T) => {
1093
1093
  if (T.length === 0) {
1094
1094
  N(!1);
1095
1095
  return;
1096
1096
  }
1097
1097
  N(!0), A(T[0]);
1098
- }), x = e.onCommandExecuted(async (T) => {
1099
- T.id === ee.id && H();
1098
+ }), C = e.onCommandExecuted(async (T) => {
1099
+ T.id === ee.id && G();
1100
1100
  });
1101
1101
  return () => {
1102
- S.unsubscribe(), x.dispose();
1102
+ S.unsubscribe(), C.dispose();
1103
1103
  };
1104
1104
  }, []), /* @__PURE__ */ X(
1105
1105
  "div",
1106
1106
  {
1107
- className: `
1108
- univer-relative univer-mt-5 univer-w-full univer-border-t univer-border-solid univer-border-gray-200
1109
- `,
1110
- style: { display: U ? "block" : "none" },
1107
+ className: _t("univer-relative univer-mt-5 univer-w-full", ln, {
1108
+ "univer-hidden": !U
1109
+ }),
1111
1110
  children: [
1111
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-gray-400", children: /* @__PURE__ */ m("div", { children: t.t("image-position.title") }) }) }),
1112
1112
  /* @__PURE__ */ m(
1113
1113
  "div",
1114
1114
  {
1115
- className: `
1116
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1117
- `,
1118
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-gray-400", children: /* @__PURE__ */ m("div", { children: t.t("image-position.title") }) })
1119
- }
1120
- ),
1121
- /* @__PURE__ */ m(
1122
- "div",
1123
- {
1124
- className: `
1125
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1126
- `,
1127
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-black", children: /* @__PURE__ */ m("div", { children: t.t("image-position.horizontal") }) })
1115
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1116
+ children: /* @__PURE__ */ m(
1117
+ "div",
1118
+ {
1119
+ className: `
1120
+ univer-flex univer-items-center univer-gap-1 univer-text-gray-900
1121
+ dark:univer-text-white
1122
+ `,
1123
+ children: /* @__PURE__ */ m("div", { children: t.t("image-position.horizontal") })
1124
+ }
1125
+ )
1128
1126
  }
1129
1127
  ),
1130
1128
  /* @__PURE__ */ X(
1131
1129
  "div",
1132
1130
  {
1133
- className: `
1134
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1135
- `,
1131
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1136
1132
  children: [
1137
1133
  /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-gray-400", children: /* @__PURE__ */ X("label", { children: [
1138
1134
  /* @__PURE__ */ m(
1139
1135
  "div",
1140
1136
  {
1141
- className: `
1142
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1143
- univer-justify-start
1144
- `,
1137
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1145
1138
  children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.absolutePosition") })
1146
1139
  }
1147
1140
  ),
1148
1141
  /* @__PURE__ */ m(
1149
1142
  "div",
1150
1143
  {
1151
- className: `
1152
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1153
- univer-justify-start
1154
- `,
1144
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1155
1145
  children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1156
- je,
1146
+ ke,
1157
1147
  {
1158
1148
  min: qt,
1159
1149
  max: Kt,
1160
1150
  precision: 1,
1161
- disabled: v,
1162
- value: y.posOffset,
1151
+ disabled: p,
1152
+ value: O.posOffset,
1163
1153
  onChange: (S) => {
1164
1154
  I("positionH", {
1165
- relativeFrom: y.relativeFrom,
1155
+ relativeFrom: O.relativeFrom,
1166
1156
  posOffset: S
1167
1157
  });
1168
1158
  }
@@ -1172,28 +1162,16 @@ const Dn = {
1172
1162
  )
1173
1163
  ] }) }),
1174
1164
  /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
1165
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.toTheRightOf") }) }),
1175
1166
  /* @__PURE__ */ m(
1176
1167
  "div",
1177
1168
  {
1178
- className: `
1179
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1180
- univer-justify-start
1181
- `,
1182
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.toTheRightOf") })
1183
- }
1184
- ),
1185
- /* @__PURE__ */ m(
1186
- "div",
1187
- {
1188
- className: `
1189
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1190
- univer-justify-start
1191
- `,
1169
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1192
1170
  children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1193
- Ht,
1171
+ Gt,
1194
1172
  {
1195
- value: String(y.relativeFrom),
1196
- disabled: v,
1173
+ value: String(O.relativeFrom),
1174
+ disabled: p,
1197
1175
  options: f,
1198
1176
  onChange: P
1199
1177
  }
@@ -1204,122 +1182,89 @@ const Dn = {
1204
1182
  ]
1205
1183
  }
1206
1184
  ),
1207
- /* @__PURE__ */ m(
1185
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
1208
1186
  "div",
1209
1187
  {
1210
1188
  className: `
1211
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1212
- `,
1213
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-black", children: /* @__PURE__ */ m("div", { children: t.t("image-position.vertical") }) })
1189
+ univer-flex univer-items-center univer-gap-1 univer-text-gray-900
1190
+ dark:univer-text-white
1191
+ `,
1192
+ children: /* @__PURE__ */ m("div", { children: t.t("image-position.vertical") })
1214
1193
  }
1215
- ),
1216
- /* @__PURE__ */ X(
1217
- "div",
1218
- {
1219
- className: `
1220
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1221
- `,
1222
- children: [
1223
- /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
1224
- /* @__PURE__ */ m(
1225
- "div",
1194
+ ) }),
1195
+ /* @__PURE__ */ X("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: [
1196
+ /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
1197
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.absolutePosition") }) }),
1198
+ /* @__PURE__ */ m(
1199
+ "div",
1200
+ {
1201
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1202
+ children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1203
+ ke,
1226
1204
  {
1227
- className: `
1228
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1229
- univer-justify-start
1230
- `,
1231
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.absolutePosition") })
1205
+ min: qt,
1206
+ max: Kt,
1207
+ precision: 1,
1208
+ disabled: p,
1209
+ value: y.posOffset,
1210
+ onChange: (S) => {
1211
+ I("positionV", {
1212
+ relativeFrom: y.relativeFrom,
1213
+ posOffset: S
1214
+ });
1215
+ }
1232
1216
  }
1233
- ),
1234
- /* @__PURE__ */ m(
1235
- "div",
1236
- {
1237
- className: `
1238
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1239
- univer-justify-start
1240
- `,
1241
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1242
- je,
1243
- {
1244
- min: qt,
1245
- max: Kt,
1246
- precision: 1,
1247
- disabled: v,
1248
- value: O.posOffset,
1249
- onChange: (S) => {
1250
- I("positionV", {
1251
- relativeFrom: O.relativeFrom,
1252
- posOffset: S
1253
- });
1254
- }
1255
- }
1256
- ) })
1257
- }
1258
- )
1259
- ] }) }),
1260
- /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
1261
- /* @__PURE__ */ m(
1262
- "div",
1263
- {
1264
- className: `
1265
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1266
- univer-justify-start
1267
- `,
1268
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.bellow") })
1269
- }
1270
- ),
1271
- /* @__PURE__ */ m(
1272
- "div",
1217
+ ) })
1218
+ }
1219
+ )
1220
+ ] }) }),
1221
+ /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
1222
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.bellow") }) }),
1223
+ /* @__PURE__ */ m(
1224
+ "div",
1225
+ {
1226
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1227
+ children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1228
+ Gt,
1273
1229
  {
1274
- className: `
1275
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1276
- univer-justify-start
1277
- `,
1278
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1279
- Ht,
1280
- {
1281
- disabled: v,
1282
- value: String(O.relativeFrom),
1283
- options: p,
1284
- onChange: W
1285
- }
1286
- ) })
1230
+ disabled: p,
1231
+ value: String(y.relativeFrom),
1232
+ options: v,
1233
+ onChange: H
1287
1234
  }
1288
- )
1289
- ] }) })
1290
- ]
1291
- }
1292
- ),
1293
- /* @__PURE__ */ m(
1235
+ ) })
1236
+ }
1237
+ )
1238
+ ] }) })
1239
+ ] }),
1240
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
1294
1241
  "div",
1295
1242
  {
1296
1243
  className: `
1297
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1298
- `,
1299
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-black", children: /* @__PURE__ */ m("div", { children: t.t("image-position.options") }) })
1244
+ univer-flex univer-items-center univer-gap-1 univer-text-gray-900
1245
+ dark:univer-text-white
1246
+ `,
1247
+ children: /* @__PURE__ */ m("div", { children: t.t("image-position.options") })
1300
1248
  }
1301
- ),
1249
+ ) }),
1302
1250
  /* @__PURE__ */ m(
1303
1251
  "div",
1304
1252
  {
1305
- className: `
1306
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1307
- `,
1308
- style: { marginBottom: "50px" },
1309
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(Ui, { disabled: v, checked: M, onChange: _, children: t.t("image-position.moveObjectWithText") }) })
1253
+ className: "univer-relative univer-mb-12 univer-mt-2.5 univer-flex univer-h-full",
1254
+ children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(Bi, { disabled: p, checked: M, onChange: _, children: t.t("image-position.moveObjectWithText") }) })
1310
1255
  }
1311
1256
  )
1312
1257
  ]
1313
1258
  }
1314
1259
  );
1315
- }, et = 0, tt = 100, tr = (i) => {
1316
- const e = we(G), t = we(ft), n = we(ve), r = we(Q), s = we(z), { drawings: o } = i, c = o[0];
1260
+ }, Je = 0, et = 100, nr = (i) => {
1261
+ const e = ve(j), t = ve(gt), n = ve(me), r = ve(Q), s = ve(z), { drawings: o } = i, c = o[0];
1317
1262
  if (c == null)
1318
1263
  return null;
1319
1264
  const { unitId: d } = c, a = s.getUniverDocInstance(d), l = r.getRenderById(d);
1320
1265
  if ((l == null ? void 0 : l.scene) == null)
1321
1266
  return null;
1322
- const [u, h] = re(!0), [f, p] = re(!0), [v, w] = re(!0), [y, D] = re(fe.INLINE), [O, C] = re(""), [M, E] = re({
1267
+ const [u, h] = re(!0), [f, v] = re(!0), [p, w] = re(!0), [O, D] = re(ge.INLINE), [y, x] = re(""), [M, E] = re({
1323
1268
  distT: 0,
1324
1269
  distL: 0,
1325
1270
  distB: 0,
@@ -1330,40 +1275,40 @@ const Dn = {
1330
1275
  const S = n.getFocusDrawings();
1331
1276
  if (S.length === 0)
1332
1277
  return;
1333
- const { unitId: x, subUnitId: T } = S[0], L = S.map(({ unitId: B, subUnitId: b, drawingId: R }) => ({
1278
+ const { unitId: C, subUnitId: T } = S[0], L = S.map(({ unitId: B, subUnitId: b, drawingId: R }) => ({
1334
1279
  unitId: B,
1335
1280
  subUnitId: b,
1336
1281
  drawingId: R
1337
1282
  }));
1338
- e.executeCommand(Dn.id, {
1339
- unitId: x,
1283
+ e.executeCommand(On.id, {
1284
+ unitId: C,
1340
1285
  subUnitId: T,
1341
1286
  drawings: L,
1342
1287
  wrappingStyle: _
1343
1288
  });
1344
1289
  }
1345
1290
  function P(_) {
1346
- C(_);
1291
+ x(_);
1347
1292
  const S = n.getFocusDrawings();
1348
1293
  if (S.length === 0)
1349
1294
  return;
1350
- const x = S.map((T) => ({
1295
+ const C = S.map((T) => ({
1351
1296
  unitId: T.unitId,
1352
1297
  subUnitId: T.subUnitId,
1353
1298
  drawingId: T.drawingId
1354
1299
  }));
1355
- e.executeCommand(On.id, {
1300
+ e.executeCommand(Tn.id, {
1356
1301
  unitId: S[0].unitId,
1357
1302
  subUnitId: S[0].unitId,
1358
- drawings: x,
1303
+ drawings: C,
1359
1304
  wrapText: _
1360
1305
  });
1361
1306
  }
1362
- function W(_, S) {
1307
+ function H(_, S) {
1363
1308
  if (_ == null)
1364
1309
  return;
1365
- const x = { ...M, [S]: _ };
1366
- E(x);
1310
+ const C = { ...M, [S]: _ };
1311
+ E(C);
1367
1312
  const T = n.getFocusDrawings();
1368
1313
  if (T.length === 0)
1369
1314
  return;
@@ -1383,39 +1328,39 @@ const Dn = {
1383
1328
  }
1384
1329
  function A() {
1385
1330
  const _ = n.getFocusDrawings();
1386
- _.length !== 0 && H(_[0]);
1331
+ _.length !== 0 && G(_[0]);
1387
1332
  }
1388
- function H(_) {
1333
+ function G(_) {
1389
1334
  var K, oe;
1390
1335
  const S = (oe = (K = a == null ? void 0 : a.getSnapshot()) == null ? void 0 : K.drawings) == null ? void 0 : oe[_.drawingId];
1391
1336
  if (S == null)
1392
1337
  return;
1393
1338
  const {
1394
- distT: x = 0,
1339
+ distT: C = 0,
1395
1340
  distL: T = 0,
1396
1341
  distB: L = 0,
1397
1342
  distR: B = 0,
1398
- layoutType: b = F.INLINE,
1343
+ layoutType: b = k.INLINE,
1399
1344
  behindDoc: R = se.FALSE,
1400
- wrapText: V = qe.BOTH_SIDES
1345
+ wrapText: V = Xe.BOTH_SIDES
1401
1346
  } = S;
1402
1347
  if (E({
1403
- distT: x,
1348
+ distT: C,
1404
1349
  distL: T,
1405
1350
  distB: L,
1406
1351
  distR: B
1407
- }), C(V), h(b !== F.WRAP_SQUARE), b === F.WRAP_NONE || b === F.INLINE ? p(!0) : p(!1), b === F.WRAP_NONE || b === F.INLINE || b === F.WRAP_TOP_AND_BOTTOM ? w(!0) : w(!1), b === F.WRAP_NONE)
1408
- R === se.TRUE ? D(fe.BEHIND_TEXT) : D(fe.IN_FRONT_OF_TEXT);
1352
+ }), x(V), h(b !== k.WRAP_SQUARE), b === k.WRAP_NONE || b === k.INLINE ? v(!0) : v(!1), b === k.WRAP_NONE || b === k.INLINE || b === k.WRAP_TOP_AND_BOTTOM ? w(!0) : w(!1), b === k.WRAP_NONE)
1353
+ R === se.TRUE ? D(ge.BEHIND_TEXT) : D(ge.IN_FRONT_OF_TEXT);
1409
1354
  else
1410
1355
  switch (b) {
1411
- case F.INLINE:
1412
- D(fe.INLINE);
1356
+ case k.INLINE:
1357
+ D(ge.INLINE);
1413
1358
  break;
1414
- case F.WRAP_SQUARE:
1415
- D(fe.WRAP_SQUARE);
1359
+ case k.WRAP_SQUARE:
1360
+ D(ge.WRAP_SQUARE);
1416
1361
  break;
1417
- case F.WRAP_TOP_AND_BOTTOM:
1418
- D(fe.WRAP_TOP_AND_BOTTOM);
1362
+ case k.WRAP_TOP_AND_BOTTOM:
1363
+ D(ge.WRAP_TOP_AND_BOTTOM);
1419
1364
  break;
1420
1365
  default:
1421
1366
  throw new Error(`Unsupported layout type: ${b}`);
@@ -1423,14 +1368,14 @@ const Dn = {
1423
1368
  }
1424
1369
  return Mt(() => {
1425
1370
  A();
1426
- const _ = n.focus$.subscribe((x) => {
1427
- if (x.length === 0) {
1371
+ const _ = n.focus$.subscribe((C) => {
1372
+ if (C.length === 0) {
1428
1373
  N(!1);
1429
1374
  return;
1430
1375
  }
1431
- N(!0), H(x[0]);
1432
- }), S = e.onCommandExecuted(async (x) => {
1433
- x.id === ee.id && A();
1376
+ N(!0), G(C[0]);
1377
+ }), S = e.onCommandExecuted(async (C) => {
1378
+ C.id === ee.id && A();
1434
1379
  });
1435
1380
  return () => {
1436
1381
  _.unsubscribe(), S.dispose();
@@ -1438,149 +1383,110 @@ const Dn = {
1438
1383
  }, []), /* @__PURE__ */ X(
1439
1384
  "div",
1440
1385
  {
1441
- className: `
1442
- univer-relative univer-mt-5 univer-w-full univer-border-t univer-border-solid univer-border-gray-200
1443
- `,
1444
- style: { display: U ? "block" : "none" },
1386
+ className: _t("univer-relative univer-mt-5 univer-w-full", ln, {
1387
+ "univer-hidden": !U
1388
+ }),
1445
1389
  children: [
1446
- /* @__PURE__ */ m(
1390
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
1447
1391
  "div",
1448
1392
  {
1449
1393
  className: `
1450
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1451
- `,
1452
- children: /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1 univer-text-gray-600"), children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.title") }) })
1394
+ univer-flex univer-items-center univer-gap-1 univer-text-gray-600
1395
+ dark:univer-text-gray-200
1396
+ `,
1397
+ children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.title") })
1453
1398
  }
1454
- ),
1455
- /* @__PURE__ */ m(
1399
+ ) }),
1400
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
1456
1401
  "div",
1457
1402
  {
1458
1403
  className: `
1459
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1460
- `,
1461
- children: /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1 univer-text-black"), children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.wrappingStyle") }) })
1404
+ univer-flex univer-items-center univer-gap-1 univer-text-gray-900
1405
+ dark:univer-text-white
1406
+ `,
1407
+ children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.wrappingStyle") })
1462
1408
  }
1463
- ),
1464
- /* @__PURE__ */ m(
1465
- "div",
1466
- {
1467
- className: ue(`
1468
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1469
- `),
1470
- children: /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1"), children: /* @__PURE__ */ X(Gt, { value: y, onChange: I, direction: "vertical", children: [
1471
- /* @__PURE__ */ m(be, { value: fe.INLINE, children: t.t("image-text-wrap.inline") }),
1472
- /* @__PURE__ */ m(be, { value: fe.WRAP_SQUARE, children: t.t("image-text-wrap.square") }),
1473
- /* @__PURE__ */ m(be, { value: fe.WRAP_TOP_AND_BOTTOM, children: t.t("image-text-wrap.topAndBottom") }),
1474
- /* @__PURE__ */ m(be, { value: fe.BEHIND_TEXT, children: t.t("image-text-wrap.behindText") }),
1475
- /* @__PURE__ */ m(be, { value: fe.IN_FRONT_OF_TEXT, children: t.t("image-text-wrap.inFrontText") })
1476
- ] }) })
1477
- }
1478
- ),
1479
- /* @__PURE__ */ m(
1409
+ ) }),
1410
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X(jt, { value: O, onChange: I, direction: "vertical", children: [
1411
+ /* @__PURE__ */ m(Me, { value: ge.INLINE, children: t.t("image-text-wrap.inline") }),
1412
+ /* @__PURE__ */ m(Me, { value: ge.WRAP_SQUARE, children: t.t("image-text-wrap.square") }),
1413
+ /* @__PURE__ */ m(Me, { value: ge.WRAP_TOP_AND_BOTTOM, children: t.t("image-text-wrap.topAndBottom") }),
1414
+ /* @__PURE__ */ m(Me, { value: ge.BEHIND_TEXT, children: t.t("image-text-wrap.behindText") }),
1415
+ /* @__PURE__ */ m(Me, { value: ge.IN_FRONT_OF_TEXT, children: t.t("image-text-wrap.inFrontText") })
1416
+ ] }) }) }),
1417
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
1480
1418
  "div",
1481
1419
  {
1482
1420
  className: `
1483
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1484
- `,
1485
- children: /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1 univer-text-black"), children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.wrapText") }) })
1421
+ univer-flex univer-items-center univer-gap-1 univer-text-gray-900
1422
+ dark:univer-text-white
1423
+ `,
1424
+ children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.wrapText") })
1486
1425
  }
1487
- ),
1426
+ ) }),
1488
1427
  /* @__PURE__ */ m(
1489
1428
  "div",
1490
1429
  {
1491
- className: ue(`
1492
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1493
- `),
1494
- children: /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1"), children: /* @__PURE__ */ X(Gt, { disabled: u, value: O, onChange: P, direction: "horizontal", children: [
1495
- /* @__PURE__ */ m(be, { value: qe.BOTH_SIDES, children: t.t("image-text-wrap.bothSide") }),
1496
- /* @__PURE__ */ m(be, { value: qe.LEFT, children: t.t("image-text-wrap.leftOnly") }),
1497
- /* @__PURE__ */ m(be, { value: qe.RIGHT, children: t.t("image-text-wrap.rightOnly") })
1430
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1431
+ children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X(jt, { disabled: u, value: y, onChange: P, direction: "horizontal", children: [
1432
+ /* @__PURE__ */ m(Me, { value: Xe.BOTH_SIDES, children: t.t("image-text-wrap.bothSide") }),
1433
+ /* @__PURE__ */ m(Me, { value: Xe.LEFT, children: t.t("image-text-wrap.leftOnly") }),
1434
+ /* @__PURE__ */ m(Me, { value: Xe.RIGHT, children: t.t("image-text-wrap.rightOnly") })
1498
1435
  ] }) })
1499
1436
  }
1500
1437
  ),
1501
- /* @__PURE__ */ m(
1438
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
1502
1439
  "div",
1503
1440
  {
1504
1441
  className: `
1505
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1506
- `,
1507
- children: /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1 univer-text-black"), children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.distanceFromText") }) })
1442
+ univer-flex univer-items-center univer-gap-1 univer-text-gray-900
1443
+ dark:univer-text-white
1444
+ `,
1445
+ children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.distanceFromText") })
1508
1446
  }
1509
- ),
1447
+ ) }),
1510
1448
  /* @__PURE__ */ X(
1511
1449
  "div",
1512
1450
  {
1513
- className: `
1514
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1515
- `,
1451
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1516
1452
  children: [
1517
- /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1"), children: /* @__PURE__ */ X("label", { children: [
1518
- /* @__PURE__ */ m(
1519
- "div",
1520
- {
1521
- className: `
1522
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1523
- univer-justify-start
1524
- `,
1525
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.top") })
1526
- }
1527
- ),
1528
- /* @__PURE__ */ m(
1529
- "div",
1453
+ /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
1454
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.top") }) }),
1455
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1456
+ ke,
1530
1457
  {
1531
- className: `
1532
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1533
- univer-justify-start
1534
- `,
1535
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1536
- je,
1537
- {
1538
- min: et,
1539
- max: tt,
1540
- disabled: f,
1541
- precision: 1,
1542
- value: M.distT,
1543
- onChange: (_) => {
1544
- W(_, "distT");
1545
- }
1546
- }
1547
- ) })
1458
+ min: Je,
1459
+ max: et,
1460
+ disabled: f,
1461
+ precision: 1,
1462
+ value: M.distT,
1463
+ onChange: (_) => {
1464
+ H(_, "distT");
1465
+ }
1548
1466
  }
1549
- )
1467
+ ) }) })
1550
1468
  ] }) }),
1551
- /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1"), children: /* @__PURE__ */ X("label", { children: [
1469
+ /* @__PURE__ */ m("div", { className: _t("univer-flex univer-items-center univer-gap-1"), children: /* @__PURE__ */ X("label", { children: [
1552
1470
  /* @__PURE__ */ m(
1553
1471
  "div",
1554
1472
  {
1555
- className: `
1556
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1557
- univer-justify-start
1558
- `,
1473
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1559
1474
  children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.left") })
1560
1475
  }
1561
1476
  ),
1562
- /* @__PURE__ */ m(
1563
- "div",
1477
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1478
+ ke,
1564
1479
  {
1565
- className: `
1566
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1567
- univer-justify-start
1568
- `,
1569
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1570
- je,
1571
- {
1572
- min: et,
1573
- max: tt,
1574
- disabled: v,
1575
- precision: 1,
1576
- value: M.distL,
1577
- onChange: (_) => {
1578
- W(_, "distL");
1579
- }
1580
- }
1581
- ) })
1480
+ min: Je,
1481
+ max: et,
1482
+ disabled: p,
1483
+ precision: 1,
1484
+ value: M.distL,
1485
+ onChange: (_) => {
1486
+ H(_, "distL");
1487
+ }
1582
1488
  }
1583
- )
1489
+ ) }) })
1584
1490
  ] }) })
1585
1491
  ]
1586
1492
  }
@@ -1588,77 +1494,39 @@ const Dn = {
1588
1494
  /* @__PURE__ */ X(
1589
1495
  "div",
1590
1496
  {
1591
- className: `
1592
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
1593
- `,
1497
+ className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
1594
1498
  children: [
1595
- /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1"), children: /* @__PURE__ */ X("label", { children: [
1596
- /* @__PURE__ */ m(
1597
- "div",
1598
- {
1599
- className: `
1600
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1601
- univer-justify-start
1602
- `,
1603
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.bottom") })
1604
- }
1605
- ),
1606
- /* @__PURE__ */ m(
1607
- "div",
1499
+ /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
1500
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.bottom") }) }),
1501
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1502
+ ke,
1608
1503
  {
1609
- className: `
1610
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1611
- univer-justify-start
1612
- `,
1613
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1614
- je,
1615
- {
1616
- min: et,
1617
- max: tt,
1618
- disabled: f,
1619
- precision: 1,
1620
- value: M.distB,
1621
- onChange: (_) => {
1622
- W(_, "distB");
1623
- }
1624
- }
1625
- ) })
1504
+ min: Je,
1505
+ max: et,
1506
+ disabled: f,
1507
+ precision: 1,
1508
+ value: M.distB,
1509
+ onChange: (_) => {
1510
+ H(_, "distB");
1511
+ }
1626
1512
  }
1627
- )
1513
+ ) }) })
1628
1514
  ] }) }),
1629
- /* @__PURE__ */ m("div", { className: ue("univer-flex univer-items-center univer-gap-1"), children: /* @__PURE__ */ X("label", { children: [
1630
- /* @__PURE__ */ m(
1631
- "div",
1632
- {
1633
- className: `
1634
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1635
- univer-justify-start
1636
- `,
1637
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.right") })
1638
- }
1639
- ),
1640
- /* @__PURE__ */ m(
1641
- "div",
1515
+ /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
1516
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.right") }) }),
1517
+ /* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1518
+ ke,
1642
1519
  {
1643
- className: `
1644
- univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
1645
- univer-justify-start
1646
- `,
1647
- children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
1648
- je,
1649
- {
1650
- min: et,
1651
- max: tt,
1652
- disabled: v,
1653
- precision: 1,
1654
- value: M.distR,
1655
- onChange: (_) => {
1656
- W(_, "distR");
1657
- }
1658
- }
1659
- ) })
1520
+ min: Je,
1521
+ max: et,
1522
+ disabled: p,
1523
+ precision: 1,
1524
+ value: M.distR,
1525
+ onChange: (_) => {
1526
+ H(_, "distR");
1527
+ }
1660
1528
  }
1661
- )
1529
+ ) }) })
1662
1530
  ] }) })
1663
1531
  ]
1664
1532
  }
@@ -1666,8 +1534,8 @@ const Dn = {
1666
1534
  ]
1667
1535
  }
1668
1536
  );
1669
- }, nr = () => {
1670
- const i = we(ve), e = i.getFocusDrawings(), [t, n] = re(e);
1537
+ }, ir = () => {
1538
+ const i = ve(me), e = i.getFocusDrawings(), [t, n] = re(e);
1671
1539
  return Mt(() => {
1672
1540
  const r = i.focus$.subscribe((s) => {
1673
1541
  n(s);
@@ -1676,13 +1544,13 @@ const Dn = {
1676
1544
  r.unsubscribe();
1677
1545
  };
1678
1546
  }, []), !!(t != null && t.length) && /* @__PURE__ */ X("div", { className: "univer-p-2 univer-text-center univer-text-sm", children: [
1679
- /* @__PURE__ */ m(ci, { drawings: t, hasAlign: !1, hasCropper: !1, hasGroup: !1, hasTransform: !1 }),
1680
- /* @__PURE__ */ m(tr, { drawings: t }),
1681
- /* @__PURE__ */ m(er, { drawings: t })
1547
+ /* @__PURE__ */ m(di, { drawings: t, hasAlign: !1, hasCropper: !1, hasGroup: !1, hasTransform: !1 }),
1548
+ /* @__PURE__ */ m(nr, { drawings: t }),
1549
+ /* @__PURE__ */ m(tr, { drawings: t })
1682
1550
  ] });
1683
- }, Nn = "addition-and-subtraction-single", En = "doc.menu.image", Rn = _n.id, ir = (i) => {
1684
- const e = i.get(Ot), t = i.get(z);
1685
- return new Fi((n) => {
1551
+ }, En = "addition-and-subtraction-single", Rn = "doc.menu.image", An = Sn.id, rr = (i) => {
1552
+ const e = i.get(yt), t = i.get(z);
1553
+ return new Wi((n) => {
1686
1554
  const r = e.textSelection$.subscribe(() => {
1687
1555
  var o;
1688
1556
  const s = e.getActiveTextRange();
@@ -1704,133 +1572,133 @@ const Dn = {
1704
1572
  return () => r.unsubscribe();
1705
1573
  });
1706
1574
  };
1707
- function rr(i) {
1575
+ function sr(i) {
1708
1576
  return {
1709
- id: En,
1577
+ id: Rn,
1710
1578
  type: sn.SUBITEMS,
1711
- icon: Nn,
1579
+ icon: En,
1712
1580
  tooltip: "docImage.title",
1713
- disabled$: ir(i),
1714
- hidden$: rn(i, Ie.UNIVER_DOC, void 0, yt)
1581
+ disabled$: rr(i),
1582
+ hidden$: rn(i, we.UNIVER_DOC, void 0, Ot)
1715
1583
  };
1716
1584
  }
1717
- function sr(i) {
1585
+ function or(i) {
1718
1586
  return {
1719
- id: Rn,
1587
+ id: An,
1720
1588
  title: "docImage.upload.float",
1721
1589
  type: sn.BUTTON,
1722
- hidden$: rn(i, Ie.UNIVER_DOC, void 0, yt)
1590
+ hidden$: rn(i, we.UNIVER_DOC, void 0, Ot)
1723
1591
  };
1724
1592
  }
1725
- const or = {
1726
- [Di.LAYOUT]: {
1727
- [En]: {
1593
+ const ar = {
1594
+ [Oi.LAYOUT]: {
1595
+ [Rn]: {
1728
1596
  order: 0,
1729
- menuItemFactory: rr,
1730
- [Rn]: {
1597
+ menuItemFactory: sr,
1598
+ [An]: {
1731
1599
  order: 0,
1732
- menuItemFactory: sr
1600
+ menuItemFactory: or
1733
1601
  }
1734
1602
  }
1735
1603
  }
1736
1604
  };
1737
- function Qe(i) {
1738
- return i.getContextValue(Hn) && i.getContextValue(rt);
1605
+ function Ze(i) {
1606
+ return i.getContextValue(jn) && i.getContextValue(it);
1739
1607
  }
1740
- const ar = {
1741
- id: Ze.id,
1608
+ const cr = {
1609
+ id: Ye.id,
1742
1610
  description: "shortcut.drawing-move-down",
1743
1611
  group: "4_drawing-view",
1744
1612
  binding: He.ARROW_DOWN,
1745
1613
  priority: 100,
1746
- preconditions: Qe,
1614
+ preconditions: Ze,
1747
1615
  staticParameters: {
1748
- direction: he.DOWN
1616
+ direction: fe.DOWN
1749
1617
  }
1750
- }, cr = {
1751
- id: Ze.id,
1618
+ }, dr = {
1619
+ id: Ye.id,
1752
1620
  description: "shortcut.drawing-move-up",
1753
1621
  group: "4_drawing-view",
1754
1622
  binding: He.ARROW_UP,
1755
1623
  priority: 100,
1756
- preconditions: Qe,
1624
+ preconditions: Ze,
1757
1625
  staticParameters: {
1758
- direction: he.UP
1626
+ direction: fe.UP
1759
1627
  }
1760
- }, dr = {
1761
- id: Ze.id,
1628
+ }, lr = {
1629
+ id: Ye.id,
1762
1630
  description: "shortcut.drawing-move-left",
1763
1631
  group: "4_drawing-view",
1764
1632
  binding: He.ARROW_LEFT,
1765
1633
  priority: 100,
1766
- preconditions: Qe,
1634
+ preconditions: Ze,
1767
1635
  staticParameters: {
1768
- direction: he.LEFT
1636
+ direction: fe.LEFT
1769
1637
  }
1770
- }, lr = {
1771
- id: Ze.id,
1638
+ }, ur = {
1639
+ id: Ye.id,
1772
1640
  description: "shortcut.drawing-move-right",
1773
1641
  group: "4_drawing-view",
1774
1642
  binding: He.ARROW_RIGHT,
1775
1643
  priority: 100,
1776
- preconditions: Qe,
1644
+ preconditions: Ze,
1777
1645
  staticParameters: {
1778
- direction: he.RIGHT
1646
+ direction: fe.RIGHT
1779
1647
  }
1780
- }, ur = {
1648
+ }, gr = {
1781
1649
  id: vn.id,
1782
1650
  description: "shortcut.drawing-delete",
1783
1651
  group: "4_drawing-view",
1784
1652
  // when focusing on any other input tag do not trigger this shortcut
1785
- preconditions: Qe,
1653
+ preconditions: Ze,
1786
1654
  binding: He.DELETE,
1787
1655
  mac: He.BACKSPACE
1788
1656
  };
1789
- var gr = Object.getOwnPropertyDescriptor, fr = (i, e, t, n) => {
1790
- for (var r = n > 1 ? void 0 : n ? gr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
1657
+ var fr = Object.getOwnPropertyDescriptor, hr = (i, e, t, n) => {
1658
+ for (var r = n > 1 ? void 0 : n ? fr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
1791
1659
  (o = i[s]) && (r = o(r) || r);
1792
1660
  return r;
1793
- }, nt = (i, e) => (t, n) => e(t, n, i);
1794
- let ot = class extends Ue {
1661
+ }, tt = (i, e) => (t, n) => e(t, n, i);
1662
+ let st = class extends Le {
1795
1663
  constructor(i, e, t, n) {
1796
1664
  super(), this._componentManager = i, this._menuManagerService = e, this._commandService = t, this._shortcutService = n, this._init();
1797
1665
  }
1798
1666
  _initCustomComponents() {
1799
1667
  const i = this._componentManager;
1800
- this.disposeWithMe(i.register(Nn, mn)), this.disposeWithMe(i.register(bn, nr));
1668
+ this.disposeWithMe(i.register(En, pn)), this.disposeWithMe(i.register(xn, ir));
1801
1669
  }
1802
1670
  _initMenus() {
1803
- this._menuManagerService.mergeMenu(or);
1671
+ this._menuManagerService.mergeMenu(ar);
1804
1672
  }
1805
1673
  _initCommands() {
1806
1674
  [
1807
- _n,
1808
- Ct,
1809
- Dn,
1810
- yn,
1675
+ Sn,
1676
+ xt,
1811
1677
  On,
1812
- Ye,
1678
+ yn,
1813
1679
  Tn,
1680
+ Ke,
1814
1681
  Mn,
1682
+ bn,
1815
1683
  bt,
1816
1684
  Cn,
1817
- Ji,
1818
- xn,
1819
- pn,
1820
- In,
1821
- Ze,
1685
+ er,
1686
+ Nn,
1687
+ wn,
1688
+ _n,
1689
+ Ye,
1822
1690
  vn,
1823
- wn
1691
+ In
1824
1692
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
1825
1693
  }
1826
1694
  _initShortcuts() {
1827
1695
  [
1828
1696
  // sheet drawing shortcuts
1829
- ar,
1830
1697
  cr,
1831
1698
  dr,
1832
1699
  lr,
1833
- ur
1700
+ ur,
1701
+ gr
1834
1702
  ].forEach((i) => {
1835
1703
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
1836
1704
  });
@@ -1839,17 +1707,17 @@ let ot = class extends Ue {
1839
1707
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
1840
1708
  }
1841
1709
  };
1842
- ot = fr([
1843
- nt(0, Z(on)),
1844
- nt(1, yi),
1845
- nt(2, G),
1846
- nt(3, Oi)
1847
- ], ot);
1848
- var hr = Object.getOwnPropertyDescriptor, mr = (i, e, t, n) => {
1849
- for (var r = n > 1 ? void 0 : n ? hr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
1710
+ st = hr([
1711
+ tt(0, Z(on)),
1712
+ tt(1, yi),
1713
+ tt(2, j),
1714
+ tt(3, Ti)
1715
+ ], st);
1716
+ var mr = Object.getOwnPropertyDescriptor, pr = (i, e, t, n) => {
1717
+ for (var r = n > 1 ? void 0 : n ? mr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
1850
1718
  (o = i[s]) && (r = o(r) || r);
1851
1719
  return r;
1852
- }, $e = (i, e) => (t, n) => e(t, n, i);
1720
+ }, Ve = (i, e) => (t, n) => e(t, n, i);
1853
1721
  function vr(i) {
1854
1722
  var n, r, s, o;
1855
1723
  if ($.isNoop(i) || !Array.isArray(i))
@@ -1873,7 +1741,7 @@ function vr(i) {
1873
1741
  });
1874
1742
  return t;
1875
1743
  }
1876
- function pr(i) {
1744
+ function wr(i) {
1877
1745
  if (!Array.isArray(i) || i.length < 3 || i[0] !== "drawingsOrder")
1878
1746
  return [];
1879
1747
  const e = [];
@@ -1888,7 +1756,7 @@ function pr(i) {
1888
1756
  }
1889
1757
  return e;
1890
1758
  }
1891
- let at = class extends Ue {
1759
+ let ot = class extends Le {
1892
1760
  constructor(i, e, t, n, r) {
1893
1761
  super(), this._univerInstanceService = i, this._commandService = e, this._drawingManagerService = t, this._docDrawingService = n, this._renderManagerService = r, this._initialize();
1894
1762
  }
@@ -1910,12 +1778,12 @@ let at = class extends Ue {
1910
1778
  if (i.id !== ee.id)
1911
1779
  return;
1912
1780
  const e = i.params, { unitId: t, actions: n } = e;
1913
- pr(n).length > 0 && this._updateDrawingsOrder(t);
1781
+ wr(n).length > 0 && this._updateDrawingsOrder(t);
1914
1782
  })
1915
1783
  ), this.disposeWithMe(
1916
1784
  this._commandService.onCommandExecuted((i) => {
1917
1785
  var o;
1918
- if (i.id !== Gn.id && i.id !== Vn.id)
1786
+ if (i.id !== Vn.id && i.id !== $n.id)
1919
1787
  return;
1920
1788
  const e = (o = this._univerInstanceService.getCurrentUniverDocInstance()) == null ? void 0 : o.getUnitId(), t = this._drawingManagerService.getFocusDrawings();
1921
1789
  if (e == null || t.length === 0)
@@ -1956,19 +1824,19 @@ let at = class extends Ue {
1956
1824
  n.orderNotification(s), r.orderNotification(s);
1957
1825
  }
1958
1826
  };
1959
- at = mr([
1960
- $e(0, z),
1961
- $e(1, G),
1962
- $e(2, ve),
1963
- $e(3, Be),
1964
- $e(4, Q)
1965
- ], at);
1966
- var wr = Object.getOwnPropertyDescriptor, Ir = (i, e, t, n) => {
1967
- for (var r = n > 1 ? void 0 : n ? wr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
1827
+ ot = pr([
1828
+ Ve(0, z),
1829
+ Ve(1, j),
1830
+ Ve(2, me),
1831
+ Ve(3, Ue),
1832
+ Ve(4, Q)
1833
+ ], ot);
1834
+ var Ir = Object.getOwnPropertyDescriptor, _r = (i, e, t, n) => {
1835
+ for (var r = n > 1 ? void 0 : n ? Ir(e, t) : e, s = i.length - 1, o; s >= 0; s--)
1968
1836
  (o = i[s]) && (r = o(r) || r);
1969
1837
  return r;
1970
1838
  }, Fe = (i, e) => (t, n) => e(t, n, i);
1971
- function An(i, e, t = 1, n = 0) {
1839
+ function Pn(i, e, t = 1, n = 0) {
1972
1840
  const { top: r, left: s, bottom: o, right: c } = i, d = c - s, a = o - r, l = e.getViewport(cn.VIEW_MAIN), { viewportScrollX: g, viewportScrollY: u } = l, { scaleX: h, scaleY: f } = e.getAncestorScale();
1973
1841
  return {
1974
1842
  startX: (s - g) * h,
@@ -1985,14 +1853,14 @@ function An(i, e, t = 1, n = 0) {
1985
1853
  opacity: t != null ? t : 1
1986
1854
  };
1987
1855
  }
1988
- function It(i, e) {
1856
+ function wt(i, e) {
1989
1857
  const { top: t, left: n, width: r, height: s, angle: o, opacity: c } = i;
1990
- return An({ top: t, left: n, bottom: t + s, right: n + r }, e.scene, c, o);
1858
+ return Pn({ top: t, left: n, bottom: t + s, right: n + r }, e.scene, c, o);
1991
1859
  }
1992
- let ct = class extends Ue {
1860
+ let at = class extends Le {
1993
1861
  constructor(e, t, n, r, s, o) {
1994
1862
  super();
1995
- _e(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
1863
+ Ie(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
1996
1864
  this._renderManagerService = e, this._drawingManagerService = t, this._drawingRenderService = n, this._canvasFloatDomService = r, this._univerInstanceService = s, this._commandService = o, this._initialize();
1997
1865
  }
1998
1866
  dispose() {
@@ -2026,7 +1894,7 @@ let ct = class extends Ue {
2026
1894
  _insertRects(e) {
2027
1895
  e.forEach(async (t) => {
2028
1896
  const { unitId: n } = t;
2029
- if (!this._univerInstanceService.getUnit(n, Ie.UNIVER_DOC))
1897
+ if (!this._univerInstanceService.getUnit(n, we.UNIVER_DOC))
2030
1898
  return;
2031
1899
  const s = this._getSceneAndTransformerByDrawingSearch(n);
2032
1900
  if (s == null)
@@ -2038,7 +1906,7 @@ let ct = class extends Ue {
2038
1906
  if (!(c == null || c.length === 0))
2039
1907
  for (const d of c) {
2040
1908
  this._addHoverForRect(d);
2041
- const a = new $n(), l = It(d, s.renderUnit), g = new Tt(l), u = s.canvas, h = o.data, f = {
1909
+ const a = new zn(), l = wt(d, s.renderUnit), g = new Tt(l), u = s.canvas, h = o.data, f = {
2042
1910
  dispose: a,
2043
1911
  rect: d,
2044
1912
  position$: g,
@@ -2048,42 +1916,42 @@ let ct = class extends Ue {
2048
1916
  position$: g,
2049
1917
  id: o.drawingId,
2050
1918
  componentKey: o.componentKey,
2051
- onPointerDown: (v) => {
2052
- u.dispatchEvent(new PointerEvent(v.type, v));
1919
+ onPointerDown: (p) => {
1920
+ u.dispatchEvent(new PointerEvent(p.type, p));
2053
1921
  },
2054
- onPointerMove: (v) => {
2055
- u.dispatchEvent(new PointerEvent(v.type, v));
1922
+ onPointerMove: (p) => {
1923
+ u.dispatchEvent(new PointerEvent(p.type, p));
2056
1924
  },
2057
- onPointerUp: (v) => {
2058
- u.dispatchEvent(new PointerEvent(v.type, v));
1925
+ onPointerUp: (p) => {
1926
+ u.dispatchEvent(new PointerEvent(p.type, p));
2059
1927
  },
2060
- onWheel: (v) => {
2061
- u.dispatchEvent(new WheelEvent(v.type, v));
1928
+ onWheel: (p) => {
1929
+ u.dispatchEvent(new WheelEvent(p.type, p));
2062
1930
  },
2063
1931
  data: h,
2064
1932
  unitId: n
2065
1933
  });
2066
- const p = d.onTransformChange$.subscribeEvent(() => {
2067
- const v = It(d, s.renderUnit);
1934
+ const v = d.onTransformChange$.subscribeEvent(() => {
1935
+ const p = wt(d, s.renderUnit);
2068
1936
  g.next(
2069
- v
1937
+ p
2070
1938
  );
2071
1939
  });
2072
1940
  a.add(() => {
2073
1941
  this._canvasFloatDomService.removeFloatDom(o.drawingId);
2074
- }), p && a.add(p), this._domLayerInfoMap.set(o.drawingId, f);
1942
+ }), v && a.add(v), this._domLayerInfoMap.set(o.drawingId, f);
2075
1943
  }
2076
1944
  });
2077
1945
  }
2078
1946
  _addHoverForRect(e) {
2079
1947
  this.disposeWithMe(
2080
- ye(
1948
+ De(
2081
1949
  e.onPointerEnter$.subscribeEvent(() => {
2082
1950
  e.cursor = Ut.GRAB;
2083
1951
  })
2084
1952
  )
2085
1953
  ), this.disposeWithMe(
2086
- ye(
1954
+ De(
2087
1955
  e.onPointerLeave$.subscribeEvent(() => {
2088
1956
  e.cursor = Ut.DEFAULT;
2089
1957
  })
@@ -2104,19 +1972,19 @@ let ct = class extends Ue {
2104
1972
  const n = this._getSceneAndTransformerByDrawingSearch(t);
2105
1973
  n && this._domLayerInfoMap.forEach((r) => {
2106
1974
  if (r.unitId !== t) return;
2107
- const s = It(r.rect, n.renderUnit);
1975
+ const s = wt(r.rect, n.renderUnit);
2108
1976
  r.position$.next(s);
2109
1977
  });
2110
1978
  };
2111
1979
  this.disposeWithMe(
2112
- this._univerInstanceService.getCurrentTypeOfUnit$(Ie.UNIVER_DOC).pipe(
1980
+ this._univerInstanceService.getCurrentTypeOfUnit$(we.UNIVER_DOC).pipe(
2113
1981
  Vt((t) => {
2114
1982
  if (!t) return null;
2115
1983
  const n = t.getUnitId(), r = this._renderManagerService.getRenderById(n);
2116
1984
  return r ? { render: r, unitId: n } : null;
2117
1985
  }),
2118
- ji(
2119
- (t) => t ? Jt(t.render.scene.getViewport(cn.VIEW_MAIN).onScrollAfter$).pipe(Vt(() => ({ unitId: t.unitId }))) : Wi(null)
1986
+ Hi(
1987
+ (t) => t ? Jt(t.render.scene.getViewport(cn.VIEW_MAIN).onScrollAfter$).pipe(Vt(() => ({ unitId: t.unitId }))) : Gi(null)
2120
1988
  )
2121
1989
  ).subscribe((t) => {
2122
1990
  if (!t) return;
@@ -2131,16 +1999,16 @@ let ct = class extends Ue {
2131
1999
  }));
2132
2000
  }
2133
2001
  insertFloatDom(e, t) {
2134
- var p, v, w;
2135
- const n = this._univerInstanceService.getCurrentUnitOfType(Ie.UNIVER_DOC);
2002
+ var v, p, w;
2003
+ const n = this._univerInstanceService.getCurrentUnitOfType(we.UNIVER_DOC);
2136
2004
  if (!n) return !1;
2137
2005
  const r = this._getSceneAndTransformerByDrawingSearch(n.getUnitId());
2138
2006
  if (!r) return !1;
2139
- const c = (p = r.renderUnit.with(te).getSkeleton().getSkeletonData()) == null ? void 0 : p.pages[0];
2007
+ const c = (v = r.renderUnit.with(te).getSkeleton().getSkeletonData()) == null ? void 0 : v.pages[0];
2140
2008
  if (!c) return !1;
2141
2009
  const { pageWidth: d, marginLeft: a, marginRight: l } = c, g = d - a - l, u = {
2142
2010
  size: {
2143
- width: (v = t.width) != null ? v : g,
2011
+ width: (p = t.width) != null ? p : g,
2144
2012
  height: t.height
2145
2013
  },
2146
2014
  positionH: {
@@ -2148,41 +2016,41 @@ let ct = class extends Ue {
2148
2016
  posOffset: 0
2149
2017
  },
2150
2018
  positionV: {
2151
- relativeFrom: j.PAGE,
2019
+ relativeFrom: W.PAGE,
2152
2020
  posOffset: 0
2153
2021
  },
2154
2022
  angle: 0
2155
- }, h = (w = t.drawingId) != null ? w : zn(), f = {
2023
+ }, h = (w = t.drawingId) != null ? w : Xn(), f = {
2156
2024
  unitId: n.getUnitId(),
2157
2025
  drawings: [
2158
2026
  {
2159
2027
  drawingId: h,
2160
- drawingType: Le.DRAWING_DOM,
2028
+ drawingType: Pe.DRAWING_DOM,
2161
2029
  subUnitId: n.getUnitId(),
2162
2030
  unitId: n.getUnitId(),
2163
2031
  ...e,
2164
2032
  title: "",
2165
2033
  description: "",
2166
2034
  docTransform: u,
2167
- layoutType: F.INLINE,
2035
+ layoutType: k.INLINE,
2168
2036
  transform: an(u)
2169
2037
  }
2170
2038
  ]
2171
2039
  };
2172
- return this._commandService.syncExecuteCommand(Ct.id, f), h;
2040
+ return this._commandService.syncExecuteCommand(xt.id, f), h;
2173
2041
  }
2174
2042
  };
2175
- ct = Ir([
2043
+ at = _r([
2176
2044
  Fe(0, Q),
2177
- Fe(1, ve),
2045
+ Fe(1, me),
2178
2046
  Fe(2, Z(tn)),
2179
- Fe(3, Z(Ti)),
2047
+ Fe(3, Z(Mi)),
2180
2048
  Fe(4, z),
2181
- Fe(5, G)
2182
- ], ct);
2183
- const _r = (i) => {
2184
- const { floatDomInfos: e, scene: t, offset: n, bound: r } = i, s = r.right - r.left, o = r.bottom - r.top, c = Gi(() => e.map((d) => {
2185
- const { width: a = 0, height: l = 0, left: g = 0, top: u = 0 } = d.transform, f = An(
2049
+ Fe(5, j)
2050
+ ], at);
2051
+ const Sr = (i) => {
2052
+ const { floatDomInfos: e, scene: t, offset: n, bound: r } = i, s = r.right - r.left, o = r.bottom - r.top, c = Vi(() => e.map((d) => {
2053
+ const { width: a = 0, height: l = 0, left: g = 0, top: u = 0 } = d.transform, f = Pn(
2186
2054
  {
2187
2055
  left: g,
2188
2056
  right: g + a,
@@ -2190,7 +2058,7 @@ const _r = (i) => {
2190
2058
  bottom: u + l
2191
2059
  },
2192
2060
  t
2193
- ), p = {
2061
+ ), v = {
2194
2062
  position$: new Tt(f),
2195
2063
  position: f,
2196
2064
  id: d.drawingId,
@@ -2206,16 +2074,16 @@ const _r = (i) => {
2206
2074
  unitId: d.unitId,
2207
2075
  data: d.data
2208
2076
  };
2209
- return [d.drawingId, p];
2077
+ return [d.drawingId, v];
2210
2078
  }).filter(([d, a]) => !(a.position.endX < 0 || a.position.endY < 0 || a.position.startX > s || a.position.startY > o)), [e, t, n, s, o]);
2211
- return /* @__PURE__ */ m("div", { style: { position: "absolute", top: 0, left: 0 }, children: c.map(([d, a]) => /* @__PURE__ */ m(Mi, { layer: a, id: d, position: a.position }, d)) });
2079
+ return /* @__PURE__ */ m("div", { style: { position: "absolute", top: 0, left: 0 }, children: c.map(([d, a]) => /* @__PURE__ */ m(bi, { layer: a, id: d, position: a.position }, d)) });
2212
2080
  };
2213
- var Sr = Object.getOwnPropertyDescriptor, Dr = (i, e, t, n) => {
2214
- for (var r = n > 1 ? void 0 : n ? Sr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
2081
+ var Dr = Object.getOwnPropertyDescriptor, Or = (i, e, t, n) => {
2082
+ for (var r = n > 1 ? void 0 : n ? Dr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
2215
2083
  (o = i[s]) && (r = o(r) || r);
2216
2084
  return r;
2217
- }, ze = (i, e) => (t, n) => e(t, n, i);
2218
- let dt = class extends Ue {
2085
+ }, $e = (i, e) => (t, n) => e(t, n, i);
2086
+ let ct = class extends Le {
2219
2087
  constructor(i, e, t, n, r) {
2220
2088
  super(), this._docPrintInterceptorService = i, this._drawingRenderService = e, this._drawingManagerService = t, this._componetManager = n, this._injector = r, this._initPrinting(), this._initPrintingDom();
2221
2089
  }
@@ -2228,7 +2096,7 @@ let dt = class extends Ue {
2228
2096
  const { unitId: n, scene: r } = e, s = this._drawingManagerService.getDrawingDataForUnit(n), o = s == null ? void 0 : s[n];
2229
2097
  return o && o.order.forEach((c) => {
2230
2098
  const d = o.data[c];
2231
- d.drawingType !== Le.DRAWING_CHART && d.drawingType !== Le.DRAWING_DOM && this._drawingRenderService.renderDrawing(d, r);
2099
+ d.drawingType !== Pe.DRAWING_CHART && d.drawingType !== Pe.DRAWING_DOM && this._drawingRenderService.renderDrawing(d, r);
2232
2100
  }), t();
2233
2101
  }
2234
2102
  }
@@ -2245,12 +2113,12 @@ let dt = class extends Ue {
2245
2113
  if (s) {
2246
2114
  const o = s.order.map((d) => {
2247
2115
  const a = s.data[d];
2248
- if (a.drawingType === Le.DRAWING_CHART)
2116
+ if (a.drawingType === Pe.DRAWING_CHART)
2249
2117
  return {
2250
2118
  ...a,
2251
- componentKey: this._componetManager.get(Xn)
2119
+ componentKey: this._componetManager.get(qn)
2252
2120
  };
2253
- if (a.drawingType === Le.DRAWING_DOM) {
2121
+ if (a.drawingType === Pe.DRAWING_DOM) {
2254
2122
  const l = this._docPrintInterceptorService.getPrintComponent(a.componentKey);
2255
2123
  return {
2256
2124
  ...a,
@@ -2258,8 +2126,8 @@ let dt = class extends Ue {
2258
2126
  };
2259
2127
  }
2260
2128
  return null;
2261
- }).filter(Boolean), c = bi(_r, this._injector);
2262
- return Bi(
2129
+ }).filter(Boolean), c = xi(Sr, this._injector);
2130
+ return Fi(
2263
2131
  /* @__PURE__ */ m(
2264
2132
  c,
2265
2133
  {
@@ -2282,31 +2150,31 @@ let dt = class extends Ue {
2282
2150
  );
2283
2151
  }
2284
2152
  };
2285
- dt = Dr([
2286
- ze(0, Z(Ni)),
2287
- ze(1, Z(tn)),
2288
- ze(2, ve),
2289
- ze(3, Z(on)),
2290
- ze(4, Z(en))
2291
- ], dt);
2292
- var yr = Object.getOwnPropertyDescriptor, Or = (i, e, t, n) => {
2153
+ ct = Or([
2154
+ $e(0, Z(Ei)),
2155
+ $e(1, Z(tn)),
2156
+ $e(2, me),
2157
+ $e(3, Z(on)),
2158
+ $e(4, Z(en))
2159
+ ], ct);
2160
+ var yr = Object.getOwnPropertyDescriptor, Tr = (i, e, t, n) => {
2293
2161
  for (var r = n > 1 ? void 0 : n ? yr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
2294
2162
  (o = i[s]) && (r = o(r) || r);
2295
2163
  return r;
2296
- }, it = (i, e) => (t, n) => e(t, n, i);
2297
- const Tr = "__InlineDrawingAnchor__";
2164
+ }, nt = (i, e) => (t, n) => e(t, n, i);
2165
+ const Mr = "__InlineDrawingAnchor__";
2298
2166
  function Yt(i) {
2299
2167
  const { path: e } = i;
2300
2168
  return e.some((t) => t === "cells");
2301
2169
  }
2302
- let lt = class extends Ue {
2170
+ let dt = class extends Le {
2303
2171
  constructor(e, t, n, r) {
2304
2172
  super();
2305
- _e(this, "_liquid", new nn());
2306
- _e(this, "_listenerOnImageMap", /* @__PURE__ */ new Set());
2173
+ Ie(this, "_liquid", new nn());
2174
+ Ie(this, "_listenerOnImageMap", /* @__PURE__ */ new Set());
2307
2175
  // Use to cache the drawings is under transforming or scaling.
2308
- _e(this, "_transformerCache", /* @__PURE__ */ new Map());
2309
- _e(this, "_anchorShape");
2176
+ Ie(this, "_transformerCache", /* @__PURE__ */ new Map());
2177
+ Ie(this, "_anchorShape");
2310
2178
  this._commandService = e, this._univerInstanceService = t, this._drawingManagerService = n, this._renderManagerService = r, this._init();
2311
2179
  }
2312
2180
  _init() {
@@ -2331,22 +2199,22 @@ let lt = class extends Ue {
2331
2199
  if (t == null)
2332
2200
  return;
2333
2201
  this.disposeWithMe(
2334
- ye(
2202
+ De(
2335
2203
  t.changeStart$.subscribe((s) => {
2336
2204
  var c;
2337
2205
  this._transformerCache.clear();
2338
2206
  const { objects: o } = s;
2339
2207
  for (const d of o.values()) {
2340
- const { oKey: a, width: l, height: g, left: u, top: h, angle: f } = d, p = this._drawingManagerService.getDrawingOKey(a);
2341
- if (p == null)
2208
+ const { oKey: a, width: l, height: g, left: u, top: h, angle: f } = d, v = this._drawingManagerService.getDrawingOKey(a);
2209
+ if (v == null)
2342
2210
  continue;
2343
- const v = this._univerInstanceService.getUniverDocInstance(p.unitId), w = (c = v == null ? void 0 : v.getSnapshot().drawings) == null ? void 0 : c[p.drawingId];
2344
- if ((w == null ? void 0 : w.layoutType) === F.INLINE)
2211
+ const p = this._univerInstanceService.getUniverDocInstance(v.unitId), w = (c = p == null ? void 0 : p.getSnapshot().drawings) == null ? void 0 : c[v.drawingId];
2212
+ if ((w == null ? void 0 : w.layoutType) === k.INLINE)
2345
2213
  try {
2346
2214
  d.setOpacity(0.2);
2347
2215
  } catch {
2348
2216
  }
2349
- w != null && this._transformerCache.set(p.drawingId, {
2217
+ w != null && this._transformerCache.set(v.drawingId, {
2350
2218
  drawing: w,
2351
2219
  top: h,
2352
2220
  left: u,
@@ -2360,21 +2228,21 @@ let lt = class extends Ue {
2360
2228
  );
2361
2229
  const n = Et(this._updateMultipleDrawingDocTransform.bind(this), 50);
2362
2230
  Et(this._nonInlineDrawingTransform.bind(this), 50), this.disposeWithMe(
2363
- ye(
2231
+ De(
2364
2232
  t.changing$.subscribe((s) => {
2365
2233
  const { objects: o, offsetX: c, offsetY: d } = s;
2366
2234
  if (o.size > 1)
2367
2235
  n(o);
2368
2236
  else if (o.size === 1) {
2369
- const a = this._transformerCache.values().next().value, l = o.values().next().value, { width: g, height: u, top: h, left: f, angle: p } = l;
2370
- if (a && g === a.width && u === a.height && h === a.top && f === a.left && p === a.angle)
2237
+ const a = this._transformerCache.values().next().value, l = o.values().next().value, { width: g, height: u, top: h, left: f, angle: v } = l;
2238
+ if (a && g === a.width && u === a.height && h === a.top && f === a.left && v === a.angle)
2371
2239
  return;
2372
- a && (a.drawing.layoutType, F.INLINE), a && a.drawing.layoutType === F.INLINE && c != null && d != null && this._updateInlineDrawingAnchor(a.drawing, c, d);
2240
+ a && (a.drawing.layoutType, k.INLINE), a && a.drawing.layoutType === k.INLINE && c != null && d != null && this._updateInlineDrawingAnchor(a.drawing, c, d);
2373
2241
  }
2374
2242
  })
2375
2243
  )
2376
2244
  ), this.disposeWithMe(
2377
- ye(
2245
+ De(
2378
2246
  // eslint-disable-next-line complexity
2379
2247
  t.changeEnd$.subscribe((s) => {
2380
2248
  const { objects: o, offsetX: c, offsetY: d } = s;
@@ -2383,7 +2251,7 @@ let lt = class extends Ue {
2383
2251
  if (l == null)
2384
2252
  continue;
2385
2253
  const g = this._transformerCache.get(l == null ? void 0 : l.drawingId);
2386
- if ((g == null ? void 0 : g.drawing.layoutType) === F.INLINE)
2254
+ if ((g == null ? void 0 : g.drawing.layoutType) === k.INLINE)
2387
2255
  try {
2388
2256
  a.setOpacity(1);
2389
2257
  } catch {
@@ -2392,10 +2260,10 @@ let lt = class extends Ue {
2392
2260
  if (this._anchorShape && this._anchorShape.hide(), o.size > 1)
2393
2261
  this._updateMultipleDrawingDocTransform(o);
2394
2262
  else if (o.size === 1) {
2395
- const a = this._transformerCache.values().next().value, l = o.values().next().value, { width: g, height: u, top: h, left: f, angle: p } = l;
2396
- if (a && g === a.width && u === a.height && h === a.top && f === a.left && p === a.angle)
2263
+ const a = this._transformerCache.values().next().value, l = o.values().next().value, { width: g, height: u, top: h, left: f, angle: v } = l;
2264
+ if (a && g === a.width && u === a.height && h === a.top && f === a.left && v === a.angle)
2397
2265
  return;
2398
- a && a.drawing.layoutType === F.INLINE ? g !== a.width || u !== a.height || p !== a.angle ? this._updateDrawingSize(a, l) : c != null && d != null && this._moveInlineDrawing(a.drawing, c, d) : a && this._nonInlineDrawingTransform(a.drawing, l);
2266
+ a && a.drawing.layoutType === k.INLINE ? g !== a.width || u !== a.height || v !== a.angle ? this._updateDrawingSize(a, l) : c != null && d != null && this._moveInlineDrawing(a.drawing, c, d) : a && this._nonInlineDrawingTransform(a.drawing, l);
2399
2267
  }
2400
2268
  this._transformerCache.clear();
2401
2269
  })
@@ -2418,8 +2286,8 @@ let lt = class extends Ue {
2418
2286
  const h = this._transformerCache.get(u.drawingId);
2419
2287
  if (h == null)
2420
2288
  continue;
2421
- const { drawing: f, top: p, left: v, width: w, height: y, angle: D } = h, { width: O, height: C } = this._getPageContentSize(f);
2422
- if (l = Math.min(l, O), g = Math.min(g, C), (w !== l || y !== g) && t.push({
2289
+ const { drawing: f, top: v, left: p, width: w, height: O, angle: D } = h, { width: y, height: x } = this._getPageContentSize(f);
2290
+ if (l = Math.min(l, y), g = Math.min(g, x), (w !== l || O !== g) && t.push({
2423
2291
  drawingId: u.drawingId,
2424
2292
  key: "size",
2425
2293
  value: {
@@ -2430,8 +2298,8 @@ let lt = class extends Ue {
2430
2298
  drawingId: u.drawingId,
2431
2299
  key: "angle",
2432
2300
  value: a
2433
- }), p !== d || v !== c) {
2434
- const M = d - p, E = c - v;
2301
+ }), v !== d || p !== c) {
2302
+ const M = d - v, E = c - p;
2435
2303
  M !== 0 && t.push({
2436
2304
  drawingId: u.drawingId,
2437
2305
  key: "positionV",
@@ -2449,7 +2317,7 @@ let lt = class extends Ue {
2449
2317
  });
2450
2318
  }
2451
2319
  }
2452
- t.length > 0 && n && r && this._commandService.executeCommand(Ye.id, {
2320
+ t.length > 0 && n && r && this._commandService.executeCommand(Ke.id, {
2453
2321
  unitId: n,
2454
2322
  subUnitId: r,
2455
2323
  drawings: t
@@ -2470,7 +2338,7 @@ let lt = class extends Ue {
2470
2338
  r != null && this._createOrUpdateInlineAnchor(e.unitId, r);
2471
2339
  }
2472
2340
  _getInlineDrawingAnchor(e, t, n) {
2473
- var A, H;
2341
+ var A, G;
2474
2342
  const r = this._renderManagerService.getRenderById(e.unitId), s = r == null ? void 0 : r.with(te).getSkeleton();
2475
2343
  if (r == null)
2476
2344
  return;
@@ -2479,94 +2347,94 @@ let lt = class extends Ue {
2479
2347
  pageMarginLeft: g,
2480
2348
  pageMarginTop: u
2481
2349
  } = d.getOffsetConfig();
2482
- let h = null, f = !1, p = -1, v = "";
2483
- const w = 0.5, y = this._getTransformCoordForDocumentOffset(d, a, t, n);
2484
- if (y == null)
2350
+ let h = null, f = !1, v = -1, p = "";
2351
+ const w = 0.5, O = this._getTransformCoordForDocumentOffset(d, a, t, n);
2352
+ if (O == null)
2485
2353
  return;
2486
2354
  const D = (A = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : A.with(xe);
2487
2355
  if (D == null)
2488
2356
  return;
2489
- const O = s == null ? void 0 : s.findNodeByCoord(y, l, g, u, {
2357
+ const y = s == null ? void 0 : s.findNodeByCoord(O, l, g, u, {
2490
2358
  strict: !1,
2491
2359
  segmentId: D.getSegment(),
2492
2360
  segmentPage: D.getSegmentPage()
2493
2361
  });
2494
- if (O) {
2495
- const { node: _, ratioX: S, segmentPage: x, segmentId: T } = O;
2496
- f = S < w, h = _, p = x, v = T;
2362
+ if (y) {
2363
+ const { node: _, ratioX: S, segmentPage: C, segmentId: T } = y;
2364
+ f = S < w, h = _, v = C, p = T;
2497
2365
  }
2498
2366
  if (h == null)
2499
2367
  return;
2500
- const C = s == null ? void 0 : s.findPositionByGlyph(h, p), M = this._getDocObject();
2501
- if (C == null || s == null || M == null || Yt(C))
2368
+ const x = s == null ? void 0 : s.findPositionByGlyph(h, v), M = this._getDocObject();
2369
+ if (x == null || s == null || M == null || Yt(x))
2502
2370
  return;
2503
2371
  const E = {
2504
- ...C,
2372
+ ...x,
2505
2373
  isBack: f
2506
- }, U = M.document.getOffsetConfig(), N = new Ft(U, s), { cursorList: I, contentBoxPointGroup: P } = N.getRangePointData(E, E), { startOffset: W } = (H = jt(I)) != null ? H : {};
2507
- if (W != null)
2508
- return { offset: W, contentBoxPointGroup: P, segmentId: v, segmentPage: p };
2374
+ }, U = M.document.getOffsetConfig(), N = new kt(U, s), { cursorList: I, contentBoxPointGroup: P } = N.getRangePointData(E, E), { startOffset: H } = (G = Wt(I)) != null ? G : {};
2375
+ if (H != null)
2376
+ return { offset: H, contentBoxPointGroup: P, segmentId: p, segmentPage: v };
2509
2377
  }
2510
2378
  // eslint-disable-next-line max-lines-per-function, complexity
2511
2379
  _getDrawingAnchor(e, t) {
2512
- var Se, De, ce, Oe, Te, Ee, Re, Me, de, le, Ae;
2380
+ var _e, Se, ce, Oe, ye, Ne, Ee, Te, de, le, Re;
2513
2381
  const n = this._renderManagerService.getRenderById(e.unitId), r = n == null ? void 0 : n.with(te).getSkeleton(), s = r == null ? void 0 : r.getSkeletonData();
2514
2382
  if (s == null || n == null)
2515
2383
  return;
2516
- const { pages: o, skeHeaders: c, skeFooters: d } = s, { mainComponent: a, scene: l } = n, g = a, u = l.getViewports()[0], { pageLayoutType: h = Bt.VERTICAL, pageMarginLeft: f, pageMarginTop: p, docsLeft: v, docsTop: w } = g.getOffsetConfig(), { left: y, top: D, angle: O } = t;
2517
- let { width: C, height: M } = t;
2384
+ const { pages: o, skeHeaders: c, skeFooters: d } = s, { mainComponent: a, scene: l } = n, g = a, u = l.getViewports()[0], { pageLayoutType: h = Bt.VERTICAL, pageMarginLeft: f, pageMarginTop: v, docsLeft: p, docsTop: w } = g.getOffsetConfig(), { left: O, top: D, angle: y } = t;
2385
+ let { width: x, height: M } = t;
2518
2386
  const { positionV: E, positionH: U } = e.docTransform, { width: N, height: I } = this._getPageContentSize(e);
2519
- C = Math.min(C, N), M = Math.min(M, I);
2520
- let P = null, W = "", A = -1;
2521
- const H = !1, _ = {
2387
+ x = Math.min(x, N), M = Math.min(M, I);
2388
+ let P = null, H = "", A = -1;
2389
+ const G = !1, _ = {
2522
2390
  ...e.docTransform,
2523
2391
  size: {
2524
- width: C,
2392
+ width: x,
2525
2393
  height: M
2526
2394
  },
2527
- angle: O
2528
- }, { x: S, y: x } = l.getViewportScrollXY(u), T = this._getTransformCoordForDocumentOffset(g, u, y - S, D - x);
2395
+ angle: y
2396
+ }, { x: S, y: C } = l.getViewportScrollXY(u), T = this._getTransformCoordForDocumentOffset(g, u, O - S, D - C);
2529
2397
  if (T == null)
2530
2398
  return;
2531
- const L = (Se = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : Se.with(xe);
2399
+ const L = (_e = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : _e.with(xe);
2532
2400
  if (L == null)
2533
2401
  return;
2534
- const B = r == null ? void 0 : r.findNodeByCoord(T, h, f, p, {
2402
+ const B = r == null ? void 0 : r.findNodeByCoord(T, h, f, v, {
2535
2403
  strict: !1,
2536
2404
  segmentId: L.getSegment(),
2537
2405
  segmentPage: L.getSegmentPage()
2538
2406
  });
2539
2407
  if (B) {
2540
- const { node: pe, segmentPage: mt, segmentId: vt } = B;
2541
- P = pe, A = mt, W = vt;
2408
+ const { node: pe, segmentPage: ht, segmentId: mt } = B;
2409
+ P = pe, A = ht, H = mt;
2542
2410
  }
2543
2411
  if (P == null)
2544
2412
  return;
2545
- const b = (De = P.parent) == null ? void 0 : De.parent, R = b == null ? void 0 : b.parent, V = (ce = R == null ? void 0 : R.lines.find((pe) => pe.paragraphIndex === (b == null ? void 0 : b.paragraphIndex) && pe.paragraphStart)) != null ? ce : R == null ? void 0 : R.lines[0], k = (Oe = R == null ? void 0 : R.parent) == null ? void 0 : Oe.parent;
2546
- if (b == null || R == null || V == null || k == null)
2413
+ const b = (Se = P.parent) == null ? void 0 : Se.parent, R = b == null ? void 0 : b.parent, V = (ce = R == null ? void 0 : R.lines.find((pe) => pe.paragraphIndex === (b == null ? void 0 : b.paragraphIndex) && pe.paragraphStart)) != null ? ce : R == null ? void 0 : R.lines[0], F = (Oe = R == null ? void 0 : R.parent) == null ? void 0 : Oe.parent;
2414
+ if (b == null || R == null || V == null || F == null)
2547
2415
  return;
2548
2416
  this._liquid.reset();
2549
- const K = k.type;
2417
+ const K = F.type;
2550
2418
  for (const pe of o) {
2551
- const { headerId: mt, footerId: vt, pageHeight: Ln, pageWidth: xt, marginLeft: Nt, marginBottom: Un } = pe, Bn = o.indexOf(pe);
2552
- if (A > -1 && Bn === A) {
2419
+ const { headerId: ht, footerId: mt, pageHeight: Un, pageWidth: Ct, marginLeft: Nt, marginBottom: Bn } = pe, Fn = o.indexOf(pe);
2420
+ if (A > -1 && Fn === A) {
2553
2421
  switch (K) {
2554
- case kt.HEADER: {
2555
- const Ve = (Te = c.get(mt)) == null ? void 0 : Te.get(xt);
2556
- if (Ve)
2422
+ case Ft.HEADER: {
2423
+ const je = (ye = c.get(ht)) == null ? void 0 : ye.get(Ct);
2424
+ if (je)
2557
2425
  this._liquid.translatePagePadding({
2558
- marginTop: Ve.marginTop,
2426
+ marginTop: je.marginTop,
2559
2427
  marginLeft: Nt
2560
2428
  });
2561
2429
  else
2562
2430
  throw new Error("header skeleton not found");
2563
2431
  break;
2564
2432
  }
2565
- case kt.FOOTER: {
2566
- const Ve = (Ee = d.get(vt)) == null ? void 0 : Ee.get(xt);
2567
- if (Ve)
2433
+ case Ft.FOOTER: {
2434
+ const je = (Ne = d.get(mt)) == null ? void 0 : Ne.get(Ct);
2435
+ if (je)
2568
2436
  this._liquid.translatePagePadding({
2569
- marginTop: Ln - Un + Ve.marginTop,
2437
+ marginTop: Un - Bn + je.marginTop,
2570
2438
  marginLeft: Nt
2571
2439
  });
2572
2440
  else
@@ -2576,20 +2444,20 @@ let lt = class extends Ue {
2576
2444
  }
2577
2445
  break;
2578
2446
  }
2579
- if (this._liquid.translatePagePadding(pe), pe === k)
2447
+ if (this._liquid.translatePagePadding(pe), pe === F)
2580
2448
  break;
2581
- this._liquid.restorePagePadding(pe), this._liquid.translatePage(pe, h, f, p);
2449
+ this._liquid.restorePagePadding(pe), this._liquid.translatePage(pe, h, f, v);
2582
2450
  }
2583
- switch (E.relativeFrom === j.LINE ? P = b.divides[0].glyphGroup[0] : P = (le = (de = (Me = (Re = V.divides) == null ? void 0 : Re[0]) == null ? void 0 : Me.glyphGroup) == null ? void 0 : de[0]) != null ? le : P, _.positionH = {
2451
+ switch (E.relativeFrom === W.LINE ? P = b.divides[0].glyphGroup[0] : P = (le = (de = (Te = (Ee = V.divides) == null ? void 0 : Ee[0]) == null ? void 0 : Te.glyphGroup) == null ? void 0 : de[0]) != null ? le : P, _.positionH = {
2584
2452
  relativeFrom: U.relativeFrom,
2585
- posOffset: y - this._liquid.x - v
2453
+ posOffset: O - this._liquid.x - p
2586
2454
  }, U.relativeFrom) {
2587
2455
  case J.MARGIN: {
2588
- _.positionH.posOffset = y - this._liquid.x - v - k.marginLeft;
2456
+ _.positionH.posOffset = O - this._liquid.x - p - F.marginLeft;
2589
2457
  break;
2590
2458
  }
2591
2459
  case J.COLUMN: {
2592
- _.positionH.posOffset = y - this._liquid.x - v - R.left;
2460
+ _.positionH.posOffset = O - this._liquid.x - p - R.left;
2593
2461
  break;
2594
2462
  }
2595
2463
  }
@@ -2597,30 +2465,30 @@ let lt = class extends Ue {
2597
2465
  relativeFrom: E.relativeFrom,
2598
2466
  posOffset: D - this._liquid.y - w
2599
2467
  }, E.relativeFrom) {
2600
- case j.PAGE: {
2601
- _.positionV.posOffset = D - this._liquid.y - w - k.marginTop;
2468
+ case W.PAGE: {
2469
+ _.positionV.posOffset = D - this._liquid.y - w - F.marginTop;
2602
2470
  break;
2603
2471
  }
2604
- case j.LINE: {
2472
+ case W.LINE: {
2605
2473
  _.positionV.posOffset = D - this._liquid.y - w - b.top;
2606
2474
  break;
2607
2475
  }
2608
- case j.PARAGRAPH: {
2476
+ case W.PARAGRAPH: {
2609
2477
  _.positionV.posOffset = D - this._liquid.y - w - V.top;
2610
2478
  break;
2611
2479
  }
2612
2480
  }
2613
2481
  if (P == null)
2614
2482
  return;
2615
- const oe = r == null ? void 0 : r.findPositionByGlyph(P, A), ke = this._getDocObject();
2616
- if (oe == null || r == null || ke == null || Yt(oe))
2483
+ const oe = r == null ? void 0 : r.findPositionByGlyph(P, A), Be = this._getDocObject();
2484
+ if (oe == null || r == null || Be == null || Yt(oe))
2617
2485
  return;
2618
- const Ne = {
2486
+ const Ce = {
2619
2487
  ...oe,
2620
- isBack: H
2621
- }, Ge = ke.document.getOffsetConfig(), ae = new Ft(Ge, r), { cursorList: ne } = ae.getRangePointData(Ne, Ne), { startOffset: ie } = (Ae = jt(ne)) != null ? Ae : {};
2488
+ isBack: G
2489
+ }, Ge = Be.document.getOffsetConfig(), ae = new kt(Ge, r), { cursorList: ne } = ae.getRangePointData(Ce, Ce), { startOffset: ie } = (Re = Wt(ne)) != null ? Re : {};
2622
2490
  if (ie != null)
2623
- return { offset: ie, docTransform: _, segmentId: W, segmentPage: A };
2491
+ return { offset: ie, docTransform: _, segmentId: H, segmentPage: A };
2624
2492
  }
2625
2493
  // Update drawing when use transformer to resize it.
2626
2494
  _updateDrawingSize(e, t) {
@@ -2638,7 +2506,7 @@ let lt = class extends Ue {
2638
2506
  drawingId: r.drawingId,
2639
2507
  key: "angle",
2640
2508
  value: u
2641
- }), n.length > 0 && d && a && this._commandService.executeCommand(Ye.id, {
2509
+ }), n.length > 0 && d && a && this._commandService.executeCommand(Ke.id, {
2642
2510
  unitId: d,
2643
2511
  subUnitId: a,
2644
2512
  drawings: n
@@ -2647,7 +2515,7 @@ let lt = class extends Ue {
2647
2515
  // Update inline drawing when use transformer to move it.
2648
2516
  _moveInlineDrawing(e, t, n) {
2649
2517
  const r = this._getInlineDrawingAnchor(e, t, n), { offset: s, segmentId: o, segmentPage: c } = r != null ? r : {};
2650
- return this._commandService.executeCommand(Tn.id, {
2518
+ return this._commandService.executeCommand(Mn.id, {
2651
2519
  unitId: e.unitId,
2652
2520
  subUnitId: e.unitId,
2653
2521
  drawing: e,
@@ -2669,27 +2537,27 @@ let lt = class extends Ue {
2669
2537
  height: c,
2670
2538
  angle: d
2671
2539
  };
2672
- const { mainComponent: u } = n, h = u, { top: f, pageLayoutType: p, pageMarginLeft: v, pageMarginTop: w } = h;
2673
- let y = s;
2540
+ const { mainComponent: u } = n, h = u, { top: f, pageLayoutType: v, pageMarginLeft: p, pageMarginTop: w } = h;
2541
+ let O = s;
2674
2542
  this._liquid.reset();
2675
2543
  for (const D of g) {
2676
- const { marginBottom: O, pageHeight: C } = D, M = g.indexOf(D), E = g[M + 1];
2544
+ const { marginBottom: y, pageHeight: x } = D, M = g.indexOf(D), E = g[M + 1];
2677
2545
  if (E == null)
2678
2546
  continue;
2679
- if (Ce.hasIntersectionBetweenTwoRanges(
2547
+ if (be.hasIntersectionBetweenTwoRanges(
2680
2548
  s,
2681
2549
  s + c,
2682
- this._liquid.y + f + C - O,
2683
- this._liquid.y + f + C + w + E.marginTop
2550
+ this._liquid.y + f + x - y,
2551
+ this._liquid.y + f + x + w + E.marginTop
2684
2552
  )) {
2685
- const N = s + c / 2, I = this._liquid.y + f + C + w / 2;
2686
- N < I ? y = Math.min(s, this._liquid.y + f + C - O - c) : y = Math.max(s, this._liquid.y + f + C + w + E.marginTop);
2553
+ const N = s + c / 2, I = this._liquid.y + f + x + w / 2;
2554
+ N < I ? O = Math.min(s, this._liquid.y + f + x - y - c) : O = Math.max(s, this._liquid.y + f + x + w + E.marginTop);
2687
2555
  }
2688
- this._liquid.translatePage(D, p, v, w);
2556
+ this._liquid.translatePage(D, v, p, w);
2689
2557
  }
2690
2558
  return {
2691
2559
  left: r,
2692
- top: y,
2560
+ top: O,
2693
2561
  width: o,
2694
2562
  height: c,
2695
2563
  angle: d
@@ -2700,7 +2568,7 @@ let lt = class extends Ue {
2700
2568
  if (n && r.top !== t.top)
2701
2569
  return;
2702
2570
  const s = this._getDrawingAnchor(e, r), { offset: o, docTransform: c, segmentId: d, segmentPage: a } = s != null ? s : {};
2703
- return o == null || c == null ? this._updateMultipleDrawingDocTransform(/* @__PURE__ */ new Map([[e.drawingId, t]])) : this._commandService.executeCommand(Mn.id, {
2571
+ return o == null || c == null ? this._updateMultipleDrawingDocTransform(/* @__PURE__ */ new Map([[e.drawingId, t]])) : this._commandService.executeCommand(bn.id, {
2704
2572
  unitId: e.unitId,
2705
2573
  subUnitId: e.unitId,
2706
2574
  drawing: e,
@@ -2720,7 +2588,7 @@ let lt = class extends Ue {
2720
2588
  return { scene: n, transformer: r };
2721
2589
  }
2722
2590
  _getTransformCoordForDocumentOffset(e, t, n, r) {
2723
- const { documentTransform: s } = e.getOffsetConfig(), o = t.transformVector2SceneCoord(mi.FromArray([n, r]));
2591
+ const { documentTransform: s } = e.getOffsetConfig(), o = t.transformVector2SceneCoord(pi.FromArray([n, r]));
2724
2592
  if (o)
2725
2593
  return s.clone().invert().applyPoint(o);
2726
2594
  }
@@ -2731,23 +2599,23 @@ let lt = class extends Ue {
2731
2599
  const { mainComponent: r, scene: s } = n, o = r, {
2732
2600
  docsLeft: c,
2733
2601
  docsTop: d
2734
- } = o.getOffsetConfig(), a = Ei(t), { left: l, top: g, height: u } = a, h = l + c, f = g + d;
2602
+ } = o.getOffsetConfig(), a = Ri(t), { left: l, top: g, height: u } = a, h = l + c, f = g + d;
2735
2603
  if (this._anchorShape) {
2736
2604
  this._anchorShape.transformByState({ left: h, top: f, height: u }), this._anchorShape.show();
2737
2605
  return;
2738
2606
  }
2739
- const p = 6, v = new vi(Tr + Ce.generateRandomId(p), {
2607
+ const v = 6, p = new vi(Mr + be.generateRandomId(v), {
2740
2608
  left: h,
2741
2609
  top: f,
2742
2610
  height: u,
2743
2611
  strokeWidth: 2,
2744
- stroke: pi(qn.darkGray, 1),
2612
+ stroke: wi(Kn.darkGray, 1),
2745
2613
  evented: !1
2746
2614
  });
2747
- this._anchorShape = v, s.addObject(v, Ri);
2615
+ this._anchorShape = p, s.addObject(p, Ai);
2748
2616
  }
2749
2617
  _getDocObject() {
2750
- return Ai(this._univerInstanceService, this._renderManagerService);
2618
+ return Pi(this._univerInstanceService, this._renderManagerService);
2751
2619
  }
2752
2620
  _getPageContentSize(e) {
2753
2621
  const t = this._renderManagerService.getRenderById(e.unitId), n = t == null ? void 0 : t.with(te).getSkeleton(), r = 500, s = 500, o = n == null ? void 0 : n.getSkeletonData();
@@ -2778,25 +2646,25 @@ let lt = class extends Ue {
2778
2646
  };
2779
2647
  }
2780
2648
  };
2781
- lt = Or([
2782
- it(0, G),
2783
- it(1, z),
2784
- it(2, ve),
2785
- it(3, Q)
2786
- ], lt);
2787
- var Mr = Object.getOwnPropertyDescriptor, br = (i, e, t, n) => {
2788
- for (var r = n > 1 ? void 0 : n ? Mr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
2649
+ dt = Tr([
2650
+ nt(0, j),
2651
+ nt(1, z),
2652
+ nt(2, me),
2653
+ nt(3, Q)
2654
+ ], dt);
2655
+ var br = Object.getOwnPropertyDescriptor, xr = (i, e, t, n) => {
2656
+ for (var r = n > 1 ? void 0 : n ? br(e, t) : e, s = i.length - 1, o; s >= 0; s--)
2789
2657
  (o = i[s]) && (r = o(r) || r);
2790
2658
  return r;
2791
- }, Xe = (i, e) => (t, n) => e(t, n, i);
2792
- let ut = class extends Kn {
2659
+ }, ze = (i, e) => (t, n) => e(t, n, i);
2660
+ let lt = class extends Yn {
2793
2661
  constructor(e, t, n, r, s) {
2794
2662
  super();
2795
- _e(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
2663
+ Ie(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
2796
2664
  this._drawingManagerService = e, this._canvasPopManagerService = t, this._renderManagerService = n, this._univerInstanceService = r, this._contextService = s, this._init();
2797
2665
  }
2798
2666
  _init() {
2799
- this._univerInstanceService.getCurrentTypeOfUnit$(Ie.UNIVER_DOC).pipe($t(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(Ie.UNIVER_DOC).pipe($t(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(Ie.UNIVER_DOC).forEach((e) => this._create(e));
2667
+ this._univerInstanceService.getCurrentTypeOfUnit$(we.UNIVER_DOC).pipe($t(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(we.UNIVER_DOC).pipe($t(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(we.UNIVER_DOC).forEach((e) => this._create(e));
2800
2668
  }
2801
2669
  _dispose(e) {
2802
2670
  const t = e.getUnitId();
@@ -2811,7 +2679,7 @@ let ut = class extends Kn {
2811
2679
  _hasCropObject(e) {
2812
2680
  const t = e.getAllObjects();
2813
2681
  for (const n of t)
2814
- if (n instanceof di)
2682
+ if (n instanceof li)
2815
2683
  return !0;
2816
2684
  return !1;
2817
2685
  }
@@ -2826,7 +2694,7 @@ let ut = class extends Kn {
2826
2694
  return;
2827
2695
  const r = [];
2828
2696
  this.disposeWithMe(
2829
- ye(
2697
+ De(
2830
2698
  n.createControl$.subscribe(() => {
2831
2699
  if (this._hasCropObject(t))
2832
2700
  return;
@@ -2837,12 +2705,12 @@ let ut = class extends Kn {
2837
2705
  if (!c)
2838
2706
  return;
2839
2707
  const d = c.oKey, a = this._drawingManagerService.getDrawingOKey(d);
2840
- if (!a || a.drawingType === Le.DRAWING_DOM)
2708
+ if (!a || a.drawingType === Pe.DRAWING_DOM)
2841
2709
  return;
2842
2710
  const { unitId: l, subUnitId: g, drawingId: u, drawingType: h } = a, f = this._canvasPopManagerService.attachPopupToObject(
2843
2711
  c,
2844
2712
  {
2845
- componentKey: li,
2713
+ componentKey: ui,
2846
2714
  direction: "horizontal",
2847
2715
  offset: [2, 0],
2848
2716
  extraProps: {
@@ -2859,19 +2727,19 @@ let ut = class extends Kn {
2859
2727
  })
2860
2728
  )
2861
2729
  ), this.disposeWithMe(
2862
- ye(
2730
+ De(
2863
2731
  n.clearControl$.subscribe(() => {
2864
- r.forEach((o) => o.dispose()), r.length = 0, this._contextService.setContextValue(rt, !1), this._drawingManagerService.focusDrawing(null);
2732
+ r.forEach((o) => o.dispose()), r.length = 0, this._contextService.setContextValue(it, !1), this._drawingManagerService.focusDrawing(null);
2865
2733
  })
2866
2734
  )
2867
2735
  ), this.disposeWithMe(
2868
- ye(
2736
+ De(
2869
2737
  n.changing$.subscribe(() => {
2870
2738
  r.forEach((o) => o.dispose()), r.length = 0;
2871
2739
  })
2872
2740
  )
2873
2741
  ), this.disposeWithMe(
2874
- ye(
2742
+ De(
2875
2743
  n.changeStart$.subscribe(() => {
2876
2744
  r.forEach((o) => o.dispose()), r.length = 0;
2877
2745
  })
@@ -2883,7 +2751,7 @@ let ut = class extends Kn {
2883
2751
  {
2884
2752
  label: "image-popup.edit",
2885
2753
  index: 0,
2886
- commandId: xn.id,
2754
+ commandId: Nn.id,
2887
2755
  commandParams: { unitId: e, subUnitId: t, drawingId: n },
2888
2756
  // disable: !!SHEET_EDITOR_UNITS.includes(unitId) || drawingType === DrawingTypeEnum.DRAWING_DOM,
2889
2757
  disable: !0
@@ -2898,7 +2766,7 @@ let ut = class extends Kn {
2898
2766
  {
2899
2767
  label: "image-popup.crop",
2900
2768
  index: 2,
2901
- commandId: ui.id,
2769
+ commandId: gi.id,
2902
2770
  commandParams: { unitId: e, subUnitId: t, drawingId: n },
2903
2771
  disable: !0
2904
2772
  // TODO: @JOCS, feature is not ready.
@@ -2906,7 +2774,7 @@ let ut = class extends Kn {
2906
2774
  {
2907
2775
  label: "image-popup.reset",
2908
2776
  index: 3,
2909
- commandId: gi.id,
2777
+ commandId: fi.id,
2910
2778
  commandParams: [{ unitId: e, subUnitId: t, drawingId: n }],
2911
2779
  disable: !0
2912
2780
  // TODO: @JOCS, feature is not ready.
@@ -2914,22 +2782,22 @@ let ut = class extends Kn {
2914
2782
  ];
2915
2783
  }
2916
2784
  };
2917
- ut = br([
2918
- Xe(0, ve),
2919
- Xe(1, Z(Pi)),
2920
- Xe(2, Q),
2921
- Xe(3, z),
2922
- Xe(4, Qt)
2923
- ], ut);
2924
- var Cr = Object.getOwnPropertyDescriptor, xr = (i, e, t, n) => {
2785
+ lt = xr([
2786
+ ze(0, me),
2787
+ ze(1, Z(Li)),
2788
+ ze(2, Q),
2789
+ ze(3, z),
2790
+ ze(4, Qt)
2791
+ ], lt);
2792
+ var Cr = Object.getOwnPropertyDescriptor, Nr = (i, e, t, n) => {
2925
2793
  for (var r = n > 1 ? void 0 : n ? Cr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
2926
2794
  (o = i[s]) && (r = o(r) || r);
2927
2795
  return r;
2928
- }, Pe = (i, e) => (t, n) => e(t, n, i);
2929
- let St = class extends Ue {
2796
+ }, Ae = (i, e) => (t, n) => e(t, n, i);
2797
+ let St = class extends Le {
2930
2798
  constructor(e, t, n, r, s, o, c, d) {
2931
2799
  super();
2932
- _e(this, "_liquid", new nn());
2800
+ Ie(this, "_liquid", new nn());
2933
2801
  this._context = e, this._docSkeletonManagerService = t, this._commandService = n, this._editorService = r, this._drawingManagerService = s, this._docRefreshDrawingsService = o, this._univerInstanceService = c, this._lifecycleService = d, this._initialize(), this._commandExecutedListener();
2934
2802
  }
2935
2803
  _initialize() {
@@ -2953,7 +2821,7 @@ let St = class extends Ue {
2953
2821
  const c = this._docSkeletonManagerService.getSkeleton();
2954
2822
  if (c == null)
2955
2823
  return;
2956
- if (this._editorService.isEditor(s) && s !== yt) {
2824
+ if (this._editorService.isEditor(s) && s !== Ot) {
2957
2825
  o == null || o.makeDirty();
2958
2826
  return;
2959
2827
  }
@@ -2965,8 +2833,8 @@ let St = class extends Ue {
2965
2833
  _initResize() {
2966
2834
  this.disposeWithMe(
2967
2835
  Jt(this._context.engine.onTransformChange$).pipe(
2968
- zt((e) => e.type === wi.resize),
2969
- ln(16)
2836
+ zt((e) => e.type === Ii.resize),
2837
+ un(16)
2970
2838
  ).subscribe(() => {
2971
2839
  var n;
2972
2840
  const e = this._docSkeletonManagerService.getSkeleton(), { scene: t } = this._context;
@@ -2975,16 +2843,16 @@ let St = class extends Ue {
2975
2843
  );
2976
2844
  }
2977
2845
  _refreshDrawing(e) {
2978
- var y, D;
2846
+ var O, D;
2979
2847
  const t = e == null ? void 0 : e.getSkeletonData(), { mainComponent: n, unitId: r } = this._context, s = n;
2980
2848
  if (!t)
2981
2849
  return;
2982
2850
  const { left: o, top: c, pageLayoutType: d, pageMarginLeft: a, pageMarginTop: l } = s, { pages: g, skeHeaders: u, skeFooters: h } = t, f = {};
2983
2851
  this._liquid.reset();
2984
- for (let O = 0, C = g.length; O < C; O++) {
2985
- const M = g[O], { headerId: E, footerId: U, pageWidth: N } = M;
2852
+ for (let y = 0, x = g.length; y < x; y++) {
2853
+ const M = g[y], { headerId: E, footerId: U, pageWidth: N } = M;
2986
2854
  if (E) {
2987
- const I = (y = u.get(E)) == null ? void 0 : y.get(N);
2855
+ const I = (O = u.get(E)) == null ? void 0 : O.get(N);
2988
2856
  I && this._calculateDrawingPosition(
2989
2857
  r,
2990
2858
  I,
@@ -3009,8 +2877,8 @@ let St = class extends Ue {
3009
2877
  }
3010
2878
  this._calculateDrawingPosition(r, M, o, c, f, M.marginTop, M.marginLeft), this._liquid.translatePage(M, d, a, l);
3011
2879
  }
3012
- const p = Object.values(f), v = p.filter((O) => !O.isMultiTransform), w = p.filter((O) => O.isMultiTransform);
3013
- v.length > 0 && this._drawingManagerService.refreshTransform(v), this._handleMultiDrawingsTransform(w);
2880
+ const v = Object.values(f), p = v.filter((y) => !y.isMultiTransform), w = v.filter((y) => y.isMultiTransform);
2881
+ p.length > 0 && this._drawingManagerService.refreshTransform(p), this._handleMultiDrawingsTransform(w);
3014
2882
  }
3015
2883
  _handleMultiDrawingsTransform(e) {
3016
2884
  const { scene: t, unitId: n } = this._context, r = t.getTransformerByCreate();
@@ -3031,22 +2899,22 @@ let St = class extends Ue {
3031
2899
  marginTop: o,
3032
2900
  marginLeft: c
3033
2901
  }), d.forEach((a) => {
3034
- const { aLeft: l, aTop: g, height: u, width: h, angle: f, drawingId: p, drawingOrigin: v } = a, w = v.layoutType === F.WRAP_NONE && v.behindDoc === se.TRUE, { isMultiTransform: y = se.FALSE } = v, D = {
2902
+ const { aLeft: l, aTop: g, height: u, width: h, angle: f, drawingId: v, drawingOrigin: p } = a, w = p.layoutType === k.WRAP_NONE && p.behindDoc === se.TRUE, { isMultiTransform: O = se.FALSE } = p, D = {
3035
2903
  left: l + n + this._liquid.x,
3036
2904
  top: g + r + this._liquid.y,
3037
2905
  width: h,
3038
2906
  height: u,
3039
2907
  angle: f
3040
2908
  };
3041
- s[p] == null ? s[p] = {
2909
+ s[v] == null ? s[v] = {
3042
2910
  unitId: e,
3043
2911
  subUnitId: e,
3044
- drawingId: p,
2912
+ drawingId: v,
3045
2913
  behindText: w,
3046
2914
  transform: D,
3047
2915
  transforms: [D],
3048
- isMultiTransform: y
3049
- } : y === se.TRUE && s[p].transforms.push(D);
2916
+ isMultiTransform: O
2917
+ } : O === se.TRUE && s[v].transforms.push(D);
3050
2918
  }), this._liquid.restorePagePadding({
3051
2919
  marginTop: o,
3052
2920
  marginLeft: c
@@ -3060,73 +2928,73 @@ let St = class extends Ue {
3060
2928
  this._lifecycleService.stage >= Rt.Rendered ? this._docSkeletonManagerService.getSkeleton() ? e() : setTimeout(e, 500) : this._lifecycleService.lifecycle$.pipe(zt((t) => t === Rt.Rendered)).subscribe(e);
3061
2929
  }
3062
2930
  };
3063
- St = xr([
3064
- Pe(1, Z(te)),
3065
- Pe(2, G),
3066
- Pe(3, Li),
3067
- Pe(4, ve),
3068
- Pe(5, Z(ht)),
3069
- Pe(6, z),
3070
- Pe(7, Z(Yn))
2931
+ St = Nr([
2932
+ Ae(1, Z(te)),
2933
+ Ae(2, j),
2934
+ Ae(3, Ui),
2935
+ Ae(4, me),
2936
+ Ae(5, Z(ft)),
2937
+ Ae(6, z),
2938
+ Ae(7, Z(Zn))
3071
2939
  ], St);
3072
- var Nr = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, Rr = (i, e, t) => e in i ? Nr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Ar = (i, e, t, n) => {
3073
- for (var r = n > 1 ? void 0 : n ? Er(e, t) : e, s = i.length - 1, o; s >= 0; s--)
2940
+ var Er = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, Ar = (i, e, t) => e in i ? Er(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Pr = (i, e, t, n) => {
2941
+ for (var r = n > 1 ? void 0 : n ? Rr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
3074
2942
  (o = i[s]) && (r = o(r) || r);
3075
2943
  return r;
3076
- }, _t = (i, e) => (t, n) => e(t, n, i), Pn = (i, e, t) => Rr(i, typeof e != "symbol" ? e + "" : e, t);
3077
- const Pr = "DOC_DRAWING_UI_PLUGIN";
3078
- let gt = class extends Jn {
2944
+ }, It = (i, e) => (t, n) => e(t, n, i), Ln = (i, e, t) => Ar(i, typeof e != "symbol" ? e + "" : e, t);
2945
+ const Lr = "DOC_DRAWING_UI_PLUGIN";
2946
+ let ut = class extends ei {
3079
2947
  constructor(i = Xt, e, t, n) {
3080
2948
  super(), this._config = i, this._injector = e, this._renderManagerSrv = t, this._configService = n;
3081
- const { ...r } = ei(
2949
+ const { ...r } = ti(
3082
2950
  {},
3083
2951
  Xt,
3084
2952
  this._config
3085
2953
  );
3086
- this._configService.setConfig(Vi, r);
2954
+ this._configService.setConfig($i, r);
3087
2955
  }
3088
2956
  onStarting() {
3089
2957
  [
3090
- [ot],
3091
- [ut],
2958
+ [st],
3092
2959
  [lt],
2960
+ [dt],
2961
+ [ot],
2962
+ [ft],
3093
2963
  [at],
3094
- [ht],
3095
- [ct],
3096
- [dt]
2964
+ [ct]
3097
2965
  ].forEach((e) => this._injector.add(e));
3098
2966
  }
3099
2967
  onReady() {
3100
2968
  [
3101
- [st],
2969
+ [rt],
3102
2970
  [St]
3103
- ].forEach((i) => this._renderManagerSrv.registerRenderModule(Ie.UNIVER_DOC, i)), this._injector.get(at), this._injector.get(ot), this._injector.get(lt), this._injector.get(dt);
2971
+ ].forEach((i) => this._renderManagerSrv.registerRenderModule(we.UNIVER_DOC, i)), this._injector.get(ot), this._injector.get(st), this._injector.get(dt), this._injector.get(ct);
3104
2972
  }
3105
2973
  onRendered() {
3106
- this._injector.get(ut), this._injector.get(ct);
2974
+ this._injector.get(lt), this._injector.get(at);
3107
2975
  }
3108
2976
  };
3109
- Pn(gt, "type", Ie.UNIVER_DOC);
3110
- Pn(gt, "pluginName", Pr);
3111
- gt = Ar([
3112
- Zn(fi, ai, ti, Ci),
3113
- _t(1, Z(en)),
3114
- _t(2, Q),
3115
- _t(3, Qn)
3116
- ], gt);
2977
+ Ln(ut, "type", we.UNIVER_DOC);
2978
+ Ln(ut, "pluginName", Lr);
2979
+ ut = Pr([
2980
+ Qn(hi, ci, ni, Ci),
2981
+ It(1, Z(en)),
2982
+ It(2, Q),
2983
+ It(3, Jn)
2984
+ ], ut);
3117
2985
  export {
3118
- Ji as ClearDocDrawingTransformerOperation,
3119
- En as DOCS_IMAGE_MENU_ID,
2986
+ er as ClearDocDrawingTransformerOperation,
2987
+ Rn as DOCS_IMAGE_MENU_ID,
3120
2988
  vn as DeleteDocDrawingsCommand,
3121
- ct as DocFloatDomController,
3122
- xn as EditDocDrawingOperation,
3123
- pn as GroupDocDrawingCommand,
3124
- Ct as InsertDocDrawingCommand,
3125
- _n as InsertDocImageCommand,
3126
- Ze as MoveDocDrawingsCommand,
2989
+ at as DocFloatDomController,
2990
+ Nn as EditDocDrawingOperation,
2991
+ wn as GroupDocDrawingCommand,
2992
+ xt as InsertDocDrawingCommand,
2993
+ Sn as InsertDocImageCommand,
2994
+ Ye as MoveDocDrawingsCommand,
3127
2995
  bt as RemoveDocDrawingCommand,
3128
- wn as SetDocDrawingArrangeCommand,
2996
+ In as SetDocDrawingArrangeCommand,
3129
2997
  Cn as SidebarDocDrawingOperation,
3130
- In as UngroupDocDrawingCommand,
3131
- gt as UniverDocsDrawingUIPlugin
2998
+ _n as UngroupDocDrawingCommand,
2999
+ ut as UniverDocsDrawingUIPlugin
3132
3000
  };