@everymatrix/casino-header-controller 1.73.1 → 1.74.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.
@@ -0,0 +1,1380 @@
1
+ import { b as rt, $ as it, O as st, S as lt, i as ct, s as dt, f as H, d as ut, n as Xe, e as de, h as ue, x as D, k as O, j as fe, v as z, l as ft, o as pt, y as Oe, p as ht, w as we, A as be, r as mt, B as Ne, C as nt, t as gt, J as yt, K as vt, L as wt, c as bt, I as Bt } from "./CasinoHamburgerMenu-DnyTkCn0.js";
2
+ function We(f, n) {
3
+ rt(f, n);
4
+ }
5
+ function Tt(f) {
6
+ it.set(f);
7
+ }
8
+ const Ye = {
9
+ en: {
10
+ Title: "Your Balance",
11
+ Total: "Total Balance",
12
+ Real: "Cash Balance",
13
+ Bonus: "Bonus Balance",
14
+ Credit: "Credit Balance",
15
+ Casino: "Casino",
16
+ Sports: "Sports",
17
+ DepositButton: "Deposit",
18
+ Loading: "Loading ..."
19
+ },
20
+ "zh-hk": {
21
+ Title: "您的結餘",
22
+ Total: "總結餘",
23
+ Real: "現金結餘",
24
+ Bonus: "紅利結餘",
25
+ Credit: "信用結餘",
26
+ Casino: "賭場",
27
+ Sports: "體育",
28
+ DepositButton: "存款",
29
+ Loading: "載入中 ..."
30
+ },
31
+ de: {
32
+ Title: "Ihr Guthaben",
33
+ Total: "Gesamtguthaben",
34
+ Real: "Barguthaben",
35
+ Bonus: "Bonusguthaben",
36
+ Credit: "Kreditguthaben",
37
+ Casino: "Casino",
38
+ Sports: "Sport",
39
+ DepositButton: "Einzahlen",
40
+ Loading: "Wird geladen ..."
41
+ },
42
+ it: {
43
+ Title: "Il tuo saldo",
44
+ Total: "Saldo totale",
45
+ Real: "Saldo in contanti",
46
+ Bonus: "Saldo bonus",
47
+ Credit: "Saldo di credito",
48
+ Casino: "Casinò",
49
+ Sports: "Sport",
50
+ DepositButton: "Deposita",
51
+ Loading: "Caricamento ..."
52
+ },
53
+ fr: {
54
+ Title: "Votre solde",
55
+ Total: "Solde total",
56
+ Real: "Solde en espèces",
57
+ Bonus: "Solde bonus",
58
+ Credit: "Solde de crédit",
59
+ Casino: "Casino",
60
+ Sports: "Sports",
61
+ DepositButton: "Dépôt",
62
+ Loading: "Chargement ..."
63
+ },
64
+ es: {
65
+ Title: "Tu saldo",
66
+ Total: "Saldo total",
67
+ Real: "Saldo en efectivo",
68
+ Bonus: "Saldo de bono",
69
+ Credit: "Saldo de crédito",
70
+ Casino: "Casino",
71
+ Sports: "Deportes",
72
+ DepositButton: "Depósito",
73
+ Loading: "Cargando ..."
74
+ },
75
+ tr: {
76
+ Title: "Bakiyeniz",
77
+ Total: "Toplam Bakiye",
78
+ Real: "Nakit Bakiye",
79
+ Bonus: "Bonus Bakiyesi",
80
+ Credit: "Kredi Bakiyesi",
81
+ Casino: "Kumarhane",
82
+ Sports: "Spor",
83
+ DepositButton: "Yatır",
84
+ Loading: "Yükleniyor ..."
85
+ },
86
+ ru: {
87
+ Title: "Ваш баланс",
88
+ Total: "Общий баланс",
89
+ Real: "Денежный баланс",
90
+ Bonus: "Бонусный баланс",
91
+ Credit: "Кредитный баланс",
92
+ Casino: "Казино",
93
+ Sports: "Спорт",
94
+ DepositButton: "Депозит",
95
+ Loading: "Загружается ..."
96
+ },
97
+ ro: {
98
+ Title: "Soldul tău",
99
+ Total: "Sold total",
100
+ Real: "Sold în numerar",
101
+ Bonus: "Sold bonus",
102
+ Credit: "Sold credit",
103
+ Casino: "Cazinou",
104
+ Sports: "Sporturi",
105
+ DepositButton: "Depozit",
106
+ Loading: "Se încarcă ..."
107
+ },
108
+ hr: {
109
+ Title: "Vaš saldo",
110
+ Total: "Ukupni saldo",
111
+ Real: "Gotovinski saldo",
112
+ Bonus: "Bonus saldo",
113
+ Credit: "Kreditni saldo",
114
+ Casino: "Casino",
115
+ Sports: "Sportovi",
116
+ DepositButton: "Depozit",
117
+ Loading: "Učitavanje ..."
118
+ },
119
+ hu: {
120
+ Title: "Az egyenleged",
121
+ Total: "Teljes egyenleg",
122
+ Real: "Készpénz egyenleg",
123
+ Bonus: "Bónusz egyenleg",
124
+ Credit: "Hitel egyenleg",
125
+ Casino: "Kaszinó",
126
+ Sports: "Sport",
127
+ DepositButton: "Befizetés",
128
+ Loading: "Betöltés ..."
129
+ },
130
+ pl: {
131
+ Title: "Twoje saldo",
132
+ Total: "Całkowite saldo",
133
+ Real: "Saldo gotówkowe",
134
+ Bonus: "Saldo bonusowe",
135
+ Credit: "Saldo kredytowe",
136
+ Casino: "Kasyno",
137
+ Sports: "Sport",
138
+ DepositButton: "Wpłać",
139
+ Loading: "Ładowanie ..."
140
+ },
141
+ pt: {
142
+ Title: "Seu Saldo",
143
+ Total: "Saldo Total",
144
+ Real: "Saldo em Dinheiro",
145
+ Bonus: "Saldo de Bônus",
146
+ Credit: "Saldo de Crédito",
147
+ Casino: "Cassino",
148
+ Sports: "Esportes",
149
+ DepositButton: "Depositar",
150
+ Loading: "Carregando ..."
151
+ },
152
+ sl: {
153
+ Title: "Vaš saldo",
154
+ Total: "Skupni saldo",
155
+ Real: "Gotovinski saldo",
156
+ Bonus: "Bonus saldo",
157
+ Credit: "Kreditni saldo",
158
+ Casino: "Kasino",
159
+ Sports: "Šport",
160
+ DepositButton: "Depozit",
161
+ Loading: "Nalaganje ..."
162
+ },
163
+ sr: {
164
+ Title: "Vaš saldo",
165
+ Total: "Ukupan saldo",
166
+ Real: "Gotovinski saldo",
167
+ Bonus: "Bonus saldo",
168
+ Credit: "Kreditni saldo",
169
+ Casino: "Kasino",
170
+ Sports: "Sport",
171
+ DepositButton: "Depozit",
172
+ Loading: "Učitavanje ..."
173
+ },
174
+ "pt-br": {
175
+ Title: "Seu Saldo",
176
+ Total: "Saldo Total",
177
+ Real: "Saldo em Dinheiro",
178
+ Bonus: "Saldo de Bônus",
179
+ Credit: "Saldo de Crédito",
180
+ Casino: "Cassino",
181
+ Sports: "Esportes",
182
+ DepositButton: "Depositar",
183
+ Loading: "Carregando ..."
184
+ },
185
+ "es-mx": {
186
+ Title: "Tu saldo",
187
+ Total: "Saldo total",
188
+ Real: "Saldo en efectivo",
189
+ Bonus: "Saldo de bono",
190
+ Credit: "Saldo de crédito",
191
+ Casino: "Casino",
192
+ Sports: "Deportes",
193
+ DepositButton: "Depósito",
194
+ Loading: "Cargando ..."
195
+ },
196
+ "en-us": {
197
+ Title: "Your Balance",
198
+ Total: "Total Balance",
199
+ Real: "Cash Balance",
200
+ Bonus: "Bonus Balance",
201
+ Credit: "Credit Balance",
202
+ Casino: "Casino",
203
+ Sports: "Sports",
204
+ DepositButton: "Deposit",
205
+ Loading: "Loading ..."
206
+ }
207
+ };
208
+ var Ke = { exports: {} };
209
+ /** @license
210
+ * eventsource.js
211
+ * Available under MIT License (MIT)
212
+ * https://github.com/Yaffle/EventSource/
213
+ */
214
+ (function(f, n) {
215
+ (function(a) {
216
+ var m = a.setTimeout, u = a.clearTimeout, l = a.XMLHttpRequest, y = a.XDomainRequest, p = a.ActiveXObject, b = a.EventSource, R = a.document, B = a.Promise, T = a.fetch, x = a.Response, E = a.TextDecoder, M = a.TextEncoder, J = a.AbortController;
217
+ if (typeof window < "u" && typeof R < "u" && !("readyState" in R) && R.body == null && (R.readyState = "loading", window.addEventListener("load", function(e) {
218
+ R.readyState = "complete";
219
+ }, !1)), l == null && p != null && (l = function() {
220
+ return new p("Microsoft.XMLHTTP");
221
+ }), Object.create == null && (Object.create = function(e) {
222
+ function t() {
223
+ }
224
+ return t.prototype = e, new t();
225
+ }), Date.now || (Date.now = function() {
226
+ return (/* @__PURE__ */ new Date()).getTime();
227
+ }), J == null) {
228
+ var ne = T;
229
+ T = function(e, t) {
230
+ var o = t.signal;
231
+ return ne(e, { headers: t.headers, credentials: t.credentials, cache: t.cache }).then(function(r) {
232
+ var d = r.body.getReader();
233
+ return o._reader = d, o._aborted && o._reader.cancel(), {
234
+ status: r.status,
235
+ statusText: r.statusText,
236
+ headers: r.headers,
237
+ body: {
238
+ getReader: function() {
239
+ return d;
240
+ }
241
+ }
242
+ };
243
+ });
244
+ }, J = function() {
245
+ this.signal = {
246
+ _reader: null,
247
+ _aborted: !1
248
+ }, this.abort = function() {
249
+ this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
250
+ };
251
+ };
252
+ }
253
+ function Q() {
254
+ this.bitsNeeded = 0, this.codePoint = 0;
255
+ }
256
+ Q.prototype.decode = function(e) {
257
+ function t(C, A, g) {
258
+ if (g === 1)
259
+ return C >= 128 >> A && C << A <= 2047;
260
+ if (g === 2)
261
+ return C >= 2048 >> A && C << A <= 55295 || C >= 57344 >> A && C << A <= 65535;
262
+ if (g === 3)
263
+ return C >= 65536 >> A && C << A <= 1114111;
264
+ throw new Error();
265
+ }
266
+ function o(C, A) {
267
+ if (C === 6 * 1)
268
+ return A >> 6 > 15 ? 3 : A > 31 ? 2 : 1;
269
+ if (C === 6 * 2)
270
+ return A > 15 ? 3 : 2;
271
+ if (C === 6 * 3)
272
+ return 3;
273
+ throw new Error();
274
+ }
275
+ for (var r = 65533, d = "", i = this.bitsNeeded, h = this.codePoint, _ = 0; _ < e.length; _ += 1) {
276
+ var v = e[_];
277
+ i !== 0 && (v < 128 || v > 191 || !t(h << 6 | v & 63, i - 6, o(i, h))) && (i = 0, h = r, d += String.fromCharCode(h)), i === 0 ? (v >= 0 && v <= 127 ? (i = 0, h = v) : v >= 192 && v <= 223 ? (i = 6 * 1, h = v & 31) : v >= 224 && v <= 239 ? (i = 6 * 2, h = v & 15) : v >= 240 && v <= 247 ? (i = 6 * 3, h = v & 7) : (i = 0, h = r), i !== 0 && !t(h, i, o(i, h)) && (i = 0, h = r)) : (i -= 6, h = h << 6 | v & 63), i === 0 && (h <= 65535 ? d += String.fromCharCode(h) : (d += String.fromCharCode(55296 + (h - 65535 - 1 >> 10)), d += String.fromCharCode(56320 + (h - 65535 - 1 & 1023))));
278
+ }
279
+ return this.bitsNeeded = i, this.codePoint = h, d;
280
+ };
281
+ var G = function() {
282
+ try {
283
+ return new E().decode(new M().encode("test"), { stream: !0 }) === "test";
284
+ } catch (e) {
285
+ console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
286
+ }
287
+ return !1;
288
+ };
289
+ (E == null || M == null || !G()) && (E = Q);
290
+ var S = function() {
291
+ };
292
+ function w(e) {
293
+ this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = S, this.onload = S, this.onerror = S, this.onreadystatechange = S, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = S;
294
+ }
295
+ w.prototype.open = function(e, t) {
296
+ this._abort(!0);
297
+ var o = this, r = this._xhr, d = 1, i = 0;
298
+ this._abort = function(g) {
299
+ o._sendTimeout !== 0 && (u(o._sendTimeout), o._sendTimeout = 0), (d === 1 || d === 2 || d === 3) && (d = 4, r.onload = S, r.onerror = S, r.onabort = S, r.onprogress = S, r.onreadystatechange = S, r.abort(), i !== 0 && (u(i), i = 0), g || (o.readyState = 4, o.onabort(null), o.onreadystatechange())), d = 0;
300
+ };
301
+ var h = function() {
302
+ if (d === 1) {
303
+ var g = 0, F = "", ie = void 0;
304
+ if ("contentType" in r)
305
+ g = 200, F = "OK", ie = r.contentType;
306
+ else
307
+ try {
308
+ g = r.status, F = r.statusText, ie = r.getResponseHeader("Content-Type");
309
+ } catch {
310
+ g = 0, F = "", ie = void 0;
311
+ }
312
+ g !== 0 && (d = 2, o.readyState = 2, o.status = g, o.statusText = F, o._contentType = ie, o.onreadystatechange());
313
+ }
314
+ }, _ = function() {
315
+ if (h(), d === 2 || d === 3) {
316
+ d = 3;
317
+ var g = "";
318
+ try {
319
+ g = r.responseText;
320
+ } catch {
321
+ }
322
+ o.readyState = 3, o.responseText = g, o.onprogress();
323
+ }
324
+ }, v = function(g, F) {
325
+ if ((F == null || F.preventDefault == null) && (F = {
326
+ preventDefault: S
327
+ }), _(), d === 1 || d === 2 || d === 3) {
328
+ if (d = 4, i !== 0 && (u(i), i = 0), o.readyState = 4, g === "load")
329
+ o.onload(F);
330
+ else if (g === "error")
331
+ o.onerror(F);
332
+ else if (g === "abort")
333
+ o.onabort(F);
334
+ else
335
+ throw new TypeError();
336
+ o.onreadystatechange();
337
+ }
338
+ }, C = function(g) {
339
+ r != null && (r.readyState === 4 ? (!("onload" in r) || !("onerror" in r) || !("onabort" in r)) && v(r.responseText === "" ? "error" : "load", g) : r.readyState === 3 ? "onprogress" in r || _() : r.readyState === 2 && h());
340
+ }, A = function() {
341
+ i = m(function() {
342
+ A();
343
+ }, 500), r.readyState === 3 && _();
344
+ };
345
+ "onload" in r && (r.onload = function(g) {
346
+ v("load", g);
347
+ }), "onerror" in r && (r.onerror = function(g) {
348
+ v("error", g);
349
+ }), "onabort" in r && (r.onabort = function(g) {
350
+ v("abort", g);
351
+ }), "onprogress" in r && (r.onprogress = _), "onreadystatechange" in r && (r.onreadystatechange = function(g) {
352
+ C(g);
353
+ }), ("contentType" in r || !("ontimeout" in l.prototype)) && (t += (t.indexOf("?") === -1 ? "?" : "&") + "padding=true"), r.open(e, t, !0), "readyState" in r && (i = m(function() {
354
+ A();
355
+ }, 0));
356
+ }, w.prototype.abort = function() {
357
+ this._abort(!1);
358
+ }, w.prototype.getResponseHeader = function(e) {
359
+ return this._contentType;
360
+ }, w.prototype.setRequestHeader = function(e, t) {
361
+ var o = this._xhr;
362
+ "setRequestHeader" in o && o.setRequestHeader(e, t);
363
+ }, w.prototype.getAllResponseHeaders = function() {
364
+ return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
365
+ }, w.prototype.send = function() {
366
+ if ((!("ontimeout" in l.prototype) || !("sendAsBinary" in l.prototype) && !("mozAnon" in l.prototype)) && R != null && R.readyState != null && R.readyState !== "complete") {
367
+ var e = this;
368
+ e._sendTimeout = m(function() {
369
+ e._sendTimeout = 0, e.send();
370
+ }, 4);
371
+ return;
372
+ }
373
+ var t = this._xhr;
374
+ "withCredentials" in t && (t.withCredentials = this.withCredentials);
375
+ try {
376
+ t.send(void 0);
377
+ } catch (o) {
378
+ throw o;
379
+ }
380
+ };
381
+ function I(e) {
382
+ return e.replace(/[A-Z]/g, function(t) {
383
+ return String.fromCharCode(t.charCodeAt(0) + 32);
384
+ });
385
+ }
386
+ function L(e) {
387
+ for (var t = /* @__PURE__ */ Object.create(null), o = e.split(`\r
388
+ `), r = 0; r < o.length; r += 1) {
389
+ var d = o[r], i = d.split(": "), h = i.shift(), _ = i.join(": ");
390
+ t[I(h)] = _;
391
+ }
392
+ this._map = t;
393
+ }
394
+ L.prototype.get = function(e) {
395
+ return this._map[I(e)];
396
+ }, l != null && l.HEADERS_RECEIVED == null && (l.HEADERS_RECEIVED = 2);
397
+ function Z() {
398
+ }
399
+ Z.prototype.open = function(e, t, o, r, d, i, h) {
400
+ e.open("GET", d);
401
+ var _ = 0;
402
+ e.onprogress = function() {
403
+ var C = e.responseText, A = C.slice(_);
404
+ _ += A.length, o(A);
405
+ }, e.onerror = function(C) {
406
+ C.preventDefault(), r(new Error("NetworkError"));
407
+ }, e.onload = function() {
408
+ r(null);
409
+ }, e.onabort = function() {
410
+ r(null);
411
+ }, e.onreadystatechange = function() {
412
+ if (e.readyState === l.HEADERS_RECEIVED) {
413
+ var C = e.status, A = e.statusText, g = e.getResponseHeader("Content-Type"), F = e.getAllResponseHeaders();
414
+ t(C, A, g, new L(F));
415
+ }
416
+ }, e.withCredentials = i;
417
+ for (var v in h)
418
+ Object.prototype.hasOwnProperty.call(h, v) && e.setRequestHeader(v, h[v]);
419
+ return e.send(), e;
420
+ };
421
+ function ae(e) {
422
+ this._headers = e;
423
+ }
424
+ ae.prototype.get = function(e) {
425
+ return this._headers.get(e);
426
+ };
427
+ function oe() {
428
+ }
429
+ oe.prototype.open = function(e, t, o, r, d, i, h) {
430
+ var _ = null, v = new J(), C = v.signal, A = new E();
431
+ return T(d, {
432
+ headers: h,
433
+ credentials: i ? "include" : "same-origin",
434
+ signal: C,
435
+ cache: "no-store"
436
+ }).then(function(g) {
437
+ return _ = g.body.getReader(), t(g.status, g.statusText, g.headers.get("Content-Type"), new ae(g.headers)), new B(function(F, ie) {
438
+ var xe = function() {
439
+ _.read().then(function(q) {
440
+ if (q.done)
441
+ F(void 0);
442
+ else {
443
+ var U = A.decode(q.value, { stream: !0 });
444
+ o(U), xe();
445
+ }
446
+ }).catch(function(q) {
447
+ ie(q);
448
+ });
449
+ };
450
+ xe();
451
+ });
452
+ }).catch(function(g) {
453
+ if (g.name !== "AbortError")
454
+ return g;
455
+ }).then(function(g) {
456
+ r(g);
457
+ }), {
458
+ abort: function() {
459
+ _?.cancel(), v.abort();
460
+ }
461
+ };
462
+ };
463
+ function X() {
464
+ this._listeners = /* @__PURE__ */ Object.create(null);
465
+ }
466
+ function pe(e) {
467
+ m(function() {
468
+ throw e;
469
+ }, 0);
470
+ }
471
+ X.prototype.dispatchEvent = function(e) {
472
+ e.target = this;
473
+ var t = this._listeners[e.type];
474
+ if (t != null)
475
+ for (var o = t.length, r = 0; r < o; r += 1) {
476
+ var d = t[r];
477
+ try {
478
+ typeof d.handleEvent == "function" ? d.handleEvent(e) : d.call(this, e);
479
+ } catch (i) {
480
+ pe(i);
481
+ }
482
+ }
483
+ }, X.prototype.addEventListener = function(e, t) {
484
+ e = String(e);
485
+ var o = this._listeners, r = o[e];
486
+ r == null && (r = [], o[e] = r);
487
+ for (var d = !1, i = 0; i < r.length; i += 1)
488
+ r[i] === t && (d = !0);
489
+ d || r.push(t);
490
+ }, X.prototype.removeEventListener = function(e, t) {
491
+ e = String(e);
492
+ var o = this._listeners, r = o[e];
493
+ if (r != null) {
494
+ for (var d = [], i = 0; i < r.length; i += 1)
495
+ r[i] !== t && d.push(r[i]);
496
+ d.length === 0 ? delete o[e] : o[e] = d;
497
+ }
498
+ };
499
+ function c(e) {
500
+ this.type = e, this.target = void 0;
501
+ }
502
+ function he(e, t) {
503
+ c.call(this, e), this.data = t.data, this.lastEventId = t.lastEventId;
504
+ }
505
+ he.prototype = Object.create(c.prototype);
506
+ function Ae(e, t) {
507
+ c.call(this, e), this.status = t.status, this.statusText = t.statusText, this.headers = t.headers;
508
+ }
509
+ Ae.prototype = Object.create(c.prototype);
510
+ function Le(e, t) {
511
+ c.call(this, e), this.error = t.error;
512
+ }
513
+ Le.prototype = Object.create(c.prototype);
514
+ var _e = -1, ee = 0, me = 1, re = 2, Be = -1, te = 0, ye = 1, Re = 2, Ie = 3, Me = /^text\/event\-stream(;.*)?$/i, je = 1e3, He = 18e6, Ee = function(e, t) {
515
+ var o = e == null ? t : parseInt(e, 10);
516
+ return o !== o && (o = t), Te(o);
517
+ }, Te = function(e) {
518
+ return Math.min(Math.max(e, je), He);
519
+ }, ge = function(e, t, o) {
520
+ try {
521
+ typeof t == "function" && t.call(e, o);
522
+ } catch (r) {
523
+ pe(r);
524
+ }
525
+ };
526
+ function K(e, t) {
527
+ X.call(this), t = t || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, Pe(this, e, t);
528
+ }
529
+ function ze() {
530
+ return l != null && "withCredentials" in l.prototype || y == null ? new l() : new y();
531
+ }
532
+ var Ue = T != null && x != null && "body" in x.prototype;
533
+ function Pe(e, t, o) {
534
+ t = String(t);
535
+ var r = !!o.withCredentials, d = o.lastEventIdQueryParameterName || "lastEventId", i = Te(1e3), h = Ee(o.heartbeatTimeout, 45e3), _ = "", v = i, C = !1, A = 0, g = o.headers || {}, F = o.Transport, ie = Ue && F == null ? void 0 : new w(F != null ? new F() : ze()), xe = F != null && typeof F != "string" ? new F() : ie == null ? new oe() : new Z(), q = void 0, U = 0, $ = _e, Se = "", Fe = "", se = "", ke = "", P = te, Ve = 0, ve = 0, at = function(N, k, W, Y) {
536
+ if ($ === ee)
537
+ if (N === 200 && W != null && Me.test(W)) {
538
+ $ = me, C = Date.now(), v = i, e.readyState = me;
539
+ var V = new Ae("open", {
540
+ status: N,
541
+ statusText: k,
542
+ headers: Y
543
+ });
544
+ e.dispatchEvent(V), ge(e, e.onopen, V);
545
+ } else {
546
+ var j = "";
547
+ N !== 200 ? (k && (k = k.replace(/\s+/g, " ")), j = "EventSource's response has a status " + N + " " + k + " that is not 200. Aborting the connection.") : j = "EventSource's response has a Content-Type specifying an unsupported type: " + (W == null ? "-" : W.replace(/\s+/g, " ")) + ". Aborting the connection.", Ge();
548
+ var V = new Ae("error", {
549
+ status: N,
550
+ statusText: k,
551
+ headers: Y
552
+ });
553
+ e.dispatchEvent(V), ge(e, e.onerror, V), console.error(j);
554
+ }
555
+ }, ot = function(N) {
556
+ if ($ === me) {
557
+ for (var k = -1, W = 0; W < N.length; W += 1) {
558
+ var Y = N.charCodeAt(W);
559
+ (Y === 10 || Y === 13) && (k = W);
560
+ }
561
+ var V = (k !== -1 ? ke : "") + N.slice(0, k + 1);
562
+ ke = (k === -1 ? ke : "") + N.slice(k + 1), N !== "" && (C = Date.now(), A += N.length);
563
+ for (var j = 0; j < V.length; j += 1) {
564
+ var Y = V.charCodeAt(j);
565
+ if (P === Be && Y === 10)
566
+ P = te;
567
+ else if (P === Be && (P = te), Y === 13 || Y === 10) {
568
+ if (P !== te) {
569
+ P === ye && (ve = j + 1);
570
+ var le = V.slice(Ve, ve - 1), ce = V.slice(ve + (ve < j && V.charCodeAt(ve) === 32 ? 1 : 0), j);
571
+ le === "data" ? (Se += `
572
+ `, Se += ce) : le === "id" ? Fe = ce : le === "event" ? se = ce : le === "retry" ? (i = Ee(ce, i), v = i) : le === "heartbeatTimeout" && (h = Ee(ce, h), U !== 0 && (u(U), U = m(function() {
573
+ De();
574
+ }, h)));
575
+ }
576
+ if (P === te) {
577
+ if (Se !== "") {
578
+ _ = Fe, se === "" && (se = "message");
579
+ var Ce = new he(se, {
580
+ data: Se.slice(1),
581
+ lastEventId: Fe
582
+ });
583
+ if (e.dispatchEvent(Ce), se === "open" ? ge(e, e.onopen, Ce) : se === "message" ? ge(e, e.onmessage, Ce) : se === "error" && ge(e, e.onerror, Ce), $ === re)
584
+ return;
585
+ }
586
+ Se = "", se = "";
587
+ }
588
+ P = Y === 13 ? Be : te;
589
+ } else
590
+ P === te && (Ve = j, P = ye), P === ye ? Y === 58 && (ve = j + 1, P = Re) : P === Re && (P = Ie);
591
+ }
592
+ }
593
+ }, qe = function(N) {
594
+ if ($ === me || $ === ee) {
595
+ $ = _e, U !== 0 && (u(U), U = 0), U = m(function() {
596
+ De();
597
+ }, v), v = Te(Math.min(i * 16, v * 2)), e.readyState = ee;
598
+ var k = new Le("error", { error: N });
599
+ e.dispatchEvent(k), ge(e, e.onerror, k), N != null && console.error(N);
600
+ }
601
+ }, Ge = function() {
602
+ $ = re, q != null && (q.abort(), q = void 0), U !== 0 && (u(U), U = 0), e.readyState = re;
603
+ }, De = function() {
604
+ if (U = 0, $ !== _e) {
605
+ if (!C && q != null)
606
+ qe(new Error("No activity within " + h + " milliseconds. " + ($ === ee ? "No response received." : A + " chars received.") + " Reconnecting.")), q != null && (q.abort(), q = void 0);
607
+ else {
608
+ var N = Math.max((C || Date.now()) + h - Date.now(), 1);
609
+ C = !1, U = m(function() {
610
+ De();
611
+ }, N);
612
+ }
613
+ return;
614
+ }
615
+ C = !1, A = 0, U = m(function() {
616
+ De();
617
+ }, h), $ = ee, Se = "", se = "", Fe = _, ke = "", Ve = 0, ve = 0, P = te;
618
+ var k = t;
619
+ if (t.slice(0, 5) !== "data:" && t.slice(0, 5) !== "blob:" && _ !== "") {
620
+ var W = t.indexOf("?");
621
+ k = W === -1 ? t : t.slice(0, W + 1) + t.slice(W + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(ce, Ce) {
622
+ return Ce === d ? "" : ce;
623
+ }), k += (t.indexOf("?") === -1 ? "?" : "&") + d + "=" + encodeURIComponent(_);
624
+ }
625
+ var Y = e.withCredentials, V = {};
626
+ V.Accept = "text/event-stream";
627
+ var j = e.headers;
628
+ if (j != null)
629
+ for (var le in j)
630
+ Object.prototype.hasOwnProperty.call(j, le) && (V[le] = j[le]);
631
+ try {
632
+ q = xe.open(ie, at, ot, qe, k, Y, V);
633
+ } catch (ce) {
634
+ throw Ge(), ce;
635
+ }
636
+ };
637
+ e.url = t, e.readyState = ee, e.withCredentials = r, e.headers = g, e._close = Ge, De();
638
+ }
639
+ K.prototype = Object.create(X.prototype), K.prototype.CONNECTING = ee, K.prototype.OPEN = me, K.prototype.CLOSED = re, K.prototype.close = function() {
640
+ this._close();
641
+ }, K.CONNECTING = ee, K.OPEN = me, K.CLOSED = re, K.prototype.withCredentials = void 0;
642
+ var s = b;
643
+ l != null && (b == null || !("withCredentials" in b.prototype)) && (s = K), function(e) {
644
+ {
645
+ var t = e(n);
646
+ t !== void 0 && (f.exports = t);
647
+ }
648
+ }(function(e) {
649
+ e.EventSourcePolyfill = K, e.NativeEventSource = b, e.EventSource = s;
650
+ });
651
+ })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : st : globalThis);
652
+ })(Ke, Ke.exports);
653
+ var St = Ke.exports;
654
+ function Ct(f) {
655
+ ut(f, "svelte-gv6dm2", '*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}');
656
+ }
657
+ function Je(f, n, a) {
658
+ const m = f.slice();
659
+ return m[49] = n[a], m;
660
+ }
661
+ function Qe(f, n, a) {
662
+ const m = f.slice();
663
+ return m[52] = n[a], m;
664
+ }
665
+ function At(f) {
666
+ let n, a = (
667
+ /*balances*/
668
+ (f[3].Total ? (
669
+ /*formatBalance*/
670
+ f[5](
671
+ /*balances*/
672
+ f[3].Total[0].amount
673
+ )
674
+ ) : "0") + ""
675
+ ), m, u, l, y, p, b, R, B = (
676
+ /*isModalDisplayed*/
677
+ f[2] && Ze(f)
678
+ );
679
+ return {
680
+ c() {
681
+ n = O("button"), m = be(a), u = fe(), l = O("span"), l.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>', y = fe(), B && B.c(), p = mt(), z(n, "class", "BalanceValue");
682
+ },
683
+ m(T, x) {
684
+ ue(T, n, x), D(n, m), D(n, u), D(n, l), ue(T, y, x), B && B.m(T, x), ue(T, p, x), b || (R = Oe(
685
+ n,
686
+ "click",
687
+ /*click_handler*/
688
+ f[23]
689
+ ), b = !0);
690
+ },
691
+ p(T, x) {
692
+ x[0] & /*balances*/
693
+ 8 && a !== (a = /*balances*/
694
+ (T[3].Total ? (
695
+ /*formatBalance*/
696
+ T[5](
697
+ /*balances*/
698
+ T[3].Total[0].amount
699
+ )
700
+ ) : "0") + "") && we(m, a), /*isModalDisplayed*/
701
+ T[2] ? B ? B.p(T, x) : (B = Ze(T), B.c(), B.m(p.parentNode, p)) : B && (B.d(1), B = null);
702
+ },
703
+ d(T) {
704
+ T && (de(n), de(y), de(p)), B && B.d(T), b = !1, R();
705
+ }
706
+ };
707
+ }
708
+ function _t(f) {
709
+ let n, a = (
710
+ /*$_*/
711
+ f[4]("Loading") + ""
712
+ ), m;
713
+ return {
714
+ c() {
715
+ n = O("p"), m = be(a);
716
+ },
717
+ m(u, l) {
718
+ ue(u, n, l), D(n, m);
719
+ },
720
+ p(u, l) {
721
+ l[0] & /*$_*/
722
+ 16 && a !== (a = /*$_*/
723
+ u[4]("Loading") + "") && we(m, a);
724
+ },
725
+ d(u) {
726
+ u && de(n);
727
+ }
728
+ };
729
+ }
730
+ function Ze(f) {
731
+ let n, a, m, u, l, y, p = (
732
+ /*$_*/
733
+ f[4]("Title") + ""
734
+ ), b, R, B, T, x, E, M = (
735
+ /*$_*/
736
+ f[4]("DepositButton") + ""
737
+ ), J, ne, Q, G = Ne(Object.keys(
738
+ /*balances*/
739
+ f[3]
740
+ )), S = [];
741
+ for (let w = 0; w < G.length; w += 1)
742
+ S[w] = et(Je(f, G, w));
743
+ return {
744
+ c() {
745
+ n = O("div"), a = O("button"), m = fe(), u = O("div"), l = O("div"), y = O("p"), b = be(p), R = fe(), B = O("div");
746
+ for (let w = 0; w < S.length; w += 1)
747
+ S[w].c();
748
+ T = fe(), x = O("div"), E = O("button"), J = be(M), z(a, "class", "BalanceModalClose"), z(y, "class", "BalanceModalTitle"), z(l, "class", "BalanceModalHeader"), z(B, "class", "BalanceModalBody"), z(E, "class", "BalanceModalAction"), z(x, "class", "BalanceModalFooter"), z(u, "class", "BalanceModal"), z(n, "class", "BalanceModalWrapper");
749
+ },
750
+ m(w, I) {
751
+ ue(w, n, I), D(n, a), D(n, m), D(n, u), D(u, l), D(l, y), D(y, b), D(u, R), D(u, B);
752
+ for (let L = 0; L < S.length; L += 1)
753
+ S[L] && S[L].m(B, null);
754
+ D(u, T), D(u, x), D(x, E), D(E, J), ne || (Q = [
755
+ Oe(
756
+ a,
757
+ "click",
758
+ /*click_handler_1*/
759
+ f[24]
760
+ ),
761
+ Oe(
762
+ E,
763
+ "click",
764
+ /*click_handler_2*/
765
+ f[25]
766
+ )
767
+ ], ne = !0);
768
+ },
769
+ p(w, I) {
770
+ if (I[0] & /*$_*/
771
+ 16 && p !== (p = /*$_*/
772
+ w[4]("Title") + "") && we(b, p), I[0] & /*balances, formatBalance, $_*/
773
+ 56) {
774
+ G = Ne(Object.keys(
775
+ /*balances*/
776
+ w[3]
777
+ ));
778
+ let L;
779
+ for (L = 0; L < G.length; L += 1) {
780
+ const Z = Je(w, G, L);
781
+ S[L] ? S[L].p(Z, I) : (S[L] = et(Z), S[L].c(), S[L].m(B, null));
782
+ }
783
+ for (; L < S.length; L += 1)
784
+ S[L].d(1);
785
+ S.length = G.length;
786
+ }
787
+ I[0] & /*$_*/
788
+ 16 && M !== (M = /*$_*/
789
+ w[4]("DepositButton") + "") && we(J, M);
790
+ },
791
+ d(w) {
792
+ w && de(n), nt(S, w), ne = !1, gt(Q);
793
+ }
794
+ };
795
+ }
796
+ function $e(f) {
797
+ let n, a, m = (
798
+ /*$_*/
799
+ f[4](
800
+ /*k*/
801
+ f[49]
802
+ ) + ""
803
+ ), u, l, y = (
804
+ /*b*/
805
+ (f[52].productType ? (
806
+ /*$_*/
807
+ f[4](
808
+ /*b*/
809
+ f[52].productType
810
+ )
811
+ ) : "") + ""
812
+ ), p, b, R, B, T = (
813
+ /*formatBalance*/
814
+ f[5](
815
+ /*b*/
816
+ f[52].amount
817
+ ) + ""
818
+ ), x;
819
+ return {
820
+ c() {
821
+ n = O("div"), a = O("p"), u = be(m), l = fe(), p = be(y), b = fe(), R = O("p"), B = O("span"), x = be(T), z(a, "class", "BalanceModalText"), z(B, "class", "BalanceModalAmount"), z(R, "class", "BalanceModalValue"), z(n, "class", "BalanceModalRowLine");
822
+ },
823
+ m(E, M) {
824
+ ue(E, n, M), D(n, a), D(a, u), D(a, l), D(a, p), D(n, b), D(n, R), D(R, B), D(B, x);
825
+ },
826
+ p(E, M) {
827
+ M[0] & /*$_, balances*/
828
+ 24 && m !== (m = /*$_*/
829
+ E[4](
830
+ /*k*/
831
+ E[49]
832
+ ) + "") && we(u, m), M[0] & /*balances, $_*/
833
+ 24 && y !== (y = /*b*/
834
+ (E[52].productType ? (
835
+ /*$_*/
836
+ E[4](
837
+ /*b*/
838
+ E[52].productType
839
+ )
840
+ ) : "") + "") && we(p, y), M[0] & /*balances*/
841
+ 8 && T !== (T = /*formatBalance*/
842
+ E[5](
843
+ /*b*/
844
+ E[52].amount
845
+ ) + "") && we(x, T);
846
+ },
847
+ d(E) {
848
+ E && de(n);
849
+ }
850
+ };
851
+ }
852
+ function et(f) {
853
+ let n, a, m = Ne(
854
+ /*balances*/
855
+ f[3][
856
+ /*k*/
857
+ f[49]
858
+ ]
859
+ ), u = [];
860
+ for (let l = 0; l < m.length; l += 1)
861
+ u[l] = $e(Qe(f, m, l));
862
+ return {
863
+ c() {
864
+ n = O("div");
865
+ for (let l = 0; l < u.length; l += 1)
866
+ u[l].c();
867
+ a = fe(), z(n, "class", "BalanceModalRowBoth");
868
+ },
869
+ m(l, y) {
870
+ ue(l, n, y);
871
+ for (let p = 0; p < u.length; p += 1)
872
+ u[p] && u[p].m(n, null);
873
+ D(n, a);
874
+ },
875
+ p(l, y) {
876
+ if (y[0] & /*formatBalance, balances, $_*/
877
+ 56) {
878
+ m = Ne(
879
+ /*balances*/
880
+ l[3][
881
+ /*k*/
882
+ l[49]
883
+ ]
884
+ );
885
+ let p;
886
+ for (p = 0; p < m.length; p += 1) {
887
+ const b = Qe(l, m, p);
888
+ u[p] ? u[p].p(b, y) : (u[p] = $e(b), u[p].c(), u[p].m(n, a));
889
+ }
890
+ for (; p < u.length; p += 1)
891
+ u[p].d(1);
892
+ u.length = m.length;
893
+ }
894
+ },
895
+ d(l) {
896
+ l && de(n), nt(u, l);
897
+ }
898
+ };
899
+ }
900
+ function tt(f) {
901
+ let n, a, m;
902
+ return {
903
+ c() {
904
+ n = O("button"), z(n, "class", "ShowBalanceModalOverlay");
905
+ },
906
+ m(u, l) {
907
+ ue(u, n, l), a || (m = Oe(
908
+ n,
909
+ "click",
910
+ /*click_handler_3*/
911
+ f[26]
912
+ ), a = !0);
913
+ },
914
+ p: Xe,
915
+ d(u) {
916
+ u && de(n), a = !1, m();
917
+ }
918
+ };
919
+ }
920
+ function Rt(f) {
921
+ let n, a, m;
922
+ function u(b, R) {
923
+ return (
924
+ /*isLoading*/
925
+ b[1] ? _t : At
926
+ );
927
+ }
928
+ let l = u(f), y = l(f), p = (
929
+ /*isModalDisplayed*/
930
+ f[2] && tt(f)
931
+ );
932
+ return {
933
+ c() {
934
+ n = O("div"), a = O("div"), y.c(), m = fe(), p && p.c(), z(a, "class", "ShowBalance");
935
+ },
936
+ m(b, R) {
937
+ ue(b, n, R), D(n, a), y.m(a, null), D(n, m), p && p.m(n, null), f[27](n);
938
+ },
939
+ p(b, R) {
940
+ l === (l = u(b)) && y ? y.p(b, R) : (y.d(1), y = l(b), y && (y.c(), y.m(a, null))), /*isModalDisplayed*/
941
+ b[2] ? p ? p.p(b, R) : (p = tt(b), p.c(), p.m(n, null)) : p && (p.d(1), p = null);
942
+ },
943
+ i: Xe,
944
+ o: Xe,
945
+ d(b) {
946
+ b && de(n), y.d(), p && p.d(), f[27](null);
947
+ }
948
+ };
949
+ }
950
+ function Et(f, n, a) {
951
+ let m;
952
+ ft(f, Bt, (s) => a(4, m = s));
953
+ let { userid: u = "" } = n, { session: l = "" } = n, { endpoint: y = "" } = n, { lang: p = "en" } = n, { mbsource: b } = n, { clientstyling: R = "" } = n, { clientstylingurl: B = "" } = n, { translationurl: T = "" } = n, { gmversion: x = "gm16" } = n, { displaybalanceoption: E = "All" } = n, { totalcalculationmode: M = "totalCashAmount" } = n, { currencylocale: J = "en" } = n, { currencydisplay: ne = "symbol" } = n, { maximumfractiondigits: Q = "2" } = n, { minimumfractiondigits: G = "0" } = n, { customdisplayformat: S = "" } = n, w, I = !0, L = !1, Z = !1, ae, oe = "", X = [], pe;
954
+ const c = {}, he = ["totalCashAmount", "totalRealAmount"], Ae = () => {
955
+ fetch(T).then((s) => s.json()).then((s) => Object.keys(s).forEach((e) => We(e, s[e]))).catch((s) => console.log(s));
956
+ };
957
+ Object.keys(Ye).forEach((s) => We(s, Ye[s]));
958
+ const Le = (s) => {
959
+ if (S)
960
+ return _e(s);
961
+ const e = J || p, t = {
962
+ style: "currency",
963
+ currency: oe,
964
+ useGrouping: !0,
965
+ currencyDisplay: ne || "code",
966
+ maximumFractionDigits: Q === "" || isNaN(Number(Q)) ? 2 : Number(Q),
967
+ minimumFractionDigits: G === "" || isNaN(Number(G)) ? 0 : Number(G)
968
+ };
969
+ return new Intl.NumberFormat(e, t).format(s);
970
+ }, _e = (s) => {
971
+ const e = [];
972
+ let t = "";
973
+ for (const o of S)
974
+ switch (o) {
975
+ default:
976
+ t += o;
977
+ break;
978
+ case "{":
979
+ t && e.push(t), t = "";
980
+ break;
981
+ case "}":
982
+ const [r, d] = t.split("|");
983
+ if (t = "", r.toLowerCase() === "currency")
984
+ t = oe;
985
+ else if (r.toLowerCase() === "amount") {
986
+ let i = ",", h = ".", _ = 2;
987
+ d && (d[0] !== " " && (i = d[0]), d[1] !== " " && (h = d[1]), d[2] !== " " && !isNaN(Number(d[2])) && (_ = Number(d[2])));
988
+ let [v, C] = String(Math.floor(s * 10 ** _) / 10 ** _).split(".");
989
+ t += v[0];
990
+ for (let A = 1; A < v.length; ++A)
991
+ (v.length - A) % 3 === 0 ? t += i + v[A] : t += v[A];
992
+ C && (t += h + C);
993
+ }
994
+ t && e.push(t), t = "";
995
+ break;
996
+ }
997
+ return e.push(t), e.join("");
998
+ }, ee = async () => {
999
+ a(1, I = !0);
1000
+ const s = new URL(`${y}/v1/player/${u}/account`);
1001
+ try {
1002
+ const e = await fetch(s, {
1003
+ method: "GET",
1004
+ headers: { "X-SessionID": l }
1005
+ }), t = await e.json();
1006
+ if (e.ok)
1007
+ X = t.items, oe = X.find((o) => o.displayName === "Casino")?.currency, a(3, c.Total = [{ amount: t.totalAmount[oe] }], c), a(
1008
+ 3,
1009
+ c.Real = [
1010
+ {
1011
+ amount: X.find((o) => o.displayName === "Casino")?.balanceAmount
1012
+ }
1013
+ ],
1014
+ c
1015
+ ), a(
1016
+ 3,
1017
+ c.Bonus = [
1018
+ {
1019
+ amount: X.find((o) => o.displayName === "UBS")?.balanceAmount
1020
+ }
1021
+ ],
1022
+ c
1023
+ );
1024
+ else
1025
+ throw new Error("Failed to fetch balance data !");
1026
+ } catch (e) {
1027
+ console.log("Balance error: ", e);
1028
+ } finally {
1029
+ a(1, I = !1);
1030
+ }
1031
+ }, me = () => {
1032
+ a(1, I = !0);
1033
+ const s = new URL(`${y}/v2/player/${u}/balance`), e = new Headers();
1034
+ e.append("X-SessionID", l), fetch(s, { method: "GET", headers: e }).then((o) => o.json()).then((o) => {
1035
+ o[M] || a(7, M = he[0]);
1036
+ const r = o.items.find((i) => i.type === "Real" && i.walletAccountType === "Ordinary");
1037
+ if (oe = r.currency, Z = !!r.productType, a(3, c.Total = [{ amount: 0 }], c), a(3, c.Real = [], c), a(3, c.Bonus = [], c), a(3, c.Credit = [], c), !Z) {
1038
+ pe = {
1039
+ lastOrdinaryAfterAmount: 0,
1040
+ showCreditLineAfterAmount: !1
1041
+ }, a(3, c.Total[0].amount = o[M][oe], c);
1042
+ for (const i of o.items)
1043
+ switch (i.type) {
1044
+ case "Bonus":
1045
+ c.Bonus.length === 0 ? c.Bonus.push({ amount: i.amount }) : a(3, c.Bonus[0].amount += i.amount, c);
1046
+ break;
1047
+ case "Real":
1048
+ if (i.creditLine && c.Credit.length === 0 && c.Credit.push({ amount: i.creditLine }), M === "totalRealAmount")
1049
+ continue;
1050
+ c.Real.length === 0 ? c.Real.push({ amount: i.amount }) : a(3, c.Real[0].amount += i.amount, c);
1051
+ break;
1052
+ }
1053
+ for (const [i, h] of Object.entries(c))
1054
+ h.length < 1 && delete c[i];
1055
+ a(1, I = !1);
1056
+ return;
1057
+ }
1058
+ pe = {
1059
+ Casino: {
1060
+ lastOrdinaryAfterAmount: 0,
1061
+ showCreditLineAfterAmount: !1
1062
+ },
1063
+ Sports: {
1064
+ lastOrdinaryAfterAmount: 0,
1065
+ showCreditLineAfterAmount: !1
1066
+ }
1067
+ };
1068
+ let d = o.items;
1069
+ E && E !== "All" && (d = o.items.filter((i) => i.productType === E));
1070
+ for (const i of d) {
1071
+ let h;
1072
+ switch (i.type) {
1073
+ case "Bonus":
1074
+ h = c.Bonus.findIndex((_) => _.productType === i.productType), h > 0 ? a(3, c.Bonus[h].amount += i.amount, c) : c.Bonus.push({
1075
+ amount: i.amount,
1076
+ productType: i.productType
1077
+ });
1078
+ break;
1079
+ case "Real":
1080
+ i.creditLine && c.Credit.push({
1081
+ amount: i.creditLine,
1082
+ productType: i.productType
1083
+ }), h = c.Real.findIndex((_) => _.productType === i.productType), h > 0 ? a(3, c.Real[h].amount += i.amount, c) : c.Real.push({
1084
+ amount: i.amount,
1085
+ productType: i.productType
1086
+ });
1087
+ break;
1088
+ }
1089
+ }
1090
+ Re();
1091
+ for (const [i, h] of Object.entries(c))
1092
+ h.length < 1 && delete c[i];
1093
+ a(1, I = !1);
1094
+ }).catch(() => {
1095
+ throw a(1, I = !1), new Error("Failed to fetch balance data !");
1096
+ });
1097
+ }, re = () => {
1098
+ if (ae && ae.close(), l.length < 1)
1099
+ return;
1100
+ let s, e;
1101
+ switch (x) {
1102
+ case "gm16":
1103
+ s = new URL(`${y}/v2/player/${u}/information/updates`), e = (r) => Ie(r);
1104
+ break;
1105
+ case "gmcore":
1106
+ s = new URL(`${y}/v1/player/${u}/balance/updates`), e = (r) => te(r);
1107
+ break;
1108
+ }
1109
+ const t = {
1110
+ accept: "text/event-stream",
1111
+ "X-SessionId": l
1112
+ }, o = new St.EventSourcePolyfill(s, { headers: t });
1113
+ ae = o, o.addEventListener("message", e);
1114
+ }, Be = (s) => {
1115
+ let e;
1116
+ try {
1117
+ e = JSON.parse(s);
1118
+ } catch (t) {
1119
+ console.log("Balance stream failed: ", t);
1120
+ return;
1121
+ }
1122
+ return e;
1123
+ }, te = (s) => {
1124
+ const e = Be(s.data);
1125
+ if (!e) {
1126
+ re();
1127
+ return;
1128
+ }
1129
+ let t = "0";
1130
+ const o = e.balanceChange;
1131
+ X = X.map((r) => (o && o[r.id] && (r = {
1132
+ ...r,
1133
+ balanceAmount: o[r.id].afterAmount
1134
+ }), t = (parseFloat(r?.balanceAmount) + parseFloat(t)).toString(), r)), a(3, c.Real = [{ amount: X[0]?.balanceAmount }], c), a(3, c.Bonus = [{ amount: X[1]?.balanceAmount }], c), a(3, c.Total = [{ amount: Number(t) }], c);
1135
+ }, ye = (s, e, t) => {
1136
+ let o = null;
1137
+ switch (t.walletAccountType) {
1138
+ case "Ordinary":
1139
+ (t.afterAmount !== t.affectedAmount || e.lastOrdinaryAfterAmount === 0) && (e.lastOrdinaryAfterAmount = t.afterAmount, e.showCreditLineAfterAmount || (o = t.afterAmount));
1140
+ break;
1141
+ case "CreditLine":
1142
+ t.afterAmount !== 0 ? (o = t.afterAmount, e.showCreditLineAfterAmount = !0) : (o = e.lastOrdinaryAfterAmount, e.showCreditLineAfterAmount = !1);
1143
+ break;
1144
+ default:
1145
+ o = t.afterAmount;
1146
+ }
1147
+ return o === null ? s : o;
1148
+ }, Re = () => {
1149
+ switch (M) {
1150
+ case "totalCashAmount":
1151
+ let s = 0;
1152
+ for (const t of ["Real", "Bonus"])
1153
+ for (const o of c[t])
1154
+ s += Math.max(o.amount, 0);
1155
+ a(3, c.Total[0].amount = s, c);
1156
+ break;
1157
+ case "totalRealAmount":
1158
+ if (!Z)
1159
+ return;
1160
+ let e = 0;
1161
+ for (const t of c.Real)
1162
+ e += t.amount;
1163
+ a(3, c.Total[0].amount = e, c);
1164
+ }
1165
+ }, Ie = (s) => {
1166
+ const e = Be(s.data);
1167
+ if (!e) {
1168
+ re();
1169
+ return;
1170
+ }
1171
+ if (je(e?.type) || e.type !== "BALANCE_UPDATE_V2")
1172
+ return;
1173
+ const t = e.body.balanceChange;
1174
+ for (const [o, r] of Object.entries(t))
1175
+ if (M === "totalRealAmount" && o === "Real" && !Z && a(3, c.Total[0].amount = ye(c.Total[0].amount, pe, r), c), !!c[o])
1176
+ for (const d of c[o]) {
1177
+ if (!Z) {
1178
+ d.amount = o === "Real" ? ye(d.amount, pe, r) : r.afterAmount;
1179
+ continue;
1180
+ }
1181
+ r.productType === d.productType && (d.amount = o === "Real" ? ye(d.amount, pe[d.productType], r) : r.afterAmount);
1182
+ }
1183
+ Re();
1184
+ }, Me = () => {
1185
+ a(2, L = !1), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
1186
+ }, je = (s) => s === "SESSION_EXPIRATION" ? (window.postMessage({ type: "SessionExpiration" }, window.location.href), !0) : !1, He = () => {
1187
+ he.includes(M) || (console.error(`Unsupported value ('${M}') for totalcalculationmode parameter. Only the following values are supported ${he}. Using default value ('${he[0]}').`), a(7, M = he[0]));
1188
+ }, Ee = () => {
1189
+ switch (Tt(p), He(), x) {
1190
+ case "gmcore":
1191
+ ee();
1192
+ break;
1193
+ case "gm16":
1194
+ me();
1195
+ break;
1196
+ default:
1197
+ throw Error(`Invalid apiversion attribute: ${x}`);
1198
+ }
1199
+ }, Te = (s) => s.data && s.data.type === "LogoutSuccessfull" && ae.close();
1200
+ pt(() => (window.addEventListener("message", Te, !1), () => {
1201
+ window.removeEventListener("message", Te), ae && ae.close();
1202
+ }));
1203
+ const ge = () => a(2, L = !0), K = () => a(2, L = !1), ze = () => Me(), Ue = () => a(2, L = !1);
1204
+ function Pe(s) {
1205
+ ht[s ? "unshift" : "push"](() => {
1206
+ w = s, a(0, w);
1207
+ });
1208
+ }
1209
+ return f.$$set = (s) => {
1210
+ "userid" in s && a(8, u = s.userid), "session" in s && a(9, l = s.session), "endpoint" in s && a(10, y = s.endpoint), "lang" in s && a(11, p = s.lang), "mbsource" in s && a(12, b = s.mbsource), "clientstyling" in s && a(13, R = s.clientstyling), "clientstylingurl" in s && a(14, B = s.clientstylingurl), "translationurl" in s && a(15, T = s.translationurl), "gmversion" in s && a(16, x = s.gmversion), "displaybalanceoption" in s && a(17, E = s.displaybalanceoption), "totalcalculationmode" in s && a(7, M = s.totalcalculationmode), "currencylocale" in s && a(18, J = s.currencylocale), "currencydisplay" in s && a(19, ne = s.currencydisplay), "maximumfractiondigits" in s && a(20, Q = s.maximumfractiondigits), "minimumfractiondigits" in s && a(21, G = s.minimumfractiondigits), "customdisplayformat" in s && a(22, S = s.customdisplayformat);
1211
+ }, f.$$.update = () => {
1212
+ f.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
1213
+ 200448 && y && u && l && p && x && E && Ee(), f.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
1214
+ 67328 && y && u && l && x && re(), f.$$.dirty[0] & /*clientstyling, customStylingContainer*/
1215
+ 8193 && R && w && yt(w, R), f.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
1216
+ 16385 && B && w && vt(w, B), f.$$.dirty[0] & /*customStylingContainer, mbsource*/
1217
+ 4097 && w && wt(w, `${b}.Style`), f.$$.dirty[0] & /*translationurl*/
1218
+ 32768 && T && Ae();
1219
+ }, [
1220
+ w,
1221
+ I,
1222
+ L,
1223
+ c,
1224
+ m,
1225
+ Le,
1226
+ Me,
1227
+ M,
1228
+ u,
1229
+ l,
1230
+ y,
1231
+ p,
1232
+ b,
1233
+ R,
1234
+ B,
1235
+ T,
1236
+ x,
1237
+ E,
1238
+ J,
1239
+ ne,
1240
+ Q,
1241
+ G,
1242
+ S,
1243
+ ge,
1244
+ K,
1245
+ ze,
1246
+ Ue,
1247
+ Pe
1248
+ ];
1249
+ }
1250
+ class xt extends lt {
1251
+ constructor(n) {
1252
+ super(), ct(
1253
+ this,
1254
+ n,
1255
+ Et,
1256
+ Rt,
1257
+ dt,
1258
+ {
1259
+ userid: 8,
1260
+ session: 9,
1261
+ endpoint: 10,
1262
+ lang: 11,
1263
+ mbsource: 12,
1264
+ clientstyling: 13,
1265
+ clientstylingurl: 14,
1266
+ translationurl: 15,
1267
+ gmversion: 16,
1268
+ displaybalanceoption: 17,
1269
+ totalcalculationmode: 7,
1270
+ currencylocale: 18,
1271
+ currencydisplay: 19,
1272
+ maximumfractiondigits: 20,
1273
+ minimumfractiondigits: 21,
1274
+ customdisplayformat: 22
1275
+ },
1276
+ Ct,
1277
+ [-1, -1]
1278
+ );
1279
+ }
1280
+ get userid() {
1281
+ return this.$$.ctx[8];
1282
+ }
1283
+ set userid(n) {
1284
+ this.$$set({ userid: n }), H();
1285
+ }
1286
+ get session() {
1287
+ return this.$$.ctx[9];
1288
+ }
1289
+ set session(n) {
1290
+ this.$$set({ session: n }), H();
1291
+ }
1292
+ get endpoint() {
1293
+ return this.$$.ctx[10];
1294
+ }
1295
+ set endpoint(n) {
1296
+ this.$$set({ endpoint: n }), H();
1297
+ }
1298
+ get lang() {
1299
+ return this.$$.ctx[11];
1300
+ }
1301
+ set lang(n) {
1302
+ this.$$set({ lang: n }), H();
1303
+ }
1304
+ get mbsource() {
1305
+ return this.$$.ctx[12];
1306
+ }
1307
+ set mbsource(n) {
1308
+ this.$$set({ mbsource: n }), H();
1309
+ }
1310
+ get clientstyling() {
1311
+ return this.$$.ctx[13];
1312
+ }
1313
+ set clientstyling(n) {
1314
+ this.$$set({ clientstyling: n }), H();
1315
+ }
1316
+ get clientstylingurl() {
1317
+ return this.$$.ctx[14];
1318
+ }
1319
+ set clientstylingurl(n) {
1320
+ this.$$set({ clientstylingurl: n }), H();
1321
+ }
1322
+ get translationurl() {
1323
+ return this.$$.ctx[15];
1324
+ }
1325
+ set translationurl(n) {
1326
+ this.$$set({ translationurl: n }), H();
1327
+ }
1328
+ get gmversion() {
1329
+ return this.$$.ctx[16];
1330
+ }
1331
+ set gmversion(n) {
1332
+ this.$$set({ gmversion: n }), H();
1333
+ }
1334
+ get displaybalanceoption() {
1335
+ return this.$$.ctx[17];
1336
+ }
1337
+ set displaybalanceoption(n) {
1338
+ this.$$set({ displaybalanceoption: n }), H();
1339
+ }
1340
+ get totalcalculationmode() {
1341
+ return this.$$.ctx[7];
1342
+ }
1343
+ set totalcalculationmode(n) {
1344
+ this.$$set({ totalcalculationmode: n }), H();
1345
+ }
1346
+ get currencylocale() {
1347
+ return this.$$.ctx[18];
1348
+ }
1349
+ set currencylocale(n) {
1350
+ this.$$set({ currencylocale: n }), H();
1351
+ }
1352
+ get currencydisplay() {
1353
+ return this.$$.ctx[19];
1354
+ }
1355
+ set currencydisplay(n) {
1356
+ this.$$set({ currencydisplay: n }), H();
1357
+ }
1358
+ get maximumfractiondigits() {
1359
+ return this.$$.ctx[20];
1360
+ }
1361
+ set maximumfractiondigits(n) {
1362
+ this.$$set({ maximumfractiondigits: n }), H();
1363
+ }
1364
+ get minimumfractiondigits() {
1365
+ return this.$$.ctx[21];
1366
+ }
1367
+ set minimumfractiondigits(n) {
1368
+ this.$$set({ minimumfractiondigits: n }), H();
1369
+ }
1370
+ get customdisplayformat() {
1371
+ return this.$$.ctx[22];
1372
+ }
1373
+ set customdisplayformat(n) {
1374
+ this.$$set({ customdisplayformat: n }), H();
1375
+ }
1376
+ }
1377
+ bt(xt, { userid: {}, session: {}, endpoint: {}, lang: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, gmversion: {}, displaybalanceoption: {}, totalcalculationmode: {}, currencylocale: {}, currencydisplay: {}, maximumfractiondigits: {}, minimumfractiondigits: {}, customdisplayformat: {} }, [], [], !0);
1378
+ export {
1379
+ xt as default
1380
+ };