@kalamba/sdk 0.19.0 → 0.23.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
@@ -2,35 +2,35 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2025, Kalamba Games Limited
4
4
  */
5
- var ti = Object.defineProperty;
6
- var wt = (s) => {
7
- throw TypeError(s);
5
+ var as = Object.defineProperty;
6
+ var wt = (i) => {
7
+ throw TypeError(i);
8
8
  };
9
- var ii = (s, t, e) => t in s ? ti(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
10
- var b = (s, t, e) => ii(s, typeof t != "symbol" ? t + "" : t, e), mt = (s, t, e) => t.has(s) || wt("Cannot " + e);
11
- var k = (s, t, e) => (mt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), M = (s, t, e) => t.has(s) ? wt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), v = (s, t, e, i) => (mt(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
9
+ var ns = (i, t, e) => t in i ? as(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
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
12
  import { a as He } from "./errors-NnLrKjTz.js";
13
- import { d as bt, e as si } from "./encoders-BDr7fjKQ.js";
14
- import { r as ai, g as ni, v as oi } from "./v4-BfzDHJEo.js";
15
- function x(s, t) {
16
- return (e, ...i) => {
17
- console.log(`[%c${s}\x1B[m] %s`, t, e, ...i);
13
+ import { d as bt, e as os } from "./encoders-BDr7fjKQ.js";
14
+ import { r as rs, g as cs, v as ds } from "./v4-BfzDHJEo.js";
15
+ function P(i, t) {
16
+ return (e, ...s) => {
17
+ console.log(`[%c${i}\x1B[m] %s`, t, e, ...s);
18
18
  };
19
19
  }
20
- function zt(s, t) {
21
- return Math.round(s * 100 / t);
20
+ function jt(i, t) {
21
+ return Math.round(i * 100 / t);
22
22
  }
23
- class j {
23
+ class B {
24
24
  constructor(t, e) {
25
25
  b(this, "config");
26
26
  b(this, "sdkConfig");
27
27
  this.config = t, this.sdkConfig = e;
28
28
  }
29
- on(t, e, i) {
30
- const a = function(r) {
31
- r.data.message !== `kalamba:wrapper-casino:${t}` && r.data.message !== `kalamba:wrapper:${t}` || e(r.data.payload);
29
+ on(t, e, s) {
30
+ const a = function(c) {
31
+ c.data.message !== `kalamba:wrapper-casino:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
32
32
  };
33
- window.addEventListener("message", a, i);
33
+ window.addEventListener("message", a, s);
34
34
  }
35
35
  send(t, ...[e]) {
36
36
  window.postMessage({
@@ -39,22 +39,22 @@ class j {
39
39
  });
40
40
  }
41
41
  }
42
- const ri = x("BasicPlugin", "color:#000000;font-weight:bold;");
43
- class Qi extends j {
42
+ const ls = P("BasicPlugin", "color:#000000;font-weight:bold;");
43
+ class Xs extends B {
44
44
  constructor(...t) {
45
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ri("configured");
45
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ls("configured");
46
46
  }
47
47
  registerToSdkEvents() {
48
48
  window.addEventListener("message", (t) => {
49
49
  try {
50
- const { type: e, payload: i } = t.data;
50
+ const { type: e, payload: s } = t.data;
51
51
  switch (e) {
52
52
  case "doAudioSettings":
53
- this.send("settings", { music: i == null ? void 0 : i.musicEnabled, sounds: i == null ? void 0 : i.soundEnabled });
53
+ this.send("settings", { music: s == null ? void 0 : s.musicEnabled, sounds: s == null ? void 0 : s.soundEnabled });
54
54
  return;
55
55
  case "doBalanceUpdate":
56
- const { currency: a, coinValueInCents: d } = this.sdkConfig.api;
57
- i.currency === a && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance: zt(i.balanceInCurrency, d) }) : (i.balanceInCoins, this.send("balance", { balance: i.balanceInCoins }));
56
+ const { currency: a, coinValueInCents: r } = this.sdkConfig.api;
57
+ s.currency === a && typeof s.balanceInCurrency == "number" ? this.send("balance", { balance: jt(s.balanceInCurrency, r) }) : (s.balanceInCoins, this.send("balance", { balance: s.balanceInCoins }));
58
58
  return;
59
59
  case "doGamePause":
60
60
  this.send("freeze");
@@ -89,8 +89,8 @@ class Qi extends j {
89
89
  });
90
90
  }
91
91
  }
92
- const E = x("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), ci = x("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
93
- class Ki extends j {
92
+ const E = P("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), us = P("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
93
+ class Js extends B {
94
94
  constructor(...t) {
95
95
  super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
96
96
  }
@@ -114,19 +114,17 @@ class Ki extends j {
114
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));
115
115
  }
116
116
  _send(...t) {
117
- ci(...t), this.send(...t);
117
+ us.apply(null, t), this.send.apply(this, t);
118
118
  }
119
119
  }
120
- const di = x("GigPlugin", "color:#000000;font-weight:bold;");
121
- class Xi extends j {
120
+ const ft = P("GigPlugin", "color:#000000;font-weight:bold;");
121
+ class Ys extends B {
122
122
  constructor(...t) {
123
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), di("configured");
123
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ft("configured");
124
124
  }
125
125
  postMessage(t) {
126
- const e = {
127
- event: t
128
- };
129
- window.top.postMessage(e, "*");
126
+ const e = { event: t };
127
+ ft("postMessage", e), window.top.postMessage(e, "*");
130
128
  }
131
129
  registerToSdkEvents() {
132
130
  window.addEventListener("message", (t) => {
@@ -168,18 +166,18 @@ class Xi extends j {
168
166
  });
169
167
  }
170
168
  }
171
- const li = x("OryxPlugin", "color:#000000;font-weight:bold;");
172
- class Ji extends j {
169
+ const hs = P("OryxPlugin", "color:#000000;font-weight:bold;");
170
+ class Zs extends B {
173
171
  constructor(...t) {
174
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), li("configured");
172
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), hs("configured");
175
173
  }
176
174
  registerToSdkEvents() {
177
175
  window.addEventListener("message", (t) => {
178
176
  try {
179
- const { type: e, param: i } = t.data;
177
+ const { type: e, param: s } = t.data;
180
178
  switch (e) {
181
179
  case "doBalanceUpdate":
182
- this.send("balance", { balance: i });
180
+ this.send("balance", { balance: s });
183
181
  return;
184
182
  case "doGamePause":
185
183
  this.send("freeze");
@@ -223,62 +221,62 @@ class Ji extends j {
223
221
  });
224
222
  }
225
223
  }
226
- const qe = x("PariplayPlugin", "color:#000000;font-weight:bold;");
227
- function We(s) {
224
+ const qe = P("PariplayPlugin", "color:#000000;font-weight:bold;");
225
+ function We(i) {
228
226
  try {
229
- window.top.location = s;
227
+ window.top.location = i;
230
228
  } catch {
231
- window.location = s;
229
+ window.location = i;
232
230
  }
233
231
  }
234
- function je(s, t) {
235
- return new Promise(function(i, a) {
236
- const d = new XMLHttpRequest();
237
- d.onload = function() {
238
- d.status >= 200 && d.status < 300 ? i(d.responseText) : a(d.responseText);
239
- }, d.open(s, t), d.send();
232
+ function je(i, t) {
233
+ return new Promise(function(s, a) {
234
+ const r = new XMLHttpRequest();
235
+ r.onload = function() {
236
+ r.status >= 200 && r.status < 300 ? s(r.responseText) : a(r.responseText);
237
+ }, r.open(i, t), r.send();
240
238
  });
241
239
  }
242
240
  function $e() {
243
241
  }
244
- function ui(s) {
245
- return s.filter(function(e) {
242
+ function gs(i) {
243
+ return i.filter(function(e) {
246
244
  return e.messageType.toUpperCase() === "DATA";
247
245
  });
248
246
  }
249
- function Qe(s) {
250
- return s.filter(function(e) {
247
+ function Ke(i) {
248
+ return i.filter(function(e) {
251
249
  return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
252
250
  });
253
251
  }
254
- function qt(s) {
252
+ function $t(i) {
255
253
  try {
256
- return JSON.parse(s.text);
254
+ return JSON.parse(i.text);
257
255
  } catch {
258
256
  return {};
259
257
  }
260
258
  }
261
- function hi(s) {
262
- return s.map(qt).filter(Boolean).find(function(e) {
259
+ function ps(i) {
260
+ return i.map($t).filter(Boolean).find(function(e) {
263
261
  return e.betId != null && e.winId != null;
264
262
  }) || {};
265
263
  }
266
- function pi(s) {
267
- return s.map(qt).filter(Boolean).find(function(e) {
264
+ function ws(i) {
265
+ return i.map($t).filter(Boolean).find(function(e) {
268
266
  return e.TotalBet != null && e.TotalWin != null;
269
267
  }) || {};
270
268
  }
271
- class Yi extends j {
269
+ class ei extends B {
272
270
  constructor(...t) {
273
271
  super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), qe("configured");
274
272
  }
275
273
  postMessage(t, e) {
276
- const i = {
274
+ const s = {
277
275
  lang: this.sdkConfig.ui.language,
278
276
  sender: this.sdkConfig.api.game,
279
277
  type: t
280
278
  };
281
- e != null && (i.data = e), qe("postMessage", i), window.parent.postMessage(i, "*");
279
+ e != null && (s.data = e), qe("postMessage", s), window.parent.postMessage(s, "*");
282
280
  }
283
281
  coinsToCurrency(t) {
284
282
  return t * this.sdkConfig.api.coinValueInCents / 100;
@@ -320,16 +318,16 @@ class Yi extends j {
320
318
  };
321
319
  }
322
320
  processInfoUiMessages(t) {
323
- return t.reduce((e, i) => e.then(() => new Promise((a) => {
324
- const d = Object.assign({}, i, {
325
- buttons: i.buttons.filter((r) => r.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((r) => Object.assign({}, r, {
321
+ return t.reduce((e, s) => e.then(() => new Promise((a) => {
322
+ const r = Object.assign({}, s, {
323
+ buttons: s.buttons.filter((c) => c.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((c) => Object.assign({}, c, {
326
324
  onRelease: () => {
327
- const p = i.messageType.toUpperCase() === "POPUP" ? $e : a, h = this.buttonActions[r.action.toUpperCase()];
328
- h ? h(r, p) : p();
325
+ const g = s.messageType.toUpperCase() === "POPUP" ? $e : a, h = this.buttonActions[c.action.toUpperCase()];
326
+ h ? h(c, g) : g();
329
327
  }
330
328
  }))
331
329
  });
332
- qe("showMessage", d);
330
+ qe("showMessage", r);
333
331
  }).catch($e)), Promise.resolve()).then(() => {
334
332
  }).catch($e);
335
333
  }
@@ -359,26 +357,26 @@ class Yi extends j {
359
357
  registerFromSdkEvents() {
360
358
  let t = 0;
361
359
  this.on("openGameResponse", (e) => {
362
- let i;
360
+ let s;
363
361
  try {
364
362
  const a = JSON.parse(
365
363
  JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token
366
- ), d = JSON.parse(a.integrationSpecificAttributes.sessionData || "{}");
367
- i = {
364
+ ), r = JSON.parse(a.integrationSpecificAttributes.sessionData || "{}");
365
+ s = {
368
366
  ClientToken: a.integrationSpecificAttributes.clientToken,
369
367
  CurrencyCode: a.currency,
370
368
  PlayerTokenId: a.user,
371
- SessionData: d
369
+ SessionData: r
372
370
  };
373
371
  } catch {
374
- i = void 0;
372
+ s = void 0;
375
373
  }
376
374
  this.postMessage("gameDataLoaded", {
377
- LoadGameData: i,
375
+ LoadGameData: s,
378
376
  success: !0
379
377
  });
380
378
  try {
381
- const a = Qe(e.contract.uiMessages);
379
+ const a = Ke(e.contract.uiMessages);
382
380
  this.processInfoUiMessages(a);
383
381
  } catch {
384
382
  }
@@ -401,8 +399,8 @@ class Yi extends j {
401
399
  win: this.coinsToCurrency(e.contract.win.round)
402
400
  });
403
401
  try {
404
- const i = Qe(e.contract.uiMessages);
405
- this.processInfoUiMessages(i);
402
+ const s = Ke(e.contract.uiMessages);
403
+ this.processInfoUiMessages(s);
406
404
  } catch {
407
405
  }
408
406
  }), this.on("playError", (e) => {
@@ -420,14 +418,14 @@ class Yi extends j {
420
418
  e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
421
419
  )
422
420
  });
423
- const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = ui(e.contract.uiMessages), d = Qe(e.contract.uiMessages), r = hi(a), p = pi(a);
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);
424
422
  this.postMessage("ticketReceived", {
425
423
  Balance: this.coinsToCurrency(e.contract.balance.coins),
426
- BetAmount: i ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
427
- CreditTransactionId: r.betId,
428
- DebitTransactionId: r.winId,
429
- Message: d,
430
- SessionData: p,
424
+ BetAmount: s ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
425
+ CreditTransactionId: c.betId,
426
+ DebitTransactionId: c.winId,
427
+ Message: r,
428
+ SessionData: g,
431
429
  Status: {
432
430
  ErrCode: 0
433
431
  },
@@ -446,13 +444,13 @@ class Yi extends j {
446
444
  });
447
445
  }
448
446
  }
449
- const we = x("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
450
- class Zi extends j {
447
+ const we = P("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
448
+ class ti extends B {
451
449
  constructor(...e) {
452
450
  super(...e);
453
451
  b(this, "VERSION", "1.17.0");
454
- const i = document.createElement("script");
455
- i.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, i.onload = () => {
452
+ const s = document.createElement("script");
453
+ s.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, s.onload = () => {
456
454
  we("loaded"), window.FEIM.configure({
457
455
  p2pConfig: {
458
456
  currency: this.sdkConfig.api.currency,
@@ -462,13 +460,13 @@ class Zi extends j {
462
460
  }
463
461
  }
464
462
  }), we("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
465
- }, document.body.appendChild(i);
463
+ }, document.body.appendChild(s);
466
464
  }
467
465
  registerToSdkEvents() {
468
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(() => {
469
- this.send("help", {});
467
+ this.send("help");
470
468
  }), window.FEIM.on.togglePaytable(() => {
471
- this.send("paytable", {});
469
+ this.send("paytable");
472
470
  }), window.FEIM.on.unfreeze(() => this.send("unfreeze")), window.FEIM.on.updateSettings(
473
471
  ({ payload: [e] }) => this.send("settings", { sounds: e.sounds, fastPlay: e.fastPlay })
474
472
  );
@@ -485,11 +483,11 @@ class Zi extends j {
485
483
  }
486
484
  }), this.on("balance", ({ balance: e }) => {
487
485
  window.FEIM.send.balanceUpdate(e);
488
- }), this.on("bet", ({ base: e, multiplier: i }) => {
489
- window.FEIM.send.betUpdate(e * i);
486
+ }), this.on("bet", ({ base: e, multiplier: s }) => {
487
+ window.FEIM.send.betUpdate(e * s);
490
488
  }), this.on("error", (e) => {
491
- const i = "message" in e ? e.message : "Unknown error";
492
- window.FEIM.send.errorMessage(i);
489
+ const s = "message" in e ? e.message : "Unknown error";
490
+ window.FEIM.send.errorMessage(s);
493
491
  }), this.on("close", () => {
494
492
  window.FEIM.send.exitGame();
495
493
  }), this.on("loadEnd", () => {
@@ -501,20 +499,20 @@ class Zi extends j {
501
499
  }), this.on("cashier", () => {
502
500
  window.FEIM.send.openQuickDeposit();
503
501
  }), this.on("playCycleEnd", (e) => {
504
- const i = {
502
+ const s = {
505
503
  balance: e.contract.balance.coins,
506
504
  bet: e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier,
507
505
  win: {
508
506
  win: e.contract.win.total
509
507
  }
510
508
  };
511
- window.FEIM.send.roundFinished(i);
509
+ window.FEIM.send.roundFinished(s);
512
510
  }), this.on("playResponse", (e) => {
513
- const i = {
511
+ const s = {
514
512
  balance: e.contract.balance.coins,
515
513
  playResponse: e.data
516
514
  };
517
- window.FEIM.send.roundStarted(i);
515
+ window.FEIM.send.roundStarted(s);
518
516
  }), this.on("history", () => {
519
517
  window.FEIM.send.showHistory();
520
518
  }), this.on("settings", (e) => {
@@ -522,33 +520,33 @@ class Zi extends j {
522
520
  });
523
521
  }
524
522
  }
525
- const Ke = x("TukoPlugin", "color:#000000;font-weight:bold;");
526
- class es extends j {
523
+ const Qe = P("TukoPlugin", "color:#000000;font-weight:bold;");
524
+ class si extends B {
527
525
  constructor(...e) {
528
526
  super(...e);
529
527
  b(this, "PING_INTERVAL", 1e4);
530
528
  const a = new URLSearchParams(window.location.search).get("pingCallbackUrl");
531
529
  a && window.setInterval(() => {
532
530
  this.ping(a);
533
- }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), Ke("configured");
531
+ }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), Qe("configured");
534
532
  }
535
533
  ping(e) {
536
- const i = new XMLHttpRequest();
537
- i.onreadystatechange = function() {
538
- i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ? Ke("ping ok", i) : Ke("ping error", i));
539
- }, i.open("GET", e), i.send();
534
+ const s = new XMLHttpRequest();
535
+ s.onreadystatechange = function() {
536
+ s.readyState === XMLHttpRequest.DONE && (s.status === 0 || s.status >= 200 && s.status < 400 ? Qe("ping ok", s) : Qe("ping error", s));
537
+ }, s.open("GET", e), s.send();
540
538
  }
541
539
  registerToSdkEvents() {
542
540
  window.addEventListener("message", (e) => {
543
541
  try {
544
- const { type: i, payload: a } = e.data;
545
- switch (i) {
542
+ const { type: s, payload: a } = e.data;
543
+ switch (s) {
546
544
  case "doAudioSettings":
547
545
  this.send("settings", { music: a == null ? void 0 : a.musicEnabled, sounds: a == null ? void 0 : a.soundEnabled });
548
546
  return;
549
547
  case "doBalanceUpdate":
550
- const { currency: d, coinValueInCents: r } = this.sdkConfig.api;
551
- a.currency === d && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: zt(a.balanceInCurrency, r) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
548
+ const { currency: r, coinValueInCents: c } = this.sdkConfig.api;
549
+ a.currency === r && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: jt(a.balanceInCurrency, c) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
552
550
  return;
553
551
  case "doGamePause":
554
552
  this.send("freeze");
@@ -583,14 +581,14 @@ class es extends j {
583
581
  });
584
582
  }
585
583
  }
586
- const ft = x("QuantaPlugin", "color:#000000;font-weight:bold;");
587
- class ts extends j {
584
+ const yt = P("QuantaPlugin", "color:#000000;font-weight:bold;");
585
+ class ii extends B {
588
586
  constructor(...t) {
589
- super(...t), this.registerFromSdkEvents(), ft("configured");
587
+ super(...t), this.registerFromSdkEvents(), yt("configured");
590
588
  }
591
589
  postMessage(t) {
592
590
  const e = { event: t };
593
- ft("QuantaPlugin::postMessage", e), window.parent.postMessage(e, "*");
591
+ yt("postMessage", e), window.parent.postMessage(e, "*");
594
592
  }
595
593
  registerFromSdkEvents() {
596
594
  this.on("close", () => {
@@ -606,80 +604,168 @@ class ts extends j {
606
604
  });
607
605
  }
608
606
  }
609
- var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function", W = "undefined", ue = "object", dt = "string", S = "browser", B = "cpu", R = "device", O = "engine", P = "os", te = "result", l = "name", n = "type", c = "vendor", u = "version", I = "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", pt = "fullVersionList", ie = "platform", gt = "platformVersion", Ve = "bitness", $ = "sec-ch-ua", wi = $ + "-full-version-list", mi = $ + "-arch", bi = $ + "-" + Ve, fi = $ + "-form-factors", yi = $ + "-" + w, ki = $ + "-" + o, Wt = $ + "-" + ie, vi = Wt + "-version", jt = [ht, pt, w, o, ie, gt, I, Y, Ve], xe = "Amazon", Z = "Apple", vt = "ASUS", Et = "BlackBerry", J = "Google", Ct = "Huawei", Mt = "Lenovo", St = "Honor", Ue = "LG", Je = "Microsoft", Ye = "Motorola", Ze = "Nvidia", It = "OnePlus", et = "OPPO", be = "Samsung", Tt = "Sharp", fe = "Sony", tt = "Xiaomi", it = "Zebra", At = "Chrome", Pt = "Chromium", H = "Chromecast", Ei = "Edge", ye = "Firefox", ke = "Opera", st = "Facebook", Ot = "Sogou", ee = "Mobile ", ve = " Browser", lt = "Windows", Ci = typeof window !== W, T = Ci && window.navigator ? window.navigator : void 0, V = T && T.userAgentData ? T.userAgentData : void 0, Mi = function(s, t) {
610
- var e = {}, i = t;
611
- if (!Be(t)) {
612
- i = {};
607
+ const kt = P("SoftSwissPlugin", "color:#000000;font-weight:bold;");
608
+ class ai extends B {
609
+ constructor(...t) {
610
+ super(...t), this.registerFromSdkEvents(), kt("configured");
611
+ }
612
+ postMessage(t, e) {
613
+ const s = { event: t, payload: e };
614
+ kt("postMessage", s), window.top.postMessage(s, "*");
615
+ }
616
+ registerFromSdkEvents() {
617
+ this.on("loadStart", () => {
618
+ this.postMessage("gameLoadStarted");
619
+ }), this.on("loadProgress", ({ progress: t }) => {
620
+ this.postMessage("gameLoadProgress", { progress: t });
621
+ }), this.on("loadEnd", () => {
622
+ this.postMessage("gameLoadCompleted");
623
+ }), this.on("playCycleStart", () => {
624
+ this.postMessage("gameAnimationStart");
625
+ }), this.on("playCycleEnd", (t) => {
626
+ this.postMessage("winUpdate", { win: t.contract.win.total }), this.postMessage("gameAnimationCompleted");
627
+ }), this.on("playError", () => {
628
+ this.postMessage("gameAnimationCompleted");
629
+ }), this.on("balance", ({ balance: t }) => {
630
+ this.postMessage("balanceUpdate", { balance: t });
631
+ }), this.on("bet", (t) => {
632
+ this.postMessage("stakeUpdate", { bet: t });
633
+ });
634
+ }
635
+ }
636
+ const vt = P("EveryMatrixPlugin", "color:#000000;font-weight:bold;");
637
+ class ni extends B {
638
+ constructor(...t) {
639
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), vt("configured");
640
+ }
641
+ postMessage(t, e) {
642
+ const s = { name: t, sender: "game", data: e };
643
+ vt("postMessage", s), window.top.postMessage(s, "*");
644
+ }
645
+ registerToSdkEvents() {
646
+ window.addEventListener("message", (t) => {
647
+ try {
648
+ const { name: e, sender: s } = t.data;
649
+ if (s !== "emwindow")
650
+ return;
651
+ switch (e) {
652
+ // TODO: add setAudio handle once everymatrix will
653
+ // let us know what will be coming in the payload
654
+ case "updateBalance":
655
+ this.send("getBalance");
656
+ return;
657
+ case "togglePaytable":
658
+ this.send("paytable");
659
+ return;
660
+ case "stopAutoplay":
661
+ this.send("suspend");
662
+ return;
663
+ case "showHelp":
664
+ this.send("help", { show: !0 });
665
+ return;
666
+ default:
667
+ return;
668
+ }
669
+ } catch {
670
+ }
671
+ });
672
+ }
673
+ registerFromSdkEvents() {
674
+ this.on("loadProgress", ({ progress: t }) => {
675
+ this.postMessage("loadProgress", { progress: t });
676
+ }), this.on("loadEnd", () => {
677
+ this.postMessage("loadCompleted");
678
+ }), this.on("settings", (t) => {
679
+ (t != null && t.music || t != null && t.sounds) && this.postMessage("audioToggle");
680
+ }), this.on("playCycleStart", () => {
681
+ this.postMessage("roundStart");
682
+ }), this.on("playCycleEnd", () => {
683
+ this.postMessage("roundEnd");
684
+ }), this.on("playError", () => {
685
+ this.postMessage("errorMessage");
686
+ }), this.on("error", () => {
687
+ this.postMessage("errorMessage");
688
+ }), this.on("close", () => {
689
+ this.postMessage("close");
690
+ }), this.on("bet", () => {
691
+ this.postMessage("stakeUpdate");
692
+ });
693
+ }
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) {
696
+ var e = {}, s = t;
697
+ if (!_e(t)) {
698
+ s = {};
613
699
  for (var a in t)
614
- for (var d in t[a])
615
- i[d] = t[a][d].concat(i[d] ? i[d] : []);
700
+ for (var r in t[a])
701
+ s[r] = t[a][r].concat(s[r] ? s[r] : []);
616
702
  }
617
- for (var r in s)
618
- e[r] = i[r] && i[r].length % 2 === 0 ? i[r].concat(s[r]) : s[r];
703
+ for (var c in i)
704
+ e[c] = s[c] && s[c].length % 2 === 0 ? s[c].concat(i[c]) : i[c];
619
705
  return e;
620
- }, ze = function(s) {
621
- for (var t = {}, e = 0; e < s.length; e++)
622
- t[s[e].toUpperCase()] = s[e];
706
+ }, ze = function(i) {
707
+ for (var t = {}, e = 0; e < i.length; e++)
708
+ t[i[e].toUpperCase()] = i[e];
623
709
  return t;
624
- }, ut = function(s, t) {
625
- if (typeof s === ue && s.length > 0) {
626
- for (var e in s)
627
- if (F(s[e]) == F(t)) return !0;
710
+ }, ut = function(i, t) {
711
+ if (typeof i === ue && i.length > 0) {
712
+ for (var e in i)
713
+ if (N(i[e]) == N(t)) return !0;
628
714
  return !1;
629
715
  }
630
- return pe(s) ? F(t).indexOf(F(s)) !== -1 : !1;
631
- }, Be = function(s, t) {
632
- for (var e in s)
633
- return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? Be(s[e]) : !1);
634
- }, pe = function(s) {
635
- return typeof s === dt;
636
- }, at = function(s) {
637
- if (s) {
638
- for (var t = [], e = he(/\\?\"/g, s).split(","), i = 0; i < e.length; i++)
639
- if (e[i].indexOf(";") > -1) {
640
- var a = Ie(e[i]).split(";v=");
641
- t[i] = { brand: a[0], version: a[1] };
716
+ return ge(i) ? N(t).indexOf(N(i)) !== -1 : !1;
717
+ }, _e = function(i, t) {
718
+ for (var e in i)
719
+ return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? _e(i[e]) : !1);
720
+ }, ge = function(i) {
721
+ return typeof i === dt;
722
+ }, at = function(i) {
723
+ if (i) {
724
+ for (var t = [], e = he(/\\?\"/g, i).split(","), s = 0; s < e.length; s++)
725
+ if (e[s].indexOf(";") > -1) {
726
+ var a = Te(e[s]).split(";v=");
727
+ t[s] = { brand: a[0], version: a[1] };
642
728
  } else
643
- t[i] = Ie(e[i]);
729
+ t[s] = Te(e[s]);
644
730
  return t;
645
731
  }
646
- }, F = function(s) {
647
- return pe(s) ? s.toLowerCase() : s;
648
- }, nt = function(s) {
649
- return pe(s) ? he(/[^\d\.]/g, s).split(".")[0] : void 0;
650
- }, N = function(s) {
651
- for (var t in s) {
652
- var e = s[t];
732
+ }, N = function(i) {
733
+ return ge(i) ? i.toLowerCase() : i;
734
+ }, nt = function(i) {
735
+ return ge(i) ? he(/[^\d\.]/g, i).split(".")[0] : void 0;
736
+ }, D = function(i) {
737
+ for (var t in i) {
738
+ var e = i[t];
653
739
  typeof e == ue && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
654
740
  }
655
741
  return this;
656
- }, he = function(s, t) {
657
- return pe(t) ? t.replace(s, le) : t;
658
- }, Ee = function(s) {
659
- return he(/\\?\"/g, s);
660
- }, Ie = function(s, t) {
661
- if (pe(s))
662
- return s = he(/^\s\s*/, s), typeof t === W ? s : s.substring(0, ct);
663
- }, ot = function(s, t) {
664
- if (!(!s || !t))
665
- for (var e = 0, i, a, d, r, p, h; e < t.length && !p; ) {
666
- var g = t[e], m = t[e + 1];
667
- for (i = a = 0; i < g.length && !p && g[i]; )
668
- if (p = g[i++].exec(s), p)
669
- for (d = 0; d < m.length; d++)
670
- h = p[++a], r = m[d], typeof r === ue && r.length > 0 ? r.length === 2 ? typeof r[1] == _e ? this[r[0]] = r[1].call(this, h) : this[r[0]] = r[1] : r.length === 3 ? typeof r[1] === _e && !(r[1].exec && r[1].test) ? this[r[0]] = h ? r[1].call(this, h, r[2]) : void 0 : this[r[0]] = h ? h.replace(r[1], r[2]) : void 0 : r.length === 4 && (this[r[0]] = h ? r[3].call(this, h.replace(r[1], r[2])) : void 0) : this[r] = h || void 0;
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) {
747
+ if (ge(i))
748
+ return i = he(/^\s\s*/, i), typeof t === j ? i : i.substring(0, ct);
749
+ }, ot = function(i, t) {
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)
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;
671
757
  e += 2;
672
758
  }
673
- }, z = function(s, t) {
759
+ }, q = function(i, t) {
674
760
  for (var e in t)
675
761
  if (typeof t[e] === ue && t[e].length > 0) {
676
- for (var i = 0; i < t[e].length; i++)
677
- if (ut(t[e][i], s))
678
- return e === kt ? void 0 : e;
679
- } else if (ut(t[e], s))
680
- return e === kt ? void 0 : e;
681
- return t.hasOwnProperty("*") ? t["*"] : s;
682
- }, xt = {
762
+ for (var s = 0; s < t[e].length; s++)
763
+ if (ut(t[e][s], i))
764
+ return e === Ct ? void 0 : e;
765
+ } else if (ut(t[e], i))
766
+ return e === Ct ? void 0 : e;
767
+ return t.hasOwnProperty("*") ? t["*"] : i;
768
+ }, Lt = {
683
769
  ME: "4.90",
684
770
  "NT 3.11": "NT3.51",
685
771
  "NT 4.0": "NT4.0",
@@ -691,7 +777,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
691
777
  "8.1": "NT 6.3",
692
778
  10: ["NT 6.4", "NT 10.0"],
693
779
  RT: "ARM"
694
- }, Ut = {
780
+ }, Bt = {
695
781
  embedded: "Automotive",
696
782
  mobile: "Mobile",
697
783
  tablet: ["Tablet", "EInk"],
@@ -700,7 +786,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
700
786
  xr: ["VR", "XR"],
701
787
  "?": ["Desktop", "Unknown"],
702
788
  "*": void 0
703
- }, Rt = {
789
+ }, _t = {
704
790
  browser: [
705
791
  [
706
792
  // Most common regardless engine
@@ -810,7 +896,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
810
896
  /slbrowser\/([\w\.]+)/i
811
897
  // Smart Lenovo Browser
812
898
  ],
813
- [u, [l, "Smart " + Mt + ve]],
899
+ [u, [l, "Smart " + It + ve]],
814
900
  [
815
901
  /(avast|avg)\/([\w\.]+)/i
816
902
  // Avast/AVG Secure Browser
@@ -875,12 +961,12 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
875
961
  /metasr[\/ ]?([\d\.]+)/i
876
962
  // Sogou Explorer
877
963
  ],
878
- [u, [l, Ot + " Explorer"]],
964
+ [u, [l, Rt + " Explorer"]],
879
965
  [
880
966
  /(sogou)mo\w+\/([\d\.]+)/i
881
967
  // Sogou Mobile
882
968
  ],
883
- [[l, Ot + " Mobile"], u],
969
+ [[l, Rt + " Mobile"], u],
884
970
  [
885
971
  /(electron)\/([\w\.]+) safari/i,
886
972
  // Electron-based App
@@ -907,7 +993,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
907
993
  /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
908
994
  // Facebook App for iOS & Android
909
995
  ],
910
- [[l, st], u, [n, me]],
996
+ [[l, it], u, [n, me]],
911
997
  [
912
998
  /(Klarna)\/([\w\.]+)/i,
913
999
  // Klarna Shopping Browser for iOS & Android
@@ -953,12 +1039,12 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
953
1039
  /headlesschrome(?:\/([\w\.]+)| )/i
954
1040
  // Chrome Headless
955
1041
  ],
956
- [u, [l, At + " Headless"]],
1042
+ [u, [l, xt + " Headless"]],
957
1043
  [
958
1044
  / wv\).+(chrome)\/([\w\.]+)/i
959
1045
  // Chrome WebView
960
1046
  ],
961
- [[l, At + " WebView"], u],
1047
+ [[l, xt + " WebView"], u],
962
1048
  [
963
1049
  /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
964
1050
  // Android Browser
@@ -1049,44 +1135,44 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1049
1135
  /\b((amd|x|x86[-_]?|wow|win)64)\b/i
1050
1136
  // AMD64 (x64)
1051
1137
  ],
1052
- [[I, "amd64"]],
1138
+ [[T, "amd64"]],
1053
1139
  [
1054
1140
  /(ia32(?=;))/i,
1055
1141
  // IA32 (quicktime)
1056
1142
  /\b((i[346]|x)86)(pc)?\b/i
1057
1143
  // IA32 (x86)
1058
1144
  ],
1059
- [[I, "ia32"]],
1145
+ [[T, "ia32"]],
1060
1146
  [
1061
1147
  /\b(aarch64|arm(v?[89]e?l?|_?64))\b/i
1062
1148
  // ARM64
1063
1149
  ],
1064
- [[I, "arm64"]],
1150
+ [[T, "arm64"]],
1065
1151
  [
1066
1152
  /\b(arm(v[67])?ht?n?[fl]p?)\b/i
1067
1153
  // ARMHF
1068
1154
  ],
1069
- [[I, "armhf"]],
1155
+ [[T, "armhf"]],
1070
1156
  [
1071
1157
  // PocketPC mistakenly identified as PowerPC
1072
1158
  /( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
1073
1159
  ],
1074
- [[I, "arm"]],
1160
+ [[T, "arm"]],
1075
1161
  [
1076
1162
  /((ppc|powerpc)(64)?)( mac|;|\))/i
1077
1163
  // PowerPC
1078
1164
  ],
1079
- [[I, /ower/, le, F]],
1165
+ [[T, /ower/, le, N]],
1080
1166
  [
1081
1167
  / sun4\w[;\)]/i
1082
1168
  // SPARC
1083
1169
  ],
1084
- [[I, "sparc"]],
1170
+ [[T, "sparc"]],
1085
1171
  [
1086
1172
  /\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i
1087
1173
  // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
1088
1174
  ],
1089
- [[I, F]]
1175
+ [[T, N]]
1090
1176
  ],
1091
1177
  device: [
1092
1178
  [
@@ -1096,61 +1182,61 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1096
1182
  // Samsung
1097
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
1098
1184
  ],
1099
- [o, [c, be], [n, f]],
1185
+ [o, [d, be], [n, f]],
1100
1186
  [
1101
1187
  /\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
1102
1188
  /samsung[- ]((?!sm-[lr])[-\w]+)/i,
1103
1189
  /sec-(sgh\w+)/i
1104
1190
  ],
1105
- [o, [c, be], [n, w]],
1191
+ [o, [d, be], [n, w]],
1106
1192
  [
1107
1193
  // Apple
1108
1194
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
1109
1195
  // iPod/iPhone
1110
1196
  ],
1111
- [o, [c, Z], [n, w]],
1197
+ [o, [d, Z], [n, w]],
1112
1198
  [
1113
1199
  /\((ipad);[-\w\),; ]+apple/i,
1114
1200
  // iPad
1115
1201
  /applecoremedia\/[\w\.]+ \((ipad)/i,
1116
1202
  /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
1117
1203
  ],
1118
- [o, [c, Z], [n, f]],
1204
+ [o, [d, Z], [n, f]],
1119
1205
  [
1120
1206
  /(macintosh);/i
1121
1207
  ],
1122
- [o, [c, Z]],
1208
+ [o, [d, Z]],
1123
1209
  [
1124
1210
  // Sharp
1125
1211
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
1126
1212
  ],
1127
- [o, [c, Tt], [n, w]],
1213
+ [o, [d, Ot], [n, w]],
1128
1214
  [
1129
1215
  // Honor
1130
1216
  /\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
1131
1217
  ],
1132
- [o, [c, St], [n, f]],
1218
+ [o, [d, At], [n, f]],
1133
1219
  [
1134
1220
  /honor([-\w ]+)[;\)]/i
1135
1221
  ],
1136
- [o, [c, St], [n, w]],
1222
+ [o, [d, At], [n, w]],
1137
1223
  [
1138
1224
  // Huawei
1139
1225
  /\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
1140
1226
  ],
1141
- [o, [c, Ct], [n, f]],
1227
+ [o, [d, Tt], [n, f]],
1142
1228
  [
1143
1229
  /(?:huawei)([-\w ]+)[;\)]/i,
1144
1230
  /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
1145
1231
  ],
1146
- [o, [c, Ct], [n, w]],
1232
+ [o, [d, Tt], [n, w]],
1147
1233
  [
1148
1234
  // Xiaomi
1149
1235
  /oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
1150
1236
  /\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i
1151
1237
  // Mi Pad tablets
1152
1238
  ],
1153
- [[o, /_/g, " "], [c, tt], [n, f]],
1239
+ [[o, /_/g, " "], [d, tt], [n, f]],
1154
1240
  [
1155
1241
  /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
1156
1242
  // Xiaomi POCO
@@ -1166,98 +1252,98 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1166
1252
  // Xiaomi Mi
1167
1253
  / ([\w ]+) miui\/v?\d/i
1168
1254
  ],
1169
- [[o, /_/g, " "], [c, tt], [n, w]],
1255
+ [[o, /_/g, " "], [d, tt], [n, w]],
1170
1256
  [
1171
1257
  // OPPO
1172
1258
  /; (\w+) bui.+ oppo/i,
1173
1259
  /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
1174
1260
  ],
1175
- [o, [c, et], [n, w]],
1261
+ [o, [d, et], [n, w]],
1176
1262
  [
1177
1263
  /\b(opd2(\d{3}a?))(?: bui|\))/i
1178
1264
  ],
1179
- [o, [c, z, { OnePlus: ["304", "403", "203"], "*": et }], [n, f]],
1265
+ [o, [d, q, { OnePlus: ["304", "403", "203"], "*": et }], [n, f]],
1180
1266
  [
1181
1267
  // BLU Vivo Series
1182
1268
  /(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i
1183
1269
  ],
1184
- [o, [c, "BLU"], [n, w]],
1270
+ [o, [d, "BLU"], [n, w]],
1185
1271
  [
1186
1272
  // Vivo
1187
1273
  /; vivo (\w+)(?: bui|\))/i,
1188
1274
  /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
1189
1275
  ],
1190
- [o, [c, "Vivo"], [n, w]],
1276
+ [o, [d, "Vivo"], [n, w]],
1191
1277
  [
1192
1278
  // Realme
1193
1279
  /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
1194
1280
  ],
1195
- [o, [c, "Realme"], [n, w]],
1281
+ [o, [d, "Realme"], [n, w]],
1196
1282
  [
1197
1283
  // Motorola
1198
1284
  /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
1199
1285
  /\bmot(?:orola)?[- ](\w*)/i,
1200
1286
  /((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
1201
1287
  ],
1202
- [o, [c, Ye], [n, w]],
1288
+ [o, [d, Ye], [n, w]],
1203
1289
  [
1204
1290
  /\b(mz60\d|xoom[2 ]{0,2}) build\//i
1205
1291
  ],
1206
- [o, [c, Ye], [n, f]],
1292
+ [o, [d, Ye], [n, f]],
1207
1293
  [
1208
1294
  // LG
1209
1295
  /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
1210
1296
  ],
1211
- [o, [c, Ue], [n, f]],
1297
+ [o, [d, Ue], [n, f]],
1212
1298
  [
1213
1299
  /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
1214
1300
  /\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,
1215
1301
  /\blg-?([\d\w]+) bui/i
1216
1302
  ],
1217
- [o, [c, Ue], [n, w]],
1303
+ [o, [d, Ue], [n, w]],
1218
1304
  [
1219
1305
  // Lenovo
1220
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,
1221
1307
  /lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
1222
1308
  ],
1223
- [o, [c, Mt], [n, f]],
1309
+ [o, [d, It], [n, f]],
1224
1310
  [
1225
1311
  // Nokia
1226
1312
  /(nokia) (t[12][01])/i
1227
1313
  ],
1228
- [c, o, [n, f]],
1314
+ [d, o, [n, f]],
1229
1315
  [
1230
1316
  /(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
1231
1317
  /nokia[-_ ]?(([-\w\. ]*))/i
1232
1318
  ],
1233
- [[o, /_/g, " "], [n, w], [c, "Nokia"]],
1319
+ [[o, /_/g, " "], [n, w], [d, "Nokia"]],
1234
1320
  [
1235
1321
  // Google
1236
1322
  /(pixel (c|tablet))\b/i
1237
1323
  // Google Pixel C/Tablet
1238
1324
  ],
1239
- [o, [c, J], [n, f]],
1325
+ [o, [d, J], [n, f]],
1240
1326
  [
1241
1327
  /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
1242
1328
  // Google Pixel
1243
1329
  ],
1244
- [o, [c, J], [n, w]],
1330
+ [o, [d, J], [n, w]],
1245
1331
  [
1246
1332
  // Sony
1247
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
1248
1334
  ],
1249
- [o, [c, fe], [n, w]],
1335
+ [o, [d, fe], [n, w]],
1250
1336
  [
1251
1337
  /sony tablet [ps]/i,
1252
1338
  /\b(?:sony)?sgp\w+(?: bui|\))/i
1253
1339
  ],
1254
- [[o, "Xperia Tablet"], [c, fe], [n, f]],
1340
+ [[o, "Xperia Tablet"], [d, fe], [n, f]],
1255
1341
  [
1256
1342
  // OnePlus
1257
1343
  / (kb2005|in20[12]5|be20[12][59])\b/i,
1258
1344
  /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
1259
1345
  ],
1260
- [o, [c, It], [n, w]],
1346
+ [o, [d, Pt], [n, w]],
1261
1347
  [
1262
1348
  // Amazon
1263
1349
  /(alexa)webm/i,
@@ -1266,39 +1352,39 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1266
1352
  /(kf[a-z]+)( bui|\)).+silk\//i
1267
1353
  // Kindle Fire HD
1268
1354
  ],
1269
- [o, [c, xe], [n, f]],
1355
+ [o, [d, xe], [n, f]],
1270
1356
  [
1271
1357
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
1272
1358
  // Fire Phone
1273
1359
  ],
1274
- [[o, /(.+)/g, "Fire Phone $1"], [c, xe], [n, w]],
1360
+ [[o, /(.+)/g, "Fire Phone $1"], [d, xe], [n, w]],
1275
1361
  [
1276
1362
  // BlackBerry
1277
1363
  /(playbook);[-\w\),; ]+(rim)/i
1278
1364
  // BlackBerry PlayBook
1279
1365
  ],
1280
- [o, c, [n, f]],
1366
+ [o, d, [n, f]],
1281
1367
  [
1282
1368
  /\b((?:bb[a-f]|st[hv])100-\d)/i,
1283
1369
  /\(bb10; (\w+)/i
1284
1370
  // BlackBerry 10
1285
1371
  ],
1286
- [o, [c, Et], [n, w]],
1372
+ [o, [d, St], [n, w]],
1287
1373
  [
1288
1374
  // Asus
1289
1375
  /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
1290
1376
  ],
1291
- [o, [c, vt], [n, f]],
1377
+ [o, [d, Mt], [n, f]],
1292
1378
  [
1293
1379
  / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
1294
1380
  ],
1295
- [o, [c, vt], [n, w]],
1381
+ [o, [d, Mt], [n, w]],
1296
1382
  [
1297
1383
  // HTC
1298
1384
  /(nexus 9)/i
1299
1385
  // HTC Nexus 9
1300
1386
  ],
1301
- [o, [c, "HTC"], [n, f]],
1387
+ [o, [d, "HTC"], [n, f]],
1302
1388
  [
1303
1389
  /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
1304
1390
  // HTC
@@ -1307,71 +1393,71 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1307
1393
  /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
1308
1394
  // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
1309
1395
  ],
1310
- [c, [o, /_/g, " "], [n, w]],
1396
+ [d, [o, /_/g, " "], [n, w]],
1311
1397
  [
1312
1398
  // TCL
1313
1399
  /tcl (xess p17aa)/i,
1314
1400
  /droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i
1315
1401
  ],
1316
- [o, [c, "TCL"], [n, f]],
1402
+ [o, [d, "TCL"], [n, f]],
1317
1403
  [
1318
1404
  /droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i
1319
1405
  ],
1320
- [o, [c, "TCL"], [n, w]],
1406
+ [o, [d, "TCL"], [n, w]],
1321
1407
  [
1322
1408
  // itel
1323
1409
  /(itel) ((\w+))/i
1324
1410
  ],
1325
- [[c, F], o, [n, z, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
1411
+ [[d, N], o, [n, q, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
1326
1412
  [
1327
1413
  // Acer
1328
1414
  /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
1329
1415
  ],
1330
- [o, [c, "Acer"], [n, f]],
1416
+ [o, [d, "Acer"], [n, f]],
1331
1417
  [
1332
1418
  // Meizu
1333
1419
  /droid.+; (m[1-5] note) bui/i,
1334
1420
  /\bmz-([-\w]{2,})/i
1335
1421
  ],
1336
- [o, [c, "Meizu"], [n, w]],
1422
+ [o, [d, "Meizu"], [n, w]],
1337
1423
  [
1338
1424
  // Ulefone
1339
1425
  /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
1340
1426
  ],
1341
- [o, [c, "Ulefone"], [n, w]],
1427
+ [o, [d, "Ulefone"], [n, w]],
1342
1428
  [
1343
1429
  // Energizer
1344
1430
  /; (energy ?\w+)(?: bui|\))/i,
1345
1431
  /; energizer ([\w ]+)(?: bui|\))/i
1346
1432
  ],
1347
- [o, [c, "Energizer"], [n, w]],
1433
+ [o, [d, "Energizer"], [n, w]],
1348
1434
  [
1349
1435
  // Cat
1350
1436
  /; cat (b35);/i,
1351
1437
  /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
1352
1438
  ],
1353
- [o, [c, "Cat"], [n, w]],
1439
+ [o, [d, "Cat"], [n, w]],
1354
1440
  [
1355
1441
  // Smartfren
1356
1442
  /((?:new )?andromax[\w- ]+)(?: bui|\))/i
1357
1443
  ],
1358
- [o, [c, "Smartfren"], [n, w]],
1444
+ [o, [d, "Smartfren"], [n, w]],
1359
1445
  [
1360
1446
  // Nothing
1361
1447
  /droid.+; (a(?:015|06[35]|142p?))/i
1362
1448
  ],
1363
- [o, [c, "Nothing"], [n, w]],
1449
+ [o, [d, "Nothing"], [n, w]],
1364
1450
  [
1365
1451
  // Archos
1366
1452
  /; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
1367
1453
  /archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
1368
1454
  ],
1369
- [o, [c, "Archos"], [n, f]],
1455
+ [o, [d, "Archos"], [n, f]],
1370
1456
  [
1371
1457
  /archos ([\w ]+)( b|\))/i,
1372
1458
  /; (ac[3-6]\d\w{2,8})( b|\))/i
1373
1459
  ],
1374
- [o, [c, "Archos"], [n, w]],
1460
+ [o, [d, "Archos"], [n, w]],
1375
1461
  [
1376
1462
  // MIXED
1377
1463
  /(imo) (tab \w+)/i,
@@ -1379,7 +1465,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1379
1465
  /(infinix) (x1101b?)/i
1380
1466
  // Infinix XPad
1381
1467
  ],
1382
- [c, o, [n, f]],
1468
+ [d, o, [n, f]],
1383
1469
  [
1384
1470
  /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
1385
1471
  // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
@@ -1394,7 +1480,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1394
1480
  /(oppo) ?([\w ]+) bui/i
1395
1481
  // OPPO
1396
1482
  ],
1397
- [c, o, [n, w]],
1483
+ [d, o, [n, w]],
1398
1484
  [
1399
1485
  /(kobo)\s(ereader|touch)/i,
1400
1486
  // Kobo
@@ -1403,41 +1489,41 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1403
1489
  /(kindle)\/([\w\.]+)/i
1404
1490
  // Kindle
1405
1491
  ],
1406
- [c, o, [n, f]],
1492
+ [d, o, [n, f]],
1407
1493
  [
1408
1494
  /(surface duo)/i
1409
1495
  // Surface Duo
1410
1496
  ],
1411
- [o, [c, Je], [n, f]],
1497
+ [o, [d, Je], [n, f]],
1412
1498
  [
1413
1499
  /droid [\d\.]+; (fp\du?)(?: b|\))/i
1414
1500
  // Fairphone
1415
1501
  ],
1416
- [o, [c, "Fairphone"], [n, w]],
1502
+ [o, [d, "Fairphone"], [n, w]],
1417
1503
  [
1418
1504
  /((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i
1419
1505
  // Nvidia Tablets
1420
1506
  ],
1421
- [o, [c, Ze], [n, f]],
1507
+ [o, [d, Ze], [n, f]],
1422
1508
  [
1423
1509
  /(sprint) (\w+)/i
1424
1510
  // Sprint Phones
1425
1511
  ],
1426
- [c, o, [n, w]],
1512
+ [d, o, [n, w]],
1427
1513
  [
1428
1514
  /(kin\.[onetw]{3})/i
1429
1515
  // Microsoft Kin
1430
1516
  ],
1431
- [[o, /\./g, " "], [c, Je], [n, w]],
1517
+ [[o, /\./g, " "], [d, Je], [n, w]],
1432
1518
  [
1433
1519
  /droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
1434
1520
  // Zebra
1435
1521
  ],
1436
- [o, [c, it], [n, f]],
1522
+ [o, [d, st], [n, f]],
1437
1523
  [
1438
1524
  /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
1439
1525
  ],
1440
- [o, [c, it], [n, w]],
1526
+ [o, [d, st], [n, w]],
1441
1527
  [
1442
1528
  ///////////////////
1443
1529
  // SMARTTVS
@@ -1445,88 +1531,88 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1445
1531
  /smart-tv.+(samsung)/i
1446
1532
  // Samsung
1447
1533
  ],
1448
- [c, [n, y]],
1534
+ [d, [n, y]],
1449
1535
  [
1450
1536
  /hbbtv.+maple;(\d+)/i
1451
1537
  ],
1452
- [[o, /^/, "SmartTV"], [c, be], [n, y]],
1538
+ [[o, /^/, "SmartTV"], [d, be], [n, y]],
1453
1539
  [
1454
1540
  /tcast.+(lg)e?. ([-\w]+)/i
1455
1541
  // LG SmartTV
1456
1542
  ],
1457
- [c, o, [n, y]],
1543
+ [d, o, [n, y]],
1458
1544
  [
1459
1545
  /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1460
1546
  ],
1461
- [[c, Ue], [n, y]],
1547
+ [[d, Ue], [n, y]],
1462
1548
  [
1463
1549
  /(apple) ?tv/i
1464
1550
  // Apple TV
1465
1551
  ],
1466
- [c, [o, Z + " TV"], [n, y]],
1552
+ [d, [o, Z + " TV"], [n, y]],
1467
1553
  [
1468
1554
  /crkey.*devicetype\/chromecast/i
1469
1555
  // Google Chromecast Third Generation
1470
1556
  ],
1471
- [[o, H + " Third Generation"], [c, J], [n, y]],
1557
+ [[o, V + " Third Generation"], [d, J], [n, y]],
1472
1558
  [
1473
1559
  /crkey.*devicetype\/([^/]*)/i
1474
1560
  // Google Chromecast with specific device type
1475
1561
  ],
1476
- [[o, /^/, "Chromecast "], [c, J], [n, y]],
1562
+ [[o, /^/, "Chromecast "], [d, J], [n, y]],
1477
1563
  [
1478
1564
  /fuchsia.*crkey/i
1479
1565
  // Google Chromecast Nest Hub
1480
1566
  ],
1481
- [[o, H + " Nest Hub"], [c, J], [n, y]],
1567
+ [[o, V + " Nest Hub"], [d, J], [n, y]],
1482
1568
  [
1483
1569
  /crkey/i
1484
1570
  // Google Chromecast, Linux-based or unknown
1485
1571
  ],
1486
- [[o, H], [c, J], [n, y]],
1572
+ [[o, V], [d, J], [n, y]],
1487
1573
  [
1488
1574
  /(portaltv)/i
1489
1575
  // Facebook Portal TV
1490
1576
  ],
1491
- [o, [c, st], [n, y]],
1577
+ [o, [d, it], [n, y]],
1492
1578
  [
1493
1579
  /droid.+aft(\w+)( bui|\))/i
1494
1580
  // Fire TV
1495
1581
  ],
1496
- [o, [c, xe], [n, y]],
1582
+ [o, [d, xe], [n, y]],
1497
1583
  [
1498
1584
  /(shield \w+ tv)/i
1499
1585
  // Nvidia Shield TV
1500
1586
  ],
1501
- [o, [c, Ze], [n, y]],
1587
+ [o, [d, Ze], [n, y]],
1502
1588
  [
1503
1589
  /\(dtv[\);].+(aquos)/i,
1504
1590
  /(aquos-tv[\w ]+)\)/i
1505
1591
  // Sharp
1506
1592
  ],
1507
- [o, [c, Tt], [n, y]],
1593
+ [o, [d, Ot], [n, y]],
1508
1594
  [
1509
1595
  /(bravia[\w ]+)( bui|\))/i
1510
1596
  // Sony
1511
1597
  ],
1512
- [o, [c, fe], [n, y]],
1598
+ [o, [d, fe], [n, y]],
1513
1599
  [
1514
1600
  /(mi(tv|box)-?\w+) bui/i
1515
1601
  // Xiaomi
1516
1602
  ],
1517
- [o, [c, tt], [n, y]],
1603
+ [o, [d, tt], [n, y]],
1518
1604
  [
1519
1605
  /Hbbtv.*(technisat) (.*);/i
1520
1606
  // TechniSAT
1521
1607
  ],
1522
- [c, o, [n, y]],
1608
+ [d, o, [n, y]],
1523
1609
  [
1524
1610
  /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
1525
1611
  // Roku
1526
1612
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
1527
1613
  // HbbTV devices
1528
1614
  ],
1529
- [[c, Ie], [o, Ie], [n, y]],
1615
+ [[d, Te], [o, Te], [n, y]],
1530
1616
  [
1531
1617
  // SmartTV from Unidentified Vendors
1532
1618
  /droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
@@ -1545,22 +1631,22 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1545
1631
  /(nintendo) (\w+)/i
1546
1632
  // Nintendo
1547
1633
  ],
1548
- [c, o, [n, Ce]],
1634
+ [d, o, [n, Ce]],
1549
1635
  [
1550
1636
  /droid.+; (shield)( bui|\))/i
1551
1637
  // Nvidia Portable
1552
1638
  ],
1553
- [o, [c, Ze], [n, Ce]],
1639
+ [o, [d, Ze], [n, Ce]],
1554
1640
  [
1555
1641
  /(playstation \w+)/i
1556
1642
  // Playstation
1557
1643
  ],
1558
- [o, [c, fe], [n, Ce]],
1644
+ [o, [d, fe], [n, Ce]],
1559
1645
  [
1560
1646
  /\b(xbox(?: one)?(?!; xbox))[\); ]/i
1561
1647
  // Microsoft Xbox
1562
1648
  ],
1563
- [o, [c, Je], [n, Ce]],
1649
+ [o, [d, Je], [n, Ce]],
1564
1650
  [
1565
1651
  ///////////////////
1566
1652
  // WEARABLES
@@ -1568,48 +1654,48 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1568
1654
  /\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
1569
1655
  // Samsung Galaxy Watch
1570
1656
  ],
1571
- [o, [c, be], [n, U]],
1657
+ [o, [d, be], [n, U]],
1572
1658
  [
1573
1659
  /((pebble))app/i,
1574
1660
  // Pebble
1575
1661
  /(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i
1576
1662
  // Asus ZenWatch / LG Watch / Pixel Watch
1577
1663
  ],
1578
- [c, o, [n, U]],
1664
+ [d, o, [n, U]],
1579
1665
  [
1580
1666
  /(ow(?:19|20)?we?[1-3]{1,3})/i
1581
1667
  // Oppo Watch
1582
1668
  ],
1583
- [o, [c, et], [n, U]],
1669
+ [o, [d, et], [n, U]],
1584
1670
  [
1585
1671
  /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
1586
1672
  // Apple Watch
1587
1673
  ],
1588
- [o, [c, Z], [n, U]],
1674
+ [o, [d, Z], [n, U]],
1589
1675
  [
1590
1676
  /(opwwe\d{3})/i
1591
1677
  // OnePlus Watch
1592
1678
  ],
1593
- [o, [c, It], [n, U]],
1679
+ [o, [d, Pt], [n, U]],
1594
1680
  [
1595
1681
  /(moto 360)/i
1596
1682
  // Motorola 360
1597
1683
  ],
1598
- [o, [c, Ye], [n, U]],
1684
+ [o, [d, Ye], [n, U]],
1599
1685
  [
1600
1686
  /(smartwatch 3)/i
1601
1687
  // Sony SmartWatch
1602
1688
  ],
1603
- [o, [c, fe], [n, U]],
1689
+ [o, [d, fe], [n, U]],
1604
1690
  [
1605
1691
  /(g watch r)/i
1606
1692
  // LG G Watch R
1607
1693
  ],
1608
- [o, [c, Ue], [n, U]],
1694
+ [o, [d, Ue], [n, U]],
1609
1695
  [
1610
1696
  /droid.+; (wt63?0{2,3})\)/i
1611
1697
  ],
1612
- [o, [c, it], [n, U]],
1698
+ [o, [d, st], [n, U]],
1613
1699
  [
1614
1700
  ///////////////////
1615
1701
  // XR
@@ -1617,17 +1703,17 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1617
1703
  /droid.+; (glass) \d/i
1618
1704
  // Google Glass
1619
1705
  ],
1620
- [o, [c, J], [n, Xe]],
1706
+ [o, [d, J], [n, Xe]],
1621
1707
  [
1622
1708
  /(pico) (4|neo3(?: link|pro)?)/i
1623
1709
  // Pico
1624
1710
  ],
1625
- [c, o, [n, Xe]],
1711
+ [d, o, [n, Xe]],
1626
1712
  [
1627
1713
  /(quest( \d| pro)?s?).+vr/i
1628
1714
  // Meta Quest
1629
1715
  ],
1630
- [o, [c, st], [n, Xe]],
1716
+ [o, [d, it], [n, Xe]],
1631
1717
  [
1632
1718
  ///////////////////
1633
1719
  // EMBEDDED
@@ -1635,17 +1721,17 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1635
1721
  /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
1636
1722
  // Tesla
1637
1723
  ],
1638
- [c, [n, Me]],
1724
+ [d, [n, Me]],
1639
1725
  [
1640
1726
  /(aeobc)\b/i
1641
1727
  // Echo Dot
1642
1728
  ],
1643
- [o, [c, xe], [n, Me]],
1729
+ [o, [d, xe], [n, Me]],
1644
1730
  [
1645
1731
  /(homepod).+mac os/i
1646
1732
  // Apple HomePod
1647
1733
  ],
1648
- [o, [c, Z], [n, Me]],
1734
+ [o, [d, Z], [n, Me]],
1649
1735
  [
1650
1736
  /windows iot/i
1651
1737
  ],
@@ -1656,7 +1742,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1656
1742
  ///////////////////
1657
1743
  /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i
1658
1744
  ],
1659
- [o, [n, z, { mobile: "Mobile", xr: "VR", "*": f }]],
1745
+ [o, [n, q, { mobile: "Mobile", xr: "VR", "*": f }]],
1660
1746
  [
1661
1747
  /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
1662
1748
  // Unidentifiable Tablet
@@ -1671,14 +1757,14 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1671
1757
  /droid .+?; ([\w\. -]+)( bui|\))/i
1672
1758
  // Generic Android Device
1673
1759
  ],
1674
- [o, [c, "Generic"]]
1760
+ [o, [d, "Generic"]]
1675
1761
  ],
1676
1762
  engine: [
1677
1763
  [
1678
1764
  /windows.+ edge\/([\w\.]+)/i
1679
1765
  // EdgeHTML
1680
1766
  ],
1681
- [u, [l, Ei + "HTML"]],
1767
+ [u, [l, Ms + "HTML"]],
1682
1768
  [
1683
1769
  /(arkweb)\/([\w\.]+)/i
1684
1770
  // ArkWeb
@@ -1725,14 +1811,14 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1725
1811
  /(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i
1726
1812
  // Windows Phone
1727
1813
  ],
1728
- [l, [u, z, xt]],
1814
+ [l, [u, q, Lt]],
1729
1815
  [
1730
1816
  /windows nt 6\.2; (arm)/i,
1731
1817
  // Windows RT
1732
1818
  /windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,
1733
1819
  /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
1734
1820
  ],
1735
- [[u, z, xt], [l, lt]],
1821
+ [[u, q, Lt], [l, lt]],
1736
1822
  [
1737
1823
  // iOS/macOS
1738
1824
  /[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
@@ -1752,27 +1838,27 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1752
1838
  /android ([\d\.]+).*crkey/i
1753
1839
  // Google Chromecast, Android-based
1754
1840
  ],
1755
- [u, [l, H + " Android"]],
1841
+ [u, [l, V + " Android"]],
1756
1842
  [
1757
1843
  /fuchsia.*crkey\/([\d\.]+)/i
1758
1844
  // Google Chromecast, Fuchsia-based
1759
1845
  ],
1760
- [u, [l, H + " Fuchsia"]],
1846
+ [u, [l, V + " Fuchsia"]],
1761
1847
  [
1762
1848
  /crkey\/([\d\.]+).*devicetype\/smartspeaker/i
1763
1849
  // Google Chromecast, Linux-based Smart Speaker
1764
1850
  ],
1765
- [u, [l, H + " SmartSpeaker"]],
1851
+ [u, [l, V + " SmartSpeaker"]],
1766
1852
  [
1767
1853
  /linux.*crkey\/([\d\.]+)/i
1768
1854
  // Google Chromecast, Legacy Linux-based
1769
1855
  ],
1770
- [u, [l, H + " Linux"]],
1856
+ [u, [l, V + " Linux"]],
1771
1857
  [
1772
1858
  /crkey\/([\d\.]+)/i
1773
1859
  // Google Chromecast, unknown
1774
1860
  ],
1775
- [u, [l, H]],
1861
+ [u, [l, V]],
1776
1862
  [
1777
1863
  // Mobile OSes
1778
1864
  /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
@@ -1793,7 +1879,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1793
1879
  /\(bb(10);/i
1794
1880
  // BlackBerry 10
1795
1881
  ],
1796
- [u, [l, Et]],
1882
+ [u, [l, St]],
1797
1883
  [
1798
1884
  /(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
1799
1885
  // Symbian
@@ -1873,123 +1959,123 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
1873
1959
  [l, u]
1874
1960
  ]
1875
1961
  }, Re = function() {
1876
- var s = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
1877
- return N.call(s.init, [
1962
+ var i = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
1963
+ return D.call(i.init, [
1878
1964
  [S, [l, u, Se, n]],
1879
- [B, [I]],
1880
- [R, [n, o, c]],
1881
- [O, [l, u]],
1882
- [P, [l, u]]
1883
- ]), N.call(s.isIgnore, [
1965
+ [F, [T]],
1966
+ [R, [n, o, d]],
1967
+ [x, [l, u]],
1968
+ [O, [l, u]]
1969
+ ]), D.call(i.isIgnore, [
1884
1970
  [S, [u, Se]],
1885
- [O, [u]],
1886
- [P, [u]]
1887
- ]), N.call(s.isIgnoreRgx, [
1971
+ [x, [u]],
1972
+ [O, [u]]
1973
+ ]), D.call(i.isIgnoreRgx, [
1888
1974
  [S, / ?browser$/i],
1889
- [P, / ?os$/i]
1890
- ]), N.call(s.toString, [
1975
+ [O, / ?os$/i]
1976
+ ]), D.call(i.toString, [
1891
1977
  [S, [l, u]],
1892
- [B, [I]],
1893
- [R, [c, o]],
1894
- [O, [l, u]],
1895
- [P, [l, u]]
1896
- ]), s;
1897
- }(), Si = function(s, t) {
1898
- var e = Re.init[t], i = Re.isIgnore[t] || 0, a = Re.isIgnoreRgx[t] || 0, d = Re.toString[t] || 0;
1899
- function r() {
1900
- N.call(this, e);
1901
- }
1902
- return r.prototype.getItem = function() {
1903
- return s;
1904
- }, r.prototype.withClientHints = function() {
1905
- return V ? V.getHighEntropyValues(jt).then(function(p) {
1906
- return s.setCH(new $t(p, !1)).parseCH().get();
1907
- }) : s.parseCH().get();
1908
- }, r.prototype.withFeatureCheck = function() {
1909
- return s.detectFeature().get();
1910
- }, t != te && (r.prototype.is = function(p) {
1978
+ [F, [T]],
1979
+ [R, [d, o]],
1980
+ [x, [l, u]],
1981
+ [O, [l, u]]
1982
+ ]), i;
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;
1985
+ function c() {
1986
+ D.call(this, e);
1987
+ }
1988
+ return c.prototype.getItem = function() {
1989
+ return i;
1990
+ }, c.prototype.withClientHints = function() {
1991
+ return z ? z.getHighEntropyValues(Qt).then(function(g) {
1992
+ return i.setCH(new Xt(g, !1)).parseCH().get();
1993
+ }) : i.parseCH().get();
1994
+ }, c.prototype.withFeatureCheck = function() {
1995
+ return i.detectFeature().get();
1996
+ }, t != te && (c.prototype.is = function(g) {
1911
1997
  var h = !1;
1912
- for (var g in this)
1913
- if (this.hasOwnProperty(g) && !ut(i, g) && F(a ? he(a, this[g]) : this[g]) == F(a ? he(a, p) : p)) {
1914
- if (h = !0, p != W) break;
1915
- } else if (p == W && h) {
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) {
1916
2002
  h = !h;
1917
2003
  break;
1918
2004
  }
1919
2005
  return h;
1920
- }, r.prototype.toString = function() {
1921
- var p = le;
1922
- for (var h in d)
1923
- typeof this[d[h]] !== W && (p += (p ? " " : le) + this[d[h]]);
1924
- return p || W;
1925
- }), V || (r.prototype.then = function(p) {
1926
- var h = this, g = function() {
2006
+ }, c.prototype.toString = function() {
2007
+ var g = le;
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() {
1927
2013
  for (var C in h)
1928
2014
  h.hasOwnProperty(C) && (this[C] = h[C]);
1929
2015
  };
1930
- g.prototype = {
1931
- is: r.prototype.is,
1932
- toString: r.prototype.toString
2016
+ p.prototype = {
2017
+ is: c.prototype.is,
2018
+ toString: c.prototype.toString
1933
2019
  };
1934
- var m = new g();
1935
- return p(m), m;
1936
- }), new r();
2020
+ var m = new p();
2021
+ return g(m), m;
2022
+ }), new c();
1937
2023
  };
1938
- function $t(s, t) {
1939
- if (s = s || {}, N.call(this, jt), t)
1940
- N.call(this, [
1941
- [ht, at(s[$])],
1942
- [pt, at(s[wi])],
1943
- [w, /\?1/.test(s[yi])],
1944
- [o, Ee(s[ki])],
1945
- [ie, Ee(s[Wt])],
1946
- [gt, Ee(s[vi])],
1947
- [I, Ee(s[mi])],
1948
- [Y, at(s[fi])],
1949
- [Ve, Ee(s[bi])]
2024
+ function Xt(i, t) {
2025
+ if (i = i || {}, D.call(this, Qt), t)
2026
+ D.call(this, [
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])],
2034
+ [Y, at(i[ks])],
2035
+ [Ve, Ee(i[ys])]
1950
2036
  ]);
1951
2037
  else
1952
- for (var e in s)
1953
- this.hasOwnProperty(e) && typeof s[e] !== W && (this[e] = s[e]);
2038
+ for (var e in i)
2039
+ this.hasOwnProperty(e) && typeof i[e] !== j && (this[e] = i[e]);
1954
2040
  }
1955
- function Lt(s, t, e, i) {
2041
+ function Ft(i, t, e, s) {
1956
2042
  return this.get = function(a) {
1957
2043
  return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
1958
- }, this.set = function(a, d) {
1959
- return this.data[a] = d, this;
2044
+ }, this.set = function(a, r) {
2045
+ return this.data[a] = r, this;
1960
2046
  }, this.setCH = function(a) {
1961
2047
  return this.uaCH = a, this;
1962
2048
  }, this.detectFeature = function() {
1963
- if (T && T.userAgent == this.ua)
2049
+ if (I && I.userAgent == this.ua)
1964
2050
  switch (this.itemType) {
1965
2051
  case S:
1966
- T.brave && typeof T.brave.isBrave == _e && this.set(l, "Brave");
2052
+ I.brave && typeof I.brave.isBrave == Be && this.set(l, "Brave");
1967
2053
  break;
1968
2054
  case R:
1969
- !this.get(n) && V && V[w] && this.set(n, w), this.get(o) == "Macintosh" && T && typeof T.standalone !== W && T.maxTouchPoints && T.maxTouchPoints > 2 && this.set(o, "iPad").set(n, f);
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);
1970
2056
  break;
1971
- case P:
1972
- !this.get(l) && V && V[ie] && this.set(l, V[ie]);
2057
+ case O:
2058
+ !this.get(l) && z && z[se] && this.set(l, z[se]);
1973
2059
  break;
1974
2060
  case te:
1975
- var a = this.data, d = function(r) {
1976
- return a[r].getItem().detectFeature().get();
2061
+ var a = this.data, r = function(c) {
2062
+ return a[c].getItem().detectFeature().get();
1977
2063
  };
1978
- this.set(S, d(S)).set(B, d(B)).set(R, d(R)).set(O, d(O)).set(P, d(P));
2064
+ this.set(S, r(S)).set(F, r(F)).set(R, r(R)).set(x, r(x)).set(O, r(O));
1979
2065
  }
1980
2066
  return this;
1981
2067
  }, this.parseUA = function() {
1982
2068
  return this.itemType != te && ot.call(this.data, this.ua, this.rgxMap), this.itemType == S && this.set(Se, nt(this.get(u))), this;
1983
2069
  }, this.parseCH = function() {
1984
- var a = this.uaCH, d = this.rgxMap;
2070
+ var a = this.uaCH, r = this.rgxMap;
1985
2071
  switch (this.itemType) {
1986
2072
  case S:
1987
- case O:
1988
- var r = a[pt] || a[ht], p;
1989
- if (r)
1990
- for (var h in r) {
1991
- var g = r[h].brand || r[h], m = r[h].version;
1992
- this.itemType == S && !/not.a.brand/i.test(g) && (!p || /chrom/i.test(p) && g != Pt) && (g = z(g, {
2073
+ case x:
2074
+ var c = a[gt] || a[ht], g;
2075
+ if (c)
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, {
1993
2079
  Chrome: "Google Chrome",
1994
2080
  Edge: "Microsoft Edge",
1995
2081
  "Chrome WebView": "Android WebView",
@@ -1998,107 +2084,107 @@ function Lt(s, t, e, i) {
1998
2084
  "MIUI Browser": "Miui Browser",
1999
2085
  "Opera Mobi": "OperaMobile",
2000
2086
  Yandex: "YaBrowser"
2001
- }), this.set(l, g).set(u, m).set(Se, nt(m)), p = g), this.itemType == O && g == Pt && this.set(u, m);
2087
+ }), this.set(l, p).set(u, m).set(Se, nt(m)), g = p), this.itemType == x && p == Ut && this.set(u, m);
2002
2088
  }
2003
2089
  break;
2004
- case B:
2005
- var C = a[I];
2006
- C && (C && a[Ve] == "64" && (C += "64"), ot.call(this.data, C + ";", d));
2090
+ case F:
2091
+ var C = a[T];
2092
+ C && (C && a[Ve] == "64" && (C += "64"), ot.call(this.data, C + ";", r));
2007
2093
  break;
2008
2094
  case R:
2009
- if (a[w] && this.set(n, w), a[o] && (this.set(o, a[o]), !this.get(n) || !this.get(c))) {
2095
+ if (a[w] && this.set(n, w), a[o] && (this.set(o, a[o]), !this.get(n) || !this.get(d))) {
2010
2096
  var A = {};
2011
- ot.call(A, "droid 9; " + a[o] + ")", d), !this.get(n) && A.type && this.set(n, A.type), !this.get(c) && A.vendor && this.set(c, A.vendor);
2097
+ ot.call(A, "droid 9; " + a[o] + ")", r), !this.get(n) && A.type && this.set(n, A.type), !this.get(d) && A.vendor && this.set(d, A.vendor);
2012
2098
  }
2013
2099
  if (a[Y]) {
2014
- var D;
2100
+ var G;
2015
2101
  if (typeof a[Y] != "string")
2016
- for (var ge = 0; !D && ge < a[Y].length; )
2017
- D = z(a[Y][ge++], Ut);
2102
+ for (var pe = 0; !G && pe < a[Y].length; )
2103
+ G = q(a[Y][pe++], Bt);
2018
2104
  else
2019
- D = z(a[Y], Ut);
2020
- this.set(n, D);
2105
+ G = q(a[Y], Bt);
2106
+ this.set(n, G);
2021
2107
  }
2022
2108
  break;
2023
- case P:
2024
- var _ = a[ie];
2109
+ case O:
2110
+ var _ = a[se];
2025
2111
  if (_) {
2026
- var Q = a[gt];
2027
- _ == lt && (Q = parseInt(nt(Q), 10) >= 13 ? "11" : "10"), this.set(l, _).set(u, Q);
2112
+ var K = a[pt];
2113
+ _ == lt && (K = parseInt(nt(K), 10) >= 13 ? "11" : "10"), this.set(l, _).set(u, K);
2028
2114
  }
2029
2115
  this.get(l) == lt && a[o] == "Xbox" && this.set(l, "Xbox").set(u, void 0);
2030
2116
  break;
2031
2117
  case te:
2032
- var K = this.data, G = function(Oe) {
2033
- return K[Oe].getItem().setCH(a).parseCH().get();
2118
+ var Q = this.data, H = function(Oe) {
2119
+ return Q[Oe].getItem().setCH(a).parseCH().get();
2034
2120
  };
2035
- this.set(S, G(S)).set(B, G(B)).set(R, G(R)).set(O, G(O)).set(P, G(P));
2121
+ this.set(S, H(S)).set(F, H(F)).set(R, H(R)).set(x, H(x)).set(O, H(O));
2036
2122
  }
2037
2123
  return this;
2038
- }, N.call(this, [
2039
- ["itemType", s],
2124
+ }, D.call(this, [
2125
+ ["itemType", i],
2040
2126
  ["ua", t],
2041
- ["uaCH", i],
2127
+ ["uaCH", s],
2042
2128
  ["rgxMap", e],
2043
- ["data", Si(this, s)]
2129
+ ["data", Is(this, i)]
2044
2130
  ]), this;
2045
2131
  }
2046
- function L(s, t, e) {
2047
- if (typeof s === ue ? (Be(s, !0) ? (typeof t === ue && (e = t), t = s) : (e = s, t = void 0), s = void 0) : typeof s === dt && !Be(t, !0) && (e = t, t = void 0), e && typeof e.append === _e) {
2048
- var i = {};
2049
- e.forEach(function(h, g) {
2050
- i[g] = h;
2051
- }), e = i;
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) {
2134
+ var s = {};
2135
+ e.forEach(function(h, p) {
2136
+ s[p] = h;
2137
+ }), e = s;
2052
2138
  }
2053
2139
  if (!(this instanceof L))
2054
- return new L(s, t, e).getResult();
2055
- var a = typeof s === dt ? s : (
2140
+ return new L(i, t, e).getResult();
2141
+ var a = typeof i === dt ? i : (
2056
2142
  // Passed user-agent string
2057
- e && e[yt] ? e[yt] : (
2143
+ e && e[Et] ? e[Et] : (
2058
2144
  // User-Agent from passed headers
2059
- T && T.userAgent ? T.userAgent : (
2145
+ I && I.userAgent ? I.userAgent : (
2060
2146
  // navigator.userAgent
2061
2147
  le
2062
2148
  )
2063
2149
  )
2064
- ), d = new $t(e, !0), r = t ? Mi(Rt, t) : Rt, p = function(h) {
2150
+ ), r = new Xt(e, !0), c = t ? Ts(_t, t) : _t, g = function(h) {
2065
2151
  return h == te ? function() {
2066
- return new Lt(h, a, r, d).set("ua", a).set(S, this.getBrowser()).set(B, this.getCPU()).set(R, this.getDevice()).set(O, this.getEngine()).set(P, this.getOS()).get();
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();
2067
2153
  } : function() {
2068
- return new Lt(h, a, r[h], d).parseUA().get();
2154
+ return new Ft(h, a, c[h], r).parseUA().get();
2069
2155
  };
2070
2156
  };
2071
- return N.call(this, [
2072
- ["getBrowser", p(S)],
2073
- ["getCPU", p(B)],
2074
- ["getDevice", p(R)],
2075
- ["getEngine", p(O)],
2076
- ["getOS", p(P)],
2077
- ["getResult", p(te)],
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)],
2078
2164
  ["getUA", function() {
2079
2165
  return a;
2080
2166
  }],
2081
2167
  ["setUA", function(h) {
2082
- return pe(h) && (a = h.length > ct ? Ie(h, ct) : h), this;
2168
+ return ge(h) && (a = h.length > ct ? Te(h, ct) : h), this;
2083
2169
  }]
2084
2170
  ]).setUA(a), this;
2085
2171
  }
2086
- L.VERSION = gi;
2172
+ L.VERSION = ms;
2087
2173
  L.BROWSER = ze([l, u, Se, n]);
2088
- L.CPU = ze([I]);
2089
- L.DEVICE = ze([o, c, n, Ce, w, y, f, U, Me]);
2174
+ L.CPU = ze([T]);
2175
+ L.DEVICE = ze([o, d, n, Ce, w, y, f, U, Me]);
2090
2176
  L.ENGINE = L.OS = ze([l, u]);
2091
- class Ii {
2177
+ class As {
2092
2178
  constructor(t, e) {
2093
2179
  b(this, "config");
2094
2180
  b(this, "sdkConfig");
2095
2181
  this.config = t, this.sdkConfig = e;
2096
2182
  }
2097
- on(t, e, i) {
2098
- const a = function(r) {
2099
- r.data.message !== `kalamba:wrapper-rgs:${t}` && r.data.message !== `kalamba:wrapper:${t}` || e(r.data.payload);
2183
+ on(t, e, s) {
2184
+ const a = function(c) {
2185
+ c.data.message !== `kalamba:wrapper-rgs:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
2100
2186
  };
2101
- window.addEventListener("message", a, i);
2187
+ window.addEventListener("message", a, s);
2102
2188
  }
2103
2189
  send(t, ...[e]) {
2104
2190
  window.postMessage({
@@ -2107,7 +2193,7 @@ class Ii {
2107
2193
  });
2108
2194
  }
2109
2195
  }
2110
- class Ti {
2196
+ class Ps {
2111
2197
  constructor(t) {
2112
2198
  b(this, "socket", null);
2113
2199
  b(this, "webSocketUrl");
@@ -2121,8 +2207,8 @@ class Ti {
2121
2207
  return t.addEventListener("message", this.handleMessage), new Promise((e) => {
2122
2208
  t.addEventListener(
2123
2209
  "open",
2124
- (i) => {
2125
- this.handleOpen(i), e(this.socket);
2210
+ (s) => {
2211
+ this.handleOpen(s), e(this.socket);
2126
2212
  },
2127
2213
  { once: !0 }
2128
2214
  );
@@ -2163,36 +2249,36 @@ class Ti {
2163
2249
  this.eventListeners[t].push(e);
2164
2250
  }
2165
2251
  removeEventListener(t, e) {
2166
- const i = this.eventListeners[t].indexOf(e);
2167
- i !== -1 && this.eventListeners[t].splice(i, 1);
2252
+ const s = this.eventListeners[t].indexOf(e);
2253
+ s !== -1 && this.eventListeners[t].splice(s, 1);
2168
2254
  }
2169
2255
  }
2170
- function Le(s) {
2171
- return JSON.parse(s == null ? void 0 : s.data);
2256
+ function Le(i) {
2257
+ return JSON.parse(i == null ? void 0 : i.data);
2172
2258
  }
2173
- function Ai(s) {
2259
+ function Os(i) {
2174
2260
  var t;
2175
- return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "Ping";
2261
+ return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "Ping";
2176
2262
  }
2177
- function _t(s) {
2263
+ function Nt(i) {
2178
2264
  var t;
2179
- return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "RealityCheck";
2265
+ return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "RealityCheck";
2180
2266
  }
2181
- function Fe(s) {
2182
- return s.header.name === "GameEvent";
2267
+ function Fe(i) {
2268
+ return i.header.name === "GameEvent";
2183
2269
  }
2184
- function Pi(s) {
2185
- return Fe(s) && s.body.event === "OPEN_GAME";
2270
+ function xs(i) {
2271
+ return Fe(i) && i.body.event === "OPEN_GAME";
2186
2272
  }
2187
- function Bt(s) {
2188
- return s.header.code !== 1;
2273
+ function Dt(i) {
2274
+ return i.header.code !== 1;
2189
2275
  }
2190
- function Oi(s) {
2191
- return Fe(s) && s.body.event.includes("_RESULT");
2276
+ function Us(i) {
2277
+ return Fe(i) && i.body.event.includes("_RESULT");
2192
2278
  }
2193
- var se, Te;
2194
- class xi extends Ti {
2195
- constructor(e, i) {
2279
+ var ie, Ie;
2280
+ class Rs extends Ps {
2281
+ constructor(e, s) {
2196
2282
  const a = new URL(e.apiUrl);
2197
2283
  a.searchParams.set("cageCode", e.cageCode), a.searchParams.set("gameCode", e.gameCode), a.searchParams.set("operatorCode", e.operatorCode), a.searchParams.set("playMode", e.playMode), a.searchParams.set("token", e.token), a.searchParams.set("username", e.username);
2198
2284
  super(a.toString());
@@ -2225,38 +2311,38 @@ class xi extends Ti {
2225
2311
  */
2226
2312
  b(this, "seqId", 0);
2227
2313
  b(this, "gameCode");
2228
- M(this, se);
2229
- M(this, Te);
2314
+ M(this, ie);
2315
+ M(this, Ie);
2230
2316
  b(this, "onMessage", (e) => {
2231
- const i = Le(e);
2232
- (Fe(i) || Ai(i) || _t(i)) && this.sendAcknowledgement(i), _t(i) && this.handleRealityCheck(i);
2317
+ const s = Le(e);
2318
+ (Fe(s) || Os(s) || Nt(s)) && this.sendAcknowledgement(s), Nt(s) && this.handleRealityCheck(s);
2233
2319
  });
2234
- this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, v(this, se, i.requestTimeoutMs), v(this, Te, i.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
2320
+ this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, v(this, ie, s.requestTimeoutMs), v(this, Ie, s.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
2235
2321
  }
2236
2322
  handleRealityCheck(e) {
2237
- this.eventListeners.realityCheck.forEach((i) => {
2238
- i(e.body);
2323
+ this.eventListeners.realityCheck.forEach((s) => {
2324
+ s(e.body);
2239
2325
  });
2240
2326
  }
2241
- addEventListener(e, i) {
2242
- super.addEventListener(e, i);
2327
+ addEventListener(e, s) {
2328
+ super.addEventListener(e, s);
2243
2329
  }
2244
- removeEventListener(e, i) {
2245
- super.removeEventListener(e, i);
2330
+ removeEventListener(e, s) {
2331
+ super.removeEventListener(e, s);
2246
2332
  }
2247
- buildHeader(e, i = null) {
2333
+ buildHeader(e, s = null) {
2248
2334
  return {
2249
2335
  // Assign new cId if it is not provided
2250
- cId: i ?? ++this.cId,
2251
- code: i !== null ? 1 : void 0,
2336
+ cId: s ?? ++this.cId,
2337
+ code: s !== null ? 1 : void 0,
2252
2338
  mId: ++this.mId,
2253
2339
  name: e
2254
2340
  };
2255
2341
  }
2256
2342
  // TODO infer body from header
2257
- buildPayload(e, i) {
2343
+ buildPayload(e, s) {
2258
2344
  return JSON.stringify({
2259
- body: i,
2345
+ body: s,
2260
2346
  header: e
2261
2347
  });
2262
2348
  }
@@ -2266,84 +2352,91 @@ class xi extends Ti {
2266
2352
  seqId: ++this.seqId
2267
2353
  };
2268
2354
  }
2269
- request(e, i) {
2270
- const a = this.buildPayload(e, i);
2271
- return new Promise((d, r) => {
2272
- setTimeout(() => r({ type: "timeout" }), k(this, se));
2273
- const p = (h) => {
2274
- const g = Le(h);
2355
+ request(e, s) {
2356
+ const a = this.buildPayload(e, s);
2357
+ return new Promise((r, c) => {
2358
+ setTimeout(() => c({ type: "timeout" }), k(this, ie));
2359
+ const g = (h) => {
2360
+ const p = Le(h);
2275
2361
  try {
2276
- e.cId === g.header.cId && (this.removeEventListener("message", p), g.header.code === 1 ? d(g) : r({ message: g, type: "error" }));
2362
+ e.cId === p.header.cId && (this.removeEventListener("message", g), p.header.code === 1 ? r(p) : c({ message: p, type: "error" }));
2277
2363
  } catch {
2278
- r({ message: g, type: "error" });
2364
+ c({ message: p, type: "error" });
2279
2365
  }
2280
2366
  };
2281
- this.addEventListener("message", p), this.send(a);
2367
+ this.addEventListener("message", g), this.send(a);
2282
2368
  });
2283
2369
  }
2284
2370
  freeRounds(e) {
2285
- const i = this.buildHeader("ActivateFreeRound");
2286
- return this.request(i, e).then((a) => a.body).catch((a) => {
2287
- var d;
2288
- throw { data: (d = a == null ? void 0 : a.message) == null ? void 0 : d.body, type: a.type };
2371
+ const s = this.buildHeader("ActivateFreeRound");
2372
+ return this.request(s, e).then((a) => a.body).catch((a) => {
2373
+ var r;
2374
+ throw { data: (r = a == null ? void 0 : a.message) == null ? void 0 : r.body, type: a.type };
2289
2375
  });
2290
2376
  }
2291
2377
  async authenticate(e = !1) {
2292
- const i = this.buildHeader("Authenticate"), a = {
2378
+ const s = this.buildHeader("Authenticate"), a = {
2293
2379
  clientType: 3,
2294
- version: k(this, Te),
2380
+ version: k(this, Ie),
2295
2381
  reconnect: e
2296
2382
  };
2297
- return this.request(i, a).then((d) => d.body).catch((d) => {
2383
+ return this.request(s, a).then((r) => r.body).catch((r) => {
2384
+ var c;
2385
+ throw { data: (c = r == null ? void 0 : r.message) == null ? void 0 : c.body, type: r.type };
2386
+ });
2387
+ }
2388
+ async getBalance() {
2389
+ const e = this.buildHeader("GetBalance"), s = {};
2390
+ return this.request(e, s).then((a) => a.body).catch((a) => {
2298
2391
  var r;
2299
- throw { data: (r = d == null ? void 0 : d.message) == null ? void 0 : r.body, type: d.type };
2392
+ throw { data: (r = a == null ? void 0 : a.message) == null ? void 0 : r.body, type: a.type };
2300
2393
  });
2301
2394
  }
2302
2395
  async openGame() {
2303
- const e = this.buildHeader("OpenGame"), i = {
2396
+ const e = this.buildHeader("OpenGame"), s = {
2304
2397
  gameCode: this.gameCode
2305
2398
  };
2306
- return new Promise((a, d) => {
2307
- const r = (p) => {
2308
- const h = Le(p);
2309
- Pi(h) ? (this.removeEventListener("message", r), a(h.body)) : Bt(h) && d({ data: h.body, type: "error" });
2399
+ return new Promise((a, r) => {
2400
+ const c = (g) => {
2401
+ const h = Le(g);
2402
+ xs(h) ? (this.removeEventListener("message", c), a(h.body)) : Dt(h) && r({ data: h.body, type: "error" });
2310
2403
  };
2311
- this.addEventListener("message", r), this.request(e, i).catch(
2312
- (p) => {
2404
+ this.addEventListener("message", c), this.request(e, s).catch(
2405
+ (g) => {
2313
2406
  var h;
2314
- return d({ data: (h = p == null ? void 0 : p.message) == null ? void 0 : h.body, type: p.type });
2407
+ return r({ data: (h = g == null ? void 0 : g.message) == null ? void 0 : h.body, type: g.type });
2315
2408
  }
2316
2409
  );
2317
2410
  });
2318
2411
  }
2319
2412
  sendAcknowledgement(e) {
2320
- const { name: i, cId: a } = e.header, d = this.buildHeader(i, a), r = this.buildPayload(d, {});
2321
- this.send(r);
2413
+ const { name: s, cId: a } = e.header, r = this.buildHeader(s, a), c = this.buildPayload(r, {});
2414
+ this.send(c);
2322
2415
  }
2323
- sendAction(e, i) {
2324
- const a = this.buildHeader("GameAction"), d = {
2416
+ sendAction(e, s) {
2417
+ const a = this.buildHeader("GameAction"), r = {
2325
2418
  ...this.getBodyExtras(e),
2326
- data: i
2419
+ data: s
2327
2420
  };
2328
- return new Promise((r, p) => {
2329
- const h = (g) => {
2330
- const m = Le(g);
2331
- Fe(m) && d.seqId === m.body.correlationSeqId && (this.removeEventListener("message", h), Oi(m) ? r(m.body) : Bt(m) && p({ data: m.body, type: "error" }));
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" }));
2332
2425
  };
2333
- this.addEventListener("message", h), this.request(a, d).catch(
2334
- (g) => {
2426
+ this.addEventListener("message", h), this.request(a, r).catch(
2427
+ (p) => {
2335
2428
  var m;
2336
- return p({ data: (m = g == null ? void 0 : g.message) == null ? void 0 : m.body, type: g.type });
2429
+ return g({ data: (m = p == null ? void 0 : p.message) == null ? void 0 : m.body, type: p.type });
2337
2430
  }
2338
2431
  );
2339
2432
  });
2340
2433
  }
2341
2434
  setRequestTimeoutMs(e) {
2342
- v(this, se, e);
2435
+ v(this, ie, e);
2343
2436
  }
2344
2437
  }
2345
- se = new WeakMap(), Te = new WeakMap();
2346
- const Ui = {
2438
+ ie = new WeakMap(), Ie = new WeakMap();
2439
+ const Ls = {
2347
2440
  CA_BC: "CA",
2348
2441
  CA_ON: "CA",
2349
2442
  GER: "DE",
@@ -2352,11 +2445,11 @@ const Ui = {
2352
2445
  US_NJ: "US",
2353
2446
  USA: "US"
2354
2447
  };
2355
- function Ft(s) {
2356
- return !s || s === "NOT_APPLICABLE" ? null : Ui[s] ?? s;
2448
+ function Gt(i) {
2449
+ return !i || i === "NOT_APPLICABLE" ? null : Ls[i] ?? i;
2357
2450
  }
2358
- function Qt(s) {
2359
- const t = s.contract;
2451
+ function Jt(i) {
2452
+ const t = i.contract;
2360
2453
  return t ? {
2361
2454
  contract: {
2362
2455
  balance: {
@@ -2366,36 +2459,36 @@ function Qt(s) {
2366
2459
  coinValueInCents: t.coinValueInCents,
2367
2460
  country: t.countryCode,
2368
2461
  currency: t.currencyCode,
2369
- jurisdiction: Ft(t.jurisdictionCode),
2462
+ jurisdiction: Gt(t.jurisdictionCode),
2370
2463
  uiMessages: t.uiMessages,
2371
2464
  username: t.username
2372
2465
  }
2373
2466
  } : {
2374
2467
  contract: {
2375
2468
  balance: {
2376
- coins: s.balance,
2377
- version: s.balanceVersion
2469
+ coins: i.balance,
2470
+ version: i.balanceVersion
2378
2471
  },
2379
- coinValueInCents: s.coinValueInCents,
2380
- country: s.countryCode,
2381
- currency: s.currencyCode,
2382
- jurisdiction: Ft(s.jurisdictionCode),
2383
- uiMessages: s.uiMessages,
2384
- username: s.username
2472
+ coinValueInCents: i.coinValueInCents,
2473
+ country: i.countryCode,
2474
+ currency: i.currencyCode,
2475
+ jurisdiction: Gt(i.jurisdictionCode),
2476
+ uiMessages: i.uiMessages,
2477
+ username: i.username
2385
2478
  }
2386
2479
  };
2387
2480
  }
2388
- function Kt(s) {
2481
+ function Yt(i) {
2389
2482
  var t, e;
2390
2483
  return {
2391
2484
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2392
- code: ((t = s.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2393
- details: (e = s.data) == null ? void 0 : e.details
2485
+ code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2486
+ details: (e = i.data) == null ? void 0 : e.details
2394
2487
  };
2395
2488
  }
2396
- function Xt(s, t, e) {
2397
- const i = t.contract;
2398
- if (!i) {
2489
+ function Zt(i, t, e) {
2490
+ const s = t.contract;
2491
+ if (!s) {
2399
2492
  const a = t.data;
2400
2493
  return {
2401
2494
  contract: {
@@ -2419,22 +2512,22 @@ function Xt(s, t, e) {
2419
2512
  coins: t.balance,
2420
2513
  version: t.balanceVersion
2421
2514
  },
2422
- freeRounds: (a.FREE_ROUNDS ?? []).map((d) => ({
2515
+ freeRounds: (a.FREE_ROUNDS ?? []).map((r) => ({
2423
2516
  conf: {
2424
- base: d.conf.baseBet,
2425
- multiplier: d.conf.betMultiplier,
2426
- numAwarded: d.conf.numAwarded
2517
+ base: r.conf.baseBet,
2518
+ multiplier: r.conf.betMultiplier,
2519
+ numAwarded: r.conf.numAwarded
2427
2520
  },
2428
2521
  data: {
2429
- numPlayed: d.data.numPlayed,
2430
- win: d.data.winAmount,
2431
- numLeft: d.data.numLeft
2522
+ numPlayed: r.data.numPlayed,
2523
+ win: r.data.winAmount,
2524
+ numLeft: r.data.numLeft
2432
2525
  },
2433
- id: d.id,
2434
- rejectable: d.rejectable,
2435
- skippable: d.skippable,
2436
- status: d.status,
2437
- type: d.type
2526
+ id: r.id,
2527
+ rejectable: r.rejectable,
2528
+ skippable: r.skippable,
2529
+ status: r.status,
2530
+ type: r.type
2438
2531
  })),
2439
2532
  gameModel: a.additionalConfigData.gameModelFile,
2440
2533
  metaData: a.gameConfigData.metaData,
@@ -2445,7 +2538,7 @@ function Xt(s, t, e) {
2445
2538
  thisRound: a.gameState.stateTypeThisRound,
2446
2539
  nextRound: a.gameState.stateTypeNextRound
2447
2540
  },
2448
- uiMessages: s.uiMessages,
2541
+ uiMessages: i.uiMessages,
2449
2542
  win: {
2450
2543
  max: a.maxWin ?? null,
2451
2544
  round: a.gameState.totalWinFromCurrentRound,
@@ -2458,26 +2551,26 @@ function Xt(s, t, e) {
2458
2551
  return {
2459
2552
  contract: {
2460
2553
  bet: {
2461
- available: i.availableMultipliersPerBaseBet,
2554
+ available: s.availableMultipliersPerBaseBet,
2462
2555
  default: {
2463
- base: i.defaultBet.baseBet,
2464
- multiplier: i.defaultBet.betMultiplier
2556
+ base: s.defaultBet.baseBet,
2557
+ multiplier: s.defaultBet.betMultiplier
2465
2558
  },
2466
- max: i.maxBetInCoins ?? null,
2467
- last: i.lastBet ? {
2468
- base: i.lastBet.baseBet,
2469
- multiplier: i.lastBet.betMultiplier
2559
+ max: s.maxBetInCoins ?? null,
2560
+ last: s.lastBet ? {
2561
+ base: s.lastBet.baseBet,
2562
+ multiplier: s.lastBet.betMultiplier
2470
2563
  } : null,
2471
- lastPaid: i.lastMainGameBet ? {
2472
- base: i.lastMainGameBet.baseBet,
2473
- multiplier: i.lastMainGameBet.betMultiplier
2564
+ lastPaid: s.lastMainGameBet ? {
2565
+ base: s.lastMainGameBet.baseBet,
2566
+ multiplier: s.lastMainGameBet.betMultiplier
2474
2567
  } : null
2475
2568
  },
2476
2569
  balance: {
2477
- coins: i.balanceInCoins,
2478
- version: i.balanceVersion
2570
+ coins: s.balanceInCoins,
2571
+ version: s.balanceVersion
2479
2572
  },
2480
- freeRounds: (i.freeRounds ?? []).map((a) => ({
2573
+ freeRounds: (s.freeRounds ?? []).map((a) => ({
2481
2574
  conf: {
2482
2575
  base: a.conf.baseBet,
2483
2576
  multiplier: a.conf.betMultiplier,
@@ -2494,54 +2587,54 @@ function Xt(s, t, e) {
2494
2587
  status: a.status,
2495
2588
  type: a.type
2496
2589
  })),
2497
- gameModel: i.gameModelFile,
2498
- metaData: i.metaData,
2499
- roundId: i.roundId,
2500
- serverTime: i.serverTime,
2501
- sessionId: i.sessionId,
2590
+ gameModel: s.gameModelFile,
2591
+ metaData: s.metaData,
2592
+ roundId: s.roundId,
2593
+ serverTime: s.serverTime,
2594
+ sessionId: s.sessionId,
2502
2595
  stateType: {
2503
- thisRound: i.stateTypeThisRound,
2504
- nextRound: i.stateTypeNextRound
2596
+ thisRound: s.stateTypeThisRound,
2597
+ nextRound: s.stateTypeNextRound
2505
2598
  },
2506
- uiMessages: s.contract.uiMessages.concat(i.uiMessages),
2599
+ uiMessages: i.contract.uiMessages.concat(s.uiMessages),
2507
2600
  win: {
2508
- max: i.maxWinInCoins ?? null,
2509
- round: i.roundWin,
2510
- total: i.totalWin
2601
+ max: s.maxWinInCoins ?? null,
2602
+ round: s.roundWin,
2603
+ total: s.totalWin
2511
2604
  }
2512
2605
  },
2513
2606
  data: e ? e(t.opaqueGameServerToUi) : t.opaqueGameServerToUi
2514
2607
  };
2515
2608
  }
2516
- function Jt(s) {
2609
+ function es(i) {
2517
2610
  var t, e;
2518
2611
  return {
2519
2612
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2520
- code: ((t = s.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2521
- details: (e = s.data) == null ? void 0 : e.details
2613
+ code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2614
+ details: (e = i.data) == null ? void 0 : e.details
2522
2615
  };
2523
2616
  }
2524
- function Yt(s, t) {
2525
- const e = s.contract;
2617
+ function ts(i, t) {
2618
+ const e = i.contract;
2526
2619
  if (!e) {
2527
- const i = s.data;
2620
+ const s = i.data;
2528
2621
  return {
2529
2622
  contract: {
2530
2623
  bet: {
2531
- last: i.gameState.betFromCurrentRound ? {
2532
- base: i.gameState.betFromCurrentRound.baseBet,
2533
- multiplier: i.gameState.betFromCurrentRound.betMultiplier
2624
+ last: s.gameState.betFromCurrentRound ? {
2625
+ base: s.gameState.betFromCurrentRound.baseBet,
2626
+ multiplier: s.gameState.betFromCurrentRound.betMultiplier
2534
2627
  } : null,
2535
2628
  lastPaid: {
2536
- base: (i.gameState.lastPlacedMainGameBet ?? i.gameState.betFromCurrentRound).baseBet,
2537
- multiplier: (i.gameState.lastPlacedMainGameBet ?? i.gameState.betFromCurrentRound).betMultiplier
2629
+ base: (s.gameState.lastPlacedMainGameBet ?? s.gameState.betFromCurrentRound).baseBet,
2630
+ multiplier: (s.gameState.lastPlacedMainGameBet ?? s.gameState.betFromCurrentRound).betMultiplier
2538
2631
  }
2539
2632
  },
2540
2633
  balance: {
2541
- coins: s.balance,
2542
- version: s.balanceVersion
2634
+ coins: i.balance,
2635
+ version: i.balanceVersion
2543
2636
  },
2544
- freeRounds: (i.FREE_ROUNDS ?? []).map((a) => ({
2637
+ freeRounds: (s.FREE_ROUNDS ?? []).map((a) => ({
2545
2638
  conf: {
2546
2639
  base: a.conf.baseBet,
2547
2640
  multiplier: a.conf.betMultiplier,
@@ -2558,19 +2651,19 @@ function Yt(s, t) {
2558
2651
  status: a.status,
2559
2652
  type: a.type
2560
2653
  })),
2561
- serverTime: s.balanceVersion,
2562
- roundId: i.gameState.cycleId,
2654
+ serverTime: i.balanceVersion,
2655
+ roundId: s.gameState.cycleId,
2563
2656
  stateType: {
2564
- thisRound: i.gameState.stateTypeThisRound,
2565
- nextRound: i.gameState.stateTypeNextRound
2657
+ thisRound: s.gameState.stateTypeThisRound,
2658
+ nextRound: s.gameState.stateTypeNextRound
2566
2659
  },
2567
- uiMessages: i.uiMessages,
2660
+ uiMessages: s.uiMessages,
2568
2661
  win: {
2569
- round: i.gameState.totalWinFromCurrentRound,
2570
- total: i.gameState.totalWinFromCurrentGameCycle
2662
+ round: s.gameState.totalWinFromCurrentRound,
2663
+ total: s.gameState.totalWinFromCurrentGameCycle
2571
2664
  }
2572
2665
  },
2573
- data: i
2666
+ data: s
2574
2667
  };
2575
2668
  }
2576
2669
  return {
@@ -2589,22 +2682,22 @@ function Yt(s, t) {
2589
2682
  coins: e.balanceInCoins,
2590
2683
  version: e.balanceVersion
2591
2684
  },
2592
- freeRounds: (e.freeRounds ?? []).map((i) => ({
2685
+ freeRounds: (e.freeRounds ?? []).map((s) => ({
2593
2686
  conf: {
2594
- base: i.conf.baseBet,
2595
- multiplier: i.conf.betMultiplier,
2596
- numAwarded: i.conf.numAwarded
2687
+ base: s.conf.baseBet,
2688
+ multiplier: s.conf.betMultiplier,
2689
+ numAwarded: s.conf.numAwarded
2597
2690
  },
2598
2691
  data: {
2599
- numPlayed: i.data.numPlayed,
2600
- win: i.data.winAmount,
2601
- numLeft: i.data.numLeft
2692
+ numPlayed: s.data.numPlayed,
2693
+ win: s.data.winAmount,
2694
+ numLeft: s.data.numLeft
2602
2695
  },
2603
- id: i.id,
2604
- rejectable: i.rejectable,
2605
- skippable: i.skippable,
2606
- status: i.status,
2607
- type: i.type
2696
+ id: s.id,
2697
+ rejectable: s.rejectable,
2698
+ skippable: s.skippable,
2699
+ status: s.status,
2700
+ type: s.type
2608
2701
  })),
2609
2702
  serverTime: e.serverTime,
2610
2703
  roundId: e.roundId,
@@ -2618,25 +2711,26 @@ function Yt(s, t) {
2618
2711
  total: e.totalWin
2619
2712
  }
2620
2713
  },
2621
- data: t ? t(s.opaqueGameServerToUi) : s.opaqueGameServerToUi
2714
+ data: t ? t(i.opaqueGameServerToUi) : i.opaqueGameServerToUi
2622
2715
  };
2623
2716
  }
2624
- function Zt(s) {
2717
+ function ss(i) {
2625
2718
  var t, e;
2626
2719
  return {
2627
2720
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2628
- code: ((t = s.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2629
- details: (e = s.data) == null ? void 0 : e.details
2721
+ code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2722
+ details: (e = i.data) == null ? void 0 : e.details
2630
2723
  };
2631
2724
  }
2632
- const is = {
2633
- parseAuthenticateResponse: Qt,
2634
- parseAuthenticateError: Kt,
2635
- parseOpenGameResponse: Xt,
2636
- parseOpenGameError: Jt,
2637
- parsePlayResponse: Yt,
2638
- parsePlayError: Zt
2639
- }, Ri = {
2725
+ const oi = {
2726
+ parseAuthenticateResponse: Jt,
2727
+ parseAuthenticateError: Yt,
2728
+ parseOpenGameResponse: Zt,
2729
+ parseOpenGameError: es,
2730
+ parsePlayResponse: ts,
2731
+ parsePlayError: ss
2732
+ }, Bs = {
2733
+ aze: "az",
2640
2734
  bul: "bg",
2641
2735
  chi: "zh",
2642
2736
  zho: "zh",
@@ -2668,8 +2762,8 @@ const is = {
2668
2762
  tur: "tr",
2669
2763
  ukr: "uk",
2670
2764
  vie: "vi"
2671
- }, { device: Li } = L(navigator.userAgent), _i = x("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
2672
- class ss extends Ii {
2765
+ }, { device: _s } = L(navigator.userAgent), Fs = P("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
2766
+ class ri extends As {
2673
2767
  constructor(...e) {
2674
2768
  super(...e);
2675
2769
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2679,43 +2773,50 @@ class ss extends Ii {
2679
2773
  this.on("openGame", async () => {
2680
2774
  try {
2681
2775
  this.error = void 0;
2682
- const i = await this.openGame();
2683
- this.send("openGameResponse", i);
2684
- } catch (i) {
2685
- this.error = i, this.send("openGameError", i);
2776
+ const s = await this.openGame();
2777
+ this.send("openGameResponse", s);
2778
+ } catch (s) {
2779
+ this.error = s, this.send("openGameError", s);
2686
2780
  }
2687
- }), this.on("play", async (i) => {
2781
+ }), this.on("play", async (s) => {
2688
2782
  try {
2689
2783
  this.error = void 0;
2690
- const a = await this.play(i);
2784
+ const a = await this.play(s);
2691
2785
  this.send("playResponse", a);
2692
2786
  } catch (a) {
2693
2787
  this.error = a, this.send("playError", a);
2694
2788
  }
2695
- }), this.on("freeRounds", async (i) => {
2789
+ }), this.on("freeRounds", async (s) => {
2696
2790
  try {
2697
- this.error = void 0, await this.socket.freeRounds(i), this.send("freeRoundsResponse", i);
2791
+ this.error = void 0, await this.socket.freeRounds(s), this.send("freeRoundsResponse", s);
2698
2792
  } catch (a) {
2699
2793
  this.error = a, this.send("freeRoundsError", a);
2700
2794
  }
2701
- }), this.on("configured", (i) => {
2702
- this.socket.setRequestTimeoutMs(i.ui.requestTimeoutMs);
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) => {
2803
+ this.socket.setRequestTimeoutMs(s.ui.requestTimeoutMs);
2703
2804
  }), this.registerFromSdkEvents();
2704
2805
  }
2705
2806
  initialize(e) {
2706
- this.socket = new xi(e, {
2807
+ this.socket = new Rs(e, {
2707
2808
  gameVersion: this.config.gameVersion,
2708
2809
  requestTimeoutMs: this.sdkConfig.ui.requestTimeoutMs
2709
- }), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (i) => {
2710
- i.code === 1008 ? this.error || this.send("error", {
2810
+ }), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (s) => {
2811
+ s.code === 1008 ? this.error || this.send("error", {
2711
2812
  type: "CLOSE",
2712
2813
  messageCode: "TOO_MANY_OPEN_GAMES",
2713
2814
  messageKey: "RgsError.TOO_MANY_OPEN_GAMES"
2714
- }) : i.code === 1011 ? this.error || this.send("error", { type: "CLOSE", messageCode: "UNKNOWN", messageKey: "RgsError.UNKNOWN" }) : this.reconnect();
2715
- }), ["mobile", "tablet"].includes(Li.type ?? "") && document.addEventListener("visibilitychange", async () => {
2815
+ }) : s.code === 1011 ? this.error || this.send("error", { type: "CLOSE", messageCode: "UNKNOWN", messageKey: "RgsError.UNKNOWN" }) : this.reconnect();
2816
+ }), ["mobile", "tablet"].includes(_s.type ?? "") && document.addEventListener("visibilitychange", async () => {
2716
2817
  document.hidden || (this.socket.socket ? this.socket.socket && [WebSocket.CONNECTING, WebSocket.OPEN].includes(this.socket.socket.readyState) && this.socket.close() : this.reconnect());
2717
- })), this.socket.addEventListener("error", (i) => _i("error", i)), this.socket.addEventListener("realityCheck", (i) => {
2718
- this.send("realityCheck", i);
2818
+ })), this.socket.addEventListener("error", (s) => Fs("error", s)), this.socket.addEventListener("realityCheck", (s) => {
2819
+ this.send("realityCheck", s);
2719
2820
  });
2720
2821
  }
2721
2822
  async reconnect() {
@@ -2726,38 +2827,38 @@ class ss extends Ii {
2726
2827
  }
2727
2828
  }
2728
2829
  async openGame() {
2729
- var G, Oe;
2730
- const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), a = e.get("cageCode"), d = e.get("gameCode"), r = 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;
2731
- this.initialize({ apiUrl: i, cageCode: a, gameCode: d, operatorCode: r, playMode: p, token: h, username: g });
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 });
2732
2833
  try {
2733
2834
  await this.socket.connect();
2734
2835
  } catch {
2735
2836
  throw { type: "error", data: { code: He.CONNECTION_ERROR } };
2736
2837
  }
2737
- let D;
2838
+ let G;
2738
2839
  try {
2739
- D = await this.socket.authenticate();
2840
+ G = await this.socket.authenticate();
2740
2841
  } catch (X) {
2741
- throw { type: X.type, data: X.type === "error" ? Kt(X.data) : void 0 };
2842
+ throw { type: X.type, data: X.type === "error" ? Yt(X.data) : void 0 };
2742
2843
  }
2743
- let ge;
2844
+ let pe;
2744
2845
  try {
2745
- ge = await this.socket.openGame();
2846
+ pe = await this.socket.openGame();
2746
2847
  } catch (X) {
2747
- throw { type: X.type, data: X.type === "error" ? Jt(X.data) : void 0 };
2848
+ throw { type: X.type, data: X.type === "error" ? es(X.data) : void 0 };
2748
2849
  }
2749
- const _ = Qt(D), Q = Xt(
2750
- D,
2751
- ge,
2850
+ const _ = Jt(G), K = Zt(
2851
+ G,
2852
+ pe,
2752
2853
  this.config.dataDecoder && bt[this.config.dataDecoder]
2753
2854
  );
2754
2855
  this.sdkConfig.api = {
2755
2856
  ...this.sdkConfig.api,
2756
2857
  brand: a,
2757
- game: d,
2758
- integration: r,
2858
+ game: r,
2859
+ integration: c,
2759
2860
  jurisdiction: _.contract.jurisdiction,
2760
- playMode: p,
2861
+ playMode: g,
2761
2862
  user: _.contract.username,
2762
2863
  integrationData: {
2763
2864
  token: h
@@ -2768,71 +2869,71 @@ class ss extends Ii {
2768
2869
  gameHistoryUrl: m,
2769
2870
  homeUrl: C,
2770
2871
  cashierUrl: A,
2771
- backendSessionId: Q.contract.sessionId,
2772
- lastRoundId: Q.contract.roundId
2872
+ backendSessionId: K.contract.sessionId,
2873
+ lastRoundId: K.contract.roundId
2773
2874
  };
2774
- const K = (Oe = (G = e.get("languageCode")) == null ? void 0 : G.split("_")) == null ? void 0 : Oe[0];
2775
- return K && (this.sdkConfig.ui.language = K.length === 3 ? Ri[K] ?? K : K), Q;
2875
+ const Q = (Oe = (H = e.get("languageCode")) == null ? void 0 : H.split("_")) == null ? void 0 : Oe[0];
2876
+ return Q && (this.sdkConfig.ui.language = Q.length === 3 ? Bs[Q] ?? Q : Q), K;
2776
2877
  }
2777
2878
  async play(e) {
2778
2879
  for (; !this.socket.socket; )
2779
2880
  await new Promise((A) => setTimeout(() => A(), 500));
2780
2881
  const {
2781
- contract: { bet: i, forcedOutcomes: a, ...d },
2782
- extra: r,
2783
- payloadToInject: p,
2882
+ contract: { bet: s, forcedOutcomes: a, ...r },
2883
+ extra: c,
2884
+ payloadToInject: g,
2784
2885
  actionType: h
2785
- } = e, g = this.config.dataEncoder && si[this.config.dataEncoder], m = {
2786
- bet: i ? { baseBet: i.base, betMultiplier: i.multiplier } : void 0,
2886
+ } = e, p = this.config.dataEncoder && os[this.config.dataEncoder], m = {
2887
+ bet: s ? { baseBet: s.base, betMultiplier: s.multiplier } : void 0,
2787
2888
  forcedOutcomes: a,
2788
2889
  // TODO: get rid of contractRest - it' a legacy from old RGS
2789
- ...d,
2790
- ...p,
2791
- opaqueUiToGameServer: g ? g(r) : r
2890
+ ...r,
2891
+ ...g,
2892
+ opaqueUiToGameServer: p ? p(c) : c
2792
2893
  };
2793
2894
  let C;
2794
2895
  try {
2795
2896
  C = await this.socket.sendAction(h, m);
2796
2897
  } catch (A) {
2797
- throw { type: A.type, data: A.type === "error" ? Zt(A.data) : void 0 };
2898
+ throw { type: A.type, data: A.type === "error" ? ss(A.data) : void 0 };
2798
2899
  }
2799
- return Yt(C, this.config.dataDecoder && bt[this.config.dataDecoder]);
2900
+ return ts(C, this.config.dataDecoder && bt[this.config.dataDecoder]);
2800
2901
  }
2801
2902
  registerFromSdkEvents() {
2802
2903
  this.on("history", () => {
2803
2904
  const {
2804
- api: { game: e, integration: i, integrationData: a, jurisdiction: d, user: r, gameHistoryUrl: p },
2905
+ api: { game: e, integration: s, integrationData: a, jurisdiction: r, user: c, gameHistoryUrl: g },
2805
2906
  ui: { language: h }
2806
- } = this.sdkConfig, g = r.replace(/^user_/, "").replace(new RegExp(`_${i}$`), ""), m = new URL(window.location.href);
2807
- 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), d && m.searchParams.set("jurisdiction", d), m.searchParams.set("operatorCode", i), 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");
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");
2808
2909
  });
2809
2910
  }
2810
2911
  }
2811
- class Bi {
2812
- constructor(t, e, i) {
2912
+ class Ns {
2913
+ constructor(t, e, s) {
2813
2914
  b(this, "trackers");
2814
2915
  b(this, "config");
2815
2916
  b(this, "sdkConfig");
2816
- this.trackers = t, this.config = e, this.sdkConfig = i;
2917
+ this.trackers = t, this.config = e, this.sdkConfig = s;
2817
2918
  }
2818
- on(t, e, i) {
2819
- const a = function(r) {
2820
- r.data.message !== `kalamba:wrapper-telemetry:${t}` && r.data.message !== `kalamba:wrapper:${t}` || e(r.data.payload);
2919
+ on(t, e, s) {
2920
+ const a = function(c) {
2921
+ c.data.message !== `kalamba:wrapper-telemetry:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
2821
2922
  };
2822
- window.addEventListener("message", a, i);
2923
+ window.addEventListener("message", a, s);
2823
2924
  }
2824
2925
  track(t, e) {
2825
- this.trackers.forEach((i) => i.track(t, e));
2926
+ this.trackers.forEach((s) => s.track(t, e));
2826
2927
  }
2827
2928
  }
2828
- function Nt(s) {
2829
- return s.reduce((t, e) => t + e, 0);
2929
+ function Ht(i) {
2930
+ return i.reduce((t, e) => t + e, 0);
2830
2931
  }
2831
- function Fi(s) {
2832
- const t = s.length, e = Nt(s) / t, i = s.map((d) => Math.pow(d - e, 2)), a = Nt(i) / t;
2932
+ function Ds(i) {
2933
+ const t = i.length, e = Ht(i) / t, s = i.map((r) => Math.pow(r - e, 2)), a = Ht(s) / t;
2833
2934
  return Math.sqrt(a);
2834
2935
  }
2835
- class Dt {
2936
+ class Vt {
2836
2937
  constructor() {
2837
2938
  b(this, "rafId", -1);
2838
2939
  b(this, "startTime", 0);
@@ -2840,11 +2941,11 @@ class Dt {
2840
2941
  b(this, "frames", []);
2841
2942
  b(this, "calculateFPS", () => {
2842
2943
  const t = Math.floor((this.stopTime - this.startTime) / 1e3);
2843
- return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, i, a, d) => (d[a] !== d[a - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2944
+ return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, s, a, r) => (r[a] !== r[a - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2844
2945
  });
2845
2946
  b(this, "getReport", () => {
2846
- const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), i = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e, d = t.length > 0 ? Fi(t) : 0;
2847
- return { fpsAvg: e, fpsMax: i, fpsMin: a, fpsStdDev: d };
2947
+ const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), s = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e, r = t.length > 0 ? Ds(t) : 0;
2948
+ return { fpsAvg: e, fpsMax: s, fpsMin: a, fpsStdDev: r };
2848
2949
  });
2849
2950
  b(this, "start", () => {
2850
2951
  this.startTime = Date.now(), this.frames = [], this.trackFrames();
@@ -2857,16 +2958,16 @@ class Dt {
2857
2958
  });
2858
2959
  }
2859
2960
  }
2860
- const Ni = "landscape", Di = "portrait";
2861
- function Gi() {
2961
+ const Gs = "landscape", Hs = "portrait";
2962
+ function Vs() {
2862
2963
  try {
2863
- const s = document.createElement("canvas");
2864
- return !!window.WebGLRenderingContext && (s.getContext("webgl") || s.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
2964
+ const i = document.createElement("canvas");
2965
+ return !!window.WebGLRenderingContext && (i.getContext("webgl") || i.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
2865
2966
  } catch {
2866
2967
  return !1;
2867
2968
  }
2868
2969
  }
2869
- async function Hi() {
2970
+ async function zs() {
2870
2971
  if (!window.createImageBitmap)
2871
2972
  return !1;
2872
2973
  const e = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
@@ -2877,10 +2978,10 @@ async function Hi() {
2877
2978
  }
2878
2979
  }
2879
2980
  function rt() {
2880
- return window.innerWidth >= window.innerHeight ? Ni : Di;
2981
+ return window.innerWidth >= window.innerHeight ? Gs : Hs;
2881
2982
  }
2882
2983
  var Ne, ae, ne, oe, Ae, De, Pe, Ge;
2883
- class as extends Bi {
2984
+ class ci extends Ns {
2884
2985
  constructor(...e) {
2885
2986
  super(...e);
2886
2987
  b(this, "FPS_SAMPLE_INTERVAL", 1e4);
@@ -2893,12 +2994,12 @@ class as extends Bi {
2893
2994
  M(this, De, !1);
2894
2995
  M(this, Pe, "");
2895
2996
  M(this, Ge, []);
2896
- v(this, ne, {}), v(this, oe, this.deviceInfo()), v(this, ae, this.config.gameVersion), this.on("state", ({ balance: i }) => {
2897
- v(this, Ne, i);
2898
- }), this.on("autoplay", ({ action: i }) => {
2899
- ["start", "resume"].includes(i) ? v(this, Ae, !0) : v(this, Ae, !1);
2900
- }), this.on("settings", ({ fastPlay: i }) => {
2901
- i !== void 0 && v(this, De, i);
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);
2999
+ }), this.on("autoplay", ({ action: s }) => {
3000
+ ["start", "resume"].includes(s) ? v(this, Ae, !0) : v(this, Ae, !1);
3001
+ }), this.on("settings", ({ fastPlay: s }) => {
3002
+ s !== void 0 && v(this, De, s);
2902
3003
  }), this.registerEvents();
2903
3004
  }
2904
3005
  async registerEvents() {
@@ -2943,13 +3044,13 @@ class as extends Bi {
2943
3044
  // testVariants: '',
2944
3045
  }), this.track("Game Open", k(this, ne));
2945
3046
  }), this.on("playCycleEnd", async (e) => {
2946
- const i = await k(this, oe), { base: a, multiplier: d } = e.contract.bet.lastPaid ?? {}, r = 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;
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;
2947
3048
  this.track("Betting Activity", {
2948
- balance: r - g,
2949
- balanceAfter: r,
3049
+ balance: c - p,
3050
+ balanceAfter: c,
2950
3051
  baseBet: a,
2951
3052
  // baseBetIndex,
2952
- betMultiplier: d,
3053
+ betMultiplier: r,
2953
3054
  betType: m,
2954
3055
  gameVersion: k(this, ae),
2955
3056
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
@@ -2958,8 +3059,8 @@ class as extends Bi {
2958
3059
  environment: "release",
2959
3060
  gameCode: this.sdkConfig.api.game,
2960
3061
  gameCodeServer: this.sdkConfig.api.game,
2961
- isMobile: i.isMobile,
2962
- netResult: g,
3062
+ isMobile: s.isMobile,
3063
+ netResult: p,
2963
3064
  operatorName: "kalamba",
2964
3065
  orientation: rt(),
2965
3066
  partnerId: this.sdkConfig.api.brand,
@@ -2970,7 +3071,7 @@ class as extends Bi {
2970
3071
  // TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
2971
3072
  // roundTypes: [...this.#roundTypes],
2972
3073
  roundTypes: ["BaseGame"],
2973
- totalBet: p,
3074
+ totalBet: g,
2974
3075
  totalWin: h
2975
3076
  }), v(this, Ge, []);
2976
3077
  }), this.on("telemetry.click", (e) => {
@@ -2987,23 +3088,23 @@ class as extends Bi {
2987
3088
  }), this.reportFpsSample(), this.reportFpsRound();
2988
3089
  }
2989
3090
  reportFpsSample() {
2990
- const e = new Dt(), i = () => {
3091
+ const e = new Vt(), s = () => {
2991
3092
  e.stop();
2992
- const d = e.getReport();
2993
- this.track("FPS Performance", { ...d, fpsType: "sample" }), a();
3093
+ const r = e.getReport();
3094
+ this.track("FPS Performance", { ...r, fpsType: "sample" }), a();
2994
3095
  }, a = async () => {
2995
- e.start(), setTimeout(i, this.FPS_SAMPLE_INTERVAL);
3096
+ e.start(), setTimeout(s, this.FPS_SAMPLE_INTERVAL);
2996
3097
  };
2997
3098
  a();
2998
3099
  }
2999
3100
  reportFpsRound() {
3000
- const e = new Dt();
3101
+ const e = new Vt();
3001
3102
  this.on("playCycleStart", () => {
3002
3103
  e.start();
3003
3104
  }), this.on("playCycleEnd", () => {
3004
3105
  e.stop();
3005
- const i = e.getReport();
3006
- this.track("FPS Performance", { ...i, fpsType: "playCycleStart->playCycleEnd" });
3106
+ const s = e.getReport();
3107
+ this.track("FPS Performance", { ...s, fpsType: "playCycleStart->playCycleEnd" });
3007
3108
  });
3008
3109
  }
3009
3110
  getExtraUiInteractionData() {
@@ -3013,18 +3114,18 @@ class as extends Bi {
3013
3114
  };
3014
3115
  }
3015
3116
  async deviceInfo() {
3016
- var p;
3017
- const { browser: e, device: i, os: a } = L(navigator.userAgent), d = Gi(), r = await Hi();
3117
+ var g;
3118
+ const { browser: e, device: s, os: a } = L(navigator.userAgent), r = Vs(), c = await zs();
3018
3119
  return {
3019
3120
  browserName: e.name,
3020
3121
  browserVersion: e.version,
3021
- connection: (p = navigator.connection) == null ? void 0 : p.effectiveType,
3022
- deviceName: i.model,
3023
- deviceType: i.type,
3024
- isMobile: ["mobile", "tablet"].includes(i.type ?? ""),
3025
- isWebGLSupported: d,
3026
- isWebPSupported: r,
3027
- manufacturer: i.vendor,
3122
+ connection: (g = navigator.connection) == null ? void 0 : g.effectiveType,
3123
+ deviceName: s.model,
3124
+ deviceType: s.type,
3125
+ isMobile: ["mobile", "tablet"].includes(s.type ?? ""),
3126
+ isWebGLSupported: r,
3127
+ isWebPSupported: c,
3128
+ manufacturer: s.vendor,
3028
3129
  operatingSystem: a.name,
3029
3130
  operatingSystemVersion: a.version,
3030
3131
  orientation: rt(),
@@ -3040,34 +3141,34 @@ class as extends Bi {
3040
3141
  }
3041
3142
  }
3042
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();
3043
- var Vi = ai();
3044
- const Gt = /* @__PURE__ */ ni(Vi);
3045
- class ei {
3144
+ var qs = rs();
3145
+ const zt = /* @__PURE__ */ cs(qs);
3146
+ class is {
3046
3147
  constructor(t, e) {
3047
3148
  b(this, "config");
3048
3149
  b(this, "sdkConfig");
3049
3150
  this.config = t, this.sdkConfig = e;
3050
3151
  }
3051
3152
  }
3052
- const Ht = 25, Vt = 1e4;
3053
- var re, ce, de, q;
3054
- class ns extends ei {
3153
+ const qt = 25, Wt = 1e4;
3154
+ var re, ce, de, W;
3155
+ class di extends is {
3055
3156
  constructor(...e) {
3056
3157
  super(...e);
3057
3158
  M(this, re, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
3058
3159
  M(this, ce);
3059
3160
  M(this, de);
3060
- M(this, q, []);
3161
+ M(this, W, []);
3061
3162
  b(this, "processQueueForced");
3062
- v(this, ce, (/* @__PURE__ */ new Date()).getTime()), v(this, q, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(k(this, re), {
3163
+ v(this, ce, (/* @__PURE__ */ new Date()).getTime()), v(this, W, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(k(this, re), {
3063
3164
  method: "OPTIONS"
3064
- }).catch(Gt), this.subscribe();
3165
+ }).catch(zt), this.subscribe();
3065
3166
  }
3066
3167
  subscribe() {
3067
3168
  window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
3068
3169
  }
3069
3170
  schedule() {
3070
- k(this, de) && clearTimeout(k(this, de)), v(this, de, window.setTimeout(() => this.processQueue(), Vt));
3171
+ k(this, de) && clearTimeout(k(this, de)), v(this, de, window.setTimeout(() => this.processQueue(), Wt));
3071
3172
  }
3072
3173
  send(e) {
3073
3174
  v(this, ce, (/* @__PURE__ */ new Date()).getTime());
@@ -3081,56 +3182,58 @@ class ns extends ei {
3081
3182
  "Content-Type": "application/json"
3082
3183
  },
3083
3184
  keepalive: !0
3084
- }).catch(Gt);
3185
+ }).catch(zt);
3085
3186
  }
3086
3187
  this.schedule();
3087
3188
  }
3088
3189
  addToQueue(e) {
3089
- k(this, q).push(e), this.processQueue();
3190
+ k(this, W).push(e), this.processQueue();
3090
3191
  }
3091
3192
  processQueue(e = !1) {
3092
- if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && k(this, q).length < Ht && (/* @__PURE__ */ new Date()).getTime() - k(this, ce) < Vt))
3093
- for (; k(this, q).length; ) {
3094
- const i = k(this, q).splice(0, Ht).map((a) => ({
3193
+ if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && k(this, W).length < qt && (/* @__PURE__ */ new Date()).getTime() - k(this, ce) < Wt))
3194
+ for (; k(this, W).length; ) {
3195
+ const s = k(this, W).splice(0, qt).map((a) => ({
3095
3196
  ...a,
3096
3197
  sessionID: this.sdkConfig.api.sessionId,
3097
3198
  userID: this.sdkConfig.api.user
3098
3199
  }));
3099
- this.send(i);
3200
+ this.send(s);
3100
3201
  }
3101
3202
  }
3102
- track(e, i) {
3203
+ track(e, s) {
3103
3204
  this.addToQueue({
3104
3205
  eventName: e,
3105
- eventParams: i,
3206
+ eventParams: s,
3106
3207
  eventTimestamp: (/* @__PURE__ */ new Date()).getTime(),
3107
- eventUUID: oi()
3208
+ eventUUID: ds()
3108
3209
  });
3109
3210
  }
3110
3211
  }
3111
- re = new WeakMap(), ce = new WeakMap(), de = new WeakMap(), q = new WeakMap();
3112
- const zi = x("LoggingTracker", "color:#000000;font-weight:bold;");
3113
- class os extends ei {
3212
+ re = new WeakMap(), ce = new WeakMap(), de = new WeakMap(), W = new WeakMap();
3213
+ const Ws = P("LoggingTracker", "color:#000000;font-weight:bold;");
3214
+ class li extends is {
3114
3215
  track(t, e) {
3115
- zi(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
3216
+ Ws(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
3116
3217
  }
3117
3218
  }
3118
3219
  export {
3119
- Qi as BasicPlugin,
3120
- j as CasinoPlugin,
3121
- Ki as DebuggingPlugin,
3122
- Xi as GigPlugin,
3123
- is as KalambaBullseyeParsers,
3124
- ss as KalambaBullseyePlugin,
3125
- as as KalambaStargazerPlugin,
3126
- ns as KalambaStargazerTracker,
3127
- os as LoggingTracker,
3128
- Ji as OryxPlugin,
3129
- Yi as PariplayPlugin,
3130
- ts as QuantaPlugin,
3131
- Zi as RelaxFEIMPlugin,
3132
- Ii as RgsPlugin,
3133
- Bi as TelemetryPlugin,
3134
- ei as Tracker,
3135
- es as TukoPlugin
3220
+ Xs as BasicPlugin,
3221
+ B as CasinoPlugin,
3222
+ Js as DebuggingPlugin,
3223
+ ni as EveryMatrixPlugin,
3224
+ Ys as GigPlugin,
3225
+ oi as KalambaBullseyeParsers,
3226
+ ri as KalambaBullseyePlugin,
3227
+ ci as KalambaStargazerPlugin,
3228
+ di as KalambaStargazerTracker,
3229
+ li as LoggingTracker,
3230
+ Zs as OryxPlugin,
3231
+ ei as PariplayPlugin,
3232
+ ii as QuantaPlugin,
3233
+ ti as RelaxFEIMPlugin,
3234
+ As as RgsPlugin,
3235
+ ai as SoftSwissPlugin,
3236
+ Ns as TelemetryPlugin,
3237
+ is as Tracker,
3238
+ si as TukoPlugin
3136
3239
  };