@netless/appliance-plugin 1.1.1-hotfix.1 → 1.1.2

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.
@@ -6,13 +6,13 @@ import { Path as ne, Group as jt, Rect as oi, Polyline as se, Ellipse as Gs, Spr
6
6
  import { decompress as qs, compress as Ks } from "lz-string";
7
7
  import Uo from "lineclip";
8
8
  import Xi from "eventemitter2";
9
- import { cloneDeep as It, isEqual as ut, isNumber as tt, isBoolean as Pt, isSet as At, isArray as To, debounce as _s, clone as ii, throttle as zt } from "lodash";
9
+ import { cloneDeep as It, isEqual as ut, isNumber as tt, isBoolean as Pt, isSet as At, isArray as To, debounce as _s, clone as ii, throttle as xt } from "lodash";
10
10
  import Bo from "react-dom";
11
11
  import S, { useContext as vt, useState as ot, useMemo as Z, useEffect as pt, useRef as Se, useCallback as tn } from "react";
12
12
  import Ce from "react-draggable";
13
13
  import { Resizable as en } from "re-resizable";
14
14
  const jy = "/fullWorker.js", Ay = "/subWorker.js";
15
- var it = /* @__PURE__ */ ((a) => (a.selector = "selector", a.clicker = "clicker", a.laserPointer = "laserPointer", a.pencil = "pencil", a.rectangle = "rectangle", a.ellipse = "ellipse", a.shape = "shape", a.eraser = "eraser", a.pencilEraser = "pencilEraser", a.text = "text", a.straight = "straight", a.arrow = "arrow", a.hand = "hand", a.laserPen = "laserPen", a))(it || {}), q = /* @__PURE__ */ ((a) => (a.Normal = "Normal", a.Stroke = "Stroke", a.Dotted = "Dotted", a.LongDotted = "LongDotted", a))(q || {}), Qt = /* @__PURE__ */ ((a) => (a.Triangle = "triangle", a.Rhombus = "rhombus", a.Pentagram = "pentagram", a.SpeechBalloon = "speechBalloon", a.Star = "star", a.Polygon = "polygon", a))(Qt || {}), O = /* @__PURE__ */ ((a) => (a.None = "None", a.ShowFloatBar = "ShowFloatBar", a.ZIndexFloatBar = "ZIndexFloatBar", a.DeleteNode = "DeleteNode", a.CopyNode = "CopyNode", a.ZIndexActive = "ZIndexActive", a.ZIndexNode = "ZIndexNode", a.RotateNode = "RotateNode", a.SetColorNode = "SetColorNode", a.TranslateNode = "TranslateNode", a.ScaleNode = "ScaleNode", a.OriginalEvent = "OriginalEvent", a.CreateScene = "CreateScene", a.ActiveCursor = "ActiveCursor", a.MoveCursor = "MoveCursor", a.CommandEditor = "CommandEditor", a.SetEditorData = "SetEditorData", a.SetFontStyle = "SetFontStyle", a.SetPoint = "SetPoint", a.SetLock = "SetLock", a.SetShapeOpt = "SetShapeOpt", a.CameraChange = "CameraChange", a.ActiveMethod = "ActiveMethod", a))(O || {}), G = /* @__PURE__ */ ((a) => (a.DisplayState = "DisplayState", a.MainEngine = "MainEngine", a.Cursor = "Cursor", a.BindMainView = "BindMainView", a))(G || {}), on = /* @__PURE__ */ ((a) => (a[a.MainView = 0] = "MainView", a[a.Plugin = 1] = "Plugin", a[a.Both = 2] = "Both", a))(on || {}), C = /* @__PURE__ */ ((a) => (a[a.Pencil = 1] = "Pencil", a[a.Eraser = 2] = "Eraser", a[a.PencilEraser = 3] = "PencilEraser", a[a.BitMapEraser = 4] = "BitMapEraser", a[a.Selector = 5] = "Selector", a[a.Clicker = 6] = "Clicker", a[a.Arrow = 7] = "Arrow", a[a.Hand = 8] = "Hand", a[a.LaserPen = 9] = "LaserPen", a[a.Text = 10] = "Text", a[a.Straight = 11] = "Straight", a[a.Rectangle = 12] = "Rectangle", a[a.Ellipse = 13] = "Ellipse", a[a.Star = 14] = "Star", a[a.Triangle = 15] = "Triangle", a[a.Rhombus = 16] = "Rhombus", a[a.Polygon = 17] = "Polygon", a[a.SpeechBalloon = 18] = "SpeechBalloon", a[a.Image = 19] = "Image", a))(C || {}), B = /* @__PURE__ */ ((a) => (a[a.Local = 1] = "Local", a[a.Service = 2] = "Service", a[a.Worker = 3] = "Worker", a))(B || {}), b = /* @__PURE__ */ ((a) => (a[a.Pending = 0] = "Pending", a[a.Start = 1] = "Start", a[a.Doing = 2] = "Doing", a[a.Done = 3] = "Done", a[a.Unwritable = 4] = "Unwritable", a))(b || {}), z = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.Init = 1] = "Init", a[a.UpdateCamera = 2] = "UpdateCamera", a[a.UpdateTools = 3] = "UpdateTools", a[a.CreateWork = 4] = "CreateWork", a[a.DrawWork = 5] = "DrawWork", a[a.FullWork = 6] = "FullWork", a[a.UpdateNode = 7] = "UpdateNode", a[a.RemoveNode = 8] = "RemoveNode", a[a.Clear = 9] = "Clear", a[a.Select = 10] = "Select", a[a.Destroy = 11] = "Destroy", a[a.Snapshot = 12] = "Snapshot", a[a.BoundingBox = 13] = "BoundingBox", a[a.Cursor = 14] = "Cursor", a[a.TextUpdate = 15] = "TextUpdate", a[a.GetTextActive = 16] = "GetTextActive", a[a.TasksQueue = 17] = "TasksQueue", a[a.CursorHover = 18] = "CursorHover", a[a.CursorBlur = 19] = "CursorBlur", a[a.Console = 20] = "Console", a[a.PriorityWorker = 21] = "PriorityWorker", a[a.PriorityMainThreadWorker = 22] = "PriorityMainThreadWorker", a[a.GetImageBitMap = 23] = "GetImageBitMap", a[a.AuthWriter = 24] = "AuthWriter", a[a.AuthReader = 25] = "AuthReader", a[a.AuthClear = 26] = "AuthClear", a[a.AuthPage = 27] = "AuthPage", a))(z || {}), Xt = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.Bg = 1] = "Bg", a[a.ServiceFloat = 2] = "ServiceFloat", a[a.Float = 3] = "Float", a[a.TopFloat = 4] = "TopFloat", a))(Xt || {}), Ge = /* @__PURE__ */ ((a) => (a[a.Cursor = 1] = "Cursor", a[a.TextCreate = 2] = "TextCreate", a))(Ge || {}), me = /* @__PURE__ */ ((a) => (a[a.Top = 1] = "Top", a[a.Bottom = 2] = "Bottom", a))(me || {}), lt = /* @__PURE__ */ ((a) => (a[a.none = 1] = "none", a[a.all = 2] = "all", a[a.both = 3] = "both", a[a.proportional = 4] = "proportional", a))(lt || {}), sn = /* @__PURE__ */ ((a) => (a[a.Pending = 0] = "Pending", a[a.Start = 1] = "Start", a[a.Doing = 2] = "Doing", a[a.Done = 3] = "Done", a[a.Unwritable = 4] = "Unwritable", a))(sn || {}), Ze = /* @__PURE__ */ ((a) => (a[a.inside = 0] = "inside", a[a.outside = 1] = "outside", a[a.intersect = 2] = "intersect", a))(Ze || {});
15
+ var it = /* @__PURE__ */ ((a) => (a.selector = "selector", a.clicker = "clicker", a.laserPointer = "laserPointer", a.pencil = "pencil", a.rectangle = "rectangle", a.ellipse = "ellipse", a.shape = "shape", a.eraser = "eraser", a.pencilEraser = "pencilEraser", a.text = "text", a.straight = "straight", a.arrow = "arrow", a.hand = "hand", a.laserPen = "laserPen", a))(it || {}), q = /* @__PURE__ */ ((a) => (a.Normal = "Normal", a.Stroke = "Stroke", a.Dotted = "Dotted", a.LongDotted = "LongDotted", a))(q || {}), Qt = /* @__PURE__ */ ((a) => (a.Triangle = "triangle", a.Rhombus = "rhombus", a.Pentagram = "pentagram", a.SpeechBalloon = "speechBalloon", a.Star = "star", a.Polygon = "polygon", a))(Qt || {}), O = /* @__PURE__ */ ((a) => (a.None = "None", a.ShowFloatBar = "ShowFloatBar", a.ZIndexFloatBar = "ZIndexFloatBar", a.DeleteNode = "DeleteNode", a.CopyNode = "CopyNode", a.ZIndexActive = "ZIndexActive", a.ZIndexNode = "ZIndexNode", a.RotateNode = "RotateNode", a.SetColorNode = "SetColorNode", a.TranslateNode = "TranslateNode", a.ScaleNode = "ScaleNode", a.OriginalEvent = "OriginalEvent", a.CreateScene = "CreateScene", a.ActiveCursor = "ActiveCursor", a.MoveCursor = "MoveCursor", a.CommandEditor = "CommandEditor", a.SetEditorData = "SetEditorData", a.SetFontStyle = "SetFontStyle", a.SetPoint = "SetPoint", a.SetLock = "SetLock", a.SetShapeOpt = "SetShapeOpt", a.CameraChange = "CameraChange", a.ActiveMethod = "ActiveMethod", a))(O || {}), G = /* @__PURE__ */ ((a) => (a.DisplayState = "DisplayState", a.MainEngine = "MainEngine", a.Cursor = "Cursor", a.BindMainView = "BindMainView", a))(G || {}), on = /* @__PURE__ */ ((a) => (a[a.MainView = 0] = "MainView", a[a.Plugin = 1] = "Plugin", a[a.Both = 2] = "Both", a))(on || {}), C = /* @__PURE__ */ ((a) => (a[a.Pencil = 1] = "Pencil", a[a.Eraser = 2] = "Eraser", a[a.PencilEraser = 3] = "PencilEraser", a[a.BitMapEraser = 4] = "BitMapEraser", a[a.Selector = 5] = "Selector", a[a.Clicker = 6] = "Clicker", a[a.Arrow = 7] = "Arrow", a[a.Hand = 8] = "Hand", a[a.LaserPen = 9] = "LaserPen", a[a.Text = 10] = "Text", a[a.Straight = 11] = "Straight", a[a.Rectangle = 12] = "Rectangle", a[a.Ellipse = 13] = "Ellipse", a[a.Star = 14] = "Star", a[a.Triangle = 15] = "Triangle", a[a.Rhombus = 16] = "Rhombus", a[a.Polygon = 17] = "Polygon", a[a.SpeechBalloon = 18] = "SpeechBalloon", a[a.Image = 19] = "Image", a))(C || {}), B = /* @__PURE__ */ ((a) => (a[a.Local = 1] = "Local", a[a.Service = 2] = "Service", a[a.Worker = 3] = "Worker", a))(B || {}), b = /* @__PURE__ */ ((a) => (a[a.Pending = 0] = "Pending", a[a.Start = 1] = "Start", a[a.Doing = 2] = "Doing", a[a.Done = 3] = "Done", a[a.Unwritable = 4] = "Unwritable", a))(b || {}), x = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.Init = 1] = "Init", a[a.UpdateCamera = 2] = "UpdateCamera", a[a.UpdateTools = 3] = "UpdateTools", a[a.CreateWork = 4] = "CreateWork", a[a.DrawWork = 5] = "DrawWork", a[a.FullWork = 6] = "FullWork", a[a.UpdateNode = 7] = "UpdateNode", a[a.RemoveNode = 8] = "RemoveNode", a[a.Clear = 9] = "Clear", a[a.Select = 10] = "Select", a[a.Destroy = 11] = "Destroy", a[a.Snapshot = 12] = "Snapshot", a[a.BoundingBox = 13] = "BoundingBox", a[a.Cursor = 14] = "Cursor", a[a.TextUpdate = 15] = "TextUpdate", a[a.GetTextActive = 16] = "GetTextActive", a[a.TasksQueue = 17] = "TasksQueue", a[a.CursorHover = 18] = "CursorHover", a[a.CursorBlur = 19] = "CursorBlur", a[a.Console = 20] = "Console", a[a.PriorityWorker = 21] = "PriorityWorker", a[a.PriorityMainThreadWorker = 22] = "PriorityMainThreadWorker", a[a.GetImageBitMap = 23] = "GetImageBitMap", a[a.AuthWriter = 24] = "AuthWriter", a[a.AuthReader = 25] = "AuthReader", a[a.AuthClear = 26] = "AuthClear", a[a.AuthPage = 27] = "AuthPage", a))(x || {}), Xt = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.Bg = 1] = "Bg", a[a.ServiceFloat = 2] = "ServiceFloat", a[a.Float = 3] = "Float", a[a.TopFloat = 4] = "TopFloat", a))(Xt || {}), Ge = /* @__PURE__ */ ((a) => (a[a.Cursor = 1] = "Cursor", a[a.TextCreate = 2] = "TextCreate", a))(Ge || {}), me = /* @__PURE__ */ ((a) => (a[a.Top = 1] = "Top", a[a.Bottom = 2] = "Bottom", a))(me || {}), lt = /* @__PURE__ */ ((a) => (a[a.none = 1] = "none", a[a.all = 2] = "all", a[a.both = 3] = "both", a[a.proportional = 4] = "proportional", a))(lt || {}), sn = /* @__PURE__ */ ((a) => (a[a.Pending = 0] = "Pending", a[a.Start = 1] = "Start", a[a.Doing = 2] = "Doing", a[a.Done = 3] = "Done", a[a.Unwritable = 4] = "Unwritable", a))(sn || {}), Ze = /* @__PURE__ */ ((a) => (a[a.inside = 0] = "inside", a[a.outside = 1] = "outside", a[a.intersect = 2] = "intersect", a))(Ze || {});
16
16
  const nn = {
17
17
  linear: (a) => a,
18
18
  easeInQuad: (a) => a * a,
@@ -520,9 +520,9 @@ var pe = Cn;
520
520
  function kn(a) {
521
521
  return a != null && typeof a == "object";
522
522
  }
523
- var te = kn, xn = pe, zn = te, Ln = "[object Number]";
523
+ var te = kn, zn = pe, xn = te, Ln = "[object Number]";
524
524
  function bn(a) {
525
- return typeof a == "number" || zn(a) && xn(a) == Ln;
525
+ return typeof a == "number" || xn(a) && zn(a) == Ln;
526
526
  }
527
527
  var Pn = bn;
528
528
  const _t = /* @__PURE__ */ ke(Pn);
@@ -563,19 +563,19 @@ function Jn(a, o) {
563
563
  return e < 0 ? (++this.size, t.push([a, o])) : t[e][1] = o, this;
564
564
  }
565
565
  var Xn = Jn, qn = jn, Kn = Bn, _n = Hn, tr = Gn, er = Xn;
566
- function xe(a) {
566
+ function ze(a) {
567
567
  var o = -1, t = a == null ? 0 : a.length;
568
568
  for (this.clear(); ++o < t; ) {
569
569
  var e = a[o];
570
570
  this.set(e[0], e[1]);
571
571
  }
572
572
  }
573
- xe.prototype.clear = qn;
574
- xe.prototype.delete = Kn;
575
- xe.prototype.get = _n;
576
- xe.prototype.has = tr;
577
- xe.prototype.set = er;
578
- var po = xe, or = po;
573
+ ze.prototype.clear = qn;
574
+ ze.prototype.delete = Kn;
575
+ ze.prototype.get = _n;
576
+ ze.prototype.has = tr;
577
+ ze.prototype.set = er;
578
+ var po = ze, or = po;
579
579
  function ir() {
580
580
  this.__data__ = new or(), this.size = 0;
581
581
  }
@@ -625,13 +625,13 @@ function kr(a) {
625
625
  }
626
626
  return "";
627
627
  }
628
- var ts = kr, xr = _i, zr = Tr, Lr = re, br = ts, Pr = /[\\^$.*+?()[\]{}|]/g, Dr = /^\[object .+?Constructor\]$/, jr = Function.prototype, Ar = Object.prototype, Er = jr.toString, Or = Ar.hasOwnProperty, Rr = RegExp(
628
+ var ts = kr, zr = _i, xr = Tr, Lr = re, br = ts, Pr = /[\\^$.*+?()[\]{}|]/g, Dr = /^\[object .+?Constructor\]$/, jr = Function.prototype, Ar = Object.prototype, Er = jr.toString, Or = Ar.hasOwnProperty, Rr = RegExp(
629
629
  "^" + Er.call(Or).replace(Pr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
630
630
  );
631
631
  function Yr(a) {
632
- if (!Lr(a) || zr(a))
632
+ if (!Lr(a) || xr(a))
633
633
  return !1;
634
- var o = xr(a) ? Rr : Dr;
634
+ var o = zr(a) ? Rr : Dr;
635
635
  return o.test(br(a));
636
636
  }
637
637
  var Wr = Yr;
@@ -672,19 +672,19 @@ function pa(a, o) {
672
672
  return this.size += this.has(a) ? 0 : 1, t[a] = ua && o === void 0 ? da : o, this;
673
673
  }
674
674
  var fa = pa, ga = qr, Ma = _r, ya = na, wa = ha, ma = fa;
675
- function ze(a) {
675
+ function xe(a) {
676
676
  var o = -1, t = a == null ? 0 : a.length;
677
677
  for (this.clear(); ++o < t; ) {
678
678
  var e = a[o];
679
679
  this.set(e[0], e[1]);
680
680
  }
681
681
  }
682
- ze.prototype.clear = ga;
683
- ze.prototype.delete = Ma;
684
- ze.prototype.get = ya;
685
- ze.prototype.has = wa;
686
- ze.prototype.set = ma;
687
- var Ia = ze, li = Ia, va = po, Na = Vo;
682
+ xe.prototype.clear = ga;
683
+ xe.prototype.delete = Ma;
684
+ xe.prototype.get = ya;
685
+ xe.prototype.has = wa;
686
+ xe.prototype.set = ma;
687
+ var Ia = xe, li = Ia, va = po, Na = Vo;
688
688
  function Ta() {
689
689
  this.size = 0, this.__data__ = {
690
690
  hash: new li(),
@@ -697,12 +697,12 @@ function Ca(a) {
697
697
  var o = typeof a;
698
698
  return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? a !== "__proto__" : a === null;
699
699
  }
700
- var ka = Ca, xa = ka;
701
- function za(a, o) {
700
+ var ka = Ca, za = ka;
701
+ function xa(a, o) {
702
702
  var t = a.__data__;
703
- return xa(o) ? t[typeof o == "string" ? "string" : "hash"] : t.map;
703
+ return za(o) ? t[typeof o == "string" ? "string" : "hash"] : t.map;
704
704
  }
705
- var go = za, La = go;
705
+ var go = xa, La = go;
706
706
  function ba(a) {
707
707
  var o = La(this, a).delete(a);
708
708
  return this.size -= o ? 1 : 0, o;
@@ -800,11 +800,11 @@ var mc = wc, Ic = pe, vc = te, Nc = "[object Arguments]";
800
800
  function Tc(a) {
801
801
  return vc(a) && Ic(a) == Nc;
802
802
  }
803
- var Sc = Tc, ui = Sc, Cc = te, ns = Object.prototype, kc = ns.hasOwnProperty, xc = ns.propertyIsEnumerable, zc = ui(/* @__PURE__ */ function() {
803
+ var Sc = Tc, ui = Sc, Cc = te, ns = Object.prototype, kc = ns.hasOwnProperty, zc = ns.propertyIsEnumerable, xc = ui(/* @__PURE__ */ function() {
804
804
  return arguments;
805
805
  }()) ? ui : function(a) {
806
- return Cc(a) && kc.call(a, "callee") && !xc.call(a, "callee");
807
- }, Lc = zc, bc = Array.isArray, yo = bc, Xe = { exports: {} };
806
+ return Cc(a) && kc.call(a, "callee") && !zc.call(a, "callee");
807
+ }, Lc = xc, bc = Array.isArray, yo = bc, Xe = { exports: {} };
808
808
  function Pc() {
809
809
  return !1;
810
810
  }
@@ -858,12 +858,12 @@ function kl(a, o) {
858
858
  Nl(l, c))) && r.push(l);
859
859
  return r;
860
860
  }
861
- var cs = kl, xl = Object.prototype;
862
- function zl(a) {
863
- var o = a && a.constructor, t = typeof o == "function" && o.prototype || xl;
861
+ var cs = kl, zl = Object.prototype;
862
+ function xl(a) {
863
+ var o = a && a.constructor, t = typeof o == "function" && o.prototype || zl;
864
864
  return a === t;
865
865
  }
866
- var Go = zl;
866
+ var Go = xl;
867
867
  function Ll(a, o) {
868
868
  return function(t) {
869
869
  return a(o(t));
@@ -954,13 +954,13 @@ var us = wh, mh = yh, Ih = us, vh = Object.prototype, Nh = vh.propertyIsEnumerab
954
954
  function kh(a, o) {
955
955
  return Sh(a, Ch(a), o);
956
956
  }
957
- var xh = kh;
958
- function zh(a, o) {
957
+ var zh = kh;
958
+ function xh(a, o) {
959
959
  for (var t = -1, e = o.length, i = a.length; ++t < e; )
960
960
  a[i + t] = o[t];
961
961
  return a;
962
962
  }
963
- var ds = zh, Lh = ls, bh = Lh(Object.getPrototypeOf, Object), ps = bh, Ph = ds, Dh = ps, jh = Xo, Ah = us, Eh = Object.getOwnPropertySymbols, Oh = Eh ? function(a) {
963
+ var ds = xh, Lh = ls, bh = Lh(Object.getPrototypeOf, Object), ps = bh, Ph = ds, Dh = ps, jh = Xo, Ah = us, Eh = Object.getOwnPropertySymbols, Oh = Eh ? function(a) {
964
964
  for (var o = []; a; )
965
965
  Ph(o, jh(a)), a = Dh(a);
966
966
  return o;
@@ -1005,13 +1005,13 @@ function Tu(a) {
1005
1005
  return o && typeof a[0] == "string" && Nu.call(a, "index") && (t.index = a.index, t.input = a.input), t;
1006
1006
  }
1007
1007
  var Su = Tu, Cu = $t, ku = Cu.Uint8Array, ws = ku, Ii = ws;
1008
- function xu(a) {
1008
+ function zu(a) {
1009
1009
  var o = new a.constructor(a.byteLength);
1010
1010
  return new Ii(o).set(new Ii(a)), o;
1011
1011
  }
1012
- var qo = xu, zu = qo;
1012
+ var qo = zu, xu = qo;
1013
1013
  function Lu(a, o) {
1014
- var t = o ? zu(a.buffer) : a.buffer;
1014
+ var t = o ? xu(a.buffer) : a.buffer;
1015
1015
  return new a.constructor(t, a.byteOffset, a.byteLength);
1016
1016
  }
1017
1017
  var bu = Lu, Pu = /\w*$/;
@@ -1082,14 +1082,14 @@ var wd = yd, md = wo, Id = te, vd = "[object Map]";
1082
1082
  function Nd(a) {
1083
1083
  return Id(a) && md(a) == vd;
1084
1084
  }
1085
- var Td = Nd, Sd = Td, Cd = $o, Ci = Qo, ki = Ci && Ci.isMap, kd = ki ? Cd(ki) : Sd, xd = kd, zd = wo, Ld = te, bd = "[object Set]";
1085
+ var Td = Nd, Sd = Td, Cd = $o, Ci = Qo, ki = Ci && Ci.isMap, kd = ki ? Cd(ki) : Sd, zd = kd, xd = wo, Ld = te, bd = "[object Set]";
1086
1086
  function Pd(a) {
1087
- return Ld(a) && zd(a) == bd;
1087
+ return Ld(a) && xd(a) == bd;
1088
1088
  }
1089
- var Dd = Pd, jd = Dd, Ad = $o, xi = Qo, zi = xi && xi.isSet, Ed = zi ? Ad(zi) : jd, ms = Ed;
1089
+ var Dd = Pd, jd = Dd, Ad = $o, zi = Qo, xi = zi && zi.isSet, Ed = xi ? Ad(xi) : jd, ms = Ed;
1090
1090
  const Ey = /* @__PURE__ */ ke(ms);
1091
- var Od = os, Rd = nc, Yd = ss, Wd = Jl, Ud = dh, Bd = ph, Fd = gh, Vd = xh, Hd = Uh, $d = Ms, Qd = Kh, Gd = wo, Zd = Su, Jd = hd, Xd = wd, qd = yo, Kd = Ho, _d = xd, tp = re, ep = ms, op = Zo, ip = Jo, sp = 1, np = 2, rp = 4, Is = "[object Arguments]", ap = "[object Array]", cp = "[object Boolean]", lp = "[object Date]", hp = "[object Error]", vs = "[object Function]", up = "[object GeneratorFunction]", dp = "[object Map]", pp = "[object Number]", Ns = "[object Object]", fp = "[object RegExp]", gp = "[object Set]", Mp = "[object String]", yp = "[object Symbol]", wp = "[object WeakMap]", mp = "[object ArrayBuffer]", Ip = "[object DataView]", vp = "[object Float32Array]", Np = "[object Float64Array]", Tp = "[object Int8Array]", Sp = "[object Int16Array]", Cp = "[object Int32Array]", kp = "[object Uint8Array]", xp = "[object Uint8ClampedArray]", zp = "[object Uint16Array]", Lp = "[object Uint32Array]", Mt = {};
1092
- Mt[Is] = Mt[ap] = Mt[mp] = Mt[Ip] = Mt[cp] = Mt[lp] = Mt[vp] = Mt[Np] = Mt[Tp] = Mt[Sp] = Mt[Cp] = Mt[dp] = Mt[pp] = Mt[Ns] = Mt[fp] = Mt[gp] = Mt[Mp] = Mt[yp] = Mt[kp] = Mt[xp] = Mt[zp] = Mt[Lp] = !0;
1091
+ var Od = os, Rd = nc, Yd = ss, Wd = Jl, Ud = dh, Bd = ph, Fd = gh, Vd = zh, Hd = Uh, $d = Ms, Qd = Kh, Gd = wo, Zd = Su, Jd = hd, Xd = wd, qd = yo, Kd = Ho, _d = zd, tp = re, ep = ms, op = Zo, ip = Jo, sp = 1, np = 2, rp = 4, Is = "[object Arguments]", ap = "[object Array]", cp = "[object Boolean]", lp = "[object Date]", hp = "[object Error]", vs = "[object Function]", up = "[object GeneratorFunction]", dp = "[object Map]", pp = "[object Number]", Ns = "[object Object]", fp = "[object RegExp]", gp = "[object Set]", Mp = "[object String]", yp = "[object Symbol]", wp = "[object WeakMap]", mp = "[object ArrayBuffer]", Ip = "[object DataView]", vp = "[object Float32Array]", Np = "[object Float64Array]", Tp = "[object Int8Array]", Sp = "[object Int16Array]", Cp = "[object Int32Array]", kp = "[object Uint8Array]", zp = "[object Uint8ClampedArray]", xp = "[object Uint16Array]", Lp = "[object Uint32Array]", Mt = {};
1092
+ Mt[Is] = Mt[ap] = Mt[mp] = Mt[Ip] = Mt[cp] = Mt[lp] = Mt[vp] = Mt[Np] = Mt[Tp] = Mt[Sp] = Mt[Cp] = Mt[dp] = Mt[pp] = Mt[Ns] = Mt[fp] = Mt[gp] = Mt[Mp] = Mt[yp] = Mt[kp] = Mt[zp] = Mt[xp] = Mt[Lp] = !0;
1093
1093
  Mt[hp] = Mt[vs] = Mt[wp] = !1;
1094
1094
  function Je(a, o, t, e, i, s) {
1095
1095
  var n, r = o & sp, c = o & np, l = o & rp;
@@ -1133,7 +1133,7 @@ function Ap(a) {
1133
1133
  return Pp(a, Dp | jp);
1134
1134
  }
1135
1135
  var Ep = Ap;
1136
- const ae = /* @__PURE__ */ ke(Ep), Ts = "1.1.1-hotfix.1", Op = "@netless/appliance-plugin", Ss = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1136
+ const ae = /* @__PURE__ */ ke(Ep), Ts = "1.1.2", Op = "@netless/appliance-plugin", Ss = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1137
1137
  if (typeof window < "u") {
1138
1138
  let a = window.__netlessUA || "";
1139
1139
  a += ` ${Op}@${Ts}_${Ss}`, window.__netlessUA = a;
@@ -1326,10 +1326,10 @@ const Et = class Et {
1326
1326
  const T = [M.op[0], M.op[1]], I = [T[0] - m[0], T[1] - m[1]];
1327
1327
  if (M.centerPos = [M.centerPos[0] + I[0], M.centerPos[1] + I[1]], M.opt.translate = void 0, M.opt.scale = void 0, M.opt.eraserlines)
1328
1328
  for (const N of Object.values(M.opt.eraserlines)) {
1329
- const { op: x, thickness: L } = N;
1329
+ const { op: z, thickness: L } = N;
1330
1330
  N.thickness = L * Math.max(d[0], d[1]);
1331
- for (let D = 0; D < x.length; D++)
1332
- _o(x[D], u, d, c);
1331
+ for (let D = 0; D < z.length; D++)
1332
+ _o(z[D], u, d, c);
1333
1333
  }
1334
1334
  } else if (c)
1335
1335
  if (t.setAttribute("translate", c), M.opt.translate = c, n) {
@@ -1362,8 +1362,8 @@ const Et = class Et {
1362
1362
  for (const T of Object.values(M.opt.eraserlines)) {
1363
1363
  const { op: I } = T;
1364
1364
  for (let N = 0; N < I.length; N++) {
1365
- const x = I[N].map((L, D) => D % 2 ? L + c[1] : L + c[0]);
1366
- T.op[N] = x;
1365
+ const z = I[N].map((L, D) => D % 2 ? L + c[1] : L + c[0]);
1366
+ T.op[N] = z;
1367
1367
  }
1368
1368
  }
1369
1369
  } else if (_t(l)) {
@@ -1407,7 +1407,7 @@ function Ue(a) {
1407
1407
  function Wt(a) {
1408
1408
  return Ks(JSON.stringify(a));
1409
1409
  }
1410
- const xt = Object.keys;
1410
+ const zt = Object.keys;
1411
1411
  class Cs extends R {
1412
1412
  constructor(t) {
1413
1413
  super(t);
@@ -1430,7 +1430,7 @@ class Cs extends R {
1430
1430
  const t = (r = this.workId) == null ? void 0 : r.toString();
1431
1431
  if (this.tmpPoints.length < 2)
1432
1432
  return {
1433
- type: z.None
1433
+ type: x.None
1434
1434
  };
1435
1435
  const e = this.transformDataAll(!0), i = {
1436
1436
  name: t
@@ -1439,7 +1439,7 @@ class Cs extends R {
1439
1439
  const n = this.drawLayer || this.fullLayer;
1440
1440
  return e.length && (s = this.draw({ attrs: i, tasks: e, replaceId: t, layer: n })), {
1441
1441
  rect: s,
1442
- type: z.DrawWork,
1442
+ type: x.DrawWork,
1443
1443
  dataType: B.Local
1444
1444
  };
1445
1445
  }
@@ -1462,7 +1462,7 @@ class Cs extends R {
1462
1462
  if (s)
1463
1463
  return d > 10 && this.tmpPoints.splice(0, d - 10), {
1464
1464
  rect: f,
1465
- type: z.DrawWork,
1465
+ type: x.DrawWork,
1466
1466
  dataType: B.Local
1467
1467
  };
1468
1468
  const v = [];
@@ -1470,7 +1470,7 @@ class Cs extends R {
1470
1470
  v.push(w.x, w.y, this.computRadius(w.z, this.workOptions.thickness));
1471
1471
  }), {
1472
1472
  ...this.baseConsumeResult,
1473
- type: z.DrawWork,
1473
+ type: x.DrawWork,
1474
1474
  dataType: B.Local,
1475
1475
  rect: f,
1476
1476
  op: y ? v : void 0,
@@ -1494,7 +1494,7 @@ class Cs extends R {
1494
1494
  const r = this.fullLayer;
1495
1495
  if (i.length && (n = this.draw({ attrs: s, tasks: i, replaceId: e, layer: r })), this.tmpPoints.length < 2)
1496
1496
  return this.replace(r, e), {
1497
- type: z.RemoveNode,
1497
+ type: x.RemoveNode,
1498
1498
  removeIds: [e],
1499
1499
  rect: n
1500
1500
  };
@@ -1514,7 +1514,7 @@ class Cs extends R {
1514
1514
  }), {
1515
1515
  ...this.baseConsumeResult,
1516
1516
  rect: n,
1517
- type: z.FullWork,
1517
+ type: x.FullWork,
1518
1518
  dataType: B.Local,
1519
1519
  ops: l,
1520
1520
  updateNodeOpt: {
@@ -1571,9 +1571,9 @@ class Cs extends R {
1571
1571
  let M;
1572
1572
  const v = [], w = r.worldPosition, m = r.worldScaling;
1573
1573
  for (let I = 0; I < i.length; I++) {
1574
- const { pos: N, points: x } = i[I], { ps: L, rect: D } = this.computDrawPoints(x);
1574
+ const { pos: N, points: z } = i[I], { ps: L, rect: D } = this.computDrawPoints(z);
1575
1575
  let E;
1576
- const P = x.length === 1;
1576
+ const P = z.length === 1;
1577
1577
  l === q.Stroke || P ? E = oe(L, !0) : E = oe(L, !1);
1578
1578
  const A = {
1579
1579
  pos: N,
@@ -1605,7 +1605,7 @@ class Cs extends R {
1605
1605
  size: [(M.w - 2 * R.SafeBorderPadding) / m[0], (M.h - 2 * R.SafeBorderPadding) / m[1]],
1606
1606
  zIndex: u
1607
1607
  });
1608
- const N = v.map((x) => (x.pos = [x.pos[0] - this.centerPos[0], x.pos[1] - this.centerPos[1]], new ne(x)));
1608
+ const N = v.map((z) => (z.pos = [z.pos[0] - this.centerPos[0], z.pos[1] - this.centerPos[1]], new ne(z)));
1609
1609
  T.append(...N), I && T.seal(), y && this.drawEraserlines({
1610
1610
  group: T,
1611
1611
  eraserlines: y,
@@ -1850,9 +1850,9 @@ class ks extends R {
1850
1850
  consume(t) {
1851
1851
  const { data: e, isSubWorker: i } = t, { workId: s, op: n } = e;
1852
1852
  if ((n == null ? void 0 : n.length) === 0)
1853
- return { type: z.None };
1853
+ return { type: x.None };
1854
1854
  if (this.updateTempPoints(n || []), this.consumeIndex > this.tmpPoints.length - 4)
1855
- return { type: z.None };
1855
+ return { type: x.None };
1856
1856
  const { strokeColor: r, thickness: c, strokeType: l } = this.workOptions, h = gt(this.tmpPoints, c);
1857
1857
  let u = !1;
1858
1858
  const d = this.syncIndex, p = this.tmpPoints.slice(this.consumeIndex);
@@ -1880,7 +1880,7 @@ class ks extends R {
1880
1880
  w: h.w * this.fullLayer.worldScaling[0],
1881
1881
  h: h.h * this.fullLayer.worldScaling[1]
1882
1882
  },
1883
- type: z.DrawWork,
1883
+ type: x.DrawWork,
1884
1884
  dataType: B.Local,
1885
1885
  op: u ? M : void 0,
1886
1886
  index: u ? d * 2 : void 0,
@@ -1926,7 +1926,7 @@ class ks extends R {
1926
1926
  w: e.w * this.fullLayer.worldScaling[0],
1927
1927
  h: e.h * this.fullLayer.worldScaling[1]
1928
1928
  },
1929
- type: z.FullWork,
1929
+ type: x.FullWork,
1930
1930
  dataType: B.Local,
1931
1931
  ops: s,
1932
1932
  index: this.syncIndex * 2,
@@ -2139,13 +2139,13 @@ const Ie = class Ie extends R {
2139
2139
  const { op: e } = t.data;
2140
2140
  if (!e || e.length === 0)
2141
2141
  return {
2142
- type: z.None,
2142
+ type: x.None,
2143
2143
  ...this.baseConsumeResult
2144
2144
  };
2145
2145
  const i = this.tmpPoints.length;
2146
2146
  if (i > 1 && this.isNear([e[0], e[1]], [this.tmpPoints[i - 2], this.tmpPoints[i - 1]]))
2147
2147
  return {
2148
- type: z.None,
2148
+ type: x.None,
2149
2149
  ...this.baseConsumeResult
2150
2150
  };
2151
2151
  i < 3 ? this.tmpPoints.push(e[0], e[1]) : this.tmpPoints.splice(2, 2, e[0], e[1]);
@@ -2154,7 +2154,7 @@ const Ie = class Ie extends R {
2154
2154
  const r = /* @__PURE__ */ new Set();
2155
2155
  if (!this.vNodes)
2156
2156
  return {
2157
- type: z.None,
2157
+ type: x.None,
2158
2158
  ...this.baseConsumeResult
2159
2159
  };
2160
2160
  const c = this.getCanEraserNodeMap(this.vNodes.getCanEraserNodes(this.vNodes.curNodeMap));
@@ -2164,11 +2164,11 @@ const Ie = class Ie extends R {
2164
2164
  n = ft(n, h);
2165
2165
  }
2166
2166
  return n && r.size ? {
2167
- type: z.RemoveNode,
2167
+ type: x.RemoveNode,
2168
2168
  rect: n,
2169
2169
  removeIds: [...r]
2170
2170
  } : {
2171
- type: z.None,
2171
+ type: x.None,
2172
2172
  ...this.baseConsumeResult
2173
2173
  };
2174
2174
  }
@@ -2262,7 +2262,7 @@ function ef(a, o, t, e, i, s) {
2262
2262
  }
2263
2263
  return s.delete(a), s.delete(o), d;
2264
2264
  }
2265
- var xs = ef;
2265
+ var zs = ef;
2266
2266
  function of(a) {
2267
2267
  var o = -1, t = Array(a.size);
2268
2268
  return a.forEach(function(e, i) {
@@ -2276,7 +2276,7 @@ function nf(a) {
2276
2276
  t[++o] = e;
2277
2277
  }), t;
2278
2278
  }
2279
- var rf = nf, Li = ho, bi = ws, af = Fo, cf = xs, lf = sf, hf = rf, uf = 1, df = 2, pf = "[object Boolean]", ff = "[object Date]", gf = "[object Error]", Mf = "[object Map]", yf = "[object Number]", wf = "[object RegExp]", mf = "[object Set]", If = "[object String]", vf = "[object Symbol]", Nf = "[object ArrayBuffer]", Tf = "[object DataView]", Pi = Li ? Li.prototype : void 0, ko = Pi ? Pi.valueOf : void 0;
2279
+ var rf = nf, Li = ho, bi = ws, af = Fo, cf = zs, lf = sf, hf = rf, uf = 1, df = 2, pf = "[object Boolean]", ff = "[object Date]", gf = "[object Error]", Mf = "[object Map]", yf = "[object Number]", wf = "[object RegExp]", mf = "[object Set]", If = "[object String]", vf = "[object Symbol]", Nf = "[object ArrayBuffer]", Tf = "[object DataView]", Pi = Li ? Li.prototype : void 0, ko = Pi ? Pi.valueOf : void 0;
2280
2280
  function Sf(a, o, t, e, i, s, n) {
2281
2281
  switch (t) {
2282
2282
  case Tf:
@@ -2312,14 +2312,14 @@ function Sf(a, o, t, e, i, s, n) {
2312
2312
  }
2313
2313
  return !1;
2314
2314
  }
2315
- var Cf = Sf, Di = Ms, kf = 1, xf = Object.prototype, zf = xf.hasOwnProperty;
2315
+ var Cf = Sf, Di = Ms, kf = 1, zf = Object.prototype, xf = zf.hasOwnProperty;
2316
2316
  function Lf(a, o, t, e, i, s) {
2317
2317
  var n = t & kf, r = Di(a), c = r.length, l = Di(o), h = l.length;
2318
2318
  if (c != h && !n)
2319
2319
  return !1;
2320
2320
  for (var u = c; u--; ) {
2321
2321
  var d = r[u];
2322
- if (!(n ? d in o : zf.call(o, d)))
2322
+ if (!(n ? d in o : xf.call(o, d)))
2323
2323
  return !1;
2324
2324
  }
2325
2325
  var p = s.get(a), f = s.get(o);
@@ -2344,7 +2344,7 @@ function Lf(a, o, t, e, i, s) {
2344
2344
  }
2345
2345
  return s.delete(a), s.delete(o), y;
2346
2346
  }
2347
- var bf = Lf, xo = os, Pf = xs, Df = Cf, jf = bf, ji = wo, Ai = yo, Ei = Ho, Af = as, Ef = 1, Oi = "[object Arguments]", Ri = "[object Array]", Ve = "[object Object]", Of = Object.prototype, Yi = Of.hasOwnProperty;
2347
+ var bf = Lf, zo = os, Pf = zs, Df = Cf, jf = bf, ji = wo, Ai = yo, Ei = Ho, Af = as, Ef = 1, Oi = "[object Arguments]", Ri = "[object Array]", Ve = "[object Object]", Of = Object.prototype, Yi = Of.hasOwnProperty;
2348
2348
  function Rf(a, o, t, e, i, s) {
2349
2349
  var n = Ai(a), r = Ai(o), c = n ? Ri : ji(a), l = r ? Ri : ji(o);
2350
2350
  c = c == Oi ? Ve : c, l = l == Oi ? Ve : l;
@@ -2355,21 +2355,21 @@ function Rf(a, o, t, e, i, s) {
2355
2355
  n = !0, h = !1;
2356
2356
  }
2357
2357
  if (d && !h)
2358
- return s || (s = new xo()), n || Af(a) ? Pf(a, o, t, e, i, s) : Df(a, o, c, t, e, i, s);
2358
+ return s || (s = new zo()), n || Af(a) ? Pf(a, o, t, e, i, s) : Df(a, o, c, t, e, i, s);
2359
2359
  if (!(t & Ef)) {
2360
2360
  var p = h && Yi.call(a, "__wrapped__"), f = u && Yi.call(o, "__wrapped__");
2361
2361
  if (p || f) {
2362
2362
  var y = p ? a.value() : a, M = f ? o.value() : o;
2363
- return s || (s = new xo()), i(y, M, t, e, s);
2363
+ return s || (s = new zo()), i(y, M, t, e, s);
2364
2364
  }
2365
2365
  }
2366
- return d ? (s || (s = new xo()), jf(a, o, t, e, i, s)) : !1;
2366
+ return d ? (s || (s = new zo()), jf(a, o, t, e, i, s)) : !1;
2367
2367
  }
2368
2368
  var Yf = Rf, Wf = Yf, Wi = te;
2369
- function zs(a, o, t, e, i) {
2370
- return a === o ? !0 : a == null || o == null || !Wi(a) && !Wi(o) ? a !== a && o !== o : Wf(a, o, t, e, zs, i);
2369
+ function xs(a, o, t, e, i) {
2370
+ return a === o ? !0 : a == null || o == null || !Wi(a) && !Wi(o) ? a !== a && o !== o : Wf(a, o, t, e, xs, i);
2371
2371
  }
2372
- var Uf = zs, Bf = Uf;
2372
+ var Uf = xs, Bf = Uf;
2373
2373
  function Ff(a, o) {
2374
2374
  return Bf(a, o);
2375
2375
  }
@@ -2496,17 +2496,17 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2496
2496
  const { op: e, workState: i } = t.data;
2497
2497
  let s = this.oldSelectRect;
2498
2498
  if (i === b.Start && (s = this.unSelectedAllIds()), !(e != null && e.length) || !this.vNodes.curNodeMap.size)
2499
- return { type: z.None };
2499
+ return { type: x.None };
2500
2500
  this.updateTempPoints(e);
2501
2501
  const n = this.computSelector();
2502
2502
  if (this.selectIds && Ae(this.selectIds, n.selectIds))
2503
- return { type: z.None };
2503
+ return { type: x.None };
2504
2504
  this.selectIds = n.selectIds;
2505
2505
  const r = n.intersectRect;
2506
2506
  this.getSelecteorInfo(n.subNodeMap), this.draw(F, this.fullLayer, n), this.oldSelectRect = r;
2507
2507
  const c = this.getChildrenPoints();
2508
2508
  return {
2509
- type: z.Select,
2509
+ type: x.Select,
2510
2510
  dataType: B.Local,
2511
2511
  rect: ft(r, s),
2512
2512
  selectIds: n.selectIds,
@@ -2536,7 +2536,7 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2536
2536
  if (!((e = this.selectIds) != null && e.length) && this.tmpPoints[0] && this.selectSingleTool(this.tmpPoints[0].XY, F, !1), (i = this.selectIds) != null && i.length && (t = this.selectedByIds(this.selectIds)), t) {
2537
2537
  const s = this.getChildrenPoints();
2538
2538
  return {
2539
- type: z.Select,
2539
+ type: x.Select,
2540
2540
  dataType: B.Local,
2541
2541
  rect: this.oldSelectRect,
2542
2542
  selectIds: this.selectIds,
@@ -2560,7 +2560,7 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2560
2560
  ...this.baseConsumeResult
2561
2561
  };
2562
2562
  }
2563
- return { type: z.None };
2563
+ return { type: x.None };
2564
2564
  }
2565
2565
  consumeService() {
2566
2566
  }
@@ -2644,7 +2644,7 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2644
2644
  if (d || y || _t(f)) {
2645
2645
  if (p === b.Start && i)
2646
2646
  return s.setTargetAssignKeys(i), {
2647
- type: z.Select,
2647
+ type: x.Select,
2648
2648
  dataType: B.Local,
2649
2649
  selectRect: this.oldSelectRect,
2650
2650
  rect: this.oldSelectRect
@@ -2653,15 +2653,15 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2653
2653
  }
2654
2654
  if (i)
2655
2655
  for (const N of i) {
2656
- const x = s.get(N);
2657
- if (x) {
2658
- const { toolsType: L } = x, D = (l == null ? void 0 : l.getElementsByName(N))[0];
2656
+ const z = s.get(N);
2657
+ if (z) {
2658
+ const { toolsType: L } = z, D = (l == null ? void 0 : l.getElementsByName(N))[0];
2659
2659
  if (D) {
2660
2660
  let E = !1, P = !1;
2661
2661
  const A = { ...e };
2662
2662
  let j;
2663
2663
  if (L) {
2664
- A.thickness && x.opt.thickness && (E = x.opt.thickness !== A.thickness), A.strokeType && ((I = x.opt) != null && I.strokeType) && (P = x.opt.strokeType !== A.strokeType), j = w == null ? void 0 : w.get(N);
2664
+ A.thickness && z.opt.thickness && (E = z.opt.thickness !== A.thickness), A.strokeType && ((I = z.opt) != null && I.strokeType) && (P = z.opt.strokeType !== A.strokeType), j = w == null ? void 0 : w.get(N);
2665
2665
  const K = Jf(L);
2666
2666
  if (K == null || K.updateNodeOpt({
2667
2667
  node: D,
@@ -2669,11 +2669,11 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2669
2669
  vNodes: s,
2670
2670
  willSerializeData: n,
2671
2671
  targetNode: j
2672
- }), x && r && (n && (A.angle || A.translate) || A.originPoint && A.scenePoint && A.scale || A.pointMap && A.pointMap.has(N) || L === C.Text && (A.fontSize || A.translate || A.textInfos && A.textInfos.get(N)) || L === C.Image && (A.angle || A.translate || A.scale) || L === A.toolsType && A.willRefresh || E || P)) {
2672
+ }), z && r && (n && (A.angle || A.translate) || A.originPoint && A.scenePoint && A.scale || A.pointMap && A.pointMap.has(N) || L === C.Text && (A.fontSize || A.translate || A.textInfos && A.textInfos.get(N)) || L === C.Image && (A.angle || A.translate || A.scale) || L === A.toolsType && A.willRefresh || E || P)) {
2673
2673
  const nt = r.createWorkShapeNode({
2674
2674
  workId: N,
2675
2675
  toolsType: L,
2676
- toolsOpt: x.opt
2676
+ toolsOpt: z.opt
2677
2677
  });
2678
2678
  nt == null || nt.setWorkId(N);
2679
2679
  let et;
@@ -2691,16 +2691,16 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2691
2691
  else
2692
2692
  try {
2693
2693
  et = nt == null ? void 0 : nt.consumeService({
2694
- op: x.op,
2694
+ op: z.op,
2695
2695
  isFullWork: !0,
2696
2696
  replaceId: N
2697
2697
  });
2698
2698
  } catch {
2699
2699
  continue;
2700
2700
  }
2701
- et && (x.rect = et);
2701
+ et && (z.rect = et);
2702
2702
  }
2703
- x && (u.set(N, x), h = ft(h, x.rect));
2703
+ z && (u.set(N, z), h = ft(h, z.rect));
2704
2704
  }
2705
2705
  }
2706
2706
  }
@@ -2714,26 +2714,26 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2714
2714
  [m.x + m.w, m.y + m.h],
2715
2715
  [m.x, m.y + m.h]
2716
2716
  ];
2717
- let x;
2717
+ let z;
2718
2718
  switch (M) {
2719
2719
  case "top":
2720
2720
  case "topLeft":
2721
2721
  case "left":
2722
- y[0] > 0 && y[1] > 0 ? x = N[0] : y[0] > 0 ? x = N[3] : y[1] > 0 ? x = N[1] : x = N[2];
2722
+ y[0] > 0 && y[1] > 0 ? z = N[0] : y[0] > 0 ? z = N[3] : y[1] > 0 ? z = N[1] : z = N[2];
2723
2723
  break;
2724
2724
  case "topRight":
2725
- y[0] < 0 && y[1] > 0 ? x = N[1] : y[0] < 0 ? x = N[2] : y[1] > 0 ? x = N[0] : x = N[3];
2725
+ y[0] < 0 && y[1] > 0 ? z = N[1] : y[0] < 0 ? z = N[2] : y[1] > 0 ? z = N[0] : z = N[3];
2726
2726
  break;
2727
2727
  case "right":
2728
2728
  case "bottomRight":
2729
2729
  case "bottom":
2730
- y[0] < 0 && y[1] < 0 ? x = N[2] : y[0] < 0 ? x = N[1] : y[1] < 0 ? x = N[3] : x = N[0];
2730
+ y[0] < 0 && y[1] < 0 ? z = N[2] : y[0] < 0 ? z = N[1] : y[1] < 0 ? z = N[3] : z = N[0];
2731
2731
  break;
2732
2732
  case "bottomLeft":
2733
- y[0] > 0 && y[1] < 0 ? x = N[3] : y[0] > 0 ? x = N[0] : y[1] < 0 ? x = N[2] : x = N[1];
2733
+ y[0] > 0 && y[1] < 0 ? z = N[3] : y[0] > 0 ? z = N[0] : y[1] < 0 ? z = N[2] : z = N[1];
2734
2734
  break;
2735
2735
  }
2736
- const L = x && [d[0] - x[0], d[1] - x[1]] || [0, 0];
2736
+ const L = z && [d[0] - z[0], d[1] - z[1]] || [0, 0];
2737
2737
  if (!Ae(L, [0, 0]))
2738
2738
  return await this.updateSelector({ ...t, updateSelectorOpt: {}, offset: L });
2739
2739
  }
@@ -2744,7 +2744,7 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2744
2744
  });
2745
2745
  const T = ft(this.oldSelectRect, m);
2746
2746
  return this.oldSelectRect = m, {
2747
- type: z.Select,
2747
+ type: x.Select,
2748
2748
  dataType: B.Local,
2749
2749
  selectRect: m,
2750
2750
  renderRect: h,
@@ -2755,7 +2755,7 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2755
2755
  blurSelector() {
2756
2756
  const t = this.unSelectedAllIds();
2757
2757
  return {
2758
- type: z.Select,
2758
+ type: x.Select,
2759
2759
  dataType: B.Local,
2760
2760
  rect: t,
2761
2761
  selectIds: [],
@@ -2813,7 +2813,7 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2813
2813
  const i = (n = this.workId) == null ? void 0 : n.toString(), s = [t[0] * this.fullLayer.worldScaling[0] + this.fullLayer.worldPosition[0], t[1] * this.fullLayer.worldScaling[0] + this.fullLayer.worldPosition[1]];
2814
2814
  if (this.selectSingleTool(s, i, !0), this.oldSelectRect && !Ae(e, this.oldSelectRect))
2815
2815
  return {
2816
- type: z.CursorHover,
2816
+ type: x.CursorHover,
2817
2817
  dataType: B.Local,
2818
2818
  rect: ft(e, this.oldSelectRect),
2819
2819
  selectorColor: this.selectorColor,
@@ -2821,7 +2821,7 @@ const Ae = /* @__PURE__ */ ke(Vf), lo = class lo extends R {
2821
2821
  };
2822
2822
  if ((r = this.selectIds) != null && r.length || (this.oldSelectRect = void 0), e && !this.oldSelectRect)
2823
2823
  return this.cursorBlur(), {
2824
- type: z.CursorHover,
2824
+ type: x.CursorHover,
2825
2825
  dataType: B.Local,
2826
2826
  rect: e,
2827
2827
  selectorColor: this.selectorColor,
@@ -2855,10 +2855,10 @@ class Ls extends R {
2855
2855
  consume(t) {
2856
2856
  const { data: e, isFullWork: i, isSubWorker: s, isMainThread: n } = t, r = this.workId, { op: c } = e, l = c == null ? void 0 : c.length;
2857
2857
  if (!l || l < 2)
2858
- return { type: z.None };
2858
+ return { type: x.None };
2859
2859
  let h;
2860
2860
  if (this.tmpPoints.length === 0 ? (this.tmpPoints = [new U(c[0], c[1])], h = !1) : h = this.updateTempPoints(c), !h)
2861
- return { type: z.None };
2861
+ return { type: x.None };
2862
2862
  let u;
2863
2863
  if (s || n) {
2864
2864
  const p = i ? this.fullLayer : this.drawLayer || this.fullLayer;
@@ -2868,18 +2868,18 @@ class Ls extends R {
2868
2868
  const p = Date.now();
2869
2869
  return p - this.syncTimestamp > this.syncUnitTime ? (this.syncTimestamp = p, {
2870
2870
  ...this.baseConsumeResult,
2871
- type: z.DrawWork,
2871
+ type: x.DrawWork,
2872
2872
  dataType: B.Local,
2873
2873
  op: this.tmpPoints.map((f) => [...f.XY, 0]).flat(1),
2874
2874
  isSync: !0,
2875
2875
  index: 0
2876
- }) : { type: z.None };
2876
+ }) : { type: x.None };
2877
2877
  }
2878
2878
  const d = ft(u, this.oldRect);
2879
2879
  return this.oldRect = u, {
2880
2880
  rect: d,
2881
2881
  ...this.baseConsumeResult,
2882
- type: z.DrawWork,
2882
+ type: x.DrawWork,
2883
2883
  dataType: B.Local
2884
2884
  };
2885
2885
  }
@@ -2888,7 +2888,7 @@ class Ls extends R {
2888
2888
  const t = this.workId;
2889
2889
  if (this.tmpPoints.length < 2)
2890
2890
  return {
2891
- type: z.RemoveNode,
2891
+ type: x.RemoveNode,
2892
2892
  removeIds: [t]
2893
2893
  };
2894
2894
  const e = this.fullLayer, i = this.draw({ workId: t, layer: e });
@@ -2905,7 +2905,7 @@ class Ls extends R {
2905
2905
  }), {
2906
2906
  rect: i,
2907
2907
  ...this.baseConsumeResult,
2908
- type: z.FullWork,
2908
+ type: x.FullWork,
2909
2909
  dataType: B.Local,
2910
2910
  ops: n,
2911
2911
  isSync: !0
@@ -2924,7 +2924,7 @@ class Ls extends R {
2924
2924
  size: [v.w, v.h]
2925
2925
  };
2926
2926
  c && (N.scale = c), l && (N.rotate = l), h && (N.translate = h);
2927
- const x = new jt(N), L = {
2927
+ const z = new jt(N), L = {
2928
2928
  points: m,
2929
2929
  pos: [T[0] - I[0], T[1] - I[1]],
2930
2930
  fillColor: s,
@@ -2932,7 +2932,7 @@ class Ls extends R {
2932
2932
  lineWidth: 0,
2933
2933
  normalize: !1
2934
2934
  }, D = new se(L);
2935
- if (x.append(D), !w && y && M) {
2935
+ if (z.append(D), !w && y && M) {
2936
2936
  const E = {
2937
2937
  points: y,
2938
2938
  pos: [M[0] - I[0], M[1] - I[1]],
@@ -2943,15 +2943,15 @@ class Ls extends R {
2943
2943
  lineWidth: n,
2944
2944
  normalize: !1
2945
2945
  }, P = new se(E);
2946
- x.append(P);
2946
+ z.append(P);
2947
2947
  }
2948
2948
  if (d && this.drawEraserlines({
2949
- group: x,
2949
+ group: z,
2950
2950
  eraserlines: d,
2951
2951
  pos: I,
2952
2952
  layer: i
2953
- }), this.replace(i, e, x), c || l || h) {
2954
- const E = x.getBoundingClientRect();
2953
+ }), this.replace(i, e, z), c || l || h) {
2954
+ const E = z.getBoundingClientRect();
2955
2955
  return {
2956
2956
  x: Math.floor(E.x - R.SafeBorderPadding),
2957
2957
  y: Math.floor(E.y - R.SafeBorderPadding),
@@ -3046,10 +3046,10 @@ class bs extends R {
3046
3046
  consume(t) {
3047
3047
  const { data: e, isFullWork: i, isSubWorker: s, isMainThread: n } = t, r = this.workId, { op: c } = e, l = c == null ? void 0 : c.length;
3048
3048
  if (!l || l < 2)
3049
- return { type: z.None };
3049
+ return { type: x.None };
3050
3050
  let h;
3051
3051
  if (this.tmpPoints.length === 0 ? (this.tmpPoints = [new U(c[0], c[1])], h = !1) : h = this.updateTempPoints(c), !h)
3052
- return { type: z.None };
3052
+ return { type: x.None };
3053
3053
  let u;
3054
3054
  if (s || n) {
3055
3055
  const p = i ? this.fullLayer : this.drawLayer || this.fullLayer;
@@ -3058,18 +3058,18 @@ class bs extends R {
3058
3058
  if (!s) {
3059
3059
  const p = Date.now();
3060
3060
  return p - this.syncTimestamp > this.syncUnitTime ? (this.syncTimestamp = p, {
3061
- type: z.DrawWork,
3061
+ type: x.DrawWork,
3062
3062
  dataType: B.Local,
3063
3063
  ...this.baseConsumeResult,
3064
3064
  op: this.tmpPoints.map((f) => [...f.XY, 0]).flat(1),
3065
3065
  isSync: !0,
3066
3066
  index: 0
3067
- }) : { type: z.None };
3067
+ }) : { type: x.None };
3068
3068
  }
3069
3069
  const d = ft(u, this.oldRect);
3070
3070
  return this.oldRect = u, {
3071
3071
  rect: d,
3072
- type: z.DrawWork,
3072
+ type: x.DrawWork,
3073
3073
  dataType: B.Local,
3074
3074
  ...this.baseConsumeResult
3075
3075
  };
@@ -3079,7 +3079,7 @@ class bs extends R {
3079
3079
  const t = this.workId;
3080
3080
  if (this.tmpPoints.length < 2)
3081
3081
  return {
3082
- type: z.RemoveNode,
3082
+ type: x.RemoveNode,
3083
3083
  removeIds: [t]
3084
3084
  };
3085
3085
  const e = this.fullLayer, i = this.draw({ workId: t, layer: e, isDrawing: !1 });
@@ -3095,7 +3095,7 @@ class bs extends R {
3095
3095
  centerPos: i && R.getCenterPos(i, e)
3096
3096
  }), {
3097
3097
  rect: i,
3098
- type: z.FullWork,
3098
+ type: x.FullWork,
3099
3099
  dataType: B.Local,
3100
3100
  ...this.baseConsumeResult,
3101
3101
  ops: n,
@@ -3146,12 +3146,12 @@ class bs extends R {
3146
3146
  pos: w,
3147
3147
  layer: i
3148
3148
  }), this.replace(i, e, I);
3149
- const x = I.getBoundingClientRect();
3149
+ const z = I.getBoundingClientRect();
3150
3150
  return {
3151
- x: Math.floor(x.x - R.SafeBorderPadding),
3152
- y: Math.floor(x.y - R.SafeBorderPadding),
3153
- w: Math.floor(x.width + R.SafeBorderPadding * 2),
3154
- h: Math.floor(x.height + R.SafeBorderPadding * 2)
3151
+ x: Math.floor(z.x - R.SafeBorderPadding),
3152
+ y: Math.floor(z.y - R.SafeBorderPadding),
3153
+ w: Math.floor(z.width + R.SafeBorderPadding * 2),
3154
+ h: Math.floor(z.height + R.SafeBorderPadding * 2)
3155
3155
  };
3156
3156
  }
3157
3157
  computDrawPoints(t) {
@@ -3238,10 +3238,10 @@ class Ps extends R {
3238
3238
  consume(t) {
3239
3239
  const { data: e, isFullWork: i, isSubWorker: s, isMainThread: n } = t, r = this.workId, { op: c } = e, l = c == null ? void 0 : c.length;
3240
3240
  if (!l || l < 2)
3241
- return { type: z.None };
3241
+ return { type: x.None };
3242
3242
  let h;
3243
3243
  if (this.tmpPoints.length === 0 ? (this.tmpPoints = [new U(c[0], c[1])], h = !1) : h = this.updateTempPoints(c), !h)
3244
- return { type: z.None };
3244
+ return { type: x.None };
3245
3245
  const u = this.transformData();
3246
3246
  let d;
3247
3247
  if (s || n) {
@@ -3251,18 +3251,18 @@ class Ps extends R {
3251
3251
  if (!s) {
3252
3252
  const f = Date.now();
3253
3253
  return f - this.syncTimestamp > this.syncUnitTime ? (this.syncTimestamp = f, {
3254
- type: z.DrawWork,
3254
+ type: x.DrawWork,
3255
3255
  dataType: B.Local,
3256
3256
  op: u.flat(1),
3257
3257
  isSync: !0,
3258
3258
  index: 0,
3259
3259
  ...this.baseConsumeResult
3260
- }) : { type: z.None };
3260
+ }) : { type: x.None };
3261
3261
  }
3262
3262
  const p = ft(d, this.oldRect);
3263
3263
  return this.oldRect = d, {
3264
3264
  rect: p,
3265
- type: z.DrawWork,
3265
+ type: x.DrawWork,
3266
3266
  dataType: B.Local,
3267
3267
  ...this.baseConsumeResult
3268
3268
  };
@@ -3272,7 +3272,7 @@ class Ps extends R {
3272
3272
  const t = this.workId;
3273
3273
  if (this.tmpPoints.length < 2)
3274
3274
  return {
3275
- type: z.RemoveNode,
3275
+ type: x.RemoveNode,
3276
3276
  removeIds: [t]
3277
3277
  };
3278
3278
  const e = this.transformData(), i = this.fullLayer, s = this.draw({ ps: e, workId: t, layer: i, isDrawing: !1 });
@@ -3288,7 +3288,7 @@ class Ps extends R {
3288
3288
  centerPos: s && R.getCenterPos(s, i)
3289
3289
  }), {
3290
3290
  rect: s,
3291
- type: z.FullWork,
3291
+ type: x.FullWork,
3292
3292
  dataType: B.Local,
3293
3293
  ops: r,
3294
3294
  isSync: !0,
@@ -3306,7 +3306,7 @@ class Ps extends R {
3306
3306
  lineJoin: "round",
3307
3307
  lineCap: "round",
3308
3308
  lineDash: y === q.Dotted ? [1, h * 2] : y === q.LongDotted ? [h, h * 2] : void 0
3309
- }, x = {
3309
+ }, z = {
3310
3310
  x: Math.floor(T.x * w[0] + v[0] - R.SafeBorderPadding),
3311
3311
  y: Math.floor(T.y * w[1] + v[1] - R.SafeBorderPadding),
3312
3312
  w: Math.floor(T.w * w[0] + 2 * R.SafeBorderPadding),
@@ -3353,7 +3353,7 @@ class Ps extends R {
3353
3353
  h: Math.floor(E.height + 2 * R.SafeBorderPadding)
3354
3354
  };
3355
3355
  }
3356
- return x;
3356
+ return z;
3357
3357
  }
3358
3358
  updateTempPoints(t) {
3359
3359
  const e = t.slice(-2), i = new U(e[0], e[1]), s = this.tmpPoints[0], { thickness: n } = this.workOptions;
@@ -3411,10 +3411,10 @@ class Ds extends R {
3411
3411
  consume(t) {
3412
3412
  const { data: e, isFullWork: i, isSubWorker: s, isMainThread: n } = t, r = this.workId, { op: c } = e, l = c == null ? void 0 : c.length;
3413
3413
  if (!l || l < 2)
3414
- return { type: z.None };
3414
+ return { type: x.None };
3415
3415
  let h;
3416
3416
  if (this.tmpPoints.length === 0 ? (this.tmpPoints = [new U(c[0], c[1])], h = !1) : h = this.updateTempPoints(c), !h)
3417
- return { type: z.None };
3417
+ return { type: x.None };
3418
3418
  let u;
3419
3419
  if (s || n) {
3420
3420
  const p = i ? this.fullLayer : this.drawLayer || this.fullLayer;
@@ -3423,18 +3423,18 @@ class Ds extends R {
3423
3423
  if (!s) {
3424
3424
  const p = Date.now();
3425
3425
  return p - this.syncTimestamp > this.syncUnitTime ? (this.syncTimestamp = p, {
3426
- type: z.DrawWork,
3426
+ type: x.DrawWork,
3427
3427
  dataType: B.Local,
3428
3428
  op: this.tmpPoints.map((f) => [...f.XY, 0]).flat(1),
3429
3429
  isSync: !0,
3430
3430
  index: 0,
3431
3431
  ...this.baseConsumeResult
3432
- }) : { type: z.None };
3432
+ }) : { type: x.None };
3433
3433
  }
3434
3434
  const d = ft(u, this.oldRect);
3435
3435
  return this.oldRect = u, {
3436
3436
  rect: d,
3437
- type: z.DrawWork,
3437
+ type: x.DrawWork,
3438
3438
  dataType: B.Local,
3439
3439
  ...this.baseConsumeResult
3440
3440
  };
@@ -3444,7 +3444,7 @@ class Ds extends R {
3444
3444
  const t = this.workId;
3445
3445
  if (this.tmpPoints.length < 2)
3446
3446
  return {
3447
- type: z.RemoveNode,
3447
+ type: x.RemoveNode,
3448
3448
  removeIds: [t]
3449
3449
  };
3450
3450
  const e = this.fullLayer, i = this.draw({ workId: t, layer: e, isDrawing: !1 });
@@ -3460,7 +3460,7 @@ class Ds extends R {
3460
3460
  centerPos: i && R.getCenterPos(i, e)
3461
3461
  }), {
3462
3462
  rect: i,
3463
- type: z.FullWork,
3463
+ type: x.FullWork,
3464
3464
  dataType: B.Local,
3465
3465
  ops: n,
3466
3466
  isSync: !0,
@@ -3478,7 +3478,7 @@ class Ds extends R {
3478
3478
  lineJoin: "round",
3479
3479
  lineCap: "round",
3480
3480
  lineDash: M === q.Dotted ? [1, c * 2] : M === q.LongDotted ? [c, c * 2] : void 0
3481
- }, x = {
3481
+ }, z = {
3482
3482
  name: e,
3483
3483
  id: e,
3484
3484
  zIndex: l,
@@ -3486,8 +3486,8 @@ class Ds extends R {
3486
3486
  anchor: [0.5, 0.5],
3487
3487
  size: [m.w, m.h]
3488
3488
  };
3489
- p && (x.scale = p), f && (x.rotate = f), y && (x.translate = y);
3490
- const L = new jt(x);
3489
+ p && (z.scale = p), f && (z.rotate = f), y && (z.translate = y);
3490
+ const L = new jt(z);
3491
3491
  if (s) {
3492
3492
  const P = new ne({
3493
3493
  d: "M-4,0H4M0,-4V4",
@@ -3586,10 +3586,10 @@ class js extends R {
3586
3586
  consume(t) {
3587
3587
  const { data: e, isFullWork: i, isSubWorker: s, isMainThread: n } = t, { op: r } = e, c = this.workId, l = r == null ? void 0 : r.length;
3588
3588
  if (!l || l < 2)
3589
- return { type: z.None };
3589
+ return { type: x.None };
3590
3590
  let h;
3591
3591
  if (this.tmpPoints.length === 0 ? (this.tmpPoints = [new U(r[0], r[1])], h = !1) : h = this.updateTempPoints(r), !h)
3592
- return { type: z.None };
3592
+ return { type: x.None };
3593
3593
  let u;
3594
3594
  if (s || n) {
3595
3595
  const p = i ? this.fullLayer : this.drawLayer || this.fullLayer;
@@ -3598,18 +3598,18 @@ class js extends R {
3598
3598
  if (!s) {
3599
3599
  const p = Date.now();
3600
3600
  return p - this.syncTimestamp > this.syncUnitTime ? (this.syncTimestamp = p, {
3601
- type: z.DrawWork,
3601
+ type: x.DrawWork,
3602
3602
  dataType: B.Local,
3603
3603
  op: this.tmpPoints.map((f) => [...f.XY, 0]).flat(1),
3604
3604
  isSync: !0,
3605
3605
  index: 0,
3606
3606
  ...this.baseConsumeResult
3607
- }) : { type: z.None };
3607
+ }) : { type: x.None };
3608
3608
  }
3609
3609
  const d = ft(u, this.oldRect);
3610
3610
  return this.oldRect = u, {
3611
3611
  rect: d,
3612
- type: z.DrawWork,
3612
+ type: x.DrawWork,
3613
3613
  dataType: B.Local,
3614
3614
  ...this.baseConsumeResult
3615
3615
  };
@@ -3619,7 +3619,7 @@ class js extends R {
3619
3619
  const t = this.workId;
3620
3620
  if (this.tmpPoints.length < 2)
3621
3621
  return {
3622
- type: z.RemoveNode,
3622
+ type: x.RemoveNode,
3623
3623
  removeIds: [t]
3624
3624
  };
3625
3625
  const e = this.fullLayer, i = this.draw({ workId: t, layer: e, isDrawing: !1 });
@@ -3635,7 +3635,7 @@ class js extends R {
3635
3635
  centerPos: i && R.getCenterPos(i, e)
3636
3636
  }), {
3637
3637
  rect: i,
3638
- type: z.FullWork,
3638
+ type: x.FullWork,
3639
3639
  dataType: B.Local,
3640
3640
  ops: n,
3641
3641
  isSync: !0,
@@ -3674,11 +3674,11 @@ class js extends R {
3674
3674
  });
3675
3675
  N.append(D);
3676
3676
  }
3677
- const x = new se({
3677
+ const z = new se({
3678
3678
  ...T,
3679
3679
  pos: [0, 0]
3680
3680
  });
3681
- N.append(x), y && this.drawEraserlines({
3681
+ N.append(z), y && this.drawEraserlines({
3682
3682
  group: N,
3683
3683
  eraserlines: y,
3684
3684
  pos: w,
@@ -3824,13 +3824,13 @@ class As extends R {
3824
3824
  var p;
3825
3825
  const { data: e, isFullWork: i, isSubWorker: s, isMainThread: n } = t, r = (p = e == null ? void 0 : e.workId) == null ? void 0 : p.toString();
3826
3826
  if (!r)
3827
- return { type: z.None };
3827
+ return { type: x.None };
3828
3828
  const { op: c } = e, l = c == null ? void 0 : c.length;
3829
3829
  if (!l || l < 2)
3830
- return { type: z.None };
3830
+ return { type: x.None };
3831
3831
  let h;
3832
3832
  if (this.tmpPoints.length === 0 ? (this.tmpPoints = [new U(c[0], c[1])], h = !1) : h = this.updateTempPoints(c), !h)
3833
- return { type: z.None };
3833
+ return { type: x.None };
3834
3834
  let u;
3835
3835
  if (s || n) {
3836
3836
  const f = i ? this.fullLayer : this.drawLayer || this.fullLayer;
@@ -3839,18 +3839,18 @@ class As extends R {
3839
3839
  if (!s) {
3840
3840
  const f = Date.now();
3841
3841
  return f - this.syncTimestamp > this.syncUnitTime ? (this.syncTimestamp = f, {
3842
- type: z.DrawWork,
3842
+ type: x.DrawWork,
3843
3843
  dataType: B.Local,
3844
3844
  op: this.tmpPoints.map((y) => [...y.XY, 0]).flat(1),
3845
3845
  isSync: !0,
3846
3846
  index: 0,
3847
3847
  ...this.baseConsumeResult
3848
- }) : { type: z.None };
3848
+ }) : { type: x.None };
3849
3849
  }
3850
3850
  const d = ft(u, this.oldRect);
3851
3851
  return this.oldRect = u, {
3852
3852
  rect: d,
3853
- type: z.DrawWork,
3853
+ type: x.DrawWork,
3854
3854
  dataType: B.Local,
3855
3855
  ...this.baseConsumeResult
3856
3856
  };
@@ -3860,7 +3860,7 @@ class As extends R {
3860
3860
  const t = this.workId;
3861
3861
  if (this.tmpPoints.length < 2)
3862
3862
  return {
3863
- type: z.RemoveNode,
3863
+ type: x.RemoveNode,
3864
3864
  removeIds: [t]
3865
3865
  };
3866
3866
  const e = this.fullLayer, i = this.draw({ workId: t, layer: e, isDrawing: !1 });
@@ -3876,7 +3876,7 @@ class As extends R {
3876
3876
  centerPos: i && R.getCenterPos(i, e)
3877
3877
  }), {
3878
3878
  rect: i,
3879
- type: z.FullWork,
3879
+ type: x.FullWork,
3880
3880
  dataType: B.Local,
3881
3881
  ops: n,
3882
3882
  isSync: !0,
@@ -3885,7 +3885,7 @@ class As extends R {
3885
3885
  }
3886
3886
  draw(t) {
3887
3887
  const { workId: e, layer: i } = t, { strokeColor: s, fillColor: n, thickness: r, zIndex: c, placement: l, scale: h, rotate: u, translate: d, strokeType: p, eraserlines: f } = this.workOptions, { rect: y, pos: M, points: v } = this.computDrawPoints(r, l), w = {
3888
- points: v.map((x) => x.XY),
3888
+ points: v.map((z) => z.XY),
3889
3889
  lineWidth: r,
3890
3890
  fillColor: n !== "transparent" && n || void 0,
3891
3891
  strokeColor: s,
@@ -4035,9 +4035,9 @@ class As extends R {
4035
4035
  break;
4036
4036
  }
4037
4037
  }
4038
- const x = gt(this.tmpPoints, t), L = [Math.floor(x.x + x.w / 2), Math.floor(x.y + x.h / 2)];
4038
+ const z = gt(this.tmpPoints, t), L = [Math.floor(z.x + z.w / 2), Math.floor(z.y + z.h / 2)];
4039
4039
  return {
4040
- rect: x,
4040
+ rect: z,
4041
4041
  pos: L,
4042
4042
  points: c
4043
4043
  };
@@ -4101,10 +4101,10 @@ class We extends R {
4101
4101
  this.workOptions = t.toolsOpt, this.scaleType = We.getScaleType(this.workOptions);
4102
4102
  }
4103
4103
  consume() {
4104
- return { type: z.None };
4104
+ return { type: x.None };
4105
4105
  }
4106
4106
  consumeAll() {
4107
- return { type: z.None };
4107
+ return { type: x.None };
4108
4108
  }
4109
4109
  draw(t) {
4110
4110
  const { layer: e, workId: i, replaceId: s, imageBitmap: n } = t, { centerX: r, centerY: c, width: l, height: h, rotate: u, zIndex: d, eraserlines: p } = this.workOptions, f = new jt({
@@ -4183,10 +4183,10 @@ class We extends R {
4183
4183
  const y = e.parent;
4184
4184
  if (y) {
4185
4185
  if (_t(p) && (e.setAttribute("zIndex", p), f.opt.zIndex = p), Ee(d) && (f.opt.locked = d), c && l && h && r) {
4186
- const { centerX: M, centerY: v, width: w, height: m, uniformScale: T } = f.opt, I = T !== !1 ? [h[0], h[0]] : h, N = [M, v], x = [M, v];
4187
- Ko(x, l, I, r);
4188
- const L = [x[0] - N[0], x[1] - N[1]];
4189
- if (f.centerPos = [f.centerPos[0] + L[0], f.centerPos[1] + L[1]], f.opt.width = Math.round(w * I[0]), f.opt.height = Math.round(m * I[1]), f.opt.centerX = x[0], f.opt.centerY = x[1], f.opt.eraserlines)
4186
+ const { centerX: M, centerY: v, width: w, height: m, uniformScale: T } = f.opt, I = T !== !1 ? [h[0], h[0]] : h, N = [M, v], z = [M, v];
4187
+ Ko(z, l, I, r);
4188
+ const L = [z[0] - N[0], z[1] - N[1]];
4189
+ if (f.centerPos = [f.centerPos[0] + L[0], f.centerPos[1] + L[1]], f.opt.width = Math.round(w * I[0]), f.opt.height = Math.round(m * I[1]), f.opt.centerX = z[0], f.opt.centerY = z[1], f.opt.eraserlines)
4190
4190
  for (const D of Object.values(f.opt.eraserlines)) {
4191
4191
  const { op: E, thickness: P } = D;
4192
4192
  D.thickness = P * Math.max(h[0], h[1]);
@@ -4230,10 +4230,10 @@ class Es extends R {
4230
4230
  consume(t) {
4231
4231
  const { data: e, isFullWork: i, isSubWorker: s, isMainThread: n } = t, r = this.workId, { op: c } = e, l = c == null ? void 0 : c.length;
4232
4232
  if (!l || l < 2)
4233
- return { type: z.None };
4233
+ return { type: x.None };
4234
4234
  let h;
4235
4235
  if (this.tmpPoints.length === 0 ? (this.tmpPoints = [new U(c[0], c[1])], h = !1) : h = this.updateTempPoints(c), !h)
4236
- return { type: z.None };
4236
+ return { type: x.None };
4237
4237
  let u;
4238
4238
  if (s || n) {
4239
4239
  const p = i ? this.fullLayer : this.drawLayer || this.fullLayer;
@@ -4242,18 +4242,18 @@ class Es extends R {
4242
4242
  if (!s) {
4243
4243
  const p = Date.now();
4244
4244
  return p - this.syncTimestamp > this.syncUnitTime ? (this.syncTimestamp = p, {
4245
- type: z.DrawWork,
4245
+ type: x.DrawWork,
4246
4246
  dataType: B.Local,
4247
4247
  op: this.tmpPoints.map((f) => [...f.XY, 0]).flat(1),
4248
4248
  isSync: !0,
4249
4249
  index: 0,
4250
4250
  ...this.baseConsumeResult
4251
- }) : { type: z.None };
4251
+ }) : { type: x.None };
4252
4252
  }
4253
4253
  const d = ft(u, this.oldRect);
4254
4254
  return this.oldRect = u, {
4255
4255
  rect: d,
4256
- type: z.DrawWork,
4256
+ type: x.DrawWork,
4257
4257
  dataType: B.Local,
4258
4258
  ...this.baseConsumeResult
4259
4259
  };
@@ -4263,7 +4263,7 @@ class Es extends R {
4263
4263
  const t = this.workId;
4264
4264
  if (this.tmpPoints.length < 2)
4265
4265
  return {
4266
- type: z.RemoveNode,
4266
+ type: x.RemoveNode,
4267
4267
  removeIds: [t]
4268
4268
  };
4269
4269
  const e = this.fullLayer, i = this.draw({ workId: t, layer: e });
@@ -4279,7 +4279,7 @@ class Es extends R {
4279
4279
  centerPos: i && R.getCenterPos(i, e)
4280
4280
  }), {
4281
4281
  rect: i,
4282
- type: z.FullWork,
4282
+ type: x.FullWork,
4283
4283
  dataType: B.Local,
4284
4284
  ops: n,
4285
4285
  isSync: !0,
@@ -4316,12 +4316,12 @@ class Es extends R {
4316
4316
  pos: w,
4317
4317
  layer: i
4318
4318
  }), this.replace(i, e, m), l || c || h) {
4319
- const x = I.getBoundingClientRect();
4319
+ const z = I.getBoundingClientRect();
4320
4320
  return {
4321
- x: Math.floor(x.x - R.SafeBorderPadding),
4322
- y: Math.floor(x.y - R.SafeBorderPadding),
4323
- w: Math.floor(x.width + R.SafeBorderPadding * 2),
4324
- h: Math.floor(x.height + R.SafeBorderPadding * 2)
4321
+ x: Math.floor(z.x - R.SafeBorderPadding),
4322
+ y: Math.floor(z.y - R.SafeBorderPadding),
4323
+ w: Math.floor(z.width + R.SafeBorderPadding * 2),
4324
+ h: Math.floor(z.height + R.SafeBorderPadding * 2)
4325
4325
  };
4326
4326
  }
4327
4327
  return {
@@ -4408,12 +4408,12 @@ const ee = class ee extends R {
4408
4408
  }
4409
4409
  consume() {
4410
4410
  return {
4411
- type: z.None
4411
+ type: x.None
4412
4412
  };
4413
4413
  }
4414
4414
  consumeAll() {
4415
4415
  return {
4416
- type: z.None
4416
+ type: x.None
4417
4417
  };
4418
4418
  }
4419
4419
  consumeService() {
@@ -4507,7 +4507,7 @@ const ee = class ee extends R {
4507
4507
  }
4508
4508
  static async createLabels(t, e, i) {
4509
4509
  var P;
4510
- const s = [], { x: n, y: r } = i, { width: c, height: l } = (P = e.parent) == null ? void 0 : P.parent, h = Ue(t.text), u = h.length, { fontSize: d, lineHeight: p, bold: f, textAlign: y, italic: M, fontFamily: v, verticalAlign: w, fontColor: m, fontBgColor: T, underline: I, lineThrough: N } = t, x = ee.getSafetySnippetRatio(e) || 1, L = Math.floor(d * x), D = ee.getSafetySnippetFontLength(L);
4510
+ const s = [], { x: n, y: r } = i, { width: c, height: l } = (P = e.parent) == null ? void 0 : P.parent, h = Ue(t.text), u = h.length, { fontSize: d, lineHeight: p, bold: f, textAlign: y, italic: M, fontFamily: v, verticalAlign: w, fontColor: m, fontBgColor: T, underline: I, lineThrough: N } = t, z = ee.getSafetySnippetRatio(e) || 1, L = Math.floor(d * z), D = ee.getSafetySnippetFontLength(L);
4511
4511
  let E = 0;
4512
4512
  for (let A = 0; A < u; A++) {
4513
4513
  const j = h[A], K = p || L * 1.5;
@@ -4534,13 +4534,13 @@ const ee = class ee extends R {
4534
4534
  fillColor: m,
4535
4535
  textAlign: y,
4536
4536
  fontStyle: M,
4537
- scale: [1 / x, 1 / x]
4537
+ scale: [1 / z, 1 / z]
4538
4538
  }, Y = new Js(ct), rt = await Y.textImageReady;
4539
4539
  let dt = !0;
4540
4540
  if (rt) {
4541
4541
  const kt = rt.rect && rt.rect[2], ce = rt.rect && rt.rect[3];
4542
4542
  if (kt && ce) {
4543
- const Jt = kt / x, Bt = ce / x;
4543
+ const Jt = kt / z, Bt = ce / z;
4544
4544
  Q = Jt + Q, M === "italic" && (f === "bold" ? Q = Q - $ * d * 1.2 : Q = Q - $ * d), ((_[0] + et[0] + Jt) * e.worldScaling[0] + n <= 0 || (_[0] + et[0]) * e.worldScaling[0] + n >= c || (_[1] + et[1] + Bt) * e.worldScaling[1] + r <= 0 || (_[1] + et[1]) * e.worldScaling[1] + r >= l) && (Y.disconnect(), dt = !1), dt && X.push(Y);
4545
4545
  }
4546
4546
  }
@@ -4601,16 +4601,16 @@ const ee = class ee extends R {
4601
4601
  } = i, T = n && ae(n) || s.get(e.name);
4602
4602
  if (!T || !e.parent) return;
4603
4603
  const N = T.opt;
4604
- if (_t(m) && (e.setAttribute("zIndex", m), T.opt.zIndex = m), c && N.fontColor && (N.fontColor = c, e.children.forEach((x) => {
4605
- x.tagName === "GROUP" && x.children.forEach((L) => {
4604
+ if (_t(m) && (e.setAttribute("zIndex", m), T.opt.zIndex = m), c && N.fontColor && (N.fontColor = c, e.children.forEach((z) => {
4605
+ z.tagName === "GROUP" && z.children.forEach((L) => {
4606
4606
  L.tagName === "LABEL" ? (L.setAttribute("fillColor", c), L.setAttribute("strokeColor", c)) : L.tagName === "POLYLINE" && L.setAttribute("strokeColor", c);
4607
4607
  });
4608
- })), r && N.fontBgColor && (N.fontBgColor = r, e.children.forEach((x) => {
4609
- x.tagName === "GROUP" && x.setAttribute("bgcolor", r);
4608
+ })), r && N.fontBgColor && (N.fontBgColor = r, e.children.forEach((z) => {
4609
+ z.tagName === "GROUP" && z.setAttribute("bgcolor", r);
4610
4610
  })), p && (N.bold = p), f && (N.italic = f), Ee(y) && (N.lineThrough = y), Ee(M) && (N.underline = M), v && (N.fontSize = v), h && u && d && n && N.boxPoint) {
4611
- const x = w == null ? void 0 : w.get(e.name);
4612
- if (x) {
4613
- const { fontSize: P, boxSize: A } = x;
4611
+ const z = w == null ? void 0 : w.get(e.name);
4612
+ if (z) {
4613
+ const { fontSize: P, boxSize: A } = z;
4614
4614
  N.boxSize = A || N.boxSize, N.fontSize = P || N.fontSize;
4615
4615
  }
4616
4616
  const L = [N.boxPoint[0], N.boxPoint[1]];
@@ -4624,11 +4624,11 @@ const ee = class ee extends R {
4624
4624
  _o(A[K], u, d, l);
4625
4625
  }
4626
4626
  } else if (l && N.boxPoint && (N.boxPoint = [N.boxPoint[0] + l[0], N.boxPoint[1] + l[1]], T.centerPos = [T.centerPos[0] + l[0], T.centerPos[1] + l[1]], T.opt.eraserlines))
4627
- for (const x of Object.values(T.opt.eraserlines)) {
4628
- const { op: L } = x;
4627
+ for (const z of Object.values(T.opt.eraserlines)) {
4628
+ const { op: L } = z;
4629
4629
  for (let D = 0; D < L.length; D++) {
4630
4630
  const E = L[D].map((P, A) => A % 2 ? P + l[1] : P + l[0]);
4631
- x.op[D] = E;
4631
+ z.op[D] = E;
4632
4632
  }
4633
4633
  }
4634
4634
  return T && s.setInfo(e.name, T), T == null ? void 0 : T.rect;
@@ -4802,13 +4802,13 @@ const ve = class ve extends R {
4802
4802
  const { op: e } = t.data;
4803
4803
  if (!e || e.length === 0)
4804
4804
  return {
4805
- type: z.None,
4805
+ type: x.None,
4806
4806
  ...this.baseConsumeResult
4807
4807
  };
4808
4808
  const i = this.tmpPoints.length;
4809
4809
  if (i > 1 && this.isNear([e[0], e[1]], [this.tmpPoints[i - 2], this.tmpPoints[i - 1]]))
4810
4810
  return {
4811
- type: z.None,
4811
+ type: x.None,
4812
4812
  ...this.baseConsumeResult
4813
4813
  };
4814
4814
  i < 3 ? this.tmpPoints.push(e[0], e[1]) : this.tmpPoints.splice(2, 2, e[0], e[1]);
@@ -4817,7 +4817,7 @@ const ve = class ve extends R {
4817
4817
  const r = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
4818
4818
  if (!this.vNodes)
4819
4819
  return {
4820
- type: z.None,
4820
+ type: x.None,
4821
4821
  ...this.baseConsumeResult
4822
4822
  };
4823
4823
  this.vNodes.setTarget();
@@ -4831,14 +4831,14 @@ const ve = class ve extends R {
4831
4831
  for (const h of c.keys())
4832
4832
  r.has(h) && c.delete(h);
4833
4833
  return {
4834
- type: z.RemoveNode,
4834
+ type: x.RemoveNode,
4835
4835
  rect: n,
4836
4836
  removeIds: [...r],
4837
4837
  newWorkDatas: c
4838
4838
  };
4839
4839
  }
4840
4840
  return {
4841
- type: z.None,
4841
+ type: x.None,
4842
4842
  ...this.baseConsumeResult
4843
4843
  };
4844
4844
  }
@@ -4999,13 +4999,13 @@ const Re = class Re extends R {
4999
4999
  const { op: e } = t.data;
5000
5000
  if (!e || e.length === 0)
5001
5001
  return {
5002
- type: z.None,
5002
+ type: x.None,
5003
5003
  ...this.baseConsumeResult
5004
5004
  };
5005
5005
  const { thickness: i } = this.workOptions, { width: s, height: n } = Re.eraserSizes[i], r = Math.max(s, n) / this.worldScaling[0], c = this.tmpPoints.length, l = this.tmpPoints[this.tmpPoints.length - 1], h = this.updateTempPoints(e, r), u = this.tmpPoints[this.tmpPoints.length - 1];
5006
5006
  if (c === this.tmpPoints.length && u.equalsXY(l.x, l.y))
5007
5007
  return {
5008
- type: z.None,
5008
+ type: x.None,
5009
5009
  ...this.baseConsumeResult
5010
5010
  };
5011
5011
  this.syncIndex = Math.min(this.syncIndex, h, Math.max(0, this.tmpPoints.length - 2));
@@ -5019,7 +5019,7 @@ const Re = class Re extends R {
5019
5019
  M.push(v.x, v.y, r / 2);
5020
5020
  }), {
5021
5021
  ...this.baseConsumeResult,
5022
- type: z.DrawWork,
5022
+ type: x.DrawWork,
5023
5023
  dataType: B.Local,
5024
5024
  rect: y,
5025
5025
  op: p ? M : void 0,
@@ -5060,13 +5060,13 @@ const Re = class Re extends R {
5060
5060
  u.remove(), u.disconnect();
5061
5061
  }), !this.tmpPoints.length)
5062
5062
  return {
5063
- type: z.None,
5063
+ type: x.None,
5064
5064
  ...this.baseConsumeResult
5065
5065
  };
5066
5066
  const { thickness: i } = this.workOptions, { width: s, height: n } = Re.eraserSizes[i], r = Math.max(s, n) / this.worldScaling[0], c = this.getChangeNodes(r);
5067
5067
  if (!(c != null && c.size))
5068
5068
  return {
5069
- type: z.FullWork,
5069
+ type: x.FullWork,
5070
5070
  ...this.baseConsumeResult,
5071
5071
  rect: e
5072
5072
  };
@@ -5077,7 +5077,7 @@ const Re = class Re extends R {
5077
5077
  const h = Wt(l);
5078
5078
  return {
5079
5079
  ...this.baseConsumeResult,
5080
- type: z.FullWork,
5080
+ type: x.FullWork,
5081
5081
  dataType: B.Local,
5082
5082
  rect: e,
5083
5083
  ops: h,
@@ -5433,7 +5433,7 @@ const Vt = class Vt extends sg {
5433
5433
  this.stateDisposer && this.stateDisposer();
5434
5434
  }
5435
5435
  diffFunByView(t, e) {
5436
- const i = xt(t), s = xt(e), n = {}, r = {}, c = {};
5436
+ const i = zt(t), s = zt(e), n = {}, r = {}, c = {};
5437
5437
  for (const l of s)
5438
5438
  if (!i.includes(l) || t[l] === void 0) {
5439
5439
  n[l] = {
@@ -5458,7 +5458,7 @@ const Vt = class Vt extends sg {
5458
5458
  return { diffData: c, diffScenePath: r, diffView: n };
5459
5459
  }
5460
5460
  diffFunByScenePath(t, e, i) {
5461
- const s = xt(t), n = xt(e), r = {}, c = {};
5461
+ const s = zt(t), n = zt(e), r = {}, c = {};
5462
5462
  for (const l of n)
5463
5463
  if (!s.includes(l) || t[l] === void 0) {
5464
5464
  r[l] = {
@@ -5485,7 +5485,7 @@ const Vt = class Vt extends sg {
5485
5485
  return { diffScenePath: r, diffData: c };
5486
5486
  }
5487
5487
  diffFunByKeys(t, e, i, s) {
5488
- const n = xt(t), r = xt(e), c = {};
5488
+ const n = zt(t), r = zt(e), c = {};
5489
5489
  for (const l of r)
5490
5490
  (!n.includes(l) || t[l] === void 0) && (c[l] = {
5491
5491
  oldValue: void 0,
@@ -5523,11 +5523,11 @@ const Vt = class Vt extends sg {
5523
5523
  const { type: e, workId: i, ops: s, index: n, opt: r, toolsType: c, removeIds: l, updateNodeOpt: h, op: u, selectIds: d, isSync: p, scenePath: f, viewId: y } = t;
5524
5524
  if (y)
5525
5525
  switch (e) {
5526
- case z.Clear:
5526
+ case x.Clear:
5527
5527
  const M = {};
5528
5528
  f && this.storage[y] && this.storage[y][f] ? (delete this.storage[y][f], this.setState(M, { isSync: p, viewId: y, scenePath: f })) : this.storage[y] && (delete this.storage[y], this.setState(M, { isSync: p, viewId: y, scenePath: "" }));
5529
5529
  break;
5530
- case z.CreateWork:
5530
+ case x.CreateWork:
5531
5531
  if (f && i && c && r) {
5532
5532
  const I = this.isLocalId(i.toString()) ? this.transformKey(i) : i;
5533
5533
  this.control.renderControl.isUsePageAuth(y) && this.control.renderControl.addRenderPageElementId({
@@ -5535,45 +5535,45 @@ const Vt = class Vt extends sg {
5535
5535
  scenePath: f,
5536
5536
  elementId: I.toString()
5537
5537
  }), this.updateValue(I.toString(), {
5538
- type: z.CreateWork,
5538
+ type: x.CreateWork,
5539
5539
  workId: i,
5540
5540
  toolsType: c,
5541
5541
  opt: r
5542
5542
  }, { isSync: p, viewId: y, scenePath: f });
5543
5543
  }
5544
5544
  break;
5545
- case z.DrawWork:
5545
+ case x.DrawWork:
5546
5546
  if (f && i && typeof n == "number" && (u != null && u.length)) {
5547
5547
  const I = this.isLocalId(i.toString()) ? this.transformKey(i) : i, N = this.storage[y] && this.storage[y][f] && this.storage[y][f][I] || void 0;
5548
- if (N != null && N.ops || (N == null ? void 0 : N.type) === z.FullWork)
5548
+ if (N != null && N.ops || (N == null ? void 0 : N.type) === x.FullWork)
5549
5549
  return;
5550
- const x = n ? ((N == null ? void 0 : N.op) || []).slice(0, n).concat(u) : u || (N == null ? void 0 : N.op), L = c || (N == null ? void 0 : N.toolsType), D = r || (N == null ? void 0 : N.opt), E = h || (N == null ? void 0 : N.updateNodeOpt);
5551
- i && L && D && x && (this.control.renderControl.isUsePageAuth(y) && this.control.renderControl.addRenderPageElementId({
5550
+ const z = n ? ((N == null ? void 0 : N.op) || []).slice(0, n).concat(u) : u || (N == null ? void 0 : N.op), L = c || (N == null ? void 0 : N.toolsType), D = r || (N == null ? void 0 : N.opt), E = h || (N == null ? void 0 : N.updateNodeOpt);
5551
+ i && L && D && z && (this.control.renderControl.isUsePageAuth(y) && this.control.renderControl.addRenderPageElementId({
5552
5552
  viewId: y,
5553
5553
  scenePath: f,
5554
5554
  elementId: I.toString()
5555
5555
  }), this.updateValue(I.toString(), {
5556
5556
  ...N,
5557
- type: z.DrawWork,
5557
+ type: x.DrawWork,
5558
5558
  workId: i,
5559
5559
  updateNodeOpt: E,
5560
5560
  toolsType: L,
5561
5561
  opt: D,
5562
- op: x,
5562
+ op: z,
5563
5563
  index: n
5564
5564
  }, { isSync: p, viewId: y, scenePath: f }));
5565
5565
  }
5566
5566
  break;
5567
- case z.FullWork:
5567
+ case x.FullWork:
5568
5568
  if (f && i) {
5569
- const I = this.isLocalId(i.toString()) ? this.transformKey(i) : i, N = this.storage[y] && this.storage[y][f] && this.storage[y][f][I] || void 0, x = h || (N == null ? void 0 : N.updateNodeOpt), L = c || (N == null ? void 0 : N.toolsType), D = r || (N == null ? void 0 : N.opt), E = s || (N == null ? void 0 : N.ops);
5569
+ const I = this.isLocalId(i.toString()) ? this.transformKey(i) : i, N = this.storage[y] && this.storage[y][f] && this.storage[y][f][I] || void 0, z = h || (N == null ? void 0 : N.updateNodeOpt), L = c || (N == null ? void 0 : N.toolsType), D = r || (N == null ? void 0 : N.opt), E = s || (N == null ? void 0 : N.ops);
5570
5570
  L && D && (this.control.renderControl.isUsePageAuth(y) && this.control.renderControl.addRenderPageElementId({
5571
5571
  viewId: y,
5572
5572
  scenePath: f,
5573
5573
  elementId: I.toString()
5574
5574
  }), this.updateValue(I.toString(), {
5575
- type: z.FullWork,
5576
- updateNodeOpt: x,
5575
+ type: x.FullWork,
5576
+ updateNodeOpt: z,
5577
5577
  workId: I,
5578
5578
  toolsType: L,
5579
5579
  opt: D,
@@ -5581,7 +5581,7 @@ const Vt = class Vt extends sg {
5581
5581
  }, { isSync: p, viewId: y, scenePath: f }));
5582
5582
  }
5583
5583
  break;
5584
- case z.RemoveNode:
5584
+ case x.RemoveNode:
5585
5585
  if (f && (l != null && l.length)) {
5586
5586
  const I = l.map((N) => this.isLocalId(N + "") ? this.transformKey(N) : N);
5587
5587
  this.storage[y] && this.storage[y][f] && Object.keys(this.storage[y][f]).map((N) => {
@@ -5593,20 +5593,20 @@ const Vt = class Vt extends sg {
5593
5593
  });
5594
5594
  }
5595
5595
  break;
5596
- case z.UpdateNode:
5596
+ case x.UpdateNode:
5597
5597
  if (f && i && (h || s || r)) {
5598
5598
  const I = this.isLocalId(i.toString()) ? this.transformKey(i) : i, N = this.storage[y] && this.storage[y][f] && this.storage[y][f][I] || void 0;
5599
- N && (N.updateNodeOpt = h, (s || u) && (N.ops = s, N.op = u), r && (N.opt = r), N.type = z.FullWork, this.updateValue(I.toString(), N, { isSync: p, viewId: y, scenePath: f }));
5599
+ N && (N.updateNodeOpt = h, (s || u) && (N.ops = s, N.op = u), r && (N.opt = r), N.type = x.FullWork, this.updateValue(I.toString(), N, { isSync: p, viewId: y, scenePath: f }));
5600
5600
  }
5601
5601
  break;
5602
- case z.Select:
5602
+ case x.Select:
5603
5603
  if (!f)
5604
5604
  return;
5605
5605
  let v;
5606
5606
  d != null && d.length && (v = d.map((I) => this.isLocalId(I + "") ? this.transformKey(I) : I));
5607
5607
  const w = this.transformKey(F), m = this.storage[y] && this.storage[y][f] && this.storage[y][f][w] || void 0, T = r || (m == null ? void 0 : m.opt);
5608
5608
  v && this.checkOtherSelector(w, v, { isSync: p, viewId: y, scenePath: f }), this.updateValue(w, v && {
5609
- type: z.Select,
5609
+ type: x.Select,
5610
5610
  toolsType: C.Selector,
5611
5611
  opt: T,
5612
5612
  selectIds: v
@@ -5626,7 +5626,7 @@ const Vt = class Vt extends sg {
5626
5626
  }
5627
5627
  }
5628
5628
  setState(t, e) {
5629
- const { viewId: i, scenePath: s } = e, n = xt(t);
5629
+ const { viewId: i, scenePath: s } = e, n = zt(t);
5630
5630
  for (let r = 0; r < n.length; r++) {
5631
5631
  const c = n[r], l = t[c];
5632
5632
  typeof l < "u" ? (this.storage[i] || (this.storage[i] = {}), this.storage[i][s] || (this.storage[i][s] = {}), this.storage[i][s][c] = l) : delete this.storage[i][s][c];
@@ -5645,7 +5645,7 @@ const Vt = class Vt extends sg {
5645
5645
  }, t != null && t.isSync ? 0 : Vt.syncInterval));
5646
5646
  }
5647
5647
  syncSerivice(t = !1) {
5648
- const e = xt(this.serviceStorage), i = xt(this.storage), s = /* @__PURE__ */ new Map();
5648
+ const e = zt(this.serviceStorage), i = zt(this.storage), s = /* @__PURE__ */ new Map();
5649
5649
  for (const n of e) {
5650
5650
  if (!i.includes(n)) {
5651
5651
  s.set(n, void 0);
@@ -5662,7 +5662,7 @@ const Vt = class Vt extends sg {
5662
5662
  this.syncUpdataView(n, r, t);
5663
5663
  }
5664
5664
  syncViewData(t, e = !1) {
5665
- const i = xt(this.serviceStorage[t]), s = xt(this.storage[t]), n = /* @__PURE__ */ new Map();
5665
+ const i = zt(this.serviceStorage[t]), s = zt(this.storage[t]), n = /* @__PURE__ */ new Map();
5666
5666
  for (const r of i) {
5667
5667
  if (!s.includes(r)) {
5668
5668
  n.set(r, void 0);
@@ -5679,7 +5679,7 @@ const Vt = class Vt extends sg {
5679
5679
  this.syncUpdataScenePath(t, r, c, e);
5680
5680
  }
5681
5681
  syncScenePathData(t, e, i = !1) {
5682
- const s = xt(this.serviceStorage[t][e]), n = xt(this.storage[t][e]), r = /* @__PURE__ */ new Map();
5682
+ const s = zt(this.serviceStorage[t][e]), n = zt(this.storage[t][e]), r = /* @__PURE__ */ new Map();
5683
5683
  for (const c of s) {
5684
5684
  if (!n.includes(c)) {
5685
5685
  r.set(c, void 0);
@@ -5734,7 +5734,7 @@ const Vt = class Vt extends sg {
5734
5734
  dispatchAuth(t, e = !0) {
5735
5735
  const { type: i, viewId: s, renderData: n, pageData: r } = t;
5736
5736
  switch (i) {
5737
- case z.AuthReader: {
5737
+ case x.AuthReader: {
5738
5738
  if (s)
5739
5739
  if (n && (n.render || n.hide || n.clear)) {
5740
5740
  const c = this.authStorage.renderAuth || {};
@@ -5745,7 +5745,7 @@ const Vt = class Vt extends sg {
5745
5745
  }
5746
5746
  break;
5747
5747
  }
5748
- case z.AuthPage: {
5748
+ case x.AuthPage: {
5749
5749
  if (s)
5750
5750
  if (r) {
5751
5751
  const c = this.authStorage.pageAuth || {};
@@ -5769,7 +5769,7 @@ const Vt = class Vt extends sg {
5769
5769
  this.authDisposer && this.authDisposer();
5770
5770
  }
5771
5771
  diffAuthFun(t, e) {
5772
- const i = xt(t), s = xt(e), n = {};
5772
+ const i = zt(t), s = zt(e), n = {};
5773
5773
  for (const r of s)
5774
5774
  if (!i.includes(r) || t[r] === void 0) {
5775
5775
  n[r] = {
@@ -5795,7 +5795,7 @@ const Vt = class Vt extends sg {
5795
5795
  return n;
5796
5796
  }
5797
5797
  diffAuthPageFun(t, e) {
5798
- const i = xt(t), s = xt(e), n = {};
5798
+ const i = zt(t), s = zt(e), n = {};
5799
5799
  for (const r of s)
5800
5800
  if (!i.includes(r) || t[r] === void 0) {
5801
5801
  n[r] = {
@@ -5941,13 +5941,13 @@ class rg {
5941
5941
  const u = ((p = this.collector) == null ? void 0 : p.isLocalId(o)) ? (f = this.collector) == null ? void 0 : f.transformKey(o) : o, d = ((y = this.collector) == null ? void 0 : y.storage[e]) && this.collector.storage[e][i] && this.collector.storage[e][i][u] || void 0;
5942
5942
  d ? d.toolsType === C.Text && (n && (this.control.worker.queryTaskBatchData({
5943
5943
  workId: o,
5944
- msgType: z.UpdateNode
5944
+ msgType: x.UpdateNode
5945
5945
  }).forEach((I) => {
5946
5946
  var N;
5947
5947
  (N = this.control.worker) == null || N.taskBatchData.delete(I);
5948
5948
  }), (m = this.control.worker) == null || m.taskBatchData.add({
5949
5949
  workId: o,
5950
- msgType: z.UpdateNode,
5950
+ msgType: x.UpdateNode,
5951
5951
  dataType: l || B.Local,
5952
5952
  toolsType: C.Text,
5953
5953
  opt: c,
@@ -5958,7 +5958,7 @@ class rg {
5958
5958
  }), (T = this.control.worker) == null || T.runAnimation()), s && de(() => {
5959
5959
  var I;
5960
5960
  (I = this.collector) == null || I.dispatch({
5961
- type: z.UpdateNode,
5961
+ type: x.UpdateNode,
5962
5962
  workId: o,
5963
5963
  toolsType: C.Text,
5964
5964
  opt: c,
@@ -5966,7 +5966,7 @@ class rg {
5966
5966
  scenePath: i
5967
5967
  });
5968
5968
  }, this.control.worker.maxLastSyncTime)) : r === Zt.Text && (s && ((M = this.collector) == null || M.dispatch({
5969
- type: c.text && z.FullWork || z.CreateWork,
5969
+ type: c.text && x.FullWork || x.CreateWork,
5970
5970
  workId: o,
5971
5971
  toolsType: C.Text,
5972
5972
  opt: c,
@@ -5975,7 +5975,7 @@ class rg {
5975
5975
  scenePath: i
5976
5976
  })), n && ((v = this.control.worker) == null || v.taskBatchData.add({
5977
5977
  workId: o,
5978
- msgType: c.text && z.FullWork || z.CreateWork,
5978
+ msgType: c.text && x.FullWork || x.CreateWork,
5979
5979
  dataType: l || B.Local,
5980
5980
  toolsType: C.Text,
5981
5981
  opt: c,
@@ -5997,7 +5997,7 @@ class rg {
5997
5997
  n && ((r = this.control.worker) == null || r.taskBatchData.add({
5998
5998
  workId: o,
5999
5999
  toolsType: C.Text,
6000
- msgType: z.RemoveNode,
6000
+ msgType: x.RemoveNode,
6001
6001
  dataType: B.Local,
6002
6002
  viewId: e,
6003
6003
  scenePath: i,
@@ -6005,7 +6005,7 @@ class rg {
6005
6005
  }), (c = this.control.worker) == null || c.runAnimation()), s && de(() => {
6006
6006
  var l;
6007
6007
  (l = this.collector) == null || l.dispatch({
6008
- type: z.RemoveNode,
6008
+ type: x.RemoveNode,
6009
6009
  removeIds: [o],
6010
6010
  toolsType: C.Text,
6011
6011
  viewId: e,
@@ -6022,7 +6022,7 @@ class rg {
6022
6022
  var s, n, r, c;
6023
6023
  const e = (s = this.control.viewContainerManager) == null ? void 0 : s.transformToScenePoint(o, t), i = (n = this.control.viewContainerManager) == null ? void 0 : n.getCurScenePath(t);
6024
6024
  t && i && ((r = this.control.worker) == null || r.taskBatchData.add({
6025
- msgType: z.GetTextActive,
6025
+ msgType: x.GetTextActive,
6026
6026
  dataType: B.Local,
6027
6027
  op: e,
6028
6028
  viewId: t,
@@ -6071,7 +6071,7 @@ class rg {
6071
6071
  if (!t || !s || !n)
6072
6072
  return;
6073
6073
  const c = t.toString();
6074
- if (i === z.RemoveNode) {
6074
+ if (i === x.RemoveNode) {
6075
6075
  this.delete(c, !0, !0);
6076
6076
  return;
6077
6077
  }
@@ -6518,7 +6518,7 @@ class cg extends Ut {
6518
6518
  }), this.collectForServiceWorker([{
6519
6519
  ...s,
6520
6520
  opt: w,
6521
- type: z.FullWork,
6521
+ type: x.FullWork,
6522
6522
  workId: y,
6523
6523
  viewId: r,
6524
6524
  scenePath: c
@@ -6527,7 +6527,7 @@ class cg extends Ut {
6527
6527
  }
6528
6528
  }
6529
6529
  copySelector(t) {
6530
- var y, M, v, w, m, T, I, N, x;
6530
+ var y, M, v, w, m, T, I, N, z;
6531
6531
  const { viewId: e, store: i } = t, s = this.control.viewContainerManager.getView(e), n = i.selectIds;
6532
6532
  if (!this.serviceColloctor || !(n != null && n.length) || !s)
6533
6533
  return;
@@ -6547,7 +6547,7 @@ class cg extends Ut {
6547
6547
  y: p.y - f.y
6548
6548
  });
6549
6549
  for (const L of n) {
6550
- const D = (x = (N = this.serviceColloctor) == null ? void 0 : N.getStorageData(s.id, s.focusScenePath)) == null ? void 0 : x[L];
6550
+ const D = (z = (N = this.serviceColloctor) == null ? void 0 : N.getStorageData(s.id, s.focusScenePath)) == null ? void 0 : z[L];
6551
6551
  D && r.set(L, D);
6552
6552
  }
6553
6553
  return {
@@ -6569,11 +6569,11 @@ class cg extends Ut {
6569
6569
  I.workState = b.Done;
6570
6570
  const N = I.boxPoint;
6571
6571
  I.boxPoint = [N[0] + d[0], N[1] + d[1]], I.workState = b.Done;
6572
- const x = this.control.viewContainerManager.transformToOriginPoint(I.boxPoint, s);
6572
+ const z = this.control.viewContainerManager.transformToOriginPoint(I.boxPoint, s);
6573
6573
  this.control.textEditorManager.createTextForMasterController({
6574
6574
  workId: m,
6575
- x: x[0],
6576
- y: x[1],
6575
+ x: z[0],
6576
+ y: z[1],
6577
6577
  opt: I,
6578
6578
  scale: ((y = c.cameraOpt) == null ? void 0 : y.scale) || 1,
6579
6579
  type: Zt.Text,
@@ -6585,7 +6585,7 @@ class cg extends Ut {
6585
6585
  f.push({
6586
6586
  ...v,
6587
6587
  opt: I,
6588
- type: z.FullWork,
6588
+ type: x.FullWork,
6589
6589
  workId: m,
6590
6590
  viewId: s,
6591
6591
  scenePath: n
@@ -6593,16 +6593,16 @@ class cg extends Ut {
6593
6593
  continue;
6594
6594
  }
6595
6595
  if (v.toolsType === C.Image && (v.opt.uuid = m, v.opt.centerX = v.opt.centerX + d[0], v.opt.centerY = v.opt.centerY + d[1]), v.ops) {
6596
- const I = Ue(v.ops).map((x, L) => {
6596
+ const I = Ue(v.ops).map((z, L) => {
6597
6597
  const D = L % 3;
6598
- return D === 0 ? x + d[0] : D === 1 ? x + d[1] : x;
6598
+ return D === 0 ? z + d[0] : D === 1 ? z + d[1] : z;
6599
6599
  }), N = Wt(I);
6600
6600
  v.ops = N;
6601
6601
  }
6602
6602
  f.push({
6603
6603
  ...v,
6604
6604
  updateNodeOpt: T,
6605
- type: z.FullWork,
6605
+ type: x.FullWork,
6606
6606
  workId: m,
6607
6607
  viewId: s,
6608
6608
  scenePath: n
@@ -6610,13 +6610,13 @@ class cg extends Ut {
6610
6610
  ...v,
6611
6611
  updateNodeOpt: T,
6612
6612
  workId: m,
6613
- msgType: z.FullWork,
6613
+ msgType: x.FullWork,
6614
6614
  dataType: B.Local,
6615
6615
  emitEventType: O.CopyNode,
6616
6616
  willSyncService: !1,
6617
6617
  willRefresh: !0,
6618
6618
  viewId: s
6619
- }, { workId: m, msgType: z.FullWork, emitEventType: O.CopyNode }]);
6619
+ }, { workId: m, msgType: x.FullWork, emitEventType: O.CopyNode }]);
6620
6620
  }
6621
6621
  p.length && this.collectForLocalWorker(p), f.length && this.collectForServiceWorker(f);
6622
6622
  }
@@ -6672,9 +6672,9 @@ class lg extends Ut {
6672
6672
  const m = w.toString(), T = this.serviceColloctor.isLocalId(m), I = T ? this.serviceColloctor.transformKey(w) : m;
6673
6673
  let N = m;
6674
6674
  !T && this.serviceColloctor.isOwn(N) && (N = this.serviceColloctor.getLocalId(N));
6675
- const x = y[c][p][I] || void 0;
6676
- if (x) {
6677
- const L = x.updateNodeOpt || {};
6675
+ const z = y[c][p][I] || void 0;
6676
+ if (z) {
6677
+ const L = z.updateNodeOpt || {};
6678
6678
  if (n || r) {
6679
6679
  if (n) {
6680
6680
  L.fontColor = n;
@@ -6688,8 +6688,8 @@ class lg extends Ut {
6688
6688
  const [E, P, A, j] = $e(r);
6689
6689
  v.textBgColor = [E, P, A], v.textBgOpacity = j;
6690
6690
  }
6691
- if (x.toolsType === C.Text && x.opt && l !== b.Start) {
6692
- this.setTextColor(N, ae(x), L, c), l === b.Done && (this.undoTickerId = void 0);
6691
+ if (z.toolsType === C.Text && z.opt && l !== b.Start) {
6692
+ this.setTextColor(N, ae(z), L, c), l === b.Done && (this.undoTickerId = void 0);
6693
6693
  continue;
6694
6694
  }
6695
6695
  }
@@ -6708,7 +6708,7 @@ class lg extends Ut {
6708
6708
  h && (L.thickness = h, v.strokeWidth = h), u && (L.strokeType = u, v.strokeType = u);
6709
6709
  const D = {
6710
6710
  workId: N,
6711
- msgType: z.UpdateNode,
6711
+ msgType: x.UpdateNode,
6712
6712
  dataType: B.Local,
6713
6713
  updateNodeOpt: L,
6714
6714
  emitEventType: this.emitEventType,
@@ -6720,7 +6720,7 @@ class lg extends Ut {
6720
6720
  };
6721
6721
  M.push([D, {
6722
6722
  workId: N,
6723
- msgType: z.UpdateNode,
6723
+ msgType: x.UpdateNode,
6724
6724
  emitEventType: this.emitEventType
6725
6725
  }]);
6726
6726
  }
@@ -6797,16 +6797,16 @@ class hg extends Ut {
6797
6797
  let m;
6798
6798
  if (w && v === F) {
6799
6799
  if (w.selectIds) {
6800
- u.push(...w.selectIds), u.sort((x, L) => {
6800
+ u.push(...w.selectIds), u.sort((z, L) => {
6801
6801
  var P, A, j, K;
6802
- const D = ((A = (P = l[d(x, this.serviceColloctor)]) == null ? void 0 : P.opt) == null ? void 0 : A.zIndex) || 0, E = ((K = (j = l[d(x, this.serviceColloctor)]) == null ? void 0 : j.opt) == null ? void 0 : K.zIndex) || 0;
6803
- return D > E ? 1 : x < L ? -1 : 0;
6802
+ const D = ((A = (P = l[d(z, this.serviceColloctor)]) == null ? void 0 : P.opt) == null ? void 0 : A.zIndex) || 0, E = ((K = (j = l[d(z, this.serviceColloctor)]) == null ? void 0 : j.opt) == null ? void 0 : K.zIndex) || 0;
6803
+ return D > E ? 1 : z < L ? -1 : 0;
6804
6804
  });
6805
6805
  const T = w.updateNodeOpt || {};
6806
6806
  T.zIndexLayer = i;
6807
6807
  const I = {
6808
6808
  workId: p,
6809
- msgType: z.UpdateNode,
6809
+ msgType: x.UpdateNode,
6810
6810
  dataType: B.Local,
6811
6811
  updateNodeOpt: T,
6812
6812
  emitEventType: this.emitEventType,
@@ -6814,10 +6814,10 @@ class hg extends Ut {
6814
6814
  willSyncService: !0,
6815
6815
  viewId: s
6816
6816
  }, N = /* @__PURE__ */ new Map();
6817
- i === me.Top ? (this.addMaxLayer(s), m = this.getMaxZIndex(s)) : (this.addMinLayer(s), m = this.getMinZIndex(s)), u.forEach((x) => {
6817
+ i === me.Top ? (this.addMaxLayer(s), m = this.getMaxZIndex(s)) : (this.addMinLayer(s), m = this.getMinZIndex(s)), u.forEach((z) => {
6818
6818
  var P, A, j;
6819
- const L = (P = this.serviceColloctor) == null ? void 0 : P.isLocalId(x);
6820
- let D = L && ((A = this.serviceColloctor) == null ? void 0 : A.transformKey(x)) || x;
6819
+ const L = (P = this.serviceColloctor) == null ? void 0 : P.isLocalId(z);
6820
+ let D = L && ((A = this.serviceColloctor) == null ? void 0 : A.transformKey(z)) || z;
6821
6821
  const E = l[s][r][D];
6822
6822
  !L && ((j = this.serviceColloctor) != null && j.isOwn(D)) && (D = this.serviceColloctor.getLocalId(D)), T.zIndex = m, E != null && E.opt && (E.opt.zIndex = m), E != null && E.opt && N.set(D, {
6823
6823
  updateNodeOpt: E.updateNodeOpt,
@@ -6825,7 +6825,7 @@ class hg extends Ut {
6825
6825
  });
6826
6826
  }), I.selectStore = N, I.willSerializeData = !0, h.push([I, {
6827
6827
  workId: p,
6828
- msgType: z.UpdateNode,
6828
+ msgType: x.UpdateNode,
6829
6829
  emitEventType: this.emitEventType
6830
6830
  }]);
6831
6831
  }
@@ -6868,9 +6868,9 @@ class ug extends Ut {
6868
6868
  if (n === b.Start && (this.cachePosition = I), this.cachePosition) {
6869
6869
  const N = T.updateNodeOpt || {};
6870
6870
  N.translate = [I[0] - this.cachePosition[0], I[1] - this.cachePosition[1]], N.workState = n;
6871
- const x = {
6871
+ const z = {
6872
6872
  workId: y,
6873
- msgType: z.UpdateNode,
6873
+ msgType: x.UpdateNode,
6874
6874
  dataType: B.Local,
6875
6875
  updateNodeOpt: N,
6876
6876
  emitEventType: this.emitEventType,
@@ -6878,9 +6878,9 @@ class ug extends Ut {
6878
6878
  textUpdateForWoker: !0,
6879
6879
  viewId: r
6880
6880
  };
6881
- n === b.Done && (x.textUpdateForWoker = !0, x.willSerializeData = !0, this.cachePosition = void 0), d.push([x, {
6881
+ n === b.Done && (z.textUpdateForWoker = !0, z.willSerializeData = !0, this.cachePosition = void 0), d.push([z, {
6882
6882
  workId: y,
6883
- msgType: z.UpdateNode,
6883
+ msgType: x.UpdateNode,
6884
6884
  emitEventType: this.emitEventType
6885
6885
  }]);
6886
6886
  }
@@ -6919,7 +6919,7 @@ class dg extends Ut {
6919
6919
  }
6920
6920
  }
6921
6921
  h.length && (l.push([{
6922
- msgType: z.RemoveNode,
6922
+ msgType: x.RemoveNode,
6923
6923
  emitEventType: O.DeleteNode,
6924
6924
  removeIds: h,
6925
6925
  dataType: B.Local,
@@ -6958,10 +6958,10 @@ class pg extends Ut {
6958
6958
  return;
6959
6959
  const p = d.focusScenePath, f = [...i], y = (w = this.serviceColloctor) == null ? void 0 : w.storage, M = [], v = s === b.Start && Date.now() || void 0;
6960
6960
  for (v && this.mainEngine.internalMsgEmitter.emit("addUndoTicker", v, n); f.length; ) {
6961
- const x = f.pop();
6962
- if (!x)
6961
+ const z = f.pop();
6962
+ if (!z)
6963
6963
  continue;
6964
- const L = x.toString(), D = this.serviceColloctor.isLocalId(L), E = D && this.serviceColloctor.transformKey(x) || L;
6964
+ const L = z.toString(), D = this.serviceColloctor.isLocalId(L), E = D && this.serviceColloctor.transformKey(z) || L;
6965
6965
  let P = L;
6966
6966
  !D && this.serviceColloctor.isOwn(P) && (P = this.serviceColloctor.getLocalId(P));
6967
6967
  const A = y[n][p][E];
@@ -6999,8 +6999,8 @@ class pg extends Ut {
6999
6999
  j.textInfos = this.cacheTextInfo;
7000
7000
  }
7001
7001
  const K = {
7002
- workId: x,
7003
- msgType: z.UpdateNode,
7002
+ workId: z,
7003
+ msgType: x.UpdateNode,
7004
7004
  dataType: B.Local,
7005
7005
  updateNodeOpt: j,
7006
7006
  emitEventType: this.emitEventType,
@@ -7009,8 +7009,8 @@ class pg extends Ut {
7009
7009
  viewId: n
7010
7010
  };
7011
7011
  s === b.Done && (K.willSerializeData = !0, this.targetText.clear()), M.push([K, {
7012
- workId: x,
7013
- msgType: z.UpdateNode,
7012
+ workId: z,
7013
+ msgType: x.UpdateNode,
7014
7014
  emitEventType: this.emitEventType
7015
7015
  }]);
7016
7016
  continue;
@@ -7163,10 +7163,10 @@ class fg extends Ut {
7163
7163
  if (!m)
7164
7164
  continue;
7165
7165
  const T = m.toString(), I = this.serviceColloctor.isLocalId(T), N = I && this.serviceColloctor.transformKey(m) || T;
7166
- let x = T;
7167
- !I && this.serviceColloctor.isOwn(x) && (x = this.serviceColloctor.getLocalId(x));
7166
+ let z = T;
7167
+ !I && this.serviceColloctor.isOwn(z) && (z = this.serviceColloctor.getLocalId(z));
7168
7168
  const L = u[r][l][N];
7169
- if (L && x === F) {
7169
+ if (L && z === F) {
7170
7170
  if (((y = L.selectIds) == null ? void 0 : y.length) === 1) {
7171
7171
  const D = L.selectIds[0];
7172
7172
  if (n === b.Start) {
@@ -7177,7 +7177,7 @@ class fg extends Ut {
7177
7177
  E.angle = (s + this.cacheOriginRotate) % 360, E.workState = n;
7178
7178
  const P = {
7179
7179
  workId: m,
7180
- msgType: z.UpdateNode,
7180
+ msgType: x.UpdateNode,
7181
7181
  dataType: B.Local,
7182
7182
  updateNodeOpt: E,
7183
7183
  emitEventType: this.emitEventType,
@@ -7187,7 +7187,7 @@ class fg extends Ut {
7187
7187
  };
7188
7188
  n === b.Done && (P.willRefreshSelector = !0, P.willSerializeData = !0, this.cacheOriginRotate = 0), d.push([P, {
7189
7189
  workId: m,
7190
- msgType: z.UpdateNode,
7190
+ msgType: x.UpdateNode,
7191
7191
  emitEventType: this.emitEventType
7192
7192
  }]);
7193
7193
  }
@@ -7247,8 +7247,8 @@ class Mg extends Ut {
7247
7247
  const N = d.pop();
7248
7248
  if (!N)
7249
7249
  continue;
7250
- const x = N.toString(), L = this.serviceColloctor.isLocalId(x), D = L ? this.serviceColloctor.transformKey(N) : x;
7251
- let E = x;
7250
+ const z = N.toString(), L = this.serviceColloctor.isLocalId(z), D = L ? this.serviceColloctor.transformKey(N) : z;
7251
+ let E = z;
7252
7252
  !L && this.serviceColloctor.isOwn(E) && (E = this.serviceColloctor.getLocalId(E));
7253
7253
  const P = p[c][u][D] || void 0;
7254
7254
  if (P) {
@@ -7274,8 +7274,8 @@ class Mg extends Ut {
7274
7274
  const v = await Promise.all(M);
7275
7275
  for (const N of v)
7276
7276
  if (N) {
7277
- const { key: x, textInfo: L } = N;
7278
- L && (L.canSync = !0, L.canWorker = !0, this.control.textEditorManager.updateForViewEdited(x, L));
7277
+ const { key: z, textInfo: L } = N;
7278
+ L && (L.canSync = !0, L.canWorker = !0, this.control.textEditorManager.updateForViewEdited(z, L));
7279
7279
  }
7280
7280
  Object.keys(f).length && (this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this.timerId = setTimeout(() => {
7281
7281
  var N;
@@ -7311,7 +7311,7 @@ class yg extends Ut {
7311
7311
  m.pointMap = i, m.workState = s;
7312
7312
  const T = {
7313
7313
  workId: d,
7314
- msgType: z.UpdateNode,
7314
+ msgType: x.UpdateNode,
7315
7315
  dataType: B.Local,
7316
7316
  updateNodeOpt: m,
7317
7317
  emitEventType: this.emitEventType,
@@ -7321,7 +7321,7 @@ class yg extends Ut {
7321
7321
  };
7322
7322
  s === b.Done && (T.undoTickerId = this.undoTickerId), h.push([T, {
7323
7323
  workId: d,
7324
- msgType: z.UpdateNode,
7324
+ msgType: x.UpdateNode,
7325
7325
  emitEventType: this.emitEventType
7326
7326
  }]);
7327
7327
  }
@@ -7354,7 +7354,7 @@ class wg extends Ut {
7354
7354
  w.isLocked = i;
7355
7355
  const m = {
7356
7356
  workId: M,
7357
- msgType: z.UpdateNode,
7357
+ msgType: x.UpdateNode,
7358
7358
  dataType: B.Local,
7359
7359
  updateNodeOpt: w,
7360
7360
  emitEventType: this.emitEventType,
@@ -7365,7 +7365,7 @@ class wg extends Ut {
7365
7365
  };
7366
7366
  h.push([m, {
7367
7367
  workId: M,
7368
- msgType: z.UpdateNode,
7368
+ msgType: x.UpdateNode,
7369
7369
  emitEventType: this.emitEventType
7370
7370
  }]);
7371
7371
  }
@@ -7403,7 +7403,7 @@ class mg extends Ut {
7403
7403
  if (v && M === F) {
7404
7404
  const m = {
7405
7405
  workId: M,
7406
- msgType: z.UpdateNode,
7406
+ msgType: x.UpdateNode,
7407
7407
  dataType: B.Local,
7408
7408
  updateNodeOpt: w,
7409
7409
  emitEventType: this.emitEventType,
@@ -7414,7 +7414,7 @@ class mg extends Ut {
7414
7414
  };
7415
7415
  h.push([m, {
7416
7416
  workId: M,
7417
- msgType: z.UpdateNode,
7417
+ msgType: x.UpdateNode,
7418
7418
  emitEventType: this.emitEventType
7419
7419
  }]);
7420
7420
  }
@@ -7501,7 +7501,7 @@ class Ig {
7501
7501
  t.updateCamera({
7502
7502
  cameraOpt: i,
7503
7503
  viewId: e.viewId,
7504
- msgType: z.UpdateCamera,
7504
+ msgType: x.UpdateCamera,
7505
7505
  dataType: B.Local
7506
7506
  });
7507
7507
  }
@@ -7522,11 +7522,11 @@ class Ig {
7522
7522
  var t;
7523
7523
  for (const e of o.values()) {
7524
7524
  const { msgType: i, viewId: s, layerOpt: n, offscreenCanvasOpt: r, cameraOpt: c } = e;
7525
- if (i === z.Console) {
7525
+ if (i === x.Console) {
7526
7526
  console.log(this);
7527
7527
  continue;
7528
7528
  }
7529
- if (i === z.Init) {
7529
+ if (i === x.Init) {
7530
7530
  const h = (t = this.master.control.viewContainerManager.getView(s)) == null ? void 0 : t.displayer, u = h == null ? void 0 : h.subLocalCanvasContainerRef.current;
7531
7531
  if (h && u && n && r) {
7532
7532
  const d = this.createMainThreadWorker(s, {
@@ -7541,10 +7541,10 @@ class Ig {
7541
7541
  }
7542
7542
  continue;
7543
7543
  }
7544
- if (i === z.TasksQueue)
7544
+ if (i === x.TasksQueue)
7545
7545
  continue;
7546
7546
  const l = this.mainThreadWorkerMap.get(s);
7547
- l && (l.on(e), i === z.Destroy && (l.destroy(), this.mainThreadWorkerMap.delete(s)));
7547
+ l && (l.on(e), i === x.Destroy && (l.destroy(), this.mainThreadWorkerMap.delete(s)));
7548
7548
  }
7549
7549
  }
7550
7550
  post(o) {
@@ -7609,16 +7609,16 @@ class vg {
7609
7609
  on(o) {
7610
7610
  const { msgType: t, toolsType: e, opt: i, dataType: s, workId: n, workState: r } = o, c = n == null ? void 0 : n.toString();
7611
7611
  switch (t) {
7612
- case z.Destroy:
7612
+ case x.Destroy:
7613
7613
  this.destroy();
7614
7614
  break;
7615
- case z.Clear:
7615
+ case x.Clear:
7616
7616
  this.clearAll();
7617
7617
  break;
7618
- case z.UpdateCamera:
7618
+ case x.UpdateCamera:
7619
7619
  this.updateCamera(o);
7620
7620
  break;
7621
- case z.UpdateTools:
7621
+ case x.UpdateTools:
7622
7622
  if (e && this.subLocalWork.canUseSubWorkerLayer(e) && i) {
7623
7623
  const l = {
7624
7624
  toolsType: e,
@@ -7627,16 +7627,16 @@ class vg {
7627
7627
  this.subLocalWork.setToolsOpt(l);
7628
7628
  }
7629
7629
  break;
7630
- case z.CreateWork:
7630
+ case x.CreateWork:
7631
7631
  c && i && e && this.subLocalWork.canUseSubWorkerLayer(e) && (this.subLocalWork.getToolsOpt() || this.subLocalWork.setToolsOpt({
7632
7632
  toolsType: e,
7633
7633
  toolsOpt: i
7634
7634
  }), this.subLocalWork.setWorkOptions(c, i));
7635
7635
  break;
7636
- case z.DrawWork:
7636
+ case x.DrawWork:
7637
7637
  e && this.subLocalWork.canUseSubWorkerLayer(e) && (r === b.Done && s === B.Local ? this.subLocalWork.consumeDrawAll(o) : this.subLocalWork.consumeDraw(o));
7638
7638
  break;
7639
- case z.RemoveNode:
7639
+ case x.RemoveNode:
7640
7640
  this.subLocalWork.removeNode(o);
7641
7641
  return;
7642
7642
  }
@@ -7874,7 +7874,7 @@ class Cg extends Sg {
7874
7874
  }
7875
7875
  async useMainThread() {
7876
7876
  console.info("no OffscreenCanvas");
7877
- const { MainThreadManagerImpl: t } = await import("./index-DcrL8t1_.mjs");
7877
+ const { MainThreadManagerImpl: t } = await import("./index-DwakKeHT.mjs");
7878
7878
  this.mainThread = new t(this);
7879
7879
  }
7880
7880
  async on() {
@@ -7990,7 +7990,7 @@ class Cg extends Sg {
7990
7990
  op: T,
7991
7991
  canTextEdit: I,
7992
7992
  points: N,
7993
- selectorColor: x,
7993
+ selectorColor: z,
7994
7994
  canRotate: L,
7995
7995
  scaleType: D,
7996
7996
  textOpt: E,
@@ -8013,34 +8013,34 @@ class Cg extends Sg {
8013
8013
  return;
8014
8014
  const ct = r.scenePath || this.viewContainerManager.getCurScenePath(j);
8015
8015
  switch (c) {
8016
- case z.Select: {
8016
+ case x.Select: {
8017
8017
  const Y = l != null && l.length ? { ...u, selectIds: l, canvasHeight: v, canvasWidth: w, points: N } : void 0;
8018
- Y && (h != null && h.strokeColor) && (Y.selectorColor = h.strokeColor), Y && x && (Y.selectorColor = x), Y && d && (Y.strokeColor = d), Y && (h != null && h.fillColor) && (Y.fillColor = h.fillColor), Y && p && (Y.fillColor = p), Y && Pt(L) && (Y.canRotate = L), Y && D && (Y.scaleType = D), Y && I && (Y.canTextEdit = I), Y && E && (Y.textOpt = E), Y && Pt(nt) && (Y.canLock = nt), Y && Pt(et) && (Y.isLocked = et), Y && H && (Y.shapeOpt = H), Y && _ && (Y.toolsTypes = _), Y && $ && (Y.thickness = $), Y && Q && (Y.strokeType = Q), Y && Pt(X) && (Y.useStroke = X), j && this.viewContainerManager.showFloatBar(j, !!Y, Y), f && ((i = this.collector) == null || i.dispatch({ type: c, selectIds: l, opt: h, isSync: y, viewId: j, scenePath: ct }));
8018
+ Y && (h != null && h.strokeColor) && (Y.selectorColor = h.strokeColor), Y && z && (Y.selectorColor = z), Y && d && (Y.strokeColor = d), Y && (h != null && h.fillColor) && (Y.fillColor = h.fillColor), Y && p && (Y.fillColor = p), Y && Pt(L) && (Y.canRotate = L), Y && D && (Y.scaleType = D), Y && I && (Y.canTextEdit = I), Y && E && (Y.textOpt = E), Y && Pt(nt) && (Y.canLock = nt), Y && Pt(et) && (Y.isLocked = et), Y && H && (Y.shapeOpt = H), Y && _ && (Y.toolsTypes = _), Y && $ && (Y.thickness = $), Y && Q && (Y.strokeType = Q), Y && Pt(X) && (Y.useStroke = X), j && this.viewContainerManager.showFloatBar(j, !!Y, Y), f && ((i = this.collector) == null || i.dispatch({ type: c, selectIds: l, opt: h, isSync: y, viewId: j, scenePath: ct }));
8019
8019
  break;
8020
8020
  }
8021
- case z.Snapshot:
8021
+ case x.Snapshot:
8022
8022
  if (M && ct) {
8023
8023
  const Y = this.snapshotMap.get(ct);
8024
8024
  Y && Y(M);
8025
8025
  }
8026
8026
  break;
8027
- case z.BoundingBox:
8027
+ case x.BoundingBox:
8028
8028
  if (m && ct) {
8029
8029
  const Y = this.boundingRectMap.get(ct);
8030
8030
  Y && Y(m);
8031
8031
  }
8032
8032
  break;
8033
- case z.Cursor:
8033
+ case x.Cursor:
8034
8034
  T && this.control.cursor.collectServiceCursor({ ...r });
8035
8035
  break;
8036
- case z.Clear:
8036
+ case x.Clear:
8037
8037
  if (j) {
8038
8038
  this.viewContainerManager.showFloatBar(j, !1);
8039
8039
  const Y = (s = this.clearAllResolveMap.get(j)) == null ? void 0 : s.resolve;
8040
8040
  Y && Y(j);
8041
8041
  }
8042
8042
  break;
8043
- case z.TextUpdate:
8043
+ case x.TextUpdate:
8044
8044
  if (P === C.Text && A && j) {
8045
8045
  const Y = this.viewContainerManager.transformToOriginPoint((h == null ? void 0 : h.boxPoint) || [0, 0], j), rt = (h == null ? void 0 : h.boxSize) || [0, 0], dt = (n = this.viewContainerManager.getView(j)) == null ? void 0 : n.cameraOpt;
8046
8046
  h ? this.control.textEditorManager.updateTextForWorker({
@@ -8058,7 +8058,7 @@ class Cg extends Sg {
8058
8058
  }) : this.control.textEditorManager.delete(A, f || !1, !1);
8059
8059
  }
8060
8060
  break;
8061
- case z.GetTextActive:
8061
+ case x.GetTextActive:
8062
8062
  P === C.Text && A && j && this.control.textEditorManager.updateTextForWorker({
8063
8063
  workId: A,
8064
8064
  isActive: !0,
@@ -8068,7 +8068,7 @@ class Cg extends Sg {
8068
8068
  canSync: !0
8069
8069
  }, Date.now());
8070
8070
  break;
8071
- case z.GetImageBitMap:
8071
+ case x.GetImageBitMap:
8072
8072
  Ct && A && j && Tg({
8073
8073
  src: Ct,
8074
8074
  isgl: at
@@ -8076,7 +8076,7 @@ class Cg extends Sg {
8076
8076
  var dt;
8077
8077
  const rt = /* @__PURE__ */ new Set();
8078
8078
  if (rt.add({
8079
- msgType: z.GetImageBitMap,
8079
+ msgType: x.GetImageBitMap,
8080
8080
  dataType: B.Local,
8081
8081
  workId: A,
8082
8082
  viewId: j,
@@ -8110,13 +8110,13 @@ class Cg extends Sg {
8110
8110
  }
8111
8111
  const I = r.scenePath || this.viewContainerManager.getCurScenePath(w);
8112
8112
  switch (c) {
8113
- case z.None: {
8113
+ case x.None: {
8114
8114
  m && de(() => {
8115
8115
  this.setLockSentEventCursor(!1);
8116
8116
  }, this.maxLastSyncTime);
8117
8117
  break;
8118
8118
  }
8119
- case z.DrawWork: {
8119
+ case x.DrawWork: {
8120
8120
  (e = this.collector) == null || e.dispatch({
8121
8121
  type: c,
8122
8122
  op: l,
@@ -8131,7 +8131,7 @@ class Cg extends Sg {
8131
8131
  });
8132
8132
  break;
8133
8133
  }
8134
- case z.FullWork: {
8134
+ case x.FullWork: {
8135
8135
  (i = this.collector) == null || i.dispatch({
8136
8136
  type: c,
8137
8137
  ops: p,
@@ -8147,11 +8147,11 @@ class Cg extends Sg {
8147
8147
  });
8148
8148
  break;
8149
8149
  }
8150
- case z.UpdateNode: {
8150
+ case x.UpdateNode: {
8151
8151
  (s = this.collector) == null || s.dispatch({ type: c, updateNodeOpt: y, workId: h, opt: f, ops: p, op: l, isSync: v, viewId: w, scenePath: I });
8152
8152
  break;
8153
8153
  }
8154
- case z.RemoveNode: {
8154
+ case x.RemoveNode: {
8155
8155
  d && this.control.textEditorManager.deleteBatch(d, !1, !1), (n = this.collector) == null || n.dispatch({ type: c, removeIds: d, isSync: v, viewId: w, scenePath: I }), this.willSelectorWorkId && (d != null && d.includes(this.willSelectorWorkId)) && (this.willSelectorWorkId = void 0);
8156
8156
  break;
8157
8157
  }
@@ -8341,7 +8341,7 @@ class Cg extends Sg {
8341
8341
  i && h && u && ((r = this.collector) != null && r.hasSelector(h, u) && this.blurSelector(h, u), this.control.textEditorManager.checkEmptyTextBlur());
8342
8342
  }
8343
8343
  this.taskBatchData.add({
8344
- msgType: z.UpdateTools,
8344
+ msgType: x.UpdateTools,
8345
8345
  dataType: B.Local,
8346
8346
  toolsType: e,
8347
8347
  opt: { ...t.toolsOpt, syncUnitTime: this.maxLastSyncTime },
@@ -8353,14 +8353,14 @@ class Cg extends Sg {
8353
8353
  prepareOnceWork(t, e) {
8354
8354
  const { workId: i, toolsOpt: s, viewId: n } = t;
8355
8355
  this.queryTaskBatchData({
8356
- msgType: z.CreateWork,
8356
+ msgType: x.CreateWork,
8357
8357
  dataType: B.Local,
8358
8358
  viewId: n,
8359
8359
  toolsType: e
8360
8360
  }).forEach((r) => {
8361
8361
  this.taskBatchData.delete(r);
8362
8362
  }), this.taskBatchData.add({
8363
- msgType: z.CreateWork,
8363
+ msgType: x.CreateWork,
8364
8364
  workId: i,
8365
8365
  toolsType: e,
8366
8366
  opt: { ...s, syncUnitTime: this.maxLastSyncTime },
@@ -8372,7 +8372,7 @@ class Cg extends Sg {
8372
8372
  createViewWorker(t, e) {
8373
8373
  const { offscreenCanvasOpt: i, layerOpt: s, dpr: n, cameraOpt: r } = e;
8374
8374
  this.taskBatchData.add({
8375
- msgType: z.Init,
8375
+ msgType: x.Init,
8376
8376
  dataType: B.Local,
8377
8377
  viewId: t,
8378
8378
  offscreenCanvasOpt: i,
@@ -8386,12 +8386,12 @@ class Cg extends Sg {
8386
8386
  destroyViewWorker(t, e = !1) {
8387
8387
  var i;
8388
8388
  this.getLocalWorkViewId() === t && this.setLocalWorkViewId(void 0), this.zIndexNodeMethod && this.zIndexNodeMethod.clearZIndex(t), this.taskBatchData.add({
8389
- msgType: z.Destroy,
8389
+ msgType: x.Destroy,
8390
8390
  dataType: B.Local,
8391
8391
  viewId: t,
8392
8392
  isRunSubWork: !0
8393
8393
  }), this.consume(), e || (i = this.collector) == null || i.dispatch({
8394
- type: z.Clear,
8394
+ type: x.Clear,
8395
8395
  viewId: t
8396
8396
  }), this.control.renderControl.destoryByViewId(t, e);
8397
8397
  }
@@ -8404,7 +8404,7 @@ class Cg extends Sg {
8404
8404
  this.collector.isOwn(l) ? this.blurSelector(n, r) : this.blurSelector(n, r, l);
8405
8405
  return;
8406
8406
  }
8407
- if (h = z.RemoveNode, s.toolsType === C.LaserPen)
8407
+ if (h = x.RemoveNode, s.toolsType === C.LaserPen)
8408
8408
  return;
8409
8409
  }
8410
8410
  const u = (f = this.viewContainerManager.getView(n)) == null ? void 0 : f.focusScenePath;
@@ -8485,7 +8485,7 @@ class Cg extends Sg {
8485
8485
  workState: s,
8486
8486
  workId: i,
8487
8487
  dataType: B.Local,
8488
- msgType: z.DrawWork,
8488
+ msgType: x.DrawWork,
8489
8489
  isRunSubWork: this.isRunSubWork,
8490
8490
  toolsType: (e = this.currentToolsData) == null ? void 0 : e.toolsType,
8491
8491
  viewId: t,
@@ -8525,13 +8525,13 @@ class Cg extends Sg {
8525
8525
  const e = /* @__PURE__ */ new Set();
8526
8526
  for (const s of t.values()) {
8527
8527
  const n = s.msgType;
8528
- (n === z.Init || n === z.Clear || n === z.Destroy || n === z.UpdateCamera || s.isRunSubWork) && e.add(s);
8528
+ (n === x.Init || n === x.Clear || n === x.Destroy || n === x.UpdateCamera || s.isRunSubWork) && e.add(s);
8529
8529
  }
8530
8530
  e.size && (this.subWorker.postMessage(e), this.control.priority === "ui" && ((i = this.subMainThreadWorker) == null || i.consume(e)));
8531
8531
  }
8532
8532
  updateNode(t, e, i, s) {
8533
8533
  this.taskBatchData.add({
8534
- msgType: z.UpdateNode,
8534
+ msgType: x.UpdateNode,
8535
8535
  workId: t,
8536
8536
  updateNodeOpt: e,
8537
8537
  viewId: i,
@@ -8545,7 +8545,7 @@ class Cg extends Sg {
8545
8545
  updateCamera(t, e) {
8546
8546
  var i;
8547
8547
  this.useTasksqueue || ((i = this.methodBuilder) == null || i.pause(), this.blurCursor(t), this.checkDrawingWork(t), this.useTasksqueue = !0, this.mainTasksqueueCount = 1, this.workerTasksqueueCount = 1), this.useTasksqueue && (this.tasksqueue.set(t, {
8548
- msgType: z.UpdateCamera,
8548
+ msgType: x.UpdateCamera,
8549
8549
  dataType: B.Local,
8550
8550
  cameraOpt: {
8551
8551
  ...e,
@@ -8568,7 +8568,7 @@ class Cg extends Sg {
8568
8568
  let e = !this.isBusy;
8569
8569
  if (this.isBusy && this.mainTasksqueueCount && this.workerTasksqueueCount && this.mainTasksqueueCount <= this.workerTasksqueueCount && (e = !0), e) {
8570
8570
  this.mainTasksqueueCount && this.workerTasksqueueCount && this.mainTasksqueueCount++, t.add({
8571
- msgType: z.TasksQueue,
8571
+ msgType: x.TasksQueue,
8572
8572
  dataType: B.Local,
8573
8573
  isRunSubWork: !0,
8574
8574
  mainTasksqueueCount: this.mainTasksqueueCount,
@@ -8589,17 +8589,17 @@ class Cg extends Sg {
8589
8589
  return;
8590
8590
  }
8591
8591
  this.control.textEditorManager.clear(t, e), this.queryTaskBatchData({
8592
- msgType: z.Clear,
8592
+ msgType: x.Clear,
8593
8593
  dataType: B.Local,
8594
8594
  viewId: t
8595
8595
  }).forEach((c) => {
8596
8596
  this.taskBatchData.delete(c);
8597
8597
  }), this.taskBatchData.add({
8598
8598
  dataType: B.Local,
8599
- msgType: z.Clear,
8599
+ msgType: x.Clear,
8600
8600
  viewId: t
8601
8601
  }), this.runAnimation(), e || (this.control.renderControl.isUsePageAuth(t) && s ? this.control.renderControl.clearRenderPage(t, s) : (r = this.collector) == null || r.dispatch({
8602
- type: z.Clear,
8602
+ type: x.Clear,
8603
8603
  viewId: t,
8604
8604
  scenePath: s
8605
8605
  })), this.zIndexNodeMethod && this.zIndexNodeMethod.clearZIndex(t), this.localPointsBatchData.clear(), await new Promise((c) => {
@@ -8644,7 +8644,7 @@ class Cg extends Sg {
8644
8644
  if (t === h && l === b.Start || l === b.Doing) {
8645
8645
  if (l === b.Doing && this.isCanDrawWork) {
8646
8646
  Number(c) && Number(c) + 60 > Date.now() && (i.push(c.toString()), this.taskBatchData.add({
8647
- msgType: z.RemoveNode,
8647
+ msgType: x.RemoveNode,
8648
8648
  workId: c,
8649
8649
  viewId: h,
8650
8650
  dataType: B.Local,
@@ -8656,7 +8656,7 @@ class Cg extends Sg {
8656
8656
  workState: b.Done,
8657
8657
  workId: c,
8658
8658
  dataType: B.Local,
8659
- msgType: z.DrawWork,
8659
+ msgType: x.DrawWork,
8660
8660
  isRunSubWork: this.isRunSubWork,
8661
8661
  toolsType: (s = this.currentToolsData) == null ? void 0 : s.toolsType,
8662
8662
  viewId: h,
@@ -8669,7 +8669,7 @@ class Cg extends Sg {
8669
8669
  if ((e || i.length) && (this.consume(), i.length)) {
8670
8670
  const c = (n = this.viewContainerManager.getView(t)) == null ? void 0 : n.focusScenePath;
8671
8671
  (r = this.collector) == null || r.dispatch({
8672
- type: z.RemoveNode,
8672
+ type: x.RemoveNode,
8673
8673
  removeIds: i,
8674
8674
  viewId: t,
8675
8675
  scenePath: c
@@ -8681,7 +8681,7 @@ class Cg extends Sg {
8681
8681
  const e = [];
8682
8682
  for (const [n, { state: r, viewId: c }] of this.localPointsBatchData.entries())
8683
8683
  (t === c && r === b.Start || r === b.Doing) && (this.deleteLocalPoint(n), r === b.Doing && this.isCanDrawWork && (e.push(n.toString()), this.taskBatchData.add({
8684
- msgType: z.RemoveNode,
8684
+ msgType: x.RemoveNode,
8685
8685
  workId: n,
8686
8686
  viewId: c,
8687
8687
  dataType: B.Local,
@@ -8691,7 +8691,7 @@ class Cg extends Sg {
8691
8691
  this.consume();
8692
8692
  const n = (i = this.viewContainerManager.getView(t)) == null ? void 0 : i.focusScenePath;
8693
8693
  (s = this.collector) == null || s.dispatch({
8694
- type: z.RemoveNode,
8694
+ type: x.RemoveNode,
8695
8695
  removeIds: e,
8696
8696
  viewId: t,
8697
8697
  scenePath: n
@@ -8711,7 +8711,7 @@ class Cg extends Sg {
8711
8711
  }
8712
8712
  }
8713
8713
  const n = this.viewContainerManager.transformToScenePoint(t, e), r = {
8714
- msgType: z.CursorHover,
8714
+ msgType: x.CursorHover,
8715
8715
  dataType: B.Local,
8716
8716
  point: n,
8717
8717
  toolsType: this.currentToolsData.toolsType,
@@ -8720,7 +8720,7 @@ class Cg extends Sg {
8720
8720
  viewId: e
8721
8721
  };
8722
8722
  this.queryTaskBatchData({
8723
- msgType: z.CursorHover,
8723
+ msgType: x.CursorHover,
8724
8724
  dataType: B.Local,
8725
8725
  toolsType: this.currentToolsData.toolsType,
8726
8726
  viewId: e
@@ -8734,13 +8734,13 @@ class Cg extends Sg {
8734
8734
  if (((i = this.currentToolsData) == null ? void 0 : i.toolsType) !== C.Selector)
8735
8735
  return;
8736
8736
  const e = {
8737
- msgType: z.CursorBlur,
8737
+ msgType: x.CursorBlur,
8738
8738
  dataType: B.Local,
8739
8739
  isRunSubWork: !1,
8740
8740
  viewId: t
8741
8741
  };
8742
8742
  this.queryTaskBatchData({
8743
- msgType: z.CursorHover,
8743
+ msgType: x.CursorHover,
8744
8744
  dataType: B.Local,
8745
8745
  viewId: t
8746
8746
  }).forEach((s) => {
@@ -8779,7 +8779,7 @@ class Cg extends Sg {
8779
8779
  ((c = this.collector) == null ? void 0 : c.getLocalId(r)) === F && delete n[r];
8780
8780
  }), Object.keys(n).length && this.viewContainerManager.mainView && this.viewContainerManager.mainView.cameraOpt) {
8781
8781
  const r = {
8782
- msgType: z.BoundingBox,
8782
+ msgType: x.BoundingBox,
8783
8783
  dataType: B.Local,
8784
8784
  scenePath: t,
8785
8785
  scenes: n,
@@ -8810,7 +8810,7 @@ class Cg extends Sg {
8810
8810
  if (!f)
8811
8811
  return;
8812
8812
  const y = e || ((h = f.cameraOpt) == null ? void 0 : h.width), M = i || ((u = f.cameraOpt) == null ? void 0 : u.height), v = {
8813
- msgType: z.Snapshot,
8813
+ msgType: x.Snapshot,
8814
8814
  dataType: B.Local,
8815
8815
  scenePath: t,
8816
8816
  scenes: p,
@@ -8860,7 +8860,7 @@ class Cg extends Sg {
8860
8860
  Tt.InternalMsgEmitter.emit("addUndoTicker", c, t);
8861
8861
  const l = { ...e };
8862
8862
  this.zIndexNodeMethod && (this.zIndexNodeMethod.addMaxLayer(t), l.zIndex = this.zIndexNodeMethod.getMaxZIndex(t)), this.taskBatchData.add({
8863
- msgType: z.FullWork,
8863
+ msgType: x.FullWork,
8864
8864
  dataType: B.Local,
8865
8865
  toolsType: C.Image,
8866
8866
  workId: e.uuid,
@@ -8887,7 +8887,7 @@ class Cg extends Sg {
8887
8887
  Tt.InternalMsgEmitter.emit("addUndoTicker", d, t);
8888
8888
  const p = (r = this.collector) != null && r.isOwn(h) ? (c = this.collector) == null ? void 0 : c.getLocalId(h) : h, f = { ...u.opt, locked: i };
8889
8889
  this.taskBatchData.add({
8890
- msgType: z.FullWork,
8890
+ msgType: x.FullWork,
8891
8891
  dataType: B.Local,
8892
8892
  toolsType: C.Image,
8893
8893
  workId: p,
@@ -8938,7 +8938,7 @@ class Cg extends Sg {
8938
8938
  this.taskBatchData.add({
8939
8939
  workId: F,
8940
8940
  selectIds: [t],
8941
- msgType: z.Select,
8941
+ msgType: x.Select,
8942
8942
  dataType: B.Local,
8943
8943
  viewId: e,
8944
8944
  willSyncService: !0
@@ -8948,7 +8948,7 @@ class Cg extends Sg {
8948
8948
  this.taskBatchData.add({
8949
8949
  workId: i || F,
8950
8950
  selectIds: [],
8951
- msgType: z.Select,
8951
+ msgType: x.Select,
8952
8952
  dataType: B.Service,
8953
8953
  viewId: t,
8954
8954
  scenePath: e
@@ -8956,7 +8956,7 @@ class Cg extends Sg {
8956
8956
  }
8957
8957
  consoleWorkerInfo() {
8958
8958
  this.taskBatchData.add({
8959
- msgType: z.Console,
8959
+ msgType: x.Console,
8960
8960
  dataType: B.Local,
8961
8961
  isRunSubWork: !0,
8962
8962
  viewId: ""
@@ -8966,13 +8966,13 @@ class Cg extends Sg {
8966
8966
  var s, n;
8967
8967
  const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
8968
8968
  if (t === "cpu" && ((s = this.subMainThreadWorker) == null || s.destroy(), e.add({
8969
- msgType: z.PriorityWorker,
8969
+ msgType: x.PriorityWorker,
8970
8970
  viewId: Co,
8971
8971
  dataType: B.Local,
8972
8972
  isRunSubWork: !0
8973
8973
  })), t === "ui") {
8974
8974
  e.add({
8975
- msgType: z.PriorityMainThreadWorker,
8975
+ msgType: x.PriorityMainThreadWorker,
8976
8976
  viewId: Co,
8977
8977
  dataType: B.Local,
8978
8978
  isRunSubWork: !0
@@ -8983,7 +8983,7 @@ class Cg extends Sg {
8983
8983
  if (l) {
8984
8984
  const { offscreenCanvasOpt: h, layerOpt: u, dpr: d, cameraOpt: p } = l;
8985
8985
  i.add({
8986
- msgType: z.Init,
8986
+ msgType: x.Init,
8987
8987
  dataType: B.Local,
8988
8988
  viewId: r.id,
8989
8989
  offscreenCanvasOpt: h,
@@ -9001,7 +9001,7 @@ class Cg extends Sg {
9001
9001
  if (h) {
9002
9002
  const { offscreenCanvasOpt: u, layerOpt: d, dpr: p, cameraOpt: f } = h;
9003
9003
  i.add({
9004
- msgType: z.Init,
9004
+ msgType: x.Init,
9005
9005
  dataType: B.Local,
9006
9006
  viewId: l,
9007
9007
  offscreenCanvasOpt: u,
@@ -9020,7 +9020,7 @@ class Cg extends Sg {
9020
9020
  var s, n;
9021
9021
  const i = /* @__PURE__ */ new Set();
9022
9022
  i.add({
9023
- msgType: z.AuthClear,
9023
+ msgType: x.AuthClear,
9024
9024
  dataType: B.Local,
9025
9025
  viewId: t,
9026
9026
  clearUids: e,
@@ -9029,9 +9029,9 @@ class Cg extends Sg {
9029
9029
  }), this.control.hasOffscreenCanvas() ? this.fullWorker.postMessage(i) : (n = this.mainThread) == null || n.consume(i);
9030
9030
  }
9031
9031
  }
9032
- var kg = $t, xg = function() {
9032
+ var kg = $t, zg = function() {
9033
9033
  return kg.Date.now();
9034
- }, zg = xg, Lg = /\s/;
9034
+ }, xg = zg, Lg = /\s/;
9035
9035
  function bg(a) {
9036
9036
  for (var o = a.length; o-- && Lg.test(a.charAt(o)); )
9037
9037
  ;
@@ -9061,29 +9061,29 @@ function Gg(a) {
9061
9061
  var t = Hg.test(a);
9062
9062
  return t || $g.test(a) ? Qg(a.slice(2), t ? 2 : 8) : Vg.test(a) ? Bi : +a;
9063
9063
  }
9064
- var Zg = Gg, Jg = re, zo = zg, Fi = Zg, Xg = "Expected a function", qg = Math.max, Kg = Math.min;
9064
+ var Zg = Gg, Jg = re, xo = xg, Fi = Zg, Xg = "Expected a function", qg = Math.max, Kg = Math.min;
9065
9065
  function _g(a, o, t) {
9066
9066
  var e, i, s, n, r, c, l = 0, h = !1, u = !1, d = !0;
9067
9067
  if (typeof a != "function")
9068
9068
  throw new TypeError(Xg);
9069
9069
  o = Fi(o) || 0, Jg(t) && (h = !!t.leading, u = "maxWait" in t, s = u ? qg(Fi(t.maxWait) || 0, o) : s, d = "trailing" in t ? !!t.trailing : d);
9070
9070
  function p(N) {
9071
- var x = e, L = i;
9072
- return e = i = void 0, l = N, n = a.apply(L, x), n;
9071
+ var z = e, L = i;
9072
+ return e = i = void 0, l = N, n = a.apply(L, z), n;
9073
9073
  }
9074
9074
  function f(N) {
9075
9075
  return l = N, r = setTimeout(v, o), h ? p(N) : n;
9076
9076
  }
9077
9077
  function y(N) {
9078
- var x = N - c, L = N - l, D = o - x;
9078
+ var z = N - c, L = N - l, D = o - z;
9079
9079
  return u ? Kg(D, s - L) : D;
9080
9080
  }
9081
9081
  function M(N) {
9082
- var x = N - c, L = N - l;
9083
- return c === void 0 || x >= o || x < 0 || u && L >= s;
9082
+ var z = N - c, L = N - l;
9083
+ return c === void 0 || z >= o || z < 0 || u && L >= s;
9084
9084
  }
9085
9085
  function v() {
9086
- var N = zo();
9086
+ var N = xo();
9087
9087
  if (M(N))
9088
9088
  return w(N);
9089
9089
  r = setTimeout(v, y(N));
@@ -9095,11 +9095,11 @@ function _g(a, o, t) {
9095
9095
  r !== void 0 && clearTimeout(r), l = 0, e = c = i = r = void 0;
9096
9096
  }
9097
9097
  function T() {
9098
- return r === void 0 ? n : w(zo());
9098
+ return r === void 0 ? n : w(xo());
9099
9099
  }
9100
9100
  function I() {
9101
- var N = zo(), x = M(N);
9102
- if (e = arguments, i = this, c = N, x) {
9101
+ var N = xo(), z = M(N);
9102
+ if (e = arguments, i = this, c = N, z) {
9103
9103
  if (r === void 0)
9104
9104
  return f(c);
9105
9105
  if (u)
@@ -9308,7 +9308,7 @@ class aM {
9308
9308
  t && this.pageAuthEffect(e), this.isLocalRender = !1;
9309
9309
  const l = this.serializablePageData(e);
9310
9310
  (u = this.control.collector) == null || u.dispatchAuth({
9311
- type: z.AuthPage,
9311
+ type: x.AuthPage,
9312
9312
  viewId: e,
9313
9313
  pageData: l
9314
9314
  }, !0);
@@ -9331,7 +9331,7 @@ class aM {
9331
9331
  }
9332
9332
  const n = this.serializablePageData(t);
9333
9333
  (c = this.control.collector) == null || c.dispatchAuth({
9334
- type: z.AuthPage,
9334
+ type: x.AuthPage,
9335
9335
  viewId: t,
9336
9336
  pageData: n
9337
9337
  }, !0);
@@ -9341,7 +9341,7 @@ class aM {
9341
9341
  if (this.pageAuth.get(o)) {
9342
9342
  if (t) {
9343
9343
  this.pageAuth.delete(o), (i = this.control.collector) == null || i.dispatchAuth({
9344
- type: z.AuthPage,
9344
+ type: x.AuthPage,
9345
9345
  viewId: o
9346
9346
  }, t);
9347
9347
  return;
@@ -9368,7 +9368,7 @@ class aM {
9368
9368
  if (e) {
9369
9369
  const c = this.serializablePageData(o);
9370
9370
  (r = this.control.collector) == null || r.dispatchAuth({
9371
- type: z.AuthPage,
9371
+ type: x.AuthPage,
9372
9372
  viewId: o,
9373
9373
  pageData: c
9374
9374
  }, e);
@@ -9405,7 +9405,7 @@ class aM {
9405
9405
  if (e && this.pageAuthEffect(i), t) {
9406
9406
  const u = this.serializablePageData(i);
9407
9407
  (h = this.control.collector) == null || h.dispatchAuth({
9408
- type: z.AuthPage,
9408
+ type: x.AuthPage,
9409
9409
  viewId: i,
9410
9410
  pageData: u
9411
9411
  }, t);
@@ -9427,7 +9427,7 @@ class aM {
9427
9427
  if (e && this.pageAuthEffect(i), t) {
9428
9428
  const u = this.serializablePageData(i);
9429
9429
  (h = this.control.collector) == null || h.dispatchAuth({
9430
- type: z.AuthPage,
9430
+ type: x.AuthPage,
9431
9431
  viewId: i,
9432
9432
  pageData: u
9433
9433
  }, t);
@@ -9443,7 +9443,7 @@ class aM {
9443
9443
  this.isLocalRender = !1;
9444
9444
  const c = this.serializablePageData(o);
9445
9445
  (r = this.control.collector) == null || r.dispatchAuth({
9446
- type: z.AuthPage,
9446
+ type: x.AuthPage,
9447
9447
  viewId: o,
9448
9448
  pageData: c
9449
9449
  }, i);
@@ -9515,7 +9515,7 @@ class aM {
9515
9515
  const y = (u = this.control.collector) == null ? void 0 : u.uid, M = p === "localSelf" ? y : p, v = M && f.get(M) || void 0;
9516
9516
  if (v)
9517
9517
  switch (t) {
9518
- case z.RemoveNode:
9518
+ case x.RemoveNode:
9519
9519
  return !0;
9520
9520
  default:
9521
9521
  return v.has(s);
@@ -9554,7 +9554,7 @@ class aM {
9554
9554
  } else
9555
9555
  this.renderUids.delete(t);
9556
9556
  i && ((s = this.control.collector) == null || s.dispatchAuth({
9557
- type: z.AuthReader,
9557
+ type: x.AuthReader,
9558
9558
  viewId: t,
9559
9559
  renderData: e
9560
9560
  }, i)), this.renderEffect(t);
@@ -9578,7 +9578,7 @@ class aM {
9578
9578
  r[c] = l === !0 ? !0 : At(l) && l.size ? Array.from(l) : void 0;
9579
9579
  }
9580
9580
  (n = this.control.collector) == null || n.dispatchAuth({
9581
- type: z.AuthReader,
9581
+ type: x.AuthReader,
9582
9582
  viewId: o,
9583
9583
  renderData: r
9584
9584
  }, i);
@@ -9596,7 +9596,7 @@ class aM {
9596
9596
  r[c] = l === !0 ? !0 : At(l) && l.size ? Array.from(l) : void 0;
9597
9597
  }
9598
9598
  (n = this.control.collector) == null || n.dispatchAuth({
9599
- type: z.AuthReader,
9599
+ type: x.AuthReader,
9600
9600
  viewId: o,
9601
9601
  renderData: r
9602
9602
  }, i);
@@ -9634,7 +9634,7 @@ class aM {
9634
9634
  destoryByViewId(o, t = !1) {
9635
9635
  var e;
9636
9636
  this.renderUids.has(o) && (this.renderUids.delete(o), t || (e = this.control.collector) == null || e.dispatchAuth({
9637
- type: z.AuthReader,
9637
+ type: x.AuthReader,
9638
9638
  viewId: o
9639
9639
  })), this.pageAuth.has(o) && this.control.renderControl.delViewPage(o, !t);
9640
9640
  }
@@ -9681,7 +9681,7 @@ class aM {
9681
9681
  if (n.add(h), !Object.keys(s).includes(h)) {
9682
9682
  const u = It(s[l]);
9683
9683
  (c = this.control.collector) == null || c.updateValue(h, {
9684
- type: z.FullWork,
9684
+ type: x.FullWork,
9685
9685
  ...u,
9686
9686
  workId: h
9687
9687
  }, { isSync: !0, viewId: o, scenePath: t });
@@ -10174,7 +10174,7 @@ const ue = class ue {
10174
10174
  return !!t.includes(e);
10175
10175
  }
10176
10176
  refreshPlugin(o, t = !1) {
10177
- var n, r, c, l, h, u, d, p, f, y, M, v, w, m, T, I, N, x, L, D, E;
10177
+ var n, r, c, l, h, u, d, p, f, y, M, v, w, m, T, I, N, z, L, D, E;
10178
10178
  let e;
10179
10179
  const { scenePath: i } = o, s = o.data;
10180
10180
  if (!(!s || !this.collector))
@@ -10254,7 +10254,7 @@ const ue = class ue {
10254
10254
  (N = this.collector) == null || N.updateValue(K, H, { isAfterUpdate: !0, viewId: this.viewId, scenePath: i, isSync: !0 });
10255
10255
  } else if (!t && Array.isArray(j) && j.length === 2) {
10256
10256
  const H = j[0];
10257
- if ((x = H.updateNodeOpt) != null && x.useAnimation && (H.updateNodeOpt.useAnimation = !1), ((L = this.collector) == null ? void 0 : L.getLocalId(P.key)) === F && ((D = this.collector) != null && D.isOwn(P.key))) {
10257
+ if ((z = H.updateNodeOpt) != null && z.useAnimation && (H.updateNodeOpt.useAnimation = !1), ((L = this.collector) == null ? void 0 : L.getLocalId(P.key)) === F && ((D = this.collector) != null && D.isOwn(P.key))) {
10258
10258
  const _ = H.selectIds;
10259
10259
  if (_) {
10260
10260
  const $ = et.filter((X) => {
@@ -10431,7 +10431,7 @@ class Oe {
10431
10431
  render(o) {
10432
10432
  var t, e, i, s, n, r, c, l, h, u, d, p, f, y, M, v, w;
10433
10433
  for (const m of o) {
10434
- const { rect: T, imageBitmap: I, isClear: N, isUnClose: x, drawCanvas: L, clearCanvas: D, viewId: E } = m, P = (t = this.getView(E)) == null ? void 0 : t.displayer;
10434
+ const { rect: T, imageBitmap: I, isClear: N, isUnClose: z, drawCanvas: L, clearCanvas: D, viewId: E } = m, P = (t = this.getView(E)) == null ? void 0 : t.displayer;
10435
10435
  if (P && T) {
10436
10436
  const { dpr: A, canvasBgRef: j, canvasFloatRef: K, canvasServiceFloatRef: nt, canvasTopRef: et } = P, H = Math.floor(T.w * A), _ = Math.floor(T.h * A), $ = T.x * A, Q = T.y * A;
10437
10437
  if (N) {
@@ -10469,7 +10469,7 @@ class Oe {
10469
10469
  break;
10470
10470
  }
10471
10471
  }
10472
- if (x)
10472
+ if (z)
10473
10473
  continue;
10474
10474
  I == null || I.close();
10475
10475
  }
@@ -10591,11 +10591,11 @@ class lM {
10591
10591
  }
10592
10592
  }
10593
10593
  });
10594
- g(this, "cursorMouseMove", zt((o) => {
10594
+ g(this, "cursorMouseMove", xt((o) => {
10595
10595
  const t = this.getPoint(o);
10596
10596
  this.cacheCursorPoint && ut(t, this.cacheCursorPoint) || !this.viewId || (this.cacheCursorPoint = t, t && this.control.worker.sendCursorEvent(t, this.viewId));
10597
10597
  }, 30, { leading: !1 }));
10598
- g(this, "cursorMouseLeave", zt(() => {
10598
+ g(this, "cursorMouseLeave", xt(() => {
10599
10599
  this.viewId && (this.cacheCursorPoint = [void 0, void 0], this.control.worker.sendCursorEvent(this.cacheCursorPoint, this.viewId));
10600
10600
  }, 30, { leading: !1 }));
10601
10601
  g(this, "keydown", (o) => {
@@ -10748,11 +10748,11 @@ class Bs {
10748
10748
  const t = this.getPoint(o) || this.cachePoint;
10749
10749
  t && this.control.worker.originalEventLintener(b.Done, t, this.viewId), this.cachePoint = void 0;
10750
10750
  });
10751
- g(this, "cursorMouseMove", zt((o) => {
10751
+ g(this, "cursorMouseMove", xt((o) => {
10752
10752
  const t = this.getPoint(o);
10753
10753
  this.cacheCursorPoint && ut(t, this.cacheCursorPoint) || (this.cacheCursorPoint = t, t && this.control.worker.sendCursorEvent(t, this.viewId));
10754
10754
  }, 30, { leading: !1 }));
10755
- g(this, "cursorMouseLeave", zt(() => {
10755
+ g(this, "cursorMouseLeave", xt(() => {
10756
10756
  this.cacheCursorPoint = [void 0, void 0], this.control.worker.sendCursorEvent(this.cacheCursorPoint, this.viewId);
10757
10757
  }, 30, { leading: !1 }));
10758
10758
  g(this, "keydown", (o) => {
@@ -11012,7 +11012,7 @@ const SM = (a) => {
11012
11012
  l,
11013
11013
  /* @__PURE__ */ S.createElement("img", { alt: "icon", src: St(o ? "layer-pressed" : "layer") })
11014
11014
  );
11015
- }, xM = () => /* @__PURE__ */ S.createElement("svg", { style: { marginLeft: "2px" }, viewBox: "0 0 1025 1024", width: "14", height: "14" }, /* @__PURE__ */ S.createElement("path", { d: "M1016.5248 493.8752c-9.984-9.984-26.2144-9.984-36.1984 0l-183.6032 183.6032c-29.952 29.952-78.6944 29.952-108.5952 0l-239.2064-239.2064c-14.4384-14.4384-22.3744-33.6896-22.3744-54.3232s7.936-39.8848 22.3744-54.3232l183.6032-183.6032c9.984-9.984 9.984-26.2144 0-36.1984s-26.2144-9.984-36.1984 0l-183.6032 183.6032c-24.1152 24.1152-37.376 56.2176-37.376 90.5216 0 14.592 2.4576 28.8256 7.0656 42.1888l-374.8864 374.8864c-4.8128 4.8128-7.4752 11.3152-7.4752 18.1248l0 76.8c0 14.1312 11.4688 25.6 25.6 25.6l486.4 0c6.8096 0 13.312-2.7136 18.1248-7.4752l170.0864-170.0864c13.3632 4.6592 27.5968 7.0656 42.1888 7.0656 34.2528 0 66.4064-13.2608 90.5216-37.376l183.6032-183.6032c9.984-9.984 9.984-26.2144 0-36.1984zM501.4016 870.4l-450.2016 0 0-40.6016 358.5024-358.5024c1.024 1.0752 1.9968 2.1504 3.0208 3.1744l239.2064 239.2064c1.024 1.024 2.0992 2.048 3.1744 3.0208l-153.7024 153.7024z", fill: "#000000" })), Fs = (a) => {
11015
+ }, zM = () => /* @__PURE__ */ S.createElement("svg", { style: { marginLeft: "2px" }, viewBox: "0 0 1025 1024", width: "14", height: "14" }, /* @__PURE__ */ S.createElement("path", { d: "M1016.5248 493.8752c-9.984-9.984-26.2144-9.984-36.1984 0l-183.6032 183.6032c-29.952 29.952-78.6944 29.952-108.5952 0l-239.2064-239.2064c-14.4384-14.4384-22.3744-33.6896-22.3744-54.3232s7.936-39.8848 22.3744-54.3232l183.6032-183.6032c9.984-9.984 9.984-26.2144 0-36.1984s-26.2144-9.984-36.1984 0l-183.6032 183.6032c-24.1152 24.1152-37.376 56.2176-37.376 90.5216 0 14.592 2.4576 28.8256 7.0656 42.1888l-374.8864 374.8864c-4.8128 4.8128-7.4752 11.3152-7.4752 18.1248l0 76.8c0 14.1312 11.4688 25.6 25.6 25.6l486.4 0c6.8096 0 13.312-2.7136 18.1248-7.4752l170.0864-170.0864c13.3632 4.6592 27.5968 7.0656 42.1888 7.0656 34.2528 0 66.4064-13.2608 90.5216-37.376l183.6032-183.6032c9.984-9.984 9.984-26.2144 0-36.1984zM501.4016 870.4l-450.2016 0 0-40.6016 358.5024-358.5024c1.024 1.0752 1.9968 2.1504 3.0208 3.1744l239.2064 239.2064c1.024 1.024 2.0992 2.048 3.1744 3.0208l-153.7024 153.7024z", fill: "#000000" })), Fs = (a) => {
11016
11016
  const { activeColor: o, onClickHandler: t, onTouchEndHandler: e } = a;
11017
11017
  return /* @__PURE__ */ S.createElement(
11018
11018
  "div",
@@ -11040,13 +11040,13 @@ const SM = (a) => {
11040
11040
  s({ x: o * 100 + 8, y: 0 });
11041
11041
  }, []), !t)
11042
11042
  return null;
11043
- const n = zt((l, h) => {
11043
+ const n = xt((l, h) => {
11044
11044
  l.cancelable && l.preventDefault(), l.stopPropagation(), h.x !== (i == null ? void 0 : i.x) && s({ x: h.x, y: 0 });
11045
11045
  const u = Math.min(Math.max(h.x - 8, 0), 100) / 100;
11046
11046
  o !== u && e(u, t, b.Doing);
11047
11047
  }, 100, { leading: !1 }), r = (l) => {
11048
11048
  l.cancelable && l.preventDefault(), l.stopPropagation(), e(o, t, b.Start);
11049
- }, c = zt((l, h) => {
11049
+ }, c = xt((l, h) => {
11050
11050
  l.cancelable && l.preventDefault(), l.stopPropagation(), h.x !== (i == null ? void 0 : i.x) && s({ x: h.x, y: 0 });
11051
11051
  const u = Math.min(Math.max(h.x - 8, 0), 100) / 100;
11052
11052
  e(u, t, b.Done);
@@ -11094,20 +11094,20 @@ const SM = (a) => {
11094
11094
  )
11095
11095
  ))
11096
11096
  );
11097
- }, zM = (a) => {
11097
+ }, xM = (a) => {
11098
11098
  const { min: o, max: t, activeNumber: e, setActiveNumber: i, color: s } = a, [n, r] = ot({ x: 108, y: 0 });
11099
11099
  if (pt(() => {
11100
11100
  const u = Math.ceil((e - o) / (t - o) * 100) + 8;
11101
11101
  r({ x: u, y: 0 });
11102
11102
  }, []), !e)
11103
11103
  return null;
11104
- const c = zt((u, d) => {
11104
+ const c = xt((u, d) => {
11105
11105
  u.cancelable && u.preventDefault(), u.stopPropagation(), d.x !== (n == null ? void 0 : n.x) && r({ x: d.x, y: 0 });
11106
11106
  const p = Math.ceil(Math.max(d.x - 8, 0) / 100 * (t - o) + o);
11107
11107
  e !== p && i(p, b.Doing);
11108
11108
  }, 100, { leading: !1 }), l = (u) => {
11109
11109
  u.cancelable && u.preventDefault(), u.stopPropagation(), i(e, b.Start);
11110
- }, h = zt((u, d) => {
11110
+ }, h = xt((u, d) => {
11111
11111
  u.cancelable && u.preventDefault(), u.stopPropagation(), d.x !== (n == null ? void 0 : n.x) && r({ x: d.x, y: 0 });
11112
11112
  const p = Math.ceil(Math.max(d.x - 8, 0) / 100 * (t - o) + o);
11113
11113
  i(p, b.Done);
@@ -11234,7 +11234,7 @@ const SM = (a) => {
11234
11234
  { workIds: [F], strokeColor: I, workState: T, viewId: n == null ? void 0 : n.viewId }
11235
11235
  );
11236
11236
  } }), [h, c, n == null ? void 0 : n.control.room, n == null ? void 0 : n.viewId, i]), f = Z(() => c && (i != null && i.thickness) ? /* @__PURE__ */ S.createElement(
11237
- zM,
11237
+ xM,
11238
11238
  {
11239
11239
  key: "strokeThickness",
11240
11240
  min: 1,
@@ -11638,7 +11638,7 @@ const SM = (a) => {
11638
11638
  w.cancelable && w.preventDefault(), w.stopPropagation(), w.nativeEvent.stopImmediatePropagation(), t(!o);
11639
11639
  }
11640
11640
  },
11641
- /* @__PURE__ */ S.createElement(xM, null),
11641
+ /* @__PURE__ */ S.createElement(zM, null),
11642
11642
  v,
11643
11643
  M
11644
11644
  );
@@ -12019,7 +12019,7 @@ const SM = (a) => {
12019
12019
  pt(() => {
12020
12020
  n({ x: o * 100, y: 0 });
12021
12021
  }, []);
12022
- const r = zt((h, u) => {
12022
+ const r = xt((h, u) => {
12023
12023
  h.cancelable && h.preventDefault(), h.stopPropagation();
12024
12024
  let d = Math.floor(Math.max(u.x, t * 100));
12025
12025
  d = Math.floor(Math.min(d, e * 100)), u.x !== (s == null ? void 0 : s.x) && n({ x: d, y: 0 });
@@ -12027,7 +12027,7 @@ const SM = (a) => {
12027
12027
  o !== p && i(p);
12028
12028
  }, 100, { leading: !1 }), c = (h) => {
12029
12029
  h.cancelable && h.preventDefault(), h.stopPropagation();
12030
- }, l = zt((h, u) => {
12030
+ }, l = xt((h, u) => {
12031
12031
  h.cancelable && h.preventDefault(), h.stopPropagation();
12032
12032
  let d = Math.floor(Math.max(u.x, t * 100));
12033
12033
  d = Math.floor(Math.min(d, e * 100)), u.x !== (s == null ? void 0 : s.x) && n({ x: d, y: 0 });
@@ -12263,9 +12263,9 @@ const SM = (a) => {
12263
12263
  ), [l, h] = S.useState(), u = Se(null);
12264
12264
  pt(() => {
12265
12265
  var L, D, E, P;
12266
- const I = {}, N = (s == null ? void 0 : s.w) || ((L = o == null ? void 0 : o.boxSize) == null ? void 0 : L[0]) || 0, x = (s == null ? void 0 : s.h) || ((D = o == null ? void 0 : o.boxSize) == null ? void 0 : D[1]) || 0;
12267
- if (i && N && x && (n != null && n.width) && (n != null && n.height)) {
12268
- if (i.y < 60 ? i.y + x < n.height - 60 ? I.bottom = -120 : i.y + x < n.height ? I.bottom = -58 : i.y > 0 ? I.top = 62 : I.top = -i.y + 62 : I.top = 0, i.x < 0)
12266
+ const I = {}, N = (s == null ? void 0 : s.w) || ((L = o == null ? void 0 : o.boxSize) == null ? void 0 : L[0]) || 0, z = (s == null ? void 0 : s.h) || ((D = o == null ? void 0 : o.boxSize) == null ? void 0 : D[1]) || 0;
12267
+ if (i && N && z && (n != null && n.width) && (n != null && n.height)) {
12268
+ if (i.y < 60 ? i.y + z < n.height - 60 ? I.bottom = -120 : i.y + z < n.height ? I.bottom = -58 : i.y > 0 ? I.top = 62 : I.top = -i.y + 62 : I.top = 0, i.x < 0)
12269
12269
  I.left = -i.x + 3;
12270
12270
  else if (i.x + (((E = u.current) == null ? void 0 : E.offsetWidth) || N) > n.width) {
12271
12271
  const A = n.width - (((P = u.current) == null ? void 0 : P.offsetWidth) || N) - i.x;
@@ -12352,13 +12352,13 @@ const SM = (a) => {
12352
12352
  italic: T,
12353
12353
  uid: I,
12354
12354
  workState: N
12355
- } = s, x = u, L = w || x * 1.2, D = {
12356
- fontSize: `${x}px`,
12355
+ } = s, z = u, L = w || z * 1.2, D = {
12356
+ fontSize: `${z}px`,
12357
12357
  lineHeight: `${L}px`,
12358
12358
  color: f,
12359
12359
  borderColor: v,
12360
12360
  minHeight: `${L}px`,
12361
- paddingRight: `${T === "italic" ? Math.round(x * 0.3) : 5}px`
12361
+ paddingRight: `${T === "italic" ? Math.round(z * 0.3) : 5}px`
12362
12362
  };
12363
12363
  d && (D.fontFamily = `${d}`), (y || p) && (D.textDecoration = `${y && "line-through" || ""}${p && " underline" || ""}`), m && (D.fontWeight = `${m}`), T && (D.fontStyle = `${T}`), M && (D.textAlign = `${M}`);
12364
12364
  function E() {
@@ -12429,7 +12429,7 @@ const SM = (a) => {
12429
12429
  lineHeight: w,
12430
12430
  bold: m,
12431
12431
  italic: T
12432
- } = n, I = u, N = w || I * 1.2, x = {
12432
+ } = n, I = u, N = w || I * 1.2, z = {
12433
12433
  fontSize: `${I}px`,
12434
12434
  lineHeight: `${N}px`,
12435
12435
  color: f,
@@ -12438,7 +12438,7 @@ const SM = (a) => {
12438
12438
  pointerEvents: "none",
12439
12439
  paddingRight: `${T === "italic" ? Math.round(I * 0.3) : 5}px`
12440
12440
  };
12441
- d && (x.fontFamily = `${d}`), (y || p) && (x.textDecoration = `${y && "line-through" || ""}${p && " underline" || ""}`), M && (x.textAlign = `${M}`), m && (x.fontWeight = `${m}`), T && (x.fontStyle = `${T}`);
12441
+ d && (z.fontFamily = `${d}`), (y || p) && (z.textDecoration = `${y && "line-through" || ""}${p && " underline" || ""}`), M && (z.textAlign = `${M}`), m && (z.fontWeight = `${m}`), T && (z.fontStyle = `${T}`);
12442
12442
  const L = Z(() => {
12443
12443
  const D = [];
12444
12444
  if (n.text) {
@@ -12469,7 +12469,7 @@ const SM = (a) => {
12469
12469
  {
12470
12470
  className: "editor readOnly",
12471
12471
  ref: l,
12472
- style: x
12472
+ style: z
12473
12473
  },
12474
12474
  L
12475
12475
  )
@@ -12484,7 +12484,7 @@ const SM = (a) => {
12484
12484
  fontColor: T,
12485
12485
  lineThrough: I,
12486
12486
  textAlign: N,
12487
- strokeColor: x,
12487
+ strokeColor: z,
12488
12488
  lineHeight: L,
12489
12489
  bold: D,
12490
12490
  italic: E,
@@ -12494,13 +12494,13 @@ const SM = (a) => {
12494
12494
  fontSize: `${st}px`,
12495
12495
  lineHeight: `${ct}px`,
12496
12496
  color: T,
12497
- borderColor: x,
12497
+ borderColor: z,
12498
12498
  minHeight: `${ct}px`,
12499
12499
  paddingRight: `${E === "italic" ? Math.round(st * 0.3) : 5}px`,
12500
12500
  borderWidth: `${Math.max(Math.round(1 / (p || 1)), 1)}px`
12501
12501
  };
12502
12502
  return w && (Y.fontFamily = `${w}`), (I || m) && (Y.textDecoration = `${I && "line-through" || ""} ${m && " underline" || ""}`), N && (Y.textAlign = `${N}`), D && (Y.fontWeight = `${D}`), E && (Y.fontStyle = `${E}`), Y;
12503
- }, [D, T, w, v, E, L, I, p, x, N, m]), K = Z(() => {
12503
+ }, [D, T, w, v, E, L, I, p, z, N, m]), K = Z(() => {
12504
12504
  const st = `scale(${p || 1}) ${f && "translate(" + f[0] + "px," + f[1] + "px)" || ""}`;
12505
12505
  return {
12506
12506
  left: `${y}px`,
@@ -13007,7 +13007,7 @@ const ey = () => {
13007
13007
  O.TranslateNode,
13008
13008
  { workIds: [F], position: { x: o == null ? void 0 : o.x, y: o == null ? void 0 : o.y }, workState: b.Start, viewId: e == null ? void 0 : e.viewId }
13009
13009
  ));
13010
- }, y = zt((m, T) => {
13010
+ }, y = xt((m, T) => {
13011
13011
  if (m.cancelable && m.preventDefault(), e != null && e.control.worker.isBusy) {
13012
13012
  d(!0), n(b.Pending);
13013
13013
  return;
@@ -13019,7 +13019,7 @@ const ey = () => {
13019
13019
  O.TranslateNode,
13020
13020
  { workIds: [F], position: I, workState: b.Done, viewId: e == null ? void 0 : e.viewId }
13021
13021
  );
13022
- }, 100, { leading: !1 }), M = zt((m, T) => {
13022
+ }, 100, { leading: !1 }), M = xt((m, T) => {
13023
13023
  if (m.cancelable && m.preventDefault(), m.stopPropagation(), e != null && e.control.worker.isBusy) {
13024
13024
  d(!0), n(b.Pending);
13025
13025
  return;
@@ -13030,7 +13030,7 @@ const ey = () => {
13030
13030
  O.TranslateNode,
13031
13031
  { workIds: [F], position: I, workState: b.Doing, viewId: e == null ? void 0 : e.viewId }
13032
13032
  ));
13033
- }, 100, { leading: !1 }), v = Z(() => !!((o == null ? void 0 : o.scaleType) === lt.none && (o != null && o.canLock)), [o]), w = zt((m) => (m.stopPropagation(), m.cancelable && m.preventDefault(), (r == null ? void 0 : r.x) === (o == null ? void 0 : o.x) && (r == null ? void 0 : r.y) === (o == null ? void 0 : o.y) && i(m), !1), 100, { leading: !1 });
13033
+ }, 100, { leading: !1 }), v = Z(() => !!((o == null ? void 0 : o.scaleType) === lt.none && (o != null && o.canLock)), [o]), w = xt((m) => (m.stopPropagation(), m.cancelable && m.preventDefault(), (r == null ? void 0 : r.x) === (o == null ? void 0 : o.x) && (r == null ? void 0 : r.y) === (o == null ? void 0 : o.y) && i(m), !1), 100, { leading: !1 });
13034
13034
  return /* @__PURE__ */ S.createElement(
13035
13035
  Ce,
13036
13036
  {
@@ -13066,41 +13066,41 @@ const ey = () => {
13066
13066
  const { className: o } = a, [t, e] = ot({ x: 0, y: 0, h: 0, w: 0 }), [i, s] = ot(), [n, r] = ot(), [c, l] = ot(), { floatBarData: h, mananger: u } = vt(mt), [d, p] = ot(), [f, y] = ot(!1);
13067
13067
  pt(() => {
13068
13068
  if (h && u) {
13069
- const x = { x: h.x, y: h.y, w: h.w, h: h.h };
13070
- e(x);
13069
+ const z = { x: h.x, y: h.y, w: h.w, h: h.h };
13070
+ e(z);
13071
13071
  }
13072
13072
  return J.activeListener(M), () => {
13073
13073
  J.unmountActiveListener(M);
13074
13074
  };
13075
13075
  }, []);
13076
- const M = (x) => {
13076
+ const M = (z) => {
13077
13077
  var L;
13078
- if (!x) {
13078
+ if (!z) {
13079
13079
  y(!0);
13080
13080
  return;
13081
13081
  }
13082
13082
  y(!1), (L = u == null ? void 0 : u.control.room) != null && L.disableDeviceInputs && (u.control.room.disableDeviceInputs = !1);
13083
- }, v = (x) => [
13084
- [x.x, x.y],
13085
- [x.x + x.w, x.y],
13086
- [x.x + x.w, x.y + x.h],
13087
- [x.x, x.y + x.h]
13088
- ], w = (x, L) => {
13083
+ }, v = (z) => [
13084
+ [z.x, z.y],
13085
+ [z.x + z.w, z.y],
13086
+ [z.x + z.w, z.y + z.h],
13087
+ [z.x, z.y + z.h]
13088
+ ], w = (z, L) => {
13089
13089
  switch (L) {
13090
13090
  case "top":
13091
13091
  case "topLeft":
13092
13092
  case "left":
13093
- return x[2];
13093
+ return z[2];
13094
13094
  case "topRight":
13095
- return x[3];
13095
+ return z[3];
13096
13096
  case "right":
13097
13097
  case "bottomRight":
13098
13098
  case "bottom":
13099
- return x[0];
13099
+ return z[0];
13100
13100
  case "bottomLeft":
13101
- return x[1];
13101
+ return z[1];
13102
13102
  }
13103
- }, m = (x, L, D, E) => {
13103
+ }, m = (z, L, D, E) => {
13104
13104
  let P = !1, A = !1;
13105
13105
  const j = {
13106
13106
  x: t.x,
@@ -13108,7 +13108,7 @@ const ey = () => {
13108
13108
  w: t.w,
13109
13109
  h: t.h
13110
13110
  }, K = [1, 1], nt = [0, 0];
13111
- switch (x) {
13111
+ switch (z) {
13112
13112
  case "top": {
13113
13113
  const $ = L.height + t.h;
13114
13114
  $ < 0 ? (A = !0, j.y = t.y + t.h, j.h = Math.abs($)) : (j.y = t.y - L.height, j.h = t.h + L.height);
@@ -13159,10 +13159,10 @@ const ey = () => {
13159
13159
  }
13160
13160
  }
13161
13161
  K[0] = j.w / t.w, K[1] = j.h / t.h;
13162
- const H = v(j).map(($) => D.control.viewContainerManager.transformToScenePoint($, D.viewId)), _ = w(H, x);
13162
+ const H = v(j).map(($) => D.control.viewContainerManager.transformToScenePoint($, D.viewId)), _ = w(H, z);
13163
13163
  return A && (nt[1] = _[1] - E[1]), P && (nt[0] = _[0] - E[0]), { scale: K, translate: nt };
13164
- }, T = (x, L) => {
13165
- if (x.cancelable && x.preventDefault(), x.stopPropagation(), u != null && u.control.worker.isBusy) {
13164
+ }, T = (z, L) => {
13165
+ if (z.cancelable && z.preventDefault(), z.stopPropagation(), u != null && u.control.worker.isBusy) {
13166
13166
  y(!0);
13167
13167
  return;
13168
13168
  }
@@ -13174,8 +13174,8 @@ const ey = () => {
13174
13174
  { workIds: [F], originPoint: A, scenePoint: j, workState: b.Start, viewId: u.viewId }
13175
13175
  );
13176
13176
  }
13177
- }, I = zt((x, L, D, E) => {
13178
- if (x.cancelable && x.preventDefault(), x.stopPropagation(), !u || !i || !n)
13177
+ }, I = xt((z, L, D, E) => {
13178
+ if (z.cancelable && z.preventDefault(), z.stopPropagation(), !u || !i || !n)
13179
13179
  return;
13180
13180
  if (u != null && u.control.worker.isBusy) {
13181
13181
  y(!0);
@@ -13190,8 +13190,8 @@ const ey = () => {
13190
13190
  O.ScaleNode,
13191
13191
  { workIds: [F], scale: P, dir: L, translate: A, originPoint: i, scenePoint: n, workState: b.Doing, viewId: u.viewId }
13192
13192
  ));
13193
- }, 100, { leading: !1 }), N = zt((x) => {
13194
- if (x.cancelable && x.preventDefault(), x.stopPropagation(), !(!u || !i || !n)) {
13193
+ }, 100, { leading: !1 }), N = xt((z) => {
13194
+ if (z.cancelable && z.preventDefault(), z.stopPropagation(), !(!u || !i || !n)) {
13195
13195
  if (u != null && u.control.worker.isBusy) {
13196
13196
  y(!0);
13197
13197
  return;
@@ -13265,7 +13265,7 @@ const ey = () => {
13265
13265
  O.SetPoint,
13266
13266
  { workId: F, pointMap: e, workState: b.Start, viewId: n == null ? void 0 : n.viewId }
13267
13267
  ));
13268
- }, M = zt((w, m) => {
13268
+ }, M = xt((w, m) => {
13269
13269
  if (w.cancelable && w.preventDefault(), w.stopPropagation(), n != null && n.control.worker.isBusy) {
13270
13270
  p(!0), u(b.Pending);
13271
13271
  return;
@@ -13279,7 +13279,7 @@ const ey = () => {
13279
13279
  { workId: F, pointMap: e, workState: b.Doing, viewId: n == null ? void 0 : n.viewId }
13280
13280
  );
13281
13281
  }
13282
- }, 100, { leading: !1 }), v = zt((w, m) => {
13282
+ }, 100, { leading: !1 }), v = xt((w, m) => {
13283
13283
  if (w.cancelable && w.preventDefault(), n != null && n.control.worker.isBusy) {
13284
13284
  p(!0), u(b.Pending);
13285
13285
  return;
@@ -14156,8 +14156,8 @@ const V = class V extends Zi {
14156
14156
  V.logger.info("[ApplianceMultiPlugin] screenshotToCanvasAsync");
14157
14157
  let T = M, I = v, N = w.scale;
14158
14158
  T > this.maxScreenshotWidth && (N = this.maxScreenshotWidth / T * N, T = this.maxScreenshotWidth), I > this.maxScreenshotHeight && (N = Math.min(this.maxScreenshotHeight / I * N, N), I = this.maxScreenshotHeight), w.scale = N;
14159
- const x = document.createElement("canvas"), L = x.getContext("2d");
14160
- x.width = T * (m || 1), x.height = I * (m || 1), L && ((t.mainView || i).screenshotToCanvas(L, y, T, I, w, m), f.drawImage(x, Math.floor((M - T) / 2), Math.floor((v - I) / 2), T * (m || 1), I * (m || 1), 0, 0, T, I), x.remove()), V.currentManager && await ((D = V.currentManager) == null ? void 0 : D.screenshotToCanvas(f, y, T, I, w, Math.floor((M - T) / 2), Math.floor((v - I) / 2)));
14159
+ const z = document.createElement("canvas"), L = z.getContext("2d");
14160
+ z.width = T * (m || 1), z.height = I * (m || 1), L && ((t.mainView || i).screenshotToCanvas(L, y, T, I, w, m), f.drawImage(z, Math.floor((M - T) / 2), Math.floor((v - I) / 2), T * (m || 1), I * (m || 1), 0, 0, T, I), z.remove()), V.currentManager && await ((D = V.currentManager) == null ? void 0 : D.screenshotToCanvas(f, y, T, I, w, Math.floor((M - T) / 2), Math.floor((v - I) / 2)));
14161
14161
  },
14162
14162
  scenePreviewAsync: async function(f, y, M, v, w) {
14163
14163
  V.logger.info("[ApplianceMultiPlugin] scenePreviewAsync"), (t.mainView || i).scenePreview(f, y, M, v, w);
@@ -14174,15 +14174,15 @@ const V = class V extends Zi {
14174
14174
  width: m,
14175
14175
  height: T
14176
14176
  });
14177
- let N = Math.max(I == null ? void 0 : I.width, m), x = Math.max(I == null ? void 0 : I.height, T), L = 1;
14178
- const D = N > m && Math.min(m / N, L) || L, E = x > T && Math.min(T / x, L) || L;
14179
- D <= E ? (N = D < 1 && m || N, x = Math.floor(x * D) + 1, L = D) : D > E && (x = E < 1 && T || x, N = Math.floor(N * E) + 1, L = E);
14177
+ let N = Math.max(I == null ? void 0 : I.width, m), z = Math.max(I == null ? void 0 : I.height, T), L = 1;
14178
+ const D = N > m && Math.min(m / N, L) || L, E = z > T && Math.min(T / z, L) || L;
14179
+ D <= E ? (N = D < 1 && m || N, z = Math.floor(z * D) + 1, L = D) : D > E && (z = E < 1 && T || z, N = Math.floor(N * E) + 1, L = E);
14180
14180
  const P = {
14181
14181
  scale: L,
14182
14182
  centerX: I.originX + I.width / 2,
14183
14183
  centerY: I.originY + I.height / 2
14184
14184
  }, A = document.createElement("canvas"), j = A.getContext("2d");
14185
- A.width = N, A.height = x, j && await this.screenshotToCanvasAsync(j, f, N, x, P, devicePixelRatio);
14185
+ A.width = N, A.height = z, j && await this.screenshotToCanvasAsync(j, f, N, z, P, devicePixelRatio);
14186
14186
  const K = document.createElement("img");
14187
14187
  K.className = "appliance-plugin-fill-scene-snapshot-img", K.src = A.toDataURL(), K.onload = () => {
14188
14188
  A.remove();
@@ -14611,8 +14611,8 @@ const W = class W extends Zi {
14611
14611
  W.logger.info("[ApplianceSinglePlugin] screenshotToCanvasAsync");
14612
14612
  let m = y, T = M, I = v.scale;
14613
14613
  m > this.maxScreenshotWidth && (I = this.maxScreenshotWidth / m * I, m = this.maxScreenshotWidth), T > this.maxScreenshotHeight && (I = Math.min(this.maxScreenshotHeight / T * I, I), T = this.maxScreenshotHeight), v.scale = I;
14614
- const N = document.createElement("canvas"), x = N.getContext("2d");
14615
- N.width = m * (w || 1), N.height = T * (w || 1), x && (t.screenshotToCanvas(x, f, m, T, v, w), p.drawImage(N, Math.floor((y - m) / 2), Math.floor((M - T) / 2), m * (w || 1), T * (w || 1), 0, 0, m, T), N.remove()), W.currentManager && await ((L = W.currentManager) == null ? void 0 : L.screenshotToCanvas(p, f, m, T, v, Math.floor((y - m) / 2), Math.floor((M - T) / 2)));
14614
+ const N = document.createElement("canvas"), z = N.getContext("2d");
14615
+ N.width = m * (w || 1), N.height = T * (w || 1), z && (t.screenshotToCanvas(z, f, m, T, v, w), p.drawImage(N, Math.floor((y - m) / 2), Math.floor((M - T) / 2), m * (w || 1), T * (w || 1), 0, 0, m, T), N.remove()), W.currentManager && await ((L = W.currentManager) == null ? void 0 : L.screenshotToCanvas(p, f, m, T, v, Math.floor((y - m) / 2), Math.floor((M - T) / 2)));
14616
14616
  },
14617
14617
  scenePreviewAsync: async function(p, f, y, M, v) {
14618
14618
  W.logger.info("[ApplianceSinglePlugin] scenePreviewAsync"), t.scenePreview(p, f, y, M, v);
@@ -14630,11 +14630,11 @@ const W = class W extends Zi {
14630
14630
  width: w,
14631
14631
  height: m
14632
14632
  });
14633
- let I = Math.max(T == null ? void 0 : T.width, w), N = Math.max(T == null ? void 0 : T.height, m), x = 1;
14634
- const L = I > w && Math.min(w / I, x) || x, D = N > m && Math.min(m / N, x) || x;
14635
- L <= D ? (I = L < 1 && w || I, N = Math.floor(N * L) + 1, x = L) : L > D && (N = D < 1 && m || N, I = Math.floor(I * D) + 1, x = D);
14633
+ let I = Math.max(T == null ? void 0 : T.width, w), N = Math.max(T == null ? void 0 : T.height, m), z = 1;
14634
+ const L = I > w && Math.min(w / I, z) || z, D = N > m && Math.min(m / N, z) || z;
14635
+ L <= D ? (I = L < 1 && w || I, N = Math.floor(N * L) + 1, z = L) : L > D && (N = D < 1 && m || N, I = Math.floor(I * D) + 1, z = D);
14636
14636
  const E = {
14637
- scale: x,
14637
+ scale: z,
14638
14638
  centerX: T.originX + T.width / 2,
14639
14639
  centerY: T.originY + T.height / 2
14640
14640
  }, P = document.createElement("canvas"), A = P.getContext("2d");
@@ -14846,7 +14846,7 @@ export {
14846
14846
  B as h,
14847
14847
  Ee as i,
14848
14848
  Xf as j,
14849
- z as k,
14849
+ x as k,
14850
14850
  F as l,
14851
14851
  Wt as m,
14852
14852
  eg as n,