@everymatrix/casino-header-controller-nd 1.83.12 → 1.84.1

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