@univerjs/docs-drawing-ui 0.6.0-nightly.202502111606 → 0.6.0-nightly.202502131606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,25 +1,25 @@
1
- var Dt = Object.defineProperty;
2
- var Ot = (i, e, n) => e in i ? Dt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
- var Ce = (i, e, n) => Ot(i, typeof e != "symbol" ? e + "" : e, n);
4
- import { Disposable as Xe, UndoCommand as Pt, RedoCommand as Tt, IUniverInstanceService as Q, ICommandService as z, JSONX as q, PositionedObjectLayoutType as H, CommandType as K, BooleanNumber as oe, ObjectRelativeFromH as ne, ObjectRelativeFromV as V, Tools as be, TextX as vn, TextXActionType as Z, toDisposable as Le, throttle as On, COLORS as bt, MemoryCursor as yt, IUndoRedoService as Gn, BuildTextUtils as Mt, ArrangeTypeEnum as Ze, Inject as ve, LocaleService as ln, DrawingTypeEnum as Rt, WrapTextType as $e, FOCUSING_COMMON_DRAWINGS as tn, IContextService as Vn, UniverInstanceType as ye, Direction as fe, useDependency as we, DocumentFlavor as fn, FOCUSING_UNIVER_EDITOR as Nt, RxDisposable as At, SHEET_EDITOR_UNITS as Et, LifecycleService as xt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Lt, fromEventSubject as Bt, LifecycleStages as Pn, DependentOn as Ut, Injector as Ft, Plugin as kt, merge as Ht, IConfigService as Wt } from "@univerjs/core";
5
- import { IDocDrawingService as Be, UniverDocsDrawingPlugin as Gt } from "@univerjs/docs-drawing";
6
- import { IDrawingManagerService as Ie, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Vt, DRAWING_IMAGE_COUNT_LIMIT as Tn, ImageUploadStatusType as hn, DRAWING_IMAGE_ALLOW_SIZE as jt, getImageSize as $t, getDrawingShapeKeyByDrawingSearch as zt, IImageIoService as qt, DRAWING_IMAGE_WIDTH_LIMIT as bn, DRAWING_IMAGE_HEIGHT_LIMIT as yn, UniverDrawingPlugin as Xt } from "@univerjs/drawing";
7
- import { DrawingCommonPanel as Kt, ImageCropperObject as Yt, COMPONENT_IMAGE_POPUP_MENU as Zt, OpenImageCropOperation as Qt, ImageResetSizeOperation as Jt, UniverDrawingUIPlugin as ei } from "@univerjs/drawing-ui";
8
- import { IRenderManagerService as ee, DocumentEditArea as ke, Liquid as jn, PageLayoutType as Mn, DocumentSkeletonPageType as Rn, Vector2 as ni, Rect as ti, getColor as ii, TRANSFORM_CHANGE_OBSERVABLE_TYPE as ri } from "@univerjs/engine-render";
9
- import { IMessageService as oi, ILocalFileService as si, ISidebarService as ai, MenuItemType as $n, getMenuHiddenObservable as zn, RibbonStartGroup as ci, KeyCode as He, ComponentManager as di, IMenuManagerService as li, IShortcutService as gi, UniverUIPlugin as mi } from "@univerjs/ui";
1
+ var Ct = Object.defineProperty;
2
+ var Dt = (i, e, n) => e in i ? Ct(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
+ var Ce = (i, e, n) => Dt(i, typeof e != "symbol" ? e + "" : e, n);
4
+ import { Disposable as Xe, UndoCommand as Ot, RedoCommand as Tt, JSONX as q, IUniverInstanceService as Q, ICommandService as z, PositionedObjectLayoutType as H, CommandType as K, BooleanNumber as oe, ObjectRelativeFromH as ne, ObjectRelativeFromV as V, Tools as ye, TextX as vn, TextXActionType as Z, toDisposable as Le, throttle as On, COLORS as Pt, MemoryCursor as yt, IUndoRedoService as Gn, BuildTextUtils as bt, ArrangeTypeEnum as Ze, Inject as ve, IContextService as Vn, LocaleService as ln, WrapTextType as $e, DrawingTypeEnum as Mt, FOCUSING_COMMON_DRAWINGS as tn, UniverInstanceType as be, Direction as fe, DocumentFlavor as fn, FOCUSING_UNIVER_EDITOR as Rt, RxDisposable as Nt, SHEET_EDITOR_UNITS as At, LifecycleService as Et, DOCS_ZEN_EDITOR_UNIT_ID_KEY as xt, fromEventSubject as Lt, LifecycleStages as Tn, DependentOn as Bt, Injector as Ut, IConfigService as kt, Plugin as Ft, merge as Ht } from "@univerjs/core";
5
+ import { IDocDrawingService as Be, UniverDocsDrawingPlugin as Wt } from "@univerjs/docs-drawing";
6
+ import { IDrawingManagerService as Ie, IImageIoService as Gt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Vt, DRAWING_IMAGE_COUNT_LIMIT as Pn, ImageUploadStatusType as hn, DRAWING_IMAGE_ALLOW_SIZE as jt, getImageSize as $t, getDrawingShapeKeyByDrawingSearch as zt, DRAWING_IMAGE_WIDTH_LIMIT as yn, DRAWING_IMAGE_HEIGHT_LIMIT as bn, UniverDrawingPlugin as qt } from "@univerjs/drawing";
7
+ import { DrawingCommonPanel as Xt, ImageCropperObject as Kt, COMPONENT_IMAGE_POPUP_MENU as Yt, OpenImageCropOperation as Zt, ImageResetSizeOperation as Qt, UniverDrawingUIPlugin as Jt } from "@univerjs/drawing-ui";
8
+ import { IRenderManagerService as ee, DocumentEditArea as Fe, Liquid as jn, PageLayoutType as Mn, DocumentSkeletonPageType as Rn, Vector2 as ei, Rect as ni, getColor as ti, TRANSFORM_CHANGE_OBSERVABLE_TYPE as ii } from "@univerjs/engine-render";
9
+ import { IMessageService as ri, ILocalFileService as oi, ISidebarService as si, useDependency as we, getMenuHiddenObservable as $n, MenuItemType as zn, RibbonStartGroup as ai, KeyCode as He, ComponentManager as ci, IMenuManagerService as di, IShortcutService as li, UniverUIPlugin as gi } from "@univerjs/ui";
10
10
  import { RichTextEditingMutation as J, DocSkeletonManagerService as se, DocSelectionManagerService as In } from "@univerjs/docs";
11
- import { DocSelectionRenderService as Me, getRichTextEditPath as ze, NodePositionConvertToCursor as Nn, getOneTextSelectionRange as An, getAnchorBounding as ui, TEXT_RANGE_LAYER_INDEX as fi, getDocObject as hi, getCustomBlockIdsInSelections as pi, docDrawingPositionToTransform as wi, DocCanvasPopManagerService as vi, IEditorService as Ii, SetDocZoomRatioOperation as _i } from "@univerjs/docs-ui";
12
- import { BehaviorSubject as Si, debounceTime as qn, Observable as Ci, takeUntil as En, filter as xn } from "rxjs";
13
- import { MessageType as Ln, InputNumber as Fe, Select as Bn, Checkbox as Di, RadioGroup as Un, Radio as Te } from "@univerjs/design";
11
+ import { DocSelectionRenderService as Me, getRichTextEditPath as ze, NodePositionConvertToCursor as Nn, getOneTextSelectionRange as An, getAnchorBounding as mi, TEXT_RANGE_LAYER_INDEX as ui, getDocObject as fi, getCustomBlockIdsInSelections as hi, docDrawingPositionToTransform as pi, DocCanvasPopManagerService as wi, IEditorService as vi, SetDocZoomRatioOperation as Ii } from "@univerjs/docs-ui";
12
+ import { BehaviorSubject as _i, debounceTime as qn, Observable as Si, takeUntil as En, filter as xn } from "rxjs";
13
+ import { MessageType as Ln, InputNumber as ke, Select as Bn, Checkbox as Ci, RadioGroup as Un, Radio as Pe } from "@univerjs/design";
14
14
  import { jsxs as X, jsx as f } from "react/jsx-runtime";
15
- import { forwardRef as Xn, useRef as Oi, createElement as Kn, useState as re, useEffect as _n } from "react";
16
- const Pi = "docs-drawing-ui.config", Fn = {};
17
- var Ti = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, yi = (i, e, n, t) => {
18
- for (var r = t > 1 ? void 0 : t ? bi(e, n) : e, o = i.length - 1, s; o >= 0; o--)
19
- (s = i[o]) && (r = (t ? s(e, n, r) : s(r)) || r);
20
- return t && r && Ti(e, n, r), r;
15
+ import { forwardRef as Xn, useRef as Di, createElement as Kn, useState as re, useEffect as _n } from "react";
16
+ const Oi = "docs-drawing-ui.config", kn = {};
17
+ var Ti = Object.getOwnPropertyDescriptor, Pi = (i, e, n, t) => {
18
+ for (var r = t > 1 ? void 0 : t ? Ti(e, n) : e, o = i.length - 1, s; o >= 0; o--)
19
+ (s = i[o]) && (r = s(r) || r);
20
+ return r;
21
21
  }, Ve = (i, e) => (n, t) => e(n, t, i);
22
- function Mi(i) {
22
+ function yi(i) {
23
23
  var t, r, o, s;
24
24
  if (q.isNoop(i) || !Array.isArray(i))
25
25
  return null;
@@ -42,7 +42,7 @@ function Mi(i) {
42
42
  });
43
43
  return n;
44
44
  }
45
- function Ri(i) {
45
+ function bi(i) {
46
46
  if (!Array.isArray(i) || i.length < 3 || i[0] !== "drawingsOrder")
47
47
  return [];
48
48
  const e = [];
@@ -69,7 +69,7 @@ let rn = class extends Xe {
69
69
  this._commandService.beforeCommandExecuted((i) => {
70
70
  if (i.id !== J.id)
71
71
  return;
72
- const e = i.params, { unitId: n, actions: t } = e, r = Mi(t);
72
+ const e = i.params, { unitId: n, actions: t } = e, r = yi(t);
73
73
  if (r != null)
74
74
  for (const { type: o, drawingId: s, drawing: c } of r)
75
75
  o === "add" ? this._addDrawings(n, [c]) : this._removeDrawings(n, [s]);
@@ -79,12 +79,12 @@ let rn = class extends Xe {
79
79
  if (i.id !== J.id)
80
80
  return;
81
81
  const e = i.params, { unitId: n, actions: t } = e;
82
- Ri(t).length > 0 && this._updateDrawingsOrder(n);
82
+ bi(t).length > 0 && this._updateDrawingsOrder(n);
83
83
  })
84
84
  ), this.disposeWithMe(
85
85
  this._commandService.onCommandExecuted((i) => {
86
86
  var s;
87
- if (i.id !== Pt.id && i.id !== Tt.id)
87
+ if (i.id !== Ot.id && i.id !== Tt.id)
88
88
  return;
89
89
  const e = (s = this._univerInstanceService.getCurrentUniverDocInstance()) == null ? void 0 : s.getUnitId(), n = this._drawingManagerService.getFocusDrawings();
90
90
  if (e == null || n.length === 0)
@@ -125,7 +125,7 @@ let rn = class extends Xe {
125
125
  t.orderNotification(o), r.orderNotification(o);
126
126
  }
127
127
  };
128
- rn = yi([
128
+ rn = Pi([
129
129
  Ve(0, Q),
130
130
  Ve(1, z),
131
131
  Ve(2, Ie),
@@ -134,7 +134,7 @@ rn = yi([
134
134
  ], rn);
135
135
  class gn {
136
136
  constructor() {
137
- Ce(this, "_refreshDrawings$", new Si(null));
137
+ Ce(this, "_refreshDrawings$", new _i(null));
138
138
  Ce(this, "refreshDrawings$", this._refreshDrawings$.asObservable());
139
139
  }
140
140
  refreshDrawings(e) {
@@ -142,7 +142,7 @@ class gn {
142
142
  }
143
143
  }
144
144
  var ue = /* @__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))(ue || {});
145
- const Ni = {
145
+ const Mi = {
146
146
  inline: H.INLINE,
147
147
  wrapSquare: H.WRAP_SQUARE,
148
148
  wrapTopAndBottom: H.WRAP_TOP_AND_BOTTOM,
@@ -151,12 +151,12 @@ const Ni = {
151
151
  };
152
152
  function Yn(i, e, n, t, r, o, s) {
153
153
  var p, h;
154
- const c = new vn(), d = q.getInstance(), a = [], l = o.getSelfOrHeaderFooterModel(e).getBody(), u = o.getSelfOrHeaderFooterModel(i).getBody();
155
- if (l == null || u == null)
154
+ const c = new vn(), d = q.getInstance(), a = [], l = o.getSelfOrHeaderFooterModel(e).getBody(), m = o.getSelfOrHeaderFooterModel(i).getBody();
155
+ if (l == null || m == null)
156
156
  return;
157
157
  const g = (h = (p = l.customBlocks) == null ? void 0 : p.find((v) => v.blockId === r)) == null ? void 0 : h.startIndex;
158
158
  if (g != null) {
159
- if (t = Math.min(u.dataStream.length - 2, t), i === e) {
159
+ if (t = Math.min(m.dataStream.length - 2, t), i === e) {
160
160
  if (t < g ? (t > 0 && c.push({
161
161
  t: Z.RETAIN,
162
162
  len: t
@@ -234,41 +234,41 @@ const Zn = {
234
234
  var A, U;
235
235
  if (e == null)
236
236
  return !1;
237
- const { drawings: n, wrappingStyle: t, unitId: r } = e, o = i.get(z), s = i.get(Q), d = i.get(ee).getRenderById(r), a = d == null ? void 0 : d.with(se).getSkeleton().getSkeletonData(), l = d == null ? void 0 : d.with(se).getViewModel(), u = d == null ? void 0 : d.scene, g = s.getCurrentUniverDocInstance();
238
- if (g == null || a == null || u == null || l == null)
237
+ const { drawings: n, wrappingStyle: t, unitId: r } = e, o = i.get(z), s = i.get(Q), d = i.get(ee).getRenderById(r), a = d == null ? void 0 : d.with(se).getSkeleton().getSkeletonData(), l = d == null ? void 0 : d.with(se).getViewModel(), m = d == null ? void 0 : d.scene, g = s.getCurrentUniverDocInstance();
238
+ if (g == null || a == null || m == null || l == null)
239
239
  return !1;
240
- const p = l.getEditArea(), h = u.getTransformerByCreate(), { pages: v, skeHeaders: w, skeFooters: S } = a, O = q.getInstance(), D = [], { drawings: P = {} } = g.getSnapshot();
240
+ const p = l.getEditArea(), h = m.getTransformerByCreate(), { pages: v, skeHeaders: w, skeFooters: S } = a, O = q.getInstance(), D = [], { drawings: T = {} } = g.getSnapshot();
241
241
  for (const N of n) {
242
- const { drawingId: I } = N, L = P[I].layoutType, W = Ni[t];
242
+ const { drawingId: I } = N, L = T[I].layoutType, W = Mi[t];
243
243
  if (L !== W) {
244
244
  const C = O.replaceOp(["drawings", I, "layoutType"], L, W);
245
245
  D.push(C);
246
246
  }
247
247
  if (t === "behindText" || t === "inFrontOfText") {
248
- const C = P[I].behindDoc, R = t === "behindText" ? oe.TRUE : oe.FALSE;
248
+ const C = T[I].behindDoc, R = t === "behindText" ? oe.TRUE : oe.FALSE;
249
249
  if (C !== R) {
250
- const T = O.replaceOp(["drawings", I, "behindDoc"], C, R);
251
- D.push(T);
250
+ const P = O.replaceOp(["drawings", I, "behindDoc"], C, R);
251
+ D.push(P);
252
252
  }
253
253
  }
254
254
  if (t === "inline")
255
255
  continue;
256
256
  let x = null, G = 0, _ = 0;
257
257
  for (const C of v) {
258
- const { headerId: R, footerId: T, marginTop: B, marginLeft: F, marginBottom: y, pageWidth: E, pageHeight: $ } = C;
258
+ const { headerId: R, footerId: P, marginTop: B, marginLeft: k, marginBottom: b, pageWidth: E, pageHeight: $ } = C;
259
259
  switch (p) {
260
- case ke.HEADER: {
261
- const k = (A = w.get(R)) == null ? void 0 : A.get(E);
262
- k != null && k.skeDrawings.has(I) && (x = k.skeDrawings.get(I), G = k.marginTop, _ = F);
260
+ case Fe.HEADER: {
261
+ const F = (A = w.get(R)) == null ? void 0 : A.get(E);
262
+ F != null && F.skeDrawings.has(I) && (x = F.skeDrawings.get(I), G = F.marginTop, _ = k);
263
263
  break;
264
264
  }
265
- case ke.FOOTER: {
266
- const k = (U = S.get(T)) == null ? void 0 : U.get(E);
267
- k != null && k.skeDrawings.has(I) && (x = k.skeDrawings.get(I), G = $ - y + k.marginTop, _ = F);
265
+ case Fe.FOOTER: {
266
+ const F = (U = S.get(P)) == null ? void 0 : U.get(E);
267
+ F != null && F.skeDrawings.has(I) && (x = F.skeDrawings.get(I), G = $ - b + F.marginTop, _ = k);
268
268
  break;
269
269
  }
270
- case ke.BODY: {
271
- C.skeDrawings.has(I) && (x = C.skeDrawings.get(I), G = B, _ = F);
270
+ case Fe.BODY: {
271
+ C.skeDrawings.has(I) && (x = C.skeDrawings.get(I), G = B, _ = k);
272
272
  break;
273
273
  }
274
274
  }
@@ -276,27 +276,27 @@ const Zn = {
276
276
  break;
277
277
  }
278
278
  if (x != null) {
279
- const { aTop: C, aLeft: R } = x, T = P[I].docTransform.positionH;
279
+ const { aTop: C, aLeft: R } = x, P = T[I].docTransform.positionH;
280
280
  let B = R;
281
- T.relativeFrom === ne.MARGIN ? B -= _ : T.relativeFrom === ne.COLUMN && (B -= x.columnLeft);
282
- const F = {
283
- relativeFrom: T.relativeFrom,
281
+ P.relativeFrom === ne.MARGIN ? B -= _ : P.relativeFrom === ne.COLUMN && (B -= x.columnLeft);
282
+ const k = {
283
+ relativeFrom: P.relativeFrom,
284
284
  posOffset: B
285
285
  };
286
- if (T.posOffset !== F.posOffset) {
287
- const k = O.replaceOp(["drawings", I, "docTransform", "positionH"], T, F);
288
- D.push(k);
286
+ if (P.posOffset !== k.posOffset) {
287
+ const F = O.replaceOp(["drawings", I, "docTransform", "positionH"], P, k);
288
+ D.push(F);
289
289
  }
290
- const y = P[I].docTransform.positionV;
290
+ const b = T[I].docTransform.positionV;
291
291
  let E = C;
292
- y.relativeFrom === V.PAGE ? E += G : y.relativeFrom === V.LINE ? E -= x.lineTop : y.relativeFrom === V.PARAGRAPH && (E -= x.blockAnchorTop);
292
+ b.relativeFrom === V.PAGE ? E += G : b.relativeFrom === V.LINE ? E -= x.lineTop : b.relativeFrom === V.PARAGRAPH && (E -= x.blockAnchorTop);
293
293
  const $ = {
294
- relativeFrom: y.relativeFrom,
294
+ relativeFrom: b.relativeFrom,
295
295
  posOffset: E
296
296
  };
297
- if (y.posOffset !== $.posOffset) {
298
- const k = O.replaceOp(["drawings", I, "docTransform", "positionV"], y, $);
299
- D.push(k);
297
+ if (b.posOffset !== $.posOffset) {
298
+ const F = O.replaceOp(["drawings", I, "docTransform", "positionV"], b, $);
299
+ D.push(F);
300
300
  }
301
301
  }
302
302
  }
@@ -309,8 +309,8 @@ const Zn = {
309
309
  }
310
310
  };
311
311
  M.params.actions = D.reduce((N, I) => q.compose(N, I), null);
312
- const b = o.syncExecuteCommand(M.id, M.params);
313
- return h.refreshControls(), !!b;
312
+ const y = o.syncExecuteCommand(M.id, M.params);
313
+ return h.refreshControls(), !!y;
314
314
  }
315
315
  }, Qn = {
316
316
  id: "doc.command.update-doc-drawing-distance",
@@ -332,7 +332,7 @@ const Zn = {
332
332
  }
333
333
  }
334
334
  }
335
- const u = {
335
+ const m = {
336
336
  id: J.id,
337
337
  params: {
338
338
  unitId: c,
@@ -340,7 +340,7 @@ const Zn = {
340
340
  textRanges: null
341
341
  }
342
342
  };
343
- return u.params.actions = a.reduce((p, h) => q.compose(p, h), null), !!n.syncExecuteCommand(u.id, u.params);
343
+ return m.params.actions = a.reduce((p, h) => q.compose(p, h), null), !!n.syncExecuteCommand(m.id, m.params);
344
344
  }
345
345
  }, Jn = {
346
346
  id: "doc.command.update-doc-drawing-wrap-text",
@@ -359,7 +359,7 @@ const Zn = {
359
359
  a.push(w);
360
360
  }
361
361
  }
362
- const u = {
362
+ const m = {
363
363
  id: J.id,
364
364
  params: {
365
365
  unitId: c,
@@ -367,7 +367,7 @@ const Zn = {
367
367
  textRanges: null
368
368
  }
369
369
  };
370
- return u.params.actions = a.reduce((p, h) => q.compose(p, h), null), !!n.syncExecuteCommand(u.id, u.params);
370
+ return m.params.actions = a.reduce((p, h) => q.compose(p, h), null), !!n.syncExecuteCommand(m.id, m.params);
371
371
  }
372
372
  }, qe = {
373
373
  id: "doc.command.update-drawing-doc-transform",
@@ -381,11 +381,11 @@ const Zn = {
381
381
  const c = s.getTransformerByCreate(), d = t.getCurrentUniverDocInstance();
382
382
  if (d == null)
383
383
  return !1;
384
- const { drawings: a, unitId: l } = e, u = q.getInstance(), g = [], { drawings: p = {} } = d.getSnapshot();
384
+ const { drawings: a, unitId: l } = e, m = q.getInstance(), g = [], { drawings: p = {} } = d.getSnapshot();
385
385
  for (const w of a) {
386
- const { drawingId: S, key: O, value: D } = w, P = p[S].docTransform[O];
387
- if (!be.diffValue(P, D)) {
388
- const M = u.replaceOp(["drawings", S, "docTransform", O], P, D);
386
+ const { drawingId: S, key: O, value: D } = w, T = p[S].docTransform[O];
387
+ if (!ye.diffValue(T, D)) {
388
+ const M = m.replaceOp(["drawings", S, "docTransform", O], T, D);
389
389
  g.push(M);
390
390
  }
391
391
  }
@@ -412,25 +412,25 @@ const Zn = {
412
412
  const n = i.get(ee), t = (U = n.getRenderById(e.unitId)) == null ? void 0 : U.with(Me), r = i.get(gn), o = n.getRenderById(e.unitId), s = o == null ? void 0 : o.scene, c = o == null ? void 0 : o.with(se).getSkeleton();
413
413
  if (s == null || t == null)
414
414
  return !1;
415
- const d = s.getTransformerByCreate(), a = i.get(z), u = i.get(Q).getCurrentUniverDocInstance();
416
- if (u == null)
415
+ const d = s.getTransformerByCreate(), a = i.get(z), m = i.get(Q).getCurrentUniverDocInstance();
416
+ if (m == null)
417
417
  return !1;
418
418
  const { drawing: g, unitId: p, offset: h, segmentId: v, segmentPage: w, needRefreshDrawings: S } = e;
419
419
  if (S)
420
420
  return r.refreshDrawings(c), d.refreshControls(), !0;
421
- const O = [], { drawingId: D } = g, P = (N = t.getSegment()) != null ? N : "", M = Yn(
421
+ const O = [], { drawingId: D } = g, T = (N = t.getSegment()) != null ? N : "", M = Yn(
422
422
  v,
423
- P,
423
+ T,
424
424
  w,
425
425
  h,
426
426
  D,
427
- u,
427
+ m,
428
428
  t
429
429
  );
430
430
  if (M == null || M.length === 0)
431
431
  return r.refreshDrawings(c), d.refreshControls(), !1;
432
432
  O.push(...M);
433
- const b = {
433
+ const y = {
434
434
  id: J.id,
435
435
  params: {
436
436
  unitId: p,
@@ -438,8 +438,8 @@ const Zn = {
438
438
  textRanges: null
439
439
  }
440
440
  };
441
- b.params.actions = O.reduce((I, L) => q.compose(I, L), null);
442
- const A = a.syncExecuteCommand(b.id, b.params);
441
+ y.params.actions = O.reduce((I, L) => q.compose(I, L), null);
442
+ const A = a.syncExecuteCommand(y.id, y.params);
443
443
  return d.refreshControls(), !!A;
444
444
  }
445
445
  }, nt = {
@@ -456,7 +456,7 @@ const Zn = {
456
456
  const s = o.getTransformerByCreate(), c = i.get(z), a = i.get(Q).getCurrentUniverDocInstance();
457
457
  if (a == null)
458
458
  return !1;
459
- const { drawing: l, unitId: u, offset: g, docTransform: p, segmentId: h, segmentPage: v } = e, w = [], { drawingId: S } = l, O = (G = t.getSegment()) != null ? G : "", D = Yn(
459
+ const { drawing: l, unitId: m, offset: g, docTransform: p, segmentId: h, segmentPage: v } = e, w = [], { drawingId: S } = l, O = (G = t.getSegment()) != null ? G : "", D = Yn(
460
460
  h,
461
461
  O,
462
462
  v,
@@ -468,27 +468,27 @@ const Zn = {
468
468
  if (D == null)
469
469
  return !1;
470
470
  D.length > 0 && w.push(...D);
471
- const P = q.getInstance(), { drawings: M = {} } = a.getSnapshot(), b = M[S].docTransform, { positionH: A, positionV: U, size: N, angle: I } = b;
472
- if (!be.diffValue(A, p.positionH)) {
473
- const _ = P.replaceOp(["drawings", S, "docTransform", "positionH"], A, p.positionH);
471
+ const T = q.getInstance(), { drawings: M = {} } = a.getSnapshot(), y = M[S].docTransform, { positionH: A, positionV: U, size: N, angle: I } = y;
472
+ if (!ye.diffValue(A, p.positionH)) {
473
+ const _ = T.replaceOp(["drawings", S, "docTransform", "positionH"], A, p.positionH);
474
474
  w.push(_);
475
475
  }
476
- if (!be.diffValue(U, p.positionV)) {
477
- const _ = P.replaceOp(["drawings", S, "docTransform", "positionV"], U, p.positionV);
476
+ if (!ye.diffValue(U, p.positionV)) {
477
+ const _ = T.replaceOp(["drawings", S, "docTransform", "positionV"], U, p.positionV);
478
478
  w.push(_);
479
479
  }
480
- if (!be.diffValue(N, p.size)) {
481
- const _ = P.replaceOp(["drawings", S, "docTransform", "size"], N, p.size);
480
+ if (!ye.diffValue(N, p.size)) {
481
+ const _ = T.replaceOp(["drawings", S, "docTransform", "size"], N, p.size);
482
482
  w.push(_);
483
483
  }
484
- if (!be.diffValue(I, p.angle)) {
485
- const _ = P.replaceOp(["drawings", S, "docTransform", "angle"], I, p.angle);
484
+ if (!ye.diffValue(I, p.angle)) {
485
+ const _ = T.replaceOp(["drawings", S, "docTransform", "angle"], I, p.angle);
486
486
  w.push(_);
487
487
  }
488
488
  const L = {
489
489
  id: J.id,
490
490
  params: {
491
- unitId: u,
491
+ unitId: m,
492
492
  actions: [],
493
493
  textRanges: null,
494
494
  debounce: !0
@@ -499,13 +499,13 @@ const Zn = {
499
499
  return s.refreshControls(), !!W;
500
500
  }
501
501
  };
502
- var Ai = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, xi = (i, e, n, t) => {
503
- for (var r = t > 1 ? void 0 : t ? Ei(e, n) : e, o = i.length - 1, s; o >= 0; o--)
504
- (s = i[o]) && (r = (t ? s(e, n, r) : s(r)) || r);
505
- return t && r && Ai(e, n, r), r;
502
+ var Ri = Object.getOwnPropertyDescriptor, Ni = (i, e, n, t) => {
503
+ for (var r = t > 1 ? void 0 : t ? Ri(e, n) : e, o = i.length - 1, s; o >= 0; o--)
504
+ (s = i[o]) && (r = s(r) || r);
505
+ return r;
506
506
  }, Qe = (i, e) => (n, t) => e(n, t, i);
507
- const Li = "__InlineDrawingAnchor__";
508
- function kn(i) {
507
+ const Ai = "__InlineDrawingAnchor__";
508
+ function Fn(i) {
509
509
  const { path: e } = i;
510
510
  return e.some((n) => n === "cells");
511
511
  }
@@ -547,7 +547,7 @@ let on = class extends Xe {
547
547
  this._transformerCache.clear();
548
548
  const { objects: s } = o;
549
549
  for (const d of s.values()) {
550
- const { oKey: a, width: l, height: u, left: g, top: p, angle: h } = d, v = this._drawingManagerService.getDrawingOKey(a);
550
+ const { oKey: a, width: l, height: m, left: g, top: p, angle: h } = d, v = this._drawingManagerService.getDrawingOKey(a);
551
551
  if (v == null)
552
552
  continue;
553
553
  const w = this._univerInstanceService.getUniverDocInstance(v.unitId), S = (c = w == null ? void 0 : w.getSnapshot().drawings) == null ? void 0 : c[v.drawingId];
@@ -556,7 +556,7 @@ let on = class extends Xe {
556
556
  top: p,
557
557
  left: g,
558
558
  width: l,
559
- height: u,
559
+ height: m,
560
560
  angle: h
561
561
  });
562
562
  }
@@ -571,8 +571,8 @@ let on = class extends Xe {
571
571
  if (s.size > 1)
572
572
  t(s);
573
573
  else if (s.size === 1) {
574
- const a = this._transformerCache.values().next().value, l = s.values().next().value, { width: u, height: g, top: p, left: h, angle: v } = l;
575
- if (a && u === a.width && g === a.height && p === a.top && h === a.left && v === a.angle)
574
+ const a = this._transformerCache.values().next().value, l = s.values().next().value, { width: m, height: g, top: p, left: h, angle: v } = l;
575
+ if (a && m === a.width && g === a.height && p === a.top && h === a.left && v === a.angle)
576
576
  return;
577
577
  a && (a.drawing.layoutType, H.INLINE), a && a.drawing.layoutType === H.INLINE && c != null && d != null && this._updateInlineDrawingAnchor(a.drawing, c, d);
578
578
  }
@@ -587,16 +587,16 @@ let on = class extends Xe {
587
587
  const l = this._drawingManagerService.getDrawingOKey(a.oKey);
588
588
  if (l == null)
589
589
  continue;
590
- const u = this._transformerCache.get(l == null ? void 0 : l.drawingId);
591
- (u == null ? void 0 : u.drawing.layoutType) === H.INLINE && a.setOpacity(1);
590
+ const m = this._transformerCache.get(l == null ? void 0 : l.drawingId);
591
+ (m == null ? void 0 : m.drawing.layoutType) === H.INLINE && a.setOpacity(1);
592
592
  }
593
593
  if (this._anchorShape && this._anchorShape.hide(), s.size > 1)
594
594
  this._updateMultipleDrawingDocTransform(s);
595
595
  else if (s.size === 1) {
596
- const a = this._transformerCache.values().next().value, l = s.values().next().value, { width: u, height: g, top: p, left: h, angle: v } = l;
597
- if (a && u === a.width && g === a.height && p === a.top && h === a.left && v === a.angle)
596
+ const a = this._transformerCache.values().next().value, l = s.values().next().value, { width: m, height: g, top: p, left: h, angle: v } = l;
597
+ if (a && m === a.width && g === a.height && p === a.top && h === a.left && v === a.angle)
598
598
  return;
599
- a && a.drawing.layoutType === H.INLINE ? u !== a.width || g !== 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);
599
+ a && a.drawing.layoutType === H.INLINE ? m !== a.width || g !== 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);
600
600
  }
601
601
  this._transformerCache.clear();
602
602
  })
@@ -611,7 +611,7 @@ let on = class extends Xe {
611
611
  let t, r;
612
612
  for (const o of e.values()) {
613
613
  const { oKey: s, left: c, top: d, angle: a } = o;
614
- let { width: l, height: u } = o;
614
+ let { width: l, height: m } = o;
615
615
  const g = this._drawingManagerService.getDrawingOKey(s);
616
616
  if (g == null)
617
617
  continue;
@@ -619,26 +619,26 @@ let on = class extends Xe {
619
619
  const p = this._transformerCache.get(g.drawingId);
620
620
  if (p == null)
621
621
  continue;
622
- const { drawing: h, top: v, left: w, width: S, height: O, angle: D } = p, { width: P, height: M } = this._getPageContentSize(h);
623
- if (l = Math.min(l, P), u = Math.min(u, M), (S !== l || O !== u) && n.push({
622
+ const { drawing: h, top: v, left: w, width: S, height: O, angle: D } = p, { width: T, height: M } = this._getPageContentSize(h);
623
+ if (l = Math.min(l, T), m = Math.min(m, M), (S !== l || O !== m) && n.push({
624
624
  drawingId: g.drawingId,
625
625
  key: "size",
626
626
  value: {
627
627
  width: l,
628
- height: u
628
+ height: m
629
629
  }
630
630
  }), D !== a && n.push({
631
631
  drawingId: g.drawingId,
632
632
  key: "angle",
633
633
  value: a
634
634
  }), v !== d || w !== c) {
635
- const b = d - v, A = c - w;
636
- b !== 0 && n.push({
635
+ const y = d - v, A = c - w;
636
+ y !== 0 && n.push({
637
637
  drawingId: g.drawingId,
638
638
  key: "positionV",
639
639
  value: {
640
640
  relativeFrom: h.docTransform.positionV.relativeFrom,
641
- posOffset: h.docTransform.positionV.posOffset + b
641
+ posOffset: h.docTransform.positionV.posOffset + y
642
642
  }
643
643
  }), A !== 0 && n.push({
644
644
  drawingId: g.drawingId,
@@ -677,7 +677,7 @@ let on = class extends Xe {
677
677
  return;
678
678
  const { mainComponent: s, scene: c } = r, d = s, a = c.getViewports()[0], {
679
679
  pageLayoutType: l = Mn.VERTICAL,
680
- pageMarginLeft: u,
680
+ pageMarginLeft: m,
681
681
  pageMarginTop: g
682
682
  } = d.getOffsetConfig();
683
683
  let p = null, h = !1, v = -1, w = "";
@@ -687,10 +687,10 @@ let on = class extends Xe {
687
687
  const D = (x = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : x.with(Me);
688
688
  if (D == null)
689
689
  return;
690
- const P = o == null ? void 0 : o.findNodeByCoord(
690
+ const T = o == null ? void 0 : o.findNodeByCoord(
691
691
  O,
692
692
  l,
693
- u,
693
+ m,
694
694
  g,
695
695
  {
696
696
  strict: !1,
@@ -698,65 +698,65 @@ let on = class extends Xe {
698
698
  segmentPage: D.getSegmentPage()
699
699
  }
700
700
  );
701
- if (P) {
702
- const { node: _, ratioX: C, segmentPage: R, segmentId: T } = P;
703
- h = C < S, p = _, v = R, w = T;
701
+ if (T) {
702
+ const { node: _, ratioX: C, segmentPage: R, segmentId: P } = T;
703
+ h = C < S, p = _, v = R, w = P;
704
704
  }
705
705
  if (p == null)
706
706
  return;
707
- const M = o == null ? void 0 : o.findPositionByGlyph(p, v), b = this._getDocObject();
708
- if (M == null || o == null || b == null || kn(M))
707
+ const M = o == null ? void 0 : o.findPositionByGlyph(p, v), y = this._getDocObject();
708
+ if (M == null || o == null || y == null || Fn(M))
709
709
  return;
710
710
  const A = {
711
711
  ...M,
712
712
  isBack: h
713
- }, U = b.document.getOffsetConfig(), N = new Nn(U, o), { cursorList: I, contentBoxPointGroup: L } = N.getRangePointData(A, A), { startOffset: W } = (G = An(I)) != null ? G : {};
713
+ }, U = y.document.getOffsetConfig(), N = new Nn(U, o), { cursorList: I, contentBoxPointGroup: L } = N.getRangePointData(A, A), { startOffset: W } = (G = An(I)) != null ? G : {};
714
714
  if (W != null)
715
715
  return { offset: W, contentBoxPointGroup: L, segmentId: w, segmentPage: v };
716
716
  }
717
717
  // eslint-disable-next-line max-lines-per-function, complexity
718
718
  _getDrawingAnchor(e, n) {
719
- var _e, Se, de, De, Oe, Ne, Ae, Pe, le, ge, Ee;
719
+ var _e, Se, de, De, Oe, Ne, Ae, Te, le, ge, Ee;
720
720
  const t = this._renderManagerService.getRenderById(e.unitId), r = t == null ? void 0 : t.with(se).getSkeleton(), o = r == null ? void 0 : r.getSkeletonData();
721
721
  if (o == null || t == null)
722
722
  return;
723
- const { pages: s, skeHeaders: c, skeFooters: d } = o, { mainComponent: a, scene: l } = t, u = a, g = l.getViewports()[0], { pageLayoutType: p = Mn.VERTICAL, pageMarginLeft: h, pageMarginTop: v, docsLeft: w, docsTop: S } = u.getOffsetConfig(), { left: O, top: D, angle: P } = n;
724
- let { width: M, height: b } = n;
723
+ const { pages: s, skeHeaders: c, skeFooters: d } = o, { mainComponent: a, scene: l } = t, m = a, g = l.getViewports()[0], { pageLayoutType: p = Mn.VERTICAL, pageMarginLeft: h, pageMarginTop: v, docsLeft: w, docsTop: S } = m.getOffsetConfig(), { left: O, top: D, angle: T } = n;
724
+ let { width: M, height: y } = n;
725
725
  const { positionV: A, positionH: U } = e.docTransform, { width: N, height: I } = this._getPageContentSize(e);
726
- M = Math.min(M, N), b = Math.min(b, I);
726
+ M = Math.min(M, N), y = Math.min(y, I);
727
727
  let L = null, W = "", x = -1;
728
728
  const G = !1, _ = {
729
729
  ...e.docTransform,
730
730
  size: {
731
731
  width: M,
732
- height: b
732
+ height: y
733
733
  },
734
- angle: P
735
- }, { x: C, y: R } = l.getViewportScrollXY(g), T = this._getTransformCoordForDocumentOffset(u, g, O - C, D - R);
736
- if (T == null)
734
+ angle: T
735
+ }, { x: C, y: R } = l.getViewportScrollXY(g), P = this._getTransformCoordForDocumentOffset(m, g, O - C, D - R);
736
+ if (P == null)
737
737
  return;
738
738
  const B = (_e = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : _e.with(Me);
739
739
  if (B == null)
740
740
  return;
741
- const F = r == null ? void 0 : r.findNodeByCoord(T, p, h, v, {
741
+ const k = r == null ? void 0 : r.findNodeByCoord(P, p, h, v, {
742
742
  strict: !1,
743
743
  segmentId: B.getSegment(),
744
744
  segmentPage: B.getSegmentPage()
745
745
  });
746
- if (F) {
747
- const { node: pe, segmentPage: mn, segmentId: un } = F;
746
+ if (k) {
747
+ const { node: pe, segmentPage: mn, segmentId: un } = k;
748
748
  L = pe, x = mn, W = un;
749
749
  }
750
750
  if (L == null)
751
751
  return;
752
- const y = (Se = L.parent) == null ? void 0 : Se.parent, E = y == null ? void 0 : y.parent, $ = (de = E == null ? void 0 : E.lines.find((pe) => pe.paragraphIndex === (y == null ? void 0 : y.paragraphIndex) && pe.paragraphStart)) != null ? de : E == null ? void 0 : E.lines[0], k = (De = E == null ? void 0 : E.parent) == null ? void 0 : De.parent;
753
- if (y == null || E == null || $ == null || k == null)
752
+ const b = (Se = L.parent) == null ? void 0 : Se.parent, E = b == null ? void 0 : b.parent, $ = (de = E == null ? void 0 : E.lines.find((pe) => pe.paragraphIndex === (b == null ? void 0 : b.paragraphIndex) && pe.paragraphStart)) != null ? de : E == null ? void 0 : E.lines[0], F = (De = E == null ? void 0 : E.parent) == null ? void 0 : De.parent;
753
+ if (b == null || E == null || $ == null || F == null)
754
754
  return;
755
755
  this._liquid.reset();
756
- const Y = k.type;
756
+ const Y = F.type;
757
757
  for (const pe of s) {
758
- const { headerId: mn, footerId: un, pageHeight: _t, pageWidth: Cn, marginLeft: Dn, marginBottom: St } = pe, Ct = s.indexOf(pe);
759
- if (x > -1 && Ct === x) {
758
+ const { headerId: mn, footerId: un, pageHeight: It, pageWidth: Cn, marginLeft: Dn, marginBottom: _t } = pe, St = s.indexOf(pe);
759
+ if (x > -1 && St === x) {
760
760
  switch (Y) {
761
761
  case Rn.HEADER: {
762
762
  const Ge = (Oe = c.get(mn)) == null ? void 0 : Oe.get(Cn);
@@ -773,7 +773,7 @@ let on = class extends Xe {
773
773
  const Ge = (Ne = d.get(un)) == null ? void 0 : Ne.get(Cn);
774
774
  if (Ge)
775
775
  this._liquid.translatePagePadding({
776
- marginTop: _t - St + Ge.marginTop,
776
+ marginTop: It - _t + Ge.marginTop,
777
777
  marginLeft: Dn
778
778
  });
779
779
  else
@@ -783,16 +783,16 @@ let on = class extends Xe {
783
783
  }
784
784
  break;
785
785
  }
786
- if (this._liquid.translatePagePadding(pe), pe === k)
786
+ if (this._liquid.translatePagePadding(pe), pe === F)
787
787
  break;
788
788
  this._liquid.restorePagePadding(pe), this._liquid.translatePage(pe, p, h, v);
789
789
  }
790
- switch (A.relativeFrom === V.LINE ? L = y.divides[0].glyphGroup[0] : L = (ge = (le = (Pe = (Ae = $.divides) == null ? void 0 : Ae[0]) == null ? void 0 : Pe.glyphGroup) == null ? void 0 : le[0]) != null ? ge : L, _.positionH = {
790
+ switch (A.relativeFrom === V.LINE ? L = b.divides[0].glyphGroup[0] : L = (ge = (le = (Te = (Ae = $.divides) == null ? void 0 : Ae[0]) == null ? void 0 : Te.glyphGroup) == null ? void 0 : le[0]) != null ? ge : L, _.positionH = {
791
791
  relativeFrom: U.relativeFrom,
792
792
  posOffset: O - this._liquid.x - w
793
793
  }, U.relativeFrom) {
794
794
  case ne.MARGIN: {
795
- _.positionH.posOffset = O - this._liquid.x - w - k.marginLeft;
795
+ _.positionH.posOffset = O - this._liquid.x - w - F.marginLeft;
796
796
  break;
797
797
  }
798
798
  case ne.COLUMN: {
@@ -805,11 +805,11 @@ let on = class extends Xe {
805
805
  posOffset: D - this._liquid.y - S
806
806
  }, A.relativeFrom) {
807
807
  case V.PAGE: {
808
- _.positionV.posOffset = D - this._liquid.y - S - k.marginTop;
808
+ _.positionV.posOffset = D - this._liquid.y - S - F.marginTop;
809
809
  break;
810
810
  }
811
811
  case V.LINE: {
812
- _.positionV.posOffset = D - this._liquid.y - S - y.top;
812
+ _.positionV.posOffset = D - this._liquid.y - S - b.top;
813
813
  break;
814
814
  }
815
815
  case V.PARAGRAPH: {
@@ -820,7 +820,7 @@ let on = class extends Xe {
820
820
  if (L == null)
821
821
  return;
822
822
  const ae = r == null ? void 0 : r.findPositionByGlyph(L, x), Ue = this._getDocObject();
823
- if (ae == null || r == null || Ue == null || kn(ae))
823
+ if (ae == null || r == null || Ue == null || Fn(ae))
824
824
  return;
825
825
  const Re = {
826
826
  ...ae,
@@ -832,14 +832,14 @@ let on = class extends Xe {
832
832
  // Update drawing when use transformer to resize it.
833
833
  _updateDrawingSize(e, n) {
834
834
  const t = [], { drawing: r, width: o, height: s, angle: c } = e, { unitId: d, subUnitId: a } = r;
835
- let { width: l, height: u, angle: g } = n;
835
+ let { width: l, height: m, angle: g } = n;
836
836
  const { width: p, height: h } = this._getPageContentSize(r);
837
- l = Math.min(p, l), u = Math.min(h, u), (l !== o || u !== s) && t.push({
837
+ l = Math.min(p, l), m = Math.min(h, m), (l !== o || m !== s) && t.push({
838
838
  drawingId: r.drawingId,
839
839
  key: "size",
840
840
  value: {
841
841
  width: l,
842
- height: u
842
+ height: m
843
843
  }
844
844
  }), g !== c && t.push({
845
845
  drawingId: r.drawingId,
@@ -867,8 +867,8 @@ let on = class extends Xe {
867
867
  // Limit the drawing to the page area, mainly in the vertical direction,
868
868
  // and the upper and lower limits cannot exceed the page margin area.
869
869
  _limitDrawingInPage(e, n) {
870
- const t = this._renderManagerService.getRenderById(e.unitId), { left: r, top: o, width: s, height: c, angle: d } = n, a = t == null ? void 0 : t.with(se).getSkeleton(), l = a == null ? void 0 : a.getSkeletonData(), { pages: u } = l != null ? l : {};
871
- if (l == null || t == null || u == null)
870
+ const t = this._renderManagerService.getRenderById(e.unitId), { left: r, top: o, width: s, height: c, angle: d } = n, a = t == null ? void 0 : t.with(se).getSkeleton(), l = a == null ? void 0 : a.getSkeletonData(), { pages: m } = l != null ? l : {};
871
+ if (l == null || t == null || m == null)
872
872
  return {
873
873
  left: r,
874
874
  top: o,
@@ -879,18 +879,18 @@ let on = class extends Xe {
879
879
  const { mainComponent: g } = t, p = g, { top: h, pageLayoutType: v, pageMarginLeft: w, pageMarginTop: S } = p;
880
880
  let O = o;
881
881
  this._liquid.reset();
882
- for (const D of u) {
883
- const { marginBottom: P, pageHeight: M } = D, b = u.indexOf(D), A = u[b + 1];
882
+ for (const D of m) {
883
+ const { marginBottom: T, pageHeight: M } = D, y = m.indexOf(D), A = m[y + 1];
884
884
  if (A == null)
885
885
  continue;
886
- if (be.hasIntersectionBetweenTwoRanges(
886
+ if (ye.hasIntersectionBetweenTwoRanges(
887
887
  o,
888
888
  o + c,
889
- this._liquid.y + h + M - P,
889
+ this._liquid.y + h + M - T,
890
890
  this._liquid.y + h + M + S + A.marginTop
891
891
  )) {
892
892
  const N = o + c / 2, I = this._liquid.y + h + M + S / 2;
893
- N < I ? O = Math.min(o, this._liquid.y + h + M - P - c) : O = Math.max(o, this._liquid.y + h + M + S + A.marginTop);
893
+ N < I ? O = Math.min(o, this._liquid.y + h + M - T - c) : O = Math.max(o, this._liquid.y + h + M + S + A.marginTop);
894
894
  }
895
895
  this._liquid.translatePage(D, v, w, S);
896
896
  }
@@ -927,7 +927,7 @@ let on = class extends Xe {
927
927
  return { scene: t, transformer: r };
928
928
  }
929
929
  _getTransformCoordForDocumentOffset(e, n, t, r) {
930
- const { documentTransform: o } = e.getOffsetConfig(), s = n.transformVector2SceneCoord(ni.FromArray([t, r]));
930
+ const { documentTransform: o } = e.getOffsetConfig(), s = n.transformVector2SceneCoord(ei.FromArray([t, r]));
931
931
  if (s)
932
932
  return o.clone().invert().applyPoint(s);
933
933
  }
@@ -938,23 +938,23 @@ let on = class extends Xe {
938
938
  const { mainComponent: r, scene: o } = t, s = r, {
939
939
  docsLeft: c,
940
940
  docsTop: d
941
- } = s.getOffsetConfig(), a = ui(n), { left: l, top: u, height: g } = a, p = l + c, h = u + d;
941
+ } = s.getOffsetConfig(), a = mi(n), { left: l, top: m, height: g } = a, p = l + c, h = m + d;
942
942
  if (this._anchorShape) {
943
943
  this._anchorShape.transformByState({ left: p, top: h, height: g }), this._anchorShape.show();
944
944
  return;
945
945
  }
946
- const v = 6, w = new ti(Li + be.generateRandomId(v), {
946
+ const v = 6, w = new ni(Ai + ye.generateRandomId(v), {
947
947
  left: p,
948
948
  top: h,
949
949
  height: g,
950
950
  strokeWidth: 2,
951
- stroke: ii(bt.darkGray, 1),
951
+ stroke: ti(Pt.darkGray, 1),
952
952
  evented: !1
953
953
  });
954
- this._anchorShape = w, o.addObject(w, fi);
954
+ this._anchorShape = w, o.addObject(w, ui);
955
955
  }
956
956
  _getDocObject() {
957
- return hi(this._univerInstanceService, this._renderManagerService);
957
+ return fi(this._univerInstanceService, this._renderManagerService);
958
958
  }
959
959
  _getPageContentSize(e) {
960
960
  const n = this._renderManagerService.getRenderById(e.unitId), t = n == null ? void 0 : n.with(se).getSkeleton(), r = 500, o = 500, s = t == null ? void 0 : t.getSkeletonData();
@@ -973,9 +973,9 @@ let on = class extends Xe {
973
973
  }
974
974
  }
975
975
  if (d) {
976
- const { pageWidth: a, pageHeight: l, marginLeft: u, marginBottom: g, marginRight: p, marginTop: h } = d;
976
+ const { pageWidth: a, pageHeight: l, marginLeft: m, marginBottom: g, marginRight: p, marginTop: h } = d;
977
977
  return {
978
- width: Math.max(r, a - u - p),
978
+ width: Math.max(r, a - m - p),
979
979
  height: Math.max(o, l - h - g)
980
980
  };
981
981
  } else
@@ -985,7 +985,7 @@ let on = class extends Xe {
985
985
  };
986
986
  }
987
987
  };
988
- on = xi([
988
+ on = Ni([
989
989
  Qe(0, z),
990
990
  Qe(1, Q),
991
991
  Qe(2, Ie),
@@ -999,7 +999,7 @@ var he = function() {
999
999
  }
1000
1000
  return i;
1001
1001
  }, he.apply(this, arguments);
1002
- }, Bi = function(i, e) {
1002
+ }, Ei = function(i, e) {
1003
1003
  var n = {};
1004
1004
  for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
1005
1005
  if (i != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1007,15 +1007,15 @@ var he = function() {
1007
1007
  e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
1008
1008
  return n;
1009
1009
  }, tt = Xn(function(i, e) {
1010
- var n = i.icon, t = i.id, r = i.className, o = i.extend, s = Bi(i, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), d = Oi("_".concat(ki()));
1010
+ var n = i.icon, t = i.id, r = i.className, o = i.extend, s = Ei(i, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), d = Di("_".concat(Bi()));
1011
1011
  return it(n, "".concat(t), { defIds: n.defIds, idSuffix: d.current }, he({ ref: e, className: c }, s), o);
1012
1012
  });
1013
1013
  function it(i, e, n, t, r) {
1014
- return Kn(i.tag, he(he({ key: e }, Ui(i, n, r)), t), (Fi(i, n).children || []).map(function(o, s) {
1014
+ return Kn(i.tag, he(he({ key: e }, xi(i, n, r)), t), (Li(i, n).children || []).map(function(o, s) {
1015
1015
  return it(o, "".concat(e, "-").concat(i.tag, "-").concat(s), n, void 0, r);
1016
1016
  }));
1017
1017
  }
1018
- function Ui(i, e, n) {
1018
+ function xi(i, e, n) {
1019
1019
  var t = he({}, i.attrs);
1020
1020
  n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
1021
1021
  var r = e.defIds;
@@ -1024,21 +1024,21 @@ function Ui(i, e, n) {
1024
1024
  typeof c == "string" && (t[s] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
1025
1025
  })), t;
1026
1026
  }
1027
- function Fi(i, e) {
1027
+ function Li(i, e) {
1028
1028
  var n, t = e.defIds;
1029
1029
  return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? he(he({}, i), { children: i.children.map(function(r) {
1030
1030
  return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? he(he({}, r), { attrs: he(he({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
1031
1031
  }) }) : i;
1032
1032
  }
1033
- function ki() {
1033
+ function Bi() {
1034
1034
  return Math.random().toString(36).substring(2, 8);
1035
1035
  }
1036
1036
  tt.displayName = "UniverIcon";
1037
- var Hi = { 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" } }] }, rt = Xn(function(i, e) {
1037
+ var Ui = { 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" } }] }, rt = Xn(function(i, e) {
1038
1038
  return Kn(tt, Object.assign({}, i, {
1039
1039
  id: "add-image-single",
1040
1040
  ref: e,
1041
- icon: Hi
1041
+ icon: Ui
1042
1042
  }));
1043
1043
  });
1044
1044
  rt.displayName = "AddImageSingle";
@@ -1047,11 +1047,11 @@ const Sn = {
1047
1047
  type: K.COMMAND,
1048
1048
  // eslint-disable-next-line max-lines-per-function
1049
1049
  handler: (i, e) => {
1050
- var M, b, A, U;
1050
+ var M, y, A, U;
1051
1051
  const n = i.get(z), t = i.get(Q), r = i.get(ee), o = t.getCurrentUniverDocInstance();
1052
1052
  if (e == null || o == null)
1053
1053
  return !1;
1054
- const s = r.getRenderById(e.unitId).with(Me), { drawings: c } = e, d = (M = s.getSegment()) != null ? M : "", a = new vn(), l = q.getInstance(), u = (A = (b = o.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : b.customBlocks) != null ? A : [], g = c.map((N) => u.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), p = c[0].unitId, h = new yt();
1054
+ const s = r.getRenderById(e.unitId).with(Me), { drawings: c } = e, d = (M = s.getSegment()) != null ? M : "", a = new vn(), l = q.getInstance(), m = (A = (y = o.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : y.customBlocks) != null ? A : [], g = c.map((N) => m.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), p = c[0].unitId, h = new yt();
1055
1055
  h.reset();
1056
1056
  const v = g[0].startIndex, w = [
1057
1057
  {
@@ -1113,27 +1113,29 @@ const Sn = {
1113
1113
  const n = i.get(Be);
1114
1114
  if (!e) return !1;
1115
1115
  const t = [];
1116
- return e.forEach(({ parent: r, children: o }) => {
1117
- t.push(r.unitId), o.forEach((s) => {
1118
- t.push(s.unitId);
1116
+ e.forEach(({ parent: l, children: m }) => {
1117
+ t.push(l.unitId), m.forEach((g) => {
1118
+ t.push(g.unitId);
1119
1119
  });
1120
- }), n.getGroupDrawingOp(e), !1;
1120
+ });
1121
+ const r = n.getGroupDrawingOp(e), { unitId: o, subUnitId: s, undo: c, redo: d, objects: a } = r;
1122
+ return !1;
1121
1123
  }
1122
1124
  }, at = {
1123
1125
  id: "doc.command.insert-doc-image",
1124
1126
  type: K.COMMAND,
1125
1127
  // eslint-disable-next-line max-lines-per-function
1126
1128
  handler: (i, e) => {
1127
- var b, A, U, N;
1129
+ var y, A, U, N;
1128
1130
  if (e == null)
1129
1131
  return !1;
1130
1132
  const n = i.get(z), t = i.get(In), r = i.get(Q), o = t.getActiveTextRange(), s = r.getCurrentUniverDocInstance();
1131
1133
  if (o == null || s == null)
1132
1134
  return !1;
1133
- const c = s.getUnitId(), { drawings: d } = e, { collapsed: a, startOffset: l, segmentId: u } = o, g = s.getSelfOrHeaderFooterModel(u).getBody();
1135
+ const c = s.getUnitId(), { drawings: d } = e, { collapsed: a, startOffset: l, segmentId: m } = o, g = s.getSelfOrHeaderFooterModel(m).getBody();
1134
1136
  if (g == null)
1135
1137
  return !1;
1136
- const p = new vn(), h = q.getInstance(), v = [], w = (A = (b = s.getSnapshot().drawingsOrder) == null ? void 0 : b.length) != null ? A : 0;
1138
+ const p = new vn(), h = q.getInstance(), v = [], w = (A = (y = s.getSnapshot().drawingsOrder) == null ? void 0 : y.length) != null ? A : 0;
1137
1139
  let S = 0;
1138
1140
  if (a)
1139
1141
  l > 0 && p.push({
@@ -1141,16 +1143,16 @@ const Sn = {
1141
1143
  len: l
1142
1144
  });
1143
1145
  else {
1144
- const I = Mt.selection.delete([o], g, 0, null, !1);
1146
+ const I = bt.selection.delete([o], g, 0, null, !1);
1145
1147
  p.push(...I);
1146
- const L = pi(g, [o]), W = (U = s.getDrawings()) != null ? U : {}, x = (N = s.getDrawingsOrder()) != null ? N : [], G = L.sort((_, C) => x.indexOf(_) > x.indexOf(C) ? -1 : x.indexOf(_) < x.indexOf(C) ? 1 : 0);
1148
+ const L = hi(g, [o]), W = (U = s.getDrawings()) != null ? U : {}, x = (N = s.getDrawingsOrder()) != null ? N : [], G = L.sort((_, C) => x.indexOf(_) > x.indexOf(C) ? -1 : x.indexOf(_) < x.indexOf(C) ? 1 : 0);
1147
1149
  if (G.length > 0)
1148
1150
  for (const _ of G) {
1149
1151
  const C = W[_], R = x.indexOf(_);
1150
1152
  if (C == null || R < 0)
1151
1153
  continue;
1152
- const T = h.removeOp(["drawings", _], C), B = h.removeOp(["drawingsOrder", R], _);
1153
- v.push(T), v.push(B), S++;
1154
+ const P = h.removeOp(["drawings", _], C), B = h.removeOp(["drawingsOrder", R], _);
1155
+ v.push(P), v.push(B), S++;
1154
1156
  }
1155
1157
  }
1156
1158
  p.push({
@@ -1164,13 +1166,13 @@ const Sn = {
1164
1166
  },
1165
1167
  len: d.length
1166
1168
  });
1167
- const O = ze(s, u), D = h.editOp(p.serialize(), O);
1169
+ const O = ze(s, m), D = h.editOp(p.serialize(), O);
1168
1170
  v.push(D);
1169
1171
  for (const I of d) {
1170
1172
  const { drawingId: L } = I, W = h.insertOp(["drawings", L], I), x = h.insertOp(["drawingsOrder", w - S], L);
1171
1173
  v.push(W), v.push(x);
1172
1174
  }
1173
- const P = {
1175
+ const T = {
1174
1176
  id: J.id,
1175
1177
  params: {
1176
1178
  unitId: c,
@@ -1178,7 +1180,7 @@ const Sn = {
1178
1180
  textRanges: []
1179
1181
  }
1180
1182
  };
1181
- return P.params.actions = v.reduce((I, L) => q.compose(I, L), null), !!n.syncExecuteCommand(P.id, P.params);
1183
+ return T.params.actions = v.reduce((I, L) => q.compose(I, L), null), !!n.syncExecuteCommand(T.id, T.params);
1182
1184
  }
1183
1185
  }, ct = {
1184
1186
  id: "doc.command.set-drawing-arrange",
@@ -1194,9 +1196,9 @@ const Sn = {
1194
1196
  const { redo: l } = a;
1195
1197
  if (l == null)
1196
1198
  return !1;
1197
- const u = [];
1198
- let g = be.deepClone(l);
1199
- g = g.slice(3), g.unshift("drawingsOrder"), u.push(g);
1199
+ const m = [];
1200
+ let g = ye.deepClone(l);
1201
+ g = g.slice(3), g.unshift("drawingsOrder"), m.push(g);
1200
1202
  const p = {
1201
1203
  id: J.id,
1202
1204
  params: {
@@ -1205,7 +1207,7 @@ const Sn = {
1205
1207
  textRanges: null
1206
1208
  }
1207
1209
  };
1208
- return p.params.actions = u.reduce((v, w) => q.compose(v, w), null), !!n.syncExecuteCommand(p.id, p.params);
1210
+ return p.params.actions = m.reduce((v, w) => q.compose(v, w), null), !!n.syncExecuteCommand(p.id, p.params);
1209
1211
  }
1210
1212
  }, dt = {
1211
1213
  id: "doc.command.ungroup-doc-image",
@@ -1215,30 +1217,32 @@ const Sn = {
1215
1217
  const n = i.get(Be);
1216
1218
  if (!e) return !1;
1217
1219
  const t = [];
1218
- return e.forEach(({ parent: r, children: o }) => {
1219
- t.push(r.unitId), o.forEach((s) => {
1220
- t.push(s.unitId);
1220
+ e.forEach(({ parent: l, children: m }) => {
1221
+ t.push(l.unitId), m.forEach((g) => {
1222
+ t.push(g.unitId);
1221
1223
  });
1222
- }), n.getUngroupDrawingOp(e), !1;
1224
+ });
1225
+ const r = n.getUngroupDrawingOp(e), { unitId: o, subUnitId: s, undo: c, redo: d, objects: a } = r;
1226
+ return !1;
1223
1227
  }
1224
1228
  };
1225
- var Wi = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Vi = (i, e, n, t) => {
1226
- for (var r = t > 1 ? void 0 : t ? Gi(e, n) : e, o = i.length - 1, s; o >= 0; o--)
1227
- (s = i[o]) && (r = (t ? s(e, n, r) : s(r)) || r);
1228
- return t && r && Wi(e, n, r), r;
1229
+ var ki = Object.getOwnPropertyDescriptor, Fi = (i, e, n, t) => {
1230
+ for (var r = t > 1 ? void 0 : t ? ki(e, n) : e, o = i.length - 1, s; o >= 0; o--)
1231
+ (s = i[o]) && (r = s(r) || r);
1232
+ return r;
1229
1233
  }, me = (i, e) => (n, t) => e(n, t, i);
1230
1234
  let sn = class extends Xe {
1231
- constructor(i, e, n, t, r, o, s, c, d, a, l, u, g) {
1232
- super(), this._context = i, this._commandService = e, this._docSelectionManagerService = n, this._renderManagerSrv = t, this._imageIoService = r, this._docDrawingService = o, this._drawingManagerService = s, this._contextService = c, this._messageService = d, this._localeService = a, this._docSelectionRenderService = l, this._docRefreshDrawingsService = u, this._fileOpenerService = g, this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener(), this._transformDrawingListener(), this._editAreaChangeListener();
1235
+ constructor(i, e, n, t, r, o, s, c, d, a, l, m, g) {
1236
+ super(), this._context = i, this._commandService = e, this._docSelectionManagerService = n, this._renderManagerSrv = t, this._imageIoService = r, this._docDrawingService = o, this._drawingManagerService = s, this._contextService = c, this._messageService = d, this._localeService = a, this._docSelectionRenderService = l, this._docRefreshDrawingsService = m, this._fileOpenerService = g, this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener(), this._transformDrawingListener(), this._editAreaChangeListener();
1233
1237
  }
1234
1238
  async insertDocImage() {
1235
1239
  const i = await this._fileOpenerService.openFile({
1236
1240
  multiple: !0,
1237
1241
  accept: Vt.map((n) => `.${n.replace("image/", "")}`).join(",")
1238
1242
  }), e = i.length;
1239
- return e > Tn ? (this._messageService.show({
1243
+ return e > Pn ? (this._messageService.show({
1240
1244
  type: Ln.Error,
1241
- content: this._localeService.t("update-status.exceedMaxCount", String(Tn))
1245
+ content: this._localeService.t("update-status.exceedMaxCount", String(Pn))
1242
1246
  }), !1) : e === 0 ? !1 : (await this._insertFloatImages(i), !0);
1243
1247
  }
1244
1248
  // eslint-disable-next-line max-lines-per-function
@@ -1271,11 +1275,11 @@ let sn = class extends Xe {
1271
1275
  for (const r of e) {
1272
1276
  if (r == null)
1273
1277
  continue;
1274
- const { imageId: o, imageSourceType: s, source: c, base64Cache: d } = r, { width: a, height: l, image: u } = await $t(d || "");
1275
- this._imageIoService.addImageSourceCache(o, s, u);
1278
+ const { imageId: o, imageSourceType: s, source: c, base64Cache: d } = r, { width: a, height: l, image: m } = await $t(d || "");
1279
+ this._imageIoService.addImageSourceCache(o, s, m);
1276
1280
  let g = 1;
1277
- if (a > bn || l > yn) {
1278
- const w = bn / a, S = yn / l;
1281
+ if (a > yn || l > bn) {
1282
+ const w = yn / a, S = bn / l;
1279
1283
  g = Math.min(w, S);
1280
1284
  }
1281
1285
  const p = this._getImagePosition(a * g, l * g);
@@ -1285,10 +1289,10 @@ let sn = class extends Xe {
1285
1289
  unitId: n,
1286
1290
  subUnitId: n,
1287
1291
  drawingId: o,
1288
- drawingType: Rt.DRAWING_IMAGE,
1292
+ drawingType: Mt.DRAWING_IMAGE,
1289
1293
  imageSourceType: s,
1290
1294
  source: c,
1291
- transform: wi(p),
1295
+ transform: pi(p),
1292
1296
  docTransform: p,
1293
1297
  behindDoc: oe.FALSE,
1294
1298
  title: "",
@@ -1311,12 +1315,11 @@ let sn = class extends Xe {
1311
1315
  _isInsertInHeaderFooter() {
1312
1316
  var t;
1313
1317
  const { unitId: i } = this._context, e = (t = this._renderManagerSrv.getRenderById(i)) == null ? void 0 : t.with(se).getViewModel(), n = e == null ? void 0 : e.getEditArea();
1314
- return n === ke.HEADER || n === ke.FOOTER;
1318
+ return n === Fe.HEADER || n === Fe.FOOTER;
1315
1319
  }
1316
1320
  _getImagePosition(i, e) {
1317
1321
  const n = this._docSelectionRenderService.getActiveTextRange(), t = (n == null ? void 0 : n.getAbsolutePosition()) || {
1318
- left: 0,
1319
- top: 0
1322
+ left: 0
1320
1323
  };
1321
1324
  return {
1322
1325
  size: {
@@ -1408,11 +1411,11 @@ let sn = class extends Xe {
1408
1411
  const { unit: i, scene: e, unitId: n } = this._context, t = (c = this._renderManagerSrv.getRenderById(n)) == null ? void 0 : c.with(se).getViewModel();
1409
1412
  if (t == null || i == null)
1410
1413
  return;
1411
- const r = i.getSnapshot(), { drawings: o = {} } = r, s = t.getEditArea() === ke.BODY;
1414
+ const r = i.getSnapshot(), { drawings: o = {} } = r, s = t.getEditArea() === Fe.BODY;
1412
1415
  for (const d of Object.keys(o)) {
1413
- const a = o[d], l = zt({ unitId: n, drawingId: a.drawingId, subUnitId: n }), u = e.fuzzyMathObjects(l, !0);
1414
- if (u.length)
1415
- for (const g of u)
1416
+ const a = o[d], l = zt({ unitId: n, drawingId: a.drawingId, subUnitId: n }), m = e.fuzzyMathObjects(l, !0);
1417
+ if (m.length)
1418
+ for (const g of m)
1416
1419
  e.detachTransformerFrom(g), g.setOpacity(0.5), (s && a.isMultiTransform !== oe.TRUE || !s && a.isMultiTransform === oe.TRUE) && (e.attachTransformerTo(g), g.setOpacity(1));
1417
1420
  }
1418
1421
  }
@@ -1444,26 +1447,26 @@ let sn = class extends Xe {
1444
1447
  this._docSelectionManagerService.replaceDocRanges(t);
1445
1448
  }
1446
1449
  };
1447
- sn = Vi([
1450
+ sn = Fi([
1448
1451
  me(1, z),
1449
1452
  me(2, ve(In)),
1450
1453
  me(3, ee),
1451
- me(4, qt),
1454
+ me(4, Gt),
1452
1455
  me(5, Be),
1453
1456
  me(6, Ie),
1454
1457
  me(7, Vn),
1455
- me(8, oi),
1458
+ me(8, ri),
1456
1459
  me(9, ve(ln)),
1457
1460
  me(10, ve(Me)),
1458
1461
  me(11, ve(gn)),
1459
- me(12, si)
1462
+ me(12, oi)
1460
1463
  ], sn);
1461
1464
  const lt = {
1462
1465
  id: "doc.command.insert-float-image",
1463
1466
  type: K.COMMAND,
1464
1467
  handler: (i) => {
1465
1468
  var n, t;
1466
- return (t = (n = i.get(ee).getCurrentTypeOfRenderer(ye.UNIVER_DOC)) == null ? void 0 : n.with(sn).insertDocImage()) != null ? t : !1;
1469
+ return (t = (n = i.get(ee).getCurrentTypeOfRenderer(be.UNIVER_DOC)) == null ? void 0 : n.with(sn).insertDocImage()) != null ? t : !1;
1467
1470
  }
1468
1471
  }, Ke = {
1469
1472
  id: "doc.command.move-drawing",
@@ -1475,16 +1478,16 @@ const lt = {
1475
1478
  const d = c[0].unitId, a = o.getRenderById(d), l = a == null ? void 0 : a.scene;
1476
1479
  if (l == null)
1477
1480
  return !1;
1478
- const u = l.getTransformerByCreate(), g = r.getUniverDocInstance(d), p = c.map((v) => {
1479
- var b, A, U, N, I;
1480
- const { drawingId: w } = v, S = (b = g == null ? void 0 : g.getSnapshot().drawings) == null ? void 0 : b[w];
1481
+ const m = l.getTransformerByCreate(), g = r.getUniverDocInstance(d), p = c.map((v) => {
1482
+ var y, A, U, N, I;
1483
+ const { drawingId: w } = v, S = (y = g == null ? void 0 : g.getSnapshot().drawings) == null ? void 0 : y[w];
1481
1484
  if (S == null || S.layoutType === H.INLINE)
1482
1485
  return null;
1483
- const { positionH: O, positionV: D } = S.docTransform, P = { ...O }, M = { ...D };
1484
- return s === fe.UP ? M.posOffset = ((A = M.posOffset) != null ? A : 0) - 2 : s === fe.DOWN ? M.posOffset = ((U = M.posOffset) != null ? U : 0) + 2 : s === fe.LEFT ? P.posOffset = ((N = P.posOffset) != null ? N : 0) - 2 : s === fe.RIGHT && (P.posOffset = ((I = P.posOffset) != null ? I : 0) + 2), {
1486
+ const { positionH: O, positionV: D } = S.docTransform, T = { ...O }, M = { ...D };
1487
+ return s === fe.UP ? M.posOffset = ((A = M.posOffset) != null ? A : 0) - 2 : s === fe.DOWN ? M.posOffset = ((U = M.posOffset) != null ? U : 0) + 2 : s === fe.LEFT ? T.posOffset = ((N = T.posOffset) != null ? N : 0) - 2 : s === fe.RIGHT && (T.posOffset = ((I = T.posOffset) != null ? I : 0) + 2), {
1485
1488
  drawingId: w,
1486
1489
  key: s === fe.UP || s === fe.DOWN ? "positionV" : "positionH",
1487
- value: s === fe.UP || s === fe.DOWN ? M : P
1490
+ value: s === fe.UP || s === fe.DOWN ? M : T
1488
1491
  };
1489
1492
  }).filter((v) => v != null);
1490
1493
  if (p.length === 0)
@@ -1494,9 +1497,9 @@ const lt = {
1494
1497
  subUnitId: d,
1495
1498
  drawings: p
1496
1499
  });
1497
- return u.refreshControls(), !!h;
1500
+ return m.refreshControls(), !!h;
1498
1501
  }
1499
- }, ji = {
1502
+ }, Hi = {
1500
1503
  id: "doc.operation.clear-drawing-transformer",
1501
1504
  type: K.MUTATION,
1502
1505
  handler: (i, e) => {
@@ -1510,7 +1513,7 @@ const lt = {
1510
1513
  id: "sidebar.operation.doc-image",
1511
1514
  type: K.COMMAND,
1512
1515
  handler: async (i, e) => {
1513
- const n = i.get(ai), t = i.get(ln), r = i.get(Ie);
1516
+ const n = i.get(si), t = i.get(ln), r = i.get(Ie);
1514
1517
  switch (e.value) {
1515
1518
  case "open":
1516
1519
  n.open({
@@ -1550,27 +1553,21 @@ function j() {
1550
1553
  for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = ft(i)) && (t && (t += " "), t += e);
1551
1554
  return t;
1552
1555
  }
1553
- const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", qi = "univer-image-common-panel-border", Xi = "univer-image-common-panel-title", Ki = "univer-image-common-panel-subtitle", Yi = "univer-image-common-panel-row", Zi = "univer-image-common-panel-row-vertical", Qi = "univer-image-common-panel-column", Ji = "univer-image-common-panel-column-center", er = "univer-image-common-panel-inline", nr = "univer-image-common-panel-span2", tr = "univer-image-common-panel-span3", ir = "univer-image-common-panel-input", rr = "univer-sheet-image-menu", or = "univer-sheet-image-menu-input", m = {
1554
- imageCommonPanel: $i,
1555
- imageCommonPanelGrid: zi,
1556
- imageCommonPanelBorder: qi,
1557
- imageCommonPanelTitle: Xi,
1558
- imageCommonPanelSubtitle: Ki,
1559
- imageCommonPanelRow: Yi,
1560
- imageCommonPanelRowVertical: Zi,
1561
- imageCommonPanelColumn: Qi,
1562
- imageCommonPanelColumnCenter: Ji,
1563
- imageCommonPanelInline: er,
1564
- imageCommonPanelSpan2: nr,
1565
- imageCommonPanelSpan3: tr,
1566
- imageCommonPanelInput: ir,
1567
- sheetImageMenu: rr,
1568
- sheetImageMenuInput: or
1569
- }, Hn = -1e3, Wn = 1e3, sr = (i) => {
1556
+ const Wi = "univer-image-common-panel", Gi = "univer-image-common-panel-grid", Vi = "univer-image-common-panel-border", ji = "univer-image-common-panel-title", $i = "univer-image-common-panel-subtitle", zi = "univer-image-common-panel-row", qi = "univer-image-common-panel-column", Xi = "univer-image-common-panel-span2", Ki = "univer-image-common-panel-input", u = {
1557
+ imageCommonPanel: Wi,
1558
+ imageCommonPanelGrid: Gi,
1559
+ imageCommonPanelBorder: Vi,
1560
+ imageCommonPanelTitle: ji,
1561
+ imageCommonPanelSubtitle: $i,
1562
+ imageCommonPanelRow: zi,
1563
+ imageCommonPanelColumn: qi,
1564
+ imageCommonPanelSpan2: Xi,
1565
+ imageCommonPanelInput: Ki
1566
+ }, Hn = -1e3, Wn = 1e3, Yi = (i) => {
1570
1567
  const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(Q), { drawings: s } = i, c = s[0];
1571
1568
  if (c == null)
1572
1569
  return;
1573
- const { unitId: d } = c, a = o.getUniverDocInstance(d), l = a == null ? void 0 : a.getSnapshot().documentStyle.documentFlavor, u = r.getRenderById(d), g = u == null ? void 0 : u.scene;
1570
+ const { unitId: d } = c, a = o.getUniverDocInstance(d), l = a == null ? void 0 : a.getSnapshot().documentStyle.documentFlavor, m = r.getRenderById(d), g = m == null ? void 0 : m.scene;
1574
1571
  if (g == null)
1575
1572
  return;
1576
1573
  const p = g.getTransformerByCreate(), h = [{
@@ -1600,106 +1597,106 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1600
1597
  }], [w, S] = re(!0), [O, D] = re({
1601
1598
  relativeFrom: ne.PAGE,
1602
1599
  posOffset: 0
1603
- }), [P, M] = re({
1600
+ }), [T, M] = re({
1604
1601
  relativeFrom: V.PAGE,
1605
1602
  posOffset: 0
1606
- }), [b, A] = re(!0), [U, N] = re(!0);
1603
+ }), [y, A] = re(!0), [U, N] = re(!0);
1607
1604
  function I(C, R) {
1608
- var y;
1605
+ var b;
1609
1606
  C === "positionH" ? D(R) : M(R);
1610
- const T = t.getFocusDrawings();
1611
- if (T.length === 0)
1607
+ const P = t.getFocusDrawings();
1608
+ if (P.length === 0)
1612
1609
  return;
1613
- const B = T.map((E) => ({
1610
+ const B = P.map((E) => ({
1614
1611
  unitId: E.unitId,
1615
1612
  subUnitId: E.subUnitId,
1616
1613
  drawingId: E.drawingId
1617
1614
  }));
1618
1615
  e.executeCommand(qe.id, {
1619
- unitId: T[0].unitId,
1620
- subUnitId: T[0].unitId,
1616
+ unitId: P[0].unitId,
1617
+ subUnitId: P[0].unitId,
1621
1618
  drawings: B.map((E) => ({
1622
1619
  drawingId: E.drawingId,
1623
1620
  key: C,
1624
1621
  value: R
1625
1622
  }))
1626
1623
  });
1627
- const F = (y = r.getRenderById(d)) == null ? void 0 : y.with(Me);
1628
- F && F.blur(), p.refreshControls();
1624
+ const k = (b = r.getRenderById(d)) == null ? void 0 : b.with(Me);
1625
+ k && k.blur(), p.refreshControls();
1629
1626
  }
1630
1627
  function L(C) {
1631
1628
  var ie, _e, Se;
1632
- const R = O.relativeFrom, T = O.posOffset, B = Number(C);
1629
+ const R = O.relativeFrom, P = O.posOffset, B = Number(C);
1633
1630
  if (R === B)
1634
1631
  return;
1635
- const F = t.getFocusDrawings();
1636
- if (F.length === 0)
1632
+ const k = t.getFocusDrawings();
1633
+ if (k.length === 0)
1637
1634
  return;
1638
- const y = F[0].drawingId, E = F[0].unitId;
1639
- let $ = null, k = 0;
1635
+ const b = k[0].drawingId, E = k[0].unitId;
1636
+ let $ = null, F = 0;
1640
1637
  const Y = (ie = r.getRenderById(E)) == null ? void 0 : ie.with(se).getSkeleton(), ae = Y == null ? void 0 : Y.getSkeletonData();
1641
1638
  if (ae == null)
1642
1639
  return;
1643
1640
  const { pages: Ue, skeHeaders: Re, skeFooters: We } = ae;
1644
1641
  for (const de of Ue) {
1645
- const { marginLeft: De, skeDrawings: Oe, headerId: Ne, footerId: Ae, pageWidth: Pe } = de;
1646
- if (Oe.has(y)) {
1647
- $ = Oe.get(y), k = De;
1642
+ const { marginLeft: De, skeDrawings: Oe, headerId: Ne, footerId: Ae, pageWidth: Te } = de;
1643
+ if (Oe.has(b)) {
1644
+ $ = Oe.get(b), F = De;
1648
1645
  break;
1649
1646
  }
1650
- const le = (_e = Re.get(Ne)) == null ? void 0 : _e.get(Pe);
1651
- if (le != null && le.skeDrawings.has(y)) {
1652
- $ = le == null ? void 0 : le.skeDrawings.get(y), k = De;
1647
+ const le = (_e = Re.get(Ne)) == null ? void 0 : _e.get(Te);
1648
+ if (le != null && le.skeDrawings.has(b)) {
1649
+ $ = le == null ? void 0 : le.skeDrawings.get(b), F = De;
1653
1650
  break;
1654
1651
  }
1655
- const ge = (Se = We.get(Ae)) == null ? void 0 : Se.get(Pe);
1656
- if (ge != null && ge.skeDrawings.has(y)) {
1657
- $ = ge == null ? void 0 : ge.skeDrawings.get(y), k = De;
1652
+ const ge = (Se = We.get(Ae)) == null ? void 0 : Se.get(Te);
1653
+ if (ge != null && ge.skeDrawings.has(b)) {
1654
+ $ = ge == null ? void 0 : ge.skeDrawings.get(b), F = De;
1658
1655
  break;
1659
1656
  }
1660
1657
  }
1661
1658
  if ($ == null)
1662
1659
  return;
1663
1660
  let ce = 0;
1664
- R === ne.COLUMN ? ce -= $.columnLeft : R === ne.MARGIN && (ce -= k), B === ne.COLUMN ? ce += $.columnLeft : B === ne.MARGIN ? ce += k : ne.PAGE;
1661
+ R === ne.COLUMN ? ce -= $.columnLeft : R === ne.MARGIN && (ce -= F), B === ne.COLUMN ? ce += $.columnLeft : B === ne.MARGIN ? ce += F : ne.PAGE;
1665
1662
  const te = {
1666
1663
  relativeFrom: B,
1667
- posOffset: (T != null ? T : 0) - ce
1664
+ posOffset: (P != null ? P : 0) - ce
1668
1665
  };
1669
1666
  I("positionH", te);
1670
1667
  }
1671
1668
  function W(C) {
1672
- var Oe, Ne, Ae, Pe, le, ge;
1673
- const R = P.relativeFrom, T = P.posOffset, B = Number(C);
1669
+ var Oe, Ne, Ae, Te, le, ge;
1670
+ const R = T.relativeFrom, P = T.posOffset, B = Number(C);
1674
1671
  if (R === B)
1675
1672
  return;
1676
- const F = t.getFocusDrawings();
1677
- if (F.length === 0)
1673
+ const k = t.getFocusDrawings();
1674
+ if (k.length === 0)
1678
1675
  return;
1679
- const { drawingId: y, unitId: E } = F[0], $ = o.getUniverDocInstance(E), k = (Oe = r.getRenderById(E)) == null ? void 0 : Oe.with(se).getSkeleton(), Y = (Ne = r.getRenderById(E)) == null ? void 0 : Ne.with(Me), ae = Y == null ? void 0 : Y.getSegment(), Ue = Y == null ? void 0 : Y.getSegmentPage(), Re = (Pe = (Ae = $ == null ? void 0 : $.getSelfOrHeaderFooterModel(ae).getBody()) == null ? void 0 : Ae.customBlocks) == null ? void 0 : Pe.find((Ee) => Ee.blockId === y);
1680
- if (Re == null || k == null || Y == null)
1676
+ const { drawingId: b, unitId: E } = k[0], $ = o.getUniverDocInstance(E), F = (Oe = r.getRenderById(E)) == null ? void 0 : Oe.with(se).getSkeleton(), Y = (Ne = r.getRenderById(E)) == null ? void 0 : Ne.with(Me), ae = Y == null ? void 0 : Y.getSegment(), Ue = Y == null ? void 0 : Y.getSegmentPage(), Re = (Te = (Ae = $ == null ? void 0 : $.getSelfOrHeaderFooterModel(ae).getBody()) == null ? void 0 : Ae.customBlocks) == null ? void 0 : Te.find((Ee) => Ee.blockId === b);
1677
+ if (Re == null || F == null || Y == null)
1681
1678
  return;
1682
- const { startIndex: We } = Re, ce = k.findNodeByCharIndex(We, ae, Ue), te = (le = ce == null ? void 0 : ce.parent) == null ? void 0 : le.parent, ie = te == null ? void 0 : te.parent, _e = ie == null ? void 0 : ie.lines.find((Ee) => Ee.paragraphIndex === (te == null ? void 0 : te.paragraphIndex) && Ee.paragraphStart), Se = (ge = ie == null ? void 0 : ie.parent) == null ? void 0 : ge.parent;
1679
+ const { startIndex: We } = Re, ce = F.findNodeByCharIndex(We, ae, Ue), te = (le = ce == null ? void 0 : ce.parent) == null ? void 0 : le.parent, ie = te == null ? void 0 : te.parent, _e = ie == null ? void 0 : ie.lines.find((Ee) => Ee.paragraphIndex === (te == null ? void 0 : te.paragraphIndex) && Ee.paragraphStart), Se = (ge = ie == null ? void 0 : ie.parent) == null ? void 0 : ge.parent;
1683
1680
  if (ce == null || te == null || _e == null || ie == null || Se == null)
1684
1681
  return;
1685
1682
  let de = 0;
1686
1683
  R === V.PARAGRAPH ? de -= _e.top : R === V.LINE ? de -= te.top : R === V.PAGE && (de += Se.marginTop), B === V.PARAGRAPH ? de += _e.top : B === V.LINE ? de += te.top : B === V.PAGE && (de -= Se.marginTop);
1687
1684
  const De = {
1688
1685
  relativeFrom: B,
1689
- posOffset: (T != null ? T : 0) - de
1686
+ posOffset: (P != null ? P : 0) - de
1690
1687
  };
1691
1688
  I("positionV", De);
1692
1689
  }
1693
1690
  function x(C) {
1694
1691
  var E;
1695
- const R = a == null ? void 0 : a.getSnapshot(), T = (E = R == null ? void 0 : R.drawings) == null ? void 0 : E[C.drawingId];
1696
- if (T == null)
1692
+ const R = a == null ? void 0 : a.getSnapshot(), P = (E = R == null ? void 0 : R.drawings) == null ? void 0 : E[C.drawingId];
1693
+ if (P == null)
1697
1694
  return;
1698
- const { layoutType: B } = T, {
1699
- positionH: F,
1700
- positionV: y
1701
- } = T.docTransform;
1702
- D(F), M(y), S(B === H.INLINE), A(y.relativeFrom === V.PARAGRAPH || y.relativeFrom === V.LINE);
1695
+ const { layoutType: B } = P, {
1696
+ positionH: k,
1697
+ positionV: b
1698
+ } = P.docTransform;
1699
+ D(k), M(b), S(B === H.INLINE), A(b.relativeFrom === V.PARAGRAPH || b.relativeFrom === V.LINE);
1703
1700
  }
1704
1701
  function G() {
1705
1702
  const C = t.getFocusDrawings();
@@ -1710,26 +1707,26 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1710
1707
  }
1711
1708
  return _n(() => {
1712
1709
  G();
1713
- const C = t.focus$.subscribe((T) => {
1714
- if (T.length === 0) {
1710
+ const C = t.focus$.subscribe((P) => {
1711
+ if (P.length === 0) {
1715
1712
  N(!1);
1716
1713
  return;
1717
1714
  }
1718
- N(!0), x(T[0]);
1719
- }), R = e.onCommandExecuted(async (T) => {
1720
- T.id === J.id && G();
1715
+ N(!0), x(P[0]);
1716
+ }), R = e.onCommandExecuted(async (P) => {
1717
+ P.id === J.id && G();
1721
1718
  });
1722
1719
  return () => {
1723
1720
  C.unsubscribe(), R.dispose();
1724
1721
  };
1725
- }, []), /* @__PURE__ */ X("div", { className: j(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: U ? "block" : "none" }, children: [
1726
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelTitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.title") }) }) }),
1727
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.horizontal") }) }) }),
1728
- /* @__PURE__ */ X("div", { className: m.imageCommonPanelRow, children: [
1729
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1730
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: n.t("image-position.absolutePosition") }) }),
1731
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1732
- Fe,
1722
+ }, []), /* @__PURE__ */ X("div", { className: j(u.imageCommonPanelGrid, u.imageCommonPanelBorder), style: { display: U ? "block" : "none" }, children: [
1723
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.title") }) }) }),
1724
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.horizontal") }) }) }),
1725
+ /* @__PURE__ */ X("div", { className: u.imageCommonPanelRow, children: [
1726
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1727
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-position.absolutePosition") }) }),
1728
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1729
+ ke,
1733
1730
  {
1734
1731
  min: Hn,
1735
1732
  max: Wn,
@@ -1742,13 +1739,13 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1742
1739
  posOffset: C
1743
1740
  });
1744
1741
  },
1745
- className: m.imageCommonPanelInput
1742
+ className: u.imageCommonPanelInput
1746
1743
  }
1747
1744
  ) }) })
1748
1745
  ] }) }),
1749
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1750
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: n.t("image-position.toTheRightOf") }) }),
1751
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1746
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1747
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-position.toTheRightOf") }) }),
1748
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1752
1749
  Bn,
1753
1750
  {
1754
1751
  value: String(O.relativeFrom),
@@ -1759,52 +1756,52 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1759
1756
  ) }) })
1760
1757
  ] }) })
1761
1758
  ] }),
1762
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.vertical") }) }) }),
1763
- /* @__PURE__ */ X("div", { className: m.imageCommonPanelRow, children: [
1764
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1765
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: n.t("image-position.absolutePosition") }) }),
1766
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1767
- Fe,
1759
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.vertical") }) }) }),
1760
+ /* @__PURE__ */ X("div", { className: u.imageCommonPanelRow, children: [
1761
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1762
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-position.absolutePosition") }) }),
1763
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1764
+ ke,
1768
1765
  {
1769
1766
  min: Hn,
1770
1767
  max: Wn,
1771
1768
  precision: 1,
1772
1769
  disabled: w,
1773
- value: P.posOffset,
1770
+ value: T.posOffset,
1774
1771
  onChange: (C) => {
1775
1772
  I("positionV", {
1776
- relativeFrom: P.relativeFrom,
1773
+ relativeFrom: T.relativeFrom,
1777
1774
  posOffset: C
1778
1775
  });
1779
1776
  },
1780
- className: m.imageCommonPanelInput
1777
+ className: u.imageCommonPanelInput
1781
1778
  }
1782
1779
  ) }) })
1783
1780
  ] }) }),
1784
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1785
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: n.t("image-position.bellow") }) }),
1786
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1781
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1782
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-position.bellow") }) }),
1783
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1787
1784
  Bn,
1788
1785
  {
1789
1786
  disabled: w,
1790
- value: String(P.relativeFrom),
1787
+ value: String(T.relativeFrom),
1791
1788
  options: v,
1792
1789
  onChange: W
1793
1790
  }
1794
1791
  ) }) })
1795
1792
  ] }) })
1796
1793
  ] }),
1797
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.options") }) }) }),
1798
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, style: { marginBottom: "50px" }, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(Di, { disabled: w, checked: b, onChange: _, children: n.t("image-position.moveObjectWithText") }) }) })
1794
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.options") }) }) }),
1795
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, style: { marginBottom: "50px" }, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(Ci, { disabled: w, checked: y, onChange: _, children: n.t("image-position.moveObjectWithText") }) }) })
1799
1796
  ] });
1800
- }, Je = 0, en = 100, ar = (i) => {
1797
+ }, Je = 0, en = 100, Zi = (i) => {
1801
1798
  const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(Q), { drawings: s } = i, c = s[0];
1802
1799
  if (c == null)
1803
1800
  return null;
1804
1801
  const { unitId: d } = c, a = o.getUniverDocInstance(d), l = r.getRenderById(d);
1805
1802
  if ((l == null ? void 0 : l.scene) == null)
1806
1803
  return null;
1807
- const [g, p] = re(!0), [h, v] = re(!0), [w, S] = re(!0), [O, D] = re(ue.INLINE), [P, M] = re(""), [b, A] = re({
1804
+ const [g, p] = re(!0), [h, v] = re(!0), [w, S] = re(!0), [O, D] = re(ue.INLINE), [T, M] = re(""), [y, A] = re({
1808
1805
  distT: 0,
1809
1806
  distL: 0,
1810
1807
  distB: 0,
@@ -1815,14 +1812,14 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1815
1812
  const C = t.getFocusDrawings();
1816
1813
  if (C.length === 0)
1817
1814
  return;
1818
- const { unitId: R, subUnitId: T } = C[0], B = C.map(({ unitId: F, subUnitId: y, drawingId: E }) => ({
1819
- unitId: F,
1820
- subUnitId: y,
1815
+ const { unitId: R, subUnitId: P } = C[0], B = C.map(({ unitId: k, subUnitId: b, drawingId: E }) => ({
1816
+ unitId: k,
1817
+ subUnitId: b,
1821
1818
  drawingId: E
1822
1819
  }));
1823
1820
  e.executeCommand(Zn.id, {
1824
1821
  unitId: R,
1825
- subUnitId: T,
1822
+ subUnitId: P,
1826
1823
  drawings: B,
1827
1824
  wrappingStyle: _
1828
1825
  });
@@ -1832,10 +1829,10 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1832
1829
  const C = t.getFocusDrawings();
1833
1830
  if (C.length === 0)
1834
1831
  return;
1835
- const R = C.map((T) => ({
1836
- unitId: T.unitId,
1837
- subUnitId: T.subUnitId,
1838
- drawingId: T.drawingId
1832
+ const R = C.map((P) => ({
1833
+ unitId: P.unitId,
1834
+ subUnitId: P.subUnitId,
1835
+ drawingId: P.drawingId
1839
1836
  }));
1840
1837
  e.executeCommand(Jn.id, {
1841
1838
  unitId: C[0].unitId,
@@ -1847,19 +1844,19 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1847
1844
  function W(_, C) {
1848
1845
  if (_ == null)
1849
1846
  return;
1850
- const R = { ...b, [C]: _ };
1847
+ const R = { ...y, [C]: _ };
1851
1848
  A(R);
1852
- const T = t.getFocusDrawings();
1853
- if (T.length === 0)
1849
+ const P = t.getFocusDrawings();
1850
+ if (P.length === 0)
1854
1851
  return;
1855
- const B = T.map((F) => ({
1856
- unitId: F.unitId,
1857
- subUnitId: F.subUnitId,
1858
- drawingId: F.drawingId
1852
+ const B = P.map((k) => ({
1853
+ unitId: k.unitId,
1854
+ subUnitId: k.subUnitId,
1855
+ drawingId: k.drawingId
1859
1856
  }));
1860
1857
  e.executeCommand(Qn.id, {
1861
- unitId: T[0].unitId,
1862
- subUnitId: T[0].unitId,
1858
+ unitId: P[0].unitId,
1859
+ subUnitId: P[0].unitId,
1863
1860
  drawings: B,
1864
1861
  dist: {
1865
1862
  [C]: _
@@ -1877,22 +1874,22 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1877
1874
  return;
1878
1875
  const {
1879
1876
  distT: R = 0,
1880
- distL: T = 0,
1877
+ distL: P = 0,
1881
1878
  distB: B = 0,
1882
- distR: F = 0,
1883
- layoutType: y = H.INLINE,
1879
+ distR: k = 0,
1880
+ layoutType: b = H.INLINE,
1884
1881
  behindDoc: E = oe.FALSE,
1885
1882
  wrapText: $ = $e.BOTH_SIDES
1886
1883
  } = C;
1887
1884
  if (A({
1888
1885
  distT: R,
1889
- distL: T,
1886
+ distL: P,
1890
1887
  distB: B,
1891
- distR: F
1892
- }), M($), p(y !== H.WRAP_SQUARE), y === H.WRAP_NONE || y === H.INLINE ? v(!0) : v(!1), y === H.WRAP_NONE || y === H.INLINE || y === H.WRAP_TOP_AND_BOTTOM ? S(!0) : S(!1), y === H.WRAP_NONE)
1888
+ distR: k
1889
+ }), M($), p(b !== H.WRAP_SQUARE), b === H.WRAP_NONE || b === H.INLINE ? v(!0) : v(!1), b === H.WRAP_NONE || b === H.INLINE || b === H.WRAP_TOP_AND_BOTTOM ? S(!0) : S(!1), b === H.WRAP_NONE)
1893
1890
  E === oe.TRUE ? D(ue.BEHIND_TEXT) : D(ue.IN_FRONT_OF_TEXT);
1894
1891
  else
1895
- switch (y) {
1892
+ switch (b) {
1896
1893
  case H.INLINE:
1897
1894
  D(ue.INLINE);
1898
1895
  break;
@@ -1903,7 +1900,7 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1903
1900
  D(ue.WRAP_TOP_AND_BOTTOM);
1904
1901
  break;
1905
1902
  default:
1906
- throw new Error(`Unsupported layout type: ${y}`);
1903
+ throw new Error(`Unsupported layout type: ${b}`);
1907
1904
  }
1908
1905
  }
1909
1906
  return _n(() => {
@@ -1920,97 +1917,97 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
1920
1917
  return () => {
1921
1918
  _.unsubscribe(), C.dispose();
1922
1919
  };
1923
- }, []), /* @__PURE__ */ X("div", { className: j(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: U ? "block" : "none" }, children: [
1924
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelTitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.title") }) }) }),
1925
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.wrappingStyle") }) }) }),
1926
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelRow), children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn), children: /* @__PURE__ */ X(Un, { value: O, onChange: I, direction: "vertical", children: [
1927
- /* @__PURE__ */ f(Te, { value: ue.INLINE, children: n.t("image-text-wrap.inline") }),
1928
- /* @__PURE__ */ f(Te, { value: ue.WRAP_SQUARE, children: n.t("image-text-wrap.square") }),
1929
- /* @__PURE__ */ f(Te, { value: ue.WRAP_TOP_AND_BOTTOM, children: n.t("image-text-wrap.topAndBottom") }),
1930
- /* @__PURE__ */ f(Te, { value: ue.BEHIND_TEXT, children: n.t("image-text-wrap.behindText") }),
1931
- /* @__PURE__ */ f(Te, { value: ue.IN_FRONT_OF_TEXT, children: n.t("image-text-wrap.inFrontText") })
1920
+ }, []), /* @__PURE__ */ X("div", { className: j(u.imageCommonPanelGrid, u.imageCommonPanelBorder), style: { display: U ? "block" : "none" }, children: [
1921
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.title") }) }) }),
1922
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.wrappingStyle") }) }) }),
1923
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelRow), children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn), children: /* @__PURE__ */ X(Un, { value: O, onChange: I, direction: "vertical", children: [
1924
+ /* @__PURE__ */ f(Pe, { value: ue.INLINE, children: n.t("image-text-wrap.inline") }),
1925
+ /* @__PURE__ */ f(Pe, { value: ue.WRAP_SQUARE, children: n.t("image-text-wrap.square") }),
1926
+ /* @__PURE__ */ f(Pe, { value: ue.WRAP_TOP_AND_BOTTOM, children: n.t("image-text-wrap.topAndBottom") }),
1927
+ /* @__PURE__ */ f(Pe, { value: ue.BEHIND_TEXT, children: n.t("image-text-wrap.behindText") }),
1928
+ /* @__PURE__ */ f(Pe, { value: ue.IN_FRONT_OF_TEXT, children: n.t("image-text-wrap.inFrontText") })
1932
1929
  ] }) }) }),
1933
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.wrapText") }) }) }),
1934
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelRow), children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn), children: /* @__PURE__ */ X(Un, { disabled: g, value: P, onChange: L, direction: "horizontal", children: [
1935
- /* @__PURE__ */ f(Te, { value: $e.BOTH_SIDES, children: n.t("image-text-wrap.bothSide") }),
1936
- /* @__PURE__ */ f(Te, { value: $e.LEFT, children: n.t("image-text-wrap.leftOnly") }),
1937
- /* @__PURE__ */ f(Te, { value: $e.RIGHT, children: n.t("image-text-wrap.rightOnly") })
1930
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.wrapText") }) }) }),
1931
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelRow), children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn), children: /* @__PURE__ */ X(Un, { disabled: g, value: T, onChange: L, direction: "horizontal", children: [
1932
+ /* @__PURE__ */ f(Pe, { value: $e.BOTH_SIDES, children: n.t("image-text-wrap.bothSide") }),
1933
+ /* @__PURE__ */ f(Pe, { value: $e.LEFT, children: n.t("image-text-wrap.leftOnly") }),
1934
+ /* @__PURE__ */ f(Pe, { value: $e.RIGHT, children: n.t("image-text-wrap.rightOnly") })
1938
1935
  ] }) }) }),
1939
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.distanceFromText") }) }) }),
1940
- /* @__PURE__ */ X("div", { className: m.imageCommonPanelRow, children: [
1941
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1942
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: n.t("image-text-wrap.top") }) }),
1943
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1944
- Fe,
1936
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.distanceFromText") }) }) }),
1937
+ /* @__PURE__ */ X("div", { className: u.imageCommonPanelRow, children: [
1938
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1939
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-text-wrap.top") }) }),
1940
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1941
+ ke,
1945
1942
  {
1946
1943
  min: Je,
1947
1944
  max: en,
1948
1945
  disabled: h,
1949
1946
  precision: 1,
1950
- value: b.distT,
1947
+ value: y.distT,
1951
1948
  onChange: (_) => {
1952
1949
  W(_, "distT");
1953
1950
  },
1954
- className: m.imageCommonPanelInput
1951
+ className: u.imageCommonPanelInput
1955
1952
  }
1956
1953
  ) }) })
1957
1954
  ] }) }),
1958
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1959
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: n.t("image-text-wrap.left") }) }),
1960
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1961
- Fe,
1955
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1956
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-text-wrap.left") }) }),
1957
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1958
+ ke,
1962
1959
  {
1963
1960
  min: Je,
1964
1961
  max: en,
1965
1962
  disabled: w,
1966
1963
  precision: 1,
1967
- value: b.distL,
1964
+ value: y.distL,
1968
1965
  onChange: (_) => {
1969
1966
  W(_, "distL");
1970
1967
  },
1971
- className: m.imageCommonPanelInput
1968
+ className: u.imageCommonPanelInput
1972
1969
  }
1973
1970
  ) }) })
1974
1971
  ] }) })
1975
1972
  ] }),
1976
- /* @__PURE__ */ X("div", { className: m.imageCommonPanelRow, children: [
1977
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1978
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: n.t("image-text-wrap.bottom") }) }),
1979
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1980
- Fe,
1973
+ /* @__PURE__ */ X("div", { className: u.imageCommonPanelRow, children: [
1974
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1975
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-text-wrap.bottom") }) }),
1976
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1977
+ ke,
1981
1978
  {
1982
1979
  min: Je,
1983
1980
  max: en,
1984
1981
  disabled: h,
1985
1982
  precision: 1,
1986
- value: b.distB,
1983
+ value: y.distB,
1987
1984
  onChange: (_) => {
1988
1985
  W(_, "distB");
1989
1986
  },
1990
- className: m.imageCommonPanelInput
1987
+ className: u.imageCommonPanelInput
1991
1988
  }
1992
1989
  ) }) })
1993
1990
  ] }) }),
1994
- /* @__PURE__ */ f("div", { className: j(m.imageCommonPanelColumn, m.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1995
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: n.t("image-text-wrap.right") }) }),
1996
- /* @__PURE__ */ f("div", { className: m.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: m.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1997
- Fe,
1991
+ /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
1992
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-text-wrap.right") }) }),
1993
+ /* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
1994
+ ke,
1998
1995
  {
1999
1996
  min: Je,
2000
1997
  max: en,
2001
1998
  disabled: w,
2002
1999
  precision: 1,
2003
- value: b.distR,
2000
+ value: y.distR,
2004
2001
  onChange: (_) => {
2005
2002
  W(_, "distR");
2006
2003
  },
2007
- className: m.imageCommonPanelInput
2004
+ className: u.imageCommonPanelInput
2008
2005
  }
2009
2006
  ) }) })
2010
2007
  ] }) })
2011
2008
  ] })
2012
2009
  ] });
2013
- }, cr = () => {
2010
+ }, Qi = () => {
2014
2011
  const i = we(Ie), e = i.getFocusDrawings(), [n, t] = re(e);
2015
2012
  return _n(() => {
2016
2013
  const r = i.focus$.subscribe((o) => {
@@ -2019,20 +2016,20 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
2019
2016
  return () => {
2020
2017
  r.unsubscribe();
2021
2018
  };
2022
- }, []), !!(n != null && n.length) && /* @__PURE__ */ X("div", { className: m.imageCommonPanel, children: [
2023
- /* @__PURE__ */ f(Kt, { drawings: n, hasAlign: !1, hasCropper: !1, hasGroup: !1, hasTransform: !1 }),
2024
- /* @__PURE__ */ f(ar, { drawings: n }),
2025
- /* @__PURE__ */ f(sr, { drawings: n })
2019
+ }, []), !!(n != null && n.length) && /* @__PURE__ */ X("div", { className: u.imageCommonPanel, children: [
2020
+ /* @__PURE__ */ f(Xt, { drawings: n, hasAlign: !1, hasCropper: !1, hasGroup: !1, hasTransform: !1 }),
2021
+ /* @__PURE__ */ f(Zi, { drawings: n }),
2022
+ /* @__PURE__ */ f(Yi, { drawings: n })
2026
2023
  ] });
2027
- }, ht = "addition-and-subtraction-single", pt = "doc.menu.image", wt = lt.id, dr = (i) => {
2024
+ }, ht = "addition-and-subtraction-single", pt = "doc.menu.image", wt = lt.id, Ji = (i) => {
2028
2025
  const e = i.get(In), n = i.get(Q);
2029
- return new Ci((t) => {
2026
+ return new Si((t) => {
2030
2027
  const r = e.textSelection$.subscribe(() => {
2031
2028
  var s;
2032
2029
  const o = e.getActiveTextRange();
2033
2030
  if (o) {
2034
- const { segmentId: c, startOffset: d, endOffset: a } = o, l = n.getCurrentUniverDocInstance(), u = (s = l == null ? void 0 : l.getSelfOrHeaderFooterModel(c).getBody()) == null ? void 0 : s.tables;
2035
- if (u && u.length && u.some((g) => {
2031
+ const { segmentId: c, startOffset: d, endOffset: a } = o, l = n.getCurrentUniverDocInstance(), m = (s = l == null ? void 0 : l.getSelfOrHeaderFooterModel(c).getBody()) == null ? void 0 : s.tables;
2032
+ if (m && m.length && m.some((g) => {
2036
2033
  const { startIndex: p, endIndex: h } = g;
2037
2034
  return d >= p && d < h || a >= p && a < h;
2038
2035
  })) {
@@ -2048,40 +2045,40 @@ const $i = "univer-image-common-panel", zi = "univer-image-common-panel-grid", q
2048
2045
  return () => r.unsubscribe();
2049
2046
  });
2050
2047
  };
2051
- function lr(i) {
2048
+ function er(i) {
2052
2049
  return {
2053
2050
  id: pt,
2054
- type: $n.SUBITEMS,
2051
+ type: zn.SUBITEMS,
2055
2052
  icon: ht,
2056
2053
  tooltip: "docImage.title",
2057
- disabled$: dr(i),
2058
- hidden$: zn(i, ye.UNIVER_DOC)
2054
+ disabled$: Ji(i),
2055
+ hidden$: $n(i, be.UNIVER_DOC)
2059
2056
  };
2060
2057
  }
2061
- function gr(i) {
2058
+ function nr(i) {
2062
2059
  return {
2063
2060
  id: wt,
2064
2061
  title: "docImage.upload.float",
2065
- type: $n.BUTTON,
2066
- hidden$: zn(i, ye.UNIVER_DOC)
2062
+ type: zn.BUTTON,
2063
+ hidden$: $n(i, be.UNIVER_DOC)
2067
2064
  };
2068
2065
  }
2069
- const mr = {
2070
- [ci.LAYOUT]: {
2066
+ const tr = {
2067
+ [ai.LAYOUT]: {
2071
2068
  [pt]: {
2072
2069
  order: 0,
2073
- menuItemFactory: lr,
2070
+ menuItemFactory: er,
2074
2071
  [wt]: {
2075
2072
  order: 0,
2076
- menuItemFactory: gr
2073
+ menuItemFactory: nr
2077
2074
  }
2078
2075
  }
2079
2076
  }
2080
2077
  };
2081
2078
  function Ye(i) {
2082
- return i.getContextValue(Nt) && i.getContextValue(tn);
2079
+ return i.getContextValue(Rt) && i.getContextValue(tn);
2083
2080
  }
2084
- const ur = {
2081
+ const ir = {
2085
2082
  id: Ke.id,
2086
2083
  description: "shortcut.doc.drawing-move-down",
2087
2084
  group: "4_doc-drawing-view",
@@ -2091,7 +2088,7 @@ const ur = {
2091
2088
  staticParameters: {
2092
2089
  direction: fe.DOWN
2093
2090
  }
2094
- }, fr = {
2091
+ }, rr = {
2095
2092
  id: Ke.id,
2096
2093
  description: "shortcut.doc.drawing-move-up",
2097
2094
  group: "4_doc-drawing-view",
@@ -2101,7 +2098,7 @@ const ur = {
2101
2098
  staticParameters: {
2102
2099
  direction: fe.UP
2103
2100
  }
2104
- }, hr = {
2101
+ }, or = {
2105
2102
  id: Ke.id,
2106
2103
  description: "shortcut.doc.drawing-move-left",
2107
2104
  group: "4_doc-drawing-view",
@@ -2111,7 +2108,7 @@ const ur = {
2111
2108
  staticParameters: {
2112
2109
  direction: fe.LEFT
2113
2110
  }
2114
- }, pr = {
2111
+ }, sr = {
2115
2112
  id: Ke.id,
2116
2113
  description: "shortcut.doc.drawing-move-right",
2117
2114
  group: "4_doc-drawing-view",
@@ -2121,7 +2118,7 @@ const ur = {
2121
2118
  staticParameters: {
2122
2119
  direction: fe.RIGHT
2123
2120
  }
2124
- }, wr = {
2121
+ }, ar = {
2125
2122
  id: ot.id,
2126
2123
  description: "shortcut.doc.drawing-delete",
2127
2124
  group: "4_doc-drawing-view",
@@ -2130,10 +2127,10 @@ const ur = {
2130
2127
  binding: He.DELETE,
2131
2128
  mac: He.BACKSPACE
2132
2129
  };
2133
- var vr = Object.defineProperty, Ir = Object.getOwnPropertyDescriptor, _r = (i, e, n, t) => {
2134
- for (var r = t > 1 ? void 0 : t ? Ir(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2135
- (s = i[o]) && (r = (t ? s(e, n, r) : s(r)) || r);
2136
- return t && r && vr(e, n, r), r;
2130
+ var cr = Object.getOwnPropertyDescriptor, dr = (i, e, n, t) => {
2131
+ for (var r = t > 1 ? void 0 : t ? cr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2132
+ (s = i[o]) && (r = s(r) || r);
2133
+ return r;
2137
2134
  }, nn = (i, e) => (n, t) => e(n, t, i);
2138
2135
  let an = class extends Xe {
2139
2136
  constructor(i, e, n, t) {
@@ -2141,10 +2138,10 @@ let an = class extends Xe {
2141
2138
  }
2142
2139
  _initCustomComponents() {
2143
2140
  const i = this._componentManager;
2144
- this.disposeWithMe(i.register(ht, rt)), this.disposeWithMe(i.register(gt, cr));
2141
+ this.disposeWithMe(i.register(ht, rt)), this.disposeWithMe(i.register(gt, Qi));
2145
2142
  }
2146
2143
  _initMenus() {
2147
- this._menuManagerService.mergeMenu(mr);
2144
+ this._menuManagerService.mergeMenu(tr);
2148
2145
  }
2149
2146
  _initCommands() {
2150
2147
  [
@@ -2158,7 +2155,7 @@ let an = class extends Xe {
2158
2155
  nt,
2159
2156
  Sn,
2160
2157
  mt,
2161
- ji,
2158
+ Hi,
2162
2159
  ut,
2163
2160
  st,
2164
2161
  dt,
@@ -2170,11 +2167,11 @@ let an = class extends Xe {
2170
2167
  _initShortcuts() {
2171
2168
  [
2172
2169
  // sheet drawing shortcuts
2173
- ur,
2174
- fr,
2175
- hr,
2176
- pr,
2177
- wr
2170
+ ir,
2171
+ rr,
2172
+ or,
2173
+ sr,
2174
+ ar
2178
2175
  ].forEach((i) => {
2179
2176
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
2180
2177
  });
@@ -2183,25 +2180,25 @@ let an = class extends Xe {
2183
2180
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
2184
2181
  }
2185
2182
  };
2186
- an = _r([
2187
- nn(0, ve(di)),
2188
- nn(1, li),
2183
+ an = dr([
2184
+ nn(0, ve(ci)),
2185
+ nn(1, di),
2189
2186
  nn(2, z),
2190
- nn(3, gi)
2187
+ nn(3, li)
2191
2188
  ], an);
2192
- var Sr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, Dr = (i, e, n, t) => {
2193
- for (var r = t > 1 ? void 0 : t ? Cr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2194
- (s = i[o]) && (r = (t ? s(e, n, r) : s(r)) || r);
2195
- return t && r && Sr(e, n, r), r;
2189
+ var lr = Object.getOwnPropertyDescriptor, gr = (i, e, n, t) => {
2190
+ for (var r = t > 1 ? void 0 : t ? lr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2191
+ (s = i[o]) && (r = s(r) || r);
2192
+ return r;
2196
2193
  }, je = (i, e) => (n, t) => e(n, t, i);
2197
- let cn = class extends At {
2194
+ let cn = class extends Nt {
2198
2195
  constructor(e, n, t, r, o) {
2199
2196
  super();
2200
2197
  Ce(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
2201
2198
  this._drawingManagerService = e, this._canvasPopManagerService = n, this._renderManagerService = t, this._univerInstanceService = r, this._contextService = o, this._init();
2202
2199
  }
2203
2200
  _init() {
2204
- this._univerInstanceService.getCurrentTypeOfUnit$(ye.UNIVER_DOC).pipe(En(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(ye.UNIVER_DOC).pipe(En(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(ye.UNIVER_DOC).forEach((e) => this._create(e));
2201
+ this._univerInstanceService.getCurrentTypeOfUnit$(be.UNIVER_DOC).pipe(En(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(be.UNIVER_DOC).pipe(En(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(be.UNIVER_DOC).forEach((e) => this._create(e));
2205
2202
  }
2206
2203
  _dispose(e) {
2207
2204
  const n = e.getUnitId();
@@ -2216,7 +2213,7 @@ let cn = class extends At {
2216
2213
  _hasCropObject(e) {
2217
2214
  const n = e.getAllObjects();
2218
2215
  for (const t of n)
2219
- if (t instanceof Yt)
2216
+ if (t instanceof Kt)
2220
2217
  return !0;
2221
2218
  return !1;
2222
2219
  }
@@ -2244,21 +2241,21 @@ let cn = class extends At {
2244
2241
  const d = c.oKey, a = this._drawingManagerService.getDrawingOKey(d);
2245
2242
  if (!a)
2246
2243
  return;
2247
- const { unitId: l, subUnitId: u, drawingId: g } = a, p = this._canvasPopManagerService.attachPopupToObject(
2244
+ const { unitId: l, subUnitId: m, drawingId: g } = a, p = this._canvasPopManagerService.attachPopupToObject(
2248
2245
  c,
2249
2246
  {
2250
- componentKey: Zt,
2247
+ componentKey: Yt,
2251
2248
  direction: "horizontal",
2252
2249
  offset: [2, 0],
2253
2250
  extraProps: {
2254
- menuItems: this._getImageMenuItems(l, u, g)
2251
+ menuItems: this._getImageMenuItems(l, m, g)
2255
2252
  }
2256
2253
  },
2257
2254
  l
2258
2255
  );
2259
- r.push(this.disposeWithMe(p)), !this._drawingManagerService.getFocusDrawings().find((w) => w.unitId === l && w.subUnitId === u && w.drawingId === g) && this._drawingManagerService.focusDrawing([{
2256
+ r.push(this.disposeWithMe(p)), !this._drawingManagerService.getFocusDrawings().find((w) => w.unitId === l && w.subUnitId === m && w.drawingId === g) && this._drawingManagerService.focusDrawing([{
2260
2257
  unitId: l,
2261
- subUnitId: u,
2258
+ subUnitId: m,
2262
2259
  drawingId: g
2263
2260
  }]);
2264
2261
  })
@@ -2290,7 +2287,7 @@ let cn = class extends At {
2290
2287
  index: 0,
2291
2288
  commandId: ut.id,
2292
2289
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
2293
- disable: !!Et.includes(e)
2290
+ disable: !!At.includes(e)
2294
2291
  },
2295
2292
  {
2296
2293
  label: "image-popup.delete",
@@ -2302,7 +2299,7 @@ let cn = class extends At {
2302
2299
  {
2303
2300
  label: "image-popup.crop",
2304
2301
  index: 2,
2305
- commandId: Qt.id,
2302
+ commandId: Zt.id,
2306
2303
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
2307
2304
  disable: !0
2308
2305
  // TODO: @JOCS, feature is not ready.
@@ -2310,7 +2307,7 @@ let cn = class extends At {
2310
2307
  {
2311
2308
  label: "image-popup.reset",
2312
2309
  index: 3,
2313
- commandId: Jt.id,
2310
+ commandId: Qt.id,
2314
2311
  commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
2315
2312
  disable: !0
2316
2313
  // TODO: @JOCS, feature is not ready.
@@ -2318,17 +2315,17 @@ let cn = class extends At {
2318
2315
  ];
2319
2316
  }
2320
2317
  };
2321
- cn = Dr([
2318
+ cn = gr([
2322
2319
  je(0, Ie),
2323
- je(1, ve(vi)),
2320
+ je(1, ve(wi)),
2324
2321
  je(2, ee),
2325
2322
  je(3, Q),
2326
2323
  je(4, Vn)
2327
2324
  ], cn);
2328
- var Or = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, Tr = (i, e, n, t) => {
2329
- for (var r = t > 1 ? void 0 : t ? Pr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2330
- (s = i[o]) && (r = (t ? s(e, n, r) : s(r)) || r);
2331
- return t && r && Or(e, n, r), r;
2325
+ var mr = Object.getOwnPropertyDescriptor, ur = (i, e, n, t) => {
2326
+ for (var r = t > 1 ? void 0 : t ? mr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2327
+ (s = i[o]) && (r = s(r) || r);
2328
+ return r;
2332
2329
  }, xe = (i, e) => (n, t) => e(n, t, i);
2333
2330
  let wn = class extends Xe {
2334
2331
  constructor(e, n, t, r, o, s, c, d) {
@@ -2347,7 +2344,7 @@ let wn = class extends Xe {
2347
2344
  });
2348
2345
  }
2349
2346
  _commandExecutedListener() {
2350
- const e = [J.id, _i.id];
2347
+ const e = [J.id, Ii.id];
2351
2348
  this.disposeWithMe(
2352
2349
  this._commandService.onCommandExecuted((n) => {
2353
2350
  if (e.includes(n.id)) {
@@ -2357,7 +2354,7 @@ let wn = class extends Xe {
2357
2354
  const c = this._docSkeletonManagerService.getSkeleton();
2358
2355
  if (c == null)
2359
2356
  return;
2360
- if (this._editorService.isEditor(o) && o !== Lt) {
2357
+ if (this._editorService.isEditor(o) && o !== xt) {
2361
2358
  s == null || s.makeDirty();
2362
2359
  return;
2363
2360
  }
@@ -2368,8 +2365,8 @@ let wn = class extends Xe {
2368
2365
  }
2369
2366
  _initResize() {
2370
2367
  this.disposeWithMe(
2371
- Bt(this._context.engine.onTransformChange$).pipe(
2372
- xn((e) => e.type === ri.resize),
2368
+ Lt(this._context.engine.onTransformChange$).pipe(
2369
+ xn((e) => e.type === ii.resize),
2373
2370
  qn(16)
2374
2371
  ).subscribe(() => {
2375
2372
  var t;
@@ -2383,10 +2380,10 @@ let wn = class extends Xe {
2383
2380
  const n = e == null ? void 0 : e.getSkeletonData(), { mainComponent: t, unitId: r } = this._context, o = t;
2384
2381
  if (!n)
2385
2382
  return;
2386
- const { left: s, top: c, pageLayoutType: d, pageMarginLeft: a, pageMarginTop: l } = o, { pages: u, skeHeaders: g, skeFooters: p } = n, h = {};
2383
+ const { left: s, top: c, pageLayoutType: d, pageMarginLeft: a, pageMarginTop: l } = o, { pages: m, skeHeaders: g, skeFooters: p } = n, h = {};
2387
2384
  this._liquid.reset();
2388
- for (let P = 0, M = u.length; P < M; P++) {
2389
- const b = u[P], { headerId: A, footerId: U, pageWidth: N } = b;
2385
+ for (let T = 0, M = m.length; T < M; T++) {
2386
+ const y = m[T], { headerId: A, footerId: U, pageWidth: N } = y;
2390
2387
  if (A) {
2391
2388
  const I = (O = g.get(A)) == null ? void 0 : O.get(N);
2392
2389
  I && this._calculateDrawingPosition(
@@ -2396,7 +2393,7 @@ let wn = class extends Xe {
2396
2393
  c,
2397
2394
  h,
2398
2395
  I.marginTop,
2399
- b.marginLeft
2396
+ y.marginLeft
2400
2397
  );
2401
2398
  }
2402
2399
  if (U) {
@@ -2407,13 +2404,13 @@ let wn = class extends Xe {
2407
2404
  s,
2408
2405
  c,
2409
2406
  h,
2410
- b.pageHeight - b.marginBottom + I.marginTop,
2411
- b.marginLeft
2407
+ y.pageHeight - y.marginBottom + I.marginTop,
2408
+ y.marginLeft
2412
2409
  );
2413
2410
  }
2414
- this._calculateDrawingPosition(r, b, s, c, h, b.marginTop, b.marginLeft), this._liquid.translatePage(b, d, a, l);
2411
+ this._calculateDrawingPosition(r, y, s, c, h, y.marginTop, y.marginLeft), this._liquid.translatePage(y, d, a, l);
2415
2412
  }
2416
- const v = Object.values(h), w = v.filter((P) => !P.isMultiTransform), S = v.filter((P) => P.isMultiTransform);
2413
+ const v = Object.values(h), w = v.filter((T) => !T.isMultiTransform), S = v.filter((T) => T.isMultiTransform);
2417
2414
  w.length > 0 && this._drawingManagerService.refreshTransform(w), this._handleMultiDrawingsTransform(S);
2418
2415
  }
2419
2416
  _handleMultiDrawingsTransform(e) {
@@ -2435,9 +2432,9 @@ let wn = class extends Xe {
2435
2432
  marginTop: s,
2436
2433
  marginLeft: c
2437
2434
  }), d.forEach((a) => {
2438
- const { aLeft: l, aTop: u, height: g, width: p, angle: h, drawingId: v, drawingOrigin: w } = a, S = w.layoutType === H.WRAP_NONE && w.behindDoc === oe.TRUE, { isMultiTransform: O = oe.FALSE } = w, D = {
2435
+ const { aLeft: l, aTop: m, height: g, width: p, angle: h, drawingId: v, drawingOrigin: w } = a, S = w.layoutType === H.WRAP_NONE && w.behindDoc === oe.TRUE, { isMultiTransform: O = oe.FALSE } = w, D = {
2439
2436
  left: l + t + this._liquid.x,
2440
- top: u + r + this._liquid.y,
2437
+ top: m + r + this._liquid.y,
2441
2438
  width: p,
2442
2439
  height: g,
2443
2440
  angle: h
@@ -2461,35 +2458,35 @@ let wn = class extends Xe {
2461
2458
  const n = this._docSkeletonManagerService.getSkeleton();
2462
2459
  n != null && (this._refreshDrawing(n), this._drawingManagerService.initializeNotification(this._context.unitId));
2463
2460
  };
2464
- this._lifecycleService.stage === Pn.Steady ? setTimeout(() => {
2461
+ this._lifecycleService.stage === Tn.Steady ? setTimeout(() => {
2465
2462
  e();
2466
- }, 1e3) : this._lifecycleService.lifecycle$.pipe(xn((n) => n === Pn.Steady)).subscribe(e);
2463
+ }, 1e3) : this._lifecycleService.lifecycle$.pipe(xn((n) => n === Tn.Steady)).subscribe(e);
2467
2464
  }
2468
2465
  };
2469
- wn = Tr([
2466
+ wn = ur([
2470
2467
  xe(1, ve(se)),
2471
2468
  xe(2, z),
2472
- xe(3, Ii),
2469
+ xe(3, vi),
2473
2470
  xe(4, Ie),
2474
2471
  xe(5, ve(gn)),
2475
2472
  xe(6, Q),
2476
- xe(7, ve(xt))
2473
+ xe(7, ve(Et))
2477
2474
  ], wn);
2478
- var vt = Object.defineProperty, br = Object.getOwnPropertyDescriptor, yr = (i, e, n) => e in i ? vt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Mr = (i, e, n, t) => {
2479
- for (var r = t > 1 ? void 0 : t ? br(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2480
- (s = i[o]) && (r = (t ? s(e, n, r) : s(r)) || r);
2481
- return t && r && vt(e, n, r), r;
2482
- }, pn = (i, e) => (n, t) => e(n, t, i), It = (i, e, n) => yr(i, typeof e != "symbol" ? e + "" : e, n);
2483
- const Rr = "DOC_DRAWING_UI_PLUGIN";
2484
- let dn = class extends kt {
2485
- constructor(i = Fn, e, n, t) {
2475
+ var fr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, pr = (i, e, n) => e in i ? fr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, wr = (i, e, n, t) => {
2476
+ for (var r = t > 1 ? void 0 : t ? hr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2477
+ (s = i[o]) && (r = s(r) || r);
2478
+ return r;
2479
+ }, pn = (i, e) => (n, t) => e(n, t, i), vt = (i, e, n) => pr(i, typeof e != "symbol" ? e + "" : e, n);
2480
+ const vr = "DOC_DRAWING_UI_PLUGIN";
2481
+ let dn = class extends Ft {
2482
+ constructor(i = kn, e, n, t) {
2486
2483
  super(), this._config = i, this._injector = e, this._renderManagerSrv = n, this._configService = t;
2487
2484
  const { ...r } = Ht(
2488
2485
  {},
2489
- Fn,
2486
+ kn,
2490
2487
  this._config
2491
2488
  );
2492
- this._configService.setConfig(Pi, r);
2489
+ this._configService.setConfig(Oi, r);
2493
2490
  }
2494
2491
  onStarting() {
2495
2492
  [
@@ -2504,22 +2501,22 @@ let dn = class extends kt {
2504
2501
  [
2505
2502
  [sn],
2506
2503
  [wn]
2507
- ].forEach((i) => this._renderManagerSrv.registerRenderModule(ye.UNIVER_DOC, i)), this._injector.get(rn), this._injector.get(an), this._injector.get(on);
2504
+ ].forEach((i) => this._renderManagerSrv.registerRenderModule(be.UNIVER_DOC, i)), this._injector.get(rn), this._injector.get(an), this._injector.get(on);
2508
2505
  }
2509
2506
  onRendered() {
2510
2507
  this._injector.get(cn);
2511
2508
  }
2512
2509
  };
2513
- It(dn, "type", ye.UNIVER_DOC);
2514
- It(dn, "pluginName", Rr);
2515
- dn = Mr([
2516
- Ut(ei, Xt, Gt, mi),
2517
- pn(1, ve(Ft)),
2510
+ vt(dn, "type", be.UNIVER_DOC);
2511
+ vt(dn, "pluginName", vr);
2512
+ dn = wr([
2513
+ Bt(Jt, qt, Wt, gi),
2514
+ pn(1, ve(Ut)),
2518
2515
  pn(2, ee),
2519
- pn(3, Wt)
2516
+ pn(3, kt)
2520
2517
  ], dn);
2521
2518
  export {
2522
- ji as ClearDocDrawingTransformerOperation,
2519
+ Hi as ClearDocDrawingTransformerOperation,
2523
2520
  pt as DOCS_IMAGE_MENU_ID,
2524
2521
  ot as DeleteDocDrawingsCommand,
2525
2522
  ut as EditDocDrawingOperation,