@everymatrix/casino-header-controller 1.55.0 → 1.56.0

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