modern-canvas 0.13.2 → 0.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,30 +1,30 @@
1
- import { defineProperty as Xt, Observable as fe, Reactivable as Ir, parseColor as Ls, property as c, RawWeakMap as Br, isGradient as Fs, isColorFillObject as mr, clearUndef as zr, idGenerator as Nr, normalizeFill as $s, isNone as F, normalizeBackground as Vs, normalizeForeground as Gs, normalizeOutline as Ws, normalizeShadow as js, normalizeShape as qs, getDefaultStyle as Xs, normalizeText as Hs, normalizeTextContent as Ys, getDefaultTextStyle as Ks, getDefaultLayoutStyle as Zs } from "modern-idoc";
1
+ import { defineProperty as qt, Observable as fe, Reactivable as Dr, parseColor as Ls, property as u, RawWeakMap as Ir, isGradient as Fs, isColorFillObject as _r, clearUndef as Br, idGenerator as zr, normalizeFill as $s, isNone as F, normalizeBackground as Vs, normalizeForeground as Gs, normalizeOutline as Ws, normalizeShadow as js, normalizeShape as qs, getDefaultStyle as Xs, normalizeText as Hs, normalizeTextContent as Ys, getDefaultTextStyle as Ks, getDefaultLayoutStyle as Zs } from "modern-idoc";
2
2
  import { fonts as Js } from "modern-font";
3
3
  import { extend as Qs } from "colord";
4
4
  import ei from "colord/plugins/names";
5
- import { Path2D as bt, Path2DSet as ti, svgToDom as ri, svgToPath2DSet as si, Matrix3 as gr, BoundingBox as Lt } from "modern-path2d";
5
+ import { Path2D as bt, Path2DSet as ti, svgToDom as ri, svgToPath2DSet as si, Matrix3 as mr, BoundingBox as Nt } from "modern-path2d";
6
6
  import { Text as ii, Character as oi } from "modern-text";
7
- const Ht = /* @__PURE__ */ new Map();
8
- function v(r, e) {
7
+ const Xt = /* @__PURE__ */ new Map();
8
+ function g(r, e) {
9
9
  return function(t) {
10
10
  Object.defineProperty(t.prototype, "is", {
11
11
  value: r,
12
12
  enumerable: !0,
13
13
  configurable: !0
14
14
  }), e && Object.keys(e).forEach((s) => {
15
- Xt(t, s, {
15
+ qt(t, s, {
16
16
  fallback: e[s]
17
17
  });
18
- }), Ht.set(r, t);
18
+ }), Xt.set(r, t);
19
19
  };
20
20
  }
21
21
  function bl(r = "node", e = {}) {
22
- const t = Ht.get(r);
22
+ const t = Xt.get(r);
23
23
  if (!t)
24
24
  throw new Error(`Failed to createNode, tag: ${r}`);
25
25
  return new t().setProperties(e);
26
26
  }
27
- class k {
27
+ class U {
28
28
  static _queue = [];
29
29
  static _currentTime = 0;
30
30
  static _elapsed = 0;
@@ -70,8 +70,8 @@ class k {
70
70
  const l = o[h];
71
71
  try {
72
72
  l.cb();
73
- } catch (u) {
74
- console.warn(u);
73
+ } catch (c) {
74
+ console.warn(c);
75
75
  }
76
76
  l.once || a.push(l);
77
77
  }
@@ -80,10 +80,10 @@ class k {
80
80
  this._queue = t;
81
81
  }
82
82
  }
83
- k.start();
84
- async function Lr(r) {
83
+ U.start();
84
+ async function Nr(r) {
85
85
  return new Promise((e) => {
86
- k.on(
86
+ U.on(
87
87
  () => {
88
88
  r?.(), e();
89
89
  },
@@ -91,16 +91,16 @@ async function Lr(r) {
91
91
  );
92
92
  });
93
93
  }
94
- const Yt = Math.PI, B = Yt * 2;
94
+ const Ht = Math.PI, B = Ht * 2;
95
95
  let ai = 0;
96
96
  function ni(r) {
97
97
  return r?.__SPECTOR_Object_TAG?.id ?? ++ai;
98
98
  }
99
- function vr(r) {
99
+ function gr(r) {
100
100
  return !(r & r - 1) && !!r;
101
101
  }
102
102
  const li = /([\w-]+)\((.+?)\)/g, hi = /[^,]+/g, ci = /([-e.\d]+)(.*)/;
103
- function br(r) {
103
+ function vr(r) {
104
104
  return Array.isArray(r) ? r.map((e) => ({
105
105
  name: e.name,
106
106
  args: e.args.map((t) => ({
@@ -114,7 +114,7 @@ function br(r) {
114
114
  }
115
115
  function mt(r, e, t = {}) {
116
116
  const s = Rt(e, t);
117
- return s.length ? s : Fr(r, e, t);
117
+ return s.length ? s : Lr(r, e, t);
118
118
  }
119
119
  function Rt(r, e = {}) {
120
120
  const t = [];
@@ -133,14 +133,14 @@ function ui(r, e, t = {}) {
133
133
  let i, o = 0;
134
134
  for (; (i = hi.exec(e)) !== null; )
135
135
  s.push(
136
- Fr(r, i[0], {
136
+ Lr(r, i[0], {
137
137
  ...t,
138
138
  index: o++
139
139
  })
140
140
  );
141
141
  return s;
142
142
  }
143
- function Fr(r, e, t = {}) {
143
+ function Lr(r, e, t = {}) {
144
144
  const { width: s = 1, height: i = 1, index: o = 0 } = t, a = e.match(ci), n = {
145
145
  unit: a?.[2] ?? null,
146
146
  value: e,
@@ -187,7 +187,7 @@ function Fr(r, e, t = {}) {
187
187
  }
188
188
  return n;
189
189
  }
190
- const di = "WebGL2RenderingContext" in globalThis, fi = "ImageBitmap" in globalThis, pi = "ResizeObserver" in globalThis, He = "PointerEvent" in globalThis, _i = "WheelEvent" in globalThis, yl = "MouseEvent" in globalThis, ce = "ontouchstart" in globalThis, mi = "onclick" in globalThis, $r = "createImageBitmap" in globalThis, Vr = "AudioContext" in globalThis, Gr = "webkitAudioContext" in globalThis, Wr = "OfflineAudioContext" in globalThis, gi = "webkitOfflineAudioContext" in globalThis, vi = Vr || Gr, Ot = typeof window < "u", bi = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, jr = globalThis.devicePixelRatio || 1, qr = (r) => r !== null && typeof r == "object" && r.nodeType === 1, yi = (r) => qr(r) && r.tagName === "VIDEO", xl = (r) => qr(r) && r.tagName === "IMG";
190
+ const di = "WebGL2RenderingContext" in globalThis, fi = "ImageBitmap" in globalThis, pi = "ResizeObserver" in globalThis, He = "PointerEvent" in globalThis, _i = "WheelEvent" in globalThis, yl = "MouseEvent" in globalThis, ce = "ontouchstart" in globalThis, mi = "onclick" in globalThis, Fr = "createImageBitmap" in globalThis, $r = "AudioContext" in globalThis, Vr = "webkitAudioContext" in globalThis, Gr = "OfflineAudioContext" in globalThis, gi = "webkitOfflineAudioContext" in globalThis, vi = $r || Vr, Ot = typeof window < "u", bi = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, Wr = globalThis.devicePixelRatio || 1, jr = (r) => r !== null && typeof r == "object" && r.nodeType === 1, yi = (r) => jr(r) && r.tagName === "VIDEO", xl = (r) => jr(r) && r.tagName === "IMG";
191
191
  function xi(r) {
192
192
  return typeof r == "object" && r !== null && r.nodeType === 1 && r.tagName === "CANVAS";
193
193
  }
@@ -208,7 +208,7 @@ function Ti(r, e = globalThis.location) {
208
208
  function Ei(r, e, t) {
209
209
  t === null && !e.startsWith("data:") ? r.crossOrigin = Ti(e) : t !== !1 && (r.crossOrigin = typeof t == "string" ? t : "anonymous");
210
210
  }
211
- class Xr {
211
+ class qr {
212
212
  _map = /* @__PURE__ */ new WeakMap();
213
213
  // fix: vue reactive object
214
214
  _toRaw(e) {
@@ -290,7 +290,7 @@ class Si extends Mt {
290
290
  throw new Error("initKeyboardEvent() is a legacy DOM API. It is not implemented in the Federated Events API.");
291
291
  }
292
292
  }
293
- class Hr extends Mt {
293
+ class Xr extends Mt {
294
294
  client = { x: 0, y: 0 };
295
295
  get clientX() {
296
296
  return this.client.x;
@@ -353,7 +353,7 @@ class Hr extends Mt {
353
353
  return this.global.y;
354
354
  }
355
355
  }
356
- class Ci extends Hr {
356
+ class Ci extends Xr {
357
357
  width = 0;
358
358
  height = 0;
359
359
  isPrimary = !1;
@@ -364,7 +364,7 @@ class Ci extends Hr {
364
364
  throw new Error("getPredictedEvents is not supported!");
365
365
  }
366
366
  }
367
- class Ai extends Hr {
367
+ class Ai extends Xr {
368
368
  static DOM_DELTA_PIXEL = 0;
369
369
  DOM_DELTA_PIXEL = 0;
370
370
  static DOM_DELTA_LINE = 1;
@@ -536,7 +536,7 @@ class Oi extends fe {
536
536
  }
537
537
  }
538
538
  let Mi = 0;
539
- class pe extends Ir {
539
+ class pe extends Dr {
540
540
  instanceId = ++Mi;
541
541
  get json() {
542
542
  return this.toJSON();
@@ -545,7 +545,7 @@ class pe extends Ir {
545
545
  this.setProperties(e);
546
546
  }
547
547
  _nextTick() {
548
- return Lr();
548
+ return Nr();
549
549
  }
550
550
  equal(e) {
551
551
  return !!(e && this.instanceId === e.instanceId);
@@ -651,11 +651,11 @@ class Z extends fe {
651
651
  const { cols: l } = t;
652
652
  switch (e) {
653
653
  case "*":
654
- for (let u = 0; u < i; u++) {
654
+ for (let c = 0; c < i; c++) {
655
655
  let d = 0;
656
656
  for (let f = 0; f < i; f++)
657
- d += o[u] * a[f * l + u];
658
- h[u] = d;
657
+ d += o[c] * a[f * l + c];
658
+ h[c] = d;
659
659
  }
660
660
  break;
661
661
  default:
@@ -680,20 +680,20 @@ class Z extends fe {
680
680
  h[l] = o[l] / a[l];
681
681
  break;
682
682
  case "rot": {
683
- const l = Math.cos(a[0]), u = Math.sin(a[0]);
684
- h[0] = o[0] * l - o[1] * u, h[1] = o[1] * l + o[0] * u;
683
+ const l = Math.cos(a[0]), c = Math.sin(a[0]);
684
+ h[0] = o[0] * l - o[1] * c, h[1] = o[1] * l + o[0] * c;
685
685
  break;
686
686
  }
687
687
  case "==": {
688
688
  let l = !0;
689
- for (let u = 0; u < i; u++)
690
- l = l && o[u] === a[u];
689
+ for (let c = 0; c < i; c++)
690
+ l = l && o[c] === a[c];
691
691
  return l;
692
692
  }
693
693
  case "=":
694
694
  for (let l = 0; l < i; l++) {
695
- const u = a[l];
696
- u !== void 0 && (o[l] = u);
695
+ const c = a[l];
696
+ c !== void 0 && (o[l] = c);
697
697
  }
698
698
  return this._onUpdate(o), this.emit("update", o), this;
699
699
  default:
@@ -757,8 +757,8 @@ class se extends fe {
757
757
  const { cols: i, rows: o, length: a, _array: n } = this;
758
758
  let h;
759
759
  typeof t == "number" ? h = Array.from({ length: a }, () => t) : t instanceof Z || t instanceof se ? h = t.toArray() : h = t;
760
- let l, u = [];
761
- if (s ? s instanceof Z || s instanceof se ? l = s : u = s : t instanceof Z ? l = new t.constructor() : l = this, t instanceof Z) {
760
+ let l, c = [];
761
+ if (s ? s instanceof Z || s instanceof se ? l = s : c = s : t instanceof Z ? l = new t.constructor() : l = this, t instanceof Z) {
762
762
  const { dim: d } = t;
763
763
  switch (e) {
764
764
  case "*":
@@ -766,7 +766,7 @@ class se extends fe {
766
766
  let _ = 0;
767
767
  for (let p = 0; p < i; p++)
768
768
  p < d && (_ += n[f * i + p] * (h[p] ?? 0));
769
- u[f] = _;
769
+ c[f] = _;
770
770
  }
771
771
  break;
772
772
  default:
@@ -780,10 +780,10 @@ class se extends fe {
780
780
  const _ = f * i;
781
781
  let p = 0;
782
782
  for (let m = 0; m < o; m++) {
783
- const g = _ + m, w = m * i + d;
784
- p += n[g] * (h[w] ?? 0);
783
+ const v = _ + m, y = m * i + d;
784
+ p += n[v] * (h[y] ?? 0);
785
785
  }
786
- u[_ + d] = p;
786
+ c[_ + d] = p;
787
787
  }
788
788
  break;
789
789
  case "=":
@@ -795,7 +795,7 @@ class se extends fe {
795
795
  default:
796
796
  throw new Error(`Not support operator in '${this.toName()} ${e} Matrix2'`);
797
797
  }
798
- return l?.set(u) ?? u;
798
+ return l?.set(c) ?? c;
799
799
  }
800
800
  identity() {
801
801
  const { cols: e, rows: t } = this, s = [];
@@ -848,7 +848,7 @@ class Ui extends se {
848
848
  super(4, 4, e);
849
849
  }
850
850
  }
851
- const Di = Yt / 180, wl = 180 / Yt;
851
+ const Di = Ht / 180, wl = 180 / Ht;
852
852
  function ie(r, e, t) {
853
853
  return Math.max(e, Math.min(r, t));
854
854
  }
@@ -873,7 +873,7 @@ class Ii extends Z {
873
873
  super(4), this.set(e, t, s, i);
874
874
  }
875
875
  }
876
- class Yr extends se {
876
+ class Hr extends se {
877
877
  constructor(e) {
878
878
  super(4, 5, e);
879
879
  }
@@ -1136,7 +1136,7 @@ class Tl extends se {
1136
1136
  super(2, 2, e);
1137
1137
  }
1138
1138
  }
1139
- class Kr extends se {
1139
+ class Yr extends se {
1140
1140
  constructor(e) {
1141
1141
  super(3, 3, e);
1142
1142
  }
@@ -1151,7 +1151,7 @@ class Kr extends se {
1151
1151
  n,
1152
1152
  h,
1153
1153
  l
1154
- ] = this._array, u = l * o - a * h, d = a * n - l * i, f = h * i - o * n, _ = e * u + t * d + s * f;
1154
+ ] = this._array, c = l * o - a * h, d = a * n - l * i, f = h * i - o * n, _ = e * c + t * d + s * f;
1155
1155
  if (_ === 0)
1156
1156
  return this.set([
1157
1157
  0,
@@ -1166,7 +1166,7 @@ class Kr extends se {
1166
1166
  ]);
1167
1167
  const p = 1 / _;
1168
1168
  return this.set([
1169
- u * p,
1169
+ c * p,
1170
1170
  (s * h - l * t) * p,
1171
1171
  (a * t - s * o) * p,
1172
1172
  d * p,
@@ -1178,7 +1178,7 @@ class Kr extends se {
1178
1178
  ]);
1179
1179
  }
1180
1180
  }
1181
- class Bi extends Kr {
1181
+ class Bi extends Yr {
1182
1182
  constructor(e = 0, t = 0, s = 0, i = 0, o = !1) {
1183
1183
  super(), this._x = e, this._y = t, this._width = s, this._height = i, this._flipY = o, this._performUpdateArray();
1184
1184
  }
@@ -1274,7 +1274,7 @@ class C extends Z {
1274
1274
  return new C(t).clone().sub(e).multiply(s).add(e);
1275
1275
  }
1276
1276
  }
1277
- class be {
1277
+ class ye {
1278
1278
  get x() {
1279
1279
  return this.position.x;
1280
1280
  }
@@ -1309,11 +1309,11 @@ class be {
1309
1309
  break;
1310
1310
  case 1: {
1311
1311
  const i = e[0];
1312
- if (i instanceof be)
1312
+ if (i instanceof ye)
1313
1313
  t.set(i.position), s.set(i.size);
1314
1314
  else {
1315
- const o = i.map((d) => d.x), a = i.map((d) => d.y), n = Math.min(...o), h = Math.max(...o), l = Math.min(...a), u = Math.max(...a);
1316
- t.set(n, l), s.set(h - n, u - l);
1315
+ const o = i.map((d) => d.x), a = i.map((d) => d.y), n = Math.min(...o), h = Math.max(...o), l = Math.min(...a), c = Math.max(...a);
1316
+ t.set(n, l), s.set(h - n, c - l);
1317
1317
  }
1318
1318
  break;
1319
1319
  }
@@ -1352,7 +1352,7 @@ class be {
1352
1352
  };
1353
1353
  }
1354
1354
  }
1355
- class O extends Kr {
1355
+ class O extends Yr {
1356
1356
  static _t2d = /* @__PURE__ */ new O();
1357
1357
  premultiply(e) {
1358
1358
  return e.multiply(this, this);
@@ -1461,7 +1461,7 @@ class O extends Kr {
1461
1461
  if (e === 0 && t === 0)
1462
1462
  return [0, 0, i];
1463
1463
  {
1464
- const o = Math.cos(i), a = Math.sin(i), n = o + e * e * (1 - o), h = e * t * (1 - o) - s * a, l = e * s * (1 - o) + t * a, u = o + t * t * (1 - o), d = t * s * (1 - o) - e * a, f = o + s * s * (1 - o), _ = -Math.atan2(-d, u), p = -Math.atan2(l, Math.sqrt(d * d + f * f)), m = -Math.atan2(-h, n);
1464
+ const o = Math.cos(i), a = Math.sin(i), n = o + e * e * (1 - o), h = e * t * (1 - o) - s * a, l = e * s * (1 - o) + t * a, c = o + t * t * (1 - o), d = t * s * (1 - o) - e * a, f = o + s * s * (1 - o), _ = -Math.atan2(-d, c), p = -Math.atan2(l, Math.sqrt(d * d + f * f)), m = -Math.atan2(-h, n);
1465
1465
  return [_, p, m];
1466
1466
  }
1467
1467
  }
@@ -1485,21 +1485,21 @@ class O extends Kr {
1485
1485
  skew: { x: 0, y: 0 },
1486
1486
  rotation: 0
1487
1487
  }) {
1488
- const { a: s, b: i, c: o, d: a, tx: n, ty: h } = this.toObject(), l = -Math.atan2(-o, a), u = Math.atan2(i, s), d = Math.abs(l + u);
1489
- return d < 1e-5 || Math.abs(B - d) < 1e-5 ? (t.rotation = u, t.skew.x = t.skew.y = 0) : (t.rotation = 0, t.skew.x = l, t.skew.y = u), t.scale.x = Math.sqrt(s * s + i * i), t.scale.y = Math.sqrt(o * o + a * a), t.position.x = n + (e.x * s + e.y * o), t.position.y = h + (e.x * i + e.y * a), t;
1488
+ const { a: s, b: i, c: o, d: a, tx: n, ty: h } = this.toObject(), l = -Math.atan2(-o, a), c = Math.atan2(i, s), d = Math.abs(l + c);
1489
+ return d < 1e-5 || Math.abs(B - d) < 1e-5 ? (t.rotation = c, t.skew.x = t.skew.y = 0) : (t.rotation = 0, t.skew.x = l, t.skew.y = c), t.scale.x = Math.sqrt(s * s + i * i), t.scale.y = Math.sqrt(o * o + a * a), t.position.x = n + (e.x * s + e.y * o), t.position.y = h + (e.x * i + e.y * a), t;
1490
1490
  }
1491
1491
  apply(e, t) {
1492
1492
  t = t || new C();
1493
- const { a: s, c: i, tx: o, b: a, d: n, ty: h } = this.toObject(), l = e.x, u = e.y;
1494
- return t.x = s * l + i * u + o, t.y = a * l + n * u + h, t;
1493
+ const { a: s, c: i, tx: o, b: a, d: n, ty: h } = this.toObject(), l = e.x, c = e.y;
1494
+ return t.x = s * l + i * c + o, t.y = a * l + n * c + h, t;
1495
1495
  }
1496
1496
  affineInverse() {
1497
1497
  return this.clone().affineInvert();
1498
1498
  }
1499
1499
  applyAffineInverse(e, t) {
1500
1500
  t = t || new C();
1501
- const { a: s, b: i, c: o, d: a, tx: n, ty: h } = this.toObject(), l = 1 / (s * a + o * -i), u = e.x, d = e.y;
1502
- return t.x = a * l * u + -o * l * d + (h * o - n * a) * l, t.y = s * l * d + -i * l * u + (-h * s + n * i) * l, t;
1501
+ const { a: s, b: i, c: o, d: a, tx: n, ty: h } = this.toObject(), l = 1 / (s * a + o * -i), c = e.x, d = e.y;
1502
+ return t.x = a * l * c + -o * l * d + (h * o - n * a) * l, t.y = s * l * d + -i * l * c + (-h * s + n * i) * l, t;
1503
1503
  }
1504
1504
  isIdentity() {
1505
1505
  const { a: e, b: t, c: s, d: i, tx: o, ty: a } = this.toObject();
@@ -1525,12 +1525,12 @@ class El extends Z {
1525
1525
  super(3);
1526
1526
  }
1527
1527
  }
1528
- var zi = Object.defineProperty, Zr = (r, e, t, s) => {
1528
+ var zi = Object.defineProperty, Kr = (r, e, t, s) => {
1529
1529
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
1530
1530
  (a = r[o]) && (i = a(e, t, i) || i);
1531
1531
  return i && zi(e, t, i), i;
1532
1532
  };
1533
- class Kt extends pe {
1533
+ class Yt extends pe {
1534
1534
  _starting = !1;
1535
1535
  _nextDeltaTime = 0;
1536
1536
  _startedProcess;
@@ -1544,13 +1544,13 @@ class Kt extends pe {
1544
1544
  super(), this._onTicker = this._onTicker.bind(this), this.setProperties(e);
1545
1545
  }
1546
1546
  start(e) {
1547
- this._starting || (this._starting = !0, this._startedProcess && this.off("process", this._startedProcess), this._startedProcess = e, this.on("process", e), k.on(this._onTicker, { sort: 0 }));
1547
+ this._starting || (this._starting = !0, this._startedProcess && this.off("process", this._startedProcess), this._startedProcess = e, this.on("process", e), U.on(this._onTicker, { sort: 0 }));
1548
1548
  }
1549
1549
  stop() {
1550
- this._starting && (this._starting = !1, k.off(this._onTicker, { sort: 0 }));
1550
+ this._starting && (this._starting = !1, U.off(this._onTicker, { sort: 0 }));
1551
1551
  }
1552
1552
  _onTicker() {
1553
- const e = k.elapsed * this.speed;
1553
+ const e = U.elapsed * this.speed;
1554
1554
  if ((this._nextDeltaTime -= e) <= 0) {
1555
1555
  const s = (this._nextDeltaTime = this.spf) || e;
1556
1556
  this.emit("process", s);
@@ -1560,20 +1560,20 @@ class Kt extends pe {
1560
1560
  this.stop(), super.destroy();
1561
1561
  }
1562
1562
  }
1563
- Zr([
1564
- c({ fallback: 60 })
1565
- ], Kt.prototype, "fps");
1566
- Zr([
1567
- c({ fallback: 1 })
1568
- ], Kt.prototype, "speed");
1569
- var Ni = Object.defineProperty, Jr = (r, e, t, s) => {
1563
+ Kr([
1564
+ u({ fallback: 60 })
1565
+ ], Yt.prototype, "fps");
1566
+ Kr([
1567
+ u({ fallback: 1 })
1568
+ ], Yt.prototype, "speed");
1569
+ var Ni = Object.defineProperty, Zr = (r, e, t, s) => {
1570
1570
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
1571
1571
  (a = r[o]) && (i = a(e, t, i) || i);
1572
1572
  return i && Ni(e, t, i), i;
1573
1573
  };
1574
- class Zt extends Ir {
1574
+ class Kt extends Dr {
1575
1575
  screen = { x: 0, y: 0, width: 0, height: 0 };
1576
- related = new Xr();
1576
+ related = new qr();
1577
1577
  _updateProperty(e, t, s) {
1578
1578
  switch (super._updateProperty(e, t, s), e) {
1579
1579
  case "view":
@@ -1593,12 +1593,12 @@ class Zt extends Ir {
1593
1593
  super.destroy();
1594
1594
  }
1595
1595
  }
1596
- Jr([
1597
- c({ fallback: jr })
1598
- ], Zt.prototype, "pixelRatio");
1599
- Jr([
1600
- c({ internal: !0 })
1601
- ], Zt.prototype, "view");
1596
+ Zr([
1597
+ u({ fallback: Wr })
1598
+ ], Kt.prototype, "pixelRatio");
1599
+ Zr([
1600
+ u({ internal: !0 })
1601
+ ], Kt.prototype, "view");
1602
1602
  var Ze = /* @__PURE__ */ ((r) => (r.NORMAL = "normal", r.ADD = "add", r.MULTIPLY = "multiply", r.SCREEN = "screen", r.NONE = "none", r.NORMAL_NPM = "normal_npm", r.ADD_NPM = "add_npm", r.SCREEN_NPM = "screen_npm", r.SRC_IN = "src_in", r.SRC_OUT = "src_out", r.SRC_ATOP = "src_atop", r.DST_OVER = "dst_over", r.DST_IN = "dst_in", r.DST_OUT = "dst_out", r.DST_ATOP = "dst_atop", r.XOR = "xor", r.SUBTRACT = "subtract", r))(Ze || {});
1603
1603
  function Li(r) {
1604
1604
  return {
@@ -1640,7 +1640,7 @@ class H {
1640
1640
  destroy() {
1641
1641
  }
1642
1642
  }
1643
- class Me {
1643
+ class ke {
1644
1644
  static _properties = [
1645
1645
  "blend",
1646
1646
  "offsets",
@@ -1664,7 +1664,7 @@ class Me {
1664
1664
  });
1665
1665
  }
1666
1666
  static for2D() {
1667
- const e = new Me();
1667
+ const e = new ke();
1668
1668
  return e.depthTest = !1, e.blend = !0, e;
1669
1669
  }
1670
1670
  _blendMode = Ze.NORMAL;
@@ -1688,17 +1688,17 @@ class Me {
1688
1688
  this[t] = e[t];
1689
1689
  }
1690
1690
  }
1691
- Me._init();
1691
+ ke._init();
1692
1692
  class Fi extends H {
1693
1693
  install(e) {
1694
1694
  super.install(e), e.state = this;
1695
1695
  }
1696
1696
  _blendEq = !1;
1697
- _setters = Me._properties.map((e) => this[`set${e.replace(/^\S/, (t) => t.toUpperCase())}`]);
1697
+ _setters = ke._properties.map((e) => this[`set${e.replace(/^\S/, (t) => t.toUpperCase())}`]);
1698
1698
  boundStateBitmap = 0;
1699
1699
  boundBlendMode;
1700
1700
  blendModes;
1701
- defaultState = new Me({ blend: !0 });
1701
+ defaultState = new ke({ blend: !0 });
1702
1702
  onUpdateContext() {
1703
1703
  super.onUpdateContext(), this.blendModes = Li(this._renderer.gl);
1704
1704
  }
@@ -1753,7 +1753,7 @@ class $i extends H {
1753
1753
  install(e) {
1754
1754
  super.install(e), e.batch2D = this;
1755
1755
  }
1756
- _state = Me.for2D();
1756
+ _state = ke.for2D();
1757
1757
  _batchSize = 4096 * 4;
1758
1758
  _drawCallUid = 0;
1759
1759
  _defaultModulate = [255, 255, 255, 255];
@@ -1835,11 +1835,10 @@ void main(void) {
1835
1835
  vec2 uv = vUv;
1836
1836
 
1837
1837
  if (vSize.x > 0.0 && vSize.y > 0.0) {
1838
- uv = floor(uv * vSize);
1839
- uv = uv / vSize;
1838
+ uv = floor(uv * vSize + vec2(0.5)) / vSize;
1840
1839
  }
1841
1840
 
1842
- vec4 color = vec4(0.0, 0.0, 0.0, 0.0);
1841
+ vec4 color = vec4(0.0);
1843
1842
  if (vDisableWrapMode > 0.0 && (uv.x < 0.0 || uv.y < 0.0 || uv.x > 1.0 || uv.y > 1.0))
1844
1843
  {
1845
1844
  //
@@ -1848,20 +1847,22 @@ void main(void) {
1848
1847
  if (vTextureId < 0.0)
1849
1848
  {
1850
1849
  //
1851
- }${Array.from({ length: e }, (l, u) => {
1850
+ }${Array.from({ length: e }, (l, c) => {
1852
1851
  let d = " ";
1853
- return u >= 0 && (d += `
1854
- else `), u < e - 1 && (d += `
1855
- if (vTextureId < ${u}.5)`), `${d}
1852
+ return c >= 0 && (d += `
1853
+ else `), c < e - 1 && (d += `
1854
+ if (vTextureId < ${c}.5)`), `${d}
1856
1855
  {
1857
- color = texture2D(samplers[${u}], uv);
1856
+ color = texture2D(samplers[${c}], uv);
1858
1857
  }`;
1859
1858
  }).join("")}
1860
1859
 
1861
1860
  color += (1.0 - color.a) * vBackgroundColor;
1861
+
1862
1862
  if (color.a > 0.0) {
1863
1863
  color *= vModulate;
1864
1864
  }
1865
+
1865
1866
  gl_FragColor = color;
1866
1867
  }`
1867
1868
  }), i = t.buffer.create({
@@ -1874,33 +1875,33 @@ void main(void) {
1874
1875
  usage: "dynamic_draw"
1875
1876
  }), a = {
1876
1877
  attributes: Object.fromEntries(
1877
- Object.entries(this._attributes).map(([l, u]) => [l, { ...u, buffer: i }])
1878
+ Object.entries(this._attributes).map(([l, c]) => [l, { ...c, buffer: i }])
1878
1879
  ),
1879
1880
  elementArrayBuffer: o
1880
1881
  }, n = t.vertexArray.create(s, a), h = new Int32Array(
1881
- Array.from({ length: e }, (l, u) => u)
1882
+ Array.from({ length: e }, (l, c) => c)
1882
1883
  );
1883
1884
  return {
1884
- update: (l, u) => {
1885
+ update: (l, c) => {
1885
1886
  t.vertexArray.bind(n ?? a), t.buffer.update(i, {
1886
1887
  target: "array_buffer",
1887
1888
  data: l
1888
1889
  }), t.buffer.update(o, {
1889
1890
  target: "element_array_buffer",
1890
- data: u
1891
+ data: c
1891
1892
  });
1892
1893
  },
1893
1894
  draw: (l) => {
1894
- const u = this._renderer;
1895
- u.program.bind(s);
1896
- const d = u.program.uniforms.viewMatrix;
1897
- u.program.updateUniforms(s, {
1895
+ const c = this._renderer;
1896
+ c.program.bind(s);
1897
+ const d = c.program.uniforms.viewMatrix;
1898
+ c.program.updateUniforms(s, {
1898
1899
  samplers: h,
1899
1900
  modulate: [1, 1, 1, 1],
1900
1901
  zoom: [d[0], d[4]],
1901
1902
  translate: [d[6], d[7]],
1902
- ...u.program.uniforms
1903
- }), u.vertexArray.bind(n ?? a), u.draw(l);
1903
+ ...c.program.uniforms
1904
+ }), c.vertexArray.bind(n ?? a), c.draw(l);
1904
1905
  }
1905
1906
  };
1906
1907
  }
@@ -1914,33 +1915,33 @@ void main(void) {
1914
1915
  const e = this._vertexCount, t = this._indexCount, s = this._batchables;
1915
1916
  this._batchables = [], this._vertexCount = 0, this._indexCount = 0;
1916
1917
  const i = this._renderer.texture.maxUnits, o = this._getAttributeBuffer(e), a = new Float32Array(o), n = new Uint8Array(o), h = this._getIndexBuffer(t);
1917
- let l = 0, u = 0;
1918
+ let l = 0, c = 0;
1918
1919
  const d = [];
1919
- for (let _ = s.length, p = { id: ++this._drawCallUid }, m = [], g = /* @__PURE__ */ new Map(), w = 0, P = 0, R = 0; R < _; R++) {
1920
+ for (let _ = s.length, p = { id: ++this._drawCallUid }, m = [], v = /* @__PURE__ */ new Map(), y = 0, P = 0, R = 0; R < _; R++) {
1920
1921
  const A = s[R].texture, L = R === _ - 1;
1921
- if (!A || g.has(A)) {
1922
+ if (!A || v.has(A)) {
1922
1923
  if (!L)
1923
1924
  continue;
1924
1925
  } else
1925
- m.push(A), g.set(A, w++);
1926
- if (L || w >= i) {
1927
- p.textures = m, p.textureLocationMap = g, w = 0, p.first = u;
1926
+ m.push(A), v.set(A, y++);
1927
+ if (L || y >= i) {
1928
+ p.textures = m, p.textureLocationMap = v, y = 0, p.first = c;
1928
1929
  for (let G = P; G <= R; G++) {
1929
1930
  const {
1930
- indices: ur,
1931
- vertices: zt,
1932
- uvs: dr = new Float32Array(0),
1933
- size: fr = new Float32Array(0),
1934
- texture: pr,
1931
+ indices: cr,
1932
+ vertices: Bt,
1933
+ uvs: ur = new Float32Array(0),
1934
+ size: dr = new Float32Array(0),
1935
+ texture: fr,
1935
1936
  modulate: qe = this._defaultModulate,
1936
1937
  backgroundColor: Xe = this._defaultBackgroundColor,
1937
- blendMode: _r = Ze.NORMAL,
1938
+ blendMode: pr = Ze.NORMAL,
1938
1939
  disableWrapMode: Us = !1
1939
- } = s[G], Ds = fr[0] || 0, Is = fr[1] || 0;
1940
- P < G && p.blendMode !== _r && (p.count = u - p.first, d.push(p), P = G, p = { id: ++this._drawCallUid }, p.textures = m, p.first = u);
1941
- const Bs = l / this._vertexSize, zs = (pr ? g.get(pr) : -1) ?? -1, Ns = Us ? 1 : 0;
1942
- for (let Nt = zt.length, K = 0; K < Nt; K += 2) {
1943
- if (a[l++] = zs, a[l++] = zt[K], a[l++] = zt[K + 1], a[l++] = Ds, a[l++] = Is, a[l++] = dr[K], a[l++] = dr[K + 1], qe) {
1940
+ } = s[G], Ds = dr[0] || 0, Is = dr[1] || 0;
1941
+ P < G && p.blendMode !== pr && (p.count = c - p.first, d.push(p), P = G, p = { id: ++this._drawCallUid }, p.textures = m, p.first = c);
1942
+ const Bs = l / this._vertexSize, zs = (fr ? v.get(fr) : -1) ?? -1, Ns = Us ? 1 : 0;
1943
+ for (let zt = Bt.length, K = 0; K < zt; K += 2) {
1944
+ if (a[l++] = zs, a[l++] = Bt[K], a[l++] = Bt[K + 1], a[l++] = Ds, a[l++] = Is, a[l++] = ur[K], a[l++] = ur[K + 1], qe) {
1944
1945
  const re = l * 4;
1945
1946
  n[re] = qe[0], n[re + 1] = qe[1], n[re + 2] = qe[2], n[re + 3] = qe[3];
1946
1947
  }
@@ -1950,19 +1951,19 @@ void main(void) {
1950
1951
  }
1951
1952
  l++, a[l++] = Ns;
1952
1953
  }
1953
- for (let Nt = ur.length, K = 0; K < Nt; K++)
1954
- h[u++] = Bs + ur[K];
1955
- p.blendMode = _r;
1954
+ for (let zt = cr.length, K = 0; K < zt; K++)
1955
+ h[c++] = Bs + cr[K];
1956
+ p.blendMode = pr;
1956
1957
  }
1957
- P = R + 1, p.count = u - p.first, d.push(p), p = { id: ++this._drawCallUid }, m = [], g = /* @__PURE__ */ new Map();
1958
+ P = R + 1, p.count = c - p.first, d.push(p), p = { id: ++this._drawCallUid }, m = [], v = /* @__PURE__ */ new Map();
1958
1959
  }
1959
1960
  }
1960
1961
  const f = this._getShader(i);
1961
1962
  f.update(o, h);
1962
1963
  for (let _ = d.length, p = 0; p < _; p++) {
1963
- const m = d[p], { first: g = 0, textures: w, textureLocationMap: P } = m;
1964
- for (let R = w.length, A = 0; A < R; A++) {
1965
- const L = w[A], G = P.get(L);
1964
+ const m = d[p], { first: v = 0, textures: y, textureLocationMap: P } = m;
1965
+ for (let R = y.length, A = 0; A < R; A++) {
1966
+ const L = y[A], G = P.get(L);
1966
1967
  G !== void 0 && this._renderer.texture.bind({
1967
1968
  target: "texture_2d",
1968
1969
  location: G,
@@ -1972,28 +1973,28 @@ void main(void) {
1972
1973
  this._state.blendMode = m.blendMode, this._renderer.state.bind(this._state), f.draw({
1973
1974
  mode: "triangles",
1974
1975
  count: m.count,
1975
- first: g,
1976
+ first: v,
1976
1977
  bytesPerElement: 2
1977
1978
  });
1978
1979
  }
1979
1980
  }
1980
1981
  _getAttributeBuffer(e) {
1981
- const t = yr(Math.ceil(e / 8)), s = xr(t), i = t * 8;
1982
+ const t = br(Math.ceil(e / 8)), s = yr(t), i = t * 8;
1982
1983
  this._attributeBuffer.length <= s && (this._indexBuffers.length = s + 1);
1983
1984
  let o = this._attributeBuffer[i];
1984
1985
  return o || (this._attributeBuffer[i] = o = new ArrayBuffer(i * this._vertexSize * 4)), o;
1985
1986
  }
1986
1987
  _getIndexBuffer(e) {
1987
- const t = yr(Math.ceil(e / 12)), s = xr(t), i = t * 12;
1988
+ const t = br(Math.ceil(e / 12)), s = yr(t), i = t * 12;
1988
1989
  this._indexBuffers.length <= s && (this._indexBuffers.length = s + 1);
1989
1990
  let o = this._indexBuffers[s];
1990
1991
  return o || (this._indexBuffers[s] = o = new Uint16Array(i)), o;
1991
1992
  }
1992
1993
  }
1993
- function yr(r) {
1994
+ function br(r) {
1994
1995
  return r += r === 0 ? 1 : 0, --r, r |= r >>> 1, r |= r >>> 2, r |= r >>> 4, r |= r >>> 8, r |= r >>> 16, r + 1;
1995
1996
  }
1996
- function xr(r) {
1997
+ function yr(r) {
1997
1998
  let e = (r > 65535 ? 1 : 0) << 4;
1998
1999
  r >>>= e;
1999
2000
  let t = (r > 255 ? 1 : 0) << 3;
@@ -2041,8 +2042,8 @@ class Vi extends H {
2041
2042
  const o = i.target ?? this.boundTarget, a = i.usage ?? "static_draw", n = t.data, h = this.gl;
2042
2043
  let l;
2043
2044
  Array.isArray(n) ? o === "array_buffer" ? l = new Float32Array(n) : l = new Uint32Array(n) : l = n;
2044
- const u = this._renderer.getBindPoint(o);
2045
- l && l.byteLength <= i.byteLength ? h.bufferSubData(u, 0, l) : (h.bufferData(u, l, this._renderer.getBindPoint(a)), i.length = l?.length ?? 0, i.byteLength = l?.byteLength ?? 0, i.bytesPerElement = i.length ? i.byteLength / i.length : 0);
2045
+ const c = this._renderer.getBindPoint(o);
2046
+ l && l.byteLength <= i.byteLength ? h.bufferSubData(c, 0, l) : (h.bufferData(c, l, this._renderer.getBindPoint(a)), i.length = l?.length ?? 0, i.byteLength = l?.byteLength ?? 0, i.bytesPerElement = i.length ? i.byteLength / i.length : 0);
2046
2047
  }
2047
2048
  bind(e) {
2048
2049
  let { target: t, value: s } = e;
@@ -2351,7 +2352,7 @@ class ji extends H {
2351
2352
  return this._renderer.getRelated(e, () => ({
2352
2353
  attributes: /* @__PURE__ */ new Map(),
2353
2354
  uniforms: /* @__PURE__ */ new Map(),
2354
- boundUniforms: new Br()
2355
+ boundUniforms: new Ir()
2355
2356
  }));
2356
2357
  }
2357
2358
  update(...e) {
@@ -2368,29 +2369,29 @@ class ji extends H {
2368
2369
  throw new Error(`Unable to link program: ${i.getProgramInfoLog(s)}`);
2369
2370
  o.attributes.clear(), o.uniforms.clear();
2370
2371
  for (let h = i.getProgramParameter(s, i.ACTIVE_ATTRIBUTES), l = 0; l < h; l++) {
2371
- const u = i.getActiveAttrib(s, l);
2372
- if (!u || u.name.startsWith("gl_"))
2372
+ const c = i.getActiveAttrib(s, l);
2373
+ if (!c || c.name.startsWith("gl_"))
2373
2374
  continue;
2374
- const d = this._renderer.bindPoints.get(u.type) ?? String(u.type);
2375
- o.attributes.set(u.name, {
2375
+ const d = this._renderer.bindPoints.get(c.type) ?? String(c.type);
2376
+ o.attributes.set(c.name, {
2376
2377
  type: d,
2377
- name: u.name,
2378
+ name: c.name,
2378
2379
  size: qi(d),
2379
- location: i.getAttribLocation(s, u.name)
2380
+ location: i.getAttribLocation(s, c.name)
2380
2381
  });
2381
2382
  }
2382
2383
  for (let h = i.getProgramParameter(s, i.ACTIVE_UNIFORMS), l = 0; l < h; l++) {
2383
- const u = i.getActiveUniform(s, l);
2384
- if (!u)
2384
+ const c = i.getActiveUniform(s, l);
2385
+ if (!c)
2385
2386
  continue;
2386
- const d = u.name.replace(/\[.*?\]$/, "");
2387
+ const d = c.name.replace(/\[.*?\]$/, "");
2387
2388
  let f = i.getUniformLocation(s, d);
2388
- f || (f = i.getUniformLocation(s, u.name)), o.uniforms.set(d, {
2389
+ f || (f = i.getUniformLocation(s, c.name)), o.uniforms.set(d, {
2389
2390
  name: d,
2390
2391
  index: l,
2391
- type: this._renderer.bindPoints.get(u.type) ?? String(u.type),
2392
- size: u.size,
2393
- isArray: d !== u.name,
2392
+ type: this._renderer.bindPoints.get(c.type) ?? String(c.type),
2393
+ size: c.size,
2394
+ isArray: d !== c.name,
2394
2395
  location: f
2395
2396
  });
2396
2397
  }
@@ -2427,9 +2428,9 @@ ${s.getShaderInfoLog(i)}`);
2427
2428
  const h = i[n], l = o.get(n);
2428
2429
  if (!l)
2429
2430
  continue;
2430
- const { type: u, isArray: d, location: f } = l;
2431
+ const { type: c, isArray: d, location: f } = l;
2431
2432
  if (!(!f || a.get(f) === h))
2432
- switch (a.set(f, h), u) {
2433
+ switch (a.set(f, h), c) {
2433
2434
  case "float":
2434
2435
  d ? s.uniform1fv(f, h) : s.uniform1f(f, h);
2435
2436
  break;
@@ -2528,16 +2529,16 @@ function qi(r) {
2528
2529
  }
2529
2530
  }
2530
2531
  function gt(r, e, t) {
2531
- const [s, i, o, a, n, h, l, u, d] = r, f = s * e + a * t + l, _ = i * e + n * t + u, p = o * e + h * t + d;
2532
+ const [s, i, o, a, n, h, l, c, d] = r, f = s * e + a * t + l, _ = i * e + n * t + c, p = o * e + h * t + d;
2532
2533
  return { x: f / p, y: _ / p };
2533
2534
  }
2534
2535
  function Xi(r, e) {
2535
- const { x: t, y: s, width: i, height: o } = e, a = gt(r, t, s), n = gt(r, t + i, s), h = gt(r, t + i, s + o), l = gt(r, t, s + o), u = [a, n, h, l], d = u.map((w) => w.x), f = u.map((w) => w.y), _ = Math.min(...d), p = Math.max(...d), m = Math.min(...f), g = Math.max(...f);
2536
+ const { x: t, y: s, width: i, height: o } = e, a = gt(r, t, s), n = gt(r, t + i, s), h = gt(r, t + i, s + o), l = gt(r, t, s + o), c = [a, n, h, l], d = c.map((y) => y.x), f = c.map((y) => y.y), _ = Math.min(...d), p = Math.max(...d), m = Math.min(...f), v = Math.max(...f);
2536
2537
  return {
2537
2538
  x: _,
2538
2539
  y: m,
2539
2540
  width: p - _,
2540
- height: g - m
2541
+ height: v - m
2541
2542
  };
2542
2543
  }
2543
2544
  class Hi extends H {
@@ -2560,10 +2561,10 @@ class Hi extends H {
2560
2561
  }
2561
2562
  }
2562
2563
  use() {
2563
- const e = this._renderer, { pixelRatio: t, mask: s, viewport: i, screen: o, gl: a, program: n } = e, { viewMatrix: h } = n.uniforms, l = Xi(h, s.last.mask), { x: u, y: d, width: f, height: _ } = l;
2564
+ const e = this._renderer, { pixelRatio: t, mask: s, viewport: i, screen: o, gl: a, program: n } = e, { viewMatrix: h } = n.uniforms, l = Xi(h, s.last.mask), { x: c, y: d, width: f, height: _ } = l;
2564
2565
  let p;
2565
2566
  i.boundViewport ? p = i.boundViewport.height - (_ + d) * t : p = (o.height - (_ + d)) * t, a.scissor(
2566
- u * t,
2567
+ c * t,
2567
2568
  p,
2568
2569
  f * t,
2569
2570
  _ * t
@@ -2683,12 +2684,12 @@ class Zi extends H {
2683
2684
  const d = this._renderer.getBindPoint(n.wrapMode);
2684
2685
  a.texParameteri(l, a.TEXTURE_WRAP_S, d), a.texParameteri(l, a.TEXTURE_WRAP_T, d);
2685
2686
  }
2686
- const u = n.filterMode;
2687
- if (h.filterMode && u) {
2688
- const d = this._renderer.getBindPoint(u.split("_")[0]);
2689
- u.includes("_") ? a.texParameteri(l, a.TEXTURE_MIN_FILTER, this._renderer.getBindPoint(u)) : a.texParameteri(l, a.TEXTURE_MIN_FILTER, d), a.texParameteri(l, a.TEXTURE_MAG_FILTER, d);
2687
+ const c = n.filterMode;
2688
+ if (h.filterMode && c) {
2689
+ const d = this._renderer.getBindPoint(c.split("_")[0]);
2690
+ c.includes("_") ? a.texParameteri(l, a.TEXTURE_MIN_FILTER, this._renderer.getBindPoint(c)) : a.texParameteri(l, a.TEXTURE_MIN_FILTER, d), a.texParameteri(l, a.TEXTURE_MAG_FILTER, d);
2690
2691
  }
2691
- if (n.anisoLevel && u === "linear" && this._renderer.extensions.anisotropicFiltering && h.anisoLevel) {
2692
+ if (n.anisoLevel && c === "linear" && this._renderer.extensions.anisotropicFiltering && h.anisoLevel) {
2692
2693
  const {
2693
2694
  MAX_TEXTURE_MAX_ANISOTROPY_EXT: d,
2694
2695
  TEXTURE_MAX_ANISOTROPY_EXT: f
@@ -2713,9 +2714,9 @@ class Zi extends H {
2713
2714
  i ??= "texture_2d", o ??= 0;
2714
2715
  let n = this.boundTextures[o];
2715
2716
  n || (this.boundTextures[o] = n = { texture_2d: null, texture_cube_map: null });
2716
- const h = n[i] ?? null, l = this.boundLocation, u = s !== h, d = {
2717
- location: o !== l && (u || a),
2718
- texture: u
2717
+ const h = n[i] ?? null, l = this.boundLocation, c = s !== h, d = {
2718
+ location: o !== l && (c || a),
2719
+ texture: c
2719
2720
  }, f = this._renderer.getBindPoint(i);
2720
2721
  d.location && (t.activeTexture(t.TEXTURE0 + o), this.boundLocation = o), d.texture && (t.bindTexture(f, s ?? this.emptyTextures[i]), n[i] = s), this.boundTarget = i;
2721
2722
  }
@@ -2750,7 +2751,7 @@ class Ji extends H {
2750
2751
  type: n = "float",
2751
2752
  normalized: h = !1,
2752
2753
  stride: l = 0,
2753
- offset: u = 0,
2754
+ offset: c = 0,
2754
2755
  divisor: d
2755
2756
  } = s, f = this._renderer.gl;
2756
2757
  this._renderer.buffer.bind({ target: "array_buffer", value: o });
@@ -2761,7 +2762,7 @@ class Ji extends H {
2761
2762
  this._renderer.getBindPoint(n),
2762
2763
  h,
2763
2764
  l,
2764
- u + (l - u) / i * _
2765
+ c + (l - c) / i * _
2765
2766
  );
2766
2767
  d && ("vertexAttribDivisor" in f ? f.vertexAttribDivisor(t, d) : console.warn("Failed to active vertex array object, GPU Instancing is not supported on this device")), this.boundVertexArray.attributes[e] = {
2767
2768
  enable: !0,
@@ -2801,9 +2802,9 @@ class Ji extends H {
2801
2802
  if (s.attributes) {
2802
2803
  const o = this._renderer.program.getMeta(t), a = {}, n = {};
2803
2804
  for (const l in s.attributes) {
2804
- const u = s.attributes[l], d = o.attributes.get(l);
2805
+ const c = s.attributes[l], d = o.attributes.get(l);
2805
2806
  let f;
2806
- "buffer" in u ? f = { ...u } : f = { buffer: u }, f.size = f.size || d?.size || 0;
2807
+ "buffer" in c ? f = { ...c } : f = { buffer: c }, f.size = f.size || d?.size || 0;
2807
2808
  const _ = this._renderer.buffer.getMeta(f.buffer), p = Number(d?.type.match(/mat(\d)/)?.[1] ?? 1);
2808
2809
  let m;
2809
2810
  switch (f.type) {
@@ -2822,8 +2823,8 @@ class Ji extends H {
2822
2823
  }
2823
2824
  const h = {};
2824
2825
  for (const l in n) {
2825
- const { attrib: u, meta: d, info: f, byteLength: _, dimension: p } = n[l];
2826
- f?.location !== void 0 && (h[d.id] ??= 0, u.offset ??= h[d.id], u.stride ??= a[d.id] === _ ? 0 : a[d.id], this.enableVertexAttrib(l, f.location, u, p), h[d.id] += _);
2826
+ const { attrib: c, meta: d, info: f, byteLength: _, dimension: p } = n[l];
2827
+ f?.location !== void 0 && (h[d.id] ??= 0, c.offset ??= h[d.id], c.stride ??= a[d.id] === _ ? 0 : a[d.id], this.enableVertexAttrib(l, f.location, c, p), h[d.id] += _);
2827
2828
  }
2828
2829
  }
2829
2830
  const i = s.elementArrayBuffer ?? null;
@@ -2866,7 +2867,7 @@ class Qi extends H {
2866
2867
  super.reset(), this.boundViewport = { x: 0, y: 0, width: 0, height: 0 };
2867
2868
  }
2868
2869
  }
2869
- class eo extends Zt {
2870
+ class eo extends Kt {
2870
2871
  _modules = [
2871
2872
  new Zi(),
2872
2873
  new Vi(),
@@ -2989,14 +2990,14 @@ class eo extends Zt {
2989
2990
  toPixels(e = 0, t = 0, s = this.gl.drawingBufferWidth, i = this.gl.drawingBufferHeight) {
2990
2991
  const o = s * i * 4, a = s * 4, n = (i - 1) * a, h = new Uint8Array(o), l = new Uint8ClampedArray(o);
2991
2992
  this.gl.readPixels(e, t, s, i, this.gl.RGBA, this.gl.UNSIGNED_BYTE, h);
2992
- for (let u = 0; u < o; u += a)
2993
- l.set(h.subarray(u, u + a), n - u);
2993
+ for (let c = 0; c < o; c += a)
2994
+ l.set(h.subarray(c, c + a), n - c);
2994
2995
  return l;
2995
2996
  }
2996
2997
  }
2997
- class Se {
2998
+ class Ce {
2998
2999
  }
2999
- class to extends Se {
3000
+ class to extends Ce {
3000
3001
  install(e) {
3001
3002
  const t = async (s) => {
3002
3003
  const { parseFont: i } = await import("modern-font");
@@ -3011,12 +3012,12 @@ class to extends Se {
3011
3012
  }), e.font = this, this;
3012
3013
  }
3013
3014
  }
3014
- class Jt extends _e {
3015
+ class Zt extends _e {
3015
3016
  vertexAttributes;
3016
3017
  indexBuffer;
3017
3018
  instanceCount;
3018
3019
  mode;
3019
- _materialWeakMap = new Xr();
3020
+ _materialWeakMap = new qr();
3020
3021
  constructor(e = {}) {
3021
3022
  super(), this.vertexAttributes = new Map(Object.entries(e?.vertexAttributes ?? {})), this.indexBuffer = e?.indexBuffer, this.instanceCount = e?.instanceCount, this.mode = e?.mode ?? "triangles";
3022
3023
  }
@@ -3064,7 +3065,7 @@ class Jt extends _e {
3064
3065
  }), e.vertexArray.unbind();
3065
3066
  }
3066
3067
  }
3067
- var ro = Object.defineProperty, Qr = (r, e, t, s) => {
3068
+ var ro = Object.defineProperty, Jr = (r, e, t, s) => {
3068
3069
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
3069
3070
  (a = r[o]) && (i = a(e, t, i) || i);
3070
3071
  return i && ro(e, t, i), i;
@@ -3102,13 +3103,13 @@ class nt extends _e {
3102
3103
  )), t;
3103
3104
  }
3104
3105
  }
3105
- Qr([
3106
- c({ internal: !0, fallback: null })
3106
+ Jr([
3107
+ u({ internal: !0, fallback: null })
3107
3108
  ], nt.prototype, "data");
3108
- Qr([
3109
- c({ internal: !0, fallback: !1 })
3109
+ Jr([
3110
+ u({ internal: !0, fallback: !1 })
3110
3111
  ], nt.prototype, "dynamic");
3111
- var so = Object.defineProperty, es = (r, e, t, s) => {
3112
+ var so = Object.defineProperty, Qr = (r, e, t, s) => {
3112
3113
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
3113
3114
  (a = r[o]) && (i = a(e, t, i) || i);
3114
3115
  return i && so(e, t, i), i;
@@ -3146,13 +3147,13 @@ class ue extends _e {
3146
3147
  )), t;
3147
3148
  }
3148
3149
  }
3149
- es([
3150
- c({ internal: !0, default: null })
3150
+ Qr([
3151
+ u({ internal: !0, default: null })
3151
3152
  ], ue.prototype, "data");
3152
- es([
3153
- c({ internal: !0, fallback: !1 })
3153
+ Qr([
3154
+ u({ internal: !0, fallback: !1 })
3154
3155
  ], ue.prototype, "dynamic");
3155
- var io = Object.defineProperty, Ce = (r, e, t, s) => {
3156
+ var io = Object.defineProperty, Ae = (r, e, t, s) => {
3156
3157
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
3157
3158
  (a = r[o]) && (i = a(e, t, i) || i);
3158
3159
  return i && io(e, t, i), i;
@@ -3183,28 +3184,28 @@ class $ extends _e {
3183
3184
  return e && (this.needsUpload = !1), e;
3184
3185
  }
3185
3186
  }
3186
- Ce([
3187
- c({ internal: !0 })
3187
+ Ae([
3188
+ u({ internal: !0 })
3188
3189
  ], $.prototype, "buffer");
3189
- Ce([
3190
- c({ fallback: 0 })
3190
+ Ae([
3191
+ u({ fallback: 0 })
3191
3192
  ], $.prototype, "size");
3192
- Ce([
3193
- c({ fallback: !1 })
3193
+ Ae([
3194
+ u({ fallback: !1 })
3194
3195
  ], $.prototype, "normalized");
3195
- Ce([
3196
- c({ fallback: "float" })
3196
+ Ae([
3197
+ u({ fallback: "float" })
3197
3198
  ], $.prototype, "type");
3198
- Ce([
3199
- c()
3199
+ Ae([
3200
+ u()
3200
3201
  ], $.prototype, "stride");
3201
- Ce([
3202
- c()
3202
+ Ae([
3203
+ u()
3203
3204
  ], $.prototype, "offset");
3204
- Ce([
3205
- c()
3205
+ Ae([
3206
+ u()
3206
3207
  ], $.prototype, "divisor");
3207
- class Sl extends Jt {
3208
+ class Sl extends Zt {
3208
3209
  constructor() {
3209
3210
  super({
3210
3211
  vertexAttributes: {
@@ -3226,14 +3227,13 @@ class Sl extends Jt {
3226
3227
  });
3227
3228
  }
3228
3229
  }
3229
- class x extends _e {
3230
+ class w extends _e {
3230
3231
  static instance = new this();
3231
3232
  vert;
3232
3233
  frag;
3233
3234
  uniforms;
3234
3235
  constructor(e = {}) {
3235
- super(), this.vert = e.vert ?? `precision highp float;
3236
- attribute vec2 position;
3236
+ super(), this.vert = e.vert ?? `attribute vec2 position;
3237
3237
  uniform mat3 projectionMatrix;
3238
3238
  uniform mat3 modelViewMatrix;
3239
3239
  void main(void) {
@@ -3275,7 +3275,7 @@ function no(r) {
3275
3275
  }
3276
3276
  return Number(r);
3277
3277
  }
3278
- class yt extends x {
3278
+ class yt extends w {
3279
3279
  vert = `attribute vec2 position;
3280
3280
  attribute vec2 uv;
3281
3281
  varying vec2 vUv;
@@ -3329,15 +3329,14 @@ void main(void) { gl_FragColor = transition(vUv); }` : ""}`;
3329
3329
  });
3330
3330
  }
3331
3331
  }
3332
- class xt extends x {
3332
+ class xt extends w {
3333
3333
  static _instance;
3334
3334
  static get instance() {
3335
3335
  return this._instance ??= new this();
3336
3336
  }
3337
3337
  constructor() {
3338
3338
  super({
3339
- vert: `precision highp float;
3340
- attribute vec2 position;
3339
+ vert: `attribute vec2 position;
3341
3340
  attribute vec2 uv;
3342
3341
  uniform mat3 projectionMatrix;
3343
3342
  uniform mat3 modelViewMatrix;
@@ -3361,7 +3360,7 @@ void main(void) {
3361
3360
  });
3362
3361
  }
3363
3362
  }
3364
- class b extends Jt {
3363
+ class b extends Zt {
3365
3364
  static _instance;
3366
3365
  static get instance() {
3367
3366
  return this._instance ??= new this();
@@ -3398,7 +3397,7 @@ class b extends Jt {
3398
3397
  });
3399
3398
  }
3400
3399
  }
3401
- class Cl extends Jt {
3400
+ class Cl extends Zt {
3402
3401
  positionBuffer;
3403
3402
  uvBuffer;
3404
3403
  constructor() {
@@ -3425,7 +3424,7 @@ class Cl extends Jt {
3425
3424
  }), this.positionBuffer = e, this.uvBuffer = t;
3426
3425
  }
3427
3426
  }
3428
- var lo = Object.defineProperty, ze = (r, e, t, s) => {
3427
+ var lo = Object.defineProperty, Ne = (r, e, t, s) => {
3429
3428
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
3430
3429
  (a = r[o]) && (i = a(e, t, i) || i);
3431
3430
  return i && lo(e, t, i), i;
@@ -3498,7 +3497,7 @@ class T extends _e {
3498
3497
  }
3499
3498
  }
3500
3499
  _updatePOT() {
3501
- this._isPowerOfTwo = vr(this.realWidth) && vr(this.realHeight), this.requestUpload();
3500
+ this._isPowerOfTwo = gr(this.realWidth) && gr(this.realHeight), this.requestUpload();
3502
3501
  }
3503
3502
  updateSize() {
3504
3503
  const e = this.source;
@@ -3527,25 +3526,25 @@ class T extends _e {
3527
3526
  fi && this.source instanceof ImageBitmap && this.source.close();
3528
3527
  }
3529
3528
  }
3530
- ze([
3531
- c({ internal: !0 })
3529
+ Ne([
3530
+ u({ internal: !0 })
3532
3531
  ], T.prototype, "source");
3533
- ze([
3534
- c({ fallback: 0 })
3532
+ Ne([
3533
+ u({ fallback: 0 })
3535
3534
  ], T.prototype, "width");
3536
- ze([
3537
- c({ fallback: 0 })
3535
+ Ne([
3536
+ u({ fallback: 0 })
3538
3537
  ], T.prototype, "height");
3539
- ze([
3540
- c({ fallback: "linear" })
3538
+ Ne([
3539
+ u({ fallback: "linear" })
3541
3540
  ], T.prototype, "filterMode");
3542
- ze([
3543
- c({ fallback: "clamp_to_edge" })
3541
+ Ne([
3542
+ u({ fallback: "clamp_to_edge" })
3544
3543
  ], T.prototype, "wrapMode");
3545
- ze([
3546
- c({ fallback: 1 })
3544
+ Ne([
3545
+ u({ fallback: 1 })
3547
3546
  ], T.prototype, "pixelRatio");
3548
- class Vt extends _e {
3547
+ class $t extends _e {
3549
3548
  frames;
3550
3549
  frameIndex = 0;
3551
3550
  get currentFrame() {
@@ -3576,7 +3575,7 @@ var ho = Object.defineProperty, co = (r, e, t, s) => {
3576
3575
  (a = r[o]) && (i = a(e, t, i) || i);
3577
3576
  return i && ho(e, t, i), i;
3578
3577
  };
3579
- class Qt extends T {
3578
+ class Jt extends T {
3580
3579
  constructor(e = document.createElement("canvas")) {
3581
3580
  super(e);
3582
3581
  }
@@ -3593,8 +3592,8 @@ class Qt extends T {
3593
3592
  }
3594
3593
  }
3595
3594
  co([
3596
- c({ fallback: 2 })
3597
- ], Qt.prototype, "pixelRatio");
3595
+ u({ fallback: 2 })
3596
+ ], Jt.prototype, "pixelRatio");
3598
3597
  class Al extends T {
3599
3598
  static _cached = /* @__PURE__ */ new Map();
3600
3599
  static get(e) {
@@ -3626,7 +3625,7 @@ class kt extends T {
3626
3625
  const o = i.getContext("2d");
3627
3626
  if (!o)
3628
3627
  throw new Error("Failed to parse linear gradient, get canvas context is null.");
3629
- const { angle: a = 0, stops: n } = e, h = t, l = s, u = h / 2, d = l / 2, f = (a + 90) * Math.PI / 180, _ = Math.sin(f), p = -Math.cos(f), m = Math.abs(h * Math.sin(f)) + Math.abs(l * Math.cos(f)), g = u - _ * (m / 2), w = d - p * (m / 2), P = u + _ * (m / 2), R = d + p * (m / 2), A = o.createLinearGradient(g, w, P, R);
3628
+ const { angle: a = 0, stops: n } = e, h = t, l = s, c = h / 2, d = l / 2, f = (a + 90) * Math.PI / 180, _ = Math.sin(f), p = -Math.cos(f), m = Math.abs(h * Math.sin(f)) + Math.abs(l * Math.cos(f)), v = c - _ * (m / 2), y = d - p * (m / 2), P = c + _ * (m / 2), R = d + p * (m / 2), A = o.createLinearGradient(v, y, P, R);
3630
3629
  for (const G of n) A.addColorStop(G.offset, G.color);
3631
3630
  o.fillStyle = A, o.fillRect(0, 0, h, l);
3632
3631
  const L = o.getImageData(0, 0, i.width, i.height);
@@ -3645,7 +3644,7 @@ class kt extends T {
3645
3644
  function uo(r) {
3646
3645
  return {
3647
3646
  autoLoad: !!(r?.autoLoad ?? !0),
3648
- useBitmap: !!(r?.useBitmap ?? !0) && $r,
3647
+ useBitmap: !!(r?.useBitmap ?? !0) && Fr,
3649
3648
  crossorigin: r?.crossorigin ?? null
3650
3649
  };
3651
3650
  }
@@ -3677,7 +3676,7 @@ class Rl extends T {
3677
3676
  genBitmap() {
3678
3677
  if (this._loadBitmap)
3679
3678
  return this._loadBitmap;
3680
- if (this.bitmap || !$r)
3679
+ if (this.bitmap || !Fr)
3681
3680
  return Promise.resolve(this);
3682
3681
  const e = this.source, t = !e.crossOrigin || e.crossOrigin === "anonymous";
3683
3682
  return this._loadBitmap = fetch(e.src, {
@@ -3707,7 +3706,7 @@ class Rl extends T {
3707
3706
  return this.preserveBitmap && this.bitmap && (this.bitmap.close(), this.bitmap = void 0), t;
3708
3707
  }
3709
3708
  }
3710
- class ts extends T {
3709
+ class es extends T {
3711
3710
  constructor(e, t = 1, s = 1) {
3712
3711
  const i = {
3713
3712
  width: t,
@@ -3731,7 +3730,7 @@ class ts extends T {
3731
3730
  super._updateProperty(e, t, s);
3732
3731
  }
3733
3732
  }
3734
- var fo = Object.defineProperty, rs = (r, e, t, s) => {
3733
+ var fo = Object.defineProperty, ts = (r, e, t, s) => {
3735
3734
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
3736
3735
  (a = r[o]) && (i = a(e, t, i) || i);
3737
3736
  return i && fo(e, t, i), i;
@@ -3747,7 +3746,7 @@ function po(r) {
3747
3746
  playsinline: !!(r?.playsinline ?? !0)
3748
3747
  };
3749
3748
  }
3750
- const er = class ss extends T {
3749
+ const Qt = class rs extends T {
3751
3750
  static mimeTypes = new Map(Object.entries({
3752
3751
  ogv: "video/ogg",
3753
3752
  mov: "video/quicktime",
@@ -3790,8 +3789,8 @@ const er = class ss extends T {
3790
3789
  if (n = n || e[a], n.startsWith("data:"))
3791
3790
  h = n.slice(5, n.indexOf(";"));
3792
3791
  else if (!n.startsWith("blob:")) {
3793
- const u = n.split("?").shift().toLowerCase(), d = u.slice(u.lastIndexOf(".") + 1);
3794
- h = h || ss.mimeTypes.get(d) || `video/${d}`;
3792
+ const c = n.split("?").shift().toLowerCase(), d = c.slice(c.lastIndexOf(".") + 1);
3793
+ h = h || rs.mimeTypes.get(d) || `video/${d}`;
3795
3794
  }
3796
3795
  const l = document.createElement("source");
3797
3796
  l.src = n, h && (l.type = h), o.appendChild(l);
@@ -3830,15 +3829,15 @@ const er = class ss extends T {
3830
3829
  this.autoUpdate && !this.isPlaying && (this._nextTime = 0, this.requestUpload(), this._nextTime = 0);
3831
3830
  };
3832
3831
  _setupAutoUpdate() {
3833
- this.autoUpdate && this.isPlaying ? !this.fps && this.source.requestVideoFrameCallback ? (this._connected && (k.off(this.requestUpload), this._connected = !1, this._nextTime = 0), this._requestId === void 0 && (this._requestId = this.source.requestVideoFrameCallback(
3832
+ this.autoUpdate && this.isPlaying ? !this.fps && this.source.requestVideoFrameCallback ? (this._connected && (U.off(this.requestUpload), this._connected = !1, this._nextTime = 0), this._requestId === void 0 && (this._requestId = this.source.requestVideoFrameCallback(
3834
3833
  this._videoFrameRequestCallback
3835
- ))) : (this._requestId !== void 0 && (this.source.cancelVideoFrameCallback(this._requestId), this._requestId = void 0), this._connected || (k.on(this.requestUpload), this._connected = !0, this._nextTime = 0)) : (this._requestId !== void 0 && (this.source.cancelVideoFrameCallback(this._requestId), this._requestId = void 0), this._connected && (k.off(this.requestUpload), this._connected = !1, this._nextTime = 0));
3834
+ ))) : (this._requestId !== void 0 && (this.source.cancelVideoFrameCallback(this._requestId), this._requestId = void 0), this._connected || (U.on(this.requestUpload), this._connected = !0, this._nextTime = 0)) : (this._requestId !== void 0 && (this.source.cancelVideoFrameCallback(this._requestId), this._requestId = void 0), this._connected && (U.off(this.requestUpload), this._connected = !1, this._nextTime = 0));
3836
3835
  }
3837
3836
  _videoFrameRequestCallback = () => {
3838
3837
  this.requestUpload(), this._requestId = this.source.requestVideoFrameCallback(this._videoFrameRequestCallback);
3839
3838
  };
3840
3839
  requestUpload = () => {
3841
- const e = Math.floor(k.elapsed * this.source.playbackRate);
3840
+ const e = Math.floor(U.elapsed * this.source.playbackRate);
3842
3841
  this._nextTime -= e, (!this._spf || this._nextTime <= 0) && (super.requestUpload(), this._nextTime = this._spf || 0);
3843
3842
  };
3844
3843
  async load() {
@@ -3856,14 +3855,14 @@ const er = class ss extends T {
3856
3855
  e && (e.removeEventListener("play", this._onPlayStart), e.removeEventListener("pause", this._onPlayStop), e.removeEventListener("seeked", this._onSeeked), e.removeEventListener("canplay", this._onCanPlay), e.removeEventListener("canplaythrough", this._onCanPlay), e.removeEventListener("error", this._onError, !0), e.pause(), e.src = "", e.load());
3857
3856
  }
3858
3857
  };
3859
- rs([
3860
- c({ internal: !0, fallback: !0 })
3861
- ], er.prototype, "autoUpdate");
3862
- rs([
3863
- c({ internal: !0, fallback: 0 })
3864
- ], er.prototype, "fps");
3865
- let _o = er;
3866
- class wr extends ts {
3858
+ ts([
3859
+ u({ internal: !0, fallback: !0 })
3860
+ ], Qt.prototype, "autoUpdate");
3861
+ ts([
3862
+ u({ internal: !0, fallback: 0 })
3863
+ ], Qt.prototype, "fps");
3864
+ let _o = Qt;
3865
+ class xr extends es {
3867
3866
  //
3868
3867
  }
3869
3868
  class mo extends bt {
@@ -3895,7 +3894,7 @@ class mo extends bt {
3895
3894
  t = this.style.stroke;
3896
3895
  break;
3897
3896
  case "object":
3898
- mr(this.style.stroke) && (t = this.style.stroke.color);
3897
+ _r(this.style.stroke) && (t = this.style.stroke.color);
3899
3898
  break;
3900
3899
  }
3901
3900
  this._draws.push({
@@ -3930,7 +3929,7 @@ class mo extends bt {
3930
3929
  t = this.style.fill;
3931
3930
  break;
3932
3931
  case "object":
3933
- mr(this.style.fill) && (t = this.style.fill.color);
3932
+ _r(this.style.fill) && (t = this.style.fill.color);
3934
3933
  break;
3935
3934
  }
3936
3935
  this._draws.push({
@@ -3955,9 +3954,9 @@ class mo extends bt {
3955
3954
  if (i) {
3956
3955
  const a = i.width, n = i.height;
3957
3956
  for (let h = t.length, l = e; l < h; l += 2) {
3958
- const u = t[l], d = t[l + 1];
3957
+ const c = t[l], d = t[l + 1];
3959
3958
  let f, _;
3960
- o ? [f, _] = o.apply({ x: u, y: d }).toArray() : [f, _] = [u / a, d / n], s.push(f, _);
3959
+ o ? [f, _] = o.apply({ x: c, y: d }).toArray() : [f, _] = [c / a, d / n], s.push(f, _);
3961
3960
  }
3962
3961
  } else
3963
3962
  for (let a = t.length, n = e; n < a; n += 2)
@@ -3975,7 +3974,7 @@ class mo extends bt {
3975
3974
  indices: a,
3976
3975
  lineStyle: i.lineStyle,
3977
3976
  flipAlignment: !1,
3978
- closed: !0
3977
+ closed: !1
3979
3978
  }), i.texture && this.buildUvs(0, o, n, i.texture, i.uvTransform), e.push({
3980
3979
  vertices: new Float32Array(o),
3981
3980
  indices: new Float32Array(a),
@@ -4065,10 +4064,10 @@ var bo = Object.defineProperty, yo = Object.getOwnPropertyDescriptor, ne = (r, e
4065
4064
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4066
4065
  return s && i && bo(e, t, i), i;
4067
4066
  };
4068
- const Pr = {};
4067
+ const wr = {};
4069
4068
  function xo(r) {
4070
- let e = Pr[r] ?? 0;
4071
- return e++, Pr[r] = e, e;
4069
+ let e = wr[r] ?? 0;
4070
+ return e++, wr[r] = e, e;
4072
4071
  }
4073
4072
  let M = class extends pe {
4074
4073
  _meta = new vo(this);
@@ -4418,7 +4417,7 @@ let M = class extends pe {
4418
4417
  );
4419
4418
  }
4420
4419
  toJSON() {
4421
- return zr({
4420
+ return Br({
4422
4421
  ...super.toJSON(),
4423
4422
  children: this.children.length ? [...this.children.map((r) => r.toJSON())] : void 0,
4424
4423
  meta: {
@@ -4430,38 +4429,38 @@ let M = class extends pe {
4430
4429
  static parse(r) {
4431
4430
  if (Array.isArray(r))
4432
4431
  return r.map((n) => this.parse(n));
4433
- const { meta: e = {}, children: t, ...s } = r, { inCanvasIs: i = "Node" } = e, o = Ht.get(i) ?? M, a = new o({ ...s, meta: e });
4432
+ const { meta: e = {}, children: t, ...s } = r, { inCanvasIs: i = "Node" } = e, o = Xt.get(i) ?? M, a = new o({ ...s, meta: e });
4434
4433
  return t?.forEach((n) => a.appendChild(this.parse(n))), a;
4435
4434
  }
4436
4435
  };
4437
4436
  ne([
4438
- c({ fallback: Nr() })
4437
+ u({ fallback: zr() })
4439
4438
  ], M.prototype, "id", 2);
4440
4439
  ne([
4441
- c({ fallback: Nr() })
4440
+ u({ fallback: zr() })
4442
4441
  ], M.prototype, "name", 2);
4443
4442
  ne([
4444
- c({ internal: !0, fallback: "inherit" })
4443
+ u({ internal: !0, fallback: "inherit" })
4445
4444
  ], M.prototype, "processMode", 2);
4446
4445
  ne([
4447
- c({ internal: !0, fallback: "default" })
4446
+ u({ internal: !0, fallback: "default" })
4448
4447
  ], M.prototype, "processSortMode", 2);
4449
4448
  ne([
4450
- c({ internal: !0, fallback: "inherit" })
4449
+ u({ internal: !0, fallback: "inherit" })
4451
4450
  ], M.prototype, "renderMode", 2);
4452
4451
  ne([
4453
- c({ internal: !0, fallback: "inherit" })
4452
+ u({ internal: !0, fallback: "inherit" })
4454
4453
  ], M.prototype, "inputMode", 2);
4455
4454
  ne([
4456
- c({ internal: !0, fallback: "default" })
4455
+ u({ internal: !0, fallback: "default" })
4457
4456
  ], M.prototype, "internalMode", 2);
4458
4457
  ne([
4459
- c({ internal: !0 })
4458
+ u({ internal: !0 })
4460
4459
  ], M.prototype, "mask", 2);
4461
4460
  M = ne([
4462
- v("Node")
4461
+ g("Node")
4463
4462
  ], M);
4464
- var wo = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, Ne = (r, e, t, s) => {
4463
+ var wo = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, Le = (r, e, t, s) => {
4465
4464
  for (var i = s > 1 ? void 0 : s ? Po(e, t) : e, o = r.length - 1, a; o >= 0; o--)
4466
4465
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4467
4466
  return s && i && wo(e, t, i), i;
@@ -4513,30 +4512,30 @@ let W = class extends M {
4513
4512
  super._process(r), this._updateCurrentTime();
4514
4513
  }
4515
4514
  };
4516
- Ne([
4517
- c({ fallback: !1 })
4515
+ Le([
4516
+ u({ fallback: !1 })
4518
4517
  ], W.prototype, "loop", 2);
4519
- Ne([
4520
- c({ fallback: 0 })
4518
+ Le([
4519
+ u({ fallback: 0 })
4521
4520
  ], W.prototype, "delay", 2);
4522
- Ne([
4523
- c({ fallback: 0 })
4521
+ Le([
4522
+ u({ fallback: 0 })
4524
4523
  ], W.prototype, "duration", 2);
4525
- Ne([
4526
- c({ fallback: !1 })
4524
+ Le([
4525
+ u({ fallback: !1 })
4527
4526
  ], W.prototype, "paused", 2);
4528
- Ne([
4529
- c({ internal: !0, fallback: !1 })
4527
+ Le([
4528
+ u({ internal: !0, fallback: !1 })
4530
4529
  ], W.prototype, "insideTimeRange", 2);
4531
- W = Ne([
4532
- v("TimelineNode")
4530
+ W = Le([
4531
+ g("TimelineNode")
4533
4532
  ], W);
4534
4533
  var To = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, lt = (r, e, t, s) => {
4535
4534
  for (var i = s > 1 ? void 0 : s ? Eo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
4536
4535
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4537
4536
  return s && i && To(e, t, i), i;
4538
4537
  };
4539
- let we = class extends W {
4538
+ let Pe = class extends W {
4540
4539
  _parentGlobalVisible;
4541
4540
  _globalVisible;
4542
4541
  get globalVisible() {
@@ -4647,21 +4646,21 @@ let we = class extends W {
4647
4646
  }
4648
4647
  };
4649
4648
  lt([
4650
- c()
4651
- ], we.prototype, "modulate", 2);
4649
+ u()
4650
+ ], Pe.prototype, "modulate", 2);
4652
4651
  lt([
4653
- c()
4654
- ], we.prototype, "blendMode", 2);
4652
+ u()
4653
+ ], Pe.prototype, "blendMode", 2);
4655
4654
  lt([
4656
- c({ internal: !0, fallback: !0 })
4657
- ], we.prototype, "visible", 2);
4655
+ u({ internal: !0, fallback: !0 })
4656
+ ], Pe.prototype, "visible", 2);
4658
4657
  lt([
4659
- c({ internal: !0, fallback: 1 })
4660
- ], we.prototype, "opacity", 2);
4661
- we = lt([
4662
- v("CanvasItem")
4663
- ], we);
4664
- var So = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, Le = (r, e, t, s) => {
4658
+ u({ internal: !0, fallback: 1 })
4659
+ ], Pe.prototype, "opacity", 2);
4660
+ Pe = lt([
4661
+ g("CanvasItem")
4662
+ ], Pe);
4663
+ var So = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, Fe = (r, e, t, s) => {
4665
4664
  for (var i = s > 1 ? void 0 : s ? Co(e, t) : e, o = r.length - 1, a; o >= 0; o--)
4666
4665
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4667
4666
  return s && i && So(e, t, i), i;
@@ -4674,8 +4673,8 @@ let j = class extends M {
4674
4673
  canvasTransform = new O();
4675
4674
  _framebufferIndex = 0;
4676
4675
  _framebuffers = [
4677
- { texture: new wr(), needsUpload: !1 },
4678
- { texture: new wr(), needsUpload: !1 }
4676
+ { texture: new xr(), needsUpload: !1 },
4677
+ { texture: new xr(), needsUpload: !1 }
4679
4678
  ];
4680
4679
  get valid() {
4681
4680
  return !!(this.width && this.height);
@@ -4739,9 +4738,12 @@ let j = class extends M {
4739
4738
  activate(r) {
4740
4739
  return this.valid ? (r.flush(), this._tree?.setCurrentViewport(this), this.upload(r), r.framebuffer.bind(this._glFramebuffer(r)), !0) : !1;
4741
4740
  }
4741
+ flush(r) {
4742
+ r.flush();
4743
+ }
4742
4744
  redraw(r, e) {
4743
4745
  if (this.valid) {
4744
- r.flush();
4746
+ this.flush(r);
4745
4747
  const t = this.framebuffer.texture;
4746
4748
  return this._framebufferIndex = (this._framebufferIndex + 1) % this._framebuffers.length, this.activate(r), r.clear(), t.activate(r, 0), e(), !0;
4747
4749
  }
@@ -4757,7 +4759,7 @@ let j = class extends M {
4757
4759
  r.program.uniforms.projectionMatrix = this.projection.toArray(!0), r.program.uniforms.viewMatrix = this.canvasTransform.toArray(!0), this.activate(r), r.clear(), super.render(r, e), r.flush(), t ? t.activate(r) : (r.framebuffer.bind(null), this._tree?.setCurrentViewport(void 0));
4758
4760
  }
4759
4761
  getRect() {
4760
- return new be(this.x, this.y, this.width, this.height);
4762
+ return new ye(this.x, this.y, this.width, this.height);
4761
4763
  }
4762
4764
  toCanvasGlobal(r, e) {
4763
4765
  return this.canvasTransform.applyAffineInverse(r, e);
@@ -4766,30 +4768,30 @@ let j = class extends M {
4766
4768
  return this.canvasTransform.apply(r, e);
4767
4769
  }
4768
4770
  };
4769
- Le([
4770
- c({ fallback: 0 })
4771
+ Fe([
4772
+ u({ fallback: 0 })
4771
4773
  ], j.prototype, "x", 2);
4772
- Le([
4773
- c({ fallback: 0 })
4774
+ Fe([
4775
+ u({ fallback: 0 })
4774
4776
  ], j.prototype, "y", 2);
4775
- Le([
4776
- c({ fallback: 0 })
4777
+ Fe([
4778
+ u({ fallback: 0 })
4777
4779
  ], j.prototype, "width", 2);
4778
- Le([
4779
- c({ fallback: 0 })
4780
+ Fe([
4781
+ u({ fallback: 0 })
4780
4782
  ], j.prototype, "height", 2);
4781
- Le([
4782
- c({ internal: !0, fallback: !1 })
4783
+ Fe([
4784
+ u({ internal: !0, fallback: !1 })
4783
4785
  ], j.prototype, "msaa", 2);
4784
- j = Le([
4785
- v("Viewport")
4786
+ j = Fe([
4787
+ g("Viewport")
4786
4788
  ], j);
4787
4789
  var Ao = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, ht = (r, e, t, s) => {
4788
4790
  for (var i = s > 1 ? void 0 : s ? Ro(e, t) : e, o = r.length - 1, a; o >= 0; o--)
4789
4791
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4790
4792
  return s && i && Ao(e, t, i), i;
4791
4793
  };
4792
- let y = class extends W {
4794
+ let x = class extends W {
4793
4795
  material;
4794
4796
  get _effectMode() {
4795
4797
  return this.effectMode ?? "parent";
@@ -4949,20 +4951,20 @@ let y = class extends W {
4949
4951
  }
4950
4952
  };
4951
4953
  ht([
4952
- c({ internal: !0 })
4953
- ], y.prototype, "material", 2);
4954
+ u({ internal: !0 })
4955
+ ], x.prototype, "material", 2);
4954
4956
  ht([
4955
- c()
4956
- ], y.prototype, "effectMode", 2);
4957
+ u()
4958
+ ], x.prototype, "effectMode", 2);
4957
4959
  ht([
4958
- c()
4959
- ], y.prototype, "glsl", 2);
4960
+ u()
4961
+ ], x.prototype, "glsl", 2);
4960
4962
  ht([
4961
- c()
4962
- ], y.prototype, "glslSrc", 2);
4963
- y = ht([
4964
- v("Effect")
4965
- ], y);
4963
+ u()
4964
+ ], x.prototype, "glslSrc", 2);
4965
+ x = ht([
4966
+ g("Effect")
4967
+ ], x);
4966
4968
  class Oo {
4967
4969
  currentCall;
4968
4970
  calls = [];
@@ -4986,7 +4988,7 @@ class Oo {
4986
4988
  }), this.calls = [];
4987
4989
  }
4988
4990
  }
4989
- var Mo = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, Fe = (r, e, t, s) => {
4991
+ var Mo = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, $e = (r, e, t, s) => {
4990
4992
  for (var i = s > 1 ? void 0 : s ? ko(e, t) : e, o = r.length - 1, a; o >= 0; o--)
4991
4993
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
4992
4994
  return s && i && Mo(e, t, i), i;
@@ -5022,43 +5024,51 @@ let oe = class extends M {
5022
5024
  super._process(r), this.paused || this.addTime(r);
5023
5025
  }
5024
5026
  };
5025
- Fe([
5026
- c({ fallback: 0 })
5027
+ $e([
5028
+ u({ fallback: 0 })
5027
5029
  ], oe.prototype, "startTime", 2);
5028
- Fe([
5029
- c({ fallback: 0 })
5030
+ $e([
5031
+ u({ fallback: 0 })
5030
5032
  ], oe.prototype, "currentTime", 2);
5031
- Fe([
5032
- c({ fallback: Number.MAX_SAFE_INTEGER })
5033
+ $e([
5034
+ u({ fallback: Number.MAX_SAFE_INTEGER })
5033
5035
  ], oe.prototype, "endTime", 2);
5034
- Fe([
5035
- c({ fallback: !1 })
5036
+ $e([
5037
+ u({ fallback: !1 })
5036
5038
  ], oe.prototype, "loop", 2);
5037
- Fe([
5038
- c({ fallback: !1 })
5039
+ $e([
5040
+ u({ fallback: !1 })
5039
5041
  ], oe.prototype, "paused", 2);
5040
- oe = Fe([
5041
- v("Timeline")
5042
+ oe = $e([
5043
+ g("Timeline")
5042
5044
  ], oe);
5043
- var Uo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, is = (r, e, t, s) => {
5045
+ var Uo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, ss = (r, e, t, s) => {
5044
5046
  for (var i = s > 1 ? void 0 : s ? Do(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5045
5047
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5046
5048
  return s && i && Uo(e, t, i), i;
5047
5049
  };
5048
5050
  let wt = class extends j {
5051
+ finish(r) {
5052
+ r.framebuffer.finishRenderPass(
5053
+ this._glFramebuffer(r)
5054
+ );
5055
+ }
5056
+ flush(r) {
5057
+ this.finish(r), super.flush(r);
5058
+ }
5049
5059
  };
5050
- is([
5051
- c({ fallback: !1 })
5060
+ ss([
5061
+ u({ fallback: !1 })
5052
5062
  ], wt.prototype, "msaa", 2);
5053
- wt = is([
5054
- v("Window")
5063
+ wt = ss([
5064
+ g("Window")
5055
5065
  ], wt);
5056
- var Io = Object.defineProperty, $e = (r, e, t, s) => {
5066
+ var Io = Object.defineProperty, Re = (r, e, t, s) => {
5057
5067
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
5058
5068
  (a = r[o]) && (i = a(e, t, i) || i);
5059
5069
  return i && Io(e, t, i), i;
5060
5070
  };
5061
- class Ae extends Kt {
5071
+ class me extends Yt {
5062
5072
  input = new Oi();
5063
5073
  renderStack = new Oo();
5064
5074
  root = new wt(!0).setTree(this);
@@ -5093,9 +5103,7 @@ class Ae extends Kt {
5093
5103
  this.emit("rendering"), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5094
5104
  }
5095
5105
  _renderScreen(e) {
5096
- this.root.msaa && e.framebuffer.finishRenderPass(
5097
- this.root._glFramebuffer(e)
5098
- ), e.state.reset(), e.framebuffer.bind(null), e.gl.bindFramebuffer(e.gl.FRAMEBUFFER, null), e.viewport.bind({
5106
+ this.root.finish(e), e.state.reset(), e.framebuffer.bind(null), e.gl.bindFramebuffer(e.gl.FRAMEBUFFER, null), e.viewport.bind({
5099
5107
  x: 0,
5100
5108
  y: 0,
5101
5109
  width: this.root.width * e.pixelRatio,
@@ -5108,47 +5116,50 @@ class Ae extends Kt {
5108
5116
  this.root.destroy(), this.input.destroy(), super.destroy();
5109
5117
  }
5110
5118
  }
5111
- $e([
5112
- c({ fallback: !0 })
5113
- ], Ae.prototype, "pixelate");
5114
- $e([
5115
- c()
5116
- ], Ae.prototype, "backgroundColor");
5117
- $e([
5118
- c({ internal: !0, fallback: !1 })
5119
- ], Ae.prototype, "debug");
5120
- $e([
5121
- c({ internal: !0, fallback: !1 })
5122
- ], Ae.prototype, "processPaused");
5123
- $e([
5124
- c({ internal: !0, default: () => Js })
5125
- ], Ae.prototype, "fonts");
5126
- $e([
5127
- c({ internal: !0, default: () => new oe() })
5128
- ], Ae.prototype, "timeline");
5119
+ Re([
5120
+ u({ alias: "root.msaa" })
5121
+ ], me.prototype, "msaa");
5122
+ Re([
5123
+ u({ fallback: !1 })
5124
+ ], me.prototype, "pixelate");
5125
+ Re([
5126
+ u()
5127
+ ], me.prototype, "backgroundColor");
5128
+ Re([
5129
+ u({ internal: !0, fallback: !1 })
5130
+ ], me.prototype, "debug");
5131
+ Re([
5132
+ u({ internal: !0, fallback: !1 })
5133
+ ], me.prototype, "processPaused");
5134
+ Re([
5135
+ u({ internal: !0, default: () => Js })
5136
+ ], me.prototype, "fonts");
5137
+ Re([
5138
+ u({ internal: !0, default: () => new oe() })
5139
+ ], me.prototype, "timeline");
5129
5140
  var Bo = Object.getOwnPropertyDescriptor, zo = (r, e, t, s) => {
5130
5141
  for (var i = s > 1 ? void 0 : s ? Bo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5131
5142
  (a = r[o]) && (i = a(i) || i);
5132
5143
  return i;
5133
5144
  };
5134
- let ke = class extends y {
5145
+ let Ue = class extends x {
5135
5146
  constructor(r, e = []) {
5136
5147
  super(), this.setProperties(r).append(e);
5137
5148
  }
5138
5149
  };
5139
- ke = zo([
5140
- v("Transition", {
5150
+ Ue = zo([
5151
+ g("Transition", {
5141
5152
  effectMode: "transition",
5142
5153
  processMode: "pausable",
5143
5154
  duration: 2e3
5144
5155
  })
5145
- ], ke);
5146
- var No = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, tr = (r, e, t, s) => {
5156
+ ], Ue);
5157
+ var No = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, er = (r, e, t, s) => {
5147
5158
  for (var i = s > 1 ? void 0 : s ? Lo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5148
5159
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5149
5160
  return s && i && No(e, t, i), i;
5150
5161
  };
5151
- let Pe = class extends we {
5162
+ let Te = class extends Pe {
5152
5163
  position = new C().on("update", () => this.updateGlobalTransform());
5153
5164
  scale = new C(1, 1).on("update", () => this.updateGlobalTransform());
5154
5165
  skew = new C().on("update", () => this.updateGlobalTransform());
@@ -5197,9 +5208,9 @@ let Pe = class extends we {
5197
5208
  } else
5198
5209
  [t, s, i, o, a, n] = this.globalTransform.toArray();
5199
5210
  const h = r.slice();
5200
- for (let l = r.length, u = 0; u < l; u += 2) {
5201
- const d = r[u], f = r[u + 1];
5202
- h[u] = t * d + s * f + i, h[u + 1] = o * d + a * f + n;
5211
+ for (let l = r.length, c = 0; c < l; c += 2) {
5212
+ const d = r[c], f = r[c + 1];
5213
+ h[c] = t * d + s * f + i, h[c + 1] = o * d + a * f + n;
5203
5214
  }
5204
5215
  return h;
5205
5216
  }
@@ -5221,21 +5232,21 @@ let Pe = class extends we {
5221
5232
  return this.globalTransform.apply(r, e);
5222
5233
  }
5223
5234
  };
5224
- tr([
5225
- c({ internal: !0, fallback: 0 })
5226
- ], Pe.prototype, "rotation", 2);
5227
- tr([
5228
- c({ internal: !0, fallback: 0 })
5229
- ], Pe.prototype, "globalRotation", 2);
5230
- Pe = tr([
5231
- v("Node2D")
5232
- ], Pe);
5233
- var Fo = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, rr = (r, e, t, s) => {
5235
+ er([
5236
+ u({ internal: !0, fallback: 0 })
5237
+ ], Te.prototype, "rotation", 2);
5238
+ er([
5239
+ u({ internal: !0, fallback: 0 })
5240
+ ], Te.prototype, "globalRotation", 2);
5241
+ Te = er([
5242
+ g("Node2D")
5243
+ ], Te);
5244
+ var Fo = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, tr = (r, e, t, s) => {
5234
5245
  for (var i = s > 1 ? void 0 : s ? $o(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5235
5246
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5236
5247
  return s && i && Fo(e, t, i), i;
5237
5248
  };
5238
- let Pt = class extends Pe {
5249
+ let Pt = class extends Te {
5239
5250
  canvasTransform = new O();
5240
5251
  _screenOffset = { x: 0, y: 0 };
5241
5252
  _zoom = new C(1, 1).on("update", () => this.updateTransform());
@@ -5299,8 +5310,8 @@ let Pt = class extends Pe {
5299
5310
  } else if (e === "pointermove") {
5300
5311
  const t = r;
5301
5312
  this.grabbing && (this.position.add(
5302
- this._screenOffset.x - t.screenX,
5303
- this._screenOffset.y - t.screenY
5313
+ Math.round(this._screenOffset.x - t.screenX),
5314
+ Math.round(this._screenOffset.y - t.screenY)
5304
5315
  ), this._screenOffset = { x: t.screenX, y: t.screenY });
5305
5316
  } else if (e === "pointerup") {
5306
5317
  const t = r;
@@ -5314,15 +5325,18 @@ let Pt = class extends Pe {
5314
5325
  this.zoomWithWheel(i);
5315
5326
  const o = this.toScreen(t);
5316
5327
  this.position.add(
5317
- o.x - e.x,
5318
- o.y - e.y
5328
+ Math.round(o.x - e.x),
5329
+ Math.round(o.y - e.y)
5319
5330
  );
5320
5331
  } else
5321
- r.preventDefault(), this.position.add(r.deltaX, r.deltaY);
5332
+ r.preventDefault(), this.position.add(
5333
+ Math.round(r.deltaX),
5334
+ Math.round(r.deltaY)
5335
+ );
5322
5336
  }
5323
5337
  zoomWithWheel(r) {
5324
- const t = Math.log(this._zoom.x) + r;
5325
- this.setZoom(Math.exp(t));
5338
+ const t = Math.log(this._zoom.x) + r, s = Math.exp(t);
5339
+ this.setZoom(Math.round(s * 1e4) / 1e4);
5326
5340
  }
5327
5341
  updateTransform() {
5328
5342
  super.updateTransform(), this.updateCanvasTransform();
@@ -5345,19 +5359,19 @@ let Pt = class extends Pe {
5345
5359
  };
5346
5360
  }
5347
5361
  };
5348
- rr([
5349
- c({ internal: !0, fallback: !1 })
5362
+ tr([
5363
+ u({ internal: !0, fallback: !1 })
5350
5364
  ], Pt.prototype, "spaceKey", 2);
5351
- rr([
5352
- c({ internal: !0, fallback: !1 })
5365
+ tr([
5366
+ u({ internal: !0, fallback: !1 })
5353
5367
  ], Pt.prototype, "grabbing", 2);
5354
- Pt = rr([
5355
- v("Camera2D", {
5368
+ Pt = tr([
5369
+ g("Camera2D", {
5356
5370
  processMode: "disabled",
5357
5371
  renderMode: "disabled"
5358
5372
  })
5359
5373
  ], Pt);
5360
- const Tr = {
5374
+ const Pr = {
5361
5375
  brightness: 1,
5362
5376
  contrast: 1,
5363
5377
  grayscale: 0,
@@ -5368,12 +5382,12 @@ const Tr = {
5368
5382
  sepia: 0
5369
5383
  };
5370
5384
  function Ol(r) {
5371
- const e = new Yr();
5385
+ const e = new Hr();
5372
5386
  if (r === "none")
5373
5387
  return e;
5374
5388
  const t = Rt(r).reduce((s, { name: i, args: o }) => (s[i] = o[0].normalizedIntValue, s), {});
5375
- Object.keys(Tr).forEach((s) => {
5376
- t[s] = t[s] ?? Tr[s];
5389
+ Object.keys(Pr).forEach((s) => {
5390
+ t[s] = t[s] ?? Pr[s];
5377
5391
  });
5378
5392
  for (const s in t) {
5379
5393
  const i = t[s];
@@ -5493,12 +5507,12 @@ function Go(r) {
5493
5507
  }
5494
5508
  });
5495
5509
  }
5496
- var os = Object.defineProperty, Wo = Object.getOwnPropertyDescriptor, jo = (r, e, t) => e in r ? os(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, le = (r, e, t, s) => {
5510
+ var is = Object.defineProperty, Wo = Object.getOwnPropertyDescriptor, jo = (r, e, t) => e in r ? is(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, le = (r, e, t, s) => {
5497
5511
  for (var i = s > 1 ? void 0 : s ? Wo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5498
5512
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5499
- return s && i && os(e, t, i), i;
5513
+ return s && i && is(e, t, i), i;
5500
5514
  }, qo = (r, e, t) => jo(r, e + "", t);
5501
- let V = class extends y {
5515
+ let V = class extends x {
5502
5516
  constructor(r, e = []) {
5503
5517
  super(), this.setProperties(r).append(e);
5504
5518
  }
@@ -5518,7 +5532,7 @@ let V = class extends y {
5518
5532
  });
5519
5533
  }
5520
5534
  };
5521
- qo(V, "material", new x({
5535
+ qo(V, "material", new w({
5522
5536
  vert: `precision mediump float;
5523
5537
  attribute vec2 position;
5524
5538
  attribute vec2 uv;
@@ -5554,39 +5568,39 @@ void main(void) {
5554
5568
  }`
5555
5569
  }));
5556
5570
  le([
5557
- c({ fallback: 1 })
5571
+ u({ fallback: 1 })
5558
5572
  ], V.prototype, "saturation", 2);
5559
5573
  le([
5560
- c({ fallback: 1 })
5574
+ u({ fallback: 1 })
5561
5575
  ], V.prototype, "contrast", 2);
5562
5576
  le([
5563
- c({ fallback: 1 })
5577
+ u({ fallback: 1 })
5564
5578
  ], V.prototype, "brightness", 2);
5565
5579
  le([
5566
- c({ fallback: 1 })
5580
+ u({ fallback: 1 })
5567
5581
  ], V.prototype, "red", 2);
5568
5582
  le([
5569
- c({ fallback: 1 })
5583
+ u({ fallback: 1 })
5570
5584
  ], V.prototype, "green", 2);
5571
5585
  le([
5572
- c({ fallback: 1 })
5586
+ u({ fallback: 1 })
5573
5587
  ], V.prototype, "blue", 2);
5574
5588
  le([
5575
- c({ fallback: 1 })
5589
+ u({ fallback: 1 })
5576
5590
  ], V.prototype, "alpha", 2);
5577
5591
  le([
5578
- c({ fallback: 1 })
5592
+ u({ fallback: 1 })
5579
5593
  ], V.prototype, "gamma", 2);
5580
5594
  V = le([
5581
- v("ColorAdjustEffect")
5595
+ g("ColorAdjustEffect")
5582
5596
  ], V);
5583
- var as = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, Ho = (r, e, t) => e in r ? as(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ns = (r, e, t, s) => {
5597
+ var os = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, Ho = (r, e, t) => e in r ? os(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, as = (r, e, t, s) => {
5584
5598
  for (var i = s > 1 ? void 0 : s ? Xo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5585
5599
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5586
- return s && i && as(e, t, i), i;
5600
+ return s && i && os(e, t, i), i;
5587
5601
  }, Yo = (r, e, t) => Ho(r, e + "", t);
5588
- let Je = class extends y {
5589
- _colorMatrix = new Yr();
5602
+ let Je = class extends x {
5603
+ _colorMatrix = new Hr();
5590
5604
  constructor(r, e = []) {
5591
5605
  super(), this.setProperties(r).append(e);
5592
5606
  }
@@ -5631,7 +5645,7 @@ let Je = class extends y {
5631
5645
  });
5632
5646
  }
5633
5647
  };
5634
- Yo(Je, "material", new x({
5648
+ Yo(Je, "material", new w({
5635
5649
  vert: `precision mediump float;
5636
5650
  attribute vec2 position;
5637
5651
  attribute vec2 uv;
@@ -5658,19 +5672,19 @@ void main(void) {
5658
5672
  );
5659
5673
  }`
5660
5674
  }));
5661
- ns([
5662
- c()
5675
+ as([
5676
+ u()
5663
5677
  ], Je.prototype, "filter", 2);
5664
- Je = ns([
5665
- v("ColorFilterEffect")
5678
+ Je = as([
5679
+ g("ColorFilterEffect")
5666
5680
  ], Je);
5667
- var ls = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, Zo = (r, e, t) => e in r ? ls(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, sr = (r, e, t, s) => {
5681
+ var ns = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, Zo = (r, e, t) => e in r ? ns(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, rr = (r, e, t, s) => {
5668
5682
  for (var i = s > 1 ? void 0 : s ? Ko(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5669
5683
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5670
- return s && i && ls(e, t, i), i;
5684
+ return s && i && ns(e, t, i), i;
5671
5685
  }, Jo = (r, e, t) => Zo(r, e + "", t);
5672
5686
  const Ke = 50;
5673
- let Ue = class extends y {
5687
+ let De = class extends x {
5674
5688
  _color = new J();
5675
5689
  constructor(r, e = []) {
5676
5690
  super(), this.setProperties(r).append(e);
@@ -5684,14 +5698,14 @@ let Ue = class extends y {
5684
5698
  });
5685
5699
  for (; t.length < Ke; )
5686
5700
  t.push([0, 0, 0, 0]);
5687
- b.draw(r, Ue.material, {
5701
+ b.draw(r, De.material, {
5688
5702
  sampler: 0,
5689
5703
  colors: t.slice(0, Ke).flatMap((s) => s)
5690
5704
  });
5691
5705
  });
5692
5706
  }
5693
5707
  };
5694
- Jo(Ue, "material", new x({
5708
+ Jo(De, "material", new w({
5695
5709
  vert: `precision mediump float;
5696
5710
  attribute vec2 position;
5697
5711
  attribute vec2 uv;
@@ -5738,21 +5752,21 @@ void main(void) {
5738
5752
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
5739
5753
  }`
5740
5754
  }));
5741
- sr([
5742
- c({ default: () => [] })
5743
- ], Ue.prototype, "colors", 2);
5744
- sr([
5745
- c({ fallback: 0.5 })
5746
- ], Ue.prototype, "alpha", 2);
5747
- Ue = sr([
5748
- v("ColorOverlayEffect")
5749
- ], Ue);
5750
- var hs = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, ea = (r, e, t) => e in r ? hs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ir = (r, e, t, s) => {
5755
+ rr([
5756
+ u({ default: () => [] })
5757
+ ], De.prototype, "colors", 2);
5758
+ rr([
5759
+ u({ fallback: 0.5 })
5760
+ ], De.prototype, "alpha", 2);
5761
+ De = rr([
5762
+ g("ColorOverlayEffect")
5763
+ ], De);
5764
+ var ls = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, ea = (r, e, t) => e in r ? ls(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, sr = (r, e, t, s) => {
5751
5765
  for (var i = s > 1 ? void 0 : s ? Qo(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5752
5766
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5753
- return s && i && hs(e, t, i), i;
5767
+ return s && i && ls(e, t, i), i;
5754
5768
  }, ta = (r, e, t) => ea(r, e + "", t);
5755
- let De = class extends y {
5769
+ let Ie = class extends x {
5756
5770
  _color = new J();
5757
5771
  constructor(r, e = []) {
5758
5772
  super(), this.setProperties(r).append(e);
@@ -5764,7 +5778,7 @@ let De = class extends y {
5764
5778
  i.slice(0, 50).forEach((o, a) => {
5765
5779
  s[a * 3] = o[0], s[a * 3 + 1] = o[1], s[a * 3 + 2] = o[2];
5766
5780
  }), e.redraw(r, () => {
5767
- b.draw(r, De.material, {
5781
+ b.draw(r, Ie.material, {
5768
5782
  sampler: 0,
5769
5783
  epsilon: this.epsilon,
5770
5784
  originalColors: s
@@ -5772,7 +5786,7 @@ let De = class extends y {
5772
5786
  });
5773
5787
  }
5774
5788
  };
5775
- ta(De, "material", new x({
5789
+ ta(Ie, "material", new w({
5776
5790
  vert: `precision mediump float;
5777
5791
  attribute vec2 position;
5778
5792
  attribute vec2 uv;
@@ -5805,22 +5819,22 @@ void main(void) {
5805
5819
  gl_FragColor = color;
5806
5820
  }`
5807
5821
  }));
5808
- ir([
5809
- c({ default: () => [] })
5810
- ], De.prototype, "colors", 2);
5811
- ir([
5812
- c({ fallback: 0.5 })
5813
- ], De.prototype, "epsilon", 2);
5814
- De = ir([
5815
- v("ColorRemoveEffect")
5816
- ], De);
5817
- var cs = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, sa = (r, e, t) => e in r ? cs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, or = (r, e, t, s) => {
5822
+ sr([
5823
+ u({ default: () => [] })
5824
+ ], Ie.prototype, "colors", 2);
5825
+ sr([
5826
+ u({ fallback: 0.5 })
5827
+ ], Ie.prototype, "epsilon", 2);
5828
+ Ie = sr([
5829
+ g("ColorRemoveEffect")
5830
+ ], Ie);
5831
+ var hs = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, sa = (r, e, t) => e in r ? hs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ir = (r, e, t, s) => {
5818
5832
  for (var i = s > 1 ? void 0 : s ? ra(e, t) : e, o = r.length - 1, a; o >= 0; o--)
5819
5833
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
5820
- return s && i && cs(e, t, i), i;
5834
+ return s && i && hs(e, t, i), i;
5821
5835
  }, ia = (r, e, t) => sa(r, e + "", t);
5822
5836
  const Ye = 50;
5823
- let Ie = class extends y {
5837
+ let Be = class extends x {
5824
5838
  _color = new J();
5825
5839
  constructor(r, e = []) {
5826
5840
  super(), this.setProperties(r).append(e);
@@ -5844,7 +5858,7 @@ let Ie = class extends y {
5844
5858
  t.slice(0, Ye).forEach(([a, n], h) => {
5845
5859
  i[h * 3] = a[0], i[h * 3 + 1] = a[1], i[h * 3 + 2] = a[2], o[h * 3] = n[0], o[h * 3 + 1] = n[1], o[h * 3 + 2] = n[2];
5846
5860
  }), e.redraw(r, () => {
5847
- b.draw(r, Ie.material, {
5861
+ b.draw(r, Be.material, {
5848
5862
  sampler: 0,
5849
5863
  epsilon: s,
5850
5864
  originalColors: i,
@@ -5853,7 +5867,7 @@ let Ie = class extends y {
5853
5867
  });
5854
5868
  }
5855
5869
  };
5856
- ia(Ie, "material", new x({
5870
+ ia(Be, "material", new w({
5857
5871
  vert: `precision mediump float;
5858
5872
  attribute vec2 position;
5859
5873
  attribute vec2 uv;
@@ -5893,16 +5907,18 @@ void main(void) {
5893
5907
  }
5894
5908
  }`
5895
5909
  }));
5896
- or([
5897
- c({ default: () => [] })
5898
- ], Ie.prototype, "colors", 2);
5899
- or([
5900
- c({ fallback: 0.05 })
5901
- ], Ie.prototype, "epsilon", 2);
5902
- Ie = or([
5903
- v("ColorReplaceEffect")
5904
- ], Ie);
5905
- const oa = `varying vec2 vUv;
5910
+ ir([
5911
+ u({ default: () => [] })
5912
+ ], Be.prototype, "colors", 2);
5913
+ ir([
5914
+ u({ fallback: 0.05 })
5915
+ ], Be.prototype, "epsilon", 2);
5916
+ Be = ir([
5917
+ g("ColorReplaceEffect")
5918
+ ], Be);
5919
+ const oa = `precision highp float;
5920
+
5921
+ varying vec2 vUv;
5906
5922
  uniform sampler2D texture;
5907
5923
  uniform vec2 inputSize;
5908
5924
  uniform vec2 zoom;
@@ -6051,12 +6067,12 @@ void main(void) {
6051
6067
  gl_FragColor = color;
6052
6068
  }
6053
6069
  `;
6054
- var us = Object.defineProperty, aa = Object.getOwnPropertyDescriptor, na = (r, e, t) => e in r ? us(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, me = (r, e, t, s) => {
6070
+ var cs = Object.defineProperty, aa = Object.getOwnPropertyDescriptor, na = (r, e, t) => e in r ? cs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ge = (r, e, t, s) => {
6055
6071
  for (var i = s > 1 ? void 0 : s ? aa(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6056
6072
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6057
- return s && i && us(e, t, i), i;
6073
+ return s && i && cs(e, t, i), i;
6058
6074
  }, la = (r, e, t) => na(r, e + "", t);
6059
- let q = class extends y {
6075
+ let q = class extends x {
6060
6076
  _watermark;
6061
6077
  constructor(r, e = []) {
6062
6078
  super(), this.setProperties(r).append(e);
@@ -6110,9 +6126,8 @@ let q = class extends y {
6110
6126
  });
6111
6127
  }
6112
6128
  };
6113
- la(q, "material", new x({
6114
- vert: `precision mediump float;
6115
- attribute vec2 position;
6129
+ la(q, "material", new w({
6130
+ vert: `attribute vec2 position;
6116
6131
  attribute vec2 uv;
6117
6132
  uniform mat3 projectionMatrix;
6118
6133
  uniform mat3 viewMatrix;
@@ -6123,36 +6138,36 @@ void main() {
6123
6138
  }`,
6124
6139
  frag: oa
6125
6140
  }));
6126
- me([
6127
- c({ fallback: !1 })
6141
+ ge([
6142
+ u({ fallback: !1 })
6128
6143
  ], q.prototype, "checkerboard", 2);
6129
- me([
6130
- c({ fallback: "grid" })
6144
+ ge([
6145
+ u({ fallback: "grid" })
6131
6146
  ], q.prototype, "checkerboardStyle", 2);
6132
- me([
6133
- c({ fallback: !1 })
6147
+ ge([
6148
+ u({ fallback: !1 })
6134
6149
  ], q.prototype, "pixelGrid", 2);
6135
- me([
6136
- c()
6150
+ ge([
6151
+ u()
6137
6152
  ], q.prototype, "watermark", 2);
6138
- me([
6139
- c({ fallback: 100 })
6153
+ ge([
6154
+ u({ fallback: 100 })
6140
6155
  ], q.prototype, "watermarkWidth", 2);
6141
- me([
6142
- c({ fallback: 0.05 })
6156
+ ge([
6157
+ u({ fallback: 0.05 })
6143
6158
  ], q.prototype, "watermarkAlpha", 2);
6144
- me([
6145
- c({ fallback: 0.5236 })
6159
+ ge([
6160
+ u({ fallback: 0.5236 })
6146
6161
  ], q.prototype, "watermarkRotation", 2);
6147
- q = me([
6148
- v("DrawboardEffect")
6162
+ q = ge([
6163
+ g("DrawboardEffect")
6149
6164
  ], q);
6150
- var ds = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, ca = (r, e, t) => e in r ? ds(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ar = (r, e, t, s) => {
6165
+ var us = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, ca = (r, e, t) => e in r ? us(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, or = (r, e, t, s) => {
6151
6166
  for (var i = s > 1 ? void 0 : s ? ha(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6152
6167
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6153
- return s && i && ds(e, t, i), i;
6154
- }, fs = (r, e, t) => ca(r, typeof e != "symbol" ? e + "" : e, t);
6155
- const ps = `varying vec2 vUv[9];
6168
+ return s && i && us(e, t, i), i;
6169
+ }, ds = (r, e, t) => ca(r, typeof e != "symbol" ? e + "" : e, t);
6170
+ const fs = `varying vec2 vUv[9];
6156
6171
  uniform sampler2D sampler;
6157
6172
 
6158
6173
  void main(void) {
@@ -6187,7 +6202,7 @@ void main(void) {
6187
6202
  gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;
6188
6203
  }
6189
6204
  }`;
6190
- let ae = class extends y {
6205
+ let ae = class extends x {
6191
6206
  constructor(r, e = []) {
6192
6207
  super(), this.setProperties(r).append(e);
6193
6208
  }
@@ -6209,7 +6224,7 @@ let ae = class extends y {
6209
6224
  });
6210
6225
  }
6211
6226
  };
6212
- fs(ae, "materialX", new x({
6227
+ ds(ae, "materialX", new w({
6213
6228
  vert: `attribute vec2 position;
6214
6229
  attribute vec2 uv;
6215
6230
  uniform float uStrength;
@@ -6227,9 +6242,9 @@ void main(void) {
6227
6242
  vUv[7] = uv + vec2(3.0 * uStrength, 0.0);
6228
6243
  vUv[8] = uv + vec2(4.0 * uStrength, 0.0);
6229
6244
  }`,
6230
- frag: ps
6245
+ frag: fs
6231
6246
  }));
6232
- fs(ae, "materialY", new x({
6247
+ ds(ae, "materialY", new w({
6233
6248
  vert: `attribute vec2 position;
6234
6249
  attribute vec2 uv;
6235
6250
  uniform float uStrength;
@@ -6247,23 +6262,23 @@ void main(void) {
6247
6262
  vUv[7] = uv + vec2(0.0, 3.0 * uStrength);
6248
6263
  vUv[8] = uv + vec2(0.0, 4.0 * uStrength);
6249
6264
  }`,
6250
- frag: ps
6265
+ frag: fs
6251
6266
  }));
6252
- ar([
6253
- c({ fallback: 4 })
6267
+ or([
6268
+ u({ fallback: 4 })
6254
6269
  ], ae.prototype, "strength", 2);
6255
- ar([
6256
- c({ fallback: 3 })
6270
+ or([
6271
+ u({ fallback: 3 })
6257
6272
  ], ae.prototype, "quality", 2);
6258
- ae = ar([
6259
- v("GaussianBlurEffect")
6273
+ ae = or([
6274
+ g("GaussianBlurEffect")
6260
6275
  ], ae);
6261
- var _s = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, da = (r, e, t) => e in r ? _s(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ve = (r, e, t, s) => {
6276
+ var ps = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, da = (r, e, t) => e in r ? ps(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ve = (r, e, t, s) => {
6262
6277
  for (var i = s > 1 ? void 0 : s ? ua(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6263
6278
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6264
- return s && i && _s(e, t, i), i;
6279
+ return s && i && ps(e, t, i), i;
6265
6280
  }, fa = (r, e, t) => da(r, e + "", t);
6266
- let Q = class extends y {
6281
+ let Q = class extends x {
6267
6282
  blurEffect = new ae();
6268
6283
  viewport3 = new j();
6269
6284
  _color = new J();
@@ -6288,7 +6303,7 @@ let Q = class extends y {
6288
6303
  });
6289
6304
  }
6290
6305
  };
6291
- fa(Q, "material", new x({
6306
+ fa(Q, "material", new w({
6292
6307
  vert: `precision mediump float;
6293
6308
  attribute vec2 position;
6294
6309
  attribute vec2 uv;
@@ -6313,29 +6328,29 @@ void main(void) {
6313
6328
  }`
6314
6329
  }));
6315
6330
  Ve([
6316
- c({ fallback: "#000000FF" })
6331
+ u({ fallback: "#000000FF" })
6317
6332
  ], Q.prototype, "color", 2);
6318
6333
  Ve([
6319
- c({ fallback: 4 })
6334
+ u({ fallback: 4 })
6320
6335
  ], Q.prototype, "blur", 2);
6321
6336
  Ve([
6322
- c({ fallback: 4 })
6337
+ u({ fallback: 4 })
6323
6338
  ], Q.prototype, "offsetX", 2);
6324
6339
  Ve([
6325
- c({ fallback: 4 })
6340
+ u({ fallback: 4 })
6326
6341
  ], Q.prototype, "offsetY", 2);
6327
6342
  Ve([
6328
- c({ fallback: !1 })
6343
+ u({ fallback: !1 })
6329
6344
  ], Q.prototype, "shadowOnly", 2);
6330
6345
  Q = Ve([
6331
- v("DropShadowEffect")
6346
+ g("DropShadowEffect")
6332
6347
  ], Q);
6333
- var ms = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, _a = (r, e, t) => e in r ? ms(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, gs = (r, e, t, s) => {
6348
+ var _s = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, _a = (r, e, t) => e in r ? _s(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ms = (r, e, t, s) => {
6334
6349
  for (var i = s > 1 ? void 0 : s ? pa(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6335
6350
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6336
- return s && i && ms(e, t, i), i;
6351
+ return s && i && _s(e, t, i), i;
6337
6352
  }, ma = (r, e, t) => _a(r, e + "", t);
6338
- let Qe = class extends y {
6353
+ let Qe = class extends x {
6339
6354
  constructor(r, e = []) {
6340
6355
  super(), this.setProperties(r).append(e);
6341
6356
  }
@@ -6349,7 +6364,7 @@ let Qe = class extends y {
6349
6364
  });
6350
6365
  }
6351
6366
  };
6352
- ma(Qe, "material", new x({
6367
+ ma(Qe, "material", new w({
6353
6368
  vert: `precision mediump float;
6354
6369
  attribute vec2 position;
6355
6370
  attribute vec2 uv;
@@ -6375,18 +6390,18 @@ void main(void) {
6375
6390
  gl_FragColor = vec4(color.rgb * alpha, alpha);
6376
6391
  }`
6377
6392
  }));
6378
- gs([
6379
- c({ fallback: 5 })
6393
+ ms([
6394
+ u({ fallback: 5 })
6380
6395
  ], Qe.prototype, "strength", 2);
6381
- Qe = gs([
6382
- v("EmbossEffect")
6396
+ Qe = ms([
6397
+ g("EmbossEffect")
6383
6398
  ], Qe);
6384
- var vs = Object.defineProperty, ga = Object.getOwnPropertyDescriptor, va = (r, e, t) => e in r ? vs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ee = (r, e, t, s) => {
6399
+ var gs = Object.defineProperty, ga = Object.getOwnPropertyDescriptor, va = (r, e, t) => e in r ? gs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ee = (r, e, t, s) => {
6385
6400
  for (var i = s > 1 ? void 0 : s ? ga(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6386
6401
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6387
- return s && i && vs(e, t, i), i;
6402
+ return s && i && gs(e, t, i), i;
6388
6403
  }, ba = (r, e, t) => va(r, e + "", t);
6389
- let N = class extends y {
6404
+ let N = class extends x {
6390
6405
  _canvas;
6391
6406
  _texture;
6392
6407
  _sizes;
@@ -6429,7 +6444,7 @@ let N = class extends y {
6429
6444
  });
6430
6445
  }
6431
6446
  };
6432
- ba(N, "material", new x({
6447
+ ba(N, "material", new w({
6433
6448
  vert: `precision mediump float;
6434
6449
  attribute vec2 position;
6435
6450
  attribute vec2 uv;
@@ -6535,39 +6550,39 @@ void main(void) {
6535
6550
  }`
6536
6551
  }));
6537
6552
  ee([
6538
- c({ fallback: 10 })
6553
+ u({ fallback: 10 })
6539
6554
  ], N.prototype, "slices", 2);
6540
6555
  ee([
6541
- c({ fallback: 512 })
6556
+ u({ fallback: 512 })
6542
6557
  ], N.prototype, "sampleSize", 2);
6543
6558
  ee([
6544
- c({ fallback: 100 })
6559
+ u({ fallback: 100 })
6545
6560
  ], N.prototype, "offset", 2);
6546
6561
  ee([
6547
- c({ fallback: 0 })
6562
+ u({ fallback: 0 })
6548
6563
  ], N.prototype, "direction", 2);
6549
6564
  ee([
6550
- c({ fallback: 2 })
6565
+ u({ fallback: 2 })
6551
6566
  ], N.prototype, "fillMode", 2);
6552
6567
  ee([
6553
- c({ fallback: 0 })
6568
+ u({ fallback: 0 })
6554
6569
  ], N.prototype, "seed", 2);
6555
6570
  ee([
6556
- c({ default: () => [2, 2] })
6571
+ u({ default: () => [2, 2] })
6557
6572
  ], N.prototype, "red", 2);
6558
6573
  ee([
6559
- c({ default: () => [-10, 4] })
6574
+ u({ default: () => [-10, 4] })
6560
6575
  ], N.prototype, "green", 2);
6561
6576
  ee([
6562
- c({ default: () => [10, -4] })
6577
+ u({ default: () => [10, -4] })
6563
6578
  ], N.prototype, "blue", 2);
6564
6579
  N = ee([
6565
- v("GlitchEffect")
6580
+ g("GlitchEffect")
6566
6581
  ], N);
6567
- var bs = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, xa = (r, e, t) => e in r ? bs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ge = (r, e, t, s) => {
6582
+ var vs = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, xa = (r, e, t) => e in r ? vs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ve = (r, e, t, s) => {
6568
6583
  for (var i = s > 1 ? void 0 : s ? ya(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6569
6584
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6570
- return s && i && bs(e, t, i), i;
6585
+ return s && i && vs(e, t, i), i;
6571
6586
  }, wa = (r, e, t) => xa(r, e + "", t);
6572
6587
  const Pa = `vec3 mod289(vec3 x)
6573
6588
  {
@@ -6664,7 +6679,7 @@ float turb(vec3 P, vec3 rep, float lacunarity, float gain)
6664
6679
  }
6665
6680
  return abs(sum);
6666
6681
  }`;
6667
- let X = class extends y {
6682
+ let X = class extends x {
6668
6683
  constructor(r, e = []) {
6669
6684
  super(), this.setProperties(r).append(e);
6670
6685
  }
@@ -6688,7 +6703,7 @@ let X = class extends y {
6688
6703
  });
6689
6704
  }
6690
6705
  };
6691
- wa(X, "material", new x({
6706
+ wa(X, "material", new w({
6692
6707
  vert: `precision mediump float;
6693
6708
  attribute vec2 position;
6694
6709
  attribute vec2 uv;
@@ -6741,29 +6756,29 @@ void main(void) {
6741
6756
  gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
6742
6757
  }`
6743
6758
  }));
6744
- ge([
6745
- c({ fallback: 0 })
6759
+ ve([
6760
+ u({ fallback: 0 })
6746
6761
  ], X.prototype, "time", 2);
6747
- ge([
6748
- c({ fallback: 30 })
6762
+ ve([
6763
+ u({ fallback: 30 })
6749
6764
  ], X.prototype, "angle", 2);
6750
- ge([
6751
- c({ fallback: 0.5 })
6765
+ ve([
6766
+ u({ fallback: 0.5 })
6752
6767
  ], X.prototype, "gain", 2);
6753
- ge([
6754
- c({ fallback: 2.5 })
6768
+ ve([
6769
+ u({ fallback: 2.5 })
6755
6770
  ], X.prototype, "lacunarity", 2);
6756
- ge([
6757
- c({ fallback: !0 })
6771
+ ve([
6772
+ u({ fallback: !0 })
6758
6773
  ], X.prototype, "parallel", 2);
6759
- ge([
6760
- c({ default: () => [0, 0] })
6774
+ ve([
6775
+ u({ default: () => [0, 0] })
6761
6776
  ], X.prototype, "center", 2);
6762
- ge([
6763
- c({ fallback: 1 })
6777
+ ve([
6778
+ u({ fallback: 1 })
6764
6779
  ], X.prototype, "alpha", 2);
6765
- X = ge([
6766
- v("GodrayEffect")
6780
+ X = ve([
6781
+ g("GodrayEffect")
6767
6782
  ], X);
6768
6783
  var Ta = Object.defineProperty, Ea = Object.getOwnPropertyDescriptor, Ut = (r, e, t, s) => {
6769
6784
  for (var i = s > 1 ? void 0 : s ? Ea(e, t) : e, o = r.length - 1, a; o >= 0; o--)
@@ -6796,10 +6811,10 @@ void main(void) {
6796
6811
  color *= 0.25;
6797
6812
  gl_FragColor = color;
6798
6813
  }`;
6799
- let et = class extends y {
6814
+ let et = class extends x {
6800
6815
  _kernels = [0];
6801
6816
  constructor(r, e = []) {
6802
- super(), this.material = new x({
6817
+ super(), this.material = new w({
6803
6818
  vert: `precision mediump float;
6804
6819
  attribute vec2 position;
6805
6820
  attribute vec2 uv;
@@ -6848,23 +6863,23 @@ void main() {
6848
6863
  }
6849
6864
  };
6850
6865
  Ut([
6851
- c({ fallback: 4 })
6866
+ u({ fallback: 4 })
6852
6867
  ], et.prototype, "strength", 2);
6853
6868
  Ut([
6854
- c({ fallback: 3 })
6869
+ u({ fallback: 3 })
6855
6870
  ], et.prototype, "quality", 2);
6856
6871
  Ut([
6857
- c({ default: () => [1, 1] })
6872
+ u({ default: () => [1, 1] })
6858
6873
  ], et.prototype, "pixelSize", 2);
6859
6874
  et = Ut([
6860
- v("KawaseBlurEffect")
6875
+ g("KawaseBlurEffect")
6861
6876
  ], et);
6862
- var ys = Object.defineProperty, Aa = Object.getOwnPropertyDescriptor, Ra = (r, e, t) => e in r ? ys(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, nr = (r, e, t, s) => {
6877
+ var bs = Object.defineProperty, Aa = Object.getOwnPropertyDescriptor, Ra = (r, e, t) => e in r ? bs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ar = (r, e, t, s) => {
6863
6878
  for (var i = s > 1 ? void 0 : s ? Aa(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6864
6879
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6865
- return s && i && ys(e, t, i), i;
6880
+ return s && i && bs(e, t, i), i;
6866
6881
  }, Oa = (r, e, t) => Ra(r, e + "", t);
6867
- let Te = class extends y {
6882
+ let Ee = class extends x {
6868
6883
  constructor(r, e = []) {
6869
6884
  super(), this.setProperties(r).append(e);
6870
6885
  }
@@ -6883,7 +6898,7 @@ let Te = class extends y {
6883
6898
  }
6884
6899
  apply(r, e, t) {
6885
6900
  this.texture && t.targetArea && e.redraw(r, () => {
6886
- this.texture.activate(r, 1), b.draw(r, Te.material, {
6901
+ this.texture.activate(r, 1), b.draw(r, Ee.material, {
6887
6902
  sampler: 0,
6888
6903
  mask: 1,
6889
6904
  area: t.targetArea,
@@ -6892,7 +6907,7 @@ let Te = class extends y {
6892
6907
  });
6893
6908
  }
6894
6909
  };
6895
- Oa(Te, "material", new x({
6910
+ Oa(Ee, "material", new w({
6896
6911
  vert: `precision mediump float;
6897
6912
  attribute vec2 position;
6898
6913
  attribute vec2 uv;
@@ -6939,20 +6954,20 @@ void main(void) {
6939
6954
  }
6940
6955
  }`
6941
6956
  }));
6942
- nr([
6943
- c({ internal: !0 })
6944
- ], Te.prototype, "texture", 2);
6945
- nr([
6946
- c({ fallback: "" })
6947
- ], Te.prototype, "src", 2);
6948
- Te = nr([
6949
- v("MaskEffect")
6950
- ], Te);
6951
- var xs = Object.defineProperty, Ma = Object.getOwnPropertyDescriptor, ka = (r, e, t) => e in r ? xs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ve = (r, e, t, s) => {
6957
+ ar([
6958
+ u({ internal: !0 })
6959
+ ], Ee.prototype, "texture", 2);
6960
+ ar([
6961
+ u({ fallback: "" })
6962
+ ], Ee.prototype, "src", 2);
6963
+ Ee = ar([
6964
+ g("MaskEffect")
6965
+ ], Ee);
6966
+ var ys = Object.defineProperty, Ma = Object.getOwnPropertyDescriptor, ka = (r, e, t) => e in r ? ys(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, be = (r, e, t, s) => {
6952
6967
  for (var i = s > 1 ? void 0 : s ? Ma(e, t) : e, o = r.length - 1, a; o >= 0; o--)
6953
6968
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
6954
- return s && i && xs(e, t, i), i;
6955
- }, ws = (r, e, t) => ka(r, typeof e != "symbol" ? e + "" : e, t);
6969
+ return s && i && ys(e, t, i), i;
6970
+ }, xs = (r, e, t) => ka(r, typeof e != "symbol" ? e + "" : e, t);
6956
6971
  const Ua = `precision highp float;
6957
6972
  varying vec2 vUv;
6958
6973
  uniform sampler2D sampler;
@@ -6988,18 +7003,18 @@ void main(void) {
6988
7003
  vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
6989
7004
  gl_FragColor = contentColor + outlineColor;
6990
7005
  }`;
6991
- let U = class extends y {
7006
+ let D = class extends x {
6992
7007
  static getAngleStep(r) {
6993
7008
  return Number.parseFloat(
6994
7009
  (Math.PI * 2 / Math.max(
6995
- r * U.MAX_SAMPLES,
6996
- U.MIN_SAMPLES
7010
+ r * D.MAX_SAMPLES,
7011
+ D.MIN_SAMPLES
6997
7012
  )).toFixed(7)
6998
7013
  );
6999
7014
  }
7000
7015
  _color = new J();
7001
7016
  constructor(r, e = []) {
7002
- super(), this.setProperties(r).append(e), this.material = new x({
7017
+ super(), this.setProperties(r).append(e), this.material = new w({
7003
7018
  vert: `precision mediump float;
7004
7019
  attribute vec2 position;
7005
7020
  attribute vec2 uv;
@@ -7010,7 +7025,7 @@ void main() {
7010
7025
  }`,
7011
7026
  frag: Ua.replace(
7012
7027
  /\{ANGLE_STEP\}/,
7013
- U.getAngleStep(this.quality).toFixed(7)
7028
+ D.getAngleStep(this.quality).toFixed(7)
7014
7029
  )
7015
7030
  });
7016
7031
  }
@@ -7024,45 +7039,45 @@ void main() {
7024
7039
  ],
7025
7040
  uColor: this._color.toArray().slice(0, 3),
7026
7041
  uAlpha: this.opacity !== 1 ? this.opacity : this._color.a,
7027
- uAngleStep: U.getAngleStep(this.quality),
7042
+ uAngleStep: D.getAngleStep(this.quality),
7028
7043
  uKnockout: this.knockout ? 1 : 0,
7029
7044
  uInputClamp: [0, 0, 1, 1]
7030
7045
  });
7031
7046
  });
7032
7047
  }
7033
7048
  };
7034
- ws(U, "MIN_SAMPLES", 1);
7035
- ws(U, "MAX_SAMPLES", 100);
7036
- ve([
7037
- c({ fallback: "#000000ff" })
7038
- ], U.prototype, "color", 2);
7039
- ve([
7040
- c({ fallback: 1 })
7041
- ], U.prototype, "width", 2);
7042
- ve([
7043
- c({ fallback: "solid" })
7044
- ], U.prototype, "style", 2);
7045
- ve([
7046
- c()
7047
- ], U.prototype, "image", 2);
7048
- ve([
7049
- c({ fallback: 1 })
7050
- ], U.prototype, "opacity", 2);
7051
- ve([
7052
- c({ fallback: 0.1 })
7053
- ], U.prototype, "quality", 2);
7054
- ve([
7055
- c({ fallback: !1 })
7056
- ], U.prototype, "knockout", 2);
7057
- U = ve([
7058
- v("OutlineEffect")
7059
- ], U);
7060
- var Ps = Object.defineProperty, Da = Object.getOwnPropertyDescriptor, Ia = (r, e, t) => e in r ? Ps(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ts = (r, e, t, s) => {
7049
+ xs(D, "MIN_SAMPLES", 1);
7050
+ xs(D, "MAX_SAMPLES", 100);
7051
+ be([
7052
+ u({ fallback: "#000000ff" })
7053
+ ], D.prototype, "color", 2);
7054
+ be([
7055
+ u({ fallback: 1 })
7056
+ ], D.prototype, "width", 2);
7057
+ be([
7058
+ u({ fallback: "solid" })
7059
+ ], D.prototype, "style", 2);
7060
+ be([
7061
+ u()
7062
+ ], D.prototype, "image", 2);
7063
+ be([
7064
+ u({ fallback: 1 })
7065
+ ], D.prototype, "opacity", 2);
7066
+ be([
7067
+ u({ fallback: 0.1 })
7068
+ ], D.prototype, "quality", 2);
7069
+ be([
7070
+ u({ fallback: !1 })
7071
+ ], D.prototype, "knockout", 2);
7072
+ D = be([
7073
+ g("OutlineEffect")
7074
+ ], D);
7075
+ var ws = Object.defineProperty, Da = Object.getOwnPropertyDescriptor, Ia = (r, e, t) => e in r ? ws(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ps = (r, e, t, s) => {
7061
7076
  for (var i = s > 1 ? void 0 : s ? Da(e, t) : e, o = r.length - 1, a; o >= 0; o--)
7062
7077
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
7063
- return s && i && Ps(e, t, i), i;
7078
+ return s && i && ws(e, t, i), i;
7064
7079
  }, Ba = (r, e, t) => Ia(r, e + "", t);
7065
- let tt = class extends y {
7080
+ let tt = class extends x {
7066
7081
  constructor(r, e = []) {
7067
7082
  super(), this.setProperties(r).append(e);
7068
7083
  }
@@ -7076,7 +7091,7 @@ let tt = class extends y {
7076
7091
  });
7077
7092
  }
7078
7093
  };
7079
- Ba(tt, "material", new x({
7094
+ Ba(tt, "material", new w({
7080
7095
  vert: `precision mediump float;
7081
7096
  attribute vec2 position;
7082
7097
  attribute vec2 uv;
@@ -7113,18 +7128,18 @@ void main(void) {
7113
7128
  gl_FragColor = texture2D(sampler, coord);
7114
7129
  }`
7115
7130
  }));
7116
- Ts([
7117
- c({ fallback: 10 })
7131
+ Ps([
7132
+ u({ fallback: 10 })
7118
7133
  ], tt.prototype, "strength", 2);
7119
- tt = Ts([
7120
- v("PixelateEffect")
7134
+ tt = Ps([
7135
+ g("PixelateEffect")
7121
7136
  ], tt);
7122
- var Es = Object.defineProperty, za = Object.getOwnPropertyDescriptor, Na = (r, e, t) => e in r ? Es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ct = (r, e, t, s) => {
7137
+ var Ts = Object.defineProperty, za = Object.getOwnPropertyDescriptor, Na = (r, e, t) => e in r ? Ts(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ct = (r, e, t, s) => {
7123
7138
  for (var i = s > 1 ? void 0 : s ? za(e, t) : e, o = r.length - 1, a; o >= 0; o--)
7124
7139
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
7125
- return s && i && Es(e, t, i), i;
7140
+ return s && i && Ts(e, t, i), i;
7126
7141
  }, La = (r, e, t) => Na(r, e + "", t);
7127
- let de = class extends y {
7142
+ let de = class extends x {
7128
7143
  constructor(r, e = []) {
7129
7144
  super(), this.setProperties(r).append(e);
7130
7145
  }
@@ -7145,7 +7160,7 @@ let de = class extends y {
7145
7160
  });
7146
7161
  }
7147
7162
  };
7148
- La(de, "material", new x({
7163
+ La(de, "material", new w({
7149
7164
  vert: `attribute vec2 position;
7150
7165
  attribute vec2 uv;
7151
7166
  varying vec2 vUv;
@@ -7230,19 +7245,19 @@ void main() {
7230
7245
  }`
7231
7246
  }));
7232
7247
  ct([
7233
- c()
7248
+ u()
7234
7249
  ], de.prototype, "center", 2);
7235
7250
  ct([
7236
- c({ fallback: 20 })
7251
+ u({ fallback: 20 })
7237
7252
  ], de.prototype, "innerRadius", 2);
7238
7253
  ct([
7239
- c({ fallback: -1 })
7254
+ u({ fallback: -1 })
7240
7255
  ], de.prototype, "radius", 2);
7241
7256
  ct([
7242
- c({ fallback: 0.1 })
7257
+ u({ fallback: 0.1 })
7243
7258
  ], de.prototype, "strength", 2);
7244
7259
  de = ct([
7245
- v("ZoomBlurEffect")
7260
+ g("ZoomBlurEffect")
7246
7261
  ], de);
7247
7262
  function Tt(r, e) {
7248
7263
  let t = !1;
@@ -7251,11 +7266,11 @@ function Tt(r, e) {
7251
7266
  const {
7252
7267
  left: h = 0,
7253
7268
  top: l = 0,
7254
- right: u = 0,
7269
+ right: c = 0,
7255
7270
  bottom: d = 0
7256
7271
  } = r.cropRect;
7257
7272
  n.scale(
7258
- Math.abs(1 - (h + u)),
7273
+ Math.abs(1 - (h + c)),
7259
7274
  Math.abs(1 - (l + d))
7260
7275
  ).translate(h, l), t = !0;
7261
7276
  }
@@ -7263,21 +7278,21 @@ function Tt(r, e) {
7263
7278
  const {
7264
7279
  translateX: h = 0,
7265
7280
  translateY: l = 0,
7266
- scaleX: u = 1,
7281
+ scaleX: c = 1,
7267
7282
  scaleY: d = 1
7268
7283
  // flip, TODO
7269
7284
  // alignment, TODO
7270
7285
  } = r.tile;
7271
- n.translate(-h / o, -l / a).scale(1 / u, 1 / d), t = !0;
7286
+ n.translate(-h / o, -l / a).scale(1 / c, 1 / d), t = !0;
7272
7287
  } else if (r.stretchRect) {
7273
7288
  const {
7274
7289
  left: h = 0,
7275
7290
  top: l = 0,
7276
- right: u = 0,
7291
+ right: c = 0,
7277
7292
  bottom: d = 0
7278
7293
  } = r.stretchRect;
7279
7294
  n.scale(
7280
- Math.abs(1 - (-h + -u)),
7295
+ Math.abs(1 - (-h + -c)),
7281
7296
  Math.abs(1 - (-l + -d))
7282
7297
  ).translate(-h, -l), t = !0;
7283
7298
  }
@@ -7288,7 +7303,7 @@ var Fa = Object.defineProperty, Y = (r, e, t, s) => {
7288
7303
  (a = r[o]) && (i = a(e, t, i) || i);
7289
7304
  return i && Fa(e, t, i), i;
7290
7305
  };
7291
- class D extends pe {
7306
+ class I extends pe {
7292
7307
  constructor(e) {
7293
7308
  super(), this.parent = e;
7294
7309
  }
@@ -7375,44 +7390,44 @@ class D extends pe {
7375
7390
  }
7376
7391
  }
7377
7392
  Y([
7378
- c({ fallback: !0 })
7379
- ], D.prototype, "enabled");
7393
+ u({ fallback: !0 })
7394
+ ], I.prototype, "enabled");
7380
7395
  Y([
7381
- c()
7382
- ], D.prototype, "color");
7396
+ u()
7397
+ ], I.prototype, "color");
7383
7398
  Y([
7384
- c()
7385
- ], D.prototype, "image");
7399
+ u()
7400
+ ], I.prototype, "image");
7386
7401
  Y([
7387
- c()
7388
- ], D.prototype, "linearGradient");
7402
+ u()
7403
+ ], I.prototype, "linearGradient");
7389
7404
  Y([
7390
- c()
7391
- ], D.prototype, "radialGradient");
7405
+ u()
7406
+ ], I.prototype, "radialGradient");
7392
7407
  Y([
7393
- c()
7394
- ], D.prototype, "cropRect");
7408
+ u()
7409
+ ], I.prototype, "cropRect");
7395
7410
  Y([
7396
- c()
7397
- ], D.prototype, "stretchRect");
7411
+ u()
7412
+ ], I.prototype, "stretchRect");
7398
7413
  Y([
7399
- c()
7400
- ], D.prototype, "dpi");
7414
+ u()
7415
+ ], I.prototype, "dpi");
7401
7416
  Y([
7402
- c()
7403
- ], D.prototype, "rotateWithShape");
7417
+ u()
7418
+ ], I.prototype, "rotateWithShape");
7404
7419
  Y([
7405
- c()
7406
- ], D.prototype, "tile");
7420
+ u()
7421
+ ], I.prototype, "tile");
7407
7422
  Y([
7408
- c()
7409
- ], D.prototype, "opacity");
7423
+ u()
7424
+ ], I.prototype, "opacity");
7410
7425
  var $a = Object.defineProperty, Va = (r, e, t, s) => {
7411
7426
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
7412
7427
  (a = r[o]) && (i = a(e, t, i) || i);
7413
7428
  return i && $a(e, t, i), i;
7414
7429
  };
7415
- class Ss extends D {
7430
+ class Es extends I {
7416
7431
  setProperties(e) {
7417
7432
  return super._setProperties(
7418
7433
  F(e) ? void 0 : Vs(e)
@@ -7427,14 +7442,14 @@ class Ss extends D {
7427
7442
  }
7428
7443
  }
7429
7444
  Va([
7430
- c()
7431
- ], Ss.prototype, "fillWithShape");
7445
+ u()
7446
+ ], Es.prototype, "fillWithShape");
7432
7447
  var Ga = Object.defineProperty, Wa = (r, e, t, s) => {
7433
7448
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
7434
7449
  (a = r[o]) && (i = a(e, t, i) || i);
7435
7450
  return i && Ga(e, t, i), i;
7436
7451
  };
7437
- class Cs extends D {
7452
+ class Ss extends I {
7438
7453
  setProperties(e) {
7439
7454
  return super._setProperties(
7440
7455
  F(e) ? void 0 : Gs(e)
@@ -7449,14 +7464,14 @@ class Cs extends D {
7449
7464
  }
7450
7465
  }
7451
7466
  Wa([
7452
- c()
7453
- ], Cs.prototype, "fillWithShape");
7467
+ u()
7468
+ ], Ss.prototype, "fillWithShape");
7454
7469
  var ja = Object.defineProperty, ut = (r, e, t, s) => {
7455
7470
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
7456
7471
  (a = r[o]) && (i = a(e, t, i) || i);
7457
7472
  return i && ja(e, t, i), i;
7458
7473
  };
7459
- class Ge extends D {
7474
+ class Ge extends I {
7460
7475
  setProperties(e) {
7461
7476
  return super._setProperties(
7462
7477
  F(e) ? void 0 : Ws(e)
@@ -7491,19 +7506,19 @@ class Ge extends D {
7491
7506
  }
7492
7507
  }
7493
7508
  ut([
7494
- c({ fallback: "#00000000" })
7509
+ u({ fallback: "#00000000" })
7495
7510
  ], Ge.prototype, "color");
7496
7511
  ut([
7497
- c({ fallback: 0 })
7512
+ u({ fallback: 0 })
7498
7513
  ], Ge.prototype, "width");
7499
7514
  ut([
7500
- c({ fallback: "solid" })
7515
+ u({ fallback: "solid" })
7501
7516
  ], Ge.prototype, "style");
7502
7517
  ut([
7503
- c({ fallback: "butt" })
7518
+ u({ fallback: "butt" })
7504
7519
  ], Ge.prototype, "lineCap");
7505
7520
  ut([
7506
- c({ fallback: "miter" })
7521
+ u({ fallback: "miter" })
7507
7522
  ], Ge.prototype, "lineJoin");
7508
7523
  var qa = Object.defineProperty, dt = (r, e, t, s) => {
7509
7524
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
@@ -7536,19 +7551,19 @@ class We extends pe {
7536
7551
  }
7537
7552
  }
7538
7553
  dt([
7539
- c({ fallback: !0 })
7554
+ u({ fallback: !0 })
7540
7555
  ], We.prototype, "enabled");
7541
7556
  dt([
7542
- c({ fallback: "#000000FF" })
7557
+ u({ fallback: "#000000FF" })
7543
7558
  ], We.prototype, "color");
7544
7559
  dt([
7545
- c({ fallback: 0 })
7560
+ u({ fallback: 0 })
7546
7561
  ], We.prototype, "blur");
7547
7562
  dt([
7548
- c({ fallback: 0 })
7563
+ u({ fallback: 0 })
7549
7564
  ], We.prototype, "offsetY");
7550
7565
  dt([
7551
- c({ fallback: 0 })
7566
+ u({ fallback: 0 })
7552
7567
  ], We.prototype, "offsetX");
7553
7568
  var Xa = Object.defineProperty, ft = (r, e, t, s) => {
7554
7569
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
@@ -7582,8 +7597,8 @@ class je extends pe {
7582
7597
  this._path2DSet = si(a), e = this._path2DSet.viewBox;
7583
7598
  } else
7584
7599
  this.paths?.forEach((a, n) => {
7585
- const { data: h, ...l } = a, u = new bt();
7586
- u.style = l, u.addData(h), this._path2DSet.paths[n] = u;
7600
+ const { data: h, ...l } = a, c = new bt();
7601
+ c.style = l, c.addData(h), this._path2DSet.paths[n] = c;
7587
7602
  });
7588
7603
  if (!e) {
7589
7604
  const a = this._path2DSet.getBoundingBox();
@@ -7591,14 +7606,14 @@ class je extends pe {
7591
7606
  }
7592
7607
  const [t, s, i, o] = e;
7593
7608
  this._path2DSet.paths.forEach((a) => {
7594
- a.applyTransform(new gr().translate(-t, -s).scale(1 / i, 1 / o));
7609
+ a.applyTransform(new mr().translate(-t, -s).scale(1 / i, 1 / o));
7595
7610
  });
7596
7611
  }
7597
7612
  draw(e = !1) {
7598
7613
  if (!e && this.enabled && this._path2DSet.paths.length) {
7599
7614
  const t = this.parent.context, { width: s, height: i } = this.parent.size;
7600
7615
  this._path2DSet.paths.forEach((o) => {
7601
- t.addPath(o.clone().applyTransform(new gr().scale(s, i)));
7616
+ t.addPath(o.clone().applyTransform(new mr().scale(s, i)));
7602
7617
  });
7603
7618
  } else
7604
7619
  this._drawRect();
@@ -7609,29 +7624,29 @@ class je extends pe {
7609
7624
  }
7610
7625
  }
7611
7626
  ft([
7612
- c({ fallback: !0 })
7627
+ u({ fallback: !0 })
7613
7628
  ], je.prototype, "enabled");
7614
7629
  ft([
7615
- c()
7630
+ u()
7616
7631
  ], je.prototype, "preset");
7617
7632
  ft([
7618
- c()
7633
+ u()
7619
7634
  ], je.prototype, "svg");
7620
7635
  ft([
7621
- c()
7636
+ u()
7622
7637
  ], je.prototype, "viewBox");
7623
7638
  ft([
7624
- c()
7639
+ u()
7625
7640
  ], je.prototype, "paths");
7626
7641
  class rt extends _e {
7627
7642
  constructor(e) {
7628
7643
  super(), this.setProperties(e);
7629
7644
  }
7630
7645
  }
7631
- const Er = Xs();
7632
- for (const r in Er) {
7633
- const e = Er[r];
7634
- Xt(rt, r, { fallback: e });
7646
+ const Tr = Xs();
7647
+ for (const r in Tr) {
7648
+ const e = Tr[r];
7649
+ qt(rt, r, { fallback: e });
7635
7650
  }
7636
7651
  var Ha = Object.defineProperty, he = (r, e, t, s) => {
7637
7652
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
@@ -7643,7 +7658,7 @@ class te extends pe {
7643
7658
  super(), this.parent = e, this.base = new ii(), this.base.setPropertyAccessor(this);
7644
7659
  }
7645
7660
  base;
7646
- _texture = new Qt();
7661
+ _texture = new Jt();
7647
7662
  _textureMap = /* @__PURE__ */ new Map();
7648
7663
  setProperties(e) {
7649
7664
  return super.setProperties(
@@ -7680,17 +7695,17 @@ class te extends pe {
7680
7695
  const i = [];
7681
7696
  if (t.fragments.forEach((o, a) => {
7682
7697
  if (o.characters.length) {
7683
- const n = Lt.from(
7698
+ const n = Nt.from(
7684
7699
  ...o.characters.map((h) => h.compatibleGlyphBox)
7685
7700
  );
7686
7701
  this._updateTexture(`${s}.${a}.fill`, o.fill, n), this._updateTexture(`${s}.${a}.outline`, o.outline, n), i.push(n);
7687
7702
  }
7688
7703
  }), i.length) {
7689
- const o = Lt.from(...i);
7704
+ const o = Nt.from(...i);
7690
7705
  this._updateTexture(`${s}.fill`, t.fill, o), this._updateTexture(`${s}.outline`, t.outline, o), e.push(o);
7691
7706
  }
7692
7707
  }), e.length) {
7693
- const t = Lt.from(...e);
7708
+ const t = Nt.from(...e);
7694
7709
  this._updateTexture("fill", this.fill, t), this._updateTexture("outline", this.outline, t);
7695
7710
  }
7696
7711
  }
@@ -7737,7 +7752,7 @@ class te extends pe {
7737
7752
  if (typeof s.style.fill == "object") {
7738
7753
  const n = s.style.fill, h = this._textureMap.get(`${a}.${o}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
7739
7754
  if (n.enabled !== !1 && (h || n.color)) {
7740
- const { uvTransform: l, disableWrapMode: u } = Tt(
7755
+ const { uvTransform: l, disableWrapMode: c } = Tt(
7741
7756
  n,
7742
7757
  h?.box ?? {
7743
7758
  width: this.parent.size.width,
@@ -7747,7 +7762,7 @@ class te extends pe {
7747
7762
  e.addPath(s), e.style = { ...s.style }, e.fillStyle = h?.texture ?? n.color, e.fill({
7748
7763
  uvTransform: l,
7749
7764
  vertTransform: this._createVertTransform(),
7750
- disableWrapMode: u
7765
+ disableWrapMode: c
7751
7766
  });
7752
7767
  }
7753
7768
  } else
@@ -7758,7 +7773,7 @@ class te extends pe {
7758
7773
  if (typeof s.style.stroke == "object") {
7759
7774
  const n = s.style.stroke, h = this._textureMap.get(`${a}.${o}.outline`) ?? this._textureMap.get(`${a}.outline`) ?? this._textureMap.get("outline");
7760
7775
  if (n.enabled !== !1 && (h || n.color) && (n.width === void 0 || n.width)) {
7761
- const { uvTransform: l, disableWrapMode: u } = Tt(
7776
+ const { uvTransform: l, disableWrapMode: c } = Tt(
7762
7777
  n,
7763
7778
  h?.box ?? {
7764
7779
  width: this.parent.size.width,
@@ -7768,7 +7783,7 @@ class te extends pe {
7768
7783
  e.addPath(s), e.style = { ...s.style }, e.lineWidth = n.width || 1, e.strokeStyle = h?.texture ?? n.color, e.lineCap = n.lineCap, e.lineJoin = n.lineJoin, e.stroke({
7769
7784
  uvTransform: l,
7770
7785
  vertTransform: this._createVertTransform(),
7771
- disableWrapMode: u
7786
+ disableWrapMode: c
7772
7787
  });
7773
7788
  }
7774
7789
  } else
@@ -7795,31 +7810,31 @@ class te extends pe {
7795
7810
  }
7796
7811
  }
7797
7812
  he([
7798
- c({ fallback: !0 })
7813
+ u({ fallback: !0 })
7799
7814
  ], te.prototype, "enabled");
7800
7815
  he([
7801
- c({ fallback: () => [] })
7816
+ u({ fallback: () => [] })
7802
7817
  ], te.prototype, "content");
7803
7818
  he([
7804
- c({ alias: "parent.style.json" })
7819
+ u({ alias: "parent.style.json" })
7805
7820
  ], te.prototype, "style");
7806
7821
  he([
7807
- c()
7822
+ u()
7808
7823
  ], te.prototype, "effects");
7809
7824
  he([
7810
- c()
7825
+ u()
7811
7826
  ], te.prototype, "fill");
7812
7827
  he([
7813
- c()
7828
+ u()
7814
7829
  ], te.prototype, "outline");
7815
7830
  he([
7816
- c({ alias: "base.measureDom" })
7831
+ u({ alias: "base.measureDom" })
7817
7832
  ], te.prototype, "measureDom");
7818
7833
  he([
7819
- c({ alias: "base.fonts" })
7834
+ u({ alias: "base.fonts" })
7820
7835
  ], te.prototype, "fonts");
7821
7836
  he([
7822
- c({ fallback: "auto" })
7837
+ u({ fallback: "auto" })
7823
7838
  ], te.prototype, "drawMode");
7824
7839
  var Ya = Object.getOwnPropertyDescriptor, Ka = (r, e, t, s) => {
7825
7840
  for (var i = s > 1 ? void 0 : s ? Ya(e, t) : e, o = r.length - 1, a; o >= 0; o--)
@@ -7827,7 +7842,7 @@ var Ya = Object.getOwnPropertyDescriptor, Ka = (r, e, t, s) => {
7827
7842
  return i;
7828
7843
  };
7829
7844
  const Za = new Set(Object.keys(Zs())), Ja = new Set(Object.keys(Ks()));
7830
- let st = class extends Pe {
7845
+ let st = class extends Te {
7831
7846
  size = new C().on("update", () => {
7832
7847
  this.onUpdateStyleProperty("transform", this.style.transform, void 0), this.onUpdateStyleProperty("transformOrigin", this.style.transformOrigin, void 0), this.updateGlobalTransform(), this.requestRedraw();
7833
7848
  });
@@ -7842,7 +7857,7 @@ let st = class extends Pe {
7842
7857
  set style(r) {
7843
7858
  this._style.resetProperties().setProperties(r);
7844
7859
  }
7845
- _background = new Ss(this);
7860
+ _background = new Es(this);
7846
7861
  get background() {
7847
7862
  return this._background;
7848
7863
  }
@@ -7856,7 +7871,7 @@ let st = class extends Pe {
7856
7871
  set shape(r) {
7857
7872
  this._shape.resetProperties().setProperties(r);
7858
7873
  }
7859
- _fill = new D(this);
7874
+ _fill = new I(this);
7860
7875
  get fill() {
7861
7876
  return this._fill;
7862
7877
  }
@@ -7870,7 +7885,7 @@ let st = class extends Pe {
7870
7885
  set outline(r) {
7871
7886
  this._outline.resetProperties().setProperties(r);
7872
7887
  }
7873
- _foreground = new Cs(this);
7888
+ _foreground = new Ss(this);
7874
7889
  get foreground() {
7875
7890
  return this._foreground;
7876
7891
  }
@@ -8000,7 +8015,7 @@ let st = class extends Pe {
8000
8015
  const e = "__$style.maskImage";
8001
8016
  if (r && r !== "none") {
8002
8017
  const t = this.getNode(e);
8003
- t ? t.src = r : this.appendChild(new Te({ name: e, src: r }), "back");
8018
+ t ? t.src = r : this.appendChild(new Ee({ name: e, src: r }), "back");
8004
8019
  } else {
8005
8020
  const t = this.getNode(e);
8006
8021
  t && this.removeChild(t);
@@ -8022,19 +8037,19 @@ let st = class extends Pe {
8022
8037
  ];
8023
8038
  }
8024
8039
  getAabb() {
8025
- return new be(
8040
+ return new ye(
8026
8041
  this._getPointArray().map((r) => this.transform.apply(r))
8027
8042
  );
8028
8043
  }
8029
8044
  getGlobalAabb() {
8030
- return new be(
8045
+ return new ye(
8031
8046
  this._getPointArray().map((r) => this.globalTransform.apply(r))
8032
8047
  );
8033
8048
  }
8034
8049
  getObb() {
8035
8050
  const r = this.pivot, e = this.transform.apply(r).sub(r);
8036
8051
  return {
8037
- rect: new be(
8052
+ rect: new ye(
8038
8053
  this._getPointArray().map((t) => (t.x += e.x, t.y += e.y, t))
8039
8054
  ),
8040
8055
  rotation: this.rotation
@@ -8043,7 +8058,7 @@ let st = class extends Pe {
8043
8058
  getGlobalObb() {
8044
8059
  const r = this.pivot, e = this.globalTransform.apply(r).sub(r);
8045
8060
  return {
8046
- rect: new be(
8061
+ rect: new ye(
8047
8062
  this._getPointArray().map((t) => (t.x += e.x, t.y += e.y, t))
8048
8063
  ),
8049
8064
  rotation: this.globalRotation
@@ -8130,7 +8145,7 @@ let st = class extends Pe {
8130
8145
  }
8131
8146
  toJSON() {
8132
8147
  const r = (e) => Object.keys(e).length > 0 ? e : void 0;
8133
- return zr({
8148
+ return Br({
8134
8149
  ...super.toJSON(),
8135
8150
  style: r(this.style.toJSON()),
8136
8151
  background: r(this.background.toJSON()),
@@ -8144,21 +8159,21 @@ let st = class extends Pe {
8144
8159
  }
8145
8160
  };
8146
8161
  st = Ka([
8147
- v("BaseElement2D")
8162
+ g("BaseElement2D")
8148
8163
  ], st);
8149
- class As extends rt {
8164
+ class Cs extends rt {
8150
8165
  constructor(e) {
8151
8166
  super(), this.setProperties(e);
8152
8167
  }
8153
8168
  }
8154
- const Sr = {
8169
+ const Er = {
8155
8170
  left: 0,
8156
8171
  top: 0,
8157
8172
  width: 0,
8158
8173
  height: 0
8159
8174
  };
8160
- for (const r in Sr)
8161
- Xt(As, r, { fallback: Sr[r] });
8175
+ for (const r in Er)
8176
+ qt(Cs, r, { fallback: Er[r] });
8162
8177
  class Qa extends rt {
8163
8178
  constructor(e) {
8164
8179
  super(), this.setProperties(e);
@@ -8169,8 +8184,8 @@ var en = Object.getOwnPropertyDescriptor, tn = (r, e, t, s) => {
8169
8184
  (a = r[o]) && (i = a(i) || i);
8170
8185
  return i;
8171
8186
  };
8172
- let Ee = class extends st {
8173
- _style = new As().on("updateProperty", (...r) => {
8187
+ let Se = class extends st {
8188
+ _style = new Cs().on("updateProperty", (...r) => {
8174
8189
  this.onUpdateStyleProperty(r[0], r[1], r[2]);
8175
8190
  });
8176
8191
  get style() {
@@ -8205,9 +8220,9 @@ let Ee = class extends st {
8205
8220
  }
8206
8221
  }
8207
8222
  };
8208
- Ee = tn([
8209
- v("Element2D")
8210
- ], Ee);
8223
+ Se = tn([
8224
+ g("Element2D")
8225
+ ], Se);
8211
8226
  const E = {
8212
8227
  left: 0,
8213
8228
  // Edge.Left
@@ -8234,7 +8249,7 @@ const E = {
8234
8249
  // Gutter.Row
8235
8250
  all: 2
8236
8251
  // Gutter.All
8237
- }, Re = {
8252
+ }, Oe = {
8238
8253
  auto: 0,
8239
8254
  // Align.Auto
8240
8255
  "flex-start": 1,
@@ -8253,21 +8268,21 @@ const E = {
8253
8268
  // Align.SpaceAround
8254
8269
  "space-evenly": 8
8255
8270
  // Align.SpaceEvenly
8256
- }, Cr = {
8271
+ }, Sr = {
8257
8272
  flex: 0,
8258
8273
  // Display.Flex
8259
8274
  none: 1,
8260
8275
  // Display.None
8261
8276
  contents: 2
8262
8277
  // Display.Contents
8263
- }, Gt = {
8278
+ }, Vt = {
8264
8279
  inherit: 0,
8265
8280
  // Direction.Inherit
8266
8281
  ltr: 1,
8267
8282
  // Direction.LTR
8268
8283
  rtl: 2
8269
8284
  // Direction.RTL
8270
- }, Ar = {
8285
+ }, Cr = {
8271
8286
  column: 0,
8272
8287
  // FlexDirection.Column
8273
8288
  "column-reverse": 1,
@@ -8276,14 +8291,14 @@ const E = {
8276
8291
  // FlexDirection.Row
8277
8292
  "row-reverse": 3
8278
8293
  // FlexDirection.RowReverse
8279
- }, Rr = {
8294
+ }, Ar = {
8280
8295
  "no-wrap": 0,
8281
8296
  // Wrap.NoWrap
8282
8297
  wrap: 1,
8283
8298
  // Wrap.Wrap
8284
8299
  "Wrap-reverse": 2
8285
8300
  // Wrap.WrapReverse
8286
- }, Or = {
8301
+ }, Rr = {
8287
8302
  "flex-start": 0,
8288
8303
  // Justify.FlexStart
8289
8304
  center: 1,
@@ -8296,27 +8311,27 @@ const E = {
8296
8311
  // Justify.SpaceAround
8297
8312
  "space-evenly": 5
8298
8313
  // Justify.SpaceEvenly
8299
- }, Mr = {
8314
+ }, Or = {
8300
8315
  visible: 0,
8301
8316
  // Overflow.Visible
8302
8317
  hidden: 1,
8303
8318
  // Overflow.Hidden
8304
8319
  scroll: 2
8305
8320
  // Overflow.Scroll
8306
- }, kr = {
8321
+ }, Mr = {
8307
8322
  static: 0,
8308
8323
  // PositionType.Static
8309
8324
  relative: 1,
8310
8325
  // PositionType.Relative
8311
8326
  absolute: 2
8312
8327
  // PositionType.Absolute
8313
- }, Ur = {
8328
+ }, kr = {
8314
8329
  "border-box": 0,
8315
8330
  // BoxSizing.BorderBox
8316
8331
  "content-box": 1
8317
8332
  // BoxSizing.ContentBox
8318
8333
  };
8319
- class lr {
8334
+ class nr {
8320
8335
  constructor(e) {
8321
8336
  this._element = e;
8322
8337
  }
@@ -8325,7 +8340,7 @@ class lr {
8325
8340
  const { loadYoga: e } = await import("yoga-layout/load");
8326
8341
  this._yoga = await e();
8327
8342
  }
8328
- _node = lr._yoga.Node.create();
8343
+ _node = nr._yoga.Node.create();
8329
8344
  get _style() {
8330
8345
  return this._element.style;
8331
8346
  }
@@ -8352,17 +8367,17 @@ class lr {
8352
8367
  switch (e) {
8353
8368
  case "alignContent":
8354
8369
  this._node.setAlignContent(
8355
- t ? Re[t] : Re["flex-start"]
8370
+ t ? Oe[t] : Oe["flex-start"]
8356
8371
  );
8357
8372
  break;
8358
8373
  case "alignItems":
8359
8374
  this._node.setAlignItems(
8360
- t ? Re[t] : Re["flex-start"]
8375
+ t ? Oe[t] : Oe["flex-start"]
8361
8376
  );
8362
8377
  break;
8363
8378
  case "alignSelf":
8364
8379
  this._node.setAlignSelf(
8365
- t ? Re[t] : Re["flex-start"]
8380
+ t ? Oe[t] : Oe["flex-start"]
8366
8381
  );
8367
8382
  break;
8368
8383
  case "aspectRatio":
@@ -8385,12 +8400,12 @@ class lr {
8385
8400
  break;
8386
8401
  case "direction":
8387
8402
  this._node.setDirection(
8388
- t ? Gt[t] : Gt.inherit
8403
+ t ? Vt[t] : Vt.inherit
8389
8404
  );
8390
8405
  break;
8391
8406
  case "display":
8392
8407
  this._node.setDisplay(
8393
- t ? Cr[t] : Cr.flex
8408
+ t ? Sr[t] : Sr.flex
8394
8409
  );
8395
8410
  break;
8396
8411
  case "flex":
@@ -8401,7 +8416,7 @@ class lr {
8401
8416
  break;
8402
8417
  case "flexDirection":
8403
8418
  this._node.setFlexDirection(
8404
- t ? Ar[t] : Ar.row
8419
+ t ? Cr[t] : Cr.row
8405
8420
  );
8406
8421
  break;
8407
8422
  case "flexGrow":
@@ -8412,7 +8427,7 @@ class lr {
8412
8427
  break;
8413
8428
  case "flexWrap":
8414
8429
  this._node.setFlexWrap(
8415
- t ? Rr[t] : Rr.wrap
8430
+ t ? Ar[t] : Ar.wrap
8416
8431
  );
8417
8432
  break;
8418
8433
  case "height":
@@ -8420,7 +8435,7 @@ class lr {
8420
8435
  break;
8421
8436
  case "justifyContent":
8422
8437
  this._node.setJustifyContent(
8423
- t ? Or[t] : Or["flex-start"]
8438
+ t ? Rr[t] : Rr["flex-start"]
8424
8439
  );
8425
8440
  break;
8426
8441
  case "gap":
@@ -8457,7 +8472,7 @@ class lr {
8457
8472
  break;
8458
8473
  case "overflow":
8459
8474
  this._node.setOverflow(
8460
- t ? Mr[t] : Mr.visible
8475
+ t ? Or[t] : Or.visible
8461
8476
  );
8462
8477
  break;
8463
8478
  case "paddingTop":
@@ -8489,12 +8504,12 @@ class lr {
8489
8504
  break;
8490
8505
  case "position":
8491
8506
  this._node.setPositionType(
8492
- t ? kr[t] : kr.static
8507
+ t ? Mr[t] : Mr.static
8493
8508
  );
8494
8509
  break;
8495
8510
  case "boxSizing":
8496
8511
  this._node.setBoxSizing(
8497
- t ? Ur[t] : Ur["content-box"]
8512
+ t ? kr[t] : kr["content-box"]
8498
8513
  );
8499
8514
  break;
8500
8515
  case "width":
@@ -8508,7 +8523,7 @@ var sn = Object.getOwnPropertyDescriptor, on = (r, e, t, s) => {
8508
8523
  (a = r[o]) && (i = a(i) || i);
8509
8524
  return i;
8510
8525
  };
8511
- let Dr = class extends st {
8526
+ let Ur = class extends st {
8512
8527
  _style = new Qa().on("updateProperty", (...r) => {
8513
8528
  this.onUpdateStyleProperty(r[0], r[1], r[2]);
8514
8529
  });
@@ -8518,7 +8533,7 @@ let Dr = class extends st {
8518
8533
  set style(r) {
8519
8534
  this._style.resetProperties().setProperties(r);
8520
8535
  }
8521
- _layout = new lr(this);
8536
+ _layout = new nr(this);
8522
8537
  get offsetLeft() {
8523
8538
  return this._layout.offsetLeft;
8524
8539
  }
@@ -8547,7 +8562,7 @@ let Dr = class extends st {
8547
8562
  super._updateStyleProperty(r, e, t), this._layout.updateStyleProperty(r, e, t), this._layout._node.isDirty() && this.requestRelayout();
8548
8563
  }
8549
8564
  updateTransform() {
8550
- this.calculateLayout(void 0, void 0, Gt.ltr);
8565
+ this.calculateLayout(void 0, void 0, Vt.ltr);
8551
8566
  const { left: r, top: e, width: t, height: s } = this._layout.getComputedLayout();
8552
8567
  this.position.x = r, this.position.y = e, this.size.x = t, this.size.y = s, super.updateTransform();
8553
8568
  }
@@ -8556,15 +8571,15 @@ let Dr = class extends st {
8556
8571
  s?._layout?.calculateLayout ? s?._layout.calculateLayout(r, e, t) : this._layout.calculateLayout(r, e, t);
8557
8572
  }
8558
8573
  };
8559
- Dr = on([
8560
- v("FlexElement2D")
8561
- ], Dr);
8574
+ Ur = on([
8575
+ g("FlexElement2D")
8576
+ ], Ur);
8562
8577
  var an = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, pt = (r, e, t, s) => {
8563
8578
  for (var i = s > 1 ? void 0 : s ? nn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
8564
8579
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
8565
8580
  return s && i && an(e, t, i), i;
8566
8581
  };
8567
- let Be = class extends Ee {
8582
+ let ze = class extends Se {
8568
8583
  get currentFrameTexture() {
8569
8584
  return this.texture?.frames[this._frameIndex]?.texture;
8570
8585
  }
@@ -8602,7 +8617,7 @@ let Be = class extends Ee {
8602
8617
  }
8603
8618
  setResource(r) {
8604
8619
  let e;
8605
- if (r instanceof Vt ? e = r : e = new Vt(r), this.texture = e.updateDuration(), this.currentFrameTexture && (!this.style.width || !this.style.height)) {
8620
+ if (r instanceof $t ? e = r : e = new $t(r), this.texture = e.updateDuration(), this.currentFrameTexture && (!this.style.width || !this.style.height)) {
8606
8621
  const t = this.currentFrameTexture;
8607
8622
  this.style.width = t.realWidth, this.style.height = t.realHeight;
8608
8623
  }
@@ -8650,8 +8665,8 @@ let Be = class extends Ee {
8650
8665
  if (r?.isValid()) {
8651
8666
  const { left: e = 0, top: t = 0, right: s = 0, bottom: i = 0 } = this.srcRect ?? {}, { width: o, height: a } = this.size;
8652
8667
  this.context.fillStyle = r;
8653
- const n = Math.abs(1 + (e + s)) * o, h = Math.abs(1 + (t + i)) * a, l = 1 / n, u = 1 / h, d = e * o * l, f = t * a * u;
8654
- this.context.uvTransform = new O().scale(l, u).translate(d, f), this.shape.draw(), this.context.fill();
8668
+ const n = Math.abs(1 + (e + s)) * o, h = Math.abs(1 + (t + i)) * a, l = 1 / n, c = 1 / h, d = e * o * l, f = t * a * c;
8669
+ this.context.uvTransform = new O().scale(l, c).translate(d, f), this.shape.draw(), this.context.fill();
8655
8670
  }
8656
8671
  }
8657
8672
  _repaint(r) {
@@ -8662,21 +8677,21 @@ let Be = class extends Ee {
8662
8677
  }
8663
8678
  };
8664
8679
  pt([
8665
- c({ internal: !0 })
8666
- ], Be.prototype, "texture", 2);
8680
+ u({ internal: !0 })
8681
+ ], ze.prototype, "texture", 2);
8667
8682
  pt([
8668
- c({ fallback: "" })
8669
- ], Be.prototype, "src", 2);
8683
+ u({ fallback: "" })
8684
+ ], ze.prototype, "src", 2);
8670
8685
  pt([
8671
- c()
8672
- ], Be.prototype, "srcRect", 2);
8686
+ u()
8687
+ ], ze.prototype, "srcRect", 2);
8673
8688
  pt([
8674
- c({ fallback: !1 })
8675
- ], Be.prototype, "gif", 2);
8676
- Be = pt([
8677
- v("Image2D")
8678
- ], Be);
8679
- class Rs extends Ee {
8689
+ u({ fallback: !1 })
8690
+ ], ze.prototype, "gif", 2);
8691
+ ze = pt([
8692
+ g("Image2D")
8693
+ ], ze);
8694
+ class As extends Se {
8680
8695
  texture;
8681
8696
  constructor(e, t = []) {
8682
8697
  super(), this.setProperties(e).append(t);
@@ -8685,13 +8700,13 @@ class Rs extends Ee {
8685
8700
  this.texture?.isValid() && (this.shape.draw(!0), this.context.fillStyle = this.texture, this.context.fill());
8686
8701
  }
8687
8702
  }
8688
- var ln = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, Os = (r, e, t, s) => {
8703
+ var ln = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, Rs = (r, e, t, s) => {
8689
8704
  for (var i = s > 1 ? void 0 : s ? hn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
8690
8705
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
8691
8706
  return s && i && ln(e, t, i), i;
8692
8707
  };
8693
- let Wt = class extends Rs {
8694
- texture = new Qt();
8708
+ let Gt = class extends As {
8709
+ texture = new Jt();
8695
8710
  animation;
8696
8711
  constructor(r, e = []) {
8697
8712
  super(), this.setProperties(r), this.append(e);
@@ -8720,18 +8735,18 @@ let Wt = class extends Rs {
8720
8735
  this.animation?.goToAndStop(this.currentTime, !1), this.texture.requestUpload(), this.requestRedraw(), super._process(r);
8721
8736
  }
8722
8737
  };
8723
- Os([
8724
- c({ fallback: "" })
8725
- ], Wt.prototype, "src", 2);
8726
- Wt = Os([
8727
- v("Lottie2D")
8728
- ], Wt);
8738
+ Rs([
8739
+ u({ fallback: "" })
8740
+ ], Gt.prototype, "src", 2);
8741
+ Gt = Rs([
8742
+ g("Lottie2D")
8743
+ ], Gt);
8729
8744
  var cn = Object.defineProperty, un = (r, e, t, s) => {
8730
8745
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
8731
8746
  (a = r[o]) && (i = a(e, t, i) || i);
8732
8747
  return i && cn(e, t, i), i;
8733
8748
  };
8734
- class dn extends Ee {
8749
+ class dn extends Se {
8735
8750
  constructor(e, t = []) {
8736
8751
  super(), this.setProperties(e).append(t);
8737
8752
  }
@@ -8755,14 +8770,14 @@ class dn extends Ee {
8755
8770
  }
8756
8771
  }
8757
8772
  un([
8758
- c({ fallback: 6 })
8773
+ u({ fallback: 6 })
8759
8774
  ], dn.prototype, "handleSize");
8760
- var fn = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, Ms = (r, e, t, s) => {
8775
+ var fn = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, Os = (r, e, t, s) => {
8761
8776
  for (var i = s > 1 ? void 0 : s ? pn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
8762
8777
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
8763
8778
  return s && i && fn(e, t, i), i;
8764
8779
  };
8765
- let jt = class extends Rs {
8780
+ let Wt = class extends As {
8766
8781
  get videoDuration() {
8767
8782
  return (this.texture?.duration ?? 0) * 1e3;
8768
8783
  }
@@ -8797,12 +8812,12 @@ let jt = class extends Rs {
8797
8812
  this._updateVideoCurrentTime(), super._process(r);
8798
8813
  }
8799
8814
  };
8800
- Ms([
8801
- c({ fallback: "" })
8802
- ], jt.prototype, "src", 2);
8803
- jt = Ms([
8804
- v("Video2D")
8805
- ], jt);
8815
+ Os([
8816
+ u({ fallback: "" })
8817
+ ], Wt.prototype, "src", 2);
8818
+ Wt = Os([
8819
+ g("Video2D")
8820
+ ], Wt);
8806
8821
  var _n = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, Dt = (r, e, t, s) => {
8807
8822
  for (var i = s > 1 ? void 0 : s ? mn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
8808
8823
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
@@ -8810,27 +8825,27 @@ var _n = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, Dt = (r, e
8810
8825
  };
8811
8826
  const gn = (r) => r, vn = _t(0.25, 0.1, 0.25, 1), bn = _t(0.42, 0, 1, 1), yn = _t(0, 0, 0.58, 1), xn = _t(0.42, 0, 0.58, 1);
8812
8827
  function _t(r, e, t, s) {
8813
- const o = 3 * r - 3 * t + 1, a = 3 * t - 6 * r, n = 3 * r, h = 3 * e - 3 * s + 1, l = 3 * s - 6 * e, u = 3 * e, d = (m) => (3 * o * m + 2 * a) * m + n, f = (m) => ((o * m + a) * m + n) * m, _ = (m) => ((h * m + l) * m + u) * m;
8828
+ const o = 3 * r - 3 * t + 1, a = 3 * t - 6 * r, n = 3 * r, h = 3 * e - 3 * s + 1, l = 3 * s - 6 * e, c = 3 * e, d = (m) => (3 * o * m + 2 * a) * m + n, f = (m) => ((o * m + a) * m + n) * m, _ = (m) => ((h * m + l) * m + c) * m;
8814
8829
  function p(m) {
8815
- let g = m, w, P;
8830
+ let v = m, y, P;
8816
8831
  for (let L = 0; L < 8; L++) {
8817
- if (P = f(g) - m, Math.abs(P) < 1e-6)
8818
- return g;
8819
- if (w = d(g), Math.abs(w) < 1e-6)
8832
+ if (P = f(v) - m, Math.abs(P) < 1e-6)
8833
+ return v;
8834
+ if (y = d(v), Math.abs(y) < 1e-6)
8820
8835
  break;
8821
- g -= P / w;
8836
+ v -= P / y;
8822
8837
  }
8823
8838
  let R = 1, A = 0;
8824
- for (g = m; R > A; ) {
8825
- if (P = f(g) - m, Math.abs(P) < 1e-6)
8826
- return g;
8827
- P > 0 ? R = g : A = g, g = (R + A) / 2;
8839
+ for (v = m; R > A; ) {
8840
+ if (P = f(v) - m, Math.abs(P) < 1e-6)
8841
+ return v;
8842
+ P > 0 ? R = v : A = v, v = (R + A) / 2;
8828
8843
  }
8829
- return g;
8844
+ return v;
8830
8845
  }
8831
8846
  return (m) => _(p(m));
8832
8847
  }
8833
- const Ft = {
8848
+ const Lt = {
8834
8849
  linear: gn,
8835
8850
  ease: vn,
8836
8851
  easeIn: bn,
@@ -8840,7 +8855,7 @@ const Ft = {
8840
8855
  let it = class extends W {
8841
8856
  _keyframes = [];
8842
8857
  _isFirstUpdatePosition = !1;
8843
- _cachedProps = new Br();
8858
+ _cachedProps = new Ir();
8844
8859
  _stoped = !1;
8845
8860
  constructor(r, e = []) {
8846
8861
  super(), this.setProperties(r).append(e);
@@ -8873,7 +8888,7 @@ let it = class extends W {
8873
8888
  r = [this.getParent()].filter(Boolean);
8874
8889
  break;
8875
8890
  }
8876
- return r.filter((e) => e instanceof Ee);
8891
+ return r.filter((e) => e instanceof Se);
8877
8892
  }
8878
8893
  _updateKeyframes() {
8879
8894
  const r = [], e = this.keyframes;
@@ -8931,9 +8946,9 @@ let it = class extends W {
8931
8946
  }
8932
8947
  _parseEasing(r) {
8933
8948
  if (!r)
8934
- return Ft.linear;
8935
- if (r in Ft)
8936
- return Ft[r];
8949
+ return Lt.linear;
8950
+ if (r in Lt)
8951
+ return Lt[r];
8937
8952
  const e = r.replace(/cubic-bezier\((.+)\)/, "$1").split(",").map((t) => Number(t));
8938
8953
  return _t(e[0], e[1], e[2], e[3]);
8939
8954
  }
@@ -8947,13 +8962,13 @@ let it = class extends W {
8947
8962
  } = a, l = { ...a.props };
8948
8963
  if (t && r <= n) {
8949
8964
  const {
8950
- offset: u,
8965
+ offset: c,
8951
8966
  easing: d
8952
8967
  } = t, f = { ...t.props };
8953
8968
  return e.forEach((_, p) => {
8954
8969
  (!(p in f) || f[p] === null) && (f[p] = _), (!(p in l) || l[p] === null) && (l[p] = _);
8955
8970
  }), [
8956
- { offset: u, easing: d, props: f },
8971
+ { offset: c, easing: d, props: f },
8957
8972
  { offset: n, easing: h, props: l }
8958
8973
  ];
8959
8974
  }
@@ -8962,7 +8977,7 @@ let it = class extends W {
8962
8977
  return null;
8963
8978
  }
8964
8979
  _commitStyle(r, e, t, s, i) {
8965
- const { offset: o, easing: a, props: n } = s, { offset: h, props: l } = i, u = h - o, d = a((r - o) / u), f = {
8980
+ const { offset: o, easing: a, props: n } = s, { offset: h, props: l } = i, c = h - o, d = a((r - o) / c), f = {
8966
8981
  width: e.size.x,
8967
8982
  height: e.size.y,
8968
8983
  fontSize: e.style.fontSize
@@ -8985,9 +9000,9 @@ let it = class extends W {
8985
9000
  let o, a;
8986
9001
  if (e === "none" && (e = void 0), t === "none" && (t = void 0), e === void 0 || t === void 0)
8987
9002
  if (e !== void 0)
8988
- o = mt(r, String(e), i), a = br(o);
9003
+ o = mt(r, String(e), i), a = vr(o);
8989
9004
  else if (t !== void 0)
8990
- a = mt(r, String(t), i), o = br(a);
9005
+ a = mt(r, String(t), i), o = vr(a);
8991
9006
  else
8992
9007
  return;
8993
9008
  else
@@ -8999,14 +9014,14 @@ let it = class extends W {
8999
9014
  }), a.forEach(({ name: d, args: f }) => {
9000
9015
  l[d] = f, n.add(d);
9001
9016
  });
9002
- let u = "";
9017
+ let c = "";
9003
9018
  return n.forEach((d) => {
9004
9019
  const f = Math.max(h[d]?.length ?? 0, l[d]?.length ?? 0), _ = h[d], p = l[d];
9005
- u += `${d}(${Array.from({ length: f }, (m, g) => {
9006
- const w = _?.[g], P = p?.[g], R = w?.normalizedIntValue ?? 0, A = P?.normalizedIntValue ?? 0;
9020
+ c += `${d}(${Array.from({ length: f }, (m, v) => {
9021
+ const y = _?.[v], P = p?.[v], R = y?.normalizedIntValue ?? 0, A = P?.normalizedIntValue ?? 0;
9007
9022
  return Number.isNaN(R) || Number.isNaN(A) ? P?.value ?? 0 : S(R, A, s);
9008
9023
  }).join(", ")}) `;
9009
- }), u;
9024
+ }), c;
9010
9025
  } else if (!Array.isArray(o) && !Array.isArray(a))
9011
9026
  return Number.isNaN(o.normalizedIntValue) || Number.isNaN(a.normalizedIntValue) ? a.value : S(o.normalizedIntValue, a.normalizedIntValue, s);
9012
9027
  }
@@ -9031,26 +9046,26 @@ let it = class extends W {
9031
9046
  }
9032
9047
  };
9033
9048
  Dt([
9034
- c({ fallback: "parent" })
9049
+ u({ fallback: "parent" })
9035
9050
  ], it.prototype, "effectMode", 2);
9036
9051
  Dt([
9037
- c({ default: () => [] })
9052
+ u({ default: () => [] })
9038
9053
  ], it.prototype, "keyframes", 2);
9039
9054
  Dt([
9040
- c()
9055
+ u()
9041
9056
  ], it.prototype, "easing", 2);
9042
9057
  it = Dt([
9043
- v("Animation", {
9058
+ g("Animation", {
9044
9059
  renderMode: "disabled",
9045
9060
  processMode: "pausable",
9046
9061
  processSortMode: "parent_before",
9047
9062
  duration: 2e3
9048
9063
  })
9049
9064
  ], it);
9050
- class hr extends fe {
9065
+ class lr extends fe {
9051
9066
  static _instance;
9052
9067
  static get instance() {
9053
- return this._instance || (this._instance = new hr()), this._instance;
9068
+ return this._instance || (this._instance = new lr()), this._instance;
9054
9069
  }
9055
9070
  playbackRate = 1;
9056
9071
  muted = !1;
@@ -9200,17 +9215,17 @@ class Et extends fe {
9200
9215
  return;
9201
9216
  const { start: t = 0, end: s = 0 } = e;
9202
9217
  s && console.assert(s > t, "End time is before start time"), e.playbackRate !== void 0 && (this._playbackRate = e.playbackRate), e.volume !== void 0 && (this._volume = e.volume), e.loop !== void 0 && (this._loop = e.loop), e.muted !== void 0 && (this._muted = e.muted), this.refresh(), this.loop && s !== null && (console.warn('Looping not support when specifying an "end" time'), this.loop = !1), this._start = t, this._end = s || this._duration, this._start = Math.max(0, this._start - Et.PADDING), this._end = Math.min(this._end + Et.PADDING, this._duration), this._source.onloadedmetadata = () => {
9203
- this._source && (this._source.currentTime = t, this._source.onloadedmetadata = null, this.emit("progress", t, this._duration), k.on(this._onUpdate));
9218
+ this._source && (this._source.currentTime = t, this._source.onloadedmetadata = null, this.emit("progress", t, this._duration), U.on(this._onUpdate));
9204
9219
  }, this._source.onended = this._onComplete.bind(this), this._source.play(), this.emit("start");
9205
9220
  }
9206
9221
  _onUpdate = () => {
9207
9222
  this._source && (this.emit("progress", this.progress, this._duration), this._source.currentTime >= this._end && !this._source.loop && this._onComplete());
9208
9223
  };
9209
9224
  _onComplete() {
9210
- k.off(this._onUpdate), this._stop(), this.emit("progress", 1, this._duration), this.emit("end", this);
9225
+ U.off(this._onUpdate), this._stop(), this.emit("progress", 1, this._duration), this.emit("end", this);
9211
9226
  }
9212
9227
  destroy() {
9213
- k.off(this._onUpdate), super.destroy();
9228
+ U.off(this._onUpdate), super.destroy();
9214
9229
  const e = this._source;
9215
9230
  e && (e.onended = null, e.onplay = null, e.onpause = null, this._stop()), this._source = null, this._playbackRate = 1, this._volume = 1, this._loop = !1, this._end = 0, this._start = 0, this._duration = 0, this._playing = !1, this._pausedReal = !1, this._paused = !1, this._muted = !1, this._audio && (this._audio.context.off("refresh", this.refresh), this._audio.context.off("refreshPaused", this.refreshPaused), this._audio = null);
9216
9231
  }
@@ -9234,7 +9249,7 @@ class wn {
9234
9249
  return !!this.source && this.source.readyState === 4;
9235
9250
  }
9236
9251
  get context() {
9237
- return hr.instance;
9252
+ return lr.instance;
9238
9253
  }
9239
9254
  async load() {
9240
9255
  return new Promise((e) => {
@@ -9245,7 +9260,7 @@ class wn {
9245
9260
  return new Et();
9246
9261
  }
9247
9262
  }
9248
- class ks extends fe {
9263
+ class Ms extends fe {
9249
9264
  constructor(e, t) {
9250
9265
  super(), this._input = e, this._output = t;
9251
9266
  }
@@ -9278,16 +9293,16 @@ class Ml {
9278
9293
  }
9279
9294
  }
9280
9295
  function Pn() {
9281
- if (Vr)
9296
+ if ($r)
9282
9297
  return new AudioContext();
9283
- if (Gr) {
9298
+ if (Vr) {
9284
9299
  const r = globalThis.webkitAudioContext;
9285
9300
  return new r();
9286
9301
  } else
9287
9302
  throw new Error("Failed to createAudioContext");
9288
9303
  }
9289
9304
  function Tn(r, e, t) {
9290
- if (Wr)
9305
+ if (Gr)
9291
9306
  return new OfflineAudioContext(r, e, t);
9292
9307
  if (gi) {
9293
9308
  const s = globalThis.webkitOfflineAudioContext;
@@ -9295,11 +9310,11 @@ function Tn(r, e, t) {
9295
9310
  } else
9296
9311
  throw new Error("Failed to createOfflineAudioContext");
9297
9312
  }
9298
- class ye extends ks {
9313
+ class xe extends Ms {
9299
9314
  /** Singleton */
9300
9315
  static _instance;
9301
9316
  static get instance() {
9302
- return this._instance || (this._instance = new ye()), this._instance;
9317
+ return this._instance || (this._instance = new xe()), this._instance;
9303
9318
  }
9304
9319
  static get audioContext() {
9305
9320
  return this.instance.audioContext;
@@ -9343,7 +9358,7 @@ class ye extends ks {
9343
9358
  const e = Pn(), t = Tn(
9344
9359
  1,
9345
9360
  2,
9346
- Wr ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100
9361
+ Gr ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100
9347
9362
  ), s = e.createDynamicsCompressor(), i = e.createAnalyser();
9348
9363
  i.connect(s), s.connect(e.destination), super(i, s), this._context = e, this._offlineContext = t, this._compressor = s, this._analyser = i, this._locked = e.state === "suspended" && (ce || mi), Ot && (this._locked && (this._unlock(), document.addEventListener("mousedown", this._unlock, !0), document.addEventListener("touchstart", this._unlock, !0), document.addEventListener("touchend", this._unlock, !0)), globalThis.addEventListener("focus", this._onFocus), globalThis.addEventListener("blur", this._onBlur));
9349
9364
  }
@@ -9536,16 +9551,16 @@ class En extends fe {
9536
9551
  };
9537
9552
  _updateListener = () => this._update();
9538
9553
  _enableTicker(e) {
9539
- k.off(this._updateListener), e && k.on(this._updateListener);
9554
+ U.off(this._updateListener), e && U.on(this._updateListener);
9540
9555
  }
9541
9556
  destroy() {
9542
9557
  super.destroy(), this._stop(), this._gain?.disconnect(), this._gain = null, this._audio?.context.off("refresh", this.refresh), this._audio?.context.off("refreshPaused", this.refreshPaused), this._audio = null, this._processors.forEach((e) => e.disconnect()), this._processors.length = 0, this._end = 0, this._playbackRate = 1, this._volume = 1, this._loop = !1, this._elapsed = 0, this._duration = 0, this._paused = !1, this._muted = !1, this._pausedReal = !1;
9543
9558
  }
9544
9559
  }
9545
- class Sn extends ks {
9560
+ class Sn extends Ms {
9546
9561
  constructor(e) {
9547
- const t = ye.audioContext, s = t.createBufferSource(), i = t.createGain(), o = t.createAnalyser();
9548
- s.connect(o), o.connect(i), i.connect(ye.instance.destination), super(o, i), this.parent = e, this._sourceNode = s, this.gain = i, this.analyser = o;
9562
+ const t = xe.audioContext, s = t.createBufferSource(), i = t.createGain(), o = t.createAnalyser();
9563
+ s.connect(o), o.connect(i), i.connect(xe.instance.destination), super(o, i), this.parent = e, this._sourceNode = s, this.gain = i, this.analyser = o;
9549
9564
  }
9550
9565
  /** Source */
9551
9566
  _sourceBuffer;
@@ -9555,7 +9570,7 @@ class Sn extends ks {
9555
9570
  gain;
9556
9571
  analyser;
9557
9572
  get context() {
9558
- return ye.instance;
9573
+ return xe.instance;
9559
9574
  }
9560
9575
  get isPlayable() {
9561
9576
  return !!this._sourceNode.buffer;
@@ -9581,7 +9596,7 @@ class Sn extends ks {
9581
9596
  }
9582
9597
  _decode(e) {
9583
9598
  return Promise.resolve(
9584
- e instanceof AudioBuffer ? e : ye.decode(e)
9599
+ e instanceof AudioBuffer ? e : xe.decode(e)
9585
9600
  ).then((t) => (this.parent.isLoaded = !0, this.buffer = t, t));
9586
9601
  }
9587
9602
  cloneSource() {
@@ -9597,7 +9612,7 @@ var Cn = Object.defineProperty, An = Object.getOwnPropertyDescriptor, Rn = (r, e
9597
9612
  (a = r[o]) && (i = a(i) || i);
9598
9613
  return i;
9599
9614
  }, Mn = (r, e, t) => Rn(r, e + "", t);
9600
- let xe = class extends W {
9615
+ let we = class extends W {
9601
9616
  _sounds = [];
9602
9617
  /** PlatformAudio */
9603
9618
  _platformAudio = vi ? new Sn(this) : new wn(this);
@@ -9703,7 +9718,7 @@ let xe = class extends W {
9703
9718
  this._sounds.length = 0;
9704
9719
  }
9705
9720
  _createSound() {
9706
- return xe._soundPool.length > 0 ? xe._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9721
+ return we._soundPool.length > 0 ? we._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9707
9722
  }
9708
9723
  refresh() {
9709
9724
  for (let r = this._sounds.length, e = 0; e < r; e++)
@@ -9721,7 +9736,7 @@ let xe = class extends W {
9721
9736
  this._recycleSound(r);
9722
9737
  };
9723
9738
  _recycleSound(r) {
9724
- r.destroy(), xe._soundPool.includes(r) || xe._soundPool.push(r);
9739
+ r.destroy(), we._soundPool.includes(r) || we._soundPool.push(r);
9725
9740
  }
9726
9741
  _prevTime = 0;
9727
9742
  _timer = 0;
@@ -9739,11 +9754,11 @@ let xe = class extends W {
9739
9754
  }, 100);
9740
9755
  }
9741
9756
  };
9742
- Mn(xe, "_soundPool", []);
9743
- xe = On([
9744
- v("Audio")
9745
- ], xe);
9746
- class kl extends Pe {
9757
+ Mn(we, "_soundPool", []);
9758
+ we = On([
9759
+ g("Audio")
9760
+ ], we);
9761
+ class kl extends Te {
9747
9762
  //
9748
9763
  }
9749
9764
  var kn = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, It = (r, e, t, s) => {
@@ -9751,7 +9766,7 @@ var kn = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, It = (r, e
9751
9766
  (a = r[o]) && (i = (s ? a(e, t, i) : a(i)) || i);
9752
9767
  return s && i && kn(e, t, i), i;
9753
9768
  };
9754
- let ot = class extends Ee {
9769
+ let ot = class extends Se {
9755
9770
  _audioBuffer;
9756
9771
  _src = Ot ? new T(document.createElement("canvas")) : void 0;
9757
9772
  _needsUpdateTexture = !1;
@@ -9772,7 +9787,7 @@ let ot = class extends Ee {
9772
9787
  }
9773
9788
  }
9774
9789
  async _loadSrc(r) {
9775
- await globalThis.fetch(r).then((e) => e.arrayBuffer()).then((e) => ye.decode(e)).then((e) => {
9790
+ await globalThis.fetch(r).then((e) => e.arrayBuffer()).then((e) => xe.decode(e)).then((e) => {
9776
9791
  this._audioBuffer = e, this.syncTexture(!0);
9777
9792
  });
9778
9793
  }
@@ -9793,14 +9808,14 @@ let ot = class extends Ee {
9793
9808
  }
9794
9809
  o.fillStyle = this.color;
9795
9810
  const a = e.getChannelData(0), n = Math.ceil(a.length / s), h = i / 2;
9796
- for (let l = 1, u = -1, d = 0; d < s; d++) {
9811
+ for (let l = 1, c = -1, d = 0; d < s; d++) {
9797
9812
  for (let f = 0; f < n; f++) {
9798
9813
  const _ = a[d * n + f];
9799
- _ < l && (l = _), _ > u && (u = _);
9814
+ _ < l && (l = _), _ > c && (c = _);
9800
9815
  }
9801
9816
  if (!this.gap || d % (this.gap * 2) === 0) {
9802
- const f = d, _ = (1 + l) * h, p = this.gap || 1, m = Math.max(1, (u - l) * h);
9803
- o.fillRect(f, _, p, m), l = 1, u = -1;
9817
+ const f = d, _ = (1 + l) * h, p = this.gap || 1, m = Math.max(1, (c - l) * h);
9818
+ o.fillRect(f, _, p, m), l = 1, c = -1;
9804
9819
  }
9805
9820
  }
9806
9821
  this._src?.requestUpload(), this.requestRedraw();
@@ -9817,55 +9832,55 @@ let ot = class extends Ee {
9817
9832
  }
9818
9833
  };
9819
9834
  It([
9820
- c()
9835
+ u()
9821
9836
  ], ot.prototype, "src", 2);
9822
9837
  It([
9823
- c({ fallback: 0 })
9838
+ u({ fallback: 0 })
9824
9839
  ], ot.prototype, "gap", 2);
9825
9840
  It([
9826
- c({ fallback: "#000000" })
9841
+ u({ fallback: "#000000" })
9827
9842
  ], ot.prototype, "color", 2);
9828
9843
  ot = It([
9829
- v("AudioWaveform")
9844
+ g("AudioWaveform")
9830
9845
  ], ot);
9831
9846
  var Dn = Object.defineProperty, In = Object.getOwnPropertyDescriptor, Bn = (r, e, t) => e in r ? Dn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, zn = (r, e, t, s) => {
9832
9847
  for (var i = s > 1 ? void 0 : s ? In(e, t) : e, o = r.length - 1, a; o >= 0; o--)
9833
9848
  (a = r[o]) && (i = a(i) || i);
9834
9849
  return i;
9835
9850
  }, Nn = (r, e, t) => Bn(r, e + "", t);
9836
- let St = class extends ke {
9851
+ let St = class extends Ue {
9837
9852
  blur = 10;
9838
9853
  quality = 10;
9839
9854
  apply(r, e) {
9840
9855
  const t = this.currentTimeProgress;
9841
9856
  let s, i;
9842
9857
  t < 0.5 ? (s = 0, i = (0.5 - t) / 0.5) : (s = 1, i = (t - 0.5) / 0.5);
9843
- const o = this.blur, a = this.quality, n = e.width, h = e.height, l = [], u = [o];
9858
+ const o = this.blur, a = this.quality, n = e.width, h = e.height, l = [], c = [o];
9844
9859
  if (o > 0) {
9845
- let g = o;
9846
- const w = o / a;
9860
+ let v = o;
9861
+ const y = o / a;
9847
9862
  for (let P = 1; P < a; P++)
9848
- g -= w, u.push(g);
9863
+ v -= y, c.push(v);
9849
9864
  }
9850
9865
  const d = 1 / n, f = 1 / h, _ = [];
9851
9866
  let p;
9852
9867
  const m = a - 1;
9853
- for (let g = 0; g < m; g++)
9854
- p = u[g] + 0.5, _[0] = p * d, _[1] = p * f, l.push({
9868
+ for (let v = 0; v < m; v++)
9869
+ p = c[v] + 0.5, _[0] = p * d, _[1] = p * f, l.push({
9855
9870
  offset: _
9856
9871
  });
9857
- p = u[m] + 0.5, _[0] = p * d, _[1] = p * f, l.push({
9872
+ p = c[m] + 0.5, _[0] = p * d, _[1] = p * f, l.push({
9858
9873
  offset: _
9859
- }), l.forEach((g) => {
9874
+ }), l.forEach((v) => {
9860
9875
  b.draw(r, St.material, {
9861
9876
  sampler: s,
9862
9877
  progress: i,
9863
- ...g
9878
+ ...v
9864
9879
  });
9865
9880
  });
9866
9881
  }
9867
9882
  };
9868
- Nn(St, "material", new x({
9883
+ Nn(St, "material", new w({
9869
9884
  vert: `attribute vec2 position;
9870
9885
  attribute vec2 uv;
9871
9886
  varying vec2 vUv;
@@ -9891,14 +9906,14 @@ void main(void) {
9891
9906
  }`
9892
9907
  }));
9893
9908
  St = zn([
9894
- v("KawaseTransition")
9909
+ g("KawaseTransition")
9895
9910
  ], St);
9896
9911
  var Ln = Object.defineProperty, Fn = Object.getOwnPropertyDescriptor, $n = (r, e, t) => e in r ? Ln(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Vn = (r, e, t, s) => {
9897
9912
  for (var i = s > 1 ? void 0 : s ? Fn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
9898
9913
  (a = r[o]) && (i = a(i) || i);
9899
9914
  return i;
9900
9915
  }, Gn = (r, e, t) => $n(r, e + "", t);
9901
- let Ct = class extends ke {
9916
+ let Ct = class extends Ue {
9902
9917
  apply(r) {
9903
9918
  b.draw(r, Ct.material, {
9904
9919
  previous: 0,
@@ -9907,7 +9922,7 @@ let Ct = class extends ke {
9907
9922
  });
9908
9923
  }
9909
9924
  };
9910
- Gn(Ct, "material", new x({
9925
+ Gn(Ct, "material", new w({
9911
9926
  vert: `attribute vec2 position;
9912
9927
  attribute vec2 uv;
9913
9928
  varying vec2 vUv;
@@ -9937,21 +9952,21 @@ void main() {
9937
9952
  }`
9938
9953
  }));
9939
9954
  Ct = Vn([
9940
- v("LeftEraseTransition")
9955
+ g("LeftEraseTransition")
9941
9956
  ], Ct);
9942
9957
  var Wn = Object.defineProperty, jn = Object.getOwnPropertyDescriptor, qn = (r, e, t) => e in r ? Wn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Xn = (r, e, t, s) => {
9943
9958
  for (var i = s > 1 ? void 0 : s ? jn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
9944
9959
  (a = r[o]) && (i = a(i) || i);
9945
9960
  return i;
9946
9961
  }, Hn = (r, e, t) => qn(r, e + "", t);
9947
- let at = class extends ke {
9962
+ let at = class extends Ue {
9948
9963
  blur = 100;
9949
9964
  gradientBlur = 600;
9950
9965
  apply(r, e) {
9951
9966
  const t = this.currentTimeProgress;
9952
9967
  let s, i;
9953
9968
  t < 0.5 ? (s = 0, i = (0.5 - t) / 0.5) : (s = 1, i = (t - 0.5) / 0.5);
9954
- const o = e.width, a = e.height, n = [0, a / 2], h = [600, a / 2], l = [o, a], u = h[0] - n[0], d = h[1] - n[1], f = Math.sqrt(u * u + d * d);
9969
+ const o = e.width, a = e.height, n = [0, a / 2], h = [600, a / 2], l = [o, a], c = h[0] - n[0], d = h[1] - n[1], f = Math.sqrt(c * c + d * d);
9955
9970
  b.draw(r, at.material, {
9956
9971
  sampler: s,
9957
9972
  progress: i,
@@ -9959,7 +9974,7 @@ let at = class extends ke {
9959
9974
  gradientBlur: this.gradientBlur,
9960
9975
  start: n,
9961
9976
  end: h,
9962
- delta: [u / f, d / f],
9977
+ delta: [c / f, d / f],
9963
9978
  texSize: l
9964
9979
  }), b.draw(r, at.material, {
9965
9980
  sampler: s,
@@ -9968,12 +9983,12 @@ let at = class extends ke {
9968
9983
  gradientBlur: this.gradientBlur,
9969
9984
  start: n,
9970
9985
  end: h,
9971
- delta: [-d / f, u / f],
9986
+ delta: [-d / f, c / f],
9972
9987
  texSize: l
9973
9988
  });
9974
9989
  }
9975
9990
  };
9976
- Hn(at, "material", new x({
9991
+ Hn(at, "material", new w({
9977
9992
  vert: `attribute vec2 position;
9978
9993
  attribute vec2 uv;
9979
9994
  varying vec2 vUv;
@@ -10022,14 +10037,14 @@ void main(void) {
10022
10037
  }`
10023
10038
  }));
10024
10039
  at = Xn([
10025
- v("TiltShiftTransition")
10040
+ g("TiltShiftTransition")
10026
10041
  ], at);
10027
10042
  var Yn = Object.defineProperty, Kn = Object.getOwnPropertyDescriptor, Zn = (r, e, t) => e in r ? Yn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Jn = (r, e, t, s) => {
10028
10043
  for (var i = s > 1 ? void 0 : s ? Kn(e, t) : e, o = r.length - 1, a; o >= 0; o--)
10029
10044
  (a = r[o]) && (i = a(i) || i);
10030
10045
  return i;
10031
10046
  }, Qn = (r, e, t) => Zn(r, e + "", t);
10032
- let At = class extends ke {
10047
+ let At = class extends Ue {
10033
10048
  radius;
10034
10049
  angle = 4;
10035
10050
  padding = 20;
@@ -10050,7 +10065,7 @@ let At = class extends ke {
10050
10065
  });
10051
10066
  }
10052
10067
  };
10053
- Qn(At, "material", new x({
10068
+ Qn(At, "material", new w({
10054
10069
  vert: `attribute vec2 position;
10055
10070
  attribute vec2 uv;
10056
10071
  varying vec2 vUv;
@@ -10101,19 +10116,19 @@ void main(void) {
10101
10116
  }`
10102
10117
  }));
10103
10118
  At = Jn([
10104
- v("TwistTransition")
10119
+ g("TwistTransition")
10105
10120
  ], At);
10106
- class el extends Se {
10121
+ class el extends Ce {
10107
10122
  install(e) {
10108
10123
  const t = async (s) => {
10109
10124
  const { decodeFrames: i } = await import("modern-gif");
10110
10125
  return await s.arrayBuffer().then((o) => i(
10111
10126
  o,
10112
10127
  e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0
10113
- )).then((o) => new Vt(
10128
+ )).then((o) => new $t(
10114
10129
  o.map((a) => ({
10115
10130
  duration: a.delay,
10116
- texture: new ts(a.data, a.width, a.height)
10131
+ texture: new es(a.data, a.width, a.height)
10117
10132
  }))
10118
10133
  ));
10119
10134
  };
@@ -10124,7 +10139,7 @@ class el extends Se {
10124
10139
  }), e.gif = this, this;
10125
10140
  }
10126
10141
  }
10127
- class tl extends Se {
10142
+ class tl extends Ce {
10128
10143
  install(e) {
10129
10144
  const t = async (s) => JSON.parse(await s.text());
10130
10145
  return this.load = (s) => typeof s == "string" ? e.loadBy(s).then(t) : t(s), [
@@ -10134,7 +10149,7 @@ class tl extends Se {
10134
10149
  }), e.json = this, this;
10135
10150
  }
10136
10151
  }
10137
- class rl extends Se {
10152
+ class rl extends Ce {
10138
10153
  install(e) {
10139
10154
  return this.load = async (t, s) => (await import("lottie-web").then((o) => o.default)).loadAnimation({
10140
10155
  container: null,
@@ -10151,13 +10166,13 @@ class rl extends Se {
10151
10166
  }), e.lottie = this, this;
10152
10167
  }
10153
10168
  }
10154
- class sl extends Se {
10169
+ class sl extends Ce {
10155
10170
  install(e) {
10156
10171
  const t = async (s) => s.text();
10157
10172
  return this.load = (s) => typeof s == "string" ? e.loadBy(s).then(t) : t(s), e.text = this, this;
10158
10173
  }
10159
10174
  }
10160
- class il extends Se {
10175
+ class il extends Ce {
10161
10176
  install(e) {
10162
10177
  const t = (s) => e.fetchImageBitmap(s, { premultiplyAlpha: "premultiply" }).then((i) => new T(i));
10163
10178
  return this.load = (s) => typeof s == "string" ? e.loadBy(s).then(t) : t(s), [
@@ -10175,7 +10190,7 @@ class il extends Se {
10175
10190
  }), e.texture = this, this;
10176
10191
  }
10177
10192
  }
10178
- class ol extends Se {
10193
+ class ol extends Ce {
10179
10194
  install(e) {
10180
10195
  return this.load = (t) => new _o(t).load(), e.video = this, this;
10181
10196
  }
@@ -10222,7 +10237,7 @@ class hl extends fe {
10222
10237
  t && "destroy" in t && t.destroy(), this._handled.delete(e);
10223
10238
  }) : void 0;
10224
10239
  constructor() {
10225
- super(), vt || k.on(this.gc.bind(this), { sort: 2 });
10240
+ super(), vt || U.on(this.gc.bind(this), { sort: 2 });
10226
10241
  }
10227
10242
  use(e) {
10228
10243
  return e.install(this), this;
@@ -10306,12 +10321,12 @@ class hl extends fe {
10306
10321
  }
10307
10322
  }
10308
10323
  const z = new hl().use(new to()).use(new el()).use(new tl()).use(new rl()).use(new sl()).use(new il()).use(new ol());
10309
- var cl = Object.defineProperty, cr = (r, e, t, s) => {
10324
+ var cl = Object.defineProperty, ks = (r, e, t, s) => {
10310
10325
  for (var i = void 0, o = r.length - 1, a; o >= 0; o--)
10311
10326
  (a = r[o]) && (i = a(e, t, i) || i);
10312
10327
  return i && cl(e, t, i), i;
10313
10328
  };
10314
- const Oe = {
10329
+ const Me = {
10315
10330
  alpha: !0,
10316
10331
  stencil: !0,
10317
10332
  antialias: !1,
@@ -10319,7 +10334,7 @@ const Oe = {
10319
10334
  preserveDrawingBuffer: !1,
10320
10335
  powerPreference: "default"
10321
10336
  };
10322
- class Bt extends Ae {
10337
+ class hr extends me {
10323
10338
  renderer;
10324
10339
  get view() {
10325
10340
  return this.renderer.view;
@@ -10354,16 +10369,16 @@ class Bt extends Ae {
10354
10369
  view: t,
10355
10370
  width: s,
10356
10371
  height: i,
10357
- pixelRatio: o = jr,
10372
+ pixelRatio: o = Wr,
10358
10373
  autoResize: a
10359
10374
  } = e;
10360
10375
  super(), this.renderer = new eo(t, {
10361
- alpha: Oe.alpha ?? e.alpha,
10362
- stencil: Oe.stencil ?? e.stencil,
10363
- antialias: Oe.antialias ?? e.antialias,
10364
- premultipliedAlpha: Oe.premultipliedAlpha ?? e.premultipliedAlpha,
10365
- preserveDrawingBuffer: Oe.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
10366
- powerPreference: Oe.powerPreference ?? e.powerPreference
10376
+ alpha: Me.alpha ?? e.alpha,
10377
+ stencil: Me.stencil ?? e.stencil,
10378
+ antialias: Me.antialias ?? e.antialias,
10379
+ premultipliedAlpha: Me.premultipliedAlpha ?? e.premultipliedAlpha,
10380
+ preserveDrawingBuffer: Me.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
10381
+ powerPreference: Me.powerPreference ?? e.powerPreference
10367
10382
  }), this._setupInput(), this.pixelRatio = o, a ? !t && this.renderer.view && (this.renderer.view.style.width = "100%", this.renderer.view.style.height = "100%") : this.resize(
10368
10383
  s || this.gl.drawingBufferWidth || this.view?.clientWidth || 200,
10369
10384
  i || this.gl.drawingBufferHeight || this.view?.clientHeight || 200,
@@ -10400,7 +10415,7 @@ class Bt extends Ae {
10400
10415
  return this.renderer.resize(e, t, s), this.root.width = e, this.root.height = t, this.root.requestUpload(), this.render(), this;
10401
10416
  }
10402
10417
  nextTick() {
10403
- return Lr();
10418
+ return Nr();
10404
10419
  }
10405
10420
  async waitUntilLoad() {
10406
10421
  await z.waitUntilLoad(), await this.nextTick();
@@ -10450,22 +10465,19 @@ class Bt extends Ae {
10450
10465
  this._resizeObserver?.disconnect(), this.renderer.destroy(), super.destroy();
10451
10466
  }
10452
10467
  }
10453
- cr([
10454
- c({ alias: "root.msaa" })
10455
- ], Bt.prototype, "msaa");
10456
- cr([
10457
- c({ fallback: !1 })
10458
- ], Bt.prototype, "autoResize");
10459
- cr([
10460
- c({ fallback: !1 })
10461
- ], Bt.prototype, "autoStart");
10462
- let I;
10463
- const qt = [];
10464
- let $t = !1;
10468
+ ks([
10469
+ u({ fallback: !1 })
10470
+ ], hr.prototype, "autoResize");
10471
+ ks([
10472
+ u({ fallback: !1 })
10473
+ ], hr.prototype, "autoStart");
10474
+ let k;
10475
+ const jt = [];
10476
+ let Ft = !1;
10465
10477
  async function ul(r = 100) {
10466
- if (!$t) {
10467
- for ($t = !0; qt.length; ) {
10468
- const e = qt.shift();
10478
+ if (!Ft) {
10479
+ for (Ft = !0; jt.length; ) {
10480
+ const e = jt.shift();
10469
10481
  if (e)
10470
10482
  try {
10471
10483
  await e();
@@ -10475,7 +10487,7 @@ async function ul(r = 100) {
10475
10487
  else
10476
10488
  await new Promise((t) => setTimeout(t, r));
10477
10489
  }
10478
- $t = !1;
10490
+ Ft = !1;
10479
10491
  }
10480
10492
  }
10481
10493
  async function dl(r) {
@@ -10487,49 +10499,50 @@ async function dl(r) {
10487
10499
  data: o,
10488
10500
  keyframes: a = [],
10489
10501
  onBefore: n,
10490
- onKeyframe: h
10502
+ onKeyframe: h,
10503
+ ...l
10491
10504
  } = r;
10492
- return I ??= new Bt({
10505
+ return k ??= new hr({
10493
10506
  pixelRatio: 1,
10494
10507
  width: 1,
10495
10508
  height: 1,
10496
10509
  preserveDrawingBuffer: !0
10497
- }), I.debug = e, I.fonts = t, I.timeline.currentTime = 0, I.root.removeChildren(), I.resize(s, i, !0), (Array.isArray(o) ? o : [o]).forEach((l) => {
10498
- l instanceof M ? (l.parent = void 0, I.root.appendChild(l)) : I.root.appendChild(M.parse(l));
10499
- }), await n?.(I), await I.waitAndRender(), a.length && await new Promise((l) => {
10500
- let u = 0;
10501
- const d = a.length, f = a[d - 1];
10502
- async function _() {
10503
- if (u === d)
10504
- return l();
10505
- const p = a[u++], g = (a[u] || p) - p;
10506
- I.timeline.currentTime = p, I.render(), await h?.(I.toPixels(), {
10507
- currentTime: p,
10508
- duration: g,
10509
- progress: f !== 0 ? p / f : 1
10510
- }), requestAnimationFrame(_);
10511
- }
10512
- _();
10513
- }), I.toCanvas2D();
10510
+ }), k.resetProperties(), k.setProperties(l), k.debug = e, k.fonts = t, k.timeline.currentTime = 0, k.root.removeChildren(), k.resize(s, i, !0), (Array.isArray(o) ? o : [o]).forEach((c) => {
10511
+ c instanceof M ? (c.parent = void 0, k.root.appendChild(c)) : k.root.appendChild(M.parse(c));
10512
+ }), await n?.(k), await k.waitAndRender(), a.length && await new Promise((c) => {
10513
+ let d = 0;
10514
+ const f = a.length, _ = a[f - 1];
10515
+ async function p() {
10516
+ if (d === f)
10517
+ return c();
10518
+ const m = a[d++], y = (a[d] || m) - m;
10519
+ k.timeline.currentTime = m, k.render(), await h?.(k.toPixels(), {
10520
+ currentTime: m,
10521
+ duration: y,
10522
+ progress: _ !== 0 ? m / _ : 1
10523
+ }), requestAnimationFrame(p);
10524
+ }
10525
+ p();
10526
+ }), k.toCanvas2D();
10514
10527
  }
10515
10528
  async function Ul(r) {
10516
10529
  return new Promise((e) => {
10517
- qt.push(async () => e(await dl(r))), ul();
10530
+ jt.push(async () => e(await dl(r))), ul();
10518
10531
  });
10519
10532
  }
10520
10533
  export {
10521
- Vt as AnimatedTexture,
10534
+ $t as AnimatedTexture,
10522
10535
  it as Animation,
10523
10536
  hl as Assets,
10524
- xe as Audio,
10525
- ks as AudioPipeline,
10537
+ we as Audio,
10538
+ Ms as AudioPipeline,
10526
10539
  Ml as AudioProcessor,
10527
10540
  kl as AudioSpectrum,
10528
10541
  ot as AudioWaveform,
10529
10542
  st as BaseElement2D,
10530
- Ss as BaseElement2DBackground,
10531
- D as BaseElement2DFill,
10532
- Cs as BaseElement2DForeground,
10543
+ Es as BaseElement2DBackground,
10544
+ I as BaseElement2DFill,
10545
+ Ss as BaseElement2DForeground,
10533
10546
  Ge as BaseElement2DOutline,
10534
10547
  We as BaseElement2DShadow,
10535
10548
  je as BaseElement2DShape,
@@ -10537,43 +10550,43 @@ export {
10537
10550
  te as BaseElement2DText,
10538
10551
  Pt as Camera2D,
10539
10552
  mo as CanvasContext,
10540
- we as CanvasItem,
10541
- Qt as CanvasTexture,
10553
+ Pe as CanvasItem,
10554
+ Jt as CanvasTexture,
10542
10555
  J as Color,
10543
10556
  V as ColorAdjustEffect,
10544
10557
  Je as ColorFilterEffect,
10545
- Yr as ColorMatrix,
10546
- Ue as ColorOverlayEffect,
10547
- De as ColorRemoveEffect,
10548
- Ie as ColorReplaceEffect,
10558
+ Hr as ColorMatrix,
10559
+ De as ColorOverlayEffect,
10560
+ Ie as ColorRemoveEffect,
10561
+ Be as ColorReplaceEffect,
10549
10562
  Al as ColorTexture,
10550
10563
  pe as CoreObject,
10551
10564
  Di as DEG_TO_RAD,
10552
- jr as DEVICE_PIXEL_RATIO,
10565
+ Wr as DEVICE_PIXEL_RATIO,
10553
10566
  q as DrawboardEffect,
10554
10567
  Q as DropShadowEffect,
10555
- y as Effect,
10568
+ x as Effect,
10556
10569
  yt as EffectMaterial,
10557
- Ee as Element2D,
10558
- As as Element2DStyle,
10570
+ Se as Element2D,
10571
+ Cs as Element2DStyle,
10559
10572
  Qe as EmbossEffect,
10560
- Bt as Engine,
10561
- Dr as FlexElement2D,
10573
+ hr as Engine,
10574
+ Ur as FlexElement2D,
10562
10575
  Qa as FlexElement2DStyle,
10563
- lr as FlexLayout,
10576
+ nr as FlexLayout,
10564
10577
  to as FontLoader,
10565
10578
  ae as GaussianBlurEffect,
10566
- Jt as Geometry,
10579
+ Zt as Geometry,
10567
10580
  el as GifLoader,
10568
10581
  N as GlitchEffect,
10569
10582
  X as GodrayEffect,
10570
10583
  kt as GradientTexture,
10571
10584
  wn as HTMLAudio,
10572
- hr as HTMLAudioContext,
10585
+ lr as HTMLAudioContext,
10573
10586
  Et as HTMLSound,
10574
10587
  Ot as IN_BROWSER,
10575
10588
  bi as IN_MAC_OS,
10576
- Be as Image2D,
10589
+ ze as Image2D,
10577
10590
  Rl as ImageTexture,
10578
10591
  nt as IndexBuffer,
10579
10592
  Oi as Input,
@@ -10583,61 +10596,61 @@ export {
10583
10596
  St as KawaseTransition,
10584
10597
  Si as KeyboardInputEvent,
10585
10598
  Ct as LeftEraseTransition,
10586
- Se as Loader,
10587
- Wt as Lottie2D,
10599
+ Ce as Loader,
10600
+ Gt as Lottie2D,
10588
10601
  rl as LottieLoader,
10589
- Kt as MainLoop,
10590
- Te as MaskEffect,
10591
- x as Material,
10602
+ Yt as MainLoop,
10603
+ Ee as MaskEffect,
10604
+ w as Material,
10592
10605
  se as Matrix,
10593
10606
  Tl as Matrix2,
10594
- Kr as Matrix3,
10607
+ Yr as Matrix3,
10595
10608
  Ui as Matrix4,
10596
10609
  vo as Meta,
10597
- Hr as MouseInputEvent,
10610
+ Xr as MouseInputEvent,
10598
10611
  M as Node,
10599
- Pe as Node2D,
10600
- U as OutlineEffect,
10601
- Yt as PI,
10612
+ Te as Node2D,
10613
+ D as OutlineEffect,
10614
+ Ht as PI,
10602
10615
  B as PI_2,
10603
10616
  tt as PixelateEffect,
10604
- ts as PixelsTexture,
10617
+ es as PixelsTexture,
10605
10618
  Ci as PointerInputEvent,
10606
10619
  Bi as Projection2D,
10607
10620
  Sl as QuadGeometry,
10608
10621
  b as QuadUvGeometry,
10609
10622
  wl as RAD_TO_DEG,
10610
- Xr as RawWeakMap,
10611
- be as Rect2,
10623
+ qr as RawWeakMap,
10624
+ ye as Rect2,
10612
10625
  ki as RefCounted,
10613
- Zt as Renderer,
10626
+ Kt as Renderer,
10614
10627
  _e as Resource,
10615
- Vr as SUPPORTS_AUDIO_CONTEXT,
10628
+ $r as SUPPORTS_AUDIO_CONTEXT,
10616
10629
  mi as SUPPORTS_CLICK_EVENTS,
10617
- $r as SUPPORTS_CREATE_IMAGE_BITMAP,
10630
+ Fr as SUPPORTS_CREATE_IMAGE_BITMAP,
10618
10631
  fi as SUPPORTS_IMAGE_BITMAP,
10619
10632
  yl as SUPPORTS_MOUSE_EVENTS,
10620
- Wr as SUPPORTS_OFFLINE_AUDIO_CONTEXT,
10633
+ Gr as SUPPORTS_OFFLINE_AUDIO_CONTEXT,
10621
10634
  He as SUPPORTS_POINTER_EVENTS,
10622
10635
  pi as SUPPORTS_RESIZE_OBSERVER,
10623
10636
  ce as SUPPORTS_TOUCH_EVENTS,
10624
10637
  di as SUPPORTS_WEBGL2,
10625
- Gr as SUPPORTS_WEBKIT_AUDIO_CONTEXT,
10638
+ Vr as SUPPORTS_WEBKIT_AUDIO_CONTEXT,
10626
10639
  gi as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT,
10627
10640
  vi as SUPPORTS_WEB_AUDIO,
10628
10641
  _i as SUPPORTS_WHEEL_EVENTS,
10629
- Ae as SceneTree,
10642
+ me as SceneTree,
10630
10643
  sl as TextLoader,
10631
10644
  T as Texture2D,
10632
10645
  il as TextureLoader,
10633
- Rs as TextureRect2D,
10634
- k as Ticker,
10646
+ As as TextureRect2D,
10647
+ U as Ticker,
10635
10648
  at as TiltShiftTransition,
10636
10649
  oe as Timeline,
10637
10650
  W as TimelineNode,
10638
10651
  O as Transform2D,
10639
10652
  dn as TransformRect2D,
10640
- ke as Transition,
10653
+ Ue as Transition,
10641
10654
  At as TwistTransition,
10642
10655
  Cl as UvGeometry,
10643
10656
  xt as UvMaterial,
@@ -10647,13 +10660,13 @@ export {
10647
10660
  Ii as Vector4,
10648
10661
  $ as VertexAttribute,
10649
10662
  ue as VertexBuffer,
10650
- jt as Video2D,
10663
+ Wt as Video2D,
10651
10664
  ol as VideoLoader,
10652
10665
  _o as VideoTexture,
10653
10666
  j as Viewport,
10654
- wr as ViewportTexture,
10667
+ xr as ViewportTexture,
10655
10668
  Sn as WebAudio,
10656
- ye as WebAudioContext,
10669
+ xe as WebAudioContext,
10657
10670
  $i as WebGLBatch2DModule,
10658
10671
  Ze as WebGLBlendMode,
10659
10672
  Vi as WebGLBufferModule,
@@ -10663,7 +10676,7 @@ export {
10663
10676
  ji as WebGLProgramModule,
10664
10677
  eo as WebGLRenderer,
10665
10678
  Hi as WebGLScissorModule,
10666
- Me as WebGLState,
10679
+ ke as WebGLState,
10667
10680
  Fi as WebGLStateModule,
10668
10681
  Yi as WebGLStencilModule,
10669
10682
  Zi as WebGLTextureModule,
@@ -10673,9 +10686,9 @@ export {
10673
10686
  Ai as WheelInputEvent,
10674
10687
  wt as Window,
10675
10688
  de as ZoomBlurEffect,
10676
- Re as alignMap,
10689
+ Oe as alignMap,
10677
10690
  z as assets,
10678
- Ur as boxSizingMap,
10691
+ kr as boxSizingMap,
10679
10692
  ie as clamp,
10680
10693
  Ca as clampFrag,
10681
10694
  Pi as createHTMLCanvas,
@@ -10683,43 +10696,43 @@ export {
10683
10696
  Ei as crossOrigin,
10684
10697
  _t as cubicBezier,
10685
10698
  Pl as curves,
10686
- v as customNode,
10687
- Ht as customNodes,
10688
- Oe as defaultOptions,
10699
+ g as customNode,
10700
+ Xt as customNodes,
10701
+ Me as defaultOptions,
10689
10702
  Ti as determineCrossOrigin,
10690
- Gt as directionMap,
10691
- Cr as displayMap,
10703
+ Vt as directionMap,
10704
+ Sr as displayMap,
10692
10705
  vn as ease,
10693
10706
  bn as easeIn,
10694
10707
  xn as easeInOut,
10695
10708
  yn as easeOut,
10696
10709
  E as edgeMap,
10697
- Ar as flexDirectionMap,
10698
- Rr as flexWrapMap,
10710
+ Cr as flexDirectionMap,
10711
+ Ar as flexWrapMap,
10699
10712
  Sa as frag,
10700
- br as getDefaultCssPropertyValue,
10713
+ vr as getDefaultCssPropertyValue,
10701
10714
  rn as gutterMap,
10702
10715
  xi as isCanvasElement,
10703
- qr as isElementNode,
10716
+ jr as isElementNode,
10704
10717
  xl as isImageElement,
10705
- vr as isPow2,
10718
+ gr as isPow2,
10706
10719
  yi as isVideoElement,
10707
10720
  wi as isWebgl2,
10708
- Or as justifyMap,
10721
+ Rr as justifyMap,
10709
10722
  S as lerp,
10710
10723
  gn as linear,
10711
- xr as log2,
10724
+ yr as log2,
10712
10725
  Li as mapWebGLBlendModes,
10713
- yr as nextPow2,
10714
- Lr as nextTick,
10715
- Mr as overflowMap,
10726
+ br as nextPow2,
10727
+ Nr as nextTick,
10728
+ Or as overflowMap,
10716
10729
  Ol as parseCSSFilter,
10717
10730
  Vo as parseCSSTransform,
10718
10731
  Go as parseCSSTransformOrigin,
10719
10732
  Rt as parseCssFunctions,
10720
10733
  mt as parseCssProperty,
10721
- kr as positionTypeMap,
10734
+ Mr as positionTypeMap,
10722
10735
  Ul as render,
10723
- Ft as timingFunctions,
10736
+ Lt as timingFunctions,
10724
10737
  ni as uid
10725
10738
  };