@everymatrix/casino-header-controller 1.56.0 → 1.56.3

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