@univerjs/drawing-ui 0.2.3 → 0.2.4

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,29 +1,29 @@
1
1
  var Mt = Object.defineProperty;
2
2
  var Ot = (a, n, e) => n in a ? Mt(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e;
3
- var Q = (a, n, e) => Ot(a, typeof n != "symbol" ? n + "" : n, e);
4
- import { getDrawingShapeKeyByDrawingSearch as G, DrawingTypeEnum as te, ImageSourceType as Nt, IDrawingManagerService as ne, IImageIoService as rt, ArrangeTypeEnum as Se } from "@univerjs/drawing";
5
- import { Group as pe, DRAWING_OBJECT_LAYER_INDEX as ze, Image as We, IRenderManagerService as ge, getGroupState as Dt, transformObjectOutOfGroup as Tt, RENDER_CLASS_TYPE as Xe, Shape as Bt, Rect as jt, Canvas as Ut, precisionTo as be, CURSOR_TYPE as Te, Vector2 as xe, degToRad as Je } from "@univerjs/engine-render";
6
- import { UniverInstanceType as Re, LocaleService as Z, debounce as Ie, CommandType as we, ICommandService as ce, Tools as Ht, Disposable as Ue, checkIfMove as at, toDisposable as Ce, OnLifecycle as He, LifecycleStages as Le, IUniverInstanceService as Fe, Plugin as Lt } from "@univerjs/core";
7
- import { useDependency as x } from "@wendellhu/redi/react-bindings";
8
- import c, { forwardRef as Y, useRef as it, createElement as X, useState as L, useEffect as ve } from "react";
9
- import { Button as ie, InputNumber as de, Checkbox as At, Select as ot, Dropdown as Vt, MessageType as qe } from "@univerjs/design";
10
- import T from "clsx";
11
- import { Inject as se, Injector as st } from "@wendellhu/redi";
12
- import { ComponentManager as xt, IMenuService as Gt, IMessageService as Wt, IDialogService as $t } from "@univerjs/ui";
3
+ var te = (a, n, e) => Ot(a, typeof n != "symbol" ? n + "" : n, e);
4
+ import { getDrawingShapeKeyByDrawingSearch as G, DrawingTypeEnum as re, ImageSourceType as Nt, IDrawingManagerService as ae, IImageIoService as ot, ArrangeTypeEnum as Pe } from "@univerjs/drawing";
5
+ import { Group as ve, DRAWING_OBJECT_LAYER_INDEX as Ye, Image as Fe, IRenderManagerService as he, getGroupState as Dt, transformObjectOutOfGroup as Tt, RENDER_CLASS_TYPE as Qe, Shape as Bt, Rect as jt, Canvas as Ut, precisionTo as ye, CURSOR_TYPE as Ue, Vector2 as ke, degToRad as et } from "@univerjs/engine-render";
6
+ import { UniverInstanceType as Ne, LocaleService as Y, debounce as Ee, CommandType as Se, ICommandService as ue, Tools as Ht, Disposable as Ae, checkIfMove as st, toDisposable as _e, OnLifecycle as xe, LifecycleStages as Ve, IUniverInstanceService as Xe, Plugin as Lt } from "@univerjs/core";
7
+ import { useDependency as V } from "@wendellhu/redi/react-bindings";
8
+ import c, { forwardRef as X, useRef as ct, createElement as J, useState as L, useEffect as be } from "react";
9
+ import { Button as le, InputNumber as pe, Checkbox as At, Select as lt, Dropdown as xt, MessageType as tt } from "@univerjs/design";
10
+ import O from "clsx";
11
+ import { Inject as ge, Injector as mt } from "@wendellhu/redi";
12
+ import { ComponentManager as Vt, IMenuService as Gt, IMessageService as Wt, IDialogService as $t } from "@univerjs/ui";
13
13
  import { filter as kt, switchMap as zt } from "rxjs";
14
14
  function Ft(a, n, e, t) {
15
15
  const r = t.getDrawingByParam(a);
16
16
  if (r == null)
17
17
  return;
18
18
  const o = G(a), i = e.getObject(o);
19
- if (i && !(i instanceof pe))
19
+ if (i && !(i instanceof ve))
20
20
  return;
21
21
  if (i != null) {
22
22
  i.addObject(n);
23
23
  return;
24
24
  }
25
- const s = new pe(o);
26
- e.addObject(s, ze).attachTransformerTo(s), s.addObject(n);
25
+ const s = new ve(o);
26
+ e.addObject(s, Ye).attachTransformerTo(s), s.addObject(n);
27
27
  const { transform: l } = r;
28
28
  l && s.transformByState(
29
29
  {
@@ -33,73 +33,91 @@ function Ft(a, n, e, t) {
33
33
  }
34
34
  );
35
35
  }
36
- function $e(a) {
36
+ function Ke(a) {
37
37
  var r;
38
38
  const n = a.getFocusedUnit();
39
39
  if (n == null)
40
40
  return;
41
41
  const e = n.getUnitId();
42
42
  let t;
43
- return n.type === Re.UNIVER_SHEET ? t = (r = n.getActiveSheet()) == null ? void 0 : r.getSheetId() : (n.type === Re.UNIVER_DOC || n.type === Re.UNIVER_SLIDE) && (t = e), { unitId: e, subUnitId: t };
43
+ return n.type === Ne.UNIVER_SHEET ? t = (r = n.getActiveSheet()) == null ? void 0 : r.getSheetId() : (n.type === Ne.UNIVER_DOC || n.type === Ne.UNIVER_SLIDE) && (t = e), { unitId: e, subUnitId: t };
44
44
  }
45
45
  var Kt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, Yt = (a, n, e, t) => {
46
46
  for (var r = t > 1 ? void 0 : t ? Zt(n, e) : n, o = a.length - 1, i; o >= 0; o--)
47
47
  (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
48
48
  return t && r && Kt(n, e, r), r;
49
- }, Qe = (a, n) => (e, t) => n(e, t, a);
50
- let Be = class {
49
+ }, nt = (a, n) => (e, t) => n(e, t, a);
50
+ let He = class {
51
51
  constructor(a, n) {
52
52
  this._drawingManagerService = a, this._imageIoService = n;
53
53
  }
54
- async renderImage(a, n) {
55
- const { transform: e, drawingType: t, source: r, imageSourceType: o, srcRect: i, prstGeom: s, groupId: l, unitId: g, subUnitId: u, drawingId: d } = a;
56
- if (t !== te.DRAWING_IMAGE || !this._drawingManagerService.getDrawingVisible() || e == null)
57
- return;
58
- const { left: h, top: f, width: v, height: w, angle: p, flipX: E, flipY: _, skewX: M, skewY: S } = e, R = G({ unitId: g, subUnitId: u, drawingId: d }), b = n.getObject(R);
59
- if (b != null) {
60
- b.transformByState({ left: h, top: f, width: v, height: w, angle: p, flipX: E, flipY: _, skewX: M, skewY: S });
54
+ // eslint-disable-next-line max-lines-per-function
55
+ async renderImages(a, n) {
56
+ const {
57
+ transform: e,
58
+ drawingType: t,
59
+ source: r,
60
+ imageSourceType: o,
61
+ srcRect: i,
62
+ prstGeom: s,
63
+ groupId: l,
64
+ unitId: m,
65
+ subUnitId: u,
66
+ drawingId: d,
67
+ isMultiTransform: h,
68
+ transforms: f
69
+ } = a;
70
+ if (t !== re.DRAWING_IMAGE || !this._drawingManagerService.getDrawingVisible() || e == null)
61
71
  return;
72
+ const v = h && f ? f : [e], w = [];
73
+ for (const p of v) {
74
+ const { left: S, top: _, width: R, height: b, angle: N, flipX: I, flipY: y, skewX: P, skewY: M } = p, D = v.indexOf(p), U = G({ unitId: m, subUnitId: u, drawingId: d }, h ? D : void 0), T = n.getObject(U);
75
+ if (T != null) {
76
+ T.transformByState({ left: S, top: _, width: R, height: b, angle: N, flipX: I, flipY: y, skewX: P, skewY: M });
77
+ continue;
78
+ }
79
+ const ie = this._drawingManagerService.getDrawingOrder(m, u), W = ie.indexOf(d), Q = { ...p, zIndex: W === -1 ? ie.length - 1 : W }, Ie = this._imageIoService.getImageSourceCache(r, o);
80
+ let oe = !1;
81
+ if (Ie != null)
82
+ Q.image = Ie;
83
+ else {
84
+ if (o === Nt.UUID)
85
+ try {
86
+ Q.url = await this._imageIoService.getImage(r);
87
+ } catch ($e) {
88
+ console.error($e);
89
+ continue;
90
+ }
91
+ else
92
+ Q.url = r;
93
+ oe = !0;
94
+ }
95
+ Q.printable = !0;
96
+ const F = new Fe(U, Q);
97
+ if (oe && this._imageIoService.addImageSourceCache(r, o, F.getNative()), !this._drawingManagerService.getDrawingVisible())
98
+ continue;
99
+ const We = n.addObject(F, Ye);
100
+ this._drawingManagerService.getDrawingEditable() && We.attachTransformerTo(F), l && Ft({ drawingId: l, unitId: m, subUnitId: u }, F, n, this._drawingManagerService), s != null && F.setPrstGeom(s), i != null && F.setSrcRect(i), w.push(F);
62
101
  }
63
- const y = this._drawingManagerService.getDrawingOrder(g, u), I = y.indexOf(d), P = { ...e, zIndex: I === -1 ? y.length - 1 : I }, N = this._imageIoService.getImageSourceCache(r, o);
64
- let B = !1;
65
- if (N != null)
66
- P.image = N;
67
- else {
68
- if (o === Nt.UUID)
69
- try {
70
- P.url = await this._imageIoService.getImage(r);
71
- } catch (W) {
72
- console.error(W);
73
- return;
74
- }
75
- else
76
- P.url = r;
77
- B = !0;
78
- }
79
- P.printable = !0;
80
- const D = new We(R, P);
81
- if (B && this._imageIoService.addImageSourceCache(r, o, D.getNative()), !this._drawingManagerService.getDrawingVisible())
82
- return;
83
- const le = n.addObject(D, ze);
84
- return this._drawingManagerService.getDrawingEditable() && le.attachTransformerTo(D), l && Ft({ drawingId: l, unitId: g, subUnitId: u }, D, n, this._drawingManagerService), s != null && D.setPrstGeom(s), i != null && D.setSrcRect(i), D;
102
+ return w;
85
103
  }
86
104
  renderDrawing(a, n) {
87
105
  const e = this._drawingManagerService.getDrawingByParam(a);
88
106
  if (e != null)
89
107
  switch (e.drawingType) {
90
- case te.DRAWING_IMAGE:
91
- return this.renderImage(e, n);
108
+ case re.DRAWING_IMAGE:
109
+ return this.renderImages(e, n);
92
110
  }
93
111
  }
94
112
  };
95
- Be = Yt([
96
- Qe(0, ne),
97
- Qe(1, rt)
98
- ], Be);
99
- function Ae(a, n) {
113
+ He = Yt([
114
+ nt(0, ae),
115
+ nt(1, ot)
116
+ ], He);
117
+ function Ge(a, n) {
100
118
  const e = [];
101
119
  return a.forEach((t) => {
102
- const { oKey: r, left: o, top: i, height: s, width: l, angle: g } = t, u = n.getDrawingOKey(r);
120
+ const { oKey: r, left: o, top: i, height: s, width: l, angle: m } = t, u = n.getDrawingOKey(r);
103
121
  if (u == null)
104
122
  return e.push(null), !0;
105
123
  const { unitId: d, subUnitId: h, drawingId: f, drawingType: v } = u, w = {
@@ -112,10 +130,10 @@ function Ae(a, n) {
112
130
  top: i,
113
131
  height: s,
114
132
  width: l,
115
- angle: g
133
+ angle: m
116
134
  }
117
135
  };
118
- v === te.DRAWING_IMAGE && (w.srcRect = t.srcRect), e.push(w);
136
+ v === re.DRAWING_IMAGE && (w.srcRect = t.srcRect), e.push(w);
119
137
  }), e;
120
138
  }
121
139
  var $ = function() {
@@ -133,13 +151,13 @@ var $ = function() {
133
151
  for (var r = 0, t = Object.getOwnPropertySymbols(a); r < t.length; r++)
134
152
  n.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(a, t[r]) && (e[t[r]] = a[t[r]]);
135
153
  return e;
136
- }, J = Y(function(a, n) {
137
- var e = a.icon, t = a.id, r = a.className, o = a.extend, i = Xt(a, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = it("_".concat(Qt()));
138
- return ct(e, "".concat(t), { defIds: e.defIds, idSuffix: l.current }, $({ ref: n, className: s }, i), o);
154
+ }, q = X(function(a, n) {
155
+ var e = a.icon, t = a.id, r = a.className, o = a.extend, i = Xt(a, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = ct("_".concat(Qt()));
156
+ return gt(e, "".concat(t), { defIds: e.defIds, idSuffix: l.current }, $({ ref: n, className: s }, i), o);
139
157
  });
140
- function ct(a, n, e, t, r) {
141
- return X(a.tag, $($({ key: n }, Jt(a, e, r)), t), (qt(a, e).children || []).map(function(o, i) {
142
- return ct(o, "".concat(n, "-").concat(a.tag, "-").concat(i), e, void 0, r);
158
+ function gt(a, n, e, t, r) {
159
+ return J(a.tag, $($({ key: n }, Jt(a, e, r)), t), (qt(a, e).children || []).map(function(o, i) {
160
+ return gt(o, "".concat(n, "-").concat(a.tag, "-").concat(i), e, void 0, r);
143
161
  }));
144
162
  }
145
163
  function Jt(a, n, e) {
@@ -160,80 +178,80 @@ function qt(a, n) {
160
178
  function Qt() {
161
179
  return Math.random().toString(36).substring(2, 8);
162
180
  }
163
- J.displayName = "UniverIcon";
164
- var en = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365zM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377zM2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365zM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647zM9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635zM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635z", fillRule: "evenodd", clipRule: "evenodd" } }] }, lt = Y(function(a, n) {
165
- return X(J, Object.assign({}, a, {
181
+ q.displayName = "UniverIcon";
182
+ var en = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365zM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377zM2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365zM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647zM9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635zM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ut = X(function(a, n) {
183
+ return J(q, Object.assign({}, a, {
166
184
  id: "autofill",
167
185
  ref: n,
168
186
  icon: en
169
187
  }));
170
188
  });
171
- lt.displayName = "Autofill";
172
- var tn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334 15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334 2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045zM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334 3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334zM14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999 15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999 2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544zM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999 3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421 6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641 9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421 11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946 8.64077 14.6502 8.70566 14.6923 8.77482 14.7209 8.84557 14.7502 8.92314 14.7664 9.00449 14.7664 9.08585 14.7664 9.16342 14.7502 9.23416 14.7209 9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, mt = Y(function(a, n) {
173
- return X(J, Object.assign({}, a, {
189
+ ut.displayName = "Autofill";
190
+ var tn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334 15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334 2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045zM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334 3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334zM14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999 15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999 2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544zM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999 3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421 6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641 9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421 11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946 8.64077 14.6502 8.70566 14.6923 8.77482 14.7209 8.84557 14.7502 8.92314 14.7664 9.00449 14.7664 9.08585 14.7664 9.16342 14.7502 9.23416 14.7209 9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, dt = X(function(a, n) {
191
+ return J(q, Object.assign({}, a, {
174
192
  id: "bottom-single",
175
193
  ref: n,
176
194
  icon: tn
177
195
  }));
178
196
  });
179
- mt.displayName = "BottomSingle";
180
- var nn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.97705 7.51296C5.97705 7.18159 6.24568 6.91296 6.57705 6.91296H8.48632C8.81769 6.91296 9.08632 7.18159 9.08632 7.51296 9.08632 7.84433 8.81769 8.11296 8.48632 8.11296H6.57705C6.24568 8.11296 5.97705 7.84433 5.97705 7.51296zM6.57705 9.41028C6.24568 9.41028 5.97705 9.67891 5.97705 10.0103 5.97705 10.3416 6.24568 10.6103 6.57705 10.6103H10.8199C11.1512 10.6103 11.4199 10.3416 11.4199 10.0103 11.4199 9.67891 11.1512 9.41028 10.8199 9.41028H6.57705z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.51074 2.37063C3.51074 1.48697 4.22709 0.77063 5.11074 0.77063H9.80318L9.81294 0.770708C9.97168 0.768161 10.1311 0.82824 10.2511 0.95055L14.4317 5.21408C14.5165 5.30049 14.5697 5.406 14.5917 5.51645C14.6041 5.5644 14.6106 5.61467 14.6106 5.66648V11.6406C14.6106 12.5243 13.8943 13.2406 13.0106 13.2406H5.11074C4.22709 13.2406 3.51074 12.5243 3.51074 11.6406V2.37063ZM10.4032 4.66648V2.81964L12.6063 5.06648H10.8032C10.5823 5.06648 10.4032 4.88739 10.4032 4.66648ZM5.11074 1.97063C4.88983 1.97063 4.71074 2.14972 4.71074 2.37063V11.6406C4.71074 11.8615 4.88983 12.0406 5.11074 12.0406H13.0106C13.2316 12.0406 13.4106 11.8615 13.4106 11.6406V6.26648H10.8032C9.91953 6.26648 9.20318 5.55013 9.20318 4.66648V1.97063H5.11074Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.58916 6.6741C2.58916 6.34273 2.32053 6.0741 1.98916 6.0741C1.65779 6.0741 1.38916 6.34273 1.38916 6.6741V12.6294C1.38916 14.0653 2.55322 15.2294 3.98916 15.2294H9.41408C9.74545 15.2294 10.0141 14.9607 10.0141 14.6294C10.0141 14.298 9.74545 14.0294 9.41408 14.0294H3.98916C3.21596 14.0294 2.58916 13.4026 2.58916 12.6294V6.6741Z" } }] }, gt = Y(function(a, n) {
181
- return X(J, Object.assign({}, a, {
197
+ dt.displayName = "BottomSingle";
198
+ var nn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.97705 7.51296C5.97705 7.18159 6.24568 6.91296 6.57705 6.91296H8.48632C8.81769 6.91296 9.08632 7.18159 9.08632 7.51296 9.08632 7.84433 8.81769 8.11296 8.48632 8.11296H6.57705C6.24568 8.11296 5.97705 7.84433 5.97705 7.51296zM6.57705 9.41028C6.24568 9.41028 5.97705 9.67891 5.97705 10.0103 5.97705 10.3416 6.24568 10.6103 6.57705 10.6103H10.8199C11.1512 10.6103 11.4199 10.3416 11.4199 10.0103 11.4199 9.67891 11.1512 9.41028 10.8199 9.41028H6.57705z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.51074 2.37063C3.51074 1.48697 4.22709 0.77063 5.11074 0.77063H9.80318L9.81294 0.770708C9.97168 0.768161 10.1311 0.82824 10.2511 0.95055L14.4317 5.21408C14.5165 5.30049 14.5697 5.406 14.5917 5.51645C14.6041 5.5644 14.6106 5.61467 14.6106 5.66648V11.6406C14.6106 12.5243 13.8943 13.2406 13.0106 13.2406H5.11074C4.22709 13.2406 3.51074 12.5243 3.51074 11.6406V2.37063ZM10.4032 4.66648V2.81964L12.6063 5.06648H10.8032C10.5823 5.06648 10.4032 4.88739 10.4032 4.66648ZM5.11074 1.97063C4.88983 1.97063 4.71074 2.14972 4.71074 2.37063V11.6406C4.71074 11.8615 4.88983 12.0406 5.11074 12.0406H13.0106C13.2316 12.0406 13.4106 11.8615 13.4106 11.6406V6.26648H10.8032C9.91953 6.26648 9.20318 5.55013 9.20318 4.66648V1.97063H5.11074Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.58916 6.6741C2.58916 6.34273 2.32053 6.0741 1.98916 6.0741C1.65779 6.0741 1.38916 6.34273 1.38916 6.6741V12.6294C1.38916 14.0653 2.55322 15.2294 3.98916 15.2294H9.41408C9.74545 15.2294 10.0141 14.9607 10.0141 14.6294C10.0141 14.298 9.74545 14.0294 9.41408 14.0294H3.98916C3.21596 14.0294 2.58916 13.4026 2.58916 12.6294V6.6741Z" } }] }, ht = X(function(a, n) {
199
+ return J(q, Object.assign({}, a, {
182
200
  id: "create-copy-single",
183
201
  ref: n,
184
202
  icon: nn
185
203
  }));
186
204
  });
187
- gt.displayName = "CreateCopySingle";
188
- var rn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.38125 1.16211C6.49759 1.16211 5.78125 1.87845 5.78125 2.76211V5.6377H2.87783C1.99418 5.6377 1.27783 6.35404 1.27783 7.2377V13.2377C1.27783 14.1214 1.99418 14.8377 2.87783 14.8377H8.87783C9.76149 14.8377 10.4778 14.1214 10.4778 13.2377V10.3621H13.3813C14.2649 10.3621 14.9813 9.64577 14.9813 8.76211V2.76211C14.9813 1.87845 14.2649 1.16211 13.3813 1.16211H7.38125ZM10.4778 9.16211H13.3813C13.6022 9.16211 13.7812 8.98302 13.7812 8.76211V2.76211C13.7812 2.5412 13.6022 2.36211 13.3813 2.36211H7.38125C7.16034 2.36211 6.98125 2.5412 6.98125 2.76211V5.6377H8.87783C9.76149 5.6377 10.4778 6.35404 10.4778 7.2377V9.16211ZM6.98125 6.8377H8.87783C9.09875 6.8377 9.27783 7.01678 9.27783 7.2377V9.16211H7.38125C7.16034 9.16211 6.98125 8.98302 6.98125 8.76211V6.8377ZM5.78125 6.8377V8.76211C5.78125 9.64577 6.49759 10.3621 7.38125 10.3621H9.27783V13.2377C9.27783 13.4586 9.09875 13.6377 8.87783 13.6377H2.87783C2.65692 13.6377 2.47783 13.4586 2.47783 13.2377V7.2377C2.47783 7.01678 2.65692 6.8377 2.87783 6.8377H5.78125Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ut = Y(function(a, n) {
189
- return X(J, Object.assign({}, a, {
205
+ ht.displayName = "CreateCopySingle";
206
+ var rn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.38125 1.16211C6.49759 1.16211 5.78125 1.87845 5.78125 2.76211V5.6377H2.87783C1.99418 5.6377 1.27783 6.35404 1.27783 7.2377V13.2377C1.27783 14.1214 1.99418 14.8377 2.87783 14.8377H8.87783C9.76149 14.8377 10.4778 14.1214 10.4778 13.2377V10.3621H13.3813C14.2649 10.3621 14.9813 9.64577 14.9813 8.76211V2.76211C14.9813 1.87845 14.2649 1.16211 13.3813 1.16211H7.38125ZM10.4778 9.16211H13.3813C13.6022 9.16211 13.7812 8.98302 13.7812 8.76211V2.76211C13.7812 2.5412 13.6022 2.36211 13.3813 2.36211H7.38125C7.16034 2.36211 6.98125 2.5412 6.98125 2.76211V5.6377H8.87783C9.76149 5.6377 10.4778 6.35404 10.4778 7.2377V9.16211ZM6.98125 6.8377H8.87783C9.09875 6.8377 9.27783 7.01678 9.27783 7.2377V9.16211H7.38125C7.16034 9.16211 6.98125 8.98302 6.98125 8.76211V6.8377ZM5.78125 6.8377V8.76211C5.78125 9.64577 6.49759 10.3621 7.38125 10.3621H9.27783V13.2377C9.27783 13.4586 9.09875 13.6377 8.87783 13.6377H2.87783C2.65692 13.6377 2.47783 13.4586 2.47783 13.2377V7.2377C2.47783 7.01678 2.65692 6.8377 2.87783 6.8377H5.78125Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ft = X(function(a, n) {
207
+ return J(q, Object.assign({}, a, {
190
208
  id: "group-single",
191
209
  ref: n,
192
210
  icon: rn
193
211
  }));
194
212
  });
195
- ut.displayName = "GroupSingle";
196
- var an = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, dt = Y(function(a, n) {
197
- return X(J, Object.assign({}, a, {
213
+ ft.displayName = "GroupSingle";
214
+ var an = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, pt = X(function(a, n) {
215
+ return J(q, Object.assign({}, a, {
198
216
  id: "more-down-single",
199
217
  ref: n,
200
218
  icon: an
201
219
  }));
202
220
  });
203
- dt.displayName = "MoreDownSingle";
204
- var on = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, ht = Y(function(a, n) {
205
- return X(J, Object.assign({}, a, {
221
+ pt.displayName = "MoreDownSingle";
222
+ var on = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, Ct = X(function(a, n) {
223
+ return J(q, Object.assign({}, a, {
206
224
  id: "move-down-single",
207
225
  ref: n,
208
226
  icon: on
209
227
  }));
210
228
  });
211
- ht.displayName = "MoveDownSingle";
212
- var sn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, ft = Y(function(a, n) {
213
- return X(J, Object.assign({}, a, {
229
+ Ct.displayName = "MoveDownSingle";
230
+ var sn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, wt = X(function(a, n) {
231
+ return J(q, Object.assign({}, a, {
214
232
  id: "move-up-single",
215
233
  ref: n,
216
234
  icon: sn
217
235
  }));
218
236
  });
219
- ft.displayName = "MoveUpSingle";
220
- var cn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9 15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9zM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9 2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9 13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439zM1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665 15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665zM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665 2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665 13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543z", fillRule: "evenodd", clipRule: "evenodd" } }] }, pt = Y(function(a, n) {
221
- return X(J, Object.assign({}, a, {
237
+ wt.displayName = "MoveUpSingle";
238
+ var cn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9 15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9zM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9 2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9 13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439zM1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665 15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665zM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665 2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665 13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543z", fillRule: "evenodd", clipRule: "evenodd" } }] }, vt = X(function(a, n) {
239
+ return J(q, Object.assign({}, a, {
222
240
  id: "topmost-single",
223
241
  ref: n,
224
242
  icon: cn
225
243
  }));
226
244
  });
227
- pt.displayName = "TopmostSingle";
228
- var ln = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.46855 2.83731C7.46855 2.61639 7.64764 2.4373 7.86855 2.4373H13.8603C14.0812 2.4373 14.2603 2.61639 14.2603 2.8373V9.5049C14.2603 9.72581 14.0812 9.90489 13.8603 9.90489H12.866C12.5346 9.90489 12.266 10.1735 12.266 10.5049C12.266 10.8363 12.5346 11.1049 12.866 11.1049H13.8603C14.7439 11.1049 15.4603 10.3886 15.4603 9.5049V2.8373C15.4603 1.95365 14.7439 1.2373 13.8603 1.2373H7.86855C6.9849 1.2373 6.26855 1.95365 6.26855 2.83731V3.48688C6.26855 3.81825 6.53718 4.08688 6.86855 4.08688C7.19993 4.08688 7.46855 3.81825 7.46855 3.48688V2.83731Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.19888 5.56299C2.31522 5.56299 1.59888 6.27933 1.59888 7.16299V13.163C1.59888 14.0466 2.31522 14.763 3.19888 14.763H9.19888C10.0825 14.763 10.7989 14.0466 10.7989 13.163V7.16299C10.7989 6.27933 10.0825 5.56299 9.19888 5.56299H3.19888ZM2.79888 7.16299C2.79888 6.94207 2.97796 6.76299 3.19888 6.76299H9.19888C9.41979 6.76299 9.59888 6.94207 9.59888 7.16299V13.163C9.59888 13.3839 9.41979 13.563 9.19888 13.563H3.19888C2.97796 13.563 2.79888 13.3839 2.79888 13.163V7.16299Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ct = Y(function(a, n) {
229
- return X(J, Object.assign({}, a, {
245
+ vt.displayName = "TopmostSingle";
246
+ var ln = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.46855 2.83731C7.46855 2.61639 7.64764 2.4373 7.86855 2.4373H13.8603C14.0812 2.4373 14.2603 2.61639 14.2603 2.8373V9.5049C14.2603 9.72581 14.0812 9.90489 13.8603 9.90489H12.866C12.5346 9.90489 12.266 10.1735 12.266 10.5049C12.266 10.8363 12.5346 11.1049 12.866 11.1049H13.8603C14.7439 11.1049 15.4603 10.3886 15.4603 9.5049V2.8373C15.4603 1.95365 14.7439 1.2373 13.8603 1.2373H7.86855C6.9849 1.2373 6.26855 1.95365 6.26855 2.83731V3.48688C6.26855 3.81825 6.53718 4.08688 6.86855 4.08688C7.19993 4.08688 7.46855 3.81825 7.46855 3.48688V2.83731Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.19888 5.56299C2.31522 5.56299 1.59888 6.27933 1.59888 7.16299V13.163C1.59888 14.0466 2.31522 14.763 3.19888 14.763H9.19888C10.0825 14.763 10.7989 14.0466 10.7989 13.163V7.16299C10.7989 6.27933 10.0825 5.56299 9.19888 5.56299H3.19888ZM2.79888 7.16299C2.79888 6.94207 2.97796 6.76299 3.19888 6.76299H9.19888C9.41979 6.76299 9.59888 6.94207 9.59888 7.16299V13.163C9.59888 13.3839 9.41979 13.563 9.19888 13.563H3.19888C2.97796 13.563 2.79888 13.3839 2.79888 13.163V7.16299Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, _t = X(function(a, n) {
247
+ return J(q, Object.assign({}, a, {
230
248
  id: "ungroup-single",
231
249
  ref: n,
232
250
  icon: ln
233
251
  }));
234
252
  });
235
- Ct.displayName = "UngroupSingle";
236
- const mn = "univer-image-common-panel", gn = "univer-image-common-panel-grid", un = "univer-image-common-panel-border", dn = "univer-image-common-panel-title", hn = "univer-image-common-panel-subtitle", fn = "univer-image-common-panel-row", pn = "univer-image-common-panel-row-vertical", Cn = "univer-image-common-panel-column", wn = "univer-image-common-panel-column-center", vn = "univer-image-common-panel-inline", _n = "univer-image-common-panel-span2", Sn = "univer-image-common-panel-span3", bn = "univer-image-common-panel-input", m = {
253
+ _t.displayName = "UngroupSingle";
254
+ const mn = "univer-image-common-panel", gn = "univer-image-common-panel-grid", un = "univer-image-common-panel-border", dn = "univer-image-common-panel-title", hn = "univer-image-common-panel-subtitle", fn = "univer-image-common-panel-row", pn = "univer-image-common-panel-row-vertical", Cn = "univer-image-common-panel-column", wn = "univer-image-common-panel-column-center", vn = "univer-image-common-panel-inline", _n = "univer-image-common-panel-span2", Sn = "univer-image-common-panel-span3", bn = "univer-image-common-panel-input", g = {
237
255
  imageCommonPanel: mn,
238
256
  imageCommonPanelGrid: gn,
239
257
  imageCommonPanelBorder: un,
@@ -248,189 +266,189 @@ const mn = "univer-image-common-panel", gn = "univer-image-common-panel-grid", u
248
266
  imageCommonPanelSpan3: Sn,
249
267
  imageCommonPanelInput: bn
250
268
  }, In = (a) => {
251
- const { arrangeShow: n, drawings: e } = a, t = x(Z), r = x(ne), o = (g) => g ? "block" : "none", [i, s] = L(e);
252
- ve(() => {
253
- const g = r.focus$.subscribe((u) => {
269
+ const { arrangeShow: n, drawings: e } = a, t = V(Y), r = V(ae), o = (m) => m ? "block" : "none", [i, s] = L(e);
270
+ be(() => {
271
+ const m = r.focus$.subscribe((u) => {
254
272
  s(u);
255
273
  });
256
274
  return () => {
257
- g.unsubscribe();
275
+ m.unsubscribe();
258
276
  };
259
277
  }, []);
260
- const l = (g) => {
278
+ const l = (m) => {
261
279
  const u = i[0].unitId, d = i[0].subUnitId, h = i.map((f) => f.drawingId);
262
- r.featurePluginOrderUpdateNotification({ unitId: u, subUnitId: d, drawingIds: h, arrangeType: g });
280
+ r.featurePluginOrderUpdateNotification({ unitId: u, subUnitId: d, drawingIds: h, arrangeType: m });
263
281
  };
264
- return /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelGrid, style: { display: o(n) } }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, t.t("image-panel.arrange.title")))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(ie, { size: "small", onClick: () => {
265
- l(Se.forward);
266
- } }, /* @__PURE__ */ c.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(ft, null), t.t("image-panel.arrange.forward")))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(ie, { size: "small", onClick: () => {
267
- l(Se.backward);
268
- } }, /* @__PURE__ */ c.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(ht, null), t.t("image-panel.arrange.backward"))))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(ie, { size: "small", onClick: () => {
269
- l(Se.front);
270
- } }, /* @__PURE__ */ c.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(pt, null), t.t("image-panel.arrange.front")))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(ie, { size: "small", onClick: () => {
271
- l(Se.back);
272
- } }, /* @__PURE__ */ c.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(mt, null), t.t("image-panel.arrange.back"))))));
273
- }, re = 20, Pn = 20, yn = [-3600, 3600], Pe = 300, En = (a) => {
274
- var Ye;
275
- const n = x(Z), e = x(ne), t = x(ge), { drawings: r, transformShow: o } = a, i = r[0];
282
+ return /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelGrid, style: { display: o(n) } }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, t.t("image-panel.arrange.title")))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(le, { size: "small", onClick: () => {
283
+ l(Pe.forward);
284
+ } }, /* @__PURE__ */ c.createElement("span", { className: g.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(wt, null), t.t("image-panel.arrange.forward")))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(le, { size: "small", onClick: () => {
285
+ l(Pe.backward);
286
+ } }, /* @__PURE__ */ c.createElement("span", { className: g.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(Ct, null), t.t("image-panel.arrange.backward"))))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(le, { size: "small", onClick: () => {
287
+ l(Pe.front);
288
+ } }, /* @__PURE__ */ c.createElement("span", { className: g.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(vt, null), t.t("image-panel.arrange.front")))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(le, { size: "small", onClick: () => {
289
+ l(Pe.back);
290
+ } }, /* @__PURE__ */ c.createElement("span", { className: g.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(dt, null), t.t("image-panel.arrange.back"))))));
291
+ }, se = 20, Pn = 20, yn = [-3600, 3600], Re = 300, En = (a) => {
292
+ var qe;
293
+ const n = V(Y), e = V(ae), t = V(he), { drawings: r, transformShow: o } = a, i = r[0];
276
294
  if (i == null)
277
295
  return;
278
296
  const s = i.transform;
279
297
  if (s == null)
280
298
  return;
281
- const { unitId: l, subUnitId: g, drawingId: u, drawingType: d } = i, h = t.getRenderById(l), f = h == null ? void 0 : h.scene;
299
+ const { unitId: l, subUnitId: m, drawingId: u, drawingType: d } = i, h = t.getRenderById(l), f = h == null ? void 0 : h.scene;
282
300
  if (f == null)
283
301
  return;
284
- const v = (Ye = f.getEngine()) == null ? void 0 : Ye.activeScene;
302
+ const v = (qe = f.getEngine()) == null ? void 0 : qe.activeScene;
285
303
  if (v == null)
286
304
  return;
287
305
  const w = f.getTransformerByCreate(), {
288
306
  width: p = 0,
289
- height: E = 0,
307
+ height: S = 0,
290
308
  left: _ = 0,
291
- top: M = 0,
292
- angle: S = 0
293
- } = s, [R, b] = L(p), [y, I] = L(E), [P, N] = L(_), [B, D] = L(M), [le, W] = L(S), [Ve, _t] = L(w.keepRatio), _e = (C, A, V, H) => {
294
- const { width: U, height: q } = v, { ancestorLeft: k, ancestorTop: z } = f;
295
- let F = C, K = A, ee = V, ue = H;
296
- return C + k < 0 && (F = -k), A + z < 0 && (K = -z), ee = U - F - k, ee < re && (ee = re), ue = q - K - z, ue < re && (ue = re), C + ee + k > U && (F = U - V - k), A + ue + z > q && (K = q - H - z), {
297
- limitLeft: F,
298
- limitTop: K,
299
- limitWidth: ee,
300
- limitHeight: ue
309
+ top: R = 0,
310
+ angle: b = 0
311
+ } = s, [N, I] = L(p), [y, P] = L(S), [M, D] = L(_), [U, T] = L(R), [ie, W] = L(b), [Q, Ie] = L(w.keepRatio), oe = (C, A, x, H) => {
312
+ const { width: j, height: ee } = v, { ancestorLeft: k, ancestorTop: z } = f;
313
+ let K = C, Z = A, ne = x, fe = H;
314
+ return C + k < 0 && (K = -k), A + z < 0 && (Z = -z), ne = j - K - k, ne < se && (ne = se), fe = ee - Z - z, fe < se && (fe = se), C + ne + k > j && (K = j - x - k), A + fe + z > ee && (Z = ee - H - z), {
315
+ limitLeft: K,
316
+ limitTop: Z,
317
+ limitWidth: ne,
318
+ limitHeight: fe
301
319
  };
302
- }, Ze = (C) => {
303
- const { objects: A } = C, V = Ae(A, e);
304
- if (V.length !== 1)
320
+ }, F = (C) => {
321
+ const { objects: A } = C, x = Ge(A, e);
322
+ if (x.length !== 1)
305
323
  return;
306
- const H = V[0];
324
+ const H = x[0];
307
325
  if (H == null)
308
326
  return;
309
- const { transform: U } = H;
310
- if (U == null)
327
+ const { transform: j } = H;
328
+ if (j == null)
311
329
  return;
312
330
  const {
313
- width: q,
331
+ width: ee,
314
332
  height: k,
315
333
  left: z,
316
- top: F,
317
- angle: K
318
- } = U;
319
- q != null && b(q), k != null && I(k), z != null && N(z), F != null && D(F), K != null && W(K);
334
+ top: K,
335
+ angle: Z
336
+ } = j;
337
+ ee != null && I(ee), k != null && P(k), z != null && D(z), K != null && T(K), Z != null && W(Z);
320
338
  };
321
- ve(() => {
339
+ be(() => {
322
340
  const C = w.changeStart$.subscribe((H) => {
323
- Ze(H);
341
+ F(H);
324
342
  }), A = w.changing$.subscribe((H) => {
325
- Ze(H);
326
- }), V = e.focus$.subscribe((H) => {
343
+ F(H);
344
+ }), x = e.focus$.subscribe((H) => {
327
345
  if (H.length !== 1)
328
346
  return;
329
- const U = e.getDrawingByParam(H[0]);
330
- if (U == null)
347
+ const j = e.getDrawingByParam(H[0]);
348
+ if (j == null)
331
349
  return;
332
- const q = U.transform;
333
- if (q == null)
350
+ const ee = j.transform;
351
+ if (ee == null)
334
352
  return;
335
353
  const {
336
354
  width: k,
337
355
  height: z,
338
- left: F,
339
- top: K,
340
- angle: ee
341
- } = q;
342
- k != null && b(k), z != null && I(z), F != null && N(F), K != null && D(K), ee != null && W(ee);
356
+ left: K,
357
+ top: Z,
358
+ angle: ne
359
+ } = ee;
360
+ k != null && I(k), z != null && P(z), K != null && D(K), Z != null && T(Z), ne != null && W(ne);
343
361
  });
344
362
  return () => {
345
- A.unsubscribe(), C.unsubscribe(), V.unsubscribe();
363
+ A.unsubscribe(), C.unsubscribe(), x.unsubscribe();
346
364
  };
347
365
  }, []);
348
- const St = Ie((C) => {
366
+ const We = Ee((C) => {
349
367
  if (C == null)
350
368
  return;
351
- C = Math.max(C, re);
352
- const { limitWidth: A, limitHeight: V } = _e(P, B, C, y);
369
+ C = Math.max(C, se);
370
+ const { limitWidth: A, limitHeight: x } = oe(M, U, C, y);
353
371
  C = Math.min(C, A);
354
- const H = { unitId: l, subUnitId: g, drawingId: u, drawingType: d, transform: { width: C } };
355
- if (Ve) {
356
- let U = C / R * y;
357
- if (U = Math.max(U, Pn), U > V)
372
+ const H = { unitId: l, subUnitId: m, drawingId: u, drawingType: d, transform: { width: C } };
373
+ if (Q) {
374
+ let j = C / N * y;
375
+ if (j = Math.max(j, Pn), j > x)
358
376
  return;
359
- I(U), H.transform.height = U;
377
+ P(j), H.transform.height = j;
360
378
  }
361
- b(C), e.featurePluginUpdateNotification([H]), w.refreshControls().changeNotification();
362
- }, Pe), bt = Ie((C) => {
379
+ I(C), e.featurePluginUpdateNotification([H]), w.refreshControls().changeNotification();
380
+ }, Re), $e = Ee((C) => {
363
381
  if (C == null)
364
382
  return;
365
- C = Math.max(C, re);
366
- const { limitHeight: A, limitWidth: V } = _e(P, B, R, C);
383
+ C = Math.max(C, se);
384
+ const { limitHeight: A, limitWidth: x } = oe(M, U, N, C);
367
385
  C = Math.min(C, A);
368
- const H = { unitId: l, subUnitId: g, drawingId: u, drawingType: d, transform: { height: C } };
369
- if (Ve) {
370
- let U = C / y * R;
371
- if (U = Math.max(U, re), U > V)
386
+ const H = { unitId: l, subUnitId: m, drawingId: u, drawingType: d, transform: { height: C } };
387
+ if (Q) {
388
+ let j = C / y * N;
389
+ if (j = Math.max(j, se), j > x)
372
390
  return;
373
- b(U), H.transform.width = U;
391
+ I(j), H.transform.width = j;
374
392
  }
375
- I(C), e.featurePluginUpdateNotification([H]), w.refreshControls().changeNotification();
376
- }, Pe), It = Ie((C) => {
393
+ P(C), e.featurePluginUpdateNotification([H]), w.refreshControls().changeNotification();
394
+ }, Re), It = Ee((C) => {
377
395
  if (C == null)
378
396
  return;
379
- const { limitLeft: A } = _e(C, B, R, y);
397
+ const { limitLeft: A } = oe(C, U, N, y);
380
398
  C = A;
381
- const V = { unitId: l, subUnitId: g, drawingId: u, drawingType: d, transform: { left: C } };
382
- N(C), e.featurePluginUpdateNotification([V]), w.refreshControls().changeNotification();
383
- }, Pe), Pt = Ie((C) => {
399
+ const x = { unitId: l, subUnitId: m, drawingId: u, drawingType: d, transform: { left: C } };
400
+ D(C), e.featurePluginUpdateNotification([x]), w.refreshControls().changeNotification();
401
+ }, Re), Pt = Ee((C) => {
384
402
  if (C == null)
385
403
  return;
386
- const { limitTop: A } = _e(P, C, R, y);
404
+ const { limitTop: A } = oe(M, C, N, y);
387
405
  C = A;
388
- const V = { unitId: l, subUnitId: g, drawingId: u, drawingType: d, transform: { top: C } };
389
- D(C), e.featurePluginUpdateNotification([V]), w.refreshControls().changeNotification();
390
- }, Pe), yt = (C) => {
406
+ const x = { unitId: l, subUnitId: m, drawingId: u, drawingType: d, transform: { top: C } };
407
+ T(C), e.featurePluginUpdateNotification([x]), w.refreshControls().changeNotification();
408
+ }, Re), yt = (C) => {
391
409
  if (C == null)
392
410
  return;
393
- const [A, V] = yn;
394
- C < A && (C = A), C > V && (C = V);
395
- const H = { unitId: l, subUnitId: g, drawingId: u, drawingType: d, transform: { angle: C } };
411
+ const [A, x] = yn;
412
+ C < A && (C = A), C > x && (C = x);
413
+ const H = { unitId: l, subUnitId: m, drawingId: u, drawingType: d, transform: { angle: C } };
396
414
  W(C), e.featurePluginUpdateNotification([H]), w.refreshControls().changeNotification();
397
415
  }, Et = (C) => {
398
- _t(C), w.keepRatio = C;
416
+ Ie(C), w.keepRatio = C;
399
417
  }, Rt = (C) => C ? "block" : "none";
400
- return /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: Rt(o) } }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, n.t("image-panel.transform.title")))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.width"))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(de, { precision: 1, value: R, onChange: (C) => {
401
- St(C);
402
- }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.height"))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(de, { precision: 1, value: y, onChange: (C) => {
403
- bt(C);
404
- }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.lock"))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelRow, m.imageCommonPanelRowVertical) }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(At, { checked: Ve, onChange: Et })))))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.x"))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(de, { precision: 1, value: P, onChange: (C) => {
418
+ return /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelGrid, g.imageCommonPanelBorder), style: { display: Rt(o) } }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, n.t("image-panel.transform.title")))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, n.t("image-panel.transform.width"))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(pe, { precision: 1, value: N, onChange: (C) => {
419
+ We(C);
420
+ }, className: g.imageCommonPanelInput }))))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, n.t("image-panel.transform.height"))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(pe, { precision: 1, value: y, onChange: (C) => {
421
+ $e(C);
422
+ }, className: g.imageCommonPanelInput }))))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, n.t("image-panel.transform.lock"))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelRow, g.imageCommonPanelRowVertical) }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(At, { checked: Q, onChange: Et })))))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, n.t("image-panel.transform.x"))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(pe, { precision: 1, value: M, onChange: (C) => {
405
423
  It(C);
406
- }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.y"))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(de, { precision: 1, value: B, onChange: (C) => {
424
+ }, className: g.imageCommonPanelInput }))))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, n.t("image-panel.transform.y"))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(pe, { precision: 1, value: U, onChange: (C) => {
407
425
  Pt(C);
408
- }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.rotate"))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(de, { precision: 1, value: le, onChange: yt, className: m.imageCommonPanelInput })))))));
426
+ }, className: g.imageCommonPanelInput }))))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan3) }, /* @__PURE__ */ c.createElement("label", null, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, n.t("image-panel.transform.rotate"))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelColumn }, /* @__PURE__ */ c.createElement(pe, { precision: 1, value: ie, onChange: yt, className: g.imageCommonPanelInput })))))));
409
427
  };
410
- var O = /* @__PURE__ */ ((a) => (a.default = "0", a.left = "1", a.center = "2", a.right = "3", a.top = "4", a.middle = "5", a.bottom = "6", a.horizon = "7", a.vertical = "8", a))(O || {});
411
- const Ke = {
428
+ var E = /* @__PURE__ */ ((a) => (a.default = "0", a.left = "1", a.center = "2", a.right = "3", a.top = "4", a.middle = "5", a.bottom = "6", a.horizon = "7", a.vertical = "8", a))(E || {});
429
+ const Je = {
412
430
  id: "sheet.operation.set-image-align",
413
- type: we.OPERATION,
431
+ type: Se.OPERATION,
414
432
  handler: (a, n) => !0
415
433
  }, Rn = (a) => {
416
- const n = x(ce), e = x(Z), { alignShow: t } = a, [r, o] = L(O.default), i = [
434
+ const n = V(ue), e = V(Y), { alignShow: t } = a, [r, o] = L(E.default), i = [
417
435
  {
418
436
  label: e.t("image-panel.align.default"),
419
- value: O.default
437
+ value: E.default
420
438
  },
421
439
  {
422
440
  options: [
423
441
  {
424
442
  label: e.t("image-panel.align.left"),
425
- value: O.left
443
+ value: E.left
426
444
  },
427
445
  {
428
446
  label: e.t("image-panel.align.center"),
429
- value: O.center
447
+ value: E.center
430
448
  },
431
449
  {
432
450
  label: e.t("image-panel.align.right"),
433
- value: O.right
451
+ value: E.right
434
452
  }
435
453
  ]
436
454
  },
@@ -438,15 +456,15 @@ const Ke = {
438
456
  options: [
439
457
  {
440
458
  label: e.t("image-panel.align.top"),
441
- value: O.top
459
+ value: E.top
442
460
  },
443
461
  {
444
462
  label: e.t("image-panel.align.middle"),
445
- value: O.middle
463
+ value: E.middle
446
464
  },
447
465
  {
448
466
  label: e.t("image-panel.align.bottom"),
449
- value: O.bottom
467
+ value: E.bottom
450
468
  }
451
469
  ]
452
470
  },
@@ -454,85 +472,85 @@ const Ke = {
454
472
  options: [
455
473
  {
456
474
  label: e.t("image-panel.align.horizon"),
457
- value: O.horizon
475
+ value: E.horizon
458
476
  },
459
477
  {
460
478
  label: e.t("image-panel.align.vertical"),
461
- value: O.vertical
479
+ value: E.vertical
462
480
  }
463
481
  ]
464
482
  }
465
483
  ];
466
- function s(g) {
467
- o(g), n.executeCommand(Ke.id, {
468
- alignType: g
484
+ function s(m) {
485
+ o(m), n.executeCommand(Je.id, {
486
+ alignType: m
469
487
  });
470
488
  }
471
- const l = (g) => g ? "block" : "none";
472
- return /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: l(t) } }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, e.t("image-panel.align.title")))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn) }, /* @__PURE__ */ c.createElement(ot, { value: r, options: i, onChange: s }))));
473
- }, ke = {
489
+ const l = (m) => m ? "block" : "none";
490
+ return /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelGrid, g.imageCommonPanelBorder), style: { display: l(t) } }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, e.t("image-panel.align.title")))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn) }, /* @__PURE__ */ c.createElement(lt, { value: r, options: i, onChange: s }))));
491
+ }, Ze = {
474
492
  id: "sheet.operation.open-image-crop",
475
- type: we.OPERATION,
493
+ type: Se.OPERATION,
476
494
  handler: (a, n) => !0
477
- }, oe = {
495
+ }, me = {
478
496
  id: "sheet.operation.close-image-crop",
479
- type: we.OPERATION,
497
+ type: Se.OPERATION,
480
498
  handler: (a, n) => !0
481
499
  };
482
- var j = /* @__PURE__ */ ((a) => (a.FREE = "0", a.R1_1 = "1", a.R16_9 = "2", a.R9_16 = "3", a.R5_4 = "4", a.R4_5 = "5", a.R4_3 = "6", a.R3_4 = "7", a.R3_2 = "8", a.R2_3 = "9", a))(j || {});
483
- const je = {
500
+ var B = /* @__PURE__ */ ((a) => (a.FREE = "0", a.R1_1 = "1", a.R16_9 = "2", a.R9_16 = "3", a.R5_4 = "4", a.R4_5 = "5", a.R4_3 = "6", a.R3_4 = "7", a.R3_2 = "8", a.R2_3 = "9", a))(B || {});
501
+ const Le = {
484
502
  id: "sheet.operation.Auto-image-crop",
485
- type: we.OPERATION,
503
+ type: Se.OPERATION,
486
504
  handler: (a, n) => !0
487
505
  }, Mn = (a) => {
488
- const n = x(ce), e = x(Z), { drawings: t, cropperShow: r } = a;
506
+ const n = V(ue), e = V(Y), { drawings: t, cropperShow: r } = a;
489
507
  if (t[0] == null)
490
508
  return;
491
- const [i, s] = L(j.FREE), l = it(!1), g = [
509
+ const [i, s] = L(B.FREE), l = ct(!1), m = [
492
510
  {
493
511
  label: e.t("image-panel.crop.mode"),
494
- value: j.FREE
512
+ value: B.FREE
495
513
  },
496
514
  {
497
515
  label: "1:1",
498
- value: j.R1_1
516
+ value: B.R1_1
499
517
  },
500
518
  {
501
519
  label: "16:9",
502
- value: j.R16_9
520
+ value: B.R16_9
503
521
  },
504
522
  {
505
523
  label: "9:16",
506
- value: j.R9_16
524
+ value: B.R9_16
507
525
  },
508
526
  {
509
527
  label: "5:4",
510
- value: j.R5_4
528
+ value: B.R5_4
511
529
  },
512
530
  {
513
531
  label: "4:5",
514
- value: j.R4_5
532
+ value: B.R4_5
515
533
  },
516
534
  {
517
535
  label: "4:3",
518
- value: j.R4_3
536
+ value: B.R4_3
519
537
  },
520
538
  {
521
539
  label: "3:4",
522
- value: j.R3_4
540
+ value: B.R3_4
523
541
  },
524
542
  {
525
543
  label: "3:2",
526
- value: j.R3_2
544
+ value: B.R3_2
527
545
  },
528
546
  {
529
547
  label: "2:3",
530
- value: j.R2_3
548
+ value: B.R2_3
531
549
  }
532
550
  ];
533
- ve(() => {
551
+ be(() => {
534
552
  const f = n.onCommandExecuted((v) => {
535
- if (v.id === oe.id) {
553
+ if (v.id === me.id) {
536
554
  const w = v.params;
537
555
  w != null && w.isAuto || (l.current = !1);
538
556
  }
@@ -542,120 +560,120 @@ const je = {
542
560
  };
543
561
  }, []);
544
562
  function u(f) {
545
- s(f), l.current && n.executeCommand(je.id, {
563
+ s(f), l.current && n.executeCommand(Le.id, {
546
564
  cropType: f
547
565
  });
548
566
  }
549
567
  const d = (f) => f ? "block" : "none", h = (f) => {
550
- n.executeCommand(je.id, {
568
+ n.executeCommand(Le.id, {
551
569
  cropType: f
552
570
  }), l.current = !0;
553
571
  };
554
- return /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: d(r) } }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, e.t("image-panel.crop.title")))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelRow, m.imageCommonPanelRowVertical) }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(ie, { size: "small", onClick: () => {
572
+ return /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelGrid, g.imageCommonPanelBorder), style: { display: d(r) } }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, e.t("image-panel.crop.title")))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelRow, g.imageCommonPanelRowVertical) }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(le, { size: "small", onClick: () => {
555
573
  h(i);
556
- } }, /* @__PURE__ */ c.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(gt, null), e.t("image-panel.crop.start")))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(ot, { value: i, options: g, onChange: u }))));
574
+ } }, /* @__PURE__ */ c.createElement("span", { className: g.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(ht, null), e.t("image-panel.crop.start")))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan2) }, /* @__PURE__ */ c.createElement(lt, { value: i, options: m, onChange: u }))));
557
575
  }, On = (a) => {
558
- const n = x(Z), e = x(ge), t = x(ne), { hasGroup: r, drawings: o } = a, [i, s] = L(!1), [l, g] = L(!0), [u, d] = L(!0), h = (p) => p ? "block" : "none", f = () => {
559
- const p = t.getFocusDrawings(), { unitId: E, subUnitId: _ } = p[0], M = Ht.generateRandomId(10), S = Dt(0, 0, p.map((y) => y.transform || {})), R = {
560
- unitId: E,
576
+ const n = V(Y), e = V(he), t = V(ae), { hasGroup: r, drawings: o } = a, [i, s] = L(!1), [l, m] = L(!0), [u, d] = L(!0), h = (p) => p ? "block" : "none", f = () => {
577
+ const p = t.getFocusDrawings(), { unitId: S, subUnitId: _ } = p[0], R = Ht.generateRandomId(10), b = Dt(0, 0, p.map((y) => y.transform || {})), N = {
578
+ unitId: S,
561
579
  subUnitId: _,
562
- drawingId: M,
563
- drawingType: te.DRAWING_GROUP,
564
- transform: S
565
- }, b = p.map((y) => {
566
- const I = y.transform || { left: 0, top: 0 }, { unitId: P, subUnitId: N, drawingId: B } = y;
580
+ drawingId: R,
581
+ drawingType: re.DRAWING_GROUP,
582
+ transform: b
583
+ }, I = p.map((y) => {
584
+ const P = y.transform || { left: 0, top: 0 }, { unitId: M, subUnitId: D, drawingId: U } = y;
567
585
  return {
568
- unitId: P,
569
- subUnitId: N,
570
- drawingId: B,
586
+ unitId: M,
587
+ subUnitId: D,
588
+ drawingId: U,
571
589
  transform: {
572
- ...I,
573
- left: I.left - S.left,
574
- top: I.top - S.top
590
+ ...P,
591
+ left: P.left - b.left,
592
+ top: P.top - b.top
575
593
  },
576
- groupId: M
594
+ groupId: R
577
595
  };
578
596
  });
579
597
  t.featurePluginGroupUpdateNotification([{
580
- parent: R,
581
- children: b
598
+ parent: N,
599
+ children: I
582
600
  }]);
583
601
  }, v = (p) => {
584
- if (p.drawingType !== te.DRAWING_GROUP)
602
+ if (p.drawingType !== re.DRAWING_GROUP)
585
603
  return;
586
- const { unitId: E, subUnitId: _, drawingId: M, transform: S = { width: 0, height: 0 } } = p;
587
- if (S == null)
604
+ const { unitId: S, subUnitId: _, drawingId: R, transform: b = { width: 0, height: 0 } } = p;
605
+ if (b == null)
588
606
  return;
589
- const R = t.getDrawingsByGroup({ unitId: E, subUnitId: _, drawingId: M });
590
- if (R.length === 0)
607
+ const N = t.getDrawingsByGroup({ unitId: S, subUnitId: _, drawingId: R });
608
+ if (N.length === 0)
591
609
  return;
592
- const b = R.map((y) => {
593
- const { transform: I } = y, { unitId: P, subUnitId: N, drawingId: B } = y, D = Tt(I || {}, S, S.width || 0, S.height || 0);
610
+ const I = N.map((y) => {
611
+ const { transform: P } = y, { unitId: M, subUnitId: D, drawingId: U } = y, T = Tt(P || {}, b, b.width || 0, b.height || 0);
594
612
  return {
595
- unitId: P,
596
- subUnitId: N,
597
- drawingId: B,
613
+ unitId: M,
614
+ subUnitId: D,
615
+ drawingId: U,
598
616
  transform: {
599
- ...I,
600
- ...D
617
+ ...P,
618
+ ...T
601
619
  },
602
620
  groupId: void 0
603
621
  };
604
622
  });
605
623
  return {
606
624
  parent: p,
607
- children: b
625
+ children: I
608
626
  };
609
627
  }, w = () => {
610
- const E = t.getFocusDrawings().map(
628
+ const S = t.getFocusDrawings().map(
611
629
  (_) => v(_)
612
630
  ).filter((_) => _ != null);
613
- E.length !== 0 && t.featurePluginUngroupUpdateNotification(E);
631
+ S.length !== 0 && t.featurePluginUngroupUpdateNotification(S);
614
632
  };
615
- return ve(() => {
633
+ return be(() => {
616
634
  const p = o[0];
617
635
  if (p == null)
618
636
  return;
619
- const { unitId: E } = p, _ = e.getRenderById(E), M = _ == null ? void 0 : _.scene;
620
- if (M == null)
637
+ const { unitId: S } = p, _ = e.getRenderById(S), R = _ == null ? void 0 : _.scene;
638
+ if (R == null)
621
639
  return;
622
- const S = M.getTransformerByCreate(), R = S.clearControl$.subscribe((y) => {
640
+ const b = R.getTransformerByCreate(), N = b.clearControl$.subscribe((y) => {
623
641
  y === !0 && s(!1);
624
- }), b = S.changeStart$.subscribe((y) => {
625
- const { objects: I } = y, P = Ae(I, t), N = P.filter((W) => (W == null ? void 0 : W.drawingType) === te.DRAWING_GROUP);
626
- let B = !1, D = !1;
627
- P.length > 1 && (B = !0), N.length > 0 && (D = !0), s(B || D), g(B), d(D);
642
+ }), I = b.changeStart$.subscribe((y) => {
643
+ const { objects: P } = y, M = Ge(P, t), D = M.filter((W) => (W == null ? void 0 : W.drawingType) === re.DRAWING_GROUP);
644
+ let U = !1, T = !1;
645
+ M.length > 1 && (U = !0), D.length > 0 && (T = !0), s(U || T), m(U), d(T);
628
646
  });
629
647
  return () => {
630
- b.unsubscribe(), R.unsubscribe();
648
+ I.unsubscribe(), N.unsubscribe();
631
649
  };
632
- }, []), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: h(r === !0 ? i : !1) } }, /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, n.t("image-panel.group.title")))), /* @__PURE__ */ c.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2, m.imageCommonPanelColumnCenter) }, /* @__PURE__ */ c.createElement(ie, { size: "small", onClick: () => {
650
+ }, []), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelGrid, g.imageCommonPanelBorder), style: { display: h(r === !0 ? i : !1) } }, /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelTitle) }, /* @__PURE__ */ c.createElement("div", null, n.t("image-panel.group.title")))), /* @__PURE__ */ c.createElement("div", { className: g.imageCommonPanelRow }, /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan2, g.imageCommonPanelColumnCenter) }, /* @__PURE__ */ c.createElement(le, { size: "small", onClick: () => {
633
651
  f();
634
- }, style: { display: h(l) } }, /* @__PURE__ */ c.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(ut, null), n.t("image-panel.group.group")))), /* @__PURE__ */ c.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2, m.imageCommonPanelColumnCenter) }, /* @__PURE__ */ c.createElement(ie, { size: "small", onClick: () => {
652
+ }, style: { display: h(l) } }, /* @__PURE__ */ c.createElement("span", { className: g.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(ft, null), n.t("image-panel.group.group")))), /* @__PURE__ */ c.createElement("div", { className: O(g.imageCommonPanelColumn, g.imageCommonPanelSpan2, g.imageCommonPanelColumnCenter) }, /* @__PURE__ */ c.createElement(le, { size: "small", onClick: () => {
635
653
  w();
636
- }, style: { display: h(u) } }, /* @__PURE__ */ c.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(Ct, null), n.t("image-panel.group.unGroup"))))));
654
+ }, style: { display: h(u) } }, /* @__PURE__ */ c.createElement("span", { className: g.imageCommonPanelInline }, /* @__PURE__ */ c.createElement(_t, null), n.t("image-panel.group.unGroup"))))));
637
655
  }, dr = (a) => {
638
- const n = x(ne), e = x(ge), t = x(Z), { drawings: r, hasArrange: o = !0, hasTransform: i = !0, hasAlign: s = !0, hasCropper: l = !0, hasGroup: g = !0 } = a, u = r[0];
656
+ const n = V(ae), e = V(he), t = V(Y), { drawings: r, hasArrange: o = !0, hasTransform: i = !0, hasAlign: s = !0, hasCropper: l = !0, hasGroup: m = !0 } = a, u = r[0];
639
657
  if (u == null)
640
658
  return;
641
659
  const { unitId: d } = u, h = e.getRenderById(d), f = h == null ? void 0 : h.scene;
642
660
  if (f == null)
643
661
  return;
644
- const v = f.getTransformerByCreate(), [w, p] = L(!0), [E, _] = L(!0), [M, S] = L(!1), [R, b] = L(!0), [y, I] = L(!1);
645
- return ve(() => {
646
- const P = v.clearControl$.subscribe((D) => {
647
- D === !0 && (p(!1), _(!1), S(!1), b(!1), I(!0));
648
- }), N = v.changeStart$.subscribe((D) => {
649
- const { objects: le } = D, W = Ae(le, n);
650
- W.length === 0 ? (p(!1), _(!1), S(!1), b(!1), I(!0)) : W.length === 1 ? (p(!0), _(!0), S(!1), b(!0), I(!1)) : (p(!0), _(!1), S(!0), b(!1), I(!1));
651
- }), B = n.focus$.subscribe((D) => {
652
- D.length === 0 ? (p(!1), _(!1), S(!1), b(!1), I(!0)) : D.length === 1 ? (p(!0), _(!0), S(!1), b(!0), I(!1)) : (p(!0), _(!1), S(!0), b(!1), I(!1));
662
+ const v = f.getTransformerByCreate(), [w, p] = L(!0), [S, _] = L(!0), [R, b] = L(!1), [N, I] = L(!0), [y, P] = L(!1);
663
+ return be(() => {
664
+ const M = v.clearControl$.subscribe((T) => {
665
+ T === !0 && (p(!1), _(!1), b(!1), I(!1), P(!0));
666
+ }), D = v.changeStart$.subscribe((T) => {
667
+ const { objects: ie } = T, W = Ge(ie, n);
668
+ W.length === 0 ? (p(!1), _(!1), b(!1), I(!1), P(!0)) : W.length === 1 ? (p(!0), _(!0), b(!1), I(!0), P(!1)) : (p(!0), _(!1), b(!0), I(!1), P(!1));
669
+ }), U = n.focus$.subscribe((T) => {
670
+ T.length === 0 ? (p(!1), _(!1), b(!1), I(!1), P(!0)) : T.length === 1 ? (p(!0), _(!0), b(!1), I(!0), P(!1)) : (p(!0), _(!1), b(!0), I(!1), P(!1));
653
671
  });
654
672
  return () => {
655
- N.unsubscribe(), P.unsubscribe(), B.unsubscribe();
673
+ D.unsubscribe(), M.unsubscribe(), U.unsubscribe();
656
674
  };
657
- }, []), /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("div", { style: { display: y === !0 ? "block" : "none", height: "100%" } }, /* @__PURE__ */ c.createElement("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", top: "50%", marginTop: "-100px" } }, /* @__PURE__ */ c.createElement("span", null, t.t("image-panel.null")))), /* @__PURE__ */ c.createElement(In, { arrangeShow: o === !0 ? w : !1, drawings: r }), /* @__PURE__ */ c.createElement(En, { transformShow: i === !0 ? E : !1, drawings: r }), /* @__PURE__ */ c.createElement(Rn, { alignShow: s === !0 ? M : !1, drawings: r }), /* @__PURE__ */ c.createElement(Mn, { cropperShow: l === !0 ? R : !1, drawings: r }), /* @__PURE__ */ c.createElement(On, { hasGroup: g, drawings: r }));
658
- }, Nn = "univer-image-popup-menu", Dn = "univer-image-popup-menu-item", Tn = "univer-image-popup-menu-item-icon", Bn = "univer-image-popup-menu-item-title", jn = "univer-image-popup-menu-item-hide", Un = "univer-btn-container", Hn = "univer-btn-container-expand", he = {
675
+ }, []), /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("div", { style: { display: y === !0 ? "block" : "none", height: "100%" } }, /* @__PURE__ */ c.createElement("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", top: "50%", marginTop: "-100px" } }, /* @__PURE__ */ c.createElement("span", null, t.t("image-panel.null")))), /* @__PURE__ */ c.createElement(In, { arrangeShow: o === !0 ? w : !1, drawings: r }), /* @__PURE__ */ c.createElement(En, { transformShow: i === !0 ? S : !1, drawings: r }), /* @__PURE__ */ c.createElement(Rn, { alignShow: s === !0 ? R : !1, drawings: r }), /* @__PURE__ */ c.createElement(Mn, { cropperShow: l === !0 ? N : !1, drawings: r }), /* @__PURE__ */ c.createElement(On, { hasGroup: m, drawings: r }));
676
+ }, Nn = "univer-image-popup-menu", Dn = "univer-image-popup-menu-item", Tn = "univer-image-popup-menu-item-icon", Bn = "univer-image-popup-menu-item-title", jn = "univer-image-popup-menu-item-hide", Un = "univer-btn-container", Hn = "univer-btn-container-expand", Ce = {
659
677
  imagePopupMenu: Nn,
660
678
  imagePopupMenuItem: Dn,
661
679
  imagePopupMenuItemIcon: Tn,
@@ -668,9 +686,9 @@ const je = {
668
686
  const n = (w = (v = a.popup) == null ? void 0 : v.extraProps) == null ? void 0 : w.menuItems;
669
687
  if (!n)
670
688
  return null;
671
- const e = x(ce), t = x(Z), [r, o] = L(!1), [i, s] = L(!1), l = () => {
689
+ const e = V(ue), t = V(Y), [r, o] = L(!1), [i, s] = L(!1), l = () => {
672
690
  s(!0);
673
- }, g = () => {
691
+ }, m = () => {
674
692
  s(!1);
675
693
  }, u = (p) => {
676
694
  o(p);
@@ -681,21 +699,21 @@ const je = {
681
699
  "div",
682
700
  {
683
701
  onMouseEnter: l,
684
- onMouseLeave: g
702
+ onMouseLeave: m
685
703
  },
686
704
  /* @__PURE__ */ c.createElement(
687
- Vt,
705
+ xt,
688
706
  {
689
707
  placement: "bottomLeft",
690
708
  trigger: ["click"],
691
- overlay: /* @__PURE__ */ c.createElement("ul", { className: he.imagePopupMenu }, f.map((p) => /* @__PURE__ */ c.createElement(
709
+ overlay: /* @__PURE__ */ c.createElement("ul", { className: Ce.imagePopupMenu }, f.map((p) => /* @__PURE__ */ c.createElement(
692
710
  "li",
693
711
  {
694
712
  key: p.index,
695
713
  onClick: () => d(p),
696
- className: he.imagePopupMenuItem
714
+ className: Ce.imagePopupMenuItem
697
715
  },
698
- /* @__PURE__ */ c.createElement("span", { className: he.imagePopupMenuItemTitle }, t.t(p.label))
716
+ /* @__PURE__ */ c.createElement("span", { className: Ce.imagePopupMenuItemTitle }, t.t(p.label))
699
717
  ))),
700
718
  visible: r,
701
719
  onVisibleChange: u
@@ -703,31 +721,31 @@ const je = {
703
721
  /* @__PURE__ */ c.createElement(
704
722
  "div",
705
723
  {
706
- className: T(he.btnContainer, {
707
- [he.btnContainerExpand]: r
724
+ className: O(Ce.btnContainer, {
725
+ [Ce.btnContainerExpand]: r
708
726
  })
709
727
  },
710
728
  /* @__PURE__ */ c.createElement(
711
- lt,
729
+ ut,
712
730
  {
713
731
  style: { color: "#35322B" },
714
732
  extend: { colorChannel1: "rgb(var(--green-700, #409f11))" }
715
733
  }
716
734
  ),
717
- h && /* @__PURE__ */ c.createElement(dt, { style: { color: "#CCCCCC", fontSize: "8px", marginLeft: "8px" } })
735
+ h && /* @__PURE__ */ c.createElement(pt, { style: { color: "#CCCCCC", fontSize: "8px", marginLeft: "8px" } })
718
736
  )
719
737
  )
720
738
  );
721
739
  }, An = "COMPONENT_IMAGE_POPUP_MENU";
722
- var Vn = Object.defineProperty, xn = Object.getOwnPropertyDescriptor, Gn = (a, n, e, t) => {
723
- for (var r = t > 1 ? void 0 : t ? xn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
740
+ var xn = Object.defineProperty, Vn = Object.getOwnPropertyDescriptor, Gn = (a, n, e, t) => {
741
+ for (var r = t > 1 ? void 0 : t ? Vn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
724
742
  (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
725
- return t && r && Vn(n, e, r), r;
726
- }, ye = (a, n) => (e, t) => n(e, t, a);
727
- let Me = class extends Ue {
743
+ return t && r && xn(n, e, r), r;
744
+ }, Me = (a, n) => (e, t) => n(e, t, a);
745
+ let De = class extends Ae {
728
746
  constructor(n, e, t, r) {
729
747
  super();
730
- Q(this, "_sceneListenerOnDrawingMap", /* @__PURE__ */ new WeakSet());
748
+ te(this, "_sceneListenerOnDrawingMap", /* @__PURE__ */ new WeakSet());
731
749
  this._currentUniverService = n, this._commandService = e, this._renderManagerService = t, this._drawingManagerService = r, this._initialize();
732
750
  }
733
751
  dispose() {
@@ -737,7 +755,7 @@ let Me = class extends Ue {
737
755
  this._recoveryImages(), this._drawingAddListener(), this._drawingRemoveListener(), this._drawingUpdateListener(), this._commandExecutedListener(), this._drawingArrangeListener(), this._drawingGroupListener(), this._drawingRefreshListener(), this._drawingVisibleListener();
738
756
  }
739
757
  _recoveryImages() {
740
- const n = this._drawingManagerService.drawingManagerData, e = $e(this._currentUniverService);
758
+ const n = this._drawingManagerService.drawingManagerData, e = Ke(this._currentUniverService);
741
759
  if (e == null)
742
760
  return;
743
761
  const { unitId: t, subUnitId: r } = e;
@@ -753,7 +771,7 @@ let Me = class extends Ue {
753
771
  _commandExecutedListener() {
754
772
  this.disposeWithMe(
755
773
  this._commandService.onCommandExecuted((n) => {
756
- if (n.id === Ke.id) {
774
+ if (n.id === Je.id) {
757
775
  const e = n.params;
758
776
  if (e == null)
759
777
  return;
@@ -811,8 +829,8 @@ let Me = class extends Ue {
811
829
  const { parent: e, children: t } = n, { unitId: r, subUnitId: o, drawingId: i } = e, s = this._getSceneAndTransformerByDrawingSearch(e.unitId);
812
830
  if (s == null)
813
831
  return;
814
- const { scene: l, transformer: g } = s;
815
- this._commandService.syncExecuteCommand(oe.id);
832
+ const { scene: l, transformer: m } = s;
833
+ this._commandService.syncExecuteCommand(me.id);
816
834
  const u = [];
817
835
  if (t.forEach((f) => {
818
836
  const v = G(f), w = l.getObjectIncludeInGroup(v);
@@ -820,11 +838,11 @@ let Me = class extends Ue {
820
838
  return;
821
839
  u.push(w);
822
840
  const { transform: p } = f;
823
- p != null && (w.classType === Xe.GROUP ? w.transformByState({ left: p.left, top: p.top }) : w.transformByState(p));
841
+ p != null && (w.classType === Qe.GROUP ? w.transformByState({ left: p.left, top: p.top }) : w.transformByState(p));
824
842
  }), u.length === 0)
825
843
  return;
826
- const d = G({ unitId: r, subUnitId: o, drawingId: i }), h = new pe(d);
827
- l.addObject(h, ze).attachTransformerTo(h), h.addObjects(...u), e.transform && h.transformByState({ left: e.transform.left, top: e.transform.top }), g.clearSelectedObjects(), g.setSelectedControl(h);
844
+ const d = G({ unitId: r, subUnitId: o, drawingId: i }), h = new ve(d);
845
+ l.addObject(h, Ye).attachTransformerTo(h), h.addObjects(...u), e.transform && h.transformByState({ left: e.transform.left, top: e.transform.top }), m.clearSelectedObjects(), m.setSelectedControl(h);
828
846
  }
829
847
  // private _regroupDrawings(drawings: IDrawingSearch[]) {
830
848
  // const renderObject = this._getSceneAndTransformerByDrawingSearch(drawings[0].unitId);
@@ -877,19 +895,19 @@ let Me = class extends Ue {
877
895
  if (f == null)
878
896
  return;
879
897
  const { transform: v } = d;
880
- v != null && (f.classType === Xe.GROUP ? f.transformByState({ left: v.left, top: v.top }) : f.transformByState(v));
898
+ v != null && (f.classType === Qe.GROUP ? f.transformByState({ left: v.left, top: v.top }) : f.transformByState(v));
881
899
  });
882
- const s = G(e), l = o.getObject(s), { width: g, height: u } = l;
900
+ const s = G(e), l = o.getObject(s), { width: m, height: u } = l;
883
901
  l.getObjects().forEach((d) => {
884
- l.removeSelfObjectAndTransform(d.oKey, g, u);
902
+ l.removeSelfObjectAndTransform(d.oKey, m, u);
885
903
  }), l.dispose(), i.clearSelectedObjects();
886
904
  }
887
905
  _drawingAlign(n) {
888
906
  const { alignType: e } = n, t = this._drawingManagerService.getFocusDrawings();
889
- if (e === O.default)
907
+ if (e === E.default)
890
908
  return;
891
909
  const r = [];
892
- let o = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, g = 0;
910
+ let o = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, m = 0;
893
911
  t.forEach((u) => {
894
912
  const { unitId: d, subUnitId: h, drawingId: f, drawingType: v } = u, w = this._drawingManagerService.getDrawingByParam({ unitId: d, subUnitId: h, drawingId: f });
895
913
  if (w == null || w.transform == null)
@@ -901,52 +919,52 @@ let Me = class extends Ue {
901
919
  drawingType: v,
902
920
  transform: w.transform
903
921
  });
904
- const { left: p = 0, top: E = 0, width: _ = 0, height: M = 0 } = w.transform;
905
- o = Math.min(o, p), i = Math.min(i, E), s = Math.max(s, p + _), l = Math.max(l, E + M), g++;
906
- }), g !== 0 && (this._sortDrawingTransform(r, e), this._applyAlignType(r, e, o, i, s, l, g));
922
+ const { left: p = 0, top: S = 0, width: _ = 0, height: R = 0 } = w.transform;
923
+ o = Math.min(o, p), i = Math.min(i, S), s = Math.max(s, p + _), l = Math.max(l, S + R), m++;
924
+ }), m !== 0 && (this._sortDrawingTransform(r, e), this._applyAlignType(r, e, o, i, s, l, m));
907
925
  }
908
926
  _applyAlignType(n, e, t, r, o, i, s) {
909
- const l = Math.round((o - t) / s * 10) / 10, g = Math.round((i - r) / s * 10) / 10, u = [], d = this._getSceneAndTransformerByDrawingSearch(n[0].unitId);
927
+ const l = Math.round((o - t) / s * 10) / 10, m = Math.round((i - r) / s * 10) / 10, u = [], d = this._getSceneAndTransformerByDrawingSearch(n[0].unitId);
910
928
  if (d == null)
911
929
  return;
912
930
  const { scene: h, transformer: f } = d;
913
931
  n.forEach((v, w) => {
914
- const { unitId: p, subUnitId: E, drawingId: _, transform: M, drawingType: S } = v, { left: R = 0, top: b = 0, width: y = 0, height: I = 0 } = M;
915
- let P = R, N = b;
932
+ const { unitId: p, subUnitId: S, drawingId: _, transform: R, drawingType: b } = v, { left: N = 0, top: I = 0, width: y = 0, height: P = 0 } = R;
933
+ let M = N, D = I;
916
934
  switch (e) {
917
- case O.left:
918
- P = t;
935
+ case E.left:
936
+ M = t;
919
937
  break;
920
- case O.center:
921
- P = t + (o - t) / 2 - y / 2;
938
+ case E.center:
939
+ M = t + (o - t) / 2 - y / 2;
922
940
  break;
923
- case O.right:
924
- P = o - y;
941
+ case E.right:
942
+ M = o - y;
925
943
  break;
926
- case O.top:
927
- N = r;
944
+ case E.top:
945
+ D = r;
928
946
  break;
929
- case O.middle:
930
- N = r + (i - r) / 2 - I / 2;
947
+ case E.middle:
948
+ D = r + (i - r) / 2 - P / 2;
931
949
  break;
932
- case O.bottom:
933
- N = i - I;
950
+ case E.bottom:
951
+ D = i - P;
934
952
  break;
935
- case O.horizon:
936
- P = t + l * w;
953
+ case E.horizon:
954
+ M = t + l * w;
937
955
  break;
938
- case O.vertical:
939
- N = r + g * w;
956
+ case E.vertical:
957
+ D = r + m * w;
940
958
  break;
941
959
  }
942
- (P !== R || N !== b) && u.push({
960
+ (M !== N || D !== I) && u.push({
943
961
  unitId: p,
944
- subUnitId: E,
962
+ subUnitId: S,
945
963
  drawingId: _,
946
- drawingType: S,
964
+ drawingType: b,
947
965
  transform: {
948
- left: P,
949
- top: N
966
+ left: M,
967
+ top: D
950
968
  }
951
969
  });
952
970
  }), this._drawingManagerService.featurePluginUpdateNotification(u), f.refreshControls().changeNotification();
@@ -956,7 +974,7 @@ let Me = class extends Ue {
956
974
  const o = t.transform, i = r.transform, {
957
975
  left: s = 0,
958
976
  top: l = 0,
959
- width: g = 0,
977
+ width: m = 0,
960
978
  height: u = 0
961
979
  } = o, {
962
980
  left: d = 0,
@@ -965,21 +983,21 @@ let Me = class extends Ue {
965
983
  height: v = 0
966
984
  } = i;
967
985
  switch (e) {
968
- case O.left:
986
+ case E.left:
969
987
  return s - d;
970
- case O.center:
971
- return s + g / 2 - (d + f / 2);
972
- case O.right:
973
- return s + g - (d + f);
974
- case O.top:
988
+ case E.center:
989
+ return s + m / 2 - (d + f / 2);
990
+ case E.right:
991
+ return s + m - (d + f);
992
+ case E.top:
975
993
  return l - h;
976
- case O.middle:
994
+ case E.middle:
977
995
  return l + u / 2 - (h + v / 2);
978
- case O.bottom:
996
+ case E.bottom:
979
997
  return l + u - (h + v);
980
- case O.horizon:
981
- return s + g / 2 - (d + f / 2);
982
- case O.vertical:
998
+ case E.horizon:
999
+ return s + m / 2 - (d + f / 2);
1000
+ case E.vertical:
983
1001
  return l + u / 2 - (h + v / 2);
984
1002
  default:
985
1003
  return 0;
@@ -997,13 +1015,14 @@ let Me = class extends Ue {
997
1015
  const { unitId: e, subUnitId: t, drawingIds: r } = n, o = this._getSceneAndTransformerByDrawingSearch(e);
998
1016
  if (o == null)
999
1017
  return;
1000
- const { scene: i, transformer: s } = o;
1001
- r.forEach((l) => {
1002
- const g = G({ unitId: e, subUnitId: t, drawingId: l }), u = i.getObject(g);
1003
- if (u == null)
1018
+ const { scene: i } = o;
1019
+ r.forEach((s) => {
1020
+ const l = G({ unitId: e, subUnitId: t, drawingId: s }), m = i.fuzzyMathObjects(l, !0);
1021
+ if (m == null || m.length === 0)
1004
1022
  return;
1005
- const d = this._drawingManagerService.getDrawingOrder(e, t).indexOf(l);
1006
- u.setProps({ zIndex: d }), u.makeDirty();
1023
+ const u = this._drawingManagerService.getDrawingOrder(e, t).indexOf(s);
1024
+ for (const d of m)
1025
+ d.setProps({ zIndex: u }), d.makeDirty();
1007
1026
  });
1008
1027
  }
1009
1028
  _drawingAddListener() {
@@ -1022,8 +1041,8 @@ let Me = class extends Ue {
1022
1041
  const l = this._getSceneAndTransformerByDrawingSearch(r);
1023
1042
  if (l == null)
1024
1043
  return;
1025
- const { scene: g, transformer: u } = l;
1026
- e.includes(g) || e.push(g);
1044
+ const { scene: m, transformer: u } = l;
1045
+ e.includes(m) || e.push(m);
1027
1046
  }), e.forEach((t) => {
1028
1047
  this._sceneListenerOnDrawingMap.has(t) || (this._addListenerOnDrawing(t), this._sceneListenerOnDrawingMap.add(t));
1029
1048
  });
@@ -1032,12 +1051,16 @@ let Me = class extends Ue {
1032
1051
  this.disposeWithMe(
1033
1052
  this._drawingManagerService.remove$.subscribe((n) => {
1034
1053
  n.forEach((e) => {
1035
- var d;
1054
+ var u;
1036
1055
  const { unitId: t, subUnitId: r, drawingId: o } = e, i = this._getSceneAndTransformerByDrawingSearch(t);
1037
1056
  if (i == null)
1038
1057
  return;
1039
- const { scene: s, transformer: l } = i, g = G({ unitId: t, subUnitId: r, drawingId: o }), u = s.getObject(g);
1040
- u != null && (u.dispose(), (d = s.getTransformer()) == null || d.clearSelectedObjects());
1058
+ const { scene: s } = i, l = G({ unitId: t, subUnitId: r, drawingId: o }), m = s.fuzzyMathObjects(l, !0);
1059
+ if (m.length > 0) {
1060
+ for (const d of m)
1061
+ d.dispose();
1062
+ (u = s.getTransformer()) == null || u.clearSelectedObjects();
1063
+ }
1041
1064
  });
1042
1065
  })
1043
1066
  );
@@ -1049,16 +1072,16 @@ let Me = class extends Ue {
1049
1072
  const { unitId: t, subUnitId: r, drawingId: o } = e, i = this._drawingManagerService.getDrawingByParam(e);
1050
1073
  if (i == null)
1051
1074
  return;
1052
- const { transform: s, drawingType: l } = i, g = this._getSceneAndTransformerByDrawingSearch(t);
1053
- if (g == null)
1075
+ const { transform: s, drawingType: l } = i, m = this._getSceneAndTransformerByDrawingSearch(t);
1076
+ if (m == null)
1054
1077
  return;
1055
- const { scene: u, transformer: d } = g;
1078
+ const { scene: u, transformer: d } = m;
1056
1079
  if (s == null)
1057
1080
  return !0;
1058
- const { left: h = 0, top: f = 0, width: v = 0, height: w = 0, angle: p = 0, flipX: E = !1, flipY: _ = !1, skewX: M = 0, skewY: S = 0 } = s, R = G({ unitId: t, subUnitId: r, drawingId: o }), b = u.getObject(R);
1059
- if (b == null)
1081
+ const { left: h = 0, top: f = 0, width: v = 0, height: w = 0, angle: p = 0, flipX: S = !1, flipY: _ = !1, skewX: R = 0, skewY: b = 0 } = s, N = G({ unitId: t, subUnitId: r, drawingId: o }), I = u.getObject(N);
1082
+ if (I == null)
1060
1083
  return !0;
1061
- b.transformByState({ left: h, top: f, width: v, height: w, angle: p, flipX: E, flipY: _, skewX: M, skewY: S });
1084
+ I.transformByState({ left: h, top: f, width: v, height: w, angle: p, flipX: S, flipY: _, skewX: R, skewY: b });
1062
1085
  });
1063
1086
  })
1064
1087
  );
@@ -1070,27 +1093,24 @@ let Me = class extends Ue {
1070
1093
  const { unitId: t, subUnitId: r, drawingId: o } = e, i = this._getSceneAndTransformerByDrawingSearch(t);
1071
1094
  if (i == null)
1072
1095
  return;
1073
- const { scene: s, transformer: l } = i, g = G({ unitId: t, subUnitId: r, drawingId: o }), u = s.getObject(g);
1074
- if (u == null)
1075
- return !0;
1076
- const d = this._drawingManagerService.getDrawingByParam(e);
1077
- if (d == null)
1096
+ const s = this._drawingManagerService.getDrawingByParam(e);
1097
+ if (s == null)
1078
1098
  return;
1079
- const { transform: h } = d;
1080
- if (h == null)
1099
+ const { transform: l } = s, { scene: m } = i, u = G({ unitId: t, subUnitId: r, drawingId: o }), d = m.getObject(u);
1100
+ if (d == null || l == null)
1081
1101
  return !0;
1082
1102
  const {
1083
- left: f = 0,
1084
- top: v = 0,
1085
- width: w = 0,
1086
- height: p = 0,
1087
- angle: E = 0,
1088
- flipX: _ = !1,
1089
- flipY: M = !1,
1090
- skewX: S = 0,
1091
- skewY: R = 0
1092
- } = h;
1093
- u.transformByState({ left: f, top: v, width: w, height: p, angle: E, flipX: _, flipY: M, skewX: S, skewY: R });
1103
+ left: h = 0,
1104
+ top: f = 0,
1105
+ width: v = 0,
1106
+ height: w = 0,
1107
+ angle: p = 0,
1108
+ flipX: S = !1,
1109
+ flipY: _ = !1,
1110
+ skewX: R = 0,
1111
+ skewY: b = 0
1112
+ } = l;
1113
+ d.transformByState({ left: h, top: f, width: v, height: w, angle: p, flipX: S, flipY: _, skewX: R, skewY: b });
1094
1114
  });
1095
1115
  })
1096
1116
  );
@@ -1102,10 +1122,10 @@ let Me = class extends Ue {
1102
1122
  const { unitId: t, subUnitId: r, drawingId: o, visible: i } = e, s = this._getSceneAndTransformerByDrawingSearch(t);
1103
1123
  if (s == null)
1104
1124
  return;
1105
- const { scene: l, transformer: g } = s, u = G({ unitId: t, subUnitId: r, drawingId: o }), d = l.getObject(u);
1106
- if (d == null)
1125
+ const { scene: l } = s, m = G({ unitId: t, subUnitId: r, drawingId: o }), u = l.getObject(m);
1126
+ if (u == null)
1107
1127
  return !0;
1108
- i ? d.show() : d.hide();
1128
+ i ? u.show() : u.hide();
1109
1129
  });
1110
1130
  })
1111
1131
  );
@@ -1115,7 +1135,7 @@ let Me = class extends Ue {
1115
1135
  if (t == null)
1116
1136
  return !1;
1117
1137
  const { transform: o } = t;
1118
- return at(o, e == null ? void 0 : e[r]);
1138
+ return st(o, e == null ? void 0 : e[r]);
1119
1139
  });
1120
1140
  }
1121
1141
  // group?.getObjects().forEach((o) => {
@@ -1129,92 +1149,92 @@ let Me = class extends Ue {
1129
1149
  const e = n.getTransformerByCreate();
1130
1150
  let t = null;
1131
1151
  this.disposeWithMe(
1132
- Ce(
1152
+ _e(
1133
1153
  e.changeStart$.subscribe((r) => {
1134
1154
  const { objects: o } = r, i = Array.from(o.values()), s = [];
1135
1155
  t = i.map((l) => {
1136
- const { left: g, top: u, height: d, width: h, angle: f, oKey: v, groupKey: w, isInGroup: p } = l, E = this._drawingManagerService.getDrawingOKey(v);
1137
- if (p || l instanceof pe) {
1138
- let _ = l.ancestorGroup;
1139
- if (_ == null && l instanceof pe && (_ = l), _ == null)
1156
+ const { left: m, top: u, height: d, width: h, angle: f, oKey: v, isInGroup: w } = l, p = this._drawingManagerService.getDrawingOKey(v);
1157
+ if (w || l instanceof ve) {
1158
+ let S = l.ancestorGroup;
1159
+ if (S == null && l instanceof ve && (S = l), S == null)
1140
1160
  return null;
1141
- const M = this._drawingManagerService.getDrawingOKey(_.oKey);
1142
- if (M) {
1143
- const { unitId: S, subUnitId: R, drawingId: b } = M;
1144
- s.push({ unitId: S, subUnitId: R, drawingId: b });
1145
- const { left: y, top: I, height: P, width: N, angle: B } = _;
1146
- return { left: y, top: I, height: P, width: N, angle: B };
1161
+ const _ = this._drawingManagerService.getDrawingOKey(S.oKey);
1162
+ if (_) {
1163
+ const { unitId: R, subUnitId: b, drawingId: N } = _;
1164
+ s.push({ unitId: R, subUnitId: b, drawingId: N });
1165
+ const { left: I, top: y, height: P, width: M, angle: D } = S;
1166
+ return { left: I, top: y, height: P, width: M, angle: D };
1147
1167
  }
1148
- } else if (E != null) {
1149
- const { unitId: _, subUnitId: M, drawingId: S } = E;
1150
- return s.push({ unitId: _, subUnitId: M, drawingId: S }), { left: g, top: u, height: d, width: h, angle: f };
1168
+ } else if (p != null) {
1169
+ const { unitId: S, subUnitId: _, drawingId: R } = p;
1170
+ return s.push({ unitId: S, subUnitId: _, drawingId: R }), { left: m, top: u, height: d, width: h, angle: f };
1151
1171
  }
1152
1172
  return null;
1153
1173
  }).filter((l) => l != null), s.length > 0 ? this._drawingManagerService.focusDrawing(s) : this._drawingManagerService.focusDrawing(null);
1154
1174
  })
1155
1175
  )
1156
1176
  ), this.disposeWithMe(
1157
- Ce(
1177
+ _e(
1158
1178
  e.changeEnd$.subscribe((r) => {
1159
1179
  const { objects: o } = r;
1160
- this._filterUpdateParams(Ae(o, this._drawingManagerService), t).length > 0;
1180
+ this._filterUpdateParams(Ge(o, this._drawingManagerService), t).length > 0;
1161
1181
  })
1162
1182
  )
1163
1183
  );
1164
1184
  }
1165
1185
  };
1166
- Me = Gn([
1167
- He(Le.Rendered, Me),
1168
- ye(0, Fe),
1169
- ye(1, ce),
1170
- ye(2, ge),
1171
- ye(3, ne)
1172
- ], Me);
1186
+ De = Gn([
1187
+ xe(Ve.Rendered, De),
1188
+ Me(0, Xe),
1189
+ Me(1, ue),
1190
+ Me(2, he),
1191
+ Me(3, ae)
1192
+ ], De);
1173
1193
  const Wn = (a) => {
1174
1194
  const { src: n } = a;
1175
1195
  return n ? /* @__PURE__ */ c.createElement("div", null, /* @__PURE__ */ c.createElement("img", { src: n, alt: "Univer Image Viewer", style: { width: "100%", height: "100%", position: "relative" } })) : null;
1176
- }, wt = "COMPONENT_IMAGE_VIEWER", vt = {
1196
+ }, St = "COMPONENT_IMAGE_VIEWER", bt = {
1177
1197
  id: "sheet.operation.image-reset-size",
1178
- type: we.OPERATION,
1198
+ type: Se.OPERATION,
1179
1199
  handler: (a, n) => !0
1180
1200
  };
1181
1201
  var $n = Object.defineProperty, kn = Object.getOwnPropertyDescriptor, zn = (a, n, e, t) => {
1182
1202
  for (var r = t > 1 ? void 0 : t ? kn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
1183
1203
  (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
1184
1204
  return t && r && $n(n, e, r), r;
1185
- }, fe = (a, n) => (e, t) => n(e, t, a);
1186
- let Oe = class extends Ue {
1205
+ }, we = (a, n) => (e, t) => n(e, t, a);
1206
+ let Te = class extends Ae {
1187
1207
  constructor(a, n, e, t, r) {
1188
1208
  super(), this._injector = a, this._componentManager = n, this._menuService = e, this._commandService = t, this._localeService = r, this._init();
1189
1209
  }
1190
1210
  _initCustomComponents() {
1191
1211
  const a = this._componentManager;
1192
- this.disposeWithMe(a.register(An, Ln)), this.disposeWithMe(a.register(wt, Wn));
1212
+ this.disposeWithMe(a.register(An, Ln)), this.disposeWithMe(a.register(St, Wn));
1193
1213
  }
1194
1214
  _initMenus() {
1195
1215
  }
1196
1216
  _initCommands() {
1197
1217
  [
1198
- ke,
1199
- oe,
1200
- vt,
1201
- Ke,
1202
- je
1218
+ Ze,
1219
+ me,
1220
+ bt,
1221
+ Je,
1222
+ Le
1203
1223
  ].forEach((a) => this.disposeWithMe(this._commandService.registerCommand(a)));
1204
1224
  }
1205
1225
  _init() {
1206
1226
  this._initCommands(), this._initCustomComponents(), this._initMenus();
1207
1227
  }
1208
1228
  };
1209
- Oe = zn([
1210
- He(Le.Rendered, Oe),
1211
- fe(0, se(st)),
1212
- fe(1, se(xt)),
1213
- fe(2, Gt),
1214
- fe(3, ce),
1215
- fe(4, se(Z))
1216
- ], Oe);
1217
- class Ee extends Bt {
1229
+ Te = zn([
1230
+ xe(Ve.Rendered, Te),
1231
+ we(0, ge(mt)),
1232
+ we(1, ge(Vt)),
1233
+ we(2, Gt),
1234
+ we(3, ue),
1235
+ we(4, ge(Y))
1236
+ ], Te);
1237
+ class Oe extends Bt {
1218
1238
  constructor(e, t) {
1219
1239
  t == null && (t = {}), t.transformerConfig = {
1220
1240
  keepRatio: !1,
@@ -1224,11 +1244,11 @@ class Ee extends Bt {
1224
1244
  anchorSize: 24
1225
1245
  };
1226
1246
  super(e, t);
1227
- Q(this, "_srcRect");
1228
- Q(this, "_prstGeom");
1229
- Q(this, "_applyTransform");
1230
- Q(this, "_dragPadding", 8);
1231
- Q(this, "_cacheCanvas");
1247
+ te(this, "_srcRect");
1248
+ te(this, "_prstGeom");
1249
+ te(this, "_applyTransform");
1250
+ te(this, "_dragPadding", 8);
1251
+ te(this, "_cacheCanvas");
1232
1252
  t != null && t.srcRect && (this._srcRect = t.srcRect), t != null && t.prstGeom && (this._prstGeom = t.prstGeom), t != null && t.applyTransform && (this._applyTransform = t.applyTransform), t != null && t.dragPadding && (this._dragPadding = t.dragPadding), this._applyProps();
1233
1253
  }
1234
1254
  refreshSrcRect(e, t) {
@@ -1253,10 +1273,10 @@ class Ee extends Bt {
1253
1273
  return this.visible ? (e.save(), this._draw(e), e.restore(), this.makeDirty(!1), this) : (this.makeDirty(!1), this);
1254
1274
  }
1255
1275
  _draw(e) {
1256
- var l, g;
1276
+ var l, m;
1257
1277
  const r = this.getScene().getEngine(), { width: o, height: i } = r;
1258
1278
  this._initialCacheCanvas(), (l = this._cacheCanvas) == null || l.clear();
1259
- const s = (g = this._cacheCanvas) == null ? void 0 : g.getContext();
1279
+ const s = (m = this._cacheCanvas) == null ? void 0 : m.getContext();
1260
1280
  s != null && (s.save(), jt.drawWith(s, {
1261
1281
  left: 0,
1262
1282
  top: 0,
@@ -1276,7 +1296,7 @@ class Ee extends Bt {
1276
1296
  if (this._applyTransform == null)
1277
1297
  return;
1278
1298
  let e = 0, t = 0, r = 0, o = 0;
1279
- const { left: i = 0, top: s = 0, width: l = 0, height: g = 0, angle: u } = this._applyTransform;
1299
+ const { left: i = 0, top: s = 0, width: l = 0, height: m = 0, angle: u } = this._applyTransform;
1280
1300
  if (this._srcRect != null) {
1281
1301
  const { left: f = 0, top: v = 0, right: w = 0, bottom: p = 0 } = this._srcRect;
1282
1302
  e = f, t = v, r = w, o = p;
@@ -1286,7 +1306,7 @@ class Ee extends Bt {
1286
1306
  left: d,
1287
1307
  top: h,
1288
1308
  width: i + l - r - d,
1289
- height: s + g - o - h,
1309
+ height: s + m - o - h,
1290
1310
  angle: u
1291
1311
  });
1292
1312
  }
@@ -1311,11 +1331,11 @@ var Fn = Object.defineProperty, Kn = Object.getOwnPropertyDescriptor, Zn = (a, n
1311
1331
  for (var r = t > 1 ? void 0 : t ? Kn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
1312
1332
  (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
1313
1333
  return t && r && Fn(n, e, r), r;
1314
- }, me = (a, n) => (e, t) => n(e, t, a);
1315
- let Ne = class extends Ue {
1334
+ }, de = (a, n) => (e, t) => n(e, t, a);
1335
+ let Be = class extends Ae {
1316
1336
  constructor(n, e, t, r, o, i) {
1317
1337
  super();
1318
- Q(this, "_sceneListenerOnImageMap", /* @__PURE__ */ new WeakSet());
1338
+ te(this, "_sceneListenerOnImageMap", /* @__PURE__ */ new WeakSet());
1319
1339
  this._commandService = n, this._drawingManagerService = e, this._renderManagerService = t, this._univerInstanceService = r, this._messageService = o, this._localeService = i, this._init();
1320
1340
  }
1321
1341
  _init() {
@@ -1324,7 +1344,7 @@ let Ne = class extends Ue {
1324
1344
  _initAutoCrop() {
1325
1345
  this.disposeWithMe(
1326
1346
  this._commandService.onCommandExecuted((n) => {
1327
- if (n.id !== je.id)
1347
+ if (n.id !== Le.id)
1328
1348
  return;
1329
1349
  const e = n.params;
1330
1350
  if (e == null)
@@ -1332,82 +1352,82 @@ let Ne = class extends Ue {
1332
1352
  const { cropType: t } = e, r = this._drawingManagerService.getFocusDrawings();
1333
1353
  if (r.length !== 1)
1334
1354
  return;
1335
- const o = r[0], { unitId: i, subUnitId: s, drawingId: l } = o, g = this._renderManagerService.getRenderById(i), u = g == null ? void 0 : g.scene;
1355
+ const o = r[0], { unitId: i, subUnitId: s, drawingId: l } = o, m = this._renderManagerService.getRenderById(i), u = m == null ? void 0 : m.scene;
1336
1356
  if (u == null)
1337
1357
  return !0;
1338
- this._searchCropObject(u) != null && this._commandService.syncExecuteCommand(oe.id, { isAuto: !0 });
1358
+ this._searchCropObject(u) != null && this._commandService.syncExecuteCommand(me.id, { isAuto: !0 });
1339
1359
  const h = G({ unitId: i, subUnitId: s, drawingId: l }), f = u.getObject(h);
1340
- if (!(f instanceof We)) {
1360
+ if (!(f instanceof Fe)) {
1341
1361
  this._messageService.show({
1342
- type: qe.Error,
1362
+ type: tt.Error,
1343
1363
  content: this._localeService.t("image-cropper.error")
1344
1364
  });
1345
1365
  return;
1346
1366
  }
1347
- f != null && (this._updateCropperObject(t, f), this._commandService.executeCommand(ke.id, { unitId: i, subUnitId: s, drawingId: l }));
1367
+ f != null && (this._updateCropperObject(t, f), this._commandService.executeCommand(Ze.id, { unitId: i, subUnitId: s, drawingId: l }));
1348
1368
  })
1349
1369
  );
1350
1370
  }
1351
1371
  _calculateSrcRectByRatio(n, e, t, r, o, i) {
1352
1372
  const s = t / r, l = o / i;
1353
- let g = t, u = r;
1354
- s > l ? g = r * l : u = t / l;
1355
- const d = (t - g) / 2, h = (r - u) / 2;
1373
+ let m = t, u = r;
1374
+ s > l ? m = r * l : u = t / l;
1375
+ const d = (t - m) / 2, h = (r - u) / 2;
1356
1376
  return {
1357
- left: be(d, 1),
1358
- top: be(h, 1),
1359
- right: be(t - (d + g), 1),
1360
- bottom: be(r - (h + u), 1)
1377
+ left: ye(d, 1),
1378
+ top: ye(h, 1),
1379
+ right: ye(t - (d + m), 1),
1380
+ bottom: ye(r - (h + u), 1)
1361
1381
  };
1362
1382
  }
1363
1383
  _updateCropperObject(n, e) {
1364
1384
  const { left: t, top: r, width: o, height: i } = e.calculateTransformWithSrcRect();
1365
1385
  let s;
1366
1386
  switch (n) {
1367
- case j.R1_1:
1387
+ case B.R1_1:
1368
1388
  s = this._calculateSrcRectByRatio(t, r, o, i, 1, 1);
1369
1389
  break;
1370
- case j.R16_9:
1390
+ case B.R16_9:
1371
1391
  s = this._calculateSrcRectByRatio(t, r, o, i, 16, 9);
1372
1392
  break;
1373
- case j.R9_16:
1393
+ case B.R9_16:
1374
1394
  s = this._calculateSrcRectByRatio(t, r, o, i, 9, 16);
1375
1395
  break;
1376
- case j.R5_4:
1396
+ case B.R5_4:
1377
1397
  s = this._calculateSrcRectByRatio(t, r, o, i, 5, 4);
1378
1398
  break;
1379
- case j.R4_5:
1399
+ case B.R4_5:
1380
1400
  s = this._calculateSrcRectByRatio(t, r, o, i, 4, 5);
1381
1401
  break;
1382
- case j.R4_3:
1402
+ case B.R4_3:
1383
1403
  s = this._calculateSrcRectByRatio(t, r, o, i, 4, 3);
1384
1404
  break;
1385
- case j.R3_4:
1405
+ case B.R3_4:
1386
1406
  s = this._calculateSrcRectByRatio(t, r, o, i, 3, 4);
1387
1407
  break;
1388
- case j.R3_2:
1408
+ case B.R3_2:
1389
1409
  s = this._calculateSrcRectByRatio(t, r, o, i, 3, 2);
1390
1410
  break;
1391
- case j.R2_3:
1411
+ case B.R2_3:
1392
1412
  s = this._calculateSrcRectByRatio(t, r, o, i, 2, 3);
1393
1413
  break;
1394
- case j.FREE:
1414
+ case B.FREE:
1395
1415
  }
1396
1416
  if (s == null)
1397
1417
  return;
1398
1418
  e.setSrcRect(s);
1399
- const { left: l = 0, top: g = 0, bottom: u = 0, right: d = 0 } = s;
1419
+ const { left: l = 0, top: m = 0, bottom: u = 0, right: d = 0 } = s;
1400
1420
  e.transformByStateCloseCropper({
1401
1421
  left: t + l,
1402
- top: r + g,
1422
+ top: r + m,
1403
1423
  width: o - d - l,
1404
- height: i - u - g
1424
+ height: i - u - m
1405
1425
  });
1406
1426
  }
1407
1427
  _initOpenCrop() {
1408
1428
  this.disposeWithMe(
1409
1429
  this._commandService.onCommandExecuted((n) => {
1410
- if (n.id !== ke.id)
1430
+ if (n.id !== Ze.id)
1411
1431
  return;
1412
1432
  const e = n.params;
1413
1433
  if (e == null)
@@ -1417,19 +1437,19 @@ let Ne = class extends Ue {
1417
1437
  return !0;
1418
1438
  if (this._sceneListenerOnImageMap.has(s) || (this._addListenerOnImage(s), this._sceneListenerOnImageMap.add(s)), this._drawingManagerService.getDrawingByParam({ unitId: t, subUnitId: r, drawingId: o }) == null)
1419
1439
  return;
1420
- const g = G({ unitId: t, subUnitId: r, drawingId: o }), u = s.getObject(g);
1440
+ const m = G({ unitId: t, subUnitId: r, drawingId: o }), u = s.getObject(m);
1421
1441
  if (u == null)
1422
1442
  return;
1423
- if (!(u instanceof We)) {
1443
+ if (!(u instanceof Fe)) {
1424
1444
  this._messageService.show({
1425
- type: qe.Error,
1445
+ type: tt.Error,
1426
1446
  content: this._localeService.t("image-cropper.error")
1427
1447
  });
1428
1448
  return;
1429
1449
  }
1430
1450
  const d = s.getTransformer();
1431
1451
  d == null || d.clearControls();
1432
- const h = new Ee(`${g}-crop`, {
1452
+ const h = new Oe(`${m}-crop`, {
1433
1453
  srcRect: u.srcRect,
1434
1454
  prstGeom: u.prstGeom,
1435
1455
  applyTransform: u.calculateTransformWithSrcRect()
@@ -1441,13 +1461,13 @@ let Ne = class extends Ue {
1441
1461
  _searchCropObject(n) {
1442
1462
  const e = n.getAllObjects();
1443
1463
  for (const t of e)
1444
- if (t instanceof Ee)
1464
+ if (t instanceof Oe)
1445
1465
  return t;
1446
1466
  }
1447
1467
  _initCloseCrop() {
1448
1468
  this.disposeWithMe(
1449
1469
  this._commandService.onCommandExecuted((e) => {
1450
- if (e.id !== oe.id)
1470
+ if (e.id !== me.id)
1451
1471
  return;
1452
1472
  const t = this._univerInstanceService.getFocusedUnit();
1453
1473
  if (t == null)
@@ -1461,8 +1481,8 @@ let Ne = class extends Ue {
1461
1481
  const l = this._getApplyObjectByCropObject(s);
1462
1482
  if (l == null)
1463
1483
  return;
1464
- const g = i.getTransformerByCreate();
1465
- g.detachFrom(s), g.clearCopperControl();
1484
+ const m = i.getTransformerByCreate();
1485
+ m.detachFrom(s), m.clearCopperControl();
1466
1486
  const u = this._getSrcRectByTransformState(l, s), d = this._drawingManagerService.getDrawingOKey(l.oKey);
1467
1487
  if (d != null) {
1468
1488
  const { left: h, top: f, height: v, width: w } = s;
@@ -1481,12 +1501,12 @@ let Ne = class extends Ue {
1481
1501
  l.setSrcRect({ ...u.srcRectAngle }), l.closeRenderByCropper(), l.makeDirty(!0), s == null || s.dispose();
1482
1502
  })
1483
1503
  );
1484
- const n = this._univerInstanceService.getCurrentTypeOfUnit$(Re.UNIVER_SHEET).pipe(
1504
+ const n = this._univerInstanceService.getCurrentTypeOfUnit$(Ne.UNIVER_SHEET).pipe(
1485
1505
  kt((e) => !!e),
1486
1506
  zt((e) => e.activeSheet$)
1487
1507
  );
1488
1508
  this.disposeWithMe(n.subscribe(() => {
1489
- this._commandService.syncExecuteCommand(oe.id);
1509
+ this._commandService.syncExecuteCommand(me.id);
1490
1510
  }));
1491
1511
  }
1492
1512
  _getApplyObjectByCropObject(n) {
@@ -1499,18 +1519,18 @@ let Ne = class extends Ue {
1499
1519
  this.disposeWithMe(
1500
1520
  e.changeStart$.subscribe((r) => {
1501
1521
  const { objects: o } = r, i = o.values().next().value;
1502
- if (i == null || !(i instanceof Ee))
1522
+ if (i == null || !(i instanceof Oe))
1503
1523
  return;
1504
- const { left: s, top: l, height: g, width: u, angle: d } = i;
1505
- t = { left: s, top: l, height: g, width: u, angle: d }, e.clearCopperControl();
1524
+ const { left: s, top: l, height: m, width: u, angle: d } = i;
1525
+ t = { left: s, top: l, height: m, width: u, angle: d }, e.clearCopperControl();
1506
1526
  })
1507
1527
  ), this.disposeWithMe(
1508
1528
  e.changeEnd$.subscribe((r) => {
1509
1529
  const { objects: o } = r, i = o.values().next().value;
1510
- if (i == null || !(i instanceof Ee))
1530
+ if (i == null || !(i instanceof Oe))
1511
1531
  return;
1512
- const { left: s, top: l, height: g, width: u, angle: d } = i;
1513
- if (!at({ left: s, top: l, height: g, width: u, angle: d }, t))
1532
+ const { left: s, top: l, height: m, width: u, angle: d } = i;
1533
+ if (!st({ left: s, top: l, height: m, width: u, angle: d }, t))
1514
1534
  return;
1515
1535
  const h = this._getApplyObjectByCropObject(i);
1516
1536
  if (h == null)
@@ -1523,11 +1543,11 @@ let Ne = class extends Ue {
1523
1543
  _addHoverForImageCopper(n) {
1524
1544
  this.disposeWithMe(
1525
1545
  n.onPointerEnter$.subscribeEvent(() => {
1526
- n.cursor = Te.MOVE;
1546
+ n.cursor = Ue.MOVE;
1527
1547
  })
1528
1548
  ), this.disposeWithMe(
1529
1549
  n.onPointerLeave$.subscribeEvent(() => {
1530
- n.cursor = Te.DEFAULT;
1550
+ n.cursor = Ue.DEFAULT;
1531
1551
  })
1532
1552
  );
1533
1553
  }
@@ -1535,47 +1555,47 @@ let Ne = class extends Ue {
1535
1555
  const e = n.getTransformerByCreate();
1536
1556
  this.disposeWithMe(
1537
1557
  e.clearControl$.subscribe((t) => {
1538
- t === !0 && this._commandService.syncExecuteCommand(oe.id);
1558
+ t === !0 && this._commandService.syncExecuteCommand(me.id);
1539
1559
  })
1540
1560
  );
1541
1561
  }
1542
1562
  _getSrcRectByTransformState(n, e) {
1543
- const { left: t, top: r, height: o, width: i, strokeWidth: s, angle: l } = e, { left: g, top: u, width: d, height: h, angle: f, strokeWidth: v } = n, w = t - g, p = r - u, E = {
1563
+ const { left: t, top: r, height: o, width: i, strokeWidth: s, angle: l } = e, { left: m, top: u, width: d, height: h, angle: f, strokeWidth: v } = n, w = t - m, p = r - u, S = {
1544
1564
  left: w,
1545
1565
  top: p,
1546
1566
  right: d - w - i,
1547
1567
  bottom: h - p - o
1548
- }, _ = { ...E };
1568
+ }, _ = { ...S };
1549
1569
  if (f !== 0) {
1550
- const M = t + i / 2, S = r + o / 2, R = new xe(M, S), b = d / 2 + g, y = h / 2 + u, I = new xe(b, y), P = new xe(g, u);
1551
- P.rotateByPoint(Je(f), I);
1552
- const N = P.clone();
1553
- N.rotateByPoint(Je(-f), R);
1554
- const B = t - N.x, D = r - N.y;
1555
- _.left = B, _.top = D, _.right = d - B - i, _.bottom = h - D - o;
1570
+ const R = t + i / 2, b = r + o / 2, N = new ke(R, b), I = d / 2 + m, y = h / 2 + u, P = new ke(I, y), M = new ke(m, u);
1571
+ M.rotateByPoint(et(f), P);
1572
+ const D = M.clone();
1573
+ D.rotateByPoint(et(-f), N);
1574
+ const U = t - D.x, T = r - D.y;
1575
+ _.left = U, _.top = T, _.right = d - U - i, _.bottom = h - T - o;
1556
1576
  }
1557
1577
  return {
1558
- srcRect: E,
1578
+ srcRect: S,
1559
1579
  srcRectAngle: _
1560
1580
  };
1561
1581
  }
1562
1582
  };
1563
- Ne = Zn([
1564
- He(Le.Rendered, Ne),
1565
- me(0, ce),
1566
- me(1, ne),
1567
- me(2, ge),
1568
- me(3, Fe),
1569
- me(4, Wt),
1570
- me(5, se(Z))
1571
- ], Ne);
1583
+ Be = Zn([
1584
+ xe(Ve.Rendered, Be),
1585
+ de(0, ue),
1586
+ de(1, ae),
1587
+ de(2, he),
1588
+ de(3, Xe),
1589
+ de(4, Wt),
1590
+ de(5, ge(Y))
1591
+ ], Be);
1572
1592
  var Yn = Object.defineProperty, Xn = Object.getOwnPropertyDescriptor, Jn = (a, n, e, t) => {
1573
1593
  for (var r = t > 1 ? void 0 : t ? Xn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
1574
1594
  (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
1575
1595
  return t && r && Yn(n, e, r), r;
1576
- }, ae = (a, n) => (e, t) => n(e, t, a);
1577
- const et = 50;
1578
- let De = class extends Ue {
1596
+ }, ce = (a, n) => (e, t) => n(e, t, a);
1597
+ const rt = 50;
1598
+ let je = class extends Ae {
1579
1599
  constructor(a, n, e, t, r, o, i) {
1580
1600
  super(), this._commandService = a, this._renderManagerService = n, this._drawingManagerService = e, this._dialogService = t, this._imageIoService = r, this._currentUniverService = o, this._drawingRenderService = i, this._initialize();
1581
1601
  }
@@ -1586,7 +1606,7 @@ let De = class extends Ue {
1586
1606
  this._recoveryImages(), this._drawingAddListener(), this._commandExecutedListener(), this._imageUpdateListener();
1587
1607
  }
1588
1608
  _recoveryImages() {
1589
- const a = this._drawingManagerService.drawingManagerData, n = $e(this._currentUniverService);
1609
+ const a = this._drawingManagerService.drawingManagerData, n = Ke(this._currentUniverService);
1590
1610
  if (n == null)
1591
1611
  return;
1592
1612
  const { unitId: e, subUnitId: t } = n;
@@ -1602,7 +1622,7 @@ let De = class extends Ue {
1602
1622
  _commandExecutedListener() {
1603
1623
  this.disposeWithMe(
1604
1624
  this._commandService.onCommandExecuted((a) => {
1605
- if (a.id === vt.id) {
1625
+ if (a.id === bt.id) {
1606
1626
  const n = a.params;
1607
1627
  if (n == null)
1608
1628
  return;
@@ -1626,13 +1646,13 @@ let De = class extends Ue {
1626
1646
  const { unitId: r, subUnitId: o, drawingId: i } = t, s = this._getSceneAndTransformerByDrawingSearch(r);
1627
1647
  if (s == null)
1628
1648
  return;
1629
- const { scene: l } = s, g = G({ unitId: r, subUnitId: o, drawingId: i }), u = l.getObject(g);
1649
+ const { scene: l } = s, m = G({ unitId: r, subUnitId: o, drawingId: i }), u = l.getObject(m);
1630
1650
  if (u == null)
1631
1651
  return !0;
1632
1652
  const d = this._drawingManagerService.getDrawingByParam(t);
1633
1653
  if (d == null)
1634
1654
  return !0;
1635
- if (d.drawingType !== te.DRAWING_IMAGE)
1655
+ if (d.drawingType !== re.DRAWING_IMAGE)
1636
1656
  return;
1637
1657
  u.resetSize();
1638
1658
  const { width: h, height: f } = u.getNativeSize();
@@ -1660,15 +1680,17 @@ let De = class extends Ue {
1660
1680
  }
1661
1681
  _insertImages(a) {
1662
1682
  a.forEach(async (n) => {
1663
- var g;
1664
- const { unitId: e, subUnitId: t, drawingId: r } = n, o = this._getSceneAndTransformerByDrawingSearch(e), i = (g = $e(this._currentUniverService)) == null ? void 0 : g.subUnitId;
1665
- if (o == null || i !== t)
1683
+ var l;
1684
+ const { unitId: e, subUnitId: t } = n, r = this._getSceneAndTransformerByDrawingSearch(e), o = (l = Ke(this._currentUniverService)) == null ? void 0 : l.subUnitId;
1685
+ if (r == null || o !== t)
1666
1686
  return;
1667
- const s = this._drawingManagerService.getDrawingByParam(n);
1668
- if (s == null)
1687
+ const i = this._drawingManagerService.getDrawingByParam(n);
1688
+ if (i == null)
1669
1689
  return;
1670
- const l = await this._drawingRenderService.renderImage(s, o.scene);
1671
- l != null && (this._addHoverForImage(l), this._addDialogForImage(l));
1690
+ const s = await this._drawingRenderService.renderImages(i, r.scene);
1691
+ if (!(s == null || s.length === 0))
1692
+ for (const m of s)
1693
+ this._addHoverForImage(m), this._addDialogForImage(m);
1672
1694
  });
1673
1695
  }
1674
1696
  _imageUpdateListener() {
@@ -1678,8 +1700,8 @@ let De = class extends Ue {
1678
1700
  const { unitId: e, subUnitId: t, drawingId: r } = n, o = this._drawingManagerService.getDrawingByParam(n);
1679
1701
  if (o == null)
1680
1702
  return;
1681
- const { transform: i, drawingType: s, srcRect: l, prstGeom: g, source: u, imageSourceType: d } = o;
1682
- if (s !== te.DRAWING_IMAGE)
1703
+ const { transform: i, drawingType: s, srcRect: l, prstGeom: m, source: u, imageSourceType: d } = o;
1704
+ if (s !== re.DRAWING_IMAGE)
1683
1705
  return;
1684
1706
  const h = this._getSceneAndTransformerByDrawingSearch(e);
1685
1707
  if (h == null)
@@ -1690,38 +1712,38 @@ let De = class extends Ue {
1690
1712
  const w = G({ unitId: e, subUnitId: t, drawingId: r }), p = f.getObject(w);
1691
1713
  if (p == null)
1692
1714
  return !0;
1693
- p.setSrcRect(l), p.setPrstGeom(g);
1715
+ p.setSrcRect(l), p.setPrstGeom(m);
1694
1716
  });
1695
1717
  })
1696
1718
  );
1697
1719
  }
1698
1720
  _addHoverForImage(a) {
1699
1721
  this.disposeWithMe(
1700
- Ce(
1722
+ _e(
1701
1723
  a.onPointerEnter$.subscribeEvent(() => {
1702
- a.cursor = Te.GRAB;
1724
+ a.cursor = Ue.GRAB;
1703
1725
  })
1704
1726
  )
1705
1727
  ), this.disposeWithMe(
1706
- Ce(
1728
+ _e(
1707
1729
  a.onPointerLeave$.subscribeEvent(() => {
1708
- a.cursor = Te.DEFAULT;
1730
+ a.cursor = Ue.DEFAULT;
1709
1731
  })
1710
1732
  )
1711
1733
  );
1712
1734
  }
1713
1735
  _addDialogForImage(a) {
1714
1736
  this.disposeWithMe(
1715
- Ce(
1737
+ _e(
1716
1738
  a.onDblclick$.subscribeEvent(() => {
1717
1739
  var s;
1718
- const n = `${a.oKey}-viewer-dialog`, e = a.getNativeSize(), t = window.innerWidth - et, r = window.innerHeight - et, o = this._adjustImageSize(e.width, e.height, t, r), i = this._dialogService.open({
1740
+ const n = `${a.oKey}-viewer-dialog`, e = a.getNativeSize(), t = window.innerWidth - rt, r = window.innerHeight - rt, o = this._adjustImageSize(e.width, e.height, t, r), i = this._dialogService.open({
1719
1741
  width: o.width,
1720
1742
  id: n,
1721
1743
  style: { margin: "0", top: "50%", left: "50%", transform: "translate(-50%, -50%)" },
1722
1744
  children: {
1723
1745
  label: {
1724
- name: wt,
1746
+ name: St,
1725
1747
  props: {
1726
1748
  src: (s = a.getNative()) == null ? void 0 : s.src,
1727
1749
  width: o.width,
@@ -1752,24 +1774,24 @@ let De = class extends Ue {
1752
1774
  };
1753
1775
  }
1754
1776
  };
1755
- De = Jn([
1756
- He(Le.Rendered, De),
1757
- ae(0, ce),
1758
- ae(1, ge),
1759
- ae(2, ne),
1760
- ae(3, $t),
1761
- ae(4, rt),
1762
- ae(5, Fe),
1763
- ae(6, se(Be))
1764
- ], De);
1777
+ je = Jn([
1778
+ xe(Ve.Rendered, je),
1779
+ ce(0, ue),
1780
+ ce(1, he),
1781
+ ce(2, ae),
1782
+ ce(3, $t),
1783
+ ce(4, ot),
1784
+ ce(5, Xe),
1785
+ ce(6, ge(He))
1786
+ ], je);
1765
1787
  var qn = Object.defineProperty, Qn = Object.getOwnPropertyDescriptor, er = (a, n, e, t) => {
1766
1788
  for (var r = t > 1 ? void 0 : t ? Qn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
1767
1789
  (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
1768
1790
  return t && r && qn(n, e, r), r;
1769
- }, tt = (a, n) => (e, t) => n(e, t, a);
1791
+ }, at = (a, n) => (e, t) => n(e, t, a);
1770
1792
  const tr = "DRAWING_UI_PLUGIN";
1771
- var Ge;
1772
- let nt = (Ge = class extends Lt {
1793
+ var ze;
1794
+ let it = (ze = class extends Lt {
1773
1795
  constructor(a, n, e) {
1774
1796
  super(), this._injector = n, this._localeService = e;
1775
1797
  }
@@ -1779,30 +1801,30 @@ let nt = (Ge = class extends Lt {
1779
1801
  _initDependencies(a) {
1780
1802
  [
1781
1803
  // services
1782
- [Be],
1804
+ [He],
1783
1805
  // controllers
1784
- [Me],
1785
- [Oe],
1786
- [Ne],
1787
- [De]
1806
+ [De],
1807
+ [Te],
1808
+ [Be],
1809
+ [je]
1788
1810
  ].forEach((e) => a.add(e));
1789
1811
  }
1790
- }, Q(Ge, "pluginName", tr), Ge);
1791
- nt = er([
1792
- tt(1, se(st)),
1793
- tt(2, se(Z))
1794
- ], nt);
1812
+ }, te(ze, "pluginName", tr), ze);
1813
+ it = er([
1814
+ at(1, ge(mt)),
1815
+ at(2, ge(Y))
1816
+ ], it);
1795
1817
  export {
1796
- je as AutoImageCropOperation,
1818
+ Le as AutoImageCropOperation,
1797
1819
  An as COMPONENT_IMAGE_POPUP_MENU,
1798
- oe as CloseImageCropOperation,
1820
+ me as CloseImageCropOperation,
1799
1821
  dr as DrawingCommonPanel,
1800
- Be as DrawingRenderService,
1801
- Ee as ImageCropperObject,
1822
+ He as DrawingRenderService,
1823
+ Oe as ImageCropperObject,
1802
1824
  Ln as ImagePopupMenu,
1803
- vt as ImageResetSizeOperation,
1804
- ke as OpenImageCropOperation,
1805
- Ke as SetDrawingAlignOperation,
1806
- nt as UniverDrawingUIPlugin,
1807
- Ae as getUpdateParams
1825
+ bt as ImageResetSizeOperation,
1826
+ Ze as OpenImageCropOperation,
1827
+ Je as SetDrawingAlignOperation,
1828
+ it as UniverDrawingUIPlugin,
1829
+ Ge as getUpdateParams
1808
1830
  };