@kalamba/sdk 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugins.js CHANGED
@@ -2,38 +2,38 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2024, Kalamba Games Limited
4
4
  */
5
- var Ht = Object.defineProperty;
6
- var Vt = (i, t, e) => t in i ? Ht(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
7
- var b = (i, t, e) => (Vt(i, typeof t != "symbol" ? t + "" : t, e), e), rt = (i, t, e) => {
5
+ var Gt = Object.defineProperty;
6
+ var Ht = (i, t, e) => t in i ? Gt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
7
+ var p = (i, t, e) => (Ht(i, typeof t != "symbol" ? t + "" : t, e), e), rt = (i, t, e) => {
8
8
  if (!t.has(i))
9
9
  throw TypeError("Cannot " + e);
10
10
  };
11
- var y = (i, t, e) => (rt(i, t, "read from private field"), e ? e.call(i) : t.get(i)), C = (i, t, e) => {
11
+ var y = (i, t, e) => (rt(i, t, "read from private field"), e ? e.call(i) : t.get(i)), M = (i, t, e) => {
12
12
  if (t.has(i))
13
13
  throw TypeError("Cannot add the same private member more than once");
14
14
  t instanceof WeakSet ? t.add(i) : t.set(i, e);
15
- }, v = (i, t, e, a) => (rt(i, t, "write to private field"), a ? a.call(i, e) : t.set(i, e), e);
16
- import { a as Ne } from "./errors-afd9f527.js";
15
+ }, k = (i, t, e, s) => (rt(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e);
16
+ import { a as De } from "./errors-afd9f527.js";
17
17
  import { a as ct } from "./noop-3336849b.js";
18
18
  function U(i, t) {
19
- return (e, ...a) => {
20
- console.log(`[%c${i}\x1B[m] %s`, t, e, ...a);
19
+ return (e, ...s) => {
20
+ console.log(`[%c${i}\x1B[m] %s`, t, e, ...s);
21
21
  };
22
22
  }
23
23
  function Bt(i, t) {
24
24
  return Math.round(i * 100 / t);
25
25
  }
26
- class j {
26
+ class $ {
27
27
  constructor(t, e) {
28
- b(this, "config");
29
- b(this, "sdkConfig");
28
+ p(this, "config");
29
+ p(this, "sdkConfig");
30
30
  this.config = t, this.sdkConfig = e;
31
31
  }
32
- on(t, e, a) {
33
- const n = function(s) {
34
- s.data.message !== `kalamba:wrapper-casino:${t}` && s.data.message !== `kalamba:wrapper:${t}` || e(s.data.payload);
32
+ on(t, e, s) {
33
+ const n = function(a) {
34
+ a.data.message !== `kalamba:wrapper-casino:${t}` && a.data.message !== `kalamba:wrapper:${t}` || e(a.data.payload);
35
35
  };
36
- window.addEventListener("message", n, a);
36
+ window.addEventListener("message", n, s);
37
37
  }
38
38
  send(t, ...[e]) {
39
39
  window.postMessage({
@@ -42,22 +42,22 @@ class j {
42
42
  });
43
43
  }
44
44
  }
45
- const zt = U("BasicPlugin", "color:#000000;font-weight:bold;");
46
- class _i extends j {
45
+ const Vt = U("BasicPlugin", "color:#000000;font-weight:bold;");
46
+ class _i extends $ {
47
47
  constructor(...t) {
48
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), zt("configured");
48
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Vt("configured");
49
49
  }
50
50
  registerToSdkEvents() {
51
51
  window.addEventListener("message", (t) => {
52
52
  try {
53
- const { type: e, payload: a } = t.data;
53
+ const { type: e, payload: s } = t.data;
54
54
  switch (e) {
55
55
  case "doAudioSettings":
56
- this.send("settings", { music: a == null ? void 0 : a.musicEnabled, sounds: a == null ? void 0 : a.soundEnabled });
56
+ this.send("settings", { music: s == null ? void 0 : s.musicEnabled, sounds: s == null ? void 0 : s.soundEnabled });
57
57
  return;
58
58
  case "doBalanceUpdate":
59
- const { currency: n, coinValueInCents: r } = this.sdkConfig.api;
60
- a.currency === n && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: Bt(a.balanceInCurrency, r) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
59
+ const { currency: n, coinValueInCents: o } = this.sdkConfig.api;
60
+ s.currency === n && typeof s.balanceInCurrency == "number" ? this.send("balance", { balance: Bt(s.balanceInCurrency, o) }) : (s.balanceInCoins, this.send("balance", { balance: s.balanceInCoins }));
61
61
  return;
62
62
  case "doGamePause":
63
63
  this.send("freeze");
@@ -92,8 +92,8 @@ class _i extends j {
92
92
  });
93
93
  }
94
94
  }
95
- const k = U("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), qt = U("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
96
- class Fi extends j {
95
+ const v = U("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), zt = U("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
96
+ class Fi extends $ {
97
97
  constructor(...t) {
98
98
  super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
99
99
  }
@@ -114,16 +114,16 @@ class Fi extends j {
114
114
  };
115
115
  }
116
116
  registerSdkToDebugEvents() {
117
- this.on("autoplay", (t) => k("autoplay", t)), this.on("balance", (t) => k("balance", t)), this.on("bet", (t) => k("bet", t)), this.on("cashier", (t) => k("cashier", t)), this.on("choice", (t) => k("choice", t)), this.on("close", (t) => k("close", t)), this.on("error", (t) => k("error", t)), this.on("loadEnd", (t) => k("loadEnd", t)), this.on("loadProgress", (t) => k("loadProgress", t)), this.on("loadStart", (t) => k("loadStart", t)), this.on("playCycleStart", (t) => k("playCycleStart", t)), this.on("playCycleEnd", (t) => k("playCycleEnd", t)), this.on("playEnd", (t) => k("playEnd", t)), this.on("playError", (t) => k("playError", t)), this.on("playReady", (t) => k("playReady", t)), this.on("playStart", (t) => k("playStart", t)), this.on("settings", (t) => k("settings", t));
117
+ this.on("autoplay", (t) => v("autoplay", t)), this.on("balance", (t) => v("balance", t)), this.on("bet", (t) => v("bet", t)), this.on("cashier", (t) => v("cashier", t)), this.on("choice", (t) => v("choice", t)), this.on("close", (t) => v("close", t)), this.on("error", (t) => v("error", t)), this.on("loadEnd", (t) => v("loadEnd", t)), this.on("loadProgress", (t) => v("loadProgress", t)), this.on("loadStart", (t) => v("loadStart", t)), this.on("playCycleStart", (t) => v("playCycleStart", t)), this.on("playCycleEnd", (t) => v("playCycleEnd", t)), this.on("playEnd", (t) => v("playEnd", t)), this.on("playError", (t) => v("playError", t)), this.on("playReady", (t) => v("playReady", t)), this.on("playStart", (t) => v("playStart", t)), this.on("settings", (t) => v("settings", t));
118
118
  }
119
119
  _send(...t) {
120
- qt(...t), this.send(...t);
120
+ zt(...t), this.send(...t);
121
121
  }
122
122
  }
123
- const Gt = U("GigPlugin", "color:#000000;font-weight:bold;");
124
- class Di extends j {
123
+ const qt = U("GigPlugin", "color:#000000;font-weight:bold;");
124
+ class Ri extends $ {
125
125
  constructor(...t) {
126
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Gt("configured");
126
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), qt("configured");
127
127
  }
128
128
  postMessage(t) {
129
129
  const e = {
@@ -172,17 +172,17 @@ class Di extends j {
172
172
  }
173
173
  }
174
174
  const Wt = U("OryxPlugin", "color:#000000;font-weight:bold;");
175
- class Ni extends j {
175
+ class Di extends $ {
176
176
  constructor(...t) {
177
177
  super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Wt("configured");
178
178
  }
179
179
  registerToSdkEvents() {
180
180
  window.addEventListener("message", (t) => {
181
181
  try {
182
- const { type: e, param: a } = t.data;
182
+ const { type: e, param: s } = t.data;
183
183
  switch (e) {
184
184
  case "doBalanceUpdate":
185
- this.send("balance", { balance: a });
185
+ this.send("balance", { balance: s });
186
186
  return;
187
187
  case "doGamePause":
188
188
  this.send("freeze");
@@ -227,29 +227,29 @@ class Ni extends j {
227
227
  }
228
228
  }
229
229
  const dt = U("PariplayPlugin", "color:#000000;font-weight:bold;");
230
- function Ve(i) {
230
+ function He(i) {
231
231
  try {
232
232
  window.top.location = i;
233
233
  } catch {
234
234
  window.location = i;
235
235
  }
236
236
  }
237
- function ze(i, t) {
238
- return new Promise(function(a, n) {
239
- const r = new XMLHttpRequest();
240
- r.onload = function() {
241
- r.status >= 200 && r.status < 300 ? a(r.responseText) : n(r.responseText);
242
- }, r.open(i, t), r.send();
237
+ function Ve(i, t) {
238
+ return new Promise(function(s, n) {
239
+ const o = new XMLHttpRequest();
240
+ o.onload = function() {
241
+ o.status >= 200 && o.status < 300 ? s(o.responseText) : n(o.responseText);
242
+ }, o.open(i, t), o.send();
243
243
  });
244
244
  }
245
- function qe() {
245
+ function ze() {
246
246
  }
247
- function $t(i) {
247
+ function jt(i) {
248
248
  return i.filter(function(e) {
249
249
  return e.messageType.toUpperCase() === "DATA";
250
250
  });
251
251
  }
252
- function Ge(i) {
252
+ function qe(i) {
253
253
  return i.filter(function(e) {
254
254
  return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
255
255
  });
@@ -261,7 +261,7 @@ function _t(i) {
261
261
  return {};
262
262
  }
263
263
  }
264
- function jt(i) {
264
+ function $t(i) {
265
265
  return i.map(_t).filter(Boolean).find(function(e) {
266
266
  return e.betId != null && e.winId != null;
267
267
  }) || {};
@@ -271,36 +271,36 @@ function Qt(i) {
271
271
  return e.TotalBet != null && e.TotalWin != null;
272
272
  }) || {};
273
273
  }
274
- class Ri extends j {
274
+ class Ni extends $ {
275
275
  constructor(...t) {
276
276
  super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), dt("configured");
277
277
  }
278
278
  postMessage(t, e) {
279
- const a = {
279
+ const s = {
280
280
  lang: this.sdkConfig.ui.language,
281
281
  sender: this.sdkConfig.api.game,
282
282
  type: t
283
283
  };
284
- e != null && (a.data = e), dt("postMessage", a), window.parent.postMessage(a, "*");
284
+ e != null && (s.data = e), dt("postMessage", s), window.parent.postMessage(s, "*");
285
285
  }
286
286
  coinsToCurrency(t) {
287
287
  return t * this.sdkConfig.api.coinValueInCents / 100;
288
288
  }
289
289
  handleContinueButton(t, e) {
290
- t.link && ze("GET", t.link), e();
290
+ t.link && Ve("GET", t.link), e();
291
291
  }
292
292
  handleLinkButton(t, e) {
293
293
  switch (t.linkType.toUpperCase()) {
294
294
  case "AJAX":
295
- ze("GET", t.link), e();
295
+ Ve("GET", t.link), e();
296
296
  return;
297
297
  case "AJAXRESPONSE":
298
- ze("GET", t.link).then(() => {
298
+ Ve("GET", t.link).then(() => {
299
299
  e();
300
300
  });
301
301
  return;
302
302
  case "REDIRECT":
303
- Ve(t.link), e();
303
+ He(t.link), e();
304
304
  return;
305
305
  }
306
306
  }
@@ -323,17 +323,17 @@ class Ri extends j {
323
323
  };
324
324
  }
325
325
  processInfoUiMessages(t) {
326
- return t.reduce((e, a) => e.then(() => new Promise((n) => {
327
- Object.assign({}, a, {
328
- buttons: a.buttons.filter((r) => r.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((r) => Object.assign({}, r, {
326
+ return t.reduce((e, s) => e.then(() => new Promise((n) => {
327
+ Object.assign({}, s, {
328
+ buttons: s.buttons.filter((o) => o.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((o) => Object.assign({}, o, {
329
329
  onRelease: () => {
330
- const s = a.messageType.toUpperCase() === "POPUP" ? qe : n, h = this.buttonActions[r.action.toUpperCase()];
331
- h ? h(r, s) : s();
330
+ const a = s.messageType.toUpperCase() === "POPUP" ? ze : n, h = this.buttonActions[o.action.toUpperCase()];
331
+ h ? h(o, a) : a();
332
332
  }
333
333
  }))
334
334
  });
335
- }).catch(qe)), Promise.resolve()).then(() => {
336
- }).catch(qe);
335
+ }).catch(ze)), Promise.resolve()).then(() => {
336
+ }).catch(ze);
337
337
  }
338
338
  registerToSdkEvents() {
339
339
  window.addEventListener("message", (t) => {
@@ -361,26 +361,26 @@ class Ri extends j {
361
361
  registerFromSdkEvents() {
362
362
  let t = 0;
363
363
  this.on("openGameResponse", (e) => {
364
- let a;
364
+ let s;
365
365
  try {
366
366
  const n = JSON.parse(
367
367
  JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token
368
- ), r = JSON.parse(n.integrationSpecificAttributes.sessionData || "{}");
369
- a = {
368
+ ), o = JSON.parse(n.integrationSpecificAttributes.sessionData || "{}");
369
+ s = {
370
370
  ClientToken: n.integrationSpecificAttributes.clientToken,
371
371
  CurrencyCode: n.currency,
372
372
  PlayerTokenId: n.user,
373
- SessionData: r
373
+ SessionData: o
374
374
  };
375
375
  } catch {
376
- a = void 0;
376
+ s = void 0;
377
377
  }
378
378
  this.postMessage("gameDataLoaded", {
379
- LoadGameData: a,
379
+ LoadGameData: s,
380
380
  success: !0
381
381
  });
382
382
  try {
383
- const n = Ge(e.contract.uiMessages);
383
+ const n = qe(e.contract.uiMessages);
384
384
  this.processInfoUiMessages(n);
385
385
  } catch {
386
386
  }
@@ -397,22 +397,22 @@ class Ri extends j {
397
397
  window.history.back();
398
398
  }
399
399
  else
400
- this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : Ve(this.sdkConfig.api.homeUrl);
400
+ this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : He(this.sdkConfig.api.homeUrl);
401
401
  }), this.on("playEnd", (e) => {
402
402
  this.postMessage("roundEnded", {
403
403
  balanceAfter: this.coinsToCurrency(e.contract.balance.coins),
404
404
  win: this.coinsToCurrency(e.contract.win.round)
405
405
  });
406
406
  try {
407
- const a = Ge(e.contract.uiMessages);
408
- this.processInfoUiMessages(a);
407
+ const s = qe(e.contract.uiMessages);
408
+ this.processInfoUiMessages(s);
409
409
  } catch {
410
410
  }
411
411
  }), this.on("playError", (e) => {
412
- var a, n;
412
+ var s, n;
413
413
  this.postMessage("ticketReceived", {
414
414
  // TODO: Operator specific error code and message
415
- ErrorCode: (a = e.data) == null ? void 0 : a.code,
415
+ ErrorCode: (s = e.data) == null ? void 0 : s.code,
416
416
  ErrorMessage: "ERROR",
417
417
  Status: {
418
418
  ErrCode: (n = e.data) == null ? void 0 : n.code
@@ -424,13 +424,13 @@ class Ri extends j {
424
424
  e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
425
425
  )
426
426
  });
427
- const a = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), n = $t(e.contract.uiMessages), r = Ge(e.contract.uiMessages), s = jt(n), h = Qt(n);
427
+ const s = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), n = jt(e.contract.uiMessages), o = qe(e.contract.uiMessages), a = $t(n), h = Qt(n);
428
428
  this.postMessage("ticketReceived", {
429
429
  Balance: this.coinsToCurrency(e.contract.balance.coins),
430
- BetAmount: a ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
431
- CreditTransactionId: s.betId,
432
- DebitTransactionId: s.winId,
433
- Message: r,
430
+ BetAmount: s ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
431
+ CreditTransactionId: a.betId,
432
+ DebitTransactionId: a.winId,
433
+ Message: o,
434
434
  SessionData: h,
435
435
  Status: {
436
436
  ErrCode: 0
@@ -446,17 +446,17 @@ class Ri extends j {
446
446
  }), this.on("loadStart", () => {
447
447
  this.postMessage("onAppFrameReady");
448
448
  }), this.on("cashier", () => {
449
- this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") : Ve(this.sdkConfig.api.cashierUrl));
449
+ this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") : He(this.sdkConfig.api.cashierUrl));
450
450
  });
451
451
  }
452
452
  }
453
453
  const ge = U("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
454
- class Hi extends j {
454
+ class Gi extends $ {
455
455
  constructor(...e) {
456
456
  super(...e);
457
- b(this, "VERSION", "1.15.0");
458
- const a = document.createElement("script");
459
- a.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, a.onload = () => {
457
+ p(this, "VERSION", "1.15.0");
458
+ const s = document.createElement("script");
459
+ s.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, s.onload = () => {
460
460
  ge("loaded"), window.FEIM.configure({
461
461
  p2pConfig: {
462
462
  currency: this.sdkConfig.api.currency,
@@ -466,7 +466,7 @@ class Hi extends j {
466
466
  }
467
467
  }
468
468
  }), ge("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
469
- }, document.body.appendChild(a);
469
+ }, document.body.appendChild(s);
470
470
  }
471
471
  registerToSdkEvents() {
472
472
  window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => ge("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => ge("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => ge("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
@@ -489,8 +489,8 @@ class Hi extends j {
489
489
  }
490
490
  }), this.on("balance", ({ balance: e }) => {
491
491
  window.FEIM.send.balanceUpdate(e);
492
- }), this.on("bet", ({ base: e, multiplier: a }) => {
493
- window.FEIM.send.betUpdate(e * a);
492
+ }), this.on("bet", ({ base: e, multiplier: s }) => {
493
+ window.FEIM.send.betUpdate(e * s);
494
494
  }), this.on("error", ({ message: e }) => {
495
495
  window.FEIM.send.errorMessage(e);
496
496
  }), this.on("close", () => {
@@ -504,20 +504,20 @@ class Hi extends j {
504
504
  }), this.on("cashier", () => {
505
505
  window.FEIM.send.openQuickDeposit();
506
506
  }), this.on("playCycleEnd", (e) => {
507
- const a = {
507
+ const s = {
508
508
  balance: e.contract.balance.coins,
509
509
  bet: e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier,
510
510
  win: {
511
511
  win: e.contract.win.total
512
512
  }
513
513
  };
514
- window.FEIM.send.roundFinished(a);
514
+ window.FEIM.send.roundFinished(s);
515
515
  }), this.on("playResponse", (e) => {
516
- const a = {
516
+ const s = {
517
517
  balance: e.contract.balance.coins,
518
518
  playResponse: e.data
519
519
  };
520
- window.FEIM.send.roundStarted(a);
520
+ window.FEIM.send.roundStarted(s);
521
521
  }), this.on("history", () => {
522
522
  window.FEIM.send.showHistory();
523
523
  }), this.on("settings", (e) => {
@@ -526,32 +526,32 @@ class Hi extends j {
526
526
  }
527
527
  }
528
528
  const We = U("TukoPlugin", "color:#000000;font-weight:bold;");
529
- class Vi extends j {
529
+ class Hi extends $ {
530
530
  constructor(...e) {
531
531
  super(...e);
532
- b(this, "PING_INTERVAL", 1e4);
532
+ p(this, "PING_INTERVAL", 1e4);
533
533
  const n = new URLSearchParams(window.location.search).get("pingCallbackUrl");
534
534
  n && window.setInterval(() => {
535
535
  this.ping(n);
536
536
  }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), We("configured");
537
537
  }
538
538
  ping(e) {
539
- const a = new XMLHttpRequest();
540
- a.onreadystatechange = function() {
541
- a.readyState === XMLHttpRequest.DONE && (a.status === 0 || a.status >= 200 && a.status < 400 ? We("ping ok", a) : We("ping error", a));
542
- }, a.open("GET", e), a.send();
539
+ const s = new XMLHttpRequest();
540
+ s.onreadystatechange = function() {
541
+ s.readyState === XMLHttpRequest.DONE && (s.status === 0 || s.status >= 200 && s.status < 400 ? We("ping ok", s) : We("ping error", s));
542
+ }, s.open("GET", e), s.send();
543
543
  }
544
544
  registerToSdkEvents() {
545
545
  window.addEventListener("message", (e) => {
546
546
  try {
547
- const { type: a, payload: n } = e.data;
548
- switch (a) {
547
+ const { type: s, payload: n } = e.data;
548
+ switch (s) {
549
549
  case "doAudioSettings":
550
550
  this.send("settings", { music: n == null ? void 0 : n.musicEnabled, sounds: n == null ? void 0 : n.soundEnabled });
551
551
  return;
552
552
  case "doBalanceUpdate":
553
- const { currency: r, coinValueInCents: s } = this.sdkConfig.api;
554
- n.currency === r && typeof n.balanceInCurrency == "number" ? this.send("balance", { balance: Bt(n.balanceInCurrency, s) }) : (n.balanceInCoins, this.send("balance", { balance: n.balanceInCoins }));
553
+ const { currency: o, coinValueInCents: a } = this.sdkConfig.api;
554
+ n.currency === o && typeof n.balanceInCurrency == "number" ? this.send("balance", { balance: Bt(n.balanceInCurrency, a) }) : (n.balanceInCoins, this.send("balance", { balance: n.balanceInCoins }));
555
555
  return;
556
556
  case "doGamePause":
557
557
  this.send("freeze");
@@ -588,15 +588,15 @@ class Vi extends j {
588
588
  }
589
589
  class Xt {
590
590
  constructor(t, e) {
591
- b(this, "config");
592
- b(this, "sdkConfig");
591
+ p(this, "config");
592
+ p(this, "sdkConfig");
593
593
  this.config = t, this.sdkConfig = e;
594
594
  }
595
- on(t, e, a) {
596
- const n = function(s) {
597
- s.data.message !== `kalamba:wrapper-rgs:${t}` && s.data.message !== `kalamba:wrapper:${t}` || e(s.data.payload);
595
+ on(t, e, s) {
596
+ const n = function(a) {
597
+ a.data.message !== `kalamba:wrapper-rgs:${t}` && a.data.message !== `kalamba:wrapper:${t}` || e(a.data.payload);
598
598
  };
599
- window.addEventListener("message", n, a);
599
+ window.addEventListener("message", n, s);
600
600
  }
601
601
  send(t, ...[e]) {
602
602
  window.postMessage({
@@ -607,49 +607,49 @@ class Xt {
607
607
  }
608
608
  class Kt {
609
609
  constructor(t) {
610
- b(this, "socket", null);
611
- b(this, "webSocketUrl");
612
- b(this, "eventListeners", {
610
+ p(this, "socket", null);
611
+ p(this, "webSocketUrl");
612
+ p(this, "eventListeners", {
613
613
  close: [],
614
614
  error: [],
615
615
  message: []
616
616
  });
617
- b(this, "connect", () => {
617
+ p(this, "connect", () => {
618
618
  const t = new WebSocket(this.webSocketUrl);
619
619
  return t.addEventListener("message", this.handleMessage), new Promise((e) => {
620
- t.addEventListener("open", (a) => {
621
- this.handleOpen(a), e(this.socket);
620
+ t.addEventListener("open", (s) => {
621
+ this.handleOpen(s), e(this.socket);
622
622
  });
623
623
  });
624
624
  });
625
- b(this, "send", (t) => {
625
+ p(this, "send", (t) => {
626
626
  if (this.socket == null)
627
627
  throw new Error("Cannot send message, the WebSocket connection is not open");
628
628
  this.socket.send(t);
629
629
  });
630
- b(this, "close", () => {
630
+ p(this, "close", () => {
631
631
  if (this.socket == null)
632
632
  throw new Error("Cannot close the WebSocket connection that is not open");
633
633
  this.socket.close(), this.addEventListener("error", (t) => {
634
634
  console.log(t);
635
635
  });
636
636
  });
637
- b(this, "handleClose", (t) => {
637
+ p(this, "handleClose", (t) => {
638
638
  this.eventListeners.close.forEach((e) => {
639
639
  e(t);
640
640
  });
641
641
  });
642
- b(this, "handleError", (t) => {
642
+ p(this, "handleError", (t) => {
643
643
  this.eventListeners.error.forEach((e) => {
644
644
  e(t);
645
645
  });
646
646
  });
647
- b(this, "handleMessage", (t) => {
647
+ p(this, "handleMessage", (t) => {
648
648
  this.eventListeners.message.forEach((e) => {
649
649
  e(t);
650
650
  });
651
651
  });
652
- b(this, "handleOpen", (t) => {
652
+ p(this, "handleOpen", (t) => {
653
653
  const e = t.target;
654
654
  e.addEventListener("close", this.handleClose), e.addEventListener("error", this.handleError), this.socket = e;
655
655
  });
@@ -659,8 +659,8 @@ class Kt {
659
659
  this.eventListeners[t].push(e);
660
660
  }
661
661
  removeEventListener(t, e) {
662
- const a = this.eventListeners[t].indexOf(e);
663
- a !== -1 && this.eventListeners[t].splice(a, 1);
662
+ const s = this.eventListeners[t].indexOf(e);
663
+ s !== -1 && this.eventListeners[t].splice(s, 1);
664
664
  }
665
665
  }
666
666
  function Me(i) {
@@ -686,9 +686,9 @@ function ut(i) {
686
686
  function Zt(i) {
687
687
  return Le(i) && i.body.event.includes("_RESULT");
688
688
  }
689
- var ie, ve;
689
+ var ie, ke;
690
690
  class ei extends Kt {
691
- constructor(e, a) {
691
+ constructor(e, s) {
692
692
  const n = new URL(e.apiUrl);
693
693
  n.searchParams.set("cageCode", e.cageCode), n.searchParams.set("gameCode", e.gameCode), n.searchParams.set("operatorCode", e.operatorCode), n.searchParams.set("playMode", e.playMode), n.searchParams.set("token", e.token), n.searchParams.set("username", e.username);
694
694
  super(n.toString());
@@ -702,7 +702,7 @@ class ei extends Kt {
702
702
  * request sent. Client and server independently maintain their own
703
703
  * correlation id counter.
704
704
  */
705
- b(this, "cId", 0);
705
+ p(this, "cId", 0);
706
706
  // Initial values for header
707
707
  /*
708
708
  * Increasing message ID
@@ -714,45 +714,45 @@ class ei extends Kt {
714
714
  * received out of sync).
715
715
  */
716
716
  // TODO make sure messages are processed in order
717
- b(this, "mId", 0);
717
+ p(this, "mId", 0);
718
718
  // Initial values for body
719
719
  /*
720
720
  * Sequence ID. Action/Event correlation.
721
721
  */
722
- b(this, "seqId", 10);
723
- b(this, "gameCode");
724
- C(this, ie, void 0);
725
- C(this, ve, void 0);
726
- b(this, "onMessage", (e) => {
727
- const a = Me(e);
728
- (Le(a) || Jt(a) || lt(a)) && this.sendAcknowledgement(a), lt(a) && this.handleRealityCheck(a);
722
+ p(this, "seqId", 10);
723
+ p(this, "gameCode");
724
+ M(this, ie, void 0);
725
+ M(this, ke, void 0);
726
+ p(this, "onMessage", (e) => {
727
+ const s = Me(e);
728
+ (Le(s) || Jt(s) || lt(s)) && this.sendAcknowledgement(s), lt(s) && this.handleRealityCheck(s);
729
729
  });
730
- this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, v(this, ie, a.requestTimeoutMs), v(this, ve, a.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
730
+ this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, k(this, ie, s.requestTimeoutMs), k(this, ke, s.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
731
731
  }
732
732
  handleRealityCheck(e) {
733
- this.eventListeners.realityCheck.forEach((a) => {
734
- a(e.body);
733
+ this.eventListeners.realityCheck.forEach((s) => {
734
+ s(e.body);
735
735
  });
736
736
  }
737
- addEventListener(e, a) {
738
- super.addEventListener(e, a);
737
+ addEventListener(e, s) {
738
+ super.addEventListener(e, s);
739
739
  }
740
- removeEventListener(e, a) {
741
- super.removeEventListener(e, a);
740
+ removeEventListener(e, s) {
741
+ super.removeEventListener(e, s);
742
742
  }
743
- buildHeader(e, a = null) {
743
+ buildHeader(e, s = null) {
744
744
  return {
745
745
  // Assign new cId if it is not provided
746
- cId: a ?? ++this.cId,
747
- code: a !== null ? 1 : void 0,
746
+ cId: s ?? ++this.cId,
747
+ code: s !== null ? 1 : void 0,
748
748
  mId: ++this.mId,
749
749
  name: e
750
750
  };
751
751
  }
752
752
  // TODO infer body from header
753
- buildPayload(e, a) {
753
+ buildPayload(e, s) {
754
754
  return JSON.stringify({
755
- body: a,
755
+ body: s,
756
756
  header: e
757
757
  });
758
758
  }
@@ -762,83 +762,83 @@ class ei extends Kt {
762
762
  seqId: ++this.seqId
763
763
  };
764
764
  }
765
- request(e, a) {
766
- const n = this.buildPayload(e, a);
767
- return new Promise((r, s) => {
768
- setTimeout(() => s({ type: "timeout" }), y(this, ie));
765
+ request(e, s) {
766
+ const n = this.buildPayload(e, s);
767
+ return new Promise((o, a) => {
768
+ setTimeout(() => a({ type: "timeout" }), y(this, ie));
769
769
  const h = (g) => {
770
770
  const w = Me(g);
771
771
  try {
772
- e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ? r(w) : s({ message: w, type: "error" }));
772
+ e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ? o(w) : a({ message: w, type: "error" }));
773
773
  } catch {
774
- s({ message: w, type: "error" });
774
+ a({ message: w, type: "error" });
775
775
  }
776
776
  };
777
777
  this.addEventListener("message", h), this.send(n);
778
778
  });
779
779
  }
780
- activateFreeRound(e) {
781
- const a = this.buildHeader("ActivateFreeRound");
782
- return this.request(
783
- a,
784
- e
785
- );
780
+ freeRounds(e) {
781
+ const s = this.buildHeader("ActivateFreeRound");
782
+ return this.request(s, e).then((n) => n.body).catch((n) => {
783
+ var o;
784
+ throw { data: (o = n == null ? void 0 : n.message) == null ? void 0 : o.body, type: n.type };
785
+ });
786
786
  }
787
787
  authenticate(e = !1) {
788
- const a = this.buildHeader("Authenticate"), n = {
788
+ const s = this.buildHeader("Authenticate"), n = {
789
789
  clientType: 3,
790
- version: y(this, ve),
790
+ version: y(this, ke),
791
791
  reconnect: e
792
792
  };
793
- return this.request(a, n).then((r) => r.body).catch((r) => {
794
- var s;
795
- throw { data: (s = r == null ? void 0 : r.message) == null ? void 0 : s.body, type: r.type };
793
+ return this.request(s, n).then((o) => o.body).catch((o) => {
794
+ var a;
795
+ throw { data: (a = o == null ? void 0 : o.message) == null ? void 0 : a.body, type: o.type };
796
796
  });
797
797
  }
798
798
  openGame() {
799
- const e = this.buildHeader("OpenGame"), a = {
799
+ const e = this.buildHeader("OpenGame"), s = {
800
800
  gameCode: this.gameCode
801
801
  };
802
- return new Promise((n, r) => {
803
- const s = (h) => {
802
+ return new Promise((n, o) => {
803
+ const a = (h) => {
804
804
  const g = Me(h);
805
- Yt(g) ? (this.removeEventListener("message", s), n(g.body)) : ut(g) && r({ data: g.body, type: "error" });
805
+ Yt(g) ? (this.removeEventListener("message", a), n(g.body)) : ut(g) && o({ data: g.body, type: "error" });
806
806
  };
807
- this.addEventListener("message", s), this.request(e, a).catch(
807
+ this.addEventListener("message", a), this.request(e, s).catch(
808
808
  (h) => {
809
809
  var g;
810
- return r({ data: (g = h == null ? void 0 : h.message) == null ? void 0 : g.body, type: h.type });
810
+ return o({ data: (g = h == null ? void 0 : h.message) == null ? void 0 : g.body, type: h.type });
811
811
  }
812
812
  );
813
813
  });
814
814
  }
815
815
  sendAcknowledgement(e) {
816
- const { name: a, cId: n } = e.header, r = this.buildHeader(a, n), s = this.buildPayload(r, {});
817
- this.send(s);
816
+ const { name: s, cId: n } = e.header, o = this.buildHeader(s, n), a = this.buildPayload(o, {});
817
+ this.send(a);
818
818
  }
819
- sendAction(e, a) {
820
- const n = this.buildHeader("GameAction"), r = {
819
+ sendAction(e, s) {
820
+ const n = this.buildHeader("GameAction"), o = {
821
821
  ...this.getBodyExtras(e),
822
- data: a
822
+ data: s
823
823
  };
824
- return new Promise((s, h) => {
824
+ return new Promise((a, h) => {
825
825
  const g = (w) => {
826
- const p = Me(w);
827
- Le(p) && r.seqId === p.body.correlationSeqId && (this.removeEventListener("message", g), Zt(p) ? s(p.body) : ut(p) && h({ data: p.body, type: "error" }));
826
+ const m = Me(w);
827
+ Le(m) && o.seqId === m.body.correlationSeqId && (this.removeEventListener("message", g), Zt(m) ? a(m.body) : ut(m) && h({ data: m.body, type: "error" }));
828
828
  };
829
- this.addEventListener("message", g), this.request(n, r).catch(
829
+ this.addEventListener("message", g), this.request(n, o).catch(
830
830
  (w) => {
831
- var p;
832
- return h({ data: (p = w == null ? void 0 : w.message) == null ? void 0 : p.body, type: w.type });
831
+ var m;
832
+ return h({ data: (m = w == null ? void 0 : w.message) == null ? void 0 : m.body, type: w.type });
833
833
  }
834
834
  );
835
835
  });
836
836
  }
837
837
  setRequestTimeoutMs(e) {
838
- v(this, ie, e);
838
+ k(this, ie, e);
839
839
  }
840
840
  }
841
- ie = new WeakMap(), ve = new WeakMap();
841
+ ie = new WeakMap(), ke = new WeakMap();
842
842
  function ti(i) {
843
843
  return i.contract ? {
844
844
  contract: {
@@ -872,99 +872,189 @@ function ii(i) {
872
872
  var t, e;
873
873
  return {
874
874
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
875
- code: ((t = i.data) == null ? void 0 : t.code) ?? Ne.UNKNOWN,
875
+ code: ((t = i.data) == null ? void 0 : t.code) ?? De.UNKNOWN,
876
876
  details: (e = i.data) == null ? void 0 : e.details
877
877
  };
878
878
  }
879
- function ai(i, t) {
880
- return t.contract ? {
881
- contract: {
882
- bet: {
883
- available: t.contract.availableMultipliersPerBaseBet,
884
- default: {
885
- base: t.contract.defaultBet.baseBet,
886
- multiplier: t.contract.defaultBet.betMultiplier
879
+ function si(i, t) {
880
+ const e = t.contract;
881
+ if (!e) {
882
+ const s = t.data;
883
+ return {
884
+ contract: {
885
+ bet: {
886
+ available: s.additionalConfigData.availableMultipliersPerBaseBet,
887
+ default: {
888
+ base: s.additionalConfigData.defaultBet.baseBet,
889
+ multiplier: s.additionalConfigData.defaultBet.betMultiplier
890
+ },
891
+ max: s.additionalConfigData.maxAllowedOverallBetInCoins,
892
+ last: s.gameState.betFromCurrentRound ? {
893
+ base: s.gameState.betFromCurrentRound.baseBet,
894
+ multiplier: s.gameState.betFromCurrentRound.betMultiplier
895
+ } : null,
896
+ lastPaid: s.gameState.lastPlacedMainGameBet ? {
897
+ base: s.gameState.lastPlacedMainGameBet.baseBet,
898
+ multiplier: s.gameState.lastPlacedMainGameBet.betMultiplier
899
+ } : null
887
900
  },
888
- max: t.contract.maxBetInCoins,
889
- last: t.contract.lastBet ? {
890
- base: t.contract.lastBet.baseBet,
891
- multiplier: t.contract.lastBet.betMultiplier
892
- } : null,
893
- lastPaid: t.contract.lastMainGameBet ? {
894
- base: t.contract.lastMainGameBet.baseBet,
895
- multiplier: t.contract.lastMainGameBet.betMultiplier
896
- } : null
897
- },
898
- balance: {
899
- coins: t.contract.balanceInCoins,
900
- version: t.contract.balanceVersion
901
- },
902
- gameModel: t.contract.gameModelFile,
903
- metaData: t.contract.metaData,
904
- roundId: t.contract.roundId,
905
- serverTime: t.contract.serverTime,
906
- sessionId: t.contract.sessionId,
907
- stateType: {
908
- thisRound: t.contract.stateTypeThisRound,
909
- nextRound: t.contract.stateTypeNextRound
901
+ balance: {
902
+ coins: t.balance,
903
+ version: t.balanceVersion
904
+ },
905
+ freeRounds: (s.FREE_ROUNDS ?? []).map((n) => ({
906
+ conf: {
907
+ base: n.conf.baseBet,
908
+ multiplier: n.conf.betMultiplier,
909
+ numAwarded: n.conf.numAwarded
910
+ },
911
+ data: {
912
+ numPlayed: n.data.numPlayed,
913
+ win: n.data.winAmount,
914
+ numLeft: n.data.numLeft
915
+ },
916
+ id: n.id,
917
+ rejectable: n.rejectable,
918
+ skippable: n.skippable,
919
+ status: n.status,
920
+ type: n.type
921
+ })),
922
+ gameModel: s.additionalConfigData.gameModelFile,
923
+ metaData: s.gameConfigData.metaData,
924
+ roundId: s.gameState.cycleId,
925
+ serverTime: t.balanceVersion,
926
+ sessionId: s.gameState.sessionId,
927
+ stateType: {
928
+ thisRound: s.gameState.stateTypeThisRound,
929
+ nextRound: s.gameState.stateTypeNextRound
930
+ },
931
+ uiMessages: i.uiMessages,
932
+ win: {
933
+ round: s.gameState.totalWinFromCurrentRound,
934
+ total: s.gameState.totalWinFromCurrentGameCycle
935
+ }
910
936
  },
911
- uiMessages: i.contract.uiMessages.concat(t.contract.uiMessages),
912
- win: {
913
- round: t.contract.roundWin,
914
- total: t.contract.totalWin
915
- }
916
- },
917
- data: t.opaqueGameServerToUi
918
- } : {
937
+ data: s
938
+ };
939
+ }
940
+ return {
919
941
  contract: {
920
942
  bet: {
921
- available: t.data.additionalConfigData.availableMultipliersPerBaseBet,
943
+ available: e.availableMultipliersPerBaseBet,
922
944
  default: {
923
- base: t.data.additionalConfigData.defaultBet.baseBet,
924
- multiplier: t.data.additionalConfigData.defaultBet.betMultiplier
945
+ base: e.defaultBet.baseBet,
946
+ multiplier: e.defaultBet.betMultiplier
925
947
  },
926
- max: t.data.additionalConfigData.maxAllowedOverallBetInCoins,
927
- last: t.data.gameState.betFromCurrentRound ? {
928
- base: t.data.gameState.betFromCurrentRound.baseBet,
929
- multiplier: t.data.gameState.betFromCurrentRound.betMultiplier
948
+ max: e.maxBetInCoins,
949
+ last: e.lastBet ? {
950
+ base: e.lastBet.baseBet,
951
+ multiplier: e.lastBet.betMultiplier
930
952
  } : null,
931
- lastPaid: t.data.gameState.lastPlacedMainGameBet ? {
932
- base: t.data.gameState.lastPlacedMainGameBet.baseBet,
933
- multiplier: t.data.gameState.lastPlacedMainGameBet.betMultiplier
953
+ lastPaid: e.lastMainGameBet ? {
954
+ base: e.lastMainGameBet.baseBet,
955
+ multiplier: e.lastMainGameBet.betMultiplier
934
956
  } : null
935
957
  },
936
958
  balance: {
937
- coins: t.balance,
938
- version: t.balanceVersion
959
+ coins: e.balanceInCoins,
960
+ version: e.balanceVersion
939
961
  },
940
- gameModel: t.data.additionalConfigData.gameModelFile,
941
- metaData: t.data.gameConfigData.metaData,
942
- roundId: t.data.gameState.cycleId,
943
- serverTime: t.balanceVersion,
944
- sessionId: t.data.gameState.sessionId,
962
+ freeRounds: (e.freeRounds ?? []).map((s) => ({
963
+ conf: {
964
+ base: s.conf.baseBet,
965
+ multiplier: s.conf.betMultiplier,
966
+ numAwarded: s.conf.numAwarded
967
+ },
968
+ data: {
969
+ numPlayed: s.data.numPlayed,
970
+ win: s.data.winAmount,
971
+ numLeft: s.data.numLeft
972
+ },
973
+ id: s.id,
974
+ rejectable: s.rejectable,
975
+ skippable: s.skippable,
976
+ status: s.status,
977
+ type: s.type
978
+ })),
979
+ gameModel: e.gameModelFile,
980
+ metaData: e.metaData,
981
+ roundId: e.roundId,
982
+ serverTime: e.serverTime,
983
+ sessionId: e.sessionId,
945
984
  stateType: {
946
- thisRound: t.data.gameState.stateTypeThisRound,
947
- nextRound: t.data.gameState.stateTypeNextRound
985
+ thisRound: e.stateTypeThisRound,
986
+ nextRound: e.stateTypeNextRound
948
987
  },
949
- uiMessages: i.uiMessages,
988
+ uiMessages: i.contract.uiMessages.concat(e.uiMessages),
950
989
  win: {
951
- round: t.data.gameState.totalWinFromCurrentRound,
952
- total: t.data.gameState.totalWinFromCurrentGameCycle
990
+ round: e.roundWin,
991
+ total: e.totalWin
953
992
  }
954
993
  },
955
- data: t.data
994
+ data: t.opaqueGameServerToUi
956
995
  };
957
996
  }
958
997
  function ni(i) {
959
998
  var t, e;
960
999
  return {
961
1000
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
962
- code: ((t = i.data) == null ? void 0 : t.code) ?? Ne.UNKNOWN,
1001
+ code: ((t = i.data) == null ? void 0 : t.code) ?? De.UNKNOWN,
963
1002
  details: (e = i.data) == null ? void 0 : e.details
964
1003
  };
965
1004
  }
966
- function si(i) {
967
- return i.contract ? {
1005
+ function ai(i) {
1006
+ const t = i.contract;
1007
+ if (!t) {
1008
+ const e = i.data;
1009
+ return {
1010
+ contract: {
1011
+ bet: {
1012
+ last: e.gameState.betFromCurrentRound ? {
1013
+ base: e.gameState.betFromCurrentRound.baseBet,
1014
+ multiplier: e.gameState.betFromCurrentRound.betMultiplier
1015
+ } : null,
1016
+ lastPaid: {
1017
+ base: e.gameState.lastPlacedMainGameBet.baseBet,
1018
+ multiplier: e.gameState.lastPlacedMainGameBet.betMultiplier
1019
+ }
1020
+ },
1021
+ balance: {
1022
+ coins: i.balance,
1023
+ version: i.balanceVersion
1024
+ },
1025
+ freeRounds: (e.FREE_ROUNDS ?? []).map((s) => ({
1026
+ conf: {
1027
+ base: s.conf.baseBet,
1028
+ multiplier: s.conf.betMultiplier,
1029
+ numAwarded: s.conf.numAwarded
1030
+ },
1031
+ data: {
1032
+ numPlayed: s.data.numPlayed,
1033
+ win: s.data.winAmount,
1034
+ numLeft: s.data.numLeft
1035
+ },
1036
+ id: s.id,
1037
+ rejectable: s.rejectable,
1038
+ skippable: s.skippable,
1039
+ status: s.status,
1040
+ type: s.type
1041
+ })),
1042
+ serverTime: i.balanceVersion,
1043
+ roundId: e.gameState.cycleId,
1044
+ stateType: {
1045
+ thisRound: e.gameState.stateTypeThisRound,
1046
+ nextRound: e.gameState.stateTypeNextRound
1047
+ },
1048
+ uiMessages: e.uiMessages,
1049
+ win: {
1050
+ round: e.gameState.totalWinFromCurrentRound,
1051
+ total: e.gameState.totalWinFromCurrentGameCycle
1052
+ }
1053
+ },
1054
+ data: e
1055
+ };
1056
+ }
1057
+ return {
968
1058
  contract: {
969
1059
  bet: {
970
1060
  last: i.contract.lastBet ? {
@@ -980,6 +1070,23 @@ function si(i) {
980
1070
  coins: i.contract.balanceInCoins,
981
1071
  version: i.contract.balanceVersion
982
1072
  },
1073
+ freeRounds: (t.freeRounds ?? []).map((e) => ({
1074
+ conf: {
1075
+ base: e.conf.baseBet,
1076
+ multiplier: e.conf.betMultiplier,
1077
+ numAwarded: e.conf.numAwarded
1078
+ },
1079
+ data: {
1080
+ numPlayed: e.data.numPlayed,
1081
+ win: e.data.winAmount,
1082
+ numLeft: e.data.numLeft
1083
+ },
1084
+ id: e.id,
1085
+ rejectable: e.rejectable,
1086
+ skippable: e.skippable,
1087
+ status: e.status,
1088
+ type: e.type
1089
+ })),
983
1090
  serverTime: i.contract.serverTime,
984
1091
  roundId: i.contract.roundId,
985
1092
  stateType: {
@@ -993,42 +1100,13 @@ function si(i) {
993
1100
  }
994
1101
  },
995
1102
  data: i.opaqueGameServerToUi
996
- } : {
997
- contract: {
998
- bet: {
999
- last: i.data.gameState.betFromCurrentRound ? {
1000
- base: i.data.gameState.betFromCurrentRound.baseBet,
1001
- multiplier: i.data.gameState.betFromCurrentRound.betMultiplier
1002
- } : null,
1003
- lastPaid: {
1004
- base: i.data.gameState.lastPlacedMainGameBet.baseBet,
1005
- multiplier: i.data.gameState.lastPlacedMainGameBet.betMultiplier
1006
- }
1007
- },
1008
- balance: {
1009
- coins: i.balance,
1010
- version: i.balanceVersion
1011
- },
1012
- serverTime: i.balanceVersion,
1013
- roundId: i.data.gameState.cycleId,
1014
- stateType: {
1015
- thisRound: i.data.gameState.stateTypeThisRound,
1016
- nextRound: i.data.gameState.stateTypeNextRound
1017
- },
1018
- uiMessages: i.data.uiMessages,
1019
- win: {
1020
- round: i.data.gameState.totalWinFromCurrentRound,
1021
- total: i.data.gameState.totalWinFromCurrentGameCycle
1022
- }
1023
- },
1024
- data: i.data
1025
1103
  };
1026
1104
  }
1027
1105
  function oi(i) {
1028
1106
  var t, e;
1029
1107
  return {
1030
1108
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
1031
- code: ((t = i.data) == null ? void 0 : t.code) ?? Ne.UNKNOWN,
1109
+ code: ((t = i.data) == null ? void 0 : t.code) ?? De.UNKNOWN,
1032
1110
  details: (e = i.data) == null ? void 0 : e.details
1033
1111
  };
1034
1112
  }
@@ -1065,52 +1143,58 @@ const ri = {
1065
1143
  ukr: "uk",
1066
1144
  vie: "vi"
1067
1145
  }, ci = U("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
1068
- class zi extends Xt {
1146
+ class Vi extends Xt {
1069
1147
  constructor(...e) {
1070
1148
  super(...e);
1071
1149
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1072
1150
  // @ts-ignore
1073
- b(this, "socket");
1151
+ p(this, "socket");
1074
1152
  this.on("openGame", async () => {
1075
1153
  try {
1076
- const a = await this.openGame();
1077
- this.send("openGameResponse", a);
1078
- } catch (a) {
1079
- this.send("openGameError", a);
1154
+ const s = await this.openGame();
1155
+ this.send("openGameResponse", s);
1156
+ } catch (s) {
1157
+ this.send("openGameError", s);
1080
1158
  }
1081
- }), this.on("play", async (a) => {
1159
+ }), this.on("play", async (s) => {
1082
1160
  try {
1083
- const n = await this.play(a);
1161
+ const n = await this.play(s);
1084
1162
  this.send("playResponse", n);
1085
1163
  } catch (n) {
1086
1164
  this.send("playError", n);
1087
1165
  }
1088
- }), this.on("configured", (a) => {
1089
- this.socket.setRequestTimeoutMs(a.ui.requestTimeoutMs);
1166
+ }), this.on("freeRounds", async (s) => {
1167
+ try {
1168
+ await this.socket.freeRounds(s), this.send("freeRoundsResponse", s);
1169
+ } catch (n) {
1170
+ this.send("freeRoundsError", n);
1171
+ }
1172
+ }), this.on("configured", (s) => {
1173
+ this.socket.setRequestTimeoutMs(s.ui.requestTimeoutMs);
1090
1174
  }), this.registerFromSdkEvents();
1091
1175
  }
1092
1176
  initialize(e) {
1093
1177
  this.socket = new ei(e, {
1094
1178
  gameVersion: this.config.gameVersion,
1095
1179
  requestTimeoutMs: this.sdkConfig.ui.requestTimeoutMs
1096
- }), this.socket.addEventListener("close", (a) => {
1097
- a.code === 1006 && this.reconnect(e);
1180
+ }), this.socket.addEventListener("close", (s) => {
1181
+ s.code === 1006 && this.reconnect(e);
1098
1182
  }), document.addEventListener("visibilitychange", () => {
1099
1183
  document.visibilityState === "visible" && this.socket.socket && this.socket.socket.readyState !== WebSocket.OPEN && this.reconnect(e);
1100
- }), this.socket.addEventListener("error", (a) => ci("error", a)), this.socket.addEventListener("realityCheck", (a) => {
1101
- this.send("realityCheck", a);
1184
+ }), this.socket.addEventListener("error", (s) => ci("error", s)), this.socket.addEventListener("realityCheck", (s) => {
1185
+ this.send("realityCheck", s);
1102
1186
  });
1103
1187
  }
1104
1188
  async reconnect(e) {
1105
1189
  this.initialize(e), await this.socket.connect(), await this.socket.authenticate(!0), await this.socket.openGame();
1106
1190
  }
1107
1191
  async openGame() {
1108
- const e = new URLSearchParams(window.location.search), a = e.get("apiUrl"), n = e.get("cageCode"), r = e.get("gameCode"), s = e.get("operatorCode"), h = e.get("playMode"), g = e.get("token"), w = e.get("username"), p = e.get("gameHistoryUrl"), A = e.get("homeUrl") ?? void 0, R = e.get("cashierUrl") ?? void 0;
1109
- this.initialize({ apiUrl: a, cageCode: n, gameCode: r, operatorCode: s, playMode: h, token: g, username: w });
1192
+ const e = new URLSearchParams(window.location.search), s = e.get("apiUrl"), n = e.get("cageCode"), o = e.get("gameCode"), a = e.get("operatorCode"), h = e.get("playMode"), g = e.get("token"), w = e.get("username"), m = e.get("gameHistoryUrl"), C = e.get("homeUrl") ?? void 0, N = e.get("cashierUrl") ?? void 0;
1193
+ this.initialize({ apiUrl: s, cageCode: n, gameCode: o, operatorCode: a, playMode: h, token: g, username: w });
1110
1194
  try {
1111
1195
  await this.socket.connect();
1112
1196
  } catch {
1113
- throw { type: "error", data: { code: Ne.CONNECTION_ERROR } };
1197
+ throw { type: "error", data: { code: De.CONNECTION_ERROR } };
1114
1198
  }
1115
1199
  let Q;
1116
1200
  try {
@@ -1124,11 +1208,11 @@ class zi extends Xt {
1124
1208
  } catch (B) {
1125
1209
  throw { type: B.type, data: B.type === "error" ? ni(B.data) : void 0 };
1126
1210
  }
1127
- const L = ti(Q), he = ai(Q, X);
1211
+ const L = ti(Q), he = si(Q, X);
1128
1212
  this.sdkConfig.api = {
1129
1213
  brand: n,
1130
- game: r,
1131
- integration: s,
1214
+ game: o,
1215
+ integration: a,
1132
1216
  jurisdiction: L.contract.jurisdiction,
1133
1217
  playMode: h,
1134
1218
  user: L.contract.username,
@@ -1138,9 +1222,9 @@ class zi extends Xt {
1138
1222
  country: L.contract.country,
1139
1223
  currency: L.contract.currency,
1140
1224
  coinValueInCents: L.contract.coinValueInCents,
1141
- gameHistoryUrl: p,
1142
- homeUrl: A,
1143
- cashierUrl: R,
1225
+ gameHistoryUrl: m,
1226
+ homeUrl: C,
1227
+ cashierUrl: N,
1144
1228
  sessionId: he.contract.sessionId,
1145
1229
  lastRoundId: he.contract.roundId
1146
1230
  };
@@ -1149,51 +1233,53 @@ class zi extends Xt {
1149
1233
  }
1150
1234
  async play(e) {
1151
1235
  const {
1152
- contract: { bet: a, forcedOutcomes: n, ...r },
1153
- extra: s,
1154
- actionType: h
1155
- } = e, g = {
1156
- bet: a ? { baseBet: a.base, betMultiplier: a.multiplier } : void 0,
1236
+ contract: { bet: s, forcedOutcomes: n, ...o },
1237
+ extra: a,
1238
+ payloadToInject: h,
1239
+ actionType: g
1240
+ } = e, w = {
1241
+ bet: s ? { baseBet: s.base, betMultiplier: s.multiplier } : void 0,
1157
1242
  forcedOutcomes: n,
1158
1243
  // TODO: get rid of contractRest - it' a legacy from old RGS
1159
- ...r,
1160
- opaqueUiToGameServer: s
1244
+ ...o,
1245
+ ...h,
1246
+ opaqueUiToGameServer: a
1161
1247
  };
1162
- let w;
1248
+ let m;
1163
1249
  try {
1164
- w = await this.socket.sendAction(h, g);
1165
- } catch (p) {
1166
- throw { type: p.type, data: p.type === "error" ? oi(p.data) : void 0 };
1250
+ m = await this.socket.sendAction(g, w);
1251
+ } catch (C) {
1252
+ throw { type: C.type, data: C.type === "error" ? oi(C.data) : void 0 };
1167
1253
  }
1168
- return si(w);
1254
+ return ai(m);
1169
1255
  }
1170
1256
  registerFromSdkEvents() {
1171
1257
  this.on("history", () => {
1172
1258
  const {
1173
- api: { game: e, integration: a, integrationData: n, jurisdiction: r, user: s, gameHistoryUrl: h },
1259
+ api: { game: e, integration: s, integrationData: n, jurisdiction: o, user: a, gameHistoryUrl: h },
1174
1260
  ui: { language: g }
1175
- } = this.sdkConfig, w = s.replace(/^user_/, "").replace(new RegExp(`_${a}$`), ""), p = new URL(h);
1176
- p.searchParams.set("gameCode", e), p.searchParams.set("jurisdiction", r), p.searchParams.set("operatorCode", a), p.searchParams.set("token", n.token), p.searchParams.set("username", w), p.searchParams.set("languageCode", g), window.open(p.toString(), "_blank");
1261
+ } = this.sdkConfig, w = a.replace(/^user_/, "").replace(new RegExp(`_${s}$`), ""), m = new URL(h);
1262
+ m.searchParams.set("gameCode", e), m.searchParams.set("jurisdiction", o), m.searchParams.set("operatorCode", s), m.searchParams.set("token", n.token), m.searchParams.set("username", w), m.searchParams.set("languageCode", g), window.open(m.toString(), "_blank");
1177
1263
  });
1178
1264
  }
1179
1265
  }
1180
- var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le = "object", Ze = "string", fe = "major", d = "model", o = "name", l = "type", u = "vendor", c = "version", M = "architecture", Z = "console", m = "mobile", f = "tablet", I = "smarttv", Y = "wearable", et = "embedded", gt = "user-agent", tt = 500, nt = "brands", W = "formFactor", st = "fullVersionList", ee = "platform", ot = "platformVersion", Re = "bitness", G = "sec-ch-ua", li = G + "-full-version-list", ui = G + "-arch", hi = G + "-" + Re, gi = G + "-form-factor", wi = G + "-" + m, bi = G + "-" + d, Ft = G + "-" + ee, pi = Ft + "-version", Dt = [nt, st, m, d, ee, ot, M, W, Re], T = "browser", _ = "cpu", O = "device", F = "engine", P = "os", te = "result", Se = "Amazon", we = "Apple", wt = "ASUS", bt = "BlackBerry", Ie = "Google", pt = "Huawei", mt = "Lenovo", $e = "LG", Ue = "Microsoft", ft = "Motorola", Te = "Samsung", yt = "Sharp", Ae = "Sony", je = "Xiaomi", Qe = "Zebra", K = "Mobile ", J = " Browser", Pe = "Chrome", mi = "Edge", be = "Firefox", pe = "Opera", vt = "Facebook", kt = "Sogou", it = "Windows", fi = typeof window !== z, S = fi && window.navigator ? window.navigator : void 0, H = S && S.userAgentData ? S.userAgentData : void 0, yi = function(i, t) {
1266
+ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", V = "undefined", le = "object", Ze = "string", fe = "major", d = "model", r = "name", l = "type", u = "vendor", c = "version", S = "architecture", Z = "console", b = "mobile", f = "tablet", T = "smarttv", Y = "wearable", et = "embedded", gt = "user-agent", tt = 500, nt = "brands", W = "formFactor", at = "fullVersionList", ee = "platform", ot = "platformVersion", Ne = "bitness", q = "sec-ch-ua", li = q + "-full-version-list", ui = q + "-arch", hi = q + "-" + Ne, gi = q + "-form-factor", pi = q + "-" + b, wi = q + "-" + d, Ft = q + "-" + ee, mi = Ft + "-version", Rt = [nt, at, b, d, ee, ot, S, W, Ne], A = "browser", _ = "cpu", O = "device", F = "engine", P = "os", te = "result", Se = "Amazon", pe = "Apple", pt = "ASUS", wt = "BlackBerry", Ie = "Google", mt = "Huawei", bt = "Lenovo", je = "LG", Ue = "Microsoft", ft = "Motorola", Te = "Samsung", yt = "Sharp", Ae = "Sony", $e = "Xiaomi", Qe = "Zebra", K = "Mobile ", J = " Browser", Pe = "Chrome", bi = "Edge", we = "Firefox", me = "Opera", kt = "Facebook", vt = "Sogou", it = "Windows", fi = typeof window !== V, I = fi && window.navigator ? window.navigator : void 0, G = I && I.userAgentData ? I.userAgentData : void 0, yi = function(i, t) {
1181
1267
  var e = {};
1182
- for (var a in i)
1183
- e[a] = t[a] && t[a].length % 2 === 0 ? t[a].concat(i[a]) : i[a];
1268
+ for (var s in i)
1269
+ e[s] = t[s] && t[s].length % 2 === 0 ? t[s].concat(i[s]) : i[s];
1184
1270
  return e;
1185
- }, He = function(i) {
1271
+ }, Ge = function(i) {
1186
1272
  for (var t = {}, e = 0; e < i.length; e++)
1187
1273
  t[i[e].toUpperCase()] = i[e];
1188
1274
  return t;
1189
- }, at = function(i, t) {
1275
+ }, st = function(i, t) {
1190
1276
  if (typeof i === le && i.length > 0) {
1191
1277
  for (var e in i)
1192
- if (q(i[e]) == q(t))
1278
+ if (z(i[e]) == z(t))
1193
1279
  return !0;
1194
1280
  return !1;
1195
1281
  }
1196
- return ue(i) ? q(t).indexOf(q(i)) !== -1 : !1;
1282
+ return ue(i) ? z(t).indexOf(z(i)) !== -1 : !1;
1197
1283
  }, Et = function(i) {
1198
1284
  for (var t in i)
1199
1285
  return /^(browser|cpu|device|engine|os)$/.test(t);
@@ -1201,48 +1287,48 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1201
1287
  return typeof i === Ze;
1202
1288
  }, Xe = function(i) {
1203
1289
  if (i) {
1204
- for (var t = [], e = $(/\\?\"/g, i).split(","), a = 0; a < e.length; a++)
1205
- if (e[a].indexOf(";") > -1) {
1206
- var n = ye(e[a]).split(";v=");
1207
- t[a] = { brand: n[0], version: n[1] };
1290
+ for (var t = [], e = j(/\\?\"/g, i).split(","), s = 0; s < e.length; s++)
1291
+ if (e[s].indexOf(";") > -1) {
1292
+ var n = ye(e[s]).split(";v=");
1293
+ t[s] = { brand: n[0], version: n[1] };
1208
1294
  } else
1209
- t[a] = ye(e[a]);
1295
+ t[s] = ye(e[s]);
1210
1296
  return t;
1211
1297
  }
1212
- }, q = function(i) {
1298
+ }, z = function(i) {
1213
1299
  return ue(i) ? i.toLowerCase() : i;
1214
1300
  }, Ke = function(i) {
1215
- return ue(i) ? $(/[^\d\.]/g, i).split(".")[0] : void 0;
1216
- }, D = function(i) {
1301
+ return ue(i) ? j(/[^\d\.]/g, i).split(".")[0] : void 0;
1302
+ }, R = function(i) {
1217
1303
  for (var t in i) {
1218
1304
  var e = i[t];
1219
1305
  typeof e == le && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
1220
1306
  }
1221
1307
  return this;
1222
- }, $ = function(i, t) {
1308
+ }, j = function(i, t) {
1223
1309
  return ue(t) ? t.replace(i, de) : t;
1224
- }, me = function(i) {
1225
- return $(/\\?\"/g, i);
1310
+ }, be = function(i) {
1311
+ return j(/\\?\"/g, i);
1226
1312
  }, ye = function(i, t) {
1227
1313
  if (ue(i))
1228
- return i = $(/^\s\s*/, i), typeof t === z ? i : i.substring(0, tt);
1314
+ return i = j(/^\s\s*/, i), typeof t === V ? i : i.substring(0, tt);
1229
1315
  }, Ct = function(i, t) {
1230
1316
  if (!(!i || !t))
1231
- for (var e = 0, a, n, r, s, h, g; e < t.length && !h; ) {
1232
- var w = t[e], p = t[e + 1];
1233
- for (a = n = 0; a < w.length && !h && w[a]; )
1234
- if (h = w[a++].exec(i), h)
1235
- for (r = 0; r < p.length; r++)
1236
- g = h[++n], s = p[r], typeof s === le && s.length > 0 ? s.length === 2 ? typeof s[1] == Ye ? this[s[0]] = s[1].call(this, g) : this[s[0]] = s[1] : s.length === 3 ? typeof s[1] === Ye && !(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;
1317
+ for (var e = 0, s, n, o, a, h, g; e < t.length && !h; ) {
1318
+ var w = t[e], m = t[e + 1];
1319
+ for (s = n = 0; s < w.length && !h && w[s]; )
1320
+ if (h = w[s++].exec(i), h)
1321
+ for (o = 0; o < m.length; o++)
1322
+ g = h[++n], a = m[o], typeof a === le && a.length > 0 ? a.length === 2 ? typeof a[1] == Ye ? this[a[0]] = a[1].call(this, g) : this[a[0]] = a[1] : a.length === 3 ? typeof a[1] === Ye && !(a[1].exec && a[1].test) ? this[a[0]] = g ? a[1].call(this, g, a[2]) : void 0 : this[a[0]] = g ? g.replace(a[1], a[2]) : void 0 : a.length === 4 && (this[a[0]] = g ? a[3].call(this, g.replace(a[1], a[2])) : void 0) : this[a] = g || void 0;
1237
1323
  e += 2;
1238
1324
  }
1239
1325
  }, Be = function(i, t) {
1240
1326
  for (var e in t)
1241
1327
  if (typeof t[e] === le && t[e].length > 0) {
1242
- for (var a = 0; a < t[e].length; a++)
1243
- if (at(t[e][a], i))
1328
+ for (var s = 0; s < t[e].length; s++)
1329
+ if (st(t[e][s], i))
1244
1330
  return e === ht ? void 0 : e;
1245
- } else if (at(t[e], i))
1331
+ } else if (st(t[e], i))
1246
1332
  return e === ht ? void 0 : e;
1247
1333
  return t.hasOwnProperty("*") ? t["*"] : i;
1248
1334
  }, Mt = {
@@ -1272,12 +1358,12 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1272
1358
  /\b(?:crmo|crios)\/([\w\.]+)/i
1273
1359
  // Chrome for Android/iOS
1274
1360
  ],
1275
- [c, [o, K + "Chrome"]],
1361
+ [c, [r, K + "Chrome"]],
1276
1362
  [
1277
1363
  /edg(?:e|ios|a)?\/([\w\.]+)/i
1278
1364
  // Microsoft Edge
1279
1365
  ],
1280
- [c, [o, "Edge"]],
1366
+ [c, [r, "Edge"]],
1281
1367
  [
1282
1368
  // Presto based
1283
1369
  /(opera mini)\/([-\w\.]+)/i,
@@ -1287,28 +1373,28 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1287
1373
  /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
1288
1374
  // Opera
1289
1375
  ],
1290
- [o, c],
1376
+ [r, c],
1291
1377
  [
1292
1378
  /opios[\/ ]+([\w\.]+)/i
1293
1379
  // Opera mini on iphone >= 8.0
1294
1380
  ],
1295
- [c, [o, pe + " Mini"]],
1381
+ [c, [r, me + " Mini"]],
1296
1382
  [
1297
1383
  /\bop(?:rg)?x\/([\w\.]+)/i
1298
1384
  // Opera GX
1299
1385
  ],
1300
- [c, [o, pe + " GX"]],
1386
+ [c, [r, me + " GX"]],
1301
1387
  [
1302
1388
  /\bopr\/([\w\.]+)/i
1303
1389
  // Opera Webkit
1304
1390
  ],
1305
- [c, [o, pe]],
1391
+ [c, [r, me]],
1306
1392
  [
1307
1393
  // Mixed
1308
1394
  /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
1309
1395
  // Baidu
1310
1396
  ],
1311
- [c, [o, "Baidu"]],
1397
+ [c, [r, "Baidu"]],
1312
1398
  [
1313
1399
  /(kindle)\/([\w\.]+)/i,
1314
1400
  // Kindle
@@ -1327,12 +1413,12 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1327
1413
  /(weibo)__([\d\.]+)/i
1328
1414
  // Weibo
1329
1415
  ],
1330
- [o, c],
1416
+ [r, c],
1331
1417
  [
1332
1418
  /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
1333
1419
  // UCBrowser
1334
1420
  ],
1335
- [c, [o, "UCBrowser"]],
1421
+ [c, [r, "UCBrowser"]],
1336
1422
  [
1337
1423
  /microm.+\bqbcore\/([\w\.]+)/i,
1338
1424
  // WeChat Desktop for Windows Built-in Browser
@@ -1340,97 +1426,97 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1340
1426
  /micromessenger\/([\w\.]+)/i
1341
1427
  // WeChat
1342
1428
  ],
1343
- [c, [o, "WeChat"]],
1429
+ [c, [r, "WeChat"]],
1344
1430
  [
1345
1431
  /konqueror\/([\w\.]+)/i
1346
1432
  // Konqueror
1347
1433
  ],
1348
- [c, [o, "Konqueror"]],
1434
+ [c, [r, "Konqueror"]],
1349
1435
  [
1350
1436
  /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
1351
1437
  // IE11
1352
1438
  ],
1353
- [c, [o, "IE"]],
1439
+ [c, [r, "IE"]],
1354
1440
  [
1355
1441
  /ya(?:search)?browser\/([\w\.]+)/i
1356
1442
  // Yandex
1357
1443
  ],
1358
- [c, [o, "Yandex"]],
1444
+ [c, [r, "Yandex"]],
1359
1445
  [
1360
1446
  /slbrowser\/([\w\.]+)/i
1361
1447
  // Smart Lenovo Browser
1362
1448
  ],
1363
- [c, [o, "Smart " + mt + J]],
1449
+ [c, [r, "Smart " + bt + J]],
1364
1450
  [
1365
1451
  /(avast|avg)\/([\w\.]+)/i
1366
1452
  // Avast/AVG Secure Browser
1367
1453
  ],
1368
- [[o, /(.+)/, "$1 Secure" + J], c],
1454
+ [[r, /(.+)/, "$1 Secure" + J], c],
1369
1455
  [
1370
1456
  /\bfocus\/([\w\.]+)/i
1371
1457
  // Firefox Focus
1372
1458
  ],
1373
- [c, [o, be + " Focus"]],
1459
+ [c, [r, we + " Focus"]],
1374
1460
  [
1375
1461
  /\bopt\/([\w\.]+)/i
1376
1462
  // Opera Touch
1377
1463
  ],
1378
- [c, [o, pe + " Touch"]],
1464
+ [c, [r, me + " Touch"]],
1379
1465
  [
1380
1466
  /coc_coc\w+\/([\w\.]+)/i
1381
1467
  // Coc Coc Browser
1382
1468
  ],
1383
- [c, [o, "Coc Coc"]],
1469
+ [c, [r, "Coc Coc"]],
1384
1470
  [
1385
1471
  /dolfin\/([\w\.]+)/i
1386
1472
  // Dolphin
1387
1473
  ],
1388
- [c, [o, "Dolphin"]],
1474
+ [c, [r, "Dolphin"]],
1389
1475
  [
1390
1476
  /coast\/([\w\.]+)/i
1391
1477
  // Opera Coast
1392
1478
  ],
1393
- [c, [o, pe + " Coast"]],
1479
+ [c, [r, me + " Coast"]],
1394
1480
  [
1395
1481
  /miuibrowser\/([\w\.]+)/i
1396
1482
  // MIUI Browser
1397
1483
  ],
1398
- [c, [o, "MIUI" + J]],
1484
+ [c, [r, "MIUI" + J]],
1399
1485
  [
1400
1486
  /fxios\/([\w\.-]+)/i
1401
1487
  // Firefox for iOS
1402
1488
  ],
1403
- [c, [o, K + be]],
1489
+ [c, [r, K + we]],
1404
1490
  [
1405
1491
  /\bqihu|(qi?ho?o?|360)browser/i
1406
1492
  // 360
1407
1493
  ],
1408
- [[o, "360" + J]],
1494
+ [[r, "360" + J]],
1409
1495
  [
1410
1496
  /(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
1411
1497
  ],
1412
- [[o, /(.+)/, "$1" + J], c],
1498
+ [[r, /(.+)/, "$1" + J], c],
1413
1499
  [
1414
1500
  // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
1415
1501
  /samsungbrowser\/([\w\.]+)/i
1416
1502
  // Samsung Internet
1417
1503
  ],
1418
- [c, [o, Te + " Internet"]],
1504
+ [c, [r, Te + " Internet"]],
1419
1505
  [
1420
1506
  /(comodo_dragon)\/([\w\.]+)/i
1421
1507
  // Comodo Dragon
1422
1508
  ],
1423
- [[o, /_/g, " "], c],
1509
+ [[r, /_/g, " "], c],
1424
1510
  [
1425
1511
  /metasr[\/ ]?([\d\.]+)/i
1426
1512
  // Sogou Explorer
1427
1513
  ],
1428
- [c, [o, kt + " Explorer"]],
1514
+ [c, [r, vt + " Explorer"]],
1429
1515
  [
1430
1516
  /(sogou)mo\w+\/([\d\.]+)/i
1431
1517
  // Sogou Mobile
1432
1518
  ],
1433
- [[o, kt + " Mobile"], c],
1519
+ [[r, vt + " Mobile"], c],
1434
1520
  [
1435
1521
  /(electron)\/([\w\.]+) safari/i,
1436
1522
  // Electron-based App
@@ -1439,20 +1525,20 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1439
1525
  /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
1440
1526
  // QQBrowser/2345 Browser
1441
1527
  ],
1442
- [o, c],
1528
+ [r, c],
1443
1529
  [
1444
1530
  /(lbbrowser)/i,
1445
1531
  // LieBao Browser
1446
1532
  /\[(linkedin)app\]/i
1447
1533
  // LinkedIn App for iOS & Android
1448
1534
  ],
1449
- [o],
1535
+ [r],
1450
1536
  [
1451
1537
  // WebView
1452
1538
  /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
1453
1539
  // Facebook App for iOS & Android
1454
1540
  ],
1455
- [[o, vt], c],
1541
+ [[r, kt], c],
1456
1542
  [
1457
1543
  /(Klarna)\/([\w\.]+)/i,
1458
1544
  // Klarna Shopping Browser for iOS & Android
@@ -1469,81 +1555,81 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1469
1555
  /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
1470
1556
  // Chromium/Instagram/Snapchat
1471
1557
  ],
1472
- [o, c],
1558
+ [r, c],
1473
1559
  [
1474
1560
  /\bgsa\/([\w\.]+) .*safari\//i
1475
1561
  // Google Search Appliance on iOS
1476
1562
  ],
1477
- [c, [o, "GSA"]],
1563
+ [c, [r, "GSA"]],
1478
1564
  [
1479
1565
  /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
1480
1566
  // TikTok
1481
1567
  ],
1482
- [c, [o, "TikTok"]],
1568
+ [c, [r, "TikTok"]],
1483
1569
  [
1484
1570
  /headlesschrome(?:\/([\w\.]+)| )/i
1485
1571
  // Chrome Headless
1486
1572
  ],
1487
- [c, [o, Pe + " Headless"]],
1573
+ [c, [r, Pe + " Headless"]],
1488
1574
  [
1489
1575
  / wv\).+(chrome)\/([\w\.]+)/i
1490
1576
  // Chrome WebView
1491
1577
  ],
1492
- [[o, Pe + " WebView"], c],
1578
+ [[r, Pe + " WebView"], c],
1493
1579
  [
1494
1580
  /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
1495
1581
  // Android Browser
1496
1582
  ],
1497
- [c, [o, "Android" + J]],
1583
+ [c, [r, "Android" + J]],
1498
1584
  [
1499
1585
  /chrome\/([\w\.]+) mobile/i
1500
1586
  // Chrome Mobile
1501
1587
  ],
1502
- [c, [o, K + "Chrome"]],
1588
+ [c, [r, K + "Chrome"]],
1503
1589
  [
1504
1590
  /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
1505
1591
  // Chrome/OmniWeb/Arora/Tizen/Nokia
1506
1592
  ],
1507
- [o, c],
1593
+ [r, c],
1508
1594
  [
1509
1595
  /version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
1510
1596
  // Safari Mobile
1511
1597
  ],
1512
- [c, [o, K + "Safari"]],
1598
+ [c, [r, K + "Safari"]],
1513
1599
  [
1514
1600
  /iphone .*mobile(?:\/\w+ | ?)safari/i
1515
1601
  ],
1516
- [[o, K + "Safari"]],
1602
+ [[r, K + "Safari"]],
1517
1603
  [
1518
1604
  /version\/([\w\.\,]+) .*(safari)/i
1519
1605
  // Safari
1520
1606
  ],
1521
- [c, o],
1607
+ [c, r],
1522
1608
  [
1523
1609
  /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
1524
1610
  // Safari < 3.0
1525
1611
  ],
1526
- [o, [c, "1"]],
1612
+ [r, [c, "1"]],
1527
1613
  [
1528
1614
  /(webkit|khtml)\/([\w\.]+)/i
1529
1615
  ],
1530
- [o, c],
1616
+ [r, c],
1531
1617
  [
1532
1618
  // Gecko based
1533
1619
  /(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
1534
1620
  // Firefox Mobile
1535
1621
  ],
1536
- [[o, K + be], c],
1622
+ [[r, K + we], c],
1537
1623
  [
1538
1624
  /(navigator|netscape\d?)\/([-\w\.]+)/i
1539
1625
  // Netscape
1540
1626
  ],
1541
- [[o, "Netscape"], c],
1627
+ [[r, "Netscape"], c],
1542
1628
  [
1543
1629
  /mobile vr; rv:([\w\.]+)\).+firefox/i
1544
1630
  // Firefox Reality
1545
1631
  ],
1546
- [c, [o, be + " Reality"]],
1632
+ [c, [r, we + " Reality"]],
1547
1633
  [
1548
1634
  /ekiohf.+(flow)\/([\w\.]+)/i,
1549
1635
  // Flow
@@ -1565,56 +1651,56 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1565
1651
  /panasonic;(viera)/i
1566
1652
  // Panasonic Viera
1567
1653
  ],
1568
- [o, c],
1654
+ [r, c],
1569
1655
  [
1570
1656
  /(cobalt)\/([\w\.]+)/i
1571
1657
  // Cobalt
1572
1658
  ],
1573
- [o, [c, /[^\d\.]+./, de]]
1659
+ [r, [c, /[^\d\.]+./, de]]
1574
1660
  ],
1575
1661
  cpu: [
1576
1662
  [
1577
1663
  /\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i
1578
1664
  // AMD64 (x64)
1579
1665
  ],
1580
- [[M, "amd64"]],
1666
+ [[S, "amd64"]],
1581
1667
  [
1582
1668
  /(ia32(?=;))/i,
1583
1669
  // IA32 (quicktime)
1584
1670
  /((?:i[346]|x)86)[;\)]/i
1585
1671
  // IA32 (x86)
1586
1672
  ],
1587
- [[M, "ia32"]],
1673
+ [[S, "ia32"]],
1588
1674
  [
1589
1675
  /\b(aarch64|arm(v?8e?l?|_?64))\b/i
1590
1676
  // ARM64
1591
1677
  ],
1592
- [[M, "arm64"]],
1678
+ [[S, "arm64"]],
1593
1679
  [
1594
1680
  /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
1595
1681
  // ARMHF
1596
1682
  ],
1597
- [[M, "armhf"]],
1683
+ [[S, "armhf"]],
1598
1684
  [
1599
1685
  // PocketPC mistakenly identified as PowerPC
1600
1686
  /windows (ce|mobile); ppc;/i
1601
1687
  ],
1602
- [[M, "arm"]],
1688
+ [[S, "arm"]],
1603
1689
  [
1604
1690
  /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
1605
1691
  // PowerPC
1606
1692
  ],
1607
- [[M, /ower/, de, q]],
1693
+ [[S, /ower/, de, z]],
1608
1694
  [
1609
1695
  /(sun4\w)[;\)]/i
1610
1696
  // SPARC
1611
1697
  ],
1612
- [[M, "sparc"]],
1698
+ [[S, "sparc"]],
1613
1699
  [
1614
1700
  /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
1615
1701
  // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
1616
1702
  ],
1617
- [[M, q]]
1703
+ [[S, z]]
1618
1704
  ],
1619
1705
  device: [
1620
1706
  [
@@ -1630,39 +1716,39 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1630
1716
  /samsung[- ]([-\w]+)/i,
1631
1717
  /sec-(sgh\w+)/i
1632
1718
  ],
1633
- [d, [u, Te], [l, m]],
1719
+ [d, [u, Te], [l, b]],
1634
1720
  [
1635
1721
  // Apple
1636
1722
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
1637
1723
  // iPod/iPhone
1638
1724
  ],
1639
- [d, [u, we], [l, m]],
1725
+ [d, [u, pe], [l, b]],
1640
1726
  [
1641
1727
  /\((ipad);[-\w\),; ]+apple/i,
1642
1728
  // iPad
1643
1729
  /applecoremedia\/[\w\.]+ \((ipad)/i,
1644
1730
  /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
1645
1731
  ],
1646
- [d, [u, we], [l, f]],
1732
+ [d, [u, pe], [l, f]],
1647
1733
  [
1648
1734
  /(macintosh);/i
1649
1735
  ],
1650
- [d, [u, we]],
1736
+ [d, [u, pe]],
1651
1737
  [
1652
1738
  // Sharp
1653
1739
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
1654
1740
  ],
1655
- [d, [u, yt], [l, m]],
1741
+ [d, [u, yt], [l, b]],
1656
1742
  [
1657
1743
  // Huawei
1658
1744
  /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
1659
1745
  ],
1660
- [d, [u, pt], [l, f]],
1746
+ [d, [u, mt], [l, f]],
1661
1747
  [
1662
1748
  /(?:huawei|honor)([-\w ]+)[;\)]/i,
1663
1749
  /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
1664
1750
  ],
1665
- [d, [u, pt], [l, m]],
1751
+ [d, [u, mt], [l, b]],
1666
1752
  [
1667
1753
  // Xiaomi
1668
1754
  /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
@@ -1678,38 +1764,38 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1678
1764
  /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
1679
1765
  // Xiaomi Mi
1680
1766
  ],
1681
- [[d, /_/g, " "], [u, je], [l, m]],
1767
+ [[d, /_/g, " "], [u, $e], [l, b]],
1682
1768
  [
1683
1769
  /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
1684
1770
  // Redmi Pad
1685
1771
  /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
1686
1772
  // Mi Pad tablets
1687
1773
  ],
1688
- [[d, /_/g, " "], [u, je], [l, f]],
1774
+ [[d, /_/g, " "], [u, $e], [l, f]],
1689
1775
  [
1690
1776
  // OPPO
1691
1777
  /; (\w+) bui.+ oppo/i,
1692
1778
  /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
1693
1779
  ],
1694
- [d, [u, "OPPO"], [l, m]],
1780
+ [d, [u, "OPPO"], [l, b]],
1695
1781
  [
1696
1782
  // Vivo
1697
1783
  /vivo (\w+)(?: bui|\))/i,
1698
1784
  /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
1699
1785
  ],
1700
- [d, [u, "Vivo"], [l, m]],
1786
+ [d, [u, "Vivo"], [l, b]],
1701
1787
  [
1702
1788
  // Realme
1703
1789
  /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
1704
1790
  ],
1705
- [d, [u, "Realme"], [l, m]],
1791
+ [d, [u, "Realme"], [l, b]],
1706
1792
  [
1707
1793
  // Motorola
1708
1794
  /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
1709
1795
  /\bmot(?:orola)?[- ](\w*)/i,
1710
1796
  /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
1711
1797
  ],
1712
- [d, [u, ft], [l, m]],
1798
+ [d, [u, ft], [l, b]],
1713
1799
  [
1714
1800
  /\b(mz60\d|xoom[2 ]{0,2}) build\//i
1715
1801
  ],
@@ -1718,25 +1804,25 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1718
1804
  // LG
1719
1805
  /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
1720
1806
  ],
1721
- [d, [u, $e], [l, f]],
1807
+ [d, [u, je], [l, f]],
1722
1808
  [
1723
1809
  /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
1724
1810
  /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
1725
1811
  /\blg-?([\d\w]+) bui/i
1726
1812
  ],
1727
- [d, [u, $e], [l, m]],
1813
+ [d, [u, je], [l, b]],
1728
1814
  [
1729
1815
  // Lenovo
1730
1816
  /(ideatab[-\w ]+)/i,
1731
1817
  /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
1732
1818
  ],
1733
- [d, [u, mt], [l, f]],
1819
+ [d, [u, bt], [l, f]],
1734
1820
  [
1735
1821
  // Nokia
1736
1822
  /(?:maemo|nokia).*(n900|lumia \d+)/i,
1737
1823
  /nokia[-_ ]?([-\w\.]*)/i
1738
1824
  ],
1739
- [[d, /_/g, " "], [u, "Nokia"], [l, m]],
1825
+ [[d, /_/g, " "], [u, "Nokia"], [l, b]],
1740
1826
  [
1741
1827
  // Google
1742
1828
  /(pixel c)\b/i
@@ -1747,12 +1833,12 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1747
1833
  /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
1748
1834
  // Google Pixel
1749
1835
  ],
1750
- [d, [u, Ie], [l, m]],
1836
+ [d, [u, Ie], [l, b]],
1751
1837
  [
1752
1838
  // Sony
1753
1839
  /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
1754
1840
  ],
1755
- [d, [u, Ae], [l, m]],
1841
+ [d, [u, Ae], [l, b]],
1756
1842
  [
1757
1843
  /sony tablet [ps]/i,
1758
1844
  /\b(?:sony)?sgp\w+(?: bui|\))/i
@@ -1763,7 +1849,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1763
1849
  / (kb2005|in20[12]5|be20[12][59])\b/i,
1764
1850
  /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
1765
1851
  ],
1766
- [d, [u, "OnePlus"], [l, m]],
1852
+ [d, [u, "OnePlus"], [l, b]],
1767
1853
  [
1768
1854
  // Amazon
1769
1855
  /(alexa)webm/i,
@@ -1777,7 +1863,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1777
1863
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
1778
1864
  // Fire Phone
1779
1865
  ],
1780
- [[d, /(.+)/g, "Fire Phone $1"], [u, Se], [l, m]],
1866
+ [[d, /(.+)/g, "Fire Phone $1"], [u, Se], [l, b]],
1781
1867
  [
1782
1868
  // BlackBerry
1783
1869
  /(playbook);[-\w\),; ]+(rim)/i
@@ -1789,16 +1875,16 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1789
1875
  /\(bb10; (\w+)/i
1790
1876
  // BlackBerry 10
1791
1877
  ],
1792
- [d, [u, bt], [l, m]],
1878
+ [d, [u, wt], [l, b]],
1793
1879
  [
1794
1880
  // Asus
1795
1881
  /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
1796
1882
  ],
1797
- [d, [u, wt], [l, f]],
1883
+ [d, [u, pt], [l, f]],
1798
1884
  [
1799
1885
  / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
1800
1886
  ],
1801
- [d, [u, wt], [l, m]],
1887
+ [d, [u, pt], [l, b]],
1802
1888
  [
1803
1889
  // HTC
1804
1890
  /(nexus 9)/i
@@ -1813,7 +1899,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1813
1899
  /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
1814
1900
  // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
1815
1901
  ],
1816
- [u, [d, /_/g, " "], [l, m]],
1902
+ [u, [d, /_/g, " "], [l, b]],
1817
1903
  [
1818
1904
  // Acer
1819
1905
  /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
@@ -1824,12 +1910,12 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1824
1910
  /droid.+; (m[1-5] note) bui/i,
1825
1911
  /\bmz-([-\w]{2,})/i
1826
1912
  ],
1827
- [d, [u, "Meizu"], [l, m]],
1913
+ [d, [u, "Meizu"], [l, b]],
1828
1914
  [
1829
1915
  // Ulefone
1830
1916
  /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
1831
1917
  ],
1832
- [d, [u, "Ulefone"], [l, m]],
1918
+ [d, [u, "Ulefone"], [l, b]],
1833
1919
  [
1834
1920
  // MIXED
1835
1921
  /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
@@ -1847,7 +1933,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1847
1933
  /(oppo) ?([\w ]+) bui/i
1848
1934
  // OPPO
1849
1935
  ],
1850
- [u, d, [l, m]],
1936
+ [u, d, [l, b]],
1851
1937
  [
1852
1938
  /(kobo)\s(ereader|touch)/i,
1853
1939
  // Kobo
@@ -1868,7 +1954,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1868
1954
  /droid [\d\.]+; (fp\du?)(?: b|\))/i
1869
1955
  // Fairphone
1870
1956
  ],
1871
- [d, [u, "Fairphone"], [l, m]],
1957
+ [d, [u, "Fairphone"], [l, b]],
1872
1958
  [
1873
1959
  /(shield[\w ]+) b/i
1874
1960
  // Nvidia Shield Tablets
@@ -1878,12 +1964,12 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1878
1964
  /(sprint) (\w+)/i
1879
1965
  // Sprint Phones
1880
1966
  ],
1881
- [u, d, [l, m]],
1967
+ [u, d, [l, b]],
1882
1968
  [
1883
1969
  /(kin\.[onetw]{3})/i
1884
1970
  // Microsoft Kin
1885
1971
  ],
1886
- [[d, /\./g, " "], [u, Ue], [l, m]],
1972
+ [[d, /\./g, " "], [u, Ue], [l, b]],
1887
1973
  [
1888
1974
  /droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
1889
1975
  // Zebra
@@ -1892,7 +1978,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1892
1978
  [
1893
1979
  /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
1894
1980
  ],
1895
- [d, [u, Qe], [l, m]],
1981
+ [d, [u, Qe], [l, b]],
1896
1982
  [
1897
1983
  ///////////////////
1898
1984
  // SMARTTVS
@@ -1900,64 +1986,64 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1900
1986
  /smart-tv.+(samsung)/i
1901
1987
  // Samsung
1902
1988
  ],
1903
- [u, [l, I]],
1989
+ [u, [l, T]],
1904
1990
  [
1905
1991
  /hbbtv.+maple;(\d+)/i
1906
1992
  ],
1907
- [[d, /^/, "SmartTV"], [u, Te], [l, I]],
1993
+ [[d, /^/, "SmartTV"], [u, Te], [l, T]],
1908
1994
  [
1909
1995
  /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1910
1996
  // LG SmartTV
1911
1997
  ],
1912
- [[u, $e], [l, I]],
1998
+ [[u, je], [l, T]],
1913
1999
  [
1914
2000
  /(apple) ?tv/i
1915
2001
  // Apple TV
1916
2002
  ],
1917
- [u, [d, we + " TV"], [l, I]],
2003
+ [u, [d, pe + " TV"], [l, T]],
1918
2004
  [
1919
2005
  /crkey/i
1920
2006
  // Google Chromecast
1921
2007
  ],
1922
- [[d, Pe + "cast"], [u, Ie], [l, I]],
2008
+ [[d, Pe + "cast"], [u, Ie], [l, T]],
1923
2009
  [
1924
2010
  /droid.+aft(\w+)( bui|\))/i
1925
2011
  // Fire TV
1926
2012
  ],
1927
- [d, [u, Se], [l, I]],
2013
+ [d, [u, Se], [l, T]],
1928
2014
  [
1929
2015
  /\(dtv[\);].+(aquos)/i,
1930
2016
  /(aquos-tv[\w ]+)\)/i
1931
2017
  // Sharp
1932
2018
  ],
1933
- [d, [u, yt], [l, I]],
2019
+ [d, [u, yt], [l, T]],
1934
2020
  [
1935
2021
  /(bravia[\w ]+)( bui|\))/i
1936
2022
  // Sony
1937
2023
  ],
1938
- [d, [u, Ae], [l, I]],
2024
+ [d, [u, Ae], [l, T]],
1939
2025
  [
1940
2026
  /(mitv-\w{5}) bui/i
1941
2027
  // Xiaomi
1942
2028
  ],
1943
- [d, [u, je], [l, I]],
2029
+ [d, [u, $e], [l, T]],
1944
2030
  [
1945
2031
  /Hbbtv.*(technisat) (.*);/i
1946
2032
  // TechniSAT
1947
2033
  ],
1948
- [u, d, [l, I]],
2034
+ [u, d, [l, T]],
1949
2035
  [
1950
2036
  /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
1951
2037
  // Roku
1952
2038
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
1953
2039
  // HbbTV devices
1954
2040
  ],
1955
- [[u, ye], [d, ye], [l, I]],
2041
+ [[u, ye], [d, ye], [l, T]],
1956
2042
  [
1957
2043
  /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
1958
2044
  // SmartTV from Unidentified Vendors
1959
2045
  ],
1960
- [[l, I]],
2046
+ [[l, T]],
1961
2047
  [
1962
2048
  ///////////////////
1963
2049
  // CONSOLES
@@ -1995,7 +2081,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
1995
2081
  /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
1996
2082
  // Apple Watch
1997
2083
  ],
1998
- [d, [u, we], [l, Y]],
2084
+ [d, [u, pe], [l, Y]],
1999
2085
  [
2000
2086
  /droid.+; (glass) \d/i
2001
2087
  // Google Glass
@@ -2009,7 +2095,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2009
2095
  /(quest( 2| pro)?)/i
2010
2096
  // Oculus Quest
2011
2097
  ],
2012
- [d, [u, vt], [l, Y]],
2098
+ [d, [u, kt], [l, Y]],
2013
2099
  [
2014
2100
  ///////////////////
2015
2101
  // EMBEDDED
@@ -2030,7 +2116,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2030
2116
  /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
2031
2117
  // Android Phones from Unidentified Vendors
2032
2118
  ],
2033
- [d, [l, m]],
2119
+ [d, [l, b]],
2034
2120
  [
2035
2121
  /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
2036
2122
  // Android Tablets from Unidentified Vendors
@@ -2045,7 +2131,7 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2045
2131
  /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
2046
2132
  // Unidentifiable Mobile
2047
2133
  ],
2048
- [[l, m]],
2134
+ [[l, b]],
2049
2135
  [
2050
2136
  /(android[-\w\. ]{0,9});.+buil/i
2051
2137
  // Generic Android Device
@@ -2057,12 +2143,12 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2057
2143
  /windows.+ edge\/([\w\.]+)/i
2058
2144
  // EdgeHTML
2059
2145
  ],
2060
- [c, [o, mi + "HTML"]],
2146
+ [c, [r, bi + "HTML"]],
2061
2147
  [
2062
2148
  /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
2063
2149
  // Blink
2064
2150
  ],
2065
- [c, [o, "Blink"]],
2151
+ [c, [r, "Blink"]],
2066
2152
  [
2067
2153
  /(presto)\/([\w\.]+)/i,
2068
2154
  // Presto
@@ -2076,12 +2162,12 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2076
2162
  // iCab
2077
2163
  /\b(libweb)/i
2078
2164
  ],
2079
- [o, c],
2165
+ [r, c],
2080
2166
  [
2081
2167
  /rv\:([\w\.]{1,9})\b.+(gecko)/i
2082
2168
  // Gecko
2083
2169
  ],
2084
- [c, o]
2170
+ [c, r]
2085
2171
  ],
2086
2172
  os: [
2087
2173
  [
@@ -2089,19 +2175,19 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2089
2175
  /microsoft (windows) (vista|xp)/i
2090
2176
  // Windows (iTunes)
2091
2177
  ],
2092
- [o, c],
2178
+ [r, c],
2093
2179
  [
2094
2180
  /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
2095
2181
  // Windows Phone
2096
2182
  ],
2097
- [o, [c, Be, Mt]],
2183
+ [r, [c, Be, Mt]],
2098
2184
  [
2099
2185
  /windows nt 6\.2; (arm)/i,
2100
2186
  // Windows RT
2101
2187
  /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
2102
2188
  /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
2103
2189
  ],
2104
- [[c, Be, Mt], [o, it]],
2190
+ [[c, Be, Mt], [r, it]],
2105
2191
  [
2106
2192
  // iOS/macOS
2107
2193
  /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
@@ -2109,19 +2195,19 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2109
2195
  /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
2110
2196
  /cfnetwork\/.+darwin/i
2111
2197
  ],
2112
- [[c, /_/g, "."], [o, "iOS"]],
2198
+ [[c, /_/g, "."], [r, "iOS"]],
2113
2199
  [
2114
2200
  /(mac os x) ?([\w\. ]*)/i,
2115
2201
  /(macintosh|mac_powerpc\b)(?!.+haiku)/i
2116
2202
  // Mac OS
2117
2203
  ],
2118
- [[o, "macOS"], [c, /_/g, "."]],
2204
+ [[r, "macOS"], [c, /_/g, "."]],
2119
2205
  [
2120
2206
  // Mobile OSes
2121
2207
  /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
2122
2208
  // Android-x86/HarmonyOS
2123
2209
  ],
2124
- [c, o],
2210
+ [c, r],
2125
2211
  [
2126
2212
  // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
2127
2213
  /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
@@ -2132,44 +2218,44 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2132
2218
  /\((series40);/i
2133
2219
  // Series 40
2134
2220
  ],
2135
- [o, c],
2221
+ [r, c],
2136
2222
  [
2137
2223
  /\(bb(10);/i
2138
2224
  // BlackBerry 10
2139
2225
  ],
2140
- [c, [o, bt]],
2226
+ [c, [r, wt]],
2141
2227
  [
2142
2228
  /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
2143
2229
  // Symbian
2144
2230
  ],
2145
- [c, [o, "Symbian"]],
2231
+ [c, [r, "Symbian"]],
2146
2232
  [
2147
2233
  /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
2148
2234
  // Firefox OS
2149
2235
  ],
2150
- [c, [o, be + " OS"]],
2236
+ [c, [r, we + " OS"]],
2151
2237
  [
2152
2238
  /web0s;.+rt(tv)/i,
2153
2239
  /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
2154
2240
  // WebOS
2155
2241
  ],
2156
- [c, [o, "webOS"]],
2242
+ [c, [r, "webOS"]],
2157
2243
  [
2158
2244
  /watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
2159
2245
  // watchOS
2160
2246
  ],
2161
- [c, [o, "watchOS"]],
2247
+ [c, [r, "watchOS"]],
2162
2248
  [
2163
2249
  // Google Chromecast
2164
2250
  /crkey\/([\d\.]+)/i
2165
2251
  // Google Chromecast
2166
2252
  ],
2167
- [c, [o, Pe + "cast"]],
2253
+ [c, [r, Pe + "cast"]],
2168
2254
  [
2169
2255
  /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
2170
2256
  // Chromium OS
2171
2257
  ],
2172
- [[o, "Chrome OS"], c],
2258
+ [[r, "Chrome OS"], c],
2173
2259
  [
2174
2260
  // Smart TVs
2175
2261
  /panasonic;(viera)/i,
@@ -2201,12 +2287,12 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2201
2287
  /(haiku) (\w+)/i
2202
2288
  // Haiku
2203
2289
  ],
2204
- [o, c],
2290
+ [r, c],
2205
2291
  [
2206
2292
  /(sunos) ?([\w\.\d]*)/i
2207
2293
  // Solaris
2208
2294
  ],
2209
- [[o, "Solaris"], c],
2295
+ [[r, "Solaris"], c],
2210
2296
  [
2211
2297
  /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
2212
2298
  // Solaris
@@ -2217,250 +2303,250 @@ var di = "2.0.0-beta.2", de = "", ht = "?", Ye = "function", z = "undefined", le
2217
2303
  /(unix) ?([\w\.]*)/i
2218
2304
  // UNIX
2219
2305
  ],
2220
- [o, c]
2306
+ [r, c]
2221
2307
  ]
2222
2308
  }, xe = function() {
2223
2309
  var i = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
2224
- return D.call(i.init, [
2225
- [T, [o, c, fe]],
2226
- [_, [M]],
2310
+ return R.call(i.init, [
2311
+ [A, [r, c, fe]],
2312
+ [_, [S]],
2227
2313
  [O, [l, d, u]],
2228
- [F, [o, c]],
2229
- [P, [o, c]]
2230
- ]), D.call(i.isIgnore, [
2231
- [T, [c, fe]],
2314
+ [F, [r, c]],
2315
+ [P, [r, c]]
2316
+ ]), R.call(i.isIgnore, [
2317
+ [A, [c, fe]],
2232
2318
  [F, [c]],
2233
2319
  [P, [c]]
2234
- ]), D.call(i.isIgnoreRgx, [
2235
- [T, / ?browser$/i],
2320
+ ]), R.call(i.isIgnoreRgx, [
2321
+ [A, / ?browser$/i],
2236
2322
  [P, / ?os$/i]
2237
- ]), D.call(i.toString, [
2238
- [T, [o, c]],
2239
- [_, [M]],
2323
+ ]), R.call(i.toString, [
2324
+ [A, [r, c]],
2325
+ [_, [S]],
2240
2326
  [O, [u, d]],
2241
- [F, [o, c]],
2242
- [P, [o, c]]
2327
+ [F, [r, c]],
2328
+ [P, [r, c]]
2243
2329
  ]), i;
2244
- }(), vi = function(i, t) {
2245
- var e = xe.init[t], a = xe.isIgnore[t] || 0, n = xe.isIgnoreRgx[t] || 0, r = xe.toString[t] || 0;
2246
- function s() {
2247
- D.call(this, e);
2330
+ }(), ki = function(i, t) {
2331
+ var e = xe.init[t], s = xe.isIgnore[t] || 0, n = xe.isIgnoreRgx[t] || 0, o = xe.toString[t] || 0;
2332
+ function a() {
2333
+ R.call(this, e);
2248
2334
  }
2249
- return s.prototype.getItem = function() {
2335
+ return a.prototype.getItem = function() {
2250
2336
  return i;
2251
- }, s.prototype.withClientHints = function() {
2252
- return H ? H.getHighEntropyValues(Dt).then(function(h) {
2253
- return i.setCH(new Nt(h, !1)).parseCH().get();
2337
+ }, a.prototype.withClientHints = function() {
2338
+ return G ? G.getHighEntropyValues(Rt).then(function(h) {
2339
+ return i.setCH(new Dt(h, !1)).parseCH().get();
2254
2340
  }) : i.parseCH().get();
2255
- }, s.prototype.withFeatureCheck = function() {
2341
+ }, a.prototype.withFeatureCheck = function() {
2256
2342
  return i.detectFeature().get();
2257
- }, t != te && (s.prototype.is = function(h) {
2343
+ }, t != te && (a.prototype.is = function(h) {
2258
2344
  var g = !1;
2259
2345
  for (var w in this)
2260
- if (this.hasOwnProperty(w) && !at(a, w) && q(n ? $(n, this[w]) : this[w]) == q(n ? $(n, h) : h)) {
2261
- if (g = !0, h != z)
2346
+ if (this.hasOwnProperty(w) && !st(s, w) && z(n ? j(n, this[w]) : this[w]) == z(n ? j(n, h) : h)) {
2347
+ if (g = !0, h != V)
2262
2348
  break;
2263
- } else if (h == z && g) {
2349
+ } else if (h == V && g) {
2264
2350
  g = !g;
2265
2351
  break;
2266
2352
  }
2267
2353
  return g;
2268
- }, s.prototype.toString = function() {
2354
+ }, a.prototype.toString = function() {
2269
2355
  var h = de;
2270
- for (var g in r)
2271
- typeof this[r[g]] !== z && (h += (h ? " " : de) + this[r[g]]);
2272
- return h || z;
2273
- }), H || (s.prototype.then = function(h) {
2356
+ for (var g in o)
2357
+ typeof this[o[g]] !== V && (h += (h ? " " : de) + this[o[g]]);
2358
+ return h || V;
2359
+ }), G || (a.prototype.then = function(h) {
2274
2360
  var g = this, w = function() {
2275
- for (var A in g)
2276
- g.hasOwnProperty(A) && (this[A] = g[A]);
2361
+ for (var C in g)
2362
+ g.hasOwnProperty(C) && (this[C] = g[C]);
2277
2363
  };
2278
2364
  w.prototype = {
2279
- is: s.prototype.is,
2280
- toString: s.prototype.toString
2365
+ is: a.prototype.is,
2366
+ toString: a.prototype.toString
2281
2367
  };
2282
- var p = new w();
2283
- return h(p), p;
2284
- }), new s();
2368
+ var m = new w();
2369
+ return h(m), m;
2370
+ }), new a();
2285
2371
  };
2286
- function Nt(i, t) {
2287
- if (i = i || {}, D.call(this, Dt), t)
2288
- D.call(this, [
2289
- [nt, Xe(i[G])],
2290
- [st, Xe(i[li])],
2291
- [m, /\?1/.test(i[wi])],
2292
- [d, me(i[bi])],
2293
- [ee, me(i[Ft])],
2294
- [ot, me(i[pi])],
2295
- [M, me(i[ui])],
2372
+ function Dt(i, t) {
2373
+ if (i = i || {}, R.call(this, Rt), t)
2374
+ R.call(this, [
2375
+ [nt, Xe(i[q])],
2376
+ [at, Xe(i[li])],
2377
+ [b, /\?1/.test(i[pi])],
2378
+ [d, be(i[wi])],
2379
+ [ee, be(i[Ft])],
2380
+ [ot, be(i[mi])],
2381
+ [S, be(i[ui])],
2296
2382
  [W, Xe(i[gi])],
2297
- [Re, me(i[hi])]
2383
+ [Ne, be(i[hi])]
2298
2384
  ]);
2299
2385
  else
2300
2386
  for (var e in i)
2301
- this.hasOwnProperty(e) && typeof i[e] !== z && (this[e] = i[e]);
2387
+ this.hasOwnProperty(e) && typeof i[e] !== V && (this[e] = i[e]);
2302
2388
  }
2303
- function Tt(i, t, e, a) {
2389
+ function Tt(i, t, e, s) {
2304
2390
  return this.get = function(n) {
2305
2391
  return n ? this.data.hasOwnProperty(n) ? this.data[n] : void 0 : this.data;
2306
- }, this.set = function(n, r) {
2307
- return this.data[n] = r, this;
2392
+ }, this.set = function(n, o) {
2393
+ return this.data[n] = o, this;
2308
2394
  }, this.setCH = function(n) {
2309
2395
  return this.uaCH = n, this;
2310
2396
  }, this.detectFeature = function() {
2311
- if (S && S.userAgent == this.ua)
2397
+ if (I && I.userAgent == this.ua)
2312
2398
  switch (this.itemType) {
2313
- case T:
2314
- S.brave && typeof S.brave.isBrave == Ye && this.set(o, "Brave");
2399
+ case A:
2400
+ I.brave && typeof I.brave.isBrave == Ye && this.set(r, "Brave");
2315
2401
  break;
2316
2402
  case O:
2317
- !this.get(l) && H && H[m] && this.set(l, m), this.get(d) == "Macintosh" && S && typeof S.standalone !== z && S.maxTouchPoints && S.maxTouchPoints > 2 && this.set(d, "iPad").set(l, f);
2403
+ !this.get(l) && G && G[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);
2318
2404
  break;
2319
2405
  case P:
2320
- !this.get(o) && H && H[ee] && this.set(o, H[ee]);
2406
+ !this.get(r) && G && G[ee] && this.set(r, G[ee]);
2321
2407
  break;
2322
2408
  case te:
2323
- var n = this.data, r = function(s) {
2324
- return n[s].getItem().detectFeature().get();
2409
+ var n = this.data, o = function(a) {
2410
+ return n[a].getItem().detectFeature().get();
2325
2411
  };
2326
- this.set(T, r(T)).set(_, r(_)).set(O, r(O)).set(F, r(F)).set(P, r(P));
2412
+ this.set(A, o(A)).set(_, o(_)).set(O, o(O)).set(F, o(F)).set(P, o(P));
2327
2413
  }
2328
2414
  return this;
2329
2415
  }, this.parseUA = function() {
2330
- return this.itemType != te && Ct.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(fe, Ke(this.get(c))), this;
2416
+ return this.itemType != te && Ct.call(this.data, this.ua, this.rgxMap), this.itemType == A && this.set(fe, Ke(this.get(c))), this;
2331
2417
  }, this.parseCH = function() {
2332
- var n = this.uaCH, r = this.rgxMap;
2418
+ var n = this.uaCH, o = this.rgxMap;
2333
2419
  switch (this.itemType) {
2334
- case T:
2335
- var s = n[st] || n[nt], h;
2336
- if (s)
2337
- for (var g in s) {
2338
- var w = $(/(Google|Microsoft) /, s[g].brand || s[g]), p = s[g].version;
2339
- !/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(c, p).set(fe, Ke(p)), h = w);
2420
+ case A:
2421
+ var a = n[at] || n[nt], h;
2422
+ if (a)
2423
+ for (var g in a) {
2424
+ var w = j(/(Google|Microsoft) /, a[g].brand || a[g]), m = a[g].version;
2425
+ !/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(r, w).set(c, m).set(fe, Ke(m)), h = w);
2340
2426
  }
2341
2427
  break;
2342
2428
  case _:
2343
- var A = n[M];
2344
- A && (A && n[Re] == "64" && (A += "64"), Ct.call(this.data, A + ";", r));
2429
+ var C = n[S];
2430
+ C && (C && n[Ne] == "64" && (C += "64"), Ct.call(this.data, C + ";", o));
2345
2431
  break;
2346
2432
  case O:
2347
- if (n[m] && this.set(l, m), n[d] && this.set(d, n[d]), n[d] == "Xbox" && this.set(l, Z).set(u, Ue), n[W]) {
2348
- var R;
2433
+ if (n[b] && this.set(l, b), n[d] && this.set(d, n[d]), n[d] == "Xbox" && this.set(l, Z).set(u, Ue), n[W]) {
2434
+ var N;
2349
2435
  if (typeof n[W] != "string")
2350
- for (var Q = 0; !R && Q < n[W].length; )
2351
- R = Be(n[W][Q++], St);
2436
+ for (var Q = 0; !N && Q < n[W].length; )
2437
+ N = Be(n[W][Q++], St);
2352
2438
  else
2353
- R = Be(n[W], St);
2354
- this.set(l, R);
2439
+ N = Be(n[W], St);
2440
+ this.set(l, N);
2355
2441
  }
2356
2442
  break;
2357
2443
  case P:
2358
2444
  var X = n[ee];
2359
2445
  if (X) {
2360
2446
  var L = n[ot];
2361
- X == it && (L = parseInt(Ke(L), 10) >= 13 ? "11" : "10"), this.set(o, X).set(c, L);
2447
+ X == it && (L = parseInt(Ke(L), 10) >= 13 ? "11" : "10"), this.set(r, X).set(c, L);
2362
2448
  }
2363
- this.get(o) == it && n[d] == "Xbox" && this.set(o, "Xbox").set(c, void 0);
2449
+ this.get(r) == it && n[d] == "Xbox" && this.set(r, "Xbox").set(c, void 0);
2364
2450
  break;
2365
2451
  case te:
2366
2452
  var he = this.data, x = function(B) {
2367
2453
  return he[B].getItem().setCH(n).parseCH().get();
2368
2454
  };
2369
- this.set(T, x(T)).set(_, x(_)).set(O, x(O)).set(F, x(F)).set(P, x(P));
2455
+ this.set(A, x(A)).set(_, x(_)).set(O, x(O)).set(F, x(F)).set(P, x(P));
2370
2456
  }
2371
2457
  return this;
2372
- }, D.call(this, [
2458
+ }, R.call(this, [
2373
2459
  ["itemType", i],
2374
2460
  ["ua", t],
2375
- ["uaCH", a],
2461
+ ["uaCH", s],
2376
2462
  ["rgxMap", e],
2377
- ["data", vi(this, i)]
2463
+ ["data", ki(this, i)]
2378
2464
  ]), this;
2379
2465
  }
2380
- function N(i, t, e) {
2381
- if (typeof i === le ? (Et(i) ? (typeof t === le && (e = t), t = i) : (e = i, t = void 0), i = void 0) : typeof i === Ze && !Et(t) && (e = t, t = void 0), !(this instanceof N))
2382
- return new N(i, t, e).getResult();
2383
- var a = typeof i === Ze ? i : (
2466
+ function D(i, t, e) {
2467
+ if (typeof i === le ? (Et(i) ? (typeof t === le && (e = t), t = i) : (e = i, t = void 0), i = void 0) : typeof i === Ze && !Et(t) && (e = t, t = void 0), !(this instanceof D))
2468
+ return new D(i, t, e).getResult();
2469
+ var s = typeof i === Ze ? i : (
2384
2470
  // Passed user-agent string
2385
- S && S.userAgent ? S.userAgent : (
2471
+ I && I.userAgent ? I.userAgent : (
2386
2472
  // navigator.userAgent
2387
2473
  e && e[gt] ? e[gt] : (
2388
2474
  // User-Agent from passed headers
2389
2475
  de
2390
2476
  )
2391
2477
  )
2392
- ), n = new Nt(e, !0), r = t ? yi(It, t) : It, s = function(h) {
2478
+ ), n = new Dt(e, !0), o = t ? yi(It, t) : It, a = function(h) {
2393
2479
  return h == te ? function() {
2394
- return new Tt(h, a, r, n).set("ua", a).set(T, this.getBrowser()).set(_, this.getCPU()).set(O, this.getDevice()).set(F, this.getEngine()).set(P, this.getOS()).get();
2480
+ return new Tt(h, s, o, n).set("ua", s).set(A, this.getBrowser()).set(_, this.getCPU()).set(O, this.getDevice()).set(F, this.getEngine()).set(P, this.getOS()).get();
2395
2481
  } : function() {
2396
- return new Tt(h, a, r[h], n).parseUA().get();
2482
+ return new Tt(h, s, o[h], n).parseUA().get();
2397
2483
  };
2398
2484
  };
2399
- return D.call(this, [
2400
- ["getBrowser", s(T)],
2401
- ["getCPU", s(_)],
2402
- ["getDevice", s(O)],
2403
- ["getEngine", s(F)],
2404
- ["getOS", s(P)],
2405
- ["getResult", s(te)],
2485
+ return R.call(this, [
2486
+ ["getBrowser", a(A)],
2487
+ ["getCPU", a(_)],
2488
+ ["getDevice", a(O)],
2489
+ ["getEngine", a(F)],
2490
+ ["getOS", a(P)],
2491
+ ["getResult", a(te)],
2406
2492
  ["getUA", function() {
2407
- return a;
2493
+ return s;
2408
2494
  }],
2409
2495
  ["setUA", function(h) {
2410
- return ue(h) && (a = h.length > tt ? ye(h, tt) : h), this;
2496
+ return ue(h) && (s = h.length > tt ? ye(h, tt) : h), this;
2411
2497
  }]
2412
- ]).setUA(a), this;
2498
+ ]).setUA(s), this;
2413
2499
  }
2414
- N.VERSION = di;
2415
- N.BROWSER = He([o, c, fe]);
2416
- N.CPU = He([M]);
2417
- N.DEVICE = He([d, u, l, Z, m, I, f, Y, et]);
2418
- N.ENGINE = N.OS = He([o, c]);
2419
- class ki {
2420
- constructor(t, e, a) {
2421
- b(this, "trackers");
2422
- b(this, "config");
2423
- b(this, "sdkConfig");
2424
- this.trackers = t, this.config = e, this.sdkConfig = a;
2425
- }
2426
- on(t, e, a) {
2427
- const n = function(s) {
2428
- s.data.message !== `kalamba:wrapper-telemetry:${t}` && s.data.message !== `kalamba:wrapper:${t}` || e(s.data.payload);
2500
+ D.VERSION = di;
2501
+ D.BROWSER = Ge([r, c, fe]);
2502
+ D.CPU = Ge([S]);
2503
+ D.DEVICE = Ge([d, u, l, Z, b, T, f, Y, et]);
2504
+ D.ENGINE = D.OS = Ge([r, c]);
2505
+ class vi {
2506
+ constructor(t, e, s) {
2507
+ p(this, "trackers");
2508
+ p(this, "config");
2509
+ p(this, "sdkConfig");
2510
+ this.trackers = t, this.config = e, this.sdkConfig = s;
2511
+ }
2512
+ on(t, e, s) {
2513
+ const n = function(a) {
2514
+ a.data.message !== `kalamba:wrapper-telemetry:${t}` && a.data.message !== `kalamba:wrapper:${t}` || e(a.data.payload);
2429
2515
  };
2430
- window.addEventListener("message", n, a);
2516
+ window.addEventListener("message", n, s);
2431
2517
  }
2432
2518
  track(t, e) {
2433
- this.trackers.forEach((a) => a.track(t, e));
2519
+ this.trackers.forEach((s) => s.track(t, e));
2434
2520
  }
2435
2521
  }
2436
2522
  function At(i) {
2437
2523
  return i.reduce((t, e) => t + e, 0);
2438
2524
  }
2439
2525
  function Ei(i) {
2440
- const t = i.length, e = At(i) / t, a = i.map((r) => Math.pow(r - e, 2)), n = At(a) / t;
2526
+ const t = i.length, e = At(i) / t, s = i.map((o) => Math.pow(o - e, 2)), n = At(s) / t;
2441
2527
  return Math.sqrt(n);
2442
2528
  }
2443
2529
  class Pt {
2444
2530
  constructor() {
2445
- b(this, "rafId", -1);
2446
- b(this, "startTime", 0);
2447
- b(this, "stopTime", 0);
2448
- b(this, "frames", []);
2449
- b(this, "calculateFPS", () => {
2531
+ p(this, "rafId", -1);
2532
+ p(this, "startTime", 0);
2533
+ p(this, "stopTime", 0);
2534
+ p(this, "frames", []);
2535
+ p(this, "calculateFPS", () => {
2450
2536
  const t = Math.floor((this.stopTime - this.startTime) / 1e3);
2451
- return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, a, n, r) => (r[n] !== r[n - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2537
+ return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, s, n, o) => (o[n] !== o[n - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2452
2538
  });
2453
- b(this, "getReport", () => {
2454
- const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), a = t.length > 0 ? Math.max(...t) : e, n = t.length > 0 ? Math.min(...t) : e, r = t.length > 0 ? Ei(t) : 0;
2455
- return { fpsAvg: e, fpsMax: a, fpsMin: n, fpsStdDev: r };
2539
+ p(this, "getReport", () => {
2540
+ const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), s = t.length > 0 ? Math.max(...t) : e, n = t.length > 0 ? Math.min(...t) : e, o = t.length > 0 ? Ei(t) : 0;
2541
+ return { fpsAvg: e, fpsMax: s, fpsMin: n, fpsStdDev: o };
2456
2542
  });
2457
- b(this, "start", () => {
2543
+ p(this, "start", () => {
2458
2544
  this.startTime = Date.now(), this.frames = [], this.trackFrames();
2459
2545
  });
2460
- b(this, "stop", () => {
2546
+ p(this, "stop", () => {
2461
2547
  cancelAnimationFrame(this.rafId), this.stopTime = Date.now();
2462
2548
  });
2463
- b(this, "trackFrames", () => {
2549
+ p(this, "trackFrames", () => {
2464
2550
  this.frames.push(Date.now()), this.rafId = requestAnimationFrame(this.trackFrames);
2465
2551
  });
2466
2552
  }
@@ -2487,30 +2573,30 @@ async function Ii() {
2487
2573
  function Je() {
2488
2574
  return window.innerWidth >= window.innerHeight ? Ci : Mi;
2489
2575
  }
2490
- var _e, ae, ne, se, ke, Fe, Ee, De;
2491
- class qi extends ki {
2576
+ var _e, se, ne, ae, ve, Fe, Ee, Re;
2577
+ class zi extends vi {
2492
2578
  constructor(...e) {
2493
2579
  super(...e);
2494
- b(this, "FPS_SAMPLE_INTERVAL", 1e4);
2580
+ p(this, "FPS_SAMPLE_INTERVAL", 1e4);
2495
2581
  // wrapper state
2496
- C(this, _e, 0);
2497
- C(this, ae, "");
2498
- C(this, ne, void 0);
2499
- C(this, se, void 0);
2500
- C(this, ke, !1);
2501
- C(this, Fe, !1);
2502
- C(this, Ee, "");
2503
- C(this, De, []);
2504
- v(this, ne, {}), v(this, se, this.deviceInfo()), this.on("state", ({ balance: a, version: n }) => {
2505
- v(this, ae, n), v(this, _e, a);
2506
- }), this.on("autoplay", ({ action: a }) => {
2507
- ["start", "resume"].includes(a) ? v(this, ke, !0) : v(this, ke, !1);
2508
- }), this.on("settings", ({ fastPlay: a }) => {
2509
- a !== void 0 && v(this, Fe, a);
2582
+ M(this, _e, 0);
2583
+ M(this, se, void 0);
2584
+ M(this, ne, void 0);
2585
+ M(this, ae, void 0);
2586
+ M(this, ve, !1);
2587
+ M(this, Fe, !1);
2588
+ M(this, Ee, "");
2589
+ M(this, Re, []);
2590
+ k(this, ne, {}), k(this, ae, this.deviceInfo()), k(this, se, this.config.gameVersion), this.on("state", ({ balance: s }) => {
2591
+ k(this, _e, s);
2592
+ }), this.on("autoplay", ({ action: s }) => {
2593
+ ["start", "resume"].includes(s) ? k(this, ve, !0) : k(this, ve, !1);
2594
+ }), this.on("settings", ({ fastPlay: s }) => {
2595
+ s !== void 0 && k(this, Fe, s);
2510
2596
  }), this.registerEvents();
2511
2597
  }
2512
2598
  async registerEvents() {
2513
- y(this, se).then((e) => {
2599
+ y(this, ae).then((e) => {
2514
2600
  this.track("Device Information", e);
2515
2601
  }), this.on("loadStart", () => {
2516
2602
  this.track("Game Loading", { progress: 0, step: "initial" });
@@ -2524,9 +2610,9 @@ class qi extends ki {
2524
2610
  systemMessageType: e.type
2525
2611
  });
2526
2612
  }), this.on("openGameResponse", async (e) => {
2527
- v(this, Ee, e.contract.stateType.nextRound), v(this, ne, {
2613
+ k(this, Ee, e.contract.stateType.nextRound), k(this, ne, {
2528
2614
  balanceInCoins: e.contract.balance.coins,
2529
- clientVersion: y(this, ae),
2615
+ clientVersion: y(this, se),
2530
2616
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
2531
2617
  coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
2532
2618
  currency: this.sdkConfig.api.currency,
@@ -2550,36 +2636,36 @@ class qi extends ki {
2550
2636
  // testVariants: '',
2551
2637
  }), this.track("Game Open", y(this, ne));
2552
2638
  }), this.on("playCycleEnd", async (e) => {
2553
- const a = await y(this, se), { base: n, multiplier: r, specialAction: s } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, g = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, w = e.contract.win.total, p = w - g, A = s || "spin", R = e.contract.roundId;
2639
+ const s = await y(this, ae), { base: n, multiplier: o, specialAction: a } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, g = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, w = e.contract.win.total, m = w - g, C = a || "spin", N = e.contract.roundId;
2554
2640
  this.track("Betting Activity", {
2555
- balance: h - p,
2641
+ balance: h - m,
2556
2642
  balanceAfter: h,
2557
2643
  baseBet: n,
2558
2644
  // baseBetIndex,
2559
- betMultiplier: r,
2560
- betType: A,
2561
- gameVersion: y(this, ae),
2645
+ betMultiplier: o,
2646
+ betType: C,
2647
+ gameVersion: y(this, se),
2562
2648
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
2563
2649
  coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
2564
2650
  currency: this.sdkConfig.api.currency,
2565
2651
  environment: "release",
2566
2652
  gameCode: this.sdkConfig.api.game,
2567
2653
  gameCodeServer: this.sdkConfig.api.game,
2568
- isMobile: a.isMobile,
2569
- netResult: p,
2654
+ isMobile: s.isMobile,
2655
+ netResult: m,
2570
2656
  operatorName: "kalamba",
2571
2657
  orientation: Je(),
2572
2658
  partnerId: this.sdkConfig.api.brand,
2573
2659
  partnerParentId: this.sdkConfig.api.integration,
2574
2660
  platform: "WEB",
2575
2661
  playMode: this.sdkConfig.api.playMode,
2576
- roundId: R,
2662
+ roundId: N,
2577
2663
  // TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
2578
2664
  // roundTypes: [...this.#roundTypes],
2579
2665
  roundTypes: ["BaseGame"],
2580
2666
  totalBet: g,
2581
2667
  totalWin: w
2582
- }), v(this, De, []);
2668
+ }), k(this, Re, []);
2583
2669
  }), this.on("telemetry.click", (e) => {
2584
2670
  this.track("UI Interaction", {
2585
2671
  action: "click",
@@ -2594,12 +2680,12 @@ class qi extends ki {
2594
2680
  }), this.reportFpsSample(), this.reportFpsRound();
2595
2681
  }
2596
2682
  reportFpsSample() {
2597
- const e = new Pt(), a = () => {
2683
+ const e = new Pt(), s = () => {
2598
2684
  e.stop();
2599
- const r = e.getReport();
2600
- this.track("FPS Performance", { ...r, fpsType: "sample" }), n();
2685
+ const o = e.getReport();
2686
+ this.track("FPS Performance", { ...o, fpsType: "sample" }), n();
2601
2687
  }, n = async () => {
2602
- e.start(), setTimeout(a, this.FPS_SAMPLE_INTERVAL);
2688
+ e.start(), setTimeout(s, this.FPS_SAMPLE_INTERVAL);
2603
2689
  };
2604
2690
  n();
2605
2691
  }
@@ -2609,8 +2695,8 @@ class qi extends ki {
2609
2695
  e.start();
2610
2696
  }), this.on("playCycleEnd", () => {
2611
2697
  e.stop();
2612
- const a = e.getReport();
2613
- this.track("FPS Performance", { ...a, fpsType: "playCycleStart->playCycleEnd" });
2698
+ const s = e.getReport();
2699
+ this.track("FPS Performance", { ...s, fpsType: "playCycleStart->playCycleEnd" });
2614
2700
  });
2615
2701
  }
2616
2702
  getExtraUiInteractionData() {
@@ -2621,17 +2707,17 @@ class qi extends ki {
2621
2707
  }
2622
2708
  async deviceInfo() {
2623
2709
  var g;
2624
- const e = new N(navigator.userAgent), a = Si(), n = await Ii(), r = e.getBrowser(), s = e.getDevice(), h = e.getOS();
2710
+ const e = new D(navigator.userAgent), s = Si(), n = await Ii(), o = e.getBrowser(), a = e.getDevice(), h = e.getOS();
2625
2711
  return {
2626
- browserName: r.name,
2627
- browserVersion: r.version,
2712
+ browserName: o.name,
2713
+ browserVersion: o.version,
2628
2714
  connection: (g = navigator.connection) == null ? void 0 : g.effectiveType,
2629
- deviceName: s.model,
2630
- deviceType: s.type,
2631
- isMobile: ["mobile", "tablet"].includes(s.type ?? ""),
2632
- isWebGLSupported: a,
2715
+ deviceName: a.model,
2716
+ deviceType: a.type,
2717
+ isMobile: ["mobile", "tablet"].includes(a.type ?? ""),
2718
+ isWebGLSupported: s,
2633
2719
  isWebPSupported: n,
2634
- manufacturer: s.vendor,
2720
+ manufacturer: a.vendor,
2635
2721
  operatingSystem: h.name,
2636
2722
  operatingSystemVersion: h.version,
2637
2723
  orientation: Je(),
@@ -2646,7 +2732,7 @@ class qi extends ki {
2646
2732
  };
2647
2733
  }
2648
2734
  }
2649
- _e = new WeakMap(), ae = new WeakMap(), ne = new WeakMap(), se = new WeakMap(), ke = new WeakMap(), Fe = new WeakMap(), Ee = new WeakMap(), De = new WeakMap();
2735
+ _e = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), ae = new WeakMap(), ve = new WeakMap(), Fe = new WeakMap(), Ee = new WeakMap(), Re = new WeakMap();
2650
2736
  let Oe;
2651
2737
  const Ti = new Uint8Array(16);
2652
2738
  function Ai() {
@@ -2667,34 +2753,34 @@ function Ot(i, t, e) {
2667
2753
  if (xt.randomUUID && !t && !i)
2668
2754
  return xt.randomUUID();
2669
2755
  i = i || {};
2670
- const a = i.random || (i.rng || Ai)();
2671
- if (a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, t) {
2756
+ const s = i.random || (i.rng || Ai)();
2757
+ if (s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, t) {
2672
2758
  e = e || 0;
2673
2759
  for (let n = 0; n < 16; ++n)
2674
- t[e + n] = a[n];
2760
+ t[e + n] = s[n];
2675
2761
  return t;
2676
2762
  }
2677
- return Pi(a);
2763
+ return Pi(s);
2678
2764
  }
2679
- class Rt {
2765
+ class Nt {
2680
2766
  constructor(t, e) {
2681
- b(this, "config");
2682
- b(this, "sdkConfig");
2767
+ p(this, "config");
2768
+ p(this, "sdkConfig");
2683
2769
  this.config = t, this.sdkConfig = e;
2684
2770
  }
2685
2771
  }
2686
2772
  const Ut = 25, Lt = 1e4;
2687
- var oe, re, ce, V, Ce;
2688
- class Gi extends Rt {
2773
+ var oe, re, ce, H, Ce;
2774
+ class qi extends Nt {
2689
2775
  constructor(...e) {
2690
2776
  super(...e);
2691
- C(this, oe, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
2692
- C(this, re, void 0);
2693
- C(this, ce, void 0);
2694
- C(this, V, []);
2695
- C(this, Ce, void 0);
2696
- b(this, "processQueueForced");
2697
- v(this, re, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime()), v(this, V, []), v(this, Ce, Ot()), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, oe), {
2777
+ M(this, oe, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
2778
+ M(this, re, void 0);
2779
+ M(this, ce, void 0);
2780
+ M(this, H, []);
2781
+ M(this, Ce, void 0);
2782
+ p(this, "processQueueForced");
2783
+ k(this, re, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime()), k(this, H, []), k(this, Ce, Ot()), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, oe), {
2698
2784
  method: "OPTIONS"
2699
2785
  }).catch(ct), this.subscribe();
2700
2786
  }
@@ -2702,10 +2788,10 @@ class Gi extends Rt {
2702
2788
  window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
2703
2789
  }
2704
2790
  schedule() {
2705
- y(this, ce) && clearTimeout(y(this, ce)), v(this, ce, window.setTimeout(() => this.processQueue(), Lt));
2791
+ y(this, ce) && clearTimeout(y(this, ce)), k(this, ce, window.setTimeout(() => this.processQueue(), Lt));
2706
2792
  }
2707
2793
  send(e) {
2708
- v(this, re, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime());
2794
+ k(this, re, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime());
2709
2795
  try {
2710
2796
  navigator.sendBeacon(y(this, oe), JSON.stringify(e));
2711
2797
  } catch {
@@ -2721,49 +2807,49 @@ class Gi extends Rt {
2721
2807
  this.schedule();
2722
2808
  }
2723
2809
  addToQueue(e) {
2724
- y(this, V).push(e), this.processQueue();
2810
+ y(this, H).push(e), this.processQueue();
2725
2811
  }
2726
2812
  processQueue(e = !1) {
2727
- if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this, V).length < Ut && /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime() - y(this, re) < Lt))
2728
- for (; y(this, V).length; ) {
2729
- const a = y(this, V).splice(0, Ut).map((n) => ({
2813
+ if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this, H).length < Ut && /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime() - y(this, re) < Lt))
2814
+ for (; y(this, H).length; ) {
2815
+ const s = y(this, H).splice(0, Ut).map((n) => ({
2730
2816
  ...n,
2731
2817
  sessionID: y(this, Ce),
2732
2818
  userID: this.sdkConfig.api.user
2733
2819
  }));
2734
- this.send(a);
2820
+ this.send(s);
2735
2821
  }
2736
2822
  }
2737
- track(e, a) {
2823
+ track(e, s) {
2738
2824
  this.addToQueue({
2739
2825
  eventName: e,
2740
- eventParams: a,
2826
+ eventParams: s,
2741
2827
  eventTimestamp: /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime(),
2742
2828
  eventUUID: Ot()
2743
2829
  });
2744
2830
  }
2745
2831
  }
2746
- oe = new WeakMap(), re = new WeakMap(), ce = new WeakMap(), V = new WeakMap(), Ce = new WeakMap();
2832
+ oe = new WeakMap(), re = new WeakMap(), ce = new WeakMap(), H = new WeakMap(), Ce = new WeakMap();
2747
2833
  const Oi = U("LoggingTracker", "color:#000000;font-weight:bold;");
2748
- class Wi extends Rt {
2834
+ class Wi extends Nt {
2749
2835
  track(t, e) {
2750
2836
  Oi(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
2751
2837
  }
2752
2838
  }
2753
2839
  export {
2754
2840
  _i as BasicPlugin,
2755
- j as CasinoPlugin,
2841
+ $ as CasinoPlugin,
2756
2842
  Fi as DebuggingPlugin,
2757
- Di as GigPlugin,
2758
- zi as KalambaBullseyePlugin,
2759
- qi as KalambaStargazerPlugin,
2760
- Gi as KalambaStargazerTracker,
2843
+ Ri as GigPlugin,
2844
+ Vi as KalambaBullseyePlugin,
2845
+ zi as KalambaStargazerPlugin,
2846
+ qi as KalambaStargazerTracker,
2761
2847
  Wi as LoggingTracker,
2762
- Ni as OryxPlugin,
2763
- Ri as PariplayPlugin,
2764
- Hi as RelaxFEIMPlugin,
2848
+ Di as OryxPlugin,
2849
+ Ni as PariplayPlugin,
2850
+ Gi as RelaxFEIMPlugin,
2765
2851
  Xt as RgsPlygin,
2766
- ki as TelemetryPlugin,
2767
- Rt as Tracker,
2768
- Vi as TukoPlugin
2852
+ vi as TelemetryPlugin,
2853
+ Nt as Tracker,
2854
+ Hi as TukoPlugin
2769
2855
  };