@canvasengine/presets 2.0.0-beta.25 → 2.0.0-beta.26

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,6 +1,6 @@
1
- import { useProps as $t, h as et, Graphics as Lt, tick as Qe, mount as Ze, on as mi, Container as Nt, animatedSignal as _i, signal as rt, effect as Je, RadialGradient as gi, isObservable as yi, isSignal as ae, Sprite as Pe, DisplayObject as Ei, registerComponent as xi, createComponent as wi, loop as vi, TilingSprite as bi, Mesh as Ii } from "canvasengine";
1
+ import { useProps as $t, h as rt, Graphics as Lt, tick as ze, mount as Qe, on as pi, Container as Nt, animatedSignal as mi, signal as it, effect as Ze, RadialGradient as _i, isObservable as gi, isSignal as ae, Sprite as yi, DisplayObject as Ei, registerComponent as xi, createComponent as wi, loop as vi, TilingSprite as bi, Mesh as Ii } from "canvasengine";
2
2
  import * as ct from "pixi.js";
3
- import { Geometry as ti, Buffer as Ie, BufferUsage as kt, ExtensionType as Jt, NOOP as Ti, UniformGroup as ee, Matrix as Ai, Texture as ie, BindGroup as ei, Shader as Te, GlProgram as ii, GpuProgram as Si, ViewContainer as Ci, State as Mi, Bounds as Bi, TextureSource as Fi, groupD8 as tt, Container as Ni, extensions as Ae, AnimatedSprite as Pi, Assets as Oi, Rectangle as Di } from "pixi.js";
3
+ import { Geometry as Je, Buffer as Ie, BufferUsage as kt, ExtensionType as Jt, NOOP as Ti, UniformGroup as ee, Matrix as Ai, Texture as ie, BindGroup as ti, Shader as Te, GlProgram as ei, GpuProgram as Ci, ViewContainer as Si, State as Mi, Bounds as Bi, TextureSource as Fi, groupD8 as tt, Container as Ni, extensions as Ae, AnimatedSprite as Pi, Assets as Oi, Rectangle as Di } from "pixi.js";
4
4
  function oe(u) {
5
5
  var t = u.toString(16);
6
6
  return t.length == 1 ? "0" + t : t;
@@ -25,7 +25,7 @@ function Lr(u) {
25
25
  innerMargin: 0,
26
26
  borderRadius: 0
27
27
  });
28
- return et(
28
+ return rt(
29
29
  Lt,
30
30
  {
31
31
  ...u,
@@ -35,18 +35,18 @@ function Lr(u) {
35
35
  T() ? E.roundRect(0, 0, t(), e(), T()) : E.rect(0, 0, t(), e()), o && E.stroke(o), E.fill(c());
36
36
  }
37
37
  },
38
- et(Lt, {
38
+ rt(Lt, {
39
39
  width: t,
40
40
  height: e,
41
41
  draw(E) {
42
- const S = g(), A = T(), B = Math.max(
42
+ const C = g(), A = T(), B = Math.max(
43
43
  0,
44
44
  Math.min(
45
- t() - 2 * S,
46
- i() / s() * (t() - 2 * S)
45
+ t() - 2 * C,
46
+ i() / s() * (t() - 2 * C)
47
47
  )
48
- ), F = e() - 2 * S;
49
- T ? E.roundRect(S, S, B, F, A) : E.rect(S, S, B, F);
48
+ ), F = e() - 2 * C;
49
+ T ? E.roundRect(C, C, B, F, A) : E.rect(C, C, B, F);
50
50
  const P = a();
51
51
  if (P.startsWith("rgba")) {
52
52
  const [O, _, v, m] = P.match(/\d+(\.\d+)?/g).map(Number);
@@ -103,7 +103,7 @@ class Dt {
103
103
  dispose() {
104
104
  }
105
105
  }
106
- class ri extends Dt {
106
+ class ii extends Dt {
107
107
  constructor(t) {
108
108
  super(), this.componentId = t, this.exhausted = !1, this.completed = !1, this.name = "", this.endTime = 0, this._x = 0, this._y = 0, this._rotation = 0, this._alpha = 0, this._scale = new ct.Point(), this._time = 0, this._active = !1, this.__recycled = !0;
109
109
  }
@@ -157,7 +157,7 @@ var Ee;
157
157
  (function(u) {
158
158
  u[u.Sprite = 0] = "Sprite", u[u.MovieClip = 1] = "MovieClip";
159
159
  })(Ee || (Ee = {}));
160
- class Se {
160
+ class Ce {
161
161
  constructor(t) {
162
162
  this.type = t, this._dx = 0, this._dy = 0, this._rotation = 0;
163
163
  }
@@ -209,7 +209,7 @@ var Vt;
209
209
  (function(u) {
210
210
  u.Circle = "circle", u.Box = "box", u.Ring = "ring";
211
211
  })(Vt || (Vt = {}));
212
- class Ui extends Se {
212
+ class Ui extends Ce {
213
213
  constructor() {
214
214
  super(Vt.Box);
215
215
  }
@@ -223,7 +223,7 @@ class Ui extends Se {
223
223
  a != 0 ? (t.component.x = this.__x + this._t * (this.x - this.__x) + o * Math.cos(a) - g * Math.sin(a), t.component.y = this.__y + this._t * (this.y - this.__y) + o * Math.sin(a) + g * Math.cos(a)) : (t.component.x = this.__x + this._t * (this.x - this.__x) + o, t.component.y = this.__y + this._t * (this.y - this.__y) + g), e.radial ? (a += Math.atan2(g, o), t.dx = Math.cos(a), t.dy = Math.sin(a)) : (t.dx = this._dx, t.dy = this._dy), t.component.rotation = a, this._t += this._posInterpolationStep;
224
224
  }
225
225
  }
226
- class Li extends Se {
226
+ class Li extends Ce {
227
227
  constructor() {
228
228
  super(Vt.Circle);
229
229
  }
@@ -241,7 +241,7 @@ class Li extends Se {
241
241
  e.radial ? (t.dx = Math.cos(s), t.dy = Math.sin(s), t.component.rotation = s) : (t.dx = this._dx, t.dy = this._dy, t.component.rotation = i.rotation), this._t += this._posInterpolationStep;
242
242
  }
243
243
  }
244
- class ki extends Se {
244
+ class ki extends Ce {
245
245
  constructor() {
246
246
  super(Vt.Ring);
247
247
  }
@@ -295,10 +295,10 @@ class Yi {
295
295
  return t ? (this.r = t(e, this.sR, this.dR, i), this.g = t(e, this.sG, this.dG, i), this.b = t(e, this.sB, this.dB, i)) : (e /= i, this.r = this.dR * e + this.sR, this.g = this.dG * e + this.sG, this.b = this.dB * e + this.sB), this.rgb = this.r << 16 | this.g << 8 | this.b, this.rgb;
296
296
  }
297
297
  }
298
- var Oe;
298
+ var Pe;
299
299
  (function(u) {
300
300
  u.Linear = "linear", u.EaseInQuad = "easeInQuad", u.EaseOutQuad = "easeOutQuad", u.EaseInOutQuad = "easeInOutQuad", u.EaseInCubic = "easeInCubic", u.EaseOutCubic = "easeOutCubic", u.EaseInOutCubic = "easeInOutCubic", u.EaseInQuart = "easeInQuart", u.EaseOutQuart = "easeOutQuart", u.EaseInOutQuart = "easeInOutQuart", u.EaseInQuint = "easeInQuint", u.EaseOutQuint = "easeOutQuint", u.EaseInOutQuint = "easeInOutQuint", u.EaseInSine = "easeInSine", u.EaseOutSine = "easeOutSine", u.EaseInOutSine = "easeInOutSine", u.EaseInExpo = "easeInExpo", u.EaseOutExpo = "easeOutExpo", u.EaseInOutExpo = "easeInOutExpo", u.EaseInCirc = "easeInCirc", u.EaseOutCirc = "easeOutCirc", u.EaseInOutCirc = "easeInOutCirc", u.EaseInElastic = "easeInElastic", u.EaseOutElastic = "easeOutElastic", u.EaseInOutElastic = "easeInOutElastic", u.EaseInBack = "easeInBack", u.EaseOutBack = "easeOutBack", u.EaseInOutBack = "easeInOutBack", u.EaseInBounce = "easeInBounce", u.EaseOutBounce = "easeOutBounce", u.EaseInOutBounce = "easeInOutBounce";
301
- })(Oe || (Oe = {}));
301
+ })(Pe || (Pe = {}));
302
302
  class dt {
303
303
  static linear(t, e, i, s) {
304
304
  return i * t / s + e;
@@ -404,10 +404,10 @@ class ot {
404
404
  this.__hasCallback = !1, this._list = new re();
405
405
  }
406
406
  add(t, e, i) {
407
- this._list.add(new Dt(new De(t, e, !1, i))), this.__hasCallback = !0;
407
+ this._list.add(new Dt(new Oe(t, e, !1, i))), this.__hasCallback = !0;
408
408
  }
409
409
  addOnce(t, e) {
410
- this._list.add(new Dt(new De(t, e, !0))), this.__hasCallback = !0;
410
+ this._list.add(new Dt(new Oe(t, e, !0))), this.__hasCallback = !0;
411
411
  }
412
412
  dispatch(...t) {
413
413
  const e = this._list;
@@ -436,7 +436,7 @@ class ot {
436
436
  this._list.clear(), this.__hasCallback = !1;
437
437
  }
438
438
  }
439
- class De {
439
+ class Oe {
440
440
  constructor(t, e, i, s) {
441
441
  this.callback = t, this.scope = e, this.once = i, this.callRate = s, this.calls = 0;
442
442
  }
@@ -748,15 +748,15 @@ var qi = function(u, t, e, i) {
748
748
  function o(E) {
749
749
  try {
750
750
  T(i.next(E));
751
- } catch (S) {
752
- a(S);
751
+ } catch (C) {
752
+ a(C);
753
753
  }
754
754
  }
755
755
  function g(E) {
756
756
  try {
757
757
  T(i.throw(E));
758
- } catch (S) {
759
- a(S);
758
+ } catch (C) {
759
+ a(C);
760
760
  }
761
761
  }
762
762
  function T(E) {
@@ -993,7 +993,7 @@ class ut {
993
993
  let s, c = this._settingsCache.effectSequences[t];
994
994
  if (!c)
995
995
  throw new Error(`Settings not defined for '${t}'`);
996
- return i.length == 0 ? (s = new Re(t), s.__fx = this) : s = i.pop(), e && (c = Pt(c), c.__isClone = !0), s.__applySettings(c), s;
996
+ return i.length == 0 ? (s = new De(t), s.__fx = this) : s = i.pop(), e && (c = Pt(c), c.__isClone = !0), s.__applySettings(c), s;
997
997
  }
998
998
  /**
999
999
  * Retrieves a particle emitter by its name.
@@ -1039,7 +1039,7 @@ class ut {
1039
1039
  createEffectSequenceEmitterFrom(t) {
1040
1040
  const e = this._cache.effectSequences;
1041
1041
  let i;
1042
- return e.length == 0 ? (i = new Re(t.id), i.__fx = this) : i = e.pop(), i.__applySettings(t), i;
1042
+ return e.length == 0 ? (i = new De(t.id), i.__fx = this) : i = e.pop(), i.__applySettings(t), i;
1043
1043
  }
1044
1044
  /**
1045
1045
  * Stops the specified particle emitter.
@@ -1207,7 +1207,7 @@ var Rt;
1207
1207
  (function(u) {
1208
1208
  u[u.ParticleEmitter = 0] = "ParticleEmitter", u[u.EffectSequence = 1] = "EffectSequence";
1209
1209
  })(Rt || (Rt = {}));
1210
- class xe extends ri {
1210
+ class xe extends ii {
1211
1211
  constructor(t) {
1212
1212
  super(t), this.targetOffset = 0, this.autoRecycleOnComplete = !0, this._particles = new re(), this._particleCount = 0, this._childEmitters = [], this._hasChildEmitters = !1, this._paused = !1, this.__adoptRotation = !1, this.__on = {
1213
1213
  started: new ot(),
@@ -1418,7 +1418,7 @@ class xe extends ri {
1418
1418
  this.core = this.__fx.__getEmitterCore(t, this), this.core.init(this), this.core.__scaleMod = this._scaleMod, this._xPosIntialized = this._yPosIntialized = !1;
1419
1419
  }
1420
1420
  }
1421
- class Re extends ri {
1421
+ class De extends ii {
1422
1422
  constructor(t) {
1423
1423
  super(t), this._list = [], this._elements = new re(), this.__on = {
1424
1424
  started: new ot(),
@@ -1542,14 +1542,14 @@ function Xr(u) {
1542
1542
  return ct.Assets.add({ alias: "fx_settings", src: "/default-bundle.json" }), ct.Assets.add({
1543
1543
  alias: "fx_spritesheet",
1544
1544
  src: "/revoltfx-spritesheet.json"
1545
- }), Qe(({ deltaRatio: a }) => {
1545
+ }), ze(({ deltaRatio: a }) => {
1546
1546
  s.update(a);
1547
- }), Ze(async (a) => {
1547
+ }), Qe(async (a) => {
1548
1548
  c = a;
1549
1549
  let g = { ...(await ct.Assets.load(["fx_settings", "fx_spritesheet"])).fx_settings };
1550
1550
  if (e.emitters) {
1551
- const E = e.emitters.map((S, A) => ({
1552
- ...S,
1551
+ const E = e.emitters.map((C, A) => ({
1552
+ ...C,
1553
1553
  id: 1e4 + A
1554
1554
  }));
1555
1555
  g.emitters = [
@@ -1558,22 +1558,22 @@ function Xr(u) {
1558
1558
  ];
1559
1559
  }
1560
1560
  s.initBundle(g, !0);
1561
- }), mi(t, () => {
1561
+ }), pi(t, () => {
1562
1562
  s.getParticleEmitter(i()).init(c.componentInstance);
1563
- }), et(Nt);
1563
+ }), rt(Nt);
1564
1564
  }
1565
1565
  function Yr(u) {
1566
- const { radius: t } = $t(u), e = _i(1), i = 1, s = 2, c = 1e-3, a = () => {
1566
+ const { radius: t } = $t(u), e = mi(1), i = 1, s = 2, c = 1e-3, a = () => {
1567
1567
  const g = Date.now() * c, T = (Math.sin(g) + Math.sin(g * 1.3) + Math.sin(g * 0.7)) / 3, E = i + (s - i) * (T * 0.5 + 0.5);
1568
1568
  e.update(() => E), requestAnimationFrame(a);
1569
1569
  };
1570
- return a(), et(Lt, {
1570
+ return a(), rt(Lt, {
1571
1571
  draw: (g) => {
1572
- const T = t() * 2, E = new gi(T, T, 0, T, T, 0);
1572
+ const T = t() * 2, E = new _i(T, T, 0, T, T, 0);
1573
1573
  E.addColorStop(0, "rgba(255, 255, 0, 1)"), E.addColorStop(0.5, "rgba(255, 255, 0, 0.3)"), E.addColorStop(0.8, "rgba(255, 255, 0, 0)");
1574
- const S = T / 2;
1575
- g.rect(-S, -S, T, T).fill(
1576
- E.render({ translate: { x: S, y: S } })
1574
+ const C = T / 2;
1575
+ g.rect(-C, -C, T, T).fill(
1576
+ E.render({ translate: { x: C, y: C } })
1577
1577
  );
1578
1578
  },
1579
1579
  ...u,
@@ -1581,40 +1581,40 @@ function Yr(u) {
1581
1581
  });
1582
1582
  }
1583
1583
  function Gr(u) {
1584
- const { children: t } = u, e = rt(0), i = rt(0);
1584
+ const { children: t } = u, e = it(0), i = it(0);
1585
1585
  let s;
1586
1586
  const c = (a) => {
1587
1587
  a.rect(-80, -80, e() + 80 * 2, i() + 80 * 2), a.fill(0);
1588
1588
  const g = (T) => {
1589
- const E = ae(T.propObservables.x) ? T.propObservables.x() : T.props.x, S = ae(T.propObservables.y) ? T.propObservables.y() : T.props.y, A = ae(T.propObservables.radius) ? T.propObservables.radius() : T.props.radius;
1590
- a.circle(E, S, A), a.cut();
1589
+ const E = ae(T.propObservables.x) ? T.propObservables.x() : T.props.x, C = ae(T.propObservables.y) ? T.propObservables.y() : T.props.y, A = ae(T.propObservables.radius) ? T.propObservables.radius() : T.props.radius;
1590
+ a.circle(E, C, A), a.cut();
1591
1591
  };
1592
1592
  for (let T of t) {
1593
- if (yi(T)) {
1593
+ if (gi(T)) {
1594
1594
  s && s.unsubscribe(), s = T.subscribe((E) => {
1595
- for (let S of E.fullElements)
1596
- g(S);
1595
+ for (let C of E.fullElements)
1596
+ g(C);
1597
1597
  });
1598
1598
  return;
1599
1599
  }
1600
1600
  g(T);
1601
1601
  }
1602
1602
  };
1603
- return Ze((a) => {
1604
- Je(() => {
1603
+ return Qe((a) => {
1604
+ Ze(() => {
1605
1605
  const { displayWidth: o, displayHeight: g } = a.componentInstance, T = +o(), E = +g();
1606
1606
  setTimeout(() => {
1607
1607
  e.update(() => T), i.update(() => E);
1608
1608
  }, 0);
1609
1609
  });
1610
- }), et(
1610
+ }), rt(
1611
1611
  Nt,
1612
1612
  {
1613
1613
  width: "100%",
1614
1614
  height: "100%",
1615
1615
  ...u
1616
1616
  },
1617
- et(Lt, {
1617
+ rt(Lt, {
1618
1618
  draw: c,
1619
1619
  alpha: 0.8,
1620
1620
  blur: 80
@@ -1627,15 +1627,17 @@ function Kr(u = {}) {
1627
1627
  const t = Object.assign(
1628
1628
  {
1629
1629
  outerScale: { x: 1, y: 1 },
1630
- innerScale: { x: 1, y: 1 }
1630
+ innerScale: { x: 1, y: 1 },
1631
+ innerColor: "black",
1632
+ outerColor: "black"
1631
1633
  },
1632
1634
  u
1633
1635
  );
1634
1636
  let e = 70, i = 10;
1635
1637
  const s = 0.5;
1636
1638
  let c = !1, a = null, o = 0;
1637
- const g = rt(0), T = rt(0), E = rt(s);
1638
- function S(m) {
1639
+ const g = it(0), T = it(0), E = it(s);
1640
+ function C(m) {
1639
1641
  const f = m.x - 0, b = m.y - 0;
1640
1642
  return Math.min(1, Math.sqrt(f * f + b * b) / e);
1641
1643
  }
@@ -1663,7 +1665,7 @@ function Kr(u = {}) {
1663
1665
  N > 0 ? (D.set(0, N > e ? e : N), R = 270, y = "bottom") : (D.set(
1664
1666
  0,
1665
1667
  -(Math.abs(N) > e ? e : Math.abs(N))
1666
- ), R = 90, y = "top"), g.set(D.x), T.set(D.y), o = S(D), (ft = t.onChange) == null || ft.call(t, { angle: R, direction: y, power: o });
1668
+ ), R = 90, y = "top"), g.set(D.x), T.set(D.y), o = C(D), (ft = t.onChange) == null || ft.call(t, { angle: R, direction: y, power: o });
1667
1669
  return;
1668
1670
  }
1669
1671
  if (N == 0) {
@@ -1673,22 +1675,22 @@ function Kr(u = {}) {
1673
1675
  ), R = 0, y = "left") : (D.set(
1674
1676
  -(Math.abs(b) > e ? e : Math.abs(b)),
1675
1677
  0
1676
- ), R = 180, y = "right"), g.set(D.x), T.set(D.y), o = S(D), (at = t.onChange) == null || at.call(t, { angle: R, direction: y, power: o });
1678
+ ), R = 180, y = "right"), g.set(D.x), T.set(D.y), o = C(D), (at = t.onChange) == null || at.call(t, { angle: R, direction: y, power: o });
1677
1679
  return;
1678
1680
  }
1679
1681
  let k = Math.abs(N / b), st = Math.atan(k);
1680
1682
  R = st * 180 / Math.PI;
1681
- let X = 0, it = 0;
1682
- b * b + N * N >= e * e ? (X = e * Math.cos(st), it = e * Math.sin(st)) : (X = Math.abs(b) > e ? e : Math.abs(b), it = Math.abs(N) > e ? e : Math.abs(N)), N < 0 && (it = -Math.abs(it)), b < 0 && (X = -Math.abs(X)), b > 0 && N < 0 || (b < 0 && N < 0 ? R = 180 - R : b < 0 && N > 0 ? R = R + 180 : b > 0 && N > 0 && (R = 360 - R)), D.set(X, it), o = S(D), y = A(D), g.set(D.x), T.set(D.y), (pt = t.onChange) == null || pt.call(t, { angle: R, direction: y, power: o });
1683
+ let X = 0, et = 0;
1684
+ b * b + N * N >= e * e ? (X = e * Math.cos(st), et = e * Math.sin(st)) : (X = Math.abs(b) > e ? e : Math.abs(b), et = Math.abs(N) > e ? e : Math.abs(N)), N < 0 && (et = -Math.abs(et)), b < 0 && (X = -Math.abs(X)), b > 0 && N < 0 || (b < 0 && N < 0 ? R = 180 - R : b < 0 && N > 0 ? R = R + 180 : b > 0 && N > 0 && (R = 360 - R)), D.set(X, et), o = C(D), y = A(D), g.set(D.x), T.set(D.y), (pt = t.onChange) == null || pt.call(t, { angle: R, direction: y, power: o });
1683
1685
  }
1684
1686
  let O, _;
1685
- t.outer ? _ = et(Pe, {
1687
+ t.outer ? _ = rt(yi, {
1686
1688
  image: t.outer,
1687
1689
  anchor: { x: 0.5, y: 0.5 },
1688
1690
  scale: t.outerScale
1689
- }) : _ = et(Lt, {
1691
+ }) : _ = rt(Lt, {
1690
1692
  draw: (m) => {
1691
- m.circle(0, 0, e).fill(0);
1693
+ m.circle(0, 0, e).fill(t.outerColor);
1692
1694
  },
1693
1695
  alpha: 0.5
1694
1696
  });
@@ -1698,16 +1700,12 @@ function Kr(u = {}) {
1698
1700
  y: T,
1699
1701
  alpha: E
1700
1702
  };
1701
- return t.inner ? O = et(Pe, {
1702
- image: t.inner,
1703
- anchor: { x: 0.5, y: 0.5 },
1704
- ...v
1705
- }) : O = et(Lt, {
1703
+ return t.inner ? O = t.inner : O = rt(Lt, {
1706
1704
  draw: (m) => {
1707
- m.circle(0, 0, i * 2.5).fill(0);
1705
+ m.circle(0, 0, i * 2.5).fill(t.innerColor);
1708
1706
  },
1709
1707
  ...v
1710
- }), et(
1708
+ }), rt(
1711
1709
  Nt,
1712
1710
  {
1713
1711
  ...u,
@@ -1721,7 +1719,7 @@ function Kr(u = {}) {
1721
1719
  );
1722
1720
  }
1723
1721
  var Ut = /* @__PURE__ */ ((u) => (u.Tile = "tilelayer", u.ObjectGroup = "objectgroup", u.Image = "imagelayer", u.Group = "group", u))(Ut || {});
1724
- function si(...u) {
1722
+ function ri(...u) {
1725
1723
  return u.filter((t) => t && t.length > 0).join("/").replace(/\/+/g, "/");
1726
1724
  }
1727
1725
  function ji(u) {
@@ -1748,10 +1746,10 @@ const $i = {}, Wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
1748
1746
  __proto__: null,
1749
1747
  default: $i
1750
1748
  }, Symbol.toStringTag, { value: "Module" })), Hi = /* @__PURE__ */ ji(Wi);
1751
- var ce = {}, zt = { exports: {} }, he = {}, Gt = {}, Ue;
1749
+ var ce = {}, zt = { exports: {} }, he = {}, Gt = {}, Re;
1752
1750
  function zi() {
1753
- if (Ue) return Gt;
1754
- Ue = 1, Gt.byteLength = o, Gt.toByteArray = T, Gt.fromByteArray = A;
1751
+ if (Re) return Gt;
1752
+ Re = 1, Gt.byteLength = o, Gt.toByteArray = T, Gt.fromByteArray = A;
1755
1753
  for (var u = [], t = [], e = typeof Uint8Array < "u" ? Uint8Array : Array, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0, c = i.length; s < c; ++s)
1756
1754
  u[s] = i[s], t[i.charCodeAt(s)] = s;
1757
1755
  t[45] = 62, t[95] = 63;
@@ -1780,14 +1778,14 @@ function zi() {
1780
1778
  function E(B) {
1781
1779
  return u[B >> 18 & 63] + u[B >> 12 & 63] + u[B >> 6 & 63] + u[B & 63];
1782
1780
  }
1783
- function S(B, F, P) {
1781
+ function C(B, F, P) {
1784
1782
  for (var O, _ = [], v = F; v < P; v += 3)
1785
1783
  O = (B[v] << 16 & 16711680) + (B[v + 1] << 8 & 65280) + (B[v + 2] & 255), _.push(E(O));
1786
1784
  return _.join("");
1787
1785
  }
1788
1786
  function A(B) {
1789
1787
  for (var F, P = B.length, O = P % 3, _ = [], v = 16383, m = 0, f = P - O; m < f; m += v)
1790
- _.push(S(B, m, m + v > f ? f : m + v));
1788
+ _.push(C(B, m, m + v > f ? f : m + v));
1791
1789
  return O === 1 ? (F = B[P - 1], _.push(
1792
1790
  u[F >> 2] + u[F << 4 & 63] + "=="
1793
1791
  )) : O === 2 && (F = (B[P - 2] << 8) + B[P - 1], _.push(
@@ -1798,13 +1796,13 @@ function zi() {
1798
1796
  }
1799
1797
  var Qt = {};
1800
1798
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
1801
- var Le;
1799
+ var Ue;
1802
1800
  function Qi() {
1803
- return Le || (Le = 1, Qt.read = function(u, t, e, i, s) {
1804
- var c, a, o = s * 8 - i - 1, g = (1 << o) - 1, T = g >> 1, E = -7, S = e ? s - 1 : 0, A = e ? -1 : 1, B = u[t + S];
1805
- for (S += A, c = B & (1 << -E) - 1, B >>= -E, E += o; E > 0; c = c * 256 + u[t + S], S += A, E -= 8)
1801
+ return Ue || (Ue = 1, Qt.read = function(u, t, e, i, s) {
1802
+ var c, a, o = s * 8 - i - 1, g = (1 << o) - 1, T = g >> 1, E = -7, C = e ? s - 1 : 0, A = e ? -1 : 1, B = u[t + C];
1803
+ for (C += A, c = B & (1 << -E) - 1, B >>= -E, E += o; E > 0; c = c * 256 + u[t + C], C += A, E -= 8)
1806
1804
  ;
1807
- for (a = c & (1 << -E) - 1, c >>= -E, E += i; E > 0; a = a * 256 + u[t + S], S += A, E -= 8)
1805
+ for (a = c & (1 << -E) - 1, c >>= -E, E += i; E > 0; a = a * 256 + u[t + C], C += A, E -= 8)
1808
1806
  ;
1809
1807
  if (c === 0)
1810
1808
  c = 1 - T;
@@ -1815,8 +1813,8 @@ function Qi() {
1815
1813
  }
1816
1814
  return (B ? -1 : 1) * a * Math.pow(2, c - i);
1817
1815
  }, Qt.write = function(u, t, e, i, s, c) {
1818
- var a, o, g, T = c * 8 - s - 1, E = (1 << T) - 1, S = E >> 1, A = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, B = i ? 0 : c - 1, F = i ? 1 : -1, P = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
1819
- for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, a = E) : (a = Math.floor(Math.log(t) / Math.LN2), t * (g = Math.pow(2, -a)) < 1 && (a--, g *= 2), a + S >= 1 ? t += A / g : t += A * Math.pow(2, 1 - S), t * g >= 2 && (a++, g /= 2), a + S >= E ? (o = 0, a = E) : a + S >= 1 ? (o = (t * g - 1) * Math.pow(2, s), a = a + S) : (o = t * Math.pow(2, S - 1) * Math.pow(2, s), a = 0)); s >= 8; u[e + B] = o & 255, B += F, o /= 256, s -= 8)
1816
+ var a, o, g, T = c * 8 - s - 1, E = (1 << T) - 1, C = E >> 1, A = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, B = i ? 0 : c - 1, F = i ? 1 : -1, P = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
1817
+ for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0, a = E) : (a = Math.floor(Math.log(t) / Math.LN2), t * (g = Math.pow(2, -a)) < 1 && (a--, g *= 2), a + C >= 1 ? t += A / g : t += A * Math.pow(2, 1 - C), t * g >= 2 && (a++, g /= 2), a + C >= E ? (o = 0, a = E) : a + C >= 1 ? (o = (t * g - 1) * Math.pow(2, s), a = a + C) : (o = t * Math.pow(2, C - 1) * Math.pow(2, s), a = 0)); s >= 8; u[e + B] = o & 255, B += F, o /= 256, s -= 8)
1820
1818
  ;
1821
1819
  for (a = a << s | o, T += s; T > 0; u[e + B] = a & 255, B += F, a /= 256, T -= 8)
1822
1820
  ;
@@ -1829,9 +1827,9 @@ function Qi() {
1829
1827
  * @author Feross Aboukhadijeh <https://feross.org>
1830
1828
  * @license MIT
1831
1829
  */
1832
- var ke;
1833
- function ni() {
1834
- return ke || (ke = 1, function(u) {
1830
+ var Le;
1831
+ function si() {
1832
+ return Le || (Le = 1, function(u) {
1835
1833
  const t = zi(), e = Qi(), i = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
1836
1834
  u.Buffer = o, u.SlowBuffer = v, u.INSPECT_MAX_BYTES = 50;
1837
1835
  const s = 2147483647;
@@ -1873,7 +1871,7 @@ function ni() {
1873
1871
  throw new TypeError(
1874
1872
  'The "string" argument must be of type string. Received type number'
1875
1873
  );
1876
- return S(h);
1874
+ return C(h);
1877
1875
  }
1878
1876
  return g(h, r, n);
1879
1877
  }
@@ -1919,13 +1917,13 @@ function ni() {
1919
1917
  o.alloc = function(h, r, n) {
1920
1918
  return E(h, r, n);
1921
1919
  };
1922
- function S(h) {
1920
+ function C(h) {
1923
1921
  return T(h), a(h < 0 ? 0 : _(h) | 0);
1924
1922
  }
1925
1923
  o.allocUnsafe = function(h) {
1926
- return S(h);
1924
+ return C(h);
1927
1925
  }, o.allocUnsafeSlow = function(h) {
1928
- return S(h);
1926
+ return C(h);
1929
1927
  };
1930
1928
  function A(h, r) {
1931
1929
  if ((typeof r != "string" || r === "") && (r = "utf8"), !o.isEncoding(r))
@@ -1983,7 +1981,7 @@ function ni() {
1983
1981
  );
1984
1982
  if (r === n) return 0;
1985
1983
  let p = r.length, x = n.length;
1986
- for (let I = 0, C = Math.min(p, x); I < C; ++I)
1984
+ for (let I = 0, S = Math.min(p, x); I < S; ++I)
1987
1985
  if (r[I] !== n[I]) {
1988
1986
  p = r[I], x = n[I];
1989
1987
  break;
@@ -2018,18 +2016,18 @@ function ni() {
2018
2016
  const x = o.allocUnsafe(n);
2019
2017
  let I = 0;
2020
2018
  for (p = 0; p < r.length; ++p) {
2021
- let C = r[p];
2022
- if (ht(C, Uint8Array))
2023
- I + C.length > x.length ? (o.isBuffer(C) || (C = o.from(C)), C.copy(x, I)) : Uint8Array.prototype.set.call(
2019
+ let S = r[p];
2020
+ if (ht(S, Uint8Array))
2021
+ I + S.length > x.length ? (o.isBuffer(S) || (S = o.from(S)), S.copy(x, I)) : Uint8Array.prototype.set.call(
2024
2022
  x,
2025
- C,
2023
+ S,
2026
2024
  I
2027
2025
  );
2028
- else if (o.isBuffer(C))
2029
- C.copy(x, I);
2026
+ else if (o.isBuffer(S))
2027
+ S.copy(x, I);
2030
2028
  else
2031
2029
  throw new TypeError('"list" argument must be an Array of Buffers');
2032
- I += C.length;
2030
+ I += S.length;
2033
2031
  }
2034
2032
  return x;
2035
2033
  };
@@ -2087,7 +2085,7 @@ function ni() {
2087
2085
  case "binary":
2088
2086
  return Ft(this, r, n);
2089
2087
  case "base64":
2090
- return it(this, r, n);
2088
+ return et(this, r, n);
2091
2089
  case "ucs2":
2092
2090
  case "ucs-2":
2093
2091
  case "utf16le":
@@ -2148,14 +2146,14 @@ function ni() {
2148
2146
  if (n >= p)
2149
2147
  return 1;
2150
2148
  if (n >>>= 0, p >>>= 0, x >>>= 0, I >>>= 0, this === r) return 0;
2151
- let C = I - x, U = p - n;
2152
- const H = Math.min(C, U), $ = this.slice(x, I), z = r.slice(n, p);
2149
+ let S = I - x, U = p - n;
2150
+ const H = Math.min(S, U), $ = this.slice(x, I), z = r.slice(n, p);
2153
2151
  for (let q = 0; q < H; ++q)
2154
2152
  if ($[q] !== z[q]) {
2155
- C = $[q], U = z[q];
2153
+ S = $[q], U = z[q];
2156
2154
  break;
2157
2155
  }
2158
- return C < U ? -1 : U < C ? 1 : 0;
2156
+ return S < U ? -1 : U < S ? 1 : 0;
2159
2157
  };
2160
2158
  function N(h, r, n, p, x) {
2161
2159
  if (h.length === 0) return -1;
@@ -2172,11 +2170,11 @@ function ni() {
2172
2170
  throw new TypeError("val must be string, number or Buffer");
2173
2171
  }
2174
2172
  function D(h, r, n, p, x) {
2175
- let I = 1, C = h.length, U = r.length;
2173
+ let I = 1, S = h.length, U = r.length;
2176
2174
  if (p !== void 0 && (p = String(p).toLowerCase(), p === "ucs2" || p === "ucs-2" || p === "utf16le" || p === "utf-16le")) {
2177
2175
  if (h.length < 2 || r.length < 2)
2178
2176
  return -1;
2179
- I = 2, C /= 2, U /= 2, n /= 2;
2177
+ I = 2, S /= 2, U /= 2, n /= 2;
2180
2178
  }
2181
2179
  function H(z, q) {
2182
2180
  return I === 1 ? z[q] : z.readUInt16BE(q * I);
@@ -2184,13 +2182,13 @@ function ni() {
2184
2182
  let $;
2185
2183
  if (x) {
2186
2184
  let z = -1;
2187
- for ($ = n; $ < C; $++)
2185
+ for ($ = n; $ < S; $++)
2188
2186
  if (H(h, $) === H(r, z === -1 ? 0 : $ - z)) {
2189
2187
  if (z === -1 && (z = $), $ - z + 1 === U) return z * I;
2190
2188
  } else
2191
2189
  z !== -1 && ($ -= $ - z), z = -1;
2192
2190
  } else
2193
- for (n + U > C && (n = C - U), $ = n; $ >= 0; $--) {
2191
+ for (n + U > S && (n = S - U), $ = n; $ >= 0; $--) {
2194
2192
  let z = !0;
2195
2193
  for (let q = 0; q < U; q++)
2196
2194
  if (H(h, $ + q) !== H(r, q)) {
@@ -2214,13 +2212,13 @@ function ni() {
2214
2212
  p ? (p = Number(p), p > x && (p = x)) : p = x;
2215
2213
  const I = r.length;
2216
2214
  p > I / 2 && (p = I / 2);
2217
- let C;
2218
- for (C = 0; C < p; ++C) {
2219
- const U = parseInt(r.substr(C * 2, 2), 16);
2220
- if (ne(U)) return C;
2221
- h[n + C] = U;
2215
+ let S;
2216
+ for (S = 0; S < p; ++S) {
2217
+ const U = parseInt(r.substr(S * 2, 2), 16);
2218
+ if (ne(U)) return S;
2219
+ h[n + S] = U;
2222
2220
  }
2223
- return C;
2221
+ return S;
2224
2222
  }
2225
2223
  function y(h, r, n, p) {
2226
2224
  return At(Q(r, h.length - n), h, n, p);
@@ -2249,7 +2247,7 @@ function ni() {
2249
2247
  if ((p === void 0 || p > I) && (p = I), r.length > 0 && (p < 0 || n < 0) || n > this.length)
2250
2248
  throw new RangeError("Attempt to write outside buffer bounds");
2251
2249
  x || (x = "utf8");
2252
- let C = !1;
2250
+ let S = !1;
2253
2251
  for (; ; )
2254
2252
  switch (x) {
2255
2253
  case "hex":
@@ -2269,8 +2267,8 @@ function ni() {
2269
2267
  case "utf-16le":
2270
2268
  return X(this, r, n, p);
2271
2269
  default:
2272
- if (C) throw new TypeError("Unknown encoding: " + x);
2273
- x = ("" + x).toLowerCase(), C = !0;
2270
+ if (S) throw new TypeError("Unknown encoding: " + x);
2271
+ x = ("" + x).toLowerCase(), S = !0;
2274
2272
  }
2275
2273
  }, o.prototype.toJSON = function() {
2276
2274
  return {
@@ -2278,7 +2276,7 @@ function ni() {
2278
2276
  data: Array.prototype.slice.call(this._arr || this, 0)
2279
2277
  };
2280
2278
  };
2281
- function it(h, r, n) {
2279
+ function et(h, r, n) {
2282
2280
  return r === 0 && n === h.length ? t.fromByteArray(h) : t.fromByteArray(h.slice(r, n));
2283
2281
  }
2284
2282
  function ft(h, r, n) {
@@ -2287,24 +2285,24 @@ function ni() {
2287
2285
  let x = r;
2288
2286
  for (; x < n; ) {
2289
2287
  const I = h[x];
2290
- let C = null, U = I > 239 ? 4 : I > 223 ? 3 : I > 191 ? 2 : 1;
2288
+ let S = null, U = I > 239 ? 4 : I > 223 ? 3 : I > 191 ? 2 : 1;
2291
2289
  if (x + U <= n) {
2292
2290
  let H, $, z, q;
2293
2291
  switch (U) {
2294
2292
  case 1:
2295
- I < 128 && (C = I);
2293
+ I < 128 && (S = I);
2296
2294
  break;
2297
2295
  case 2:
2298
- H = h[x + 1], (H & 192) === 128 && (q = (I & 31) << 6 | H & 63, q > 127 && (C = q));
2296
+ H = h[x + 1], (H & 192) === 128 && (q = (I & 31) << 6 | H & 63, q > 127 && (S = q));
2299
2297
  break;
2300
2298
  case 3:
2301
- H = h[x + 1], $ = h[x + 2], (H & 192) === 128 && ($ & 192) === 128 && (q = (I & 15) << 12 | (H & 63) << 6 | $ & 63, q > 2047 && (q < 55296 || q > 57343) && (C = q));
2299
+ H = h[x + 1], $ = h[x + 2], (H & 192) === 128 && ($ & 192) === 128 && (q = (I & 15) << 12 | (H & 63) << 6 | $ & 63, q > 2047 && (q < 55296 || q > 57343) && (S = q));
2302
2300
  break;
2303
2301
  case 4:
2304
- H = h[x + 1], $ = h[x + 2], z = h[x + 3], (H & 192) === 128 && ($ & 192) === 128 && (z & 192) === 128 && (q = (I & 15) << 18 | (H & 63) << 12 | ($ & 63) << 6 | z & 63, q > 65535 && q < 1114112 && (C = q));
2302
+ H = h[x + 1], $ = h[x + 2], z = h[x + 3], (H & 192) === 128 && ($ & 192) === 128 && (z & 192) === 128 && (q = (I & 15) << 18 | (H & 63) << 12 | ($ & 63) << 6 | z & 63, q > 65535 && q < 1114112 && (S = q));
2305
2303
  }
2306
2304
  }
2307
- C === null ? (C = 65533, U = 1) : C > 65535 && (C -= 65536, p.push(C >>> 10 & 1023 | 55296), C = 56320 | C & 1023), p.push(C), x += U;
2305
+ S === null ? (S = 65533, U = 1) : S > 65535 && (S -= 65536, p.push(S >>> 10 & 1023 | 55296), S = 56320 | S & 1023), p.push(S), x += U;
2308
2306
  }
2309
2307
  return pt(p);
2310
2308
  }
@@ -2340,7 +2338,7 @@ function ni() {
2340
2338
  (!r || r < 0) && (r = 0), (!n || n < 0 || n > p) && (n = p);
2341
2339
  let x = "";
2342
2340
  for (let I = r; I < n; ++I)
2343
- x += di[h[I]];
2341
+ x += fi[h[I]];
2344
2342
  return x;
2345
2343
  }
2346
2344
  function vt(h, r, n) {
@@ -2362,9 +2360,9 @@ function ni() {
2362
2360
  }
2363
2361
  o.prototype.readUintLE = o.prototype.readUIntLE = function(r, n, p) {
2364
2362
  r = r >>> 0, n = n >>> 0, p || G(r, n, this.length);
2365
- let x = this[r], I = 1, C = 0;
2366
- for (; ++C < n && (I *= 256); )
2367
- x += this[r + C] * I;
2363
+ let x = this[r], I = 1, S = 0;
2364
+ for (; ++S < n && (I *= 256); )
2365
+ x += this[r + S] * I;
2368
2366
  return x;
2369
2367
  }, o.prototype.readUintBE = o.prototype.readUIntBE = function(r, n, p) {
2370
2368
  r = r >>> 0, n = n >>> 0, p || G(r, n, this.length);
@@ -2382,13 +2380,13 @@ function ni() {
2382
2380
  return r = r >>> 0, n || G(r, 4, this.length), (this[r] | this[r + 1] << 8 | this[r + 2] << 16) + this[r + 3] * 16777216;
2383
2381
  }, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(r, n) {
2384
2382
  return r = r >>> 0, n || G(r, 4, this.length), this[r] * 16777216 + (this[r + 1] << 16 | this[r + 2] << 8 | this[r + 3]);
2385
- }, o.prototype.readBigUInt64LE = St(function(r) {
2383
+ }, o.prototype.readBigUInt64LE = Ct(function(r) {
2386
2384
  r = r >>> 0, V(r, "offset");
2387
2385
  const n = this[r], p = this[r + 7];
2388
2386
  (n === void 0 || p === void 0) && Z(r, this.length - 8);
2389
2387
  const x = n + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + this[++r] * 2 ** 24, I = this[++r] + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + p * 2 ** 24;
2390
2388
  return BigInt(x) + (BigInt(I) << BigInt(32));
2391
- }), o.prototype.readBigUInt64BE = St(function(r) {
2389
+ }), o.prototype.readBigUInt64BE = Ct(function(r) {
2392
2390
  r = r >>> 0, V(r, "offset");
2393
2391
  const n = this[r], p = this[r + 7];
2394
2392
  (n === void 0 || p === void 0) && Z(r, this.length - 8);
@@ -2396,16 +2394,16 @@ function ni() {
2396
2394
  return (BigInt(x) << BigInt(32)) + BigInt(I);
2397
2395
  }), o.prototype.readIntLE = function(r, n, p) {
2398
2396
  r = r >>> 0, n = n >>> 0, p || G(r, n, this.length);
2399
- let x = this[r], I = 1, C = 0;
2400
- for (; ++C < n && (I *= 256); )
2401
- x += this[r + C] * I;
2397
+ let x = this[r], I = 1, S = 0;
2398
+ for (; ++S < n && (I *= 256); )
2399
+ x += this[r + S] * I;
2402
2400
  return I *= 128, x >= I && (x -= Math.pow(2, 8 * n)), x;
2403
2401
  }, o.prototype.readIntBE = function(r, n, p) {
2404
2402
  r = r >>> 0, n = n >>> 0, p || G(r, n, this.length);
2405
- let x = n, I = 1, C = this[r + --x];
2403
+ let x = n, I = 1, S = this[r + --x];
2406
2404
  for (; x > 0 && (I *= 256); )
2407
- C += this[r + --x] * I;
2408
- return I *= 128, C >= I && (C -= Math.pow(2, 8 * n)), C;
2405
+ S += this[r + --x] * I;
2406
+ return I *= 128, S >= I && (S -= Math.pow(2, 8 * n)), S;
2409
2407
  }, o.prototype.readInt8 = function(r, n) {
2410
2408
  return r = r >>> 0, n || G(r, 1, this.length), this[r] & 128 ? (255 - this[r] + 1) * -1 : this[r];
2411
2409
  }, o.prototype.readInt16LE = function(r, n) {
@@ -2420,13 +2418,13 @@ function ni() {
2420
2418
  return r = r >>> 0, n || G(r, 4, this.length), this[r] | this[r + 1] << 8 | this[r + 2] << 16 | this[r + 3] << 24;
2421
2419
  }, o.prototype.readInt32BE = function(r, n) {
2422
2420
  return r = r >>> 0, n || G(r, 4, this.length), this[r] << 24 | this[r + 1] << 16 | this[r + 2] << 8 | this[r + 3];
2423
- }, o.prototype.readBigInt64LE = St(function(r) {
2421
+ }, o.prototype.readBigInt64LE = Ct(function(r) {
2424
2422
  r = r >>> 0, V(r, "offset");
2425
2423
  const n = this[r], p = this[r + 7];
2426
2424
  (n === void 0 || p === void 0) && Z(r, this.length - 8);
2427
2425
  const x = this[r + 4] + this[r + 5] * 2 ** 8 + this[r + 6] * 2 ** 16 + (p << 24);
2428
2426
  return (BigInt(x) << BigInt(32)) + BigInt(n + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + this[++r] * 2 ** 24);
2429
- }), o.prototype.readBigInt64BE = St(function(r) {
2427
+ }), o.prototype.readBigInt64BE = Ct(function(r) {
2430
2428
  r = r >>> 0, V(r, "offset");
2431
2429
  const n = this[r], p = this[r + 7];
2432
2430
  (n === void 0 || p === void 0) && Z(r, this.length - 8);
@@ -2452,18 +2450,18 @@ function ni() {
2452
2450
  const U = Math.pow(2, 8 * p) - 1;
2453
2451
  j(this, r, n, p, U, 0);
2454
2452
  }
2455
- let I = 1, C = 0;
2456
- for (this[n] = r & 255; ++C < p && (I *= 256); )
2457
- this[n + C] = r / I & 255;
2453
+ let I = 1, S = 0;
2454
+ for (this[n] = r & 255; ++S < p && (I *= 256); )
2455
+ this[n + S] = r / I & 255;
2458
2456
  return n + p;
2459
2457
  }, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(r, n, p, x) {
2460
2458
  if (r = +r, n = n >>> 0, p = p >>> 0, !x) {
2461
2459
  const U = Math.pow(2, 8 * p) - 1;
2462
2460
  j(this, r, n, p, U, 0);
2463
2461
  }
2464
- let I = p - 1, C = 1;
2465
- for (this[n + I] = r & 255; --I >= 0 && (C *= 256); )
2466
- this[n + I] = r / C & 255;
2462
+ let I = p - 1, S = 1;
2463
+ for (this[n + I] = r & 255; --I >= 0 && (S *= 256); )
2464
+ this[n + I] = r / S & 255;
2467
2465
  return n + p;
2468
2466
  }, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(r, n, p) {
2469
2467
  return r = +r, n = n >>> 0, p || j(this, r, n, 1, 255, 0), this[n] = r & 255, n + 1;
@@ -2480,37 +2478,37 @@ function ni() {
2480
2478
  W(r, p, x, h, n, 7);
2481
2479
  let I = Number(r & BigInt(4294967295));
2482
2480
  h[n++] = I, I = I >> 8, h[n++] = I, I = I >> 8, h[n++] = I, I = I >> 8, h[n++] = I;
2483
- let C = Number(r >> BigInt(32) & BigInt(4294967295));
2484
- return h[n++] = C, C = C >> 8, h[n++] = C, C = C >> 8, h[n++] = C, C = C >> 8, h[n++] = C, n;
2481
+ let S = Number(r >> BigInt(32) & BigInt(4294967295));
2482
+ return h[n++] = S, S = S >> 8, h[n++] = S, S = S >> 8, h[n++] = S, S = S >> 8, h[n++] = S, n;
2485
2483
  }
2486
2484
  function gt(h, r, n, p, x) {
2487
2485
  W(r, p, x, h, n, 7);
2488
2486
  let I = Number(r & BigInt(4294967295));
2489
2487
  h[n + 7] = I, I = I >> 8, h[n + 6] = I, I = I >> 8, h[n + 5] = I, I = I >> 8, h[n + 4] = I;
2490
- let C = Number(r >> BigInt(32) & BigInt(4294967295));
2491
- return h[n + 3] = C, C = C >> 8, h[n + 2] = C, C = C >> 8, h[n + 1] = C, C = C >> 8, h[n] = C, n + 8;
2488
+ let S = Number(r >> BigInt(32) & BigInt(4294967295));
2489
+ return h[n + 3] = S, S = S >> 8, h[n + 2] = S, S = S >> 8, h[n + 1] = S, S = S >> 8, h[n] = S, n + 8;
2492
2490
  }
2493
- o.prototype.writeBigUInt64LE = St(function(r, n = 0) {
2491
+ o.prototype.writeBigUInt64LE = Ct(function(r, n = 0) {
2494
2492
  return bt(this, r, n, BigInt(0), BigInt("0xffffffffffffffff"));
2495
- }), o.prototype.writeBigUInt64BE = St(function(r, n = 0) {
2493
+ }), o.prototype.writeBigUInt64BE = Ct(function(r, n = 0) {
2496
2494
  return gt(this, r, n, BigInt(0), BigInt("0xffffffffffffffff"));
2497
2495
  }), o.prototype.writeIntLE = function(r, n, p, x) {
2498
2496
  if (r = +r, n = n >>> 0, !x) {
2499
2497
  const H = Math.pow(2, 8 * p - 1);
2500
2498
  j(this, r, n, p, H - 1, -H);
2501
2499
  }
2502
- let I = 0, C = 1, U = 0;
2503
- for (this[n] = r & 255; ++I < p && (C *= 256); )
2504
- r < 0 && U === 0 && this[n + I - 1] !== 0 && (U = 1), this[n + I] = (r / C >> 0) - U & 255;
2500
+ let I = 0, S = 1, U = 0;
2501
+ for (this[n] = r & 255; ++I < p && (S *= 256); )
2502
+ r < 0 && U === 0 && this[n + I - 1] !== 0 && (U = 1), this[n + I] = (r / S >> 0) - U & 255;
2505
2503
  return n + p;
2506
2504
  }, o.prototype.writeIntBE = function(r, n, p, x) {
2507
2505
  if (r = +r, n = n >>> 0, !x) {
2508
2506
  const H = Math.pow(2, 8 * p - 1);
2509
2507
  j(this, r, n, p, H - 1, -H);
2510
2508
  }
2511
- let I = p - 1, C = 1, U = 0;
2512
- for (this[n + I] = r & 255; --I >= 0 && (C *= 256); )
2513
- r < 0 && U === 0 && this[n + I + 1] !== 0 && (U = 1), this[n + I] = (r / C >> 0) - U & 255;
2509
+ let I = p - 1, S = 1, U = 0;
2510
+ for (this[n + I] = r & 255; --I >= 0 && (S *= 256); )
2511
+ r < 0 && U === 0 && this[n + I + 1] !== 0 && (U = 1), this[n + I] = (r / S >> 0) - U & 255;
2514
2512
  return n + p;
2515
2513
  }, o.prototype.writeInt8 = function(r, n, p) {
2516
2514
  return r = +r, n = n >>> 0, p || j(this, r, n, 1, 127, -128), r < 0 && (r = 255 + r + 1), this[n] = r & 255, n + 1;
@@ -2522,9 +2520,9 @@ function ni() {
2522
2520
  return r = +r, n = n >>> 0, p || j(this, r, n, 4, 2147483647, -2147483648), this[n] = r & 255, this[n + 1] = r >>> 8, this[n + 2] = r >>> 16, this[n + 3] = r >>> 24, n + 4;
2523
2521
  }, o.prototype.writeInt32BE = function(r, n, p) {
2524
2522
  return r = +r, n = n >>> 0, p || j(this, r, n, 4, 2147483647, -2147483648), r < 0 && (r = 4294967295 + r + 1), this[n] = r >>> 24, this[n + 1] = r >>> 16, this[n + 2] = r >>> 8, this[n + 3] = r & 255, n + 4;
2525
- }, o.prototype.writeBigInt64LE = St(function(r, n = 0) {
2523
+ }, o.prototype.writeBigInt64LE = Ct(function(r, n = 0) {
2526
2524
  return bt(this, r, n, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
2527
- }), o.prototype.writeBigInt64BE = St(function(r, n = 0) {
2525
+ }), o.prototype.writeBigInt64BE = Ct(function(r, n = 0) {
2528
2526
  return gt(this, r, n, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
2529
2527
  });
2530
2528
  function Xt(h, r, n, p, x, I) {
@@ -2567,8 +2565,8 @@ function ni() {
2567
2565
  if (typeof x == "string" && !o.isEncoding(x))
2568
2566
  throw new TypeError("Unknown encoding: " + x);
2569
2567
  if (r.length === 1) {
2570
- const C = r.charCodeAt(0);
2571
- (x === "utf8" && C < 128 || x === "latin1") && (r = C);
2568
+ const S = r.charCodeAt(0);
2569
+ (x === "utf8" && S < 128 || x === "latin1") && (r = S);
2572
2570
  }
2573
2571
  } else typeof r == "number" ? r = r & 255 : typeof r == "boolean" && (r = Number(r));
2574
2572
  if (n < 0 || this.length < n || this.length < p)
@@ -2581,11 +2579,11 @@ function ni() {
2581
2579
  for (I = n; I < p; ++I)
2582
2580
  this[I] = r;
2583
2581
  else {
2584
- const C = o.isBuffer(r) ? r : o.from(r, x), U = C.length;
2582
+ const S = o.isBuffer(r) ? r : o.from(r, x), U = S.length;
2585
2583
  if (U === 0)
2586
2584
  throw new TypeError('The value "' + r + '" is invalid for argument "value"');
2587
2585
  for (I = 0; I < p - n; ++I)
2588
- this[I + n] = C[I % U];
2586
+ this[I + n] = S[I % U];
2589
2587
  }
2590
2588
  return this;
2591
2589
  };
@@ -2647,9 +2645,9 @@ function ni() {
2647
2645
  }
2648
2646
  function W(h, r, n, p, x, I) {
2649
2647
  if (h > n || h < r) {
2650
- const C = typeof r == "bigint" ? "n" : "";
2648
+ const S = typeof r == "bigint" ? "n" : "";
2651
2649
  let U;
2652
- throw r === 0 || r === BigInt(0) ? U = `>= 0${C} and < 2${C} ** ${(I + 1) * 8}${C}` : U = `>= -(2${C} ** ${(I + 1) * 8 - 1}${C}) and < 2 ** ${(I + 1) * 8 - 1}${C}`, new l.ERR_OUT_OF_RANGE("value", U, h);
2650
+ throw r === 0 || r === BigInt(0) ? U = `>= 0${S} and < 2${S} ** ${(I + 1) * 8}${S}` : U = `>= -(2${S} ** ${(I + 1) * 8 - 1}${S}) and < 2 ** ${(I + 1) * 8 - 1}${S}`, new l.ERR_OUT_OF_RANGE("value", U, h);
2653
2651
  }
2654
2652
  K(p, x, I);
2655
2653
  }
@@ -2677,13 +2675,13 @@ function ni() {
2677
2675
  const p = h.length;
2678
2676
  let x = null;
2679
2677
  const I = [];
2680
- for (let C = 0; C < p; ++C) {
2681
- if (n = h.charCodeAt(C), n > 55295 && n < 57344) {
2678
+ for (let S = 0; S < p; ++S) {
2679
+ if (n = h.charCodeAt(S), n > 55295 && n < 57344) {
2682
2680
  if (!x) {
2683
2681
  if (n > 56319) {
2684
2682
  (r -= 3) > -1 && I.push(239, 191, 189);
2685
2683
  continue;
2686
- } else if (C + 1 === p) {
2684
+ } else if (S + 1 === p) {
2687
2685
  (r -= 3) > -1 && I.push(239, 191, 189);
2688
2686
  continue;
2689
2687
  }
@@ -2734,8 +2732,8 @@ function ni() {
2734
2732
  function se(h, r) {
2735
2733
  let n, p, x;
2736
2734
  const I = [];
2737
- for (let C = 0; C < h.length && !((r -= 2) < 0); ++C)
2738
- n = h.charCodeAt(C), p = n >> 8, x = n % 256, I.push(x), I.push(p);
2735
+ for (let S = 0; S < h.length && !((r -= 2) < 0); ++S)
2736
+ n = h.charCodeAt(S), p = n >> 8, x = n % 256, I.push(x), I.push(p);
2739
2737
  return I;
2740
2738
  }
2741
2739
  function Yt(h) {
@@ -2753,7 +2751,7 @@ function ni() {
2753
2751
  function ne(h) {
2754
2752
  return h !== h;
2755
2753
  }
2756
- const di = function() {
2754
+ const fi = function() {
2757
2755
  const h = "0123456789abcdef", r = new Array(256);
2758
2756
  for (let n = 0; n < 16; ++n) {
2759
2757
  const p = n * 16;
@@ -2762,19 +2760,19 @@ function ni() {
2762
2760
  }
2763
2761
  return r;
2764
2762
  }();
2765
- function St(h) {
2766
- return typeof BigInt > "u" ? pi : h;
2763
+ function Ct(h) {
2764
+ return typeof BigInt > "u" ? di : h;
2767
2765
  }
2768
- function pi() {
2766
+ function di() {
2769
2767
  throw new Error("BigInt not supported");
2770
2768
  }
2771
2769
  }(he)), he;
2772
2770
  }
2773
2771
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2774
- var Xe;
2772
+ var ke;
2775
2773
  function Zi() {
2776
- return Xe || (Xe = 1, function(u, t) {
2777
- var e = ni(), i = e.Buffer;
2774
+ return ke || (ke = 1, function(u, t) {
2775
+ var e = si(), i = e.Buffer;
2778
2776
  function s(a, o) {
2779
2777
  for (var g in a)
2780
2778
  o[g] = a[g];
@@ -2803,10 +2801,10 @@ function Zi() {
2803
2801
  };
2804
2802
  }(zt, zt.exports)), zt.exports;
2805
2803
  }
2806
- var Ye;
2804
+ var Xe;
2807
2805
  function Ji() {
2808
- if (Ye) return ce;
2809
- Ye = 1;
2806
+ if (Xe) return ce;
2807
+ Xe = 1;
2810
2808
  var u = Zi().Buffer, t = u.isEncoding || function(_) {
2811
2809
  switch (_ = "" + _, _ && _.toLowerCase()) {
2812
2810
  case "hex":
@@ -2860,7 +2858,7 @@ function Ji() {
2860
2858
  var v;
2861
2859
  switch (this.encoding) {
2862
2860
  case "utf16le":
2863
- this.text = S, this.end = A, v = 4;
2861
+ this.text = C, this.end = A, v = 4;
2864
2862
  break;
2865
2863
  case "utf8":
2866
2864
  this.fillLast = g, v = 4;
@@ -2925,7 +2923,7 @@ function Ji() {
2925
2923
  var v = _ && _.length ? this.write(_) : "";
2926
2924
  return this.lastNeed ? v + "�" : v;
2927
2925
  }
2928
- function S(_, v) {
2926
+ function C(_, v) {
2929
2927
  if ((_.length - v) % 2 === 0) {
2930
2928
  var m = _.toString("utf16le", v);
2931
2929
  if (m) {
@@ -2961,9 +2959,9 @@ function Ji() {
2961
2959
  }
2962
2960
  return ce;
2963
2961
  }
2964
- var Ge;
2962
+ var Ye;
2965
2963
  function tr() {
2966
- return Ge || (Ge = 1, function(u) {
2964
+ return Ye || (Ye = 1, function(u) {
2967
2965
  (function(t) {
2968
2966
  t.parser = function(d, l) {
2969
2967
  return new i(d, l);
@@ -3025,7 +3023,7 @@ function tr() {
3025
3023
  if (W > l)
3026
3024
  switch (e[w]) {
3027
3025
  case "textNode":
3028
- it(d);
3026
+ et(d);
3029
3027
  break;
3030
3028
  case "cdata":
3031
3029
  X(d, "oncdata", d.cdata), d.cdata = "";
@@ -3046,7 +3044,7 @@ function tr() {
3046
3044
  d[e[l]] = "";
3047
3045
  }
3048
3046
  function a(d) {
3049
- it(d), d.cdata !== "" && (X(d, "oncdata", d.cdata), d.cdata = ""), d.script !== "" && (X(d, "onscript", d.script), d.script = "");
3047
+ et(d), d.cdata !== "" && (X(d, "oncdata", d.cdata), d.cdata = ""), d.script !== "" && (X(d, "onscript", d.script), d.script = "");
3050
3048
  }
3051
3049
  i.prototype = {
3052
3050
  end: function() {
@@ -3124,7 +3122,7 @@ function tr() {
3124
3122
  w.splice(0, 0, d), M.emit.apply(M, w);
3125
3123
  }), o.prototype.on.call(M, d, l);
3126
3124
  };
3127
- var S = "[CDATA[", A = "DOCTYPE", B = "http://www.w3.org/XML/1998/namespace", F = "http://www.w3.org/2000/xmlns/", P = { xml: B, xmlns: F }, O = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, _ = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, v = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, m = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
3125
+ var C = "[CDATA[", A = "DOCTYPE", B = "http://www.w3.org/XML/1998/namespace", F = "http://www.w3.org/2000/xmlns/", P = { xml: B, xmlns: F }, O = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, _ = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, v = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, m = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
3128
3126
  function f(d) {
3129
3127
  return d === " " || d === `
3130
3128
  ` || d === "\r" || d === " ";
@@ -3486,22 +3484,22 @@ function tr() {
3486
3484
  d[l] && d[l](M);
3487
3485
  }
3488
3486
  function X(d, l, M) {
3489
- d.textNode && it(d), st(d, l, M);
3487
+ d.textNode && et(d), st(d, l, M);
3490
3488
  }
3491
- function it(d) {
3489
+ function et(d) {
3492
3490
  d.textNode = ft(d.opt, d.textNode), d.textNode && st(d, "ontext", d.textNode), d.textNode = "";
3493
3491
  }
3494
3492
  function ft(d, l) {
3495
3493
  return d.trim && (l = l.trim()), d.normalize && (l = l.replace(/\s+/g, " ")), l;
3496
3494
  }
3497
3495
  function at(d, l) {
3498
- return it(d), d.trackPosition && (l += `
3496
+ return et(d), d.trackPosition && (l += `
3499
3497
  Line: ` + d.line + `
3500
3498
  Column: ` + d.column + `
3501
3499
  Char: ` + d.c), l = new Error(l), d.error = l, st(d, "onerror", l), d;
3502
3500
  }
3503
3501
  function pt(d) {
3504
- return d.sawRoot && !d.closedRoot && Y(d, "Unclosed root tag"), d.state !== y.BEGIN && d.state !== y.BEGIN_WHITESPACE && d.state !== y.TEXT && at(d, "Unexpected end"), it(d), d.c = "", d.closed = !0, st(d, "onend"), i.call(d, d.strict, d.opt), d;
3502
+ return d.sawRoot && !d.closedRoot && Y(d, "Unclosed root tag"), d.state !== y.BEGIN && d.state !== y.BEGIN_WHITESPACE && d.state !== y.TEXT && at(d, "Unexpected end"), et(d), d.c = "", d.closed = !0, st(d, "onend"), i.call(d, d.strict, d.opt), d;
3505
3503
  }
3506
3504
  function Y(d, l) {
3507
3505
  if (typeof d != "object" || !(d instanceof i))
@@ -3685,7 +3683,7 @@ Actual: ` + d.attribValue
3685
3683
  l.state = y.COMMENT, l.comment = "", l.sgmlDecl = "";
3686
3684
  continue;
3687
3685
  }
3688
- l.doctype && l.doctype !== !0 && l.sgmlDecl ? (l.state = y.DOCTYPE_DTD, l.doctype += "<!" + l.sgmlDecl + w, l.sgmlDecl = "") : (l.sgmlDecl + w).toUpperCase() === S ? (X(l, "onopencdata"), l.state = y.CDATA, l.sgmlDecl = "", l.cdata = "") : (l.sgmlDecl + w).toUpperCase() === A ? (l.state = y.DOCTYPE, (l.doctype || l.sawRoot) && Y(
3686
+ l.doctype && l.doctype !== !0 && l.sgmlDecl ? (l.state = y.DOCTYPE_DTD, l.doctype += "<!" + l.sgmlDecl + w, l.sgmlDecl = "") : (l.sgmlDecl + w).toUpperCase() === C ? (X(l, "onopencdata"), l.state = y.CDATA, l.sgmlDecl = "", l.cdata = "") : (l.sgmlDecl + w).toUpperCase() === A ? (l.state = y.DOCTYPE, (l.doctype || l.sawRoot) && Y(
3689
3687
  l,
3690
3688
  "Inappropriately located doctype declaration"
3691
3689
  ), l.doctype = "", l.sgmlDecl = "") : w === ">" ? (X(l, "onsgmldeclaration", l.sgmlDecl), l.sgmlDecl = "", l.state = y.TEXT) : (b(w) && (l.state = y.SGML_DECL_QUOTED), l.sgmlDecl += w);
@@ -3850,19 +3848,19 @@ Actual: ` + d.attribValue
3850
3848
  })(u);
3851
3849
  }(le)), le;
3852
3850
  }
3853
- var ue, Ke;
3854
- function Ce() {
3855
- return Ke || (Ke = 1, ue = {
3851
+ var ue, Ge;
3852
+ function Se() {
3853
+ return Ge || (Ge = 1, ue = {
3856
3854
  isArray: function(u) {
3857
3855
  return Array.isArray ? Array.isArray(u) : Object.prototype.toString.call(u) === "[object Array]";
3858
3856
  }
3859
3857
  }), ue;
3860
3858
  }
3861
- var fe, qe;
3859
+ var fe, Ke;
3862
3860
  function Me() {
3863
- if (qe) return fe;
3864
- qe = 1;
3865
- var u = Ce().isArray;
3861
+ if (Ke) return fe;
3862
+ Ke = 1;
3863
+ var u = Se().isArray;
3866
3864
  return fe = {
3867
3865
  copyOptions: function(t) {
3868
3866
  var e, i = {};
@@ -3887,11 +3885,11 @@ function Me() {
3887
3885
  }
3888
3886
  }, fe;
3889
3887
  }
3890
- var de, Ve;
3891
- function ai() {
3892
- if (Ve) return de;
3893
- Ve = 1;
3894
- var u = tr(), t = Me(), e = Ce().isArray, i, s;
3888
+ var de, qe;
3889
+ function ni() {
3890
+ if (qe) return de;
3891
+ qe = 1;
3892
+ var u = tr(), t = Me(), e = Se().isArray, i, s;
3895
3893
  function c(_) {
3896
3894
  return i = t.copyOptions(_), t.ensureFlagExists("ignoreDeclaration", i), t.ensureFlagExists("ignoreInstruction", i), t.ensureFlagExists("ignoreAttributes", i), t.ensureFlagExists("ignoreText", i), t.ensureFlagExists("ignoreComment", i), t.ensureFlagExists("ignoreCdata", i), t.ensureFlagExists("ignoreDoctype", i), t.ensureFlagExists("compact", i), t.ensureFlagExists("alwaysChildren", i), t.ensureFlagExists("addParent", i), t.ensureFlagExists("trim", i), t.ensureFlagExists("nativeType", i), t.ensureFlagExists("nativeTypeAttributes", i), t.ensureFlagExists("sanitize", i), t.ensureFlagExists("instructionHasAttributes", i), t.ensureFlagExists("captureSpacesBetweenElements", i), t.ensureAlwaysArrayExists(i), t.ensureKeyExists("declaration", i), t.ensureKeyExists("instruction", i), t.ensureKeyExists("attributes", i), t.ensureKeyExists("text", i), t.ensureKeyExists("comment", i), t.ensureKeyExists("cdata", i), t.ensureKeyExists("doctype", i), t.ensureKeyExists("type", i), t.ensureKeyExists("name", i), t.ensureKeyExists("elements", i), t.ensureKeyExists("parent", i), t.checkFnExists("doctype", i), t.checkFnExists("instruction", i), t.checkFnExists("cdata", i), t.checkFnExists("comment", i), t.checkFnExists("text", i), t.checkFnExists("instructionName", i), t.checkFnExists("elementName", i), t.checkFnExists("attributeName", i), t.checkFnExists("attributeValue", i), t.checkFnExists("attributes", i), i;
3897
3895
  }
@@ -3973,7 +3971,7 @@ function ai() {
3973
3971
  s[i.elementsKey] || (s[i.elementsKey] = []), m = {}, m[i.typeKey] = "element", m[i.nameKey] = _, !i.ignoreAttributes && v && Object.keys(v).length && (m[i.attributesKey] = v), i.alwaysChildren && (m[i.elementsKey] = []), s[i.elementsKey].push(m);
3974
3972
  m[i.parentKey] = s, s = m;
3975
3973
  }
3976
- function S(_) {
3974
+ function C(_) {
3977
3975
  i.ignoreText || !_.trim() && !i.captureSpacesBetweenElements || (i.trim && (_ = _.trim()), i.nativeType && (_ = a(_)), i.sanitize && (_ = _.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")), o("text", _));
3978
3976
  }
3979
3977
  function A(_) {
@@ -3994,18 +3992,18 @@ function ai() {
3994
3992
  }
3995
3993
  return de = function(_, v) {
3996
3994
  var m = u.parser(!0, {}), f = {};
3997
- if (s = f, i = c(v), m.opt = { strictEntities: !0 }, m.onopentag = E, m.ontext = S, m.oncomment = A, m.onclosetag = B, m.onerror = O, m.oncdata = F, m.ondoctype = P, m.onprocessinginstruction = T, m.write(_).close(), f[i.elementsKey]) {
3995
+ if (s = f, i = c(v), m.opt = { strictEntities: !0 }, m.onopentag = E, m.ontext = C, m.oncomment = A, m.onclosetag = B, m.onerror = O, m.oncdata = F, m.ondoctype = P, m.onprocessinginstruction = T, m.write(_).close(), f[i.elementsKey]) {
3998
3996
  var b = f[i.elementsKey];
3999
3997
  delete f[i.elementsKey], f[i.elementsKey] = b, delete f.text;
4000
3998
  }
4001
3999
  return f;
4002
4000
  }, de;
4003
4001
  }
4004
- var pe, je;
4002
+ var pe, Ve;
4005
4003
  function er() {
4006
- if (je) return pe;
4007
- je = 1;
4008
- var u = Me(), t = ai();
4004
+ if (Ve) return pe;
4005
+ Ve = 1;
4006
+ var u = Me(), t = ni();
4009
4007
  function e(i) {
4010
4008
  var s = u.copyOptions(i);
4011
4009
  return u.ensureSpacesExists(s), s;
@@ -4017,11 +4015,11 @@ function er() {
4017
4015
  }, c.spaces) : o = JSON.stringify(a, null, c.spaces), o.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
4018
4016
  }, pe;
4019
4017
  }
4020
- var me, $e;
4021
- function oi() {
4022
- if ($e) return me;
4023
- $e = 1;
4024
- var u = Me(), t = Ce().isArray, e, i;
4018
+ var me, je;
4019
+ function ai() {
4020
+ if (je) return me;
4021
+ je = 1;
4022
+ var u = Me(), t = Se().isArray, e, i;
4025
4023
  function s(m) {
4026
4024
  var f = u.copyOptions(m);
4027
4025
  return u.ensureFlagExists("ignoreDeclaration", f), u.ensureFlagExists("ignoreInstruction", f), u.ensureFlagExists("ignoreAttributes", f), u.ensureFlagExists("ignoreText", f), u.ensureFlagExists("ignoreComment", f), u.ensureFlagExists("ignoreCdata", f), u.ensureFlagExists("ignoreDoctype", f), u.ensureFlagExists("compact", f), u.ensureFlagExists("indentText", f), u.ensureFlagExists("indentCdata", f), u.ensureFlagExists("indentAttributes", f), u.ensureFlagExists("indentInstruction", f), u.ensureFlagExists("fullTagEmptyElement", f), u.ensureFlagExists("noQuotesForNativeAttributes", f), u.ensureSpacesExists(f), typeof f.spaces == "number" && (f.spaces = Array(f.spaces + 1).join(" ")), u.ensureKeyExists("declaration", f), u.ensureKeyExists("instruction", f), u.ensureKeyExists("attributes", f), u.ensureKeyExists("text", f), u.ensureKeyExists("comment", f), u.ensureKeyExists("cdata", f), u.ensureKeyExists("doctype", f), u.ensureKeyExists("type", f), u.ensureKeyExists("name", f), u.ensureKeyExists("elements", f), u.checkFnExists("doctype", f), u.checkFnExists("instruction", f), u.checkFnExists("cdata", f), u.checkFnExists("comment", f), u.checkFnExists("text", f), u.checkFnExists("instructionName", f), u.checkFnExists("elementName", f), u.checkFnExists("attributeName", f), u.checkFnExists("attributeValue", f), u.checkFnExists("attributes", f), u.checkFnExists("fullTagEmptyElement", f), f;
@@ -4061,7 +4059,7 @@ function oi() {
4061
4059
  function E(m, f) {
4062
4060
  return f.ignoreCdata ? "" : "<![CDATA[" + ("cdataFn" in f ? f.cdataFn(m, i, e) : m.replace("]]>", "]]]]><![CDATA[>")) + "]]>";
4063
4061
  }
4064
- function S(m, f) {
4062
+ function C(m, f) {
4065
4063
  return f.ignoreDoctype ? "" : "<!DOCTYPE " + ("doctypeFn" in f ? f.doctypeFn(m, i, e) : m) + ">";
4066
4064
  }
4067
4065
  function A(m, f) {
@@ -4110,7 +4108,7 @@ function oi() {
4110
4108
  case "comment":
4111
4109
  return D + y + T(R[f.commentKey], f);
4112
4110
  case "doctype":
4113
- return D + y + S(R[f.doctypeKey], f);
4111
+ return D + y + C(R[f.doctypeKey], f);
4114
4112
  case "cdata":
4115
4113
  return D + (f.indentCdata ? y : "") + E(R[f.cdataKey], f);
4116
4114
  case "text":
@@ -4189,7 +4187,7 @@ function oi() {
4189
4187
  k.push((f.indentCdata ? c(f, b, N) : "") + E(y[D], f));
4190
4188
  break;
4191
4189
  case f.doctypeKey:
4192
- k.push(c(f, b, N) + S(y[D], f));
4190
+ k.push(c(f, b, N) + C(y[D], f));
4193
4191
  break;
4194
4192
  case f.commentKey:
4195
4193
  k.push(c(f, b, N) + T(y[D], f));
@@ -4207,11 +4205,11 @@ function oi() {
4207
4205
  return e = m, i = "_root_", f.compact ? b.push(v(m, f, 0, !0)) : (m[f.declarationKey] && b.push(o(m[f.declarationKey], f, 0)), m[f.elementsKey] && m[f.elementsKey].length && b.push(P(m[f.elementsKey], f, 0, !b.length))), b.join("");
4208
4206
  }, me;
4209
4207
  }
4210
- var _e, We;
4208
+ var _e, $e;
4211
4209
  function ir() {
4212
- if (We) return _e;
4213
- We = 1;
4214
- var u = oi();
4210
+ if ($e) return _e;
4211
+ $e = 1;
4212
+ var u = ai();
4215
4213
  return _e = function(t, e) {
4216
4214
  t instanceof Buffer && (t = t.toString());
4217
4215
  var i = null;
@@ -4226,11 +4224,11 @@ function ir() {
4226
4224
  return u(i, e);
4227
4225
  }, _e;
4228
4226
  }
4229
- var ge, He;
4227
+ var ge, We;
4230
4228
  function rr() {
4231
- if (He) return ge;
4232
- He = 1;
4233
- var u = ai(), t = er(), e = oi(), i = ir();
4229
+ if (We) return ge;
4230
+ We = 1;
4231
+ var u = ni(), t = er(), e = ai(), i = ir();
4234
4232
  return ge = {
4235
4233
  xml2js: u,
4236
4234
  xml2json: t,
@@ -4238,7 +4236,7 @@ function rr() {
4238
4236
  json2xml: i
4239
4237
  }, ge;
4240
4238
  }
4241
- var ye = rr(), sr = ni();
4239
+ var ye = rr(), sr = si();
4242
4240
  const lt = class lt {
4243
4241
  constructor(t, e = "", i = "") {
4244
4242
  this.xml = t, this.filePath = e, this.basePath = i, this.layers = /* @__PURE__ */ new Map(), this.transform = (s) => {
@@ -4296,7 +4294,7 @@ const lt = class lt {
4296
4294
  ])
4297
4295
  };
4298
4296
  if (a.properties) {
4299
- const E = lt.toArray(a.properties.property), S = {};
4297
+ const E = lt.toArray(a.properties.property), C = {};
4300
4298
  for (let A of E) {
4301
4299
  const B = A._attributes;
4302
4300
  if (!B) continue;
@@ -4322,13 +4320,13 @@ const lt = class lt {
4322
4320
  default:
4323
4321
  F = B.value;
4324
4322
  }
4325
- S[B.name] = F;
4323
+ C[B.name] = F;
4326
4324
  }
4327
- a.properties = S;
4325
+ a.properties = C;
4328
4326
  }
4329
4327
  a.polygon && (a.polygon = this.transform(a.polygon)), a.polyline && (a.polyline = this.transform(a.polyline)), a.points && (a = a.points.split(" ").map((E) => {
4330
- const S = E.split(",");
4331
- return { x: +S[0], y: +S[1] };
4328
+ const C = E.split(",");
4329
+ return { x: +C[0], y: +C[1] };
4332
4330
  })), a.point && (a.point = !0), a.ellipse && (a.ellipse = !0), a.text && (a.text = {
4333
4331
  text: a.text._text,
4334
4332
  ...this.transform(a.text)
@@ -4341,7 +4339,7 @@ const lt = class lt {
4341
4339
  return t ? Array.isArray(t) ? t : [t] : [];
4342
4340
  }
4343
4341
  getImagePath(t) {
4344
- return this.filePath.startsWith("http") ? new URL(t, this.filePath).href : si(this.basePath, t);
4342
+ return this.filePath.startsWith("http") ? new URL(t, this.filePath).href : ri(this.basePath, t);
4345
4343
  }
4346
4344
  /**
4347
4345
  * Check if the object is a tileset source reference
@@ -4368,23 +4366,23 @@ const lt = class lt {
4368
4366
  const t = ye.xml2js(this.xml, { compact: !0 }), e = ye.xml2js(this.xml), i = t.map.tileset;
4369
4367
  t.map.group;
4370
4368
  const s = (T) => {
4371
- const { objectgroup: E, group: S, layer: A, imagelayer: B } = T, F = (P) => {
4369
+ const { objectgroup: E, group: C, layer: A, imagelayer: B } = T, F = (P) => {
4372
4370
  P && lt.toArray(P).forEach((O) => {
4373
4371
  if (this.layers.has(+O._attributes.id))
4374
4372
  throw new Error(`Tiled Parser Error: Layer with id ${O._attributes.id} already exists`);
4375
4373
  this.layers.set(+O._attributes.id, O);
4376
4374
  });
4377
4375
  };
4378
- F(E), F(A), F(S), F(B), S && s(S);
4376
+ F(E), F(A), F(C), F(B), C && s(C);
4379
4377
  };
4380
4378
  s(t.map);
4381
4379
  const c = (T, E = []) => {
4382
- var S;
4380
+ var C;
4383
4381
  if (!T) return E;
4384
4382
  for (let A of T) {
4385
4383
  const { name: B } = A;
4386
4384
  if (!["layer", "group", "imagelayer", "objectgroup"].includes(B)) continue;
4387
- const F = (S = A.elements) == null ? void 0 : S.find((O) => O.name == "data");
4385
+ const F = (C = A.elements) == null ? void 0 : C.find((O) => O.name == "data");
4388
4386
  A.layer = this.layers.get(+A.attributes.id);
4389
4387
  const P = {
4390
4388
  ...this.transform(F) ?? {},
@@ -4623,7 +4621,7 @@ class It {
4623
4621
  if (s(t))
4624
4622
  c(t);
4625
4623
  else if (a || It.isBrowser()) {
4626
- let o = a ? t : si(this.basePath, t);
4624
+ let o = a ? t : ri(this.basePath, t);
4627
4625
  It.isBrowser() && window.urlCache && (o = window.urlCache[t]), fetch(o, {
4628
4626
  headers: {
4629
4627
  "Content-Type": "application/xml"
@@ -4641,16 +4639,16 @@ class It {
4641
4639
  E++, E == c.tilesets.length && !o && (c.tilesets = g, t(c));
4642
4640
  };
4643
4641
  let E = 0;
4644
- for (let S = 0; S < c.tilesets.length; S++) {
4645
- const A = c.tilesets[S];
4642
+ for (let C = 0; C < c.tilesets.length; C++) {
4643
+ const A = c.tilesets[C];
4646
4644
  if (!A.source || A.tiles || A.image || A.tile) {
4647
- g[S] = A, T();
4645
+ g[C] = A, T();
4648
4646
  continue;
4649
4647
  }
4650
4648
  i && It.typeOfFile(A.source).isPath && (A.source = s(A.source)), this._parseFile(A.source, "tileset", (B, F) => {
4651
4649
  if (F)
4652
4650
  return o = !0, t(null, F);
4653
- g[S] = {
4651
+ g[C] = {
4654
4652
  ...B,
4655
4653
  firstgid: A.firstgid
4656
4654
  }, T();
@@ -4676,7 +4674,7 @@ const Bt = {
4676
4674
  use32bitIndex: !1
4677
4675
  };
4678
4676
  var ur = Object.defineProperty, fr = (u, t, e) => t in u ? ur(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e, Mt = (u, t, e) => (fr(u, typeof t != "symbol" ? t + "" : t, e), e);
4679
- const jt = class qt extends ti {
4677
+ const jt = class qt extends Je {
4680
4678
  constructor(t) {
4681
4679
  const e = new Ie({
4682
4680
  data: new Float32Array(2),
@@ -4744,18 +4742,18 @@ Mt(jt, "vertSize", 13);
4744
4742
  Mt(jt, "vertPerQuad", 4);
4745
4743
  Mt(jt, "stride", jt.vertSize * 4);
4746
4744
  let dr = jt;
4747
- var pr = Object.defineProperty, mr = (u, t, e) => t in u ? pr(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e, Ct = (u, t, e) => (mr(u, typeof t != "symbol" ? t + "" : t, e), e);
4748
- class li {
4745
+ var pr = Object.defineProperty, mr = (u, t, e) => t in u ? pr(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e, St = (u, t, e) => (mr(u, typeof t != "symbol" ? t + "" : t, e), e);
4746
+ class oi {
4749
4747
  constructor() {
4750
- Ct(this, "pipe_uniforms", new ee({
4748
+ St(this, "pipe_uniforms", new ee({
4751
4749
  u_proj_trans: { value: new Ai(), type: "mat3x3<f32>" },
4752
4750
  u_anim_frame: { value: new Float32Array(2), type: "vec2<f32>" }
4753
4751
  }));
4754
4752
  }
4755
4753
  }
4756
- class ci {
4754
+ class li {
4757
4755
  constructor(t, e) {
4758
- Ct(this, "renderer"), Ct(this, "tileAnim", [0, 0]), Ct(this, "ibLen", 0), Ct(this, "indexBuffer", null), Ct(this, "shader"), Ct(this, "adaptor"), this.renderer = t, this.adaptor = e, this.adaptor.init(), this.indexBuffer = new Ie({
4756
+ St(this, "renderer"), St(this, "tileAnim", [0, 0]), St(this, "ibLen", 0), St(this, "indexBuffer", null), St(this, "shader"), St(this, "adaptor"), this.renderer = t, this.adaptor = e, this.adaptor.init(), this.indexBuffer = new Ie({
4759
4757
  data: new Uint16Array([0, 1, 2, 0, 2, 3]),
4760
4758
  label: "index-tilemap-buffer",
4761
4759
  usage: kt.INDEX | kt.COPY_DST
@@ -4809,7 +4807,7 @@ class ci {
4809
4807
  s.uProjectionMatrix.copyTo(i).append(s.uWorldTransformMatrix).append(t.worldTransform), t.compositeParent && (c = t.parent.tileAnim || c), a[0] = c[0], a[1] = c[1], e.update(), this.adaptor.execute(this, t);
4810
4808
  }
4811
4809
  }
4812
- Ct(ci, "extension", {
4810
+ St(li, "extension", {
4813
4811
  type: [
4814
4812
  Jt.WebGLPipes,
4815
4813
  Jt.WebGPUPipes
@@ -4874,7 +4872,7 @@ class Ot {
4874
4872
  const o = (a < s ? i[a] : null) || ie.EMPTY.source;
4875
4873
  t[c++] = o.source, t[c++] = o.style;
4876
4874
  }
4877
- return this.bind_group || (this.bind_group = new ei(t)), this.bind_group;
4875
+ return this.bind_group || (this.bind_group = new ti(t)), this.bind_group;
4878
4876
  }
4879
4877
  static generate_gpu_textures(t) {
4880
4878
  const e = [];
@@ -4969,7 +4967,7 @@ void main(void)
4969
4967
  finalColor = color * vAlpha;
4970
4968
  }
4971
4969
  `;
4972
- class hi extends li {
4970
+ class ci extends oi {
4973
4971
  constructor() {
4974
4972
  super(...arguments), be(this, "_shader", null), be(this, "max_textures", Bt.TEXTURES_PER_TILEMAP);
4975
4973
  }
@@ -4990,7 +4988,7 @@ class hi extends li {
4990
4988
  }
4991
4989
  init() {
4992
4990
  this._shader = new Te({
4993
- glProgram: ii.from({
4991
+ glProgram: ei.from({
4994
4992
  vertex: wr,
4995
4993
  fragment: vr.replace(
4996
4994
  "//include_textures",
@@ -5004,7 +5002,7 @@ class hi extends li {
5004
5002
  });
5005
5003
  }
5006
5004
  }
5007
- be(hi, "extension", {
5005
+ be(ci, "extension", {
5008
5006
  type: [
5009
5007
  Jt.WebGLPipesAdaptor
5010
5008
  ],
@@ -5075,7 +5073,7 @@ fn mainFrag(
5075
5073
  return color * vAlpha;
5076
5074
  };
5077
5075
  `;
5078
- class ui extends li {
5076
+ class hi extends oi {
5079
5077
  constructor() {
5080
5078
  super(...arguments), Zt(this, "_shader", null), Zt(this, "max_textures", Bt.TEXTURES_PER_TILEMAP), Zt(this, "bind_group", null);
5081
5079
  }
@@ -5093,26 +5091,26 @@ class ui extends li {
5093
5091
  }
5094
5092
  init() {
5095
5093
  this._shader = new Te({
5096
- gpuProgram: Si.from({
5094
+ gpuProgram: Ci.from({
5097
5095
  vertex: { source: Tr, entryPoint: "mainVert" },
5098
5096
  fragment: {
5099
5097
  source: Ar.replace("//include_textures", Ot.generate_gpu_textures(this.max_textures))
5100
5098
  }
5101
5099
  })
5102
- }), this.bind_group = new ei({
5100
+ }), this.bind_group = new ti({
5103
5101
  ut: this.pipe_uniforms
5104
5102
  });
5105
5103
  }
5106
5104
  }
5107
- Zt(ui, "extension", {
5105
+ Zt(hi, "extension", {
5108
5106
  type: [
5109
5107
  Jt.WebGPUPipesAdaptor
5110
5108
  ],
5111
5109
  name: "tilemap"
5112
5110
  });
5113
- var Sr = Object.defineProperty, Cr = (u, t, e) => t in u ? Sr(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e, J = (u, t, e) => (Cr(u, typeof t != "symbol" ? t + "" : t, e), e), fi = /* @__PURE__ */ ((u) => (u[u.U = 0] = "U", u[u.V = 1] = "V", u[u.X = 2] = "X", u[u.Y = 3] = "Y", u[u.TILE_WIDTH = 4] = "TILE_WIDTH", u[u.TILE_HEIGHT = 5] = "TILE_HEIGHT", u[u.ROTATE = 6] = "ROTATE", u[u.ANIM_X = 7] = "ANIM_X", u[u.ANIM_Y = 8] = "ANIM_Y", u[u.TEXTURE_INDEX = 9] = "TEXTURE_INDEX", u[u.ANIM_COUNT_X = 10] = "ANIM_COUNT_X", u[u.ANIM_COUNT_Y = 11] = "ANIM_COUNT_Y", u[u.ANIM_DIVISOR = 12] = "ANIM_DIVISOR", u[u.ALPHA = 13] = "ALPHA", u))(fi || {});
5114
- const _t = Object.keys(fi).length / 2;
5115
- class ze extends Ci {
5111
+ var Cr = Object.defineProperty, Sr = (u, t, e) => t in u ? Cr(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e, J = (u, t, e) => (Sr(u, typeof t != "symbol" ? t + "" : t, e), e), ui = /* @__PURE__ */ ((u) => (u[u.U = 0] = "U", u[u.V = 1] = "V", u[u.X = 2] = "X", u[u.Y = 3] = "Y", u[u.TILE_WIDTH = 4] = "TILE_WIDTH", u[u.TILE_HEIGHT = 5] = "TILE_HEIGHT", u[u.ROTATE = 6] = "ROTATE", u[u.ANIM_X = 7] = "ANIM_X", u[u.ANIM_Y = 8] = "ANIM_Y", u[u.TEXTURE_INDEX = 9] = "TEXTURE_INDEX", u[u.ANIM_COUNT_X = 10] = "ANIM_COUNT_X", u[u.ANIM_COUNT_Y = 11] = "ANIM_COUNT_Y", u[u.ANIM_DIVISOR = 12] = "ANIM_DIVISOR", u[u.ALPHA = 13] = "ALPHA", u))(ui || {});
5112
+ const _t = Object.keys(ui).length / 2;
5113
+ class He extends Si {
5116
5114
  /**
5117
5115
  * @param tileset - The tileset to use for the tilemap. This can be reset later with {@link Tilemap.setTileset}. The
5118
5116
  * base-textures in this array must not be duplicated.
@@ -5224,7 +5222,7 @@ class ze extends Ci {
5224
5222
  u: g = 0,
5225
5223
  v: T = 0,
5226
5224
  tileWidth: E = c.width,
5227
- tileHeight: S = c.height,
5225
+ tileHeight: C = c.height,
5228
5226
  animX: A = 0,
5229
5227
  animY: B = 0,
5230
5228
  rotate: F = 0,
@@ -5233,7 +5231,7 @@ class ze extends Ci {
5233
5231
  animDivisor: _ = 1,
5234
5232
  alpha: v = 1
5235
5233
  } = s, m = this.pointsBuf;
5236
- return this.hasAnimatedTile = this.hasAnimatedTile || A > 0 || B > 0, m.push(g), m.push(T), m.push(e), m.push(i), m.push(E), m.push(S), m.push(F), m.push(A | 0), m.push(B | 0), m.push(a), m.push(P), m.push(O), m.push(_), m.push(v), this.tilemapBounds.addFrame(e, i, e + E, i + S), this;
5234
+ return this.hasAnimatedTile = this.hasAnimatedTile || A > 0 || B > 0, m.push(g), m.push(T), m.push(e), m.push(i), m.push(E), m.push(C), m.push(F), m.push(A | 0), m.push(B | 0), m.push(a), m.push(P), m.push(O), m.push(_), m.push(v), this.tilemapBounds.addFrame(e, i, e + E, i + C), this;
5237
5235
  }
5238
5236
  /** Changes the rotation of the last tile. */
5239
5237
  tileRotate(t) {
@@ -5278,9 +5276,9 @@ class ze extends Ci {
5278
5276
  this.vbBuffer = new ArrayBuffer(A), this.vbArray = new Float32Array(this.vbBuffer), this.vbInts = new Uint32Array(this.vbBuffer);
5279
5277
  }
5280
5278
  const g = this.vbArray, T = this.vbInts;
5281
- let E = 0, S = 0;
5279
+ let E = 0, C = 0;
5282
5280
  for (let A = 0; A < e.length; A += _t) {
5283
- this.compositeParent && (S = e[
5281
+ this.compositeParent && (C = e[
5284
5282
  A + 9
5285
5283
  /* TEXTURE_INDEX */
5286
5284
  ]);
@@ -5326,16 +5324,16 @@ class ze extends Ci {
5326
5324
  A + 13
5327
5325
  /* ALPHA */
5328
5326
  ];
5329
- let it, ft, at, pt, Y, Ft, wt, vt;
5327
+ let et, ft, at, pt, Y, Ft, wt, vt;
5330
5328
  if (f === 0)
5331
- it = v, ft = m, at = v + O, pt = m, Y = v + O, Ft = m + _, wt = v, vt = m + _;
5329
+ et = v, ft = m, at = v + O, pt = m, Y = v + O, Ft = m + _, wt = v, vt = m + _;
5332
5330
  else {
5333
5331
  let G = O / 2, j = _ / 2;
5334
5332
  f % 4 !== 0 && (G = _ / 2, j = O / 2);
5335
5333
  const bt = v + G, gt = m + j;
5336
- f = tt.add(f, tt.NW), it = bt + G * tt.uX(f), ft = gt + j * tt.uY(f), f = tt.add(f, 2), at = bt + G * tt.uX(f), pt = gt + j * tt.uY(f), f = tt.add(f, 2), Y = bt + G * tt.uX(f), Ft = gt + j * tt.uY(f), f = tt.add(f, 2), wt = bt + G * tt.uX(f), vt = gt + j * tt.uY(f);
5334
+ f = tt.add(f, tt.NW), et = bt + G * tt.uX(f), ft = gt + j * tt.uY(f), f = tt.add(f, 2), at = bt + G * tt.uX(f), pt = gt + j * tt.uY(f), f = tt.add(f, 2), Y = bt + G * tt.uX(f), Ft = gt + j * tt.uY(f), f = tt.add(f, 2), wt = bt + G * tt.uX(f), vt = gt + j * tt.uY(f);
5337
5335
  }
5338
- g[E++] = F, g[E++] = P, g[E++] = it, g[E++] = ft, g[E++] = v + 0.5, g[E++] = m + 0.5, g[E++] = v + O - 0.5, g[E++] = m + _ - 0.5, g[E++] = y, g[E++] = k, T[E++] = S, g[E++] = st, g[E++] = X, g[E++] = F + O, g[E++] = P, g[E++] = at, g[E++] = pt, g[E++] = v + 0.5, g[E++] = m + 0.5, g[E++] = v + O - 0.5, g[E++] = m + _ - 0.5, g[E++] = y, g[E++] = k, T[E++] = S, g[E++] = st, g[E++] = X, g[E++] = F + O, g[E++] = P + _, g[E++] = Y, g[E++] = Ft, g[E++] = v + 0.5, g[E++] = m + 0.5, g[E++] = v + O - 0.5, g[E++] = m + _ - 0.5, g[E++] = y, g[E++] = k, T[E++] = S, g[E++] = st, g[E++] = X, g[E++] = F, g[E++] = P + _, g[E++] = wt, g[E++] = vt, g[E++] = v + 0.5, g[E++] = m + 0.5, g[E++] = v + O - 0.5, g[E++] = m + _ - 0.5, g[E++] = y, g[E++] = k, T[E++] = S, g[E++] = st, g[E++] = X;
5336
+ g[E++] = F, g[E++] = P, g[E++] = et, g[E++] = ft, g[E++] = v + 0.5, g[E++] = m + 0.5, g[E++] = v + O - 0.5, g[E++] = m + _ - 0.5, g[E++] = y, g[E++] = k, T[E++] = C, g[E++] = st, g[E++] = X, g[E++] = F + O, g[E++] = P, g[E++] = at, g[E++] = pt, g[E++] = v + 0.5, g[E++] = m + 0.5, g[E++] = v + O - 0.5, g[E++] = m + _ - 0.5, g[E++] = y, g[E++] = k, T[E++] = C, g[E++] = st, g[E++] = X, g[E++] = F + O, g[E++] = P + _, g[E++] = Y, g[E++] = Ft, g[E++] = v + 0.5, g[E++] = m + 0.5, g[E++] = v + O - 0.5, g[E++] = m + _ - 0.5, g[E++] = y, g[E++] = k, T[E++] = C, g[E++] = st, g[E++] = X, g[E++] = F, g[E++] = P + _, g[E++] = wt, g[E++] = vt, g[E++] = v + 0.5, g[E++] = m + 0.5, g[E++] = v + O - 0.5, g[E++] = m + _ - 0.5, g[E++] = y, g[E++] = k, T[E++] = C, g[E++] = st, g[E++] = X;
5339
5337
  }
5340
5338
  a.data = g;
5341
5339
  }
@@ -5388,7 +5386,7 @@ class ze extends Ci {
5388
5386
  * @deprecated Since @pixi/tilemap 3.
5389
5387
  */
5390
5388
  // eslint-disable-next-line max-params
5391
- addRect(t, e, i, s, c, a, o, g = 0, T = 0, E = 0, S = 1024, A = 1024, B = 1, F = 1) {
5389
+ addRect(t, e, i, s, c, a, o, g = 0, T = 0, E = 0, C = 1024, A = 1024, B = 1, F = 1) {
5392
5390
  return this.tile(
5393
5391
  t,
5394
5392
  s,
@@ -5401,7 +5399,7 @@ class ze extends Ci {
5401
5399
  animX: g,
5402
5400
  animY: T,
5403
5401
  rotate: E,
5404
- animCountX: S,
5402
+ animCountX: C,
5405
5403
  animCountY: A,
5406
5404
  animDivisor: B,
5407
5405
  alpha: F
@@ -5436,7 +5434,7 @@ class Fr extends Ni {
5436
5434
  t.slice(c * e, (c + 1) * e)
5437
5435
  );
5438
5436
  for (let c = i; c < s; c++) {
5439
- const a = new ze(t.slice(c * e, (c + 1) * e));
5437
+ const a = new He(t.slice(c * e, (c + 1) * e));
5440
5438
  a.compositeParent = !0, this.addChild(a);
5441
5439
  }
5442
5440
  return this;
@@ -5526,7 +5524,7 @@ class Fr extends Ni {
5526
5524
  break;
5527
5525
  }
5528
5526
  }
5529
- c || (c = new ze(t.source), c.compositeParent = !0, this.addChild(c));
5527
+ c || (c = new He(t.source), c.compositeParent = !0, this.addChild(c));
5530
5528
  }
5531
5529
  c.tile(
5532
5530
  t,
@@ -5584,7 +5582,7 @@ class Fr extends Ni {
5584
5582
  * @see CompositeTilemap.tile
5585
5583
  */
5586
5584
  // eslint-disable-next-line max-params
5587
- addRect(t, e, i, s, c, a, o, g, T, E, S, A) {
5585
+ addRect(t, e, i, s, c, a, o, g, T, E, C, A) {
5588
5586
  const B = t / this.texturesPerTilemap >> 0, F = t % this.texturesPerTilemap;
5589
5587
  return this.children[B] && this.children[B].getTileset().count > 0 ? (this.lastModifiedTilemap = this.children[B], this.lastModifiedTilemap.addRect(
5590
5588
  F,
@@ -5597,7 +5595,7 @@ class Fr extends Ni {
5597
5595
  g,
5598
5596
  T,
5599
5597
  E,
5600
- S,
5598
+ C,
5601
5599
  A
5602
5600
  )) : this.lastModifiedTilemap = null, this;
5603
5601
  }
@@ -5610,9 +5608,9 @@ class Fr extends Ni {
5610
5608
  return this.texturesPerTilemap;
5611
5609
  }
5612
5610
  }
5611
+ Ae.add(li);
5613
5612
  Ae.add(ci);
5614
5613
  Ae.add(hi);
5615
- Ae.add(ui);
5616
5614
  class te extends Pi {
5617
5615
  constructor(t, e) {
5618
5616
  super(te.getTextures(t, e)), this.tile = t, this.tileSet = e, this.animations = [], this._x = 0, this._y = 0, this.properties = {}, this.animations = t.animations || [], this.properties = t.properties, this.textures = te.getTextures(t, e), this.texture = this.textures[0], this.flip();
@@ -5661,10 +5659,10 @@ class Ne extends Ei(Fr) {
5661
5659
  s && (t = Math.floor(t / a), e = Math.floor(e / o));
5662
5660
  const T = t + e * g, E = this._layer.getTileByIndex(T);
5663
5661
  if (!E || E && E.gid == 0) return;
5664
- const S = Ne.findTileSet(E.gid, this.tileSets);
5665
- if (!S) return;
5666
- const A = new te(E, S);
5667
- if (A.x = t * a, A.y = e * o + (o - A.texture.height), A._x = t, A._y = e, S.tileoffset && (A.x += S.tileoffset.x ?? 0, A.y += S.tileoffset.y ?? 0), !(c && !c(A)))
5662
+ const C = Ne.findTileSet(E.gid, this.tileSets);
5663
+ if (!C) return;
5664
+ const A = new te(E, C);
5665
+ if (A.x = t * a, A.y = e * o + (o - A.texture.height), A._x = t, A._y = e, C.tileoffset && (A.x += C.tileoffset.x ?? 0, A.y += C.tileoffset.y ?? 0), !(c && !c(A)))
5668
5666
  return A;
5669
5667
  }
5670
5668
  _addFrame(t, e, i) {
@@ -5741,30 +5739,30 @@ function Or(u, t, e) {
5741
5739
  continue;
5742
5740
  }
5743
5741
  for (let E = 0; E < g.length; E++) {
5744
- const S = g[E];
5745
- if (S === 0) continue;
5742
+ const C = g[E];
5743
+ if (C === 0) continue;
5746
5744
  let A;
5747
5745
  for (let O = t.length - 1; O >= 0; O--)
5748
- if (t[O].firstgid && t[O].firstgid <= S) {
5746
+ if (t[O].firstgid && t[O].firstgid <= C) {
5749
5747
  A = t[O];
5750
5748
  break;
5751
5749
  }
5752
5750
  if (!A) {
5753
- o.has(0) || o.set(0, new Array(g.length).fill(0)), o.get(0)[E] = S;
5751
+ o.has(0) || o.set(0, new Array(g.length).fill(0)), o.get(0)[E] = C;
5754
5752
  continue;
5755
5753
  }
5756
- const B = S - A.firstgid, F = (c = (s = A.tileset.tiles) == null ? void 0 : s[B]) == null ? void 0 : c.properties, P = (F == null ? void 0 : F.z) ?? 0;
5757
- F == null || F.z, o.has(P) || o.set(P, new Array(g.length).fill(0)), o.get(P)[E] = S;
5754
+ const B = C - A.firstgid, F = (c = (s = A.tileset.tiles) == null ? void 0 : s[B]) == null ? void 0 : c.properties, P = (F == null ? void 0 : F.z) ?? 0;
5755
+ F == null || F.z, o.has(P) || o.set(P, new Array(g.length).fill(0)), o.get(P)[E] = C;
5758
5756
  }
5759
- const T = Array.from(o.keys()).sort((E, S) => E - S);
5757
+ const T = Array.from(o.keys()).sort((E, C) => E - C);
5760
5758
  for (const E of T) {
5761
- const S = o.get(E);
5762
- if (S.some((A) => A !== 0)) {
5759
+ const C = o.get(E);
5760
+ if (C.some((A) => A !== 0)) {
5763
5761
  const A = {
5764
5762
  ...a,
5765
5763
  name: `${a.name}_z${E}`,
5766
5764
  // Always add _z suffix
5767
- data: S,
5765
+ data: C,
5768
5766
  properties: {
5769
5767
  ...a.properties,
5770
5768
  z: E
@@ -5775,8 +5773,8 @@ function Or(u, t, e) {
5775
5773
  }
5776
5774
  }
5777
5775
  return i.sort((a, o) => {
5778
- var E, S;
5779
- const g = ((E = a.properties) == null ? void 0 : E.z) ?? 0.5, T = ((S = o.properties) == null ? void 0 : S.z) ?? 0.5;
5776
+ var E, C;
5777
+ const g = ((E = a.properties) == null ? void 0 : E.z) ?? 0.5, T = ((C = o.properties) == null ? void 0 : C.z) ?? 0.5;
5780
5778
  return g - T;
5781
5779
  }), i;
5782
5780
  }
@@ -5784,30 +5782,30 @@ function jr(u) {
5784
5782
  const { map: t, basePath: e, createLayersPerTilesZ: i } = $t(u, {
5785
5783
  createLayersPerTilesZ: !1,
5786
5784
  basePath: ""
5787
- }), s = rt([]), c = u.objectLayer;
5785
+ }), s = it([]), c = u.objectLayer;
5788
5786
  let a = [], o = {};
5789
- const g = async (E, S = "") => typeof E != "string" ? E : await new It(
5787
+ const g = async (E, C = "") => typeof E != "string" ? E : await new It(
5790
5788
  E,
5791
5789
  {
5792
- basePath: S
5790
+ basePath: C
5793
5791
  }
5794
5792
  ).parseFilePromise({
5795
5793
  getOnlyBasename: !1
5796
5794
  });
5797
- Je(async () => {
5795
+ Ze(async () => {
5798
5796
  const E = t();
5799
5797
  if (E) {
5800
5798
  o = await g(E, e()), a = [];
5801
5799
  for (let A of o.tilesets)
5802
5800
  A.tile && (A.tiles = A.tile), A.tiles || (A.tiles = []), a.push(await new Pr(A).load(A.image.source));
5803
- let S = o.layers;
5804
- i() && (S = Or(o.layers, a)), s.set(S);
5801
+ let C = o.layers;
5802
+ i() && (C = Or(o.layers, a)), s.set(C);
5805
5803
  }
5806
5804
  });
5807
- const T = (E, S = {}) => et(Nt, S, vi(E, (A) => {
5805
+ const T = (E, C = {}) => rt(Nt, C, vi(E, (A) => {
5808
5806
  switch (A.type) {
5809
5807
  case Ut.Tile:
5810
- return et(Nr, {
5808
+ return rt(Nr, {
5811
5809
  tilewidth: o.tilewidth,
5812
5810
  tileheight: o.tileheight,
5813
5811
  // @ts-ignore
@@ -5819,31 +5817,31 @@ function jr(u) {
5819
5817
  });
5820
5818
  case Ut.Image:
5821
5819
  const { width: B, height: F, source: P } = A.image;
5822
- return et(bi, {
5820
+ return rt(bi, {
5823
5821
  image: P,
5824
5822
  ...A,
5825
5823
  width: A.repeatx ? A.width * A.tilewidth : B,
5826
5824
  height: A.repeaty ? A.height * A.tileheight : F
5827
5825
  });
5828
5826
  case Ut.Group:
5829
- return T(rt(A.layers), A);
5827
+ return T(it(A.layers), A);
5830
5828
  case Ut.ObjectGroup:
5831
5829
  const O = c == null ? void 0 : c(A);
5832
- return et(Nt, A, O);
5830
+ return rt(Nt, A, O);
5833
5831
  default:
5834
- return et(Nt);
5832
+ return rt(Nt);
5835
5833
  }
5836
5834
  }));
5837
- return et(Nt, u, T(s));
5835
+ return rt(Nt, u, T(s));
5838
5836
  }
5839
5837
  const Dr = (u) => {
5840
5838
  const {
5841
- speed: t = rt(0.5),
5842
- windDirection: e = rt(0),
5843
- windStrength: i = rt(0.2),
5844
- density: s = rt(180),
5845
- resolution: c = rt([1e3, 1e3])
5846
- } = $t(u), a = typeof t == "function" ? t : rt(t), o = typeof e == "function" ? e : rt(e), g = typeof i == "function" ? i : rt(i), T = typeof s == "function" ? s : rt(s), E = typeof c == "function" ? c : rt(c), S = (
5839
+ speed: t = it(0.5),
5840
+ windDirection: e = it(0),
5841
+ windStrength: i = it(0.2),
5842
+ density: s = it(180),
5843
+ resolution: c = it([1e3, 1e3])
5844
+ } = $t(u), a = typeof t == "function" ? t : it(t), o = typeof e == "function" ? e : it(e), g = typeof i == "function" ? i : it(i), T = typeof s == "function" ? s : it(s), E = typeof c == "function" ? c : it(c), C = (
5847
5845
  /* glsl */
5848
5846
  `
5849
5847
  precision mediump float;
@@ -5938,7 +5936,7 @@ const Dr = (u) => {
5938
5936
  gl_FragColor = vec4(rainColor * rain, rain * 0.8);
5939
5937
  }
5940
5938
  `
5941
- ), B = new ii({ vertex: S, fragment: A }), F = new ee({
5939
+ ), B = new ei({ vertex: C, fragment: A }), F = new ee({
5942
5940
  uTime: { value: 0, type: "f32" },
5943
5941
  uResolution: { value: E(), type: "vec2<f32>" },
5944
5942
  uRainSpeed: { value: a(), type: "f32" },
@@ -5950,16 +5948,16 @@ const Dr = (u) => {
5950
5948
  resources: {
5951
5949
  uniforms: F
5952
5950
  }
5953
- }), O = new ti({
5951
+ }), O = new Je({
5954
5952
  attributes: {
5955
5953
  aPosition: [-1, -1, 1, -1, 1, 1, -1, 1],
5956
5954
  aUV: [0, 0, 1, 0, 1, 1, 0, 1]
5957
5955
  },
5958
5956
  indexBuffer: [0, 1, 2, 0, 2, 3]
5959
5957
  });
5960
- return Qe(({ deltaTime: _ }) => {
5958
+ return ze(({ deltaTime: _ }) => {
5961
5959
  F.uniforms.uTime += _, F.uniforms.uRainSpeed = a(), F.uniforms.uWindDirection = o(), F.uniforms.uWindStrength = g(), F.uniforms.uRainDensity = T(), F.uniforms.uResolution = E();
5962
- }), et(Ii, {
5960
+ }), rt(Ii, {
5963
5961
  geometry: O,
5964
5962
  shader: P
5965
5963
  });