@gamebob/axon-surge 0.8.0 → 0.9.0

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.
@@ -1,4 +1,4 @@
1
- class K {
1
+ class V {
2
2
  listeners = /* @__PURE__ */ new Map();
3
3
  on(t, e) {
4
4
  return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(e), () => this.off(t, e);
@@ -15,7 +15,7 @@ class K {
15
15
  this.listeners.clear();
16
16
  }
17
17
  }
18
- class W {
18
+ class F {
19
19
  animationFrameId = null;
20
20
  lastTime = 0;
21
21
  isRunning = !1;
@@ -36,7 +36,7 @@ class W {
36
36
  this.lastTime = t, this.updateCallback(e), this.renderCallback(), this.animationFrameId = requestAnimationFrame(this.tick);
37
37
  }
38
38
  }
39
- class V {
39
+ class Y {
40
40
  position;
41
41
  radius = 32;
42
42
  integrity = 3;
@@ -60,7 +60,7 @@ class V {
60
60
  this.position = { x: t, y: e }, this.integrity = this.maxIntegrity, this.pulsePhase = 0;
61
61
  }
62
62
  }
63
- class D {
63
+ class U {
64
64
  id;
65
65
  position = { x: 0, y: 0 };
66
66
  velocity = { x: 0, y: 0 };
@@ -114,7 +114,7 @@ class D {
114
114
  this.active = !1, this.isGrabbed = !1, this.isThrown = !1, this.wasManipulated = !1, this.isDying = !1, this.deathType = "none", this.deathTimer = 0, this.sliceAngle = 0, this.position = { x: 0, y: 0 }, this.velocity = { x: 0, y: 0 }, this.rotation = 0, this.strategy = null, this.maxSpeed = 200;
115
115
  }
116
116
  }
117
- class F {
117
+ class J {
118
118
  pointerPosition = { x: 0, y: 0 };
119
119
  isPointerDown = !1;
120
120
  grabbedEnemy = null;
@@ -134,8 +134,8 @@ class F {
134
134
  y: this.pointerPosition.y,
135
135
  time: l
136
136
  });
137
- const r = l - 0.08;
138
- this.pointerHistory = this.pointerHistory.filter((n) => n.time >= r), this.grabbedEnemy && (this.grabbedEnemy.position = { ...this.pointerPosition });
137
+ const o = l - 0.08;
138
+ this.pointerHistory = this.pointerHistory.filter((n) => n.time >= o), this.grabbedEnemy && (this.grabbedEnemy.position = { ...this.pointerPosition });
139
139
  }
140
140
  bindEvents() {
141
141
  this.canvas.addEventListener("mousemove", (t) => {
@@ -188,20 +188,20 @@ class F {
188
188
  const i = performance.now() / 1e3 - 0.08, s = this.pointerHistory.filter((n) => n.time >= i);
189
189
  let a = 0, l = 0;
190
190
  if (s.length >= 2) {
191
- const n = s[0], o = s[s.length - 1], h = Math.max(0.01, o.time - n.time);
192
- a = (o.x - n.x) / h, l = (o.y - n.y) / h;
191
+ const n = s[0], r = s[s.length - 1], h = Math.max(0.01, r.time - n.time);
192
+ a = (r.x - n.x) / h, l = (r.y - n.y) / h;
193
193
  }
194
- const r = Math.hypot(a, l);
195
- if (r > 30) {
196
- const o = Math.min(r * 1.15, 2500), h = Math.atan2(l, a);
194
+ const o = Math.hypot(a, l);
195
+ if (o > 30) {
196
+ const r = Math.min(o * 1.15, 2500), h = Math.atan2(l, a);
197
197
  t.velocity = {
198
- x: Math.cos(h) * o,
199
- y: Math.sin(h) * o
198
+ x: Math.cos(h) * r,
199
+ y: Math.sin(h) * r
200
200
  };
201
201
  } else if (this.dragStart) {
202
- const n = t.position.x - this.dragStart.x, o = t.position.y - this.dragStart.y, h = Math.hypot(n, o);
202
+ const n = t.position.x - this.dragStart.x, r = t.position.y - this.dragStart.y, h = Math.hypot(n, r);
203
203
  if (h > 5) {
204
- const c = Math.atan2(o, n), u = Math.min(h * 4, 600);
204
+ const c = Math.atan2(r, n), u = Math.min(h * 4, 600);
205
205
  t.velocity = {
206
206
  x: Math.cos(c) * u,
207
207
  y: Math.sin(c) * u
@@ -218,7 +218,7 @@ class F {
218
218
  this.grabbedEnemy = null, this.dragStart = null, this.pointerHistory = [], this.isPointerDown = !1;
219
219
  }
220
220
  }
221
- class Y {
221
+ class Z {
222
222
  cellSize;
223
223
  grid = /* @__PURE__ */ new Map();
224
224
  constructor(t = 100) {
@@ -230,22 +230,22 @@ class Y {
230
230
  insert(t) {
231
231
  const e = Math.floor((t.position.x - t.radius) / this.cellSize), i = Math.floor((t.position.x + t.radius) / this.cellSize), s = Math.floor((t.position.y - t.radius) / this.cellSize), a = Math.floor((t.position.y + t.radius) / this.cellSize);
232
232
  for (let l = e; l <= i; l++)
233
- for (let r = s; r <= a; r++) {
234
- const n = `${l}:${r}`;
233
+ for (let o = s; o <= a; o++) {
234
+ const n = `${l}:${o}`;
235
235
  this.grid.has(n) || this.grid.set(n, /* @__PURE__ */ new Set()), this.grid.get(n).add(t);
236
236
  }
237
237
  }
238
238
  getNearby(t, e) {
239
- const i = /* @__PURE__ */ new Set(), s = Math.floor((t.x - e) / this.cellSize), a = Math.floor((t.x + e) / this.cellSize), l = Math.floor((t.y - e) / this.cellSize), r = Math.floor((t.y + e) / this.cellSize);
239
+ const i = /* @__PURE__ */ new Set(), s = Math.floor((t.x - e) / this.cellSize), a = Math.floor((t.x + e) / this.cellSize), l = Math.floor((t.y - e) / this.cellSize), o = Math.floor((t.y + e) / this.cellSize);
240
240
  for (let n = s; n <= a; n++)
241
- for (let o = l; o <= r; o++) {
242
- const h = `${n}:${o}`, c = this.grid.get(h);
241
+ for (let r = l; r <= o; r++) {
242
+ const h = `${n}:${r}`, c = this.grid.get(h);
243
243
  c && c.forEach((u) => i.add(u));
244
244
  }
245
245
  return i;
246
246
  }
247
247
  }
248
- class J {
248
+ class X {
249
249
  hitstopTime = 0;
250
250
  shakeTime = 0;
251
251
  shakeDuration = 0.14;
@@ -285,7 +285,7 @@ class J {
285
285
  };
286
286
  }
287
287
  }
288
- const R = {
288
+ const N = {
289
289
  es: {
290
290
  title: "AXON SURGE",
291
291
  startButton: "INICIAR ENLACE",
@@ -631,7 +631,7 @@ const R = {
631
631
  tutorialStep2Text: "步骤 2: 朝目标快速挥动抛投",
632
632
  tutorialDragWarning: "最佳策略是快速挥动抛投!"
633
633
  }
634
- }, H = [
634
+ }, K = [
635
635
  "es",
636
636
  "en",
637
637
  "fr",
@@ -648,29 +648,29 @@ const R = {
648
648
  "ko",
649
649
  "zh"
650
650
  ];
651
- function N(E) {
652
- return H.includes(E);
651
+ function P(T) {
652
+ return K.includes(T);
653
653
  }
654
- const k = "axon_surge_language", U = "axon_surge_language_explicit";
655
- class Z {
654
+ const H = "axon_surge_language";
655
+ class $ {
656
656
  currentLanguage;
657
657
  constructor(t) {
658
658
  this.currentLanguage = this.detectLanguage(t);
659
659
  }
660
660
  detectLanguage(t) {
661
- if (t && N(t))
662
- return t;
663
661
  try {
664
- const e = localStorage.getItem(U) === "true", i = localStorage.getItem(k);
665
- if (e && i && N(i))
666
- return i;
662
+ const e = localStorage.getItem(H);
663
+ if (e && P(e))
664
+ return e;
667
665
  } catch {
668
666
  }
667
+ if (t && P(t))
668
+ return t;
669
669
  try {
670
670
  const e = (document.documentElement.lang || document.body?.getAttribute("lang") || document.documentElement.getAttribute("data-lang") || "").toLowerCase();
671
671
  if (e) {
672
672
  const i = e.split("-")[0];
673
- if (i && N(i))
673
+ if (i && P(i))
674
674
  return i;
675
675
  }
676
676
  } catch {
@@ -679,31 +679,33 @@ class Z {
679
679
  const e = (navigator.language || navigator.languages && navigator.languages[0] || "").toLowerCase();
680
680
  if (e) {
681
681
  const i = e.split("-")[0];
682
- if (i && N(i))
682
+ if (i && P(i))
683
683
  return i;
684
684
  }
685
685
  } catch {
686
686
  }
687
687
  return "en";
688
688
  }
689
- setLanguage(t, e = !0) {
690
- if (R[t] && (this.currentLanguage = t, e))
689
+ setLanguage(t) {
690
+ if (N[t]) {
691
+ this.currentLanguage = t;
691
692
  try {
692
- localStorage.setItem(k, t), localStorage.setItem(U, "true");
693
+ localStorage.setItem(H, t);
693
694
  } catch {
694
695
  }
696
+ }
695
697
  }
696
698
  getLanguage() {
697
699
  return this.currentLanguage;
698
700
  }
699
701
  translate(t, e) {
700
- let s = (R[this.currentLanguage] || R.en)[t] || R.en[t] || String(t);
702
+ let s = (N[this.currentLanguage] || N.en)[t] || N.en[t] || String(t);
701
703
  return e && Object.entries(e).forEach(([a, l]) => {
702
704
  s = s.replace(`{${a}}`, String(l));
703
705
  }), s;
704
706
  }
705
707
  }
706
- class X {
708
+ class z {
707
709
  execute(t) {
708
710
  const { thrownEnemy: e, targetEnemy: i, shockwaves: s, particles: a, floatingTexts: l } = t;
709
711
  i.active = !1, s.push({
@@ -716,12 +718,12 @@ class X {
716
718
  lifetime: 0,
717
719
  maxLifetime: 0.5
718
720
  });
719
- for (let r = 0; r < 30; r++) {
720
- const n = Math.random() * Math.PI * 2, o = 180 + Math.random() * 320;
721
+ for (let o = 0; o < 30; o++) {
722
+ const n = Math.random() * Math.PI * 2, r = 180 + Math.random() * 320;
721
723
  a.push({
722
724
  id: Math.random().toString(),
723
725
  position: { ...i.position },
724
- velocity: { x: Math.cos(n) * o, y: Math.sin(n) * o },
726
+ velocity: { x: Math.cos(n) * r, y: Math.sin(n) * r },
725
727
  color: "#ff2a5f",
726
728
  radius: 3 + Math.random() * 4,
727
729
  alpha: 1,
@@ -744,7 +746,7 @@ class X {
744
746
  }
745
747
  class _ {
746
748
  execute(t) {
747
- const { thrownEnemy: e, pools: i, shockwaves: s, particles: a, floatingTexts: l, eventBus: r } = t, n = e.position;
749
+ const { thrownEnemy: e, pools: i, shockwaves: s, particles: a, floatingTexts: l, eventBus: o } = t, n = e.position;
748
750
  i.push({
749
751
  id: Math.random().toString(),
750
752
  position: { ...n },
@@ -762,7 +764,7 @@ class _ {
762
764
  lifetime: 0,
763
765
  maxLifetime: 0.6
764
766
  });
765
- for (let o = 0; o < 45; o++) {
767
+ for (let r = 0; r < 45; r++) {
766
768
  const h = Math.random() * Math.PI * 2, c = 120 + Math.random() * 260;
767
769
  a.push({
768
770
  id: Math.random().toString(),
@@ -785,12 +787,12 @@ class _ {
785
787
  lifetime: 0,
786
788
  maxLifetime: 1.2,
787
789
  size: 26
788
- }), e.active = !1, r.emit("onPoolCreated", { position: n });
790
+ }), e.active = !1, o.emit("onPoolCreated", { position: n });
789
791
  }
790
792
  }
791
- class $ {
793
+ class q {
792
794
  execute(t) {
793
- const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: l, floatingTexts: r } = t, n = i.position;
795
+ const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: l, floatingTexts: o } = t, n = i.position;
794
796
  e.active = !1, i.active = !1, a.push({
795
797
  id: Math.random().toString(),
796
798
  position: { ...n },
@@ -801,17 +803,17 @@ class $ {
801
803
  lifetime: 0,
802
804
  maxLifetime: 0.6
803
805
  });
804
- for (let o = 0; o < 6; o++) {
805
- const h = o * Math.PI * 2 / 6, c = {
806
+ for (let r = 0; r < 6; r++) {
807
+ const h = r * Math.PI * 2 / 6, c = {
806
808
  x: n.x + Math.cos(h) * 15,
807
809
  y: n.y + Math.sin(h) * 15
808
- }, u = S.createEnemy("micro", c, {
810
+ }, u = L.createEnemy("micro", c, {
809
811
  x: c.x + Math.cos(h) * 200,
810
812
  y: c.y + Math.sin(h) * 200
811
813
  });
812
814
  u.isThrown = !0, s.push(u);
813
815
  }
814
- for (let o = 0; o < 35; o++) {
816
+ for (let r = 0; r < 35; r++) {
815
817
  const h = Math.random() * Math.PI * 2, c = 200 + Math.random() * 300;
816
818
  l.push({
817
819
  id: Math.random().toString(),
@@ -824,7 +826,7 @@ class $ {
824
826
  maxLifetime: 0.6
825
827
  });
826
828
  }
827
- r.push({
829
+ o.push({
828
830
  id: Math.random().toString(),
829
831
  text: "CLUSTER DETONATION",
830
832
  position: { ...n },
@@ -837,7 +839,7 @@ class $ {
837
839
  });
838
840
  }
839
841
  }
840
- class z {
842
+ class j {
841
843
  execute(t) {
842
844
  const { thrownEnemy: e, targetEnemy: i, vortices: s, shockwaves: a } = t, l = {
843
845
  x: (e.position.x + i.position.x) / 2,
@@ -862,31 +864,31 @@ class z {
862
864
  }), e.triggerDissolveDeath(), i.triggerDissolveDeath();
863
865
  }
864
866
  }
865
- class S {
867
+ class L {
866
868
  static createEnemy(t, e, i) {
867
- const s = `enemy_${Date.now()}_${Math.random()}`, a = new D(s);
869
+ const s = `enemy_${Date.now()}_${Math.random()}`, a = new U(s);
868
870
  return this.configureEnemy(a, t, e, i), a;
869
871
  }
870
872
  static configureEnemy(t, e, i, s) {
871
873
  t.type = e, t.position = { ...i }, t.active = !0, t.isGrabbed = !1, t.isThrown = !1;
872
- const a = s.x - i.x, l = s.y - i.y, r = Math.atan2(l, a);
873
- let n = 70, o = 100, h = 20, c = "#ff2a5f", u = null;
874
- e === "piercer" ? (n = 95, o = 140, h = 18, c = "#ff2a5f", u = new X()) : e === "spore" ? (n = 65, o = 90, h = 24, c = "#39ff14", u = new _()) : e === "cluster" ? (n = 50, o = 75, h = 26, c = "#ffd700", u = new $()) : e === "parasite" ? (n = 80, o = 110, h = 22, c = "#9d4edd", u = new z()) : e === "micro" && (n = 130, o = 160, h = 12, c = "#ffd700"), t.radius = h, t.color = c, t.strategy = u, t.maxSpeed = o, t.velocity = {
875
- x: Math.cos(r) * n,
876
- y: Math.sin(r) * n
874
+ const a = s.x - i.x, l = s.y - i.y, o = Math.atan2(l, a);
875
+ let n = 70, r = 100, h = 20, c = "#ff2a5f", u = null;
876
+ e === "piercer" ? (n = 95, r = 140, h = 18, c = "#ff2a5f", u = new z()) : e === "spore" ? (n = 65, r = 90, h = 24, c = "#39ff14", u = new _()) : e === "cluster" ? (n = 50, r = 75, h = 26, c = "#ffd700", u = new q()) : e === "parasite" ? (n = 80, r = 110, h = 22, c = "#9d4edd", u = new j()) : e === "micro" && (n = 130, r = 160, h = 12, c = "#ffd700"), t.radius = h, t.color = c, t.strategy = u, t.maxSpeed = r, t.velocity = {
877
+ x: Math.cos(o) * n,
878
+ y: Math.sin(o) * n
877
879
  };
878
880
  }
879
881
  }
880
- class q {
882
+ class Q {
881
883
  spatialHash;
882
884
  eventBus;
883
885
  i18n;
884
886
  currentThrowKills = 0;
885
887
  currentThrowPos = null;
886
888
  constructor(t, e) {
887
- this.spatialHash = new Y(100), this.eventBus = t, this.i18n = e;
889
+ this.spatialHash = new Z(100), this.eventBus = t, this.i18n = e;
888
890
  }
889
- update(t, e, i, s, a, l, r, n, o, h, c, u, p, f) {
891
+ update(t, e, i, s, a, l, o, n, r, h, c, u, p, f) {
890
892
  this.spatialHash.clear();
891
893
  for (const d of i)
892
894
  d.active && !d.isDying ? (d.update(t), this.spatialHash.insert(d)) : d.active && d.isDying && d.update(t);
@@ -903,10 +905,10 @@ class q {
903
905
  m.duration += t;
904
906
  for (const x of i) {
905
907
  if (!x.active || x.isGrabbed || x.isDying || x.isThrown && x.type === "piercer") continue;
906
- const L = m.position.x - x.position.x, A = m.position.y - x.position.y, b = Math.hypot(L, A);
908
+ const S = m.position.x - x.position.x, v = m.position.y - x.position.y, b = Math.hypot(S, v);
907
909
  if (b > 2 && b <= m.radius) {
908
- const M = Math.pow(1 - b / m.radius, 0.7), T = m.pullForce * M, g = Math.atan2(A, L);
909
- x.velocity.x += Math.cos(g) * T * t, x.velocity.y += Math.sin(g) * T * t, x.position.x += Math.cos(g) * T * t * 0.8, x.position.y += Math.sin(g) * T * t * 0.8;
910
+ const M = Math.pow(1 - b / m.radius, 0.7), E = m.pullForce * M, g = Math.atan2(v, S);
911
+ x.velocity.x += Math.cos(g) * E * t, x.velocity.y += Math.sin(g) * E * t, x.position.x += Math.cos(g) * E * t * 0.8, x.position.y += Math.sin(g) * E * t * 0.8;
910
912
  }
911
913
  }
912
914
  m.duration >= m.maxDuration && a.splice(d, 1);
@@ -917,7 +919,7 @@ class q {
917
919
  const m = e.position.x - d.position.x, x = e.position.y - d.position.y;
918
920
  if (Math.hypot(m, x) <= e.radius + d.radius) {
919
921
  d.active = !1;
920
- const A = e.takeDamage();
922
+ const v = e.takeDamage();
921
923
  this.eventBus.emit("onCoreDamaged", { currentIntegrity: e.integrity }), l.push({
922
924
  id: Math.random().toString(),
923
925
  position: { ...e.position },
@@ -927,16 +929,16 @@ class q {
927
929
  alpha: 1,
928
930
  lifetime: 0,
929
931
  maxLifetime: 0.8
930
- }), o.triggerScreenShake({ x: m, y: x }, 25), o.triggerHitstop(0.15), o.triggerFlash(0.6);
932
+ }), r.triggerScreenShake({ x: m, y: x }, 25), r.triggerHitstop(0.15), r.triggerFlash(0.6);
931
933
  for (const b of i)
932
934
  if (b.active && !b.isGrabbed) {
933
935
  b.triggerDissolveDeath();
934
936
  for (let M = 0; M < 8; M++) {
935
- const T = Math.random() * Math.PI * 2, g = 100 + Math.random() * 200;
936
- r.push({
937
+ const E = Math.random() * Math.PI * 2, g = 100 + Math.random() * 200;
938
+ o.push({
937
939
  id: Math.random().toString(),
938
940
  position: { ...b.position },
939
- velocity: { x: Math.cos(T) * g, y: Math.sin(T) * g },
941
+ velocity: { x: Math.cos(E) * g, y: Math.sin(E) * g },
940
942
  color: "#00f0ff",
941
943
  radius: 3 + Math.random() * 3,
942
944
  alpha: 1,
@@ -955,7 +957,7 @@ class q {
955
957
  lifetime: 0,
956
958
  maxLifetime: 1.5,
957
959
  size: 32
958
- }), (!A || e.integrity <= 0) && this.eventBus.emit("onGameOver", { score: c.value, wave: 1 });
960
+ }), (!v || e.integrity <= 0) && this.eventBus.emit("onGameOver", { score: c.value, wave: 1 });
959
961
  break;
960
962
  }
961
963
  }
@@ -968,12 +970,12 @@ class q {
968
970
  }
969
971
  for (const m of i) {
970
972
  if (m === d || !m.active || m.isGrabbed || m.isDying) continue;
971
- const x = m.position.x - d.position.x, L = m.position.y - d.position.y;
972
- if (Math.hypot(x, L) <= d.getHitRadius() + m.getHitRadius()) {
973
+ const x = m.position.x - d.position.x, S = m.position.y - d.position.y;
974
+ if (Math.hypot(x, S) <= d.getHitRadius() + m.getHitRadius()) {
973
975
  this.currentThrowPos = { x: d.position.x, y: d.position.y };
974
976
  const b = Math.atan2(d.velocity.y, d.velocity.x);
975
977
  if (d.type === "piercer") {
976
- this.currentThrowKills++, this.killEnemyWithChainReaction(m, b, s, a, l, r, i), o.triggerHitstop(0.05), o.triggerScreenShake({ x, y: L }, 7), l.push({
978
+ this.currentThrowKills++, this.killEnemyWithChainReaction(m, b, s, a, l, o, i), r.triggerHitstop(0.05), r.triggerScreenShake({ x, y: S }, 7), l.push({
977
979
  id: Math.random().toString(),
978
980
  position: { ...m.position },
979
981
  radius: 10,
@@ -984,11 +986,11 @@ class q {
984
986
  maxLifetime: 0.45
985
987
  });
986
988
  for (let M = 0; M < 16; M++) {
987
- const T = Math.random() * Math.PI * 2, g = 150 + Math.random() * 300;
988
- r.push({
989
+ const E = Math.random() * Math.PI * 2, g = 150 + Math.random() * 300;
990
+ o.push({
989
991
  id: Math.random().toString(),
990
992
  position: { ...m.position },
991
- velocity: { x: Math.cos(T) * g, y: Math.sin(T) * g },
993
+ velocity: { x: Math.cos(E) * g, y: Math.sin(E) * g },
992
994
  color: "#ff2a5f",
993
995
  radius: 3 + Math.random() * 3,
994
996
  alpha: 1,
@@ -998,23 +1000,23 @@ class q {
998
1000
  }
999
1001
  f && f();
1000
1002
  } else {
1001
- const M = d.type === m.type, T = M ? 360 : 250;
1003
+ const M = d.type === m.type, E = M ? 360 : 250;
1002
1004
  l.push({
1003
1005
  id: Math.random().toString(),
1004
1006
  position: { ...this.currentThrowPos },
1005
1007
  radius: 15,
1006
- maxRadius: T,
1008
+ maxRadius: E,
1007
1009
  color: d.color,
1008
1010
  alpha: 1,
1009
1011
  lifetime: 0,
1010
1012
  maxLifetime: 0.55
1011
1013
  });
1012
1014
  for (let g = 0; g < 45; g++) {
1013
- const I = Math.random() * Math.PI * 2, v = 200 + Math.random() * 450;
1014
- r.push({
1015
+ const A = Math.random() * Math.PI * 2, I = 200 + Math.random() * 450;
1016
+ o.push({
1015
1017
  id: Math.random().toString(),
1016
1018
  position: { ...this.currentThrowPos },
1017
- velocity: { x: Math.cos(I) * v, y: Math.sin(I) * v },
1019
+ velocity: { x: Math.cos(A) * I, y: Math.sin(A) * I },
1018
1020
  color: d.color,
1019
1021
  radius: 4 + Math.random() * 6,
1020
1022
  alpha: 1,
@@ -1023,7 +1025,7 @@ class q {
1023
1025
  });
1024
1026
  }
1025
1027
  if (M) {
1026
- if (this.currentThrowKills += 2, o.triggerHitstop(0.14), o.triggerFlash(0.5), o.triggerScreenShake({ x, y: L }, 16), n.push({
1028
+ if (this.currentThrowKills += 2, r.triggerHitstop(0.14), r.triggerFlash(0.5), r.triggerScreenShake({ x, y: S }, 16), n.push({
1027
1029
  id: Math.random().toString(),
1028
1030
  text: "COLOR SYNERGY!",
1029
1031
  position: { ...this.currentThrowPos },
@@ -1053,22 +1055,22 @@ class q {
1053
1055
  });
1054
1056
  else if (d.type === "cluster")
1055
1057
  for (let g = 0; g < 8; g++) {
1056
- const I = g * Math.PI * 2 / 8, v = {
1057
- x: this.currentThrowPos.x + Math.cos(I) * 15,
1058
- y: this.currentThrowPos.y + Math.sin(I) * 15
1059
- }, G = S.createEnemy("micro", v, {
1060
- x: v.x + Math.cos(I) * 220,
1061
- y: v.y + Math.sin(I) * 220
1058
+ const A = g * Math.PI * 2 / 8, I = {
1059
+ x: this.currentThrowPos.x + Math.cos(A) * 15,
1060
+ y: this.currentThrowPos.y + Math.sin(A) * 15
1061
+ }, C = L.createEnemy("micro", I, {
1062
+ x: I.x + Math.cos(A) * 220,
1063
+ y: I.y + Math.sin(A) * 220
1062
1064
  });
1063
- G.isThrown = !0, i.push(G);
1065
+ C.isThrown = !0, i.push(C);
1064
1066
  }
1065
- this.killEnemyWithChainReaction(d, b, s, a, l, r, i), this.killEnemyWithChainReaction(m, b, s, a, l, r, i);
1067
+ this.killEnemyWithChainReaction(d, b, s, a, l, o, i), this.killEnemyWithChainReaction(m, b, s, a, l, o, i);
1066
1068
  } else
1067
- this.currentThrowKills += 2, o.triggerHitstop(0.08), o.triggerFlash(0.35), o.triggerScreenShake({ x, y: L }, 10), this.killEnemyWithChainReaction(d, b, s, a, l, r, i), this.killEnemyWithChainReaction(m, b, s, a, l, r, i);
1069
+ this.currentThrowKills += 2, r.triggerHitstop(0.08), r.triggerFlash(0.35), r.triggerScreenShake({ x, y: S }, 10), this.killEnemyWithChainReaction(d, b, s, a, l, o, i), this.killEnemyWithChainReaction(m, b, s, a, l, o, i);
1068
1070
  for (const g of i) {
1069
1071
  if (g === d || g === m || !g.active || g.isGrabbed || g.isDying) continue;
1070
- const I = g.position.x - this.currentThrowPos.x, v = g.position.y - this.currentThrowPos.y;
1071
- Math.hypot(I, v) <= T && (this.killEnemyWithChainReaction(g, b, s, a, l, r, i), this.currentThrowKills++);
1072
+ const A = g.position.x - this.currentThrowPos.x, I = g.position.y - this.currentThrowPos.y;
1073
+ Math.hypot(A, I) <= E && (this.killEnemyWithChainReaction(g, b, s, a, l, o, i), this.currentThrowKills++);
1072
1074
  }
1073
1075
  f && f();
1074
1076
  break;
@@ -1093,14 +1095,14 @@ class q {
1093
1095
  m.duration += t;
1094
1096
  for (const x of i) {
1095
1097
  if (!x.active || x.isGrabbed || x.isDying || x.isThrown && x.type === "piercer") continue;
1096
- const L = x.position.x - m.position.x, A = x.position.y - m.position.y;
1097
- Math.hypot(L, A) <= m.radius && (this.killEnemyWithChainReaction(x, 0, s, a, l, r, i), this.currentThrowKills++, f && f());
1098
+ const S = x.position.x - m.position.x, v = x.position.y - m.position.y;
1099
+ Math.hypot(S, v) <= m.radius && (this.killEnemyWithChainReaction(x, 0, s, a, l, o, i), this.currentThrowKills++, f && f());
1098
1100
  }
1099
1101
  m.duration >= m.maxDuration && s.splice(d, 1);
1100
1102
  }
1101
1103
  }
1102
1104
  }
1103
- killEnemyWithChainReaction(t, e, i, s, a, l, r) {
1105
+ killEnemyWithChainReaction(t, e, i, s, a, l, o) {
1104
1106
  if (!(!t.active || t.isDying))
1105
1107
  if (a.push({
1106
1108
  id: Math.random().toString(),
@@ -1123,14 +1125,14 @@ class q {
1123
1125
  else if (t.type === "cluster") {
1124
1126
  t.triggerDissolveDeath();
1125
1127
  for (let n = 0; n < 6; n++) {
1126
- const o = n * Math.PI * 2 / 6, h = {
1127
- x: t.position.x + Math.cos(o) * 15,
1128
- y: t.position.y + Math.sin(o) * 15
1129
- }, c = S.createEnemy("micro", h, {
1130
- x: h.x + Math.cos(o) * 200,
1131
- y: h.y + Math.sin(o) * 200
1128
+ const r = n * Math.PI * 2 / 6, h = {
1129
+ x: t.position.x + Math.cos(r) * 15,
1130
+ y: t.position.y + Math.sin(r) * 15
1131
+ }, c = L.createEnemy("micro", h, {
1132
+ x: h.x + Math.cos(r) * 200,
1133
+ y: h.y + Math.sin(r) * 200
1132
1134
  });
1133
- c.isThrown = !0, r.push(c);
1135
+ c.isThrown = !0, o.push(c);
1134
1136
  }
1135
1137
  } else t.type === "parasite" ? (t.triggerDissolveDeath(), s.push({
1136
1138
  id: Math.random().toString(),
@@ -1142,11 +1144,11 @@ class q {
1142
1144
  })) : t.type === "piercer" ? t.triggerSliceDeath(e) : t.triggerDissolveDeath();
1143
1145
  }
1144
1146
  }
1145
- class j {
1147
+ class tt {
1146
1148
  pool = [];
1147
1149
  constructor(t = 500) {
1148
1150
  for (let e = 0; e < t; e++) {
1149
- const i = new D(`pool_enemy_${e}`);
1151
+ const i = new U(`pool_enemy_${e}`);
1150
1152
  this.pool.push(i);
1151
1153
  }
1152
1154
  }
@@ -1154,7 +1156,7 @@ class j {
1154
1156
  for (const e of this.pool)
1155
1157
  if (!e.active)
1156
1158
  return e.reset(), e;
1157
- const t = new D(`fallback_enemy_${Date.now()}_${Math.random()}`);
1159
+ const t = new U(`fallback_enemy_${Date.now()}_${Math.random()}`);
1158
1160
  return this.pool.push(t), t;
1159
1161
  }
1160
1162
  resetAll() {
@@ -1162,35 +1164,35 @@ class j {
1162
1164
  t.reset();
1163
1165
  }
1164
1166
  }
1165
- class C {
1167
+ class w {
1166
1168
  static getOffscreenPosition(t, e) {
1167
1169
  const i = Math.floor(Math.random() * 4), s = 70;
1168
1170
  return i === 0 ? { x: Math.random() * t, y: -s } : i === 1 ? { x: t + s, y: Math.random() * e } : i === 2 ? { x: Math.random() * t, y: e + s } : { x: -s, y: Math.random() * e };
1169
1171
  }
1170
1172
  static spawnCircleOfDeath(t, e, i, s) {
1171
- const a = [], r = Math.max(i, s) * 0.55 + 80;
1173
+ const a = [], o = Math.max(i, s) * 0.55 + 80;
1172
1174
  for (let n = 0; n < 18; n++) {
1173
- const o = n * Math.PI * 2 / 18, h = {
1174
- x: e.x + Math.cos(o) * r,
1175
- y: e.y + Math.sin(o) * r
1175
+ const r = n * Math.PI * 2 / 18, h = {
1176
+ x: e.x + Math.cos(r) * o,
1177
+ y: e.y + Math.sin(r) * o
1176
1178
  }, c = t.get(), u = ["piercer", "spore", "cluster", "parasite"], p = u[n % u.length];
1177
- S.configureEnemy(c, p, h, e), c.velocity = {
1178
- x: Math.cos(o + Math.PI) * 55,
1179
- y: Math.sin(o + Math.PI) * 55
1179
+ L.configureEnemy(c, p, h, e), c.velocity = {
1180
+ x: Math.cos(r + Math.PI) * 55,
1181
+ y: Math.sin(r + Math.PI) * 55
1180
1182
  }, a.push(c);
1181
1183
  }
1182
1184
  return a;
1183
1185
  }
1184
1186
  static spawnDenseCluster(t, e, i, s) {
1185
- const a = [], r = Math.floor(Math.random() * 4);
1187
+ const a = [], o = Math.floor(Math.random() * 4);
1186
1188
  let n = { x: -60, y: -60 };
1187
- r === 0 ? n = { x: Math.random() * e, y: -80 } : r === 1 ? n = { x: e + 80, y: Math.random() * i } : r === 2 ? n = { x: Math.random() * e, y: i + 80 } : n = { x: -80, y: Math.random() * i };
1188
- for (let o = 0; o < 14; o++) {
1189
+ o === 0 ? n = { x: Math.random() * e, y: -80 } : o === 1 ? n = { x: e + 80, y: Math.random() * i } : o === 2 ? n = { x: Math.random() * e, y: i + 80 } : n = { x: -80, y: Math.random() * i };
1190
+ for (let r = 0; r < 14; r++) {
1189
1191
  const h = {
1190
1192
  x: (Math.random() - 0.5) * 60,
1191
1193
  y: (Math.random() - 0.5) * 60
1192
1194
  }, c = { x: n.x + h.x, y: n.y + h.y }, u = t.get();
1193
- S.configureEnemy(u, "spore", c, s);
1195
+ L.configureEnemy(u, "spore", c, s);
1194
1196
  const p = s.x - c.x, f = s.y - c.y, y = Math.atan2(f, p);
1195
1197
  u.velocity = {
1196
1198
  x: Math.cos(y) * (50 + Math.random() * 20),
@@ -1200,36 +1202,36 @@ class C {
1200
1202
  return a;
1201
1203
  }
1202
1204
  static spawnSineSnake(t, e, i, s) {
1203
- const a = [], r = i * 0.2 + Math.random() * i * 0.6;
1205
+ const a = [], o = i * 0.2 + Math.random() * i * 0.6;
1204
1206
  for (let n = 0; n < 12; n++) {
1205
- const o = {
1207
+ const r = {
1206
1208
  x: -60 - n * 40,
1207
- y: r + Math.sin(n * 0.45) * 70
1209
+ y: o + Math.sin(n * 0.45) * 70
1208
1210
  }, h = t.get();
1209
- S.configureEnemy(h, "cluster", o, s), h.velocity = { x: 75, y: Math.cos(n * 0.45) * 30 }, a.push(h);
1211
+ L.configureEnemy(h, "cluster", r, s), h.velocity = { x: 75, y: Math.cos(n * 0.45) * 30 }, a.push(h);
1210
1212
  }
1211
1213
  return a;
1212
1214
  }
1213
1215
  static spawnDoubleSpiral(t, e, i, s) {
1214
1216
  const a = [];
1215
- for (let r = 0; r < 14; r++) {
1216
- const n = r / 14, o = n * Math.PI * 4, h = 120 + n * 450, c = {
1217
- x: e + Math.cos(o) * h,
1218
- y: -60 + Math.sin(o) * h
1217
+ for (let o = 0; o < 14; o++) {
1218
+ const n = o / 14, r = n * Math.PI * 4, h = 120 + n * 450, c = {
1219
+ x: e + Math.cos(r) * h,
1220
+ y: -60 + Math.sin(r) * h
1219
1221
  }, u = t.get();
1220
- S.configureEnemy(u, "parasite", c, s), a.push(u);
1222
+ L.configureEnemy(u, "parasite", c, s), a.push(u);
1221
1223
  }
1222
1224
  return a;
1223
1225
  }
1224
1226
  static spawnMarchingWall(t, e, i, s) {
1225
- const a = [], r = Math.random() > 0.5;
1227
+ const a = [], o = Math.random() > 0.5;
1226
1228
  for (let n = 0; n < 12; n++) {
1227
- const o = n / 11 * i, h = {
1228
- x: r ? -60 : e + 60,
1229
- y: o
1229
+ const r = n / 11 * i, h = {
1230
+ x: o ? -60 : e + 60,
1231
+ y: r
1230
1232
  }, c = t.get();
1231
- S.configureEnemy(c, "piercer", h, s), c.velocity = {
1232
- x: r ? 70 : -70,
1233
+ L.configureEnemy(c, "piercer", h, s), c.velocity = {
1234
+ x: o ? 70 : -70,
1233
1235
  y: 0
1234
1236
  }, a.push(c);
1235
1237
  }
@@ -1237,16 +1239,16 @@ class C {
1237
1239
  }
1238
1240
  static spawnCrossfireStreams(t, e, i, s) {
1239
1241
  const a = [];
1240
- for (let r = 0; r < 10; r++) {
1241
- const n = { x: -50 - r * 35, y: -50 - r * 35 }, o = t.get();
1242
- S.configureEnemy(o, "spore", n, s), a.push(o);
1243
- const h = { x: e + 50 + r * 35, y: i + 50 + r * 35 }, c = t.get();
1244
- S.configureEnemy(c, "cluster", h, s), a.push(c);
1242
+ for (let o = 0; o < 10; o++) {
1243
+ const n = { x: -50 - o * 35, y: -50 - o * 35 }, r = t.get();
1244
+ L.configureEnemy(r, "spore", n, s), a.push(r);
1245
+ const h = { x: e + 50 + o * 35, y: i + 50 + o * 35 }, c = t.get();
1246
+ L.configureEnemy(c, "cluster", h, s), a.push(c);
1245
1247
  }
1246
1248
  return a;
1247
1249
  }
1248
1250
  }
1249
- class Q {
1251
+ class et {
1250
1252
  wave = 1;
1251
1253
  pool;
1252
1254
  spawnTimer = 0;
@@ -1254,47 +1256,47 @@ class Q {
1254
1256
  patternCooldown = 0;
1255
1257
  initialGracePeriod = 6;
1256
1258
  constructor() {
1257
- this.pool = new j(500);
1259
+ this.pool = new tt(500);
1258
1260
  }
1259
1261
  reset() {
1260
1262
  this.wave = 1, this.spawnTimer = 0, this.waveTimer = 0, this.patternCooldown = 0;
1261
1263
  }
1262
1264
  update(t, e, i, s, a) {
1263
1265
  this.waveTimer += t, this.spawnTimer += t, this.patternCooldown += t, this.applyFlockingBehaviors(e, t, a);
1264
- const l = e.filter((o) => o.active).length, r = Math.max(0.9, 2.2 - (this.wave - 1) * 0.18);
1266
+ const l = e.filter((r) => r.active).length, o = Math.max(0.9, 2.2 - (this.wave - 1) * 0.18);
1265
1267
  if (this.waveTimer > this.initialGracePeriod && this.patternCooldown > Math.max(12 - this.wave, 6) && l < 35) {
1266
1268
  this.patternCooldown = 0;
1267
- const o = this.spawnPatternFormation(i, s, a);
1268
- for (const h of o)
1269
+ const r = this.spawnPatternFormation(i, s, a);
1270
+ for (const h of r)
1269
1271
  e.push(h);
1270
1272
  }
1271
1273
  const n = Math.min(18 + this.wave * 4, 80);
1272
- return this.spawnTimer >= r && l < n ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, a)) : null;
1274
+ return this.spawnTimer >= o && l < n ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, a)) : null;
1273
1275
  }
1274
1276
  spawnSingleEnemy(t, e, i) {
1275
- const s = C.getOffscreenPosition(t, e), a = Math.random();
1277
+ const s = w.getOffscreenPosition(t, e), a = Math.random();
1276
1278
  let l = "piercer";
1277
1279
  a > 0.75 ? l = "parasite" : a > 0.5 ? l = "cluster" : a > 0.25 && (l = "spore");
1278
- const r = this.pool.get();
1279
- return S.configureEnemy(r, l, s, i), r;
1280
+ const o = this.pool.get();
1281
+ return L.configureEnemy(o, l, s, i), o;
1280
1282
  }
1281
1283
  spawnPatternFormation(t, e, i) {
1282
1284
  const s = Math.random();
1283
- return s < 0.25 ? C.spawnCircleOfDeath(this.pool, i, t, e) : s < 0.5 ? C.spawnDenseCluster(this.pool, t, e, i) : s < 0.75 ? C.spawnSineSnake(this.pool, t, e, i) : C.spawnMarchingWall(this.pool, t, e, i);
1285
+ return s < 0.25 ? w.spawnCircleOfDeath(this.pool, i, t, e) : s < 0.5 ? w.spawnDenseCluster(this.pool, t, e, i) : s < 0.75 ? w.spawnSineSnake(this.pool, t, e, i) : w.spawnMarchingWall(this.pool, t, e, i);
1284
1286
  }
1285
1287
  applyFlockingBehaviors(t, e, i) {
1286
1288
  for (let a = 0; a < t.length; a++) {
1287
1289
  const l = t[a];
1288
1290
  if (!l.active || l.isGrabbed || l.isThrown || l.isDying) continue;
1289
- let r = 0, n = 0, o = 0;
1291
+ let o = 0, n = 0, r = 0;
1290
1292
  for (let p = 0; p < t.length; p++) {
1291
1293
  if (a === p) continue;
1292
1294
  const f = t[p];
1293
1295
  if (!f.active || f.isGrabbed || f.isDying) continue;
1294
1296
  const y = l.position.x - f.position.x, d = l.position.y - f.position.y, m = Math.hypot(y, d);
1295
- m > 0 && m < 70 && (r += y / m, n += d / m, o++);
1297
+ m > 0 && m < 70 && (o += y / m, n += d / m, r++);
1296
1298
  }
1297
- o > 0 && (r /= o, n /= o, l.velocity.x += r * 60 * e, l.velocity.y += n * 60 * e);
1299
+ r > 0 && (o /= r, n /= r, l.velocity.x += o * 60 * e, l.velocity.y += n * 60 * e);
1298
1300
  const h = i.x - l.position.x, c = i.y - l.position.y, u = Math.hypot(h, c);
1299
1301
  if (u > 0) {
1300
1302
  const p = 80 + Math.min(this.wave * 4, 40);
@@ -1310,7 +1312,7 @@ class Q {
1310
1312
  }
1311
1313
  }
1312
1314
  }
1313
- const w = {
1315
+ const R = {
1314
1316
  bioluminescent: {
1315
1317
  bgInner: "#081220",
1316
1318
  bgMid: "#050b16",
@@ -1359,44 +1361,43 @@ const w = {
1359
1361
  tendrilMagenta: "#b5008c",
1360
1362
  tendrilCyan: "#0077b6"
1361
1363
  }
1362
- }, P = "axon_surge_theme", O = "axon_surge_theme_explicit";
1363
- class tt {
1364
+ }, k = "axon_surge_theme";
1365
+ class it {
1364
1366
  currentTheme = "dark";
1365
1367
  isExplicit = !1;
1366
1368
  targetElement;
1367
1369
  constructor(t, e) {
1368
- if (e !== void 0 && (this.targetElement = e), t && w[t]) {
1369
- this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
1370
- return;
1371
- }
1370
+ e !== void 0 && (this.targetElement = e);
1372
1371
  try {
1373
- const i = localStorage.getItem(O) === "true", s = localStorage.getItem(P);
1374
- if (i && s && w[s]) {
1375
- this.currentTheme = s, this.isExplicit = !0, this.applyThemeToDOM();
1372
+ const i = localStorage.getItem(k);
1373
+ if (i && R[i]) {
1374
+ this.currentTheme = i, this.isExplicit = !0, this.applyThemeToDOM();
1376
1375
  return;
1377
1376
  }
1378
1377
  } catch {
1379
1378
  }
1379
+ if (t && R[t]) {
1380
+ this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
1381
+ return;
1382
+ }
1380
1383
  this.currentTheme = this.detectParentOrSystemTheme();
1381
1384
  }
1382
1385
  setTargetElement(t) {
1383
1386
  this.targetElement = t, this.isExplicit ? this.applyThemeToDOM() : this.currentTheme = this.detectParentOrSystemTheme();
1384
1387
  }
1385
- setTheme(t, e = !0) {
1386
- if (w[t])
1387
- if (this.currentTheme = t, this.isExplicit = e, e) {
1388
- this.applyThemeToDOM();
1389
- try {
1390
- localStorage.setItem(P, t), localStorage.setItem(O, "true");
1391
- } catch {
1392
- }
1393
- } else
1394
- this.removeThemeClasses();
1388
+ setTheme(t) {
1389
+ if (R[t]) {
1390
+ this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
1391
+ try {
1392
+ localStorage.setItem(k, t);
1393
+ } catch {
1394
+ }
1395
+ }
1395
1396
  }
1396
1397
  clearExplicitTheme() {
1397
1398
  this.isExplicit = !1;
1398
1399
  try {
1399
- localStorage.removeItem(P), localStorage.removeItem(O);
1400
+ localStorage.removeItem(k);
1400
1401
  } catch {
1401
1402
  }
1402
1403
  this.removeThemeClasses(), this.currentTheme = this.detectParentOrSystemTheme();
@@ -1405,7 +1406,7 @@ class tt {
1405
1406
  return this.isExplicit || (this.currentTheme = this.detectParentOrSystemTheme()), this.currentTheme;
1406
1407
  }
1407
1408
  getPalette() {
1408
- return w[this.getTheme()] || w.dark;
1409
+ return R[this.getTheme()] || R.dark;
1409
1410
  }
1410
1411
  detectParentOrSystemTheme() {
1411
1412
  try {
@@ -1435,15 +1436,15 @@ class tt {
1435
1436
  }
1436
1437
  removeThemeClasses() {
1437
1438
  const t = ["theme-bioluminescent", "theme-dark", "theme-light"];
1438
- this.targetElement && this.targetElement.classList.remove(...t), document.documentElement.classList.remove(...t), document.documentElement.removeAttribute("data-theme");
1439
+ this.targetElement && this.targetElement.classList.remove(...t);
1439
1440
  }
1440
1441
  applyThemeToDOM() {
1441
- if (this.removeThemeClasses(), !this.isExplicit) return;
1442
+ if (this.removeThemeClasses(), !this.isExplicit || !this.targetElement) return;
1442
1443
  const t = `theme-${this.currentTheme}`;
1443
- this.targetElement && this.targetElement.classList.add(t), document.documentElement.classList.add(t);
1444
+ this.targetElement.classList.add(t);
1444
1445
  }
1445
1446
  }
1446
- class et {
1447
+ class st {
1447
1448
  maxDistance = 450;
1448
1449
  maxThickness = 28;
1449
1450
  minThickness = 4;
@@ -1452,47 +1453,57 @@ class et {
1452
1453
  render(t, e, i, s) {
1453
1454
  for (const a of e) {
1454
1455
  if (!a.active || a.isGrabbed || a.isDying) continue;
1455
- const l = a.position.x, r = a.position.y;
1456
- if (l >= 0 && l <= i && r >= 0 && r <= s) continue;
1457
- const n = Math.min(i, Math.max(0, l)), o = Math.min(s, Math.max(0, r)), h = Math.hypot(l - n, r - o);
1456
+ const l = a.position.x, o = a.position.y;
1457
+ if (l >= 0 && l <= i && o >= 0 && o <= s) continue;
1458
+ const n = Math.min(i, Math.max(0, l)), r = Math.min(s, Math.max(0, o)), h = Math.hypot(l - n, o - r);
1458
1459
  if (h <= 0 || h > this.maxDistance) continue;
1459
1460
  const c = Math.min(1, Math.max(0, h / this.maxDistance)), u = this.minThickness + (this.maxThickness - this.minThickness) * c, p = this.minLength + (this.maxLength - this.minLength) * c, f = 0.35 + (1 - c) * 0.55;
1460
1461
  if (t.save(), t.globalAlpha = f, t.shadowColor = a.color, t.shadowBlur = 12 + (1 - c) * 16, t.strokeStyle = a.color, t.lineWidth = u, t.lineCap = "round", t.beginPath(), n === 0 || n === i) {
1461
- const y = Math.max(0, o - p / 2), d = Math.min(s, o + p / 2);
1462
+ const y = Math.max(0, r - p / 2), d = Math.min(s, r + p / 2);
1462
1463
  t.moveTo(n, y), t.lineTo(n, d);
1463
1464
  } else {
1464
1465
  const y = Math.max(0, n - p / 2), d = Math.min(i, n + p / 2);
1465
- t.moveTo(y, o), t.lineTo(d, o);
1466
+ t.moveTo(y, r), t.lineTo(d, r);
1466
1467
  }
1467
1468
  t.stroke(), t.strokeStyle = "#ffffff", t.lineWidth = Math.max(1.5, u * 0.25), t.globalAlpha = f * 0.8, t.stroke(), t.restore();
1468
1469
  }
1469
1470
  }
1470
1471
  }
1471
- class it {
1472
- render(t, e, i, s, a) {
1473
- const l = (210 + (a - 1) * 38 + Math.sin(s * 0.12) * 15) % 360, r = `hsl(${l}, 45%, 8%)`, n = `hsl(${(l + 30) % 360}, 40%, 4%)`, o = `hsl(${(l + 60) % 360}, 50%, 2%)`, h = t.createRadialGradient(e / 2, i / 2, 40, e / 2, i / 2, Math.max(e, i));
1474
- h.addColorStop(0, r), h.addColorStop(0.55, n), h.addColorStop(1, o), t.fillStyle = h, t.fillRect(0, 0, e, i);
1475
- const c = (l + 75) % 360, u = e * 0.35 + Math.sin(s * 0.25) * 70, p = i * 0.45 + Math.cos(s * 0.2) * 60, f = t.createRadialGradient(u, p, 20, u, p, 400);
1476
- f.addColorStop(0, `hsla(${c}, 65%, 12%, 0.35)`), f.addColorStop(1, "rgba(0, 0, 0, 0)"), t.fillStyle = f, t.beginPath(), t.arc(u, p, 400, 0, Math.PI * 2), t.fill();
1477
- const y = (l + 160) % 360, d = e * 0.68 + Math.cos(s * 0.28) * 60, m = i * 0.55 + Math.sin(s * 0.22) * 55, x = t.createRadialGradient(d, m, 20, d, m, 440);
1478
- x.addColorStop(0, `hsla(${y}, 60%, 10%, 0.3)`), x.addColorStop(1, "rgba(0, 0, 0, 0)"), t.fillStyle = x, t.beginPath(), t.arc(d, m, 440, 0, Math.PI * 2), t.fill();
1472
+ class at {
1473
+ render(t, e, i, s, a, l = !1) {
1474
+ const o = (210 + (a - 1) * 38 + Math.sin(s * 0.12) * 15) % 360;
1475
+ if (l) {
1476
+ const v = `hsl(${o}, 50%, 94%)`, b = `hsl(${(o + 25) % 360}, 45%, 89%)`, M = `hsl(${(o + 50) % 360}, 40%, 82%)`, E = t.createRadialGradient(e / 2, i / 2, 40, e / 2, i / 2, Math.max(e, i));
1477
+ E.addColorStop(0, v), E.addColorStop(0.55, b), E.addColorStop(1, M), t.fillStyle = E, t.fillRect(0, 0, e, i);
1478
+ const g = (o + 75) % 360, A = e * 0.35 + Math.sin(s * 0.25) * 70, I = i * 0.45 + Math.cos(s * 0.2) * 60, C = t.createRadialGradient(A, I, 20, A, I, 400);
1479
+ C.addColorStop(0, `hsla(${g}, 65%, 78%, 0.35)`), C.addColorStop(1, "rgba(255, 255, 255, 0)"), t.fillStyle = C, t.beginPath(), t.arc(A, I, 400, 0, Math.PI * 2), t.fill();
1480
+ const W = (o + 160) % 360, O = e * 0.68 + Math.cos(s * 0.28) * 60, D = i * 0.55 + Math.sin(s * 0.22) * 55, G = t.createRadialGradient(O, D, 20, O, D, 440);
1481
+ G.addColorStop(0, `hsla(${W}, 60%, 75%, 0.3)`), G.addColorStop(1, "rgba(255, 255, 255, 0)"), t.fillStyle = G, t.beginPath(), t.arc(O, D, 440, 0, Math.PI * 2), t.fill();
1482
+ return;
1483
+ }
1484
+ const n = `hsl(${o}, 45%, 8%)`, r = `hsl(${(o + 30) % 360}, 40%, 4%)`, h = `hsl(${(o + 60) % 360}, 50%, 2%)`, c = t.createRadialGradient(e / 2, i / 2, 40, e / 2, i / 2, Math.max(e, i));
1485
+ c.addColorStop(0, n), c.addColorStop(0.55, r), c.addColorStop(1, h), t.fillStyle = c, t.fillRect(0, 0, e, i);
1486
+ const u = (o + 75) % 360, p = e * 0.35 + Math.sin(s * 0.25) * 70, f = i * 0.45 + Math.cos(s * 0.2) * 60, y = t.createRadialGradient(p, f, 20, p, f, 400);
1487
+ y.addColorStop(0, `hsla(${u}, 65%, 12%, 0.35)`), y.addColorStop(1, "rgba(0, 0, 0, 0)"), t.fillStyle = y, t.beginPath(), t.arc(p, f, 400, 0, Math.PI * 2), t.fill();
1488
+ const d = (o + 160) % 360, m = e * 0.68 + Math.cos(s * 0.28) * 60, x = i * 0.55 + Math.sin(s * 0.22) * 55, S = t.createRadialGradient(m, x, 20, m, x, 440);
1489
+ S.addColorStop(0, `hsla(${d}, 60%, 10%, 0.3)`), S.addColorStop(1, "rgba(0, 0, 0, 0)"), t.fillStyle = S, t.beginPath(), t.arc(m, x, 440, 0, Math.PI * 2), t.fill();
1479
1490
  }
1480
1491
  }
1481
- class st {
1492
+ class nt {
1482
1493
  render(t, e, i) {
1483
1494
  if (!e.isActive) return;
1484
1495
  const s = e.getLauncher(), a = e.getTarget();
1485
1496
  if (!s || !a || !s.active || !a.active) return;
1486
1497
  const l = e.getStep();
1487
1498
  if (t.save(), l === 1) {
1488
- const r = Math.sin(i * 6) * 10, n = s.position.x, o = s.position.y - 65 + r;
1489
- t.shadowColor = "#00f0ff", t.shadowBlur = 20, t.fillStyle = "#00f0ff", t.beginPath(), t.moveTo(n, o + 20), t.lineTo(n - 16, o - 12), t.lineTo(n - 6, o - 12), t.lineTo(n - 6, o - 32), t.lineTo(n + 6, o - 32), t.lineTo(n + 6, o - 12), t.lineTo(n + 16, o - 12), t.closePath(), t.fill();
1499
+ const o = Math.sin(i * 6) * 10, n = s.position.x, r = s.position.y - 65 + o;
1500
+ t.shadowColor = "#00f0ff", t.shadowBlur = 20, t.fillStyle = "#00f0ff", t.beginPath(), t.moveTo(n, r + 20), t.lineTo(n - 16, r - 12), t.lineTo(n - 6, r - 12), t.lineTo(n - 6, r - 32), t.lineTo(n + 6, r - 32), t.lineTo(n + 6, r - 12), t.lineTo(n + 16, r - 12), t.closePath(), t.fill();
1490
1501
  const h = s.radius * (1.6 + Math.sin(i * 8) * 0.3);
1491
1502
  t.strokeStyle = "rgba(0, 240, 255, 0.8)", t.lineWidth = 3, t.beginPath(), t.arc(s.position.x, s.position.y, h, 0, Math.PI * 2), t.stroke();
1492
1503
  } else if (l === 2) {
1493
- const r = a.position.x - s.position.x, n = a.position.y - s.position.y;
1494
- if (Math.hypot(r, n) > 10) {
1495
- const h = Math.atan2(n, r);
1504
+ const o = a.position.x - s.position.x, n = a.position.y - s.position.y;
1505
+ if (Math.hypot(o, n) > 10) {
1506
+ const h = Math.atan2(n, o);
1496
1507
  t.shadowColor = "#ff00dd", t.shadowBlur = 22, t.strokeStyle = "#ff00dd", t.lineWidth = 4, t.setLineDash([12, 8]), t.beginPath(), t.moveTo(s.position.x, s.position.y), t.lineTo(a.position.x, a.position.y), t.stroke(), t.setLineDash([]);
1497
1508
  const c = a.position.x - Math.cos(h) * (a.radius + 10), u = a.position.y - Math.sin(h) * (a.radius + 10);
1498
1509
  t.fillStyle = "#ff00dd", t.beginPath(), t.moveTo(c, u), t.lineTo(c - Math.cos(h - 0.4) * 24, u - Math.sin(h - 0.4) * 24), t.lineTo(c - Math.cos(h + 0.4) * 24, u - Math.sin(h + 0.4) * 24), t.closePath(), t.fill();
@@ -1503,7 +1514,7 @@ class st {
1503
1514
  t.restore();
1504
1515
  }
1505
1516
  }
1506
- class at {
1517
+ class ot {
1507
1518
  canvas;
1508
1519
  ctx;
1509
1520
  themeManager;
@@ -1511,33 +1522,33 @@ class at {
1511
1522
  bgRenderer;
1512
1523
  tutorialArrowRenderer;
1513
1524
  constructor(t, e) {
1514
- this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new et(), this.bgRenderer = new it(), this.tutorialArrowRenderer = new st();
1525
+ this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new st(), this.bgRenderer = new at(), this.tutorialArrowRenderer = new nt();
1515
1526
  }
1516
- render(t, e, i, s, a, l, r, n, o, h, c = 1, u) {
1527
+ render(t, e, i, s, a, l, o, n, r, h, c = 1, u) {
1517
1528
  if (!this.ctx) return;
1518
1529
  const p = this.themeManager.getPalette(), { width: f, height: y } = this.canvas, d = n.getShakeOffset();
1519
- this.ctx.save(), this.ctx.translate(d.x, d.y), this.bgRenderer.render(this.ctx, f, y, t.pulsePhase, c), this.drawToxicPools(i, t.pulsePhase), this.drawGravityVortices(s, t.pulsePhase), this.drawShockwaves(a), this.drawCoreFilaments(t, p), this.drawParticles(l), this.indicatorRenderer.render(this.ctx, e, f, y), this.drawOrganicEnemies(e, t.pulsePhase, p), u && this.tutorialArrowRenderer.render(this.ctx, u, t.pulsePhase), o ? this.drawPsionicTendril(t.position, o.position, p) : t && this.drawHoverTendril(t.position, h, e, p), this.drawOrganicConsciousnessCore(t, p), this.drawFloatingTexts(r), n.flashAlpha > 0 && (this.ctx.fillStyle = `rgba(255, 255, 255, ${n.flashAlpha})`, this.ctx.fillRect(0, 0, f, y)), this.ctx.restore();
1530
+ this.ctx.save(), this.ctx.translate(d.x, d.y), this.bgRenderer.render(this.ctx, f, y, t.pulsePhase, c, this.themeManager.getTheme() === "light"), this.drawToxicPools(i, t.pulsePhase), this.drawGravityVortices(s, t.pulsePhase), this.drawShockwaves(a), this.drawCoreFilaments(t, p), this.drawParticles(l), this.indicatorRenderer.render(this.ctx, e, f, y), this.drawOrganicEnemies(e, t.pulsePhase, p), u && this.tutorialArrowRenderer.render(this.ctx, u, t.pulsePhase), r ? this.drawPsionicTendril(t.position, r.position, p) : t && this.drawHoverTendril(t.position, h, e, p), this.drawOrganicConsciousnessCore(t, p), this.drawFloatingTexts(o), n.flashAlpha > 0 && (this.ctx.fillStyle = `rgba(255, 255, 255, ${n.flashAlpha})`, this.ctx.fillRect(0, 0, f, y)), this.ctx.restore();
1520
1531
  }
1521
1532
  drawToxicPools(t, e) {
1522
1533
  if (this.ctx)
1523
1534
  for (const i of t) {
1524
- const s = i.duration / i.maxDuration, a = Math.min(0.7, (1 - s) * 0.7), { x: l, y: r } = i.position;
1535
+ const s = i.duration / i.maxDuration, a = Math.min(0.7, (1 - s) * 0.7), { x: l, y: o } = i.position;
1525
1536
  this.ctx.save();
1526
- const n = this.ctx.createRadialGradient(l, r, 10, l, r, i.radius * 1.2);
1537
+ const n = this.ctx.createRadialGradient(l, o, 10, l, o, i.radius * 1.2);
1527
1538
  n.addColorStop(0, `rgba(57, 255, 20, ${a * 0.9})`), n.addColorStop(0.4, `rgba(16, 185, 129, ${a * 0.65})`), n.addColorStop(0.8, `rgba(5, 80, 45, ${a * 0.35})`), n.addColorStop(1, "rgba(2, 35, 15, 0)"), this.ctx.fillStyle = n, this.ctx.shadowColor = "#39ff14", this.ctx.shadowBlur = 30, this.ctx.beginPath();
1528
- const o = 70;
1529
- for (let h = 0; h <= o; h++) {
1530
- const c = h * Math.PI * 2 / o, u = Math.sin(c * 5 + e * 3) * 14, p = Math.cos(c * 3 - e * 2) * 9, f = i.radius + u + p, y = l + Math.cos(c) * f, d = r + Math.sin(c) * f;
1539
+ const r = 70;
1540
+ for (let h = 0; h <= r; h++) {
1541
+ const c = h * Math.PI * 2 / r, u = Math.sin(c * 5 + e * 3) * 14, p = Math.cos(c * 3 - e * 2) * 9, f = i.radius + u + p, y = l + Math.cos(c) * f, d = o + Math.sin(c) * f;
1531
1542
  h === 0 ? this.ctx.moveTo(y, d) : this.ctx.lineTo(y, d);
1532
1543
  }
1533
1544
  this.ctx.closePath(), this.ctx.fill(), this.ctx.strokeStyle = `rgba(57, 255, 20, ${a * 0.8})`, this.ctx.lineWidth = 2.5, this.ctx.beginPath();
1534
- for (let h = 0; h <= o; h++) {
1535
- const c = h * Math.PI * 2 / o, u = Math.sin(c * 6 + e * 4) * 8, p = i.radius * 0.75 + u, f = l + Math.cos(c) * p, y = r + Math.sin(c) * p;
1545
+ for (let h = 0; h <= r; h++) {
1546
+ const c = h * Math.PI * 2 / r, u = Math.sin(c * 6 + e * 4) * 8, p = i.radius * 0.75 + u, f = l + Math.cos(c) * p, y = o + Math.sin(c) * p;
1536
1547
  h === 0 ? this.ctx.moveTo(f, y) : this.ctx.lineTo(f, y);
1537
1548
  }
1538
1549
  this.ctx.closePath(), this.ctx.stroke();
1539
1550
  for (let h = 0; h < 6; h++) {
1540
- const c = h * Math.PI * 0.33 + e * 1.5, u = i.radius * 0.5 * (0.3 + Math.sin(e * 2 + h) * 0.3), p = l + Math.cos(c) * u, f = r + Math.sin(c) * u, y = 3 + Math.sin(e * 3 + h) * 2;
1551
+ const c = h * Math.PI * 0.33 + e * 1.5, u = i.radius * 0.5 * (0.3 + Math.sin(e * 2 + h) * 0.3), p = l + Math.cos(c) * u, f = o + Math.sin(c) * u, y = 3 + Math.sin(e * 3 + h) * 2;
1541
1552
  this.ctx.fillStyle = `rgba(255, 255, 255, ${a * 0.8})`, this.ctx.beginPath(), this.ctx.arc(p, f, Math.max(1, y), 0, Math.PI * 2), this.ctx.fill();
1542
1553
  }
1543
1554
  this.ctx.restore();
@@ -1561,13 +1572,13 @@ class at {
1561
1572
  drawGravityVortices(t, e) {
1562
1573
  if (this.ctx)
1563
1574
  for (const i of t) {
1564
- const s = Math.min(0.85, (1 - i.duration / i.maxDuration) * 0.85), a = i.radius * (1 - i.duration / i.maxDuration * 0.1), { x: l, y: r } = i.position;
1575
+ const s = Math.min(0.85, (1 - i.duration / i.maxDuration) * 0.85), a = i.radius * (1 - i.duration / i.maxDuration * 0.1), { x: l, y: o } = i.position;
1565
1576
  this.ctx.save();
1566
- const n = this.ctx.createRadialGradient(l, r, 0, l, r, 60);
1567
- n.addColorStop(0, `rgba(0, 0, 0, ${s})`), n.addColorStop(0.7, `rgba(20, 0, 40, ${s})`), n.addColorStop(1, `rgba(157, 78, 221, ${s * 0.5})`), this.ctx.fillStyle = n, this.ctx.beginPath(), this.ctx.arc(l, r, 60, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = `rgba(157, 78, 221, ${s})`, this.ctx.lineWidth = 5, this.ctx.shadowColor = "#9d4edd", this.ctx.shadowBlur = 32;
1568
- for (let o = 1; o <= 5; o++) {
1569
- const h = a * o / 5, c = e * o * 2.2;
1570
- this.ctx.beginPath(), this.ctx.arc(l, r, h, c, c + Math.PI * 1.5), this.ctx.stroke();
1577
+ const n = this.ctx.createRadialGradient(l, o, 0, l, o, 60);
1578
+ n.addColorStop(0, `rgba(0, 0, 0, ${s})`), n.addColorStop(0.7, `rgba(20, 0, 40, ${s})`), n.addColorStop(1, `rgba(157, 78, 221, ${s * 0.5})`), this.ctx.fillStyle = n, this.ctx.beginPath(), this.ctx.arc(l, o, 60, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = `rgba(157, 78, 221, ${s})`, this.ctx.lineWidth = 5, this.ctx.shadowColor = "#9d4edd", this.ctx.shadowBlur = 32;
1579
+ for (let r = 1; r <= 5; r++) {
1580
+ const h = a * r / 5, c = e * r * 2.2;
1581
+ this.ctx.beginPath(), this.ctx.arc(l, o, h, c, c + Math.PI * 1.5), this.ctx.stroke();
1571
1582
  }
1572
1583
  this.ctx.restore();
1573
1584
  }
@@ -1576,29 +1587,29 @@ class at {
1576
1587
  if (!this.ctx) return;
1577
1588
  const a = this.ctx.createRadialGradient(t / 2, e / 2, 40, t / 2, e / 2, Math.max(t, e));
1578
1589
  a.addColorStop(0, s.bgInner), a.addColorStop(0.5, s.bgMid), a.addColorStop(1, s.bgOuter), this.ctx.fillStyle = a, this.ctx.fillRect(0, 0, t, e);
1579
- const l = t * 0.35 + Math.sin(i * 0.3) * 60, r = e * 0.45 + Math.cos(i * 0.25) * 50, n = this.ctx.createRadialGradient(l, r, 20, l, r, 380);
1580
- n.addColorStop(0, s.nebulaCyan), n.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = n, this.ctx.beginPath(), this.ctx.arc(l, r, 380, 0, Math.PI * 2), this.ctx.fill();
1581
- const o = t * 0.68 + Math.cos(i * 0.35) * 50, h = e * 0.55 + Math.sin(i * 0.3) * 45, c = this.ctx.createRadialGradient(o, h, 20, o, h, 420);
1582
- c.addColorStop(0, s.nebulaMagenta), c.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = c, this.ctx.beginPath(), this.ctx.arc(o, h, 420, 0, Math.PI * 2), this.ctx.fill();
1590
+ const l = t * 0.35 + Math.sin(i * 0.3) * 60, o = e * 0.45 + Math.cos(i * 0.25) * 50, n = this.ctx.createRadialGradient(l, o, 20, l, o, 380);
1591
+ n.addColorStop(0, s.nebulaCyan), n.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = n, this.ctx.beginPath(), this.ctx.arc(l, o, 380, 0, Math.PI * 2), this.ctx.fill();
1592
+ const r = t * 0.68 + Math.cos(i * 0.35) * 50, h = e * 0.55 + Math.sin(i * 0.3) * 45, c = this.ctx.createRadialGradient(r, h, 20, r, h, 420);
1593
+ c.addColorStop(0, s.nebulaMagenta), c.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = c, this.ctx.beginPath(), this.ctx.arc(r, h, 420, 0, Math.PI * 2), this.ctx.fill();
1583
1594
  }
1584
1595
  drawCoreFilaments(t, e) {
1585
1596
  if (!this.ctx) return;
1586
1597
  const i = 12;
1587
1598
  this.ctx.lineWidth = 1.5, this.ctx.strokeStyle = e.nebulaCyan;
1588
1599
  for (let s = 0; s < i; s++) {
1589
- const a = s * Math.PI * 2 / i + t.pulsePhase * 0.12, l = 85 + Math.sin(t.pulsePhase * 1.5 + s) * 25, r = t.position.x + Math.cos(a) * l, n = t.position.y + Math.sin(a) * l, o = t.position.x + Math.cos(a + 0.4) * 48, h = t.position.y + Math.sin(a + 0.4) * 48;
1590
- this.ctx.beginPath(), this.ctx.moveTo(t.position.x, t.position.y), this.ctx.quadraticCurveTo(o, h, r, n), this.ctx.stroke(), this.ctx.fillStyle = e.sporeColor, this.ctx.beginPath(), this.ctx.arc(r, n, 3.5, 0, Math.PI * 2), this.ctx.fill();
1600
+ const a = s * Math.PI * 2 / i + t.pulsePhase * 0.12, l = 85 + Math.sin(t.pulsePhase * 1.5 + s) * 25, o = t.position.x + Math.cos(a) * l, n = t.position.y + Math.sin(a) * l, r = t.position.x + Math.cos(a + 0.4) * 48, h = t.position.y + Math.sin(a + 0.4) * 48;
1601
+ this.ctx.beginPath(), this.ctx.moveTo(t.position.x, t.position.y), this.ctx.quadraticCurveTo(r, h, o, n), this.ctx.stroke(), this.ctx.fillStyle = e.sporeColor, this.ctx.beginPath(), this.ctx.arc(o, n, 3.5, 0, Math.PI * 2), this.ctx.fill();
1591
1602
  }
1592
1603
  }
1593
1604
  drawOrganicConsciousnessCore(t, e) {
1594
1605
  if (!this.ctx) return;
1595
1606
  const { x: i, y: s } = t.position;
1596
- for (let r = 0; r < t.integrity; r++) {
1597
- const n = t.radius + 16 + r * 12;
1607
+ for (let o = 0; o < t.integrity; o++) {
1608
+ const n = t.radius + 16 + o * 12;
1598
1609
  this.ctx.strokeStyle = e.corePrimary, this.ctx.lineWidth = 2.2, this.ctx.shadowColor = e.corePrimary, this.ctx.shadowBlur = 12, this.ctx.beginPath();
1599
- const o = 60;
1600
- for (let h = 0; h <= o; h++) {
1601
- const c = h * Math.PI * 2 / o, u = n + Math.sin(c * 4 + t.pulsePhase * 2 + r) * 3, p = i + Math.cos(c) * u, f = s + Math.sin(c) * u;
1610
+ const r = 60;
1611
+ for (let h = 0; h <= r; h++) {
1612
+ const c = h * Math.PI * 2 / r, u = n + Math.sin(c * 4 + t.pulsePhase * 2 + o) * 3, p = i + Math.cos(c) * u, f = s + Math.sin(c) * u;
1602
1613
  h === 0 ? this.ctx.moveTo(p, f) : this.ctx.lineTo(p, f);
1603
1614
  }
1604
1615
  this.ctx.closePath(), this.ctx.stroke();
@@ -1606,9 +1617,9 @@ class at {
1606
1617
  const a = this.ctx.createRadialGradient(i, s, 5, i, s, t.radius * 2.2);
1607
1618
  a.addColorStop(0, e.coreGlow), a.addColorStop(0.5, e.nebulaMagenta), a.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = a, this.ctx.beginPath(), this.ctx.arc(i, s, t.radius * 2.2, 0, Math.PI * 2), this.ctx.fill(), this.ctx.save(), this.ctx.translate(i, s), this.ctx.strokeStyle = e.corePrimary, this.ctx.lineWidth = 3, this.ctx.fillStyle = e.nebulaCyan, this.ctx.shadowColor = e.corePrimary, this.ctx.shadowBlur = 20, this.ctx.beginPath();
1608
1619
  const l = 80;
1609
- for (let r = 0; r <= l; r++) {
1610
- const n = r * Math.PI * 2 / l, o = t.getMembraneRadius(n), h = Math.cos(n) * o, c = Math.sin(n) * o;
1611
- r === 0 ? this.ctx.moveTo(h, c) : this.ctx.lineTo(h, c);
1620
+ for (let o = 0; o <= l; o++) {
1621
+ const n = o * Math.PI * 2 / l, r = t.getMembraneRadius(n), h = Math.cos(n) * r, c = Math.sin(n) * r;
1622
+ o === 0 ? this.ctx.moveTo(h, c) : this.ctx.lineTo(h, c);
1612
1623
  }
1613
1624
  this.ctx.closePath(), this.ctx.fill(), this.ctx.stroke(), this.ctx.fillStyle = "#ffffff", this.ctx.beginPath(), this.ctx.arc(0, 0, t.radius * 0.3, 0, Math.PI * 2), this.ctx.fill(), this.ctx.restore();
1614
1625
  }
@@ -1617,10 +1628,10 @@ class at {
1617
1628
  this.ctx.save();
1618
1629
  const s = e.x - t.x, a = e.y - t.y;
1619
1630
  this.ctx.strokeStyle = i.tendrilMagenta, this.ctx.lineWidth = 9, this.ctx.shadowColor = i.tendrilMagenta, this.ctx.shadowBlur = 20, this.ctx.beginPath(), this.ctx.moveTo(t.x, t.y);
1620
- const l = (t.x + e.x) / 2 + Math.sin(Date.now() * 0.02) * 16, r = (t.y + e.y) / 2 + Math.cos(Date.now() * 0.02) * 16;
1621
- this.ctx.quadraticCurveTo(l, r, e.x, e.y), this.ctx.stroke(), this.ctx.strokeStyle = i.tendrilCyan, this.ctx.lineWidth = 3.5, this.ctx.shadowColor = i.tendrilCyan, this.ctx.shadowBlur = 12, this.ctx.beginPath(), this.ctx.moveTo(t.x, t.y), this.ctx.lineTo(e.x, e.y), this.ctx.stroke();
1631
+ const l = (t.x + e.x) / 2 + Math.sin(Date.now() * 0.02) * 16, o = (t.y + e.y) / 2 + Math.cos(Date.now() * 0.02) * 16;
1632
+ this.ctx.quadraticCurveTo(l, o, e.x, e.y), this.ctx.stroke(), this.ctx.strokeStyle = i.tendrilCyan, this.ctx.lineWidth = 3.5, this.ctx.shadowColor = i.tendrilCyan, this.ctx.shadowBlur = 12, this.ctx.beginPath(), this.ctx.moveTo(t.x, t.y), this.ctx.lineTo(e.x, e.y), this.ctx.stroke();
1622
1633
  for (let n = 0; n < 6; n++) {
1623
- const o = Math.random(), h = t.x + s * o + (Math.random() - 0.5) * 24, c = t.y + a * o + (Math.random() - 0.5) * 24;
1634
+ const r = Math.random(), h = t.x + s * r + (Math.random() - 0.5) * 24, c = t.y + a * r + (Math.random() - 0.5) * 24;
1624
1635
  this.ctx.fillStyle = "#ffffff", this.ctx.beginPath(), this.ctx.arc(h, c, 2.5 + Math.random() * 2.5, 0, Math.PI * 2), this.ctx.fill();
1625
1636
  }
1626
1637
  this.ctx.restore();
@@ -1629,8 +1640,8 @@ class at {
1629
1640
  if (this.ctx)
1630
1641
  for (const a of i) {
1631
1642
  if (!a.active || a.isGrabbed || a.isThrown || a.wasManipulated || a.isDying) continue;
1632
- const l = e.x - a.position.x, r = e.y - a.position.y;
1633
- if (Math.hypot(l, r) <= a.getHitRadius()) {
1643
+ const l = e.x - a.position.x, o = e.y - a.position.y;
1644
+ if (Math.hypot(l, o) <= a.getHitRadius()) {
1634
1645
  this.ctx.strokeStyle = s.tendrilMagenta, this.ctx.lineWidth = 2.5, this.ctx.beginPath(), this.ctx.moveTo(t.x, t.y), this.ctx.lineTo(a.position.x, a.position.y), this.ctx.stroke();
1635
1646
  break;
1636
1647
  }
@@ -1642,16 +1653,16 @@ class at {
1642
1653
  if (!s.active) continue;
1643
1654
  let a = s.color;
1644
1655
  s.type === "piercer" ? a = i.piercerColor : s.type === "spore" ? a = i.sporeColor : s.type === "cluster" ? a = i.clusterColor : s.type === "parasite" ? a = i.parasiteColor : s.type === "micro" && (a = i.microColor);
1645
- const { x: l, y: r } = s.position;
1646
- if (this.ctx.save(), this.ctx.translate(l, r), s.wasManipulated && !s.isDying) {
1656
+ const { x: l, y: o } = s.position;
1657
+ if (this.ctx.save(), this.ctx.translate(l, o), s.wasManipulated && !s.isDying) {
1647
1658
  const n = s.radius * 1.5 + Math.sin(e * 6) * 4;
1648
1659
  this.ctx.strokeStyle = i.tendrilMagenta, this.ctx.lineWidth = 2.5, this.ctx.shadowColor = i.tendrilMagenta, this.ctx.shadowBlur = 18, this.ctx.beginPath(), this.ctx.arc(0, 0, n, 0, Math.PI * 2), this.ctx.stroke();
1649
- const o = s.radius * 1.8 + Math.cos(e * 8) * 3;
1650
- this.ctx.strokeStyle = i.tendrilCyan, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(0, 0, o, 0, Math.PI * 2), this.ctx.stroke();
1660
+ const r = s.radius * 1.8 + Math.cos(e * 8) * 3;
1661
+ this.ctx.strokeStyle = i.tendrilCyan, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(0, 0, r, 0, Math.PI * 2), this.ctx.stroke();
1651
1662
  }
1652
1663
  if (s.isDying) {
1653
- const n = s.deathTimer / s.maxDeathTimer, o = Math.max(0, 1 - n);
1654
- if (this.ctx.globalAlpha = o, s.deathType === "dissolve") {
1664
+ const n = s.deathTimer / s.maxDeathTimer, r = Math.max(0, 1 - n);
1665
+ if (this.ctx.globalAlpha = r, s.deathType === "dissolve") {
1655
1666
  const h = s.radius * (1 - n * 0.7);
1656
1667
  this.ctx.fillStyle = i.sporeColor, this.ctx.shadowColor = i.sporeColor, this.ctx.shadowBlur = 20, this.ctx.beginPath(), this.ctx.arc(0, 0, h, 0, Math.PI * 2), this.ctx.fill();
1657
1668
  for (let c = 0; c < 4; c++) {
@@ -1669,17 +1680,17 @@ class at {
1669
1680
  if (this.ctx.shadowColor = a, this.ctx.shadowBlur = 16, this.ctx.fillStyle = a, s.type === "piercer") {
1670
1681
  this.ctx.rotate(s.rotation), this.ctx.beginPath();
1671
1682
  const n = 12;
1672
- for (let o = 0; o <= n; o++) {
1673
- const h = o * Math.PI * 2 / n, c = s.radius * 1.6 + Math.sin(h * 3 + e * 4) * 3, u = s.radius * 0.6 + Math.cos(h * 2 + e * 3) * 2, p = Math.cos(h) * c, f = Math.sin(h) * u;
1674
- o === 0 ? this.ctx.moveTo(p, f) : this.ctx.lineTo(p, f);
1683
+ for (let r = 0; r <= n; r++) {
1684
+ const h = r * Math.PI * 2 / n, c = s.radius * 1.6 + Math.sin(h * 3 + e * 4) * 3, u = s.radius * 0.6 + Math.cos(h * 2 + e * 3) * 2, p = Math.cos(h) * c, f = Math.sin(h) * u;
1685
+ r === 0 ? this.ctx.moveTo(p, f) : this.ctx.lineTo(p, f);
1675
1686
  }
1676
1687
  this.ctx.closePath(), this.ctx.fill(), this.ctx.fillStyle = "#ffffff", this.ctx.beginPath(), this.ctx.arc(4, 0, 4, 0, Math.PI * 2), this.ctx.fill();
1677
1688
  } else if (s.type === "spore") {
1678
1689
  this.ctx.beginPath();
1679
1690
  const n = 8;
1680
- for (let o = 0; o < n; o++) {
1681
- const h = o * Math.PI * 2 / n, c = s.radius + Math.sin(h * 4 + e * 3 + s.position.x) * 4, u = Math.cos(h) * c, p = Math.sin(h) * c;
1682
- o === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
1691
+ for (let r = 0; r < n; r++) {
1692
+ const h = r * Math.PI * 2 / n, c = s.radius + Math.sin(h * 4 + e * 3 + s.position.x) * 4, u = Math.cos(h) * c, p = Math.sin(h) * c;
1693
+ r === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
1683
1694
  }
1684
1695
  this.ctx.closePath(), this.ctx.fill(), this.ctx.fillStyle = "rgba(255, 255, 255, 0.7)", this.ctx.beginPath(), this.ctx.arc(-4, -4, 5, 0, Math.PI * 2), this.ctx.arc(5, 3, 4, 0, Math.PI * 2), this.ctx.fill();
1685
1696
  } else if (s.type === "cluster") {
@@ -1689,9 +1700,9 @@ class at {
1689
1700
  } else if (s.type === "parasite") {
1690
1701
  this.ctx.beginPath();
1691
1702
  const n = 14;
1692
- for (let o = 0; o <= n; o++) {
1693
- const h = o * Math.PI * 2 / n, c = s.radius + Math.sin(h * 5 - e * 5) * 3, u = Math.cos(h) * c, p = Math.sin(h) * c;
1694
- o === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
1703
+ for (let r = 0; r <= n; r++) {
1704
+ const h = r * Math.PI * 2 / n, c = s.radius + Math.sin(h * 5 - e * 5) * 3, u = Math.cos(h) * c, p = Math.sin(h) * c;
1705
+ r === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
1695
1706
  }
1696
1707
  this.ctx.closePath(), this.ctx.fill(), this.ctx.fillStyle = i.bgOuter, this.ctx.beginPath(), this.ctx.arc(0, 0, s.radius * 0.45, 0, Math.PI * 2), this.ctx.fill();
1697
1708
  } else
@@ -1710,7 +1721,7 @@ class at {
1710
1721
  this.ctx.save(), this.ctx.globalAlpha = e.alpha, this.ctx.fillStyle = e.color, this.ctx.font = `900 ${e.size}px Orbitron, sans-serif`, this.ctx.textAlign = "center", this.ctx.shadowColor = e.color, this.ctx.shadowBlur = 12, this.ctx.fillText(e.text, e.position.x, e.position.y), this.ctx.restore();
1711
1722
  }
1712
1723
  }
1713
- class nt {
1724
+ class rt {
1714
1725
  container;
1715
1726
  i18n;
1716
1727
  waveLabelElement;
@@ -1742,7 +1753,7 @@ class nt {
1742
1753
  this.container.style.display = "none";
1743
1754
  }
1744
1755
  }
1745
- class ot {
1756
+ class ht {
1746
1757
  container;
1747
1758
  i18n;
1748
1759
  onStartCallback;
@@ -1768,7 +1779,7 @@ class ot {
1768
1779
  this.container.style.display = "none";
1769
1780
  }
1770
1781
  }
1771
- class rt {
1782
+ class lt {
1772
1783
  modal;
1773
1784
  card;
1774
1785
  i18n;
@@ -1779,8 +1790,8 @@ class rt {
1779
1790
  hapticsEnabled = !0;
1780
1791
  constructor(t, e, i, s, a, l) {
1781
1792
  this.i18n = e, this.themeManager = i, this.platform = s, this.onLanguageChangedCallback = a, this.onCloseCallback = l;
1782
- const r = localStorage.getItem("axon_surge_haptics");
1783
- r !== null && (this.hapticsEnabled = r === "true"), this.modal = document.createElement("dialog"), this.modal.className = "axon-settings-modal", this.card = document.createElement("div"), this.card.className = "axon-settings-card", this.modal.appendChild(this.card), t.appendChild(this.modal), this.modal.addEventListener("close", () => {
1793
+ const o = localStorage.getItem("axon_surge_haptics");
1794
+ o !== null && (this.hapticsEnabled = o === "true"), this.modal = document.createElement("dialog"), this.modal.className = "axon-settings-modal", this.card = document.createElement("div"), this.card.className = "axon-settings-card", this.modal.appendChild(this.card), t.appendChild(this.modal), this.modal.addEventListener("close", () => {
1784
1795
  this.onCloseCallback && this.onCloseCallback();
1785
1796
  }), this.renderContent();
1786
1797
  }
@@ -1813,20 +1824,20 @@ class rt {
1813
1824
  ko: "한국어 (KO)",
1814
1825
  zh: "中文 (ZH)"
1815
1826
  };
1816
- for (const T of H) {
1827
+ for (const E of K) {
1817
1828
  const g = document.createElement("option");
1818
- g.value = T, g.textContent = l[T], this.i18n.getLanguage() === T && (g.selected = !0), a.appendChild(g);
1829
+ g.value = E, g.textContent = l[E], this.i18n.getLanguage() === E && (g.selected = !0), a.appendChild(g);
1819
1830
  }
1820
1831
  a.addEventListener("change", () => {
1821
- const T = a.value;
1822
- this.i18n.setLanguage(T), this.onLanguageChangedCallback && this.onLanguageChangedCallback(T), this.renderContent();
1832
+ const E = a.value;
1833
+ this.i18n.setLanguage(E), this.onLanguageChangedCallback && this.onLanguageChangedCallback(E), this.renderContent();
1823
1834
  });
1824
- const r = document.createElement("span");
1825
- r.className = "axon-select-arrow", r.textContent = "▼", s.appendChild(a), s.appendChild(r), e.appendChild(i), e.appendChild(s);
1835
+ const o = document.createElement("span");
1836
+ o.className = "axon-select-arrow", o.textContent = "▼", s.appendChild(a), s.appendChild(o), e.appendChild(i), e.appendChild(s);
1826
1837
  const n = document.createElement("div");
1827
1838
  n.className = "axon-setting-row";
1828
- const o = document.createElement("span");
1829
- o.textContent = this.i18n.translate("themeLabel");
1839
+ const r = document.createElement("span");
1840
+ r.textContent = this.i18n.translate("themeLabel");
1830
1841
  const h = document.createElement("div");
1831
1842
  h.className = "axon-toggle-group";
1832
1843
  const c = [
@@ -1834,13 +1845,13 @@ class rt {
1834
1845
  { id: "dark", label: "DARK" },
1835
1846
  { id: "light", label: "LIGHT" }
1836
1847
  ];
1837
- for (const T of c) {
1848
+ for (const E of c) {
1838
1849
  const g = document.createElement("button");
1839
- g.type = "button", g.className = `axon-toggle-btn ${this.themeManager.getTheme() === T.id ? "active" : ""}`, g.textContent = T.label, g.addEventListener("click", () => {
1840
- this.themeManager.setTheme(T.id), this.renderContent();
1850
+ g.type = "button", g.className = `axon-toggle-btn ${this.themeManager.getTheme() === E.id ? "active" : ""}`, g.textContent = E.label, g.addEventListener("click", () => {
1851
+ this.themeManager.setTheme(E.id), this.renderContent();
1841
1852
  }), h.appendChild(g);
1842
1853
  }
1843
- n.appendChild(o), n.appendChild(h);
1854
+ n.appendChild(r), n.appendChild(h);
1844
1855
  const u = document.createElement("div");
1845
1856
  u.className = "axon-setting-row";
1846
1857
  const p = document.createElement("span");
@@ -1851,10 +1862,10 @@ class rt {
1851
1862
  { enabled: !0, label: this.i18n.translate("hapticsOn") },
1852
1863
  { enabled: !1, label: this.i18n.translate("hapticsOff") }
1853
1864
  ];
1854
- for (const T of y) {
1865
+ for (const E of y) {
1855
1866
  const g = document.createElement("button");
1856
- g.type = "button", g.className = `axon-toggle-btn ${this.hapticsEnabled === T.enabled ? "active" : ""}`, g.textContent = T.label, g.addEventListener("click", () => {
1857
- this.hapticsEnabled = T.enabled, localStorage.setItem("axon_surge_haptics", String(T.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
1867
+ g.type = "button", g.className = `axon-toggle-btn ${this.hapticsEnabled === E.enabled ? "active" : ""}`, g.textContent = E.label, g.addEventListener("click", () => {
1868
+ this.hapticsEnabled = E.enabled, localStorage.setItem("axon_surge_haptics", String(E.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
1858
1869
  }), f.appendChild(g);
1859
1870
  }
1860
1871
  u.appendChild(p), u.appendChild(f);
@@ -1864,14 +1875,14 @@ class rt {
1864
1875
  m.textContent = this.i18n.translate("tutorialSettingLabel");
1865
1876
  const x = document.createElement("div");
1866
1877
  x.className = "axon-toggle-group";
1867
- const L = localStorage.getItem("axon_surge_show_tutorial") !== "false", A = [
1878
+ const S = localStorage.getItem("axon_surge_show_tutorial") !== "false", v = [
1868
1879
  { enabled: !0, label: this.i18n.translate("hapticsOn") },
1869
1880
  { enabled: !1, label: this.i18n.translate("hapticsOff") }
1870
1881
  ];
1871
- for (const T of A) {
1882
+ for (const E of v) {
1872
1883
  const g = document.createElement("button");
1873
- g.type = "button", g.className = `axon-toggle-btn ${L === T.enabled ? "active" : ""}`, g.textContent = T.label, g.addEventListener("click", () => {
1874
- localStorage.setItem("axon_surge_show_tutorial", String(T.enabled)), this.renderContent();
1884
+ g.type = "button", g.className = `axon-toggle-btn ${S === E.enabled ? "active" : ""}`, g.textContent = E.label, g.addEventListener("click", () => {
1885
+ localStorage.setItem("axon_surge_show_tutorial", String(E.enabled)), this.renderContent();
1875
1886
  }), x.appendChild(g);
1876
1887
  }
1877
1888
  d.appendChild(m), d.appendChild(x);
@@ -1893,7 +1904,7 @@ class rt {
1893
1904
  }
1894
1905
  }
1895
1906
  const B = "axon_surge_show_tutorial";
1896
- class ht {
1907
+ class ct {
1897
1908
  isActive = !1;
1898
1909
  showWarning = !1;
1899
1910
  dummyLauncher = null;
@@ -1927,11 +1938,11 @@ class ht {
1927
1938
  this.isActive = !1;
1928
1939
  return;
1929
1940
  }
1930
- this.isActive = !0, this.showWarning = !1, i.length = 0, this.initialLauncherPos = { x: t * 0.28, y: e * 0.28 }, this.initialTargetPos = { x: t * 0.72, y: e * 0.28 }, this.dummyLauncher = S.createEnemy(
1941
+ this.isActive = !0, this.showWarning = !1, i.length = 0, this.initialLauncherPos = { x: t * 0.28, y: e * 0.28 }, this.initialTargetPos = { x: t * 0.72, y: e * 0.28 }, this.dummyLauncher = L.createEnemy(
1931
1942
  "piercer",
1932
1943
  this.initialLauncherPos,
1933
1944
  this.initialTargetPos
1934
- ), this.dummyLauncher.velocity = { x: 0, y: 0 }, this.dummyTarget = S.createEnemy(
1945
+ ), this.dummyLauncher.velocity = { x: 0, y: 0 }, this.dummyTarget = L.createEnemy(
1935
1946
  "spore",
1936
1947
  this.initialTargetPos,
1937
1948
  this.initialLauncherPos
@@ -1939,27 +1950,27 @@ class ht {
1939
1950
  }
1940
1951
  update(t, e, i, s, a, l) {
1941
1952
  if (!this.isActive || !this.dummyLauncher || !this.dummyTarget) return;
1942
- const r = this.dummyLauncher, n = this.dummyTarget;
1943
- e.includes(r) || e.push(r), e.includes(n) || e.push(n);
1944
- const o = n.position.x - r.position.x, h = n.position.y - r.position.y, c = Math.hypot(o, h);
1945
- if (r.isGrabbed) {
1946
- if (this.showWarning = !1, c <= r.radius + n.radius + 60) {
1947
- l && l(), r.isGrabbed = !1, this.showWarning = !0, this.resetDummies(r, n);
1953
+ const o = this.dummyLauncher, n = this.dummyTarget;
1954
+ e.includes(o) || e.push(o), e.includes(n) || e.push(n);
1955
+ const r = n.position.x - o.position.x, h = n.position.y - o.position.y, c = Math.hypot(r, h);
1956
+ if (o.isGrabbed) {
1957
+ if (this.showWarning = !1, c <= o.radius + n.radius + 60) {
1958
+ l && l(), o.isGrabbed = !1, this.showWarning = !0, this.resetDummies(o, n);
1948
1959
  return;
1949
1960
  }
1950
1961
  return;
1951
1962
  }
1952
- if (r.wasManipulated) {
1953
- const u = Math.hypot(r.velocity.x, r.velocity.y);
1954
- if (!r.isThrown || u < 70) {
1955
- l && l(), this.showWarning = !0, this.resetDummies(r, n);
1963
+ if (o.wasManipulated) {
1964
+ const u = Math.hypot(o.velocity.x, o.velocity.y);
1965
+ if (!o.isThrown || u < 70) {
1966
+ l && l(), this.showWarning = !0, this.resetDummies(o, n);
1956
1967
  return;
1957
1968
  }
1958
- if (c <= r.getHitRadius() + n.getHitRadius()) {
1959
- r.triggerDissolveDeath(), n.triggerDissolveDeath(), this.showWarning = !1, this.isActive = !1, a();
1969
+ if (c <= o.getHitRadius() + n.getHitRadius()) {
1970
+ o.triggerDissolveDeath(), n.triggerDissolveDeath(), this.showWarning = !1, this.isActive = !1, a();
1960
1971
  return;
1961
1972
  }
1962
- (r.position.x < -60 || r.position.x > i + 60 || r.position.y < -60 || r.position.y > s + 60 || u < 40) && (l && l(), this.showWarning = !0, this.resetDummies(r, n));
1973
+ (o.position.x < -60 || o.position.x > i + 60 || o.position.y < -60 || o.position.y > s + 60 || u < 40) && (l && l(), this.showWarning = !0, this.resetDummies(o, n));
1963
1974
  }
1964
1975
  }
1965
1976
  resetDummies(t, e) {
@@ -1969,7 +1980,7 @@ class ht {
1969
1980
  this.isActive = !1, this.showWarning = !1;
1970
1981
  }
1971
1982
  }
1972
- class lt {
1983
+ class dt {
1973
1984
  container;
1974
1985
  i18n;
1975
1986
  tutorialManager;
@@ -2005,7 +2016,7 @@ class lt {
2005
2016
  this.container.style.display = "none";
2006
2017
  }
2007
2018
  }
2008
- class ct {
2019
+ class ut {
2009
2020
  fillElement;
2010
2021
  killsCount = 0;
2011
2022
  currentLevel = 1;
@@ -2036,7 +2047,7 @@ class ct {
2036
2047
  this.fillElement && this.fillElement.parentElement && (this.fillElement.parentElement.style.display = "none");
2037
2048
  }
2038
2049
  }
2039
- class dt {
2050
+ class pt {
2040
2051
  haptics = {
2041
2052
  impact: async (t) => {
2042
2053
  if ("vibrate" in navigator) {
@@ -2076,7 +2087,7 @@ class dt {
2076
2087
  }
2077
2088
  };
2078
2089
  }
2079
- class ut {
2090
+ class mt {
2080
2091
  container;
2081
2092
  canvas;
2082
2093
  i18n;
@@ -2108,7 +2119,7 @@ class ut {
2108
2119
  isRunning = !1;
2109
2120
  isPaused = !1;
2110
2121
  constructor(t) {
2111
- this.container = t.root, this.container.classList.add("axon-game-root"), this.i18n = new Z(t.language), this.themeManager = new tt(t.theme, this.container), this.platform = t.platform || new dt(), this.canvas = document.createElement("canvas"), this.canvas.className = "axon-canvas", this.container.appendChild(this.canvas), this.resizeCanvas(), window.addEventListener("resize", () => this.resizeCanvas()), this.eventBus = new K(), this.core = new V(this.canvas.width / 2, this.canvas.height / 2), this.inputManager = new F(this.canvas), this.physicsEngine = new q(this.eventBus, this.i18n), this.waveDirector = new Q(), this.renderer = new at(this.canvas, this.themeManager), this.juice = new J(), this.settingsModal = new rt(
2122
+ this.container = t.root, this.container.classList.add("axon-game-root"), this.i18n = new $(t.language), this.themeManager = new it(t.theme, this.container), this.platform = t.platform || new pt(), this.canvas = document.createElement("canvas"), this.canvas.className = "axon-canvas", this.container.appendChild(this.canvas), this.resizeCanvas(), window.addEventListener("resize", () => this.resizeCanvas()), this.eventBus = new V(), this.core = new Y(this.canvas.width / 2, this.canvas.height / 2), this.inputManager = new J(this.canvas), this.physicsEngine = new Q(this.eventBus, this.i18n), this.waveDirector = new et(), this.renderer = new ot(this.canvas, this.themeManager), this.juice = new X(), this.settingsModal = new lt(
2112
2123
  this.container,
2113
2124
  this.i18n,
2114
2125
  this.themeManager,
@@ -2117,20 +2128,20 @@ class ut {
2117
2128
  () => {
2118
2129
  this.isPaused = !1;
2119
2130
  }
2120
- ), this.interactiveTutorial = new ht(), this.tutorialOverlay = new lt(this.container, this.i18n, this.interactiveTutorial), this.hud = new nt(this.container, this.i18n, () => {
2131
+ ), this.interactiveTutorial = new ct(), this.tutorialOverlay = new dt(this.container, this.i18n, this.interactiveTutorial), this.hud = new rt(this.container, this.i18n, () => {
2121
2132
  this.isPaused = !0, this.settingsModal.show();
2122
- }), this.hud.show(), this.progressBar = new ct(this.hud.progressSlot, (e) => {
2133
+ }), this.hud.show(), this.progressBar = new ut(this.hud.progressSlot, (e) => {
2123
2134
  this.waveDirector.wave = e;
2124
- }), this.startMenu = new ot(this.container, this.i18n, () => this.startGame()), this.initAmbientArena(), this.gameLoop = new W(
2135
+ }), this.startMenu = new ht(this.container, this.i18n, () => this.startGame()), this.initAmbientArena(), this.gameLoop = new F(
2125
2136
  (e) => this.update(e),
2126
2137
  () => this.render()
2127
2138
  ), this.setupEvents(), this.gameLoop.start();
2128
2139
  }
2129
2140
  setLanguage(t) {
2130
- this.i18n.setLanguage(t, !1), this.onLanguageChanged(t);
2141
+ this.i18n.setLanguage(t), this.onLanguageChanged(t);
2131
2142
  }
2132
2143
  setTheme(t) {
2133
- this.themeManager.setTheme(t, !1);
2144
+ this.themeManager.setTheme(t);
2134
2145
  }
2135
2146
  getLanguage() {
2136
2147
  return this.i18n.getLanguage();
@@ -2148,11 +2159,11 @@ class ut {
2148
2159
  const i = t[e % t.length], s = e * Math.PI * 2 / 16, a = 180 + Math.random() * 220, l = {
2149
2160
  x: this.canvas.width / 2 + Math.cos(s) * a,
2150
2161
  y: this.canvas.height / 2 + Math.sin(s) * a
2151
- }, r = S.createEnemy(i, l, {
2162
+ }, o = L.createEnemy(i, l, {
2152
2163
  x: l.x + Math.sin(s) * 100,
2153
2164
  y: l.y - Math.cos(s) * 100
2154
2165
  });
2155
- this.ambientEnemies.push(r);
2166
+ this.ambientEnemies.push(o);
2156
2167
  }
2157
2168
  }
2158
2169
  resizeCanvas() {
@@ -2246,14 +2257,14 @@ class ut {
2246
2257
  this.gameLoop.stop(), this.canvas.remove();
2247
2258
  }
2248
2259
  }
2249
- function pt(E) {
2250
- return new ut(E);
2260
+ function gt(T) {
2261
+ return new mt(T);
2251
2262
  }
2252
2263
  export {
2253
- dt as BrowserPlatform,
2254
- ut as GameEngine,
2255
- H as LANGUAGES,
2256
- tt as ThemeManager,
2257
- pt as createAxonSurge,
2258
- N as isLanguage
2264
+ pt as BrowserPlatform,
2265
+ mt as GameEngine,
2266
+ K as LANGUAGES,
2267
+ it as ThemeManager,
2268
+ gt as createAxonSurge,
2269
+ P as isLanguage
2259
2270
  };