@kalamba/sdk 0.6.1 → 0.8.0

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