@everymatrix/casino-header-controller-nd 1.45.2 → 1.45.4

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