@component-hook/pdf-canvas 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,8 +48,8 @@ const Ul = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%20
48
48
  "selectionBackgroundColor"
49
49
  ];
50
50
  function x(a, t, e) {
51
- return (t = function(s) {
52
- var i = function(n, r) {
51
+ return (t = (function(s) {
52
+ var i = (function(n, r) {
53
53
  if (typeof n != "object" || !n) return n;
54
54
  var o = n[Symbol.toPrimitive];
55
55
  if (o !== void 0) {
@@ -58,34 +58,34 @@ function x(a, t, e) {
58
58
  throw new TypeError("@@toPrimitive must return a primitive value.");
59
59
  }
60
60
  return (r === "string" ? String : Number)(n);
61
- }(s, "string");
61
+ })(s, "string");
62
62
  return typeof i == "symbol" ? i : i + "";
63
- }(t)) in a ? Object.defineProperty(a, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : a[t] = e, a;
63
+ })(t)) in a ? Object.defineProperty(a, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : a[t] = e, a;
64
64
  }
65
65
  function ko(a, t) {
66
66
  var e = Object.keys(a);
67
67
  if (Object.getOwnPropertySymbols) {
68
68
  var s = Object.getOwnPropertySymbols(a);
69
- t && (s = s.filter(function(i) {
69
+ t && (s = s.filter((function(i) {
70
70
  return Object.getOwnPropertyDescriptor(a, i).enumerable;
71
- })), e.push.apply(e, s);
71
+ }))), e.push.apply(e, s);
72
72
  }
73
73
  return e;
74
74
  }
75
75
  function w(a) {
76
76
  for (var t = 1; t < arguments.length; t++) {
77
77
  var e = arguments[t] != null ? arguments[t] : {};
78
- t % 2 ? ko(Object(e), !0).forEach(function(s) {
78
+ t % 2 ? ko(Object(e), !0).forEach((function(s) {
79
79
  x(a, s, e[s]);
80
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(e)) : ko(Object(e)).forEach(function(s) {
80
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(e)) : ko(Object(e)).forEach((function(s) {
81
81
  Object.defineProperty(a, s, Object.getOwnPropertyDescriptor(e, s));
82
- });
82
+ }));
83
83
  }
84
84
  return a;
85
85
  }
86
86
  function rt(a, t) {
87
87
  if (a == null) return {};
88
- var e, s, i = function(r, o) {
88
+ var e, s, i = (function(r, o) {
89
89
  if (r == null) return {};
90
90
  var h = {};
91
91
  for (var l in r) if ({}.hasOwnProperty.call(r, l)) {
@@ -93,7 +93,7 @@ function rt(a, t) {
93
93
  h[l] = r[l];
94
94
  }
95
95
  return h;
96
- }(a, t);
96
+ })(a, t);
97
97
  if (Object.getOwnPropertySymbols) {
98
98
  var n = Object.getOwnPropertySymbols(a);
99
99
  for (s = 0; s < n.length; s++) e = n[s], t.indexOf(e) >= 0 || {}.propertyIsEnumerable.call(a, e) && (i[e] = a[e]);
@@ -121,15 +121,15 @@ const q = new class extends Mo {
121
121
  this.fontPaths = w(w({}, this.fontPaths), a);
122
122
  }
123
123
  removeFonts() {
124
- (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).forEach((a) => {
124
+ (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).forEach(((a) => {
125
125
  delete this.fontPaths[a];
126
- });
126
+ }));
127
127
  }
128
128
  clearFonts() {
129
129
  this.fontPaths = {};
130
130
  }
131
131
  restoreDefaults(a) {
132
- const t = new Mo(), e = a?.reduce((s, i) => (s[i] = t[i], s), {}) || t;
132
+ const t = new Mo(), e = a?.reduce(((s, i) => (s[i] = t[i], s)), {}) || t;
133
133
  this.configure(e);
134
134
  }
135
135
  }(), Le = function(a) {
@@ -156,7 +156,7 @@ void main(){}`), i = t.createShader(t.FRAGMENT_SHADER);
156
156
  }
157
157
  queryWebGL(t) {
158
158
  const e = t.getContext("webgl");
159
- e && (this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.GLPrecision = ["highp", "mediump", "lowp"].find((s) => this.testPrecision(e, s)), e.getExtension("WEBGL_lose_context").loseContext(), Le("log", "WebGL: max texture size ".concat(this.maxTextureSize)));
159
+ e && (this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.GLPrecision = ["highp", "mediump", "lowp"].find(((s) => this.testPrecision(e, s))), e.getExtension("WEBGL_lose_context").loseContext(), Le("log", "WebGL: max texture size ".concat(this.maxTextureSize)));
160
160
  }
161
161
  isSupported(t) {
162
162
  return !!this.maxTextureSize && this.maxTextureSize >= t;
@@ -185,7 +185,7 @@ const xe = () => Po || (Po = { document, window, isTouchSupported: "ontouchstart
185
185
  const { perfLimitSizeTotal: t } = q, e = Math.sqrt(t * a);
186
186
  return [Math.floor(e), Math.floor(t / e)];
187
187
  }
188
- }(), pr = "6.7.0";
188
+ }(), pr = "6.7.1";
189
189
  function rs() {
190
190
  }
191
191
  const Ve = Math.PI / 2, Fe = 2 * Math.PI, Br = Math.PI / 180, jt = Object.freeze([1, 0, 0, 1, 0, 0]), Hr = 16, Be = 0.4477152502, X = "center", Q = "left", Wt = "top", mr = "bottom", ct = "right", Ft = "none", zr = /\r?\n/, za = "moving", _n = "scaling", Ga = "rotating", Gr = "rotate", Va = "skewing", oi = "resizing", ec = "modifyPoly", sc = "modifyPath", en = "changed", wn = "scale", Bt = "scaleX", qt = "scaleY", Is = "skewX", Ns = "skewY", bt = "fill", It = "stroke", sn = "modified", vs = "json", Un = "svg", I = new class {
@@ -216,20 +216,20 @@ const Ve = Math.PI / 2, Fe = 2 * Math.PI, Br = Math.PI / 180, jt = Object.freeze
216
216
  }
217
217
  cancelAll() {
218
218
  const a = this.splice(0);
219
- return a.forEach((t) => t.abort()), a;
219
+ return a.forEach(((t) => t.abort())), a;
220
220
  }
221
221
  cancelByCanvas(a) {
222
222
  if (!a) return [];
223
- const t = this.filter((e) => {
223
+ const t = this.filter(((e) => {
224
224
  var s;
225
225
  return e.target === a || typeof e.target == "object" && ((s = e.target) === null || s === void 0 ? void 0 : s.canvas) === a;
226
- });
227
- return t.forEach((e) => e.abort()), t;
226
+ }));
227
+ return t.forEach(((e) => e.abort())), t;
228
228
  }
229
229
  cancelByTarget(a) {
230
230
  if (!a) return [];
231
- const t = this.filter((e) => e.target === a);
232
- return t.forEach((e) => e.abort()), t;
231
+ const t = this.filter(((e) => e.target === a));
232
+ return t.forEach(((e) => e.abort())), t;
233
233
  }
234
234
  }();
235
235
  class ic {
@@ -237,10 +237,10 @@ class ic {
237
237
  x(this, "__eventListeners", {});
238
238
  }
239
239
  on(t, e) {
240
- if (this.__eventListeners || (this.__eventListeners = {}), typeof t == "object") return Object.entries(t).forEach((s) => {
240
+ if (this.__eventListeners || (this.__eventListeners = {}), typeof t == "object") return Object.entries(t).forEach(((s) => {
241
241
  let [i, n] = s;
242
242
  this.on(i, n);
243
- }), () => this.off(t);
243
+ })), () => this.off(t);
244
244
  if (e) {
245
245
  const s = t;
246
246
  return this.__eventListeners[s] || (this.__eventListeners[s] = []), this.__eventListeners[s].push(e), () => this.off(s, e);
@@ -250,16 +250,16 @@ class ic {
250
250
  once(t, e) {
251
251
  if (typeof t == "object") {
252
252
  const s = [];
253
- return Object.entries(t).forEach((i) => {
253
+ return Object.entries(t).forEach(((i) => {
254
254
  let [n, r] = i;
255
255
  s.push(this.once(n, r));
256
- }), () => s.forEach((i) => i());
256
+ })), () => s.forEach(((i) => i()));
257
257
  }
258
258
  if (e) {
259
- const s = this.on(t, function() {
259
+ const s = this.on(t, (function() {
260
260
  for (var i = arguments.length, n = new Array(i), r = 0; r < i; r++) n[r] = arguments[r];
261
261
  e.call(this, ...n), s();
262
- });
262
+ }));
263
263
  return s;
264
264
  }
265
265
  return () => !1;
@@ -272,10 +272,10 @@ class ic {
272
272
  }
273
273
  off(t, e) {
274
274
  if (this.__eventListeners) if (t === void 0) for (const s in this.__eventListeners) this._removeEventListener(s);
275
- else typeof t == "object" ? Object.entries(t).forEach((s) => {
275
+ else typeof t == "object" ? Object.entries(t).forEach(((s) => {
276
276
  let [i, n] = s;
277
277
  this._removeEventListener(i, n);
278
- }) : this._removeEventListener(t, e);
278
+ })) : this._removeEventListener(t, e);
279
279
  }
280
280
  fire(t, e) {
281
281
  var s;
@@ -436,26 +436,26 @@ function Xa(a) {
436
436
  add() {
437
437
  for (var s = arguments.length, i = new Array(s), n = 0; n < s; n++) i[n] = arguments[n];
438
438
  const r = this._objects.push(...i);
439
- return i.forEach((o) => this._onObjectAdded(o)), r;
439
+ return i.forEach(((o) => this._onObjectAdded(o))), r;
440
440
  }
441
441
  insertAt(s) {
442
442
  for (var i = arguments.length, n = new Array(i > 1 ? i - 1 : 0), r = 1; r < i; r++) n[r - 1] = arguments[r];
443
- return this._objects.splice(s, 0, ...n), n.forEach((o) => this._onObjectAdded(o)), this._objects.length;
443
+ return this._objects.splice(s, 0, ...n), n.forEach(((o) => this._onObjectAdded(o))), this._objects.length;
444
444
  }
445
445
  remove() {
446
446
  const s = this._objects, i = [];
447
447
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
448
- return r.forEach((h) => {
448
+ return r.forEach(((h) => {
449
449
  const l = s.indexOf(h);
450
450
  l !== -1 && (s.splice(l, 1), i.push(h), this._onObjectRemoved(h));
451
- }), i;
451
+ })), i;
452
452
  }
453
453
  forEachObject(s) {
454
- this.getObjects().forEach((i, n, r) => s(i, n, r));
454
+ this.getObjects().forEach(((i, n, r) => s(i, n, r)));
455
455
  }
456
456
  getObjects() {
457
457
  for (var s = arguments.length, i = new Array(s), n = 0; n < s; n++) i[n] = arguments[n];
458
- return i.length === 0 ? [...this._objects] : this._objects.filter((r) => r.isType(...i));
458
+ return i.length === 0 ? [...this._objects] : this._objects.filter(((r) => r.isType(...i)));
459
459
  }
460
460
  item(s) {
461
461
  return this._objects[s];
@@ -467,10 +467,10 @@ function Xa(a) {
467
467
  return this._objects.length;
468
468
  }
469
469
  contains(s, i) {
470
- return !!this._objects.includes(s) || !!i && this._objects.some((n) => n instanceof t && n.contains(s, !0));
470
+ return !!this._objects.includes(s) || !!i && this._objects.some(((n) => n instanceof t && n.contains(s, !0)));
471
471
  }
472
472
  complexity() {
473
- return this._objects.reduce((s, i) => s += i.complexity ? i.complexity() : 0, 0);
473
+ return this._objects.reduce(((s, i) => s += i.complexity ? i.complexity() : 0), 0);
474
474
  }
475
475
  sendObjectToBack(s) {
476
476
  return !(!s || s === this._objects[0]) && (qe(this._objects, s), this._objects.unshift(s), this._onStackOrderChanged(s), !0);
@@ -569,12 +569,12 @@ const Xe = () => nc++, Se = () => {
569
569
  }, Ya = () => Fs().createElement("img"), Kt = (a) => {
570
570
  const t = Se();
571
571
  return t.width = a.width, t.height = a.height, t;
572
- }, Xr = (a, t, e) => a.toDataURL("image/".concat(t), e), Wr = (a, t, e) => new Promise((s, i) => {
572
+ }, Xr = (a, t, e) => a.toDataURL("image/".concat(t), e), Wr = (a, t, e) => new Promise(((s, i) => {
573
573
  a.toBlob(s, "image/".concat(t), e);
574
- }), ht = (a) => a * Br, Ce = (a) => a / Br, $a = (a) => a.every((t, e) => t === jt[e]), At = (a, t, e) => new C(a).transform(t, e), Xt = (a) => {
574
+ })), ht = (a) => a * Br, Ce = (a) => a / Br, $a = (a) => a.every(((t, e) => t === jt[e])), At = (a, t, e) => new C(a).transform(t, e), Xt = (a) => {
575
575
  const t = 1 / (a[0] * a[3] - a[1] * a[2]), e = [t * a[3], -t * a[1], -t * a[2], t * a[0], 0, 0], { x: s, y: i } = new C(a[4], a[5]).transform(e, !0);
576
576
  return e[4] = -s, e[5] = -i, e;
577
- }, ut = (a, t, e) => [a[0] * t[0] + a[2] * t[1], a[1] * t[0] + a[3] * t[1], a[0] * t[2] + a[2] * t[3], a[1] * t[2] + a[3] * t[3], e ? 0 : a[0] * t[4] + a[2] * t[5] + a[4], e ? 0 : a[1] * t[4] + a[3] * t[5] + a[5]], xn = (a, t) => a.reduceRight((e, s) => s && e ? ut(s, e, t) : s || e, void 0) || jt.concat(), qa = (a) => {
577
+ }, ut = (a, t, e) => [a[0] * t[0] + a[2] * t[1], a[1] * t[0] + a[3] * t[1], a[0] * t[2] + a[2] * t[3], a[1] * t[2] + a[3] * t[3], e ? 0 : a[0] * t[4] + a[2] * t[5] + a[4], e ? 0 : a[1] * t[4] + a[3] * t[5] + a[5]], xn = (a, t) => a.reduceRight(((e, s) => s && e ? ut(s, e, t) : s || e), void 0) || jt.concat(), qa = (a) => {
578
578
  let [t, e] = a;
579
579
  return Math.atan2(e, t);
580
580
  }, as = (a) => {
@@ -601,7 +601,7 @@ const Sn = function(a) {
601
601
  return $a(n) || (i = ut(i, n)), i;
602
602
  }, ti = function(a) {
603
603
  let { signal: t, crossOrigin: e = null } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
604
- return new Promise(function(s, i) {
604
+ return new Promise((function(s, i) {
605
605
  if (t && t.aborted) return i(new jr("loadImage"));
606
606
  const n = Ya();
607
607
  let r;
@@ -614,39 +614,39 @@ const Sn = function(a) {
614
614
  a ? (n.onload = o, n.onerror = function() {
615
615
  r && t?.removeEventListener("abort", r), i(new _e("Error loading ".concat(n.src)));
616
616
  }, e && (n.crossOrigin = e), n.src = a) : o();
617
- });
617
+ }));
618
618
  }, Os = function(a) {
619
619
  let { signal: t, reviver: e = rs } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
620
- return new Promise((s, i) => {
620
+ return new Promise(((s, i) => {
621
621
  const n = [];
622
- t && t.addEventListener("abort", i, { once: !0 }), Promise.all(a.map((r) => I.getClass(r.type).fromObject(r, { signal: t }).then((o) => (e(r, o), n.push(o), o)))).then(s).catch((r) => {
623
- n.forEach((o) => {
622
+ t && t.addEventListener("abort", i, { once: !0 }), Promise.all(a.map(((r) => I.getClass(r.type).fromObject(r, { signal: t }).then(((o) => (e(r, o), n.push(o), o)))))).then(s).catch(((r) => {
623
+ n.forEach(((o) => {
624
624
  o.dispose && o.dispose();
625
- }), i(r);
626
- }).finally(() => {
625
+ })), i(r);
626
+ })).finally((() => {
627
627
  t && t.removeEventListener("abort", i);
628
- });
629
- });
628
+ }));
629
+ }));
630
630
  }, gi = function(a) {
631
631
  let { signal: t } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
632
- return new Promise((e, s) => {
632
+ return new Promise(((e, s) => {
633
633
  const i = [];
634
634
  t && t.addEventListener("abort", s, { once: !0 });
635
- const n = Object.values(a).map((o) => o && o.type && I.has(o.type) ? Os([o], { signal: t }).then((h) => {
635
+ const n = Object.values(a).map(((o) => o && o.type && I.has(o.type) ? Os([o], { signal: t }).then(((h) => {
636
636
  let [l] = h;
637
637
  return i.push(l), l;
638
- }) : o), r = Object.keys(a);
639
- Promise.all(n).then((o) => o.reduce((h, l, c) => (h[r[c]] = l, h), {})).then(e).catch((o) => {
640
- i.forEach((h) => {
638
+ })) : o)), r = Object.keys(a);
639
+ Promise.all(n).then(((o) => o.reduce(((h, l, c) => (h[r[c]] = l, h)), {}))).then(e).catch(((o) => {
640
+ i.forEach(((h) => {
641
641
  h.dispose && h.dispose();
642
- }), s(o);
643
- }).finally(() => {
642
+ })), s(o);
643
+ })).finally((() => {
644
644
  t && t.removeEventListener("abort", s);
645
- });
646
- });
645
+ }));
646
+ }));
647
647
  }, fs = function(a) {
648
- return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : []).reduce((t, e) => (e in a && (t[e] = a[e]), t), {});
649
- }, $r = (a, t) => Object.keys(a).reduce((e, s) => (t(a[s], s, a) && (e[s] = a[s]), e), {}), Z = (a, t) => parseFloat(Number(a).toFixed(t)), Ds = (a) => "matrix(" + a.map((t) => Z(t, q.NUM_FRACTION_DIGITS)).join(" ") + ")", te = (a) => !!a && a.toLive !== void 0, Oo = (a) => !!a && typeof a.toObject == "function", Do = (a) => !!a && a.offsetX !== void 0 && "source" in a, Ke = (a) => !!a && "multiSelectionStacking" in a;
648
+ return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : []).reduce(((t, e) => (e in a && (t[e] = a[e]), t)), {});
649
+ }, $r = (a, t) => Object.keys(a).reduce(((e, s) => (t(a[s], s, a) && (e[s] = a[s]), e)), {}), Z = (a, t) => parseFloat(Number(a).toFixed(t)), Ds = (a) => "matrix(" + a.map(((t) => Z(t, q.NUM_FRACTION_DIGITS))).join(" ") + ")", te = (a) => !!a && a.toLive !== void 0, Oo = (a) => !!a && typeof a.toObject == "function", Do = (a) => !!a && a.offsetX !== void 0 && "source" in a, Ke = (a) => !!a && "multiSelectionStacking" in a;
650
650
  function Ja(a) {
651
651
  const t = a && ae(a);
652
652
  let e = 0, s = 0;
@@ -694,7 +694,7 @@ class eh {
694
694
  br(this.lower.el, t);
695
695
  }
696
696
  calcOffset() {
697
- return function(t) {
697
+ return (function(t) {
698
698
  var e;
699
699
  const s = t && ae(t), i = { left: 0, top: 0 };
700
700
  if (!s) return i;
@@ -705,7 +705,7 @@ class eh {
705
705
  t.getBoundingClientRect !== void 0 && (r = t.getBoundingClientRect());
706
706
  const h = Ja(t);
707
707
  return { left: r.left + h.left - (o.clientLeft || 0) + i.left, top: r.top + h.top - (o.clientTop || 0) + i.top };
708
- }(this.lower.el);
708
+ })(this.lower.el);
709
709
  }
710
710
  dispose() {
711
711
  xe().dispose(this.lower.el), delete this.lower;
@@ -824,7 +824,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
824
824
  this.nextRenderHandle = 0, this.renderAll();
825
825
  }
826
826
  requestRenderAll() {
827
- this.nextRenderHandle || this.disposed || this.destroyed || (this.nextRenderHandle = Zs(() => this.renderAndReset()));
827
+ this.nextRenderHandle || this.disposed || this.destroyed || (this.nextRenderHandle = Zs((() => this.renderAndReset())));
828
828
  }
829
829
  calcViewportBoundaries() {
830
830
  const t = this.width, e = this.height, s = Xt(this.viewportTransform), i = At({ x: 0, y: 0 }, s), n = At({ x: t, y: e }, s), r = i.min(n), o = i.max(n);
@@ -915,7 +915,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
915
915
  }
916
916
  _toObjectMethod(t, e) {
917
917
  const s = this.clipPath, i = s && !s.excludeFromExport ? this._toObject(s, t, e) : null;
918
- return w(w(w({ version: pr }, fs(this, e)), {}, { objects: this._objects.filter((n) => !n.excludeFromExport).map((n) => this._toObject(n, t, e)) }, this.__serializeBgOverlay(t, e)), i ? { clipPath: i } : null);
918
+ return w(w(w({ version: pr }, fs(this, e)), {}, { objects: this._objects.filter(((n) => !n.excludeFromExport)).map(((n) => this._toObject(n, t, e))) }, this.__serializeBgOverlay(t, e)), i ? { clipPath: i } : null);
919
919
  }
920
920
  _toObject(t, e, s) {
921
921
  let i;
@@ -961,42 +961,42 @@ Resulting to default behavior: removing object from previous canvas and adding t
961
961
  `)) : "";
962
962
  }
963
963
  createSVGRefElementsMarkup() {
964
- return ["background", "overlay"].map((t) => {
964
+ return ["background", "overlay"].map(((t) => {
965
965
  const e = this["".concat(t, "Color")];
966
966
  if (te(e)) {
967
967
  const s = this["".concat(t, "Vpt")], i = this.viewportTransform, n = { isType: () => !1, width: this.width / (s ? i[0] : 1), height: this.height / (s ? i[3] : 1) };
968
968
  return e.toSVG(n, { additionalTransform: s ? Ds(i) : "" });
969
969
  }
970
- }).join("");
970
+ })).join("");
971
971
  }
972
972
  createSVGFontFacesMarkup() {
973
973
  const t = [], e = {}, s = q.fontPaths;
974
- this._objects.forEach(function n(r) {
974
+ this._objects.forEach((function n(r) {
975
975
  t.push(r), qi(r) && r._objects.forEach(n);
976
- }), t.forEach((n) => {
976
+ })), t.forEach(((n) => {
977
977
  if (!(r = n) || typeof r._renderText != "function") return;
978
978
  var r;
979
979
  const { styles: o, fontFamily: h } = n;
980
- !e[h] && s[h] && (e[h] = !0, o && Object.values(o).forEach((l) => {
981
- Object.values(l).forEach((c) => {
980
+ !e[h] && s[h] && (e[h] = !0, o && Object.values(o).forEach(((l) => {
981
+ Object.values(l).forEach(((c) => {
982
982
  let { fontFamily: u = "" } = c;
983
983
  !e[u] && s[u] && (e[u] = !0);
984
- });
985
- }));
986
- });
987
- const i = Object.keys(e).map((n) => ` @font-face {
984
+ }));
985
+ })));
986
+ }));
987
+ const i = Object.keys(e).map(((n) => ` @font-face {
988
988
  font-family: '`.concat(n, `';
989
989
  src: url('`).concat(s[n], `');
990
990
  }
991
- `)).join("");
991
+ `))).join("");
992
992
  return i ? ` <style type="text/css"><![CDATA[
993
993
  `.concat(i, `]]></style>
994
994
  `) : "";
995
995
  }
996
996
  _setSVGObjects(t, e) {
997
- this.forEachObject((s) => {
997
+ this.forEachObject(((s) => {
998
998
  s.excludeFromExport || this._setSVGObject(t, s, e);
999
- });
999
+ }));
1000
1000
  }
1001
1001
  _setSVGObject(t, e, s) {
1002
1002
  t.push(e.toSVG(s));
@@ -1018,10 +1018,10 @@ Resulting to default behavior: removing object from previous canvas and adding t
1018
1018
  let { signal: s } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1019
1019
  if (!t) return Promise.reject(new _e("`json` is undefined"));
1020
1020
  const i = typeof t == "string" ? JSON.parse(t) : t, { objects: n = [], backgroundImage: r, background: o, overlayImage: h, overlay: l, clipPath: c } = i, u = this.renderOnAddRemove;
1021
- return this.renderOnAddRemove = !1, Promise.all([Os(n, { reviver: e, signal: s }), gi({ backgroundImage: r, backgroundColor: o, overlayImage: h, overlayColor: l, clipPath: c }, { signal: s })]).then((d) => {
1021
+ return this.renderOnAddRemove = !1, Promise.all([Os(n, { reviver: e, signal: s }), gi({ backgroundImage: r, backgroundColor: o, overlayImage: h, overlayColor: l, clipPath: c }, { signal: s })]).then(((d) => {
1022
1022
  let [f, g] = d;
1023
1023
  return this.clear(), this.add(...f), this.set(i), this.set(g), this.renderOnAddRemove = u, this;
1024
- });
1024
+ }));
1025
1025
  }
1026
1026
  clone(t) {
1027
1027
  const e = this.toObject(t);
@@ -1043,19 +1043,19 @@ Resulting to default behavior: removing object from previous canvas and adding t
1043
1043
  }
1044
1044
  toCanvasElement() {
1045
1045
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1, { width: e, height: s, left: i, top: n, filter: r } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1046
- const o = (e || this.width) * t, h = (s || this.height) * t, l = this.getZoom(), c = this.width, u = this.height, d = this.skipControlsDrawing, f = l * t, g = this.viewportTransform, p = [f, 0, 0, f, (g[4] - (i || 0)) * t, (g[5] - (n || 0)) * t], b = this.enableRetinaScaling, m = Kt({ width: o, height: h }), v = r ? this._objects.filter((y) => r(y)) : this._objects;
1046
+ const o = (e || this.width) * t, h = (s || this.height) * t, l = this.getZoom(), c = this.width, u = this.height, d = this.skipControlsDrawing, f = l * t, g = this.viewportTransform, p = [f, 0, 0, f, (g[4] - (i || 0)) * t, (g[5] - (n || 0)) * t], b = this.enableRetinaScaling, m = Kt({ width: o, height: h }), v = r ? this._objects.filter(((y) => r(y))) : this._objects;
1047
1047
  return this.enableRetinaScaling = !1, this.viewportTransform = p, this.width = o, this.height = h, this.skipControlsDrawing = !0, this.calcViewportBoundaries(), this.renderCanvas(m.getContext("2d"), v), this.viewportTransform = g, this.width = c, this.height = u, this.calcViewportBoundaries(), this.enableRetinaScaling = b, this.skipControlsDrawing = d, m;
1048
1048
  }
1049
1049
  dispose() {
1050
- return !this.disposed && this.elements.cleanupDOM({ width: this.width, height: this.height }), nn.cancelByCanvas(this), this.disposed = !0, new Promise((t, e) => {
1050
+ return !this.disposed && this.elements.cleanupDOM({ width: this.width, height: this.height }), nn.cancelByCanvas(this), this.disposed = !0, new Promise(((t, e) => {
1051
1051
  const s = () => {
1052
1052
  this.destroy(), t(!0);
1053
1053
  };
1054
1054
  s.kill = e, this.__cleanupTask && this.__cleanupTask.kill("aborted"), this.destroyed ? t(!1) : this.nextRenderHandle ? this.__cleanupTask = s : s();
1055
- });
1055
+ }));
1056
1056
  }
1057
1057
  destroy() {
1058
- this.destroyed = !0, this.cancelRequestedRender(), this.forEachObject((t) => t.dispose()), this._objects = [], this.backgroundImage && this.backgroundImage.dispose(), this.backgroundImage = void 0, this.overlayImage && this.overlayImage.dispose(), this.overlayImage = void 0, this.elements.dispose();
1058
+ this.destroyed = !0, this.cancelRequestedRender(), this.forEachObject(((t) => t.dispose())), this._objects = [], this.backgroundImage && this.backgroundImage.dispose(), this.backgroundImage = void 0, this.overlayImage && this.overlayImage.dispose(), this.overlayImage = void 0, this.elements.dispose();
1059
1059
  }
1060
1060
  toString() {
1061
1061
  return "#<Canvas (".concat(this.complexity(), "): { objects: ").concat(this._objects.length, " }>");
@@ -1063,10 +1063,10 @@ Resulting to default behavior: removing object from previous canvas and adding t
1063
1063
  }
1064
1064
  x(pi, "ownDefaults", rc);
1065
1065
  const oc = ["touchstart", "touchmove", "touchend"], sh = (a) => {
1066
- const t = Ja(a.target), e = function(s) {
1066
+ const t = Ja(a.target), e = (function(s) {
1067
1067
  const i = s.changedTouches;
1068
1068
  return i && i[0] ? i[0] : s;
1069
- }(a);
1069
+ })(a);
1070
1070
  return new C(e.clientX + t.left, e.clientY + t.top);
1071
1071
  }, rn = (a) => oc.includes(a.type) || a.pointerType === "touch", Lo = (a) => {
1072
1072
  a.preventDefault(), a.stopPropagation();
@@ -1083,7 +1083,7 @@ const oc = ["touchstart", "touchmove", "touchend"], sh = (a) => {
1083
1083
  }, nh = (a) => {
1084
1084
  a.scaleX = 1, a.scaleY = 1, a.skewX = 0, a.skewY = 0, a.flipX = !1, a.flipY = !1, a.rotate(0);
1085
1085
  }, qr = (a) => ({ scaleX: a.scaleX, scaleY: a.scaleY, skewX: a.skewX, skewY: a.skewY, angle: a.angle, left: a.left, flipX: a.flipX, flipY: a.flipY, top: a.top }), Cn = (a, t, e) => {
1086
- const s = a / 2, i = t / 2, n = [new C(-s, -i), new C(s, -i), new C(-s, i), new C(s, i)].map((o) => o.transform(e)), r = we(n);
1086
+ const s = a / 2, i = t / 2, n = [new C(-s, -i), new C(s, -i), new C(-s, i), new C(s, i)].map(((o) => o.transform(e))), r = we(n);
1087
1087
  return new C(r.width, r.height);
1088
1088
  }, mi = function() {
1089
1089
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : jt;
@@ -1116,10 +1116,10 @@ function lh(a, t) {
1116
1116
  function Kr(a, t, e, s, i) {
1117
1117
  var n;
1118
1118
  let { target: r, corner: o } = a;
1119
- const h = r.controls[o], l = ((n = r.canvas) === null || n === void 0 ? void 0 : n.getZoom()) || 1, c = r.padding / l, u = function(d, f, g, p) {
1119
+ const h = r.controls[o], l = ((n = r.canvas) === null || n === void 0 ? void 0 : n.getZoom()) || 1, c = r.padding / l, u = (function(d, f, g, p) {
1120
1120
  const b = d.getRelativeCenterPoint(), m = g !== void 0 && p !== void 0 ? d.translateToGivenOrigin(b, X, X, g, p) : new C(d.left, d.top);
1121
1121
  return (d.angle ? f.rotate(-ht(d.angle), b) : f).subtract(m);
1122
- }(r, new C(s, i), t, e);
1122
+ })(r, new C(s, i), t, e);
1123
1123
  return u.x >= c && (u.x -= c), u.x <= -c && (u.x += c), u.y >= c && (u.y -= c), u.y <= c && (u.y += c), u.x -= h.offsetX, u.y -= h.offsetY, u;
1124
1124
  }
1125
1125
  const lc = (a, t, e, s) => {
@@ -1209,7 +1209,7 @@ class J {
1209
1209
  }
1210
1210
  overlayWith(t) {
1211
1211
  t instanceof J || (t = new J(t));
1212
- const e = this.getSource(), s = t.getSource(), [i, n, r] = e.map((o, h) => Math.round(0.5 * o + 0.5 * s[h]));
1212
+ const e = this.getSource(), s = t.getSource(), [i, n, r] = e.map(((o, h) => Math.round(0.5 * o + 0.5 * s[h])));
1213
1213
  return this.setSource([i, n, r, e[3]]), this;
1214
1214
  }
1215
1215
  static fromRgb(t) {
@@ -1221,10 +1221,10 @@ class J {
1221
1221
  static sourceFromRgb(t) {
1222
1222
  const e = t.match(/^rgba?\(\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*[\s|,]\s*(\d{0,3}(?:\.\d+)?%?)\s*(?:\s*[,/]\s*(\d{0,3}(?:\.\d+)?%?)\s*)?\)$/i);
1223
1223
  if (e) {
1224
- const [s, i, n] = e.slice(1, 4).map((r) => {
1224
+ const [s, i, n] = e.slice(1, 4).map(((r) => {
1225
1225
  const o = parseFloat(r);
1226
1226
  return r.endsWith("%") ? Math.round(2.55 * o) : o;
1227
- });
1227
+ }));
1228
1228
  return [s, i, n, jo(e[4])];
1229
1229
  }
1230
1230
  }
@@ -1253,8 +1253,8 @@ class J {
1253
1253
  if (t.match(/^#?(([0-9a-f]){3,4}|([0-9a-f]{2}){3,4})$/i)) {
1254
1254
  const e = t.slice(t.indexOf("#") + 1);
1255
1255
  let s;
1256
- s = e.length <= 4 ? e.split("").map((h) => h + h) : e.match(/.{2}/g);
1257
- const [i, n, r, o = 255] = s.map((h) => parseInt(h, 16));
1256
+ s = e.length <= 4 ? e.split("").map(((h) => h + h)) : e.match(/.{2}/g);
1257
+ const [i, n, r, o = 255] = s.map(((h) => parseInt(h, 16)));
1258
1258
  return [i, n, r, o / 255];
1259
1259
  }
1260
1260
  }
@@ -1363,7 +1363,7 @@ class Re {
1363
1363
  Object.assign(this, Re.ownDefaults, e), this.id = Xe();
1364
1364
  }
1365
1365
  static parseShadow(t) {
1366
- const e = t.trim(), [, s = 0, i = 0, n = 0] = (Uo.exec(e) || []).map((r) => parseFloat(r) || 0);
1366
+ const e = t.trim(), [, s = 0, i = 0, n = 0] = (Uo.exec(e) || []).map(((r) => parseFloat(r) || 0));
1367
1367
  return { color: (e.replace(Uo, "") || "rgb(0,0,0)").trim(), offsetX: s, offsetY: i, blur: n };
1368
1368
  }
1369
1369
  toString() {
@@ -1386,7 +1386,7 @@ class Re {
1386
1386
  }
1387
1387
  toObject() {
1388
1388
  const t = { color: this.color, blur: this.blur, offsetX: this.offsetX, offsetY: this.offsetY, affectStroke: this.affectStroke, nonScaling: this.nonScaling, type: this.constructor.type }, e = Re.ownDefaults;
1389
- return this.includeDefaultValues ? t : $r(t, (s, i) => s !== e[i]);
1389
+ return this.includeDefaultValues ? t : $r(t, ((s, i) => s !== e[i]));
1390
1390
  }
1391
1391
  static async fromObject(t) {
1392
1392
  return new this(t);
@@ -1444,7 +1444,7 @@ class to {
1444
1444
  const t = (e) => {
1445
1445
  this._state === "pending" && (this.startTime = e || +/* @__PURE__ */ new Date(), this._state = "running", this._onStart(), this.tick(this.startTime));
1446
1446
  };
1447
- this.register(), this.delay > 0 ? setTimeout(() => Zs(t), this.delay) : Zs(t);
1447
+ this.register(), this.delay > 0 ? setTimeout((() => Zs(t)), this.delay) : Zs(t);
1448
1448
  }
1449
1449
  tick(t) {
1450
1450
  const e = (t || +/* @__PURE__ */ new Date()) - this.startTime, s = Math.min(e, this.duration);
@@ -1477,10 +1477,10 @@ const Sc = ["startValue", "endValue"];
1477
1477
  class Cc extends to {
1478
1478
  constructor(t) {
1479
1479
  let { startValue: e = [0], endValue: s = [100] } = t;
1480
- super(w(w({}, rt(t, Sc)), {}, { startValue: e, byValue: s.map((i, n) => i - e[n]) }));
1480
+ super(w(w({}, rt(t, Sc)), {}, { startValue: e, byValue: s.map(((i, n) => i - e[n])) }));
1481
1481
  }
1482
1482
  calculate(t) {
1483
- const e = this.startValue.map((s, i) => this.easing(t, s, this.byValue[i], this.duration, i));
1483
+ const e = this.startValue.map(((s, i) => this.easing(t, s, this.byValue[i], this.duration, i)));
1484
1484
  return { value: e, valueProgress: Math.abs((e[0] - this.startValue[0]) / this.byValue[0]) };
1485
1485
  }
1486
1486
  }
@@ -1489,11 +1489,11 @@ class Ec extends to {
1489
1489
  constructor(t) {
1490
1490
  let { startValue: e, endValue: s, easing: i = Tc, onChange: n, onComplete: r, abort: o } = t, h = rt(t, Ac);
1491
1491
  const l = new J(e).getSource(), c = new J(s).getSource();
1492
- super(w(w({}, h), {}, { startValue: l, byValue: c.map((u, d) => u - l[d]), easing: i, onChange: Jn(n), onComplete: Jn(r), abort: Jn(o) }));
1492
+ super(w(w({}, h), {}, { startValue: l, byValue: c.map(((u, d) => u - l[d])), easing: i, onChange: Jn(n), onComplete: Jn(r), abort: Jn(o) }));
1493
1493
  }
1494
1494
  calculate(t) {
1495
- const [e, s, i, n] = this.startValue.map((o, h) => this.easing(t, o, this.byValue[h], this.duration, h)), r = [...[e, s, i].map(Math.round), ls(0, n, 1)];
1496
- return { value: r, valueProgress: r.map((o, h) => this.byValue[h] !== 0 ? Math.abs((o - this.startValue[h]) / this.byValue[h]) : 0).find((o) => o !== 0) || 0 };
1495
+ const [e, s, i, n] = this.startValue.map(((o, h) => this.easing(t, o, this.byValue[h], this.duration, h))), r = [...[e, s, i].map(Math.round), ls(0, n, 1)];
1496
+ return { value: r, valueProgress: r.map(((o, h) => this.byValue[h] !== 0 ? Math.abs((o - this.startValue[h]) / this.byValue[h]) : 0)).find(((o) => o !== 0)) || 0 };
1497
1497
  }
1498
1498
  }
1499
1499
  function eo(a) {
@@ -1509,11 +1509,11 @@ class ot {
1509
1509
  this.status = t, this.points = [];
1510
1510
  }
1511
1511
  includes(t) {
1512
- return this.points.some((e) => e.eq(t));
1512
+ return this.points.some(((e) => e.eq(t)));
1513
1513
  }
1514
1514
  append() {
1515
1515
  for (var t = arguments.length, e = new Array(t), s = 0; s < t; s++) e[s] = arguments[s];
1516
- return this.points = this.points.concat(e.filter((i) => !this.includes(i))), this;
1516
+ return this.points = this.points.concat(e.filter(((i) => !this.includes(i)))), this;
1517
1517
  }
1518
1518
  static isPointContained(t, e, s) {
1519
1519
  let i = arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
@@ -1526,7 +1526,7 @@ class ot {
1526
1526
  }
1527
1527
  }
1528
1528
  static isPointInPolygon(t, e) {
1529
- const s = new C(t).setX(Math.min(t.x - 1, ...e.map((n) => n.x)));
1529
+ const s = new C(t).setX(Math.min(t.x - 1, ...e.map(((n) => n.x))));
1530
1530
  let i = 0;
1531
1531
  for (let n = 0; n < e.length; n++) {
1532
1532
  const r = this.intersectSegmentSegment(e[n], e[(n + 1) % e.length], t, s);
@@ -1625,7 +1625,7 @@ class kc extends Wa {
1625
1625
  const { tl: t, tr: e, br: s, bl: i } = this.aCoords || (this.aCoords = this.calcACoords()), n = [t, e, s, i];
1626
1626
  if (this.group) {
1627
1627
  const r = this.group.calcTransformMatrix();
1628
- return n.map((o) => At(o, r));
1628
+ return n.map(((o) => At(o, r)));
1629
1629
  }
1630
1630
  return n;
1631
1631
  }
@@ -1637,7 +1637,7 @@ class kc extends Wa {
1637
1637
  return e.status === "Intersection" || e.status === "Coincident" || t.isContainedWithinObject(this) || this.isContainedWithinObject(t);
1638
1638
  }
1639
1639
  isContainedWithinObject(t) {
1640
- return this.getCoords().every((e) => t.containsPoint(e));
1640
+ return this.getCoords().every(((e) => t.containsPoint(e)));
1641
1641
  }
1642
1642
  isContainedWithinRect(t, e) {
1643
1643
  const { left: s, top: i, width: n, height: r } = this.getBoundingRect();
@@ -1652,12 +1652,12 @@ class kc extends Wa {
1652
1652
  isOnScreen() {
1653
1653
  if (!this.canvas) return !1;
1654
1654
  const { tl: t, br: e } = this.canvas.vptCoords;
1655
- return !!this.getCoords().some((s) => s.x <= e.x && s.x >= t.x && s.y <= e.y && s.y >= t.y) || !!this.intersectsWithRect(t, e) || this.containsPoint(t.midPointFrom(e));
1655
+ return !!this.getCoords().some(((s) => s.x <= e.x && s.x >= t.x && s.y <= e.y && s.y >= t.y)) || !!this.intersectsWithRect(t, e) || this.containsPoint(t.midPointFrom(e));
1656
1656
  }
1657
1657
  isPartiallyOnScreen() {
1658
1658
  if (!this.canvas) return !1;
1659
1659
  const { tl: t, br: e } = this.canvas.vptCoords;
1660
- return this.intersectsWithRect(t, e) ? !0 : this.getCoords().every((s) => (s.x >= e.x || s.x <= t.x) && (s.y >= e.y || s.y <= t.y)) && this.containsPoint(t.midPointFrom(e));
1660
+ return this.intersectsWithRect(t, e) ? !0 : this.getCoords().every(((s) => (s.x >= e.x || s.x <= t.x) && (s.y >= e.y || s.y <= t.y))) && this.containsPoint(t.midPointFrom(e));
1661
1661
  }
1662
1662
  getBoundingRect() {
1663
1663
  return we(this.getCoords());
@@ -1705,7 +1705,7 @@ class kc extends Wa {
1705
1705
  let t = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], e = this.calcOwnMatrix();
1706
1706
  if (t || !this.group) return e;
1707
1707
  const s = this.transformMatrixKey(t), i = this.matrixCache;
1708
- return i && i.key.every((n, r) => n === s[r]) ? i.value : (this.group && (e = ut(this.group.calcTransformMatrix(!1), e)), this.matrixCache = { key: s, value: e }, e);
1708
+ return i && i.key.every(((n, r) => n === s[r])) ? i.value : (this.group && (e = ut(this.group.calcTransformMatrix(!1), e)), this.matrixCache = { key: s, value: e }, e);
1709
1709
  }
1710
1710
  calcOwnMatrix() {
1711
1711
  const t = this.transformMatrixKey(!0), e = this.ownMatrixCache;
@@ -1876,9 +1876,9 @@ let Te = class Ki extends kc {
1876
1876
  }
1877
1877
  createClipPathLayer(t, e) {
1878
1878
  const s = Kt(e), i = s.getContext("2d");
1879
- if (i.translate(e.cacheTranslationX, e.cacheTranslationY), i.scale(e.zoomX, e.zoomY), t._cacheCanvas = s, e.parentClipPaths.forEach((n) => {
1879
+ if (i.translate(e.cacheTranslationX, e.cacheTranslationY), i.scale(e.zoomX, e.zoomY), t._cacheCanvas = s, e.parentClipPaths.forEach(((n) => {
1880
1880
  n.transform(i);
1881
- }), e.parentClipPaths.push(t), t.absolutePositioned) {
1881
+ })), e.parentClipPaths.push(t), t.absolutePositioned) {
1882
1882
  const n = Xt(this.calcTransformMatrix());
1883
1883
  i.transform(n[0], n[1], n[2], n[3], n[4], n[5]);
1884
1884
  }
@@ -2023,15 +2023,15 @@ let Te = class Ki extends kc {
2023
2023
  nn.cancelByTarget(this), this.off(), this._set("canvas", void 0), this._cacheCanvas && xe().dispose(this._cacheCanvas), this._cacheCanvas = void 0, this._cacheContext = null;
2024
2024
  }
2025
2025
  animate(t, e) {
2026
- return Object.entries(t).reduce((s, i) => {
2026
+ return Object.entries(t).reduce(((s, i) => {
2027
2027
  let [n, r] = i;
2028
2028
  return s[n] = this._animate(n, r, e), s;
2029
- }, {});
2029
+ }), {});
2030
2030
  }
2031
2031
  _animate(t, e) {
2032
2032
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2033
- const i = t.split("."), n = this.constructor.colorProperties.includes(i[i.length - 1]), { abort: r, startValue: o, onChange: h, onComplete: l } = s, c = w(w({}, s), {}, { target: this, startValue: o ?? i.reduce((u, d) => u[d], this), endValue: e, abort: r?.bind(this), onChange: (u, d, f) => {
2034
- i.reduce((g, p, b) => (b === i.length - 1 && (g[p] = u), g[p]), this), h && h(u, d, f);
2033
+ const i = t.split("."), n = this.constructor.colorProperties.includes(i[i.length - 1]), { abort: r, startValue: o, onChange: h, onComplete: l } = s, c = w(w({}, s), {}, { target: this, startValue: o ?? i.reduce(((u, d) => u[d]), this), endValue: e, abort: r?.bind(this), onChange: (u, d, f) => {
2034
+ i.reduce(((g, p, b) => (b === i.length - 1 && (g[p] = u), g[p])), this), h && h(u, d, f);
2035
2035
  }, onComplete: (u, d, f) => {
2036
2036
  this.setCoords(), l && l(u, d, f);
2037
2037
  } });
@@ -2089,18 +2089,18 @@ let Te = class Ki extends kc {
2089
2089
  }
2090
2090
  _removeDefaultValues(t) {
2091
2091
  const e = this.constructor.getDefaults(), s = Object.keys(e).length > 0 ? e : Object.getPrototypeOf(this);
2092
- return $r(t, (i, n) => {
2092
+ return $r(t, ((i, n) => {
2093
2093
  if (n === Q || n === Wt || n === "type") return !0;
2094
2094
  const r = s[n];
2095
2095
  return i !== r && !(Array.isArray(i) && Array.isArray(r) && i.length === 0 && r.length === 0);
2096
- });
2096
+ }));
2097
2097
  }
2098
2098
  toString() {
2099
2099
  return "#<".concat(this.constructor.type, ">");
2100
2100
  }
2101
2101
  static _fromObject(t) {
2102
2102
  let e = rt(t, Mc), s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { extraParam: i } = s, n = rt(s, Pc);
2103
- return gi(e, n).then((r) => i ? (delete r[i], new this(e[i], r)) : new this(r));
2103
+ return gi(e, n).then(((r) => i ? (delete r[i], new this(e[i], r)) : new this(r)));
2104
2104
  }
2105
2105
  static fromObject(t, e) {
2106
2106
  return this._fromObject(t, e);
@@ -2117,14 +2117,14 @@ function Hs(a) {
2117
2117
  return n.setPositionByOrigin(l, e.originX, e.originY), c;
2118
2118
  };
2119
2119
  }
2120
- const qo = Bs(oi, Hs((a, t, e, s) => {
2120
+ const qo = Bs(oi, Hs(((a, t, e, s) => {
2121
2121
  const i = Kr(t, t.originX, t.originY, e, s);
2122
2122
  if (pt(t.originX) === pt(X) || pt(t.originX) === pt(ct) && i.x < 0 || pt(t.originX) === pt(Q) && i.x > 0) {
2123
2123
  const { target: n } = t, r = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), o = ah(t) ? 2 : 1, h = n.width, l = Math.abs(i.x * o / n.scaleX) - r;
2124
2124
  return n.set("width", Math.max(l, 1)), h !== n.width;
2125
2125
  }
2126
2126
  return !1;
2127
- }));
2127
+ })));
2128
2128
  function Oc(a, t, e, s, i) {
2129
2129
  s = s || {};
2130
2130
  const n = this.sizeX || s.cornerSize || i.cornerSize, r = this.sizeY || s.cornerSize || i.cornerSize, o = s.transparentCorners !== void 0 ? s.transparentCorners : i.transparentCorners, h = o ? It : bt, l = !o && (s.cornerStrokeColor || i.cornerStrokeColor);
@@ -2180,7 +2180,7 @@ class ne {
2180
2180
  ((i = i || {}).cornerStyle || n.cornerStyle) === "circle" ? Oc.call(this, t, e, s, i, n) : Dc.call(this, t, e, s, i, n);
2181
2181
  }
2182
2182
  }
2183
- const Rc = (a, t, e) => e.lockRotation ? on : t.cursorStyle, Lc = Bs(Ga, Hs((a, t, e, s) => {
2183
+ const Rc = (a, t, e) => e.lockRotation ? on : t.cursorStyle, Lc = Bs(Ga, Hs(((a, t, e, s) => {
2184
2184
  let { target: i, ex: n, ey: r, theta: o, originX: h, originY: l } = t;
2185
2185
  const c = i.translateToOriginPoint(i.getRelativeCenterPoint(), h, l);
2186
2186
  if (le(i, "lockRotation")) return !1;
@@ -2193,7 +2193,7 @@ const Rc = (a, t, e) => e.lockRotation ? on : t.cursorStyle, Lc = Bs(Ga, Hs((a,
2193
2193
  f < 0 && (f = 360 + f), f %= 360;
2194
2194
  const g = i.angle !== f;
2195
2195
  return i.angle = f, g;
2196
- }));
2196
+ })));
2197
2197
  function _h(a, t) {
2198
2198
  const e = t.canvas, s = a[e.uniScaleKey];
2199
2199
  return e.uniformScaling && !s || !e.uniformScaling && s;
@@ -2227,7 +2227,7 @@ function so(a, t, e, s) {
2227
2227
  const g = n.scaleX, p = n.scaleY;
2228
2228
  return r ? (r === "x" && n.set(Bt, l), r === "y" && n.set(qt, c)) : (!le(n, "lockScalingX") && n.set(Bt, l), !le(n, "lockScalingY") && n.set(qt, c)), g !== n.scaleX || p !== n.scaleY;
2229
2229
  }
2230
- const xi = Bs(_n, Hs((a, t, e, s) => so(a, t, e, s))), Ic = Bs(_n, Hs((a, t, e, s) => so(a, t, e, s, { by: "x" }))), Nc = Bs(_n, Hs((a, t, e, s) => so(a, t, e, s, { by: "y" }))), jc = ["target", "ex", "ey", "skewingSide"], Zn = { x: { counterAxis: "y", scale: Bt, skew: Is, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: qt, skew: Ns, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, Bc = ["ns", "nesw", "ew", "nwse"], Hc = (a, t, e) => {
2230
+ const xi = Bs(_n, Hs(((a, t, e, s) => so(a, t, e, s)))), Ic = Bs(_n, Hs(((a, t, e, s) => so(a, t, e, s, { by: "x" })))), Nc = Bs(_n, Hs(((a, t, e, s) => so(a, t, e, s, { by: "y" })))), jc = ["target", "ex", "ey", "skewingSide"], Zn = { x: { counterAxis: "y", scale: Bt, skew: Is, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: qt, skew: Ns, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, Bc = ["ns", "nesw", "ew", "nwse"], Hc = (a, t, e) => {
2231
2231
  if (t.x !== 0 && le(e, "lockSkewingY") || t.y !== 0 && le(e, "lockSkewingX")) return on;
2232
2232
  const s = lh(e, t) % 4;
2233
2233
  return "".concat(Bc[s], "-resize");
@@ -2236,7 +2236,7 @@ function xh(a, t, e, s, i) {
2236
2236
  const { target: n } = e, { counterAxis: r, origin: o, lockSkewing: h, skew: l, flip: c } = Zn[a];
2237
2237
  if (le(n, h)) return !1;
2238
2238
  const { origin: u, flip: d } = Zn[r], f = pt(e[u]) * (n[d] ? -1 : 1), g = -Math.sign(f) * (n[c] ? -1 : 1), p = 0.5 * -((n[l] === 0 && Kr(e, X, X, s, i)[a] > 0 || n[l] > 0 ? 1 : -1) * g) + 0.5;
2239
- return Bs(Va, Hs((m, v, y, _) => function(S, A, T) {
2239
+ return Bs(Va, Hs(((m, v, y, _) => (function(S, A, T) {
2240
2240
  let { target: k, ex: M, ey: D, skewingSide: L } = A, E = rt(A, jc);
2241
2241
  const { skew: O } = Zn[S], R = T.subtract(new C(M, D)).divide(new C(k.scaleX, k.scaleY))[S], B = k[O], P = E[O], F = Math.tan(ht(P)), V = S === "y" ? k._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : k._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, st = 2 * R * L / Math.max(V, 1) + F, vt = Ce(Math.atan(st));
2242
2242
  k.set(O, vt);
@@ -2246,7 +2246,7 @@ function xh(a, t, e, s, i) {
2246
2246
  at !== 1 && k.set(Bt, at * et);
2247
2247
  }
2248
2248
  return xt;
2249
- }(a, v, new C(y, _))))(t, w(w({}, e), {}, { [o]: p, skewingSide: g }), s, i);
2249
+ })(a, v, new C(y, _)))))(t, w(w({}, e), {}, { [o]: p, skewingSide: g }), s, i);
2250
2250
  }
2251
2251
  const zc = (a, t, e, s) => xh("x", a, t, e, s), Gc = (a, t, e, s) => xh("y", a, t, e, s);
2252
2252
  function En(a, t) {
@@ -2292,10 +2292,10 @@ class hi extends Te {
2292
2292
  const t = this.getViewportTransform(), e = this.getCenterPoint(), s = js(e.x, e.y), i = ds({ angle: this.getTotalAngle() - (this.group && this.flipX ? 180 : 0) }), n = ut(s, i), r = ut(t, n), o = ut(r, [1 / t[0], 0, 0, 1 / t[3], 0, 0]), h = this.group ? as(this.calcTransformMatrix()) : void 0;
2293
2293
  h && (h.scaleX = Math.abs(h.scaleX), h.scaleY = Math.abs(h.scaleY));
2294
2294
  const l = this._calculateCurrentDimensions(h), c = {};
2295
- return this.forEachControl((u, d) => {
2295
+ return this.forEachControl(((u, d) => {
2296
2296
  const f = u.positionHandler(l, o, this, u);
2297
2297
  c[d] = Object.assign(f, this._calcCornerCoords(u, f));
2298
- }), c;
2298
+ })), c;
2299
2299
  }
2300
2300
  _calcCornerCoords(t, e) {
2301
2301
  const s = this.getTotalAngle();
@@ -2336,20 +2336,20 @@ class hi extends Te {
2336
2336
  }
2337
2337
  drawControlsConnectingLines(t, e) {
2338
2338
  let s = !1;
2339
- t.beginPath(), this.forEachControl((i, n) => {
2339
+ t.beginPath(), this.forEachControl(((i, n) => {
2340
2340
  i.withConnection && i.getVisibility(this, n) && (s = !0, t.moveTo(i.x * e.x, i.y * e.y), t.lineTo(i.x * e.x + i.offsetX, i.y * e.y + i.offsetY));
2341
- }), s && t.stroke();
2341
+ })), s && t.stroke();
2342
2342
  }
2343
2343
  drawControls(t) {
2344
2344
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2345
2345
  t.save();
2346
2346
  const s = this.getCanvasRetinaScaling(), { cornerStrokeColor: i, cornerDashArray: n, cornerColor: r } = this, o = w({ cornerStrokeColor: i, cornerDashArray: n, cornerColor: r }, e);
2347
- t.setTransform(s, 0, 0, s, 0, 0), t.strokeStyle = t.fillStyle = o.cornerColor, this.transparentCorners || (t.strokeStyle = o.cornerStrokeColor), this._setLineDash(t, o.cornerDashArray), this.forEachControl((h, l) => {
2347
+ t.setTransform(s, 0, 0, s, 0, 0), t.strokeStyle = t.fillStyle = o.cornerColor, this.transparentCorners || (t.strokeStyle = o.cornerStrokeColor), this._setLineDash(t, o.cornerDashArray), this.forEachControl(((h, l) => {
2348
2348
  if (h.getVisibility(this, l)) {
2349
2349
  const c = this.oCoords[l];
2350
2350
  h.render(t, c.x, c.y, o, this);
2351
2351
  }
2352
- }), t.restore();
2352
+ })), t.restore();
2353
2353
  }
2354
2354
  isControlVisible(t) {
2355
2355
  return this.controls[t] && this.controls[t].getVisibility(this, t);
@@ -2359,10 +2359,10 @@ class hi extends Te {
2359
2359
  }
2360
2360
  setControlsVisibility() {
2361
2361
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2362
- Object.entries(t).forEach((e) => {
2362
+ Object.entries(t).forEach(((e) => {
2363
2363
  let [s, i] = e;
2364
2364
  return this.setControlVisible(s, i);
2365
- });
2365
+ }));
2366
2366
  }
2367
2367
  clearContextTop(t) {
2368
2368
  if (!this.canvas) return;
@@ -2394,11 +2394,11 @@ class hi extends Te {
2394
2394
  }
2395
2395
  }
2396
2396
  function Ch(a, t) {
2397
- return t.forEach((e) => {
2398
- Object.getOwnPropertyNames(e.prototype).forEach((s) => {
2397
+ return t.forEach(((e) => {
2398
+ Object.getOwnPropertyNames(e.prototype).forEach(((s) => {
2399
2399
  s !== "constructor" && Object.defineProperty(a.prototype, s, Object.getOwnPropertyDescriptor(e.prototype, s) || /* @__PURE__ */ Object.create(null));
2400
- });
2401
- }), a;
2400
+ }));
2401
+ })), a;
2402
2402
  }
2403
2403
  x(hi, "ownDefaults", { noScaleCache: !0, lockMovementX: !1, lockMovementY: !1, lockRotation: !1, lockScalingX: !1, lockScalingY: !1, lockSkewingX: !1, lockSkewingY: !1, lockScalingFlip: !1, cornerSize: 13, touchCornerSize: 24, transparentCorners: !0, cornerColor: "rgb(178,204,255)", cornerStrokeColor: "", cornerStyle: "rect", cornerDashArray: null, hasControls: !0, borderColor: "rgb(178,204,255)", borderDashArray: null, borderOpacityWhenMoving: 0.4, borderScaleFactor: 1, hasBorders: !0, selectionBackgroundColor: "", selectable: !0, evented: !0, perPixelTargetFind: !1, activeOn: "down", hoverCursor: null, moveCursor: null });
2404
2404
  class Mt extends hi {
@@ -2448,9 +2448,9 @@ class Ts extends Th {
2448
2448
  }
2449
2449
  projectBevel() {
2450
2450
  const t = [];
2451
- return (this.alpha % Fe == 0 ? [this.B] : [this.B, this.C]).forEach((e) => {
2451
+ return (this.alpha % Fe == 0 ? [this.B] : [this.B, this.C]).forEach(((e) => {
2452
2452
  t.push(this.projectOrthogonally(this.A, e)), t.push(this.projectOrthogonally(this.A, e, -this.strokeProjectionMagnitude));
2453
- }), t;
2453
+ })), t;
2454
2454
  }
2455
2455
  projectMiter() {
2456
2456
  const t = [], e = Math.abs(this.alpha), s = 1 / Math.sin(e / 2), i = this.scaleUnitVector(this.bisector, -this.strokeProjectionMagnitude * s), n = this.options.strokeUniform ? ln(this.scaleUnitVector(this.bisector, this.options.strokeMiterLimit)) : this.options.strokeMiterLimit;
@@ -2458,15 +2458,15 @@ class Ts extends Th {
2458
2458
  }
2459
2459
  projectRoundNoSkew(t, e) {
2460
2460
  const s = [], i = new C(Ts.getOrthogonalRotationFactor(this.bisector), Ts.getOrthogonalRotationFactor(new C(this.bisector.y, this.bisector.x)));
2461
- return [new C(1, 0).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i), new C(0, 1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i)].forEach((n) => {
2461
+ return [new C(1, 0).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i), new C(0, 1).scalarMultiply(this.strokeProjectionMagnitude).multiply(this.strokeUniformScalar).multiply(i)].forEach(((n) => {
2462
2462
  _r(n, t, e) && s.push(this.A.add(n));
2463
- }), s;
2463
+ })), s;
2464
2464
  }
2465
2465
  projectRoundWithSkew(t, e) {
2466
2466
  const s = [], { skewX: i, skewY: n, scaleX: r, scaleY: o, strokeUniform: h } = this.options, l = new C(Math.tan(ht(i)), Math.tan(ht(n))), c = this.strokeProjectionMagnitude, u = h ? c / o / Math.sqrt(1 / o ** 2 + 1 / r ** 2 * l.y ** 2) : c / Math.sqrt(1 + l.y ** 2), d = new C(Math.sqrt(Math.max(c ** 2 - u ** 2, 0)), u), f = h ? c / Math.sqrt(1 + l.x ** 2 * (1 / o) ** 2 / (1 / r + 1 / r * l.x * l.y) ** 2) : c / Math.sqrt(1 + l.x ** 2 / (1 + l.x * l.y) ** 2), g = new C(f, Math.sqrt(Math.max(c ** 2 - f ** 2, 0)));
2467
- return [g, g.scalarMultiply(-1), d, d.scalarMultiply(-1)].map((p) => this.applySkew(h ? p.multiply(this.strokeUniformScalar) : p)).forEach((p) => {
2467
+ return [g, g.scalarMultiply(-1), d, d.scalarMultiply(-1)].map(((p) => this.applySkew(h ? p.multiply(this.strokeUniformScalar) : p))).forEach(((p) => {
2468
2468
  _r(p, t, e) && s.push(this.applySkew(this.A).add(p));
2469
- }), s;
2469
+ })), s;
2470
2470
  }
2471
2471
  projectRound() {
2472
2472
  const t = [];
@@ -2485,7 +2485,7 @@ class Ts extends Th {
2485
2485
  }
2486
2486
  }
2487
2487
  project() {
2488
- return this.projectPoints().map((t) => ({ originPoint: this.A, projectedPoint: t, angle: this.alpha, bisector: this.bisector }));
2488
+ return this.projectPoints().map(((t) => ({ originPoint: this.A, projectedPoint: t, angle: this.alpha, bisector: this.bisector })));
2489
2489
  }
2490
2490
  }
2491
2491
  class Jo extends Th {
@@ -2517,7 +2517,7 @@ class Jo extends Th {
2517
2517
  const e = this.calcOrthogonalProjection(this.A, this.T, this.strokeProjectionMagnitude), s = this.scaleUnitVector(Tn(this.createSideVector(this.A, this.T)), -this.strokeProjectionMagnitude), i = this.A.add(s);
2518
2518
  t.push(i.add(e), i.subtract(e));
2519
2519
  }
2520
- return t.map((e) => this.applySkew(e));
2520
+ return t.map(((e) => this.applySkew(e)));
2521
2521
  }
2522
2522
  projectPoints() {
2523
2523
  switch (this.options.strokeLineCap) {
@@ -2530,42 +2530,42 @@ class Jo extends Th {
2530
2530
  }
2531
2531
  }
2532
2532
  project() {
2533
- return this.projectPoints().map((t) => ({ originPoint: this.A, projectedPoint: t }));
2533
+ return this.projectPoints().map(((t) => ({ originPoint: this.A, projectedPoint: t })));
2534
2534
  }
2535
2535
  }
2536
2536
  const Eh = function(a, t) {
2537
2537
  let e = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
2538
2538
  const s = [];
2539
2539
  if (a.length === 0) return s;
2540
- const i = a.reduce((n, r) => (n[n.length - 1].eq(r) || n.push(new C(r)), n), [new C(a[0])]);
2540
+ const i = a.reduce(((n, r) => (n[n.length - 1].eq(r) || n.push(new C(r)), n)), [new C(a[0])]);
2541
2541
  if (i.length === 1) e = !0;
2542
2542
  else if (!e) {
2543
2543
  const n = i[0], r = ((o, h) => {
2544
2544
  for (let l = o.length - 1; l >= 0; l--) if (h(o[l], l, o)) return l;
2545
2545
  return -1;
2546
- })(i, (o) => !o.eq(n));
2546
+ })(i, ((o) => !o.eq(n)));
2547
2547
  i.splice(r + 1);
2548
2548
  }
2549
- return i.forEach((n, r, o) => {
2549
+ return i.forEach(((n, r, o) => {
2550
2550
  let h, l;
2551
2551
  r === 0 ? (l = o[1], h = e ? n : o[o.length - 1]) : r === o.length - 1 ? (h = o[r - 1], l = e ? n : o[0]) : (h = o[r - 1], l = o[r + 1]), e && o.length === 1 ? s.push(...new Jo(n, n, t).project()) : !e || r !== 0 && r !== o.length - 1 ? s.push(...new Ts(n, h, l, t).project()) : s.push(...new Jo(n, r === 0 ? l : h, t).project());
2552
- }), s;
2552
+ })), s;
2553
2553
  }, io = (a) => {
2554
2554
  const t = {};
2555
- return Object.keys(a).forEach((e) => {
2556
- t[e] = {}, Object.keys(a[e]).forEach((s) => {
2555
+ return Object.keys(a).forEach(((e) => {
2556
+ t[e] = {}, Object.keys(a[e]).forEach(((s) => {
2557
2557
  t[e][s] = w({}, a[e][s]);
2558
- });
2559
- }), t;
2558
+ }));
2559
+ })), t;
2560
2560
  }, kh = (a) => a.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2561
2561
  let Gs;
2562
2562
  const kn = (a) => {
2563
2563
  if (Gs || Gs || (Gs = "Intl" in di() && "Segmenter" in Intl && new Intl.Segmenter(void 0, { granularity: "grapheme" })), Gs) {
2564
2564
  const t = Gs.segment(a);
2565
- return Array.from(t).map((e) => {
2565
+ return Array.from(t).map(((e) => {
2566
2566
  let { segment: s } = e;
2567
2567
  return s;
2568
- });
2568
+ }));
2569
2569
  }
2570
2570
  return Uc(a);
2571
2571
  }, Uc = (a) => {
@@ -2631,11 +2631,11 @@ function Zo(a, t) {
2631
2631
  function qc(a, t) {
2632
2632
  let e = !0;
2633
2633
  const s = Zo(a, t.pop());
2634
- return s && t.length && (e = function(i, n) {
2634
+ return s && t.length && (e = (function(i, n) {
2635
2635
  let r, o = !0;
2636
2636
  for (; i.parentElement && i.parentElement.nodeType === 1 && n.length; ) o && (r = n.pop()), o = Zo(i = i.parentElement, r);
2637
2637
  return n.length === 0;
2638
- }(a, t)), s && e && t.length === 0;
2638
+ })(a, t)), s && e && t.length === 0;
2639
2639
  }
2640
2640
  const Kc = (a) => {
2641
2641
  var t;
@@ -2650,7 +2650,7 @@ function un(a) {
2650
2650
  const s = hu.exec(e[0]);
2651
2651
  if (!s) continue;
2652
2652
  let i = jt;
2653
- const n = s.filter((g) => !!g), [, r, ...o] = n, [h, l, c, u, d, f] = o.map((g) => parseFloat(g));
2653
+ const n = s.filter(((g) => !!g)), [, r, ...o] = n, [h, l, c, u, d, f] = o.map(((g) => parseFloat(g)));
2654
2654
  switch (r) {
2655
2655
  case "translate":
2656
2656
  i = js(h, l);
@@ -2703,34 +2703,34 @@ function uu(a, t) {
2703
2703
  s && (t.fontStyle = s), i && (t.fontWeight = isNaN(parseFloat(i)) ? i : parseFloat(i)), n && (t.fontSize = Rt(n)), o && (t.fontFamily = o), r && (t.lineHeight = r === "normal" ? 1 : r);
2704
2704
  }
2705
2705
  function xr(a, t) {
2706
- a.replace(/;\s*$/, "").split(";").forEach((e) => {
2706
+ a.replace(/;\s*$/, "").split(";").forEach(((e) => {
2707
2707
  if (!e) return;
2708
2708
  const [s, i] = e.split(":");
2709
2709
  t[s.trim().toLowerCase()] = i.trim();
2710
- });
2710
+ }));
2711
2711
  }
2712
2712
  function du(a) {
2713
2713
  const t = {}, e = a.getAttribute("style");
2714
- return e && (typeof e == "string" ? xr(e, t) : function(s, i) {
2715
- Object.entries(s).forEach((n) => {
2714
+ return e && (typeof e == "string" ? xr(e, t) : (function(s, i) {
2715
+ Object.entries(s).forEach(((n) => {
2716
2716
  let [r, o] = n;
2717
2717
  o !== void 0 && (i[r.toLowerCase()] = o);
2718
- });
2719
- }(e, t)), t;
2718
+ }));
2719
+ })(e, t)), t;
2720
2720
  }
2721
2721
  const fu = { stroke: "strokeOpacity", fill: "fillOpacity" };
2722
2722
  function Ne(a, t, e) {
2723
2723
  if (!a) return {};
2724
2724
  let s, i = {}, n = Hr;
2725
2725
  a.parentNode && Vo.test(a.parentNode.nodeName) && (i = Ne(a.parentElement, t, e), i.fontSize && (s = n = Rt(i.fontSize)));
2726
- const r = w(w(w({}, t.reduce((l, c) => {
2726
+ const r = w(w(w({}, t.reduce(((l, c) => {
2727
2727
  const u = a.getAttribute(c);
2728
2728
  return u && (l[c] = u), l;
2729
- }, {})), function(l) {
2729
+ }), {})), (function(l) {
2730
2730
  let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = {};
2731
2731
  for (const d in c) qc(l, d.split(" ")) && (u = w(w({}, u), c[d]));
2732
2732
  return u;
2733
- }(a, e)), du(a));
2733
+ })(a, e)), du(a));
2734
2734
  r[Kn] && a.setAttribute(Kn, r[Kn]), r[qn] && (s = Rt(r[qn], n), r[qn] = "".concat(s));
2735
2735
  const o = {};
2736
2736
  for (const l in r) {
@@ -2739,9 +2739,9 @@ function Ne(a, t, e) {
2739
2739
  }
2740
2740
  o && o.font && uu(o.font, o);
2741
2741
  const h = w(w({}, i), o);
2742
- return Vo.test(a.nodeName) ? h : function(l) {
2742
+ return Vo.test(a.nodeName) ? h : (function(l) {
2743
2743
  const c = Mt.getDefaults();
2744
- return Object.entries(fu).forEach((u) => {
2744
+ return Object.entries(fu).forEach(((u) => {
2745
2745
  let [d, f] = u;
2746
2746
  if (l[f] === void 0 || l[d] === "") return;
2747
2747
  if (l[d] === void 0) {
@@ -2751,8 +2751,8 @@ function Ne(a, t, e) {
2751
2751
  if (l[d].indexOf("url(") === 0) return;
2752
2752
  const g = new J(l[d]);
2753
2753
  l[d] = g.setAlpha(Z(g.getAlpha() * l[f], 2)).toRgba();
2754
- }), l;
2755
- }(h);
2754
+ })), l;
2755
+ })(h);
2756
2756
  }
2757
2757
  const gu = ["left", "top", "width", "height", "visible"], Oh = ["rx", "ry"];
2758
2758
  class ve extends Mt {
@@ -2808,7 +2808,7 @@ class Pn {
2808
2808
  const { type: s, target: i } = e;
2809
2809
  if (s === fn && e.overrides) return e.overrides;
2810
2810
  if (t.length === 0) return;
2811
- const { left: n, top: r, width: o, height: h } = we(t.map((u) => Dh(i, u)).reduce((u, d) => u.concat(d), [])), l = new C(o, h), c = new C(n, r).add(l.scalarDivide(2));
2811
+ const { left: n, top: r, width: o, height: h } = we(t.map(((u) => Dh(i, u))).reduce(((u, d) => u.concat(d)), [])), l = new C(o, h), c = new C(n, r).add(l.scalarDivide(2));
2812
2812
  if (s === Oe) {
2813
2813
  const u = this.getInitialSize(e, { size: l, center: c });
2814
2814
  return { center: c, relativeCorrection: new C(0, 0), size: u };
@@ -2839,7 +2839,7 @@ class li {
2839
2839
  }
2840
2840
  attachHandlers(t, e) {
2841
2841
  const { target: s } = e;
2842
- return [sn, za, oi, Ga, _n, Va, en, ec, sc].map((i) => t.on(i, (n) => this.performLayout(i === sn ? { type: "object_modified", trigger: i, e: n, target: s } : { type: "object_modifying", trigger: i, e: n, target: s })));
2842
+ return [sn, za, oi, Ga, _n, Va, en, ec, sc].map(((i) => t.on(i, ((n) => this.performLayout(i === sn ? { type: "object_modified", trigger: i, e: n, target: s } : { type: "object_modifying", trigger: i, e: n, target: s })))));
2843
2843
  }
2844
2844
  subscribe(t, e) {
2845
2845
  this.unsubscribe(t, e);
@@ -2847,19 +2847,19 @@ class li {
2847
2847
  this._subscriptions.set(t, s);
2848
2848
  }
2849
2849
  unsubscribe(t, e) {
2850
- (this._subscriptions.get(t) || []).forEach((s) => s()), this._subscriptions.delete(t);
2850
+ (this._subscriptions.get(t) || []).forEach(((s) => s())), this._subscriptions.delete(t);
2851
2851
  }
2852
2852
  unsubscribeTargets(t) {
2853
- t.targets.forEach((e) => this.unsubscribe(e, t));
2853
+ t.targets.forEach(((e) => this.unsubscribe(e, t)));
2854
2854
  }
2855
2855
  subscribeTargets(t) {
2856
- t.targets.forEach((e) => this.subscribe(e, t));
2856
+ t.targets.forEach(((e) => this.subscribe(e, t)));
2857
2857
  }
2858
2858
  onBeforeLayout(t) {
2859
2859
  const { target: e, type: s } = t, { canvas: i } = e;
2860
2860
  if (s === Oe || s === dn ? this.subscribeTargets(t) : s === ro && this.unsubscribeTargets(t), e.fire("layout:before", { context: t }), i && i.fire("object:layout:before", { target: e, context: t }), s === fn && t.deep) {
2861
2861
  const n = rt(t, pu);
2862
- e.forEachObject((r) => r.layoutManager && r.layoutManager.performLayout(w(w({}, n), {}, { bubbles: !1, target: r })));
2862
+ e.forEachObject(((r) => r.layoutManager && r.layoutManager.performLayout(w(w({}, n), {}, { bubbles: !1, target: r }))));
2863
2863
  }
2864
2864
  }
2865
2865
  getLayoutResult(t) {
@@ -2875,9 +2875,9 @@ class li {
2875
2875
  }
2876
2876
  layoutObjects(t, e) {
2877
2877
  const { target: s } = t;
2878
- s.forEachObject((i) => {
2878
+ s.forEachObject(((i) => {
2879
2879
  i.group === s && this.layoutObject(t, e, i);
2880
- }), t.strategy.shouldLayoutClipPath(t) && this.layoutObject(t, e, s.clipPath);
2880
+ })), t.strategy.shouldLayoutClipPath(t) && this.layoutObject(t, e, s.clipPath);
2881
2881
  }
2882
2882
  layoutObject(t, e, s) {
2883
2883
  let { offset: i } = e;
@@ -2891,7 +2891,7 @@ class li {
2891
2891
  }
2892
2892
  dispose() {
2893
2893
  const { _subscriptions: t } = this;
2894
- t.forEach((e) => e.forEach((s) => s())), t.clear();
2894
+ t.forEach(((e) => e.forEach(((s) => s())))), t.clear();
2895
2895
  }
2896
2896
  toObject() {
2897
2897
  return { type: Rh, strategy: this.strategy.constructor.type };
@@ -2916,15 +2916,15 @@ class ee extends Xa(Mt) {
2916
2916
  }
2917
2917
  groupInit(t, e) {
2918
2918
  var s;
2919
- this._objects = [...t], this.__objectSelectionTracker = this.__objectSelectionMonitor.bind(this, !0), this.__objectSelectionDisposer = this.__objectSelectionMonitor.bind(this, !1), this.forEachObject((i) => {
2919
+ this._objects = [...t], this.__objectSelectionTracker = this.__objectSelectionMonitor.bind(this, !0), this.__objectSelectionDisposer = this.__objectSelectionMonitor.bind(this, !1), this.forEachObject(((i) => {
2920
2920
  this.enterGroup(i, !1);
2921
- }), this.layoutManager = (s = e.layoutManager) !== null && s !== void 0 ? s : new li(), this.layoutManager.performLayout({ type: Oe, target: this, targets: [...t], x: e.left, y: e.top });
2921
+ })), this.layoutManager = (s = e.layoutManager) !== null && s !== void 0 ? s : new li(), this.layoutManager.performLayout({ type: Oe, target: this, targets: [...t], x: e.left, y: e.top });
2922
2922
  }
2923
2923
  canEnterGroup(t) {
2924
2924
  return t === this || this.isDescendantOf(t) ? (Le("error", "Group: circular object trees are not supported, this call has no effect"), !1) : this._objects.indexOf(t) === -1 || (Le("error", "Group: duplicate objects are not supported inside group, this call has no effect"), !1);
2925
2925
  }
2926
2926
  _filterObjectsBeforeEnteringGroup(t) {
2927
- return t.filter((e, s, i) => this.canEnterGroup(e) && i.indexOf(e) === s);
2927
+ return t.filter(((e, s, i) => this.canEnterGroup(e) && i.indexOf(e) === s));
2928
2928
  }
2929
2929
  add() {
2930
2930
  for (var t = arguments.length, e = new Array(t), s = 0; s < t; s++) e[s] = arguments[s];
@@ -2954,9 +2954,9 @@ class ee extends Xa(Mt) {
2954
2954
  }
2955
2955
  _set(t, e) {
2956
2956
  const s = this[t];
2957
- return super._set(t, e), t === "canvas" && s !== e && (this._objects || []).forEach((i) => {
2957
+ return super._set(t, e), t === "canvas" && s !== e && (this._objects || []).forEach(((i) => {
2958
2958
  i._set(t, e);
2959
- }), this;
2959
+ })), this;
2960
2960
  }
2961
2961
  _shouldSetNestedCoords() {
2962
2962
  return this.subTargetCheck;
@@ -3017,7 +3017,7 @@ class ee extends Xa(Mt) {
3017
3017
  this._drawClipPath(t, this.clipPath, s);
3018
3018
  }
3019
3019
  setCoords() {
3020
- super.setCoords(), this._shouldSetNestedCoords() && this.forEachObject((t) => t.setCoords());
3020
+ super.setCoords(), this._shouldSetNestedCoords() && this.forEachObject(((t) => t.setCoords()));
3021
3021
  }
3022
3022
  triggerLayout() {
3023
3023
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -3028,14 +3028,14 @@ class ee extends Xa(Mt) {
3028
3028
  }
3029
3029
  __serializeObjects(t, e) {
3030
3030
  const s = this.includeDefaultValues;
3031
- return this._objects.filter(function(i) {
3031
+ return this._objects.filter((function(i) {
3032
3032
  return !i.excludeFromExport;
3033
- }).map(function(i) {
3033
+ })).map((function(i) {
3034
3034
  const n = i.includeDefaultValues;
3035
3035
  i.includeDefaultValues = s;
3036
3036
  const r = i[t || "toObject"](e);
3037
3037
  return i.includeDefaultValues = n, r;
3038
- });
3038
+ }));
3039
3039
  }
3040
3040
  toObject() {
3041
3041
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
@@ -3046,9 +3046,9 @@ class ee extends Xa(Mt) {
3046
3046
  return "#<Group: (".concat(this.complexity(), ")>");
3047
3047
  }
3048
3048
  dispose() {
3049
- this.layoutManager.unsubscribeTargets({ targets: this.getObjects(), target: this }), this._activeObjects = [], this.forEachObject((t) => {
3049
+ this.layoutManager.unsubscribeTargets({ targets: this.getObjects(), target: this }), this._activeObjects = [], this.forEachObject(((t) => {
3050
3050
  this._watchObject(!1, t), t.dispose();
3051
- }), super.dispose();
3051
+ })), super.dispose();
3052
3052
  }
3053
3053
  _createSVGBgRect(t) {
3054
3054
  if (!this.backgroundColor) return "";
@@ -3077,7 +3077,7 @@ class ee extends Xa(Mt) {
3077
3077
  }
3078
3078
  static fromObject(t, e) {
3079
3079
  let { type: s, objects: i = [], layoutManager: n } = t, r = rt(t, bu);
3080
- return Promise.all([Os(i, e), gi(r, e)]).then((o) => {
3080
+ return Promise.all([Os(i, e), gi(r, e)]).then(((o) => {
3081
3081
  let [h, l] = o;
3082
3082
  const c = new this(h, w(w(w({}, r), l), {}, { layoutManager: new vu() }));
3083
3083
  if (n) {
@@ -3085,7 +3085,7 @@ class ee extends Xa(Mt) {
3085
3085
  c.layoutManager = new u(new d());
3086
3086
  } else c.layoutManager = new li();
3087
3087
  return c.layoutManager.subscribeTargets({ type: Oe, target: c, targets: c.getObjects() }), c.setCoords(), c;
3088
- });
3088
+ }));
3089
3089
  }
3090
3090
  }
3091
3091
  x(ee, "type", "Group"), x(ee, "ownDefaults", { strokeWidth: 0, subTargetCheck: !1, interactive: !1 }), I.setClass(ee);
@@ -3197,7 +3197,7 @@ const xu = (a, t, e) => {
3197
3197
  case "a":
3198
3198
  c[6] += t, c[7] += e;
3199
3199
  case "A":
3200
- xu(t, e, c).forEach((d) => n.push(d)), t = c[6], e = c[7];
3200
+ xu(t, e, c).forEach(((d) => n.push(d))), t = c[6], e = c[7];
3201
3201
  break;
3202
3202
  case "z":
3203
3203
  case "Z":
@@ -3304,13 +3304,13 @@ const xu = (a, t, e) => {
3304
3304
  e = a[l], l + 1 < a.length && (s = a[l + 1]);
3305
3305
  }
3306
3306
  return h && (i = e.x > a[l - 2].x ? 1 : e.x === a[l - 2].x ? 0 : -1, n = e.y > a[l - 2].y ? 1 : e.y === a[l - 2].y ? 0 : -1), r.push(["L", e.x + i * t, e.y + n * t]), r;
3307
- }, Vh = (a, t) => a.map((e) => e.map((s, i) => i === 0 || t === void 0 ? s : Z(s, t)).join(" ")).join(" ");
3307
+ }, Vh = (a, t) => a.map(((e) => e.map(((s, i) => i === 0 || t === void 0 ? s : Z(s, t))).join(" "))).join(" ");
3308
3308
  function pn(a, t) {
3309
3309
  const e = a.style;
3310
- e && t && (typeof t == "string" ? e.cssText += ";" + t : Object.entries(t).forEach((s) => {
3310
+ e && t && (typeof t == "string" ? e.cssText += ";" + t : Object.entries(t).forEach(((s) => {
3311
3311
  let [i, n] = s;
3312
3312
  return e.setProperty(i, n);
3313
- }));
3313
+ })));
3314
3314
  }
3315
3315
  const Ou = (a, t) => Math.floor(Math.random() * (t - a + 1)) + a;
3316
3316
  function Xh(a) {
@@ -3368,14 +3368,14 @@ var Du = Object.freeze({ __proto__: null, addTransformToObject: ih, animate: eo,
3368
3368
  }, multiplyTransformMatrices: ut, multiplyTransformMatrixArray: xn, parsePath: Gh, parsePreserveAspectRatioAttribute: Qr, parseUnit: Rt, pick: fs, projectStrokeOnPoints: Eh, qrDecompose: as, radiansToDegrees: Ce, removeFromArray: qe, removeTransformFromObject: (a, t) => {
3369
3369
  const e = Xt(t), s = ut(e, a.calcOwnMatrix());
3370
3370
  Rs(a, s);
3371
- }, removeTransformMatrixForSvgParsing: Qi, request: Xh, requestAnimFrame: Zs, resetObjectTransform: nh, rotatePoint: (a, t, e) => a.rotate(e, t), rotateVector: Jr, saveObjectTransform: qr, sendObjectToPlane: vr, sendPointToPlane: os, sendVectorToPlane: rh, setStyle: pn, sin: ue, sizeAfterTransform: Cn, string: $c, stylesFromArray: Ph, stylesToArray: Mh, toBlob: Wr, toDataURL: Xr, toFixed: Z, transformPath: (a, t, e) => (e && (t = ut(t, [1, 0, 0, 1, -e.x, -e.y])), a.map((s) => {
3371
+ }, removeTransformMatrixForSvgParsing: Qi, request: Xh, requestAnimFrame: Zs, resetObjectTransform: nh, rotatePoint: (a, t, e) => a.rotate(e, t), rotateVector: Jr, saveObjectTransform: qr, sendObjectToPlane: vr, sendPointToPlane: os, sendVectorToPlane: rh, setStyle: pn, sin: ue, sizeAfterTransform: Cn, string: $c, stylesFromArray: Ph, stylesToArray: Mh, toBlob: Wr, toDataURL: Xr, toFixed: Z, transformPath: (a, t, e) => (e && (t = ut(t, [1, 0, 0, 1, -e.x, -e.y])), a.map(((s) => {
3372
3372
  const i = [...s];
3373
3373
  for (let n = 1; n < s.length - 1; n += 2) {
3374
3374
  const { x: r, y: o } = At({ x: s[n], y: s[n + 1] }, t);
3375
3375
  i[n] = r, i[n + 1] = o;
3376
3376
  }
3377
3377
  return i;
3378
- })), transformPoint: At });
3378
+ }))), transformPoint: At });
3379
3379
  class Ru extends eh {
3380
3380
  constructor(t) {
3381
3381
  let { allowTouchScrolling: e = !1, containerClass: s = "" } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -3445,7 +3445,7 @@ class On extends pi {
3445
3445
  }
3446
3446
  _chooseObjectsToRender() {
3447
3447
  const t = this._activeObject;
3448
- return !this.preserveObjectStacking && t ? this._objects.filter((e) => !e.group && e !== t).concat(t) : this._objects;
3448
+ return !this.preserveObjectStacking && t ? this._objects.filter(((e) => !e.group && e !== t)).concat(t) : this._objects;
3449
3449
  }
3450
3450
  renderAll() {
3451
3451
  this.cancelRequestedRender(), this.destroyed || (!this.contextTopDirty || this._groupSelector || this.isDrawingMode || (this.clearContext(this.contextTop), this.contextTopDirty = !1), this.hasLostContext && (this.renderTopLayer(this.contextTop), this.hasLostContext = !1), !this._objectsToRender && (this._objectsToRender = this._chooseObjectsToRender()), this.renderCanvas(this.getContext(), this._objectsToRender));
@@ -3472,7 +3472,7 @@ class On extends pi {
3472
3472
  }
3473
3473
  _isSelectionKeyPressed(t) {
3474
3474
  const e = this.selectionKey;
3475
- return !!e && (Array.isArray(e) ? !!e.find((s) => !!s && t[s] === !0) : t[e]);
3475
+ return !!e && (Array.isArray(e) ? !!e.find(((s) => !!s && t[s] === !0)) : t[e]);
3476
3476
  }
3477
3477
  _shouldClearSelection(t, e) {
3478
3478
  const s = this.getActiveObjects(), i = this._activeObject;
@@ -3599,11 +3599,11 @@ class On extends pi {
3599
3599
  _fireSelectionEvents(t, e) {
3600
3600
  let s = !1, i = !1;
3601
3601
  const n = this.getActiveObjects(), r = [], o = [];
3602
- t.forEach((h) => {
3602
+ t.forEach(((h) => {
3603
3603
  n.includes(h) || (s = !0, h.fire("deselected", { e, target: h }), o.push(h));
3604
- }), n.forEach((h) => {
3604
+ })), n.forEach(((h) => {
3605
3605
  t.includes(h) || (s = !0, h.fire("selected", { e, target: h }), r.push(h));
3606
- }), t.length > 0 && n.length > 0 ? (i = !0, s && this.fire("selection:updated", { e, selected: r, deselected: o })) : n.length > 0 ? (i = !0, this.fire("selection:created", { e, selected: r })) : t.length > 0 && (i = !0, this.fire("selection:cleared", { e, deselected: o })), i && (this._objectsToRender = void 0);
3606
+ })), t.length > 0 && n.length > 0 ? (i = !0, s && this.fire("selection:updated", { e, selected: r, deselected: o })) : n.length > 0 ? (i = !0, this.fire("selection:created", { e, selected: r })) : t.length > 0 && (i = !0, this.fire("selection:cleared", { e, deselected: o })), i && (this._objectsToRender = void 0);
3607
3607
  }
3608
3608
  setActiveObject(t, e) {
3609
3609
  const s = this.getActiveObjects(), i = this._setActiveObject(t, e);
@@ -3675,9 +3675,9 @@ class Lu {
3675
3675
  s.addEventListener("click", e), this.__disposer = () => s.removeEventListener("click", e);
3676
3676
  }
3677
3677
  exitTextEditing() {
3678
- this.target = void 0, this.targets.forEach((t) => {
3678
+ this.target = void 0, this.targets.forEach(((t) => {
3679
3679
  t.isEditing && t.exitEditing();
3680
- });
3680
+ }));
3681
3681
  }
3682
3682
  add(t) {
3683
3683
  this.targets.push(t);
@@ -3714,9 +3714,9 @@ const Fu = ["target", "oldTarget", "fireCanvas", "e"], Ut = { passive: !1 }, ys
3714
3714
  }, Iu = { mouse: { in: "over", out: "out", targetIn: "mouseover", targetOut: "mouseout", canvasIn: "mouse:over", canvasOut: "mouse:out" }, drag: { in: "enter", out: "leave", targetIn: "dragenter", targetOut: "dragleave", canvasIn: "drag:enter", canvasOut: "drag:leave" } };
3715
3715
  class Tr extends On {
3716
3716
  constructor(t) {
3717
- super(t, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}), x(this, "_isClick", void 0), x(this, "textEditingManager", new Lu(this)), ["_onMouseDown", "_onTouchStart", "_onMouseMove", "_onMouseUp", "_onTouchEnd", "_onResize", "_onMouseWheel", "_onMouseOut", "_onMouseEnter", "_onContextMenu", "_onClick", "_onDragStart", "_onDragEnd", "_onDragProgress", "_onDragOver", "_onDragEnter", "_onDragLeave", "_onDrop"].forEach((e) => {
3717
+ super(t, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}), x(this, "_isClick", void 0), x(this, "textEditingManager", new Lu(this)), ["_onMouseDown", "_onTouchStart", "_onMouseMove", "_onMouseUp", "_onTouchEnd", "_onResize", "_onMouseWheel", "_onMouseOut", "_onMouseEnter", "_onContextMenu", "_onClick", "_onDragStart", "_onDragEnd", "_onDragProgress", "_onDragOver", "_onDragEnter", "_onDragLeave", "_onDrop"].forEach(((e) => {
3718
3718
  this[e] = this[e].bind(this);
3719
- }), this.addOrRemove(He, "add");
3719
+ })), this.addOrRemove(He, "add");
3720
3720
  }
3721
3721
  _getEventPrefix() {
3722
3722
  return this.enablePointerEvents ? "pointer" : "mouse";
@@ -3735,9 +3735,9 @@ class Tr extends On {
3735
3735
  }
3736
3736
  _onMouseOut(t) {
3737
3737
  const e = this._hoveredTarget, s = w({ e: t }, ys(this, t));
3738
- this.fire("mouse:out", w(w({}, s), {}, { target: e })), this._hoveredTarget = void 0, e && e.fire("mouseout", w({}, s)), this._hoveredTargets.forEach((i) => {
3738
+ this.fire("mouse:out", w(w({}, s), {}, { target: e })), this._hoveredTarget = void 0, e && e.fire("mouseout", w({}, s)), this._hoveredTargets.forEach(((i) => {
3739
3739
  this.fire("mouse:out", w(w({}, s), {}, { target: i })), i && i.fire("mouseout", w({}, s));
3740
- }), this._hoveredTargets = [];
3740
+ })), this._hoveredTargets = [];
3741
3741
  }
3742
3742
  _onMouseEnter(t) {
3743
3743
  this._currentTransform || this.findTarget(t) || (this.fire("mouse:over", w({ e: t }, ys(this, t))), this._hoveredTarget = void 0, this._hoveredTargets = []);
@@ -3825,9 +3825,9 @@ class Tr extends On {
3825
3825
  if (t.touches.length > 0) return;
3826
3826
  this.__onMouseUp(t), this._resetTransformEventData(), delete this.mainTouchId;
3827
3827
  const e = this._getEventPrefix(), s = ae(this.upperCanvasEl);
3828
- Qt(s, "touchend", this._onTouchEnd, Ut), Qt(s, "touchmove", this._onMouseMove, Ut), this._willAddMouseDown && clearTimeout(this._willAddMouseDown), this._willAddMouseDown = setTimeout(() => {
3828
+ Qt(s, "touchend", this._onTouchEnd, Ut), Qt(s, "touchmove", this._onMouseMove, Ut), this._willAddMouseDown && clearTimeout(this._willAddMouseDown), this._willAddMouseDown = setTimeout((() => {
3829
3829
  He(this.upperCanvasEl, "".concat(e, "down"), this._onMouseDown), this._willAddMouseDown = 0;
3830
- }, 400);
3830
+ }), 400);
3831
3831
  }
3832
3832
  _onMouseUp(t) {
3833
3833
  this.__onMouseUp(t), this._resetTransformEventData();
@@ -3987,9 +3987,9 @@ class Tr extends On {
3987
3987
  if (n) {
3988
3988
  const r = n.control;
3989
3989
  this.setCursor(r.cursorStyleHandler(t, r, e));
3990
- } else e.subTargetCheck && this.targets.concat().reverse().map((r) => {
3990
+ } else e.subTargetCheck && this.targets.concat().reverse().map(((r) => {
3991
3991
  s = r.hoverCursor || s;
3992
- }), this.setCursor(s);
3992
+ })), this.setCursor(s);
3993
3993
  }
3994
3994
  handleMultiSelection(t, e) {
3995
3995
  const s = this._activeObject, i = Ke(s);
@@ -4012,7 +4012,7 @@ class Tr extends On {
4012
4012
  }
4013
4013
  handleSelection(t) {
4014
4014
  if (!this.selection || !this._groupSelector) return !1;
4015
- const { x: e, y: s, deltaX: i, deltaY: n } = this._groupSelector, r = new C(e, s), o = r.add(new C(i, n)), h = r.min(o), l = r.max(o).subtract(h), c = this.collectObjects({ left: h.x, top: h.y, width: l.x, height: l.y }, { includeIntersecting: !this.selectionFullyContained }), u = r.eq(o) ? c[0] ? [c[0]] : [] : c.length > 1 ? c.filter((d) => !d.onSelect({ e: t })).reverse() : c;
4015
+ const { x: e, y: s, deltaX: i, deltaY: n } = this._groupSelector, r = new C(e, s), o = r.add(new C(i, n)), h = r.min(o), l = r.max(o).subtract(h), c = this.collectObjects({ left: h.x, top: h.y, width: l.x, height: l.y }, { includeIntersecting: !this.selectionFullyContained }), u = r.eq(o) ? c[0] ? [c[0]] : [] : c.length > 1 ? c.filter(((d) => !d.onSelect({ e: t }))).reverse() : c;
4016
4016
  if (u.length === 1) this.setActiveObject(u[0], t);
4017
4017
  else if (u.length > 1) {
4018
4018
  const d = I.getClass("ActiveSelection");
@@ -4043,7 +4043,7 @@ function zu(a, t) {
4043
4043
  const r = i.split(Bu);
4044
4044
  r[r.length - 1] === "" && r.pop();
4045
4045
  for (let o = r.length; o--; ) {
4046
- const [h, l] = r[o].split(Hu).map((c) => c.trim());
4046
+ const [h, l] = r[o].split(Hu).map(((c) => c.trim()));
4047
4047
  h === "stop-color" ? e = l : h === "stop-opacity" && (s = l);
4048
4048
  }
4049
4049
  }
@@ -4065,17 +4065,17 @@ function ie(a, t) {
4065
4065
  return a.getAttribute(t);
4066
4066
  }
4067
4067
  function Vu(a, t) {
4068
- return function(e, s) {
4068
+ return (function(e, s) {
4069
4069
  let i, { width: n, height: r, gradientUnits: o } = s;
4070
- return Object.keys(e).reduce((h, l) => {
4070
+ return Object.keys(e).reduce(((h, l) => {
4071
4071
  const c = e[l];
4072
4072
  return c === "Infinity" ? i = 1 : c === "-Infinity" ? i = 0 : (i = typeof c == "string" ? parseFloat(c) : c, typeof c == "string" && Uh(c) && (i *= 0.01, o === "pixels" && (l !== "x1" && l !== "x2" && l !== "r2" || (i *= n), l !== "y1" && l !== "y2" || (i *= r)))), h[l] = i, h;
4073
- }, {});
4074
- }($h(a) === "linear" ? function(e) {
4073
+ }), {});
4074
+ })($h(a) === "linear" ? (function(e) {
4075
4075
  return { x1: ie(e, "x1") || 0, y1: ie(e, "y1") || 0, x2: ie(e, "x2") || "100%", y2: ie(e, "y2") || 0 };
4076
- }(a) : function(e) {
4076
+ })(a) : (function(e) {
4077
4077
  return { x1: ie(e, "fx") || ie(e, "cx") || "50%", y1: ie(e, "fy") || ie(e, "cy") || "50%", r1: 0, x2: ie(e, "cx") || "50%", y2: ie(e, "cy") || "50%", r2: ie(e, "r") || "50%" };
4078
- }(a), w(w({}, t), {}, { gradientUnits: qh(a) }));
4078
+ })(a), w(w({}, t), {}, { gradientUnits: qh(a) }));
4079
4079
  }
4080
4080
  class qs {
4081
4081
  constructor(t) {
@@ -4090,11 +4090,11 @@ class qs {
4090
4090
  return this;
4091
4091
  }
4092
4092
  toObject(t) {
4093
- return w(w({}, fs(this, t)), {}, { type: this.type, coords: w({}, this.coords), colorStops: this.colorStops.map((e) => w({}, e)), offsetX: this.offsetX, offsetY: this.offsetY, gradientUnits: this.gradientUnits, gradientTransform: this.gradientTransform ? [...this.gradientTransform] : void 0 });
4093
+ return w(w({}, fs(this, t)), {}, { type: this.type, coords: w({}, this.coords), colorStops: this.colorStops.map(((e) => w({}, e))), offsetX: this.offsetX, offsetY: this.offsetY, gradientUnits: this.gradientUnits, gradientTransform: this.gradientTransform ? [...this.gradientTransform] : void 0 });
4094
4094
  }
4095
4095
  toSVG(t) {
4096
4096
  let { additionalTransform: e } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4097
- const s = [], i = this.gradientTransform ? this.gradientTransform.concat() : jt.concat(), n = this.gradientUnits === "pixels" ? "userSpaceOnUse" : "objectBoundingBox", r = this.colorStops.map((u) => w({}, u)).sort((u, d) => u.offset - d.offset);
4097
+ const s = [], i = this.gradientTransform ? this.gradientTransform.concat() : jt.concat(), n = this.gradientUnits === "pixels" ? "userSpaceOnUse" : "objectBoundingBox", r = this.colorStops.map(((u) => w({}, u))).sort(((u, d) => u.offset - d.offset));
4098
4098
  let o = -this.offsetX, h = -this.offsetY;
4099
4099
  var l;
4100
4100
  n === "objectBoundingBox" ? (o /= t.width, h /= t.height) : (o += t.width / 2, h += t.height / 2), (l = t) && typeof l._renderPathCommands == "function" && this.gradientUnits !== "percentage" && (o -= t.pathOffset.x, h -= t.pathOffset.y), i[4] -= o, i[5] -= h;
@@ -4106,34 +4106,34 @@ class qs {
4106
4106
  } else if (this.type === "radial") {
4107
4107
  const { x1: u, y1: d, x2: f, y2: g, r1: p, r2: b } = this.coords, m = p > b;
4108
4108
  s.push("<radialGradient ", c, ' cx="', m ? u : f, '" cy="', m ? d : g, '" r="', m ? p : b, '" fx="', m ? f : u, '" fy="', m ? g : d, `">
4109
- `), m && (r.reverse(), r.forEach((y) => {
4109
+ `), m && (r.reverse(), r.forEach(((y) => {
4110
4110
  y.offset = 1 - y.offset;
4111
- }));
4111
+ })));
4112
4112
  const v = Math.min(p, b);
4113
4113
  if (v > 0) {
4114
4114
  const y = v / Math.max(p, b);
4115
- r.forEach((_) => {
4115
+ r.forEach(((_) => {
4116
4116
  _.offset += y * (1 - _.offset);
4117
- });
4117
+ }));
4118
4118
  }
4119
4119
  }
4120
- return r.forEach((u) => {
4120
+ return r.forEach(((u) => {
4121
4121
  let { color: d, offset: f, opacity: g } = u;
4122
4122
  s.push("<stop ", 'offset="', 100 * f + "%", '" style="stop-color:', d, g !== void 0 ? ";stop-opacity: " + g : ";", `"/>
4123
4123
  `);
4124
- }), s.push(this.type === "linear" ? "</linearGradient>" : "</radialGradient>", `
4124
+ })), s.push(this.type === "linear" ? "</linearGradient>" : "</radialGradient>", `
4125
4125
  `), s.join("");
4126
4126
  }
4127
4127
  toLive(t) {
4128
4128
  const { x1: e, y1: s, x2: i, y2: n, r1: r, r2: o } = this.coords, h = this.type === "linear" ? t.createLinearGradient(e, s, i, n) : t.createRadialGradient(e, s, r, i, n, o);
4129
- return this.colorStops.forEach((l) => {
4129
+ return this.colorStops.forEach(((l) => {
4130
4130
  let { color: c, opacity: u, offset: d } = l;
4131
4131
  h.addColorStop(d, u !== void 0 ? new J(c).setAlpha(u).toRgba() : c);
4132
- }), h;
4132
+ })), h;
4133
4133
  }
4134
4134
  static async fromObject(t) {
4135
4135
  const { colorStops: e, gradientTransform: s } = t;
4136
- return new this(w(w({}, t), {}, { colorStops: e ? e.map((i) => w({}, i)) : void 0, gradientTransform: s ? [...s] : void 0 }));
4136
+ return new this(w(w({}, t), {}, { colorStops: e ? e.map(((i) => w({}, i))) : void 0, gradientTransform: s ? [...s] : void 0 }));
4137
4137
  }
4138
4138
  static fromElement(t, e, s) {
4139
4139
  const i = qh(t), n = e._findCenterFromElement();
@@ -4223,7 +4223,7 @@ class Qe extends Mt {
4223
4223
  }
4224
4224
  toObject() {
4225
4225
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
4226
- return w(w({}, super.toObject(t)), {}, { path: this.path.map((e) => e.slice()) });
4226
+ return w(w({}, super.toObject(t)), {}, { path: this.path.map(((e) => e.slice())) });
4227
4227
  }
4228
4228
  toDatalessObject() {
4229
4229
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
@@ -4475,9 +4475,9 @@ class oe extends Mt {
4475
4475
  }
4476
4476
  _calcDimensions(t) {
4477
4477
  t = w({ scaleX: this.scaleX, scaleY: this.scaleY, skewX: this.skewX, skewY: this.skewY, strokeLineCap: this.strokeLineCap, strokeLineJoin: this.strokeLineJoin, strokeMiterLimit: this.strokeMiterLimit, strokeUniform: this.strokeUniform, strokeWidth: this.strokeWidth }, t || {});
4478
- const e = this.exactBoundingBox ? this._projectStrokeOnPoints(t).map((l) => l.projectedPoint) : this.points;
4478
+ const e = this.exactBoundingBox ? this._projectStrokeOnPoints(t).map(((l) => l.projectedPoint)) : this.points;
4479
4479
  if (e.length === 0) return { left: 0, top: 0, width: 0, height: 0, pathOffset: new C(), strokeOffset: new C(), strokeDiff: new C() };
4480
- const s = we(e), i = fi(w(w({}, t), {}, { scaleX: 1, scaleY: 1 })), n = we(this.points.map((l) => At(l, i, !0))), r = new C(this.scaleX, this.scaleY);
4480
+ const s = we(e), i = fi(w(w({}, t), {}, { scaleX: 1, scaleY: 1 })), n = we(this.points.map(((l) => At(l, i, !0)))), r = new C(this.scaleX, this.scaleY);
4481
4481
  let o = s.left + s.width / 2, h = s.top + s.height / 2;
4482
4482
  return this.exactBoundingBox && (o -= h * Math.tan(ht(this.skewX)), h -= o * Math.tan(ht(this.skewY))), w(w({}, s), {}, { pathOffset: new C(o, h), strokeOffset: new C(n.left, n.top).subtract(new C(s.left, s.top)).multiply(r), strokeDiff: new C(s.width, s.height).subtract(new C(n.width, n.height)).multiply(r) });
4483
4483
  }
@@ -4502,7 +4502,7 @@ class oe extends Mt {
4502
4502
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4503
4503
  if (this.exactBoundingBox) {
4504
4504
  let r;
4505
- if (Object.keys(t).some((o) => this.strokeUniform || this.constructor.layoutProperties.includes(o))) {
4505
+ if (Object.keys(t).some(((o) => this.strokeUniform || this.constructor.layoutProperties.includes(o)))) {
4506
4506
  var e, s;
4507
4507
  const { width: o, height: h } = this._calcDimensions(t);
4508
4508
  r = new C((e = t.width) !== null && e !== void 0 ? e : o, (s = t.height) !== null && s !== void 0 ? s : h);
@@ -4520,10 +4520,10 @@ class oe extends Mt {
4520
4520
  }
4521
4521
  toObject() {
4522
4522
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
4523
- return w(w({}, super.toObject(t)), {}, { points: this.points.map((e) => {
4523
+ return w(w({}, super.toObject(t)), {}, { points: this.points.map(((e) => {
4524
4524
  let { x: s, y: i } = e;
4525
4525
  return { x: s, y: i };
4526
- }) });
4526
+ })) });
4527
4527
  }
4528
4528
  _toSVG() {
4529
4529
  const t = [], e = this.pathOffset.x, s = this.pathOffset.y, i = q.NUM_FRACTION_DIGITS;
@@ -4599,7 +4599,7 @@ class Zh extends Mt {
4599
4599
  _extendStyles(t, e) {
4600
4600
  const { lineIndex: s, charIndex: i } = this.get2DCursorLocation(t);
4601
4601
  this._getLineStyle(s) || this._setLineStyle(s);
4602
- const n = $r(w(w({}, this._getStyleDeclaration(s, i)), e), (r) => r !== void 0);
4602
+ const n = $r(w(w({}, this._getStyleDeclaration(s, i)), e), ((r) => r !== void 0));
4603
4603
  this._setStyleDeclaration(s, i, n);
4604
4604
  }
4605
4605
  getSelectionStyles(t, e, s) {
@@ -4642,11 +4642,11 @@ class Zh extends Mt {
4642
4642
  x(Zh, "_styleProperties", cc);
4643
4643
  const Ju = / +/g, Zu = /"/g;
4644
4644
  function er(a, t, e, s, i) {
4645
- return " ".concat(function(n, r) {
4645
+ return " ".concat((function(n, r) {
4646
4646
  let { left: o, top: h, width: l, height: c } = r, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : q.NUM_FRACTION_DIGITS;
4647
- const d = ai(bt, n, !1), [f, g, p, b] = [o, h, l, c].map((m) => Z(m, u));
4647
+ const d = ai(bt, n, !1), [f, g, p, b] = [o, h, l, c].map(((m) => Z(m, u)));
4648
4648
  return "<rect ".concat(d, ' x="').concat(f, '" y="').concat(g, '" width="').concat(p, '" height="').concat(b, '"></rect>');
4649
- }(a, { left: t, top: e, width: s, height: i }), `
4649
+ })(a, { left: t, top: e, width: s, height: i }), `
4650
4650
  `);
4651
4651
  }
4652
4652
  const td = ["textAnchor", "textDecoration", "dx", "dy", "top", "left", "fontSize", "strokeWidth"];
@@ -4753,9 +4753,9 @@ class Ct extends Zh {
4753
4753
  const n = Js.getFontCache(e), r = this._getFontDeclaration(e), o = s + t, h = s && r === this._getFontDeclaration(i), l = e.fontSize / this.CACHE_FONT_SIZE;
4754
4754
  let c, u, d, f;
4755
4755
  if (s && n[s] !== void 0 && (d = n[s]), n[t] !== void 0 && (f = c = n[t]), h && n[o] !== void 0 && (u = n[o], f = u - d), c === void 0 || d === void 0 || u === void 0) {
4756
- const g = function() {
4756
+ const g = (function() {
4757
4757
  return sr || (sr = Kt({ width: 0, height: 0 }).getContext("2d")), sr;
4758
- }();
4758
+ })();
4759
4759
  this._setTextStyles(g, e, !0), c === void 0 && (f = c = g.measureText(t).width, n[t] = c), d === void 0 && h && s && (d = g.measureText(s).width, n[s] = d), h && u === void 0 && (u = g.measureText(o).width, n[o] = u, f = u - d);
4760
4760
  }
4761
4761
  return { width: c * l, kernedWidth: f * l };
@@ -5051,7 +5051,7 @@ x(Ct, "textLayoutProperties", fh), x(Ct, "cacheProperties", [...Ie, ...gh]), x(C
5051
5051
  return [i ? ai(It, i) : "", s ? "stroke-width: ".concat(s, "; ") : "", e ? "font-family: ".concat(e.includes("'") || e.includes('"') ? e : "'".concat(e, "'"), "; ") : "", r ? "font-size: ".concat(r, "px; ") : "", o ? "font-style: ".concat(o, "; ") : "", h ? "font-weight: ".concat(h, "; ") : "", g ? "text-decoration: ".concat(g, "; text-decoration-thickness: ").concat(Z(p * this.getObjectScaling().y / 10, q.NUM_FRACTION_DIGITS), "%; ") : "", n ? ai(bt, n) : "", l ? "baseline-shift: ".concat(-l, "; ") : "", t ? "white-space: pre; " : ""].join("");
5052
5052
  }
5053
5053
  getSvgTextDecoration(a) {
5054
- return ["overline", "underline", "line-through"].filter((t) => a[t.replace("-", "")]).join(" ");
5054
+ return ["overline", "underline", "line-through"].filter(((t) => a[t.replace("-", "")])).join(" ");
5055
5055
  }
5056
5056
  }]), I.setClass(Ct), I.setSVGClass(Ct);
5057
5057
  class ed {
@@ -5059,7 +5059,7 @@ class ed {
5059
5059
  x(this, "target", void 0), x(this, "__mouseDownInPlace", !1), x(this, "__dragStartFired", !1), x(this, "__isDraggingOver", !1), x(this, "__dragStartSelection", void 0), x(this, "__dragImageDisposer", void 0), x(this, "_dispose", void 0), this.target = t;
5060
5060
  const e = [this.target.on("dragenter", this.dragEnterHandler.bind(this)), this.target.on("dragover", this.dragOverHandler.bind(this)), this.target.on("dragleave", this.dragLeaveHandler.bind(this)), this.target.on("dragend", this.dragEndHandler.bind(this)), this.target.on("drop", this.dropHandler.bind(this))];
5061
5061
  this._dispose = () => {
5062
- e.forEach((s) => s()), this._dispose = void 0;
5062
+ e.forEach(((s) => s())), this._dispose = void 0;
5063
5063
  };
5064
5064
  }
5065
5065
  isPointerOverSelection(t) {
@@ -5183,12 +5183,12 @@ class sd extends Ct {
5183
5183
  }
5184
5184
  abortCursorAnimation() {
5185
5185
  let t = !1;
5186
- [this._currentTickState, this._currentTickCompleteState].forEach((e) => {
5186
+ [this._currentTickState, this._currentTickCompleteState].forEach(((e) => {
5187
5187
  e && !e.isDone() && (t = !0, e.abort());
5188
- }), this._currentCursorOpacity = 1, t && this.clearContextTop();
5188
+ })), this._currentCursorOpacity = 1, t && this.clearContextTop();
5189
5189
  }
5190
5190
  restartCursorIfNeeded() {
5191
- [this._currentTickState, this._currentTickCompleteState].some((t) => !t || t.isDone()) && this.initDelayedCursor();
5191
+ [this._currentTickState, this._currentTickCompleteState].some(((t) => !t || t.isDone())) && this.initDelayedCursor();
5192
5192
  }
5193
5193
  selectAll() {
5194
5194
  return this.selectionStart = 0, this.selectionEnd = this._text.length, this._fireSelectionChanged(), this._updateTextarea(), this;
@@ -5393,15 +5393,15 @@ class sd extends Ct {
5393
5393
  class id extends sd {
5394
5394
  initHiddenTextarea() {
5395
5395
  const t = this.canvas && ae(this.canvas.getElement()) || Fs(), e = t.createElement("textarea");
5396
- Object.entries({ autocapitalize: "off", autocorrect: "off", autocomplete: "off", spellcheck: "false", "data-fabric": "textarea", wrap: "off" }).map((r) => {
5396
+ Object.entries({ autocapitalize: "off", autocorrect: "off", autocomplete: "off", spellcheck: "false", "data-fabric": "textarea", wrap: "off" }).map(((r) => {
5397
5397
  let [o, h] = r;
5398
5398
  return e.setAttribute(o, h);
5399
- });
5399
+ }));
5400
5400
  const { top: s, left: i, fontSize: n } = this._calcTextareaPosition();
5401
- e.style.cssText = "position: absolute; top: ".concat(s, "; left: ").concat(i, "; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: ").concat(n, ";"), (this.hiddenTextareaContainer || t.body).appendChild(e), Object.entries({ blur: "blur", keydown: "onKeyDown", keyup: "onKeyUp", input: "onInput", copy: "copy", cut: "copy", paste: "paste", compositionstart: "onCompositionStart", compositionupdate: "onCompositionUpdate", compositionend: "onCompositionEnd" }).map((r) => {
5401
+ e.style.cssText = "position: absolute; top: ".concat(s, "; left: ").concat(i, "; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: ").concat(n, ";"), (this.hiddenTextareaContainer || t.body).appendChild(e), Object.entries({ blur: "blur", keydown: "onKeyDown", keyup: "onKeyUp", input: "onInput", copy: "copy", cut: "copy", paste: "paste", compositionstart: "onCompositionStart", compositionupdate: "onCompositionUpdate", compositionend: "onCompositionEnd" }).map(((r) => {
5402
5402
  let [o, h] = r;
5403
5403
  return e.addEventListener(o, this[h].bind(this));
5404
- }), this.hiddenTextarea = e;
5404
+ })), this.hiddenTextarea = e;
5405
5405
  }
5406
5406
  blur() {
5407
5407
  this.abortCursorAnimation();
@@ -5431,7 +5431,7 @@ class id extends sd {
5431
5431
  const v = this.fromStringToGraphemeSelection(i, n, s), y = c > v.selectionStart;
5432
5432
  d ? (g = this._text.slice(c, u), m += u - c) : l < h && (g = y ? this._text.slice(u + m, u) : this._text.slice(c, c - m));
5433
5433
  const _ = o.slice(v.selectionEnd - m, v.selectionEnd);
5434
- if (g && g.length && (_.length && (f = this.getSelectionStyles(c, c + 1, !1), f = _.map(() => f[0])), d ? (p = c, b = u) : y ? (p = u - g.length, b = u) : (p = u, b = u + g.length), this.removeStyleFromTo(p, b)), _.length) {
5434
+ if (g && g.length && (_.length && (f = this.getSelectionStyles(c, c + 1, !1), f = _.map((() => f[0]))), d ? (p = c, b = u) : y ? (p = u - g.length, b = u) : (p = u, b = u + g.length), this.removeStyleFromTo(p, b)), _.length) {
5435
5435
  const { copyPasteData: S } = xe();
5436
5436
  e && _.join("") === S.copiedText && !q.disableStyleCopyPaste && (f = S.copiedTextStyle), this.insertNewStyleBlock(_, c, f);
5437
5437
  }
@@ -5837,14 +5837,14 @@ class ts extends De {
5837
5837
  getGraphemeDataForRender(t) {
5838
5838
  const e = this.splitByGrapheme, s = e ? "" : " ";
5839
5839
  let i = 0;
5840
- return { wordsData: t.map((n, r) => {
5840
+ return { wordsData: t.map(((n, r) => {
5841
5841
  let o = 0;
5842
5842
  const h = e ? this.graphemeSplit(n) : this.wordSplit(n);
5843
- return h.length === 0 ? [{ word: [], width: 0 }] : h.map((l) => {
5843
+ return h.length === 0 ? [{ word: [], width: 0 }] : h.map(((l) => {
5844
5844
  const c = e ? [l] : this.graphemeSplit(l), u = this._measureWord(c, r, o);
5845
5845
  return i = Math.max(u, i), o += c.length + s.length, { word: c, width: u };
5846
- });
5847
- }), largestWordWidth: i };
5846
+ }));
5847
+ })), largestWordWidth: i };
5848
5848
  }
5849
5849
  _measureWord(t, e) {
5850
5850
  let s, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, n = 0;
@@ -5933,15 +5933,15 @@ x(ga, "type", "fixed"), I.setClass(ga);
5933
5933
  class od extends li {
5934
5934
  subscribeTargets(t) {
5935
5935
  const e = t.target;
5936
- t.targets.reduce((s, i) => (i.parent && s.add(i.parent), s), /* @__PURE__ */ new Set()).forEach((s) => {
5936
+ t.targets.reduce(((s, i) => (i.parent && s.add(i.parent), s)), /* @__PURE__ */ new Set()).forEach(((s) => {
5937
5937
  s.layoutManager.subscribeTargets({ target: s, targets: [e] });
5938
- });
5938
+ }));
5939
5939
  }
5940
5940
  unsubscribeTargets(t) {
5941
5941
  const e = t.target, s = e.getObjects();
5942
- t.targets.reduce((i, n) => (n.parent && i.add(n.parent), i), /* @__PURE__ */ new Set()).forEach((i) => {
5943
- !s.some((n) => n.parent === i) && i.layoutManager.unsubscribeTargets({ target: i, targets: [e] });
5944
- });
5942
+ t.targets.reduce(((i, n) => (n.parent && i.add(n.parent), i)), /* @__PURE__ */ new Set()).forEach(((i) => {
5943
+ !s.some(((n) => n.parent === i)) && i.layoutManager.unsubscribeTargets({ target: i, targets: [e] });
5944
+ }));
5945
5945
  }
5946
5946
  }
5947
5947
  class es extends ee {
@@ -5961,13 +5961,13 @@ class es extends ee {
5961
5961
  }
5962
5962
  multiSelectAdd() {
5963
5963
  for (var t = arguments.length, e = new Array(t), s = 0; s < t; s++) e[s] = arguments[s];
5964
- this.multiSelectionStacking === "selection-order" ? this.add(...e) : e.forEach((i) => {
5965
- const n = this._objects.findIndex((o) => o.isInFrontOf(i)), r = n === -1 ? this.size() : n;
5964
+ this.multiSelectionStacking === "selection-order" ? this.add(...e) : e.forEach(((i) => {
5965
+ const n = this._objects.findIndex(((o) => o.isInFrontOf(i))), r = n === -1 ? this.size() : n;
5966
5966
  this.insertAt(r, i);
5967
- });
5967
+ }));
5968
5968
  }
5969
5969
  canEnterGroup(t) {
5970
- return this.getObjects().some((e) => e.isDescendantOf(t) || t.isDescendantOf(e)) ? (Le("error", "ActiveSelection: circular object trees are not supported, this call has no effect"), !1) : super.canEnterGroup(t);
5970
+ return this.getObjects().some(((e) => e.isDescendantOf(t) || t.isDescendantOf(e))) ? (Le("error", "ActiveSelection: circular object trees are not supported, this call has no effect"), !1) : super.canEnterGroup(t);
5971
5971
  }
5972
5972
  enterGroup(t, e) {
5973
5973
  t.parent && t.parent === t.group ? t.parent._exitGroup(t) : t.group && t.parent !== t.group && t.group.remove(t), this._enterGroup(t, e);
@@ -5978,14 +5978,14 @@ class es extends ee {
5978
5978
  _onAfterObjectsChange(t, e) {
5979
5979
  super._onAfterObjectsChange(t, e);
5980
5980
  const s = /* @__PURE__ */ new Set();
5981
- e.forEach((i) => {
5981
+ e.forEach(((i) => {
5982
5982
  const { parent: n } = i;
5983
5983
  n && s.add(n);
5984
- }), t === ro ? s.forEach((i) => {
5984
+ })), t === ro ? s.forEach(((i) => {
5985
5985
  i._onAfterObjectsChange(dn, e);
5986
- }) : s.forEach((i) => {
5986
+ })) : s.forEach(((i) => {
5987
5987
  i._set("dirty", !0);
5988
- });
5988
+ }));
5989
5989
  }
5990
5990
  onDeselect() {
5991
5991
  return this.removeAll(), !1;
@@ -6016,9 +6016,9 @@ class ad {
6016
6016
  if (!r) return;
6017
6017
  r.drawImage(e, 0, 0, s, i);
6018
6018
  const o = { sourceWidth: s, sourceHeight: i, imageData: r.getImageData(0, 0, s, i), originalEl: e, originalImageData: r.getImageData(0, 0, s, i), canvasEl: n, ctx: r, filterBackend: this };
6019
- t.forEach((l) => {
6019
+ t.forEach(((l) => {
6020
6020
  l.applyTo(o);
6021
- });
6021
+ }));
6022
6022
  const { imageData: h } = o;
6023
6023
  return h.width === s && h.height === i || (n.width = h.width, n.height = h.height), r.putImageData(h, 0, 0), o;
6024
6024
  }
@@ -6041,12 +6041,12 @@ class tl {
6041
6041
  let l;
6042
6042
  r && (l = this.getCachedTexture(r, e));
6043
6043
  const c = { originalWidth: e.width || e.naturalWidth || 0, originalHeight: e.height || e.naturalHeight || 0, sourceWidth: s, sourceHeight: i, destinationWidth: s, destinationHeight: i, context: o, sourceTexture: this.createTexture(o, s, i, l ? void 0 : e), targetTexture: this.createTexture(o, s, i), originalTexture: l || this.createTexture(o, s, i, l ? void 0 : e), passes: t.length, webgl: !0, aPosition: this.aPosition, programCache: this.programCache, pass: 0, filterBackend: this, targetCanvas: n }, u = o.createFramebuffer();
6044
- return o.bindFramebuffer(o.FRAMEBUFFER, u), t.forEach((d) => {
6044
+ return o.bindFramebuffer(o.FRAMEBUFFER, u), t.forEach(((d) => {
6045
6045
  d && d.applyTo(c);
6046
- }), function(d) {
6046
+ })), (function(d) {
6047
6047
  const f = d.targetCanvas, g = f.width, p = f.height, b = d.destinationWidth, m = d.destinationHeight;
6048
6048
  g === b && p === m || (f.width = b, f.height = m);
6049
- }(c), this.copyGLTo2D(o, c), o.bindTexture(o.TEXTURE_2D, null), o.deleteTexture(c.sourceTexture), o.deleteTexture(c.targetTexture), o.deleteFramebuffer(u), h.setTransform(1, 0, 0, 1, 0, 0), c;
6049
+ })(c), this.copyGLTo2D(o, c), o.bindTexture(o.TEXTURE_2D, null), o.deleteTexture(c.sourceTexture), o.deleteTexture(c.targetTexture), o.deleteFramebuffer(u), h.setTransform(1, 0, 0, 1, 0, 0), c;
6050
6050
  }
6051
6051
  dispose() {
6052
6052
  this.canvas && (this.canvas = null, this.gl = null), this.clearWebGLCaches();
@@ -6125,10 +6125,10 @@ class Tt extends Mt {
6125
6125
  e instanceof tl && e.evictCachesForKey(t);
6126
6126
  }
6127
6127
  dispose() {
6128
- super.dispose(), this.removeTexture(this.cacheKey), this.removeTexture("".concat(this.cacheKey, "_filtered")), this._cacheContext = null, ["_originalElement", "_element", "_filteredEl", "_cacheCanvas"].forEach((t) => {
6128
+ super.dispose(), this.removeTexture(this.cacheKey), this.removeTexture("".concat(this.cacheKey, "_filtered")), this._cacheContext = null, ["_originalElement", "_element", "_filteredEl", "_cacheCanvas"].forEach(((t) => {
6129
6129
  const e = this[t];
6130
6130
  e && xe().dispose(e), this[t] = void 0;
6131
- });
6131
+ }));
6132
6132
  }
6133
6133
  getCrossOrigin() {
6134
6134
  return this._originalElement && (this._originalElement.crossOrigin || null);
@@ -6145,9 +6145,9 @@ class Tt extends Mt {
6145
6145
  toObject() {
6146
6146
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
6147
6147
  const e = [];
6148
- return this.filters.forEach((s) => {
6148
+ return this.filters.forEach(((s) => {
6149
6149
  s && e.push(s.toObject());
6150
- }), w(w({}, super.toObject([...el, ...t])), {}, { src: this.getSrc(), crossOrigin: this.getCrossOrigin(), filters: e }, this.resizeFilter ? { resizeFilter: this.resizeFilter.toObject() } : {});
6150
+ })), w(w({}, super.toObject([...el, ...t])), {}, { src: this.getSrc(), crossOrigin: this.getCrossOrigin(), filters: e }, this.resizeFilter ? { resizeFilter: this.resizeFilter.toObject() } : {});
6151
6151
  }
6152
6152
  hasCrop() {
6153
6153
  return !!this.cropX || !!this.cropY || this.width < this._element.width || this.height < this._element.height;
@@ -6180,9 +6180,9 @@ class Tt extends Mt {
6180
6180
  }
6181
6181
  setSrc(t) {
6182
6182
  let { crossOrigin: e, signal: s } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6183
- return ti(t, { crossOrigin: e, signal: s }).then((i) => {
6183
+ return ti(t, { crossOrigin: e, signal: s }).then(((i) => {
6184
6184
  e !== void 0 && this.set({ crossOrigin: e }), this.setElement(i);
6185
- });
6185
+ }));
6186
6186
  }
6187
6187
  toString() {
6188
6188
  return '#<Image: { src: "'.concat(this.getSrc(), '" }>');
@@ -6195,7 +6195,7 @@ class Tt extends Mt {
6195
6195
  }
6196
6196
  applyFilters() {
6197
6197
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.filters || [];
6198
- if (t = t.filter((n) => n && !n.isNeutralState()), this.set("dirty", !0), this.removeTexture("".concat(this.cacheKey, "_filtered")), t.length === 0) return this._element = this._originalElement, this._filteredEl = void 0, this._filterScalingX = 1, void (this._filterScalingY = 1);
6198
+ if (t = t.filter(((n) => n && !n.isNeutralState())), this.set("dirty", !0), this.removeTexture("".concat(this.cacheKey, "_filtered")), t.length === 0) return this._element = this._originalElement, this._filteredEl = void 0, this._filterScalingX = 1, void (this._filterScalingY = 1);
6199
6199
  const e = this._originalElement, s = e.naturalWidth || e.width, i = e.naturalHeight || e.height;
6200
6200
  if (this._element === this._originalElement) {
6201
6201
  const n = Kt({ width: s, height: i });
@@ -6237,19 +6237,19 @@ class Tt extends Mt {
6237
6237
  }
6238
6238
  static fromObject(t, e) {
6239
6239
  let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: o } = t, h = rt(t, ld);
6240
- return Promise.all([ti(n, w(w({}, e), {}, { crossOrigin: r })), s && Os(s, e), i && Os([i], e), gi(h, e)]).then((l) => {
6240
+ return Promise.all([ti(n, w(w({}, e), {}, { crossOrigin: r })), s && Os(s, e), i && Os([i], e), gi(h, e)]).then(((l) => {
6241
6241
  let [c, u = [], [d] = [], f = {}] = l;
6242
6242
  return new this(c, w(w({}, h), {}, { src: n, filters: u, resizeFilter: d }, f));
6243
- });
6243
+ }));
6244
6244
  }
6245
6245
  static fromURL(t) {
6246
6246
  let { crossOrigin: e = null, signal: s } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = arguments.length > 2 ? arguments[2] : void 0;
6247
- return ti(t, { crossOrigin: e, signal: s }).then((n) => new this(n, i));
6247
+ return ti(t, { crossOrigin: e, signal: s }).then(((n) => new this(n, i)));
6248
6248
  }
6249
6249
  static async fromElement(t) {
6250
6250
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = arguments.length > 2 ? arguments[2] : void 0;
6251
6251
  const i = Ne(t, this.ATTRIBUTE_NAMES, s);
6252
- return this.fromURL(i["xlink:href"] || i.href, e, i).catch((n) => (Le("log", "Unable to parse Image", n), null));
6252
+ return this.fromURL(i["xlink:href"] || i.href, e, i).catch(((n) => (Le("log", "Unable to parse Image", n), null)));
6253
6253
  }
6254
6254
  }
6255
6255
  function rr(a) {
@@ -6284,10 +6284,10 @@ const ud = ["gradientTransform", "x1", "x2", "y1", "y2", "gradientUnits", "cx",
6284
6284
  function il(a, t) {
6285
6285
  var e;
6286
6286
  const s = ((e = t.getAttribute(or)) === null || e === void 0 ? void 0 : e.slice(1)) || "", i = a.getElementById(s);
6287
- if (i && i.getAttribute(or) && il(a, i), i && (ud.forEach((n) => {
6287
+ if (i && i.getAttribute(or) && il(a, i), i && (ud.forEach(((n) => {
6288
6288
  const r = i.getAttribute(n);
6289
6289
  !t.hasAttribute(n) && r && t.setAttribute(n, r);
6290
- }), !t.children.length)) {
6290
+ })), !t.children.length)) {
6291
6291
  const n = i.cloneNode(!0);
6292
6292
  for (; n.firstChild; ) t.appendChild(n.firstChild);
6293
6293
  }
@@ -6295,31 +6295,29 @@ function il(a, t) {
6295
6295
  }
6296
6296
  const dd = ["linearGradient", "radialGradient", "svg:linearGradient", "svg:radialGradient"];
6297
6297
  function fd(a) {
6298
- const t = a.getElementsByTagName("style");
6299
- let e, s;
6300
- const i = {};
6301
- for (e = 0, s = t.length; e < s; e++) {
6302
- const n = (t[e].textContent || "").replace(/\/\*[\s\S]*?\*\//g, "");
6303
- n.trim() !== "" && n.split("}").filter((r, o, h) => h.length > 1 && r.trim()).forEach((r) => {
6304
- if ((r.match(/{/g) || []).length > 1 && r.trim().startsWith("@")) return;
6305
- const o = r.split("{"), h = {}, l = o[1].trim().split(";").filter(function(c) {
6306
- return c.trim();
6307
- });
6308
- for (e = 0, s = l.length; e < s; e++) {
6309
- const c = l[e].split(":"), u = c[0].trim(), d = c[1].trim();
6310
- h[u] = d;
6298
+ const t = a.getElementsByTagName("style"), e = {};
6299
+ for (let s = 0; s < t.length; s++) {
6300
+ const i = (t[s].textContent || "").replace(/\/\*[\s\S]*?\*\//g, "");
6301
+ i.trim() !== "" && i.split("}").filter(((n, r, o) => o.length > 1 && n.trim())).forEach(((n) => {
6302
+ if ((n.match(/{/g) || []).length > 1 && n.trim().startsWith("@")) return;
6303
+ const r = n.split("{"), o = {}, h = r[1].trim().split(";").filter((function(l) {
6304
+ return l.trim();
6305
+ }));
6306
+ for (let l = 0; l < h.length; l++) {
6307
+ const c = h[l].split(":"), u = c[0].trim(), d = c[1].trim();
6308
+ o[u] = d;
6311
6309
  }
6312
- (r = o[0].trim()).split(",").forEach((c) => {
6313
- (c = c.replace(/^svg/i, "").trim()) !== "" && (i[c] = w(w({}, i[c] || {}), h));
6314
- });
6315
- });
6310
+ (n = r[0].trim()).split(",").forEach(((l) => {
6311
+ (l = l.replace(/^svg/i, "").trim()) !== "" && (e[l] = w(w({}, e[l] || {}), o));
6312
+ }));
6313
+ }));
6316
6314
  }
6317
- return i;
6315
+ return e;
6318
6316
  }
6319
6317
  const pa = (a) => I.getSVGClass(mn(a).toLowerCase());
6320
6318
  class gd {
6321
6319
  constructor(t, e, s, i, n) {
6322
- this.elements = t, this.options = e, this.reviver = s, this.regexUrl = /^url\(['"]?#([^'"]+)['"]?\)/g, this.doc = i, this.clipPaths = n, this.gradientDefs = function(r) {
6320
+ this.elements = t, this.options = e, this.reviver = s, this.regexUrl = /^url\(['"]?#([^'"]+)['"]?\)/g, this.doc = i, this.clipPaths = n, this.gradientDefs = (function(r) {
6323
6321
  const o = sl(r, dd), h = {};
6324
6322
  let l = o.length;
6325
6323
  for (; l--; ) {
@@ -6329,10 +6327,10 @@ class gd {
6329
6327
  u && (h[u] = c);
6330
6328
  }
6331
6329
  return h;
6332
- }(i), this.cssRules = fd(i);
6330
+ })(i), this.cssRules = fd(i);
6333
6331
  }
6334
6332
  parse() {
6335
- return Promise.all(this.elements.map((t) => this.createObject(t)));
6333
+ return Promise.all(this.elements.map(((t) => this.createObject(t))));
6336
6334
  }
6337
6335
  async createObject(t) {
6338
6336
  const e = pa(t);
@@ -6365,7 +6363,7 @@ class gd {
6365
6363
  o.parentElement.appendChild(r);
6366
6364
  const h = un("".concat(o.getAttribute("transform") || "", " ").concat(r.getAttribute("originalTransform") || ""));
6367
6365
  r.setAttribute("transform", "matrix(".concat(h.join(","), ")"));
6368
- const l = await Promise.all(i.map((v) => pa(v).fromElement(v, this.options, this.cssRules).then((y) => (Qi(y), y.fillRule = y.clipRule, delete y.clipRule, y)))), c = l.length === 1 ? l[0] : new ee(l), u = ut(n, c.calcTransformMatrix());
6366
+ const l = await Promise.all(i.map(((v) => pa(v).fromElement(v, this.options, this.cssRules).then(((y) => (Qi(y), y.fillRule = y.clipRule, delete y.clipRule, y)))))), c = l.length === 1 ? l[0] : new ee(l), u = ut(n, c.calcTransformMatrix());
6369
6367
  c.clipPath && await this.resolveClipPath(c, o, r.getAttribute("clip-path") ? o : void 0);
6370
6368
  const { scaleX: d, scaleY: f, angle: g, skewX: p, translateX: b, translateY: m } = as(u);
6371
6369
  c.set({ flipX: !1, flipY: !1 }), c.set({ scaleX: d, scaleY: f, angle: g, skewX: p, skewY: 0 }), c.setPositionByOrigin(new C(b, m), X, X), t.clipPath = c;
@@ -6392,48 +6390,48 @@ async function pd(a, t) {
6392
6390
  const { x: S = 0, y: A = 0, transform: T = "" } = p, k = "".concat(T, " ").concat(_.transform || "", " translate(").concat(S, ", ").concat(A, ")");
6393
6391
  if (rr(v), /^svg$/i.test(v.nodeName)) {
6394
6392
  const M = v.ownerDocument.createElementNS(yr, "g");
6395
- Object.entries(_).forEach((D) => {
6393
+ Object.entries(_).forEach(((D) => {
6396
6394
  let [L, E] = D;
6397
6395
  return M.setAttributeNS(yr, L, E);
6398
- }), M.append(...v.childNodes), v = M;
6396
+ })), M.append(...v.childNodes), v = M;
6399
6397
  }
6400
6398
  for (const M of g) {
6401
6399
  if (!M) continue;
6402
6400
  const { name: D, value: L } = M;
6403
6401
  if (!d.includes(D)) if (D === "style") {
6404
6402
  const E = {};
6405
- xr(L, E), Object.entries(_).forEach((R) => {
6403
+ xr(L, E), Object.entries(_).forEach(((R) => {
6406
6404
  let [B, P] = R;
6407
6405
  E[B] = P;
6408
- }), xr(_.style || "", E);
6409
- const O = Object.entries(E).map((R) => R.join(":")).join(";");
6406
+ })), xr(_.style || "", E);
6407
+ const O = Object.entries(E).map(((R) => R.join(":"))).join(";");
6410
6408
  v.setAttribute(D, O);
6411
6409
  } else !_[D] && v.setAttribute(D, L);
6412
6410
  }
6413
6411
  v.setAttribute("transform", k), v.setAttribute("instantiated_by_use", "1"), v.removeAttribute("id"), f.parentNode.replaceChild(v, f);
6414
6412
  }
6415
6413
  })(a);
6416
- const n = Array.from(i.getElementsByTagName("*")), r = w(w({}, rr(i)), {}, { crossOrigin: e, signal: s }), o = n.filter((c) => (rr(c), ma(c) && !function(u) {
6414
+ const n = Array.from(i.getElementsByTagName("*")), r = w(w({}, rr(i)), {}, { crossOrigin: e, signal: s }), o = n.filter(((c) => (rr(c), ma(c) && !(function(u) {
6417
6415
  let d = u;
6418
6416
  for (; d && (d = d.parentElement); ) if (d && d.nodeName && cd.test(mn(d)) && !d.getAttribute("instantiated_by_use")) return !0;
6419
6417
  return !1;
6420
- }(c)));
6418
+ })(c))));
6421
6419
  if (!o || o && !o.length) return w(w({}, kr()), {}, { options: r, allElements: n });
6422
6420
  const h = {};
6423
- return n.filter((c) => mn(c) === "clipPath").forEach((c) => {
6421
+ return n.filter(((c) => mn(c) === "clipPath")).forEach(((c) => {
6424
6422
  c.setAttribute("originalTransform", c.getAttribute("transform") || "");
6425
6423
  const u = c.getAttribute("id");
6426
- h[u] = Array.from(c.getElementsByTagName("*")).filter((d) => ma(d));
6427
- }), { objects: await new gd(o, r, t, a, h).parse(), elements: o, options: r, allElements: n };
6424
+ h[u] = Array.from(c.getElementsByTagName("*")).filter(((d) => ma(d)));
6425
+ })), { objects: await new gd(o, r, t, a, h).parse(), elements: o, options: r, allElements: n };
6428
6426
  }
6429
6427
  function md(a, t) {
6430
6428
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6431
- return new Promise((s, i) => {
6429
+ return new Promise(((s, i) => {
6432
6430
  Xh(a.replace(/^\n\s*/, "").trim(), { onComplete: (n) => {
6433
6431
  const r = n.responseXML;
6434
6432
  r && s(r), i();
6435
6433
  }, signal: e.signal });
6436
- }).then((s) => pd(s, t, e)).catch(() => kr());
6434
+ })).then(((s) => pd(s, t, e))).catch((() => kr()));
6437
6435
  }
6438
6436
  const Dn = (a) => a.webgl !== void 0, ao = "precision highp float", bd = `
6439
6437
  `.concat(ao, `;
@@ -6533,7 +6531,7 @@ class wt {
6533
6531
  }
6534
6532
  toObject() {
6535
6533
  const t = Object.keys(this.constructor.defaults || {});
6536
- return w({ type: this.type }, t.reduce((e, s) => (e[s] = this[s], e), {}));
6534
+ return w({ type: this.type }, t.reduce(((e, s) => (e[s] = this[s], e)), {}));
6537
6535
  }
6538
6536
  toJSON() {
6539
6537
  return this.toObject();
@@ -6721,7 +6719,7 @@ class Oi extends wt {
6721
6719
  }
6722
6720
  static async fromObject(t, e) {
6723
6721
  let { type: s, image: i } = t, n = rt(t, Sd);
6724
- return Tt.fromObject(i, e).then((r) => new this(w(w({}, n), {}, { image: r })));
6722
+ return Tt.fromObject(i, e).then(((r) => new this(w(w({}, n), {}, { image: r }))));
6725
6723
  }
6726
6724
  }
6727
6725
  x(Oi, "type", "BlendImage"), x(Oi, "defaults", { mode: "multiply", alpha: 1 }), x(Oi, "uniformLocations", ["uTransformMatrix", "uImage"]), I.setClass(Oi);
@@ -6894,18 +6892,18 @@ class ba extends wt {
6894
6892
  super(t), this.subFilters = t.subFilters || [];
6895
6893
  }
6896
6894
  applyTo(t) {
6897
- Dn(t) && (t.passes += this.subFilters.length - 1), this.subFilters.forEach((e) => {
6895
+ Dn(t) && (t.passes += this.subFilters.length - 1), this.subFilters.forEach(((e) => {
6898
6896
  e.applyTo(t);
6899
- });
6897
+ }));
6900
6898
  }
6901
6899
  toObject() {
6902
- return { type: this.type, subFilters: this.subFilters.map((t) => t.toObject()) };
6900
+ return { type: this.type, subFilters: this.subFilters.map(((t) => t.toObject())) };
6903
6901
  }
6904
6902
  isNeutralState() {
6905
- return !this.subFilters.some((t) => !t.isNeutralState());
6903
+ return !this.subFilters.some(((t) => !t.isNeutralState()));
6906
6904
  }
6907
6905
  static fromObject(t, e) {
6908
- return Promise.all((t.subFilters || []).map((s) => I.getClass(s.type).fromObject(s, e))).then((s) => new this({ subFilters: s }));
6906
+ return Promise.all((t.subFilters || []).map(((s) => I.getClass(s.type).fromObject(s, e)))).then(((s) => new this({ subFilters: s })));
6909
6907
  }
6910
6908
  }
6911
6909
  x(ba, "type", "Composed"), I.setClass(ba);
@@ -7399,10 +7397,10 @@ class Gi extends wt {
7399
7397
  void main() {
7400
7398
  vec4 color = texture2D(uTexture, vTexCoord);
7401
7399
  float sum = 1.0;
7402
- `).concat(e.map((s, i) => `
7400
+ `).concat(e.map(((s, i) => `
7403
7401
  color += texture2D(uTexture, vTexCoord + `.concat(s, ") * uTaps[").concat(i, "] + texture2D(uTexture, vTexCoord - ").concat(s, ") * uTaps[").concat(i, `];
7404
7402
  sum += 2.0 * uTaps[`).concat(i, `];
7405
- `)).join(`
7403
+ `))).join(`
7406
7404
  `), `
7407
7405
  gl_FragColor = color / sum;
7408
7406
  }
@@ -7448,7 +7446,7 @@ class Gi extends wt {
7448
7446
  }
7449
7447
  lanczosResize(t, e, s, i, n) {
7450
7448
  const r = t.imageData.data, o = t.ctx.createImageData(i, n), h = o.data, l = this.lanczosCreate(this.lanczosLobes), c = this.rcpScaleX, u = this.rcpScaleY, d = 2 / this.rcpScaleX, f = 2 / this.rcpScaleY, g = Math.ceil(c * this.lanczosLobes / 2), p = Math.ceil(u * this.lanczosLobes / 2), b = {}, m = { x: 0, y: 0 }, v = { x: 0, y: 0 };
7451
- return function y(_) {
7449
+ return (function y(_) {
7452
7450
  let S, A, T, k, M, D, L, E, O, R, B;
7453
7451
  for (m.x = (_ + 0.5) * c, v.x = Math.floor(m.x), S = 0; S < n; S++) {
7454
7452
  for (m.y = (S + 0.5) * u, v.y = Math.floor(m.y), M = 0, D = 0, L = 0, E = 0, O = 0, A = v.x - g; A <= v.x + g; A++) if (!(A < 0 || A >= e)) {
@@ -7458,7 +7456,7 @@ class Gi extends wt {
7458
7456
  k = 4 * (S * i + _), h[k] = D / M, h[k + 1] = L / M, h[k + 2] = E / M, h[k + 3] = O / M;
7459
7457
  }
7460
7458
  return ++_ < i ? y(_) : o;
7461
- }(0);
7459
+ })(0);
7462
7460
  }
7463
7461
  bilinearFiltering(t, e, s, i, n) {
7464
7462
  let r, o, h, l, c, u, d, f, g, p, b, m, v, y = 0;
@@ -8015,12 +8013,12 @@ function Y(a, t, e, s = !1) {
8015
8013
  writable: !1
8016
8014
  }), e;
8017
8015
  }
8018
- const $e = function() {
8016
+ const $e = (function() {
8019
8017
  function t(e, s) {
8020
8018
  this.message = e, this.name = s;
8021
8019
  }
8022
8020
  return t.prototype = new Error(), t.constructor = t, t;
8023
- }();
8021
+ })();
8024
8022
  class ya extends $e {
8025
8023
  constructor(t, e) {
8026
8024
  super(t, "PasswordException"), this.code = e;
@@ -12220,7 +12218,7 @@ class ff extends bo {
12220
12218
  offsetY: -h,
12221
12219
  scaleX: 1 / f,
12222
12220
  scaleY: 1 / g
12223
- }, b = u + 2 * 2, m = d + 2 * 2, v = s.getCanvas("mesh", b, m), y = v.context, _ = y.createImageData(u, d);
12221
+ }, b = u + 4, m = d + 4, v = s.getCanvas("mesh", b, m), y = v.context, _ = y.createImageData(u, d);
12224
12222
  if (e) {
12225
12223
  const A = _.data;
12226
12224
  for (let T = 0, k = A.length; T < k; T += 4)