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