@kalamba/sdk 0.23.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugins.js CHANGED
@@ -8,8 +8,8 @@ var wt = (i) => {
8
8
  };
9
9
  var ns = (i, t, e) => t in i ? as(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
10
10
  var b = (i, t, e) => ns(i, typeof t != "symbol" ? t + "" : t, e), mt = (i, t, e) => t.has(i) || wt("Cannot " + e);
11
- var k = (i, t, e) => (mt(i, t, "read from private field"), e ? e.call(i) : t.get(i)), M = (i, t, e) => t.has(i) ? wt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), v = (i, t, e, s) => (mt(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e);
12
- import { a as He } from "./errors-NnLrKjTz.js";
11
+ var k = (i, t, e) => (mt(i, t, "read from private field"), e ? e.call(i) : t.get(i)), M = (i, t, e) => t.has(i) ? wt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), E = (i, t, e, s) => (mt(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e);
12
+ import { a as te } from "./errors-NnLrKjTz.js";
13
13
  import { d as bt, e as os } from "./encoders-BDr7fjKQ.js";
14
14
  import { r as rs, g as cs, v as ds } from "./v4-BfzDHJEo.js";
15
15
  function P(i, t) {
@@ -89,7 +89,7 @@ class Xs extends B {
89
89
  });
90
90
  }
91
91
  }
92
- const E = P("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), us = P("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
92
+ const v = P("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), us = P("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
93
93
  class Js extends B {
94
94
  constructor(...t) {
95
95
  super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
@@ -111,7 +111,7 @@ class Js extends B {
111
111
  };
112
112
  }
113
113
  registerSdkToDebugEvents() {
114
- this.on("autoplay", (t) => E("autoplay", t)), this.on("balance", (t) => E("balance", t)), this.on("bet", (t) => E("bet", t)), this.on("cashier", (t) => E("cashier", t)), this.on("choice", (t) => E("choice", t)), this.on("close", (t) => E("close", t)), this.on("error", (t) => E("error", t)), this.on("loadEnd", (t) => E("loadEnd", t)), this.on("loadProgress", (t) => E("loadProgress", t)), this.on("loadStart", (t) => E("loadStart", t)), this.on("playCycleStart", (t) => E("playCycleStart", t)), this.on("playCycleEnd", (t) => E("playCycleEnd", t)), this.on("playEnd", (t) => E("playEnd", t)), this.on("playError", (t) => E("playError", t)), this.on("playReady", (t) => E("playReady", t)), this.on("playStart", (t) => E("playStart", t)), this.on("settings", (t) => E("settings", t));
114
+ this.on("autoplay", (t) => v("autoplay", t)), this.on("balance", (t) => v("balance", t)), this.on("bet", (t) => v("bet", t)), this.on("cashier", (t) => v("cashier", t)), this.on("choice", (t) => v("choice", t)), this.on("close", (t) => v("close", t)), this.on("error", (t) => v("error", t)), this.on("loadEnd", (t) => v("loadEnd", t)), this.on("loadProgress", (t) => v("loadProgress", t)), this.on("loadStart", (t) => v("loadStart", t)), this.on("playCycleStart", (t) => v("playCycleStart", t)), this.on("playCycleEnd", (t) => v("playCycleEnd", t)), this.on("playEnd", (t) => v("playEnd", t)), this.on("playError", (t) => v("playError", t)), this.on("playReady", (t) => v("playReady", t)), this.on("playStart", (t) => v("playStart", t)), this.on("settings", (t) => v("settings", t));
115
115
  }
116
116
  _send(...t) {
117
117
  us.apply(null, t), this.send.apply(this, t);
@@ -239,7 +239,7 @@ function je(i, t) {
239
239
  }
240
240
  function $e() {
241
241
  }
242
- function gs(i) {
242
+ function ps(i) {
243
243
  return i.filter(function(e) {
244
244
  return e.messageType.toUpperCase() === "DATA";
245
245
  });
@@ -256,7 +256,7 @@ function $t(i) {
256
256
  return {};
257
257
  }
258
258
  }
259
- function ps(i) {
259
+ function gs(i) {
260
260
  return i.map($t).filter(Boolean).find(function(e) {
261
261
  return e.betId != null && e.winId != null;
262
262
  }) || {};
@@ -322,8 +322,8 @@ class ei extends B {
322
322
  const r = Object.assign({}, s, {
323
323
  buttons: s.buttons.filter((c) => c.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((c) => Object.assign({}, c, {
324
324
  onRelease: () => {
325
- const g = s.messageType.toUpperCase() === "POPUP" ? $e : a, h = this.buttonActions[c.action.toUpperCase()];
326
- h ? h(c, g) : g();
325
+ const p = s.messageType.toUpperCase() === "POPUP" ? $e : a, h = this.buttonActions[c.action.toUpperCase()];
326
+ h ? h(c, p) : p();
327
327
  }
328
328
  }))
329
329
  });
@@ -418,14 +418,14 @@ class ei extends B {
418
418
  e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
419
419
  )
420
420
  });
421
- const s = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = gs(e.contract.uiMessages), r = Ke(e.contract.uiMessages), c = ps(a), g = ws(a);
421
+ const s = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = ps(e.contract.uiMessages), r = Ke(e.contract.uiMessages), c = gs(a), p = ws(a);
422
422
  this.postMessage("ticketReceived", {
423
423
  Balance: this.coinsToCurrency(e.contract.balance.coins),
424
424
  BetAmount: s ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
425
425
  CreditTransactionId: c.betId,
426
426
  DebitTransactionId: c.winId,
427
427
  Message: r,
428
- SessionData: g,
428
+ SessionData: p,
429
429
  Status: {
430
430
  ErrCode: 0
431
431
  },
@@ -444,14 +444,14 @@ class ei extends B {
444
444
  });
445
445
  }
446
446
  }
447
- const we = P("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
447
+ const me = P("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
448
448
  class ti extends B {
449
449
  constructor(...e) {
450
450
  super(...e);
451
451
  b(this, "VERSION", "1.17.0");
452
452
  const s = document.createElement("script");
453
453
  s.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, s.onload = () => {
454
- we("loaded"), window.FEIM.configure({
454
+ me("loaded"), window.FEIM.configure({
455
455
  p2pConfig: {
456
456
  currency: this.sdkConfig.api.currency,
457
457
  launchParams: {
@@ -459,11 +459,11 @@ class ti extends B {
459
459
  homeurl: "homeUrl"
460
460
  }
461
461
  }
462
- }), we("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
462
+ }), me("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
463
463
  }, document.body.appendChild(s);
464
464
  }
465
465
  registerToSdkEvents() {
466
- window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => we("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => we("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => we("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
466
+ window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => me("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => me("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => me("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
467
467
  this.send("help");
468
468
  }), window.FEIM.on.togglePaytable(() => {
469
469
  this.send("paytable");
@@ -633,14 +633,14 @@ class ai extends B {
633
633
  });
634
634
  }
635
635
  }
636
- const vt = P("EveryMatrixPlugin", "color:#000000;font-weight:bold;");
636
+ const Et = P("EveryMatrixPlugin", "color:#000000;font-weight:bold;");
637
637
  class ni extends B {
638
638
  constructor(...t) {
639
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), vt("configured");
639
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Et("configured");
640
640
  }
641
641
  postMessage(t, e) {
642
642
  const s = { name: t, sender: "game", data: e };
643
- vt("postMessage", s), window.top.postMessage(s, "*");
643
+ Et("postMessage", s), window.top.postMessage(s, "*");
644
644
  }
645
645
  registerToSdkEvents() {
646
646
  window.addEventListener("message", (t) => {
@@ -692,9 +692,9 @@ class ni extends B {
692
692
  });
693
693
  }
694
694
  }
695
- var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function", j = "undefined", ue = "object", dt = "string", S = "browser", F = "cpu", R = "device", x = "engine", O = "os", te = "result", l = "name", n = "type", d = "vendor", u = "version", T = "architecture", Se = "major", o = "model", Ce = "console", w = "mobile", f = "tablet", y = "smarttv", U = "wearable", Xe = "xr", Me = "embedded", me = "inapp", ht = "brands", Y = "formFactors", gt = "fullVersionList", se = "platform", pt = "platformVersion", Ve = "bitness", $ = "sec-ch-ua", bs = $ + "-full-version-list", fs = $ + "-arch", ys = $ + "-" + Ve, ks = $ + "-form-factors", vs = $ + "-" + w, Es = $ + "-" + o, Kt = $ + "-" + se, Cs = Kt + "-version", Qt = [ht, gt, w, o, se, pt, T, Y, Ve], xe = "Amazon", Z = "Apple", Mt = "ASUS", St = "BlackBerry", J = "Google", Tt = "Huawei", It = "Lenovo", At = "Honor", Ue = "LG", Je = "Microsoft", Ye = "Motorola", Ze = "Nvidia", Pt = "OnePlus", et = "OPPO", be = "Samsung", Ot = "Sharp", fe = "Sony", tt = "Xiaomi", st = "Zebra", xt = "Chrome", Ut = "Chromium", V = "Chromecast", Ms = "Edge", ye = "Firefox", ke = "Opera", it = "Facebook", Rt = "Sogou", ee = "Mobile ", ve = " Browser", lt = "Windows", Ss = typeof window !== j, I = Ss && window.navigator ? window.navigator : void 0, z = I && I.userAgentData ? I.userAgentData : void 0, Ts = function(i, t) {
695
+ var ms = "2.0.3", ct = 500, vt = "user-agent", ue = "", Ct = "?", _e = "function", j = "undefined", he = "object", dt = "string", S = "browser", N = "cpu", R = "device", x = "engine", O = "os", se = "result", l = "name", n = "type", d = "vendor", u = "version", T = "architecture", Te = "major", o = "model", Me = "console", w = "mobile", f = "tablet", y = "smarttv", U = "wearable", Xe = "xr", Se = "embedded", be = "inapp", ht = "brands", Y = "formFactors", pt = "fullVersionList", ie = "platform", gt = "platformVersion", Ve = "bitness", $ = "sec-ch-ua", bs = $ + "-full-version-list", fs = $ + "-arch", ys = $ + "-" + Ve, ks = $ + "-form-factors", Es = $ + "-" + w, vs = $ + "-" + o, Kt = $ + "-" + ie, Cs = Kt + "-version", Qt = [ht, pt, w, o, ie, gt, T, Y, Ve], Ue = "Amazon", Z = "Apple", Mt = "ASUS", St = "BlackBerry", J = "Google", Tt = "Huawei", It = "Lenovo", At = "Honor", Re = "LG", Je = "Microsoft", Ye = "Motorola", Ze = "Nvidia", Pt = "OnePlus", et = "OPPO", fe = "Samsung", Ot = "Sharp", ye = "Sony", tt = "Xiaomi", st = "Zebra", xt = "Chrome", Ut = "Chromium", V = "Chromecast", Ms = "Edge", ke = "Firefox", Ee = "Opera", it = "Facebook", Rt = "Sogou", ee = "Mobile ", ve = " Browser", lt = "Windows", Ss = typeof window !== j, I = Ss && window.navigator ? window.navigator : void 0, z = I && I.userAgentData ? I.userAgentData : void 0, Ts = function(i, t) {
696
696
  var e = {}, s = t;
697
- if (!_e(t)) {
697
+ if (!Ne(t)) {
698
698
  s = {};
699
699
  for (var a in t)
700
700
  for (var r in t[a])
@@ -708,57 +708,57 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
708
708
  t[i[e].toUpperCase()] = i[e];
709
709
  return t;
710
710
  }, ut = function(i, t) {
711
- if (typeof i === ue && i.length > 0) {
711
+ if (typeof i === he && i.length > 0) {
712
712
  for (var e in i)
713
- if (N(i[e]) == N(t)) return !0;
713
+ if (F(i[e]) == F(t)) return !0;
714
714
  return !1;
715
715
  }
716
- return ge(i) ? N(t).indexOf(N(i)) !== -1 : !1;
717
- }, _e = function(i, t) {
716
+ return ge(i) ? F(t).indexOf(F(i)) !== -1 : !1;
717
+ }, Ne = function(i, t) {
718
718
  for (var e in i)
719
- return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? _e(i[e]) : !1);
719
+ return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? Ne(i[e]) : !1);
720
720
  }, ge = function(i) {
721
721
  return typeof i === dt;
722
722
  }, at = function(i) {
723
723
  if (i) {
724
- for (var t = [], e = he(/\\?\"/g, i).split(","), s = 0; s < e.length; s++)
724
+ for (var t = [], e = pe(/\\?\"/g, i).split(","), s = 0; s < e.length; s++)
725
725
  if (e[s].indexOf(";") > -1) {
726
- var a = Te(e[s]).split(";v=");
726
+ var a = Ie(e[s]).split(";v=");
727
727
  t[s] = { brand: a[0], version: a[1] };
728
728
  } else
729
- t[s] = Te(e[s]);
729
+ t[s] = Ie(e[s]);
730
730
  return t;
731
731
  }
732
- }, N = function(i) {
732
+ }, F = function(i) {
733
733
  return ge(i) ? i.toLowerCase() : i;
734
734
  }, nt = function(i) {
735
- return ge(i) ? he(/[^\d\.]/g, i).split(".")[0] : void 0;
735
+ return ge(i) ? pe(/[^\d\.]/g, i).split(".")[0] : void 0;
736
736
  }, D = function(i) {
737
737
  for (var t in i) {
738
738
  var e = i[t];
739
- typeof e == ue && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
739
+ typeof e == he && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
740
740
  }
741
741
  return this;
742
- }, he = function(i, t) {
743
- return ge(t) ? t.replace(i, le) : t;
744
- }, Ee = function(i) {
745
- return he(/\\?\"/g, i);
746
- }, Te = function(i, t) {
742
+ }, pe = function(i, t) {
743
+ return ge(t) ? t.replace(i, ue) : t;
744
+ }, Ce = function(i) {
745
+ return pe(/\\?\"/g, i);
746
+ }, Ie = function(i, t) {
747
747
  if (ge(i))
748
- return i = he(/^\s\s*/, i), typeof t === j ? i : i.substring(0, ct);
748
+ return i = pe(/^\s\s*/, i), typeof t === j ? i : i.substring(0, ct);
749
749
  }, ot = function(i, t) {
750
750
  if (!(!i || !t))
751
- for (var e = 0, s, a, r, c, g, h; e < t.length && !g; ) {
752
- var p = t[e], m = t[e + 1];
753
- for (s = a = 0; s < p.length && !g && p[s]; )
754
- if (g = p[s++].exec(i), g)
751
+ for (var e = 0, s, a, r, c, p, h; e < t.length && !p; ) {
752
+ var g = t[e], m = t[e + 1];
753
+ for (s = a = 0; s < g.length && !p && g[s]; )
754
+ if (p = g[s++].exec(i), p)
755
755
  for (r = 0; r < m.length; r++)
756
- h = g[++a], c = m[r], typeof c === ue && c.length > 0 ? c.length === 2 ? typeof c[1] == Be ? this[c[0]] = c[1].call(this, h) : this[c[0]] = c[1] : c.length === 3 ? typeof c[1] === Be && !(c[1].exec && c[1].test) ? this[c[0]] = h ? c[1].call(this, h, c[2]) : void 0 : this[c[0]] = h ? h.replace(c[1], c[2]) : void 0 : c.length === 4 && (this[c[0]] = h ? c[3].call(this, h.replace(c[1], c[2])) : void 0) : this[c] = h || void 0;
756
+ h = p[++a], c = m[r], typeof c === he && c.length > 0 ? c.length === 2 ? typeof c[1] == _e ? this[c[0]] = c[1].call(this, h) : this[c[0]] = c[1] : c.length === 3 ? typeof c[1] === _e && !(c[1].exec && c[1].test) ? this[c[0]] = h ? c[1].call(this, h, c[2]) : void 0 : this[c[0]] = h ? h.replace(c[1], c[2]) : void 0 : c.length === 4 && (this[c[0]] = h ? c[3].call(this, h.replace(c[1], c[2])) : void 0) : this[c] = h || void 0;
757
757
  e += 2;
758
758
  }
759
759
  }, q = function(i, t) {
760
760
  for (var e in t)
761
- if (typeof t[e] === ue && t[e].length > 0) {
761
+ if (typeof t[e] === he && t[e].length > 0) {
762
762
  for (var s = 0; s < t[e].length; s++)
763
763
  if (ut(t[e][s], i))
764
764
  return e === Ct ? void 0 : e;
@@ -813,17 +813,17 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
813
813
  /opios[\/ ]+([\w\.]+)/i
814
814
  // Opera mini on iphone >= 8.0
815
815
  ],
816
- [u, [l, ke + " Mini"]],
816
+ [u, [l, Ee + " Mini"]],
817
817
  [
818
818
  /\bop(?:rg)?x\/([\w\.]+)/i
819
819
  // Opera GX
820
820
  ],
821
- [u, [l, ke + " GX"]],
821
+ [u, [l, Ee + " GX"]],
822
822
  [
823
823
  /\bopr\/([\w\.]+)/i
824
824
  // Opera Webkit
825
825
  ],
826
- [u, [l, ke]],
826
+ [u, [l, Ee]],
827
827
  [
828
828
  // Mixed
829
829
  /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
@@ -906,12 +906,12 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
906
906
  /\bfocus\/([\w\.]+)/i
907
907
  // Firefox Focus
908
908
  ],
909
- [u, [l, ye + " Focus"]],
909
+ [u, [l, ke + " Focus"]],
910
910
  [
911
911
  /\bopt\/([\w\.]+)/i
912
912
  // Opera Touch
913
913
  ],
914
- [u, [l, ke + " Touch"]],
914
+ [u, [l, Ee + " Touch"]],
915
915
  [
916
916
  /coc_coc\w+\/([\w\.]+)/i
917
917
  // Coc Coc Browser
@@ -926,7 +926,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
926
926
  /coast\/([\w\.]+)/i
927
927
  // Opera Coast
928
928
  ],
929
- [u, [l, ke + " Coast"]],
929
+ [u, [l, Ee + " Coast"]],
930
930
  [
931
931
  /miuibrowser\/([\w\.]+)/i
932
932
  // MIUI Browser
@@ -936,7 +936,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
936
936
  /fxios\/([\w\.-]+)/i
937
937
  // Firefox for iOS
938
938
  ],
939
- [u, [l, ee + ye]],
939
+ [u, [l, ee + ke]],
940
940
  [
941
941
  /\bqihoobrowser\/?([\w\.]*)/i
942
942
  // 360
@@ -956,7 +956,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
956
956
  /samsungbrowser\/([\w\.]+)/i
957
957
  // Samsung Internet
958
958
  ],
959
- [u, [l, be + " Internet"]],
959
+ [u, [l, fe + " Internet"]],
960
960
  [
961
961
  /metasr[\/ ]?([\d\.]+)/i
962
962
  // Sogou Explorer
@@ -993,7 +993,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
993
993
  /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
994
994
  // Facebook App for iOS & Android
995
995
  ],
996
- [[l, it], u, [n, me]],
996
+ [[l, it], u, [n, be]],
997
997
  [
998
998
  /(Klarna)\/([\w\.]+)/i,
999
999
  // Klarna Shopping Browser for iOS & Android
@@ -1014,22 +1014,22 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1014
1014
  /(instagram|snapchat)[\/ ]([-\w\.]+)/i
1015
1015
  // Instagram/Snapchat
1016
1016
  ],
1017
- [l, u, [n, me]],
1017
+ [l, u, [n, be]],
1018
1018
  [
1019
1019
  /\bgsa\/([\w\.]+) .*safari\//i
1020
1020
  // Google Search Appliance on iOS
1021
1021
  ],
1022
- [u, [l, "GSA"], [n, me]],
1022
+ [u, [l, "GSA"], [n, be]],
1023
1023
  [
1024
1024
  /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
1025
1025
  // TikTok
1026
1026
  ],
1027
- [u, [l, "TikTok"], [n, me]],
1027
+ [u, [l, "TikTok"], [n, be]],
1028
1028
  [
1029
1029
  /\[(linkedin)app\]/i
1030
1030
  // LinkedIn App for iOS & Android
1031
1031
  ],
1032
- [l, [n, me]],
1032
+ [l, [n, be]],
1033
1033
  [
1034
1034
  /(chromium)[\/ ]([-\w\.]+)/i
1035
1035
  // Chromium
@@ -1088,7 +1088,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1088
1088
  /(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
1089
1089
  // Firefox Mobile
1090
1090
  ],
1091
- [[l, ee + ye], u],
1091
+ [[l, ee + ke], u],
1092
1092
  [
1093
1093
  /(navigator|netscape\d?)\/([-\w\.]+)/i
1094
1094
  // Netscape
@@ -1103,7 +1103,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1103
1103
  /mobile vr; rv:([\w\.]+)\).+firefox/i
1104
1104
  // Firefox Reality
1105
1105
  ],
1106
- [u, [l, ye + " Reality"]],
1106
+ [u, [l, ke + " Reality"]],
1107
1107
  [
1108
1108
  /ekiohf.+(flow)\/([\w\.]+)/i,
1109
1109
  // Flow
@@ -1128,7 +1128,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1128
1128
  /(cobalt)\/([\w\.]+)/i
1129
1129
  // Cobalt
1130
1130
  ],
1131
- [l, [u, /[^\d\.]+./, le]]
1131
+ [l, [u, /[^\d\.]+./, ue]]
1132
1132
  ],
1133
1133
  cpu: [
1134
1134
  [
@@ -1162,7 +1162,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1162
1162
  /((ppc|powerpc)(64)?)( mac|;|\))/i
1163
1163
  // PowerPC
1164
1164
  ],
1165
- [[T, /ower/, le, N]],
1165
+ [[T, /ower/, ue, F]],
1166
1166
  [
1167
1167
  / sun4\w[;\)]/i
1168
1168
  // SPARC
@@ -1172,7 +1172,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1172
1172
  /\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i
1173
1173
  // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
1174
1174
  ],
1175
- [[T, N]]
1175
+ [[T, F]]
1176
1176
  ],
1177
1177
  device: [
1178
1178
  [
@@ -1182,13 +1182,13 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1182
1182
  // Samsung
1183
1183
  /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
1184
1184
  ],
1185
- [o, [d, be], [n, f]],
1185
+ [o, [d, fe], [n, f]],
1186
1186
  [
1187
1187
  /\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
1188
1188
  /samsung[- ]((?!sm-[lr])[-\w]+)/i,
1189
1189
  /sec-(sgh\w+)/i
1190
1190
  ],
1191
- [o, [d, be], [n, w]],
1191
+ [o, [d, fe], [n, w]],
1192
1192
  [
1193
1193
  // Apple
1194
1194
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
@@ -1294,13 +1294,13 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1294
1294
  // LG
1295
1295
  /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
1296
1296
  ],
1297
- [o, [d, Ue], [n, f]],
1297
+ [o, [d, Re], [n, f]],
1298
1298
  [
1299
1299
  /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
1300
1300
  /\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,
1301
1301
  /\blg-?([\d\w]+) bui/i
1302
1302
  ],
1303
- [o, [d, Ue], [n, w]],
1303
+ [o, [d, Re], [n, w]],
1304
1304
  [
1305
1305
  // Lenovo
1306
1306
  /(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
@@ -1332,12 +1332,12 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1332
1332
  // Sony
1333
1333
  /droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
1334
1334
  ],
1335
- [o, [d, fe], [n, w]],
1335
+ [o, [d, ye], [n, w]],
1336
1336
  [
1337
1337
  /sony tablet [ps]/i,
1338
1338
  /\b(?:sony)?sgp\w+(?: bui|\))/i
1339
1339
  ],
1340
- [[o, "Xperia Tablet"], [d, fe], [n, f]],
1340
+ [[o, "Xperia Tablet"], [d, ye], [n, f]],
1341
1341
  [
1342
1342
  // OnePlus
1343
1343
  / (kb2005|in20[12]5|be20[12][59])\b/i,
@@ -1352,12 +1352,12 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1352
1352
  /(kf[a-z]+)( bui|\)).+silk\//i
1353
1353
  // Kindle Fire HD
1354
1354
  ],
1355
- [o, [d, xe], [n, f]],
1355
+ [o, [d, Ue], [n, f]],
1356
1356
  [
1357
1357
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
1358
1358
  // Fire Phone
1359
1359
  ],
1360
- [[o, /(.+)/g, "Fire Phone $1"], [d, xe], [n, w]],
1360
+ [[o, /(.+)/g, "Fire Phone $1"], [d, Ue], [n, w]],
1361
1361
  [
1362
1362
  // BlackBerry
1363
1363
  /(playbook);[-\w\),; ]+(rim)/i
@@ -1408,7 +1408,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1408
1408
  // itel
1409
1409
  /(itel) ((\w+))/i
1410
1410
  ],
1411
- [[d, N], o, [n, q, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
1411
+ [[d, F], o, [n, q, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
1412
1412
  [
1413
1413
  // Acer
1414
1414
  /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
@@ -1535,7 +1535,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1535
1535
  [
1536
1536
  /hbbtv.+maple;(\d+)/i
1537
1537
  ],
1538
- [[o, /^/, "SmartTV"], [d, be], [n, y]],
1538
+ [[o, /^/, "SmartTV"], [d, fe], [n, y]],
1539
1539
  [
1540
1540
  /tcast.+(lg)e?. ([-\w]+)/i
1541
1541
  // LG SmartTV
@@ -1544,7 +1544,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1544
1544
  [
1545
1545
  /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1546
1546
  ],
1547
- [[d, Ue], [n, y]],
1547
+ [[d, Re], [n, y]],
1548
1548
  [
1549
1549
  /(apple) ?tv/i
1550
1550
  // Apple TV
@@ -1579,7 +1579,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1579
1579
  /droid.+aft(\w+)( bui|\))/i
1580
1580
  // Fire TV
1581
1581
  ],
1582
- [o, [d, xe], [n, y]],
1582
+ [o, [d, Ue], [n, y]],
1583
1583
  [
1584
1584
  /(shield \w+ tv)/i
1585
1585
  // Nvidia Shield TV
@@ -1595,7 +1595,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1595
1595
  /(bravia[\w ]+)( bui|\))/i
1596
1596
  // Sony
1597
1597
  ],
1598
- [o, [d, fe], [n, y]],
1598
+ [o, [d, ye], [n, y]],
1599
1599
  [
1600
1600
  /(mi(tv|box)-?\w+) bui/i
1601
1601
  // Xiaomi
@@ -1612,7 +1612,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1612
1612
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
1613
1613
  // HbbTV devices
1614
1614
  ],
1615
- [[d, Te], [o, Te], [n, y]],
1615
+ [[d, Ie], [o, Ie], [n, y]],
1616
1616
  [
1617
1617
  // SmartTV from Unidentified Vendors
1618
1618
  /droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
@@ -1631,22 +1631,22 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1631
1631
  /(nintendo) (\w+)/i
1632
1632
  // Nintendo
1633
1633
  ],
1634
- [d, o, [n, Ce]],
1634
+ [d, o, [n, Me]],
1635
1635
  [
1636
1636
  /droid.+; (shield)( bui|\))/i
1637
1637
  // Nvidia Portable
1638
1638
  ],
1639
- [o, [d, Ze], [n, Ce]],
1639
+ [o, [d, Ze], [n, Me]],
1640
1640
  [
1641
1641
  /(playstation \w+)/i
1642
1642
  // Playstation
1643
1643
  ],
1644
- [o, [d, fe], [n, Ce]],
1644
+ [o, [d, ye], [n, Me]],
1645
1645
  [
1646
1646
  /\b(xbox(?: one)?(?!; xbox))[\); ]/i
1647
1647
  // Microsoft Xbox
1648
1648
  ],
1649
- [o, [d, Je], [n, Ce]],
1649
+ [o, [d, Je], [n, Me]],
1650
1650
  [
1651
1651
  ///////////////////
1652
1652
  // WEARABLES
@@ -1654,7 +1654,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1654
1654
  /\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
1655
1655
  // Samsung Galaxy Watch
1656
1656
  ],
1657
- [o, [d, be], [n, U]],
1657
+ [o, [d, fe], [n, U]],
1658
1658
  [
1659
1659
  /((pebble))app/i,
1660
1660
  // Pebble
@@ -1686,12 +1686,12 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1686
1686
  /(smartwatch 3)/i
1687
1687
  // Sony SmartWatch
1688
1688
  ],
1689
- [o, [d, fe], [n, U]],
1689
+ [o, [d, ye], [n, U]],
1690
1690
  [
1691
1691
  /(g watch r)/i
1692
1692
  // LG G Watch R
1693
1693
  ],
1694
- [o, [d, Ue], [n, U]],
1694
+ [o, [d, Re], [n, U]],
1695
1695
  [
1696
1696
  /droid.+; (wt63?0{2,3})\)/i
1697
1697
  ],
@@ -1721,21 +1721,21 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1721
1721
  /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
1722
1722
  // Tesla
1723
1723
  ],
1724
- [d, [n, Me]],
1724
+ [d, [n, Se]],
1725
1725
  [
1726
1726
  /(aeobc)\b/i
1727
1727
  // Echo Dot
1728
1728
  ],
1729
- [o, [d, xe], [n, Me]],
1729
+ [o, [d, Ue], [n, Se]],
1730
1730
  [
1731
1731
  /(homepod).+mac os/i
1732
1732
  // Apple HomePod
1733
1733
  ],
1734
- [o, [d, Z], [n, Me]],
1734
+ [o, [d, Z], [n, Se]],
1735
1735
  [
1736
1736
  /windows iot/i
1737
1737
  ],
1738
- [[n, Me]],
1738
+ [[n, Se]],
1739
1739
  [
1740
1740
  ////////////////////
1741
1741
  // MIXED (GENERIC)
@@ -1889,7 +1889,7 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1889
1889
  /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
1890
1890
  // Firefox OS
1891
1891
  ],
1892
- [u, [l, ye + " OS"]],
1892
+ [u, [l, ke + " OS"]],
1893
1893
  [
1894
1894
  /web0s;.+rt(tv)/i,
1895
1895
  /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
@@ -1958,16 +1958,16 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1958
1958
  ],
1959
1959
  [l, u]
1960
1960
  ]
1961
- }, Re = function() {
1961
+ }, Le = function() {
1962
1962
  var i = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
1963
1963
  return D.call(i.init, [
1964
- [S, [l, u, Se, n]],
1965
- [F, [T]],
1964
+ [S, [l, u, Te, n]],
1965
+ [N, [T]],
1966
1966
  [R, [n, o, d]],
1967
1967
  [x, [l, u]],
1968
1968
  [O, [l, u]]
1969
1969
  ]), D.call(i.isIgnore, [
1970
- [S, [u, Se]],
1970
+ [S, [u, Te]],
1971
1971
  [x, [u]],
1972
1972
  [O, [u]]
1973
1973
  ]), D.call(i.isIgnoreRgx, [
@@ -1975,70 +1975,70 @@ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function
1975
1975
  [O, / ?os$/i]
1976
1976
  ]), D.call(i.toString, [
1977
1977
  [S, [l, u]],
1978
- [F, [T]],
1978
+ [N, [T]],
1979
1979
  [R, [d, o]],
1980
1980
  [x, [l, u]],
1981
1981
  [O, [l, u]]
1982
1982
  ]), i;
1983
1983
  }(), Is = function(i, t) {
1984
- var e = Re.init[t], s = Re.isIgnore[t] || 0, a = Re.isIgnoreRgx[t] || 0, r = Re.toString[t] || 0;
1984
+ var e = Le.init[t], s = Le.isIgnore[t] || 0, a = Le.isIgnoreRgx[t] || 0, r = Le.toString[t] || 0;
1985
1985
  function c() {
1986
1986
  D.call(this, e);
1987
1987
  }
1988
1988
  return c.prototype.getItem = function() {
1989
1989
  return i;
1990
1990
  }, c.prototype.withClientHints = function() {
1991
- return z ? z.getHighEntropyValues(Qt).then(function(g) {
1992
- return i.setCH(new Xt(g, !1)).parseCH().get();
1991
+ return z ? z.getHighEntropyValues(Qt).then(function(p) {
1992
+ return i.setCH(new Xt(p, !1)).parseCH().get();
1993
1993
  }) : i.parseCH().get();
1994
1994
  }, c.prototype.withFeatureCheck = function() {
1995
1995
  return i.detectFeature().get();
1996
- }, t != te && (c.prototype.is = function(g) {
1996
+ }, t != se && (c.prototype.is = function(p) {
1997
1997
  var h = !1;
1998
- for (var p in this)
1999
- if (this.hasOwnProperty(p) && !ut(s, p) && N(a ? he(a, this[p]) : this[p]) == N(a ? he(a, g) : g)) {
2000
- if (h = !0, g != j) break;
2001
- } else if (g == j && h) {
1998
+ for (var g in this)
1999
+ if (this.hasOwnProperty(g) && !ut(s, g) && F(a ? pe(a, this[g]) : this[g]) == F(a ? pe(a, p) : p)) {
2000
+ if (h = !0, p != j) break;
2001
+ } else if (p == j && h) {
2002
2002
  h = !h;
2003
2003
  break;
2004
2004
  }
2005
2005
  return h;
2006
2006
  }, c.prototype.toString = function() {
2007
- var g = le;
2007
+ var p = ue;
2008
2008
  for (var h in r)
2009
- typeof this[r[h]] !== j && (g += (g ? " " : le) + this[r[h]]);
2010
- return g || j;
2011
- }), z || (c.prototype.then = function(g) {
2012
- var h = this, p = function() {
2009
+ typeof this[r[h]] !== j && (p += (p ? " " : ue) + this[r[h]]);
2010
+ return p || j;
2011
+ }), z || (c.prototype.then = function(p) {
2012
+ var h = this, g = function() {
2013
2013
  for (var C in h)
2014
2014
  h.hasOwnProperty(C) && (this[C] = h[C]);
2015
2015
  };
2016
- p.prototype = {
2016
+ g.prototype = {
2017
2017
  is: c.prototype.is,
2018
2018
  toString: c.prototype.toString
2019
2019
  };
2020
- var m = new p();
2021
- return g(m), m;
2020
+ var m = new g();
2021
+ return p(m), m;
2022
2022
  }), new c();
2023
2023
  };
2024
2024
  function Xt(i, t) {
2025
2025
  if (i = i || {}, D.call(this, Qt), t)
2026
2026
  D.call(this, [
2027
2027
  [ht, at(i[$])],
2028
- [gt, at(i[bs])],
2029
- [w, /\?1/.test(i[vs])],
2030
- [o, Ee(i[Es])],
2031
- [se, Ee(i[Kt])],
2032
- [pt, Ee(i[Cs])],
2033
- [T, Ee(i[fs])],
2028
+ [pt, at(i[bs])],
2029
+ [w, /\?1/.test(i[Es])],
2030
+ [o, Ce(i[vs])],
2031
+ [ie, Ce(i[Kt])],
2032
+ [gt, Ce(i[Cs])],
2033
+ [T, Ce(i[fs])],
2034
2034
  [Y, at(i[ks])],
2035
- [Ve, Ee(i[ys])]
2035
+ [Ve, Ce(i[ys])]
2036
2036
  ]);
2037
2037
  else
2038
2038
  for (var e in i)
2039
2039
  this.hasOwnProperty(e) && typeof i[e] !== j && (this[e] = i[e]);
2040
2040
  }
2041
- function Ft(i, t, e, s) {
2041
+ function Nt(i, t, e, s) {
2042
2042
  return this.get = function(a) {
2043
2043
  return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
2044
2044
  }, this.set = function(a, r) {
@@ -2049,33 +2049,33 @@ function Ft(i, t, e, s) {
2049
2049
  if (I && I.userAgent == this.ua)
2050
2050
  switch (this.itemType) {
2051
2051
  case S:
2052
- I.brave && typeof I.brave.isBrave == Be && this.set(l, "Brave");
2052
+ I.brave && typeof I.brave.isBrave == _e && this.set(l, "Brave");
2053
2053
  break;
2054
2054
  case R:
2055
2055
  !this.get(n) && z && z[w] && this.set(n, w), this.get(o) == "Macintosh" && I && typeof I.standalone !== j && I.maxTouchPoints && I.maxTouchPoints > 2 && this.set(o, "iPad").set(n, f);
2056
2056
  break;
2057
2057
  case O:
2058
- !this.get(l) && z && z[se] && this.set(l, z[se]);
2058
+ !this.get(l) && z && z[ie] && this.set(l, z[ie]);
2059
2059
  break;
2060
- case te:
2060
+ case se:
2061
2061
  var a = this.data, r = function(c) {
2062
2062
  return a[c].getItem().detectFeature().get();
2063
2063
  };
2064
- this.set(S, r(S)).set(F, r(F)).set(R, r(R)).set(x, r(x)).set(O, r(O));
2064
+ this.set(S, r(S)).set(N, r(N)).set(R, r(R)).set(x, r(x)).set(O, r(O));
2065
2065
  }
2066
2066
  return this;
2067
2067
  }, this.parseUA = function() {
2068
- return this.itemType != te && ot.call(this.data, this.ua, this.rgxMap), this.itemType == S && this.set(Se, nt(this.get(u))), this;
2068
+ return this.itemType != se && ot.call(this.data, this.ua, this.rgxMap), this.itemType == S && this.set(Te, nt(this.get(u))), this;
2069
2069
  }, this.parseCH = function() {
2070
2070
  var a = this.uaCH, r = this.rgxMap;
2071
2071
  switch (this.itemType) {
2072
2072
  case S:
2073
2073
  case x:
2074
- var c = a[gt] || a[ht], g;
2074
+ var c = a[pt] || a[ht], p;
2075
2075
  if (c)
2076
2076
  for (var h in c) {
2077
- var p = c[h].brand || c[h], m = c[h].version;
2078
- this.itemType == S && !/not.a.brand/i.test(p) && (!g || /chrom/i.test(g) && p != Ut) && (p = q(p, {
2077
+ var g = c[h].brand || c[h], m = c[h].version;
2078
+ this.itemType == S && !/not.a.brand/i.test(g) && (!p || /chrom/i.test(p) && g != Ut) && (g = q(g, {
2079
2079
  Chrome: "Google Chrome",
2080
2080
  Edge: "Microsoft Edge",
2081
2081
  "Chrome WebView": "Android WebView",
@@ -2084,10 +2084,10 @@ function Ft(i, t, e, s) {
2084
2084
  "MIUI Browser": "Miui Browser",
2085
2085
  "Opera Mobi": "OperaMobile",
2086
2086
  Yandex: "YaBrowser"
2087
- }), this.set(l, p).set(u, m).set(Se, nt(m)), g = p), this.itemType == x && p == Ut && this.set(u, m);
2087
+ }), this.set(l, g).set(u, m).set(Te, nt(m)), p = g), this.itemType == x && g == Ut && this.set(u, m);
2088
2088
  }
2089
2089
  break;
2090
- case F:
2090
+ case N:
2091
2091
  var C = a[T];
2092
2092
  C && (C && a[Ve] == "64" && (C += "64"), ot.call(this.data, C + ";", r));
2093
2093
  break;
@@ -2099,26 +2099,26 @@ function Ft(i, t, e, s) {
2099
2099
  if (a[Y]) {
2100
2100
  var G;
2101
2101
  if (typeof a[Y] != "string")
2102
- for (var pe = 0; !G && pe < a[Y].length; )
2103
- G = q(a[Y][pe++], Bt);
2102
+ for (var we = 0; !G && we < a[Y].length; )
2103
+ G = q(a[Y][we++], Bt);
2104
2104
  else
2105
2105
  G = q(a[Y], Bt);
2106
2106
  this.set(n, G);
2107
2107
  }
2108
2108
  break;
2109
2109
  case O:
2110
- var _ = a[se];
2110
+ var _ = a[ie];
2111
2111
  if (_) {
2112
- var K = a[pt];
2112
+ var K = a[gt];
2113
2113
  _ == lt && (K = parseInt(nt(K), 10) >= 13 ? "11" : "10"), this.set(l, _).set(u, K);
2114
2114
  }
2115
2115
  this.get(l) == lt && a[o] == "Xbox" && this.set(l, "Xbox").set(u, void 0);
2116
2116
  break;
2117
- case te:
2118
- var Q = this.data, H = function(Oe) {
2119
- return Q[Oe].getItem().setCH(a).parseCH().get();
2117
+ case se:
2118
+ var Q = this.data, H = function(xe) {
2119
+ return Q[xe].getItem().setCH(a).parseCH().get();
2120
2120
  };
2121
- this.set(S, H(S)).set(F, H(F)).set(R, H(R)).set(x, H(x)).set(O, H(O));
2121
+ this.set(S, H(S)).set(N, H(N)).set(R, H(R)).set(x, H(x)).set(O, H(O));
2122
2122
  }
2123
2123
  return this;
2124
2124
  }, D.call(this, [
@@ -2130,55 +2130,87 @@ function Ft(i, t, e, s) {
2130
2130
  ]), this;
2131
2131
  }
2132
2132
  function L(i, t, e) {
2133
- if (typeof i === ue ? (_e(i, !0) ? (typeof t === ue && (e = t), t = i) : (e = i, t = void 0), i = void 0) : typeof i === dt && !_e(t, !0) && (e = t, t = void 0), e && typeof e.append === Be) {
2133
+ if (typeof i === he ? (Ne(i, !0) ? (typeof t === he && (e = t), t = i) : (e = i, t = void 0), i = void 0) : typeof i === dt && !Ne(t, !0) && (e = t, t = void 0), e && typeof e.append === _e) {
2134
2134
  var s = {};
2135
- e.forEach(function(h, p) {
2136
- s[p] = h;
2135
+ e.forEach(function(h, g) {
2136
+ s[g] = h;
2137
2137
  }), e = s;
2138
2138
  }
2139
2139
  if (!(this instanceof L))
2140
2140
  return new L(i, t, e).getResult();
2141
2141
  var a = typeof i === dt ? i : (
2142
2142
  // Passed user-agent string
2143
- e && e[Et] ? e[Et] : (
2143
+ e && e[vt] ? e[vt] : (
2144
2144
  // User-Agent from passed headers
2145
2145
  I && I.userAgent ? I.userAgent : (
2146
2146
  // navigator.userAgent
2147
- le
2147
+ ue
2148
2148
  )
2149
2149
  )
2150
- ), r = new Xt(e, !0), c = t ? Ts(_t, t) : _t, g = function(h) {
2151
- return h == te ? function() {
2152
- return new Ft(h, a, c, r).set("ua", a).set(S, this.getBrowser()).set(F, this.getCPU()).set(R, this.getDevice()).set(x, this.getEngine()).set(O, this.getOS()).get();
2150
+ ), r = new Xt(e, !0), c = t ? Ts(_t, t) : _t, p = function(h) {
2151
+ return h == se ? function() {
2152
+ return new Nt(h, a, c, r).set("ua", a).set(S, this.getBrowser()).set(N, this.getCPU()).set(R, this.getDevice()).set(x, this.getEngine()).set(O, this.getOS()).get();
2153
2153
  } : function() {
2154
- return new Ft(h, a, c[h], r).parseUA().get();
2154
+ return new Nt(h, a, c[h], r).parseUA().get();
2155
2155
  };
2156
2156
  };
2157
2157
  return D.call(this, [
2158
- ["getBrowser", g(S)],
2159
- ["getCPU", g(F)],
2160
- ["getDevice", g(R)],
2161
- ["getEngine", g(x)],
2162
- ["getOS", g(O)],
2163
- ["getResult", g(te)],
2158
+ ["getBrowser", p(S)],
2159
+ ["getCPU", p(N)],
2160
+ ["getDevice", p(R)],
2161
+ ["getEngine", p(x)],
2162
+ ["getOS", p(O)],
2163
+ ["getResult", p(se)],
2164
2164
  ["getUA", function() {
2165
2165
  return a;
2166
2166
  }],
2167
2167
  ["setUA", function(h) {
2168
- return ge(h) && (a = h.length > ct ? Te(h, ct) : h), this;
2168
+ return ge(h) && (a = h.length > ct ? Ie(h, ct) : h), this;
2169
2169
  }]
2170
2170
  ]).setUA(a), this;
2171
2171
  }
2172
2172
  L.VERSION = ms;
2173
- L.BROWSER = ze([l, u, Se, n]);
2173
+ L.BROWSER = ze([l, u, Te, n]);
2174
2174
  L.CPU = ze([T]);
2175
- L.DEVICE = ze([o, d, n, Ce, w, y, f, U, Me]);
2175
+ L.DEVICE = ze([o, d, n, Me, w, y, f, U, Se]);
2176
2176
  L.ENGINE = L.OS = ze([l, u]);
2177
2177
  class As {
2178
2178
  constructor(t, e) {
2179
2179
  b(this, "config");
2180
2180
  b(this, "sdkConfig");
2181
- this.config = t, this.sdkConfig = e;
2181
+ b(this, "error");
2182
+ this.config = t, this.sdkConfig = e, this.on("openGame", async () => {
2183
+ try {
2184
+ this.error = void 0;
2185
+ const s = await this.openGame();
2186
+ this.send("openGameResponse", s);
2187
+ } catch (s) {
2188
+ this.error = s, this.send("openGameError", this.error);
2189
+ }
2190
+ }), this.on("play", async (s) => {
2191
+ try {
2192
+ this.error = void 0;
2193
+ const a = await this.play(s);
2194
+ this.send("playResponse", a);
2195
+ } catch (a) {
2196
+ this.error = a, this.send("playError", this.error);
2197
+ }
2198
+ }), this.on("freeRounds", async (s) => {
2199
+ try {
2200
+ this.error = void 0;
2201
+ const a = await this.freeRounds(s);
2202
+ this.send("freeRoundsResponse", a);
2203
+ } catch (a) {
2204
+ this.error = a, this.send("freeRoundsError", this.error);
2205
+ }
2206
+ }), this.on("getBalance", async () => {
2207
+ try {
2208
+ this.error = void 0;
2209
+ const s = await this.getBalance();
2210
+ this.send("balance", s);
2211
+ } catch {
2212
+ }
2213
+ }), this.showHistory = this.showHistory.bind(this), this.on("history", this.showHistory);
2182
2214
  }
2183
2215
  on(t, e, s) {
2184
2216
  const a = function(c) {
@@ -2192,6 +2224,23 @@ class As {
2192
2224
  payload: e
2193
2225
  });
2194
2226
  }
2227
+ async openGame() {
2228
+ throw new Error("Not implemented");
2229
+ }
2230
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2231
+ async play(t) {
2232
+ throw new Error("Not implemented");
2233
+ }
2234
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2235
+ async freeRounds(t) {
2236
+ throw new Error("Not implemented");
2237
+ }
2238
+ async getBalance() {
2239
+ throw new Error("Not implemented");
2240
+ }
2241
+ async showHistory() {
2242
+ throw new Error("Not implemented");
2243
+ }
2195
2244
  }
2196
2245
  class Ps {
2197
2246
  constructor(t) {
@@ -2253,14 +2302,14 @@ class Ps {
2253
2302
  s !== -1 && this.eventListeners[t].splice(s, 1);
2254
2303
  }
2255
2304
  }
2256
- function Le(i) {
2305
+ function Be(i) {
2257
2306
  return JSON.parse(i == null ? void 0 : i.data);
2258
2307
  }
2259
2308
  function Os(i) {
2260
2309
  var t;
2261
2310
  return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "Ping";
2262
2311
  }
2263
- function Nt(i) {
2312
+ function Ft(i) {
2264
2313
  var t;
2265
2314
  return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "RealityCheck";
2266
2315
  }
@@ -2276,7 +2325,7 @@ function Dt(i) {
2276
2325
  function Us(i) {
2277
2326
  return Fe(i) && i.body.event.includes("_RESULT");
2278
2327
  }
2279
- var ie, Ie;
2328
+ var ae, Ae;
2280
2329
  class Rs extends Ps {
2281
2330
  constructor(e, s) {
2282
2331
  const a = new URL(e.apiUrl);
@@ -2311,13 +2360,13 @@ class Rs extends Ps {
2311
2360
  */
2312
2361
  b(this, "seqId", 0);
2313
2362
  b(this, "gameCode");
2314
- M(this, ie);
2315
- M(this, Ie);
2363
+ M(this, ae);
2364
+ M(this, Ae);
2316
2365
  b(this, "onMessage", (e) => {
2317
- const s = Le(e);
2318
- (Fe(s) || Os(s) || Nt(s)) && this.sendAcknowledgement(s), Nt(s) && this.handleRealityCheck(s);
2366
+ const s = Be(e);
2367
+ (Fe(s) || Os(s) || Ft(s)) && this.sendAcknowledgement(s), Ft(s) && this.handleRealityCheck(s);
2319
2368
  });
2320
- this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, v(this, ie, s.requestTimeoutMs), v(this, Ie, s.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
2369
+ this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, E(this, ae, s.requestTimeoutMs), E(this, Ae, s.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
2321
2370
  }
2322
2371
  handleRealityCheck(e) {
2323
2372
  this.eventListeners.realityCheck.forEach((s) => {
@@ -2355,16 +2404,16 @@ class Rs extends Ps {
2355
2404
  request(e, s) {
2356
2405
  const a = this.buildPayload(e, s);
2357
2406
  return new Promise((r, c) => {
2358
- setTimeout(() => c({ type: "timeout" }), k(this, ie));
2359
- const g = (h) => {
2360
- const p = Le(h);
2407
+ setTimeout(() => c({ type: "timeout" }), k(this, ae));
2408
+ const p = (h) => {
2409
+ const g = Be(h);
2361
2410
  try {
2362
- e.cId === p.header.cId && (this.removeEventListener("message", g), p.header.code === 1 ? r(p) : c({ message: p, type: "error" }));
2411
+ e.cId === g.header.cId && (this.removeEventListener("message", p), g.header.code === 1 ? r(g) : c({ message: g, type: "error" }));
2363
2412
  } catch {
2364
- c({ message: p, type: "error" });
2413
+ c({ message: g, type: "error" });
2365
2414
  }
2366
2415
  };
2367
- this.addEventListener("message", g), this.send(a);
2416
+ this.addEventListener("message", p), this.send(a);
2368
2417
  });
2369
2418
  }
2370
2419
  freeRounds(e) {
@@ -2377,7 +2426,7 @@ class Rs extends Ps {
2377
2426
  async authenticate(e = !1) {
2378
2427
  const s = this.buildHeader("Authenticate"), a = {
2379
2428
  clientType: 3,
2380
- version: k(this, Ie),
2429
+ version: k(this, Ae),
2381
2430
  reconnect: e
2382
2431
  };
2383
2432
  return this.request(s, a).then((r) => r.body).catch((r) => {
@@ -2397,14 +2446,14 @@ class Rs extends Ps {
2397
2446
  gameCode: this.gameCode
2398
2447
  };
2399
2448
  return new Promise((a, r) => {
2400
- const c = (g) => {
2401
- const h = Le(g);
2449
+ const c = (p) => {
2450
+ const h = Be(p);
2402
2451
  xs(h) ? (this.removeEventListener("message", c), a(h.body)) : Dt(h) && r({ data: h.body, type: "error" });
2403
2452
  };
2404
2453
  this.addEventListener("message", c), this.request(e, s).catch(
2405
- (g) => {
2454
+ (p) => {
2406
2455
  var h;
2407
- return r({ data: (h = g == null ? void 0 : g.message) == null ? void 0 : h.body, type: g.type });
2456
+ return r({ data: (h = p == null ? void 0 : p.message) == null ? void 0 : h.body, type: p.type });
2408
2457
  }
2409
2458
  );
2410
2459
  });
@@ -2418,24 +2467,24 @@ class Rs extends Ps {
2418
2467
  ...this.getBodyExtras(e),
2419
2468
  data: s
2420
2469
  };
2421
- return new Promise((c, g) => {
2422
- const h = (p) => {
2423
- const m = Le(p);
2424
- Fe(m) && r.seqId === m.body.correlationSeqId && (this.removeEventListener("message", h), Us(m) ? c(m.body) : Dt(m) && g({ data: m.body, type: "error" }));
2470
+ return new Promise((c, p) => {
2471
+ const h = (g) => {
2472
+ const m = Be(g);
2473
+ Fe(m) && r.seqId === m.body.correlationSeqId && (this.removeEventListener("message", h), Us(m) ? c(m.body) : Dt(m) && p({ data: m.body, type: "error" }));
2425
2474
  };
2426
2475
  this.addEventListener("message", h), this.request(a, r).catch(
2427
- (p) => {
2476
+ (g) => {
2428
2477
  var m;
2429
- return g({ data: (m = p == null ? void 0 : p.message) == null ? void 0 : m.body, type: p.type });
2478
+ return p({ data: (m = g == null ? void 0 : g.message) == null ? void 0 : m.body, type: g.type });
2430
2479
  }
2431
2480
  );
2432
2481
  });
2433
2482
  }
2434
2483
  setRequestTimeoutMs(e) {
2435
- v(this, ie, e);
2484
+ E(this, ae, e);
2436
2485
  }
2437
2486
  }
2438
- ie = new WeakMap(), Ie = new WeakMap();
2487
+ ae = new WeakMap(), Ae = new WeakMap();
2439
2488
  const Ls = {
2440
2489
  CA_BC: "CA",
2441
2490
  CA_ON: "CA",
@@ -2482,7 +2531,7 @@ function Yt(i) {
2482
2531
  var t, e;
2483
2532
  return {
2484
2533
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2485
- code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2534
+ code: ((t = i.data) == null ? void 0 : t.code) ?? te.UNKNOWN,
2486
2535
  details: (e = i.data) == null ? void 0 : e.details
2487
2536
  };
2488
2537
  }
@@ -2610,7 +2659,7 @@ function es(i) {
2610
2659
  var t, e;
2611
2660
  return {
2612
2661
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2613
- code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2662
+ code: ((t = i.data) == null ? void 0 : t.code) ?? te.UNKNOWN,
2614
2663
  details: (e = i.data) == null ? void 0 : e.details
2615
2664
  };
2616
2665
  }
@@ -2718,7 +2767,7 @@ function ss(i) {
2718
2767
  var t, e;
2719
2768
  return {
2720
2769
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2721
- code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2770
+ code: ((t = i.data) == null ? void 0 : t.code) ?? te.UNKNOWN,
2722
2771
  details: (e = i.data) == null ? void 0 : e.details
2723
2772
  };
2724
2773
  }
@@ -2762,46 +2811,16 @@ const oi = {
2762
2811
  tur: "tr",
2763
2812
  ukr: "uk",
2764
2813
  vie: "vi"
2765
- }, { device: _s } = L(navigator.userAgent), Fs = P("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
2814
+ }, { device: _s } = L(navigator.userAgent), Ns = P("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
2766
2815
  class ri extends As {
2767
2816
  constructor(...e) {
2768
2817
  super(...e);
2769
2818
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2770
2819
  // @ts-ignore
2771
2820
  b(this, "socket");
2772
- b(this, "error");
2773
- this.on("openGame", async () => {
2774
- try {
2775
- this.error = void 0;
2776
- const s = await this.openGame();
2777
- this.send("openGameResponse", s);
2778
- } catch (s) {
2779
- this.error = s, this.send("openGameError", s);
2780
- }
2781
- }), this.on("play", async (s) => {
2782
- try {
2783
- this.error = void 0;
2784
- const a = await this.play(s);
2785
- this.send("playResponse", a);
2786
- } catch (a) {
2787
- this.error = a, this.send("playError", a);
2788
- }
2789
- }), this.on("freeRounds", async (s) => {
2790
- try {
2791
- this.error = void 0, await this.socket.freeRounds(s), this.send("freeRoundsResponse", s);
2792
- } catch (a) {
2793
- this.error = a, this.send("freeRoundsError", a);
2794
- }
2795
- }), this.on("getBalance", async () => {
2796
- try {
2797
- this.error = void 0;
2798
- const s = await this.socket.getBalance();
2799
- this.send("balance", { balance: s.balance });
2800
- } catch {
2801
- }
2802
- }), this.on("configured", (s) => {
2821
+ this.on("configured", (s) => {
2803
2822
  this.socket.setRequestTimeoutMs(s.ui.requestTimeoutMs);
2804
- }), this.registerFromSdkEvents();
2823
+ });
2805
2824
  }
2806
2825
  initialize(e) {
2807
2826
  this.socket = new Rs(e, {
@@ -2815,7 +2834,7 @@ class ri extends As {
2815
2834
  }) : s.code === 1011 ? this.error || this.send("error", { type: "CLOSE", messageCode: "UNKNOWN", messageKey: "RgsError.UNKNOWN" }) : this.reconnect();
2816
2835
  }), ["mobile", "tablet"].includes(_s.type ?? "") && document.addEventListener("visibilitychange", async () => {
2817
2836
  document.hidden || (this.socket.socket ? this.socket.socket && [WebSocket.CONNECTING, WebSocket.OPEN].includes(this.socket.socket.readyState) && this.socket.close() : this.reconnect());
2818
- })), this.socket.addEventListener("error", (s) => Fs("error", s)), this.socket.addEventListener("realityCheck", (s) => {
2837
+ })), this.socket.addEventListener("error", (s) => Ns("error", s)), this.socket.addEventListener("realityCheck", (s) => {
2819
2838
  this.send("realityCheck", s);
2820
2839
  });
2821
2840
  }
@@ -2827,13 +2846,13 @@ class ri extends As {
2827
2846
  }
2828
2847
  }
2829
2848
  async openGame() {
2830
- var H, Oe;
2831
- const e = new URLSearchParams(window.location.search), s = e.get("apiUrl"), a = e.get("cageCode"), r = e.get("gameCode"), c = e.get("operatorCode"), g = e.get("playMode"), h = e.get("token"), p = e.get("username"), m = e.get("gameHistoryUrl"), C = e.get("homeUrl") ?? void 0, A = e.get("cashierUrl") ?? void 0;
2832
- this.initialize({ apiUrl: s, cageCode: a, gameCode: r, operatorCode: c, playMode: g, token: h, username: p });
2849
+ var H, xe;
2850
+ const e = new URLSearchParams(window.location.search), s = e.get("apiUrl"), a = e.get("cageCode"), r = e.get("gameCode"), c = e.get("operatorCode"), p = e.get("playMode"), h = e.get("token"), g = e.get("username"), m = e.get("gameHistoryUrl"), C = e.get("homeUrl") ?? void 0, A = e.get("cashierUrl") ?? void 0;
2851
+ this.initialize({ apiUrl: s, cageCode: a, gameCode: r, operatorCode: c, playMode: p, token: h, username: g });
2833
2852
  try {
2834
2853
  await this.socket.connect();
2835
2854
  } catch {
2836
- throw { type: "error", data: { code: He.CONNECTION_ERROR } };
2855
+ throw { type: "error", data: { code: te.CONNECTION_ERROR } };
2837
2856
  }
2838
2857
  let G;
2839
2858
  try {
@@ -2841,15 +2860,15 @@ class ri extends As {
2841
2860
  } catch (X) {
2842
2861
  throw { type: X.type, data: X.type === "error" ? Yt(X.data) : void 0 };
2843
2862
  }
2844
- let pe;
2863
+ let we;
2845
2864
  try {
2846
- pe = await this.socket.openGame();
2865
+ we = await this.socket.openGame();
2847
2866
  } catch (X) {
2848
2867
  throw { type: X.type, data: X.type === "error" ? es(X.data) : void 0 };
2849
2868
  }
2850
2869
  const _ = Jt(G), K = Zt(
2851
2870
  G,
2852
- pe,
2871
+ we,
2853
2872
  this.config.dataDecoder && bt[this.config.dataDecoder]
2854
2873
  );
2855
2874
  this.sdkConfig.api = {
@@ -2858,7 +2877,7 @@ class ri extends As {
2858
2877
  game: r,
2859
2878
  integration: c,
2860
2879
  jurisdiction: _.contract.jurisdiction,
2861
- playMode: g,
2880
+ playMode: p,
2862
2881
  user: _.contract.username,
2863
2882
  integrationData: {
2864
2883
  token: h
@@ -2872,7 +2891,7 @@ class ri extends As {
2872
2891
  backendSessionId: K.contract.sessionId,
2873
2892
  lastRoundId: K.contract.roundId
2874
2893
  };
2875
- const Q = (Oe = (H = e.get("languageCode")) == null ? void 0 : H.split("_")) == null ? void 0 : Oe[0];
2894
+ const Q = (xe = (H = e.get("languageCode")) == null ? void 0 : H.split("_")) == null ? void 0 : xe[0];
2876
2895
  return Q && (this.sdkConfig.ui.language = Q.length === 3 ? Bs[Q] ?? Q : Q), K;
2877
2896
  }
2878
2897
  async play(e) {
@@ -2881,15 +2900,15 @@ class ri extends As {
2881
2900
  const {
2882
2901
  contract: { bet: s, forcedOutcomes: a, ...r },
2883
2902
  extra: c,
2884
- payloadToInject: g,
2903
+ payloadToInject: p,
2885
2904
  actionType: h
2886
- } = e, p = this.config.dataEncoder && os[this.config.dataEncoder], m = {
2905
+ } = e, g = this.config.dataEncoder && os[this.config.dataEncoder], m = {
2887
2906
  bet: s ? { baseBet: s.base, betMultiplier: s.multiplier } : void 0,
2888
2907
  forcedOutcomes: a,
2889
2908
  // TODO: get rid of contractRest - it' a legacy from old RGS
2890
2909
  ...r,
2891
- ...g,
2892
- opaqueUiToGameServer: p ? p(c) : c
2910
+ ...p,
2911
+ opaqueUiToGameServer: g ? g(c) : c
2893
2912
  };
2894
2913
  let C;
2895
2914
  try {
@@ -2899,17 +2918,30 @@ class ri extends As {
2899
2918
  }
2900
2919
  return ts(C, this.config.dataDecoder && bt[this.config.dataDecoder]);
2901
2920
  }
2902
- registerFromSdkEvents() {
2903
- this.on("history", () => {
2904
- const {
2905
- api: { game: e, integration: s, integrationData: a, jurisdiction: r, user: c, gameHistoryUrl: g },
2906
- ui: { language: h }
2907
- } = this.sdkConfig, p = c.replace(/^user_/, "").replace(new RegExp(`_${s}$`), ""), m = new URL(window.location.href);
2908
- m.hostname = m.hostname.replace(/^v\./, "").replace(/^play\./, "history."), m.pathname = m.pathname.replace(/(\/[0-9]+\.[0-9]+\.[0-9]+)?\/wrapper\.html/, "/list/index.html"), m.search = "", m.searchParams.set("apiUrl", new URL(g).origin), m.searchParams.set("gameCode", e), r && m.searchParams.set("jurisdiction", r), m.searchParams.set("operatorCode", s), m.searchParams.set("token", a.token), m.searchParams.set("username", p), m.searchParams.set("languageCode", h), this.config.gameHistoryUrl && m.searchParams.set("gameHistoryUrl", this.config.gameHistoryUrl), window.open(m.toString(), "_blank");
2909
- });
2921
+ async freeRounds(e) {
2922
+ try {
2923
+ await this.socket.freeRounds(e);
2924
+ } catch {
2925
+ throw { type: "error", data: { code: te.UNKNOWN } };
2926
+ }
2927
+ return e;
2928
+ }
2929
+ async getBalance() {
2930
+ try {
2931
+ return { balance: (await this.socket.getBalance()).balance };
2932
+ } catch {
2933
+ throw { type: "error", data: { code: te.UNKNOWN } };
2934
+ }
2935
+ }
2936
+ async showHistory() {
2937
+ const {
2938
+ api: { game: e, integration: s, integrationData: a, jurisdiction: r, user: c, gameHistoryUrl: p },
2939
+ ui: { language: h }
2940
+ } = this.sdkConfig, g = c.replace(/^user_/, "").replace(new RegExp(`_${s}$`), ""), m = new URL(window.location.href);
2941
+ m.hostname = m.hostname.replace(/^v\./, "").replace(/^play\./, "history."), m.pathname = m.pathname.replace(/(\/[0-9]+\.[0-9]+\.[0-9]+)?\/wrapper\.html/, "/list/index.html"), m.search = "", m.searchParams.set("apiUrl", new URL(p).origin), m.searchParams.set("gameCode", e), r && m.searchParams.set("jurisdiction", r), m.searchParams.set("operatorCode", s), m.searchParams.set("token", a.token), m.searchParams.set("username", g), m.searchParams.set("languageCode", h), this.config.gameHistoryUrl && m.searchParams.set("gameHistoryUrl", this.config.gameHistoryUrl), window.open(m.toString(), "_blank");
2910
2942
  }
2911
2943
  }
2912
- class Ns {
2944
+ class Fs {
2913
2945
  constructor(t, e, s) {
2914
2946
  b(this, "trackers");
2915
2947
  b(this, "config");
@@ -2980,30 +3012,30 @@ async function zs() {
2980
3012
  function rt() {
2981
3013
  return window.innerWidth >= window.innerHeight ? Gs : Hs;
2982
3014
  }
2983
- var Ne, ae, ne, oe, Ae, De, Pe, Ge;
2984
- class ci extends Ns {
3015
+ var De, ne, oe, re, Pe, Ge, Oe, He;
3016
+ class ci extends Fs {
2985
3017
  constructor(...e) {
2986
3018
  super(...e);
2987
3019
  b(this, "FPS_SAMPLE_INTERVAL", 1e4);
2988
3020
  // wrapper state
2989
- M(this, Ne, 0);
2990
- M(this, ae);
3021
+ M(this, De, 0);
2991
3022
  M(this, ne);
2992
3023
  M(this, oe);
2993
- M(this, Ae, !1);
2994
- M(this, De, !1);
2995
- M(this, Pe, "");
2996
- M(this, Ge, []);
2997
- v(this, ne, {}), v(this, oe, this.deviceInfo()), v(this, ae, this.config.gameVersion), this.on("state", ({ balance: s }) => {
2998
- v(this, Ne, s);
3024
+ M(this, re);
3025
+ M(this, Pe, !1);
3026
+ M(this, Ge, !1);
3027
+ M(this, Oe, "");
3028
+ M(this, He, []);
3029
+ E(this, oe, {}), E(this, re, this.deviceInfo()), E(this, ne, this.config.gameVersion), this.on("state", ({ balance: s }) => {
3030
+ E(this, De, s);
2999
3031
  }), this.on("autoplay", ({ action: s }) => {
3000
- ["start", "resume"].includes(s) ? v(this, Ae, !0) : v(this, Ae, !1);
3032
+ ["start", "resume"].includes(s) ? E(this, Pe, !0) : E(this, Pe, !1);
3001
3033
  }), this.on("settings", ({ fastPlay: s }) => {
3002
- s !== void 0 && v(this, De, s);
3034
+ s !== void 0 && E(this, Ge, s);
3003
3035
  }), this.registerEvents();
3004
3036
  }
3005
3037
  async registerEvents() {
3006
- k(this, oe).then((e) => {
3038
+ k(this, re).then((e) => {
3007
3039
  this.track("Device Information", e);
3008
3040
  }), this.on("loadStart", () => {
3009
3041
  this.track("Game Loading", { progress: 0, step: "initial" });
@@ -3017,9 +3049,9 @@ class ci extends Ns {
3017
3049
  systemMessageType: e.type
3018
3050
  });
3019
3051
  }), this.on("openGameResponse", async (e) => {
3020
- v(this, Pe, e.contract.stateType.nextRound), v(this, ne, {
3052
+ E(this, Oe, e.contract.stateType.nextRound), E(this, oe, {
3021
3053
  balanceInCoins: e.contract.balance.coins,
3022
- clientVersion: k(this, ae),
3054
+ clientVersion: k(this, ne),
3023
3055
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
3024
3056
  coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
3025
3057
  currency: this.sdkConfig.api.currency,
@@ -3042,17 +3074,17 @@ class ci extends Ns {
3042
3074
  // rtpVariant: 'unknown',
3043
3075
  serverVersion: e.contract.metaData.version
3044
3076
  // testVariants: '',
3045
- }), this.track("Game Open", k(this, ne));
3077
+ }), this.track("Game Open", k(this, oe));
3046
3078
  }), this.on("playCycleEnd", async (e) => {
3047
- const s = await k(this, oe), { base: a, multiplier: r } = e.contract.bet.lastPaid ?? {}, c = e.contract.balance.coins, g = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, h = e.contract.win.total, p = h - g, m = "spin", C = e.contract.roundId;
3079
+ const s = await k(this, re), { base: a, multiplier: r } = e.contract.bet.lastPaid ?? {}, c = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, h = e.contract.win.total, g = h - p, m = "spin", C = e.contract.roundId;
3048
3080
  this.track("Betting Activity", {
3049
- balance: c - p,
3081
+ balance: c - g,
3050
3082
  balanceAfter: c,
3051
3083
  baseBet: a,
3052
3084
  // baseBetIndex,
3053
3085
  betMultiplier: r,
3054
3086
  betType: m,
3055
- gameVersion: k(this, ae),
3087
+ gameVersion: k(this, ne),
3056
3088
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
3057
3089
  coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
3058
3090
  currency: this.sdkConfig.api.currency,
@@ -3060,7 +3092,7 @@ class ci extends Ns {
3060
3092
  gameCode: this.sdkConfig.api.game,
3061
3093
  gameCodeServer: this.sdkConfig.api.game,
3062
3094
  isMobile: s.isMobile,
3063
- netResult: p,
3095
+ netResult: g,
3064
3096
  operatorName: "kalamba",
3065
3097
  orientation: rt(),
3066
3098
  partnerId: this.sdkConfig.api.brand,
@@ -3071,9 +3103,9 @@ class ci extends Ns {
3071
3103
  // TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
3072
3104
  // roundTypes: [...this.#roundTypes],
3073
3105
  roundTypes: ["BaseGame"],
3074
- totalBet: g,
3106
+ totalBet: p,
3075
3107
  totalWin: h
3076
- }), v(this, Ge, []);
3108
+ }), E(this, He, []);
3077
3109
  }), this.on("telemetry.click", (e) => {
3078
3110
  this.track("UI Interaction", {
3079
3111
  action: "click",
@@ -3110,16 +3142,16 @@ class ci extends Ns {
3110
3142
  getExtraUiInteractionData() {
3111
3143
  return {
3112
3144
  orientation: rt(),
3113
- stateType: k(this, Pe)
3145
+ stateType: k(this, Oe)
3114
3146
  };
3115
3147
  }
3116
3148
  async deviceInfo() {
3117
- var g;
3149
+ var p;
3118
3150
  const { browser: e, device: s, os: a } = L(navigator.userAgent), r = Vs(), c = await zs();
3119
3151
  return {
3120
3152
  browserName: e.name,
3121
3153
  browserVersion: e.version,
3122
- connection: (g = navigator.connection) == null ? void 0 : g.effectiveType,
3154
+ connection: (p = navigator.connection) == null ? void 0 : p.effectiveType,
3123
3155
  deviceName: s.model,
3124
3156
  deviceType: s.type,
3125
3157
  isMobile: ["mobile", "tablet"].includes(s.type ?? ""),
@@ -3140,7 +3172,7 @@ class ci extends Ns {
3140
3172
  };
3141
3173
  }
3142
3174
  }
3143
- Ne = new WeakMap(), ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), Ae = new WeakMap(), De = new WeakMap(), Pe = new WeakMap(), Ge = new WeakMap();
3175
+ De = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), re = new WeakMap(), Pe = new WeakMap(), Ge = new WeakMap(), Oe = new WeakMap(), He = new WeakMap();
3144
3176
  var qs = rs();
3145
3177
  const zt = /* @__PURE__ */ cs(qs);
3146
3178
  class is {
@@ -3151,16 +3183,16 @@ class is {
3151
3183
  }
3152
3184
  }
3153
3185
  const qt = 25, Wt = 1e4;
3154
- var re, ce, de, W;
3186
+ var ce, de, le, W;
3155
3187
  class di extends is {
3156
3188
  constructor(...e) {
3157
3189
  super(...e);
3158
- M(this, re, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
3159
- M(this, ce);
3190
+ M(this, ce, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
3160
3191
  M(this, de);
3192
+ M(this, le);
3161
3193
  M(this, W, []);
3162
3194
  b(this, "processQueueForced");
3163
- v(this, ce, (/* @__PURE__ */ new Date()).getTime()), v(this, W, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(k(this, re), {
3195
+ E(this, de, (/* @__PURE__ */ new Date()).getTime()), E(this, W, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(k(this, ce), {
3164
3196
  method: "OPTIONS"
3165
3197
  }).catch(zt), this.subscribe();
3166
3198
  }
@@ -3168,14 +3200,14 @@ class di extends is {
3168
3200
  window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
3169
3201
  }
3170
3202
  schedule() {
3171
- k(this, de) && clearTimeout(k(this, de)), v(this, de, window.setTimeout(() => this.processQueue(), Wt));
3203
+ k(this, le) && clearTimeout(k(this, le)), E(this, le, window.setTimeout(() => this.processQueue(), Wt));
3172
3204
  }
3173
3205
  send(e) {
3174
- v(this, ce, (/* @__PURE__ */ new Date()).getTime());
3206
+ E(this, de, (/* @__PURE__ */ new Date()).getTime());
3175
3207
  try {
3176
- navigator.sendBeacon(k(this, re), JSON.stringify(e));
3208
+ navigator.sendBeacon(k(this, ce), JSON.stringify(e));
3177
3209
  } catch {
3178
- fetch(k(this, re), {
3210
+ fetch(k(this, ce), {
3179
3211
  body: JSON.stringify(e),
3180
3212
  method: "POST",
3181
3213
  headers: {
@@ -3190,7 +3222,7 @@ class di extends is {
3190
3222
  k(this, W).push(e), this.processQueue();
3191
3223
  }
3192
3224
  processQueue(e = !1) {
3193
- if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && k(this, W).length < qt && (/* @__PURE__ */ new Date()).getTime() - k(this, ce) < Wt))
3225
+ if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && k(this, W).length < qt && (/* @__PURE__ */ new Date()).getTime() - k(this, de) < Wt))
3194
3226
  for (; k(this, W).length; ) {
3195
3227
  const s = k(this, W).splice(0, qt).map((a) => ({
3196
3228
  ...a,
@@ -3209,7 +3241,7 @@ class di extends is {
3209
3241
  });
3210
3242
  }
3211
3243
  }
3212
- re = new WeakMap(), ce = new WeakMap(), de = new WeakMap(), W = new WeakMap();
3244
+ ce = new WeakMap(), de = new WeakMap(), le = new WeakMap(), W = new WeakMap();
3213
3245
  const Ws = P("LoggingTracker", "color:#000000;font-weight:bold;");
3214
3246
  class li extends is {
3215
3247
  track(t, e) {
@@ -3233,7 +3265,7 @@ export {
3233
3265
  ti as RelaxFEIMPlugin,
3234
3266
  As as RgsPlugin,
3235
3267
  ai as SoftSwissPlugin,
3236
- Ns as TelemetryPlugin,
3268
+ Fs as TelemetryPlugin,
3237
3269
  is as Tracker,
3238
3270
  si as TukoPlugin
3239
3271
  };