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