@sticky-studio-npm/ui-core 1.0.9 → 1.0.12

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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,cAAc,CAAC;AAWtB,UAAU,YAAY;IACpB,iBAAiB,CAAC,EAAE,aAAa,CAAC;CACnC;AAED,QAAA,MAAM,OAAO,qCAA8C,YAAY;;CA6CrE,CAAC;AAEH,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,cAAc,CAAC;AAYtB,UAAU,YAAY;IACpB,iBAAiB,CAAC,EAAE,aAAa,CAAC;CACnC;AAED,QAAA,MAAM,OAAO,qCAA8C,YAAY;;CA6CrE,CAAC;AAEH,eAAe,OAAO,CAAC"}
@@ -213,7 +213,7 @@ function $(e, n) {
213
213
  function H(e, n, t) {
214
214
  return t ? e |= n : e &= ~n, e;
215
215
  }
216
- function Tn(e, n) {
216
+ function Cn(e, n) {
217
217
  (n == null || n > e.length) && (n = e.length);
218
218
  for (var t = 0, r = Array(n); t < n; t++) r[t] = e[t];
219
219
  return r;
@@ -280,9 +280,9 @@ function bi(e) {
280
280
  }
281
281
  function mi(e, n) {
282
282
  if (e) {
283
- if (typeof e == "string") return Tn(e, n);
283
+ if (typeof e == "string") return Cn(e, n);
284
284
  var t = {}.toString.call(e).slice(8, -1);
285
- return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Tn(e, n) : void 0;
285
+ return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Cn(e, n) : void 0;
286
286
  }
287
287
  }
288
288
  var j = /* @__PURE__ */ Symbol("mobx-stored-annotations");
@@ -384,13 +384,13 @@ var Ot = {
384
384
  default: Oi
385
385
  };
386
386
  function Be(e, n, t) {
387
- return ot(e) ? e : Array.isArray(e) ? C.array(e, {
387
+ return ot(e) ? e : Array.isArray(e) ? T.array(e, {
388
388
  name: t
389
- }) : G(e) ? C.object(e, void 0, {
389
+ }) : G(e) ? T.object(e, void 0, {
390
390
  name: t
391
- }) : We(e) ? C.map(e, {
391
+ }) : We(e) ? T.map(e, {
392
392
  name: t
393
- }) : _e(e) ? C.set(e, {
393
+ }) : _e(e) ? T.set(e, {
394
394
  name: t
395
395
  }) : typeof e == "function" && !Me(e) && !it(e) ? lr(e) ? Ke(e) : rt(t, e) : e;
396
396
  }
@@ -398,22 +398,22 @@ function Si(e, n, t) {
398
398
  if (e == null || Ze(e) || kt(e) || Se(e) || le(e))
399
399
  return e;
400
400
  if (Array.isArray(e))
401
- return C.array(e, {
401
+ return T.array(e, {
402
402
  name: t,
403
403
  deep: !1
404
404
  });
405
405
  if (G(e))
406
- return C.object(e, void 0, {
406
+ return T.object(e, void 0, {
407
407
  name: t,
408
408
  deep: !1
409
409
  });
410
410
  if (We(e))
411
- return C.map(e, {
411
+ return T.map(e, {
412
412
  name: t,
413
413
  deep: !1
414
414
  });
415
415
  if (_e(e))
416
- return C.set(e, {
416
+ return T.set(e, {
417
417
  name: t,
418
418
  deep: !1
419
419
  });
@@ -434,8 +434,8 @@ function lt(e, n) {
434
434
  annotationType_: e,
435
435
  options_: n,
436
436
  make_: Ni,
437
- extend_: Ti,
438
- decorate_20223_: Ci
437
+ extend_: Ci,
438
+ decorate_20223_: Ti
439
439
  };
440
440
  }
441
441
  function Ni(e, n, t, r) {
@@ -449,11 +449,11 @@ function Ni(e, n, t, r) {
449
449
  var s = vr(e, this, n, t, !1);
450
450
  return fe(r, n, s), 2;
451
451
  }
452
- function Ti(e, n, t, r) {
452
+ function Ci(e, n, t, r) {
453
453
  var o = vr(e, this, n, t);
454
454
  return e.defineProperty_(n, o, r);
455
455
  }
456
- function Ci(e, n) {
456
+ function Ti(e, n) {
457
457
  process.env.NODE_ENV !== "production" && Mt(n, ["method", "field"]);
458
458
  var t = n.kind, r = n.name, o = n.addInitializer, s = this, u = function(p) {
459
459
  var m, i, a, l;
@@ -656,7 +656,7 @@ function mr(e) {
656
656
  function Gi(e, n, t, r) {
657
657
  var o, s;
658
658
  if (t.get)
659
- return Ce.make_(e, n, t, r);
659
+ return Te.make_(e, n, t, r);
660
660
  if (t.set) {
661
661
  var u = Me(t.set) ? t.set : Ve(n.toString(), t.set);
662
662
  return r === e.target_ ? e.defineProperty_(n, {
@@ -676,7 +676,7 @@ function Gi(e, n, t, r) {
676
676
  var m = (c = this.options_) != null && c.autoBind ? rt.bound : rt;
677
677
  return m.make_(e, n, t, r);
678
678
  }
679
- var i = ((o = this.options_) == null ? void 0 : o.deep) === !1 ? C.ref : C;
679
+ var i = ((o = this.options_) == null ? void 0 : o.deep) === !1 ? T.ref : T;
680
680
  if (typeof t.value == "function" && (s = this.options_) != null && s.autoBind) {
681
681
  var a;
682
682
  t.value = t.value.bind((a = e.proxy_) != null ? a : e.target_);
@@ -686,7 +686,7 @@ function Gi(e, n, t, r) {
686
686
  function Ki(e, n, t, r) {
687
687
  var o, s;
688
688
  if (t.get)
689
- return Ce.extend_(e, n, t, r);
689
+ return Te.extend_(e, n, t, r);
690
690
  if (t.set)
691
691
  return e.defineProperty_(n, {
692
692
  configurable: g.safeDescriptors ? e.isPlainObject_ : !0,
@@ -696,7 +696,7 @@ function Ki(e, n, t, r) {
696
696
  var u;
697
697
  t.value = t.value.bind((u = e.proxy_) != null ? u : e.target_);
698
698
  }
699
- var c = ((s = this.options_) == null ? void 0 : s.deep) === !1 ? C.ref : C;
699
+ var c = ((s = this.options_) == null ? void 0 : s.deep) === !1 ? T.ref : T;
700
700
  return c.extend_(e, n, t, r);
701
701
  }
702
702
  function qi(e, n) {
@@ -737,7 +737,7 @@ function Ar(e, n, t) {
737
737
  st(e, n, nn);
738
738
  return;
739
739
  }
740
- return ot(e) ? e : G(e) ? C.object(e, n, t) : Array.isArray(e) ? C.array(e, n) : We(e) ? C.map(e, n) : _e(e) ? C.set(e, n) : typeof e == "object" && e !== null ? e : C.box(e, n);
740
+ return ot(e) ? e : G(e) ? T.object(e, n, t) : Array.isArray(e) ? T.array(e, n) : We(e) ? T.map(e, n) : _e(e) ? T.set(e, n) : typeof e == "object" && e !== null ? e : T.box(e, n);
741
741
  }
742
742
  ar(Ar, yr);
743
743
  var no = {
@@ -766,9 +766,9 @@ var no = {
766
766
  shallow: /* @__PURE__ */ de(Ji),
767
767
  deep: yr,
768
768
  struct: /* @__PURE__ */ de(Qi)
769
- }, C = /* @__PURE__ */ ar(Ar, no), Or = "computed", ro = "computed.struct", rn = /* @__PURE__ */ vn(Or), io = /* @__PURE__ */ vn(ro, {
769
+ }, T = /* @__PURE__ */ ar(Ar, no), Or = "computed", ro = "computed.struct", rn = /* @__PURE__ */ vn(Or), io = /* @__PURE__ */ vn(ro, {
770
770
  equals: Ot.structural
771
- }), Ce = function(n, t) {
771
+ }), Te = function(n, t) {
772
772
  if (ut(t))
773
773
  return rn.decorate_20223_(n, t);
774
774
  if (De(t))
@@ -779,10 +779,10 @@ var no = {
779
779
  var r = G(t) ? t : {};
780
780
  return r.get = n, r.name || (r.name = n.name || ""), new te(r);
781
781
  };
782
- Object.assign(Ce, rn);
783
- Ce.struct = /* @__PURE__ */ de(io);
784
- var Cn, xn, wt = 0, oo = 1, ao = (Cn = (xn = /* @__PURE__ */ yt(function() {
785
- }, "name")) == null ? void 0 : xn.configurable) != null ? Cn : !1, Dn = {
782
+ Object.assign(Te, rn);
783
+ Te.struct = /* @__PURE__ */ de(io);
784
+ var Tn, xn, wt = 0, oo = 1, ao = (Tn = (xn = /* @__PURE__ */ yt(function() {
785
+ }, "name")) == null ? void 0 : xn.configurable) != null ? Tn : !1, Dn = {
786
786
  value: "action",
787
787
  configurable: !0,
788
788
  writable: !1,
@@ -991,7 +991,7 @@ var co = "create", xe = /* @__PURE__ */ (function(e) {
991
991
  this.keepAlive_ || (an(this), this.value_ = void 0, process.env.NODE_ENV !== "production" && this.isTracing_ !== ee.NONE && console.log("[mobx.trace] Computed value '" + this.name_ + "' was suspended and it will recompute on the next access."));
992
992
  }, n.observe_ = function(r, o) {
993
993
  var s = this, u = !0, c = void 0;
994
- return Co(function() {
994
+ return To(function() {
995
995
  var f = s.get();
996
996
  if (!u || o) {
997
997
  var p = Ie();
@@ -1141,7 +1141,7 @@ function po(e) {
1141
1141
  }
1142
1142
  for (t.length = o, e.newObserving_ = null, s = n.length; s--; ) {
1143
1143
  var f = n[s];
1144
- f.diffValue === 0 && Tr(f, e), f.diffValue = 0;
1144
+ f.diffValue === 0 && Cr(f, e), f.diffValue = 0;
1145
1145
  }
1146
1146
  for (; o--; ) {
1147
1147
  var p = t[o];
@@ -1153,7 +1153,7 @@ function an(e) {
1153
1153
  var n = e.observing_;
1154
1154
  e.observing_ = [];
1155
1155
  for (var t = n.length; t--; )
1156
- Tr(n[t], e);
1156
+ Cr(n[t], e);
1157
1157
  e.dependenciesState_ = N.NOT_TRACKING_;
1158
1158
  }
1159
1159
  function wr(e) {
@@ -1202,10 +1202,10 @@ function vo() {
1202
1202
  function ho(e, n) {
1203
1203
  e.observers_.add(n), e.lowestObserverState_ > n.dependenciesState_ && (e.lowestObserverState_ = n.dependenciesState_);
1204
1204
  }
1205
- function Tr(e, n) {
1206
- e.observers_.delete(n), e.observers_.size === 0 && Cr(e);
1205
+ function Cr(e, n) {
1206
+ e.observers_.delete(n), e.observers_.size === 0 && Tr(e);
1207
1207
  }
1208
- function Cr(e) {
1208
+ function Tr(e) {
1209
1209
  e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, g.pendingUnobservations.push(e));
1210
1210
  }
1211
1211
  function z() {
@@ -1224,7 +1224,7 @@ function J() {
1224
1224
  function xr(e) {
1225
1225
  fo(e);
1226
1226
  var n = g.trackingDerivation;
1227
- return n !== null ? (n.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = n.runId_, n.newObserving_[n.unboundDepsCount_++] = e, !e.isBeingObserved && g.trackingContext && (e.isBeingObserved = !0, e.onBO())), e.isBeingObserved) : (e.observers_.size === 0 && g.inBatch > 0 && Cr(e), !1);
1227
+ return n !== null ? (n.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = n.runId_, n.newObserving_[n.unboundDepsCount_++] = e, !e.isBeingObserved && g.trackingContext && (e.isBeingObserved = !0, e.onBO())), e.isBeingObserved) : (e.observers_.size === 0 && g.inBatch > 0 && Tr(e), !1);
1228
1228
  }
1229
1229
  function Dr(e) {
1230
1230
  e.lowestObserverState_ !== N.STALE_ && (e.lowestObserverState_ = N.STALE_, e.observers_.forEach(function(n) {
@@ -1449,7 +1449,7 @@ var gn = "action", So = "action.bound", Mr = "autoAction", wo = "autoAction.boun
1449
1449
  bound: !0
1450
1450
  }), ln = /* @__PURE__ */ lt(Mr, {
1451
1451
  autoAction: !0
1452
- }), To = /* @__PURE__ */ lt(wo, {
1452
+ }), Co = /* @__PURE__ */ lt(wo, {
1453
1453
  autoAction: !0,
1454
1454
  bound: !0
1455
1455
  });
@@ -1477,11 +1477,11 @@ Object.assign(V, un);
1477
1477
  var rt = /* @__PURE__ */ Pr(!0);
1478
1478
  Object.assign(rt, ln);
1479
1479
  V.bound = /* @__PURE__ */ de(No);
1480
- rt.bound = /* @__PURE__ */ de(To);
1480
+ rt.bound = /* @__PURE__ */ de(Co);
1481
1481
  function Me(e) {
1482
1482
  return M(e) && e.isMobxAction === !0;
1483
1483
  }
1484
- function Co(e, n) {
1484
+ function To(e, n) {
1485
1485
  var t, r, o, s;
1486
1486
  n === void 0 && (n = sr), process.env.NODE_ENV !== "production" && (M(e) || A("Autorun expects a function as first argument"), Me(e) && A("Autorun does not accept actions since actions are untrackable"));
1487
1487
  var u = (t = (r = n) == null ? void 0 : r.name) != null ? t : process.env.NODE_ENV !== "production" ? e.name || "Autorun@" + se() : "Autorun", c = !n.scheduler && !n.delay, f;
@@ -1763,7 +1763,7 @@ function Re(e, n, t) {
1763
1763
  var Ln = "splice", re = "update", Ko = 1e4, qo = {
1764
1764
  get: function(n, t) {
1765
1765
  var r = n[S];
1766
- return t === S ? r : t === "length" ? r.getArrayLength_() : typeof t == "string" && !isNaN(t) ? r.get_(parseInt(t)) : Q(Tt, t) ? Tt[t] : n[t];
1766
+ return t === S ? r : t === "length" ? r.getArrayLength_() : typeof t == "string" && !isNaN(t) ? r.get_(parseInt(t)) : Q(Ct, t) ? Ct[t] : n[t];
1767
1767
  },
1768
1768
  set: function(n, t, r) {
1769
1769
  var o = n[S];
@@ -1913,7 +1913,7 @@ function Wo(e, n, t, r) {
1913
1913
  return o.proxy_ = s, e && e.length && o.spliceWithArray_(0, 0, e), s;
1914
1914
  });
1915
1915
  }
1916
- var Tt = {
1916
+ var Ct = {
1917
1917
  clear: function() {
1918
1918
  return this.splice(0);
1919
1919
  },
@@ -2004,7 +2004,7 @@ B("toReversed", ue);
2004
2004
  B("reduce", $r);
2005
2005
  B("reduceRight", $r);
2006
2006
  function B(e, n) {
2007
- typeof Array.prototype[e] == "function" && (Tt[e] = n(e));
2007
+ typeof Array.prototype[e] == "function" && (Ct[e] = n(e));
2008
2008
  }
2009
2009
  function W(e) {
2010
2010
  return function() {
@@ -2038,7 +2038,7 @@ var Xo = /* @__PURE__ */ Pe("ObservableArrayAdministration", An);
2038
2038
  function kt(e) {
2039
2039
  return Lt(e) && Xo(e[S]);
2040
2040
  }
2041
- var Zo = {}, ye = "add", Ct = "delete", Hr = /* @__PURE__ */ (function() {
2041
+ var Zo = {}, ye = "add", Tt = "delete", Hr = /* @__PURE__ */ (function() {
2042
2042
  function e(t, r, o) {
2043
2043
  var s = this;
2044
2044
  r === void 0 && (r = Be), o === void 0 && (o = process.env.NODE_ENV !== "production" ? "ObservableMap@" + se() : "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[S] = Zo, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = r, this.name_ = o, M(Map) || A(18), we(function() {
@@ -2078,7 +2078,7 @@ var Zo = {}, ye = "add", Ct = "delete", Hr = /* @__PURE__ */ (function() {
2078
2078
  var o = this;
2079
2079
  if (ce(this.keysAtom_), Z(this)) {
2080
2080
  var s = Y(this, {
2081
- type: Ct,
2081
+ type: Tt,
2082
2082
  object: this,
2083
2083
  name: r
2084
2084
  });
@@ -2089,7 +2089,7 @@ var Zo = {}, ye = "add", Ct = "delete", Hr = /* @__PURE__ */ (function() {
2089
2089
  var u = I(), c = oe(this), f = c || u ? {
2090
2090
  observableKind: "map",
2091
2091
  debugObjectName: this.name_,
2092
- type: Ct,
2092
+ type: Tt,
2093
2093
  object: this,
2094
2094
  oldValue: this.data_.get(r).value_,
2095
2095
  name: r
@@ -2316,7 +2316,7 @@ var zo = {}, Gr = /* @__PURE__ */ (function() {
2316
2316
  var o = this;
2317
2317
  if (Z(this)) {
2318
2318
  var s = Y(this, {
2319
- type: Ct,
2319
+ type: Tt,
2320
2320
  object: this,
2321
2321
  oldValue: r
2322
2322
  });
@@ -2327,7 +2327,7 @@ var zo = {}, Gr = /* @__PURE__ */ (function() {
2327
2327
  var u = process.env.NODE_ENV !== "production" && I(), c = oe(this), f = c || u ? {
2328
2328
  observableKind: "set",
2329
2329
  debugObjectName: this.name_,
2330
- type: Ct,
2330
+ type: Tt,
2331
2331
  object: this,
2332
2332
  oldValue: r
2333
2333
  } : null;
@@ -2769,7 +2769,7 @@ var On = /* @__PURE__ */ (function(e) {
2769
2769
  }
2770
2770
  }]);
2771
2771
  })(Kr);
2772
- Object.entries(Tt).forEach(function(e) {
2772
+ Object.entries(Ct).forEach(function(e) {
2773
2773
  var n = e[0], t = e[1];
2774
2774
  n !== "concat" && at(On.prototype, n, t);
2775
2775
  });
@@ -3654,46 +3654,46 @@ function Na() {
3654
3654
  l._ended(_);
3655
3655
  return;
3656
3656
  }
3657
- var T = _._node;
3657
+ var C = _._node;
3658
3658
  if (l._webAudio) {
3659
3659
  var wn = function() {
3660
3660
  l._playLock = !1, je(), l._refreshBuffer(_);
3661
3661
  var Fe = _._muted || l._muted ? 0 : _._volume;
3662
- T.gain.setValueAtTime(Fe, t.ctx.currentTime), _._playStart = t.ctx.currentTime, typeof T.bufferSource.start > "u" ? _._loop ? T.bufferSource.noteGrainOn(0, w, 86400) : T.bufferSource.noteGrainOn(0, w, O) : _._loop ? T.bufferSource.start(0, w, 86400) : T.bufferSource.start(0, w, O), D !== 1 / 0 && (l._endTimers[_._id] = setTimeout(l._ended.bind(l, _), D)), a || setTimeout(function() {
3662
+ C.gain.setValueAtTime(Fe, t.ctx.currentTime), _._playStart = t.ctx.currentTime, typeof C.bufferSource.start > "u" ? _._loop ? C.bufferSource.noteGrainOn(0, w, 86400) : C.bufferSource.noteGrainOn(0, w, O) : _._loop ? C.bufferSource.start(0, w, 86400) : C.bufferSource.start(0, w, O), D !== 1 / 0 && (l._endTimers[_._id] = setTimeout(l._ended.bind(l, _), D)), a || setTimeout(function() {
3663
3663
  l._emit("play", _._id), l._loadQueue();
3664
3664
  }, 0);
3665
3665
  };
3666
3666
  t.state === "running" && t.ctx.state !== "interrupted" ? wn() : (l._playLock = !0, l.once("resume", wn), l._clearTimer(_._id));
3667
3667
  } else {
3668
3668
  var En = function() {
3669
- T.currentTime = w, T.muted = _._muted || l._muted || t._muted || T.muted, T.volume = _._volume * t.volume(), T.playbackRate = _._rate;
3669
+ C.currentTime = w, C.muted = _._muted || l._muted || t._muted || C.muted, C.volume = _._volume * t.volume(), C.playbackRate = _._rate;
3670
3670
  try {
3671
- var Fe = T.play();
3671
+ var Fe = C.play();
3672
3672
  if (Fe && typeof Promise < "u" && (Fe instanceof Promise || typeof Fe.then == "function") ? (l._playLock = !0, je(), Fe.then(function() {
3673
- l._playLock = !1, T._unlocked = !0, a ? l._loadQueue() : l._emit("play", _._id);
3673
+ l._playLock = !1, C._unlocked = !0, a ? l._loadQueue() : l._emit("play", _._id);
3674
3674
  }).catch(function() {
3675
3675
  l._playLock = !1, l._emit("playerror", _._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), _._ended = !0, _._paused = !0;
3676
- })) : a || (l._playLock = !1, je(), l._emit("play", _._id)), T.playbackRate = _._rate, T.paused) {
3676
+ })) : a || (l._playLock = !1, je(), l._emit("play", _._id)), C.playbackRate = _._rate, C.paused) {
3677
3677
  l._emit("playerror", _._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
3678
3678
  return;
3679
3679
  }
3680
3680
  i !== "__default" || _._loop ? l._endTimers[_._id] = setTimeout(l._ended.bind(l, _), D) : (l._endTimers[_._id] = function() {
3681
- l._ended(_), T.removeEventListener("ended", l._endTimers[_._id], !1);
3682
- }, T.addEventListener("ended", l._endTimers[_._id], !1));
3681
+ l._ended(_), C.removeEventListener("ended", l._endTimers[_._id], !1);
3682
+ }, C.addEventListener("ended", l._endTimers[_._id], !1));
3683
3683
  } catch (ni) {
3684
3684
  l._emit("playerror", _._id, ni);
3685
3685
  }
3686
3686
  };
3687
- T.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (T.src = l._src, T.load());
3688
- var ti = window && window.ejecta || !T.readyState && t._navigator.isCocoonJS;
3689
- if (T.readyState >= 3 || ti)
3687
+ C.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (C.src = l._src, C.load());
3688
+ var ti = window && window.ejecta || !C.readyState && t._navigator.isCocoonJS;
3689
+ if (C.readyState >= 3 || ti)
3690
3690
  En();
3691
3691
  else {
3692
3692
  l._playLock = !0, l._state = "loading";
3693
3693
  var Nn = function() {
3694
- l._state = "loaded", En(), T.removeEventListener(t._canPlayEvent, Nn, !1);
3694
+ l._state = "loaded", En(), C.removeEventListener(t._canPlayEvent, Nn, !1);
3695
3695
  };
3696
- T.addEventListener(t._canPlayEvent, Nn, !1), l._clearTimer(_._id);
3696
+ C.addEventListener(t._canPlayEvent, Nn, !1), l._clearTimer(_._id);
3697
3697
  }
3698
3698
  }
3699
3699
  return _._id;
@@ -4504,7 +4504,7 @@ function Na() {
4504
4504
  }
4505
4505
  var Ue = Na();
4506
4506
  const er = "default";
4507
- class Ta {
4507
+ class Ca {
4508
4508
  bgMusic = /* @__PURE__ */ new Map();
4509
4509
  currentBgMusicId = "";
4510
4510
  bgBaseVolumes = /* @__PURE__ */ new Map();
@@ -4629,11 +4629,11 @@ class Ta {
4629
4629
  return Math.max(0, Math.min(1, n));
4630
4630
  }
4631
4631
  }
4632
- const Te = new Ta();
4632
+ const Ce = new Ca();
4633
4633
  function P() {
4634
- Te.playSound(Qr.Click);
4634
+ Ce.playSound(Qr.Click);
4635
4635
  }
4636
- const Ca = ({
4636
+ const Ta = ({
4637
4637
  onClick: e,
4638
4638
  disabled: n = !1,
4639
4639
  value: t,
@@ -4834,16 +4834,16 @@ class La {
4834
4834
  handlerSet = !1;
4835
4835
  constructor() {
4836
4836
  yn(this, {
4837
- anteBets: C,
4838
- inReelFeatures: C,
4839
- bonusFeatures: C,
4840
- activeAnteBet: C,
4841
- activeBonusFeature: C,
4842
- activeInReelFeature: C,
4843
- freeSpinsCount: C,
4844
- isActiveBonus: Ce,
4845
- isActiveInReelFeature: Ce,
4846
- isActiveAnteBet: Ce,
4837
+ anteBets: T,
4838
+ inReelFeatures: T,
4839
+ bonusFeatures: T,
4840
+ activeAnteBet: T,
4841
+ activeBonusFeature: T,
4842
+ activeInReelFeature: T,
4843
+ freeSpinsCount: T,
4844
+ isActiveBonus: Te,
4845
+ isActiveInReelFeature: Te,
4846
+ isActiveAnteBet: Te,
4847
4847
  setAnteBets: V,
4848
4848
  setActiveAnteBet: V,
4849
4849
  setActiveBonusFeature: V,
@@ -4919,19 +4919,19 @@ class Ma {
4919
4919
  return Number.isNaN(o) ? t : o;
4920
4920
  }
4921
4921
  setMusicOn(n) {
4922
- this.musicOn = n, localStorage.setItem(k.MUSIC_ON, n.toString()), n ? Te.unmuteMusic() : Te.muteMusic();
4922
+ this.musicOn = n, localStorage.setItem(k.MUSIC_ON, n.toString()), n ? Ce.unmuteMusic() : Ce.muteMusic();
4923
4923
  }
4924
4924
  toggleMute() {
4925
4925
  this.volume > 0 ? this.setVolume(0) : this.setVolume(50);
4926
4926
  }
4927
4927
  setVolume(n) {
4928
- this.volume = n, localStorage.setItem(k.VOLUME, n.toString()), Te.setMasterVolume(n);
4928
+ this.volume = n, localStorage.setItem(k.VOLUME, n.toString()), Ce.setMasterVolume(n);
4929
4929
  }
4930
4930
  setIsTurbo(n) {
4931
4931
  this.isTurbo = n, localStorage.setItem(k.IS_TURBO, n.toString());
4932
4932
  }
4933
4933
  setSoundsOn(n) {
4934
- this.soundsOn = n, localStorage.setItem(k.SOUND_ON, n.toString()), n ? Te.unmuteSounds() : Te.muteSounds();
4934
+ this.soundsOn = n, localStorage.setItem(k.SOUND_ON, n.toString()), n ? Ce.unmuteSounds() : Ce.muteSounds();
4935
4935
  }
4936
4936
  setIntroSkip(n) {
4937
4937
  this.introSkip = n, localStorage.setItem(k.SKIP_INTRO, n.toString());
@@ -5069,13 +5069,13 @@ class Ra {
5069
5069
  handlerSet = !1;
5070
5070
  constructor() {
5071
5071
  yn(this, {
5072
- isRunning: C,
5073
- isDisabled: C,
5074
- isSlamStop: C,
5075
- isUIVisible: C,
5076
- isAutoPlayDisabled: C,
5077
- isBuyBonusDisabled: C,
5078
- isBetAmountLabelsDisabled: C,
5072
+ isRunning: T,
5073
+ isDisabled: T,
5074
+ isSlamStop: T,
5075
+ isUIVisible: T,
5076
+ isAutoPlayDisabled: T,
5077
+ isBuyBonusDisabled: T,
5078
+ isBetAmountLabelsDisabled: T,
5079
5079
  setIsSpinRunning: V,
5080
5080
  setIsSpinDisabled: V,
5081
5081
  setIsSlamStop: V,
@@ -5201,7 +5201,7 @@ const ja = new ka(), Fa = F(() => {
5201
5201
  activeInReelFeature: i,
5202
5202
  setActiveAnteBet: a
5203
5203
  } = he, { isUIVisible: l, isAutoPlayDisabled: d, isBuyBonusDisabled: v, isBetAmountLabelsDisabled: h } = Dt, _ = et(() => p?.imagePath || i?.imagePath || m?.imagePath, [p, m, i]), y = or(() => {
5204
- Te.playSound(Qr.BuyBonusClick), p ? a.call(he, null) : f.call(R, U.buyBonus);
5204
+ Ce.playSound(Qr.BuyBonusClick), p ? a.call(he, null) : f.call(R, U.buyBonus);
5205
5205
  }, [p, a]);
5206
5206
  return /* @__PURE__ */ b("div", { className: `ui-footer ${l ? "" : "hidden"}`, children: /* @__PURE__ */ E("div", { className: "top-row", children: [
5207
5207
  /* @__PURE__ */ E("div", { className: "left-group", children: [
@@ -5222,7 +5222,7 @@ const ja = new ka(), Fa = F(() => {
5222
5222
  ] }),
5223
5223
  /* @__PURE__ */ E("div", { className: "bet-control", children: [
5224
5224
  /* @__PURE__ */ b(
5225
- Ca,
5225
+ Ta,
5226
5226
  {
5227
5227
  highlighted: !!p,
5228
5228
  value: p ? p.availableBets[ie.betIndex] : n,
@@ -5641,7 +5641,7 @@ const Ga = F(() => {
5641
5641
  {
5642
5642
  onClick: R.open.bind(R, U.payTable),
5643
5643
  className: "sp-action--paytable",
5644
- label: x("PAY_TABlE")
5644
+ label: x("PAY_TABLE")
5645
5645
  }
5646
5646
  )
5647
5647
  ] }),
@@ -5732,11 +5732,11 @@ const Ga = F(() => {
5732
5732
  const D = getComputedStyle(y), L = D.getPropertyValue("--max-description-height").trim();
5733
5733
  let X = 84;
5734
5734
  if (L) {
5735
- const T = L.match(/^(-?\d+(\.\d+)?)(px)?$/);
5736
- T && (X = Number(T[1]));
5735
+ const C = L.match(/^(-?\d+(\.\d+)?)(px)?$/);
5736
+ C && (X = Number(C[1]));
5737
5737
  } else {
5738
- const T = D.getPropertyValue("max-height").trim();
5739
- T && T.endsWith("px") && (X = Number(T.replace("px", "")));
5738
+ const C = D.getPropertyValue("max-height").trim();
5739
+ C && C.endsWith("px") && (X = Number(C.replace("px", "")));
5740
5740
  }
5741
5741
  const je = y.scrollHeight;
5742
5742
  m(X), a(je), d(je > X + 1);
@@ -5913,7 +5913,7 @@ const Ga = F(() => {
5913
5913
  role: "presentation",
5914
5914
  children: [
5915
5915
  !t && /* @__PURE__ */ E("header", { className: "overlay-header", children: [
5916
- typeof n == "string" && /* @__PURE__ */ b("span", { className: "popup-title", children: n.toUpperCase() }),
5916
+ typeof n == "string" && /* @__PURE__ */ b("span", { className: "popup-title", children: x(n.toUpperCase()).toUpperCase() }),
5917
5917
  /* @__PURE__ */ b("div", { className: "overlay-close", "aria-label": "Close", onClick: o, children: /* @__PURE__ */ b("img", { src: qa, alt: "Close" }) })
5918
5918
  ] }),
5919
5919
  /* @__PURE__ */ E("div", { className: "overlay-body", children: [
@@ -5965,6 +5965,6 @@ export {
5965
5965
  R as popupStore,
5966
5966
  ja as resultStore,
5967
5967
  ne as settingsStore,
5968
- Te as soundService,
5968
+ Ce as soundService,
5969
5969
  Dt as uiStore
5970
5970
  };
@@ -31,5 +31,5 @@ Re-annotating fields is not allowed.
31
31
  Use 'override' annotation for methods overridden by subclass.`)}}var qo=Ar(0),Wo=(function(){var e=!1,n={};return Object.defineProperty(n,"0",{set:function(){e=!0}}),Object.create(n)[0]=1,e===!1})(),on=0,yr=function(){};function Xo(e,n){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,n):e.prototype.__proto__!==void 0?e.prototype.__proto__=n:e.prototype=n}Xo(yr,Array.prototype);var an=(function(e){function n(r,o,s,u){var c;return s===void 0&&(s=process.env.NODE_ENV!=="production"?"ObservableArray@"+oe():"ObservableArray"),u===void 0&&(u=!1),c=e.call(this)||this,Se(function(){var f=new nn(s,o,u,!0);f.proxy_=c,wn(c,S,f),r&&r.length&&c.spliceWithArray(0,0,r),Wo&&Object.defineProperty(c,"0",qo)}),c}Dn(n,e);var t=n.prototype;return t.concat=function(){this[S].atom_.reportObserved();for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return Array.prototype.concat.apply(this.slice(),s.map(function(c){return Bt(c)?c.slice():c}))},t[Symbol.iterator]=function(){var r=this,o=0;return un({next:function(){return o<r.length?{value:r[o++],done:!1}:{done:!0,value:void 0}}})},$e(n,[{key:"length",get:function(){return this[S].getArrayLength_()},set:function(o){this[S].setArrayLength_(o)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])})(yr);Object.entries(xt).forEach(function(e){var n=e[0],t=e[1];n!=="concat"&&Ye(an.prototype,n,t)});function Ar(e){return{enumerable:!1,configurable:!0,get:function(){return this[S].get_(e)},set:function(t){this[S].set_(e,t)}}}function Zo(e){ce(an.prototype,""+e,Ar(e))}function Or(e){if(e>on){for(var n=on;n<e+100;n++)Zo(n);on=e}}Or(1e3);function Yo(e,n,t){return new an(e,n,t)}function Ke(e,n){if(typeof e=="object"&&e!==null){if(Bt(e))return n!==void 0&&A(23),e[S].atom_;if(_e(e))return e.atom_;if(Oe(e)){if(n===void 0)return e.keysAtom_;var t=e.data_.get(n)||e.hasMap_.get(n);return t||A(25,n,Mt(e)),t}if(Re(e)){if(!n)return A(26);var r=e[S].values_.get(n);return r||A(27,n,Mt(e)),r}if(Ut(e)||St(e)||Ct(e))return e}else if(P(e)&&Ct(e[S]))return e[S];A(28)}function Sr(e,n){if(e||A(29),Ut(e)||St(e)||Ct(e)||Oe(e)||_e(e))return e;if(e[S])return e[S];A(24,e)}function Mt(e,n){var t;if(n!==void 0)t=Ke(e,n);else{if(Le(e))return e.name;Re(e)||Oe(e)||_e(e)?t=Sr(e):t=Ke(e)}return t.name_}function Se(e){var n=Ve(),t=Rt(!0);J();try{return e()}finally{Q(),Kt(t),be(n)}}var Er=dt.toString;function wr(e,n,t){return t===void 0&&(t=-1),sn(e,n,t)}function sn(e,n,t,r,o){if(e===n)return e!==0||1/e===1/n;if(e==null||n==null)return!1;if(e!==e)return n!==n;var s=typeof e;if(s!=="function"&&s!=="object"&&typeof n!="object")return!1;var u=Er.call(e);if(u!==Er.call(n))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:+e==0?1/+e===1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":t>=0&&t++;break}e=Nr(e),n=Nr(n);var c=u==="[object Array]";if(!c){if(typeof e!="object"||typeof n!="object")return!1;var f=e.constructor,p=n.constructor;if(f!==p&&!(P(f)&&f instanceof f&&P(p)&&p instanceof p)&&"constructor"in e&&"constructor"in n)return!1}if(t===0)return!1;t<0&&(t=-1),r=r||[],o=o||[];for(var m=r.length;m--;)if(r[m]===e)return o[m]===n;if(r.push(e),o.push(n),c){if(m=e.length,m!==n.length)return!1;for(;m--;)if(!sn(e[m],n[m],t-1,r,o))return!1}else{var i=Object.keys(e),a=i.length;if(Object.keys(n).length!==a)return!1;for(var l=0;l<a;l++){var d=i[l];if(!(Z(n,d)&&sn(e[d],n[d],t-1,r,o)))return!1}}return r.pop(),o.pop(),!0}function Nr(e){return Bt(e)?e.slice():Fe(e)||Oe(e)||ve(e)||_e(e)?Array.from(e.entries()):e}var Tr,zo=((Tr=ct().Iterator)==null?void 0:Tr.prototype)||{};function un(e){return e[Symbol.iterator]=Jo,Object.assign(Object.create(zo),e)}function Jo(){return this}function Cr(e){return e instanceof Object&&typeof e.annotationType_=="string"&&P(e.make_)&&P(e.extend_)}if(["Symbol","Map","Set"].forEach(function(e){var n=ct();typeof n[e]>"u"&&A("MobX requires global '"+e+"' to be available or polyfilled")}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:vo,extras:{getDebugName:Mt},$mobx:S}),!w.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!en)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function Qo(e){e()}function ea(e){e||(e=Qo,process.env.NODE_ENV!=="production"&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),Do({reactionScheduler:e})}function ta(e){return or(e)}var na=1e4,ra=1e4,ia=(function(){function e(n){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=na),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var o=Date.now();t.registrations.forEach(function(s,u){o-s.registeredAt>=r&&(t.finalize(s.value),t.registrations.delete(u))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(n,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(n){this.registrations.delete(n)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,ra))}}),e})(),oa=typeof FinalizationRegistry<"u"?FinalizationRegistry:ia,ln=new oa(function(e){var n;(n=e.reaction)===null||n===void 0||n.dispose(),e.reaction=null}),at=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Lt={exports:{}},cn={};var Dr;function aa(){if(Dr)return cn;Dr=1;var e=w;function n(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,u=e.useDebugValue;function c(i,a){var l=a(),d=r({inst:{value:l,getSnapshot:a}}),h=d[0].inst,b=d[1];return s(function(){h.value=l,h.getSnapshot=a,f(h)&&b({inst:h})},[i,l,a]),o(function(){return f(h)&&b({inst:h}),i(function(){f(h)&&b({inst:h})})},[i]),u(l),l}function f(i){var a=i.getSnapshot;i=i.value;try{var l=a();return!t(i,l)}catch{return!0}}function p(i,a){return a()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return cn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,cn}var fn={};var xr;function sa(){return xr||(xr=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}function n(l,d){m||o.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=d();if(!i){var b=d();s(h,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),i=!0)}b=u({inst:{value:h,getSnapshot:d}});var _=b[0].inst,y=b[1];return f(function(){_.value=h,_.getSnapshot=d,t(_)&&y({inst:_})},[l,h,d]),c(function(){return t(_)&&y({inst:_}),l(function(){t(_)&&y({inst:_})})},[l]),p(h),h}function t(l){var d=l.getSnapshot;l=l.value;try{var h=d();return!s(l,h)}catch{return!0}}function r(l,d){return d()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=w,s=typeof Object.is=="function"?Object.is:e,u=o.useState,c=o.useEffect,f=o.useLayoutEffect,p=o.useDebugValue,m=!1,i=!1,a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:n;fn.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:a,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),fn}var Br;function ua(){return Br||(Br=1,process.env.NODE_ENV==="production"?Lt.exports=aa():Lt.exports=sa()),Lt.exports}var la=ua();function Vr(e){e.reaction=new me("observer".concat(e.name),function(){var n;e.stateVersion=Symbol(),(n=e.onStoreChange)===null||n===void 0||n.call(e)})}function ca(e,n){n===void 0&&(n="observed");var t=w.useRef(null);if(!t.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:n,subscribe:function(c){return ln.unregister(r),r.onStoreChange=c,r.reaction||(Vr(r),r.stateVersion=Symbol()),function(){var f;r.onStoreChange=null,(f=r.reaction)===null||f===void 0||f.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};t.current=r}var o=t.current;o.reaction||(Vr(o),ln.register(t,o,o)),w.useDebugValue(o.reaction,ta),la.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot);var s,u;if(o.reaction.track(function(){try{s=e()}catch(c){u=c}}),u)throw u;return s}var dn,_n,fa=!0,Mr=!0,Lr=typeof Symbol=="function"&&Symbol.for,da=(_n=(dn=Object.getOwnPropertyDescriptor(function(){},"name"))===null||dn===void 0?void 0:dn.configurable)!==null&&_n!==void 0?_n:!1,Pr=Lr?Symbol.for("react.forward_ref"):typeof w.forwardRef=="function"&&w.forwardRef(function(e){return null}).$$typeof,Ir=Lr?Symbol.for("react.memo"):typeof w.memo=="function"&&w.memo(function(e){return null}).$$typeof;function $(e,n){var t;if(process.env.NODE_ENV,Ir&&e.$$typeof===Ir)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var r=(t=void 0)!==null&&t!==void 0?t:!1,o=e,s=e.displayName||e.name;if(Pr&&e.$$typeof===Pr&&(r=!0,o=e.render,typeof o!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var u=function(c,f){return ca(function(){return o(c,f)},s)};return u.displayName=e.displayName,da&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes,process.env.NODE_ENV!=="production"&&Mr&&(Mr=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),r&&(u=w.forwardRef(u)),u=w.memo(u),pa(e,u),process.env.NODE_ENV!=="production"&&Object.defineProperty(u,"contextTypes",{set:function(){var c,f;throw new Error("[mobx-react-lite] `".concat(this.displayName||((c=this.type)===null||c===void 0?void 0:c.displayName)||((f=this.type)===null||f===void 0?void 0:f.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),u}var _a={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function pa(e,n){Object.keys(e).forEach(function(t){_a[t]||Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}process.env.NODE_ENV;var pn;ea(Qr.unstable_batchedUpdates),pn=ln.finalizeAllImmediately;let kr=e=>e;function va(e){kr=e}function D(e,n){return kr(e,n)}const ha=({onClick:e,disabled:n=!1,imagePath:t,isAnteBet:r,isBonus:o})=>{const s=w.useMemo(()=>D(o?"ACTIVE":r?"DISABLE":"BUY_BONUS"),[o,r]),u=c=>{c.currentTarget.blur()};return v.jsxs("div",{className:"buy-bonus-wrap","aria-hidden":n?"true":"false",children:[t&&v.jsx("div",{className:"bonus-thumb",role:"img","aria-label":"bonus thumbnail",style:{backgroundImage:`url(${t})`}}),v.jsx("button",{className:`buy-bonus ${n?"disabled":""}`,type:"button",onClick:e,onMouseUp:u,onTouchEnd:u,onKeyUp:c=>{(c.key===" "||c.key==="Enter")&&u(c)},disabled:n,"aria-pressed":n,children:s})]})},jr=({label:e,value:n})=>v.jsxs("div",{className:"info",children:[v.jsx("span",{className:"label",children:e}),v.jsx("span",{className:"value",children:n})]}),H={bet:"bet",autoplay:"autoplay",settings:"settings",history:"history",buyBonus:"buy_bonus",payTable:"pay_table"},Fr={insufficientFunds:"insufficient funds"},vn={primary:{background:"#FBDE38",color:"#1C1B1E"},secondary:{background:"#1C1B1E",color:"#FFFFFF"}},Ur=[{name:Fr.insufficientFunds,title:"Insufficient Funds",imagePath:"/img_1.png",message:"Your balance is low, please make a deposit",buttons:[{text:"Back",configs:vn.secondary},{text:"Ok",configs:vn.primary}]}],Pt={ante:"ante",buy:"buy"},F={SKIP_INTRO:"SKIP_INTRO",SOUND_ON:"SOUND_ON",MUSIC_ON:"MUSIC_ON",SPACE_TO_SPIN:"SPACE_TO_SPIN",SPACE_TO_SKIP:"SPACE_TO_SKIP",IS_TURBO:"IS_TURBO",VOLUME:"VOLUME"},hn={Click:"click",BuyBonusClick:"buyBonusClick"};var bn={};var $r;function ba(){return $r||($r=1,(function(e){(function(){var n=function(){this.init()};n.prototype={init:function(){var i=this||t;return i._counter=1e3,i._html5AudioPool=[],i.html5PoolSize=10,i._codecs={},i._howls=[],i._muted=!1,i._volume=1,i._canPlayEvent="canplaythrough",i._navigator=typeof window<"u"&&window.navigator?window.navigator:null,i.masterGain=null,i.noAudio=!1,i.usingWebAudio=!0,i.autoSuspend=!0,i.ctx=null,i.autoUnlock=!0,i._setup(),i},volume:function(i){var a=this||t;if(i=parseFloat(i),a.ctx||m(),typeof i<"u"&&i>=0&&i<=1){if(a._volume=i,a._muted)return a;a.usingWebAudio&&a.masterGain.gain.setValueAtTime(i,t.ctx.currentTime);for(var l=0;l<a._howls.length;l++)if(!a._howls[l]._webAudio)for(var d=a._howls[l]._getSoundIds(),h=0;h<d.length;h++){var b=a._howls[l]._soundById(d[h]);b&&b._node&&(b._node.volume=b._volume*i)}return a}return a._volume},mute:function(i){var a=this||t;a.ctx||m(),a._muted=i,a.usingWebAudio&&a.masterGain.gain.setValueAtTime(i?0:a._volume,t.ctx.currentTime);for(var l=0;l<a._howls.length;l++)if(!a._howls[l]._webAudio)for(var d=a._howls[l]._getSoundIds(),h=0;h<d.length;h++){var b=a._howls[l]._soundById(d[h]);b&&b._node&&(b._node.muted=i?!0:b._muted)}return a},stop:function(){for(var i=this||t,a=0;a<i._howls.length;a++)i._howls[a].stop();return i},unload:function(){for(var i=this||t,a=i._howls.length-1;a>=0;a--)i._howls[a].unload();return i.usingWebAudio&&i.ctx&&typeof i.ctx.close<"u"&&(i.ctx.close(),i.ctx=null,m()),i},codecs:function(i){return(this||t)._codecs[i.replace(/^x-/,"")]},_setup:function(){var i=this||t;if(i.state=i.ctx&&i.ctx.state||"suspended",i._autoSuspend(),!i.usingWebAudio)if(typeof Audio<"u")try{var a=new Audio;typeof a.oncanplaythrough>"u"&&(i._canPlayEvent="canplay")}catch{i.noAudio=!0}else i.noAudio=!0;try{var a=new Audio;a.muted&&(i.noAudio=!0)}catch{}return i.noAudio||i._setupCodecs(),i},_setupCodecs:function(){var i=this||t,a=null;try{a=typeof Audio<"u"?new Audio:null}catch{return i}if(!a||typeof a.canPlayType!="function")return i;var l=a.canPlayType("audio/mpeg;").replace(/^no$/,""),d=i._navigator?i._navigator.userAgent:"",h=d.match(/OPR\/(\d+)/g),b=h&&parseInt(h[0].split("/")[1],10)<33,_=d.indexOf("Safari")!==-1&&d.indexOf("Chrome")===-1,y=d.match(/Version\/(.*?) /),E=_&&y&&parseInt(y[1],10)<15;return i._codecs={mp3:!!(!b&&(l||a.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!l,opus:!!a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(a.canPlayType('audio/wav; codecs="1"')||a.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!a.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!a.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(a.canPlayType("audio/x-m4b;")||a.canPlayType("audio/m4b;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(a.canPlayType("audio/x-mp4;")||a.canPlayType("audio/mp4;")||a.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!E&&a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!E&&a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!a.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(a.canPlayType("audio/x-flac;")||a.canPlayType("audio/flac;")).replace(/^no$/,"")},i},_unlockAudio:function(){var i=this||t;if(!(i._audioUnlocked||!i.ctx)){i._audioUnlocked=!1,i.autoUnlock=!1,!i._mobileUnloaded&&i.ctx.sampleRate!==44100&&(i._mobileUnloaded=!0,i.unload()),i._scratchBuffer=i.ctx.createBuffer(1,1,22050);var a=function(l){for(;i._html5AudioPool.length<i.html5PoolSize;)try{var d=new Audio;d._unlocked=!0,i._releaseHtml5Audio(d)}catch{i.noAudio=!0;break}for(var h=0;h<i._howls.length;h++)if(!i._howls[h]._webAudio)for(var b=i._howls[h]._getSoundIds(),_=0;_<b.length;_++){var y=i._howls[h]._soundById(b[_]);y&&y._node&&!y._node._unlocked&&(y._node._unlocked=!0,y._node.load())}i._autoResume();var E=i.ctx.createBufferSource();E.buffer=i._scratchBuffer,E.connect(i.ctx.destination),typeof E.start>"u"?E.noteOn(0):E.start(0),typeof i.ctx.resume=="function"&&i.ctx.resume(),E.onended=function(){E.disconnect(0),i._audioUnlocked=!0,document.removeEventListener("touchstart",a,!0),document.removeEventListener("touchend",a,!0),document.removeEventListener("click",a,!0),document.removeEventListener("keydown",a,!0);for(var O=0;O<i._howls.length;O++)i._howls[O]._emit("unlock")}};return document.addEventListener("touchstart",a,!0),document.addEventListener("touchend",a,!0),document.addEventListener("click",a,!0),document.addEventListener("keydown",a,!0),i}},_obtainHtml5Audio:function(){var i=this||t;if(i._html5AudioPool.length)return i._html5AudioPool.pop();var a=new Audio().play();return a&&typeof Promise<"u"&&(a instanceof Promise||typeof a.then=="function")&&a.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(i){var a=this||t;return i._unlocked&&a._html5AudioPool.push(i),a},_autoSuspend:function(){var i=this;if(!(!i.autoSuspend||!i.ctx||typeof i.ctx.suspend>"u"||!t.usingWebAudio)){for(var a=0;a<i._howls.length;a++)if(i._howls[a]._webAudio){for(var l=0;l<i._howls[a]._sounds.length;l++)if(!i._howls[a]._sounds[l]._paused)return i}return i._suspendTimer&&clearTimeout(i._suspendTimer),i._suspendTimer=setTimeout(function(){if(i.autoSuspend){i._suspendTimer=null,i.state="suspending";var d=function(){i.state="suspended",i._resumeAfterSuspend&&(delete i._resumeAfterSuspend,i._autoResume())};i.ctx.suspend().then(d,d)}},3e4),i}},_autoResume:function(){var i=this;if(!(!i.ctx||typeof i.ctx.resume>"u"||!t.usingWebAudio))return i.state==="running"&&i.ctx.state!=="interrupted"&&i._suspendTimer?(clearTimeout(i._suspendTimer),i._suspendTimer=null):i.state==="suspended"||i.state==="running"&&i.ctx.state==="interrupted"?(i.ctx.resume().then(function(){i.state="running";for(var a=0;a<i._howls.length;a++)i._howls[a]._emit("resume")}),i._suspendTimer&&(clearTimeout(i._suspendTimer),i._suspendTimer=null)):i.state==="suspending"&&(i._resumeAfterSuspend=!0),i}};var t=new n,r=function(i){var a=this;if(!i.src||i.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}a.init(i)};r.prototype={init:function(i){var a=this;return t.ctx||m(),a._autoplay=i.autoplay||!1,a._format=typeof i.format!="string"?i.format:[i.format],a._html5=i.html5||!1,a._muted=i.mute||!1,a._loop=i.loop||!1,a._pool=i.pool||5,a._preload=typeof i.preload=="boolean"||i.preload==="metadata"?i.preload:!0,a._rate=i.rate||1,a._sprite=i.sprite||{},a._src=typeof i.src!="string"?i.src:[i.src],a._volume=i.volume!==void 0?i.volume:1,a._xhr={method:i.xhr&&i.xhr.method?i.xhr.method:"GET",headers:i.xhr&&i.xhr.headers?i.xhr.headers:null,withCredentials:i.xhr&&i.xhr.withCredentials?i.xhr.withCredentials:!1},a._duration=0,a._state="unloaded",a._sounds=[],a._endTimers={},a._queue=[],a._playLock=!1,a._onend=i.onend?[{fn:i.onend}]:[],a._onfade=i.onfade?[{fn:i.onfade}]:[],a._onload=i.onload?[{fn:i.onload}]:[],a._onloaderror=i.onloaderror?[{fn:i.onloaderror}]:[],a._onplayerror=i.onplayerror?[{fn:i.onplayerror}]:[],a._onpause=i.onpause?[{fn:i.onpause}]:[],a._onplay=i.onplay?[{fn:i.onplay}]:[],a._onstop=i.onstop?[{fn:i.onstop}]:[],a._onmute=i.onmute?[{fn:i.onmute}]:[],a._onvolume=i.onvolume?[{fn:i.onvolume}]:[],a._onrate=i.onrate?[{fn:i.onrate}]:[],a._onseek=i.onseek?[{fn:i.onseek}]:[],a._onunlock=i.onunlock?[{fn:i.onunlock}]:[],a._onresume=[],a._webAudio=t.usingWebAudio&&!a._html5,typeof t.ctx<"u"&&t.ctx&&t.autoUnlock&&t._unlockAudio(),t._howls.push(a),a._autoplay&&a._queue.push({event:"play",action:function(){a.play()}}),a._preload&&a._preload!=="none"&&a.load(),a},load:function(){var i=this,a=null;if(t.noAudio){i._emit("loaderror",null,"No audio support.");return}typeof i._src=="string"&&(i._src=[i._src]);for(var l=0;l<i._src.length;l++){var d,h;if(i._format&&i._format[l])d=i._format[l];else{if(h=i._src[l],typeof h!="string"){i._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}d=/^data:audio\/([^;,]+);/i.exec(h),d||(d=/\.([^.]+)$/.exec(h.split("?",1)[0])),d&&(d=d[1].toLowerCase())}if(d||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),d&&t.codecs(d)){a=i._src[l];break}}if(!a){i._emit("loaderror",null,"No codec support for selected audio sources.");return}return i._src=a,i._state="loading",window.location.protocol==="https:"&&a.slice(0,5)==="http:"&&(i._html5=!0,i._webAudio=!1),new o(i),i._webAudio&&u(i),i},play:function(i,a){var l=this,d=null;if(typeof i=="number")d=i,i=null;else{if(typeof i=="string"&&l._state==="loaded"&&!l._sprite[i])return null;if(typeof i>"u"&&(i="__default",!l._playLock)){for(var h=0,b=0;b<l._sounds.length;b++)l._sounds[b]._paused&&!l._sounds[b]._ended&&(h++,d=l._sounds[b]._id);h===1?i=null:d=null}}var _=d?l._soundById(d):l._inactiveSound();if(!_)return null;if(d&&!i&&(i=_._sprite||"__default"),l._state!=="loaded"){_._sprite=i,_._ended=!1;var y=_._id;return l._queue.push({event:"play",action:function(){l.play(y)}}),y}if(d&&!_._paused)return a||l._loadQueue("play"),_._id;l._webAudio&&t._autoResume();var E=Math.max(0,_._seek>0?_._seek:l._sprite[i][0]/1e3),O=Math.max(0,(l._sprite[i][0]+l._sprite[i][1])/1e3-E),B=O*1e3/Math.abs(_._rate),L=l._sprite[i][0]/1e3,ie=(l._sprite[i][0]+l._sprite[i][1])/1e3;_._sprite=i,_._ended=!1;var We=function(){_._paused=!1,_._seek=E,_._start=L,_._stop=ie,_._loop=!!(_._loop||l._sprite[i][2])};if(E>=ie){l._ended(_);return}var C=_._node;if(l._webAudio){var Zr=function(){l._playLock=!1,We(),l._refreshBuffer(_);var Xe=_._muted||l._muted?0:_._volume;C.gain.setValueAtTime(Xe,t.ctx.currentTime),_._playStart=t.ctx.currentTime,typeof C.bufferSource.start>"u"?_._loop?C.bufferSource.noteGrainOn(0,E,86400):C.bufferSource.noteGrainOn(0,E,O):_._loop?C.bufferSource.start(0,E,86400):C.bufferSource.start(0,E,O),B!==1/0&&(l._endTimers[_._id]=setTimeout(l._ended.bind(l,_),B)),a||setTimeout(function(){l._emit("play",_._id),l._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?Zr():(l._playLock=!0,l.once("resume",Zr),l._clearTimer(_._id))}else{var Yr=function(){C.currentTime=E,C.muted=_._muted||l._muted||t._muted||C.muted,C.volume=_._volume*t.volume(),C.playbackRate=_._rate;try{var Xe=C.play();if(Xe&&typeof Promise<"u"&&(Xe instanceof Promise||typeof Xe.then=="function")?(l._playLock=!0,We(),Xe.then(function(){l._playLock=!1,C._unlocked=!0,a?l._loadQueue():l._emit("play",_._id)}).catch(function(){l._playLock=!1,l._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),_._ended=!0,_._paused=!0})):a||(l._playLock=!1,We(),l._emit("play",_._id)),C.playbackRate=_._rate,C.paused){l._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}i!=="__default"||_._loop?l._endTimers[_._id]=setTimeout(l._ended.bind(l,_),B):(l._endTimers[_._id]=function(){l._ended(_),C.removeEventListener("ended",l._endTimers[_._id],!1)},C.addEventListener("ended",l._endTimers[_._id],!1))}catch(Qa){l._emit("playerror",_._id,Qa)}};C.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(C.src=l._src,C.load());var Ja=window&&window.ejecta||!C.readyState&&t._navigator.isCocoonJS;if(C.readyState>=3||Ja)Yr();else{l._playLock=!0,l._state="loading";var zr=function(){l._state="loaded",Yr(),C.removeEventListener(t._canPlayEvent,zr,!1)};C.addEventListener(t._canPlayEvent,zr,!1),l._clearTimer(_._id)}}return _._id},pause:function(i){var a=this;if(a._state!=="loaded"||a._playLock)return a._queue.push({event:"pause",action:function(){a.pause(i)}}),a;for(var l=a._getSoundIds(i),d=0;d<l.length;d++){a._clearTimer(l[d]);var h=a._soundById(l[d]);if(h&&!h._paused&&(h._seek=a.seek(l[d]),h._rateSeek=0,h._paused=!0,a._stopFade(l[d]),h._node))if(a._webAudio){if(!h._node.bufferSource)continue;typeof h._node.bufferSource.stop>"u"?h._node.bufferSource.noteOff(0):h._node.bufferSource.stop(0),a._cleanBuffer(h._node)}else(!isNaN(h._node.duration)||h._node.duration===1/0)&&h._node.pause();arguments[1]||a._emit("pause",h?h._id:null)}return a},stop:function(i,a){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"stop",action:function(){l.stop(i)}}),l;for(var d=l._getSoundIds(i),h=0;h<d.length;h++){l._clearTimer(d[h]);var b=l._soundById(d[h]);b&&(b._seek=b._start||0,b._rateSeek=0,b._paused=!0,b._ended=!0,l._stopFade(d[h]),b._node&&(l._webAudio?b._node.bufferSource&&(typeof b._node.bufferSource.stop>"u"?b._node.bufferSource.noteOff(0):b._node.bufferSource.stop(0),l._cleanBuffer(b._node)):(!isNaN(b._node.duration)||b._node.duration===1/0)&&(b._node.currentTime=b._start||0,b._node.pause(),b._node.duration===1/0&&l._clearSound(b._node))),a||l._emit("stop",b._id))}return l},mute:function(i,a){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"mute",action:function(){l.mute(i,a)}}),l;if(typeof a>"u")if(typeof i=="boolean")l._muted=i;else return l._muted;for(var d=l._getSoundIds(a),h=0;h<d.length;h++){var b=l._soundById(d[h]);b&&(b._muted=i,b._interval&&l._stopFade(b._id),l._webAudio&&b._node?b._node.gain.setValueAtTime(i?0:b._volume,t.ctx.currentTime):b._node&&(b._node.muted=t._muted?!0:i),l._emit("mute",b._id))}return l},volume:function(){var i=this,a=arguments,l,d;if(a.length===0)return i._volume;if(a.length===1||a.length===2&&typeof a[1]>"u"){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?d=parseInt(a[0],10):l=parseFloat(a[0])}else a.length>=2&&(l=parseFloat(a[0]),d=parseInt(a[1],10));var _;if(typeof l<"u"&&l>=0&&l<=1){if(i._state!=="loaded"||i._playLock)return i._queue.push({event:"volume",action:function(){i.volume.apply(i,a)}}),i;typeof d>"u"&&(i._volume=l),d=i._getSoundIds(d);for(var y=0;y<d.length;y++)_=i._soundById(d[y]),_&&(_._volume=l,a[2]||i._stopFade(d[y]),i._webAudio&&_._node&&!_._muted?_._node.gain.setValueAtTime(l,t.ctx.currentTime):_._node&&!_._muted&&(_._node.volume=l*t.volume()),i._emit("volume",_._id))}else return _=d?i._soundById(d):i._sounds[0],_?_._volume:0;return i},fade:function(i,a,l,d){var h=this;if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"fade",action:function(){h.fade(i,a,l,d)}}),h;i=Math.min(Math.max(0,parseFloat(i)),1),a=Math.min(Math.max(0,parseFloat(a)),1),l=parseFloat(l),h.volume(i,d);for(var b=h._getSoundIds(d),_=0;_<b.length;_++){var y=h._soundById(b[_]);if(y){if(d||h._stopFade(b[_]),h._webAudio&&!y._muted){var E=t.ctx.currentTime,O=E+l/1e3;y._volume=i,y._node.gain.setValueAtTime(i,E),y._node.gain.linearRampToValueAtTime(a,O)}h._startFadeInterval(y,i,a,l,b[_],typeof d>"u")}}return h},_startFadeInterval:function(i,a,l,d,h,b){var _=this,y=a,E=l-a,O=Math.abs(E/.01),B=Math.max(4,O>0?d/O:d),L=Date.now();i._fadeTo=l,i._interval=setInterval(function(){var ie=(Date.now()-L)/d;L=Date.now(),y+=E*ie,y=Math.round(y*100)/100,E<0?y=Math.max(l,y):y=Math.min(l,y),_._webAudio?i._volume=y:_.volume(y,i._id,!0),b&&(_._volume=y),(l<a&&y<=l||l>a&&y>=l)&&(clearInterval(i._interval),i._interval=null,i._fadeTo=null,_.volume(l,i._id),_._emit("fade",i._id))},B)},_stopFade:function(i){var a=this,l=a._soundById(i);return l&&l._interval&&(a._webAudio&&l._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(l._interval),l._interval=null,a.volume(l._fadeTo,i),l._fadeTo=null,a._emit("fade",i)),a},loop:function(){var i=this,a=arguments,l,d,h;if(a.length===0)return i._loop;if(a.length===1)if(typeof a[0]=="boolean")l=a[0],i._loop=l;else return h=i._soundById(parseInt(a[0],10)),h?h._loop:!1;else a.length===2&&(l=a[0],d=parseInt(a[1],10));for(var b=i._getSoundIds(d),_=0;_<b.length;_++)h=i._soundById(b[_]),h&&(h._loop=l,i._webAudio&&h._node&&h._node.bufferSource&&(h._node.bufferSource.loop=l,l&&(h._node.bufferSource.loopStart=h._start||0,h._node.bufferSource.loopEnd=h._stop,i.playing(b[_])&&(i.pause(b[_],!0),i.play(b[_],!0)))));return i},rate:function(){var i=this,a=arguments,l,d;if(a.length===0)d=i._sounds[0]._id;else if(a.length===1){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?d=parseInt(a[0],10):l=parseFloat(a[0])}else a.length===2&&(l=parseFloat(a[0]),d=parseInt(a[1],10));var _;if(typeof l=="number"){if(i._state!=="loaded"||i._playLock)return i._queue.push({event:"rate",action:function(){i.rate.apply(i,a)}}),i;typeof d>"u"&&(i._rate=l),d=i._getSoundIds(d);for(var y=0;y<d.length;y++)if(_=i._soundById(d[y]),_){i.playing(d[y])&&(_._rateSeek=i.seek(d[y]),_._playStart=i._webAudio?t.ctx.currentTime:_._playStart),_._rate=l,i._webAudio&&_._node&&_._node.bufferSource?_._node.bufferSource.playbackRate.setValueAtTime(l,t.ctx.currentTime):_._node&&(_._node.playbackRate=l);var E=i.seek(d[y]),O=(i._sprite[_._sprite][0]+i._sprite[_._sprite][1])/1e3-E,B=O*1e3/Math.abs(_._rate);(i._endTimers[d[y]]||!_._paused)&&(i._clearTimer(d[y]),i._endTimers[d[y]]=setTimeout(i._ended.bind(i,_),B)),i._emit("rate",_._id)}}else return _=i._soundById(d),_?_._rate:i._rate;return i},seek:function(){var i=this,a=arguments,l,d;if(a.length===0)i._sounds.length&&(d=i._sounds[0]._id);else if(a.length===1){var h=i._getSoundIds(),b=h.indexOf(a[0]);b>=0?d=parseInt(a[0],10):i._sounds.length&&(d=i._sounds[0]._id,l=parseFloat(a[0]))}else a.length===2&&(l=parseFloat(a[0]),d=parseInt(a[1],10));if(typeof d>"u")return 0;if(typeof l=="number"&&(i._state!=="loaded"||i._playLock))return i._queue.push({event:"seek",action:function(){i.seek.apply(i,a)}}),i;var _=i._soundById(d);if(_)if(typeof l=="number"&&l>=0){var y=i.playing(d);y&&i.pause(d,!0),_._seek=l,_._ended=!1,i._clearTimer(d),!i._webAudio&&_._node&&!isNaN(_._node.duration)&&(_._node.currentTime=l);var E=function(){y&&i.play(d,!0),i._emit("seek",d)};if(y&&!i._webAudio){var O=function(){i._playLock?setTimeout(O,0):E()};setTimeout(O,0)}else E()}else if(i._webAudio){var B=i.playing(d)?t.ctx.currentTime-_._playStart:0,L=_._rateSeek?_._rateSeek-_._seek:0;return _._seek+(L+B*Math.abs(_._rate))}else return _._node.currentTime;return i},playing:function(i){var a=this;if(typeof i=="number"){var l=a._soundById(i);return l?!l._paused:!1}for(var d=0;d<a._sounds.length;d++)if(!a._sounds[d]._paused)return!0;return!1},duration:function(i){var a=this,l=a._duration,d=a._soundById(i);return d&&(l=a._sprite[d._sprite][1]/1e3),l},state:function(){return this._state},unload:function(){for(var i=this,a=i._sounds,l=0;l<a.length;l++)a[l]._paused||i.stop(a[l]._id),i._webAudio||(i._clearSound(a[l]._node),a[l]._node.removeEventListener("error",a[l]._errorFn,!1),a[l]._node.removeEventListener(t._canPlayEvent,a[l]._loadFn,!1),a[l]._node.removeEventListener("ended",a[l]._endFn,!1),t._releaseHtml5Audio(a[l]._node)),delete a[l]._node,i._clearTimer(a[l]._id);var d=t._howls.indexOf(i);d>=0&&t._howls.splice(d,1);var h=!0;for(l=0;l<t._howls.length;l++)if(t._howls[l]._src===i._src||i._src.indexOf(t._howls[l]._src)>=0){h=!1;break}return s&&h&&delete s[i._src],t.noAudio=!1,i._state="unloaded",i._sounds=[],i=null,null},on:function(i,a,l,d){var h=this,b=h["_on"+i];return typeof a=="function"&&b.push(d?{id:l,fn:a,once:d}:{id:l,fn:a}),h},off:function(i,a,l){var d=this,h=d["_on"+i],b=0;if(typeof a=="number"&&(l=a,a=null),a||l)for(b=0;b<h.length;b++){var _=l===h[b].id;if(a===h[b].fn&&_||!a&&_){h.splice(b,1);break}}else if(i)d["_on"+i]=[];else{var y=Object.keys(d);for(b=0;b<y.length;b++)y[b].indexOf("_on")===0&&Array.isArray(d[y[b]])&&(d[y[b]]=[])}return d},once:function(i,a,l){var d=this;return d.on(i,a,l,1),d},_emit:function(i,a,l){for(var d=this,h=d["_on"+i],b=h.length-1;b>=0;b--)(!h[b].id||h[b].id===a||i==="load")&&(setTimeout((function(_){_.call(this,a,l)}).bind(d,h[b].fn),0),h[b].once&&d.off(i,h[b].fn,h[b].id));return d._loadQueue(i),d},_loadQueue:function(i){var a=this;if(a._queue.length>0){var l=a._queue[0];l.event===i&&(a._queue.shift(),a._loadQueue()),i||l.action()}return a},_ended:function(i){var a=this,l=i._sprite;if(!a._webAudio&&i._node&&!i._node.paused&&!i._node.ended&&i._node.currentTime<i._stop)return setTimeout(a._ended.bind(a,i),100),a;var d=!!(i._loop||a._sprite[l][2]);if(a._emit("end",i._id),!a._webAudio&&d&&a.stop(i._id,!0).play(i._id),a._webAudio&&d){a._emit("play",i._id),i._seek=i._start||0,i._rateSeek=0,i._playStart=t.ctx.currentTime;var h=(i._stop-i._start)*1e3/Math.abs(i._rate);a._endTimers[i._id]=setTimeout(a._ended.bind(a,i),h)}return a._webAudio&&!d&&(i._paused=!0,i._ended=!0,i._seek=i._start||0,i._rateSeek=0,a._clearTimer(i._id),a._cleanBuffer(i._node),t._autoSuspend()),!a._webAudio&&!d&&a.stop(i._id,!0),a},_clearTimer:function(i){var a=this;if(a._endTimers[i]){if(typeof a._endTimers[i]!="function")clearTimeout(a._endTimers[i]);else{var l=a._soundById(i);l&&l._node&&l._node.removeEventListener("ended",a._endTimers[i],!1)}delete a._endTimers[i]}return a},_soundById:function(i){for(var a=this,l=0;l<a._sounds.length;l++)if(i===a._sounds[l]._id)return a._sounds[l];return null},_inactiveSound:function(){var i=this;i._drain();for(var a=0;a<i._sounds.length;a++)if(i._sounds[a]._ended)return i._sounds[a].reset();return new o(i)},_drain:function(){var i=this,a=i._pool,l=0,d=0;if(!(i._sounds.length<a)){for(d=0;d<i._sounds.length;d++)i._sounds[d]._ended&&l++;for(d=i._sounds.length-1;d>=0;d--){if(l<=a)return;i._sounds[d]._ended&&(i._webAudio&&i._sounds[d]._node&&i._sounds[d]._node.disconnect(0),i._sounds.splice(d,1),l--)}}},_getSoundIds:function(i){var a=this;if(typeof i>"u"){for(var l=[],d=0;d<a._sounds.length;d++)l.push(a._sounds[d]._id);return l}else return[i]},_refreshBuffer:function(i){var a=this;return i._node.bufferSource=t.ctx.createBufferSource(),i._node.bufferSource.buffer=s[a._src],i._panner?i._node.bufferSource.connect(i._panner):i._node.bufferSource.connect(i._node),i._node.bufferSource.loop=i._loop,i._loop&&(i._node.bufferSource.loopStart=i._start||0,i._node.bufferSource.loopEnd=i._stop||0),i._node.bufferSource.playbackRate.setValueAtTime(i._rate,t.ctx.currentTime),a},_cleanBuffer:function(i){var a=this,l=t._navigator&&t._navigator.vendor.indexOf("Apple")>=0;if(!i.bufferSource)return a;if(t._scratchBuffer&&i.bufferSource&&(i.bufferSource.onended=null,i.bufferSource.disconnect(0),l))try{i.bufferSource.buffer=t._scratchBuffer}catch{}return i.bufferSource=null,a},_clearSound:function(i){var a=/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent);a||(i.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var o=function(i){this._parent=i,this.init()};o.prototype={init:function(){var i=this,a=i._parent;return i._muted=a._muted,i._loop=a._loop,i._volume=a._volume,i._rate=a._rate,i._seek=0,i._paused=!0,i._ended=!0,i._sprite="__default",i._id=++t._counter,a._sounds.push(i),i.create(),i},create:function(){var i=this,a=i._parent,l=t._muted||i._muted||i._parent._muted?0:i._volume;return a._webAudio?(i._node=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),i._node.gain.setValueAtTime(l,t.ctx.currentTime),i._node.paused=!0,i._node.connect(t.masterGain)):t.noAudio||(i._node=t._obtainHtml5Audio(),i._errorFn=i._errorListener.bind(i),i._node.addEventListener("error",i._errorFn,!1),i._loadFn=i._loadListener.bind(i),i._node.addEventListener(t._canPlayEvent,i._loadFn,!1),i._endFn=i._endListener.bind(i),i._node.addEventListener("ended",i._endFn,!1),i._node.src=a._src,i._node.preload=a._preload===!0?"auto":a._preload,i._node.volume=l*t.volume(),i._node.load()),i},reset:function(){var i=this,a=i._parent;return i._muted=a._muted,i._loop=a._loop,i._volume=a._volume,i._rate=a._rate,i._seek=0,i._rateSeek=0,i._paused=!0,i._ended=!0,i._sprite="__default",i._id=++t._counter,i},_errorListener:function(){var i=this;i._parent._emit("loaderror",i._id,i._node.error?i._node.error.code:0),i._node.removeEventListener("error",i._errorFn,!1)},_loadListener:function(){var i=this,a=i._parent;a._duration=Math.ceil(i._node.duration*10)/10,Object.keys(a._sprite).length===0&&(a._sprite={__default:[0,a._duration*1e3]}),a._state!=="loaded"&&(a._state="loaded",a._emit("load"),a._loadQueue()),i._node.removeEventListener(t._canPlayEvent,i._loadFn,!1)},_endListener:function(){var i=this,a=i._parent;a._duration===1/0&&(a._duration=Math.ceil(i._node.duration*10)/10,a._sprite.__default[1]===1/0&&(a._sprite.__default[1]=a._duration*1e3),a._ended(i)),i._node.removeEventListener("ended",i._endFn,!1)}};var s={},u=function(i){var a=i._src;if(s[a]){i._duration=s[a].duration,p(i);return}if(/^data:[^;]+;base64,/.test(a)){for(var l=atob(a.split(",")[1]),d=new Uint8Array(l.length),h=0;h<l.length;++h)d[h]=l.charCodeAt(h);f(d.buffer,i)}else{var b=new XMLHttpRequest;b.open(i._xhr.method,a,!0),b.withCredentials=i._xhr.withCredentials,b.responseType="arraybuffer",i._xhr.headers&&Object.keys(i._xhr.headers).forEach(function(_){b.setRequestHeader(_,i._xhr.headers[_])}),b.onload=function(){var _=(b.status+"")[0];if(_!=="0"&&_!=="2"&&_!=="3"){i._emit("loaderror",null,"Failed loading audio file with status: "+b.status+".");return}f(b.response,i)},b.onerror=function(){i._webAudio&&(i._html5=!0,i._webAudio=!1,i._sounds=[],delete s[a],i.load())},c(b)}},c=function(i){try{i.send()}catch{i.onerror()}},f=function(i,a){var l=function(){a._emit("loaderror",null,"Decoding audio data failed.")},d=function(h){h&&a._sounds.length>0?(s[a._src]=h,p(a,h)):l()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(i).then(d).catch(l):t.ctx.decodeAudioData(i,d,l)},p=function(i,a){a&&!i._duration&&(i._duration=a.duration),Object.keys(i._sprite).length===0&&(i._sprite={__default:[0,i._duration*1e3]}),i._state!=="loaded"&&(i._state="loaded",i._emit("load"),i._loadQueue())},m=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var i=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),a=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),l=a?parseInt(a[1],10):null;if(i&&l&&l<9){var d=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!d&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};e.Howler=t,e.Howl=r,typeof at<"u"?(at.HowlerGlobal=n,at.Howler=t,at.Howl=r,at.Sound=o):typeof window<"u"&&(window.HowlerGlobal=n,window.Howler=t,window.Howl=r,window.Sound=o)})();(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){var r=this;if(!r.ctx||!r.ctx.listener)return r;for(var o=r._howls.length-1;o>=0;o--)r._howls[o].stereo(t);return r},HowlerGlobal.prototype.pos=function(t,r,o){var s=this;if(!s.ctx||!s.ctx.listener)return s;if(r=typeof r!="number"?s._pos[1]:r,o=typeof o!="number"?s._pos[2]:o,typeof t=="number")s._pos=[t,r,o],typeof s.ctx.listener.positionX<"u"?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]);else return s._pos;return s},HowlerGlobal.prototype.orientation=function(t,r,o,s,u,c){var f=this;if(!f.ctx||!f.ctx.listener)return f;var p=f._orientation;if(r=typeof r!="number"?p[1]:r,o=typeof o!="number"?p[2]:o,s=typeof s!="number"?p[3]:s,u=typeof u!="number"?p[4]:u,c=typeof c!="number"?p[5]:c,typeof t=="number")f._orientation=[t,r,o,s,u,c],typeof f.ctx.listener.forwardX<"u"?(f.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),f.ctx.listener.forwardY.setTargetAtTime(r,Howler.ctx.currentTime,.1),f.ctx.listener.forwardZ.setTargetAtTime(o,Howler.ctx.currentTime,.1),f.ctx.listener.upX.setTargetAtTime(s,Howler.ctx.currentTime,.1),f.ctx.listener.upY.setTargetAtTime(u,Howler.ctx.currentTime,.1),f.ctx.listener.upZ.setTargetAtTime(c,Howler.ctx.currentTime,.1)):f.ctx.listener.setOrientation(t,r,o,s,u,c);else return p;return f},Howl.prototype.init=(function(t){return function(r){var o=this;return o._orientation=r.orientation||[1,0,0],o._stereo=r.stereo||null,o._pos=r.pos||null,o._pannerAttr={coneInnerAngle:typeof r.coneInnerAngle<"u"?r.coneInnerAngle:360,coneOuterAngle:typeof r.coneOuterAngle<"u"?r.coneOuterAngle:360,coneOuterGain:typeof r.coneOuterGain<"u"?r.coneOuterGain:0,distanceModel:typeof r.distanceModel<"u"?r.distanceModel:"inverse",maxDistance:typeof r.maxDistance<"u"?r.maxDistance:1e4,panningModel:typeof r.panningModel<"u"?r.panningModel:"HRTF",refDistance:typeof r.refDistance<"u"?r.refDistance:1,rolloffFactor:typeof r.rolloffFactor<"u"?r.rolloffFactor:1},o._onstereo=r.onstereo?[{fn:r.onstereo}]:[],o._onpos=r.onpos?[{fn:r.onpos}]:[],o._onorientation=r.onorientation?[{fn:r.onorientation}]:[],t.call(this,r)}})(Howl.prototype.init),Howl.prototype.stereo=function(t,r){var o=this;if(!o._webAudio)return o;if(o._state!=="loaded")return o._queue.push({event:"stereo",action:function(){o.stereo(t,r)}}),o;var s=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof r>"u")if(typeof t=="number")o._stereo=t,o._pos=[t,0,0];else return o._stereo;for(var u=o._getSoundIds(r),c=0;c<u.length;c++){var f=o._soundById(u[c]);if(f)if(typeof t=="number")f._stereo=t,f._pos=[t,0,0],f._node&&(f._pannerAttr.panningModel="equalpower",(!f._panner||!f._panner.pan)&&n(f,s),s==="spatial"?typeof f._panner.positionX<"u"?(f._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),f._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),f._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):f._panner.setPosition(t,0,0):f._panner.pan.setValueAtTime(t,Howler.ctx.currentTime)),o._emit("stereo",f._id);else return f._stereo}return o},Howl.prototype.pos=function(t,r,o,s){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"pos",action:function(){u.pos(t,r,o,s)}}),u;if(r=typeof r!="number"?0:r,o=typeof o!="number"?-.5:o,typeof s>"u")if(typeof t=="number")u._pos=[t,r,o];else return u._pos;for(var c=u._getSoundIds(s),f=0;f<c.length;f++){var p=u._soundById(c[f]);if(p)if(typeof t=="number")p._pos=[t,r,o],p._node&&((!p._panner||p._panner.pan)&&n(p,"spatial"),typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(o,Howler.ctx.currentTime)):p._panner.setPosition(t,r,o)),u._emit("pos",p._id);else return p._pos}return u},Howl.prototype.orientation=function(t,r,o,s){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"orientation",action:function(){u.orientation(t,r,o,s)}}),u;if(r=typeof r!="number"?u._orientation[1]:r,o=typeof o!="number"?u._orientation[2]:o,typeof s>"u")if(typeof t=="number")u._orientation=[t,r,o];else return u._orientation;for(var c=u._getSoundIds(s),f=0;f<c.length;f++){var p=u._soundById(c[f]);if(p)if(typeof t=="number")p._orientation=[t,r,o],p._node&&(p._panner||(p._pos||(p._pos=u._pos||[0,0,-.5]),n(p,"spatial")),typeof p._panner.orientationX<"u"?(p._panner.orientationX.setValueAtTime(t,Howler.ctx.currentTime),p._panner.orientationY.setValueAtTime(r,Howler.ctx.currentTime),p._panner.orientationZ.setValueAtTime(o,Howler.ctx.currentTime)):p._panner.setOrientation(t,r,o)),u._emit("orientation",p._id);else return p._orientation}return u},Howl.prototype.pannerAttr=function(){var t=this,r=arguments,o,s,u;if(!t._webAudio)return t;if(r.length===0)return t._pannerAttr;if(r.length===1)if(typeof r[0]=="object")o=r[0],typeof s>"u"&&(o.pannerAttr||(o.pannerAttr={coneInnerAngle:o.coneInnerAngle,coneOuterAngle:o.coneOuterAngle,coneOuterGain:o.coneOuterGain,distanceModel:o.distanceModel,maxDistance:o.maxDistance,refDistance:o.refDistance,rolloffFactor:o.rolloffFactor,panningModel:o.panningModel}),t._pannerAttr={coneInnerAngle:typeof o.pannerAttr.coneInnerAngle<"u"?o.pannerAttr.coneInnerAngle:t._coneInnerAngle,coneOuterAngle:typeof o.pannerAttr.coneOuterAngle<"u"?o.pannerAttr.coneOuterAngle:t._coneOuterAngle,coneOuterGain:typeof o.pannerAttr.coneOuterGain<"u"?o.pannerAttr.coneOuterGain:t._coneOuterGain,distanceModel:typeof o.pannerAttr.distanceModel<"u"?o.pannerAttr.distanceModel:t._distanceModel,maxDistance:typeof o.pannerAttr.maxDistance<"u"?o.pannerAttr.maxDistance:t._maxDistance,refDistance:typeof o.pannerAttr.refDistance<"u"?o.pannerAttr.refDistance:t._refDistance,rolloffFactor:typeof o.pannerAttr.rolloffFactor<"u"?o.pannerAttr.rolloffFactor:t._rolloffFactor,panningModel:typeof o.pannerAttr.panningModel<"u"?o.pannerAttr.panningModel:t._panningModel});else return u=t._soundById(parseInt(r[0],10)),u?u._pannerAttr:t._pannerAttr;else r.length===2&&(o=r[0],s=parseInt(r[1],10));for(var c=t._getSoundIds(s),f=0;f<c.length;f++)if(u=t._soundById(c[f]),u){var p=u._pannerAttr;p={coneInnerAngle:typeof o.coneInnerAngle<"u"?o.coneInnerAngle:p.coneInnerAngle,coneOuterAngle:typeof o.coneOuterAngle<"u"?o.coneOuterAngle:p.coneOuterAngle,coneOuterGain:typeof o.coneOuterGain<"u"?o.coneOuterGain:p.coneOuterGain,distanceModel:typeof o.distanceModel<"u"?o.distanceModel:p.distanceModel,maxDistance:typeof o.maxDistance<"u"?o.maxDistance:p.maxDistance,refDistance:typeof o.refDistance<"u"?o.refDistance:p.refDistance,rolloffFactor:typeof o.rolloffFactor<"u"?o.rolloffFactor:p.rolloffFactor,panningModel:typeof o.panningModel<"u"?o.panningModel:p.panningModel};var m=u._panner;m||(u._pos||(u._pos=t._pos||[0,0,-.5]),n(u,"spatial"),m=u._panner),m.coneInnerAngle=p.coneInnerAngle,m.coneOuterAngle=p.coneOuterAngle,m.coneOuterGain=p.coneOuterGain,m.distanceModel=p.distanceModel,m.maxDistance=p.maxDistance,m.refDistance=p.refDistance,m.rolloffFactor=p.rolloffFactor,m.panningModel=p.panningModel}return t},Sound.prototype.init=(function(t){return function(){var r=this,o=r._parent;r._orientation=o._orientation,r._stereo=o._stereo,r._pos=o._pos,r._pannerAttr=o._pannerAttr,t.call(this),r._stereo?o.stereo(r._stereo):r._pos&&o.pos(r._pos[0],r._pos[1],r._pos[2],r._id)}})(Sound.prototype.init),Sound.prototype.reset=(function(t){return function(){var r=this,o=r._parent;return r._orientation=o._orientation,r._stereo=o._stereo,r._pos=o._pos,r._pannerAttr=o._pannerAttr,r._stereo?o.stereo(r._stereo):r._pos?o.pos(r._pos[0],r._pos[1],r._pos[2],r._id):r._panner&&(r._panner.disconnect(0),r._panner=void 0,o._refreshBuffer(r)),t.call(this)}})(Sound.prototype.reset);var n=function(t,r){r=r||"spatial",r==="spatial"?(t._panner=Howler.ctx.createPanner(),t._panner.coneInnerAngle=t._pannerAttr.coneInnerAngle,t._panner.coneOuterAngle=t._pannerAttr.coneOuterAngle,t._panner.coneOuterGain=t._pannerAttr.coneOuterGain,t._panner.distanceModel=t._pannerAttr.distanceModel,t._panner.maxDistance=t._pannerAttr.maxDistance,t._panner.refDistance=t._pannerAttr.refDistance,t._panner.rolloffFactor=t._pannerAttr.rolloffFactor,t._panner.panningModel=t._pannerAttr.panningModel,typeof t._panner.positionX<"u"?(t._panner.positionX.setValueAtTime(t._pos[0],Howler.ctx.currentTime),t._panner.positionY.setValueAtTime(t._pos[1],Howler.ctx.currentTime),t._panner.positionZ.setValueAtTime(t._pos[2],Howler.ctx.currentTime)):t._panner.setPosition(t._pos[0],t._pos[1],t._pos[2]),typeof t._panner.orientationX<"u"?(t._panner.orientationX.setValueAtTime(t._orientation[0],Howler.ctx.currentTime),t._panner.orientationY.setValueAtTime(t._orientation[1],Howler.ctx.currentTime),t._panner.orientationZ.setValueAtTime(t._orientation[2],Howler.ctx.currentTime)):t._panner.setOrientation(t._orientation[0],t._orientation[1],t._orientation[2])):(t._panner=Howler.ctx.createStereoPanner(),t._panner.pan.setValueAtTime(t._stereo,Howler.ctx.currentTime)),t._panner.connect(t._node),t._paused||t._parent.pause(t._id,!0).play(t._id,!0)}})()})(bn)),bn}var qe=ba();const mn="default";class ma{bgMusic=new Map;currentBgMusicId="";bgBaseVolumes=new Map;sfx=new Map;sfxBaseVolumes=new Map;masterVolume=1;musicMuted=!1;sfxMuted=!1;allMuted=!1;registerBgMusic(n,t,r){if(Array.isArray(n)){const s=typeof t=="number"?t:.5;this.registerBgMusicTrack(mn,n,s);return}if(t===void 0||typeof t=="number"){const s=typeof t=="number"?t:.5;this.registerBgMusicTrack(mn,n,s);return}const o=typeof r=="number"?r:.5;this.registerBgMusicTrack(n,t,o)}registerBgMusicTrack(n,t,r){if(this.bgMusic.has(n))return;const o=this.clamp(r);this.bgBaseVolumes.set(n,o),qe.Howler.volume(1),this.bgMusic.set(n,new qe.Howl({src:Array.isArray(t)?t:[t],loop:!0,volume:o*this.masterVolume}))}registerSound(n,t,r=1){if(this.sfx.has(n))return;const o=this.clamp(r);this.sfxBaseVolumes.set(n,o);const s=new qe.Howl({src:Array.isArray(t)?t:[t],volume:o*this.masterVolume});this.sfx.set(n,s)}playBgMusic(n){if(this.allMuted||this.musicMuted)return;const t=r=>{r.playing()||r.play()};if(n!==void 0){const r=this.bgMusic.get(n);this.currentBgMusicId=n,r&&t(r);return}this.bgMusic.forEach(t)}stopBgMusic(n){if(n!==void 0){this.bgMusic.get(n)?.stop();return}this.bgMusic.forEach(t=>t.stop())}muteMusic(){this.musicMuted=!0,this.bgMusic.forEach(n=>n.pause())}unmuteMusic(){this.musicMuted=!1,this.allMuted||this.playBgMusic(this.currentBgMusicId)}playSound(n,t=!1){if(this.allMuted||this.sfxMuted)return;const r=this.sfx.get(n);if(r)return r.loop(t),r.play()}playSoundOnce(n,t=!1){if(this.allMuted||this.sfxMuted)return;const r=this.sfx.get(n);if(r&&!r.playing())return r.loop(t),r.play()}stopSound(n){const t=this.sfx.get(n);t&&t.stop()}muteSounds(){this.sfxMuted=!0,this.sfx.forEach(n=>n.pause())}unmuteSounds(){this.sfxMuted=!1}setMasterVolume(n){let t=n/100;t=this.clamp(t),this.masterVolume=t,qe.Howler.volume(1),!this.allMuted&&(this.bgMusic.forEach((r,o)=>{const s=this.bgBaseVolumes.get(o)??1;r.volume(s*this.masterVolume)}),this.sfx.forEach((r,o)=>{const s=this.sfxBaseVolumes.get(o)??1;r.volume(s*this.masterVolume)}))}setSoundBaseVolume(n,t){const r=this.sfx.get(n);if(!r)return;const o=this.clamp(t);this.sfxBaseVolumes.set(n,o),r.volume(o*this.masterVolume)}setBgMusicBaseVolume(n,t){const r=this.bgMusic.get(n);if(!r)return;const o=this.clamp(t);this.bgBaseVolumes.set(n,o),r.volume(o*this.masterVolume)}muteAll(){this.allMuted=!0,qe.Howler.mute(!0)}unmuteAll(){this.allMuted=!1,qe.Howler.mute(!1),this.setMasterVolume(this.masterVolume),this.musicMuted||this.playBgMusic()}clamp(n){return Math.max(0,Math.min(1,n))}}const Ee=new ma;function I(){Ee.playSound(hn.Click)}const ga=({onClick:e,disabled:n=!1,value:t,currency:r,highlighted:o=!1})=>v.jsxs("div",{className:`bet-amount ${n?"disabled":""} ${o?"ante-color":""}`,onClick:e&&!n?()=>{I(),e()}:void 0,children:[v.jsx("div",{className:"bet-amount-icon"}),v.jsxs("label",{className:"bet-amount-text",children:[t," ",r]})]}),Hr=({onClick:e,disabled:n=!1,className:t})=>{const r=o=>{o.currentTarget.blur()};return v.jsx("button",{className:`${t} ${n?"disabled":""}`,type:"button",onClick:e?()=>{n||(I(),e())}:void 0,onMouseUp:r,onTouchEnd:r,onKeyUp:o=>{(o.key===" "||o.key==="Enter")&&r(o)}})};class ya{activePopup=null;constructor(){Ie(this)}open(n){this.activePopup=n}close(){this.activePopup=null}get isOpen(){return this.activePopup!==null}}const j=new ya;class Aa{dialogs=Ur;activeDialog=null;constructor(){Ie(this)}add(n){this.dialogs.push(n)}open(n){const t=this.dialogs.find(r=>n===r.name);t?this.activeDialog=t:console.error(`Couldn't find dialog named ${n}`)}close(){this.activeDialog=null}get isOpen(){return this.activeDialog!==null}}const st=new Aa;class Oa{balance=1e4;betAmount=10;betIndex=0;betAmountRange=[10,20,50,100,500,1e3,5e3,1e4,25e3,5e5,65e3,8e4,1e5,15e4,2e5];maxBetAmount=this.betAmountRange[0];minBetAmount=this.betAmountRange[this.betAmountRange.length-1];displayCurrency="FUN";constructor(){Ie(this)}setBet(n){this.betAmount=n,this.betIndex=this.betAmountRange.indexOf(n)}setNextBetAmount(){if(this.betIndex===this.betAmountRange.length-1)return console.error("Bet Index must be less than BetStore.betAmountRange.length");this.betIndex+=1,this.betAmount=this.betAmountRange[this.betIndex]}setPrevBetAmount(){if(this.betIndex<1)return console.error("Bet Index must be more than 0");this.betIndex-=1,this.betAmount=this.betAmountRange[this.betIndex]}setBetAmountRange(n){this.betAmountRange=n,n.length>0&&(this.maxBetAmount=n[0],this.minBetAmount=n[n.length-1])}setDisplayCurrency(n){this.displayCurrency=n}setBalance(n){this.balance=n}}const ne=new Oa;class Sa{countRange=[10,25,50,70,100,500,1e3];limitsRange=[10,20,50];count=0;specialFeatureSwitcherOn=!1;lossLimit=null;winLimit=null;currentWinLimit=0;currentLossLimit=0;isStarted=!1;constructor(){Ie(this)}setCount(n){this.count=n}setIsStarted(n){this.isStarted=n}setLimitsRange(n){this.limitsRange=n}setCountRange(n){this.countRange=n}setSpecialFeatureSwitcher(n){this.specialFeatureSwitcherOn=n}setLossLimit(n){this.lossLimit=n}setCurrentLossLimit(n){this.currentLossLimit=n}setWinLimit(n){this.winLimit=n}setCurrentWinLimit(n){this.currentWinLimit=n}}const we=new Sa;class Ea{anteBets=[];inReelFeatures=[];bonusFeatures=[];activeAnteBet=null;activeBonusFeature=null;activeInReelFeature=null;freeSpinsCount=0;handler;handlerSet=!1;constructor(){en(this,{anteBets:T,inReelFeatures:T,bonusFeatures:T,activeAnteBet:T,activeBonusFeature:T,activeInReelFeature:T,freeSpinsCount:T,isActiveBonus:De,isActiveInReelFeature:De,isActiveAnteBet:De,setAnteBets:M,setActiveAnteBet:M,setActiveBonusFeature:M,setActiveInReelFeature:M,setInReelFeatures:M,setBonusFeatures:M,setHandlerOnce:M,buyHandler:M})}setAnteBets(n){this.anteBets=n}setActiveAnteBet(n){n!==null?this.activeAnteBet=this.anteBets.find(t=>t.id===n)||null:this.activeAnteBet=null}setFreeSpinsCount(n){this.freeSpinsCount=n}setActiveBonusFeature(n){this.activeBonusFeature=n}setActiveInReelFeature(n){this.activeInReelFeature=n}setInReelFeatures(n){this.inReelFeatures=n}setBonusFeatures(n){this.bonusFeatures=n}get isActiveBonus(){return!!this.activeBonusFeature}get isActiveInReelFeature(){return!!this.activeInReelFeature}get isActiveAnteBet(){return!!this.activeAnteBet}setHandlerOnce(n){if(this.handlerSet){console.error("[BuyBonus] handler already set");return}this.handler=n,this.handlerSet=!0}buyHandler(n){this.handler?.(n)}}const pe=new Ea;class wa{introSkip=this.getBooleanSetting(F.SKIP_INTRO,!1);spaceToSpin=this.getBooleanSetting(F.SPACE_TO_SPIN,!0);spaceToSkip=this.getBooleanSetting(F.SPACE_TO_SKIP,!0);isTurbo=this.getBooleanSetting(F.IS_TURBO,!1);volume=this.getNumberSetting(F.VOLUME,50);musicOn=this.getBooleanSetting(F.MUSIC_ON,!0);soundsOn=this.getBooleanSetting(F.SOUND_ON,!0);constructor(){Ie(this)}getBooleanSetting(n,t){const r=localStorage.getItem(n);return r===null?t:r==="true"}getNumberSetting(n,t){const r=localStorage.getItem(n);if(r===null)return t;const o=Number(r);return Number.isNaN(o)?t:o}setMusicOn(n){this.musicOn=n,localStorage.setItem(F.MUSIC_ON,n.toString()),n?Ee.unmuteMusic():Ee.muteMusic()}toggleMute(){this.volume>0?this.setVolume(0):this.setVolume(50)}setVolume(n){this.volume=n,localStorage.setItem(F.VOLUME,n.toString()),Ee.setMasterVolume(n)}setIsTurbo(n){this.isTurbo=n,localStorage.setItem(F.IS_TURBO,n.toString())}setSoundsOn(n){this.soundsOn=n,localStorage.setItem(F.SOUND_ON,n.toString()),n?Ee.unmuteSounds():Ee.muteSounds()}setIntroSkip(n){this.introSkip=n,localStorage.setItem(F.SKIP_INTRO,n.toString())}setSpaceToSpin(n){this.spaceToSpin=n,localStorage.setItem(F.SPACE_TO_SPIN,n.toString())}setSpaceToSkip(n){this.spaceToSkip=n,localStorage.setItem(F.SPACE_TO_SKIP,n.toString())}}const re=new wa;class Na{data=[{date:"26.11.2024 00:16",betAmount:1011,winAmount:20,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:20,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:1,winAmount:2e4,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"}];constructor(){Ie(this)}setData(n){this.data=n}}const Gr=new Na;class Ta{isRunning=!1;isDisabled=!1;isSlamStop=!1;isUIVisible=!1;isAutoPlayDisabled=!1;isBuyBonusDisabled=!1;isBetAmountLabelsDisabled=!1;handler;handlerSet=!1;constructor(){en(this,{isRunning:T,isDisabled:T,isSlamStop:T,isUIVisible:T,isAutoPlayDisabled:T,isBuyBonusDisabled:T,isBetAmountLabelsDisabled:T,setIsSpinRunning:M,setIsSpinDisabled:M,setIsSlamStop:M,setHandlerOnce:M,setIsUIVisible:M,setIsAutoplayDisabled:M,setIsBuyBonusDisabled:M,setIsBetAmountLabelsDisabled:M,clickHandler:M})}setHandlerOnce(n){if(this.handlerSet){console.error("[SpinButton] handler already set");return}this.handler=n,this.handlerSet=!0}setIsUIVisible(n){this.isUIVisible=n}setIsAutoplayDisabled(n){this.isAutoPlayDisabled=n}setIsBetAmountLabelsDisabled(n){this.isBetAmountLabelsDisabled=n}setIsSpinDisabled(n){this.isDisabled=n}setIsBuyBonusDisabled(n){this.isBuyBonusDisabled=n}clickHandler(){I(),this.handler?.()}setIsSpinRunning(n){this.isRunning=n}setIsSlamStop(n){this.isSlamStop=n}}const ut=new Ta;class Ca{lastResult={};isBonus=!1;lastWinAmount=0;constructor(){Ie(this)}setLastResult(n){this.lastResult=n}setIsBonus(n){this.isBonus=n}setLastWinAmount(n){this.lastWinAmount=n}}const Rr=new Ca,Da=$(()=>{const{isDisabled:e,isRunning:n,clickHandler:t}=ut,{count:r,isStarted:o}=we,{freeSpinsCount:s}=pe,u=c=>{c.currentTarget.blur()};return v.jsx("button",{className:`spin-btn
32
32
  ${e?"disabled":""}
33
33
  ${n||s||r&&o?"slam-stop":""}
34
- `,type:"button",onClick:t.bind(ut),onMouseUp:u,onTouchEnd:u,onKeyUp:c=>{(c.key===" "||c.key==="Enter")&&u(c)},children:v.jsx("span",{className:`spin-btn_label ${o&&r||s?"":"hidden"}`,children:s||r})})}),Kr=({onClick:e,disabled:n=!1,className:t,isActive:r})=>{const o=s=>{s.currentTarget.blur()};return v.jsx("button",{className:`${t} ${n?"disabled":""} ${r?"active":""}`,type:"button",onClick:e?()=>{n||(I(),e())}:void 0,onMouseUp:o,onTouchEnd:o,onKeyUp:s=>{(s.key===" "||s.key==="Enter")&&o(s)}})},xa=$(()=>{const{balance:e,betAmount:n,displayCurrency:t,setNextBetAmount:r,setPrevBetAmount:o}=ne,{lastWinAmount:s}=Rr,{setIsTurbo:u,isTurbo:c}=re,{open:f}=j,{activeAnteBet:p,activeBonusFeature:m,activeInReelFeature:i,setActiveAnteBet:a}=pe,{isUIVisible:l,isAutoPlayDisabled:d,isBuyBonusDisabled:h,isBetAmountLabelsDisabled:b}=ut,_=w.useMemo(()=>p?.imagePath||i?.imagePath||m?.imagePath,[p,m,i]),y=w.useCallback(()=>{Ee.playSound(hn.BuyBonusClick),p?a.call(pe,null):f.call(j,H.buyBonus)},[p,a]);return v.jsx("div",{className:`ui-footer ${l?"":"hidden"}`,children:v.jsxs("div",{className:"top-row",children:[v.jsxs("div",{className:"left-group",children:[v.jsx(ha,{imagePath:_,disabled:h,onClick:y,isAnteBet:!!p,isBonus:!!m}),v.jsxs("div",{className:"balance-info",children:[v.jsx(jr,{label:D("LAST_WIN"),value:`${s} ${t}`}),v.jsx(jr,{label:D("BALANCE"),value:`${e} ${t}`})]})]}),v.jsxs("div",{className:"bet-control",children:[v.jsx(ga,{highlighted:!!p,value:p?p.availableBets[ne.betIndex]:n,currency:t,onClick:()=>{f.call(j,H.bet)},disabled:b}),v.jsxs("div",{className:"bet-box",children:[v.jsx(Hr,{onClick:()=>{o.call(ne)},className:"bet-btn minus",disabled:b}),v.jsx(Da,{onClick:()=>console.log("Spin"),state:"active"}),v.jsx(Hr,{onClick:()=>{r.call(ne)},className:"bet-btn plus",disabled:b})]}),v.jsx(Kr,{className:"quick-spin",onClick:()=>{u.call(re,!c)},isActive:c}),v.jsx(Kr,{className:"auto-spin",onClick:()=>{f.call(j,H.autoplay)},isActive:!1,disabled:d})]})]})})}),Ba=({onMount:e,onUnmount:n,className:t})=>{const r=w.useRef(null);return w.useEffect(()=>(r.current&&e&&e(r.current),()=>{n?.()}),[e,n]),v.jsx("div",{ref:r,className:t,style:{width:"100%",height:"100%",position:"relative"}})};function Va(e){const n=w.useRef(null);return w.useEffect(()=>{if(typeof e!="function")return;const t=r=>{const o=n.current;if(!o)return;const s=r.target;s&&(o.contains(s)||e(r))};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e]),n}const Ma=$(()=>{const{volume:e,setVolume:n}=re,[t,r]=w.useState(!1),o=Va(()=>r(!1)),s=w.useCallback(()=>{I(),re.toggleMute(),t||r(!0)},[t,r]);return v.jsxs("div",{className:"sound-controller",children:[t&&v.jsxs("div",{className:"volume-control",ref:o,children:[v.jsx("input",{type:"range",min:0,max:100,value:e,onChange:u=>n.call(re,Number(u.target.value)),className:"slider","aria-label":"Volume"}),v.jsx("span",{className:"volume-value",children:e})]}),v.jsx("button",{className:`btn-sound ${e===0?"inactive":""}`,"aria-label":"Toggle Sound",onClick:s})]})}),La=$(()=>{const{open:e}=j,{isUIVisible:n}=ut;return n?v.jsxs("div",{className:"settings-section",children:[v.jsx(Ma,{}),v.jsx("button",{className:"btn-settings","aria-label":"Open Settings",onClick:()=>{I(),e.call(j,H.settings)}})]}):null}),Pa="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='34'%20height='45'%20viewBox='0%200%2034%2045'%20fill='none'%3e%3cpath%20d='M7.69062%2031.7333H7.06121L9.3091%2028.0889L11.9167%2024C12.636%2022.9333%2012.666%2021.8074%2012.0066%2020.6222C11.527%2019.6741%2011.0475%2018.8148%2010.5679%2018.0444L11.1973%2017.6889C11.1973%2017.6296%2011.1674%2017.5704%2011.1074%2017.5111L10.3881%2017.6889C10.2083%2017.6296%2010.0284%2017.4222%209.8486%2017.0667C9.72871%2016.7111%209.63879%2016.5037%209.57885%2016.4444C9.15924%2016.1481%208.85952%2015.7037%208.67969%2015.1111L9.12927%2014.5778C8.94944%2014.4%208.88949%2014.2815%208.94944%2014.2222C9.06933%2013.4518%209.33907%2012.9185%209.75868%2012.6222C10.0584%2012.563%2010.0284%2012.3556%209.66877%2012L8.40994%2014.5778C7.93039%2013.9852%207.66065%2013.6%207.6007%2013.4222C7.6007%2013.1852%207.8105%2012.7704%208.23011%2012.1778C8.40994%2012%208.5598%2011.7926%208.67969%2011.5556C8.85952%2011.1407%208.94944%2010.6963%208.94944%2010.2222L8.40994%2011.3778C8.11022%2011.8519%207.69062%2011.9704%207.15112%2011.7333C7.15112%2011.4963%207.18109%2011.3481%207.24104%2011.2889C7.36093%2011.1704%207.51079%2011.0815%207.69062%2011.0222C7.87045%2010.9037%208.02031%2010.7852%208.1402%2010.6667L7.78053%2010.4C7.78053%2010.3407%207.81051%2010.2815%207.87045%2010.2222C7.87045%209.98518%207.90042%209.83704%207.96036%209.77778C7.54076%2010.1926%207.12115%2010.2222%206.70154%209.86667C6.82143%209.51111%206.88137%209.3037%206.88137%209.24444L6.97129%209.06666L7.15112%208.8C6.97129%208.85926%206.73151%208.88889%206.43179%208.88889C6.43179%208.53333%206.46177%208.32592%206.52171%208.26666C6.70154%207.79259%206.70154%207.34815%206.52171%206.93333L6.07213%207.28889C5.77241%207.46667%205.23292%207.46667%204.45365%207.28889C4.15393%206.6963%204.30379%206.13333%204.90322%205.6C4.84328%205.6%204.66345%205.62963%204.36373%205.68889C4.12395%205.68889%203.94412%205.68889%203.82423%205.68889C3.82423%206.22222%203.79426%206.60741%203.73432%206.84444C3.37465%206.25185%203.19482%205.86666%203.19482%205.68889C3.13488%205.62963%203.07494%205.6%203.01499%205.6L2.74524%205.33333L1.21667%202.66666L1.03684%202.13333C0.677179%201.00741%201.09679%200.355554%202.29566%200.177775H3.73432C3.97409%200.177775%204.42367%200.207404%205.08306%200.266663C5.80238%200.266663%206.25196%200.266663%206.43179%200.266663C7.33095%200.148146%208.05028%200.503704%208.58978%201.33333C9.18921%202.16296%2010.2982%203.94074%2011.9167%206.66667C12.0366%206.78518%2012.0965%207.05185%2012.0965%207.46666C12.8158%207.58518%2013.2354%208.14815%2013.3553%209.15555L14.0746%2010.0444L15.6032%2012.8C15.6032%2012.9185%2015.6332%2013.0074%2015.6931%2013.0667L16.5923%2014.4L17.7612%2014.0444L18.3906%2013.6C18.8102%2013.1852%2019.2298%2012.6519%2019.6494%2012L21.5377%209.06666L23.336%206.4C24.2951%204.97778%2025.0144%203.82222%2025.494%202.93333L26.0335%201.86667C26.573%201.80741%2026.8727%201.74815%2026.9326%201.68889C27.0525%201.57037%2027.0525%201.24444%2026.9326%200.71111C27.5321%200.355554%2028.5211%200.177775%2029.8998%200.177775C31.4584%200.0592581%2032.2676%200%2032.3276%200L32.5074%200.62222L32.8671%200.266663L32.957%200.35555C33.0169%200.414812%2033.0769%200.444444%2033.1368%200.444444C33.8561%200.799999%2034.0959%201.27407%2033.8561%201.86667C33.7362%202.28148%2033.3766%203.05185%2032.7771%204.17777L32.3276%204.35555L31.878%205.51111C31.0987%206.45926%2030.0497%208%2028.7309%2010.1333C27.5321%2012.0296%2026.6928%2013.3333%2026.2133%2014.0444C25.9136%2014.4%2024.6547%2016.4148%2022.4368%2020.0889L21.8973%2021.0667C21.5976%2021.7778%2021.6575%2022.4296%2022.0772%2023.0222L23.6956%2025.8667C23.6956%2025.9852%2023.7556%2026.1037%2023.8755%2026.2222C23.9954%2026.3407%2023.9654%2026.4889%2023.7856%2026.6667L24.3251%2026.9333C24.5648%2027.4074%2025.0744%2028.237%2025.8536%2029.4222C26.6329%2030.6074%2027.0525%2031.2593%2027.1124%2031.3778C27.1124%2031.4963%2027.1424%2031.5852%2027.2024%2031.6444C26.543%2031.9407%2026.4231%2032.2963%2026.8427%2032.7111C26.8427%2032.7704%2026.8127%2032.8296%2026.7528%2032.8889C26.7528%2032.9481%2026.7528%2033.0074%2026.7528%2033.0667C26.7528%2033.2444%2026.8427%2033.4222%2027.0225%2033.6C27.2024%2033.4222%2027.4122%2033.037%2027.6519%2032.4444C28.1914%2033.037%2028.4012%2033.5704%2028.2814%2034.0444C28.9407%2034.4%2029.2704%2034.9037%2029.2704%2035.5556C29.2704%2035.6741%2029.3004%2035.7333%2029.3603%2035.7333C29.6001%2035.9704%2029.9898%2036.5037%2030.5292%2037.3333L31.6082%2039.0222L31.9679%2039.5556C32.1477%2039.9704%2032.0878%2040.237%2031.7881%2040.3556H31.9679L32.5074%2040.1778L33.6763%2042.4C34.3956%2044%2033.9161%2044.8%2032.2376%2044.8C32.1777%2044.8%2032.1477%2044.7704%2032.1477%2044.7111C32.1477%2044.3556%2032.0878%2044.1778%2031.9679%2044.1778C31.7881%2044.1778%2031.6682%2044.2074%2031.6082%2044.2667C31.6082%2044.3259%2031.6082%2044.4444%2031.6082%2044.6222C31.6682%2044.7407%2031.6982%2044.8296%2031.6982%2044.8889H28.3713C27.5321%2044.8889%2026.7828%2044.4741%2026.1234%2043.6444L24.9545%2041.7778L21.8973%2036.8889L20.9082%2035.0222L20.0091%2033.5111L18.4805%2031.2C18.4805%2031.1407%2018.3307%2030.9037%2018.0309%2030.4889C17.6113%2029.9556%2017.1618%2029.8074%2016.6822%2030.0444C16.2626%2030.2222%2015.9029%2030.4593%2015.6032%2030.7556C15.3634%2031.0519%2015.1536%2031.3778%2014.9738%2031.7333L11.1973%2037.6L9.3091%2040.4444L9.12927%2040.7111V40.3556C9.06933%2040.1185%209.03935%2039.9407%209.03935%2039.8222C8.5598%2040.1185%208.40994%2040.4444%208.58978%2040.8C8.58978%2040.8593%208.67969%2040.8889%208.85952%2040.8889L7.51079%2043.2L6.70154%2042.7556C6.70154%2042.8148%206.70154%2043.0222%206.70154%2043.3778C6.76149%2043.7333%206.79146%2043.9704%206.79146%2044.0889C6.43179%2044.6815%205.80238%2044.9778%204.90322%2044.9778C4.06401%2045.037%202.92508%2044.9778%201.48642%2044.8C0.107712%2044.6222%20-0.311896%2043.8519%200.2276%2042.4889L0.407431%2042.1333L3.19482%2037.6L3.91415%2038.4889C4.03404%2037.9556%203.91415%2037.5111%203.55449%2037.1556L4.45365%2035.9111L5.17297%2034.8444L6.16205%2033.9556C6.1021%2033.5407%206.40182%2032.7704%207.06121%2031.6444V31.8222L7.42087%2032.2667L7.51079%2032.0889C7.51079%2032.0296%207.54076%2031.9407%207.6007%2031.8222V31.7333C7.90042%2031.7926%208.05028%2031.763%208.05028%2031.6444C8.11022%2031.4667%208.11022%2031.2889%208.05028%2031.1111C7.8105%2031.1111%207.69062%2031.3185%207.69062%2031.7333ZM9.03935%2030.5778C9.45896%2030.637%209.69874%2030.637%209.75868%2030.5778C9.81863%2030.5185%209.78865%2030.2519%209.66877%2029.7778H8.85952C8.97941%2030.2519%209.03935%2030.5481%209.03935%2030.6667C8.79958%2030.6667%208.61975%2030.7259%208.49986%2030.8444C8.49986%2030.9037%208.52983%2030.9926%208.58978%2031.1111C8.64972%2031.1704%208.70966%2031.1704%208.76961%2031.1111C8.8895%2031.1111%208.97941%2030.9333%209.03935%2030.5778ZM21.2679%2012.8L20.9982%2012.3556L20.099%2012.7111C20.2189%2012.9481%2020.3987%2013.2148%2020.6385%2013.5111C21.0581%2013.4518%2021.2679%2013.2148%2021.2679%2012.8ZM30.6192%2040.8C30.0797%2041.0963%2030.0197%2041.5407%2030.4393%2042.1333C30.739%2041.4815%2030.799%2041.037%2030.6192%2040.8ZM22.5267%2012.1778C22.9463%2011.7037%2023.0363%2011.2593%2022.7965%2010.8444C22.3169%2011.2593%2022.227%2011.7037%2022.5267%2012.1778ZM3.46457%205.06666L4.63348%204.44444L3.91415%204.17777L3.37466%204.97778C3.37466%205.03704%203.40463%205.06666%203.46457%205.06666ZM22.3469%2026.4L22.1671%2026.1333C21.9872%2026.4889%2021.8973%2026.7259%2021.8973%2026.8444L22.0772%2027.0222L22.257%2027.1111C22.257%2027.0519%2022.3169%2026.963%2022.4368%2026.8444C22.6167%2026.6667%2022.5867%2026.5185%2022.3469%2026.4ZM24.1452%2012.1778V11.5556C24.1452%2011.437%2024.0553%2011.3778%2023.8755%2011.3778L23.6057%2011.4667C23.6057%2011.9407%2023.7856%2012.1778%2024.1452%2012.1778ZM6.25196%2035.2889C6.25196%2035.5852%206.28194%2035.8222%206.34188%2036C6.52171%2035.7037%206.49174%2035.4667%206.25196%2035.2889ZM10.0284%208.88889L9.39902%209.77778C9.81863%209.6%2010.0284%209.3037%2010.0284%208.88889ZM28.1015%2039.5556C28.3413%2039.2%2028.3113%2038.8741%2028.0116%2038.5778C27.9517%2038.6963%2027.9217%2038.8741%2027.9217%2039.1111C27.9217%2039.1704%2027.9517%2039.2296%2028.0116%2039.2889C28.0116%2039.4074%2028.0416%2039.4963%2028.1015%2039.5556ZM29.8099%2037.0667C29.75%2037.4815%2029.8699%2037.7185%2030.1696%2037.7778C30.2895%2037.4222%2030.1696%2037.1852%2029.8099%2037.0667ZM3.01499%2042.4889C3.07494%2042.4296%203.16485%2042.4%203.28474%2042.4L3.19482%2042.2222C3.19482%2042.0444%203.19482%2041.8963%203.19482%2041.7778L3.10491%2041.8667H2.92508L3.01499%2042.0444C3.01499%2042.2222%203.01499%2042.3704%203.01499%2042.4889ZM11.2873%208.17778H11.4671C11.587%208.05926%2011.6469%207.91111%2011.6469%207.73333L11.3772%207.64444C11.3772%207.7037%2011.3472%207.79259%2011.2873%207.91111C11.2873%208.02963%2011.2873%208.11852%2011.2873%208.17778ZM29.5402%2038.8444L29.72%2038.4889V38.1333C29.6001%2038.1333%2029.5102%2038.1037%2029.4503%2038.0444C29.3304%2038.3407%2029.3603%2038.6074%2029.5402%2038.8444ZM28.641%206.31111H28.4612C28.4012%206.37037%2028.3713%206.51852%2028.3713%206.75555C28.4312%206.81481%2028.4912%206.84444%2028.5511%206.84444V6.57778L28.641%206.31111ZM28.0116%2037.1556C28.1914%2036.9185%2028.1615%2036.7111%2027.9217%2036.5333C27.9217%2036.6519%2027.9517%2036.7704%2028.0116%2036.8889V37.1556ZM24.7746%2032.7111C24.7147%2032.6518%2024.6248%2032.6222%2024.5049%2032.6222C24.5049%2032.8593%2024.4749%2033.0074%2024.415%2033.0667H24.6847C24.6847%2033.0074%2024.6847%2032.9481%2024.6847%2032.8889C24.7447%2032.8296%2024.7746%2032.7704%2024.7746%2032.7111ZM25.404%2033.9556H25.5839C25.5839%2033.8963%2025.5539%2033.8074%2025.494%2033.6889C25.494%2033.5704%2025.494%2033.5111%2025.494%2033.5111H25.404C25.3441%2033.5704%2025.2842%2033.6%2025.2242%2033.6C25.3441%2033.7185%2025.404%2033.837%2025.404%2033.9556ZM9.66877%2030.8444H9.48893V31.2889H9.57885C9.63879%2031.2296%209.66877%2031.0815%209.66877%2030.8444ZM6.52171%2041.8667L6.43179%2042.1333C6.43179%2042.1926%206.49174%2042.2815%206.61163%2042.4L6.79146%2042.2222C6.79146%2042.163%206.70154%2042.0444%206.52171%2041.8667ZM5.3528%2039.1111H5.53264C5.53264%2038.8148%205.44272%2038.637%205.26289%2038.5778C5.32283%2038.6963%205.3528%2038.8741%205.3528%2039.1111ZM29.9897%206.48889H30.2595V5.95555H30.0797L29.9897%206.22222V6.48889ZM27.2024%209.6H27.3822C27.3822%209.36296%2027.3522%209.21481%2027.2923%209.15555H27.1124C27.1124%209.39259%2027.1424%209.54074%2027.2024%209.6ZM11.3772%2027.6444V28.3556C11.557%2028.1185%2011.557%2027.8815%2011.3772%2027.6444ZM4.54356%208.08889L5.53264%207.46666L6.07213%207.28889C6.13207%207.22963%206.25196%207.2%206.43179%207.2C6.49174%207.67407%206.34188%208%205.98222%208.17778C5.62255%208.35555%205.143%208.32592%204.54356%208.08889ZM6.43179%208.88889C6.73151%208.88889%206.97129%208.85926%207.15112%208.8L6.97129%209.06666L6.88137%209.24444L6.52171%209.6C6.22199%209.77778%205.98222%209.68889%205.80238%209.33333L6.07213%209.06666H5.98222C6.04216%209.06666%206.1021%209.03703%206.16205%208.97778C6.22199%208.97778%206.31191%208.94815%206.43179%208.88889ZM6.34188%2011.0222V10.2222L7.24104%2010.4C7.06121%2010.8741%206.76149%2011.0815%206.34188%2011.0222ZM5.98222%209.06666H6.07213C5.59258%209.06666%205.29286%208.97778%205.17297%208.8C5.29286%208.8%205.44272%208.74074%205.62255%208.62222C5.80238%208.5037%205.92227%208.41481%205.98222%208.35555V9.06666Z'%20fill='white'/%3e%3c/svg%3e",Ia=$(()=>{const{betAmount:e,displayCurrency:n,setNextBetAmount:t,setPrevBetAmount:r}=ne;return v.jsxs("div",{className:"overlay-bet-controller",children:[v.jsx("div",{className:"decrease-bet",onClick:()=>{I(),r.call(ne)}}),v.jsxs("div",{className:"bet-amount",children:[e," ",n]}),v.jsx("div",{className:"increase-bet",onClick:()=>{I(),t.call(ne)}})]})}),qr=({value:e,onClick:n,active:t})=>v.jsx("div",{className:`rectLabel ${t?"current-active":""}`,onClick:()=>{I(),n(e)},children:v.jsx("span",{children:e})}),ka=$(()=>{const{betAmountRange:e,setBet:n,betAmount:t}=ne,{activeAnteBet:r}=pe,{close:o}=j;return v.jsx("div",{className:"bet-popup-container",children:e.map((s,u)=>{const c=t===s;return v.jsx(qr,{value:r?r.availableBets[u]:s,active:c,onClick:()=>{n.call(ne,s),o.call(j)}},u)})})}),It=({checked:e,onChange:n})=>v.jsx("button",{className:`ap-toggle ${e?"ap-toggle--on":"ap-toggle--off"}`,"aria-pressed":e,onClick:()=>{I(),n(!e)},type:"button",children:v.jsx("span",{className:"ap-toggle__knob"})}),gn=({active:e,onClick:n,children:t})=>v.jsx("button",{className:`ap-limit ${e?"ap-limit--active":""}`,onClick:n?()=>{I(),n()}:void 0,type:"button",children:t}),Wr=({active:e,onClick:n,children:t})=>v.jsx("button",{className:`ap-tab ${e?"ap-tab--active":""}`,onClick:n?()=>{I(),n()}:void 0,type:"button",children:t}),ja=({value:e,placeholder:n,inputType:t="text",className:r="",autoFocus:o=!0,onSubmit:s,onCancel:u})=>{const[c,f]=w.useState(""),p=w.useRef(null),m=w.useRef(!1);w.useEffect(()=>{f(e??""),m.current=!1},[e]),w.useEffect(()=>{o&&setTimeout(()=>{p.current?.focus(),p.current?.select()},0)},[o]);const i=()=>{m.current||(m.current=!0,s(c.trim()))},a=()=>{i()},l=d=>{d.key==="Enter"?(d.preventDefault(),i(),p.current?.blur()):d.key==="Escape"&&(f(e??""),u?.(),p.current?.blur())};return v.jsx("input",{ref:p,className:`ap-limit ${r}`,type:"number",value:c,placeholder:n,onChange:d=>f(d.target.value),onBlur:a,onKeyDown:l,inputMode:t==="number"?"numeric":void 0,"aria-label":"custom limit input"})},Fa=$(()=>{const{specialFeatureSwitcherOn:e,setSpecialFeatureSwitcher:n,countRange:t,count:r,setCount:o,lossLimit:s,winLimit:u,setLossLimit:c,limitsRange:f,setWinLimit:p,setIsStarted:m}=we,[i,a]=w.useState(0),[l,d]=w.useState(!1),[h,b]=w.useState(""),_=w.useMemo(()=>i?u:s,[i,u,s]),y=w.useMemo(()=>i?p.bind(we):c.bind(we),[i,p,c]);w.useEffect(()=>{const O=_&&!f.includes(_);b(O?_:0)},[_,u]);const E=!!r&&r>0;return v.jsxs("div",{className:"autoplay-wrap",children:[v.jsx("h3",{className:"ap-title",children:D("NUMBER_OF_SPINS")}),v.jsx("div",{className:"autoplay-count",children:t.map((O,B)=>{const L=r===O;return v.jsx(qr,{value:O,active:L,onClick:o.bind(we,O)},B)})}),v.jsxs("div",{className:"ap-switch-row",children:[v.jsx("div",{className:"ap-switch-label",children:D("STOP_ON_SPECIAL")}),v.jsx("div",{className:"ap-switch-control",children:v.jsx(It,{checked:e,onChange:O=>n.call(we,O)})})]}),v.jsxs("div",{className:"ap-tabs",children:[v.jsx(Wr,{active:!i,onClick:()=>a(0),children:D("LOSS_LIMIT")}),v.jsx(Wr,{active:!!i,onClick:()=>a(1),children:D("WIN_LIMIT")})]}),v.jsx("div",{className:"ap-limits-panel",children:v.jsx("div",{className:"ap-limits-inner",children:v.jsxs("div",{className:"ap-limit-grid",children:[f.map((O,B)=>v.jsx(gn,{active:_===O,onClick:()=>y(O),children:`${O}x ${D("BET")}`},B)),v.jsx(gn,{active:!_,onClick:()=>y(null),children:D("NO_LIMIT")}),l?v.jsx(ja,{value:""+h,inputType:"number",onSubmit:O=>{const B=O.trim();if(B===""){d(!1);return}const L=Number(B);b(L??0),y(L),d(!1)},onCancel:()=>{d(!1)}}):v.jsx(gn,{onClick:()=>{d(!0)},active:!!_&&_===Number(h),children:h?`${h}x ${D("BET")}`:D("CUSTOM")})]})})}),v.jsx("div",{className:"ap-start-row",children:v.jsx("button",{className:`ap-start-btn ${E?"":"ap-start-btn--disabled"}`,onClick:()=>{I(),m.call(we,!0)},type:"button",disabled:!E,children:D("START_AUTOPLAY")})})]})}),Xr=({onClick:e,label:n,className:t})=>v.jsxs("button",{className:`sp-action ${t}`,type:"button",onClick:()=>{I(),e()},children:[v.jsx("span",{className:"sp-action__icon","aria-hidden":"true"}),v.jsx("span",{className:"sp-action__label",children:n})]}),lt=({onToggle:e,label:n,checked:t=!1})=>v.jsxs("div",{className:"sp-row",children:[v.jsx("div",{className:"sp-switch",children:v.jsx(It,{checked:t,onChange:()=>{e(!t)}})}),v.jsx("div",{className:"sp-label",children:n})]}),Ua=$(()=>{const{introSkip:e,spaceToSkip:n,musicOn:t,soundsOn:r,spaceToSpin:o,setSpaceToSpin:s,setIntroSkip:u,setSpaceToSkip:c,setSoundsOn:f,setMusicOn:p}=re,{open:m}=j;return v.jsxs("div",{className:"sp-wrap",children:[v.jsxs("div",{className:"sp-actions",children:[v.jsx(Xr,{onClick:m.bind(j,H.history),className:"sp-action--history",label:D("HISTORY")}),v.jsx(Xr,{onClick:j.open.bind(j,H.payTable),className:"sp-action--paytable",label:D("PAY_TABlE")})]}),v.jsx("h3",{className:"sp-section-title",children:D("AUDIO")}),v.jsxs("div",{className:"sp-rows",children:[v.jsx(lt,{onToggle:p.bind(re),checked:t,label:D("MUSIC")}),v.jsx(lt,{onToggle:f.bind(re),checked:r,label:D("SOUNDS")})]}),v.jsx("h3",{className:"sp-section-title",children:D("GAME_LAUNCH")}),v.jsx("div",{className:"sp-rows",children:v.jsx(lt,{onToggle:u.bind(re),checked:e,label:D("SKIP_INTRO")})}),v.jsx("h3",{className:"sp-section-title only-landscape",children:D("KEYBOARD")}),v.jsxs("div",{className:"sp-rows only-landscape",children:[v.jsx(lt,{onToggle:s.bind(re),checked:o,label:D("SPACE_BAR_TO_SPIN")}),v.jsx(lt,{onToggle:c.bind(re),checked:n,label:D("SPACE_BAR_TO_SKIP")})]})]})}),$a=({date:e,currencyCode:n,betAmount:t,winAmount:r})=>{const[o,s]=w.useState(!1);return v.jsxs("div",{className:`history-item ${o?"active":""}`,role:"row",children:[v.jsx("span",{className:"date-section",children:e}),v.jsxs("span",{className:"bet-section",children:[t,v.jsx("span",{className:"currency",children:n})]}),v.jsxs("span",{className:"win-section",children:[r,v.jsxs("span",{className:"currency",children:[" ",n]})]})]})},Ha=$(()=>{const{data:e}=Gr;return v.jsxs("div",{className:"history-wrap",role:"list","aria-label":"History list",children:[v.jsxs("div",{className:"history-item history-item--head",role:"row",children:[v.jsx("span",{className:"date-section",children:D("DATE")}),v.jsx("span",{className:"bet-section",children:D("BET")}),v.jsx("span",{className:"win-section",children:D("WIN")})]}),e.map((n,t)=>v.jsx($a,{date:n.date,betAmount:n.betAmount,winAmount:n.winAmount,currencyCode:n.currencyCode,id:"aa"},t))]})}),Ga=$(({item:e,type:n,onBuy:t,disabled:r})=>{const{activeAnteBet:o,setActiveAnteBet:s}=pe,u=e.title.split(`
35
- `),[c,f]=w.useState(!1),[p,m]=w.useState(84),[i,a]=w.useState(0),[l,d]=w.useState(!1),h=w.useRef(null);w.useLayoutEffect(()=>{const y=h.current;if(!y)return;const E=()=>{const B=getComputedStyle(y),L=B.getPropertyValue("--max-description-height").trim();let ie=84;if(L){const C=L.match(/^(-?\d+(\.\d+)?)(px)?$/);C&&(ie=Number(C[1]))}else{const C=B.getPropertyValue("max-height").trim();C&&C.endsWith("px")&&(ie=Number(C.replace("px","")))}const We=y.scrollHeight;m(ie),a(We),d(We>ie+1)};E();const O=new ResizeObserver(E);return O.observe(y),window.addEventListener("resize",E),()=>{O.disconnect(),window.removeEventListener("resize",E)}},[e.description]);const b=c?Math.max(i,p):p,_=`${e.availableBets[ne.betIndex]} ${ne.displayCurrency}`;return v.jsxs("div",{className:"sf-card",role:"group","aria-label":u.join(" "),children:[v.jsxs("div",{className:"sf-card__title",children:[e.title,e.description&&v.jsx("div",{ref:h,className:`sf-card__description ${c?"open":""} ${l?"expandable":""}`,style:{maxHeight:`${b}px`},onClick:()=>{l&&(I(),f(y=>!y))},children:v.jsx("div",{children:e.description})})]}),v.jsx("div",{className:"sf-card__content",children:v.jsx("div",{className:`sf-card__image-wrap ${c?"hidden":""}`,children:e.imagePath?v.jsx("img",{src:e.imagePath,alt:u[0]}):v.jsx("div",{className:"sf-card__image-placeholder"})})}),v.jsx("div",{className:`sf-card__bottom ${n}`,children:n==="ante"?v.jsxs("div",{className:"sf-card__ante-cluster",children:[v.jsx("div",{className:"sf-card__price-wrap",children:v.jsx("span",{className:"sf-card__price",children:_})}),v.jsx("div",{className:`sf-card__toggle ${r?"disabled":""}`,children:v.jsx(It,{checked:o===e,onChange:y=>s.call(pe,y?e.id:null)})})]}):v.jsx("button",{className:`sf-buy-btn ${r?"disabled":""}`,type:"button","aria-label":`${_} buy`,onClick:()=>{I(),t?.(e.id)},children:v.jsxs("span",{className:"sf-buy-btn__label",children:[_," BUY"]})})})]})}),yn=({features:e,type:n,title:t,onBuy:r,disabled:o})=>v.jsxs(v.Fragment,{children:[v.jsx("h2",{className:"sf-section-title",children:t}),v.jsx("div",{className:"sf-grid",children:e.map((s,u)=>v.jsx(Ga,{item:s,type:n,onBuy:r,disabled:o},u))})]}),Ra=$(()=>{const{anteBets:e,inReelFeatures:n,bonusFeatures:t,buyHandler:r,activeAnteBet:o}=pe;return v.jsxs("div",{className:"sf-wrap",children:[e.length?v.jsx(yn,{features:e,type:Pt.ante,title:D("ANTE_BETS")},0):null,n.length?v.jsx(yn,{features:n,type:Pt.buy,title:"Reel Features",onBuy:r.bind(pe)},1):null,t.length?v.jsx(yn,{features:t,type:Pt.buy,title:D("BONUS"),onBuy:r.bind(pe),disabled:!!o},2):null]})}),Ka=$(({payTableComponent:e})=>{const{activePopup:n}=j;if(!n)return null;const t=w.useMemo(()=>{switch(n){case H.bet:return ka;case H.autoplay:return Fa;case H.settings:return Ua;case H.history:return Ha;case H.buyBonus:return Ra;case H.payTable:return e;default:return null}},[n]);return t?v.jsx(t,{}):null}),qa=({configs:e,text:n,onClick:t})=>v.jsx("button",{type:"button",className:"additional-btn",style:{"--btn-bg":e?.background??"transparent","--btn-color":e?.color??"inherit"},onClick:typeof t=="function"?()=>{I(),t()}:void 0,children:n}),Wa=$(()=>{const{activeDialog:e}=st;return e?v.jsxs("div",{className:"dialogs-wrap","aria-live":"polite",children:[v.jsx("span",{className:"title",children:e?.title}),e?.imagePath&&v.jsx("img",{className:"dialog-image",src:e.imagePath,alt:e.title??"dialog image"}),v.jsx("span",{className:"message",children:e?.message}),e.toggle&&v.jsx(It,{checked:e.toggle.value,onChange:()=>e.toggle?.onClick()}),v.jsx("div",{className:"additional-btns",children:e?.buttons?.map((n,t)=>v.jsx(qa,{configs:n.configs,text:n.text,onClick:n.onClick},t))})]}):null}),Xa=$(({payTableComponent:e})=>{const n=j.activePopup,t=st.activeDialog;if(!n&&!t)return null;const r=s=>{s.target===s.currentTarget&&(I(),j.close(),st.close())},o=()=>{I(),j.close(),st.close()};return v.jsxs("div",{className:`overlay ${t?"dialog":""}`,onClick:r,role:"presentation",children:[!t&&v.jsxs("header",{className:"overlay-header",children:[typeof n=="string"&&v.jsx("span",{className:"popup-title",children:n.toUpperCase()}),v.jsx("div",{className:"overlay-close","aria-label":"Close",onClick:o,children:v.jsx("img",{src:Pa,alt:"Close"})})]}),v.jsxs("div",{className:"overlay-body",children:[v.jsxs("div",{className:"overlay-content",role:"dialog","aria-modal":"true",children:[t&&v.jsx(Wa,{}),!t&&n&&v.jsx(Ka,{payTableComponent:e})]}),!t&&n===H.buyBonus&&v.jsx(Ia,{})]})]})});function Za({payTableComponent:e}){return v.jsxs("div",{className:"app",children:[v.jsxs("div",{className:"game-container",children:[v.jsx(Ba,{}),v.jsx(La,{}),v.jsx(xa,{})]}),v.jsx(Xa,{payTableComponent:e})]})}const Ya=()=>null;function za(e,n=Ya,t){if(!e){console.error("element not found");return}va(t),Jr.createRoot(e).render(v.jsx(w.StrictMode,{children:v.jsx(Za,{payTableComponent:n})}))}x.BASE_SOUND_NAMES=hn,x.DEFAULT_BG_MUSIC_KEY=mn,x.LOCAL_STORAGE_ITEM_NAMES=F,x.PopupNames=H,x.autoplayStore=we,x.betStore=ne,x.bonusFeatureTypes=Pt,x.bonusStore=pe,x.createUi=za,x.defaultDialogButtonsConfigs=vn,x.defaultDialogs=Ur,x.defaultDialogsNames=Fr,x.dialogStore=st,x.historyStore=Gr,x.popupStore=j,x.resultStore=Rr,x.settingsStore=re,x.soundService=Ee,x.uiStore=ut,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
34
+ `,type:"button",onClick:t.bind(ut),onMouseUp:u,onTouchEnd:u,onKeyUp:c=>{(c.key===" "||c.key==="Enter")&&u(c)},children:v.jsx("span",{className:`spin-btn_label ${o&&r||s?"":"hidden"}`,children:s||r})})}),Kr=({onClick:e,disabled:n=!1,className:t,isActive:r})=>{const o=s=>{s.currentTarget.blur()};return v.jsx("button",{className:`${t} ${n?"disabled":""} ${r?"active":""}`,type:"button",onClick:e?()=>{n||(I(),e())}:void 0,onMouseUp:o,onTouchEnd:o,onKeyUp:s=>{(s.key===" "||s.key==="Enter")&&o(s)}})},xa=$(()=>{const{balance:e,betAmount:n,displayCurrency:t,setNextBetAmount:r,setPrevBetAmount:o}=ne,{lastWinAmount:s}=Rr,{setIsTurbo:u,isTurbo:c}=re,{open:f}=j,{activeAnteBet:p,activeBonusFeature:m,activeInReelFeature:i,setActiveAnteBet:a}=pe,{isUIVisible:l,isAutoPlayDisabled:d,isBuyBonusDisabled:h,isBetAmountLabelsDisabled:b}=ut,_=w.useMemo(()=>p?.imagePath||i?.imagePath||m?.imagePath,[p,m,i]),y=w.useCallback(()=>{Ee.playSound(hn.BuyBonusClick),p?a.call(pe,null):f.call(j,H.buyBonus)},[p,a]);return v.jsx("div",{className:`ui-footer ${l?"":"hidden"}`,children:v.jsxs("div",{className:"top-row",children:[v.jsxs("div",{className:"left-group",children:[v.jsx(ha,{imagePath:_,disabled:h,onClick:y,isAnteBet:!!p,isBonus:!!m}),v.jsxs("div",{className:"balance-info",children:[v.jsx(jr,{label:D("LAST_WIN"),value:`${s} ${t}`}),v.jsx(jr,{label:D("BALANCE"),value:`${e} ${t}`})]})]}),v.jsxs("div",{className:"bet-control",children:[v.jsx(ga,{highlighted:!!p,value:p?p.availableBets[ne.betIndex]:n,currency:t,onClick:()=>{f.call(j,H.bet)},disabled:b}),v.jsxs("div",{className:"bet-box",children:[v.jsx(Hr,{onClick:()=>{o.call(ne)},className:"bet-btn minus",disabled:b}),v.jsx(Da,{onClick:()=>console.log("Spin"),state:"active"}),v.jsx(Hr,{onClick:()=>{r.call(ne)},className:"bet-btn plus",disabled:b})]}),v.jsx(Kr,{className:"quick-spin",onClick:()=>{u.call(re,!c)},isActive:c}),v.jsx(Kr,{className:"auto-spin",onClick:()=>{f.call(j,H.autoplay)},isActive:!1,disabled:d})]})]})})}),Ba=({onMount:e,onUnmount:n,className:t})=>{const r=w.useRef(null);return w.useEffect(()=>(r.current&&e&&e(r.current),()=>{n?.()}),[e,n]),v.jsx("div",{ref:r,className:t,style:{width:"100%",height:"100%",position:"relative"}})};function Va(e){const n=w.useRef(null);return w.useEffect(()=>{if(typeof e!="function")return;const t=r=>{const o=n.current;if(!o)return;const s=r.target;s&&(o.contains(s)||e(r))};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e]),n}const Ma=$(()=>{const{volume:e,setVolume:n}=re,[t,r]=w.useState(!1),o=Va(()=>r(!1)),s=w.useCallback(()=>{I(),re.toggleMute(),t||r(!0)},[t,r]);return v.jsxs("div",{className:"sound-controller",children:[t&&v.jsxs("div",{className:"volume-control",ref:o,children:[v.jsx("input",{type:"range",min:0,max:100,value:e,onChange:u=>n.call(re,Number(u.target.value)),className:"slider","aria-label":"Volume"}),v.jsx("span",{className:"volume-value",children:e})]}),v.jsx("button",{className:`btn-sound ${e===0?"inactive":""}`,"aria-label":"Toggle Sound",onClick:s})]})}),La=$(()=>{const{open:e}=j,{isUIVisible:n}=ut;return n?v.jsxs("div",{className:"settings-section",children:[v.jsx(Ma,{}),v.jsx("button",{className:"btn-settings","aria-label":"Open Settings",onClick:()=>{I(),e.call(j,H.settings)}})]}):null}),Pa="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='34'%20height='45'%20viewBox='0%200%2034%2045'%20fill='none'%3e%3cpath%20d='M7.69062%2031.7333H7.06121L9.3091%2028.0889L11.9167%2024C12.636%2022.9333%2012.666%2021.8074%2012.0066%2020.6222C11.527%2019.6741%2011.0475%2018.8148%2010.5679%2018.0444L11.1973%2017.6889C11.1973%2017.6296%2011.1674%2017.5704%2011.1074%2017.5111L10.3881%2017.6889C10.2083%2017.6296%2010.0284%2017.4222%209.8486%2017.0667C9.72871%2016.7111%209.63879%2016.5037%209.57885%2016.4444C9.15924%2016.1481%208.85952%2015.7037%208.67969%2015.1111L9.12927%2014.5778C8.94944%2014.4%208.88949%2014.2815%208.94944%2014.2222C9.06933%2013.4518%209.33907%2012.9185%209.75868%2012.6222C10.0584%2012.563%2010.0284%2012.3556%209.66877%2012L8.40994%2014.5778C7.93039%2013.9852%207.66065%2013.6%207.6007%2013.4222C7.6007%2013.1852%207.8105%2012.7704%208.23011%2012.1778C8.40994%2012%208.5598%2011.7926%208.67969%2011.5556C8.85952%2011.1407%208.94944%2010.6963%208.94944%2010.2222L8.40994%2011.3778C8.11022%2011.8519%207.69062%2011.9704%207.15112%2011.7333C7.15112%2011.4963%207.18109%2011.3481%207.24104%2011.2889C7.36093%2011.1704%207.51079%2011.0815%207.69062%2011.0222C7.87045%2010.9037%208.02031%2010.7852%208.1402%2010.6667L7.78053%2010.4C7.78053%2010.3407%207.81051%2010.2815%207.87045%2010.2222C7.87045%209.98518%207.90042%209.83704%207.96036%209.77778C7.54076%2010.1926%207.12115%2010.2222%206.70154%209.86667C6.82143%209.51111%206.88137%209.3037%206.88137%209.24444L6.97129%209.06666L7.15112%208.8C6.97129%208.85926%206.73151%208.88889%206.43179%208.88889C6.43179%208.53333%206.46177%208.32592%206.52171%208.26666C6.70154%207.79259%206.70154%207.34815%206.52171%206.93333L6.07213%207.28889C5.77241%207.46667%205.23292%207.46667%204.45365%207.28889C4.15393%206.6963%204.30379%206.13333%204.90322%205.6C4.84328%205.6%204.66345%205.62963%204.36373%205.68889C4.12395%205.68889%203.94412%205.68889%203.82423%205.68889C3.82423%206.22222%203.79426%206.60741%203.73432%206.84444C3.37465%206.25185%203.19482%205.86666%203.19482%205.68889C3.13488%205.62963%203.07494%205.6%203.01499%205.6L2.74524%205.33333L1.21667%202.66666L1.03684%202.13333C0.677179%201.00741%201.09679%200.355554%202.29566%200.177775H3.73432C3.97409%200.177775%204.42367%200.207404%205.08306%200.266663C5.80238%200.266663%206.25196%200.266663%206.43179%200.266663C7.33095%200.148146%208.05028%200.503704%208.58978%201.33333C9.18921%202.16296%2010.2982%203.94074%2011.9167%206.66667C12.0366%206.78518%2012.0965%207.05185%2012.0965%207.46666C12.8158%207.58518%2013.2354%208.14815%2013.3553%209.15555L14.0746%2010.0444L15.6032%2012.8C15.6032%2012.9185%2015.6332%2013.0074%2015.6931%2013.0667L16.5923%2014.4L17.7612%2014.0444L18.3906%2013.6C18.8102%2013.1852%2019.2298%2012.6519%2019.6494%2012L21.5377%209.06666L23.336%206.4C24.2951%204.97778%2025.0144%203.82222%2025.494%202.93333L26.0335%201.86667C26.573%201.80741%2026.8727%201.74815%2026.9326%201.68889C27.0525%201.57037%2027.0525%201.24444%2026.9326%200.71111C27.5321%200.355554%2028.5211%200.177775%2029.8998%200.177775C31.4584%200.0592581%2032.2676%200%2032.3276%200L32.5074%200.62222L32.8671%200.266663L32.957%200.35555C33.0169%200.414812%2033.0769%200.444444%2033.1368%200.444444C33.8561%200.799999%2034.0959%201.27407%2033.8561%201.86667C33.7362%202.28148%2033.3766%203.05185%2032.7771%204.17777L32.3276%204.35555L31.878%205.51111C31.0987%206.45926%2030.0497%208%2028.7309%2010.1333C27.5321%2012.0296%2026.6928%2013.3333%2026.2133%2014.0444C25.9136%2014.4%2024.6547%2016.4148%2022.4368%2020.0889L21.8973%2021.0667C21.5976%2021.7778%2021.6575%2022.4296%2022.0772%2023.0222L23.6956%2025.8667C23.6956%2025.9852%2023.7556%2026.1037%2023.8755%2026.2222C23.9954%2026.3407%2023.9654%2026.4889%2023.7856%2026.6667L24.3251%2026.9333C24.5648%2027.4074%2025.0744%2028.237%2025.8536%2029.4222C26.6329%2030.6074%2027.0525%2031.2593%2027.1124%2031.3778C27.1124%2031.4963%2027.1424%2031.5852%2027.2024%2031.6444C26.543%2031.9407%2026.4231%2032.2963%2026.8427%2032.7111C26.8427%2032.7704%2026.8127%2032.8296%2026.7528%2032.8889C26.7528%2032.9481%2026.7528%2033.0074%2026.7528%2033.0667C26.7528%2033.2444%2026.8427%2033.4222%2027.0225%2033.6C27.2024%2033.4222%2027.4122%2033.037%2027.6519%2032.4444C28.1914%2033.037%2028.4012%2033.5704%2028.2814%2034.0444C28.9407%2034.4%2029.2704%2034.9037%2029.2704%2035.5556C29.2704%2035.6741%2029.3004%2035.7333%2029.3603%2035.7333C29.6001%2035.9704%2029.9898%2036.5037%2030.5292%2037.3333L31.6082%2039.0222L31.9679%2039.5556C32.1477%2039.9704%2032.0878%2040.237%2031.7881%2040.3556H31.9679L32.5074%2040.1778L33.6763%2042.4C34.3956%2044%2033.9161%2044.8%2032.2376%2044.8C32.1777%2044.8%2032.1477%2044.7704%2032.1477%2044.7111C32.1477%2044.3556%2032.0878%2044.1778%2031.9679%2044.1778C31.7881%2044.1778%2031.6682%2044.2074%2031.6082%2044.2667C31.6082%2044.3259%2031.6082%2044.4444%2031.6082%2044.6222C31.6682%2044.7407%2031.6982%2044.8296%2031.6982%2044.8889H28.3713C27.5321%2044.8889%2026.7828%2044.4741%2026.1234%2043.6444L24.9545%2041.7778L21.8973%2036.8889L20.9082%2035.0222L20.0091%2033.5111L18.4805%2031.2C18.4805%2031.1407%2018.3307%2030.9037%2018.0309%2030.4889C17.6113%2029.9556%2017.1618%2029.8074%2016.6822%2030.0444C16.2626%2030.2222%2015.9029%2030.4593%2015.6032%2030.7556C15.3634%2031.0519%2015.1536%2031.3778%2014.9738%2031.7333L11.1973%2037.6L9.3091%2040.4444L9.12927%2040.7111V40.3556C9.06933%2040.1185%209.03935%2039.9407%209.03935%2039.8222C8.5598%2040.1185%208.40994%2040.4444%208.58978%2040.8C8.58978%2040.8593%208.67969%2040.8889%208.85952%2040.8889L7.51079%2043.2L6.70154%2042.7556C6.70154%2042.8148%206.70154%2043.0222%206.70154%2043.3778C6.76149%2043.7333%206.79146%2043.9704%206.79146%2044.0889C6.43179%2044.6815%205.80238%2044.9778%204.90322%2044.9778C4.06401%2045.037%202.92508%2044.9778%201.48642%2044.8C0.107712%2044.6222%20-0.311896%2043.8519%200.2276%2042.4889L0.407431%2042.1333L3.19482%2037.6L3.91415%2038.4889C4.03404%2037.9556%203.91415%2037.5111%203.55449%2037.1556L4.45365%2035.9111L5.17297%2034.8444L6.16205%2033.9556C6.1021%2033.5407%206.40182%2032.7704%207.06121%2031.6444V31.8222L7.42087%2032.2667L7.51079%2032.0889C7.51079%2032.0296%207.54076%2031.9407%207.6007%2031.8222V31.7333C7.90042%2031.7926%208.05028%2031.763%208.05028%2031.6444C8.11022%2031.4667%208.11022%2031.2889%208.05028%2031.1111C7.8105%2031.1111%207.69062%2031.3185%207.69062%2031.7333ZM9.03935%2030.5778C9.45896%2030.637%209.69874%2030.637%209.75868%2030.5778C9.81863%2030.5185%209.78865%2030.2519%209.66877%2029.7778H8.85952C8.97941%2030.2519%209.03935%2030.5481%209.03935%2030.6667C8.79958%2030.6667%208.61975%2030.7259%208.49986%2030.8444C8.49986%2030.9037%208.52983%2030.9926%208.58978%2031.1111C8.64972%2031.1704%208.70966%2031.1704%208.76961%2031.1111C8.8895%2031.1111%208.97941%2030.9333%209.03935%2030.5778ZM21.2679%2012.8L20.9982%2012.3556L20.099%2012.7111C20.2189%2012.9481%2020.3987%2013.2148%2020.6385%2013.5111C21.0581%2013.4518%2021.2679%2013.2148%2021.2679%2012.8ZM30.6192%2040.8C30.0797%2041.0963%2030.0197%2041.5407%2030.4393%2042.1333C30.739%2041.4815%2030.799%2041.037%2030.6192%2040.8ZM22.5267%2012.1778C22.9463%2011.7037%2023.0363%2011.2593%2022.7965%2010.8444C22.3169%2011.2593%2022.227%2011.7037%2022.5267%2012.1778ZM3.46457%205.06666L4.63348%204.44444L3.91415%204.17777L3.37466%204.97778C3.37466%205.03704%203.40463%205.06666%203.46457%205.06666ZM22.3469%2026.4L22.1671%2026.1333C21.9872%2026.4889%2021.8973%2026.7259%2021.8973%2026.8444L22.0772%2027.0222L22.257%2027.1111C22.257%2027.0519%2022.3169%2026.963%2022.4368%2026.8444C22.6167%2026.6667%2022.5867%2026.5185%2022.3469%2026.4ZM24.1452%2012.1778V11.5556C24.1452%2011.437%2024.0553%2011.3778%2023.8755%2011.3778L23.6057%2011.4667C23.6057%2011.9407%2023.7856%2012.1778%2024.1452%2012.1778ZM6.25196%2035.2889C6.25196%2035.5852%206.28194%2035.8222%206.34188%2036C6.52171%2035.7037%206.49174%2035.4667%206.25196%2035.2889ZM10.0284%208.88889L9.39902%209.77778C9.81863%209.6%2010.0284%209.3037%2010.0284%208.88889ZM28.1015%2039.5556C28.3413%2039.2%2028.3113%2038.8741%2028.0116%2038.5778C27.9517%2038.6963%2027.9217%2038.8741%2027.9217%2039.1111C27.9217%2039.1704%2027.9517%2039.2296%2028.0116%2039.2889C28.0116%2039.4074%2028.0416%2039.4963%2028.1015%2039.5556ZM29.8099%2037.0667C29.75%2037.4815%2029.8699%2037.7185%2030.1696%2037.7778C30.2895%2037.4222%2030.1696%2037.1852%2029.8099%2037.0667ZM3.01499%2042.4889C3.07494%2042.4296%203.16485%2042.4%203.28474%2042.4L3.19482%2042.2222C3.19482%2042.0444%203.19482%2041.8963%203.19482%2041.7778L3.10491%2041.8667H2.92508L3.01499%2042.0444C3.01499%2042.2222%203.01499%2042.3704%203.01499%2042.4889ZM11.2873%208.17778H11.4671C11.587%208.05926%2011.6469%207.91111%2011.6469%207.73333L11.3772%207.64444C11.3772%207.7037%2011.3472%207.79259%2011.2873%207.91111C11.2873%208.02963%2011.2873%208.11852%2011.2873%208.17778ZM29.5402%2038.8444L29.72%2038.4889V38.1333C29.6001%2038.1333%2029.5102%2038.1037%2029.4503%2038.0444C29.3304%2038.3407%2029.3603%2038.6074%2029.5402%2038.8444ZM28.641%206.31111H28.4612C28.4012%206.37037%2028.3713%206.51852%2028.3713%206.75555C28.4312%206.81481%2028.4912%206.84444%2028.5511%206.84444V6.57778L28.641%206.31111ZM28.0116%2037.1556C28.1914%2036.9185%2028.1615%2036.7111%2027.9217%2036.5333C27.9217%2036.6519%2027.9517%2036.7704%2028.0116%2036.8889V37.1556ZM24.7746%2032.7111C24.7147%2032.6518%2024.6248%2032.6222%2024.5049%2032.6222C24.5049%2032.8593%2024.4749%2033.0074%2024.415%2033.0667H24.6847C24.6847%2033.0074%2024.6847%2032.9481%2024.6847%2032.8889C24.7447%2032.8296%2024.7746%2032.7704%2024.7746%2032.7111ZM25.404%2033.9556H25.5839C25.5839%2033.8963%2025.5539%2033.8074%2025.494%2033.6889C25.494%2033.5704%2025.494%2033.5111%2025.494%2033.5111H25.404C25.3441%2033.5704%2025.2842%2033.6%2025.2242%2033.6C25.3441%2033.7185%2025.404%2033.837%2025.404%2033.9556ZM9.66877%2030.8444H9.48893V31.2889H9.57885C9.63879%2031.2296%209.66877%2031.0815%209.66877%2030.8444ZM6.52171%2041.8667L6.43179%2042.1333C6.43179%2042.1926%206.49174%2042.2815%206.61163%2042.4L6.79146%2042.2222C6.79146%2042.163%206.70154%2042.0444%206.52171%2041.8667ZM5.3528%2039.1111H5.53264C5.53264%2038.8148%205.44272%2038.637%205.26289%2038.5778C5.32283%2038.6963%205.3528%2038.8741%205.3528%2039.1111ZM29.9897%206.48889H30.2595V5.95555H30.0797L29.9897%206.22222V6.48889ZM27.2024%209.6H27.3822C27.3822%209.36296%2027.3522%209.21481%2027.2923%209.15555H27.1124C27.1124%209.39259%2027.1424%209.54074%2027.2024%209.6ZM11.3772%2027.6444V28.3556C11.557%2028.1185%2011.557%2027.8815%2011.3772%2027.6444ZM4.54356%208.08889L5.53264%207.46666L6.07213%207.28889C6.13207%207.22963%206.25196%207.2%206.43179%207.2C6.49174%207.67407%206.34188%208%205.98222%208.17778C5.62255%208.35555%205.143%208.32592%204.54356%208.08889ZM6.43179%208.88889C6.73151%208.88889%206.97129%208.85926%207.15112%208.8L6.97129%209.06666L6.88137%209.24444L6.52171%209.6C6.22199%209.77778%205.98222%209.68889%205.80238%209.33333L6.07213%209.06666H5.98222C6.04216%209.06666%206.1021%209.03703%206.16205%208.97778C6.22199%208.97778%206.31191%208.94815%206.43179%208.88889ZM6.34188%2011.0222V10.2222L7.24104%2010.4C7.06121%2010.8741%206.76149%2011.0815%206.34188%2011.0222ZM5.98222%209.06666H6.07213C5.59258%209.06666%205.29286%208.97778%205.17297%208.8C5.29286%208.8%205.44272%208.74074%205.62255%208.62222C5.80238%208.5037%205.92227%208.41481%205.98222%208.35555V9.06666Z'%20fill='white'/%3e%3c/svg%3e",Ia=$(()=>{const{betAmount:e,displayCurrency:n,setNextBetAmount:t,setPrevBetAmount:r}=ne;return v.jsxs("div",{className:"overlay-bet-controller",children:[v.jsx("div",{className:"decrease-bet",onClick:()=>{I(),r.call(ne)}}),v.jsxs("div",{className:"bet-amount",children:[e," ",n]}),v.jsx("div",{className:"increase-bet",onClick:()=>{I(),t.call(ne)}})]})}),qr=({value:e,onClick:n,active:t})=>v.jsx("div",{className:`rectLabel ${t?"current-active":""}`,onClick:()=>{I(),n(e)},children:v.jsx("span",{children:e})}),ka=$(()=>{const{betAmountRange:e,setBet:n,betAmount:t}=ne,{activeAnteBet:r}=pe,{close:o}=j;return v.jsx("div",{className:"bet-popup-container",children:e.map((s,u)=>{const c=t===s;return v.jsx(qr,{value:r?r.availableBets[u]:s,active:c,onClick:()=>{n.call(ne,s),o.call(j)}},u)})})}),It=({checked:e,onChange:n})=>v.jsx("button",{className:`ap-toggle ${e?"ap-toggle--on":"ap-toggle--off"}`,"aria-pressed":e,onClick:()=>{I(),n(!e)},type:"button",children:v.jsx("span",{className:"ap-toggle__knob"})}),gn=({active:e,onClick:n,children:t})=>v.jsx("button",{className:`ap-limit ${e?"ap-limit--active":""}`,onClick:n?()=>{I(),n()}:void 0,type:"button",children:t}),Wr=({active:e,onClick:n,children:t})=>v.jsx("button",{className:`ap-tab ${e?"ap-tab--active":""}`,onClick:n?()=>{I(),n()}:void 0,type:"button",children:t}),ja=({value:e,placeholder:n,inputType:t="text",className:r="",autoFocus:o=!0,onSubmit:s,onCancel:u})=>{const[c,f]=w.useState(""),p=w.useRef(null),m=w.useRef(!1);w.useEffect(()=>{f(e??""),m.current=!1},[e]),w.useEffect(()=>{o&&setTimeout(()=>{p.current?.focus(),p.current?.select()},0)},[o]);const i=()=>{m.current||(m.current=!0,s(c.trim()))},a=()=>{i()},l=d=>{d.key==="Enter"?(d.preventDefault(),i(),p.current?.blur()):d.key==="Escape"&&(f(e??""),u?.(),p.current?.blur())};return v.jsx("input",{ref:p,className:`ap-limit ${r}`,type:"number",value:c,placeholder:n,onChange:d=>f(d.target.value),onBlur:a,onKeyDown:l,inputMode:t==="number"?"numeric":void 0,"aria-label":"custom limit input"})},Fa=$(()=>{const{specialFeatureSwitcherOn:e,setSpecialFeatureSwitcher:n,countRange:t,count:r,setCount:o,lossLimit:s,winLimit:u,setLossLimit:c,limitsRange:f,setWinLimit:p,setIsStarted:m}=we,[i,a]=w.useState(0),[l,d]=w.useState(!1),[h,b]=w.useState(""),_=w.useMemo(()=>i?u:s,[i,u,s]),y=w.useMemo(()=>i?p.bind(we):c.bind(we),[i,p,c]);w.useEffect(()=>{const O=_&&!f.includes(_);b(O?_:0)},[_,u]);const E=!!r&&r>0;return v.jsxs("div",{className:"autoplay-wrap",children:[v.jsx("h3",{className:"ap-title",children:D("NUMBER_OF_SPINS")}),v.jsx("div",{className:"autoplay-count",children:t.map((O,B)=>{const L=r===O;return v.jsx(qr,{value:O,active:L,onClick:o.bind(we,O)},B)})}),v.jsxs("div",{className:"ap-switch-row",children:[v.jsx("div",{className:"ap-switch-label",children:D("STOP_ON_SPECIAL")}),v.jsx("div",{className:"ap-switch-control",children:v.jsx(It,{checked:e,onChange:O=>n.call(we,O)})})]}),v.jsxs("div",{className:"ap-tabs",children:[v.jsx(Wr,{active:!i,onClick:()=>a(0),children:D("LOSS_LIMIT")}),v.jsx(Wr,{active:!!i,onClick:()=>a(1),children:D("WIN_LIMIT")})]}),v.jsx("div",{className:"ap-limits-panel",children:v.jsx("div",{className:"ap-limits-inner",children:v.jsxs("div",{className:"ap-limit-grid",children:[f.map((O,B)=>v.jsx(gn,{active:_===O,onClick:()=>y(O),children:`${O}x ${D("BET")}`},B)),v.jsx(gn,{active:!_,onClick:()=>y(null),children:D("NO_LIMIT")}),l?v.jsx(ja,{value:""+h,inputType:"number",onSubmit:O=>{const B=O.trim();if(B===""){d(!1);return}const L=Number(B);b(L??0),y(L),d(!1)},onCancel:()=>{d(!1)}}):v.jsx(gn,{onClick:()=>{d(!0)},active:!!_&&_===Number(h),children:h?`${h}x ${D("BET")}`:D("CUSTOM")})]})})}),v.jsx("div",{className:"ap-start-row",children:v.jsx("button",{className:`ap-start-btn ${E?"":"ap-start-btn--disabled"}`,onClick:()=>{I(),m.call(we,!0)},type:"button",disabled:!E,children:D("START_AUTOPLAY")})})]})}),Xr=({onClick:e,label:n,className:t})=>v.jsxs("button",{className:`sp-action ${t}`,type:"button",onClick:()=>{I(),e()},children:[v.jsx("span",{className:"sp-action__icon","aria-hidden":"true"}),v.jsx("span",{className:"sp-action__label",children:n})]}),lt=({onToggle:e,label:n,checked:t=!1})=>v.jsxs("div",{className:"sp-row",children:[v.jsx("div",{className:"sp-switch",children:v.jsx(It,{checked:t,onChange:()=>{e(!t)}})}),v.jsx("div",{className:"sp-label",children:n})]}),Ua=$(()=>{const{introSkip:e,spaceToSkip:n,musicOn:t,soundsOn:r,spaceToSpin:o,setSpaceToSpin:s,setIntroSkip:u,setSpaceToSkip:c,setSoundsOn:f,setMusicOn:p}=re,{open:m}=j;return v.jsxs("div",{className:"sp-wrap",children:[v.jsxs("div",{className:"sp-actions",children:[v.jsx(Xr,{onClick:m.bind(j,H.history),className:"sp-action--history",label:D("HISTORY")}),v.jsx(Xr,{onClick:j.open.bind(j,H.payTable),className:"sp-action--paytable",label:D("PAY_TABLE")})]}),v.jsx("h3",{className:"sp-section-title",children:D("AUDIO")}),v.jsxs("div",{className:"sp-rows",children:[v.jsx(lt,{onToggle:p.bind(re),checked:t,label:D("MUSIC")}),v.jsx(lt,{onToggle:f.bind(re),checked:r,label:D("SOUNDS")})]}),v.jsx("h3",{className:"sp-section-title",children:D("GAME_LAUNCH")}),v.jsx("div",{className:"sp-rows",children:v.jsx(lt,{onToggle:u.bind(re),checked:e,label:D("SKIP_INTRO")})}),v.jsx("h3",{className:"sp-section-title only-landscape",children:D("KEYBOARD")}),v.jsxs("div",{className:"sp-rows only-landscape",children:[v.jsx(lt,{onToggle:s.bind(re),checked:o,label:D("SPACE_BAR_TO_SPIN")}),v.jsx(lt,{onToggle:c.bind(re),checked:n,label:D("SPACE_BAR_TO_SKIP")})]})]})}),$a=({date:e,currencyCode:n,betAmount:t,winAmount:r})=>{const[o,s]=w.useState(!1);return v.jsxs("div",{className:`history-item ${o?"active":""}`,role:"row",children:[v.jsx("span",{className:"date-section",children:e}),v.jsxs("span",{className:"bet-section",children:[t,v.jsx("span",{className:"currency",children:n})]}),v.jsxs("span",{className:"win-section",children:[r,v.jsxs("span",{className:"currency",children:[" ",n]})]})]})},Ha=$(()=>{const{data:e}=Gr;return v.jsxs("div",{className:"history-wrap",role:"list","aria-label":"History list",children:[v.jsxs("div",{className:"history-item history-item--head",role:"row",children:[v.jsx("span",{className:"date-section",children:D("DATE")}),v.jsx("span",{className:"bet-section",children:D("BET")}),v.jsx("span",{className:"win-section",children:D("WIN")})]}),e.map((n,t)=>v.jsx($a,{date:n.date,betAmount:n.betAmount,winAmount:n.winAmount,currencyCode:n.currencyCode,id:"aa"},t))]})}),Ga=$(({item:e,type:n,onBuy:t,disabled:r})=>{const{activeAnteBet:o,setActiveAnteBet:s}=pe,u=e.title.split(`
35
+ `),[c,f]=w.useState(!1),[p,m]=w.useState(84),[i,a]=w.useState(0),[l,d]=w.useState(!1),h=w.useRef(null);w.useLayoutEffect(()=>{const y=h.current;if(!y)return;const E=()=>{const B=getComputedStyle(y),L=B.getPropertyValue("--max-description-height").trim();let ie=84;if(L){const C=L.match(/^(-?\d+(\.\d+)?)(px)?$/);C&&(ie=Number(C[1]))}else{const C=B.getPropertyValue("max-height").trim();C&&C.endsWith("px")&&(ie=Number(C.replace("px","")))}const We=y.scrollHeight;m(ie),a(We),d(We>ie+1)};E();const O=new ResizeObserver(E);return O.observe(y),window.addEventListener("resize",E),()=>{O.disconnect(),window.removeEventListener("resize",E)}},[e.description]);const b=c?Math.max(i,p):p,_=`${e.availableBets[ne.betIndex]} ${ne.displayCurrency}`;return v.jsxs("div",{className:"sf-card",role:"group","aria-label":u.join(" "),children:[v.jsxs("div",{className:"sf-card__title",children:[e.title,e.description&&v.jsx("div",{ref:h,className:`sf-card__description ${c?"open":""} ${l?"expandable":""}`,style:{maxHeight:`${b}px`},onClick:()=>{l&&(I(),f(y=>!y))},children:v.jsx("div",{children:e.description})})]}),v.jsx("div",{className:"sf-card__content",children:v.jsx("div",{className:`sf-card__image-wrap ${c?"hidden":""}`,children:e.imagePath?v.jsx("img",{src:e.imagePath,alt:u[0]}):v.jsx("div",{className:"sf-card__image-placeholder"})})}),v.jsx("div",{className:`sf-card__bottom ${n}`,children:n==="ante"?v.jsxs("div",{className:"sf-card__ante-cluster",children:[v.jsx("div",{className:"sf-card__price-wrap",children:v.jsx("span",{className:"sf-card__price",children:_})}),v.jsx("div",{className:`sf-card__toggle ${r?"disabled":""}`,children:v.jsx(It,{checked:o===e,onChange:y=>s.call(pe,y?e.id:null)})})]}):v.jsx("button",{className:`sf-buy-btn ${r?"disabled":""}`,type:"button","aria-label":`${_} buy`,onClick:()=>{I(),t?.(e.id)},children:v.jsxs("span",{className:"sf-buy-btn__label",children:[_," BUY"]})})})]})}),yn=({features:e,type:n,title:t,onBuy:r,disabled:o})=>v.jsxs(v.Fragment,{children:[v.jsx("h2",{className:"sf-section-title",children:t}),v.jsx("div",{className:"sf-grid",children:e.map((s,u)=>v.jsx(Ga,{item:s,type:n,onBuy:r,disabled:o},u))})]}),Ra=$(()=>{const{anteBets:e,inReelFeatures:n,bonusFeatures:t,buyHandler:r,activeAnteBet:o}=pe;return v.jsxs("div",{className:"sf-wrap",children:[e.length?v.jsx(yn,{features:e,type:Pt.ante,title:D("ANTE_BETS")},0):null,n.length?v.jsx(yn,{features:n,type:Pt.buy,title:"Reel Features",onBuy:r.bind(pe)},1):null,t.length?v.jsx(yn,{features:t,type:Pt.buy,title:D("BONUS"),onBuy:r.bind(pe),disabled:!!o},2):null]})}),Ka=$(({payTableComponent:e})=>{const{activePopup:n}=j;if(!n)return null;const t=w.useMemo(()=>{switch(n){case H.bet:return ka;case H.autoplay:return Fa;case H.settings:return Ua;case H.history:return Ha;case H.buyBonus:return Ra;case H.payTable:return e;default:return null}},[n]);return t?v.jsx(t,{}):null}),qa=({configs:e,text:n,onClick:t})=>v.jsx("button",{type:"button",className:"additional-btn",style:{"--btn-bg":e?.background??"transparent","--btn-color":e?.color??"inherit"},onClick:typeof t=="function"?()=>{I(),t()}:void 0,children:n}),Wa=$(()=>{const{activeDialog:e}=st;return e?v.jsxs("div",{className:"dialogs-wrap","aria-live":"polite",children:[v.jsx("span",{className:"title",children:e?.title}),e?.imagePath&&v.jsx("img",{className:"dialog-image",src:e.imagePath,alt:e.title??"dialog image"}),v.jsx("span",{className:"message",children:e?.message}),e.toggle&&v.jsx(It,{checked:e.toggle.value,onChange:()=>e.toggle?.onClick()}),v.jsx("div",{className:"additional-btns",children:e?.buttons?.map((n,t)=>v.jsx(qa,{configs:n.configs,text:n.text,onClick:n.onClick},t))})]}):null}),Xa=$(({payTableComponent:e})=>{const n=j.activePopup,t=st.activeDialog;if(!n&&!t)return null;const r=s=>{s.target===s.currentTarget&&(I(),j.close(),st.close())},o=()=>{I(),j.close(),st.close()};return v.jsxs("div",{className:`overlay ${t?"dialog":""}`,onClick:r,role:"presentation",children:[!t&&v.jsxs("header",{className:"overlay-header",children:[typeof n=="string"&&v.jsx("span",{className:"popup-title",children:D(n.toUpperCase()).toUpperCase()}),v.jsx("div",{className:"overlay-close","aria-label":"Close",onClick:o,children:v.jsx("img",{src:Pa,alt:"Close"})})]}),v.jsxs("div",{className:"overlay-body",children:[v.jsxs("div",{className:"overlay-content",role:"dialog","aria-modal":"true",children:[t&&v.jsx(Wa,{}),!t&&n&&v.jsx(Ka,{payTableComponent:e})]}),!t&&n===H.buyBonus&&v.jsx(Ia,{})]})]})});function Za({payTableComponent:e}){return v.jsxs("div",{className:"app",children:[v.jsxs("div",{className:"game-container",children:[v.jsx(Ba,{}),v.jsx(La,{}),v.jsx(xa,{})]}),v.jsx(Xa,{payTableComponent:e})]})}const Ya=()=>null;function za(e,n=Ya,t){if(!e){console.error("element not found");return}va(t),Jr.createRoot(e).render(v.jsx(w.StrictMode,{children:v.jsx(Za,{payTableComponent:n})}))}x.BASE_SOUND_NAMES=hn,x.DEFAULT_BG_MUSIC_KEY=mn,x.LOCAL_STORAGE_ITEM_NAMES=F,x.PopupNames=H,x.autoplayStore=we,x.betStore=ne,x.bonusFeatureTypes=Pt,x.bonusStore=pe,x.createUi=za,x.defaultDialogButtonsConfigs=vn,x.defaultDialogs=Ur,x.defaultDialogsNames=Fr,x.dialogStore=st,x.historyStore=Gr,x.popupStore=j,x.resultStore=Rr,x.settingsStore=re,x.soundService=Ee,x.uiStore=ut,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sticky-studio-npm/ui-core",
3
- "version": "1.0.9",
3
+ "version": "1.0.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/ui-bundle.umd.js",