canvasengine 2.0.0-beta.49 → 2.0.0-beta.50

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,5 +1,5 @@
1
1
  import * as Ln from "pixi.js";
2
- import { Point as k, Rectangle as _t, Sprite as pe, Texture as ct, WRAP_MODES as Fn, DisplacementFilter as Hn, ObservablePoint as vs, BlurFilter as qi, Container as Ft, Graphics as oi, Assets as St, Mesh as Wn, Geometry as jn, Ticker as bs, Text as Rn, TilingSprite as Bn, NineSliceSprite as Nn, DOMContainer as Vn, Application as zn, DOMAdapter as Un, ImageSource as Gn, Matrix as Xn } from "pixi.js";
2
+ import { Point as k, Rectangle as _t, Sprite as de, Texture as ct, WRAP_MODES as Fn, DisplacementFilter as Hn, ObservablePoint as vs, BlurFilter as $i, Container as Ft, Graphics as oi, Assets as St, Mesh as Wn, Geometry as jn, Ticker as bs, Text as Rn, TilingSprite as Bn, NineSliceSprite as Nn, DOMContainer as zn, Application as Vn, DOMAdapter as Un, ImageSource as Gn, Matrix as Xn } from "pixi.js";
3
3
  function Yn(s, t) {
4
4
  for (var e = 0; e < t.length; e++) {
5
5
  const i = t[e];
@@ -32,29 +32,29 @@ function kt(s, t) {
32
32
  }
33
33
  s.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
34
34
  }
35
- function qn(s, t, e, i) {
35
+ function $n(s, t, e, i) {
36
36
  function n(r) {
37
37
  return r instanceof e ? r : new e(function(a) {
38
38
  a(r);
39
39
  });
40
40
  }
41
41
  return new (e || (e = Promise))(function(r, a) {
42
- function l(d) {
42
+ function l(p) {
43
43
  try {
44
- f(i.next(d));
44
+ f(i.next(p));
45
45
  } catch (o) {
46
46
  a(o);
47
47
  }
48
48
  }
49
- function c(d) {
49
+ function c(p) {
50
50
  try {
51
- f(i.throw(d));
51
+ f(i.throw(p));
52
52
  } catch (o) {
53
53
  a(o);
54
54
  }
55
55
  }
56
- function f(d) {
57
- d.done ? r(d.value) : n(d.value).then(l, c);
56
+ function f(p) {
57
+ p.done ? r(p.value) : n(p.value).then(l, c);
58
58
  }
59
59
  f((i = i.apply(s, t || [])).next());
60
60
  });
@@ -68,8 +68,8 @@ function ws(s, t) {
68
68
  return this;
69
69
  }), a;
70
70
  function l(f) {
71
- return function(d) {
72
- return c([f, d]);
71
+ return function(p) {
72
+ return c([f, p]);
73
73
  };
74
74
  }
75
75
  function c(f) {
@@ -110,8 +110,8 @@ function ws(s, t) {
110
110
  continue;
111
111
  }
112
112
  f = t.call(s, e);
113
- } catch (d) {
114
- f = [6, d], n = 0;
113
+ } catch (p) {
114
+ f = [6, p], n = 0;
115
115
  } finally {
116
116
  i = r = 0;
117
117
  }
@@ -129,7 +129,7 @@ function Ht(s) {
129
129
  };
130
130
  throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
131
131
  }
132
- function qt(s, t) {
132
+ function $t(s, t) {
133
133
  var e = typeof Symbol == "function" && s[Symbol.iterator];
134
134
  if (!e) return s;
135
135
  var i = e.call(s), n, r = [], a;
@@ -146,7 +146,7 @@ function qt(s, t) {
146
146
  }
147
147
  return r;
148
148
  }
149
- function Kt(s, t, e) {
149
+ function qt(s, t, e) {
150
150
  if (e || arguments.length === 2) for (var i = 0, n = t.length, r; i < n; i++)
151
151
  (r || !(i in t)) && (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
152
152
  return s.concat(r || Array.prototype.slice.call(t));
@@ -154,45 +154,45 @@ function Kt(s, t, e) {
154
154
  function It(s) {
155
155
  return this instanceof It ? (this.v = s, this) : new It(s);
156
156
  }
157
- function Kn(s, t, e) {
157
+ function qn(s, t, e) {
158
158
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
159
159
  var i = e.apply(s, t || []), n, r = [];
160
160
  return n = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), l("next"), l("throw"), l("return", a), n[Symbol.asyncIterator] = function() {
161
161
  return this;
162
162
  }, n;
163
163
  function a(u) {
164
- return function(p) {
165
- return Promise.resolve(p).then(u, o);
164
+ return function(d) {
165
+ return Promise.resolve(d).then(u, o);
166
166
  };
167
167
  }
168
- function l(u, p) {
168
+ function l(u, d) {
169
169
  i[u] && (n[u] = function(m) {
170
170
  return new Promise(function(g, y) {
171
171
  r.push([u, m, g, y]) > 1 || c(u, m);
172
172
  });
173
- }, p && (n[u] = p(n[u])));
173
+ }, d && (n[u] = d(n[u])));
174
174
  }
175
- function c(u, p) {
175
+ function c(u, d) {
176
176
  try {
177
- f(i[u](p));
177
+ f(i[u](d));
178
178
  } catch (m) {
179
179
  h(r[0][3], m);
180
180
  }
181
181
  }
182
182
  function f(u) {
183
- u.value instanceof It ? Promise.resolve(u.value.v).then(d, o) : h(r[0][2], u);
183
+ u.value instanceof It ? Promise.resolve(u.value.v).then(p, o) : h(r[0][2], u);
184
184
  }
185
- function d(u) {
185
+ function p(u) {
186
186
  c("next", u);
187
187
  }
188
188
  function o(u) {
189
189
  c("throw", u);
190
190
  }
191
- function h(u, p) {
192
- u(p), r.shift(), r.length && c(r[0][0], r[0][1]);
191
+ function h(u, d) {
192
+ u(d), r.shift(), r.length && c(r[0][0], r[0][1]);
193
193
  }
194
194
  }
195
- function $n(s) {
195
+ function Kn(s) {
196
196
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
197
197
  var t = s[Symbol.asyncIterator], e;
198
198
  return t ? t.call(s) : (s = typeof Ht == "function" ? Ht(s) : s[Symbol.iterator](), e = {}, i("next"), i("throw"), i("return"), e[Symbol.asyncIterator] = function() {
@@ -262,10 +262,10 @@ var ve = (function() {
262
262
  }
263
263
  else
264
264
  a.remove(this);
265
- var d = this.initialTeardown;
266
- if (F(d))
265
+ var p = this.initialTeardown;
266
+ if (F(p))
267
267
  try {
268
- d();
268
+ p();
269
269
  } catch (m) {
270
270
  r = m instanceof Ie ? m.errors : [m];
271
271
  }
@@ -274,11 +274,11 @@ var ve = (function() {
274
274
  this._finalizers = null;
275
275
  try {
276
276
  for (var h = Ht(o), u = h.next(); !u.done; u = h.next()) {
277
- var p = u.value;
277
+ var d = u.value;
278
278
  try {
279
- Ki(p);
279
+ qi(d);
280
280
  } catch (m) {
281
- r = r ?? [], m instanceof Ie ? r = Kt(Kt([], qt(r)), qt(m.errors)) : r.push(m);
281
+ r = r ?? [], m instanceof Ie ? r = qt(qt([], $t(r)), $t(m.errors)) : r.push(m);
282
282
  }
283
283
  }
284
284
  } catch (m) {
@@ -298,7 +298,7 @@ var ve = (function() {
298
298
  var e;
299
299
  if (t && t !== this)
300
300
  if (this.closed)
301
- Ki(t);
301
+ qi(t);
302
302
  else {
303
303
  if (t instanceof s) {
304
304
  if (t.closed || t._hasParent(this))
@@ -327,7 +327,7 @@ var ve = (function() {
327
327
  function Ss(s) {
328
328
  return s instanceof ve || s && "closed" in s && F(s.remove) && F(s.add) && F(s.unsubscribe);
329
329
  }
330
- function Ki(s) {
330
+ function qi(s) {
331
331
  F(s) ? s() : s.unsubscribe();
332
332
  }
333
333
  var Jn = {
@@ -336,7 +336,7 @@ var Jn = {
336
336
  setTimeout: function(s, t) {
337
337
  for (var e = [], i = 2; i < arguments.length; i++)
338
338
  e[i - 2] = arguments[i];
339
- return setTimeout.apply(void 0, Kt([s, t], qt(e)));
339
+ return setTimeout.apply(void 0, qt([s, t], $t(e)));
340
340
  },
341
341
  clearTimeout: function(s) {
342
342
  return clearTimeout(s);
@@ -348,7 +348,7 @@ function As(s) {
348
348
  throw s;
349
349
  });
350
350
  }
351
- function $i() {
351
+ function Ki() {
352
352
  }
353
353
  function ce(s) {
354
354
  s();
@@ -360,7 +360,7 @@ var ai = (function(s) {
360
360
  return i.isStopped = !1, e ? (i.destination = e, Ss(e) && e.add(i)) : i.destination = er, i;
361
361
  }
362
362
  return t.create = function(e, i, n) {
363
- return new $t(e, i, n);
363
+ return new Kt(e, i, n);
364
364
  }, t.prototype.next = function(e) {
365
365
  this.isStopped || this._next(e);
366
366
  }, t.prototype.error = function(e) {
@@ -415,7 +415,7 @@ var ai = (function(s) {
415
415
  re(e);
416
416
  }
417
417
  }, s;
418
- })(), $t = (function(s) {
418
+ })(), Kt = (function(s) {
419
419
  kt(t, s);
420
420
  function t(e, i, n) {
421
421
  var r = s.call(this) || this, a;
@@ -435,9 +435,9 @@ function tr(s) {
435
435
  }
436
436
  var er = {
437
437
  closed: !0,
438
- next: $i,
438
+ next: Ki,
439
439
  error: tr,
440
- complete: $i
440
+ complete: Ki
441
441
  }, li = (function() {
442
442
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
443
443
  })();
@@ -459,7 +459,7 @@ var I = (function() {
459
459
  var e = new s();
460
460
  return e.source = this, e.operator = t, e;
461
461
  }, s.prototype.subscribe = function(t, e, i) {
462
- var n = this, r = nr(t) ? t : new $t(t, e, i);
462
+ var n = this, r = nr(t) ? t : new Kt(t, e, i);
463
463
  return ce(function() {
464
464
  var a = n, l = a.operator, c = a.source;
465
465
  r.add(l ? l.call(r, c) : c ? n._subscribe(r) : n._trySubscribe(r));
@@ -473,7 +473,7 @@ var I = (function() {
473
473
  }, s.prototype.forEach = function(t, e) {
474
474
  var i = this;
475
475
  return e = Ji(e), new e(function(n, r) {
476
- var a = new $t({
476
+ var a = new Kt({
477
477
  next: function(l) {
478
478
  try {
479
479
  t(l);
@@ -547,14 +547,14 @@ var or = (function(s) {
547
547
  return c.onFinalize = a, c.shouldUnsubscribe = l, c._next = i ? function(f) {
548
548
  try {
549
549
  i(f);
550
- } catch (d) {
551
- e.error(d);
550
+ } catch (p) {
551
+ e.error(p);
552
552
  }
553
553
  } : s.prototype._next, c._error = r ? function(f) {
554
554
  try {
555
555
  r(f);
556
- } catch (d) {
557
- e.error(d);
556
+ } catch (p) {
557
+ e.error(p);
558
558
  } finally {
559
559
  this.unsubscribe();
560
560
  }
@@ -723,8 +723,8 @@ var or = (function(s) {
723
723
  }, t.prototype._trimBuffer = function() {
724
724
  var e = this, i = e._bufferSize, n = e._timestampProvider, r = e._buffer, a = e._infiniteTimeWindow, l = (a ? 1 : 2) * i;
725
725
  if (i < 1 / 0 && l < r.length && r.splice(0, r.length - l), !a) {
726
- for (var c = n.now(), f = 0, d = 1; d < r.length && r[d] <= c; d += 2)
727
- f = d;
726
+ for (var c = n.now(), f = 0, p = 1; p < r.length && r[p] <= c; p += 2)
727
+ f = p;
728
728
  f && r.splice(0, f + 1);
729
729
  }
730
730
  }, t;
@@ -764,7 +764,7 @@ function Ds(s) {
764
764
  return F(s?.[Is]);
765
765
  }
766
766
  function Ls(s) {
767
- return Kn(this, arguments, function() {
767
+ return qn(this, arguments, function() {
768
768
  var e, i, n, r;
769
769
  return ws(this, function(a) {
770
770
  switch (a.label) {
@@ -802,9 +802,9 @@ function Rt(s) {
802
802
  return s;
803
803
  if (s != null) {
804
804
  if (Ms(s))
805
- return pr(s);
806
- if (Ps(s))
807
805
  return dr(s);
806
+ if (Ps(s))
807
+ return pr(s);
808
808
  if (Ts(s))
809
809
  return mr(s);
810
810
  if (Es(s))
@@ -816,7 +816,7 @@ function Rt(s) {
816
816
  }
817
817
  throw Os(s);
818
818
  }
819
- function pr(s) {
819
+ function dr(s) {
820
820
  return new I(function(t) {
821
821
  var e = s[li]();
822
822
  if (F(e.subscribe))
@@ -824,7 +824,7 @@ function pr(s) {
824
824
  throw new TypeError("Provided object does not correctly implement Symbol.observable");
825
825
  });
826
826
  }
827
- function dr(s) {
827
+ function pr(s) {
828
828
  return new I(function(t) {
829
829
  for (var e = 0; e < s.length && !t.closed; e++)
830
830
  t.next(s[e]);
@@ -873,12 +873,12 @@ function gr(s) {
873
873
  }
874
874
  function vr(s, t) {
875
875
  var e, i, n, r;
876
- return qn(this, void 0, void 0, function() {
876
+ return $n(this, void 0, void 0, function() {
877
877
  var a, l;
878
878
  return ws(this, function(c) {
879
879
  switch (c.label) {
880
880
  case 0:
881
- c.trys.push([0, 5, 6, 11]), e = $n(s), c.label = 1;
881
+ c.trys.push([0, 5, 6, 11]), e = Kn(s), c.label = 1;
882
882
  case 1:
883
883
  return [4, e.next()];
884
884
  case 2:
@@ -1008,10 +1008,10 @@ function Ar(s, t) {
1008
1008
  }
1009
1009
  throw Os(s);
1010
1010
  }
1011
- function de(s, t) {
1011
+ function pe(s, t) {
1012
1012
  return t ? Ar(s, t) : Rt(s);
1013
1013
  }
1014
- function zl(s) {
1014
+ function Vl(s) {
1015
1015
  return !!s && (s instanceof I || F(s.lift) && F(s.subscribe));
1016
1016
  }
1017
1017
  function ci(s, t) {
@@ -1024,7 +1024,7 @@ function ci(s, t) {
1024
1024
  }
1025
1025
  var Cr = Array.isArray;
1026
1026
  function kr(s, t) {
1027
- return Cr(t) ? s.apply(void 0, Kt([], qt(t))) : s(t);
1027
+ return Cr(t) ? s.apply(void 0, qt([], $t(t))) : s(t);
1028
1028
  }
1029
1029
  function Pr(s) {
1030
1030
  return ci(function(t) {
@@ -1062,7 +1062,7 @@ function we() {
1062
1062
  s[t] = arguments[t];
1063
1063
  var e = ur(s), i = cr(s), n = Ir(s), r = n.args, a = n.keys;
1064
1064
  if (r.length === 0)
1065
- return de([], e);
1065
+ return pe([], e);
1066
1066
  var l = new I(Fr(r, e, a ? function(c) {
1067
1067
  return Lr(a, c);
1068
1068
  } : hi));
@@ -1071,11 +1071,11 @@ function we() {
1071
1071
  function Fr(s, t, e) {
1072
1072
  return e === void 0 && (e = hi), function(i) {
1073
1073
  Qi(t, function() {
1074
- for (var n = s.length, r = new Array(n), a = n, l = n, c = function(d) {
1074
+ for (var n = s.length, r = new Array(n), a = n, l = n, c = function(p) {
1075
1075
  Qi(t, function() {
1076
- var o = de(s[d], t), h = !1;
1076
+ var o = pe(s[p], t), h = !1;
1077
1077
  o.subscribe(be(i, function(u) {
1078
- r[d] = u, h || (h = !0, l--), l || i.next(e(r.slice()));
1078
+ r[p] = u, h || (h = !0, l--), l || i.next(e(r.slice()));
1079
1079
  }, function() {
1080
1080
  --a || i.complete();
1081
1081
  }));
@@ -1116,20 +1116,20 @@ function Bs(s) {
1116
1116
  return new At();
1117
1117
  } : t, i = s.resetOnError, n = i === void 0 ? !0 : i, r = s.resetOnComplete, a = r === void 0 ? !0 : r, l = s.resetOnRefCountZero, c = l === void 0 ? !0 : l;
1118
1118
  return function(f) {
1119
- var d, o, h, u = 0, p = !1, m = !1, g = function() {
1119
+ var p, o, h, u = 0, d = !1, m = !1, g = function() {
1120
1120
  o?.unsubscribe(), o = void 0;
1121
1121
  }, y = function() {
1122
- g(), d = h = void 0, p = m = !1;
1122
+ g(), p = h = void 0, d = m = !1;
1123
1123
  }, v = function() {
1124
- var b = d;
1124
+ var b = p;
1125
1125
  y(), b?.unsubscribe();
1126
1126
  };
1127
1127
  return jt(function(b, w) {
1128
- u++, !m && !p && g();
1128
+ u++, !m && !d && g();
1129
1129
  var x = h = h ?? e();
1130
1130
  w.add(function() {
1131
- u--, u === 0 && !m && !p && (o = De(v, c));
1132
- }), x.subscribe(w), !d && u > 0 && (d = new $t({
1131
+ u--, u === 0 && !m && !d && (o = De(v, c));
1132
+ }), x.subscribe(w), !p && u > 0 && (p = new Kt({
1133
1133
  next: function(S) {
1134
1134
  return x.next(S);
1135
1135
  },
@@ -1137,9 +1137,9 @@ function Bs(s) {
1137
1137
  m = !0, g(), o = De(y, n, S), x.error(S);
1138
1138
  },
1139
1139
  complete: function() {
1140
- p = !0, g(), o = De(y, a), x.complete();
1140
+ d = !0, g(), o = De(y, a), x.complete();
1141
1141
  }
1142
- }), Rt(b).subscribe(d));
1142
+ }), Rt(b).subscribe(p));
1143
1143
  })(f);
1144
1144
  };
1145
1145
  }
@@ -1151,12 +1151,12 @@ function De(s, t) {
1151
1151
  return;
1152
1152
  }
1153
1153
  if (t !== !1) {
1154
- var n = new $t({
1154
+ var n = new Kt({
1155
1155
  next: function() {
1156
1156
  n.unsubscribe(), s();
1157
1157
  }
1158
1158
  });
1159
- return Rt(t.apply(void 0, Kt([], qt(e)))).subscribe(n);
1159
+ return Rt(t.apply(void 0, qt([], $t(e)))).subscribe(n);
1160
1160
  }
1161
1161
  }
1162
1162
  function jr(s, t, e) {
@@ -1213,10 +1213,10 @@ function ui(s) {
1213
1213
  function xe(s) {
1214
1214
  return typeof s == "object" && s != null && !Array.isArray(s) && s.constructor === Object;
1215
1215
  }
1216
- function Vs(s) {
1216
+ function zs(s) {
1217
1217
  return s instanceof I;
1218
1218
  }
1219
- function qe(s, t, e, i = !1) {
1219
+ function $e(s, t, e, i = !1) {
1220
1220
  if (Object(s) !== s) return s;
1221
1221
  typeof t == "string" && (t = t.split("."));
1222
1222
  let n = t.length;
@@ -1247,28 +1247,28 @@ function fi(s) {
1247
1247
  function wt(s, t) {
1248
1248
  typeof t == "number" ? s.set(t) : Array.isArray(t) ? s.set(t[0], t[1]) : xe(t) && "value" in t ? s.set(t.value.x, t.value.y) : s.set(t.x, t.y);
1249
1249
  }
1250
- function zs(s, t, e, i) {
1250
+ function Vs(s, t, e, i) {
1251
1251
  const n = s - e, r = t - i;
1252
1252
  return Math.sqrt(n * n + r * r);
1253
1253
  }
1254
1254
  const Ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1255
1255
  __proto__: null,
1256
1256
  arrayEquals: te,
1257
- calculateDistance: zs,
1257
+ calculateDistance: Vs,
1258
1258
  error: fi,
1259
1259
  fps2ms: st,
1260
1260
  get: Br,
1261
1261
  isBrowser: Ot,
1262
1262
  isFunction: ui,
1263
1263
  isObject: xe,
1264
- isObservable: Vs,
1264
+ isObservable: zs,
1265
1265
  isPromise: yt,
1266
1266
  log: Nr,
1267
1267
  preciseNow: lt,
1268
- set: qe,
1268
+ set: $e,
1269
1269
  setObservablePoint: wt
1270
1270
  }, Symbol.toStringTag, { value: "Module" }));
1271
- class pi {
1271
+ class di {
1272
1272
  constructor() {
1273
1273
  this.boundKeys = {}, this.stop = !1, this._controlsOptions = {}, this.serverFps = 60;
1274
1274
  }
@@ -1423,7 +1423,7 @@ class pi {
1423
1423
  return this._controlsOptions;
1424
1424
  }
1425
1425
  }
1426
- var Vr = /* @__PURE__ */ ((s) => (s.Break = "break", s.Backspace = "backspace", s.Tab = "tab", s.Clear = "clear", s.Enter = "enter", s.Shift = "shift", s.Ctrl = "ctrl", s.Alt = "alt", s.Pause = "pause/break", s.CapsLock = "caps lock", s.Escape = "escape", s.Conversion = "conversion", s.NonConversion = "non-conversion", s.Space = "space", s.PageUp = "page up", s.PageDown = "page down", s.End = "end", s.Home = "home", s[s.Left = 4] = "Left", s[s.Up = 1] = "Up", s[s.Right = 2] = "Right", s[s.Down = 3] = "Down", s.Select = "select", s.Print = "print", s.Execute = "execute", s.PrintScreen = "Print Screen", s.Insert = "insert", s.Delete = "delete", s.Zero = "0", s.One = "1", s.Two = "2", s.Three = "3", s.Four = "4", s.Five = "5", s.Six = "6", s.Seven = "7", s.Height = "8", s.Nine = "9", s.Equal = "=", s.Semicolon = "semicolon (firefox), equals", s.LessThan = "<", s.Equals = "equals (firefox)", s.Beta = "ß", s.At = "@", s.A = "a", s.B = "b", s.C = "c", s.D = "d", s.E = "e", s.F = "f", s.G = "g", s.H = "h", s.I = "i", s.J = "j", s.K = "k", s.L = "l", s.M = "m", s.N = "n", s.O = "o", s.P = "p", s.Q = "q", s.R = "r", s.S = "s", s.T = "t", s.U = "u", s.V = "v", s.W = "w", s.X = "x", s.Y = "y", s.Z = "z", s.SearchKey = "Windows Key / Left ⌘ / Chromebook Search key", s.NumPad0 = "numpad 0", s.NumPad1 = "numpad 1", s.NumPad2 = "numpad 2", s.NumPad3 = "numpad 3", s.NumPad4 = "numpad 4", s.NumPad5 = "numpad 5", s.NumPad6 = "numpad 6", s.NumPad7 = "numpad 7", s.NumPad8 = "numpad 8", s.NumPad9 = "numpad 9", s.Multiply = "multiply", s.Add = "add", s.Subtract = "subtract", s.DecimalPoint = "decimal point", s.Divide = "divide", s.F1 = "f1", s.F2 = "f2", s.F3 = "f3", s.F4 = "f4", s.F5 = "f5", s.F6 = "f6", s.F7 = "f7", s.F8 = "f8", s.F9 = "f9", s.F10 = "f10", s.F11 = "f11", s.F12 = "f12", s.F13 = "f13", s.F14 = "f14", s.F15 = "f15", s.F16 = "f16", s.F17 = "f17", s.F18 = "f18", s.F19 = "f19", s.F20 = "f20", s.F21 = "f21", s.F22 = "f22", s.F23 = "f23", s.F24 = "f24", s.NumLock = "num lock", s.ScrollLock = "scroll lock", s.CircumflexAccent = "^", s.ExclamationMark = "!", s.Hash = "#", s.Dollar = "$", s.AccentU = "ù", s.PageBackward = "page backward", s.PageForWard = "page forward", s.Star = "*", s.DecreaseVolume = "decrease volume level", s.IncreaseVolume = "increase volume level", s.Next = "next", s.Previous = "previous", s.Stop = "stop", s.PlayPause = "play/pause", s.Email = "e-mail", s.SemiColon = "semi-colon / ñ", s.EqualSign = "equal sign", s.Comma = "comma", s.Dash = "dash", s.FowardSlach = "forward slash / ç", s.GraveAccent = "grave accent / ñ / æ", s.OpenBracket = "open bracket", s.BackSlach = "back slash", s.CloseBracket = "close bracket / å", s.SingleQuote = "single quote / ø", s.BackQuote = "`", s.Altgr = "altgr", s))(Vr || {});
1426
+ var zr = /* @__PURE__ */ ((s) => (s.Break = "break", s.Backspace = "backspace", s.Tab = "tab", s.Clear = "clear", s.Enter = "enter", s.Shift = "shift", s.Ctrl = "ctrl", s.Alt = "alt", s.Pause = "pause/break", s.CapsLock = "caps lock", s.Escape = "escape", s.Conversion = "conversion", s.NonConversion = "non-conversion", s.Space = "space", s.PageUp = "page up", s.PageDown = "page down", s.End = "end", s.Home = "home", s[s.Left = 4] = "Left", s[s.Up = 1] = "Up", s[s.Right = 2] = "Right", s[s.Down = 3] = "Down", s.Select = "select", s.Print = "print", s.Execute = "execute", s.PrintScreen = "Print Screen", s.Insert = "insert", s.Delete = "delete", s.Zero = "0", s.One = "1", s.Two = "2", s.Three = "3", s.Four = "4", s.Five = "5", s.Six = "6", s.Seven = "7", s.Height = "8", s.Nine = "9", s.Equal = "=", s.Semicolon = "semicolon (firefox), equals", s.LessThan = "<", s.Equals = "equals (firefox)", s.Beta = "ß", s.At = "@", s.A = "a", s.B = "b", s.C = "c", s.D = "d", s.E = "e", s.F = "f", s.G = "g", s.H = "h", s.I = "i", s.J = "j", s.K = "k", s.L = "l", s.M = "m", s.N = "n", s.O = "o", s.P = "p", s.Q = "q", s.R = "r", s.S = "s", s.T = "t", s.U = "u", s.V = "v", s.W = "w", s.X = "x", s.Y = "y", s.Z = "z", s.SearchKey = "Windows Key / Left ⌘ / Chromebook Search key", s.NumPad0 = "numpad 0", s.NumPad1 = "numpad 1", s.NumPad2 = "numpad 2", s.NumPad3 = "numpad 3", s.NumPad4 = "numpad 4", s.NumPad5 = "numpad 5", s.NumPad6 = "numpad 6", s.NumPad7 = "numpad 7", s.NumPad8 = "numpad 8", s.NumPad9 = "numpad 9", s.Multiply = "multiply", s.Add = "add", s.Subtract = "subtract", s.DecimalPoint = "decimal point", s.Divide = "divide", s.F1 = "f1", s.F2 = "f2", s.F3 = "f3", s.F4 = "f4", s.F5 = "f5", s.F6 = "f6", s.F7 = "f7", s.F8 = "f8", s.F9 = "f9", s.F10 = "f10", s.F11 = "f11", s.F12 = "f12", s.F13 = "f13", s.F14 = "f14", s.F15 = "f15", s.F16 = "f16", s.F17 = "f17", s.F18 = "f18", s.F19 = "f19", s.F20 = "f20", s.F21 = "f21", s.F22 = "f22", s.F23 = "f23", s.F24 = "f24", s.NumLock = "num lock", s.ScrollLock = "scroll lock", s.CircumflexAccent = "^", s.ExclamationMark = "!", s.Hash = "#", s.Dollar = "$", s.AccentU = "ù", s.PageBackward = "page backward", s.PageForWard = "page forward", s.Star = "*", s.DecreaseVolume = "decrease volume level", s.IncreaseVolume = "increase volume level", s.Next = "next", s.Previous = "previous", s.Stop = "stop", s.PlayPause = "play/pause", s.Email = "e-mail", s.SemiColon = "semi-colon / ñ", s.EqualSign = "equal sign", s.Comma = "comma", s.Dash = "dash", s.FowardSlach = "forward slash / ç", s.GraveAccent = "grave accent / ñ / æ", s.OpenBracket = "open bracket", s.BackSlach = "back slash", s.CloseBracket = "close bracket / å", s.SingleQuote = "single quote / ø", s.BackQuote = "`", s.Altgr = "altgr", s))(zr || {});
1427
1427
  const Us = {
1428
1428
  3: "break",
1429
1429
  8: "backspace",
@@ -1588,15 +1588,15 @@ const Us = {
1588
1588
  243: "half-width/full-width",
1589
1589
  244: "kanji",
1590
1590
  255: "toggle touchpad"
1591
- }, zr = (s) => {
1591
+ }, Vr = (s) => {
1592
1592
  const t = {};
1593
1593
  for (let e in s) {
1594
1594
  const i = s[e];
1595
1595
  t[i] = e;
1596
1596
  }
1597
1597
  return t;
1598
- }, ts = zr(Us);
1599
- class Ur extends pi {
1598
+ }, ts = Vr(Us);
1599
+ class Ur extends di {
1600
1600
  constructor() {
1601
1601
  super(...arguments), this.keyState = {}, this.lastKeyPressed = null, this.lastActionTimes = {}, this.directionState = {
1602
1602
  up: !1,
@@ -1659,10 +1659,10 @@ class Ur extends pi {
1659
1659
  const { repeat: a, keyDown: l, throttle: c } = r.options;
1660
1660
  if (a || n == 0) {
1661
1661
  if (typeof c == "number") {
1662
- const d = Date.now(), o = this.lastActionTimes[r.actionName] ?? 0;
1663
- if (d - o < c)
1662
+ const p = Date.now(), o = this.lastActionTimes[r.actionName] ?? 0;
1663
+ if (p - o < c)
1664
1664
  return;
1665
- this.lastActionTimes[r.actionName] = d;
1665
+ this.lastActionTimes[r.actionName] = p;
1666
1666
  }
1667
1667
  let f = r.parameters;
1668
1668
  typeof f == "function" && (f = f()), l && l(r), this.keyState[t].count++;
@@ -1770,9 +1770,9 @@ var J = { events: {}, publish: function(t, e) {
1770
1770
  return Object.keys(t).forEach(function(i) {
1771
1771
  (t[i] === s || Array.isArray(t[i]) && t[i].indexOf(s) !== -1) && e.push(i);
1772
1772
  }), e;
1773
- }, qr = function(s) {
1773
+ }, $r = function(s) {
1774
1774
  return !!s && !!s.type && !!s.playEffect && typeof s.playEffect == "function" || !1;
1775
- }, Kr = function() {
1775
+ }, qr = function() {
1776
1776
  return !!window.navigator.getGamepads && typeof window.navigator.getGamepads == "function" || !1;
1777
1777
  }, X = { loopStarted: !1, instances: {}, buttonEvents: { joypad: [] }, settings: { axisMovementThreshold: Xr }, remove: function(t) {
1778
1778
  return delete this.instances[t];
@@ -1791,7 +1791,7 @@ var J = { events: {}, publish: function(t, e) {
1791
1791
  }
1792
1792
  }, vibrate: function(t, e) {
1793
1793
  var i = t.vibrationActuator, n = e || this.settings.vibration;
1794
- if (qr(i)) {
1794
+ if ($r(i)) {
1795
1795
  var r = i.type;
1796
1796
  return t.vibrationActuator.playEffect(r, n);
1797
1797
  }
@@ -1801,7 +1801,7 @@ var J = { events: {}, publish: function(t, e) {
1801
1801
  isNaN(r) || (this.settings.axisMovementThreshold = r), this.settings.vibration = i, this.settings.customButtonMapping = n;
1802
1802
  }, trigger: function(t, e) {
1803
1803
  return J.publish(t, e);
1804
- } }, $r = function(s) {
1804
+ } }, Kr = function(s) {
1805
1805
  s.buttons.forEach(function(t, e) {
1806
1806
  var i = X.settings.customButtonMapping, n = i || Gr, r = Yr(e, n), a = X.buttonEvents;
1807
1807
  r && r.length && r.forEach(function(l) {
@@ -1814,9 +1814,9 @@ var J = { events: {}, publish: function(t, e) {
1814
1814
  }, e = X.settings.axisMovementThreshold, i = s.axes, n = i.length, r = n / 2;
1815
1815
  i.forEach(function(a, l) {
1816
1816
  if (Math.abs(a) > e) {
1817
- var c = null, f = null, d = a;
1817
+ var c = null, f = null, p = a;
1818
1818
  c = l < r ? Tt.LEFT.NAME : Tt.RIGHT.NAME, (l === Tt.LEFT.AXES.X || l === Tt.RIGHT.AXES.X) && (f = a < 0 ? oe.LEFT : oe.RIGHT), (l === Tt.LEFT.AXES.Y || l === Tt.RIGHT.AXES.Y) && (f = a < 0 ? oe.TOP : oe.BOTTOM);
1819
- var o = { gamepad: s, totalSticks: r, stickMoved: c, directionOfMovement: f, axisMovementValue: d, axis: l };
1819
+ var o = { gamepad: s, totalSticks: r, stickMoved: c, directionOfMovement: f, axisMovementValue: p, axis: l };
1820
1820
  return window.dispatchEvent(t(o));
1821
1821
  }
1822
1822
  });
@@ -1825,7 +1825,7 @@ var J = { events: {}, publish: function(t, e) {
1825
1825
  }, Le = { id: null, start: function() {
1826
1826
  var t = window.requestAnimationFrame || window.webkitRequestAnimationFrame, e = X.buttonEvents, i = window.navigator.getGamepads();
1827
1827
  i = Array.prototype.slice.call(i), i.forEach(function(n, r) {
1828
- n && (e.joypad[r] || (e.joypad[r] = {}), X.instances[r] = n, $r(n), Jr(n));
1828
+ n && (e.joypad[r] || (e.joypad[r] = {}), X.instances[r] = n, Kr(n), Jr(n));
1829
1829
  }), e.joypad.forEach(function(n) {
1830
1830
  n && Object.keys(n).forEach(function(r) {
1831
1831
  Zr(r, n);
@@ -1855,7 +1855,7 @@ var J = { events: {}, publish: function(t, e) {
1855
1855
  window.dispatchEvent(i(l));
1856
1856
  };
1857
1857
  Qr();
1858
- Kr() ? window.joypad = X : (window.joypad = {}, Gs("Your browser does not support the Gamepad API - https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API"));
1858
+ qr() ? window.joypad = X : (window.joypad = {}, Gs("Your browser does not support the Gamepad API - https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API"));
1859
1859
  const Fe = {
1860
1860
  button_0: "action",
1861
1861
  button_1: "back",
@@ -1866,7 +1866,7 @@ const Fe = {
1866
1866
  left: "left",
1867
1867
  right: "right"
1868
1868
  };
1869
- class to extends pi {
1869
+ class to extends di {
1870
1870
  constructor() {
1871
1871
  super(...arguments), this.gamepadEnabled = !0, this.gamepadConfig = {
1872
1872
  enabled: !0,
@@ -2145,7 +2145,7 @@ const We = {
2145
2145
  bottom_left: ["down", "left"],
2146
2146
  bottom_right: ["down", "right"]
2147
2147
  };
2148
- class eo extends pi {
2148
+ class eo extends di {
2149
2149
  constructor() {
2150
2150
  super(...arguments), this.joystickEnabled = !0, this.joystickConfig = {
2151
2151
  enabled: !0,
@@ -2191,22 +2191,22 @@ class eo extends pi {
2191
2191
  return;
2192
2192
  }
2193
2193
  const r = Array.isArray(n) ? n : [n], a = this.joystickDirections, l = {};
2194
- r.forEach((d) => {
2195
- l[d] = !0;
2194
+ r.forEach((p) => {
2195
+ l[p] = !0;
2196
2196
  });
2197
2197
  const c = /* @__PURE__ */ new Set([
2198
2198
  ...Object.keys(this.joystickDirections),
2199
2199
  ...Object.keys(l)
2200
2200
  ]);
2201
- for (const d of c) {
2202
- const o = this.joystickDirections[d], h = l[d] || !1;
2203
- o && !h && this.applyControl(d, !1).catch(() => {
2201
+ for (const p of c) {
2202
+ const o = this.joystickDirections[p], h = l[p] || !1;
2203
+ o && !h && this.applyControl(p, !1).catch(() => {
2204
2204
  });
2205
2205
  }
2206
2206
  this.joystickDirections = { ...l }, this.joystickMoving = !0;
2207
- const f = r.filter((d) => !a[d]);
2208
- for (const d of f)
2209
- this.applyControl(d, !0, { power: t.power }).catch(() => {
2207
+ const f = r.filter((p) => !a[p]);
2208
+ for (const p of f)
2209
+ this.applyControl(p, !0, { power: t.power }).catch(() => {
2210
2210
  });
2211
2211
  this.joystickMoveInterval || (this.joystickMoveInterval = setInterval(() => {
2212
2212
  this.processJoystickMovement();
@@ -2333,16 +2333,16 @@ class eo extends pi {
2333
2333
  return this.joystickMoving;
2334
2334
  }
2335
2335
  }
2336
- const Ke = {};
2336
+ const qe = {};
2337
2337
  class tt {
2338
2338
  }
2339
2339
  function et(s, t) {
2340
- Ke[s] = t;
2340
+ qe[s] = t;
2341
2341
  }
2342
- function di(s, t) {
2343
- if (!Ke[t])
2342
+ function pi(s, t) {
2343
+ if (!qe[t])
2344
2344
  return null;
2345
- const e = new Ke[t]();
2345
+ const e = new qe[t]();
2346
2346
  return e.onInit?.(s), e;
2347
2347
  }
2348
2348
  var io = Object.defineProperty, D = (s, t) => io(s, "name", { value: t, configurable: !0 }), Dt, ae = (Dt = class extends Ct {
@@ -2358,7 +2358,7 @@ var io = Object.defineProperty, D = (s, t) => io(s, "name", { value: t, configur
2358
2358
  get: /* @__PURE__ */ D((e, i, n) => {
2359
2359
  const r = e[i];
2360
2360
  return typeof r == "function" ? (...a) => {
2361
- let l = "update", c, f = !1, d = [], o = !0;
2361
+ let l = "update", c, f = !1, p = [], o = !0;
2362
2362
  switch (i) {
2363
2363
  case "push":
2364
2364
  c = e.length, l = "add", f = !0;
@@ -2374,15 +2374,15 @@ var io = Object.defineProperty, D = (s, t) => io(s, "name", { value: t, configur
2374
2374
  break;
2375
2375
  case "splice":
2376
2376
  c = a[0];
2377
- const u = a[1], p = a.slice(2);
2378
- d = p, u > 0 && p.length === 0 ? l = "remove" : u === 0 && p.length > 0 ? l = "add" : u === 0 && p.length === 0 ? o = !1 : l = "update", f = !0;
2377
+ const u = a[1], d = a.slice(2);
2378
+ p = d, u > 0 && d.length === 0 ? l = "remove" : u === 0 && d.length > 0 ? l = "add" : u === 0 && d.length === 0 ? o = !1 : l = "update", f = !0;
2379
2379
  break;
2380
2380
  }
2381
2381
  const h = r.apply(e, a);
2382
2382
  return f && o && (i === "splice" ? this.next({
2383
2383
  type: l,
2384
2384
  index: c,
2385
- items: d
2385
+ items: p
2386
2386
  }) : this.next({
2387
2387
  type: l,
2388
2388
  index: c,
@@ -2516,7 +2516,7 @@ function ee(s) {
2516
2516
  return _(s) && !!s.dependencies;
2517
2517
  }
2518
2518
  D(ee, "isComputed");
2519
- function K(s, t) {
2519
+ function q(s, t) {
2520
2520
  const e = /* @__PURE__ */ new Set();
2521
2521
  let i = !0, n;
2522
2522
  const r = B.currentDependencyTracker;
@@ -2527,9 +2527,9 @@ function K(s, t) {
2527
2527
  ...e
2528
2528
  ].map((f) => {
2529
2529
  if (ee(f) && "dependencies" in f) {
2530
- const d = f;
2531
- if (d.dependencies.size === 0)
2532
- return new Ct(d()).asObservable();
2530
+ const p = f;
2531
+ if (p.dependencies.size === 0)
2532
+ return new Ct(p()).asObservable();
2533
2533
  }
2534
2534
  return f.observable;
2535
2535
  }), l = we(a).pipe(Ut(() => !i), ci(() => s()), Wr(() => t?.())), c = /* @__PURE__ */ D(function() {
@@ -2539,10 +2539,10 @@ function K(s, t) {
2539
2539
  n = f;
2540
2540
  }), c.dependencies = e, B.currentSubscriptionsTracker?.(c.subscription), i = !1, c;
2541
2541
  }
2542
- D(K, "computed");
2542
+ D(q, "computed");
2543
2543
  function no(s, t) {
2544
2544
  const e = /* @__PURE__ */ new Set();
2545
- let i = !0, n, r, a, l, c, f, d = !1, o, h = 0, u = null;
2545
+ let i = !0, n, r, a, l, c, f, p = !1, o, h = 0, u = null;
2546
2546
  if (typeof s == "function")
2547
2547
  r = s, c = t?.equal;
2548
2548
  else {
@@ -2585,10 +2585,10 @@ function no(s, t) {
2585
2585
  }, "computeFunction");
2586
2586
  }
2587
2587
  }
2588
- const p = B.currentDependencyTracker;
2588
+ const d = B.currentDependencyTracker;
2589
2589
  B.currentDependencyTracker = (b) => {
2590
2590
  e.add(b);
2591
- }, a && typeof a == "function" && !_(a) || a && _(a) && e.add(a), n = r(), B.currentDependencyTracker = p;
2591
+ }, a && typeof a == "function" && !_(a) || a && _(a) && e.add(a), n = r(), B.currentDependencyTracker = d;
2592
2592
  const m = new Ct(n), g = [
2593
2593
  ...e
2594
2594
  ].map((b) => {
@@ -2602,21 +2602,21 @@ function no(s, t) {
2602
2602
  let y;
2603
2603
  g.length > 0 ? y = we(g).pipe(Ut(() => !i), ci(() => {
2604
2604
  const b = r();
2605
- return c ? c(n, b) || (n = b, d = !1) : n !== b && (n = b, d = !1), n;
2605
+ return c ? c(n, b) || (n = b, p = !1) : n !== b && (n = b, p = !1), n;
2606
2606
  })) : y = m.asObservable().pipe(Ut(() => !i));
2607
2607
  const v = /* @__PURE__ */ D(function() {
2608
- if (mi(v), d && e.size > 0) {
2608
+ if (mi(v), p && e.size > 0) {
2609
2609
  if (u !== h) {
2610
2610
  const b = r();
2611
- return d = !1, o = void 0, n = b, u = null, b;
2611
+ return p = !1, o = void 0, n = b, u = null, b;
2612
2612
  }
2613
2613
  return o;
2614
2614
  }
2615
- return d ? o : (e.size === 0 && (n = r()), n);
2615
+ return p ? o : (e.size === 0 && (n = r()), n);
2616
2616
  }, "fn");
2617
2617
  return v.observable = new I((b) => {
2618
2618
  const w = y.subscribe((S) => {
2619
- e.size > 0 && (h++, d = !1, u = null), n = S, b.next(S);
2619
+ e.size > 0 && (h++, p = !1, u = null), n = S, b.next(S);
2620
2620
  });
2621
2621
  let x;
2622
2622
  return e.size === 0 && (x = m.pipe(Ut(() => !i)).subscribe((S) => {
@@ -2626,7 +2626,7 @@ function no(s, t) {
2626
2626
  };
2627
2627
  }), v.subscription = v.observable.subscribe(() => {
2628
2628
  }), v.dependencies = e, v._subject = m, v.set = (b) => {
2629
- d || (u = h, l && a && (f = {
2629
+ p || (u = h, l && a && (f = {
2630
2630
  source: Xs(() => {
2631
2631
  if (typeof a == "function") {
2632
2632
  const x = a;
@@ -2635,7 +2635,7 @@ function no(s, t) {
2635
2635
  return a();
2636
2636
  }),
2637
2637
  value: b
2638
- })), d = !0, o = b, n = b, m.next(b);
2638
+ })), p = !0, o = b, n = b, m.next(b);
2639
2639
  }, B.currentSubscriptionsTracker?.(v.subscription), i = !1, v;
2640
2640
  }
2641
2641
  D(no, "linkedSignal");
@@ -2650,7 +2650,7 @@ function Xs(s) {
2650
2650
  }
2651
2651
  D(Xs, "untracked");
2652
2652
  function H(s) {
2653
- return s.isEffect = !0, K(s);
2653
+ return s.isEffect = !0, q(s);
2654
2654
  }
2655
2655
  D(H, "effect");
2656
2656
  function Ys(s, t) {
@@ -2663,21 +2663,21 @@ function Ys(s, t) {
2663
2663
  }
2664
2664
  var is = function() {
2665
2665
  };
2666
- const $e = (s, t, e) => Math.min(Math.max(e, s), t), je = 1e-3, ro = 0.01, oo = 10, ao = 0.05, lo = 1;
2666
+ const Ke = (s, t, e) => Math.min(Math.max(e, s), t), je = 1e-3, ro = 0.01, oo = 10, ao = 0.05, lo = 1;
2667
2667
  function ho({ duration: s = 800, bounce: t = 0.25, velocity: e = 0, mass: i = 1 }) {
2668
2668
  let n, r, a = 1 - t;
2669
- a = $e(ao, lo, a), s = $e(ro, oo, s / 1e3), a < 1 ? (n = (f) => {
2670
- const d = f * a, o = d * s, h = d - e, u = Je(f, a), p = Math.exp(-o);
2671
- return je - h / u * p;
2669
+ a = Ke(ao, lo, a), s = Ke(ro, oo, s / 1e3), a < 1 ? (n = (f) => {
2670
+ const p = f * a, o = p * s, h = p - e, u = Je(f, a), d = Math.exp(-o);
2671
+ return je - h / u * d;
2672
2672
  }, r = (f) => {
2673
- const o = f * a * s, h = o * e + e, u = Math.pow(a, 2) * Math.pow(f, 2) * s, p = Math.exp(-o), m = Je(Math.pow(f, 2), a);
2674
- return (-n(f) + je > 0 ? -1 : 1) * ((h - u) * p) / m;
2673
+ const o = f * a * s, h = o * e + e, u = Math.pow(a, 2) * Math.pow(f, 2) * s, d = Math.exp(-o), m = Je(Math.pow(f, 2), a);
2674
+ return (-n(f) + je > 0 ? -1 : 1) * ((h - u) * d) / m;
2675
2675
  }) : (n = (f) => {
2676
- const d = Math.exp(-f * s), o = (f - e) * s + 1;
2677
- return -je + d * o;
2676
+ const p = Math.exp(-f * s), o = (f - e) * s + 1;
2677
+ return -je + p * o;
2678
2678
  }, r = (f) => {
2679
- const d = Math.exp(-f * s), o = (e - f) * (s * s);
2680
- return d * o;
2679
+ const p = Math.exp(-f * s), o = (e - f) * (s * s);
2680
+ return p * o;
2681
2681
  });
2682
2682
  const l = 5 / s, c = uo(n, r, l);
2683
2683
  if (s = s * 1e3, isNaN(c))
@@ -2720,15 +2720,15 @@ function mo(s) {
2720
2720
  function yi(s) {
2721
2721
  var { from: t = 0, to: e = 1, restSpeed: i = 2, restDelta: n } = s, r = Ys(s, ["from", "to", "restSpeed", "restDelta"]);
2722
2722
  const a = { done: !1, value: t };
2723
- let { stiffness: l, damping: c, mass: f, velocity: d, duration: o, isResolvedFromDuration: h } = mo(r), u = ns, p = ns;
2723
+ let { stiffness: l, damping: c, mass: f, velocity: p, duration: o, isResolvedFromDuration: h } = mo(r), u = ns, d = ns;
2724
2724
  function m() {
2725
- const g = d ? -(d / 1e3) : 0, y = e - t, v = c / (2 * Math.sqrt(l * f)), b = Math.sqrt(l / f) / 1e3;
2725
+ const g = p ? -(p / 1e3) : 0, y = e - t, v = c / (2 * Math.sqrt(l * f)), b = Math.sqrt(l / f) / 1e3;
2726
2726
  if (n === void 0 && (n = Math.min(Math.abs(e - t) / 100, 0.4)), v < 1) {
2727
2727
  const w = Je(b, v);
2728
2728
  u = (x) => {
2729
2729
  const S = Math.exp(-v * b * x);
2730
2730
  return e - S * ((g + v * b * y) / w * Math.sin(w * x) + y * Math.cos(w * x));
2731
- }, p = (x) => {
2731
+ }, d = (x) => {
2732
2732
  const S = Math.exp(-v * b * x);
2733
2733
  return v * b * S * (Math.sin(w * x) * (g + v * b * y) / w + y * Math.cos(w * x)) - S * (Math.cos(w * x) * (g + v * b * y) - w * y * Math.sin(w * x));
2734
2734
  };
@@ -2748,21 +2748,21 @@ function yi(s) {
2748
2748
  if (h)
2749
2749
  a.done = g >= o;
2750
2750
  else {
2751
- const v = p(g) * 1e3, b = Math.abs(v) <= i, w = Math.abs(e - y) <= n;
2751
+ const v = d(g) * 1e3, b = Math.abs(v) <= i, w = Math.abs(e - y) <= n;
2752
2752
  a.done = b && w;
2753
2753
  }
2754
2754
  return a.value = a.done ? e : y, a;
2755
2755
  },
2756
2756
  flipTarget: () => {
2757
- d = -d, [t, e] = [e, t], m();
2757
+ p = -p, [t, e] = [e, t], m();
2758
2758
  }
2759
2759
  };
2760
2760
  }
2761
2761
  yi.needsInterpolation = (s, t) => typeof s == "string" || typeof t == "string";
2762
- const ns = (s) => 0, qs = (s, t, e) => {
2762
+ const ns = (s) => 0, $s = (s, t, e) => {
2763
2763
  const i = t - s;
2764
2764
  return i === 0 ? 1 : (e - s) / i;
2765
- }, gi = (s, t, e) => -e * s + e * t + s, Ks = (s, t) => (e) => Math.max(Math.min(e, t), s), Gt = (s) => s % 1 ? Number(s.toFixed(5)) : s, me = /(-)?([\d]*\.?[\d])+/g, Ze = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, yo = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
2765
+ }, gi = (s, t, e) => -e * s + e * t + s, qs = (s, t) => (e) => Math.max(Math.min(e, t), s), Gt = (s) => s % 1 ? Number(s.toFixed(5)) : s, me = /(-)?([\d]*\.?[\d])+/g, Ze = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, yo = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
2766
2766
  function ie(s) {
2767
2767
  return typeof s == "string";
2768
2768
  }
@@ -2770,7 +2770,7 @@ const _e = {
2770
2770
  test: (s) => typeof s == "number",
2771
2771
  parse: parseFloat,
2772
2772
  transform: (s) => s
2773
- }, $s = Object.assign(Object.assign({}, _e), { transform: Ks(0, 1) });
2773
+ }, Ks = Object.assign(Object.assign({}, _e), { transform: qs(0, 1) });
2774
2774
  Object.assign(Object.assign({}, _e), { default: 1 });
2775
2775
  const go = (s) => ({
2776
2776
  test: (t) => ie(t) && t.endsWith(s) && t.split(" ").length === 1,
@@ -2791,11 +2791,11 @@ const vi = (s, t) => (e) => !!(ie(e) && yo.test(e) && e.startsWith(s) || t && Ob
2791
2791
  }, xt = {
2792
2792
  test: vi("hsl", "hue"),
2793
2793
  parse: Js("hue", "saturation", "lightness"),
2794
- transform: ({ hue: s, saturation: t, lightness: e, alpha: i = 1 }) => "hsla(" + Math.round(s) + ", " + Xt.transform(Gt(t)) + ", " + Xt.transform(Gt(e)) + ", " + Gt($s.transform(i)) + ")"
2795
- }, vo = Ks(0, 255), Re = Object.assign(Object.assign({}, _e), { transform: (s) => Math.round(vo(s)) }), dt = {
2794
+ transform: ({ hue: s, saturation: t, lightness: e, alpha: i = 1 }) => "hsla(" + Math.round(s) + ", " + Xt.transform(Gt(t)) + ", " + Xt.transform(Gt(e)) + ", " + Gt(Ks.transform(i)) + ")"
2795
+ }, vo = qs(0, 255), Re = Object.assign(Object.assign({}, _e), { transform: (s) => Math.round(vo(s)) }), pt = {
2796
2796
  test: vi("rgb", "red"),
2797
2797
  parse: Js("red", "green", "blue"),
2798
- transform: ({ red: s, green: t, blue: e, alpha: i = 1 }) => "rgba(" + Re.transform(s) + ", " + Re.transform(t) + ", " + Re.transform(e) + ", " + Gt($s.transform(i)) + ")"
2798
+ transform: ({ red: s, green: t, blue: e, alpha: i = 1 }) => "rgba(" + Re.transform(s) + ", " + Re.transform(t) + ", " + Re.transform(e) + ", " + Gt(Ks.transform(i)) + ")"
2799
2799
  };
2800
2800
  function bo(s) {
2801
2801
  let t = "", e = "", i = "", n = "";
@@ -2809,11 +2809,11 @@ function bo(s) {
2809
2809
  const Qe = {
2810
2810
  test: vi("#"),
2811
2811
  parse: bo,
2812
- transform: dt.transform
2812
+ transform: pt.transform
2813
2813
  }, Se = {
2814
- test: (s) => dt.test(s) || Qe.test(s) || xt.test(s),
2815
- parse: (s) => dt.test(s) ? dt.parse(s) : xt.test(s) ? xt.parse(s) : Qe.parse(s),
2816
- transform: (s) => ie(s) ? s : s.hasOwnProperty("red") ? dt.transform(s) : xt.transform(s)
2814
+ test: (s) => pt.test(s) || Qe.test(s) || xt.test(s),
2815
+ parse: (s) => pt.test(s) ? pt.parse(s) : xt.test(s) ? xt.parse(s) : Qe.parse(s),
2816
+ transform: (s) => ie(s) ? s : s.hasOwnProperty("red") ? pt.transform(s) : xt.transform(s)
2817
2817
  }, Zs = "${c}", Qs = "${n}";
2818
2818
  function wo(s) {
2819
2819
  var t, e, i, n;
@@ -2868,9 +2868,9 @@ function rs({ hue: s, saturation: t, lightness: e, alpha: i }) {
2868
2868
  const So = (s, t, e) => {
2869
2869
  const i = s * s, n = t * t;
2870
2870
  return Math.sqrt(Math.max(0, e * (n - i) + i));
2871
- }, Ao = [Qe, dt, xt], os = (s) => Ao.find((t) => t.test(s)), rn = (s, t) => {
2871
+ }, Ao = [Qe, pt, xt], os = (s) => Ao.find((t) => t.test(s)), rn = (s, t) => {
2872
2872
  let e = os(s), i = os(t), n = e.parse(s), r = i.parse(t);
2873
- e === xt && (n = rs(n), e = dt), i === xt && (r = rs(r), i = dt);
2873
+ e === xt && (n = rs(n), e = pt), i === xt && (r = rs(r), i = pt);
2874
2874
  const a = Object.assign({}, n);
2875
2875
  return (l) => {
2876
2876
  for (const c in a)
@@ -2932,7 +2932,7 @@ function Eo(s, t, e) {
2932
2932
  return i;
2933
2933
  }
2934
2934
  function Oo([s, t], [e]) {
2935
- return (i) => e(qs(s, t, i));
2935
+ return (i) => e($s(s, t, i));
2936
2936
  }
2937
2937
  function Io(s, t) {
2938
2938
  const e = s.length, i = e - 1;
@@ -2944,7 +2944,7 @@ function Io(s, t) {
2944
2944
  ;
2945
2945
  r = c - 1;
2946
2946
  }
2947
- const l = qs(s[r], s[r + 1], n);
2947
+ const l = $s(s[r], s[r + 1], n);
2948
2948
  return t[r](l);
2949
2949
  };
2950
2950
  }
@@ -2952,21 +2952,21 @@ function cn(s, t, { clamp: e = !0, ease: i, mixer: n } = {}) {
2952
2952
  const r = s.length;
2953
2953
  is(r === t.length), is(!i || !Array.isArray(i) || i.length === r - 1), s[0] > s[r - 1] && (s = [].concat(s), t = [].concat(t), s.reverse(), t.reverse());
2954
2954
  const a = Eo(t, i, n), l = r === 2 ? Oo(s, a) : Io(s, a);
2955
- return e ? (c) => l($e(s[0], s[r - 1], c)) : l;
2955
+ return e ? (c) => l(Ke(s[0], s[r - 1], c)) : l;
2956
2956
  }
2957
2957
  const Ae = (s) => (t) => 1 - s(1 - t), bi = (s) => (t) => t <= 0.5 ? s(2 * t) / 2 : (2 - s(2 * (1 - t))) / 2, Do = (s) => (t) => Math.pow(t, s), un = (s) => (t) => t * t * ((s + 1) * t - s), Lo = (s) => {
2958
2958
  const t = un(s);
2959
2959
  return (e) => (e *= 2) < 1 ? 0.5 * t(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1)));
2960
- }, fn = 1.525, Fo = 4 / 11, Ho = 8 / 11, Wo = 9 / 10, jo = (s) => s, wi = Do(2), Ro = Ae(wi), pn = bi(wi), dn = (s) => 1 - Math.sin(Math.acos(s)), mn = Ae(dn), Bo = bi(mn), xi = un(fn), No = Ae(xi), Vo = bi(xi), zo = Lo(fn), Uo = 4356 / 361, Go = 35442 / 1805, Xo = 16061 / 1805, ye = (s) => {
2960
+ }, fn = 1.525, Fo = 4 / 11, Ho = 8 / 11, Wo = 9 / 10, jo = (s) => s, wi = Do(2), Ro = Ae(wi), dn = bi(wi), pn = (s) => 1 - Math.sin(Math.acos(s)), mn = Ae(pn), Bo = bi(mn), xi = un(fn), No = Ae(xi), zo = bi(xi), Vo = Lo(fn), Uo = 4356 / 361, Go = 35442 / 1805, Xo = 16061 / 1805, ye = (s) => {
2961
2961
  if (s === 1 || s === 0)
2962
2962
  return s;
2963
2963
  const t = s * s;
2964
2964
  return s < Fo ? 7.5625 * t : s < Ho ? 9.075 * t - 9.9 * s + 3.4 : s < Wo ? Uo * t - Go * s + Xo : 10.8 * s * s - 20.52 * s + 10.72;
2965
- }, Yo = Ae(ye), qo = (s) => s < 0.5 ? 0.5 * (1 - ye(1 - s * 2)) : 0.5 * ye(s * 2 - 1) + 0.5;
2966
- function Ko(s, t) {
2967
- return s.map(() => t || pn).splice(0, s.length - 1);
2965
+ }, Yo = Ae(ye), $o = (s) => s < 0.5 ? 0.5 * (1 - ye(1 - s * 2)) : 0.5 * ye(s * 2 - 1) + 0.5;
2966
+ function qo(s, t) {
2967
+ return s.map(() => t || dn).splice(0, s.length - 1);
2968
2968
  }
2969
- function $o(s) {
2969
+ function Ko(s) {
2970
2970
  const t = s.length;
2971
2971
  return s.map((e, i) => i !== 0 ? i / (t - 1) : 0);
2972
2972
  }
@@ -2974,15 +2974,15 @@ function Jo(s, t) {
2974
2974
  return s.map((e) => e * t);
2975
2975
  }
2976
2976
  function ue({ from: s = 0, to: t = 1, ease: e, offset: i, duration: n = 300 }) {
2977
- const r = { done: !1, value: s }, a = Array.isArray(t) ? t : [s, t], l = Jo(i && i.length === a.length ? i : $o(a), n);
2977
+ const r = { done: !1, value: s }, a = Array.isArray(t) ? t : [s, t], l = Jo(i && i.length === a.length ? i : Ko(a), n);
2978
2978
  function c() {
2979
2979
  return cn(l, a, {
2980
- ease: Array.isArray(e) ? e : Ko(a, e)
2980
+ ease: Array.isArray(e) ? e : qo(a, e)
2981
2981
  });
2982
2982
  }
2983
2983
  let f = c();
2984
2984
  return {
2985
- next: (d) => (r.value = f(d), r.done = d >= n, r),
2985
+ next: (p) => (r.value = f(p), r.done = p >= n, r),
2986
2986
  flipTarget: () => {
2987
2987
  a.reverse(), f = c();
2988
2988
  }
@@ -2993,8 +2993,8 @@ function Zo({ velocity: s = 0, from: t = 0, power: e = 0.8, timeConstant: i = 35
2993
2993
  let l = e * s;
2994
2994
  const c = t + l, f = r === void 0 ? c : r(c);
2995
2995
  return f !== c && (l = f - t), {
2996
- next: (d) => {
2997
- const o = -l * Math.exp(-d / i);
2996
+ next: (p) => {
2997
+ const o = -l * Math.exp(-p / i);
2998
2998
  return a.done = !(o > n || o < -n), a.value = a.done ? f : f + o, a;
2999
2999
  },
3000
3000
  flipTarget: () => {
@@ -3014,8 +3014,8 @@ const yn = 1 / 60 * 1e3, ta = typeof performance < "u" ? () => performance.now()
3014
3014
  function ea(s) {
3015
3015
  let t = [], e = [], i = 0, n = !1, r = !1;
3016
3016
  const a = /* @__PURE__ */ new WeakSet(), l = {
3017
- schedule: (c, f = !1, d = !1) => {
3018
- const o = d && n, h = o ? t : e;
3017
+ schedule: (c, f = !1, p = !1) => {
3018
+ const o = p && n, h = o ? t : e;
3019
3019
  return f && a.add(c), h.indexOf(c) === -1 && (h.push(c), o && n && (i = t.length)), c;
3020
3020
  },
3021
3021
  cancel: (c) => {
@@ -3029,8 +3029,8 @@ function ea(s) {
3029
3029
  }
3030
3030
  if (n = !0, [t, e] = [e, t], e.length = 0, i = t.length, i)
3031
3031
  for (let f = 0; f < i; f++) {
3032
- const d = t[f];
3033
- d(c), a.has(d) && (l.schedule(d), s());
3032
+ const p = t[f];
3033
+ p(c), a.has(p) && (l.schedule(p), s());
3034
3034
  }
3035
3035
  n = !1, r && (r = !1, l.process(c));
3036
3036
  }
@@ -3075,7 +3075,7 @@ const ha = (s) => {
3075
3075
  };
3076
3076
  };
3077
3077
  function wn(s) {
3078
- var t, e, { from: i, autoplay: n = !0, driver: r = ha, elapsed: a = 0, repeat: l = 0, repeatType: c = "loop", repeatDelay: f = 0, onPlay: d, onStop: o, onComplete: h, onRepeat: u, onUpdate: p } = s, m = Ys(s, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
3078
+ var t, e, { from: i, autoplay: n = !0, driver: r = ha, elapsed: a = 0, repeat: l = 0, repeatType: c = "loop", repeatDelay: f = 0, onPlay: p, onStop: o, onComplete: h, onRepeat: u, onUpdate: d } = s, m = Ys(s, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
3079
3079
  let { to: g } = m, y, v = 0, b = m.duration, w, x = !1, S = !0, C;
3080
3080
  const M = Qo(m);
3081
3081
  !((e = (t = M).needsInterpolation) === null || e === void 0) && e.call(t, i, g) && (C = cn([0, 100], [i, g], {
@@ -3093,10 +3093,10 @@ function wn(s) {
3093
3093
  const it = A.next(Math.max(0, a));
3094
3094
  w = it.value, C && (w = C(w)), x = S ? it.done : a <= 0;
3095
3095
  }
3096
- p?.(w), x && (v === 0 && (b ?? (b = a)), v < l ? la(a, b, f, S) && L() : j());
3096
+ d?.(w), x && (v === 0 && (b ?? (b = a)), v < l ? la(a, b, f, S) && L() : j());
3097
3097
  }
3098
3098
  function ut() {
3099
- d?.(), y = r(Nt), y.start();
3099
+ p?.(), y = r(Nt), y.start();
3100
3100
  }
3101
3101
  return n && ut(), {
3102
3102
  stop: () => {
@@ -3140,21 +3140,21 @@ function xn(s, t = {}) {
3140
3140
  let n = null, r = !1;
3141
3141
  const a = P(s), l = P(e);
3142
3142
  H(() => {
3143
- const d = l();
3144
- a.set(d.current);
3143
+ const p = l();
3144
+ a.set(p.current);
3145
3145
  });
3146
- function c(d, o = {}) {
3147
- if (d === void 0)
3146
+ function c(p, o = {}) {
3147
+ if (p === void 0)
3148
3148
  return l();
3149
3149
  const h = l(), u = {
3150
3150
  current: h.current,
3151
3151
  start: h.current,
3152
- end: d
3152
+ end: p
3153
3153
  };
3154
3154
  l.set(u), n && (n.stop(), n = null), r = !1;
3155
- const p = { ...t, ...o }, m = p.duration ?? i, g = p.ease ?? ((w) => w);
3156
- p.tick || ua();
3157
- const y = h.current, v = d, b = o.onComplete ?? t.onComplete;
3155
+ const d = { ...t, ...o }, m = d.duration ?? i, g = d.ease ?? ((w) => w);
3156
+ d.tick || ua();
3157
+ const y = h.current, v = p, b = o.onComplete ?? t.onComplete;
3158
3158
  n = wn({
3159
3159
  from: y,
3160
3160
  to: v,
@@ -3163,7 +3163,7 @@ function xn(s, t = {}) {
3163
3163
  onUpdate: (w) => {
3164
3164
  if (r) return;
3165
3165
  const x = w;
3166
- l.update((S) => ({ ...S, current: x })), p.onUpdate?.(x), o.onUpdate?.(x);
3166
+ l.update((S) => ({ ...S, current: x })), d.onUpdate?.(x), o.onUpdate?.(x);
3167
3167
  },
3168
3168
  onComplete: () => {
3169
3169
  l.update((w) => ({ ...w, current: v })), b?.();
@@ -3173,13 +3173,13 @@ function xn(s, t = {}) {
3173
3173
  const f = function() {
3174
3174
  return l().current;
3175
3175
  };
3176
- for (const d in a)
3177
- f[d] = a[d];
3178
- return f.animatedState = l, f.update = (d) => {
3179
- c(d(l().current));
3180
- }, f.set = async (d, o = {}) => new Promise((h) => {
3176
+ for (const p in a)
3177
+ f[p] = a[p];
3178
+ return f.animatedState = l, f.update = (p) => {
3179
+ c(p(l().current));
3180
+ }, f.set = async (p, o = {}) => new Promise((h) => {
3181
3181
  const u = o.onComplete;
3182
- c(d, {
3182
+ c(p, {
3183
3183
  ...o,
3184
3184
  onComplete: () => {
3185
3185
  u ? u() : t.onComplete && t.onComplete(), h();
@@ -3190,8 +3190,8 @@ function xn(s, t = {}) {
3190
3190
  }, f.resume = () => {
3191
3191
  if (!r) return;
3192
3192
  r = !1;
3193
- const d = l();
3194
- d.current !== d.end && c(d.end, t);
3193
+ const p = l();
3194
+ p.current !== p.end && c(p.end, t);
3195
3195
  }, f;
3196
3196
  }
3197
3197
  async function Yl(s) {
@@ -3200,7 +3200,7 @@ async function Yl(s) {
3200
3200
  }
3201
3201
  const ii = {}, G = (s) => s && typeof s == "object" && "tag" in s && "props" in s && "componentInstance" in s, hs = (s) => typeof s == "string" || typeof s == "number" || typeof s == "boolean" || s === null || s === void 0, fa = {
3202
3202
  Sprite: "DOMSprite"
3203
- }, pa = /* @__PURE__ */ new Set(["DOMContainer", "DOMElement", "DOMSprite"]), da = /* @__PURE__ */ new Set([
3203
+ }, da = /* @__PURE__ */ new Set(["DOMContainer", "DOMElement", "DOMSprite"]), pa = /* @__PURE__ */ new Set([
3204
3204
  "Canvas",
3205
3205
  "Container",
3206
3206
  "Graphics",
@@ -3232,7 +3232,7 @@ const ii = {}, G = (s) => s && typeof s == "object" && "tag" in s && "props" in
3232
3232
  }, ya = (s) => {
3233
3233
  s.propSubscriptions?.forEach((t) => t.unsubscribe()), s.effectSubscriptions?.forEach((t) => t.unsubscribe()), s.effectUnmounts?.forEach((t) => t?.());
3234
3234
  }, Mt = (s, t) => {
3235
- if (!ma(s) || pa.has(t.tag))
3235
+ if (!ma(s) || da.has(t.tag))
3236
3236
  return t;
3237
3237
  const e = fa[t.tag];
3238
3238
  if (e) {
@@ -3240,7 +3240,7 @@ const ii = {}, G = (s) => s && typeof s == "object" && "tag" in s && "props" in
3240
3240
  const i = t.propObservables ?? t.props;
3241
3241
  return N(e, i);
3242
3242
  }
3243
- if (da.has(t.tag))
3243
+ if (pa.has(t.tag))
3244
3244
  throw new Error(
3245
3245
  `Component ${t.tag} is not implemented for DOMContainer context yet. Only Sprite is supported.`
3246
3246
  );
@@ -3294,15 +3294,15 @@ function Ne(s, t) {
3294
3294
  };
3295
3295
  Object.values(s.propObservables).forEach(e);
3296
3296
  }
3297
- function V(s) {
3297
+ function z(s) {
3298
3298
  if (Array.isArray(s)) {
3299
- s.forEach((t) => V(t));
3299
+ s.forEach((t) => z(t));
3300
3300
  return;
3301
3301
  }
3302
3302
  if (s) {
3303
3303
  if (s.props?.children)
3304
3304
  for (let t of s.props.children)
3305
- V(t);
3305
+ z(t);
3306
3306
  for (let t in s.directives)
3307
3307
  s.directives[t].onDestroy?.(s);
3308
3308
  s.componentInstance && s.componentInstance.onDestroy ? s.componentInstance.onDestroy(s.parent, () => {
@@ -3329,28 +3329,28 @@ function N(s, t) {
3329
3329
  effectSubscriptions: [],
3330
3330
  effectMounts: [],
3331
3331
  destroy() {
3332
- V(this);
3332
+ z(this);
3333
3333
  },
3334
3334
  allElements: new At(),
3335
3335
  isFrozen: !1
3336
3336
  };
3337
3337
  if (t) {
3338
- const d = (o, h = "") => {
3339
- const u = (p, m, g) => {
3340
- if (p == "") {
3338
+ const p = (o, h = "") => {
3339
+ const u = (d, m, g) => {
3340
+ if (d == "") {
3341
3341
  i.props[m] = g;
3342
3342
  return;
3343
3343
  }
3344
- qe(i.props, p + "." + m, g);
3344
+ $e(i.props, d + "." + m, g);
3345
3345
  };
3346
- Object.entries(o).forEach(([p, m]) => {
3346
+ Object.entries(o).forEach(([d, m]) => {
3347
3347
  if (_(m)) {
3348
3348
  const g = m;
3349
3349
  if ("dependencies" in g && g.dependencies.size == 0) {
3350
- u(h, p, g()), p === "freeze" && (i.isFrozen = g() === !0);
3350
+ u(h, d, g()), d === "freeze" && (i.isFrozen = g() === !0);
3351
3351
  return;
3352
3352
  }
3353
- if (p === "freeze") {
3353
+ if (d === "freeze") {
3354
3354
  i.isFrozen = g() === !0, Ne(i, i.isFrozen), i.propSubscriptions.push(
3355
3355
  g.observable.subscribe((y) => {
3356
3356
  const v = i.isFrozen;
@@ -3365,44 +3365,44 @@ function N(s, t) {
3365
3365
  Zt(g) && g.pause();
3366
3366
  return;
3367
3367
  }
3368
- if (Zt(g) && g.resume(), u(h, p, y), i.directives[p] && i.directives[p].onUpdate?.(y, i), p == "tick")
3368
+ if (Zt(g) && g.resume(), u(h, d, y), i.directives[d] && i.directives[d].onUpdate?.(y, i), d == "tick")
3369
3369
  return ot(i), void 0;
3370
3370
  e.onUpdate?.(
3371
3371
  h == "" ? {
3372
- [p]: y
3373
- } : qe({}, h + "." + p, y)
3372
+ [d]: y
3373
+ } : $e({}, h + "." + d, y)
3374
3374
  );
3375
3375
  })
3376
3376
  );
3377
3377
  } else
3378
- p === "freeze" && (i.isFrozen = m === !0, Ne(i, i.isFrozen)), xe(m) && p != "context" && !G(m) ? d(m, (h ? h + "." : "") + p) : u(h, p, m);
3378
+ d === "freeze" && (i.isFrozen = m === !0, Ne(i, i.isFrozen)), xe(m) && d != "context" && !G(m) ? p(m, (h ? h + "." : "") + d) : u(h, d, m);
3379
3379
  });
3380
3380
  };
3381
- d(t);
3381
+ p(t);
3382
3382
  }
3383
3383
  e.onInit?.(i.props);
3384
3384
  const n = new At();
3385
3385
  if (t?.isRoot && (i.allElements = n, i.props.context.rootElement = i, i.componentInstance.onMount?.(i), c(i)), t)
3386
- for (let d in t) {
3387
- const o = di(i, d);
3388
- o && (i.directives[d] = o);
3386
+ for (let p in t) {
3387
+ const o = pi(i, p);
3388
+ o && (i.directives[p] = o);
3389
3389
  }
3390
- function r(d, o, h, u) {
3391
- const p = h.filter((y) => _(y));
3392
- if (h.filter((y) => yt(y)), p.length === 0)
3390
+ function r(p, o, h, u) {
3391
+ const d = h.filter((y) => _(y));
3392
+ if (h.filter((y) => yt(y)), d.length === 0)
3393
3393
  return;
3394
- const m = p.map((y) => y.observable), g = we(m).subscribe(
3394
+ const m = d.map((y) => y.observable), g = we(m).subscribe(
3395
3395
  async () => {
3396
3396
  if (await ge(h)) {
3397
3397
  g.unsubscribe();
3398
3398
  const v = o.propSubscriptions.indexOf(g);
3399
- v > -1 && o.propSubscriptions.splice(v, 1), a(d, o, u), c(o);
3399
+ v > -1 && o.propSubscriptions.splice(v, 1), a(p, o, u), c(o);
3400
3400
  }
3401
3401
  }
3402
3402
  );
3403
3403
  o.propSubscriptions.push(g);
3404
3404
  }
3405
- function a(d, o, h) {
3405
+ function a(p, o, h) {
3406
3406
  o.componentInstance.onMount?.(o, h);
3407
3407
  for (let u in o.directives)
3408
3408
  o.directives[u].onMount?.(o);
@@ -3410,49 +3410,49 @@ function N(s, t) {
3410
3410
  o.effectUnmounts.push(u(o));
3411
3411
  });
3412
3412
  }
3413
- async function l(d, o, h) {
3414
- let u = d;
3413
+ async function l(p, o, h) {
3414
+ let u = p;
3415
3415
  for (; u?.tag === "fragment"; )
3416
3416
  u = u.parent;
3417
3417
  if (o.props.context = u.props.context, o.parent = u, !o.propObservables?.freeze && !o.props?.freeze && ot(u) && (o.isFrozen = !0), o.props.dependencies && Array.isArray(o.props.dependencies)) {
3418
- const p = o.props.dependencies;
3419
- if (!await ge(p)) {
3420
- r(u, o, p, h);
3418
+ const d = o.props.dependencies;
3419
+ if (!await ge(d)) {
3420
+ r(u, o, d, h);
3421
3421
  return;
3422
3422
  }
3423
3423
  }
3424
3424
  a(u, o, h);
3425
3425
  }
3426
- async function c(d) {
3427
- if (d.props.attach && (_(d.propObservables?.attach) ? await new Promise((h) => {
3426
+ async function c(p) {
3427
+ if (p.props.attach && (_(p.propObservables?.attach) ? await new Promise((h) => {
3428
3428
  let u = null;
3429
- d.propSubscriptions.push(d.propObservables.attach.observable.subscribe(async (p) => {
3430
- const m = p?.value ?? p;
3429
+ p.propSubscriptions.push(p.propObservables.attach.observable.subscribe(async (d) => {
3430
+ const m = d?.value ?? d;
3431
3431
  if (!m)
3432
- throw new Error(`attach in ${d.tag} is undefined or null, add a component`);
3433
- u && V(u), u = m, await f(d, m), h(void 0);
3432
+ throw new Error(`attach in ${p.tag} is undefined or null, add a component`);
3433
+ u && z(u), u = m, await f(p, m), h(void 0);
3434
3434
  }));
3435
- }) : d.props.children.push(d.props.attach)), !!d.props.children)
3436
- for (let o of d.props.children)
3437
- o && await f(d, o);
3435
+ }) : p.props.children.push(p.props.attach)), !!p.props.children)
3436
+ for (let o of p.props.children)
3437
+ o && await f(p, o);
3438
3438
  }
3439
- async function f(d, o) {
3439
+ async function f(p, o) {
3440
3440
  if (yt(o) && (o = await o), o instanceof I) {
3441
3441
  const h = o.subscribe(
3442
3442
  (u) => {
3443
3443
  if (u && typeof u == "object" && "elements" in u) {
3444
3444
  const {
3445
- elements: p,
3445
+ elements: d,
3446
3446
  prev: m
3447
- } = u, g = p.filter((y) => y !== null);
3447
+ } = u, g = d.filter((y) => y !== null);
3448
3448
  if (m) {
3449
3449
  g.forEach(async (y) => {
3450
- const v = d.props.children.indexOf(m.props.key);
3450
+ const v = p.props.children.indexOf(m.props.key);
3451
3451
  if (y instanceof I)
3452
- await f(d, y);
3452
+ await f(p, y);
3453
3453
  else if (G(y)) {
3454
- const b = Mt(d, y);
3455
- l(d, b, v + 1), c(b);
3454
+ const b = Mt(p, y);
3455
+ l(p, b, v + 1), c(b);
3456
3456
  }
3457
3457
  });
3458
3458
  return;
@@ -3461,42 +3461,42 @@ function N(s, t) {
3461
3461
  if (Array.isArray(y))
3462
3462
  y.forEach(async (v) => {
3463
3463
  if (v instanceof I)
3464
- await f(d, v);
3464
+ await f(p, v);
3465
3465
  else if (G(v)) {
3466
- const b = Mt(d, v);
3467
- l(d, b), c(b);
3466
+ const b = Mt(p, v);
3467
+ l(p, b), c(b);
3468
3468
  }
3469
3469
  });
3470
3470
  else if (y instanceof I)
3471
- await f(d, y);
3471
+ await f(p, y);
3472
3472
  else if (G(y)) {
3473
- const v = Mt(d, y);
3474
- l(d, v), c(v);
3473
+ const v = Mt(p, y);
3474
+ l(p, v), c(v);
3475
3475
  }
3476
3476
  });
3477
3477
  } else if (G(u)) {
3478
- const p = Mt(d, u);
3479
- l(d, p), c(p);
3480
- } else Array.isArray(u) && u.forEach(async (p) => {
3481
- if (p instanceof I)
3482
- await f(d, p);
3483
- else if (G(p)) {
3484
- const m = Mt(d, p);
3485
- l(d, m), c(m);
3478
+ const d = Mt(p, u);
3479
+ l(p, d), c(d);
3480
+ } else Array.isArray(u) && u.forEach(async (d) => {
3481
+ if (d instanceof I)
3482
+ await f(p, d);
3483
+ else if (G(d)) {
3484
+ const m = Mt(p, d);
3485
+ l(p, m), c(m);
3486
3486
  }
3487
3487
  });
3488
3488
  n.next(void 0);
3489
3489
  }
3490
3490
  );
3491
- d.effectSubscriptions.push(h);
3491
+ p.effectSubscriptions.push(h);
3492
3492
  } else if (G(o)) {
3493
- const h = Mt(d, o);
3494
- l(d, h), await c(h);
3493
+ const h = Mt(p, o);
3494
+ l(p, h), await c(h);
3495
3495
  }
3496
3496
  }
3497
3497
  return i;
3498
3498
  }
3499
- function ql(s, t) {
3499
+ function $l(s, t) {
3500
3500
  return ee(s) && s.dependencies.size == 0 ? s = P(s()) : _(s) || (s = P(s)), Hr(() => {
3501
3501
  let e = [], i = /* @__PURE__ */ new Map(), n = !0;
3502
3502
  const r = (l) => l ? G(l) ? l : {
@@ -3511,7 +3511,7 @@ function ql(s, t) {
3511
3511
  parent: null,
3512
3512
  directives: {},
3513
3513
  destroy() {
3514
- V(this);
3514
+ z(this);
3515
3515
  },
3516
3516
  allElements: new At(),
3517
3517
  isFrozen: !1
@@ -3522,30 +3522,30 @@ function ql(s, t) {
3522
3522
  n = !1, e.forEach((h) => h.destroy()), e = [], i.clear();
3523
3523
  const o = s();
3524
3524
  o && o.forEach((h, u) => {
3525
- const p = r(t(h, u));
3526
- p && (e.push(p), i.set(u, p));
3525
+ const d = r(t(h, u));
3526
+ d && (e.push(d), i.set(u, d));
3527
3527
  }), l.next({
3528
3528
  elements: [...e]
3529
3529
  });
3530
3530
  return;
3531
3531
  }
3532
- const d = Array.isArray(f) || f && typeof f == "object" && !("type" in f);
3533
- if (f.type === "init" || f.type === "reset" || d) {
3534
- e.forEach((h) => V(h)), e = [], i.clear();
3532
+ const p = Array.isArray(f) || f && typeof f == "object" && !("type" in f);
3533
+ if (f.type === "init" || f.type === "reset" || p) {
3534
+ e.forEach((h) => z(h)), e = [], i.clear();
3535
3535
  const o = s();
3536
3536
  o && o.forEach((h, u) => {
3537
- const p = r(t(h, u));
3538
- p && (e.push(p), i.set(u, p));
3537
+ const d = r(t(h, u));
3538
+ d && (e.push(d), i.set(u, d));
3539
3539
  });
3540
3540
  } else if (f.type === "add" && f.index !== void 0) {
3541
3541
  const o = f.items.map((h, u) => {
3542
- const p = r(t(h, f.index + u));
3543
- return p && i.set(f.index + u, p), p;
3542
+ const d = r(t(h, f.index + u));
3543
+ return d && i.set(f.index + u, d), d;
3544
3544
  }).filter((h) => h !== null);
3545
3545
  e.splice(f.index, 0, ...o);
3546
3546
  } else if (f.type === "remove" && f.index !== void 0)
3547
3547
  e.splice(f.index, 1).forEach((h) => {
3548
- V(h), i.delete(f.index);
3548
+ z(h), i.delete(f.index);
3549
3549
  });
3550
3550
  else if (f.type === "update" && f.index !== void 0 && f.items.length === 1) {
3551
3551
  const o = f.index, h = f.items[0];
@@ -3554,9 +3554,9 @@ function ql(s, t) {
3554
3554
  u ? (e.splice(o, 0, u), i.set(o, u)) : console.warn(`Element creation returned null for index ${o} during add-like update.`);
3555
3555
  } else {
3556
3556
  const u = e[o];
3557
- V(u);
3558
- const p = r(t(h, o));
3559
- p ? (e[o] = p, i.set(o, p)) : (e.splice(o, 1), i.delete(o));
3557
+ z(u);
3558
+ const d = r(t(h, o));
3559
+ d ? (e[o] = d, i.set(o, d)) : (e.splice(o, 1), i.delete(o));
3560
3560
  }
3561
3561
  }
3562
3562
  l.next({
@@ -3564,41 +3564,41 @@ function ql(s, t) {
3564
3564
  // Create a new array to ensure change detection
3565
3565
  });
3566
3566
  }) : s.observable.subscribe((f) => {
3567
- const d = f.key;
3567
+ const p = f.key;
3568
3568
  if (n) {
3569
- n = !1, e.forEach((h) => V(h)), e = [], i.clear();
3569
+ n = !1, e.forEach((h) => z(h)), e = [], i.clear();
3570
3570
  const o = s();
3571
3571
  o && Object.entries(o).forEach(([h, u]) => {
3572
- const p = r(t(u, h));
3573
- p && (e.push(p), i.set(h, p));
3572
+ const d = r(t(u, h));
3573
+ d && (e.push(d), i.set(h, d));
3574
3574
  }), l.next({
3575
3575
  elements: [...e]
3576
3576
  });
3577
3577
  return;
3578
3578
  }
3579
3579
  if (f.type === "init" || f.type === "reset") {
3580
- e.forEach((h) => V(h)), e = [], i.clear();
3580
+ e.forEach((h) => z(h)), e = [], i.clear();
3581
3581
  const o = s();
3582
3582
  o && Object.entries(o).forEach(([h, u]) => {
3583
- const p = r(t(u, h));
3584
- p && (e.push(p), i.set(h, p));
3583
+ const d = r(t(u, h));
3584
+ d && (e.push(d), i.set(h, d));
3585
3585
  });
3586
3586
  } else if (f.type === "add" && f.key && f.value !== void 0) {
3587
- const o = r(t(f.value, d));
3588
- o && (e.push(o), i.set(d, o));
3587
+ const o = r(t(f.value, p));
3588
+ o && (e.push(o), i.set(p, o));
3589
3589
  } else if (f.type === "remove" && f.key) {
3590
- const o = e.findIndex((h) => i.get(d) === h);
3590
+ const o = e.findIndex((h) => i.get(p) === h);
3591
3591
  if (o !== -1) {
3592
3592
  const [h] = e.splice(o, 1);
3593
- V(h), i.delete(d);
3593
+ z(h), i.delete(p);
3594
3594
  }
3595
3595
  } else if (f.type === "update" && f.key && f.value !== void 0) {
3596
- const o = e.findIndex((h) => i.get(d) === h);
3596
+ const o = e.findIndex((h) => i.get(p) === h);
3597
3597
  if (o !== -1) {
3598
3598
  const h = e[o];
3599
- V(h);
3600
- const u = r(t(f.value, d));
3601
- u && (e[o] = u, i.set(d, u));
3599
+ z(h);
3600
+ const u = r(t(f.value, p));
3601
+ u && (e[o] = u, i.set(p, u));
3602
3602
  }
3603
3603
  }
3604
3604
  l.next({
@@ -3607,16 +3607,16 @@ function ql(s, t) {
3607
3607
  });
3608
3608
  });
3609
3609
  return () => {
3610
- c.unsubscribe(), e.forEach((f) => V(f));
3610
+ c.unsubscribe(), e.forEach((f) => z(f));
3611
3611
  };
3612
3612
  });
3613
3613
  }).pipe(jr({ bufferSize: 1, refCount: !0 }));
3614
3614
  }
3615
- function Kl(s, t, ...e) {
3615
+ function ql(s, t, ...e) {
3616
3616
  let i = null, n = -1;
3617
3617
  const r = [];
3618
3618
  let a = null;
3619
- const l = (f) => _(f) ? f : typeof f == "function" ? K(f) : P(f);
3619
+ const l = (f) => _(f) ? f : typeof f == "function" ? q(f) : P(f);
3620
3620
  for (const f of e)
3621
3621
  if (Array.isArray(f))
3622
3622
  r.push({
@@ -3632,7 +3632,7 @@ function Kl(s, t, ...e) {
3632
3632
  ...r
3633
3633
  ];
3634
3634
  return new I((f) => {
3635
- const d = [], o = () => {
3635
+ const p = [], o = () => {
3636
3636
  let h = -1;
3637
3637
  for (let m = 0; m < c.length; m++) {
3638
3638
  const g = c[m].condition;
@@ -3641,11 +3641,11 @@ function Kl(s, t, ...e) {
3641
3641
  break;
3642
3642
  }
3643
3643
  }
3644
- const u = h === -1 && a, p = u ? -2 : h;
3645
- if (p !== n)
3646
- if (i && (V(i), i = null), n = p, u) {
3644
+ const u = h === -1 && a, d = u ? -2 : h;
3645
+ if (d !== n)
3646
+ if (i && (z(i), i = null), n = d, u) {
3647
3647
  let m = a();
3648
- yt(m) ? de(m).subscribe((g) => {
3648
+ yt(m) ? pe(m).subscribe((g) => {
3649
3649
  i = g, f.next({
3650
3650
  type: "init",
3651
3651
  elements: [g]
@@ -3656,7 +3656,7 @@ function Kl(s, t, ...e) {
3656
3656
  }));
3657
3657
  } else if (h >= 0) {
3658
3658
  let m = c[h].elementFn();
3659
- yt(m) ? de(m).subscribe((g) => {
3659
+ yt(m) ? pe(m).subscribe((g) => {
3660
3660
  i = g, f.next({
3661
3661
  type: "init",
3662
3662
  elements: [g]
@@ -3672,13 +3672,13 @@ function Kl(s, t, ...e) {
3672
3672
  };
3673
3673
  return c.forEach(({ condition: h }) => {
3674
3674
  const u = h;
3675
- d.push(
3675
+ p.push(
3676
3676
  u.observable.subscribe(() => {
3677
3677
  o();
3678
3678
  })
3679
3679
  );
3680
3680
  }), o(), () => {
3681
- d.forEach((h) => h.unsubscribe()), i && V(i);
3681
+ p.forEach((h) => h.unsubscribe()), i && z(i);
3682
3682
  };
3683
3683
  }).pipe(Bs());
3684
3684
  }
@@ -3876,15 +3876,15 @@ const Z = (s, t = {}) => {
3876
3876
  const r = t[n], a = e[n];
3877
3877
  let l;
3878
3878
  if (typeof r == "function")
3879
- Ve(n, a, [r]), l = a;
3879
+ ze(n, a, [r]), l = a;
3880
3880
  else if (Array.isArray(r))
3881
- Ve(n, a, r), l = a;
3881
+ ze(n, a, r), l = a;
3882
3882
  else if (r && typeof r == "object") {
3883
3883
  if (r.required && a === void 0)
3884
3884
  throw new Error(`Missing required prop: ${n}`);
3885
3885
  if (r.type) {
3886
3886
  const c = Array.isArray(r.type) ? r.type : [r.type];
3887
- Ve(n, a, c);
3887
+ ze(n, a, c);
3888
3888
  }
3889
3889
  if (r.validator && !r.validator(a, e))
3890
3890
  throw new Error(`Invalid prop: custom validation failed for prop "${n}"`);
@@ -3897,7 +3897,7 @@ const Z = (s, t = {}) => {
3897
3897
  ...i
3898
3898
  };
3899
3899
  };
3900
- function Ve(s, t, e) {
3900
+ function ze(s, t, e) {
3901
3901
  if (t == null) return;
3902
3902
  const i = _(t) ? t() : t;
3903
3903
  if (!e.some((r) => r === Number ? typeof i == "number" : r === String ? typeof i == "string" : r === Boolean ? typeof i == "boolean" : r === Function ? typeof i == "function" : r === Object ? typeof i == "object" : r === Array ? Array.isArray(i) : r === null ? i === null : i instanceof r))
@@ -3941,11 +3941,11 @@ class wa extends tt {
3941
3941
  }
3942
3942
  }
3943
3943
  et("viewportFollow", wa);
3944
- var Vt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3944
+ var zt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3945
3945
  function xa(s) {
3946
3946
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
3947
3947
  }
3948
- var ze = {};
3948
+ var Ve = {};
3949
3949
  var fs;
3950
3950
  function _a() {
3951
3951
  return fs || (fs = 1, (function(s) {
@@ -3969,14 +3969,14 @@ function _a() {
3969
3969
  */
3970
3970
  volume: function(o) {
3971
3971
  var h = this || e;
3972
- if (o = parseFloat(o), h.ctx || d(), typeof o < "u" && o >= 0 && o <= 1) {
3972
+ if (o = parseFloat(o), h.ctx || p(), typeof o < "u" && o >= 0 && o <= 1) {
3973
3973
  if (h._volume = o, h._muted)
3974
3974
  return h;
3975
3975
  h.usingWebAudio && h.masterGain.gain.setValueAtTime(o, e.ctx.currentTime);
3976
3976
  for (var u = 0; u < h._howls.length; u++)
3977
3977
  if (!h._howls[u]._webAudio)
3978
- for (var p = h._howls[u]._getSoundIds(), m = 0; m < p.length; m++) {
3979
- var g = h._howls[u]._soundById(p[m]);
3978
+ for (var d = h._howls[u]._getSoundIds(), m = 0; m < d.length; m++) {
3979
+ var g = h._howls[u]._soundById(d[m]);
3980
3980
  g && g._node && (g._node.volume = g._volume * o);
3981
3981
  }
3982
3982
  return h;
@@ -3989,11 +3989,11 @@ function _a() {
3989
3989
  */
3990
3990
  mute: function(o) {
3991
3991
  var h = this || e;
3992
- h.ctx || d(), h._muted = o, h.usingWebAudio && h.masterGain.gain.setValueAtTime(o ? 0 : h._volume, e.ctx.currentTime);
3992
+ h.ctx || p(), h._muted = o, h.usingWebAudio && h.masterGain.gain.setValueAtTime(o ? 0 : h._volume, e.ctx.currentTime);
3993
3993
  for (var u = 0; u < h._howls.length; u++)
3994
3994
  if (!h._howls[u]._webAudio)
3995
- for (var p = h._howls[u]._getSoundIds(), m = 0; m < p.length; m++) {
3996
- var g = h._howls[u]._soundById(p[m]);
3995
+ for (var d = h._howls[u]._getSoundIds(), m = 0; m < d.length; m++) {
3996
+ var g = h._howls[u]._soundById(d[m]);
3997
3997
  g && g._node && (g._node.muted = o ? !0 : g._muted);
3998
3998
  }
3999
3999
  return h;
@@ -4013,7 +4013,7 @@ function _a() {
4013
4013
  unload: function() {
4014
4014
  for (var o = this || e, h = o._howls.length - 1; h >= 0; h--)
4015
4015
  o._howls[h].unload();
4016
- return o.usingWebAudio && o.ctx && typeof o.ctx.close < "u" && (o.ctx.close(), o.ctx = null, d()), o;
4016
+ return o.usingWebAudio && o.ctx && typeof o.ctx.close < "u" && (o.ctx.close(), o.ctx = null, p()), o;
4017
4017
  },
4018
4018
  /**
4019
4019
  * Check for codec support of specific extension.
@@ -4059,7 +4059,7 @@ function _a() {
4059
4059
  }
4060
4060
  if (!h || typeof h.canPlayType != "function")
4061
4061
  return o;
4062
- var u = h.canPlayType("audio/mpeg;").replace(/^no$/, ""), p = o._navigator ? o._navigator.userAgent : "", m = p.match(/OPR\/(\d+)/g), g = m && parseInt(m[0].split("/")[1], 10) < 33, y = p.indexOf("Safari") !== -1 && p.indexOf("Chrome") === -1, v = p.match(/Version\/(.*?) /), b = y && v && parseInt(v[1], 10) < 15;
4062
+ var u = h.canPlayType("audio/mpeg;").replace(/^no$/, ""), d = o._navigator ? o._navigator.userAgent : "", m = d.match(/OPR\/(\d+)/g), g = m && parseInt(m[0].split("/")[1], 10) < 33, y = d.indexOf("Safari") !== -1 && d.indexOf("Chrome") === -1, v = d.match(/Version\/(.*?) /), b = y && v && parseInt(v[1], 10) < 15;
4063
4063
  return o._codecs = {
4064
4064
  mp3: !!(!g && (u || h.canPlayType("audio/mp3;").replace(/^no$/, ""))),
4065
4065
  mpeg: !!u,
@@ -4091,8 +4091,8 @@ function _a() {
4091
4091
  var h = function(u) {
4092
4092
  for (; o._html5AudioPool.length < o.html5PoolSize; )
4093
4093
  try {
4094
- var p = new Audio();
4095
- p._unlocked = !0, o._releaseHtml5Audio(p);
4094
+ var d = new Audio();
4095
+ d._unlocked = !0, o._releaseHtml5Audio(d);
4096
4096
  } catch {
4097
4097
  o.noAudio = !0;
4098
4098
  break;
@@ -4153,10 +4153,10 @@ function _a() {
4153
4153
  return o._suspendTimer && clearTimeout(o._suspendTimer), o._suspendTimer = setTimeout(function() {
4154
4154
  if (o.autoSuspend) {
4155
4155
  o._suspendTimer = null, o.state = "suspending";
4156
- var p = function() {
4156
+ var d = function() {
4157
4157
  o.state = "suspended", o._resumeAfterSuspend && (delete o._resumeAfterSuspend, o._autoResume());
4158
4158
  };
4159
- o.ctx.suspend().then(p, p);
4159
+ o.ctx.suspend().then(d, d);
4160
4160
  }
4161
4161
  }, 3e4), o;
4162
4162
  }
@@ -4191,7 +4191,7 @@ function _a() {
4191
4191
  */
4192
4192
  init: function(o) {
4193
4193
  var h = this;
4194
- return e.ctx || d(), h._autoplay = o.autoplay || !1, h._format = typeof o.format != "string" ? o.format : [o.format], h._html5 = o.html5 || !1, h._muted = o.mute || !1, h._loop = o.loop || !1, h._pool = o.pool || 5, h._preload = typeof o.preload == "boolean" || o.preload === "metadata" ? o.preload : !0, h._rate = o.rate || 1, h._sprite = o.sprite || {}, h._src = typeof o.src != "string" ? o.src : [o.src], h._volume = o.volume !== void 0 ? o.volume : 1, h._xhr = {
4194
+ return e.ctx || p(), h._autoplay = o.autoplay || !1, h._format = typeof o.format != "string" ? o.format : [o.format], h._html5 = o.html5 || !1, h._muted = o.mute || !1, h._loop = o.loop || !1, h._pool = o.pool || 5, h._preload = typeof o.preload == "boolean" || o.preload === "metadata" ? o.preload : !0, h._rate = o.rate || 1, h._sprite = o.sprite || {}, h._src = typeof o.src != "string" ? o.src : [o.src], h._volume = o.volume !== void 0 ? o.volume : 1, h._xhr = {
4195
4195
  method: o.xhr && o.xhr.method ? o.xhr.method : "GET",
4196
4196
  headers: o.xhr && o.xhr.headers ? o.xhr.headers : null,
4197
4197
  withCredentials: o.xhr && o.xhr.withCredentials ? o.xhr.withCredentials : !1
@@ -4214,17 +4214,17 @@ function _a() {
4214
4214
  }
4215
4215
  typeof o._src == "string" && (o._src = [o._src]);
4216
4216
  for (var u = 0; u < o._src.length; u++) {
4217
- var p, m;
4217
+ var d, m;
4218
4218
  if (o._format && o._format[u])
4219
- p = o._format[u];
4219
+ d = o._format[u];
4220
4220
  else {
4221
4221
  if (m = o._src[u], typeof m != "string") {
4222
4222
  o._emit("loaderror", null, "Non-string found in selected audio sources - ignoring.");
4223
4223
  continue;
4224
4224
  }
4225
- p = /^data:audio\/([^;,]+);/i.exec(m), p || (p = /\.([^.]+)$/.exec(m.split("?", 1)[0])), p && (p = p[1].toLowerCase());
4225
+ d = /^data:audio\/([^;,]+);/i.exec(m), d || (d = /\.([^.]+)$/.exec(m.split("?", 1)[0])), d && (d = d[1].toLowerCase());
4226
4226
  }
4227
- if (p || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), p && e.codecs(p)) {
4227
+ if (d || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), d && e.codecs(d)) {
4228
4228
  h = o._src[u];
4229
4229
  break;
4230
4230
  }
@@ -4242,22 +4242,22 @@ function _a() {
4242
4242
  * @return {Number} Sound ID.
4243
4243
  */
4244
4244
  play: function(o, h) {
4245
- var u = this, p = null;
4245
+ var u = this, d = null;
4246
4246
  if (typeof o == "number")
4247
- p = o, o = null;
4247
+ d = o, o = null;
4248
4248
  else {
4249
4249
  if (typeof o == "string" && u._state === "loaded" && !u._sprite[o])
4250
4250
  return null;
4251
4251
  if (typeof o > "u" && (o = "__default", !u._playLock)) {
4252
4252
  for (var m = 0, g = 0; g < u._sounds.length; g++)
4253
- u._sounds[g]._paused && !u._sounds[g]._ended && (m++, p = u._sounds[g]._id);
4254
- m === 1 ? o = null : p = null;
4253
+ u._sounds[g]._paused && !u._sounds[g]._ended && (m++, d = u._sounds[g]._id);
4254
+ m === 1 ? o = null : d = null;
4255
4255
  }
4256
4256
  }
4257
- var y = p ? u._soundById(p) : u._inactiveSound();
4257
+ var y = d ? u._soundById(d) : u._inactiveSound();
4258
4258
  if (!y)
4259
4259
  return null;
4260
- if (p && !o && (o = y._sprite || "__default"), u._state !== "loaded") {
4260
+ if (d && !o && (o = y._sprite || "__default"), u._state !== "loaded") {
4261
4261
  y._sprite = o, y._ended = !1;
4262
4262
  var v = y._id;
4263
4263
  return u._queue.push({
@@ -4267,7 +4267,7 @@ function _a() {
4267
4267
  }
4268
4268
  }), v;
4269
4269
  }
4270
- if (p && !y._paused)
4270
+ if (d && !y._paused)
4271
4271
  return h || u._loadQueue("play"), y._id;
4272
4272
  u._webAudio && e._autoResume();
4273
4273
  var b = Math.max(0, y._seek > 0 ? y._seek : u._sprite[o][0] / 1e3), w = Math.max(0, (u._sprite[o][0] + u._sprite[o][1]) / 1e3 - b), x = w * 1e3 / Math.abs(y._rate), S = u._sprite[o][0] / 1e3, C = (u._sprite[o][0] + u._sprite[o][1]) / 1e3;
@@ -4337,10 +4337,10 @@ function _a() {
4337
4337
  h.pause(o);
4338
4338
  }
4339
4339
  }), h;
4340
- for (var u = h._getSoundIds(o), p = 0; p < u.length; p++) {
4341
- h._clearTimer(u[p]);
4342
- var m = h._soundById(u[p]);
4343
- if (m && !m._paused && (m._seek = h.seek(u[p]), m._rateSeek = 0, m._paused = !0, h._stopFade(u[p]), m._node))
4340
+ for (var u = h._getSoundIds(o), d = 0; d < u.length; d++) {
4341
+ h._clearTimer(u[d]);
4342
+ var m = h._soundById(u[d]);
4343
+ if (m && !m._paused && (m._seek = h.seek(u[d]), m._rateSeek = 0, m._paused = !0, h._stopFade(u[d]), m._node))
4344
4344
  if (h._webAudio) {
4345
4345
  if (!m._node.bufferSource)
4346
4346
  continue;
@@ -4365,10 +4365,10 @@ function _a() {
4365
4365
  u.stop(o);
4366
4366
  }
4367
4367
  }), u;
4368
- for (var p = u._getSoundIds(o), m = 0; m < p.length; m++) {
4369
- u._clearTimer(p[m]);
4370
- var g = u._soundById(p[m]);
4371
- g && (g._seek = g._start || 0, g._rateSeek = 0, g._paused = !0, g._ended = !0, u._stopFade(p[m]), g._node && (u._webAudio ? g._node.bufferSource && (typeof g._node.bufferSource.stop > "u" ? g._node.bufferSource.noteOff(0) : g._node.bufferSource.stop(0), u._cleanBuffer(g._node)) : (!isNaN(g._node.duration) || g._node.duration === 1 / 0) && (g._node.currentTime = g._start || 0, g._node.pause(), g._node.duration === 1 / 0 && u._clearSound(g._node))), h || u._emit("stop", g._id));
4368
+ for (var d = u._getSoundIds(o), m = 0; m < d.length; m++) {
4369
+ u._clearTimer(d[m]);
4370
+ var g = u._soundById(d[m]);
4371
+ g && (g._seek = g._start || 0, g._rateSeek = 0, g._paused = !0, g._ended = !0, u._stopFade(d[m]), g._node && (u._webAudio ? g._node.bufferSource && (typeof g._node.bufferSource.stop > "u" ? g._node.bufferSource.noteOff(0) : g._node.bufferSource.stop(0), u._cleanBuffer(g._node)) : (!isNaN(g._node.duration) || g._node.duration === 1 / 0) && (g._node.currentTime = g._start || 0, g._node.pause(), g._node.duration === 1 / 0 && u._clearSound(g._node))), h || u._emit("stop", g._id));
4372
4372
  }
4373
4373
  return u;
4374
4374
  },
@@ -4392,8 +4392,8 @@ function _a() {
4392
4392
  u._muted = o;
4393
4393
  else
4394
4394
  return u._muted;
4395
- for (var p = u._getSoundIds(h), m = 0; m < p.length; m++) {
4396
- var g = u._soundById(p[m]);
4395
+ for (var d = u._getSoundIds(h), m = 0; m < d.length; m++) {
4396
+ var g = u._soundById(d[m]);
4397
4397
  g && (g._muted = o, g._interval && u._stopFade(g._id), u._webAudio && g._node ? g._node.gain.setValueAtTime(o ? 0 : g._volume, e.ctx.currentTime) : g._node && (g._node.muted = e._muted ? !0 : o), u._emit("mute", g._id));
4398
4398
  }
4399
4399
  return u;
@@ -4407,13 +4407,13 @@ function _a() {
4407
4407
  * @return {Howl/Number} Returns self or current volume.
4408
4408
  */
4409
4409
  volume: function() {
4410
- var o = this, h = arguments, u, p;
4410
+ var o = this, h = arguments, u, d;
4411
4411
  if (h.length === 0)
4412
4412
  return o._volume;
4413
4413
  if (h.length === 1 || h.length === 2 && typeof h[1] > "u") {
4414
4414
  var m = o._getSoundIds(), g = m.indexOf(h[0]);
4415
- g >= 0 ? p = parseInt(h[0], 10) : u = parseFloat(h[0]);
4416
- } else h.length >= 2 && (u = parseFloat(h[0]), p = parseInt(h[1], 10));
4415
+ g >= 0 ? d = parseInt(h[0], 10) : u = parseFloat(h[0]);
4416
+ } else h.length >= 2 && (u = parseFloat(h[0]), d = parseInt(h[1], 10));
4417
4417
  var y;
4418
4418
  if (typeof u < "u" && u >= 0 && u <= 1) {
4419
4419
  if (o._state !== "loaded" || o._playLock)
@@ -4423,11 +4423,11 @@ function _a() {
4423
4423
  o.volume.apply(o, h);
4424
4424
  }
4425
4425
  }), o;
4426
- typeof p > "u" && (o._volume = u), p = o._getSoundIds(p);
4427
- for (var v = 0; v < p.length; v++)
4428
- y = o._soundById(p[v]), y && (y._volume = u, h[2] || o._stopFade(p[v]), o._webAudio && y._node && !y._muted ? y._node.gain.setValueAtTime(u, e.ctx.currentTime) : y._node && !y._muted && (y._node.volume = u * e.volume()), o._emit("volume", y._id));
4426
+ typeof d > "u" && (o._volume = u), d = o._getSoundIds(d);
4427
+ for (var v = 0; v < d.length; v++)
4428
+ y = o._soundById(d[v]), y && (y._volume = u, h[2] || o._stopFade(d[v]), o._webAudio && y._node && !y._muted ? y._node.gain.setValueAtTime(u, e.ctx.currentTime) : y._node && !y._muted && (y._node.volume = u * e.volume()), o._emit("volume", y._id));
4429
4429
  } else
4430
- return y = p ? o._soundById(p) : o._sounds[0], y ? y._volume : 0;
4430
+ return y = d ? o._soundById(d) : o._sounds[0], y ? y._volume : 0;
4431
4431
  return o;
4432
4432
  },
4433
4433
  /**
@@ -4438,24 +4438,24 @@ function _a() {
4438
4438
  * @param {Number} id The sound id (omit to fade all sounds).
4439
4439
  * @return {Howl}
4440
4440
  */
4441
- fade: function(o, h, u, p) {
4441
+ fade: function(o, h, u, d) {
4442
4442
  var m = this;
4443
4443
  if (m._state !== "loaded" || m._playLock)
4444
4444
  return m._queue.push({
4445
4445
  event: "fade",
4446
4446
  action: function() {
4447
- m.fade(o, h, u, p);
4447
+ m.fade(o, h, u, d);
4448
4448
  }
4449
4449
  }), m;
4450
- o = Math.min(Math.max(0, parseFloat(o)), 1), h = Math.min(Math.max(0, parseFloat(h)), 1), u = parseFloat(u), m.volume(o, p);
4451
- for (var g = m._getSoundIds(p), y = 0; y < g.length; y++) {
4450
+ o = Math.min(Math.max(0, parseFloat(o)), 1), h = Math.min(Math.max(0, parseFloat(h)), 1), u = parseFloat(u), m.volume(o, d);
4451
+ for (var g = m._getSoundIds(d), y = 0; y < g.length; y++) {
4452
4452
  var v = m._soundById(g[y]);
4453
4453
  if (v) {
4454
- if (p || m._stopFade(g[y]), m._webAudio && !v._muted) {
4454
+ if (d || m._stopFade(g[y]), m._webAudio && !v._muted) {
4455
4455
  var b = e.ctx.currentTime, w = b + u / 1e3;
4456
4456
  v._volume = o, v._node.gain.setValueAtTime(o, b), v._node.gain.linearRampToValueAtTime(h, w);
4457
4457
  }
4458
- m._startFadeInterval(v, o, h, u, g[y], typeof p > "u");
4458
+ m._startFadeInterval(v, o, h, u, g[y], typeof d > "u");
4459
4459
  }
4460
4460
  }
4461
4461
  return m;
@@ -4469,10 +4469,10 @@ function _a() {
4469
4469
  * @param {Number} id The sound id to fade.
4470
4470
  * @param {Boolean} isGroup If true, set the volume on the group.
4471
4471
  */
4472
- _startFadeInterval: function(o, h, u, p, m, g) {
4473
- var y = this, v = h, b = u - h, w = Math.abs(b / 0.01), x = Math.max(4, w > 0 ? p / w : p), S = Date.now();
4472
+ _startFadeInterval: function(o, h, u, d, m, g) {
4473
+ var y = this, v = h, b = u - h, w = Math.abs(b / 0.01), x = Math.max(4, w > 0 ? d / w : d), S = Date.now();
4474
4474
  o._fadeTo = u, o._interval = setInterval(function() {
4475
- var C = (Date.now() - S) / p;
4475
+ var C = (Date.now() - S) / d;
4476
4476
  S = Date.now(), v += b * C, v = Math.round(v * 100) / 100, b < 0 ? v = Math.max(u, v) : v = Math.min(u, v), y._webAudio ? o._volume = v : y.volume(v, o._id, !0), g && (y._volume = v), (u < h && v <= u || u > h && v >= u) && (clearInterval(o._interval), o._interval = null, o._fadeTo = null, y.volume(u, o._id), y._emit("fade", o._id));
4477
4477
  }, x);
4478
4478
  },
@@ -4495,7 +4495,7 @@ function _a() {
4495
4495
  * @return {Howl/Boolean} Returns self or current loop value.
4496
4496
  */
4497
4497
  loop: function() {
4498
- var o = this, h = arguments, u, p, m;
4498
+ var o = this, h = arguments, u, d, m;
4499
4499
  if (h.length === 0)
4500
4500
  return o._loop;
4501
4501
  if (h.length === 1)
@@ -4503,8 +4503,8 @@ function _a() {
4503
4503
  u = h[0], o._loop = u;
4504
4504
  else
4505
4505
  return m = o._soundById(parseInt(h[0], 10)), m ? m._loop : !1;
4506
- else h.length === 2 && (u = h[0], p = parseInt(h[1], 10));
4507
- for (var g = o._getSoundIds(p), y = 0; y < g.length; y++)
4506
+ else h.length === 2 && (u = h[0], d = parseInt(h[1], 10));
4507
+ for (var g = o._getSoundIds(d), y = 0; y < g.length; y++)
4508
4508
  m = o._soundById(g[y]), m && (m._loop = u, o._webAudio && m._node && m._node.bufferSource && (m._node.bufferSource.loop = u, u && (m._node.bufferSource.loopStart = m._start || 0, m._node.bufferSource.loopEnd = m._stop, o.playing(g[y]) && (o.pause(g[y], !0), o.play(g[y], !0)))));
4509
4509
  return o;
4510
4510
  },
@@ -4517,13 +4517,13 @@ function _a() {
4517
4517
  * @return {Howl/Number} Returns self or the current playback rate.
4518
4518
  */
4519
4519
  rate: function() {
4520
- var o = this, h = arguments, u, p;
4520
+ var o = this, h = arguments, u, d;
4521
4521
  if (h.length === 0)
4522
- p = o._sounds[0]._id;
4522
+ d = o._sounds[0]._id;
4523
4523
  else if (h.length === 1) {
4524
4524
  var m = o._getSoundIds(), g = m.indexOf(h[0]);
4525
- g >= 0 ? p = parseInt(h[0], 10) : u = parseFloat(h[0]);
4526
- } else h.length === 2 && (u = parseFloat(h[0]), p = parseInt(h[1], 10));
4525
+ g >= 0 ? d = parseInt(h[0], 10) : u = parseFloat(h[0]);
4526
+ } else h.length === 2 && (u = parseFloat(h[0]), d = parseInt(h[1], 10));
4527
4527
  var y;
4528
4528
  if (typeof u == "number") {
4529
4529
  if (o._state !== "loaded" || o._playLock)
@@ -4533,15 +4533,15 @@ function _a() {
4533
4533
  o.rate.apply(o, h);
4534
4534
  }
4535
4535
  }), o;
4536
- typeof p > "u" && (o._rate = u), p = o._getSoundIds(p);
4537
- for (var v = 0; v < p.length; v++)
4538
- if (y = o._soundById(p[v]), y) {
4539
- o.playing(p[v]) && (y._rateSeek = o.seek(p[v]), y._playStart = o._webAudio ? e.ctx.currentTime : y._playStart), y._rate = u, o._webAudio && y._node && y._node.bufferSource ? y._node.bufferSource.playbackRate.setValueAtTime(u, e.ctx.currentTime) : y._node && (y._node.playbackRate = u);
4540
- var b = o.seek(p[v]), w = (o._sprite[y._sprite][0] + o._sprite[y._sprite][1]) / 1e3 - b, x = w * 1e3 / Math.abs(y._rate);
4541
- (o._endTimers[p[v]] || !y._paused) && (o._clearTimer(p[v]), o._endTimers[p[v]] = setTimeout(o._ended.bind(o, y), x)), o._emit("rate", y._id);
4536
+ typeof d > "u" && (o._rate = u), d = o._getSoundIds(d);
4537
+ for (var v = 0; v < d.length; v++)
4538
+ if (y = o._soundById(d[v]), y) {
4539
+ o.playing(d[v]) && (y._rateSeek = o.seek(d[v]), y._playStart = o._webAudio ? e.ctx.currentTime : y._playStart), y._rate = u, o._webAudio && y._node && y._node.bufferSource ? y._node.bufferSource.playbackRate.setValueAtTime(u, e.ctx.currentTime) : y._node && (y._node.playbackRate = u);
4540
+ var b = o.seek(d[v]), w = (o._sprite[y._sprite][0] + o._sprite[y._sprite][1]) / 1e3 - b, x = w * 1e3 / Math.abs(y._rate);
4541
+ (o._endTimers[d[v]] || !y._paused) && (o._clearTimer(d[v]), o._endTimers[d[v]] = setTimeout(o._ended.bind(o, y), x)), o._emit("rate", y._id);
4542
4542
  }
4543
4543
  } else
4544
- return y = o._soundById(p), y ? y._rate : o._rate;
4544
+ return y = o._soundById(d), y ? y._rate : o._rate;
4545
4545
  return o;
4546
4546
  },
4547
4547
  /**
@@ -4553,14 +4553,14 @@ function _a() {
4553
4553
  * @return {Howl/Number} Returns self or the current seek position.
4554
4554
  */
4555
4555
  seek: function() {
4556
- var o = this, h = arguments, u, p;
4556
+ var o = this, h = arguments, u, d;
4557
4557
  if (h.length === 0)
4558
- o._sounds.length && (p = o._sounds[0]._id);
4558
+ o._sounds.length && (d = o._sounds[0]._id);
4559
4559
  else if (h.length === 1) {
4560
4560
  var m = o._getSoundIds(), g = m.indexOf(h[0]);
4561
- g >= 0 ? p = parseInt(h[0], 10) : o._sounds.length && (p = o._sounds[0]._id, u = parseFloat(h[0]));
4562
- } else h.length === 2 && (u = parseFloat(h[0]), p = parseInt(h[1], 10));
4563
- if (typeof p > "u")
4561
+ g >= 0 ? d = parseInt(h[0], 10) : o._sounds.length && (d = o._sounds[0]._id, u = parseFloat(h[0]));
4562
+ } else h.length === 2 && (u = parseFloat(h[0]), d = parseInt(h[1], 10));
4563
+ if (typeof d > "u")
4564
4564
  return 0;
4565
4565
  if (typeof u == "number" && (o._state !== "loaded" || o._playLock))
4566
4566
  return o._queue.push({
@@ -4569,13 +4569,13 @@ function _a() {
4569
4569
  o.seek.apply(o, h);
4570
4570
  }
4571
4571
  }), o;
4572
- var y = o._soundById(p);
4572
+ var y = o._soundById(d);
4573
4573
  if (y)
4574
4574
  if (typeof u == "number" && u >= 0) {
4575
- var v = o.playing(p);
4576
- v && o.pause(p, !0), y._seek = u, y._ended = !1, o._clearTimer(p), !o._webAudio && y._node && !isNaN(y._node.duration) && (y._node.currentTime = u);
4575
+ var v = o.playing(d);
4576
+ v && o.pause(d, !0), y._seek = u, y._ended = !1, o._clearTimer(d), !o._webAudio && y._node && !isNaN(y._node.duration) && (y._node.currentTime = u);
4577
4577
  var b = function() {
4578
- v && o.play(p, !0), o._emit("seek", p);
4578
+ v && o.play(d, !0), o._emit("seek", d);
4579
4579
  };
4580
4580
  if (v && !o._webAudio) {
4581
4581
  var w = function() {
@@ -4585,7 +4585,7 @@ function _a() {
4585
4585
  } else
4586
4586
  b();
4587
4587
  } else if (o._webAudio) {
4588
- var x = o.playing(p) ? e.ctx.currentTime - y._playStart : 0, S = y._rateSeek ? y._rateSeek - y._seek : 0;
4588
+ var x = o.playing(d) ? e.ctx.currentTime - y._playStart : 0, S = y._rateSeek ? y._rateSeek - y._seek : 0;
4589
4589
  return y._seek + (S + x * Math.abs(y._rate));
4590
4590
  } else
4591
4591
  return y._node.currentTime;
@@ -4602,8 +4602,8 @@ function _a() {
4602
4602
  var u = h._soundById(o);
4603
4603
  return u ? !u._paused : !1;
4604
4604
  }
4605
- for (var p = 0; p < h._sounds.length; p++)
4606
- if (!h._sounds[p]._paused)
4605
+ for (var d = 0; d < h._sounds.length; d++)
4606
+ if (!h._sounds[d]._paused)
4607
4607
  return !0;
4608
4608
  return !1;
4609
4609
  },
@@ -4613,8 +4613,8 @@ function _a() {
4613
4613
  * @return {Number} Audio duration in seconds.
4614
4614
  */
4615
4615
  duration: function(o) {
4616
- var h = this, u = h._duration, p = h._soundById(o);
4617
- return p && (u = h._sprite[p._sprite][1] / 1e3), u;
4616
+ var h = this, u = h._duration, d = h._soundById(o);
4617
+ return d && (u = h._sprite[d._sprite][1] / 1e3), u;
4618
4618
  },
4619
4619
  /**
4620
4620
  * Returns the current loaded state of this Howl.
@@ -4630,8 +4630,8 @@ function _a() {
4630
4630
  unload: function() {
4631
4631
  for (var o = this, h = o._sounds, u = 0; u < h.length; u++)
4632
4632
  h[u]._paused || o.stop(h[u]._id), o._webAudio || (o._clearSound(h[u]._node), h[u]._node.removeEventListener("error", h[u]._errorFn, !1), h[u]._node.removeEventListener(e._canPlayEvent, h[u]._loadFn, !1), h[u]._node.removeEventListener("ended", h[u]._endFn, !1), e._releaseHtml5Audio(h[u]._node)), delete h[u]._node, o._clearTimer(h[u]._id);
4633
- var p = e._howls.indexOf(o);
4634
- p >= 0 && e._howls.splice(p, 1);
4633
+ var d = e._howls.indexOf(o);
4634
+ d >= 0 && e._howls.splice(d, 1);
4635
4635
  var m = !0;
4636
4636
  for (u = 0; u < e._howls.length; u++)
4637
4637
  if (e._howls[u]._src === o._src || o._src.indexOf(e._howls[u]._src) >= 0) {
@@ -4648,9 +4648,9 @@ function _a() {
4648
4648
  * @param {Number} once (INTERNAL) Marks event to fire only once.
4649
4649
  * @return {Howl}
4650
4650
  */
4651
- on: function(o, h, u, p) {
4651
+ on: function(o, h, u, d) {
4652
4652
  var m = this, g = m["_on" + o];
4653
- return typeof h == "function" && g.push(p ? { id: u, fn: h, once: p } : { id: u, fn: h }), m;
4653
+ return typeof h == "function" && g.push(d ? { id: u, fn: h, once: d } : { id: u, fn: h }), m;
4654
4654
  },
4655
4655
  /**
4656
4656
  * Remove a custom event. Call without parameters to remove all events.
@@ -4660,7 +4660,7 @@ function _a() {
4660
4660
  * @return {Howl}
4661
4661
  */
4662
4662
  off: function(o, h, u) {
4663
- var p = this, m = p["_on" + o], g = 0;
4663
+ var d = this, m = d["_on" + o], g = 0;
4664
4664
  if (typeof h == "number" && (u = h, h = null), h || u)
4665
4665
  for (g = 0; g < m.length; g++) {
4666
4666
  var y = u === m[g].id;
@@ -4670,13 +4670,13 @@ function _a() {
4670
4670
  }
4671
4671
  }
4672
4672
  else if (o)
4673
- p["_on" + o] = [];
4673
+ d["_on" + o] = [];
4674
4674
  else {
4675
- var v = Object.keys(p);
4675
+ var v = Object.keys(d);
4676
4676
  for (g = 0; g < v.length; g++)
4677
- v[g].indexOf("_on") === 0 && Array.isArray(p[v[g]]) && (p[v[g]] = []);
4677
+ v[g].indexOf("_on") === 0 && Array.isArray(d[v[g]]) && (d[v[g]] = []);
4678
4678
  }
4679
- return p;
4679
+ return d;
4680
4680
  },
4681
4681
  /**
4682
4682
  * Listen to a custom event and remove it once fired.
@@ -4686,8 +4686,8 @@ function _a() {
4686
4686
  * @return {Howl}
4687
4687
  */
4688
4688
  once: function(o, h, u) {
4689
- var p = this;
4690
- return p.on(o, h, u, 1), p;
4689
+ var d = this;
4690
+ return d.on(o, h, u, 1), d;
4691
4691
  },
4692
4692
  /**
4693
4693
  * Emit all events of a specific type and pass the sound id.
@@ -4697,11 +4697,11 @@ function _a() {
4697
4697
  * @return {Howl}
4698
4698
  */
4699
4699
  _emit: function(o, h, u) {
4700
- for (var p = this, m = p["_on" + o], g = m.length - 1; g >= 0; g--)
4700
+ for (var d = this, m = d["_on" + o], g = m.length - 1; g >= 0; g--)
4701
4701
  (!m[g].id || m[g].id === h || o === "load") && (setTimeout((function(y) {
4702
4702
  y.call(this, h, u);
4703
- }).bind(p, m[g].fn), 0), m[g].once && p.off(o, m[g].fn, m[g].id));
4704
- return p._loadQueue(o), p;
4703
+ }).bind(d, m[g].fn), 0), m[g].once && d.off(o, m[g].fn, m[g].id));
4704
+ return d._loadQueue(o), d;
4705
4705
  },
4706
4706
  /**
4707
4707
  * Queue of actions initiated before the sound has loaded.
@@ -4726,13 +4726,13 @@ function _a() {
4726
4726
  var h = this, u = o._sprite;
4727
4727
  if (!h._webAudio && o._node && !o._node.paused && !o._node.ended && o._node.currentTime < o._stop)
4728
4728
  return setTimeout(h._ended.bind(h, o), 100), h;
4729
- var p = !!(o._loop || h._sprite[u][2]);
4730
- if (h._emit("end", o._id), !h._webAudio && p && h.stop(o._id, !0).play(o._id), h._webAudio && p) {
4729
+ var d = !!(o._loop || h._sprite[u][2]);
4730
+ if (h._emit("end", o._id), !h._webAudio && d && h.stop(o._id, !0).play(o._id), h._webAudio && d) {
4731
4731
  h._emit("play", o._id), o._seek = o._start || 0, o._rateSeek = 0, o._playStart = e.ctx.currentTime;
4732
4732
  var m = (o._stop - o._start) * 1e3 / Math.abs(o._rate);
4733
4733
  h._endTimers[o._id] = setTimeout(h._ended.bind(h, o), m);
4734
4734
  }
4735
- return h._webAudio && !p && (o._paused = !0, o._ended = !0, o._seek = o._start || 0, o._rateSeek = 0, h._clearTimer(o._id), h._cleanBuffer(o._node), e._autoSuspend()), !h._webAudio && !p && h.stop(o._id, !0), h;
4735
+ return h._webAudio && !d && (o._paused = !0, o._ended = !0, o._seek = o._start || 0, o._rateSeek = 0, h._clearTimer(o._id), h._cleanBuffer(o._node), e._autoSuspend()), !h._webAudio && !d && h.stop(o._id, !0), h;
4736
4736
  },
4737
4737
  /**
4738
4738
  * Clear the end timer for a sound playback.
@@ -4779,14 +4779,14 @@ function _a() {
4779
4779
  * Drain excess inactive sounds from the pool.
4780
4780
  */
4781
4781
  _drain: function() {
4782
- var o = this, h = o._pool, u = 0, p = 0;
4782
+ var o = this, h = o._pool, u = 0, d = 0;
4783
4783
  if (!(o._sounds.length < h)) {
4784
- for (p = 0; p < o._sounds.length; p++)
4785
- o._sounds[p]._ended && u++;
4786
- for (p = o._sounds.length - 1; p >= 0; p--) {
4784
+ for (d = 0; d < o._sounds.length; d++)
4785
+ o._sounds[d]._ended && u++;
4786
+ for (d = o._sounds.length - 1; d >= 0; d--) {
4787
4787
  if (u <= h)
4788
4788
  return;
4789
- o._sounds[p]._ended && (o._webAudio && o._sounds[p]._node && o._sounds[p]._node.disconnect(0), o._sounds.splice(p, 1), u--);
4789
+ o._sounds[d]._ended && (o._webAudio && o._sounds[d]._node && o._sounds[d]._node.disconnect(0), o._sounds.splice(d, 1), u--);
4790
4790
  }
4791
4791
  }
4792
4792
  },
@@ -4798,8 +4798,8 @@ function _a() {
4798
4798
  _getSoundIds: function(o) {
4799
4799
  var h = this;
4800
4800
  if (typeof o > "u") {
4801
- for (var u = [], p = 0; p < h._sounds.length; p++)
4802
- u.push(h._sounds[p]._id);
4801
+ for (var u = [], d = 0; d < h._sounds.length; d++)
4802
+ u.push(h._sounds[d]._id);
4803
4803
  return u;
4804
4804
  } else
4805
4805
  return [o];
@@ -4895,9 +4895,9 @@ function _a() {
4895
4895
  return;
4896
4896
  }
4897
4897
  if (/^data:[^;]+;base64,/.test(h)) {
4898
- for (var u = atob(h.split(",")[1]), p = new Uint8Array(u.length), m = 0; m < u.length; ++m)
4899
- p[m] = u.charCodeAt(m);
4900
- c(p.buffer, o);
4898
+ for (var u = atob(h.split(",")[1]), d = new Uint8Array(u.length), m = 0; m < u.length; ++m)
4899
+ d[m] = u.charCodeAt(m);
4900
+ c(d.buffer, o);
4901
4901
  } else {
4902
4902
  var g = new XMLHttpRequest();
4903
4903
  g.open(o._xhr.method, h, !0), g.withCredentials = o._xhr.withCredentials, g.responseType = "arraybuffer", o._xhr.headers && Object.keys(o._xhr.headers).forEach(function(y) {
@@ -4922,13 +4922,13 @@ function _a() {
4922
4922
  }, c = function(o, h) {
4923
4923
  var u = function() {
4924
4924
  h._emit("loaderror", null, "Decoding audio data failed.");
4925
- }, p = function(m) {
4925
+ }, d = function(m) {
4926
4926
  m && h._sounds.length > 0 ? (r[h._src] = m, f(h, m)) : u();
4927
4927
  };
4928
- typeof Promise < "u" && e.ctx.decodeAudioData.length === 1 ? e.ctx.decodeAudioData(o).then(p).catch(u) : e.ctx.decodeAudioData(o, p, u);
4928
+ typeof Promise < "u" && e.ctx.decodeAudioData.length === 1 ? e.ctx.decodeAudioData(o).then(d).catch(u) : e.ctx.decodeAudioData(o, d, u);
4929
4929
  }, f = function(o, h) {
4930
4930
  h && !o._duration && (o._duration = h.duration), Object.keys(o._sprite).length === 0 && (o._sprite = { __default: [0, o._duration * 1e3] }), o._state !== "loaded" && (o._state = "loaded", o._emit("load"), o._loadQueue());
4931
- }, d = function() {
4931
+ }, p = function() {
4932
4932
  if (e.usingWebAudio) {
4933
4933
  try {
4934
4934
  typeof AudioContext < "u" ? e.ctx = new AudioContext() : typeof webkitAudioContext < "u" ? e.ctx = new webkitAudioContext() : e.usingWebAudio = !1;
@@ -4938,13 +4938,13 @@ function _a() {
4938
4938
  e.ctx || (e.usingWebAudio = !1);
4939
4939
  var o = /iP(hone|od|ad)/.test(e._navigator && e._navigator.platform), h = e._navigator && e._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/), u = h ? parseInt(h[1], 10) : null;
4940
4940
  if (o && u && u < 9) {
4941
- var p = /safari/.test(e._navigator && e._navigator.userAgent.toLowerCase());
4942
- e._navigator && !p && (e.usingWebAudio = !1);
4941
+ var d = /safari/.test(e._navigator && e._navigator.userAgent.toLowerCase());
4942
+ e._navigator && !d && (e.usingWebAudio = !1);
4943
4943
  }
4944
4944
  e.usingWebAudio && (e.masterGain = typeof e.ctx.createGain > "u" ? e.ctx.createGainNode() : e.ctx.createGain(), e.masterGain.gain.setValueAtTime(e._muted ? 0 : e._volume, e.ctx.currentTime), e.masterGain.connect(e.ctx.destination)), e._setup();
4945
4945
  }
4946
4946
  };
4947
- s.Howler = e, s.Howl = i, typeof Vt < "u" ? (Vt.HowlerGlobal = t, Vt.Howler = e, Vt.Howl = i, Vt.Sound = n) : typeof window < "u" && (window.HowlerGlobal = t, window.Howler = e, window.Howl = i, window.Sound = n);
4947
+ s.Howler = e, s.Howl = i, typeof zt < "u" ? (zt.HowlerGlobal = t, zt.Howler = e, zt.Howl = i, zt.Sound = n) : typeof window < "u" && (window.HowlerGlobal = t, window.Howler = e, window.Howl = i, window.Sound = n);
4948
4948
  })();
4949
4949
  (function() {
4950
4950
  HowlerGlobal.prototype._pos = [0, 0, 0], HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0], HowlerGlobal.prototype.stereo = function(e) {
@@ -5106,8 +5106,8 @@ function _a() {
5106
5106
  rolloffFactor: typeof n.rolloffFactor < "u" ? n.rolloffFactor : f.rolloffFactor,
5107
5107
  panningModel: typeof n.panningModel < "u" ? n.panningModel : f.panningModel
5108
5108
  };
5109
- var d = a._panner;
5110
- d || (a._pos || (a._pos = e._pos || [0, 0, -0.5]), t(a, "spatial"), d = a._panner), d.coneInnerAngle = f.coneInnerAngle, d.coneOuterAngle = f.coneOuterAngle, d.coneOuterGain = f.coneOuterGain, d.distanceModel = f.distanceModel, d.maxDistance = f.maxDistance, d.refDistance = f.refDistance, d.rolloffFactor = f.rolloffFactor, d.panningModel = f.panningModel;
5109
+ var p = a._panner;
5110
+ p || (a._pos || (a._pos = e._pos || [0, 0, -0.5]), t(a, "spatial"), p = a._panner), p.coneInnerAngle = f.coneInnerAngle, p.coneOuterAngle = f.coneOuterAngle, p.coneOuterGain = f.coneOuterGain, p.distanceModel = f.distanceModel, p.maxDistance = f.maxDistance, p.refDistance = f.refDistance, p.rolloffFactor = f.rolloffFactor, p.panningModel = f.panningModel;
5111
5111
  }
5112
5112
  return e;
5113
5113
  }, Sound.prototype.init = /* @__PURE__ */ (function(e) {
@@ -5125,13 +5125,13 @@ function _a() {
5125
5125
  i = i || "spatial", i === "spatial" ? (e._panner = Howler.ctx.createPanner(), e._panner.coneInnerAngle = e._pannerAttr.coneInnerAngle, e._panner.coneOuterAngle = e._pannerAttr.coneOuterAngle, e._panner.coneOuterGain = e._pannerAttr.coneOuterGain, e._panner.distanceModel = e._pannerAttr.distanceModel, e._panner.maxDistance = e._pannerAttr.maxDistance, e._panner.refDistance = e._pannerAttr.refDistance, e._panner.rolloffFactor = e._pannerAttr.rolloffFactor, e._panner.panningModel = e._pannerAttr.panningModel, typeof e._panner.positionX < "u" ? (e._panner.positionX.setValueAtTime(e._pos[0], Howler.ctx.currentTime), e._panner.positionY.setValueAtTime(e._pos[1], Howler.ctx.currentTime), e._panner.positionZ.setValueAtTime(e._pos[2], Howler.ctx.currentTime)) : e._panner.setPosition(e._pos[0], e._pos[1], e._pos[2]), typeof e._panner.orientationX < "u" ? (e._panner.orientationX.setValueAtTime(e._orientation[0], Howler.ctx.currentTime), e._panner.orientationY.setValueAtTime(e._orientation[1], Howler.ctx.currentTime), e._panner.orientationZ.setValueAtTime(e._orientation[2], Howler.ctx.currentTime)) : e._panner.setOrientation(e._orientation[0], e._orientation[1], e._orientation[2])) : (e._panner = Howler.ctx.createStereoPanner(), e._panner.pan.setValueAtTime(e._stereo, Howler.ctx.currentTime)), e._panner.connect(e._node), e._paused || e._parent.pause(e._id, !0).play(e._id, !0);
5126
5126
  };
5127
5127
  })();
5128
- })(ze)), ze;
5128
+ })(Ve)), Ve;
5129
5129
  }
5130
5130
  var Bt = _a();
5131
- const Sa = /* @__PURE__ */ xa(Bt), $l = /* @__PURE__ */ Yn({
5131
+ const Sa = /* @__PURE__ */ xa(Bt), Kl = /* @__PURE__ */ Yn({
5132
5132
  __proto__: null,
5133
5133
  default: Sa
5134
- }, [Bt]), ps = ["load", "loaderror", "playerror", "play", "end", "pause", "stop", "mute", "volume", "rate", "seek", "fade", "unlock"];
5134
+ }, [Bt]), ds = ["load", "loaderror", "playerror", "play", "end", "pause", "stop", "mute", "volume", "rate", "seek", "fade", "unlock"];
5135
5135
  let Aa = class extends tt {
5136
5136
  constructor() {
5137
5137
  super(...arguments), this.sounds = [], this.eventsFn = [], this.maxVolume = 1, this.maxDistance = 100;
@@ -5142,8 +5142,8 @@ let Aa = class extends tt {
5142
5142
  const { props: e } = t, i = e.context.tick, n = e.sound.value ?? e.sound;
5143
5143
  if (!n.src)
5144
5144
  return;
5145
- const { src: r, autoplay: a, loop: l, volume: c, spatial: f } = n, d = Array.isArray(r) ? r : [r];
5146
- for (const o of d) {
5145
+ const { src: r, autoplay: a, loop: l, volume: c, spatial: f } = n, p = Array.isArray(r) ? r : [r];
5146
+ for (const o of p) {
5147
5147
  if (!o) continue;
5148
5148
  const h = new Bt.Howl({
5149
5149
  src: o,
@@ -5151,10 +5151,10 @@ let Aa = class extends tt {
5151
5151
  loop: l,
5152
5152
  volume: c
5153
5153
  });
5154
- for (let u of ps) {
5154
+ for (let u of ds) {
5155
5155
  if (!n[u]) continue;
5156
- const p = n[u];
5157
- this.eventsFn.push(p), h.on(u, p);
5156
+ const d = n[u];
5157
+ this.eventsFn.push(d), h.on(u, d);
5158
5158
  }
5159
5159
  this.sounds.push(h);
5160
5160
  }
@@ -5165,7 +5165,7 @@ let Aa = class extends tt {
5165
5165
  const { x: h, y: u } = o;
5166
5166
  this.tickSubscription = H(() => {
5167
5167
  i();
5168
- const { x: p, y: m } = t.componentInstance, g = zs(p, m, h(), u()), y = Math.max(this.maxVolume - g / this.maxDistance, 0);
5168
+ const { x: d, y: m } = t.componentInstance, g = Vs(d, m, h(), u()), y = Math.max(this.maxVolume - g / this.maxDistance, 0);
5169
5169
  this.sounds.forEach((v) => v.volume(y));
5170
5170
  }).subscription;
5171
5171
  }
@@ -5173,14 +5173,14 @@ let Aa = class extends tt {
5173
5173
  }
5174
5174
  onUpdate(t) {
5175
5175
  const e = t.value ?? t, { volume: i, loop: n, mute: r, seek: a, playing: l, rate: c, spatial: f } = e;
5176
- this.sounds.forEach((d) => {
5177
- i !== void 0 && d.volume(i), n !== void 0 && d.loop(n), r !== void 0 && d.mute(r), a !== void 0 && d.seek(a), l !== void 0 && (l ? d.play() : d.pause()), c !== void 0 && d.rate(c);
5176
+ this.sounds.forEach((p) => {
5177
+ i !== void 0 && p.volume(i), n !== void 0 && p.loop(n), r !== void 0 && p.mute(r), a !== void 0 && p.seek(a), l !== void 0 && (l ? p.play() : p.pause()), c !== void 0 && p.rate(c);
5178
5178
  }), f && (this.maxVolume = f.maxVolume ?? this.maxVolume, this.maxDistance = f.maxDistance ?? this.maxDistance);
5179
5179
  }
5180
5180
  onDestroy() {
5181
5181
  this.sounds.forEach((t) => {
5182
5182
  t.stop();
5183
- for (let e of ps) {
5183
+ for (let e of ds) {
5184
5184
  const i = this.eventsFn.find((n) => n === this.eventsFn[e]);
5185
5185
  i && t.off(e, i);
5186
5186
  }
@@ -5281,12 +5281,12 @@ class Ta extends tt {
5281
5281
  n?.move?.(t);
5282
5282
  const l = i.toLocal(t.global), c = l.x - this.offsetInParent.x, f = l.y - this.offsetInParent.y;
5283
5283
  n?.snap() ? (e.position.x = a(c), e.position.y = a(f)) : (this.axis.x && (e.position.x = c), this.axis.y && (e.position.y = f)), this.lastPointerPosition.copyFrom(t.global);
5284
- const { x: d, y: o } = r, h = (u, p) => {
5284
+ const { x: p, y: o } = r, h = (u, d) => {
5285
5285
  ee(u) ? u.dependencies.forEach((m) => {
5286
- m.set(p);
5287
- }) : _(u) && u.set(p);
5286
+ m.set(d);
5287
+ }) : _(u) && u.set(d);
5288
5288
  };
5289
- d !== void 0 && h(d, e.position.x), o !== void 0 && h(o, e.position.y);
5289
+ p !== void 0 && h(p, e.position.x), o !== void 0 && h(o, e.position.y);
5290
5290
  }
5291
5291
  /**
5292
5292
  * Moves the viewport if the dragged element is near screen edges
@@ -5294,14 +5294,14 @@ class Ta extends tt {
5294
5294
  */
5295
5295
  updateViewportPosition(t) {
5296
5296
  if (!this.viewport || !this.elementRef) return;
5297
- const e = this.dragProps, i = e?.viewport?.edgeThreshold(), n = e?.viewport?.maxSpeed(), r = 0, a = this.viewport.screenWidth, l = 0, c = this.viewport.screenHeight, f = this.elementRef.componentInstance, d = t.x - r, o = a - t.x, h = t.y - l, u = c - t.y;
5298
- let p = 0, m = 0;
5299
- if (d < i ? p = -(n * (1 - d / i)) : o < i && (p = n * (1 - o / i)), h < i ? m = -(n * (1 - h / i)) : u < i && (m = n * (1 - u / i)), p !== 0 || m !== 0) {
5297
+ const e = this.dragProps, i = e?.viewport?.edgeThreshold(), n = e?.viewport?.maxSpeed(), r = 0, a = this.viewport.screenWidth, l = 0, c = this.viewport.screenHeight, f = this.elementRef.componentInstance, p = t.x - r, o = a - t.x, h = t.y - l, u = c - t.y;
5298
+ let d = 0, m = 0;
5299
+ if (p < i ? d = -(n * (1 - p / i)) : o < i && (d = n * (1 - o / i)), h < i ? m = -(n * (1 - h / i)) : u < i && (m = n * (1 - u / i)), d !== 0 || m !== 0) {
5300
5300
  const g = this.viewport.center;
5301
5301
  this.viewport.moveCenter(
5302
- this.viewport.center.x + p,
5302
+ this.viewport.center.x + d,
5303
5303
  this.viewport.center.y + m
5304
- ), this.axis.x && g.x !== this.viewport.center.x && (f.position.x += p), this.axis.y && g.y !== this.viewport.center.y && (f.position.y += m);
5304
+ ), this.axis.x && g.x !== this.viewport.center.x && (f.position.x += d), this.axis.y && g.y !== this.viewport.center.y && (f.position.y += m);
5305
5305
  }
5306
5306
  }
5307
5307
  /**
@@ -5347,7 +5347,7 @@ class Ma extends tt {
5347
5347
  onInit(t) {
5348
5348
  }
5349
5349
  onMount(t) {
5350
- const { image: e } = t.props.transition, i = new pe(ct.from(e));
5350
+ const { image: e } = t.props.transition, i = new de(ct.from(e));
5351
5351
  i.texture.baseTexture.wrapMode = Fn.REPEAT;
5352
5352
  const n = new Hn(i), r = t.componentInstance;
5353
5353
  r.filters = [n], r.addChild(i), setTimeout(() => {
@@ -5477,10 +5477,10 @@ class Ea extends tt {
5477
5477
  ease: (h) => h
5478
5478
  // Linear ease, we'll handle oscillation in effect
5479
5479
  });
5480
- const d = l !== "y", o = l !== "x";
5480
+ const p = l !== "y", o = l !== "x";
5481
5481
  this.positionEffect = H(() => {
5482
5482
  if (!e || !this.progressSignal || !this.currentShakeConfig) return;
5483
- const h = this.progressSignal(), u = this.currentShakeConfig, p = 1 - h, m = h * u.frequency, g = Math.sin(m * Math.PI * 2), y = Math.sin(u.randomSeed + h * 10) * 0.25 + 1, v = d ? g * u.intensity * p * y : 0, b = o ? g * u.intensity * p * y : 0;
5483
+ const h = this.progressSignal(), u = this.currentShakeConfig, d = 1 - h, m = h * u.frequency, g = Math.sin(m * Math.PI * 2), y = Math.sin(u.randomSeed + h * 10) * 0.25 + 1, v = p ? g * u.intensity * d * y : 0, b = o ? g * u.intensity * d * y : 0;
5484
5484
  e.position.x = this.originalPosition.x + v, e.position.y = this.originalPosition.y + b;
5485
5485
  }).subscription, await this.progressSignal.set(1, {
5486
5486
  duration: r
@@ -5560,30 +5560,30 @@ class Oa extends tt {
5560
5560
  _(f) ? f.set(h) : e.tint = h;
5561
5561
  }
5562
5562
  i.onStart?.(), this.progressSignal && await this.progressSignal.set(0, { duration: 0 });
5563
- const d = {
5563
+ const p = {
5564
5564
  type: n,
5565
5565
  duration: r,
5566
5566
  cycles: a,
5567
5567
  flashAlpha: l,
5568
5568
  flashTint: c
5569
5569
  };
5570
- if (this.currentFlashConfig = d, this.progressSignal || (this.progressSignal = xn(0, {
5570
+ if (this.currentFlashConfig = p, this.progressSignal || (this.progressSignal = xn(0, {
5571
5571
  duration: r,
5572
5572
  ease: (h) => h
5573
5573
  // Linear ease
5574
5574
  })), (n === "alpha" || n === "both") && (this.alphaEffect = H(() => {
5575
5575
  if (!e || !this.progressSignal || !this.currentFlashConfig) return;
5576
- const h = this.progressSignal(), u = this.currentFlashConfig, p = h * u.cycles % 1, m = p < 0.5 ? p * 2 : 1 - (p - 0.5) * 2, g = this.originalAlpha + (u.flashAlpha - this.originalAlpha) * m;
5576
+ const h = this.progressSignal(), u = this.currentFlashConfig, d = h * u.cycles % 1, m = d < 0.5 ? d * 2 : 1 - (d - 0.5) * 2, g = this.originalAlpha + (u.flashAlpha - this.originalAlpha) * m;
5577
5577
  e.alpha = g;
5578
5578
  }).subscription), (n === "tint" || n === "both") && (this.tintEffect = H(() => {
5579
5579
  if (!e || !this.progressSignal || !this.currentFlashConfig) return;
5580
5580
  const h = e.tint;
5581
5581
  if (h === void 0) return;
5582
- const u = _(h), p = this.progressSignal(), m = this.currentFlashConfig, g = p * m.cycles % 1, y = g < 0.5 ? g * 2 : 1 - (g - 0.5) * 2, v = this.originalTint >> 16 & 255, b = this.originalTint >> 8 & 255, w = this.originalTint & 255, x = m.flashTint >> 16 & 255, S = m.flashTint >> 8 & 255, C = m.flashTint & 255, M = Math.round(v + (x - v) * y), A = Math.round(b + (S - b) * y), L = Math.round(w + (C - w) * y), j = M << 16 | A << 8 | L;
5582
+ const u = _(h), d = this.progressSignal(), m = this.currentFlashConfig, g = d * m.cycles % 1, y = g < 0.5 ? g * 2 : 1 - (g - 0.5) * 2, v = this.originalTint >> 16 & 255, b = this.originalTint >> 8 & 255, w = this.originalTint & 255, x = m.flashTint >> 16 & 255, S = m.flashTint >> 8 & 255, C = m.flashTint & 255, M = Math.round(v + (x - v) * y), A = Math.round(b + (S - b) * y), L = Math.round(w + (C - w) * y), j = M << 16 | A << 8 | L;
5583
5583
  u ? h.set(j) : e.tint = j;
5584
5584
  }).subscription), await this.progressSignal.set(1, {
5585
5585
  duration: r
5586
- }), this.currentFlashConfig === d && e) {
5586
+ }), this.currentFlashConfig === p && e) {
5587
5587
  e.alpha = this.originalAlpha;
5588
5588
  const h = e.tint;
5589
5589
  if (h !== void 0) {
@@ -5771,13 +5771,13 @@ function at(s) {
5771
5771
  const i = this.filters || [];
5772
5772
  if (e.blur) {
5773
5773
  let n = i.find(
5774
- (r) => r instanceof qi
5774
+ (r) => r instanceof $i
5775
5775
  );
5776
5776
  if (!n) {
5777
5777
  const r = typeof e.blur == "number" ? {
5778
5778
  strength: e.blur
5779
5779
  } : e.blur;
5780
- n = new qi(r), i.push(n);
5780
+ n = new $i(r), i.push(n);
5781
5781
  }
5782
5782
  Object.assign(n, e.blur);
5783
5783
  }
@@ -6146,23 +6146,23 @@ const eh = async (s = {}) => {
6146
6146
  deltaRatio: 1
6147
6147
  }), globalThis.__CANVAS_ENGINE_TICK__ = l.context.tick;
6148
6148
  const c = N("Canvas", l);
6149
- return c.render = (f, d) => {
6150
- if (!d)
6149
+ return c.render = (f, p) => {
6150
+ if (!p)
6151
6151
  return;
6152
- const o = d.renderer, h = o.view.canvas;
6152
+ const o = p.renderer, h = o.view.canvas;
6153
6153
  globalThis.__PIXI_STAGE__ = c.componentInstance, globalThis.__PIXI_RENDERER__ = o, s.tickStart !== !1 && c.directives.tick.start(), H(() => {
6154
6154
  c.propObservables.tick(), o.render(c.componentInstance);
6155
- }), d.stage = c.componentInstance, d.stage.layout = {
6156
- width: d.screen.width,
6157
- height: d.screen.height,
6155
+ }), p.stage = c.componentInstance, p.stage.layout = {
6156
+ width: p.screen.width,
6157
+ height: p.screen.height,
6158
6158
  justifyContent: s.justifyContent,
6159
6159
  alignItems: s.alignItems
6160
- }, r.set({ width: d.screen.width, height: d.screen.height }), d.renderer.on("resize", (p, m) => {
6161
- r.set({ width: p, height: m }), d.stage.layout && (d.stage.layout = {
6162
- width: p,
6160
+ }, r.set({ width: p.screen.width, height: p.screen.height }), p.renderer.on("resize", (d, m) => {
6161
+ r.set({ width: d, height: m }), p.stage.layout && (p.stage.layout = {
6162
+ width: d,
6163
6163
  height: m
6164
6164
  });
6165
- }), s.tickStart !== !1 && c.directives.tick.start(), d.ticker.add(() => {
6165
+ }), s.tickStart !== !1 && c.directives.tick.start(), p.ticker.add(() => {
6166
6166
  c.propObservables.tick();
6167
6167
  }), t && H(() => {
6168
6168
  o.events.cursorStyles = t();
@@ -6170,7 +6170,7 @@ const eh = async (s = {}) => {
6170
6170
  h.classList.add(n());
6171
6171
  });
6172
6172
  const u = f.querySelector("canvas");
6173
- u ? f.replaceChild(h, u) : f.appendChild(h), l.context.app.set(d);
6173
+ u ? f.replaceChild(h, u) : f.appendChild(h), l.context.app.set(p);
6174
6174
  }, c;
6175
6175
  };
6176
6176
  class Si extends at(Ft) {
@@ -6246,10 +6246,10 @@ class La extends at(oi) {
6246
6246
  this._width = r, this._height = a;
6247
6247
  const c = Y(r()), f = Y(a());
6248
6248
  i.draw && (this.clearEffect = H(() => {
6249
- const d = r(), o = a(), h = l();
6250
- typeof d == "string" || typeof o == "string" || (this.clear(), i.draw?.(this, d, o, h), this.subjectInit.next(this));
6251
- })), this.on("layout", (d) => {
6252
- const o = d.computedLayout;
6249
+ const p = r(), o = a(), h = l();
6250
+ typeof p == "string" || typeof o == "string" || (this.clear(), i.draw?.(this, p, o, h), this.subjectInit.next(this));
6251
+ })), this.on("layout", (p) => {
6252
+ const o = p.computedLayout;
6253
6253
  c && _(r) && r() !== o.width && r.set(o.width), f && _(a) && a() !== o.height && a.set(o.height);
6254
6254
  });
6255
6255
  }
@@ -6430,7 +6430,7 @@ class Wa extends at(Wn) {
6430
6430
  }
6431
6431
  W("Mesh", Wa);
6432
6432
  const nh = (s) => N("Mesh", s);
6433
- let ds = null, si = null;
6433
+ let ps = null, si = null;
6434
6434
  function An(s) {
6435
6435
  si?.(s);
6436
6436
  }
@@ -6447,7 +6447,7 @@ function rh(s) {
6447
6447
  }
6448
6448
  function fe(s, t = {}, e) {
6449
6449
  const i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
6450
- ds = (a) => {
6450
+ ps = (a) => {
6451
6451
  i.add(a);
6452
6452
  }, si = (a) => {
6453
6453
  n.add(a);
@@ -6458,7 +6458,7 @@ function fe(s, t = {}, e) {
6458
6458
  ...r.effectMounts ?? []
6459
6459
  ], t?.dependencies && (r.props = r.props || {}, r.props.dependencies = t.dependencies), r instanceof Promise && r.then((a) => {
6460
6460
  a.props.isRoot && n.forEach((l) => l(a));
6461
- }), ds = null, si = null, r;
6461
+ }), ps = null, si = null, r;
6462
6462
  }
6463
6463
  function U(s, t = {}, ...e) {
6464
6464
  return t?.dependencies ? !t.dependencies.some(yt) && t.dependencies.every((r) => _(r) ? r() !== void 0 : r !== void 0) ? fe(s, t, e) : new I((n) => {
@@ -6564,8 +6564,8 @@ class rt {
6564
6564
  const { value: r, time: a } = i[0], l = n = new rt(typeof r == "string" ? he(r) : r, a, t.ease);
6565
6565
  if (i.length > 2 || i.length === 2 && i[1].value !== r)
6566
6566
  for (let c = 1; c < i.length; ++c) {
6567
- const { value: f, time: d } = i[c];
6568
- n.next = new rt(typeof f == "string" ? he(f) : f, d), n = n.next;
6567
+ const { value: f, time: p } = i[c];
6568
+ n.next = new rt(typeof f == "string" ? he(f) : f, p), n = n.next;
6569
6569
  }
6570
6570
  return l.isStepped = !!t.isStepped, l;
6571
6571
  }
@@ -6658,14 +6658,14 @@ function Na(s) {
6658
6658
  const t = this.first.value, e = this.first.next.value, i = (e.r - t.r) * s + t.r, n = (e.g - t.g) * s + t.g, r = (e.b - t.b) * s + t.b;
6659
6659
  return Te(i, n, r);
6660
6660
  }
6661
- function Va(s) {
6661
+ function za(s) {
6662
6662
  this.ease && (s = this.ease(s));
6663
6663
  let t = this.first, e = t.next;
6664
6664
  for (; s > e.time; )
6665
6665
  t = e, e = e.next;
6666
6666
  return s = (s - t.time) / (e.time - t.time), (e.value - t.value) * s + t.value;
6667
6667
  }
6668
- function za(s) {
6668
+ function Va(s) {
6669
6669
  this.ease && (s = this.ease(s));
6670
6670
  let t = this.first, e = t.next;
6671
6671
  for (; s > e.time; )
@@ -6702,7 +6702,7 @@ class ne {
6702
6702
  * @param first.isStepped If the values should be stepped instead of interpolated linearly.
6703
6703
  */
6704
6704
  reset(t) {
6705
- this.first = t, t.next && t.next.time >= 1 ? this.interpolate = this.isColor ? Na : Ba : t.isStepped ? this.interpolate = this.isColor ? Ga : Ua : this.interpolate = this.isColor ? za : Va, this.ease = this.first.ease;
6705
+ this.first = t, t.next && t.next.time >= 1 ? this.interpolate = this.isColor ? Na : Ba : t.isStepped ? this.interpolate = this.isColor ? Ga : Ua : this.interpolate = this.isColor ? Va : za, this.ease = this.first.ease;
6706
6706
  }
6707
6707
  }
6708
6708
  class Ti {
@@ -7008,7 +7008,7 @@ class Ni {
7008
7008
  }
7009
7009
  Ni.type = "rotationStatic";
7010
7010
  Ni.editorConfig = null;
7011
- class Vi {
7011
+ class zi {
7012
7012
  constructor(t) {
7013
7013
  this.order = E.Late + 1, this.rotation = (t.rotation || 0) * nt;
7014
7014
  }
@@ -7018,9 +7018,9 @@ class Vi {
7018
7018
  e.rotation = this.rotation, e = e.next;
7019
7019
  }
7020
7020
  }
7021
- Vi.type = "noRotation";
7022
- Vi.editorConfig = null;
7023
- class zi {
7021
+ zi.type = "noRotation";
7022
+ zi.editorConfig = null;
7023
+ class Vi {
7024
7024
  constructor(t) {
7025
7025
  this.order = E.Normal, this.list = new ne(!1), this.list.reset(rt.createList(t.scale)), this.minMult = t.minMult ?? 1;
7026
7026
  }
@@ -7035,8 +7035,8 @@ class zi {
7035
7035
  t.scale.x = t.scale.y = this.list.interpolate(t.agePercent) * t.config.scaleMult;
7036
7036
  }
7037
7037
  }
7038
- zi.type = "scale";
7039
- zi.editorConfig = null;
7038
+ Vi.type = "scale";
7039
+ Vi.editorConfig = null;
7040
7040
  class Ui {
7041
7041
  constructor(t) {
7042
7042
  this.order = E.Normal, this.min = t.min, this.max = t.max;
@@ -7128,7 +7128,7 @@ class Yi {
7128
7128
  }
7129
7129
  Yi.type = "moveSpeedStatic";
7130
7130
  Yi.editorConfig = null;
7131
- class Ue extends pe {
7131
+ class Ue extends de {
7132
7132
  /**
7133
7133
  * @param emitter The emitter that controls this particle.
7134
7134
  */
@@ -7348,12 +7348,12 @@ class T {
7348
7348
  }
7349
7349
  let a, l;
7350
7350
  if (this._prevPosIsValid && this._posChanged) {
7351
- const d = 1 + this._spawnTimer / t;
7352
- a = (n - e) * d + e, l = (r - i) * d + i;
7351
+ const p = 1 + this._spawnTimer / t;
7352
+ a = (n - e) * p + e, l = (r - i) * p + i;
7353
7353
  } else
7354
7354
  a = n, l = r;
7355
7355
  let c = null, f = null;
7356
- for (let d = Math.min(this.particlesPerWave, this.maxParticles - this.particleCount), o = 0; o < d; ++o) {
7356
+ for (let p = Math.min(this.particlesPerWave, this.maxParticles - this.particleCount), o = 0; o < p; ++o) {
7357
7357
  if (this.spawnChance < 1 && Math.random() >= this.spawnChance)
7358
7358
  continue;
7359
7359
  let h;
@@ -7364,22 +7364,22 @@ class T {
7364
7364
  }
7365
7365
  if (c) {
7366
7366
  this._activeParticlesLast ? (this._activeParticlesLast.next = c, c.prev = this._activeParticlesLast, this._activeParticlesLast = f) : (this._activeParticlesFirst = c, this._activeParticlesLast = f);
7367
- for (let d = 0; d < this.initBehaviors.length; ++d) {
7368
- const o = this.initBehaviors[d];
7367
+ for (let p = 0; p < this.initBehaviors.length; ++p) {
7368
+ const o = this.initBehaviors[p];
7369
7369
  if (o === vt)
7370
7370
  for (let h = c, u; h; h = u) {
7371
7371
  u = h.next, this.rotation !== 0 && (ht(this.rotation, h.position), h.rotation += this.rotation), h.position.x += a, h.position.y += l, h.age += -this._spawnTimer;
7372
- let p = h.age * h.oneOverLife;
7373
- this.customEase && (this.customEase.length === 4 ? p = this.customEase(p, 0, 1, 1) : p = this.customEase(p)), h.agePercent = p;
7372
+ let d = h.age * h.oneOverLife;
7373
+ this.customEase && (this.customEase.length === 4 ? d = this.customEase(d, 0, 1, 1) : d = this.customEase(d)), h.agePercent = d;
7374
7374
  }
7375
7375
  else
7376
7376
  o.initParticles(c);
7377
7377
  }
7378
- for (let d = c, o; d; d = o) {
7379
- o = d.next;
7378
+ for (let p = c, o; p; p = o) {
7379
+ o = p.next;
7380
7380
  for (let h = 0; h < this.updateBehaviors.length; ++h)
7381
- if (this.updateBehaviors[h].updateParticle(d, -this._spawnTimer)) {
7382
- this.recycle(d);
7381
+ if (this.updateBehaviors[h].updateParticle(p, -this._spawnTimer)) {
7382
+ this.recycle(p);
7383
7383
  break;
7384
7384
  }
7385
7385
  }
@@ -7465,14 +7465,14 @@ T.registerBehavior(ji);
7465
7465
  T.registerBehavior(Ri);
7466
7466
  T.registerBehavior(Bi);
7467
7467
  T.registerBehavior(Ni);
7468
- T.registerBehavior(Vi);
7469
7468
  T.registerBehavior(zi);
7469
+ T.registerBehavior(Vi);
7470
7470
  T.registerBehavior(Ui);
7471
7471
  T.registerBehavior(Q);
7472
7472
  T.registerBehavior(Gi);
7473
7473
  T.registerBehavior(Xi);
7474
7474
  T.registerBehavior(Yi);
7475
- class qa extends Si {
7475
+ class $a extends Si {
7476
7476
  constructor() {
7477
7477
  super(...arguments), this.elapsed = Date.now();
7478
7478
  }
@@ -7494,12 +7494,12 @@ class qa extends Si {
7494
7494
  await super.onDestroy(t, i);
7495
7495
  }
7496
7496
  }
7497
- W("ParticlesEmitter", qa);
7497
+ W("ParticlesEmitter", $a);
7498
7498
  function ah(s) {
7499
7499
  return N("ParticlesEmitter", s);
7500
7500
  }
7501
7501
  const ms = console.log;
7502
- class En extends at(pe) {
7502
+ class En extends at(de) {
7503
7503
  constructor() {
7504
7504
  super(...arguments), this.currentAnimation = null, this.time = 0, this.frameIndex = 0, this.animations = /* @__PURE__ */ new Map(), this.subscriptionSheet = [], this.sheetParams = {}, this.sheetCurrentAnimation = "stand", this.app = null, this.globalLoader = null, this.trackedAssetIds = /* @__PURE__ */ new Set(), this.currentAnimationContainer = null;
7505
7505
  }
@@ -7572,11 +7572,11 @@ class En extends at(pe) {
7572
7572
  this.globalLoader && c && this.globalLoader.updateProgress(c, m);
7573
7573
  });
7574
7574
  this.globalLoader && c && this.globalLoader.completeAsset(c), (!e || e <= 0) && (e = f.width, t.width = e), (!i || i <= 0) && (i = f.height, t.height = i);
7575
- const d = t.spriteWidth, o = t.spriteHeight, h = [], u = l && l.x || 0, p = l && l.y || 0;
7575
+ const p = t.spriteWidth, o = t.spriteHeight, h = [], u = l && l.x || 0, d = l && l.y || 0;
7576
7576
  for (let m = 0; m < n; m++) {
7577
7577
  h[m] = [];
7578
7578
  for (let g = 0; g < r; g++) {
7579
- const y = g * d + u, v = m * o + p;
7579
+ const y = g * p + u, v = m * o + d;
7580
7580
  if (v > i)
7581
7581
  throw ms(
7582
7582
  `Warning, there is a problem with the height of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the height of the image.`
@@ -7588,7 +7588,7 @@ class En extends at(pe) {
7588
7588
  h[m].push(
7589
7589
  new ct({
7590
7590
  source: f.source,
7591
- frame: new _t(y, v, d, o)
7591
+ frame: new _t(y, v, p, o)
7592
7592
  })
7593
7593
  );
7594
7594
  }
@@ -7620,16 +7620,16 @@ class En extends at(pe) {
7620
7620
  width: l = 0,
7621
7621
  framesWidth: c = 1,
7622
7622
  rectHeight: f,
7623
- height: d = 0,
7623
+ height: p = 0,
7624
7624
  framesHeight: o = 1,
7625
7625
  image: h
7626
7626
  } = r;
7627
- let u = l, p = d;
7628
- if (h && (!u || u <= 0 || !p || p <= 0)) {
7627
+ let u = l, d = p;
7628
+ if (h && (!u || u <= 0 || !d || d <= 0)) {
7629
7629
  const m = await this.detectImageDimensions(h);
7630
- (!u || u <= 0) && (u = m.width, r.width = u), (!p || p <= 0) && (p = m.height, r.height = p);
7630
+ (!u || u <= 0) && (u = m.width, r.width = u), (!d || d <= 0) && (d = m.height, r.height = d);
7631
7631
  }
7632
- r.spriteWidth = a || u / c, r.spriteHeight = f || p / o, this.animations.set(e, {
7632
+ r.spriteWidth = a || u / c, r.spriteHeight = f || d / o, this.animations.set(e, {
7633
7633
  frames: await this.createTextures(
7634
7634
  r
7635
7635
  ),
@@ -7655,8 +7655,8 @@ class En extends at(pe) {
7655
7655
  const f = i?.sheet.params[c];
7656
7656
  if (_(f))
7657
7657
  this.subscriptionSheet.push(
7658
- f.observable.subscribe((d) => {
7659
- this.animations.size != 0 && this.has(this.sheetCurrentAnimation) && this.play(this.sheetCurrentAnimation, [{ ...this.sheetParams, [c]: d }]);
7658
+ f.observable.subscribe((p) => {
7659
+ this.animations.size != 0 && this.has(this.sheetCurrentAnimation) && this.play(this.sheetCurrentAnimation, [{ ...this.sheetParams, [c]: p }]);
7660
7660
  })
7661
7661
  );
7662
7662
  else {
@@ -7664,10 +7664,10 @@ class En extends at(pe) {
7664
7664
  this.play(this.sheetCurrentAnimation, [{ ...this.sheetParams, [c]: f }]);
7665
7665
  }
7666
7666
  }
7667
- const l = K(() => {
7667
+ const l = q(() => {
7668
7668
  const { x: c, y: f } = i ?? {};
7669
7669
  if (!c || !f) return !1;
7670
- const d = c, o = f, h = Zt(d) && d.animatedState().current !== d.animatedState().end, u = Zt(o) && o.animatedState().current !== o.animatedState().end;
7670
+ const p = c, o = f, h = Zt(p) && p.animatedState().current !== p.animatedState().end, u = Zt(o) && o.animatedState().current !== o.animatedState().end;
7671
7671
  return h || u;
7672
7672
  });
7673
7673
  H(() => {
@@ -7686,9 +7686,9 @@ class En extends at(pe) {
7686
7686
  const l = this.fullProps.loader?.onProgress, c = await St.load(r, (f) => {
7687
7687
  if (this.globalLoader && a && this.globalLoader.updateProgress(a, f), l && l(f), f == 1) {
7688
7688
  this.globalLoader && a && this.globalLoader.completeAsset(a);
7689
- const d = this.fullProps.loader?.onComplete;
7690
- d && setTimeout(() => {
7691
- d(c);
7689
+ const p = this.fullProps.loader?.onComplete;
7690
+ p && setTimeout(() => {
7691
+ p(c);
7692
7692
  });
7693
7693
  }
7694
7694
  });
@@ -7744,9 +7744,9 @@ class En extends at(pe) {
7744
7744
  let a = n.animations;
7745
7745
  a = ui(a) ? a(...r) : a, this.currentAnimationContainer = new Ft();
7746
7746
  for (let c of a) {
7747
- const f = new pe();
7748
- for (let d of c)
7749
- this.currentAnimation.sprites.push(d);
7747
+ const f = new de();
7748
+ for (let p of c)
7749
+ this.currentAnimation.sprites.push(p);
7750
7750
  this.currentAnimationContainer.addChild(f);
7751
7751
  }
7752
7752
  const l = this.currentAnimation.data.sound;
@@ -7785,7 +7785,7 @@ class En extends at(pe) {
7785
7785
  let l = r[this.frameIndex];
7786
7786
  const c = r[this.frameIndex + 1];
7787
7787
  for (let f of this.currentAnimationContainer.children) {
7788
- let d = function(g, y) {
7788
+ let p = function(g, y) {
7789
7789
  const b = o(y || g);
7790
7790
  b !== void 0 && (i[g] = b);
7791
7791
  };
@@ -7800,15 +7800,15 @@ class En extends at(pe) {
7800
7800
  ...l,
7801
7801
  ...this.applyTransform(l, a, this.spritesheet)
7802
7802
  });
7803
- const u = o("spriteRealSize"), p = typeof u == "number" ? u : u?.height;
7803
+ const u = o("spriteRealSize"), d = typeof u == "number" ? u : u?.height;
7804
7804
  typeof u == "number" || u?.width;
7805
7805
  const m = () => {
7806
- if (p && this.hitbox) {
7807
- const { spriteWidth: g, spriteHeight: y } = a, v = (g - this.hitbox.w) / 2 / g, b = (y - p) / 2, w = (y - this.hitbox.h - b) / y;
7806
+ if (d && this.hitbox) {
7807
+ const { spriteWidth: g, spriteHeight: y } = a, v = (g - this.hitbox.w) / 2 / g, b = (y - d) / 2, w = (y - this.hitbox.h - b) / y;
7808
7808
  this.anchor.set(v, w);
7809
7809
  }
7810
7810
  };
7811
- l.sound, m(), h("anchor"), h("scale"), h("skew"), h("pivot"), d("alpha", "opacity"), d("x"), d("y"), d("angle"), d("rotation"), d("visible");
7811
+ l.sound, m(), h("anchor"), h("scale"), h("skew"), h("pivot"), p("alpha", "opacity"), p("x"), p("y"), p("angle"), p("rotation"), p("visible");
7812
7812
  }
7813
7813
  if (!c) {
7814
7814
  this.time = 0, this.frameIndex = 0, this.onFinish && r.length > 1 && this.onFinish();
@@ -7871,16 +7871,16 @@ function lh(s) {
7871
7871
  e.set(c), s?.loader?.onComplete && s.loader.onComplete(l);
7872
7872
  for (let f in t)
7873
7873
  if (s[f]) {
7874
- const d = (o) => {
7874
+ const p = (o) => {
7875
7875
  s[f](o);
7876
7876
  };
7877
- t[f] = d, c.addEventListener(f, d);
7877
+ t[f] = p, c.addEventListener(f, p);
7878
7878
  }
7879
7879
  }
7880
7880
  }
7881
7881
  });
7882
7882
  }
7883
- class Ka extends at(Rn) {
7883
+ class qa extends at(Rn) {
7884
7884
  constructor() {
7885
7885
  super(...arguments), this.fullText = "", this.currentIndex = 0, this.typewriterSpeed = 1, this._wordWrapWidth = 0, this.typewriterOptions = {}, this.lastSoundTime = 0, this.soundDuration = 0;
7886
7886
  }
@@ -7971,8 +7971,8 @@ class Ka extends at(Rn) {
7971
7971
  await super.onDestroy(t, i);
7972
7972
  }
7973
7973
  }
7974
- W("Text", Ka);
7975
- function $a(s) {
7974
+ W("Text", qa);
7975
+ function Ka(s) {
7976
7976
  return N("Text", s);
7977
7977
  }
7978
7978
  class Ja extends at(Bn) {
@@ -8062,16 +8062,16 @@ var In = { exports: {} };
8062
8062
  return (n /= l / 2) < 1 ? -a / 2 * (Math.sqrt(1 - n * n) - 1) + r : a / 2 * (Math.sqrt(1 - (n -= 2) * n) + 1) + r;
8063
8063
  },
8064
8064
  easeInElastic: function(n, r, a, l) {
8065
- var c, f, d;
8066
- return d = 1.70158, f = 0, c = a, n === 0 || (n /= l), f || (f = l * 0.3), c < Math.abs(a) ? (c = a, d = f / 4) : d = f / (2 * Math.PI) * Math.asin(a / c), -(c * Math.pow(2, 10 * (n -= 1)) * Math.sin((n * l - d) * (2 * Math.PI) / f)) + r;
8065
+ var c, f, p;
8066
+ return p = 1.70158, f = 0, c = a, n === 0 || (n /= l), f || (f = l * 0.3), c < Math.abs(a) ? (c = a, p = f / 4) : p = f / (2 * Math.PI) * Math.asin(a / c), -(c * Math.pow(2, 10 * (n -= 1)) * Math.sin((n * l - p) * (2 * Math.PI) / f)) + r;
8067
8067
  },
8068
8068
  easeOutElastic: function(n, r, a, l) {
8069
- var c, f, d;
8070
- return d = 1.70158, f = 0, c = a, n === 0 || (n /= l), f || (f = l * 0.3), c < Math.abs(a) ? (c = a, d = f / 4) : d = f / (2 * Math.PI) * Math.asin(a / c), c * Math.pow(2, -10 * n) * Math.sin((n * l - d) * (2 * Math.PI) / f) + a + r;
8069
+ var c, f, p;
8070
+ return p = 1.70158, f = 0, c = a, n === 0 || (n /= l), f || (f = l * 0.3), c < Math.abs(a) ? (c = a, p = f / 4) : p = f / (2 * Math.PI) * Math.asin(a / c), c * Math.pow(2, -10 * n) * Math.sin((n * l - p) * (2 * Math.PI) / f) + a + r;
8071
8071
  },
8072
8072
  easeInOutElastic: function(n, r, a, l) {
8073
- var c, f, d;
8074
- return d = 1.70158, f = 0, c = a, n === 0 || (n /= l / 2), f || (f = l * (0.3 * 1.5)), c < Math.abs(a) ? (c = a, d = f / 4) : d = f / (2 * Math.PI) * Math.asin(a / c), n < 1 ? -0.5 * (c * Math.pow(2, 10 * (n -= 1)) * Math.sin((n * l - d) * (2 * Math.PI) / f)) + r : c * Math.pow(2, -10 * (n -= 1)) * Math.sin((n * l - d) * (2 * Math.PI) / f) * 0.5 + a + r;
8073
+ var c, f, p;
8074
+ return p = 1.70158, f = 0, c = a, n === 0 || (n /= l / 2), f || (f = l * (0.3 * 1.5)), c < Math.abs(a) ? (c = a, p = f / 4) : p = f / (2 * Math.PI) * Math.asin(a / c), n < 1 ? -0.5 * (c * Math.pow(2, 10 * (n -= 1)) * Math.sin((n * l - p) * (2 * Math.PI) / f)) + r : c * Math.pow(2, -10 * (n -= 1)) * Math.sin((n * l - p) * (2 * Math.PI) / f) * 0.5 + a + r;
8075
8075
  },
8076
8076
  easeInBack: function(n, r, a, l, c) {
8077
8077
  return c === void 0 && (c = 1.70158), a * (n /= l) * n * ((c + 1) * n - c) + r;
@@ -8215,7 +8215,7 @@ class el {
8215
8215
  return (this.isMouseDown ? 1 : 0) + this.touches.length;
8216
8216
  }
8217
8217
  }
8218
- const zt = [
8218
+ const Vt = [
8219
8219
  "drag",
8220
8220
  "pinch",
8221
8221
  "wheel",
@@ -8243,11 +8243,11 @@ class il {
8243
8243
  * @param {Plugin} plugin - instantiated Plugin class
8244
8244
  * @param {number} index to insert userPlugin (otherwise inserts it at the end)
8245
8245
  */
8246
- add(t, e, i = zt.length) {
8246
+ add(t, e, i = Vt.length) {
8247
8247
  const n = this.plugins[t];
8248
8248
  n && n.destroy(), this.plugins[t] = e;
8249
- const r = zt.indexOf(t);
8250
- r !== -1 && zt.splice(r, 1), zt.splice(i, 0, t), this.sort();
8249
+ const r = Vt.indexOf(t);
8250
+ r !== -1 && Vt.splice(r, 1), Vt.splice(i, 0, t), this.sort();
8251
8251
  }
8252
8252
  /**
8253
8253
  * Get plugin
@@ -8326,7 +8326,7 @@ class il {
8326
8326
  */
8327
8327
  sort() {
8328
8328
  this.list = [];
8329
- for (const t of zt)
8329
+ for (const t of Vt)
8330
8330
  this.plugins[t] && this.list.push(this.plugins[t]);
8331
8331
  }
8332
8332
  /**
@@ -8378,7 +8378,7 @@ class il {
8378
8378
  return e;
8379
8379
  }
8380
8380
  }
8381
- class q {
8381
+ class $ {
8382
8382
  /** @param {Viewport} parent */
8383
8383
  constructor(t) {
8384
8384
  this.parent = t, this.paused = !1;
@@ -8428,7 +8428,7 @@ const sl = {
8428
8428
  ease: "linear",
8429
8429
  time: 1e3
8430
8430
  };
8431
- class nl extends q {
8431
+ class nl extends $ {
8432
8432
  /**
8433
8433
  * This is called by {@link Viewport.animate}.
8434
8434
  *
@@ -8502,7 +8502,7 @@ const rl = {
8502
8502
  underflow: "center",
8503
8503
  bounceBox: null
8504
8504
  };
8505
- class ol extends q {
8505
+ class ol extends $ {
8506
8506
  /**
8507
8507
  * This is called by {@link Viewport.bounce}.
8508
8508
  */
@@ -8625,7 +8625,7 @@ const al = {
8625
8625
  direction: null,
8626
8626
  underflow: "center"
8627
8627
  };
8628
- class ll extends q {
8628
+ class ll extends $ {
8629
8629
  /**
8630
8630
  * This is called by {@link Viewport.clamp}.
8631
8631
  */
@@ -8699,7 +8699,7 @@ const hl = {
8699
8699
  minScale: null,
8700
8700
  maxScale: null
8701
8701
  };
8702
- class cl extends q {
8702
+ class cl extends $ {
8703
8703
  /**
8704
8704
  * This is called by {@link Viewport.clampZoom}.
8705
8705
  */
@@ -8758,7 +8758,7 @@ const ul = {
8758
8758
  bounce: 0.8,
8759
8759
  minSpeed: 0.01
8760
8760
  }, ft = 16;
8761
- class fl extends q {
8761
+ class fl extends $ {
8762
8762
  /**
8763
8763
  * This is called by {@link Viewport.decelerate}.
8764
8764
  */
@@ -8824,7 +8824,7 @@ class fl extends q {
8824
8824
  this.x = this.y = null;
8825
8825
  }
8826
8826
  }
8827
- const pl = {
8827
+ const dl = {
8828
8828
  direction: "all",
8829
8829
  pressDrag: !0,
8830
8830
  wheel: !0,
@@ -8839,12 +8839,12 @@ const pl = {
8839
8839
  lineHeight: 20,
8840
8840
  wheelSwapAxes: !1
8841
8841
  };
8842
- class dl extends q {
8842
+ class pl extends $ {
8843
8843
  /**
8844
8844
  * This is called by {@link Viewport.drag}.
8845
8845
  */
8846
8846
  constructor(t, e = {}) {
8847
- super(t), this.windowEventHandlers = [], this.options = Object.assign({}, pl, e), this.moved = !1, this.reverse = this.options.reverse ? 1 : -1, this.xDirection = !this.options.direction || this.options.direction === "all" || this.options.direction === "x", this.yDirection = !this.options.direction || this.options.direction === "all" || this.options.direction === "y", this.keyIsPressed = !1, this.parseUnderflow(), this.mouseButtons(this.options.mouseButtons), this.options.keyToPress && this.handleKeyPresses(this.options.keyToPress);
8847
+ super(t), this.windowEventHandlers = [], this.options = Object.assign({}, dl, e), this.moved = !1, this.reverse = this.options.reverse ? 1 : -1, this.xDirection = !this.options.direction || this.options.direction === "all" || this.options.direction === "x", this.yDirection = !this.options.direction || this.options.direction === "all" || this.options.direction === "y", this.keyIsPressed = !1, this.parseUnderflow(), this.mouseButtons(this.options.mouseButtons), this.options.keyToPress && this.handleKeyPresses(this.options.keyToPress);
8848
8848
  }
8849
8849
  /**
8850
8850
  * Handles keypress events and set the keyIsPressed boolean accordingly
@@ -9002,7 +9002,7 @@ const ml = {
9002
9002
  acceleration: null,
9003
9003
  radius: null
9004
9004
  };
9005
- class yl extends q {
9005
+ class yl extends $ {
9006
9006
  /**
9007
9007
  * This is called by {@link Viewport.follow}.
9008
9008
  *
@@ -9038,12 +9038,12 @@ class yl extends q {
9038
9038
  x: Math.max(this.velocity.x - this.options.acceleration * this.options.speed, 0),
9039
9039
  y: Math.max(this.velocity.y - this.options.acceleration * this.options.speed, 0)
9040
9040
  };
9041
- const d = Math.cos(l) * this.velocity.x, o = Math.sin(l) * this.velocity.y, h = Math.abs(d) > Math.abs(r) ? i : e.x + d, u = Math.abs(o) > Math.abs(a) ? n : e.y + o;
9041
+ const p = Math.cos(l) * this.velocity.x, o = Math.sin(l) * this.velocity.y, h = Math.abs(p) > Math.abs(r) ? i : e.x + p, u = Math.abs(o) > Math.abs(a) ? n : e.y + o;
9042
9042
  this.parent.moveCenter(h, u), this.parent.emit("moved", { viewport: this.parent, type: "follow" });
9043
9043
  }
9044
9044
  } else {
9045
- const l = Math.atan2(n - e.y, i - e.x), c = Math.cos(l) * this.options.speed, f = Math.sin(l) * this.options.speed, d = Math.abs(c) > Math.abs(r) ? i : e.x + c, o = Math.abs(f) > Math.abs(a) ? n : e.y + f;
9046
- this.parent.moveCenter(d, o), this.parent.emit("moved", { viewport: this.parent, type: "follow" });
9045
+ const l = Math.atan2(n - e.y, i - e.x), c = Math.cos(l) * this.options.speed, f = Math.sin(l) * this.options.speed, p = Math.abs(c) > Math.abs(r) ? i : e.x + c, o = Math.abs(f) > Math.abs(a) ? n : e.y + f;
9046
+ this.parent.moveCenter(p, o), this.parent.emit("moved", { viewport: this.parent, type: "follow" });
9047
9047
  }
9048
9048
  else
9049
9049
  this.parent.moveCenter(i, n), this.parent.emit("moved", { viewport: this.parent, type: "follow" });
@@ -9062,7 +9062,7 @@ const gl = {
9062
9062
  linear: !1,
9063
9063
  allowButtons: !1
9064
9064
  };
9065
- class vl extends q {
9065
+ class vl extends $ {
9066
9066
  /**
9067
9067
  * This is called by {@link Viewport.mouseEdges}.
9068
9068
  */
@@ -9116,7 +9116,7 @@ const bl = {
9116
9116
  factor: 1,
9117
9117
  axis: "all"
9118
9118
  }, wl = new k();
9119
- class xl extends q {
9119
+ class xl extends $ {
9120
9120
  /**
9121
9121
  * This is called by {@link Viewport.pinch}.
9122
9122
  */
@@ -9154,7 +9154,7 @@ class xl extends q {
9154
9154
  f,
9155
9155
  this.parent.parent || this.parent
9156
9156
  ));
9157
- let d = Math.sqrt(
9157
+ let p = Math.sqrt(
9158
9158
  Math.pow(
9159
9159
  a.last.x - r.last.x,
9160
9160
  2
@@ -9163,8 +9163,8 @@ class xl extends q {
9163
9163
  2
9164
9164
  )
9165
9165
  );
9166
- d = d === 0 ? d = 1e-10 : d;
9167
- const o = (1 - l / d) * this.options.percent * (this.isAxisX() ? this.parent.scale.x : this.parent.scale.y);
9166
+ p = p === 0 ? p = 1e-10 : p;
9167
+ const o = (1 - l / p) * this.options.percent * (this.isAxisX() ? this.parent.scale.x : this.parent.scale.y);
9168
9168
  this.isAxisX() && (this.parent.scale.x += o), this.isAxisY() && (this.parent.scale.y += o), this.parent.emit("zoomed", {
9169
9169
  viewport: this.parent,
9170
9170
  type: "pinch",
@@ -9201,7 +9201,7 @@ const _l = {
9201
9201
  removeOnInterrupt: !1,
9202
9202
  forceStart: !1
9203
9203
  };
9204
- class Sl extends q {
9204
+ class Sl extends $ {
9205
9205
  /**
9206
9206
  * This is called by {@link Viewport.snap}.
9207
9207
  */
@@ -9236,8 +9236,8 @@ class Sl extends q {
9236
9236
  if (e.time > this.options.time)
9237
9237
  i = !0, n = a + c, r = l + f;
9238
9238
  else {
9239
- const d = this.ease(e.time, 0, 1, this.options.time);
9240
- n = a + c * d, r = l + f * d;
9239
+ const p = this.ease(e.time, 0, 1, this.options.time);
9240
+ n = a + c * p, r = l + f * p;
9241
9241
  }
9242
9242
  this.options.topLeft ? this.parent.moveCorner(n, r) : this.parent.moveCenter(n, r), this.parent.emit("moved", { viewport: this.parent, type: "snap" }), i && (this.options.removeOnComplete && this.parent.plugins.remove("snap"), this.parent.emit("snap-end", this.parent), this.snapping = null);
9243
9243
  } else {
@@ -9258,7 +9258,7 @@ const Al = {
9258
9258
  forceStart: !1,
9259
9259
  noMove: !1
9260
9260
  };
9261
- class Cl extends q {
9261
+ class Cl extends $ {
9262
9262
  /**
9263
9263
  * This is called by {@link Viewport.snapZoom}.
9264
9264
  */
@@ -9318,7 +9318,7 @@ const kl = {
9318
9318
  trackpadPinch: !1,
9319
9319
  wheelZoom: !0
9320
9320
  };
9321
- class Pl extends q {
9321
+ class Pl extends $ {
9322
9322
  /**
9323
9323
  * This is called by {@link Viewport.wheel}.
9324
9324
  */
@@ -9834,7 +9834,7 @@ class Ml extends Ft {
9834
9834
  * @returns {Viewport} this
9835
9835
  */
9836
9836
  drag(t) {
9837
- return this.plugins.add("drag", new dl(this, t)), this;
9837
+ return this.plugins.add("drag", new pl(this, t)), this;
9838
9838
  }
9839
9839
  /**
9840
9840
  * Clamp to world boundaries or other provided boundaries
@@ -10319,7 +10319,7 @@ class Dn {
10319
10319
  }
10320
10320
  return;
10321
10321
  }
10322
- if (Vs(t)) {
10322
+ if (zs(t)) {
10323
10323
  t.subscribe((n) => {
10324
10324
  n && typeof n == "object" && "elements" in n ? (n.elements || []).forEach((a) => this.appendChildElement(a)) : Array.isArray(n) ? n.forEach((r) => this.appendChildElement(r)) : this.appendChildElement(n);
10325
10325
  });
@@ -10418,7 +10418,7 @@ class Dn {
10418
10418
  }
10419
10419
  }
10420
10420
  W("DOMElement", Dn);
10421
- const Dl = (s) => N("DOMElement", s), pt = class pt extends at(Vn) {
10421
+ const Dl = (s) => N("DOMElement", s), dt = class dt extends at(zn) {
10422
10422
  constructor() {
10423
10423
  super(...arguments), this.disableLayout = !0, this.canvasSizeEffect = null;
10424
10424
  }
@@ -10482,15 +10482,15 @@ const Dl = (s) => N("DOMElement", s), pt = class pt extends at(Vn) {
10482
10482
  if (Array.isArray(t))
10483
10483
  return t.map((e) => this.routeDomChildren(e));
10484
10484
  if (G(t)) {
10485
- if (pt.DOM_ALLOWED_TAGS.has(t.tag))
10485
+ if (dt.DOM_ALLOWED_TAGS.has(t.tag))
10486
10486
  return t;
10487
- const e = pt.DOM_ROUTING_MAP[t.tag];
10487
+ const e = dt.DOM_ROUTING_MAP[t.tag];
10488
10488
  if (e) {
10489
10489
  t.propSubscriptions?.forEach((n) => n.unsubscribe()), t.effectSubscriptions?.forEach((n) => n.unsubscribe()), t.effectUnmounts?.forEach((n) => n?.());
10490
10490
  const i = t.propObservables ?? t.props;
10491
10491
  return N(e, i);
10492
10492
  }
10493
- if (pt.DOM_UNSUPPORTED_TAGS.has(t.tag))
10493
+ if (dt.DOM_UNSUPPORTED_TAGS.has(t.tag))
10494
10494
  throw new Error(
10495
10495
  `Component ${t.tag} is not implemented for DOMContainer context yet. Only Sprite is supported.`
10496
10496
  );
@@ -10501,11 +10501,31 @@ const Dl = (s) => N("DOMElement", s), pt = class pt extends at(Vn) {
10501
10501
  onInit(t) {
10502
10502
  const e = t._scopeClass;
10503
10503
  let i = { element: "div" };
10504
- e ? (i.attrs = { ...t.attrs }, i.attrs.class ? typeof i.attrs.class == "string" ? i.attrs.class = `${e} ${i.attrs.class}` : Array.isArray(i.attrs.class) ? i.attrs.class = [e, ...i.attrs.class] : typeof i.attrs.class == "object" && (i.attrs.class = { [e]: !0, ...i.attrs.class }) : i.attrs.class = e) : t.attrs && (i.attrs = t.attrs);
10505
- const n = this.routeDomChildren(t.children);
10506
- t.children = n;
10507
- const r = U(Dl, i, n);
10508
- this.element = r.componentInstance.element;
10504
+ const n = { ...t.attrs || {} }, r = (c) => {
10505
+ if (!e) return c;
10506
+ if (c == null) return e;
10507
+ if (typeof c == "string")
10508
+ return `${e} ${c}`;
10509
+ if (Array.isArray(c))
10510
+ return [e, ...c];
10511
+ if (typeof c == "object") {
10512
+ if ("items" in c) {
10513
+ const f = c.items;
10514
+ return { ...c, items: [e, f] };
10515
+ }
10516
+ if ("value" in c) {
10517
+ const f = c.value;
10518
+ return { ...c, value: [e, f] };
10519
+ }
10520
+ return { [e]: !0, ...c };
10521
+ }
10522
+ return [e, c];
10523
+ };
10524
+ t.class !== void 0 && (n.class ? n.class = [t.class, n.class] : n.class = t.class), t.style !== void 0 && (typeof n.style == "object" && n.style !== null && typeof t.style == "object" && t.style !== null ? n.style = { ...n.style, ...t.style } : n.style === void 0 ? n.style = t.style : typeof n.style == "string" && typeof t.style == "string" ? n.style = `${n.style}; ${t.style}` : n.style = t.style), t.zIndex !== void 0 && (typeof n.style == "object" && n.style !== null ? n.style = { ...n.style, zIndex: t.zIndex } : typeof n.style == "string" ? n.style = `${n.style}; z-index: ${t.zIndex}` : n.style = { zIndex: t.zIndex }), e ? (i.attrs = { ...n }, i.attrs.class = r(i.attrs.class)) : Object.keys(n).length > 0 && (i.attrs = n);
10525
+ const a = this.routeDomChildren(t.children);
10526
+ t.children = a;
10527
+ const l = U(Dl, i, a);
10528
+ this.element = l.componentInstance.element;
10509
10529
  }
10510
10530
  async onMount(t, e) {
10511
10531
  await super.onMount(t, e), this.syncCanvasSizeEffect(), this.applyElementSize();
@@ -10523,13 +10543,13 @@ const Dl = (s) => N("DOMElement", s), pt = class pt extends at(Vn) {
10523
10543
  await super.onDestroy(t, i);
10524
10544
  }
10525
10545
  };
10526
- pt.DOM_ROUTING_MAP = {
10546
+ dt.DOM_ROUTING_MAP = {
10527
10547
  Sprite: "DOMSprite"
10528
- }, pt.DOM_ALLOWED_TAGS = /* @__PURE__ */ new Set([
10548
+ }, dt.DOM_ALLOWED_TAGS = /* @__PURE__ */ new Set([
10529
10549
  "DOMContainer",
10530
10550
  "DOMElement",
10531
10551
  "DOMSprite"
10532
- ]), pt.DOM_UNSUPPORTED_TAGS = /* @__PURE__ */ new Set([
10552
+ ]), dt.DOM_UNSUPPORTED_TAGS = /* @__PURE__ */ new Set([
10533
10553
  "Canvas",
10534
10554
  "Container",
10535
10555
  "Graphics",
@@ -10551,7 +10571,7 @@ pt.DOM_ROUTING_MAP = {
10551
10571
  "Joystick",
10552
10572
  "FocusContainer"
10553
10573
  ]);
10554
- let ni = pt;
10574
+ let ni = dt;
10555
10575
  W("DOMContainer", ni);
10556
10576
  const fh = (s) => N("DOMContainer", s), Ll = [
10557
10577
  "click",
@@ -10594,20 +10614,22 @@ const fh = (s) => N("DOMContainer", s), Ll = [
10594
10614
  ];
10595
10615
  class Fl extends Dn {
10596
10616
  constructor() {
10597
- super(...arguments), this.frameIndex = 0, this.frames = [], this.fps = 120, this.loop = !0, this.playing = !0, this.hasExternalFrameIndex = !1, this.elapsed = 0, this.sheetSubscriptions = [], this.sheetAnimations = /* @__PURE__ */ new Map(), this.sheetParams = {}, this.sheetTime = 0, this.sheetFrameIndex = 0, this.sheetFinished = !1, this.sheetLoadToken = 0, this.elementType = "div", this.isAnimating = !1;
10617
+ super(...arguments), this.frameIndex = 0, this.frames = [], this.fps = 120, this.loop = !0, this.playing = !0, this.hasExternalFrameIndex = !1, this.elapsed = 0, this.sheetSubscriptions = [], this.sheetAnimations = /* @__PURE__ */ new Map(), this.sheetParams = {}, this.sheetTime = 0, this.sheetFrameIndex = 0, this.sheetFinished = !1, this.sheetLoadToken = 0, this.renderElementType = "div", this.wrapperElementType = "div", this.isAnimating = !1, this.frameWidth = 0, this.frameHeight = 0, this.isContained = !1;
10598
10618
  }
10599
10619
  onInit(t) {
10600
- const e = t;
10601
- this.elementType = e.element ?? "div";
10602
- const i = this.mergeEventAttrs({ ...e, element: this.elementType });
10603
- this.tickSignal = i.context?.tick, this.applyProps(i), super.onInit(i), this.render(), this.updateAnimationLoop();
10620
+ const e = t, n = !(e.sheet !== void 0) && e.image ? "img" : "div";
10621
+ this.renderElementType = e.element ?? n;
10622
+ const r = this.resolveValue(e.objectFit);
10623
+ this.fitMode = r ?? void 0, this.wrapperElementType = this.fitMode === "contain" && this.renderElementType === "img" ? "div" : this.renderElementType;
10624
+ const a = this.mergeEventAttrs({ ...e, element: this.wrapperElementType });
10625
+ this.tickSignal = a.context?.tick, this.applyProps(a), super.onInit(a), this.syncRenderElement(), this.applyDisplayProps(a), this.render(), this.updateAnimationLoop();
10604
10626
  }
10605
10627
  onMount(t) {
10606
10628
  this.tickSignal = t.props.context?.tick, super.onMount(t), this.bindPlayingSignal(t), this.bindSheetParams(t), this.updateAnimationLoop();
10607
10629
  }
10608
10630
  onUpdate(t) {
10609
10631
  const e = this.mergeEventAttrs(t);
10610
- super.onUpdate(e), this.applyProps(e), this.render(), this.updateAnimationLoop();
10632
+ super.onUpdate(e), this.applyProps(e), this.syncRenderElement(), this.applyDisplayProps(e), this.render(), this.updateAnimationLoop();
10611
10633
  }
10612
10634
  async onDestroy(t, e) {
10613
10635
  this.playingSubscription && (this.playingSubscription.unsubscribe(), this.playingSubscription = void 0), this.sheetSubscriptions.length > 0 && (this.sheetSubscriptions.forEach((i) => i.unsubscribe()), this.sheetSubscriptions = []), this.stopAnimationLoop(), await super.onDestroy(t, e);
@@ -10648,7 +10670,7 @@ class Fl extends Dn {
10648
10670
  for (const n in e) {
10649
10671
  const a = {
10650
10672
  ...i.reduce(
10651
- (p, m) => ({ ...p, [m]: t[m] }),
10673
+ (d, m) => ({ ...d, [m]: t[m] }),
10652
10674
  {}
10653
10675
  ),
10654
10676
  ...e[n],
@@ -10660,15 +10682,15 @@ class Fl extends Dn {
10660
10682
  rectWidth: l,
10661
10683
  rectHeight: c,
10662
10684
  framesWidth: f = 1,
10663
- framesHeight: d = 1,
10685
+ framesHeight: p = 1,
10664
10686
  image: o
10665
10687
  } = a;
10666
10688
  let h = a.width || 0, u = a.height || 0;
10667
10689
  if (o && (!h || h <= 0 || !u || u <= 0)) {
10668
- const p = await this.detectImageDimensions(o);
10669
- (!h || h <= 0) && (h = p.width), (!u || u <= 0) && (u = p.height);
10690
+ const d = await this.detectImageDimensions(o);
10691
+ (!h || h <= 0) && (h = d.width), (!u || u <= 0) && (u = d.height);
10670
10692
  }
10671
- !h || !u || !f || !d || (a.width = h, a.height = u, a.spriteWidth = l || h / f, a.spriteHeight = c || u / d, this.sheetAnimations.set(n, {
10693
+ !h || !u || !f || !p || (a.width = h, a.height = u, a.spriteWidth = l || h / f, a.spriteHeight = c || u / p, this.sheetAnimations.set(n, {
10672
10694
  frames: [],
10673
10695
  name: n,
10674
10696
  animations: e[n].animations,
@@ -10705,13 +10727,13 @@ class Fl extends Dn {
10705
10727
  const r = structuredClone(e);
10706
10728
  let a = n.animations;
10707
10729
  a = ui(a) ? a(...r) : a, n.frames = [], n.params = r, this.sheetCurrentAnimation = n, this.sheetCurrentName = t, this.sheetTime = 0, this.sheetFrameIndex = 0, this.sheetFinished = !1;
10708
- const l = n.data, c = l.spriteWidth, f = l.spriteHeight, d = l.offset?.x ?? 0, o = l.offset?.y ?? 0;
10730
+ const l = n.data, c = l.spriteWidth, f = l.spriteHeight, p = l.offset?.x ?? 0, o = l.offset?.y ?? 0;
10709
10731
  for (const h of a)
10710
10732
  for (const u of h) {
10711
- const p = u.frameX ?? 0, m = u.frameY ?? 0;
10733
+ const d = u.frameX ?? 0, m = u.frameY ?? 0;
10712
10734
  n.frames.push({
10713
10735
  ...u,
10714
- x: p * c + d,
10736
+ x: d * c + p,
10715
10737
  y: m * f + o,
10716
10738
  width: c,
10717
10739
  height: f
@@ -10746,7 +10768,7 @@ class Fl extends Dn {
10746
10768
  const n = t[i];
10747
10769
  n && !e?.[i] && (e || (e = {}), e[i] = n);
10748
10770
  }
10749
- return e ? { ...t, attrs: e } : t;
10771
+ return t.class !== void 0 && (e || (e = {}), e.class ? e.class = [t.class, e.class] : e.class = t.class), t.style !== void 0 && (e || (e = {}), typeof e.style == "object" && e.style !== null && typeof t.style == "object" && t.style !== null ? e.style = { ...e.style, ...t.style } : e.style === void 0 ? e.style = t.style : typeof e.style == "string" && typeof t.style == "string" ? e.style = `${e.style}; ${t.style}` : e.style = t.style), e ? { ...t, attrs: e } : t;
10750
10772
  }
10751
10773
  applyProps(t) {
10752
10774
  if (t.image !== void 0 && (this.image = _(t.image) ? t.image() : t.image), t.rectangle !== void 0 && (this.rectangle = this.resolveRectangle(t.rectangle)), t.frames !== void 0) {
@@ -10777,6 +10799,119 @@ class Fl extends Dn {
10777
10799
  const e = _(t.loop) ? t.loop() : t.loop;
10778
10800
  e !== void 0 && (this.loop = e);
10779
10801
  }
10802
+ if (t.objectFit !== void 0) {
10803
+ const e = this.resolveValue(t.objectFit);
10804
+ this.fitMode = e ?? void 0;
10805
+ }
10806
+ }
10807
+ resolveValue(t) {
10808
+ if (t === void 0) return;
10809
+ const e = _(t) ? t() : t;
10810
+ return e && typeof e == "object" && "value" in e ? e.value : e;
10811
+ }
10812
+ resolvePoint(t) {
10813
+ const e = this.resolveValue(t);
10814
+ if (e != null) {
10815
+ if (typeof e == "number")
10816
+ return { x: e, y: e };
10817
+ if (Array.isArray(e)) {
10818
+ const [i, n] = e;
10819
+ return { x: i ?? 0, y: n ?? i ?? 0 };
10820
+ }
10821
+ if (typeof e == "object")
10822
+ return { x: e.x ?? 0, y: e.y ?? 0 };
10823
+ }
10824
+ }
10825
+ resolveSize(t) {
10826
+ const e = this.resolveValue(t);
10827
+ if (e != null) {
10828
+ if (typeof e == "number") return `${e}px`;
10829
+ if (typeof e == "string") return e;
10830
+ }
10831
+ }
10832
+ resolvePixelSize(t) {
10833
+ if (t) {
10834
+ if (t.endsWith("px")) {
10835
+ const e = parseFloat(t);
10836
+ return Number.isNaN(e) ? void 0 : e;
10837
+ }
10838
+ if (/^\d+(\.\d+)?$/.test(t)) {
10839
+ const e = parseFloat(t);
10840
+ return Number.isNaN(e) ? void 0 : e;
10841
+ }
10842
+ }
10843
+ }
10844
+ toCssColor(t) {
10845
+ return `#${Math.max(0, Math.min(16777215, t)).toString(16).padStart(6, "0")}`;
10846
+ }
10847
+ applyDisplayProps(t) {
10848
+ if (!this.element) return;
10849
+ if (t.width !== void 0 ? this.explicitWidth = this.resolveSize(t.width) : this.explicitWidth = void 0, t.height !== void 0 ? this.explicitHeight = this.resolveSize(t.height) : this.explicitHeight = void 0, this.explicitWidth !== void 0 && (this.element.style.width = this.explicitWidth), this.explicitHeight !== void 0 && (this.element.style.height = this.explicitHeight), t.alpha !== void 0) {
10850
+ const r = this.resolveValue(t.alpha);
10851
+ r !== void 0 && (this.element.style.opacity = String(r));
10852
+ }
10853
+ if (t.visible !== void 0) {
10854
+ const r = this.resolveValue(t.visible);
10855
+ this.element.style.display = r === !1 ? "none" : "";
10856
+ }
10857
+ if (t.zIndex !== void 0) {
10858
+ const r = this.resolveValue(t.zIndex);
10859
+ r !== void 0 && (this.element.style.zIndex = String(r));
10860
+ }
10861
+ if (t.cursor !== void 0) {
10862
+ const r = this.resolveValue(t.cursor);
10863
+ r !== void 0 && (this.element.style.cursor = String(r));
10864
+ }
10865
+ if (t.tint !== void 0) {
10866
+ const r = this.resolveValue(t.tint);
10867
+ typeof r == "number" && (this.element.style.filter = `drop-shadow(0 0 0 ${this.toCssColor(r)})`);
10868
+ }
10869
+ if ([
10870
+ t.x,
10871
+ t.y,
10872
+ t.scale,
10873
+ t.rotation,
10874
+ t.angle,
10875
+ t.skew,
10876
+ t.roundPixels
10877
+ ].some((r) => r !== void 0)) {
10878
+ let r = this.resolveValue(t.x) ?? 0, a = this.resolveValue(t.y) ?? 0;
10879
+ this.resolveValue(t.roundPixels) && (r = Math.round(r), a = Math.round(a));
10880
+ const c = this.resolvePoint(t.scale) ?? { x: 1, y: 1 }, f = this.resolvePoint(t.skew), p = this.resolveValue(t.angle), o = this.resolveValue(t.rotation), h = p !== void 0 ? p : o !== void 0 ? o * 180 / Math.PI : 0, u = [
10881
+ `translate3d(${r}px, ${a}px, 0)`
10882
+ ];
10883
+ if (h !== 0 && u.push(`rotate(${h}deg)`), f) {
10884
+ const d = f.x * 180 / Math.PI, m = f.y * 180 / Math.PI;
10885
+ (d !== 0 || m !== 0) && u.push(`skew(${d}deg, ${m}deg)`);
10886
+ }
10887
+ (c.x !== 1 || c.y !== 1) && u.push(`scale(${c.x}, ${c.y})`), this.element.style.transform = u.join(" ");
10888
+ }
10889
+ const i = this.resolvePoint(t.pivot), n = this.resolvePoint(t.anchor);
10890
+ i ? this.element.style.transformOrigin = `${i.x}px ${i.y}px` : n && (this.element.style.transformOrigin = `${n.x * 100}% ${n.y * 100}%`);
10891
+ }
10892
+ syncRenderElement() {
10893
+ if (this.element) {
10894
+ if (this.fitMode === "contain" && !(this.element instanceof HTMLImageElement)) {
10895
+ if (!this.isContained) {
10896
+ const t = document.createElement(this.renderElementType);
10897
+ this.element.style.position = "relative", this.element.style.overflow = "hidden", t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.transformOrigin = "0 0", this.element.appendChild(t), this.renderElement = t, this.isContained = !0;
10898
+ }
10899
+ return;
10900
+ }
10901
+ this.isContained && (this.renderElement && this.renderElement !== this.element && this.renderElement.remove(), this.renderElement = void 0, this.isContained = !1);
10902
+ }
10903
+ }
10904
+ getRenderElement() {
10905
+ return this.renderElement ?? this.element;
10906
+ }
10907
+ applyContainScale() {
10908
+ if (!this.isContained) return;
10909
+ const t = this.getRenderElement();
10910
+ if (!t || !this.element || this.frameWidth <= 0 || this.frameHeight <= 0) return;
10911
+ const e = this.resolvePixelSize(this.explicitWidth) ?? this.element.clientWidth, i = this.resolvePixelSize(this.explicitHeight) ?? this.element.clientHeight;
10912
+ if (!e || !i) return;
10913
+ const n = Math.min(e / this.frameWidth, i / this.frameHeight);
10914
+ !Number.isFinite(n) || n <= 0 || (t.style.transform = `scale(${n})`);
10780
10915
  }
10781
10916
  bindPlayingSignal(t) {
10782
10917
  const e = t.propObservables?.playing;
@@ -10809,31 +10944,33 @@ class Fl extends Dn {
10809
10944
  }
10810
10945
  render() {
10811
10946
  if (!this.element) return;
10812
- const t = this.getCurrentSheetFrame();
10813
- if (t) {
10814
- this.applyFrame(t);
10947
+ const t = this.getRenderElement(), e = this.getCurrentSheetFrame();
10948
+ if (e) {
10949
+ this.applyFrame(e);
10815
10950
  return;
10816
10951
  }
10817
- const e = this.getFrames();
10818
- if (e.length === 0) {
10819
- this.elementType === "img" && this.image ? this.element.src = this.image : this.image && (this.element.style.backgroundImage = `url("${this.image}")`);
10952
+ const i = this.getFrames();
10953
+ if (i.length === 0) {
10954
+ this.renderElementType === "img" && this.image && t ? t.src = this.image : this.image && (t.style.backgroundImage = `url("${this.image}")`);
10820
10955
  return;
10821
10956
  }
10822
- const i = this.normalizeIndex(this.frameIndex, e.length);
10823
- i !== this.frameIndex && !this.loop && (this.frameIndex = i);
10824
- const n = e[i];
10825
- this.applyFrame(n);
10957
+ const n = this.normalizeIndex(this.frameIndex, i.length);
10958
+ n !== this.frameIndex && !this.loop && (this.frameIndex = n);
10959
+ const r = i[n];
10960
+ this.applyFrame(r);
10826
10961
  }
10827
10962
  applyFrame(t) {
10828
10963
  if (!this.element) return;
10829
- this.element.style.width = `${t.width}px`, this.element.style.height = `${t.height}px`;
10830
- const e = t.x ?? 0, i = t.y ?? 0;
10831
- if (this.elementType === "img") {
10832
- const n = this.element;
10833
- this.image && (n.src = this.image), n.style.objectFit = "none", n.style.objectPosition = `-${e}px -${i}px`;
10964
+ const e = this.getRenderElement();
10965
+ if (!e) return;
10966
+ this.frameWidth = t.width, this.frameHeight = t.height, this.fitMode === "contain" ? (e.style.width = `${t.width}px`, e.style.height = `${t.height}px`) : (e.style.width = this.explicitWidth ?? `${t.width}px`, e.style.height = this.explicitHeight ?? `${t.height}px`);
10967
+ const i = t.x ?? 0, n = t.y ?? 0;
10968
+ if (this.renderElementType === "img") {
10969
+ const r = e;
10970
+ this.image && (r.src = this.image), r.style.objectFit = "none", r.style.objectPosition = `-${i}px -${n}px`, this.applyContainScale();
10834
10971
  return;
10835
10972
  }
10836
- this.image && (this.element.style.backgroundImage = `url("${this.image}")`), this.element.style.backgroundRepeat = "no-repeat", this.element.style.backgroundPosition = `-${e}px -${i}px`;
10973
+ this.image && (e.style.backgroundImage = `url("${this.image}")`), e.style.backgroundRepeat = "no-repeat", e.style.backgroundPosition = `-${i}px -${n}px`, this.applyContainScale();
10837
10974
  }
10838
10975
  updateAnimationLoop() {
10839
10976
  const t = this.sheetCurrentAnimation?.frames ?? [];
@@ -10898,13 +11035,13 @@ class Fl extends Dn {
10898
11035
  }
10899
11036
  }
10900
11037
  W("DOMSprite", Fl);
10901
- const ph = (s) => N("DOMSprite", s);
11038
+ const dh = (s) => N("DOMSprite", s);
10902
11039
  var Hl = /* @__PURE__ */ ((s) => (s.Normal = "normal", s.Hover = "hover", s.Pressed = "pressed", s.Disabled = "disabled", s))(Hl || {});
10903
- function dh(s) {
11040
+ function ph(s) {
10904
11041
  const t = P(
10905
11042
  "normal"
10906
11043
  /* Normal */
10907
- ), e = P(!1), i = P(!1), n = _n(s), { text: r, disabled: a, width: l, height: c, style: f, shape: d, controlName: o } = n({
11044
+ ), e = P(!1), i = P(!1), n = _n(s), { text: r, disabled: a, width: l, height: c, style: f, shape: p, controlName: o } = n({
10908
11045
  text: {
10909
11046
  type: String,
10910
11047
  default: ""
@@ -10978,10 +11115,10 @@ function dh(s) {
10978
11115
  y && v && y.applyControl && await y.applyControl(v);
10979
11116
  }
10980
11117
  }
10981
- }, p = () => {
11118
+ }, d = () => {
10982
11119
  if (s.background)
10983
11120
  return s.background;
10984
- const g = d(), y = K(() => {
11121
+ const g = p(), y = q(() => {
10985
11122
  const b = f().backgroundColor || {
10986
11123
  normal: "#007bff",
10987
11124
  hover: "#0056b3",
@@ -10991,11 +11128,11 @@ function dh(s) {
10991
11128
  return b[w] || b.normal;
10992
11129
  });
10993
11130
  if (g === "circle") {
10994
- const v = K(() => Math.min(l(), c()) / 2);
11131
+ const v = q(() => Math.min(l(), c()) / 2);
10995
11132
  return U(Sn, {
10996
11133
  radius: v,
10997
- x: K(() => l() / 2),
10998
- y: K(() => c() / 2),
11134
+ x: q(() => l() / 2),
11135
+ y: q(() => c() / 2),
10999
11136
  color: y
11000
11137
  });
11001
11138
  } else return g === "ellipse" ? U(Ha, {
@@ -11008,12 +11145,12 @@ function dh(s) {
11008
11145
  color: y
11009
11146
  });
11010
11147
  }, m = () => s.children && s.children.length > 0 ? s.children : [
11011
- U($a, {
11148
+ U(Ka, {
11012
11149
  text: r,
11013
- x: K(() => l() / 2),
11014
- y: K(() => c() / 2),
11150
+ x: q(() => l() / 2),
11151
+ y: q(() => c() / 2),
11015
11152
  anchor: { x: 0.5, y: 0.5 },
11016
- style: K(() => {
11153
+ style: q(() => {
11017
11154
  const y = f().text || {};
11018
11155
  return {
11019
11156
  fontSize: y.fontSize || 16,
@@ -11034,7 +11171,7 @@ function dh(s) {
11034
11171
  tabindex: s.tabindex,
11035
11172
  ...u
11036
11173
  }, [
11037
- p(),
11174
+ d(),
11038
11175
  ...m()
11039
11176
  ]);
11040
11177
  }
@@ -11051,7 +11188,7 @@ function mh(s = {}) {
11051
11188
  let i = 70, n = 10;
11052
11189
  const r = 0.5;
11053
11190
  let a = !1, l = null, c = 0;
11054
- const f = P(0), d = P(0), o = P(r);
11191
+ const f = P(0), p = P(0), o = P(r);
11055
11192
  function h(w) {
11056
11193
  const x = w.x - 0, S = w.y - 0;
11057
11194
  return Math.min(1, Math.sqrt(x * x + S * S) / i);
@@ -11060,7 +11197,7 @@ function mh(s = {}) {
11060
11197
  let x = Math.atan2(w.y, w.x);
11061
11198
  return x >= -Math.PI / 8 && x < 0 || x >= 0 && x < Math.PI / 8 ? "right" : x >= Math.PI / 8 && x < 3 * Math.PI / 8 ? "bottom_right" : x >= 3 * Math.PI / 8 && x < 5 * Math.PI / 8 ? "bottom" : x >= 5 * Math.PI / 8 && x < 7 * Math.PI / 8 ? "bottom_left" : x >= 7 * Math.PI / 8 && x < Math.PI || x >= -Math.PI && x < -7 * Math.PI / 8 ? "left" : x >= -7 * Math.PI / 8 && x < -5 * Math.PI / 8 ? "top_left" : x >= -5 * Math.PI / 8 && x < -3 * Math.PI / 8 ? "top" : "top_right";
11062
11199
  }
11063
- function p(w) {
11200
+ function d(w) {
11064
11201
  const x = w.currentTarget || w.target;
11065
11202
  l = w.getLocalPosition(x), a = !0, o.set(1), t.onStart?.();
11066
11203
  const S = e();
@@ -11068,7 +11205,7 @@ function mh(s = {}) {
11068
11205
  }
11069
11206
  function m() {
11070
11207
  if (!a) return;
11071
- f.set(0), d.set(0), a = !1, o.set(r), t.onEnd?.();
11208
+ f.set(0), p.set(0), a = !1, o.set(r), t.onEnd?.();
11072
11209
  const w = e();
11073
11210
  w && (w.handleJoystickEnd ? w.handleJoystickEnd() : w.joystick && w.joystick.handleJoystickEnd && w.joystick.handleJoystickEnd());
11074
11211
  }
@@ -11084,11 +11221,11 @@ function mh(s = {}) {
11084
11221
  M > 0 ? (A.set(0, M > i ? i : M), L = 270, j = "bottom") : (A.set(
11085
11222
  0,
11086
11223
  -(Math.abs(M) > i ? i : Math.abs(M))
11087
- ), L = 90, j = "top"), f.set(A.x), d.set(A.y), c = h(A);
11224
+ ), L = 90, j = "top"), f.set(A.x), p.set(A.y), c = h(A);
11088
11225
  const gt = { angle: L, direction: j, power: c };
11089
11226
  t.onChange?.(gt);
11090
- const z = e();
11091
- z && (z.handleJoystickChange ? z.handleJoystickChange(gt) : z.joystick && z.joystick.handleJoystickChange && z.joystick.handleJoystickChange(gt));
11227
+ const V = e();
11228
+ V && (V.handleJoystickChange ? V.handleJoystickChange(gt) : V.joystick && V.joystick.handleJoystickChange && V.joystick.handleJoystickChange(gt));
11092
11229
  return;
11093
11230
  }
11094
11231
  if (M == 0) {
@@ -11098,17 +11235,17 @@ function mh(s = {}) {
11098
11235
  ), L = 0, j = "right") : (A.set(
11099
11236
  -(Math.abs(C) > i ? i : Math.abs(C)),
11100
11237
  0
11101
- ), L = 180, j = "left"), f.set(A.x), d.set(A.y), c = h(A);
11238
+ ), L = 180, j = "left"), f.set(A.x), p.set(A.y), c = h(A);
11102
11239
  const gt = { angle: L, direction: j, power: c };
11103
11240
  t.onChange?.(gt);
11104
- const z = e();
11105
- z && (z.handleJoystickChange ? z.handleJoystickChange(gt) : z.joystick && z.joystick.handleJoystickChange && z.joystick.handleJoystickChange(gt));
11241
+ const V = e();
11242
+ V && (V.handleJoystickChange ? V.handleJoystickChange(gt) : V.joystick && V.joystick.handleJoystickChange && V.joystick.handleJoystickChange(gt));
11106
11243
  return;
11107
11244
  }
11108
11245
  let Nt = Math.abs(M / C), ut = Math.atan(Nt);
11109
11246
  L = ut * 180 / Math.PI;
11110
11247
  let R = 0, it = 0;
11111
- C * C + M * M >= i * i ? (R = i * Math.cos(ut), it = i * Math.sin(ut)) : (R = Math.abs(C) > i ? i : Math.abs(C), it = Math.abs(M) > i ? i : Math.abs(M)), M < 0 && (it = -Math.abs(it)), C < 0 && (R = -Math.abs(R)), C > 0 && M < 0 || (C < 0 && M < 0 ? L = 180 - L : C < 0 && M > 0 ? L = L + 180 : C > 0 && M > 0 && (L = 360 - L)), A.set(R, it), c = h(A), j = u(A), f.set(A.x), d.set(A.y);
11248
+ C * C + M * M >= i * i ? (R = i * Math.cos(ut), it = i * Math.sin(ut)) : (R = Math.abs(C) > i ? i : Math.abs(C), it = Math.abs(M) > i ? i : Math.abs(M)), M < 0 && (it = -Math.abs(it)), C < 0 && (R = -Math.abs(R)), C > 0 && M < 0 || (C < 0 && M < 0 ? L = 180 - L : C < 0 && M > 0 ? L = L + 180 : C > 0 && M > 0 && (L = 360 - L)), A.set(R, it), c = h(A), j = u(A), f.set(A.x), p.set(A.y);
11112
11249
  const Oe = { angle: L, direction: j, power: c };
11113
11250
  t.onChange?.(Oe);
11114
11251
  const Pt = e();
@@ -11128,7 +11265,7 @@ function mh(s = {}) {
11128
11265
  const b = {
11129
11266
  scale: t.innerScale,
11130
11267
  x: f,
11131
- y: d,
11268
+ y: p,
11132
11269
  alpha: o
11133
11270
  };
11134
11271
  return t.inner ? y = t.inner : y = U(Wt, {
@@ -11140,7 +11277,7 @@ function mh(s = {}) {
11140
11277
  Pe,
11141
11278
  {
11142
11279
  ...s,
11143
- pointerdown: p,
11280
+ pointerdown: d,
11144
11281
  pointerup: m,
11145
11282
  pointerupoutside: m,
11146
11283
  pointermove: g
@@ -11369,24 +11506,24 @@ const bt = class bt {
11369
11506
  if (!l) return;
11370
11507
  const c = this.getElementBounds(a);
11371
11508
  l.getVisibleBounds();
11372
- const f = n.padding || 0, d = n.center !== !1, o = n.smooth || !1, h = n.duration || 300;
11509
+ const f = n.padding || 0, p = n.center !== !1, o = n.smooth || !1, h = n.duration || 300;
11373
11510
  if (this.isElementVisible(a, l)) {
11374
- if (d) {
11375
- const u = c.x + c.width / 2, p = c.y + c.height / 2;
11376
- o ? this.animateScroll(t, l, u, p, h) : l.moveCenter(u, p);
11511
+ if (p) {
11512
+ const u = c.x + c.width / 2, d = c.y + c.height / 2;
11513
+ o ? this.animateScroll(t, l, u, d, h) : l.moveCenter(u, d);
11377
11514
  }
11378
11515
  return;
11379
11516
  }
11380
- if (d) {
11381
- const u = c.x + c.width / 2, p = c.y + c.height / 2;
11382
- o ? this.animateScroll(t, l, u, p, h) : l.moveCenter(u, p);
11517
+ if (p) {
11518
+ const u = c.x + c.width / 2, d = c.y + c.height / 2;
11519
+ o ? this.animateScroll(t, l, u, d, h) : l.moveCenter(u, d);
11383
11520
  } else {
11384
- const u = c.x - f, p = c.y - f, m = c.width + f * 2, g = c.height + f * 2;
11521
+ const u = c.x - f, d = c.y - f, m = c.width + f * 2, g = c.height + f * 2;
11385
11522
  if (o) {
11386
11523
  const y = c.x + c.width / 2, v = c.y + c.height / 2;
11387
11524
  this.animateScroll(t, l, y, v, h);
11388
11525
  } else
11389
- l.fit(u, p, m, g, f);
11526
+ l.fit(u, d, m, g, f);
11390
11527
  }
11391
11528
  }
11392
11529
  /**
@@ -11408,18 +11545,18 @@ const bt = class bt {
11408
11545
  duration: r
11409
11546
  };
11410
11547
  this.scrollAnimations.set(t, f);
11411
- const d = () => {
11548
+ const p = () => {
11412
11549
  const o = this.scrollAnimations.get(t);
11413
11550
  if (!o) return;
11414
- const h = Date.now() - o.startTime, u = Math.min(h / o.duration, 1), p = 1 - Math.pow(1 - u, 3), m = o.startX + (o.targetX - o.startX) * p, g = o.startY + (o.targetY - o.startY) * p;
11415
- e.moveCenter(m, g), u < 1 ? requestAnimationFrame(d) : this.scrollAnimations.delete(t);
11551
+ const h = Date.now() - o.startTime, u = Math.min(h / o.duration, 1), d = 1 - Math.pow(1 - u, 3), m = o.startX + (o.targetX - o.startX) * d, g = o.startY + (o.targetY - o.startY) * d;
11552
+ e.moveCenter(m, g), u < 1 ? requestAnimationFrame(p) : this.scrollAnimations.delete(t);
11416
11553
  };
11417
- requestAnimationFrame(d);
11554
+ requestAnimationFrame(p);
11418
11555
  }
11419
11556
  };
11420
11557
  bt.instance = null;
11421
11558
  let ri = bt;
11422
- const $ = ri.getInstance();
11559
+ const K = ri.getInstance();
11423
11560
  class Wl extends tt {
11424
11561
  constructor() {
11425
11562
  super(...arguments), this.element = null, this.controlsDirective = null, this.controlsSubscription = null;
@@ -11439,7 +11576,7 @@ class Wl extends tt {
11439
11576
  */
11440
11577
  onMount(t) {
11441
11578
  if (this.controlsDirective = t.directives?.controls, !this.controlsDirective) {
11442
- const i = di(t, "controls");
11579
+ const i = pi(t, "controls");
11443
11580
  i && (t.directives || (t.directives = {}), t.directives.controls = i, this.controlsDirective = i);
11444
11581
  }
11445
11582
  const e = t.props.controls;
@@ -11487,7 +11624,7 @@ class jl {
11487
11624
  const e = P(null), i = P(null);
11488
11625
  this.currentIndexSignal = e, this.focusedElementSignal = i;
11489
11626
  const n = t.viewport || t.context?.viewport;
11490
- $.registerContainer(this.containerId, {
11627
+ K.registerContainer(this.containerId, {
11491
11628
  focusables: /* @__PURE__ */ new Map(),
11492
11629
  currentIndex: e,
11493
11630
  focusedElement: i,
@@ -11502,8 +11639,8 @@ class jl {
11502
11639
  * @param element - The element being mounted
11503
11640
  */
11504
11641
  async onMount(t) {
11505
- if ($.updateContainer(this.containerId, { element: t }), t.props.controls) {
11506
- const e = di(t, "focusNavigation");
11642
+ if (K.updateContainer(this.containerId, { element: t }), t.props.controls) {
11643
+ const e = pi(t, "focusNavigation");
11507
11644
  e && !t.directives && (t.directives = {}), e && (t.directives.focusNavigation = e, e.onInit(t), e.onMount(t));
11508
11645
  }
11509
11646
  if (t.allElements) {
@@ -11512,7 +11649,7 @@ class jl {
11512
11649
  });
11513
11650
  t.effectSubscriptions || (t.effectSubscriptions = []), t.effectSubscriptions.push(e);
11514
11651
  }
11515
- $.setTabindex(this.containerId, t.propObservables?.tabindex), setTimeout(() => {
11652
+ K.setTabindex(this.containerId, t.propObservables?.tabindex), setTimeout(() => {
11516
11653
  this.registerChildren(t);
11517
11654
  }, 0);
11518
11655
  }
@@ -11523,7 +11660,7 @@ class jl {
11523
11660
  */
11524
11661
  onUpdate(t) {
11525
11662
  const e = t.viewport || t.context?.viewport;
11526
- $.updateContainer(this.containerId, {
11663
+ K.updateContainer(this.containerId, {
11527
11664
  viewport: e,
11528
11665
  autoScroll: t.autoScroll,
11529
11666
  onFocusChange: t.onFocusChange
@@ -11537,8 +11674,8 @@ class jl {
11537
11674
  */
11538
11675
  async onDestroy(t, e) {
11539
11676
  for (const i of this.registeredFocusables)
11540
- $.unregisterFocusable(this.containerId, i);
11541
- this.registeredFocusables.clear(), $.unregisterContainer(this.containerId), e && e();
11677
+ K.unregisterFocusable(this.containerId, i);
11678
+ this.registeredFocusables.clear(), K.unregisterContainer(this.containerId), e && e();
11542
11679
  }
11543
11680
  /**
11544
11681
  * Register focusable children from element
@@ -11576,7 +11713,7 @@ class jl {
11576
11713
  const a = n.props.tabindex;
11577
11714
  r = _(a) ? a() : a;
11578
11715
  }
11579
- if (r !== void 0 && r >= 0 && (this.registeredFocusables.has(r) || ($.registerFocusable(this.containerId, n, r), this.registeredFocusables.add(r))), n.props && n.props.children)
11716
+ if (r !== void 0 && r >= 0 && (this.registeredFocusables.has(r) || (K.registerFocusable(this.containerId, n, r), this.registeredFocusables.add(r))), n.props && n.props.children)
11580
11717
  if (Array.isArray(n.props.children))
11581
11718
  e(n.props.children);
11582
11719
  else if (_(n.props.children) || n.props.children && typeof n.props.children.subscribe == "function") {
@@ -11632,10 +11769,10 @@ class jl {
11632
11769
  W("Navigation", jl);
11633
11770
  const Rl = (s) => N("Navigation", s), yh = Rl, gh = async (s, t, e) => {
11634
11771
  const { components: i, autoRegister: n, enableLayout: r, ...a } = e ?? {};
11635
- r !== !1 && await import("./index-DaGekQUW.js"), i ? (n !== !1 && us(), Object.entries(i).forEach(([d, o]) => {
11636
- W(d, o);
11772
+ r !== !1 && await import("./index-DaGekQUW.js"), i ? (n !== !1 && us(), Object.entries(i).forEach(([p, o]) => {
11773
+ W(p, o);
11637
11774
  })) : us();
11638
- const l = new zn();
11775
+ const l = new Vn();
11639
11776
  await l.init({
11640
11777
  resizeTo: s,
11641
11778
  autoStart: !1,
@@ -11655,13 +11792,13 @@ const Rl = (s) => N("Navigation", s), yh = Rl, gh = async (s, t, e) => {
11655
11792
  };
11656
11793
  };
11657
11794
  function vh(s) {
11658
- return $.getCurrentIndexSignal(s);
11795
+ return K.getCurrentIndexSignal(s);
11659
11796
  }
11660
11797
  function bh(s) {
11661
- return $.getFocusedElementSignal(s);
11798
+ return K.getFocusedElementSignal(s);
11662
11799
  }
11663
11800
  function wh(s, t) {
11664
- const e = $.getCurrentIndexSignal(s), i = $.getFocusedElementSignal(s);
11801
+ const e = K.getCurrentIndexSignal(s), i = K.getFocusedElementSignal(s);
11665
11802
  if (!e || !i)
11666
11803
  return console.warn(`FocusContainer with id "${s}" not found`), () => {
11667
11804
  };
@@ -11676,17 +11813,17 @@ function wh(s, t) {
11676
11813
  const xh = {
11677
11814
  linear: jo,
11678
11815
  easeIn: wi,
11679
- easeInOut: pn,
11816
+ easeInOut: dn,
11680
11817
  easeOut: Ro,
11681
- circIn: dn,
11818
+ circIn: pn,
11682
11819
  circInOut: Bo,
11683
11820
  circOut: mn,
11684
11821
  backIn: xi,
11685
- backInOut: Vo,
11822
+ backInOut: zo,
11686
11823
  backOut: No,
11687
- anticipate: zo,
11824
+ anticipate: Vo,
11688
11825
  bounceIn: Yo,
11689
- bounceInOut: qo,
11826
+ bounceInOut: $o,
11690
11827
  bounceOut: ye
11691
11828
  };
11692
11829
  class _h {
@@ -11736,8 +11873,8 @@ class _h {
11736
11873
  addressModeV: "clamp-to-edge"
11737
11874
  })
11738
11875
  });
11739
- const d = new Xn(), o = Math.sqrt((n - e) * (n - e) + (r - i) * (r - i)), h = Math.sqrt((a - e) * (a - e) + (l - i) * (l - i)), u = Math.atan2(r - i, n - e), p = o / f, m = h / f;
11740
- d.rotate(-u), d.scale(p, m), t && d.translate(t.x, t.y), this.transform = d;
11876
+ const p = new Xn(), o = Math.sqrt((n - e) * (n - e) + (r - i) * (r - i)), h = Math.sqrt((a - e) * (a - e) + (l - i) * (l - i)), u = Math.atan2(r - i, n - e), d = o / f, m = h / f;
11877
+ p.rotate(-u), p.scale(d, m), t && p.translate(t.x, t.y), this.transform = p;
11741
11878
  }
11742
11879
  return {
11743
11880
  texture: this.texture,
@@ -11780,16 +11917,16 @@ function Sh(s, t, e = "wrap") {
11780
11917
  const Ah = Bt.Howler;
11781
11918
  export {
11782
11919
  ae as ArraySubject,
11783
- dh as Button,
11920
+ ph as Button,
11784
11921
  Hl as ButtonState,
11785
11922
  eh as Canvas,
11786
11923
  Sn as Circle,
11787
11924
  Pe as Container,
11788
- pi as ControlsBase,
11925
+ di as ControlsBase,
11789
11926
  va as ControlsDirective,
11790
11927
  fh as DOMContainer,
11791
11928
  Dl as DOMElement,
11792
- ph as DOMSprite,
11929
+ dh as DOMSprite,
11793
11930
  at as DisplayObject,
11794
11931
  Ta as Drag,
11795
11932
  Pa as Drop,
@@ -11801,9 +11938,9 @@ export {
11801
11938
  ri as FocusManager,
11802
11939
  to as GamepadControls,
11803
11940
  Wt as Graphics,
11804
- $l as Howl,
11941
+ Kl as Howl,
11805
11942
  Ah as Howler,
11806
- Vr as Input,
11943
+ zr as Input,
11807
11944
  mh as Joystick,
11808
11945
  eo as JoystickControls,
11809
11946
  Ur as KeyboardControls,
@@ -11820,7 +11957,7 @@ export {
11820
11957
  Aa as Sound,
11821
11958
  On as Sprite,
11822
11959
  sh as Svg,
11823
- $a as Text,
11960
+ Ka as Text,
11824
11961
  hh as TilingSprite,
11825
11962
  Ma as Transition,
11826
11963
  ih as Triangle,
@@ -11832,13 +11969,13 @@ export {
11832
11969
  xn as animatedSignal,
11833
11970
  gh as bootstrapCanvas,
11834
11971
  ge as checkDependencies,
11835
- K as computed,
11836
- Kl as cond,
11972
+ q as computed,
11973
+ ql as cond,
11837
11974
  N as createComponent,
11838
11975
  Sh as createTabindexNavigator,
11839
- ds as currentSubscriptionsTracker,
11976
+ ps as currentSubscriptionsTracker,
11840
11977
  H as effect,
11841
- $ as focusManager,
11978
+ K as focusManager,
11842
11979
  U as h,
11843
11980
  Zt as isAnimatedSignal,
11844
11981
  Gl as isArraySubject,
@@ -11846,12 +11983,12 @@ export {
11846
11983
  G as isElement,
11847
11984
  ot as isElementFrozen,
11848
11985
  Xl as isObjectSubject,
11849
- zl as isObservable,
11986
+ Vl as isObservable,
11850
11987
  hs as isPrimitive,
11851
11988
  _ as isSignal,
11852
11989
  ke as isTrigger,
11853
11990
  no as linkedSignal,
11854
- ql as loop,
11991
+ $l as loop,
11855
11992
  An as mount,
11856
11993
  si as mountTracker,
11857
11994
  _i as on,