@kalamba/sdk 0.5.0 → 0.6.1

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,29 +2,30 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2024, Kalamba Games Limited
4
4
  */
5
- var Nt = Object.defineProperty;
6
- var Ht = (i, e, t) => e in i ? Nt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
7
- var p = (i, e, t) => (Ht(i, typeof e != "symbol" ? e + "" : e, t), t), ot = (i, e, t) => {
5
+ var Vt = Object.defineProperty;
6
+ var zt = (i, e, t) => e in i ? Vt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
7
+ var b = (i, e, t) => (zt(i, typeof e != "symbol" ? e + "" : e, t), t), dt = (i, e, t) => {
8
8
  if (!e.has(i))
9
9
  throw TypeError("Cannot " + t);
10
10
  };
11
- var y = (i, e, t) => (ot(i, e, "read from private field"), t ? t.call(i) : e.get(i)), E = (i, e, t) => {
11
+ var E = (i, e, t) => (dt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), v = (i, e, t) => {
12
12
  if (e.has(i))
13
13
  throw TypeError("Cannot add the same private member more than once");
14
14
  e instanceof WeakSet ? e.add(i) : e.set(i, t);
15
- }, v = (i, e, t, n) => (ot(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
16
- import { a as rt } from "./noop-3336849b.js";
17
- function O(i, e) {
15
+ }, y = (i, e, t, n) => (dt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
16
+ import { a as U, b as W } from "./errors-96eb18f7.js";
17
+ import { a as lt } from "./noop-3336849b.js";
18
+ function x(i, e) {
18
19
  return (t, ...n) => {
19
20
  console.log(`[%c${i}\x1B[m] %s`, e, t, ...n);
20
21
  };
21
22
  }
22
- function Ot(i, e) {
23
+ function Dt(i, e) {
23
24
  return Math.round(i * 100 / e);
24
25
  }
25
- class $ {
26
+ class Q {
26
27
  constructor(e) {
27
- p(this, "config");
28
+ b(this, "config");
28
29
  this.config = e;
29
30
  }
30
31
  on(e, t, n) {
@@ -40,10 +41,10 @@ class $ {
40
41
  });
41
42
  }
42
43
  }
43
- const Vt = O("BasicPlugin", "color:#000000;font-weight:bold;");
44
- class Oi extends $ {
44
+ const Gt = x("BasicPlugin", "color:#000000;font-weight:bold;");
45
+ class Bi extends Q {
45
46
  constructor(...e) {
46
- super(...e), this.registerToSdkEvents(), this.registerFromSdkEvents(), Vt("configured");
47
+ super(...e), this.registerToSdkEvents(), this.registerFromSdkEvents(), Gt("configured");
47
48
  }
48
49
  registerToSdkEvents() {
49
50
  window.addEventListener("message", (e) => {
@@ -55,7 +56,7 @@ class Oi extends $ {
55
56
  return;
56
57
  case "doBalanceUpdate":
57
58
  const { currency: a, coinValueInCents: c } = this.config.api;
58
- n.currency === a && typeof n.balanceInCurrency == "number" ? this.send("balance", { balance: Ot(n.balanceInCurrency, c) }) : (n.balanceInCoins, this.send("balance", { balance: n.balanceInCoins }));
59
+ n.currency === a && typeof n.balanceInCurrency == "number" ? this.send("balance", { balance: Dt(n.balanceInCurrency, c) }) : (n.balanceInCoins, this.send("balance", { balance: n.balanceInCoins }));
59
60
  return;
60
61
  case "doGamePause":
61
62
  this.send("freeze");
@@ -90,8 +91,8 @@ class Oi extends $ {
90
91
  });
91
92
  }
92
93
  }
93
- const k = O("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), zt = O("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
94
- class Li extends $ {
94
+ const S = x("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), qt = x("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
95
+ class Fi extends Q {
95
96
  constructor(...e) {
96
97
  super(...e), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
97
98
  }
@@ -112,16 +113,16 @@ class Li extends $ {
112
113
  };
113
114
  }
114
115
  registerSdkToDebugEvents() {
115
- this.on("autoplay", (e) => k("autoplay", e)), this.on("balance", (e) => k("balance", e)), this.on("bet", (e) => k("bet", e)), this.on("cashier", (e) => k("cashier", e)), this.on("choice", (e) => k("choice", e)), this.on("close", (e) => k("close", e)), this.on("error", (e) => k("error", e)), this.on("loadEnd", (e) => k("loadEnd", e)), this.on("loadProgress", (e) => k("loadProgress", e)), this.on("loadStart", (e) => k("loadStart", e)), this.on("playCycleStart", (e) => k("playCycleStart", e)), this.on("playCycleEnd", (e) => k("playCycleEnd", e)), this.on("playEnd", (e) => k("playEnd", e)), this.on("playError", (e) => k("playError", e)), this.on("playReady", (e) => k("playReady", e)), this.on("playStart", (e) => k("playStart", e)), this.on("settings", (e) => k("settings", e));
116
+ this.on("autoplay", (e) => S("autoplay", e)), this.on("balance", (e) => S("balance", e)), this.on("bet", (e) => S("bet", e)), this.on("cashier", (e) => S("cashier", e)), this.on("choice", (e) => S("choice", e)), this.on("close", (e) => S("close", e)), this.on("error", (e) => S("error", e)), this.on("loadEnd", (e) => S("loadEnd", e)), this.on("loadProgress", (e) => S("loadProgress", e)), this.on("loadStart", (e) => S("loadStart", e)), this.on("playCycleStart", (e) => S("playCycleStart", e)), this.on("playCycleEnd", (e) => S("playCycleEnd", e)), this.on("playEnd", (e) => S("playEnd", e)), this.on("playError", (e) => S("playError", e)), this.on("playReady", (e) => S("playReady", e)), this.on("playStart", (e) => S("playStart", e)), this.on("settings", (e) => S("settings", e));
116
117
  }
117
118
  _send(...e) {
118
- zt(...e), this.send(...e);
119
+ qt(...e), this.send(...e);
119
120
  }
120
121
  }
121
- const qt = O("GigPlugin", "color:#000000;font-weight:bold;");
122
- class Bi extends $ {
122
+ const Wt = x("GigPlugin", "color:#000000;font-weight:bold;");
123
+ class Ni extends Q {
123
124
  constructor(...e) {
124
- super(...e), this.registerToSdkEvents(), this.registerFromSdkEvents(), qt("configured");
125
+ super(...e), this.registerToSdkEvents(), this.registerFromSdkEvents(), Wt("configured");
125
126
  }
126
127
  postMessage(e) {
127
128
  const t = {
@@ -169,10 +170,10 @@ class Bi extends $ {
169
170
  });
170
171
  }
171
172
  }
172
- const Gt = O("OryxPlugin", "color:#000000;font-weight:bold;");
173
- class Fi extends $ {
173
+ const $t = x("OryxPlugin", "color:#000000;font-weight:bold;");
174
+ class Hi extends Q {
174
175
  constructor(...e) {
175
- super(...e), this.registerToSdkEvents(), this.registerFromSdkEvents(), Gt("configured");
176
+ super(...e), this.registerToSdkEvents(), this.registerFromSdkEvents(), $t("configured");
176
177
  }
177
178
  registerToSdkEvents() {
178
179
  window.addEventListener("message", (e) => {
@@ -224,15 +225,15 @@ class Fi extends $ {
224
225
  });
225
226
  }
226
227
  }
227
- const ct = O("PariplayPlugin", "color:#000000;font-weight:bold;");
228
- function He(i) {
228
+ const ut = x("PariplayPlugin", "color:#000000;font-weight:bold;");
229
+ function Ge(i) {
229
230
  try {
230
231
  window.top.location = i;
231
232
  } catch {
232
233
  window.location = i;
233
234
  }
234
235
  }
235
- function Ve(i, e) {
236
+ function qe(i, e) {
236
237
  return new Promise(function(n, a) {
237
238
  const c = new XMLHttpRequest();
238
239
  c.onload = function() {
@@ -240,38 +241,38 @@ function Ve(i, e) {
240
241
  }, c.open(i, e), c.send();
241
242
  });
242
243
  }
243
- function ze() {
244
+ function We() {
244
245
  }
245
- function Wt(i) {
246
+ function jt(i) {
246
247
  return i.filter(function(t) {
247
248
  return t.messageType.toUpperCase() === "DATA";
248
249
  });
249
250
  }
250
- function qe(i) {
251
+ function $e(i) {
251
252
  return i.filter(function(t) {
252
253
  return ["NOTIFICATION", "POPUP"].includes(t.messageType.toUpperCase());
253
254
  });
254
255
  }
255
- function Lt(i) {
256
+ function Rt(i) {
256
257
  try {
257
258
  return JSON.parse(i.text);
258
259
  } catch {
259
260
  return {};
260
261
  }
261
262
  }
262
- function $t(i) {
263
- return i.map(Lt).filter(Boolean).find(function(t) {
263
+ function Qt(i) {
264
+ return i.map(Rt).filter(Boolean).find(function(t) {
264
265
  return t.betId != null && t.winId != null;
265
266
  }) || {};
266
267
  }
267
- function jt(i) {
268
- return i.map(Lt).filter(Boolean).find(function(t) {
268
+ function Xt(i) {
269
+ return i.map(Rt).filter(Boolean).find(function(t) {
269
270
  return t.TotalBet != null && t.TotalWin != null;
270
271
  }) || {};
271
272
  }
272
- class _i extends $ {
273
+ class Vi extends Q {
273
274
  constructor(...e) {
274
- super(...e), this.registerToSdkEvents(), this.registerFromSdkEvents(), ct("configured");
275
+ super(...e), this.registerToSdkEvents(), this.registerFromSdkEvents(), ut("configured");
275
276
  }
276
277
  postMessage(e, t) {
277
278
  const n = {
@@ -279,26 +280,26 @@ class _i extends $ {
279
280
  sender: this.config.api.game,
280
281
  type: e
281
282
  };
282
- t != null && (n.data = t), ct("postMessage", n), window.parent.postMessage(n, "*");
283
+ t != null && (n.data = t), ut("postMessage", n), window.parent.postMessage(n, "*");
283
284
  }
284
285
  coinsToCurrency(e) {
285
286
  return e * this.config.api.coinValueInCents / 100;
286
287
  }
287
288
  handleContinueButton(e, t) {
288
- e.link && Ve("GET", e.link), t();
289
+ e.link && qe("GET", e.link), t();
289
290
  }
290
291
  handleLinkButton(e, t) {
291
292
  switch (e.linkType.toUpperCase()) {
292
293
  case "AJAX":
293
- Ve("GET", e.link), t();
294
+ qe("GET", e.link), t();
294
295
  return;
295
296
  case "AJAXRESPONSE":
296
- Ve("GET", e.link).then(() => {
297
+ qe("GET", e.link).then(() => {
297
298
  t();
298
299
  });
299
300
  return;
300
301
  case "REDIRECT":
301
- He(e.link), t();
302
+ Ge(e.link), t();
302
303
  return;
303
304
  }
304
305
  }
@@ -325,13 +326,13 @@ class _i extends $ {
325
326
  Object.assign({}, n, {
326
327
  buttons: n.buttons.filter((c) => c.action.toUpperCase() === "CASHIER" ? !!this.config.api.cashierUrl : !0).map((c) => Object.assign({}, c, {
327
328
  onRelease: () => {
328
- const s = n.messageType.toUpperCase() === "POPUP" ? ze : a, h = this.buttonActions[c.action.toUpperCase()];
329
+ const s = n.messageType.toUpperCase() === "POPUP" ? We : a, h = this.buttonActions[c.action.toUpperCase()];
329
330
  h ? h(c, s) : s();
330
331
  }
331
332
  }))
332
333
  });
333
- }).catch(ze)), Promise.resolve()).then(() => {
334
- }).catch(ze);
334
+ }).catch(We)), Promise.resolve()).then(() => {
335
+ }).catch(We);
335
336
  }
336
337
  registerToSdkEvents() {
337
338
  window.addEventListener("message", (e) => {
@@ -378,7 +379,7 @@ class _i extends $ {
378
379
  success: !0
379
380
  });
380
381
  try {
381
- const a = qe(t.data.uiMessages);
382
+ const a = $e(t.contract.uiMessages);
382
383
  this.processInfoUiMessages(a);
383
384
  } catch {
384
385
  }
@@ -395,33 +396,37 @@ class _i extends $ {
395
396
  window.history.back();
396
397
  }
397
398
  else
398
- this.config.api.homeUrl === "(api)" ? this.postMessage("quit") : He(this.config.api.homeUrl);
399
+ this.config.api.homeUrl === "(api)" ? this.postMessage("quit") : Ge(this.config.api.homeUrl);
399
400
  }), this.on("playEnd", (t) => {
400
401
  this.postMessage("roundEnded", {
401
- balanceAfter: this.coinsToCurrency(t.balance),
402
- win: this.coinsToCurrency(t.data.gameRoundResult.win)
402
+ balanceAfter: this.coinsToCurrency(t.contract.balance.coins),
403
+ win: this.coinsToCurrency(t.contract.win.round)
403
404
  });
404
405
  try {
405
- const n = qe(t.data.uiMessages);
406
+ const n = $e(t.contract.uiMessages);
406
407
  this.processInfoUiMessages(n);
407
408
  } catch {
408
409
  }
409
410
  }), this.on("playError", (t) => {
411
+ var n, a;
410
412
  this.postMessage("ticketReceived", {
411
- ErrorCode: t.data.data.data.operatorSpecificErrorCode,
412
- ErrorMessage: t.data.data.data.operatorSpecificErrorMessage,
413
+ // TODO: Operator specific error code and message
414
+ ErrorCode: (n = t.data) == null ? void 0 : n.code,
415
+ ErrorMessage: "ERROR",
413
416
  Status: {
414
- ErrCode: t.data.data.data.operatorSpecificErrorCode
417
+ ErrCode: (a = t.data) == null ? void 0 : a.code
415
418
  }
416
419
  });
417
420
  }), this.on("playResponse", (t) => {
418
421
  this.postMessage("roundStarted", {
419
- balanceBefore: this.coinsToCurrency(t.balance + t.data.gameState.totalBetFromCurrentGameCycle)
422
+ balanceBefore: this.coinsToCurrency(
423
+ t.contract.balance.coins + t.contract.bet.lastPaid.base * t.contract.bet.lastPaid.multiplier
424
+ )
420
425
  });
421
- const n = t.data.gameState.stateTypeThisRound === "BaseGame", a = Wt(t.data.uiMessages), c = qe(t.data.uiMessages), s = $t(a), h = jt(a);
426
+ const n = ["BaseGame", "PaidSpin"].includes(t.contract.stateType.thisRound), a = jt(t.contract.uiMessages), c = $e(t.contract.uiMessages), s = Qt(a), h = Xt(a);
422
427
  this.postMessage("ticketReceived", {
423
- Balance: this.coinsToCurrency(t.balance),
424
- BetAmount: n ? this.coinsToCurrency(t.data.gameState.totalBetFromCurrentGameCycle) : 0,
428
+ Balance: this.coinsToCurrency(t.contract.balance.coins),
429
+ BetAmount: n ? this.coinsToCurrency(t.contract.bet.lastPaid.base * t.contract.bet.lastPaid.multiplier) : 0,
425
430
  CreditTransactionId: s.betId,
426
431
  DebitTransactionId: s.winId,
427
432
  Message: c,
@@ -429,7 +434,7 @@ class _i extends $ {
429
434
  Status: {
430
435
  ErrCode: 0
431
436
  },
432
- WinAmount: this.coinsToCurrency(t.data.gameRoundResult.win)
437
+ WinAmount: this.coinsToCurrency(t.contract.win.round)
433
438
  });
434
439
  }), this.on("playStart", (t) => {
435
440
  t.bet && this.postMessage("roundStart", {
@@ -440,18 +445,18 @@ class _i extends $ {
440
445
  }), this.on("loadStart", () => {
441
446
  this.postMessage("onAppFrameReady");
442
447
  }), this.on("cashier", () => {
443
- this.config.api.cashierUrl && (this.config.api.cashierUrl === "(api)" ? this.postMessage("cashier") : He(this.config.api.cashierUrl));
448
+ this.config.api.cashierUrl && (this.config.api.cashierUrl === "(api)" ? this.postMessage("cashier") : Ge(this.config.api.cashierUrl));
444
449
  });
445
450
  }
446
451
  }
447
- const he = O("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
448
- class Di extends $ {
452
+ const be = x("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
453
+ class zi extends Q {
449
454
  constructor(...t) {
450
455
  super(...t);
451
- p(this, "VERSION", "1.15.0");
456
+ b(this, "VERSION", "1.15.0");
452
457
  const n = document.createElement("script");
453
458
  n.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, n.onload = () => {
454
- he("loaded"), window.FEIM.configure({
459
+ be("loaded"), window.FEIM.configure({
455
460
  p2pConfig: {
456
461
  currency: this.config.api.currency,
457
462
  launchParams: {
@@ -459,11 +464,11 @@ class Di extends $ {
459
464
  homeurl: "homeUrl"
460
465
  }
461
466
  }
462
- }), he("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
467
+ }), be("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
463
468
  }, document.body.appendChild(n);
464
469
  }
465
470
  registerToSdkEvents() {
466
- window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => he("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => he("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => he("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
471
+ window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => be("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => be("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => be("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
467
472
  this.send("help", {});
468
473
  }), window.FEIM.on.togglePaytable(() => {
469
474
  this.send("paytable", {});
@@ -519,20 +524,20 @@ class Di extends $ {
519
524
  });
520
525
  }
521
526
  }
522
- const Ge = O("TukoPlugin", "color:#000000;font-weight:bold;");
523
- class Ri extends $ {
527
+ const je = x("TukoPlugin", "color:#000000;font-weight:bold;");
528
+ class Gi extends Q {
524
529
  constructor(...t) {
525
530
  super(...t);
526
- p(this, "PING_INTERVAL", 1e4);
531
+ b(this, "PING_INTERVAL", 1e4);
527
532
  const a = new URLSearchParams(window.location.search).get("pingCallbackUrl");
528
533
  a && window.setInterval(() => {
529
534
  this.ping(a);
530
- }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), Ge("configured");
535
+ }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), je("configured");
531
536
  }
532
537
  ping(t) {
533
538
  const n = new XMLHttpRequest();
534
539
  n.onreadystatechange = function() {
535
- n.readyState === XMLHttpRequest.DONE && (n.status === 0 || n.status >= 200 && n.status < 400 ? Ge("ping ok", n) : Ge("ping error", n));
540
+ n.readyState === XMLHttpRequest.DONE && (n.status === 0 || n.status >= 200 && n.status < 400 ? je("ping ok", n) : je("ping error", n));
536
541
  }, n.open("GET", t), n.send();
537
542
  }
538
543
  registerToSdkEvents() {
@@ -545,7 +550,7 @@ class Ri extends $ {
545
550
  return;
546
551
  case "doBalanceUpdate":
547
552
  const { currency: c, coinValueInCents: s } = this.config.api;
548
- a.currency === c && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: Ot(a.balanceInCurrency, s) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
553
+ a.currency === c && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: Dt(a.balanceInCurrency, s) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
549
554
  return;
550
555
  case "doGamePause":
551
556
  this.send("freeze");
@@ -580,9 +585,9 @@ class Ri extends $ {
580
585
  });
581
586
  }
582
587
  }
583
- class Qt {
588
+ class Yt {
584
589
  constructor(e) {
585
- p(this, "config");
590
+ b(this, "config");
586
591
  this.config = e;
587
592
  }
588
593
  on(e, t, n) {
@@ -598,16 +603,16 @@ class Qt {
598
603
  });
599
604
  }
600
605
  }
601
- class Xt {
606
+ class Kt {
602
607
  constructor(e) {
603
- p(this, "socket", null);
604
- p(this, "webSocketUrl");
605
- p(this, "eventListeners", {
608
+ b(this, "socket", null);
609
+ b(this, "webSocketUrl");
610
+ b(this, "eventListeners", {
606
611
  close: [],
607
612
  error: [],
608
613
  message: []
609
614
  });
610
- p(this, "connect", () => {
615
+ b(this, "connect", () => {
611
616
  const e = new WebSocket(this.webSocketUrl);
612
617
  return e.addEventListener("message", this.handleMessage), new Promise((t) => {
613
618
  e.addEventListener("open", (n) => {
@@ -615,34 +620,34 @@ class Xt {
615
620
  });
616
621
  });
617
622
  });
618
- p(this, "send", (e) => {
623
+ b(this, "send", (e) => {
619
624
  if (this.socket == null)
620
625
  throw new Error("Cannot send message, the WebSocket connection is not open");
621
626
  this.socket.send(e);
622
627
  });
623
- p(this, "close", () => {
628
+ b(this, "close", () => {
624
629
  if (this.socket == null)
625
630
  throw new Error("Cannot close the WebSocket connection that is not open");
626
631
  this.socket.close(), this.addEventListener("error", (e) => {
627
632
  console.log(e);
628
633
  });
629
634
  });
630
- p(this, "handleClose", (e) => {
635
+ b(this, "handleClose", (e) => {
631
636
  this.eventListeners.close.forEach((t) => {
632
637
  t(e);
633
638
  });
634
639
  });
635
- p(this, "handleError", (e) => {
640
+ b(this, "handleError", (e) => {
636
641
  this.eventListeners.error.forEach((t) => {
637
642
  t(e);
638
643
  });
639
644
  });
640
- p(this, "handleMessage", (e) => {
645
+ b(this, "handleMessage", (e) => {
641
646
  this.eventListeners.message.forEach((t) => {
642
647
  t(e);
643
648
  });
644
649
  });
645
- p(this, "handleOpen", (e) => {
650
+ b(this, "handleOpen", (e) => {
646
651
  const t = e.target;
647
652
  t.addEventListener("close", this.handleClose), t.addEventListener("error", this.handleError), this.socket = t;
648
653
  });
@@ -656,40 +661,36 @@ class Xt {
656
661
  n !== -1 && this.eventListeners[e].splice(n, 1);
657
662
  }
658
663
  }
659
- function Ie(i) {
664
+ function Ae(i) {
660
665
  try {
661
666
  return JSON.parse(i == null ? void 0 : i.data);
662
667
  } catch (e) {
663
668
  return console.error("fakap", e), null;
664
669
  }
665
670
  }
666
- function me(i) {
671
+ function ye(i) {
667
672
  var e;
668
673
  return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "GameEvent";
669
674
  }
670
- function Kt(i) {
671
- return me(i) && i.body.event === "OPEN_GAME";
672
- }
673
675
  function Jt(i) {
674
- return me(i) && i.body.event === "SPIN_ERROR";
675
- }
676
- function Yt(i) {
677
- return me(i) && i.body.event.includes("_RESULT");
676
+ return ye(i) && i.body.event === "OPEN_GAME";
678
677
  }
679
678
  function Zt(i) {
680
- var e;
681
- return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "OpenGame";
679
+ return i.header.code !== 1 || ye(i) && i.body.event.includes("_ERROR");
682
680
  }
683
681
  function ei(i) {
682
+ return ye(i) && i.body.event.includes("_RESULT");
683
+ }
684
+ function ti(i) {
684
685
  var e;
685
686
  return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "Ping";
686
687
  }
687
- function dt(i) {
688
+ function ht(i) {
688
689
  var e;
689
690
  return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "RealityCheck";
690
691
  }
691
- var Z, ve;
692
- class ti extends Xt {
692
+ var ne, Me;
693
+ class ii extends Kt {
693
694
  constructor(t, n) {
694
695
  const a = new URL(t.apiUrl);
695
696
  a.searchParams.set("cageCode", t.cageCode), a.searchParams.set("gameCode", t.gameCode), a.searchParams.set("operatorCode", t.operatorCode), a.searchParams.set("playMode", t.playMode), a.searchParams.set("token", t.token), a.searchParams.set("username", t.username);
@@ -704,7 +705,7 @@ class ti extends Xt {
704
705
  * request sent. Client and server independently maintain their own
705
706
  * correlation id counter.
706
707
  */
707
- p(this, "cId", 0);
708
+ b(this, "cId", 0);
708
709
  // Initial values for header
709
710
  /*
710
711
  * Increasing message ID
@@ -716,20 +717,20 @@ class ti extends Xt {
716
717
  * received out of sync).
717
718
  */
718
719
  // TODO make sure messages are processed in order
719
- p(this, "mId", 0);
720
+ b(this, "mId", 0);
720
721
  // Initial values for body
721
722
  /*
722
723
  * Sequence ID. Action/Event correlation.
723
724
  */
724
- p(this, "seqId", 10);
725
- p(this, "gameCode");
726
- E(this, Z, void 0);
727
- E(this, ve, void 0);
728
- p(this, "onMessage", (t) => {
729
- const n = Ie(t);
730
- (me(n) || ei(n) || dt(n)) && this.sendAcknowledgement(n), dt(n) && this.handleRealityCheck(n);
725
+ b(this, "seqId", 10);
726
+ b(this, "gameCode");
727
+ v(this, ne, void 0);
728
+ v(this, Me, void 0);
729
+ b(this, "onMessage", (t) => {
730
+ const n = Ae(t);
731
+ (ye(n) || ti(n) || ht(n)) && this.sendAcknowledgement(n), ht(n) && this.handleRealityCheck(n);
731
732
  });
732
- this.eventListeners.realityCheck = [], this.gameCode = t.gameCode, v(this, Z, n.requestTimeoutMs), v(this, ve, n.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
733
+ this.eventListeners.realityCheck = [], this.gameCode = t.gameCode, y(this, ne, n.requestTimeoutMs), y(this, Me, n.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
733
734
  }
734
735
  handleRealityCheck(t) {
735
736
  this.eventListeners.realityCheck.forEach((n) => {
@@ -767,13 +768,13 @@ class ti extends Xt {
767
768
  request(t, n) {
768
769
  const a = this.buildPayload(t, n);
769
770
  return new Promise((c, s) => {
770
- setTimeout(() => s({ request: { body: n, header: t }, type: "timeout" }), y(this, Z));
771
+ setTimeout(() => s({ type: "timeout" }), E(this, ne));
771
772
  const h = (g) => {
772
- const w = Ie(g);
773
+ const w = Ae(g);
773
774
  try {
774
- t.cId === (w == null ? void 0 : w.header.cId) && (this.removeEventListener("message", h), w.header.code === 1 ? c(w) : s({ response: w, type: "response" }));
775
+ t.cId === (w == null ? void 0 : w.header.cId) && (this.removeEventListener("message", h), w.header.code === 1 ? c(w) : s({ data: w, type: "error" }));
775
776
  } catch {
776
- s({ response: w, type: "error" });
777
+ s({ data: w, type: "error" });
777
778
  }
778
779
  };
779
780
  this.addEventListener("message", h), this.send(a);
@@ -789,7 +790,7 @@ class ti extends Xt {
789
790
  authenticate(t = !1) {
790
791
  const n = this.buildHeader("Authenticate"), a = {
791
792
  clientType: 3,
792
- version: y(this, ve),
793
+ version: E(this, Me),
793
794
  reconnect: t
794
795
  };
795
796
  return this.request(
@@ -803,11 +804,11 @@ class ti extends Xt {
803
804
  };
804
805
  return new Promise((a, c) => {
805
806
  const s = (h) => {
806
- const g = Ie(h);
807
- Kt(g) && (this.removeEventListener("message", s), a(g.body));
807
+ const g = Ae(h);
808
+ Jt(g) ? (this.removeEventListener("message", s), a(g.body)) : Zt(g) && c({ data: g, type: "error" });
808
809
  };
809
810
  this.addEventListener("message", s), this.request(t, n).catch((h) => {
810
- Zt(h.response) && c(h), c(h);
811
+ c(h);
811
812
  });
812
813
  });
813
814
  }
@@ -822,22 +823,20 @@ class ti extends Xt {
822
823
  };
823
824
  return new Promise((s, h) => {
824
825
  const g = (w) => {
825
- const m = Ie(w);
826
- me(m) && c.seqId === m.body.correlationSeqId && (this.removeEventListener("message", g), Yt(m) ? s(m.body) : Jt(m) && h(m.body));
826
+ const m = Ae(w);
827
+ ye(m) && c.seqId === m.body.correlationSeqId && (this.removeEventListener("message", g), ei(m) ? s(m.body) : h({ data: m, type: "error" }));
827
828
  };
828
829
  this.addEventListener("message", g), this.request(a, c).catch(
829
- (w) => {
830
- h(w);
831
- }
830
+ (w) => h(w)
832
831
  );
833
832
  });
834
833
  }
835
834
  setRequestTimeoutMs(t) {
836
- v(this, Z, t);
835
+ y(this, ne, t);
837
836
  }
838
837
  }
839
- Z = new WeakMap(), ve = new WeakMap();
840
- function ii(i) {
838
+ ne = new WeakMap(), Me = new WeakMap();
839
+ function ni(i) {
841
840
  return i.contract ? {
842
841
  contract: {
843
842
  balance: {
@@ -866,7 +865,26 @@ function ii(i) {
866
865
  }
867
866
  };
868
867
  }
869
- function ni(i, e) {
868
+ function ai(i) {
869
+ const e = ({ code: t }) => {
870
+ switch (t) {
871
+ case 2:
872
+ return { code: U.DENIED };
873
+ case 3:
874
+ return { code: U.NOT_FOUND };
875
+ case 4:
876
+ return { code: U.ALREADY_LOGGED_IN };
877
+ case 5:
878
+ default:
879
+ return { code: U.ERROR };
880
+ }
881
+ };
882
+ return {
883
+ ...i,
884
+ data: i.data ? e(i.data) : void 0
885
+ };
886
+ }
887
+ function si(i, e) {
870
888
  return e.contract ? {
871
889
  contract: {
872
890
  bet: {
@@ -945,7 +963,28 @@ function ni(i, e) {
945
963
  data: e.data
946
964
  };
947
965
  }
948
- function ai(i) {
966
+ function oi(i) {
967
+ const e = ({ code: t }) => {
968
+ switch (t) {
969
+ case 2:
970
+ return { code: U.GAME_UNAVAILABLE };
971
+ case 3:
972
+ return { code: U.BONUS_RESTRICTION };
973
+ case 5:
974
+ return { code: U.TOO_MANY_OPEN_GAMES };
975
+ case 6:
976
+ return { code: U.RECONNECT_DATA_MISMATCH };
977
+ case 4:
978
+ default:
979
+ return { code: U.ERROR };
980
+ }
981
+ };
982
+ return {
983
+ ...i,
984
+ data: i.data ? e(i.data) : void 0
985
+ };
986
+ }
987
+ function ri(i) {
949
988
  return i.contract ? {
950
989
  contract: {
951
990
  bet: {
@@ -1006,7 +1045,32 @@ function ai(i) {
1006
1045
  data: i.data
1007
1046
  };
1008
1047
  }
1009
- const si = {
1048
+ function ci(i) {
1049
+ const e = ({ code: t }) => {
1050
+ switch (t) {
1051
+ case "GAMING_LIMITS_REACHED":
1052
+ return { code: W.GAMING_LIMITS_REACHED };
1053
+ case "INVALID_CURRENCY":
1054
+ return { code: W.INVALID_CURRENCY };
1055
+ case "INVALID_SESSION":
1056
+ return { code: W.INVALID_SESSION };
1057
+ case "OUT_OF_MONEY":
1058
+ return { code: W.OUT_OF_MONEY };
1059
+ case "UNFINISHED_ROUND_IN_PROGRESS":
1060
+ return { code: W.UNFINISHED_ROUND_IN_PROGRESS };
1061
+ case "WALLET_ERROR":
1062
+ return { code: W.WALLET_ERROR };
1063
+ case "ERROR":
1064
+ default:
1065
+ return { code: W.ERROR };
1066
+ }
1067
+ };
1068
+ return {
1069
+ ...i,
1070
+ data: i.data ? e(i.data) : void 0
1071
+ };
1072
+ }
1073
+ const di = {
1010
1074
  bul: "bg",
1011
1075
  chi: "zh",
1012
1076
  zho: "zh",
@@ -1038,15 +1102,15 @@ const si = {
1038
1102
  tur: "tr",
1039
1103
  ukr: "uk",
1040
1104
  vie: "vi"
1041
- }, oi = O("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
1042
- var Ee;
1043
- class Ni extends Qt {
1105
+ }, li = x("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
1106
+ var ke;
1107
+ class qi extends Yt {
1044
1108
  constructor(...t) {
1045
1109
  super(...t);
1046
1110
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1047
1111
  // @ts-ignore
1048
- p(this, "socket");
1049
- E(this, Ee, "");
1112
+ b(this, "socket");
1113
+ v(this, ke, "");
1050
1114
  this.on("openGame", async () => {
1051
1115
  try {
1052
1116
  const n = await this.openGame();
@@ -1062,20 +1126,20 @@ class Ni extends Qt {
1062
1126
  this.send("playError", a);
1063
1127
  }
1064
1128
  }), this.on("state", ({ version: n }) => {
1065
- v(this, Ee, n);
1129
+ y(this, ke, n);
1066
1130
  }), this.on("configured", (n) => {
1067
1131
  this.socket.setRequestTimeoutMs(n.ui.requestTimeoutMs);
1068
1132
  }), this.registerFromSdkEvents();
1069
1133
  }
1070
1134
  initialize(t) {
1071
- this.socket = new ti(t, {
1072
- gameVersion: y(this, Ee),
1135
+ this.socket = new ii(t, {
1136
+ gameVersion: E(this, ke),
1073
1137
  requestTimeoutMs: this.config.ui.requestTimeoutMs
1074
1138
  }), this.socket.addEventListener("close", (n) => {
1075
1139
  n.code === 1006 && this.reconnect(t);
1076
1140
  }), document.addEventListener("visibilitychange", () => {
1077
1141
  document.visibilityState === "visible" && this.socket.socket && this.socket.socket.readyState !== WebSocket.OPEN && this.reconnect(t);
1078
- }), this.socket.addEventListener("error", (n) => oi("error", n)), this.socket.addEventListener("realityCheck", (n) => {
1142
+ }), this.socket.addEventListener("error", (n) => li("error", n)), this.socket.addEventListener("realityCheck", (n) => {
1079
1143
  this.send("realityCheck", n);
1080
1144
  });
1081
1145
  }
@@ -1083,9 +1147,26 @@ class Ni extends Qt {
1083
1147
  this.initialize(t), await this.socket.connect(), await this.socket.authenticate(!0), await this.socket.openGame();
1084
1148
  }
1085
1149
  async openGame() {
1086
- const t = new URLSearchParams(window.location.search), n = t.get("apiUrl"), a = t.get("cageCode"), c = t.get("gameCode"), s = t.get("operatorCode"), h = t.get("playMode"), g = t.get("token"), w = t.get("username"), m = t.get("gameHistoryUrl"), A = t.get("homeUrl") ?? void 0, R = t.get("cashierUrl") ?? void 0;
1087
- this.initialize({ apiUrl: n, cageCode: a, gameCode: c, operatorCode: s, playMode: h, token: g, username: w }), await this.socket.connect();
1088
- const de = await this.socket.authenticate(), le = await this.socket.openGame(), L = ii(de), ue = ni(de, le);
1150
+ const t = new URLSearchParams(window.location.search), n = t.get("apiUrl"), a = t.get("cageCode"), c = t.get("gameCode"), s = t.get("operatorCode"), h = t.get("playMode"), g = t.get("token"), w = t.get("username"), m = t.get("gameHistoryUrl"), A = t.get("homeUrl") ?? void 0, N = t.get("cashierUrl") ?? void 0;
1151
+ this.initialize({ apiUrl: n, cageCode: a, gameCode: c, operatorCode: s, playMode: h, token: g, username: w });
1152
+ try {
1153
+ await this.socket.connect();
1154
+ } catch {
1155
+ throw { type: "error", data: { code: U.CONNECTION_ERROR } };
1156
+ }
1157
+ let X;
1158
+ try {
1159
+ X = await this.socket.authenticate();
1160
+ } catch (we) {
1161
+ throw ai(we);
1162
+ }
1163
+ let Y;
1164
+ try {
1165
+ Y = await this.socket.openGame();
1166
+ } catch (we) {
1167
+ throw oi(we);
1168
+ }
1169
+ const L = ni(X), ge = si(X, Y);
1089
1170
  this.config.api = {
1090
1171
  brand: a,
1091
1172
  game: c,
@@ -1101,25 +1182,32 @@ class Ni extends Qt {
1101
1182
  coinValueInCents: L.contract.coinValueInCents,
1102
1183
  gameHistoryUrl: m,
1103
1184
  homeUrl: A,
1104
- cashierUrl: R,
1105
- sessionId: ue.contract.sessionId,
1106
- lastRoundId: ue.contract.roundId
1185
+ cashierUrl: N,
1186
+ sessionId: ge.contract.sessionId,
1187
+ lastRoundId: ge.contract.roundId
1107
1188
  };
1108
- const x = t.get("languageCode");
1109
- return x && (this.config.ui.language = x.length === 3 ? si[x] ?? x : x), ue;
1189
+ const O = t.get("languageCode");
1190
+ return O && (this.config.ui.language = O.length === 3 ? di[O] ?? O : O), ge;
1110
1191
  }
1111
1192
  async play(t) {
1112
1193
  const {
1113
- contract: { bet: n, ...a },
1114
- extra: c,
1115
- actionType: s
1116
- } = t, h = await this.socket.sendAction(s, {
1194
+ contract: { bet: n, forcedOutcomes: a, ...c },
1195
+ extra: s,
1196
+ actionType: h
1197
+ } = t, g = {
1117
1198
  bet: n ? { baseBet: n.base, betMultiplier: n.multiplier } : void 0,
1199
+ forcedOutcomes: a,
1118
1200
  // TODO: get rid of contractRest - it' a legacy from old RGS
1119
- ...a,
1120
- opaqueUiToGameServer: c
1121
- });
1122
- return ai(h);
1201
+ ...c,
1202
+ opaqueUiToGameServer: s
1203
+ };
1204
+ let w;
1205
+ try {
1206
+ w = await this.socket.sendAction(h, g);
1207
+ } catch (m) {
1208
+ throw ci(m);
1209
+ }
1210
+ return ri(w);
1123
1211
  }
1124
1212
  registerFromSdkEvents() {
1125
1213
  this.on("history", () => {
@@ -1131,76 +1219,76 @@ class Ni extends Qt {
1131
1219
  });
1132
1220
  }
1133
1221
  }
1134
- Ee = new WeakMap();
1135
- var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re = "object", Ye = "string", fe = "major", d = "model", o = "name", l = "type", u = "vendor", r = "version", S = "architecture", K = "console", b = "mobile", f = "tablet", C = "smarttv", X = "wearable", Ze = "embedded", ut = "user-agent", et = 500, nt = "brands", G = "formFactor", at = "fullVersionList", J = "platform", st = "platformVersion", Re = "bitness", q = "sec-ch-ua", ci = q + "-full-version-list", di = q + "-arch", li = q + "-" + Re, ui = q + "-form-factor", hi = q + "-" + b, gi = q + "-" + d, Bt = q + "-" + J, wi = Bt + "-version", Ft = [nt, at, b, d, J, st, S, G, Re], T = "browser", B = "cpu", U = "device", F = "engine", P = "os", Y = "result", Ce = "Amazon", ge = "Apple", ht = "ASUS", gt = "BlackBerry", Te = "Google", wt = "Huawei", pt = "Lenovo", We = "LG", Le = "Microsoft", bt = "Motorola", Ae = "Samsung", mt = "Sharp", Pe = "Sony", $e = "Xiaomi", je = "Zebra", j = "Mobile ", Q = " Browser", xe = "Chrome", pi = "Edge", we = "Firefox", pe = "Opera", ft = "Facebook", yt = "Sogou", tt = "Windows", bi = typeof window !== V, I = bi && window.navigator ? window.navigator : void 0, N = I && I.userAgentData ? I.userAgentData : void 0, mi = function(i, e) {
1222
+ ke = new WeakMap();
1223
+ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue = "object", tt = "string", ve = "major", d = "model", o = "name", l = "type", u = "vendor", r = "version", k = "architecture", ee = "console", p = "mobile", f = "tablet", T = "smarttv", Z = "wearable", it = "embedded", wt = "user-agent", nt = 500, ot = "brands", $ = "formFactor", rt = "fullVersionList", te = "platform", ct = "platformVersion", Ve = "bitness", q = "sec-ch-ua", hi = q + "-full-version-list", gi = q + "-arch", wi = q + "-" + Ve, bi = q + "-form-factor", pi = q + "-" + p, mi = q + "-" + d, Bt = q + "-" + te, fi = Bt + "-version", Ft = [ot, rt, p, d, te, ct, k, $, Ve], C = "browser", D = "cpu", _ = "device", R = "engine", P = "os", ie = "result", Pe = "Amazon", pe = "Apple", bt = "ASUS", pt = "BlackBerry", Oe = "Google", mt = "Huawei", ft = "Lenovo", Qe = "LG", Re = "Microsoft", Et = "Motorola", _e = "Samsung", yt = "Sharp", Ue = "Sony", Xe = "Xiaomi", Ye = "Zebra", K = "Mobile ", J = " Browser", xe = "Chrome", Ei = "Edge", me = "Firefox", fe = "Opera", vt = "Facebook", St = "Sogou", at = "Windows", yi = typeof window !== z, I = yi && window.navigator ? window.navigator : void 0, H = I && I.userAgentData ? I.userAgentData : void 0, vi = function(i, e) {
1136
1224
  var t = {};
1137
1225
  for (var n in i)
1138
1226
  t[n] = e[n] && e[n].length % 2 === 0 ? e[n].concat(i[n]) : i[n];
1139
1227
  return t;
1140
- }, Ne = function(i) {
1228
+ }, ze = function(i) {
1141
1229
  for (var e = {}, t = 0; t < i.length; t++)
1142
1230
  e[i[t].toUpperCase()] = i[t];
1143
1231
  return e;
1144
- }, it = function(i, e) {
1145
- if (typeof i === re && i.length > 0) {
1232
+ }, st = function(i, e) {
1233
+ if (typeof i === ue && i.length > 0) {
1146
1234
  for (var t in i)
1147
- if (z(i[t]) == z(e))
1235
+ if (G(i[t]) == G(e))
1148
1236
  return !0;
1149
1237
  return !1;
1150
1238
  }
1151
- return ce(i) ? z(e).indexOf(z(i)) !== -1 : !1;
1152
- }, vt = function(i) {
1239
+ return he(i) ? G(e).indexOf(G(i)) !== -1 : !1;
1240
+ }, Mt = function(i) {
1153
1241
  for (var e in i)
1154
1242
  return /^(browser|cpu|device|engine|os)$/.test(e);
1155
- }, ce = function(i) {
1156
- return typeof i === Ye;
1157
- }, Qe = function(i) {
1243
+ }, he = function(i) {
1244
+ return typeof i === tt;
1245
+ }, Ke = function(i) {
1158
1246
  if (i) {
1159
- for (var e = [], t = W(/\\?\"/g, i).split(","), n = 0; n < t.length; n++)
1247
+ for (var e = [], t = j(/\\?\"/g, i).split(","), n = 0; n < t.length; n++)
1160
1248
  if (t[n].indexOf(";") > -1) {
1161
- var a = ye(t[n]).split(";v=");
1249
+ var a = Se(t[n]).split(";v=");
1162
1250
  e[n] = { brand: a[0], version: a[1] };
1163
1251
  } else
1164
- e[n] = ye(t[n]);
1252
+ e[n] = Se(t[n]);
1165
1253
  return e;
1166
1254
  }
1167
- }, z = function(i) {
1168
- return ce(i) ? i.toLowerCase() : i;
1169
- }, Xe = function(i) {
1170
- return ce(i) ? W(/[^\d\.]/g, i).split(".")[0] : void 0;
1171
- }, _ = function(i) {
1255
+ }, G = function(i) {
1256
+ return he(i) ? i.toLowerCase() : i;
1257
+ }, Je = function(i) {
1258
+ return he(i) ? j(/[^\d\.]/g, i).split(".")[0] : void 0;
1259
+ }, B = function(i) {
1172
1260
  for (var e in i) {
1173
1261
  var t = i[e];
1174
- typeof t == re && t.length == 2 ? this[t[0]] = t[1] : this[t] = void 0;
1262
+ typeof t == ue && t.length == 2 ? this[t[0]] = t[1] : this[t] = void 0;
1175
1263
  }
1176
1264
  return this;
1177
- }, W = function(i, e) {
1178
- return ce(e) ? e.replace(i, oe) : e;
1179
- }, be = function(i) {
1180
- return W(/\\?\"/g, i);
1181
- }, ye = function(i, e) {
1182
- if (ce(i))
1183
- return i = W(/^\s\s*/, i), typeof e === V ? i : i.substring(0, et);
1184
- }, Et = function(i, e) {
1265
+ }, j = function(i, e) {
1266
+ return he(e) ? e.replace(i, le) : e;
1267
+ }, Ee = function(i) {
1268
+ return j(/\\?\"/g, i);
1269
+ }, Se = function(i, e) {
1270
+ if (he(i))
1271
+ return i = j(/^\s\s*/, i), typeof e === z ? i : i.substring(0, nt);
1272
+ }, kt = function(i, e) {
1185
1273
  if (!(!i || !e))
1186
1274
  for (var t = 0, n, a, c, s, h, g; t < e.length && !h; ) {
1187
1275
  var w = e[t], m = e[t + 1];
1188
1276
  for (n = a = 0; n < w.length && !h && w[n]; )
1189
1277
  if (h = w[n++].exec(i), h)
1190
1278
  for (c = 0; c < m.length; c++)
1191
- g = h[++a], s = m[c], typeof s === re && s.length > 0 ? s.length === 2 ? typeof s[1] == Je ? this[s[0]] = s[1].call(this, g) : this[s[0]] = s[1] : s.length === 3 ? typeof s[1] === Je && !(s[1].exec && s[1].test) ? this[s[0]] = g ? s[1].call(this, g, s[2]) : void 0 : this[s[0]] = g ? g.replace(s[1], s[2]) : void 0 : s.length === 4 && (this[s[0]] = g ? s[3].call(this, g.replace(s[1], s[2])) : void 0) : this[s] = g || void 0;
1279
+ g = h[++a], s = m[c], typeof s === ue && s.length > 0 ? s.length === 2 ? typeof s[1] == et ? this[s[0]] = s[1].call(this, g) : this[s[0]] = s[1] : s.length === 3 ? typeof s[1] === et && !(s[1].exec && s[1].test) ? this[s[0]] = g ? s[1].call(this, g, s[2]) : void 0 : this[s[0]] = g ? g.replace(s[1], s[2]) : void 0 : s.length === 4 && (this[s[0]] = g ? s[3].call(this, g.replace(s[1], s[2])) : void 0) : this[s] = g || void 0;
1192
1280
  t += 2;
1193
1281
  }
1194
1282
  }, Be = function(i, e) {
1195
1283
  for (var t in e)
1196
- if (typeof e[t] === re && e[t].length > 0) {
1284
+ if (typeof e[t] === ue && e[t].length > 0) {
1197
1285
  for (var n = 0; n < e[t].length; n++)
1198
- if (it(e[t][n], i))
1199
- return t === lt ? void 0 : t;
1200
- } else if (it(e[t], i))
1201
- return t === lt ? void 0 : t;
1286
+ if (st(e[t][n], i))
1287
+ return t === gt ? void 0 : t;
1288
+ } else if (st(e[t], i))
1289
+ return t === gt ? void 0 : t;
1202
1290
  return e.hasOwnProperty("*") ? e["*"] : i;
1203
- }, kt = {
1291
+ }, It = {
1204
1292
  ME: "4.90",
1205
1293
  "NT 3.11": "NT3.51",
1206
1294
  "NT 4.0": "NT4.0",
@@ -1212,7 +1300,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1212
1300
  "8.1": "NT 6.3",
1213
1301
  10: ["NT 6.4", "NT 10.0"],
1214
1302
  RT: "ARM"
1215
- }, Mt = {
1303
+ }, Tt = {
1216
1304
  embedded: "Automotive",
1217
1305
  mobile: "Mobile",
1218
1306
  tablet: ["Tablet", "EInk"],
@@ -1220,14 +1308,14 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1220
1308
  wearable: ["VR", "XR", "Watch"],
1221
1309
  "?": ["Desktop", "Unknown"],
1222
1310
  "*": void 0
1223
- }, St = {
1311
+ }, Ct = {
1224
1312
  browser: [
1225
1313
  [
1226
1314
  // Most common regardless engine
1227
1315
  /\b(?:crmo|crios)\/([\w\.]+)/i
1228
1316
  // Chrome for Android/iOS
1229
1317
  ],
1230
- [r, [o, j + "Chrome"]],
1318
+ [r, [o, K + "Chrome"]],
1231
1319
  [
1232
1320
  /edg(?:e|ios|a)?\/([\w\.]+)/i
1233
1321
  // Microsoft Edge
@@ -1247,17 +1335,17 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1247
1335
  /opios[\/ ]+([\w\.]+)/i
1248
1336
  // Opera mini on iphone >= 8.0
1249
1337
  ],
1250
- [r, [o, pe + " Mini"]],
1338
+ [r, [o, fe + " Mini"]],
1251
1339
  [
1252
1340
  /\bop(?:rg)?x\/([\w\.]+)/i
1253
1341
  // Opera GX
1254
1342
  ],
1255
- [r, [o, pe + " GX"]],
1343
+ [r, [o, fe + " GX"]],
1256
1344
  [
1257
1345
  /\bopr\/([\w\.]+)/i
1258
1346
  // Opera Webkit
1259
1347
  ],
1260
- [r, [o, pe]],
1348
+ [r, [o, fe]],
1261
1349
  [
1262
1350
  // Mixed
1263
1351
  /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
@@ -1315,22 +1403,22 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1315
1403
  /slbrowser\/([\w\.]+)/i
1316
1404
  // Smart Lenovo Browser
1317
1405
  ],
1318
- [r, [o, "Smart " + pt + Q]],
1406
+ [r, [o, "Smart " + ft + J]],
1319
1407
  [
1320
1408
  /(avast|avg)\/([\w\.]+)/i
1321
1409
  // Avast/AVG Secure Browser
1322
1410
  ],
1323
- [[o, /(.+)/, "$1 Secure" + Q], r],
1411
+ [[o, /(.+)/, "$1 Secure" + J], r],
1324
1412
  [
1325
1413
  /\bfocus\/([\w\.]+)/i
1326
1414
  // Firefox Focus
1327
1415
  ],
1328
- [r, [o, we + " Focus"]],
1416
+ [r, [o, me + " Focus"]],
1329
1417
  [
1330
1418
  /\bopt\/([\w\.]+)/i
1331
1419
  // Opera Touch
1332
1420
  ],
1333
- [r, [o, pe + " Touch"]],
1421
+ [r, [o, fe + " Touch"]],
1334
1422
  [
1335
1423
  /coc_coc\w+\/([\w\.]+)/i
1336
1424
  // Coc Coc Browser
@@ -1345,32 +1433,32 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1345
1433
  /coast\/([\w\.]+)/i
1346
1434
  // Opera Coast
1347
1435
  ],
1348
- [r, [o, pe + " Coast"]],
1436
+ [r, [o, fe + " Coast"]],
1349
1437
  [
1350
1438
  /miuibrowser\/([\w\.]+)/i
1351
1439
  // MIUI Browser
1352
1440
  ],
1353
- [r, [o, "MIUI" + Q]],
1441
+ [r, [o, "MIUI" + J]],
1354
1442
  [
1355
1443
  /fxios\/([\w\.-]+)/i
1356
1444
  // Firefox for iOS
1357
1445
  ],
1358
- [r, [o, j + we]],
1446
+ [r, [o, K + me]],
1359
1447
  [
1360
1448
  /\bqihu|(qi?ho?o?|360)browser/i
1361
1449
  // 360
1362
1450
  ],
1363
- [[o, "360" + Q]],
1451
+ [[o, "360" + J]],
1364
1452
  [
1365
1453
  /(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
1366
1454
  ],
1367
- [[o, /(.+)/, "$1" + Q], r],
1455
+ [[o, /(.+)/, "$1" + J], r],
1368
1456
  [
1369
1457
  // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
1370
1458
  /samsungbrowser\/([\w\.]+)/i
1371
1459
  // Samsung Internet
1372
1460
  ],
1373
- [r, [o, Ae + " Internet"]],
1461
+ [r, [o, _e + " Internet"]],
1374
1462
  [
1375
1463
  /(comodo_dragon)\/([\w\.]+)/i
1376
1464
  // Comodo Dragon
@@ -1380,12 +1468,12 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1380
1468
  /metasr[\/ ]?([\d\.]+)/i
1381
1469
  // Sogou Explorer
1382
1470
  ],
1383
- [r, [o, yt + " Explorer"]],
1471
+ [r, [o, St + " Explorer"]],
1384
1472
  [
1385
1473
  /(sogou)mo\w+\/([\d\.]+)/i
1386
1474
  // Sogou Mobile
1387
1475
  ],
1388
- [[o, yt + " Mobile"], r],
1476
+ [[o, St + " Mobile"], r],
1389
1477
  [
1390
1478
  /(electron)\/([\w\.]+) safari/i,
1391
1479
  // Electron-based App
@@ -1407,7 +1495,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1407
1495
  /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
1408
1496
  // Facebook App for iOS & Android
1409
1497
  ],
1410
- [[o, ft], r],
1498
+ [[o, vt], r],
1411
1499
  [
1412
1500
  /(Klarna)\/([\w\.]+)/i,
1413
1501
  // Klarna Shopping Browser for iOS & Android
@@ -1449,12 +1537,12 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1449
1537
  /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
1450
1538
  // Android Browser
1451
1539
  ],
1452
- [r, [o, "Android" + Q]],
1540
+ [r, [o, "Android" + J]],
1453
1541
  [
1454
1542
  /chrome\/([\w\.]+) mobile/i
1455
1543
  // Chrome Mobile
1456
1544
  ],
1457
- [r, [o, j + "Chrome"]],
1545
+ [r, [o, K + "Chrome"]],
1458
1546
  [
1459
1547
  /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
1460
1548
  // Chrome/OmniWeb/Arora/Tizen/Nokia
@@ -1464,11 +1552,11 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1464
1552
  /version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
1465
1553
  // Safari Mobile
1466
1554
  ],
1467
- [r, [o, j + "Safari"]],
1555
+ [r, [o, K + "Safari"]],
1468
1556
  [
1469
1557
  /iphone .*mobile(?:\/\w+ | ?)safari/i
1470
1558
  ],
1471
- [[o, j + "Safari"]],
1559
+ [[o, K + "Safari"]],
1472
1560
  [
1473
1561
  /version\/([\w\.\,]+) .*(safari)/i
1474
1562
  // Safari
@@ -1488,7 +1576,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1488
1576
  /(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
1489
1577
  // Firefox Mobile
1490
1578
  ],
1491
- [[o, j + we], r],
1579
+ [[o, K + me], r],
1492
1580
  [
1493
1581
  /(navigator|netscape\d?)\/([-\w\.]+)/i
1494
1582
  // Netscape
@@ -1498,7 +1586,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1498
1586
  /mobile vr; rv:([\w\.]+)\).+firefox/i
1499
1587
  // Firefox Reality
1500
1588
  ],
1501
- [r, [o, we + " Reality"]],
1589
+ [r, [o, me + " Reality"]],
1502
1590
  [
1503
1591
  /ekiohf.+(flow)\/([\w\.]+)/i,
1504
1592
  // Flow
@@ -1525,51 +1613,51 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1525
1613
  /(cobalt)\/([\w\.]+)/i
1526
1614
  // Cobalt
1527
1615
  ],
1528
- [o, [r, /[^\d\.]+./, oe]]
1616
+ [o, [r, /[^\d\.]+./, le]]
1529
1617
  ],
1530
1618
  cpu: [
1531
1619
  [
1532
1620
  /\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i
1533
1621
  // AMD64 (x64)
1534
1622
  ],
1535
- [[S, "amd64"]],
1623
+ [[k, "amd64"]],
1536
1624
  [
1537
1625
  /(ia32(?=;))/i,
1538
1626
  // IA32 (quicktime)
1539
1627
  /((?:i[346]|x)86)[;\)]/i
1540
1628
  // IA32 (x86)
1541
1629
  ],
1542
- [[S, "ia32"]],
1630
+ [[k, "ia32"]],
1543
1631
  [
1544
1632
  /\b(aarch64|arm(v?8e?l?|_?64))\b/i
1545
1633
  // ARM64
1546
1634
  ],
1547
- [[S, "arm64"]],
1635
+ [[k, "arm64"]],
1548
1636
  [
1549
1637
  /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
1550
1638
  // ARMHF
1551
1639
  ],
1552
- [[S, "armhf"]],
1640
+ [[k, "armhf"]],
1553
1641
  [
1554
1642
  // PocketPC mistakenly identified as PowerPC
1555
1643
  /windows (ce|mobile); ppc;/i
1556
1644
  ],
1557
- [[S, "arm"]],
1645
+ [[k, "arm"]],
1558
1646
  [
1559
1647
  /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
1560
1648
  // PowerPC
1561
1649
  ],
1562
- [[S, /ower/, oe, z]],
1650
+ [[k, /ower/, le, G]],
1563
1651
  [
1564
1652
  /(sun4\w)[;\)]/i
1565
1653
  // SPARC
1566
1654
  ],
1567
- [[S, "sparc"]],
1655
+ [[k, "sparc"]],
1568
1656
  [
1569
1657
  /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
1570
1658
  // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
1571
1659
  ],
1572
- [[S, z]]
1660
+ [[k, G]]
1573
1661
  ],
1574
1662
  device: [
1575
1663
  [
@@ -1579,45 +1667,45 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1579
1667
  // Samsung
1580
1668
  /\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
1581
1669
  ],
1582
- [d, [u, Ae], [l, f]],
1670
+ [d, [u, _e], [l, f]],
1583
1671
  [
1584
1672
  /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
1585
1673
  /samsung[- ]([-\w]+)/i,
1586
1674
  /sec-(sgh\w+)/i
1587
1675
  ],
1588
- [d, [u, Ae], [l, b]],
1676
+ [d, [u, _e], [l, p]],
1589
1677
  [
1590
1678
  // Apple
1591
1679
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
1592
1680
  // iPod/iPhone
1593
1681
  ],
1594
- [d, [u, ge], [l, b]],
1682
+ [d, [u, pe], [l, p]],
1595
1683
  [
1596
1684
  /\((ipad);[-\w\),; ]+apple/i,
1597
1685
  // iPad
1598
1686
  /applecoremedia\/[\w\.]+ \((ipad)/i,
1599
1687
  /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
1600
1688
  ],
1601
- [d, [u, ge], [l, f]],
1689
+ [d, [u, pe], [l, f]],
1602
1690
  [
1603
1691
  /(macintosh);/i
1604
1692
  ],
1605
- [d, [u, ge]],
1693
+ [d, [u, pe]],
1606
1694
  [
1607
1695
  // Sharp
1608
1696
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
1609
1697
  ],
1610
- [d, [u, mt], [l, b]],
1698
+ [d, [u, yt], [l, p]],
1611
1699
  [
1612
1700
  // Huawei
1613
1701
  /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
1614
1702
  ],
1615
- [d, [u, wt], [l, f]],
1703
+ [d, [u, mt], [l, f]],
1616
1704
  [
1617
1705
  /(?:huawei|honor)([-\w ]+)[;\)]/i,
1618
1706
  /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
1619
1707
  ],
1620
- [d, [u, wt], [l, b]],
1708
+ [d, [u, mt], [l, p]],
1621
1709
  [
1622
1710
  // Xiaomi
1623
1711
  /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
@@ -1633,92 +1721,92 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1633
1721
  /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
1634
1722
  // Xiaomi Mi
1635
1723
  ],
1636
- [[d, /_/g, " "], [u, $e], [l, b]],
1724
+ [[d, /_/g, " "], [u, Xe], [l, p]],
1637
1725
  [
1638
1726
  /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
1639
1727
  // Redmi Pad
1640
1728
  /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
1641
1729
  // Mi Pad tablets
1642
1730
  ],
1643
- [[d, /_/g, " "], [u, $e], [l, f]],
1731
+ [[d, /_/g, " "], [u, Xe], [l, f]],
1644
1732
  [
1645
1733
  // OPPO
1646
1734
  /; (\w+) bui.+ oppo/i,
1647
1735
  /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
1648
1736
  ],
1649
- [d, [u, "OPPO"], [l, b]],
1737
+ [d, [u, "OPPO"], [l, p]],
1650
1738
  [
1651
1739
  // Vivo
1652
1740
  /vivo (\w+)(?: bui|\))/i,
1653
1741
  /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
1654
1742
  ],
1655
- [d, [u, "Vivo"], [l, b]],
1743
+ [d, [u, "Vivo"], [l, p]],
1656
1744
  [
1657
1745
  // Realme
1658
1746
  /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
1659
1747
  ],
1660
- [d, [u, "Realme"], [l, b]],
1748
+ [d, [u, "Realme"], [l, p]],
1661
1749
  [
1662
1750
  // Motorola
1663
1751
  /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
1664
1752
  /\bmot(?:orola)?[- ](\w*)/i,
1665
1753
  /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
1666
1754
  ],
1667
- [d, [u, bt], [l, b]],
1755
+ [d, [u, Et], [l, p]],
1668
1756
  [
1669
1757
  /\b(mz60\d|xoom[2 ]{0,2}) build\//i
1670
1758
  ],
1671
- [d, [u, bt], [l, f]],
1759
+ [d, [u, Et], [l, f]],
1672
1760
  [
1673
1761
  // LG
1674
1762
  /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
1675
1763
  ],
1676
- [d, [u, We], [l, f]],
1764
+ [d, [u, Qe], [l, f]],
1677
1765
  [
1678
1766
  /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
1679
1767
  /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
1680
1768
  /\blg-?([\d\w]+) bui/i
1681
1769
  ],
1682
- [d, [u, We], [l, b]],
1770
+ [d, [u, Qe], [l, p]],
1683
1771
  [
1684
1772
  // Lenovo
1685
1773
  /(ideatab[-\w ]+)/i,
1686
1774
  /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
1687
1775
  ],
1688
- [d, [u, pt], [l, f]],
1776
+ [d, [u, ft], [l, f]],
1689
1777
  [
1690
1778
  // Nokia
1691
1779
  /(?:maemo|nokia).*(n900|lumia \d+)/i,
1692
1780
  /nokia[-_ ]?([-\w\.]*)/i
1693
1781
  ],
1694
- [[d, /_/g, " "], [u, "Nokia"], [l, b]],
1782
+ [[d, /_/g, " "], [u, "Nokia"], [l, p]],
1695
1783
  [
1696
1784
  // Google
1697
1785
  /(pixel c)\b/i
1698
1786
  // Google Pixel C
1699
1787
  ],
1700
- [d, [u, Te], [l, f]],
1788
+ [d, [u, Oe], [l, f]],
1701
1789
  [
1702
1790
  /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
1703
1791
  // Google Pixel
1704
1792
  ],
1705
- [d, [u, Te], [l, b]],
1793
+ [d, [u, Oe], [l, p]],
1706
1794
  [
1707
1795
  // Sony
1708
1796
  /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
1709
1797
  ],
1710
- [d, [u, Pe], [l, b]],
1798
+ [d, [u, Ue], [l, p]],
1711
1799
  [
1712
1800
  /sony tablet [ps]/i,
1713
1801
  /\b(?:sony)?sgp\w+(?: bui|\))/i
1714
1802
  ],
1715
- [[d, "Xperia Tablet"], [u, Pe], [l, f]],
1803
+ [[d, "Xperia Tablet"], [u, Ue], [l, f]],
1716
1804
  [
1717
1805
  // OnePlus
1718
1806
  / (kb2005|in20[12]5|be20[12][59])\b/i,
1719
1807
  /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
1720
1808
  ],
1721
- [d, [u, "OnePlus"], [l, b]],
1809
+ [d, [u, "OnePlus"], [l, p]],
1722
1810
  [
1723
1811
  // Amazon
1724
1812
  /(alexa)webm/i,
@@ -1727,12 +1815,12 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1727
1815
  /(kf[a-z]+)( bui|\)).+silk\//i
1728
1816
  // Kindle Fire HD
1729
1817
  ],
1730
- [d, [u, Ce], [l, f]],
1818
+ [d, [u, Pe], [l, f]],
1731
1819
  [
1732
1820
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
1733
1821
  // Fire Phone
1734
1822
  ],
1735
- [[d, /(.+)/g, "Fire Phone $1"], [u, Ce], [l, b]],
1823
+ [[d, /(.+)/g, "Fire Phone $1"], [u, Pe], [l, p]],
1736
1824
  [
1737
1825
  // BlackBerry
1738
1826
  /(playbook);[-\w\),; ]+(rim)/i
@@ -1744,16 +1832,16 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1744
1832
  /\(bb10; (\w+)/i
1745
1833
  // BlackBerry 10
1746
1834
  ],
1747
- [d, [u, gt], [l, b]],
1835
+ [d, [u, pt], [l, p]],
1748
1836
  [
1749
1837
  // Asus
1750
1838
  /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
1751
1839
  ],
1752
- [d, [u, ht], [l, f]],
1840
+ [d, [u, bt], [l, f]],
1753
1841
  [
1754
1842
  / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
1755
1843
  ],
1756
- [d, [u, ht], [l, b]],
1844
+ [d, [u, bt], [l, p]],
1757
1845
  [
1758
1846
  // HTC
1759
1847
  /(nexus 9)/i
@@ -1768,7 +1856,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1768
1856
  /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
1769
1857
  // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
1770
1858
  ],
1771
- [u, [d, /_/g, " "], [l, b]],
1859
+ [u, [d, /_/g, " "], [l, p]],
1772
1860
  [
1773
1861
  // Acer
1774
1862
  /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
@@ -1779,12 +1867,12 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1779
1867
  /droid.+; (m[1-5] note) bui/i,
1780
1868
  /\bmz-([-\w]{2,})/i
1781
1869
  ],
1782
- [d, [u, "Meizu"], [l, b]],
1870
+ [d, [u, "Meizu"], [l, p]],
1783
1871
  [
1784
1872
  // Ulefone
1785
1873
  /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
1786
1874
  ],
1787
- [d, [u, "Ulefone"], [l, b]],
1875
+ [d, [u, "Ulefone"], [l, p]],
1788
1876
  [
1789
1877
  // MIXED
1790
1878
  /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
@@ -1802,7 +1890,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1802
1890
  /(oppo) ?([\w ]+) bui/i
1803
1891
  // OPPO
1804
1892
  ],
1805
- [u, d, [l, b]],
1893
+ [u, d, [l, p]],
1806
1894
  [
1807
1895
  /(kobo)\s(ereader|touch)/i,
1808
1896
  // Kobo
@@ -1818,12 +1906,12 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1818
1906
  /(surface duo)/i
1819
1907
  // Surface Duo
1820
1908
  ],
1821
- [d, [u, Le], [l, f]],
1909
+ [d, [u, Re], [l, f]],
1822
1910
  [
1823
1911
  /droid [\d\.]+; (fp\du?)(?: b|\))/i
1824
1912
  // Fairphone
1825
1913
  ],
1826
- [d, [u, "Fairphone"], [l, b]],
1914
+ [d, [u, "Fairphone"], [l, p]],
1827
1915
  [
1828
1916
  /(shield[\w ]+) b/i
1829
1917
  // Nvidia Shield Tablets
@@ -1833,21 +1921,21 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1833
1921
  /(sprint) (\w+)/i
1834
1922
  // Sprint Phones
1835
1923
  ],
1836
- [u, d, [l, b]],
1924
+ [u, d, [l, p]],
1837
1925
  [
1838
1926
  /(kin\.[onetw]{3})/i
1839
1927
  // Microsoft Kin
1840
1928
  ],
1841
- [[d, /\./g, " "], [u, Le], [l, b]],
1929
+ [[d, /\./g, " "], [u, Re], [l, p]],
1842
1930
  [
1843
1931
  /droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
1844
1932
  // Zebra
1845
1933
  ],
1846
- [d, [u, je], [l, f]],
1934
+ [d, [u, Ye], [l, f]],
1847
1935
  [
1848
1936
  /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
1849
1937
  ],
1850
- [d, [u, je], [l, b]],
1938
+ [d, [u, Ye], [l, p]],
1851
1939
  [
1852
1940
  ///////////////////
1853
1941
  // SMARTTVS
@@ -1855,64 +1943,64 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1855
1943
  /smart-tv.+(samsung)/i
1856
1944
  // Samsung
1857
1945
  ],
1858
- [u, [l, C]],
1946
+ [u, [l, T]],
1859
1947
  [
1860
1948
  /hbbtv.+maple;(\d+)/i
1861
1949
  ],
1862
- [[d, /^/, "SmartTV"], [u, Ae], [l, C]],
1950
+ [[d, /^/, "SmartTV"], [u, _e], [l, T]],
1863
1951
  [
1864
1952
  /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1865
1953
  // LG SmartTV
1866
1954
  ],
1867
- [[u, We], [l, C]],
1955
+ [[u, Qe], [l, T]],
1868
1956
  [
1869
1957
  /(apple) ?tv/i
1870
1958
  // Apple TV
1871
1959
  ],
1872
- [u, [d, ge + " TV"], [l, C]],
1960
+ [u, [d, pe + " TV"], [l, T]],
1873
1961
  [
1874
1962
  /crkey/i
1875
1963
  // Google Chromecast
1876
1964
  ],
1877
- [[d, xe + "cast"], [u, Te], [l, C]],
1965
+ [[d, xe + "cast"], [u, Oe], [l, T]],
1878
1966
  [
1879
1967
  /droid.+aft(\w+)( bui|\))/i
1880
1968
  // Fire TV
1881
1969
  ],
1882
- [d, [u, Ce], [l, C]],
1970
+ [d, [u, Pe], [l, T]],
1883
1971
  [
1884
1972
  /\(dtv[\);].+(aquos)/i,
1885
1973
  /(aquos-tv[\w ]+)\)/i
1886
1974
  // Sharp
1887
1975
  ],
1888
- [d, [u, mt], [l, C]],
1976
+ [d, [u, yt], [l, T]],
1889
1977
  [
1890
1978
  /(bravia[\w ]+)( bui|\))/i
1891
1979
  // Sony
1892
1980
  ],
1893
- [d, [u, Pe], [l, C]],
1981
+ [d, [u, Ue], [l, T]],
1894
1982
  [
1895
1983
  /(mitv-\w{5}) bui/i
1896
1984
  // Xiaomi
1897
1985
  ],
1898
- [d, [u, $e], [l, C]],
1986
+ [d, [u, Xe], [l, T]],
1899
1987
  [
1900
1988
  /Hbbtv.*(technisat) (.*);/i
1901
1989
  // TechniSAT
1902
1990
  ],
1903
- [u, d, [l, C]],
1991
+ [u, d, [l, T]],
1904
1992
  [
1905
1993
  /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
1906
1994
  // Roku
1907
1995
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
1908
1996
  // HbbTV devices
1909
1997
  ],
1910
- [[u, ye], [d, ye], [l, C]],
1998
+ [[u, Se], [d, Se], [l, T]],
1911
1999
  [
1912
2000
  /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
1913
2001
  // SmartTV from Unidentified Vendors
1914
2002
  ],
1915
- [[l, C]],
2003
+ [[l, T]],
1916
2004
  [
1917
2005
  ///////////////////
1918
2006
  // CONSOLES
@@ -1922,22 +2010,22 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1922
2010
  /(nintendo) (\w+)/i
1923
2011
  // Nintendo
1924
2012
  ],
1925
- [u, d, [l, K]],
2013
+ [u, d, [l, ee]],
1926
2014
  [
1927
2015
  /droid.+; (shield) bui/i
1928
2016
  // Nvidia
1929
2017
  ],
1930
- [d, [u, "Nvidia"], [l, K]],
2018
+ [d, [u, "Nvidia"], [l, ee]],
1931
2019
  [
1932
2020
  /(playstation \w+)/i
1933
2021
  // Playstation
1934
2022
  ],
1935
- [d, [u, Pe], [l, K]],
2023
+ [d, [u, Ue], [l, ee]],
1936
2024
  [
1937
2025
  /\b(xbox(?: one)?(?!; xbox))[\); ]/i
1938
2026
  // Microsoft Xbox
1939
2027
  ],
1940
- [d, [u, Le], [l, K]],
2028
+ [d, [u, Re], [l, ee]],
1941
2029
  [
1942
2030
  ///////////////////
1943
2031
  // WEARABLES
@@ -1945,26 +2033,26 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1945
2033
  /((pebble))app/i
1946
2034
  // Pebble
1947
2035
  ],
1948
- [u, d, [l, X]],
2036
+ [u, d, [l, Z]],
1949
2037
  [
1950
2038
  /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
1951
2039
  // Apple Watch
1952
2040
  ],
1953
- [d, [u, ge], [l, X]],
2041
+ [d, [u, pe], [l, Z]],
1954
2042
  [
1955
2043
  /droid.+; (glass) \d/i
1956
2044
  // Google Glass
1957
2045
  ],
1958
- [d, [u, Te], [l, X]],
2046
+ [d, [u, Oe], [l, Z]],
1959
2047
  [
1960
2048
  /droid.+; (wt63?0{2,3})\)/i
1961
2049
  ],
1962
- [d, [u, je], [l, X]],
2050
+ [d, [u, Ye], [l, Z]],
1963
2051
  [
1964
2052
  /(quest( 2| pro)?)/i
1965
2053
  // Oculus Quest
1966
2054
  ],
1967
- [d, [u, ft], [l, X]],
2055
+ [d, [u, vt], [l, Z]],
1968
2056
  [
1969
2057
  ///////////////////
1970
2058
  // EMBEDDED
@@ -1972,12 +2060,12 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1972
2060
  /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
1973
2061
  // Tesla
1974
2062
  ],
1975
- [u, [l, Ze]],
2063
+ [u, [l, it]],
1976
2064
  [
1977
2065
  /(aeobc)\b/i
1978
2066
  // Echo Dot
1979
2067
  ],
1980
- [d, [u, Ce], [l, Ze]],
2068
+ [d, [u, Pe], [l, it]],
1981
2069
  [
1982
2070
  ////////////////////
1983
2071
  // MIXED (GENERIC)
@@ -1985,7 +2073,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1985
2073
  /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
1986
2074
  // Android Phones from Unidentified Vendors
1987
2075
  ],
1988
- [d, [l, b]],
2076
+ [d, [l, p]],
1989
2077
  [
1990
2078
  /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
1991
2079
  // Android Tablets from Unidentified Vendors
@@ -2000,7 +2088,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2000
2088
  /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
2001
2089
  // Unidentifiable Mobile
2002
2090
  ],
2003
- [[l, b]],
2091
+ [[l, p]],
2004
2092
  [
2005
2093
  /(android[-\w\. ]{0,9});.+buil/i
2006
2094
  // Generic Android Device
@@ -2012,7 +2100,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2012
2100
  /windows.+ edge\/([\w\.]+)/i
2013
2101
  // EdgeHTML
2014
2102
  ],
2015
- [r, [o, pi + "HTML"]],
2103
+ [r, [o, Ei + "HTML"]],
2016
2104
  [
2017
2105
  /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
2018
2106
  // Blink
@@ -2049,14 +2137,14 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2049
2137
  /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
2050
2138
  // Windows Phone
2051
2139
  ],
2052
- [o, [r, Be, kt]],
2140
+ [o, [r, Be, It]],
2053
2141
  [
2054
2142
  /windows nt 6\.2; (arm)/i,
2055
2143
  // Windows RT
2056
2144
  /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
2057
2145
  /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
2058
2146
  ],
2059
- [[r, Be, kt], [o, tt]],
2147
+ [[r, Be, It], [o, at]],
2060
2148
  [
2061
2149
  // iOS/macOS
2062
2150
  /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
@@ -2092,7 +2180,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2092
2180
  /\(bb(10);/i
2093
2181
  // BlackBerry 10
2094
2182
  ],
2095
- [r, [o, gt]],
2183
+ [r, [o, pt]],
2096
2184
  [
2097
2185
  /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
2098
2186
  // Symbian
@@ -2102,7 +2190,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2102
2190
  /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
2103
2191
  // Firefox OS
2104
2192
  ],
2105
- [r, [o, we + " OS"]],
2193
+ [r, [o, me + " OS"]],
2106
2194
  [
2107
2195
  /web0s;.+rt(tv)/i,
2108
2196
  /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
@@ -2174,58 +2262,58 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2174
2262
  ],
2175
2263
  [o, r]
2176
2264
  ]
2177
- }, Ue = function() {
2265
+ }, Le = function() {
2178
2266
  var i = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
2179
- return _.call(i.init, [
2180
- [T, [o, r, fe]],
2181
- [B, [S]],
2182
- [U, [l, d, u]],
2183
- [F, [o, r]],
2267
+ return B.call(i.init, [
2268
+ [C, [o, r, ve]],
2269
+ [D, [k]],
2270
+ [_, [l, d, u]],
2271
+ [R, [o, r]],
2184
2272
  [P, [o, r]]
2185
- ]), _.call(i.isIgnore, [
2186
- [T, [r, fe]],
2187
- [F, [r]],
2273
+ ]), B.call(i.isIgnore, [
2274
+ [C, [r, ve]],
2275
+ [R, [r]],
2188
2276
  [P, [r]]
2189
- ]), _.call(i.isIgnoreRgx, [
2190
- [T, / ?browser$/i],
2277
+ ]), B.call(i.isIgnoreRgx, [
2278
+ [C, / ?browser$/i],
2191
2279
  [P, / ?os$/i]
2192
- ]), _.call(i.toString, [
2193
- [T, [o, r]],
2194
- [B, [S]],
2195
- [U, [u, d]],
2196
- [F, [o, r]],
2280
+ ]), B.call(i.toString, [
2281
+ [C, [o, r]],
2282
+ [D, [k]],
2283
+ [_, [u, d]],
2284
+ [R, [o, r]],
2197
2285
  [P, [o, r]]
2198
2286
  ]), i;
2199
- }(), fi = function(i, e) {
2200
- var t = Ue.init[e], n = Ue.isIgnore[e] || 0, a = Ue.isIgnoreRgx[e] || 0, c = Ue.toString[e] || 0;
2287
+ }(), Si = function(i, e) {
2288
+ var t = Le.init[e], n = Le.isIgnore[e] || 0, a = Le.isIgnoreRgx[e] || 0, c = Le.toString[e] || 0;
2201
2289
  function s() {
2202
- _.call(this, t);
2290
+ B.call(this, t);
2203
2291
  }
2204
2292
  return s.prototype.getItem = function() {
2205
2293
  return i;
2206
2294
  }, s.prototype.withClientHints = function() {
2207
- return N ? N.getHighEntropyValues(Ft).then(function(h) {
2208
- return i.setCH(new _t(h, !1)).parseCH().get();
2295
+ return H ? H.getHighEntropyValues(Ft).then(function(h) {
2296
+ return i.setCH(new Nt(h, !1)).parseCH().get();
2209
2297
  }) : i.parseCH().get();
2210
2298
  }, s.prototype.withFeatureCheck = function() {
2211
2299
  return i.detectFeature().get();
2212
- }, e != Y && (s.prototype.is = function(h) {
2300
+ }, e != ie && (s.prototype.is = function(h) {
2213
2301
  var g = !1;
2214
2302
  for (var w in this)
2215
- if (this.hasOwnProperty(w) && !it(n, w) && z(a ? W(a, this[w]) : this[w]) == z(a ? W(a, h) : h)) {
2216
- if (g = !0, h != V)
2303
+ if (this.hasOwnProperty(w) && !st(n, w) && G(a ? j(a, this[w]) : this[w]) == G(a ? j(a, h) : h)) {
2304
+ if (g = !0, h != z)
2217
2305
  break;
2218
- } else if (h == V && g) {
2306
+ } else if (h == z && g) {
2219
2307
  g = !g;
2220
2308
  break;
2221
2309
  }
2222
2310
  return g;
2223
2311
  }, s.prototype.toString = function() {
2224
- var h = oe;
2312
+ var h = le;
2225
2313
  for (var g in c)
2226
- typeof this[c[g]] !== V && (h += (h ? " " : oe) + this[c[g]]);
2227
- return h || V;
2228
- }), N || (s.prototype.then = function(h) {
2314
+ typeof this[c[g]] !== z && (h += (h ? " " : le) + this[c[g]]);
2315
+ return h || z;
2316
+ }), H || (s.prototype.then = function(h) {
2229
2317
  var g = this, w = function() {
2230
2318
  for (var A in g)
2231
2319
  g.hasOwnProperty(A) && (this[A] = g[A]);
@@ -2238,24 +2326,24 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2238
2326
  return h(m), m;
2239
2327
  }), new s();
2240
2328
  };
2241
- function _t(i, e) {
2242
- if (i = i || {}, _.call(this, Ft), e)
2243
- _.call(this, [
2244
- [nt, Qe(i[q])],
2245
- [at, Qe(i[ci])],
2246
- [b, /\?1/.test(i[hi])],
2247
- [d, be(i[gi])],
2248
- [J, be(i[Bt])],
2249
- [st, be(i[wi])],
2250
- [S, be(i[di])],
2251
- [G, Qe(i[ui])],
2252
- [Re, be(i[li])]
2329
+ function Nt(i, e) {
2330
+ if (i = i || {}, B.call(this, Ft), e)
2331
+ B.call(this, [
2332
+ [ot, Ke(i[q])],
2333
+ [rt, Ke(i[hi])],
2334
+ [p, /\?1/.test(i[pi])],
2335
+ [d, Ee(i[mi])],
2336
+ [te, Ee(i[Bt])],
2337
+ [ct, Ee(i[fi])],
2338
+ [k, Ee(i[gi])],
2339
+ [$, Ke(i[bi])],
2340
+ [Ve, Ee(i[wi])]
2253
2341
  ]);
2254
2342
  else
2255
2343
  for (var t in i)
2256
- this.hasOwnProperty(t) && typeof i[t] !== V && (this[t] = i[t]);
2344
+ this.hasOwnProperty(t) && typeof i[t] !== z && (this[t] = i[t]);
2257
2345
  }
2258
- function It(i, e, t, n) {
2346
+ function At(i, e, t, n) {
2259
2347
  return this.get = function(a) {
2260
2348
  return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
2261
2349
  }, this.set = function(a, c) {
@@ -2265,116 +2353,116 @@ function It(i, e, t, n) {
2265
2353
  }, this.detectFeature = function() {
2266
2354
  if (I && I.userAgent == this.ua)
2267
2355
  switch (this.itemType) {
2268
- case T:
2269
- I.brave && typeof I.brave.isBrave == Je && this.set(o, "Brave");
2356
+ case C:
2357
+ I.brave && typeof I.brave.isBrave == et && this.set(o, "Brave");
2270
2358
  break;
2271
- case U:
2272
- !this.get(l) && N && N[b] && this.set(l, b), this.get(d) == "Macintosh" && I && typeof I.standalone !== V && I.maxTouchPoints && I.maxTouchPoints > 2 && this.set(d, "iPad").set(l, f);
2359
+ case _:
2360
+ !this.get(l) && H && H[p] && this.set(l, p), this.get(d) == "Macintosh" && I && typeof I.standalone !== z && I.maxTouchPoints && I.maxTouchPoints > 2 && this.set(d, "iPad").set(l, f);
2273
2361
  break;
2274
2362
  case P:
2275
- !this.get(o) && N && N[J] && this.set(o, N[J]);
2363
+ !this.get(o) && H && H[te] && this.set(o, H[te]);
2276
2364
  break;
2277
- case Y:
2365
+ case ie:
2278
2366
  var a = this.data, c = function(s) {
2279
2367
  return a[s].getItem().detectFeature().get();
2280
2368
  };
2281
- this.set(T, c(T)).set(B, c(B)).set(U, c(U)).set(F, c(F)).set(P, c(P));
2369
+ this.set(C, c(C)).set(D, c(D)).set(_, c(_)).set(R, c(R)).set(P, c(P));
2282
2370
  }
2283
2371
  return this;
2284
2372
  }, this.parseUA = function() {
2285
- return this.itemType != Y && Et.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(fe, Xe(this.get(r))), this;
2373
+ return this.itemType != ie && kt.call(this.data, this.ua, this.rgxMap), this.itemType == C && this.set(ve, Je(this.get(r))), this;
2286
2374
  }, this.parseCH = function() {
2287
2375
  var a = this.uaCH, c = this.rgxMap;
2288
2376
  switch (this.itemType) {
2289
- case T:
2290
- var s = a[at] || a[nt], h;
2377
+ case C:
2378
+ var s = a[rt] || a[ot], h;
2291
2379
  if (s)
2292
2380
  for (var g in s) {
2293
- var w = W(/(Google|Microsoft) /, s[g].brand || s[g]), m = s[g].version;
2294
- !/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(r, m).set(fe, Xe(m)), h = w);
2381
+ var w = j(/(Google|Microsoft) /, s[g].brand || s[g]), m = s[g].version;
2382
+ !/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(r, m).set(ve, Je(m)), h = w);
2295
2383
  }
2296
2384
  break;
2297
- case B:
2298
- var A = a[S];
2299
- A && (A && a[Re] == "64" && (A += "64"), Et.call(this.data, A + ";", c));
2385
+ case D:
2386
+ var A = a[k];
2387
+ A && (A && a[Ve] == "64" && (A += "64"), kt.call(this.data, A + ";", c));
2300
2388
  break;
2301
- case U:
2302
- if (a[b] && this.set(l, b), a[d] && this.set(d, a[d]), a[d] == "Xbox" && this.set(l, K).set(u, Le), a[G]) {
2303
- var R;
2304
- if (typeof a[G] != "string")
2305
- for (var de = 0; !R && de < a[G].length; )
2306
- R = Be(a[G][de++], Mt);
2389
+ case _:
2390
+ if (a[p] && this.set(l, p), a[d] && this.set(d, a[d]), a[d] == "Xbox" && this.set(l, ee).set(u, Re), a[$]) {
2391
+ var N;
2392
+ if (typeof a[$] != "string")
2393
+ for (var X = 0; !N && X < a[$].length; )
2394
+ N = Be(a[$][X++], Tt);
2307
2395
  else
2308
- R = Be(a[G], Mt);
2309
- this.set(l, R);
2396
+ N = Be(a[$], Tt);
2397
+ this.set(l, N);
2310
2398
  }
2311
2399
  break;
2312
2400
  case P:
2313
- var le = a[J];
2314
- if (le) {
2315
- var L = a[st];
2316
- le == tt && (L = parseInt(Xe(L), 10) >= 13 ? "11" : "10"), this.set(o, le).set(r, L);
2401
+ var Y = a[te];
2402
+ if (Y) {
2403
+ var L = a[ct];
2404
+ Y == at && (L = parseInt(Je(L), 10) >= 13 ? "11" : "10"), this.set(o, Y).set(r, L);
2317
2405
  }
2318
- this.get(o) == tt && a[d] == "Xbox" && this.set(o, "Xbox").set(r, void 0);
2406
+ this.get(o) == at && a[d] == "Xbox" && this.set(o, "Xbox").set(r, void 0);
2319
2407
  break;
2320
- case Y:
2321
- var ue = this.data, x = function(Rt) {
2322
- return ue[Rt].getItem().setCH(a).parseCH().get();
2408
+ case ie:
2409
+ var ge = this.data, O = function(we) {
2410
+ return ge[we].getItem().setCH(a).parseCH().get();
2323
2411
  };
2324
- this.set(T, x(T)).set(B, x(B)).set(U, x(U)).set(F, x(F)).set(P, x(P));
2412
+ this.set(C, O(C)).set(D, O(D)).set(_, O(_)).set(R, O(R)).set(P, O(P));
2325
2413
  }
2326
2414
  return this;
2327
- }, _.call(this, [
2415
+ }, B.call(this, [
2328
2416
  ["itemType", i],
2329
2417
  ["ua", e],
2330
2418
  ["uaCH", n],
2331
2419
  ["rgxMap", t],
2332
- ["data", fi(this, i)]
2420
+ ["data", Si(this, i)]
2333
2421
  ]), this;
2334
2422
  }
2335
- function D(i, e, t) {
2336
- if (typeof i === re ? (vt(i) ? (typeof e === re && (t = e), e = i) : (t = i, e = void 0), i = void 0) : typeof i === Ye && !vt(e) && (t = e, e = void 0), !(this instanceof D))
2337
- return new D(i, e, t).getResult();
2338
- var n = typeof i === Ye ? i : (
2423
+ function F(i, e, t) {
2424
+ if (typeof i === ue ? (Mt(i) ? (typeof e === ue && (t = e), e = i) : (t = i, e = void 0), i = void 0) : typeof i === tt && !Mt(e) && (t = e, e = void 0), !(this instanceof F))
2425
+ return new F(i, e, t).getResult();
2426
+ var n = typeof i === tt ? i : (
2339
2427
  // Passed user-agent string
2340
2428
  I && I.userAgent ? I.userAgent : (
2341
2429
  // navigator.userAgent
2342
- t && t[ut] ? t[ut] : (
2430
+ t && t[wt] ? t[wt] : (
2343
2431
  // User-Agent from passed headers
2344
- oe
2432
+ le
2345
2433
  )
2346
2434
  )
2347
- ), a = new _t(t, !0), c = e ? mi(St, e) : St, s = function(h) {
2348
- return h == Y ? function() {
2349
- return new It(h, n, c, a).set("ua", n).set(T, this.getBrowser()).set(B, this.getCPU()).set(U, this.getDevice()).set(F, this.getEngine()).set(P, this.getOS()).get();
2435
+ ), a = new Nt(t, !0), c = e ? vi(Ct, e) : Ct, s = function(h) {
2436
+ return h == ie ? function() {
2437
+ return new At(h, n, c, a).set("ua", n).set(C, this.getBrowser()).set(D, this.getCPU()).set(_, this.getDevice()).set(R, this.getEngine()).set(P, this.getOS()).get();
2350
2438
  } : function() {
2351
- return new It(h, n, c[h], a).parseUA().get();
2439
+ return new At(h, n, c[h], a).parseUA().get();
2352
2440
  };
2353
2441
  };
2354
- return _.call(this, [
2355
- ["getBrowser", s(T)],
2356
- ["getCPU", s(B)],
2357
- ["getDevice", s(U)],
2358
- ["getEngine", s(F)],
2442
+ return B.call(this, [
2443
+ ["getBrowser", s(C)],
2444
+ ["getCPU", s(D)],
2445
+ ["getDevice", s(_)],
2446
+ ["getEngine", s(R)],
2359
2447
  ["getOS", s(P)],
2360
- ["getResult", s(Y)],
2448
+ ["getResult", s(ie)],
2361
2449
  ["getUA", function() {
2362
2450
  return n;
2363
2451
  }],
2364
2452
  ["setUA", function(h) {
2365
- return ce(h) && (n = h.length > et ? ye(h, et) : h), this;
2453
+ return he(h) && (n = h.length > nt ? Se(h, nt) : h), this;
2366
2454
  }]
2367
2455
  ]).setUA(n), this;
2368
2456
  }
2369
- D.VERSION = ri;
2370
- D.BROWSER = Ne([o, r, fe]);
2371
- D.CPU = Ne([S]);
2372
- D.DEVICE = Ne([d, u, l, K, b, C, f, X, Ze]);
2373
- D.ENGINE = D.OS = Ne([o, r]);
2374
- class yi {
2457
+ F.VERSION = ui;
2458
+ F.BROWSER = ze([o, r, ve]);
2459
+ F.CPU = ze([k]);
2460
+ F.DEVICE = ze([d, u, l, ee, p, T, f, Z, it]);
2461
+ F.ENGINE = F.OS = ze([o, r]);
2462
+ class Mi {
2375
2463
  constructor(e, t) {
2376
- p(this, "trackers");
2377
- p(this, "config");
2464
+ b(this, "trackers");
2465
+ b(this, "config");
2378
2466
  this.trackers = e, this.config = t;
2379
2467
  }
2380
2468
  on(e, t, n) {
@@ -2387,40 +2475,40 @@ class yi {
2387
2475
  this.trackers.forEach((n) => n.track(e, t));
2388
2476
  }
2389
2477
  }
2390
- function Ct(i) {
2478
+ function Pt(i) {
2391
2479
  return i.reduce((e, t) => e + t, 0);
2392
2480
  }
2393
- function vi(i) {
2394
- const e = i.length, t = Ct(i) / e, n = i.map((c) => Math.pow(c - t, 2)), a = Ct(n) / e;
2481
+ function ki(i) {
2482
+ const e = i.length, t = Pt(i) / e, n = i.map((c) => Math.pow(c - t, 2)), a = Pt(n) / e;
2395
2483
  return Math.sqrt(a);
2396
2484
  }
2397
- class Tt {
2485
+ class Ot {
2398
2486
  constructor() {
2399
- p(this, "rafId", -1);
2400
- p(this, "startTime", 0);
2401
- p(this, "stopTime", 0);
2402
- p(this, "frames", []);
2403
- p(this, "calculateFPS", () => {
2487
+ b(this, "rafId", -1);
2488
+ b(this, "startTime", 0);
2489
+ b(this, "stopTime", 0);
2490
+ b(this, "frames", []);
2491
+ b(this, "calculateFPS", () => {
2404
2492
  const e = Math.floor((this.stopTime - this.startTime) / 1e3);
2405
2493
  return this.frames.map((t) => Math.floor((t - this.startTime) / 1e3)).reduce((t, n, a, c) => (c[a] !== c[a - 1] ? t.push(1) : t[t.length - 1]++, t), []).slice(0, e);
2406
2494
  });
2407
- p(this, "getReport", () => {
2408
- const e = this.calculateFPS(), t = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), n = e.length > 0 ? Math.max(...e) : t, a = e.length > 0 ? Math.min(...e) : t, c = e.length > 0 ? vi(e) : 0;
2495
+ b(this, "getReport", () => {
2496
+ const e = this.calculateFPS(), t = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), n = e.length > 0 ? Math.max(...e) : t, a = e.length > 0 ? Math.min(...e) : t, c = e.length > 0 ? ki(e) : 0;
2409
2497
  return { fpsAvg: t, fpsMax: n, fpsMin: a, fpsStdDev: c };
2410
2498
  });
2411
- p(this, "start", () => {
2499
+ b(this, "start", () => {
2412
2500
  this.startTime = Date.now(), this.frames = [], this.trackFrames();
2413
2501
  });
2414
- p(this, "stop", () => {
2502
+ b(this, "stop", () => {
2415
2503
  cancelAnimationFrame(this.rafId), this.stopTime = Date.now();
2416
2504
  });
2417
- p(this, "trackFrames", () => {
2505
+ b(this, "trackFrames", () => {
2418
2506
  this.frames.push(Date.now()), this.rafId = requestAnimationFrame(this.trackFrames);
2419
2507
  });
2420
2508
  }
2421
2509
  }
2422
- const Ei = "landscape", ki = "portrait";
2423
- function Mi() {
2510
+ const Ii = "landscape", Ti = "portrait";
2511
+ function Ci() {
2424
2512
  try {
2425
2513
  const i = document.createElement("canvas");
2426
2514
  return !!window.WebGLRenderingContext && (i.getContext("webgl") || i.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
@@ -2428,7 +2516,7 @@ function Mi() {
2428
2516
  return !1;
2429
2517
  }
2430
2518
  }
2431
- async function Si() {
2519
+ async function Ai() {
2432
2520
  if (!window.createImageBitmap)
2433
2521
  return !1;
2434
2522
  const t = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
@@ -2438,33 +2526,33 @@ async function Si() {
2438
2526
  return !1;
2439
2527
  }
2440
2528
  }
2441
- function Ke() {
2442
- return window.innerWidth >= window.innerHeight ? Ei : ki;
2529
+ function Ze() {
2530
+ return window.innerWidth >= window.innerHeight ? Ii : Ti;
2443
2531
  }
2444
- var Fe, ee, te, ie, ke, _e, Me, De;
2445
- class Hi extends yi {
2532
+ var Fe, ae, se, oe, Ie, Ne, Te, He;
2533
+ class Wi extends Mi {
2446
2534
  constructor(...t) {
2447
2535
  super(...t);
2448
- p(this, "FPS_SAMPLE_INTERVAL", 1e4);
2536
+ b(this, "FPS_SAMPLE_INTERVAL", 1e4);
2449
2537
  // wrapper state
2450
- E(this, Fe, 0);
2451
- E(this, ee, "");
2452
- E(this, te, void 0);
2453
- E(this, ie, void 0);
2454
- E(this, ke, !1);
2455
- E(this, _e, !1);
2456
- E(this, Me, "");
2457
- E(this, De, []);
2458
- v(this, te, {}), v(this, ie, this.deviceInfo()), this.on("state", ({ balance: n, version: a }) => {
2459
- v(this, ee, a), v(this, Fe, n);
2538
+ v(this, Fe, 0);
2539
+ v(this, ae, "");
2540
+ v(this, se, void 0);
2541
+ v(this, oe, void 0);
2542
+ v(this, Ie, !1);
2543
+ v(this, Ne, !1);
2544
+ v(this, Te, "");
2545
+ v(this, He, []);
2546
+ y(this, se, {}), y(this, oe, this.deviceInfo()), this.on("state", ({ balance: n, version: a }) => {
2547
+ y(this, ae, a), y(this, Fe, n);
2460
2548
  }), this.on("autoplay", ({ action: n }) => {
2461
- ["start", "resume"].includes(n) ? v(this, ke, !0) : v(this, ke, !1);
2549
+ ["start", "resume"].includes(n) ? y(this, Ie, !0) : y(this, Ie, !1);
2462
2550
  }), this.on("settings", ({ fastPlay: n }) => {
2463
- n !== void 0 && v(this, _e, n);
2551
+ n !== void 0 && y(this, Ne, n);
2464
2552
  }), this.registerEvents();
2465
2553
  }
2466
2554
  async registerEvents() {
2467
- y(this, ie).then((t) => {
2555
+ E(this, oe).then((t) => {
2468
2556
  this.track("Device Information", t);
2469
2557
  }), this.on("loadStart", () => {
2470
2558
  this.track("Game Loading", { progress: 0, step: "initial" });
@@ -2478,9 +2566,9 @@ class Hi extends yi {
2478
2566
  systemMessageType: t.type
2479
2567
  });
2480
2568
  }), this.on("openGameResponse", async (t) => {
2481
- v(this, Me, t.contract.stateType.nextRound), v(this, te, {
2569
+ y(this, Te, t.contract.stateType.nextRound), y(this, se, {
2482
2570
  balanceInCoins: t.contract.balance.coins,
2483
- clientVersion: y(this, ee),
2571
+ clientVersion: E(this, ae),
2484
2572
  coinValueInCents: this.config.api.coinValueInCents,
2485
2573
  coinValueInCentsFloat: this.config.api.coinValueInCents,
2486
2574
  currency: this.config.api.currency,
@@ -2502,9 +2590,9 @@ class Hi extends yi {
2502
2590
  // rtpVariant: 'unknown',
2503
2591
  serverVersion: t.contract.metaData.version
2504
2592
  // testVariants: '',
2505
- }), this.track("Game Open", y(this, te));
2593
+ }), this.track("Game Open", E(this, se));
2506
2594
  }), this.on("playCycleEnd", async (t) => {
2507
- const n = await y(this, ie), { base: a, multiplier: c, specialAction: s } = t.contract.bet.lastPaid ?? {}, h = t.contract.balance.coins, g = t.contract.bet.lastPaid.base * t.contract.bet.lastPaid.multiplier, w = t.contract.win.total, m = w - g, A = s || "spin", R = t.contract.roundId;
2595
+ const n = await E(this, oe), { base: a, multiplier: c, specialAction: s } = t.contract.bet.lastPaid ?? {}, h = t.contract.balance.coins, g = t.contract.bet.lastPaid.base * t.contract.bet.lastPaid.multiplier, w = t.contract.win.total, m = w - g, A = s || "spin", N = t.contract.roundId;
2508
2596
  this.track("Betting Activity", {
2509
2597
  balance: h - m,
2510
2598
  balanceAfter: h,
@@ -2512,7 +2600,7 @@ class Hi extends yi {
2512
2600
  // baseBetIndex,
2513
2601
  betMultiplier: c,
2514
2602
  betType: A,
2515
- gameVersion: y(this, ee),
2603
+ gameVersion: E(this, ae),
2516
2604
  coinValueInCents: this.config.api.coinValueInCents,
2517
2605
  coinValueInCentsFloat: this.config.api.coinValueInCents,
2518
2606
  currency: this.config.api.currency,
@@ -2522,18 +2610,18 @@ class Hi extends yi {
2522
2610
  isMobile: n.isMobile,
2523
2611
  netResult: m,
2524
2612
  operatorName: "kalamba",
2525
- orientation: Ke(),
2613
+ orientation: Ze(),
2526
2614
  partnerId: this.config.api.brand,
2527
2615
  partnerParentId: this.config.api.integration,
2528
2616
  platform: "WEB",
2529
2617
  playMode: this.config.api.playMode,
2530
- roundId: R,
2618
+ roundId: N,
2531
2619
  // TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
2532
2620
  // roundTypes: [...this.#roundTypes],
2533
2621
  roundTypes: ["BaseGame"],
2534
2622
  totalBet: g,
2535
2623
  totalWin: w
2536
- }), v(this, De, []);
2624
+ }), y(this, He, []);
2537
2625
  }), this.on("telemetry.click", (t) => {
2538
2626
  this.track("UI Interaction", {
2539
2627
  action: "click",
@@ -2548,7 +2636,7 @@ class Hi extends yi {
2548
2636
  }), this.reportFpsSample(), this.reportFpsRound();
2549
2637
  }
2550
2638
  reportFpsSample() {
2551
- const t = new Tt(), n = () => {
2639
+ const t = new Ot(), n = () => {
2552
2640
  t.stop();
2553
2641
  const c = t.getReport();
2554
2642
  this.track("FPS Performance", { ...c, fpsType: "sample" }), a();
@@ -2558,7 +2646,7 @@ class Hi extends yi {
2558
2646
  a();
2559
2647
  }
2560
2648
  reportFpsRound() {
2561
- const t = new Tt();
2649
+ const t = new Ot();
2562
2650
  this.on("playCycleStart", () => {
2563
2651
  t.start();
2564
2652
  }), this.on("playCycleEnd", () => {
@@ -2569,13 +2657,13 @@ class Hi extends yi {
2569
2657
  }
2570
2658
  getExtraUiInteractionData() {
2571
2659
  return {
2572
- orientation: Ke(),
2573
- stateType: y(this, Me)
2660
+ orientation: Ze(),
2661
+ stateType: E(this, Te)
2574
2662
  };
2575
2663
  }
2576
2664
  async deviceInfo() {
2577
2665
  var g;
2578
- const t = new D(navigator.userAgent), n = Mi(), a = await Si(), c = t.getBrowser(), s = t.getDevice(), h = t.getOS();
2666
+ const t = new F(navigator.userAgent), n = Ci(), a = await Ai(), c = t.getBrowser(), s = t.getDevice(), h = t.getOS();
2579
2667
  return {
2580
2668
  browserName: c.name,
2581
2669
  browserVersion: c.version,
@@ -2588,7 +2676,7 @@ class Hi extends yi {
2588
2676
  manufacturer: s.vendor,
2589
2677
  operatingSystem: h.name,
2590
2678
  operatingSystemVersion: h.version,
2591
- orientation: Ke(),
2679
+ orientation: Ze(),
2592
2680
  pixelRatio: window.devicePixelRatio,
2593
2681
  screenHeight: window.screen.height,
2594
2682
  screenSize: `${window.screen.width}x${window.screen.height}`,
@@ -2600,88 +2688,88 @@ class Hi extends yi {
2600
2688
  };
2601
2689
  }
2602
2690
  }
2603
- Fe = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), ke = new WeakMap(), _e = new WeakMap(), Me = new WeakMap(), De = new WeakMap();
2604
- let Oe;
2605
- const Ii = new Uint8Array(16);
2606
- function Ci() {
2607
- if (!Oe && (Oe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Oe))
2691
+ Fe = new WeakMap(), ae = new WeakMap(), se = new WeakMap(), oe = new WeakMap(), Ie = new WeakMap(), Ne = new WeakMap(), Te = new WeakMap(), He = new WeakMap();
2692
+ let De;
2693
+ const Pi = new Uint8Array(16);
2694
+ function Oi() {
2695
+ if (!De && (De = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !De))
2608
2696
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2609
- return Oe(Ii);
2697
+ return De(Pi);
2610
2698
  }
2611
2699
  const M = [];
2612
2700
  for (let i = 0; i < 256; ++i)
2613
2701
  M.push((i + 256).toString(16).slice(1));
2614
- function Ti(i, e = 0) {
2702
+ function _i(i, e = 0) {
2615
2703
  return M[i[e + 0]] + M[i[e + 1]] + M[i[e + 2]] + M[i[e + 3]] + "-" + M[i[e + 4]] + M[i[e + 5]] + "-" + M[i[e + 6]] + M[i[e + 7]] + "-" + M[i[e + 8]] + M[i[e + 9]] + "-" + M[i[e + 10]] + M[i[e + 11]] + M[i[e + 12]] + M[i[e + 13]] + M[i[e + 14]] + M[i[e + 15]];
2616
2704
  }
2617
- const Ai = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), At = {
2618
- randomUUID: Ai
2705
+ const Ui = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), _t = {
2706
+ randomUUID: Ui
2619
2707
  };
2620
- function Pt(i, e, t) {
2621
- if (At.randomUUID && !e && !i)
2622
- return At.randomUUID();
2708
+ function Ut(i, e, t) {
2709
+ if (_t.randomUUID && !e && !i)
2710
+ return _t.randomUUID();
2623
2711
  i = i || {};
2624
- const n = i.random || (i.rng || Ci)();
2712
+ const n = i.random || (i.rng || Oi)();
2625
2713
  if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) {
2626
2714
  t = t || 0;
2627
2715
  for (let a = 0; a < 16; ++a)
2628
2716
  e[t + a] = n[a];
2629
2717
  return e;
2630
2718
  }
2631
- return Ti(n);
2719
+ return _i(n);
2632
2720
  }
2633
- class Dt {
2721
+ class Ht {
2634
2722
  constructor(e) {
2635
- p(this, "config");
2723
+ b(this, "config");
2636
2724
  this.config = e;
2637
2725
  }
2638
2726
  }
2639
- const xt = 25, Ut = 1e4;
2640
- var ne, ae, se, H, Se;
2641
- class Vi extends Dt {
2727
+ const xt = 25, Lt = 1e4;
2728
+ var re, ce, de, V, Ce;
2729
+ class $i extends Ht {
2642
2730
  constructor(...t) {
2643
2731
  super(...t);
2644
- E(this, ne, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
2645
- E(this, ae, void 0);
2646
- E(this, se, void 0);
2647
- E(this, H, []);
2648
- E(this, Se, void 0);
2649
- p(this, "processQueueForced");
2650
- v(this, ae, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime()), v(this, H, []), v(this, Se, Pt()), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ne), {
2732
+ v(this, re, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
2733
+ v(this, ce, void 0);
2734
+ v(this, de, void 0);
2735
+ v(this, V, []);
2736
+ v(this, Ce, void 0);
2737
+ b(this, "processQueueForced");
2738
+ y(this, ce, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime()), y(this, V, []), y(this, Ce, Ut()), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(E(this, re), {
2651
2739
  method: "OPTIONS"
2652
- }).catch(rt), this.subscribe();
2740
+ }).catch(lt), this.subscribe();
2653
2741
  }
2654
2742
  subscribe() {
2655
2743
  window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
2656
2744
  }
2657
2745
  schedule() {
2658
- y(this, se) && clearTimeout(y(this, se)), v(this, se, window.setTimeout(() => this.processQueue(), Ut));
2746
+ E(this, de) && clearTimeout(E(this, de)), y(this, de, window.setTimeout(() => this.processQueue(), Lt));
2659
2747
  }
2660
2748
  send(t) {
2661
- v(this, ae, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime());
2749
+ y(this, ce, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime());
2662
2750
  try {
2663
- navigator.sendBeacon(y(this, ne), JSON.stringify(t));
2751
+ navigator.sendBeacon(E(this, re), JSON.stringify(t));
2664
2752
  } catch {
2665
- fetch(y(this, ne), {
2753
+ fetch(E(this, re), {
2666
2754
  body: JSON.stringify(t),
2667
2755
  method: "POST",
2668
2756
  headers: {
2669
2757
  "Content-Type": "application/json"
2670
2758
  },
2671
2759
  keepalive: !0
2672
- }).catch(rt);
2760
+ }).catch(lt);
2673
2761
  }
2674
2762
  this.schedule();
2675
2763
  }
2676
2764
  addToQueue(t) {
2677
- y(this, H).push(t), this.processQueue();
2765
+ E(this, V).push(t), this.processQueue();
2678
2766
  }
2679
2767
  processQueue(t = !1) {
2680
- if (!(this.config == null || !this.config.ui.feature.allowTelemetry) && !(!t && y(this, H).length < xt && /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime() - y(this, ae) < Ut))
2681
- for (; y(this, H).length; ) {
2682
- const n = y(this, H).splice(0, xt).map((a) => ({
2768
+ if (!(this.config == null || !this.config.ui.feature.allowTelemetry) && !(!t && E(this, V).length < xt && /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime() - E(this, ce) < Lt))
2769
+ for (; E(this, V).length; ) {
2770
+ const n = E(this, V).splice(0, xt).map((a) => ({
2683
2771
  ...a,
2684
- sessionID: y(this, Se),
2772
+ sessionID: E(this, Ce),
2685
2773
  userID: this.config.api.user
2686
2774
  }));
2687
2775
  this.send(n);
@@ -2692,31 +2780,31 @@ class Vi extends Dt {
2692
2780
  eventName: t,
2693
2781
  eventParams: n,
2694
2782
  eventTimestamp: /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime(),
2695
- eventUUID: Pt()
2783
+ eventUUID: Ut()
2696
2784
  });
2697
2785
  }
2698
2786
  }
2699
- ne = new WeakMap(), ae = new WeakMap(), se = new WeakMap(), H = new WeakMap(), Se = new WeakMap();
2700
- const Pi = O("LoggingTracker", "color:#000000;font-weight:bold;");
2701
- class zi extends Dt {
2787
+ re = new WeakMap(), ce = new WeakMap(), de = new WeakMap(), V = new WeakMap(), Ce = new WeakMap();
2788
+ const xi = x("LoggingTracker", "color:#000000;font-weight:bold;");
2789
+ class ji extends Ht {
2702
2790
  track(e, t) {
2703
- Pi(`@${this.config.api.user}`, `[${e}]`, t);
2791
+ xi(`@${this.config.api.user}`, `[${e}]`, t);
2704
2792
  }
2705
2793
  }
2706
2794
  export {
2707
- Oi as BasicPlugin,
2708
- $ as CasinoPlugin,
2709
- Li as DebuggingPlugin,
2710
- Bi as GigPlugin,
2711
- Ni as KalambaBullseyePlugin,
2712
- Hi as KalambaStargazerPlugin,
2713
- Vi as KalambaStargazerTracker,
2714
- zi as LoggingTracker,
2715
- Fi as OryxPlugin,
2716
- _i as PariplayPlugin,
2717
- Di as RelaxFEIMPlugin,
2718
- Qt as RgsPlygin,
2719
- yi as TelemetryPlugin,
2720
- Dt as Tracker,
2721
- Ri as TukoPlugin
2795
+ Bi as BasicPlugin,
2796
+ Q as CasinoPlugin,
2797
+ Fi as DebuggingPlugin,
2798
+ Ni as GigPlugin,
2799
+ qi as KalambaBullseyePlugin,
2800
+ Wi as KalambaStargazerPlugin,
2801
+ $i as KalambaStargazerTracker,
2802
+ ji as LoggingTracker,
2803
+ Hi as OryxPlugin,
2804
+ Vi as PariplayPlugin,
2805
+ zi as RelaxFEIMPlugin,
2806
+ Yt as RgsPlygin,
2807
+ Mi as TelemetryPlugin,
2808
+ Ht as Tracker,
2809
+ Gi as TukoPlugin
2722
2810
  };