@everymatrix/casino-header-controller 1.55.0 → 1.56.2
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.
- package/components/{CasinoHamburgerMenu-JVY4ac8I.js → CasinoHamburgerMenu-D3IA0-Fr.js} +68 -31
- package/components/{CasinoHamburgerMenu-C8-P7sF9.cjs → CasinoHamburgerMenu-DessG6uq.cjs} +16 -3
- package/components/{CasinoHamburgerMenu-E4O8Dx5o.js → CasinoHamburgerMenu-DyL5A7W7.js} +69 -32
- package/components/CasinoHeaderController-BFP8179I.cjs +13 -0
- package/components/{CasinoHeaderController-9s-CNvhj.js → CasinoHeaderController-BbEsH91Z.js} +522 -488
- package/components/{CasinoHeaderController-BVCLQUCq.js → CasinoHeaderController-DeiDjcf5.js} +581 -547
- package/components/{CasinoSlider-xu8jCpW1.js → CasinoSlider-BiQpUhjL.js} +63 -63
- package/components/CasinoSlider-E1mSYv_J.cjs +1 -0
- package/components/{CasinoSlider-yMz4R8ed.js → CasinoSlider-MTl32pNB.js} +59 -59
- package/components/{PlayerAccountBalanceModal-BVQlpIy4.cjs → PlayerAccountBalanceModal-B9BkSlDU.cjs} +5 -5
- package/components/{PlayerAccountBalanceModal-CcASksA3.js → PlayerAccountBalanceModal-CEo_b6Ks.js} +119 -116
- package/components/{PlayerAccountBalanceModal-DG6GgVDp.js → PlayerAccountBalanceModal-fP9D_Jz7.js} +118 -115
- package/components/{PlayerDeposit-CIarW5H1.js → PlayerDeposit-Bv78j0E8.js} +15 -15
- package/components/{PlayerDeposit-C8ZPqrpV.cjs → PlayerDeposit-C7xxeNB2.cjs} +1 -1
- package/components/{PlayerDeposit-D9xpcJp9.js → PlayerDeposit-DiUqgMu-.js} +15 -15
- package/es2015/casino-header-controller.cjs +1 -1
- package/es2015/casino-header-controller.js +1 -1
- package/esnext/casino-header-controller.js +1 -1
- package/package.json +1 -1
- package/stencil/index-1ef3a64c-6soTLew7.js +556 -0
- package/stencil/index-1ef3a64c-DkMoO-oa.js +572 -0
- package/stencil/index-1ef3a64c-DmmoSOho.cjs +1 -0
- package/stencil/{user-deposit-withdrawal-Dg3a3KkR.js → user-deposit-withdrawal-C72e1sSw.js} +216 -178
- package/stencil/user-deposit-withdrawal-CS-LZhcv.cjs +59 -0
- package/stencil/{user-deposit-withdrawal-gu9RDhoH.js → user-deposit-withdrawal-DfDiD6Lp.js} +289 -251
- package/components/CasinoHeaderController-BZk18wxU.cjs +0 -13
- package/components/CasinoSlider-DDycojG8.cjs +0 -1
- package/stencil/index-657e7a14-BQuTIY5_.js +0 -572
- package/stencil/index-657e7a14-CDqZBTHG.cjs +0 -1
- package/stencil/index-657e7a14-fo2CD-e3.js +0 -588
- package/stencil/user-deposit-withdrawal-BCkoyv3i.cjs +0 -59
@@ -1,4 +1,4 @@
|
|
1
|
-
import { $ as Q, a as Ne, b as Re, S as Te, i as je, f as C, c as We, s as ze, d as Be, g as k, e as T, x as m, j as D, y as p, z as P, n as oe, k as S, C as Oe, o as Ge, m as xe, u as qe, v as z, E as x, M as pe, I as ie, q as J, t as Ye, N as we, B as Ue, w as V, A as Z } from "./CasinoHamburgerMenu-
|
1
|
+
import { $ as Q, a as Ne, b as Re, S as Te, i as je, f as C, c as We, s as ze, d as Be, g as k, e as T, x as m, j as D, y as p, z as P, n as oe, k as S, C as Oe, o as Ge, m as xe, u as qe, v as z, E as x, M as pe, I as ie, q as J, t as Ye, N as we, B as Ue, w as V, A as Z } from "./CasinoHamburgerMenu-DyL5A7W7.js";
|
2
2
|
function Pe({ withLocale: a, translations: e }) {
|
3
3
|
Q.subscribe((t) => {
|
4
4
|
t == null && (Ne.set(e), Q.set(a));
|
@@ -68,19 +68,19 @@ const ne = {
|
|
68
68
|
}
|
69
69
|
};
|
70
70
|
function Xe(a) {
|
71
|
-
Be(a, "svelte-
|
71
|
+
Be(a, "svelte-1lder3j", '*,*::before,*::after{margin:0;padding:0;font-family:inherit;box-sizing:border-box}.CarouselWrapper{background:-webkit-linear-gradient(to left, var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839)), var(--emw--categories-color-primary, var(--emw--color-primary, #D0046C)));background:linear-gradient(to left, var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839)), var(--emw--categories-color-primary, var(--emw--color-primary, #D0046C)))}.CarouselWrapper.CarouselWrapperHeaderMain{background:transparent}.CarouselContainer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;color:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF));margin:0 auto;max-width:1300px}.CarouselContainer.CarouselContainerMobile{padding:0}.CarouselContainer ul{align-items:center}.CarouselContainer ul::-webkit-scrollbar{display:none}.CarouselContainer ul li{height:100%;align-items:center;font-size:15px;font-weight:500;line-height:26px;white-space:nowrap;display:inline-block;text-align:left;word-spacing:normal}.CarouselContainer ul li>a{position:relative}.CarouselContainer ul li.SecondaryMenu:hover,.CarouselContainer ul li.SecondaryMenu.active,.CarouselContainer ul li.SecondaryMenu:focus,.CarouselContainer ul li.SecondaryMenu:focus-within{background:var(--emw--categories-contrast, var(--emw--color-background, #07072A));cursor:pointer}.CarouselContainer ul li>a{position:relative}.CarouselContainer ul li:hover,.CarouselContainer ul>li>a:hover,.CarouselContainer ul li:focus,.CarouselContainer ul>li>a:focus{z-index:105}.CarouselContainer .CarouselItems li:hover>ul{left:auto;top:auto;opacity:1;transition:opacity 0.5s linear}.CarouselContainer .CarouselItems li:focus-within>ul{left:auto;top:auto;opacity:1;transition:opacity 0.5s linear, top 0.5s}.CarouselContainer .CarouselItems ul ul{transition:opacity 0.4s, left 0s 0.4s, margin 0s 0.4s;z-index:103}.CarouselContainer .CarouselItems li li:hover ul{top:auto;margin-left:100%;transform:translateY(-2.2rem);opacity:1;transition:opacity 0.5s linear, margin 0.5s}.CarouselContainer .CarouselItems li li:focus-within ul{top:auto;margin-left:100%;transform:translateY(-2.2rem);opacity:1;transition:opacity 0.5s linear, margin 0.5s}.CarouselContainer .CarouselLeftArrow,.CarouselContainer .CarouselRightArrow{display:flex;align-items:center;justify-content:center;width:50%;max-width:64px;background:var(--emw--categories-arrows-bg, var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3)))}.CarouselContainer .CarouselLeftArrow svg,.CarouselContainer .CarouselRightArrow svg{width:100%;max-width:39px;stroke:var(--emw--categories-arrows, var(--emw--color-white, #FFFFFF))}.CarouselContainer h1{text-align:center}.CarouselContainer ul{margin:0;padding:0;list-style:none}.CarouselContainer .CarouselNavWrap{overflow-y:scroll;white-space:nowrap;list-style-type:none;-ms-overflow-style:none;scrollbar-width:none}.CarouselContainer .CarouselNavWrap::-webkit-scrollbar{display:none}.CarouselContainer .CarouselItems{display:table;width:100%;text-align:center}.CarouselContainer .CarouselItems li{display:inline-block;text-align:left;padding:7px 10px}.CarouselContainer .CarouselItems li>a{position:relative}.CarouselContainer .CarouselItems li li{display:block}.CarouselContainer .CarouselItems button{background:none;border:none;color:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF));text-decoration:none;white-space:nowrap;position:relative}.CarouselContainer .CarouselItems a{display:block;color:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF));text-decoration:none;white-space:nowrap;position:relative}.CarouselContainer .CarouselItems.SecondaryMenu li:hover>a,.CarouselContainer .CarouselItems.SecondaryMenu a:hover,.CarouselContainer .CarouselItems.SecondaryMenu li:focus>a,.CarouselContainer .CarouselItems.SecondaryMenu a:focus{background:var(--emw--categories-contrast, var(--emw--color-background, #07072A))}.CarouselContainer .CarouselItems ul{position:absolute;z-index:104;left:-999em;top:0;opacity:0;transition:opacity 0.1s, left 0s 0.1s, top 0.1s;background:var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839));background:-webkit-linear-gradient(var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839)), var(--emw--categories-color-primary, var(--emw--color-primary, #D0046C)));background:linear-gradient(var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839)), var(--emw--categories-color-primary, var(--emw--color-primary, #D0046C)))}.CarouselContainer .CarouselItems .TouchOnly{display:none;left:-10px}.CarouselContainer .touch-device .CarouselItems .TouchOnly{display:inline-block}.CarouselContainer .touch-device .CarouselItems .TouchOnly a{background:var(--emw--categories-contrast, var(--emw--color-background, #07072A));color:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF))}.CarouselContainer .isScrolling .CarouselItems ul.DropDown{left:-999em;opacity:0}.CarouselContainer .SubDropDown:hover,.CarouselContainer .SubDropDown.active{color:var(--emw--categories-contrast, var(--emw--color-contrast, #07072A));background:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF))}.CarouselContainerHeaderMain .CarouselItems .CarouselItem:hover a,.CarouselContainerHeaderMain .CarouselItems .CarouselItem.active a,.CarouselContainerHeaderMain .CarouselItems .CarouselItem:focus a,.CarouselContainerHeaderMain .CarouselItems .CarouselItem:focus-within a{border-bottom:1px solid var(--emw--header-color-primary, var(--emw--color-primary, #D0046C));color:var(--emw--header-color-primary, var(--emw--color-primary, #D0046C))}.CarouselContainerHeaderMain .CarouselItems .CarouselItem span{border-top:1px solid transparent;padding-top:5px;transition-duration:0.3s}.CarouselContainerHeaderMain{background:transparent;margin:0;padding:0}.CarouselContainerHeaderMain .CarouselLeftArrow,.CarouselContainerHeaderMain .CarouselRightArrow{background:transparent;width:unset;display:none}.CarouselContainerHeaderMain .CarouselItem a{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));text-decoration:none}.CarouselItems li a:first-child:not(:last-child){padding-right:20px}.CarouselItems li a:first-child:not(:last-child):after{content:"";position:absolute;right:3px;top:50%;margin-top:-6px;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid var(--emw--color-white, #FFFFFF)}.CarouselItems>li>a:first-child:not(:last-child):after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid var(--emw--color-white, #FFFFFF);border-bottom:none;margin-top:-3px}.CarouselItems li:hover a:first-child:not(:last-child):after{border-left-color:var(--emw--color-white, #FFFFFF)}.CarouselItems li:focus-within a:first-child:not(:last-child):after{border-left-color:var(--emw--color-white, #FFFFFF)}.CarouselItems>li:hover>a:first-child:not(:last-child):after{border-left-color:transparent;border-top-color:var(--emw--color-white, #FFFFFF)}.CarouselItems>li:focus-within>a:first-child:not(:last-child):after{border-left-color:transparent;border-top-color:var(--emw--color-white, #FFFFFF)}@media only screen and (max-width: 1024px){.CarouselContainerHeaderMain .CarouselLeftArrow,.CarouselContainerHeaderMain .CarouselRightArrow{display:flex}}.CategoryIconImg{height:20px;margin:0 auto;display:block}.DisplayNone{display:none}');
|
72
72
|
}
|
73
73
|
function le(a, e, t) {
|
74
74
|
const i = a.slice();
|
75
|
-
return i[
|
75
|
+
return i[48] = e[t], i[50] = t, i;
|
76
76
|
}
|
77
77
|
function se(a, e, t) {
|
78
78
|
const i = a.slice();
|
79
|
-
return i[
|
79
|
+
return i[51] = e[t], i;
|
80
80
|
}
|
81
81
|
function ce(a, e, t) {
|
82
82
|
const i = a.slice();
|
83
|
-
return i[
|
83
|
+
return i[54] = e[t], i[56] = t, i;
|
84
84
|
}
|
85
85
|
function ue(a) {
|
86
86
|
let e = [], t = /* @__PURE__ */ new Map(), i, n = z(
|
@@ -89,7 +89,7 @@ function ue(a) {
|
|
89
89
|
);
|
90
90
|
const l = (r) => (
|
91
91
|
/*category*/
|
92
|
-
r[
|
92
|
+
r[48].id
|
93
93
|
);
|
94
94
|
for (let r = 0; r < n.length; r += 1) {
|
95
95
|
let s = le(a, n, r), u = l(s);
|
@@ -123,7 +123,7 @@ function ue(a) {
|
|
123
123
|
function Je(a) {
|
124
124
|
let e, t = (
|
125
125
|
/*category*/
|
126
|
-
a[
|
126
|
+
a[48].name + ""
|
127
127
|
), i;
|
128
128
|
return {
|
129
129
|
c() {
|
@@ -135,7 +135,7 @@ function Je(a) {
|
|
135
135
|
p(n, l) {
|
136
136
|
l[0] & /*sliderdata*/
|
137
137
|
512 && t !== (t = /*category*/
|
138
|
-
n[
|
138
|
+
n[48].name + "") && Z(i, t);
|
139
139
|
},
|
140
140
|
d(n) {
|
141
141
|
n && S(e);
|
@@ -145,12 +145,12 @@ function Je(a) {
|
|
145
145
|
function Qe(a) {
|
146
146
|
let e, t = (
|
147
147
|
/*category*/
|
148
|
-
a[
|
148
|
+
a[48].label + ""
|
149
149
|
), i, n;
|
150
150
|
return {
|
151
151
|
c() {
|
152
152
|
e = k("a"), i = V(t), m(e, "href", n = /*category*/
|
153
|
-
a[
|
153
|
+
a[48].path);
|
154
154
|
},
|
155
155
|
m(l, r) {
|
156
156
|
D(l, e, r), p(e, i);
|
@@ -158,9 +158,9 @@ function Qe(a) {
|
|
158
158
|
p(l, r) {
|
159
159
|
r[0] & /*sliderdata*/
|
160
160
|
512 && t !== (t = /*category*/
|
161
|
-
l[
|
161
|
+
l[48].label + "") && Z(i, t), r[0] & /*sliderdata*/
|
162
162
|
512 && n !== (n = /*category*/
|
163
|
-
l[
|
163
|
+
l[48].path) && m(e, "href", n);
|
164
164
|
},
|
165
165
|
d(l) {
|
166
166
|
l && S(e);
|
@@ -235,20 +235,20 @@ function ge(a) {
|
|
235
235
|
var w;
|
236
236
|
let e, t, i = (
|
237
237
|
/*subGroupItem*/
|
238
|
-
((w = a[
|
238
|
+
((w = a[54]) == null ? void 0 : w.name) + ""
|
239
239
|
), n, l, r, s, u;
|
240
240
|
function F(...f) {
|
241
241
|
return (
|
242
242
|
/*click_handler_1*/
|
243
243
|
a[33](
|
244
244
|
/*category*/
|
245
|
-
a[
|
245
|
+
a[48],
|
246
246
|
/*index*/
|
247
|
-
a[
|
247
|
+
a[50],
|
248
248
|
/*subGroupItem*/
|
249
|
-
a[
|
249
|
+
a[54],
|
250
250
|
/*subindex*/
|
251
|
-
a[
|
251
|
+
a[56],
|
252
252
|
...f
|
253
253
|
)
|
254
254
|
);
|
@@ -256,28 +256,28 @@ function ge(a) {
|
|
256
256
|
return {
|
257
257
|
c() {
|
258
258
|
e = k("li"), t = k("a"), n = V(i), r = T(), m(t, "class", l = "SubDropDown " + /*index*/
|
259
|
-
(a[
|
259
|
+
(a[50] == /*activeIndex*/
|
260
260
|
a[6] && /*activeSubIndex*/
|
261
261
|
(a[7] == /*subindex*/
|
262
|
-
a[
|
262
|
+
a[56] || /*prevSubIndex*/
|
263
263
|
a[8] == /*subindex*/
|
264
|
-
a[
|
264
|
+
a[56]) ? "active" : ""));
|
265
265
|
},
|
266
266
|
m(f, y) {
|
267
267
|
D(f, e, y), p(e, t), p(t, n), p(e, r), s || (u = P(e, "click", F), s = !0);
|
268
268
|
},
|
269
269
|
p(f, y) {
|
270
|
-
var
|
270
|
+
var M;
|
271
271
|
a = f, y[0] & /*subGroupsData*/
|
272
272
|
1024 && i !== (i = /*subGroupItem*/
|
273
|
-
((
|
273
|
+
((M = a[54]) == null ? void 0 : M.name) + "") && Z(n, i), y[0] & /*sliderdata, activeIndex, activeSubIndex, subGroupsData, prevSubIndex*/
|
274
274
|
1984 && l !== (l = "SubDropDown " + /*index*/
|
275
|
-
(a[
|
275
|
+
(a[50] == /*activeIndex*/
|
276
276
|
a[6] && /*activeSubIndex*/
|
277
277
|
(a[7] == /*subindex*/
|
278
|
-
a[
|
278
|
+
a[56] || /*prevSubIndex*/
|
279
279
|
a[8] == /*subindex*/
|
280
|
-
a[
|
280
|
+
a[56]) ? "active" : "")) && m(t, "class", l);
|
281
281
|
},
|
282
282
|
d(f) {
|
283
283
|
f && S(e), s = !1, u();
|
@@ -287,8 +287,8 @@ function ge(a) {
|
|
287
287
|
function fe(a, e) {
|
288
288
|
let t, i, n = (
|
289
289
|
/*index*/
|
290
|
-
e[
|
291
|
-
e[
|
290
|
+
e[50] == /*subGroup*/
|
291
|
+
e[51].index && ge(e)
|
292
292
|
);
|
293
293
|
return {
|
294
294
|
key: a,
|
@@ -301,8 +301,8 @@ function fe(a, e) {
|
|
301
301
|
},
|
302
302
|
p(l, r) {
|
303
303
|
e = l, /*index*/
|
304
|
-
e[
|
305
|
-
e[
|
304
|
+
e[50] == /*subGroup*/
|
305
|
+
e[51].index ? n ? n.p(e, r) : (n = ge(e), n.c(), n.m(i.parentNode, i)) : n && (n.d(1), n = null);
|
306
306
|
},
|
307
307
|
d(l) {
|
308
308
|
l && (S(t), S(i)), n && n.d(l);
|
@@ -312,11 +312,11 @@ function fe(a, e) {
|
|
312
312
|
function he(a) {
|
313
313
|
let e = [], t = /* @__PURE__ */ new Map(), i, n = z(
|
314
314
|
/*subGroup*/
|
315
|
-
a[
|
315
|
+
a[51].items
|
316
316
|
);
|
317
317
|
const l = (r) => (
|
318
318
|
/*subGroupItem*/
|
319
|
-
r[
|
319
|
+
r[54].id
|
320
320
|
);
|
321
321
|
for (let r = 0; r < n.length; r += 1) {
|
322
322
|
let s = ce(a, n, r), u = l(s);
|
@@ -337,7 +337,7 @@ function he(a) {
|
|
337
337
|
s[0] & /*handleClick, sliderdata, subGroupsData, activeIndex, activeSubIndex, prevSubIndex*/
|
338
338
|
10176 && (n = z(
|
339
339
|
/*subGroup*/
|
340
|
-
r[
|
340
|
+
r[51].items
|
341
341
|
), e = pe(e, s, l, 1, r, n, t, i.parentNode, we, fe, i, ce));
|
342
342
|
},
|
343
343
|
d(r) {
|
@@ -349,17 +349,17 @@ function he(a) {
|
|
349
349
|
}
|
350
350
|
function Ce(a, e) {
|
351
351
|
let t, i, n, l, r, s, u, F, w, f, y;
|
352
|
-
function
|
352
|
+
function M(g, v) {
|
353
353
|
return (
|
354
354
|
/*location*/
|
355
355
|
g[0] === "headerMain" ? Qe : Je
|
356
356
|
);
|
357
357
|
}
|
358
|
-
let
|
358
|
+
let I = M(e), h = I(e), c = (
|
359
359
|
/*itemsActive*/
|
360
360
|
e[11][
|
361
361
|
/*index*/
|
362
|
-
e[
|
362
|
+
e[50]
|
363
363
|
] == !0 && de(e)
|
364
364
|
);
|
365
365
|
function b(...g) {
|
@@ -367,9 +367,9 @@ function Ce(a, e) {
|
|
367
367
|
/*click_handler_2*/
|
368
368
|
e[34](
|
369
369
|
/*category*/
|
370
|
-
e[
|
370
|
+
e[48],
|
371
371
|
/*index*/
|
372
|
-
e[
|
372
|
+
e[50],
|
373
373
|
...g
|
374
374
|
)
|
375
375
|
);
|
@@ -383,18 +383,18 @@ function Ce(a, e) {
|
|
383
383
|
(e[3] === "true" ? "" : "DisplayNone")), ie(n.src, r = /*handleSrc*/
|
384
384
|
e[16](
|
385
385
|
/*category*/
|
386
|
-
e[
|
386
|
+
e[48]
|
387
387
|
)) || m(n, "src", r), m(i, "class", "CategoryIcon"), m(t, "class", w = "CarouselItem " + /*activeindex*/
|
388
388
|
(((g = e[1]) == null ? void 0 : g.toString().indexOf("$")) > -1 ? (
|
389
389
|
/*activeindex*/
|
390
390
|
((v = e[1]) == null ? void 0 : v.split("$").pop()) == /*category*/
|
391
|
-
e[
|
391
|
+
e[48].id.split("$").pop() ? "active" : ""
|
392
392
|
) : (
|
393
393
|
/*activeindex*/
|
394
394
|
e[1] == /*category*/
|
395
|
-
e[
|
395
|
+
e[48].id ? "active" : ""
|
396
396
|
)) + " " + /*location*/
|
397
|
-
(e[0] == "headerMain" ? "" : "SecondaryMenu")),
|
397
|
+
(e[0] == "headerMain" ? "" : "SecondaryMenu")), this.first = t;
|
398
398
|
},
|
399
399
|
m(g, v) {
|
400
400
|
D(g, t, v), p(t, i), p(i, n), p(t, s), h.m(t, null), p(t, u), c && c.m(t, null), p(t, F), f || (y = P(t, "click", b), f = !0);
|
@@ -407,21 +407,21 @@ function Ce(a, e) {
|
|
407
407
|
512 && !ie(n.src, r = /*handleSrc*/
|
408
408
|
e[16](
|
409
409
|
/*category*/
|
410
|
-
e[
|
411
|
-
)) && m(n, "src", r),
|
410
|
+
e[48]
|
411
|
+
)) && m(n, "src", r), I === (I = M(e)) && h ? h.p(e, v) : (h.d(1), h = I(e), h && (h.c(), h.m(t, u))), /*itemsActive*/
|
412
412
|
e[11][
|
413
413
|
/*index*/
|
414
|
-
e[
|
414
|
+
e[50]
|
415
415
|
] == !0 ? c ? c.p(e, v) : (c = de(e), c.c(), c.m(t, F)) : c && (c.d(1), c = null), v[0] & /*activeindex, sliderdata, location*/
|
416
416
|
515 && w !== (w = "CarouselItem " + /*activeindex*/
|
417
417
|
(((j = e[1]) == null ? void 0 : j.toString().indexOf("$")) > -1 ? (
|
418
418
|
/*activeindex*/
|
419
419
|
((E = e[1]) == null ? void 0 : E.split("$").pop()) == /*category*/
|
420
|
-
e[
|
420
|
+
e[48].id.split("$").pop() ? "active" : ""
|
421
421
|
) : (
|
422
422
|
/*activeindex*/
|
423
423
|
e[1] == /*category*/
|
424
|
-
e[
|
424
|
+
e[48].id ? "active" : ""
|
425
425
|
)) + " " + /*location*/
|
426
426
|
(e[0] == "headerMain" ? "" : "SecondaryMenu")) && m(t, "class", w);
|
427
427
|
},
|
@@ -431,7 +431,7 @@ function Ce(a, e) {
|
|
431
431
|
};
|
432
432
|
}
|
433
433
|
function Ve(a) {
|
434
|
-
let e, t, i, n, l, r, s, u, F, w, f, y,
|
434
|
+
let e, t, i, n, l, r, s, u, F, w, f, y, M, I, h, c = (
|
435
435
|
/*sliderdata*/
|
436
436
|
a[9].length > 0 && ue(a)
|
437
437
|
);
|
@@ -439,11 +439,11 @@ function Ve(a) {
|
|
439
439
|
c() {
|
440
440
|
e = k("div"), t = k("div"), i = k("div"), i.innerHTML = '<svg fill="none" stroke="var(--emw--categories-arrows, var( --emw--color-white, #FFFFFF));" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>', n = T(), l = k("div"), r = k("ul"), s = k("li"), s.innerHTML = '<a href="#CarouselNav">Close Subs</a>', u = T(), c && c.c(), F = T(), w = k("div"), w.innerHTML = '<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>', m(i, "class", "CarouselLeftArrow"), m(s, "class", "TouchOnly"), m(r, "id", "CarouselNav"), m(r, "class", "CarouselItems"), m(l, "class", "CarouselNavWrap"), m(w, "class", "CarouselRightArrow"), m(t, "class", f = `CarouselContainer CarouselContainerMobile ${/*location*/
|
441
441
|
a[0] === "headerMain" ? "CarouselContainerHeaderMain" : ""}`), m(t, "style", y = /*location*/
|
442
|
-
a[0] === "headerMain" ? "max-width: auto" : void 0), m(e, "class",
|
442
|
+
a[0] === "headerMain" ? "max-width: auto" : void 0), m(e, "class", M = "CarouselWrapper " + /*location*/
|
443
443
|
(a[0] === "headerMain" ? "CarouselWrapperHeaderMain" : ""));
|
444
444
|
},
|
445
445
|
m(b, g) {
|
446
|
-
D(b, e, g), p(e, t), p(t, i), p(t, n), p(t, l), p(l, r), p(r, s), p(r, u), c && c.m(r, null), a[35](r), a[36](l), p(t, F), p(t, w), a[38](e),
|
446
|
+
D(b, e, g), p(e, t), p(t, i), p(t, n), p(t, l), p(l, r), p(r, s), p(r, u), c && c.m(r, null), a[35](r), a[36](l), p(t, F), p(t, w), a[38](e), I || (h = [
|
447
447
|
P(
|
448
448
|
i,
|
449
449
|
"click",
|
@@ -456,7 +456,7 @@ function Ve(a) {
|
|
456
456
|
/*click_handler_3*/
|
457
457
|
a[37]
|
458
458
|
)
|
459
|
-
],
|
459
|
+
], I = !0);
|
460
460
|
},
|
461
461
|
p(b, g) {
|
462
462
|
/*sliderdata*/
|
@@ -465,18 +465,18 @@ function Ve(a) {
|
|
465
465
|
b[0] === "headerMain" ? "CarouselContainerHeaderMain" : ""}`) && m(t, "class", f), g[0] & /*location*/
|
466
466
|
1 && y !== (y = /*location*/
|
467
467
|
b[0] === "headerMain" ? "max-width: auto" : void 0) && m(t, "style", y), g[0] & /*location*/
|
468
|
-
1 &&
|
469
|
-
(b[0] === "headerMain" ? "CarouselWrapperHeaderMain" : "")) && m(e, "class",
|
468
|
+
1 && M !== (M = "CarouselWrapper " + /*location*/
|
469
|
+
(b[0] === "headerMain" ? "CarouselWrapperHeaderMain" : "")) && m(e, "class", M);
|
470
470
|
},
|
471
471
|
i: oe,
|
472
472
|
o: oe,
|
473
473
|
d(b) {
|
474
|
-
b && S(e), c && c.d(), a[35](null), a[36](null), a[38](null),
|
474
|
+
b && S(e), c && c.d(), a[35](null), a[36](null), a[38](null), I = !1, Oe(h);
|
475
475
|
}
|
476
476
|
};
|
477
477
|
}
|
478
478
|
function Ze(a, e, t) {
|
479
|
-
let { endpoint: i = "" } = e, { datasource: n = "" } = e, { onclickeventname: l = "defaultEvent" } = e, { actionevent: r = "defaultEvent" } = e, { favoritesnumber: s = "0" } = e, { location: u = "" } = e, { clientstyling: F = "" } = e, { clientstylingurl: w = "" } = e, { identity: f = "" } = e, { translationurl: y = "" } = e, { isprimarymenu:
|
479
|
+
let { endpoint: i = "" } = e, { datasource: n = "" } = e, { onclickeventname: l = "defaultEvent" } = e, { actionevent: r = "defaultEvent" } = e, { favoritesnumber: s = "0" } = e, { location: u = "" } = e, { clientstyling: F = "" } = e, { clientstylingurl: w = "" } = e, { identity: f = "" } = e, { translationurl: y = "" } = e, { isprimarymenu: M = !1 } = e, { issecondarymenu: I = !1 } = e, { lang: h = "" } = e, { activeindex: c = "0" } = e, { showsubgroups: b = "false" } = e, { categoriesicon: g = "false" } = e, { lobbyiconimage: v = "" } = e, { mygamesiconimage: j = "" } = e, { mbsource: E = "" } = e;
|
480
480
|
Pe({ withLocale: "en", translations: {} });
|
481
481
|
const ye = () => {
|
482
482
|
fetch(y).then((d) => d.json()).then((d) => {
|
@@ -575,9 +575,9 @@ function Ze(a, e, t) {
|
|
575
575
|
), window.postMessage({ type: "SliderLoaded", identity: f }), () => {
|
576
576
|
window.removeEventListener("message", te), W.removeEventListener("scroll", U);
|
577
577
|
}));
|
578
|
-
const Fe = () => $(),
|
578
|
+
const Fe = () => $(), Me = (o, d, _, N, H) => {
|
579
579
|
X(o, d, _, N, "secondary"), H.stopPropagation();
|
580
|
-
},
|
580
|
+
}, Ie = (o, d, _) => {
|
581
581
|
X(o, d, null, null, "main"), _.preventDefault();
|
582
582
|
};
|
583
583
|
function De(o) {
|
@@ -597,7 +597,7 @@ function Ze(a, e, t) {
|
|
597
597
|
});
|
598
598
|
}
|
599
599
|
return a.$$set = (o) => {
|
600
|
-
"endpoint" in o && t(17, i = o.endpoint), "datasource" in o && t(18, n = o.datasource), "onclickeventname" in o && t(19, l = o.onclickeventname), "actionevent" in o && t(20, r = o.actionevent), "favoritesnumber" in o && t(21, s = o.favoritesnumber), "location" in o && t(0, u = o.location), "clientstyling" in o && t(22, F = o.clientstyling), "clientstylingurl" in o && t(23, w = o.clientstylingurl), "identity" in o && t(24, f = o.identity), "translationurl" in o && t(25, y = o.translationurl), "isprimarymenu" in o && t(26,
|
600
|
+
"endpoint" in o && t(17, i = o.endpoint), "datasource" in o && t(18, n = o.datasource), "onclickeventname" in o && t(19, l = o.onclickeventname), "actionevent" in o && t(20, r = o.actionevent), "favoritesnumber" in o && t(21, s = o.favoritesnumber), "location" in o && t(0, u = o.location), "clientstyling" in o && t(22, F = o.clientstyling), "clientstylingurl" in o && t(23, w = o.clientstylingurl), "identity" in o && t(24, f = o.identity), "translationurl" in o && t(25, y = o.translationurl), "isprimarymenu" in o && t(26, M = o.isprimarymenu), "issecondarymenu" in o && t(27, I = o.issecondarymenu), "lang" in o && t(28, h = o.lang), "activeindex" in o && t(1, c = o.activeindex), "showsubgroups" in o && t(2, b = o.showsubgroups), "categoriesicon" in o && t(3, g = o.categoriesicon), "lobbyiconimage" in o && t(29, v = o.lobbyiconimage), "mygamesiconimage" in o && t(30, j = o.mygamesiconimage), "mbsource" in o && t(31, E = o.mbsource);
|
601
601
|
}, a.$$.update = () => {
|
602
602
|
a.$$.dirty[0] & /*activeindex*/
|
603
603
|
2, a.$$.dirty[0] & /*translationurl*/
|
@@ -634,15 +634,15 @@ function Ze(a, e, t) {
|
|
634
634
|
w,
|
635
635
|
f,
|
636
636
|
y,
|
637
|
-
I,
|
638
637
|
M,
|
638
|
+
I,
|
639
639
|
h,
|
640
640
|
v,
|
641
641
|
j,
|
642
642
|
E,
|
643
643
|
Fe,
|
644
|
-
Ie,
|
645
644
|
Me,
|
645
|
+
Ie,
|
646
646
|
De,
|
647
647
|
Se,
|
648
648
|
Le,
|
package/components/{PlayerAccountBalanceModal-BVQlpIy4.cjs → PlayerAccountBalanceModal-B9BkSlDU.cjs}
RENAMED
@@ -1,13 +1,13 @@
|
|
1
|
-
"use strict";var at=Object.defineProperty,rt=Object.defineProperties;var ot=Object.getOwnPropertyDescriptors;var He=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var ze=(o,e,n)=>e in o?at(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,Ue=(o,e)=>{for(var n in e||(e={}))it.call(e,n)&&ze(o,n,e[n]);if(He)for(var n of He(e))st.call(e,n)&&ze(o,n,e[n]);return o},Pe=(o,e)=>rt(o,ot(e));var Ge=(o,e,n)=>new Promise((i,d)=>{var u=g=>{try{p(n.next(g))}catch(v){d(v)}},y=g=>{try{p(n.throw(g))}catch(v){d(v)}},p=g=>g.done?i(g.value):Promise.resolve(g.value).then(u,y);p((n=n.apply(o,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoHamburgerMenu-
|
1
|
+
"use strict";var at=Object.defineProperty,rt=Object.defineProperties;var ot=Object.getOwnPropertyDescriptors;var He=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var ze=(o,e,n)=>e in o?at(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,Ue=(o,e)=>{for(var n in e||(e={}))it.call(e,n)&&ze(o,n,e[n]);if(He)for(var n of He(e))st.call(e,n)&&ze(o,n,e[n]);return o},Pe=(o,e)=>rt(o,ot(e));var Ge=(o,e,n)=>new Promise((i,d)=>{var u=g=>{try{p(n.next(g))}catch(v){d(v)}},y=g=>{try{p(n.throw(g))}catch(v){d(v)}},p=g=>g.done?i(g.value):Promise.resolve(g.value).then(u,y);p((n=n.apply(o,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoHamburgerMenu-DessG6uq.cjs");function Xe(o,e){t.addMessages(o,e)}function lt(o){t.$locale.set(o)}const qe={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款",Loading:"載入中 ..."},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen",Loading:"Wird geladen ..."},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita",Loading:"Caricamento ..."},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt",Loading:"Chargement ..."},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır",Loading:"Yükleniyor ..."},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит",Loading:"Загружается ..."},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit",Loading:"Se încarcă ..."},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit",Loading:"Učitavanje ..."},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés",Loading:"Betöltés ..."},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać",Loading:"Ładowanie ..."},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit",Loading:"Nalaganje ..."},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit",Loading:"Učitavanje ..."},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."}};var Ie={exports:{}};/** @license
|
2
2
|
* eventsource.js
|
3
3
|
* Available under MIT License (MIT)
|
4
4
|
* https://github.com/Yaffle/EventSource/
|
5
|
-
*/(function(o,e){(function(n){var i=n.setTimeout,d=n.clearTimeout,u=n.XMLHttpRequest,y=n.XDomainRequest,p=n.ActiveXObject,g=n.EventSource,v=n.document,x=n.Promise,F=n.fetch,B=n.Response,C=n.TextDecoder,R=n.TextEncoder,H=n.AbortController;if(typeof window!="undefined"&&typeof v!="undefined"&&!("readyState"in v)&&v.body==null&&(v.readyState="loading",window.addEventListener("load",function(a){v.readyState="complete"},!1)),u==null&&p!=null&&(u=function(){return new p("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(a){function r(){}return r.prototype=a,new r}),Date.now||(Date.now=function(){return new Date().getTime()}),H==null){var M=F;F=function(a,r){var c=r.signal;return M(a,{headers:r.headers,credentials:r.credentials,cache:r.cache}).then(function(s){var l=s.body.getReader();return c._reader=l,c._aborted&&c._reader.cancel(),{status:s.status,statusText:s.statusText,headers:s.headers,body:{getReader:function(){return l}}}})},H=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function V(){this.bitsNeeded=0,this.codePoint=0}V.prototype.decode=function(a){function r(E,L,w){if(w===1)return E>=128>>L&&E<<L<=2047;if(w===2)return E>=2048>>L&&E<<L<=55295||E>=57344>>L&&E<<L<=65535;if(w===3)return E>=65536>>L&&E<<L<=1114111;throw new Error}function c(E,L){if(E===6*1)return L>>6>15?3:L>31?2:1;if(E===6*2)return L>15?3:2;if(E===6*3)return 3;throw new Error}for(var s=65533,l="",m=this.bitsNeeded,b=this.codePoint,k=0;k<a.length;k+=1){var A=a[k];m!==0&&(A<128||A>191||!r(b<<6|A&63,m-6,c(m,b)))&&(m=0,b=s,l+=String.fromCharCode(b)),m===0?(A>=0&&A<=127?(m=0,b=A):A>=192&&A<=223?(m=6*1,b=A&31):A>=224&&A<=239?(m=6*2,b=A&15):A>=240&&A<=247?(m=6*3,b=A&7):(m=0,b=s),m!==0&&!r(b,m,c(m,b))&&(m=0,b=s)):(m-=6,b=b<<6|A&63),m===0&&(b<=65535?l+=String.fromCharCode(b):(l+=String.fromCharCode(55296+(b-65535-1>>10)),l+=String.fromCharCode(56320+(b-65535-1&1023))))}return this.bitsNeeded=m,this.codePoint=b,l};var Y=function(){try{return new C().decode(new R().encode("test"),{stream:!0})==="test"}catch(a){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+a)}return!1};(C==null||R==null||!Y())&&(C=V);var
|
6
|
-
`),s=0;s<c.length;s+=1){var l=c[s],m=l.split(": "),b=m.shift(),k=m.join(": ");r[z(b)]=k}this._map=r}D.prototype.get=function(a){return this._map[z(a)]},u!=null&&u.HEADERS_RECEIVED==null&&(u.HEADERS_RECEIVED=2);function J(){}J.prototype.open=function(a,r,c,s,l,m,b){a.open("GET",l);var k=0;a.onprogress=function(){var E=a.responseText,L=E.slice(k);k+=L.length,c(L)},a.onerror=function(E){E.preventDefault(),s(new Error("NetworkError"))},a.onload=function(){s(null)},a.onabort=function(){s(null)},a.onreadystatechange=function(){if(a.readyState===u.HEADERS_RECEIVED){var E=a.status,L=a.statusText,w=a.getResponseHeader("Content-Type"),O=a.getAllResponseHeaders();r(E,L,w,new D(O))}},a.withCredentials=m;for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&a.setRequestHeader(A,b[A]);return a.send(),a};function Q(a){this._headers=a}Q.prototype.get=function(a){return this._headers.get(a)};function le(){}le.prototype.open=function(a,r,c,s,l,m,b){var k=null,A=new H,E=A.signal,L=new C;return F(l,{headers:b,credentials:m?"include":"same-origin",signal:E,cache:"no-store"}).then(function(w){return k=w.body.getReader(),r(w.status,w.statusText,w.headers.get("Content-Type"),new Q(w.headers)),new x(function(O,re){var
|
7
|
-
`,ge+=se):ie==="id"?Re=se:ie==="event"?oe=se:ie==="retry"?(m=me(se,m),A=m):ie==="heartbeatTimeout"&&(b=me(se,b),U!==0&&(d(U),U=i(function(){_e()},b)))}if(P===ne){if(ge!==""){k=Re,oe===""&&(oe="message");var ye=new ce(oe,{data:ge.slice(1),lastEventId:Re});if(a.dispatchEvent(ye),oe==="open"?ue(a,a.onopen,ye):oe==="message"?ue(a,a.onmessage,ye):oe==="error"&&ue(a,a.onerror,ye),$===ae)return}ge="",oe=""}P=W===13?he:ne}else P===ne&&(Oe=j,P=fe),P===fe?W===58&&(pe=j+1,P=Ce):P===Ce&&(P=De)}}},je=function(I){if($===de||$===te){$=Be,U!==0&&(d(U),U=0),U=i(function(){_e()},A),A=
|
5
|
+
*/(function(o,e){(function(n){var i=n.setTimeout,d=n.clearTimeout,u=n.XMLHttpRequest,y=n.XDomainRequest,p=n.ActiveXObject,g=n.EventSource,v=n.document,x=n.Promise,F=n.fetch,B=n.Response,C=n.TextDecoder,R=n.TextEncoder,H=n.AbortController;if(typeof window!="undefined"&&typeof v!="undefined"&&!("readyState"in v)&&v.body==null&&(v.readyState="loading",window.addEventListener("load",function(a){v.readyState="complete"},!1)),u==null&&p!=null&&(u=function(){return new p("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(a){function r(){}return r.prototype=a,new r}),Date.now||(Date.now=function(){return new Date().getTime()}),H==null){var M=F;F=function(a,r){var c=r.signal;return M(a,{headers:r.headers,credentials:r.credentials,cache:r.cache}).then(function(s){var l=s.body.getReader();return c._reader=l,c._aborted&&c._reader.cancel(),{status:s.status,statusText:s.statusText,headers:s.headers,body:{getReader:function(){return l}}}})},H=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function V(){this.bitsNeeded=0,this.codePoint=0}V.prototype.decode=function(a){function r(E,L,w){if(w===1)return E>=128>>L&&E<<L<=2047;if(w===2)return E>=2048>>L&&E<<L<=55295||E>=57344>>L&&E<<L<=65535;if(w===3)return E>=65536>>L&&E<<L<=1114111;throw new Error}function c(E,L){if(E===6*1)return L>>6>15?3:L>31?2:1;if(E===6*2)return L>15?3:2;if(E===6*3)return 3;throw new Error}for(var s=65533,l="",m=this.bitsNeeded,b=this.codePoint,k=0;k<a.length;k+=1){var A=a[k];m!==0&&(A<128||A>191||!r(b<<6|A&63,m-6,c(m,b)))&&(m=0,b=s,l+=String.fromCharCode(b)),m===0?(A>=0&&A<=127?(m=0,b=A):A>=192&&A<=223?(m=6*1,b=A&31):A>=224&&A<=239?(m=6*2,b=A&15):A>=240&&A<=247?(m=6*3,b=A&7):(m=0,b=s),m!==0&&!r(b,m,c(m,b))&&(m=0,b=s)):(m-=6,b=b<<6|A&63),m===0&&(b<=65535?l+=String.fromCharCode(b):(l+=String.fromCharCode(55296+(b-65535-1>>10)),l+=String.fromCharCode(56320+(b-65535-1&1023))))}return this.bitsNeeded=m,this.codePoint=b,l};var Y=function(){try{return new C().decode(new R().encode("test"),{stream:!0})==="test"}catch(a){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+a)}return!1};(C==null||R==null||!Y())&&(C=V);var S=function(){};function T(a){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=S,this.onload=S,this.onerror=S,this.onreadystatechange=S,this._contentType="",this._xhr=a,this._sendTimeout=0,this._abort=S}T.prototype.open=function(a,r){this._abort(!0);var c=this,s=this._xhr,l=1,m=0;this._abort=function(w){c._sendTimeout!==0&&(d(c._sendTimeout),c._sendTimeout=0),(l===1||l===2||l===3)&&(l=4,s.onload=S,s.onerror=S,s.onabort=S,s.onprogress=S,s.onreadystatechange=S,s.abort(),m!==0&&(d(m),m=0),w||(c.readyState=4,c.onabort(null),c.onreadystatechange())),l=0};var b=function(){if(l===1){var w=0,O="",re=void 0;if("contentType"in s)w=200,O="OK",re=s.contentType;else try{w=s.status,O=s.statusText,re=s.getResponseHeader("Content-Type")}catch(Se){w=0,O="",re=void 0}w!==0&&(l=2,c.readyState=2,c.status=w,c.statusText=O,c._contentType=re,c.onreadystatechange())}},k=function(){if(b(),l===2||l===3){l=3;var w="";try{w=s.responseText}catch(O){}c.readyState=3,c.responseText=w,c.onprogress()}},A=function(w,O){if((O==null||O.preventDefault==null)&&(O={preventDefault:S}),k(),l===1||l===2||l===3){if(l=4,m!==0&&(d(m),m=0),c.readyState=4,w==="load")c.onload(O);else if(w==="error")c.onerror(O);else if(w==="abort")c.onabort(O);else throw new TypeError;c.onreadystatechange()}},E=function(w){s!=null&&(s.readyState===4?(!("onload"in s)||!("onerror"in s)||!("onabort"in s))&&A(s.responseText===""?"error":"load",w):s.readyState===3?"onprogress"in s||k():s.readyState===2&&b())},L=function(){m=i(function(){L()},500),s.readyState===3&&k()};"onload"in s&&(s.onload=function(w){A("load",w)}),"onerror"in s&&(s.onerror=function(w){A("error",w)}),"onabort"in s&&(s.onabort=function(w){A("abort",w)}),"onprogress"in s&&(s.onprogress=k),"onreadystatechange"in s&&(s.onreadystatechange=function(w){E(w)}),("contentType"in s||!("ontimeout"in u.prototype))&&(r+=(r.indexOf("?")===-1?"?":"&")+"padding=true"),s.open(a,r,!0),"readyState"in s&&(m=i(function(){L()},0))},T.prototype.abort=function(){this._abort(!1)},T.prototype.getResponseHeader=function(a){return this._contentType},T.prototype.setRequestHeader=function(a,r){var c=this._xhr;"setRequestHeader"in c&&c.setRequestHeader(a,r)},T.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},T.prototype.send=function(){if((!("ontimeout"in u.prototype)||!("sendAsBinary"in u.prototype)&&!("mozAnon"in u.prototype))&&v!=null&&v.readyState!=null&&v.readyState!=="complete"){var a=this;a._sendTimeout=i(function(){a._sendTimeout=0,a.send()},4);return}var r=this._xhr;"withCredentials"in r&&(r.withCredentials=this.withCredentials);try{r.send(void 0)}catch(c){throw c}};function z(a){return a.replace(/[A-Z]/g,function(r){return String.fromCharCode(r.charCodeAt(0)+32)})}function D(a){for(var r=Object.create(null),c=a.split(`\r
|
6
|
+
`),s=0;s<c.length;s+=1){var l=c[s],m=l.split(": "),b=m.shift(),k=m.join(": ");r[z(b)]=k}this._map=r}D.prototype.get=function(a){return this._map[z(a)]},u!=null&&u.HEADERS_RECEIVED==null&&(u.HEADERS_RECEIVED=2);function J(){}J.prototype.open=function(a,r,c,s,l,m,b){a.open("GET",l);var k=0;a.onprogress=function(){var E=a.responseText,L=E.slice(k);k+=L.length,c(L)},a.onerror=function(E){E.preventDefault(),s(new Error("NetworkError"))},a.onload=function(){s(null)},a.onabort=function(){s(null)},a.onreadystatechange=function(){if(a.readyState===u.HEADERS_RECEIVED){var E=a.status,L=a.statusText,w=a.getResponseHeader("Content-Type"),O=a.getAllResponseHeaders();r(E,L,w,new D(O))}},a.withCredentials=m;for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&a.setRequestHeader(A,b[A]);return a.send(),a};function Q(a){this._headers=a}Q.prototype.get=function(a){return this._headers.get(a)};function le(){}le.prototype.open=function(a,r,c,s,l,m,b){var k=null,A=new H,E=A.signal,L=new C;return F(l,{headers:b,credentials:m?"include":"same-origin",signal:E,cache:"no-store"}).then(function(w){return k=w.body.getReader(),r(w.status,w.statusText,w.headers.get("Content-Type"),new Q(w.headers)),new x(function(O,re){var Se=function(){k.read().then(function(q){if(q.done)O(void 0);else{var U=L.decode(q.value,{stream:!0});c(U),Se()}}).catch(function(q){re(q)})};Se()})}).catch(function(w){if(w.name!=="AbortError")return w}).then(function(w){s(w)}),{abort:function(){k!=null&&k.cancel(),A.abort()}}};function Z(){this._listeners=Object.create(null)}function ve(a){i(function(){throw a},0)}Z.prototype.dispatchEvent=function(a){a.target=this;var r=this._listeners[a.type];if(r!=null)for(var c=r.length,s=0;s<c;s+=1){var l=r[s];try{typeof l.handleEvent=="function"?l.handleEvent(a):l.call(this,a)}catch(m){ve(m)}}},Z.prototype.addEventListener=function(a,r){a=String(a);var c=this._listeners,s=c[a];s==null&&(s=[],c[a]=s);for(var l=!1,m=0;m<s.length;m+=1)s[m]===r&&(l=!0);l||s.push(r)},Z.prototype.removeEventListener=function(a,r){a=String(a);var c=this._listeners,s=c[a];if(s!=null){for(var l=[],m=0;m<s.length;m+=1)s[m]!==r&&l.push(s[m]);l.length===0?delete c[a]:c[a]=l}};function h(a){this.type=a,this.target=void 0}function ce(a,r){h.call(this,a),this.data=r.data,this.lastEventId=r.lastEventId}ce.prototype=Object.create(h.prototype);function we(a,r){h.call(this,a),this.status=r.status,this.statusText=r.statusText,this.headers=r.headers}we.prototype=Object.create(h.prototype);function be(a,r){h.call(this,a),this.error=r.error}be.prototype=Object.create(h.prototype);var Be=-1,te=0,de=1,ae=2,he=-1,ne=0,fe=1,Ce=2,De=3,Ae=/^text\/event\-stream(;.*)?$/i,Le=1e3,Me=18e6,me=function(a,r){var c=a==null?r:parseInt(a,10);return c!==c&&(c=r),Te(c)},Te=function(a){return Math.min(Math.max(a,Le),Me)},ue=function(a,r,c){try{typeof r=="function"&&r.call(a,c)}catch(s){ve(s)}};function X(a,r){Z.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,f(this,a,r)}function Fe(){return u!=null&&"withCredentials"in u.prototype||y==null?new u:new y}var ke=F!=null&&B!=null&&"body"in B.prototype;function f(a,r,c){r=String(r);var s=!!c.withCredentials,l=c.lastEventIdQueryParameterName||"lastEventId",m=Te(1e3),b=me(c.heartbeatTimeout,45e3),k="",A=m,E=!1,L=0,w=c.headers||{},O=c.Transport,re=ke&&O==null?void 0:new T(O!=null?new O:Fe()),Se=O!=null&&typeof O!="string"?new O:re==null?new le:new J,q=void 0,U=0,$=Be,ge="",Re="",oe="",Ee="",P=ne,Oe=0,pe=0,tt=function(I,N,K,W){if($===te)if(I===200&&K!=null&&Ae.test(K)){$=de,E=Date.now(),A=m,a.readyState=de;var G=new we("open",{status:I,statusText:N,headers:W});a.dispatchEvent(G),ue(a,a.onopen,G)}else{var j="";I!==200?(N&&(N=N.replace(/\s+/g," ")),j="EventSource's response has a status "+I+" "+N+" that is not 200. Aborting the connection."):j="EventSource's response has a Content-Type specifying an unsupported type: "+(K==null?"-":K.replace(/\s+/g," "))+". Aborting the connection.",Ne();var G=new we("error",{status:I,statusText:N,headers:W});a.dispatchEvent(G),ue(a,a.onerror,G),console.error(j)}},nt=function(I){if($===de){for(var N=-1,K=0;K<I.length;K+=1){var W=I.charCodeAt(K);(W===10||W===13)&&(N=K)}var G=(N!==-1?Ee:"")+I.slice(0,N+1);Ee=(N===-1?Ee:"")+I.slice(N+1),I!==""&&(E=Date.now(),L+=I.length);for(var j=0;j<G.length;j+=1){var W=G.charCodeAt(j);if(P===he&&W===10)P=ne;else if(P===he&&(P=ne),W===13||W===10){if(P!==ne){P===fe&&(pe=j+1);var ie=G.slice(Oe,pe-1),se=G.slice(pe+(pe<j&&G.charCodeAt(pe)===32?1:0),j);ie==="data"?(ge+=`
|
7
|
+
`,ge+=se):ie==="id"?Re=se:ie==="event"?oe=se:ie==="retry"?(m=me(se,m),A=m):ie==="heartbeatTimeout"&&(b=me(se,b),U!==0&&(d(U),U=i(function(){_e()},b)))}if(P===ne){if(ge!==""){k=Re,oe===""&&(oe="message");var ye=new ce(oe,{data:ge.slice(1),lastEventId:Re});if(a.dispatchEvent(ye),oe==="open"?ue(a,a.onopen,ye):oe==="message"?ue(a,a.onmessage,ye):oe==="error"&&ue(a,a.onerror,ye),$===ae)return}ge="",oe=""}P=W===13?he:ne}else P===ne&&(Oe=j,P=fe),P===fe?W===58&&(pe=j+1,P=Ce):P===Ce&&(P=De)}}},je=function(I){if($===de||$===te){$=Be,U!==0&&(d(U),U=0),U=i(function(){_e()},A),A=Te(Math.min(m*16,A*2)),a.readyState=te;var N=new be("error",{error:I});a.dispatchEvent(N),ue(a,a.onerror,N),I!=null&&console.error(I)}},Ne=function(){$=ae,q!=null&&(q.abort(),q=void 0),U!==0&&(d(U),U=0),a.readyState=ae},_e=function(){if(U=0,$!==Be){if(!E&&q!=null)je(new Error("No activity within "+b+" milliseconds. "+($===te?"No response received.":L+" chars received.")+" Reconnecting.")),q!=null&&(q.abort(),q=void 0);else{var I=Math.max((E||Date.now())+b-Date.now(),1);E=!1,U=i(function(){_e()},I)}return}E=!1,L=0,U=i(function(){_e()},b),$=te,ge="",oe="",Re=k,Ee="",Oe=0,pe=0,P=ne;var N=r;if(r.slice(0,5)!=="data:"&&r.slice(0,5)!=="blob:"&&k!==""){var K=r.indexOf("?");N=K===-1?r:r.slice(0,K+1)+r.slice(K+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(se,ye){return ye===l?"":se}),N+=(r.indexOf("?")===-1?"?":"&")+l+"="+encodeURIComponent(k)}var W=a.withCredentials,G={};G.Accept="text/event-stream";var j=a.headers;if(j!=null)for(var ie in j)Object.prototype.hasOwnProperty.call(j,ie)&&(G[ie]=j[ie]);try{q=Se.open(re,tt,nt,je,N,W,G)}catch(se){throw Ne(),se}};a.url=r,a.readyState=te,a.withCredentials=s,a.headers=w,a._close=Ne,_e()}X.prototype=Object.create(Z.prototype),X.prototype.CONNECTING=te,X.prototype.OPEN=de,X.prototype.CLOSED=ae,X.prototype.close=function(){this._close()},X.CONNECTING=te,X.OPEN=de,X.CLOSED=ae,X.prototype.withCredentials=void 0;var _=g;u!=null&&(g==null||!("withCredentials"in g.prototype))&&(_=X),function(a){{var r=a(e);r!==void 0&&(o.exports=r)}}(function(a){a.EventSourcePolyfill=X,a.NativeEventSource=g,a.EventSource=_})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:t.commonjsGlobal:globalThis)})(Ie,Ie.exports);var ct=Ie.exports;/*!
|
8
8
|
* currency.js - v2.0.4
|
9
9
|
* http://scurker.github.io/currency.js
|
10
10
|
*
|
11
11
|
* Copyright (c) 2021 Jason Wilson
|
12
12
|
* Released under MIT license
|
13
|
-
*/var dt={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:ht,fromCents:!1},$e=function(e){return Math.round(e)},Ve=function(e){return Math.pow(10,e)},ut=function(e,n){return $e(e/n)*n},ft=/(\d)(?=(\d{3})+\b)/g,pt=/(\d)(?=(\d\d)+\d\b)/g;function ee(o,e){var n=this;if(!(n instanceof ee))return new ee(o,e);var i=Object.assign({},dt,e),d=Ve(i.precision),u=xe(o,i);n.intValue=u,n.value=u/d,i.increment=i.increment||1/d,i.useVedic?i.groups=pt:i.groups=ft,this.s=i,this.p=d}function xe(o,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=0,d=e.decimal,u=e.errorOnInvalid,y=e.precision,p=e.fromCents,g=Ve(y),v=typeof o=="number",x=o instanceof ee;if(x&&p)return o.intValue;if(v||x)i=x?o.value:o;else if(typeof o=="string"){var F=new RegExp("[^-\\d"+d+"]","g"),B=new RegExp("\\"+d,"g");i=o.replace(/\((.*)\)/,"-$1").replace(F,"").replace(B,"."),i=i||0}else{if(u)throw Error("Invalid Input");i=0}return p||(i*=g,i=i.toFixed(4)),n?$e(i):i}function ht(o,e){var n=e.pattern,i=e.negativePattern,d=e.symbol,u=e.separator,y=e.decimal,p=e.groups,g=(""+o).replace(/^-/,"").split("."),v=g[0],x=g[1];return(o.value>=0?n:i).replace("!",d).replace("#",v.replace(p,"$1"+u)+(x?y+x:""))}ee.prototype={add:function(e){var n=this.intValue,i=this.s,d=this.p;return ee((n+=xe(e,i))/(i.fromCents?1:d),i)},subtract:function(e){var n=this.intValue,i=this.s,d=this.p;return ee((n-=xe(e,i))/(i.fromCents?1:d),i)},multiply:function(e){var n=this.intValue,i=this.s;return ee((n*=e)/(i.fromCents?1:Ve(i.precision)),i)},divide:function(e){var n=this.intValue,i=this.s;return ee(n/=xe(e,i,!1),i)},distribute:function(e){for(var n=this.intValue,i=this.p,d=this.s,u=[],y=Math[n>=0?"floor":"ceil"](n/e),p=Math.abs(n-y*e),g=d.fromCents?1:i;e!==0;e--){var v=ee(y/g,d);p-- >0&&(v=v[n>=0?"add":"subtract"](1/g)),u.push(v)}return u},dollars:function(){return~~this.value},cents:function(){var e=this.intValue,n=this.p;return~~(e%n)},format:function(e){var n=this.s;return typeof e=="function"?e(this,n):n.format(this,Object.assign({},n,e))},toString:function(){var e=this.intValue,n=this.p,i=this.s;return ut(e/n,i.increment).toFixed(i.precision)},toJSON:function(){return this.value}};function mt(o){t.append_styles(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}')}function Ke(o,e,n){const i=o.slice();return i[47]=e[n],i}function We(o,e,n){const i=o.slice();return i[50]=e[n],i}function gt(o){let e,n=(o[4].Total?o[6](o[4].Total[0].amount):"0")+"",i,d,u,y,p,g,v,x,F,B=o[2]&&Ye(o);return{c(){e=t.element("p"),i=t.text(n),d=t.space(),u=t.text(o[3]),y=t.space(),p=t.element("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=t.space(),B&&B.c(),v=t.empty(),t.attr(e,"class","BalanceValue"),t.attr(e,"part","BalanceValue")},m(C,R){t.insert(C,e,R),t.append(e,i),t.append(e,d),t.append(e,u),t.append(e,y),t.append(e,p),t.insert(C,g,R),B&&B.m(C,R),t.insert(C,v,R),x||(F=t.listen(e,"click",o[23]),x=!0)},p(C,R){R[0]&16&&n!==(n=(C[4].Total?C[6](C[4].Total[0].amount):"0")+"")&&t.set_data(i,n),R[0]&8&&t.set_data(u,C[3]),C[2]?B?B.p(C,R):(B=Ye(C),B.c(),B.m(v.parentNode,v)):B&&(B.d(1),B=null)},d(C){C&&(t.detach(e),t.detach(g),t.detach(v)),B&&B.d(C),x=!1,F()}}}function yt(o){let e,n=o[5]("Loading")+"",i;return{c(){e=t.element("p"),i=t.text(n)},m(d,u){t.insert(d,e,u),t.append(e,i)},p(d,u){u[0]&32&&n!==(n=d[5]("Loading")+"")&&t.set_data(i,n)},d(d){d&&t.detach(e)}}}function Ye(o){let e,n,i,d,u,y,p=o[5]("Title")+"",g,v,x,F,B,C,R=o[5]("DepositButton")+"",H,M,V,Y=t.ensure_array_like(Object.keys(o[4])),T=[];for(let S=0;S<Y.length;S+=1)T[S]=Qe(Ke(o,Y,S));return{c(){e=t.element("div"),n=t.element("div"),i=t.space(),d=t.element("div"),u=t.element("div"),y=t.element("p"),g=t.text(p),v=t.space(),x=t.element("div");for(let S=0;S<T.length;S+=1)T[S].c();F=t.space(),B=t.element("div"),C=t.element("button"),H=t.text(R),t.attr(n,"class","BalanceModalClose"),t.attr(y,"class","BalanceModalTitle"),t.attr(u,"class","BalanceModalHeader"),t.attr(x,"class","BalanceModalBody"),t.attr(C,"class","BalanceModalAction"),t.attr(B,"class","BalanceModalFooter"),t.attr(d,"class","BalanceModal"),t.attr(e,"class","BalanceModalWrapper")},m(S,z){t.insert(S,e,z),t.append(e,n),t.append(e,i),t.append(e,d),t.append(d,u),t.append(u,y),t.append(y,g),t.append(d,v),t.append(d,x);for(let D=0;D<T.length;D+=1)T[D]&&T[D].m(x,null);t.append(d,F),t.append(d,B),t.append(B,C),t.append(C,H),M||(V=[t.listen(n,"click",o[24]),t.listen(C,"click",o[25])],M=!0)},p(S,z){if(z[0]&32&&p!==(p=S[5]("Title")+"")&&t.set_data(g,p),z[0]&120){Y=t.ensure_array_like(Object.keys(S[4]));let D;for(D=0;D<Y.length;D+=1){const J=Ke(S,Y,D);T[D]?T[D].p(J,z):(T[D]=Qe(J),T[D].c(),T[D].m(x,null))}for(;D<T.length;D+=1)T[D].d(1);T.length=Y.length}z[0]&32&&R!==(R=S[5]("DepositButton")+"")&&t.set_data(H,R)},d(S){S&&t.detach(e),t.destroy_each(T,S),M=!1,t.run_all(V)}}}function Je(o){let e,n,i=o[5](o[47])+"",d,u,y=(o[50].productType?o[5](o[50].productType):"")+"",p,g,v,x,F=(o[50].amount?o[6](o[50].amount):"0")+"",B,C,R,H;return{c(){e=t.element("div"),n=t.element("p"),d=t.text(i),u=t.space(),p=t.text(y),g=t.space(),v=t.element("p"),x=t.element("span"),B=t.text(F),C=t.space(),R=t.element("span"),H=t.text(o[3]),t.attr(n,"class","BalanceModalText"),t.attr(x,"class","BalanceModalAmount"),t.attr(R,"class","BalanceModalCurrency"),t.attr(v,"class","BalanceModalValue"),t.attr(e,"class","BalanceModalRowLine")},m(M,V){t.insert(M,e,V),t.append(e,n),t.append(n,d),t.append(n,u),t.append(n,p),t.append(e,g),t.append(e,v),t.append(v,x),t.append(x,B),t.append(v,C),t.append(v,R),t.append(R,H)},p(M,V){V[0]&48&&i!==(i=M[5](M[47])+"")&&t.set_data(d,i),V[0]&48&&y!==(y=(M[50].productType?M[5](M[50].productType):"")+"")&&t.set_data(p,y),V[0]&16&&F!==(F=(M[50].amount?M[6](M[50].amount):"0")+"")&&t.set_data(B,F),V[0]&8&&t.set_data(H,M[3])},d(M){M&&t.detach(e)}}}function Qe(o){let e,n,i=t.ensure_array_like(o[4][o[47]]),d=[];for(let u=0;u<i.length;u+=1)d[u]=Je(We(o,i,u));return{c(){e=t.element("div");for(let u=0;u<d.length;u+=1)d[u].c();n=t.space(),t.attr(e,"class","BalanceModalRowBoth")},m(u,y){t.insert(u,e,y);for(let p=0;p<d.length;p+=1)d[p]&&d[p].m(e,null);t.append(e,n)},p(u,y){if(y[0]&120){i=t.ensure_array_like(u[4][u[47]]);let p;for(p=0;p<i.length;p+=1){const g=We(u,i,p);d[p]?d[p].p(g,y):(d[p]=Je(g),d[p].c(),d[p].m(e,n))}for(;p<d.length;p+=1)d[p].d(1);d.length=i.length}},d(u){u&&t.detach(e),t.destroy_each(d,u)}}}function Ze(o){let e,n,i;return{c(){e=t.element("div"),t.attr(e,"class","ShowBalanceModalOverlay")},m(d,u){t.insert(d,e,u),n||(i=t.listen(e,"click",o[26]),n=!0)},p:t.noop,d(d){d&&t.detach(e),n=!1,i()}}}function vt(o){let e,n,i;function d(g,v){return g[1]?yt:gt}let u=d(o),y=u(o),p=o[2]&&Ze(o);return{c(){e=t.element("div"),n=t.element("div"),y.c(),i=t.space(),p&&p.c(),t.attr(n,"class","ShowBalance"),t.attr(n,"part","ShowBalance")},m(g,v){t.insert(g,e,v),t.append(e,n),y.m(n,null),t.append(e,i),p&&p.m(e,null),o[27](e)},p(g,v){u===(u=d(g))&&y?y.p(g,v):(y.d(1),y=u(g),y&&(y.c(),y.m(n,null))),g[2]?p?p.p(g,v):(p=Ze(g),p.c(),p.m(e,null)):p&&(p.d(1),p=null)},i:t.noop,o:t.noop,d(g){g&&t.detach(e),y.d(),p&&p.d(),o[27](null)}}}function wt(o,e,n){let i;t.component_subscribe(o,t.$format,f=>n(5,i=f));let{userid:d=""}=e,{session:u=""}=e,{endpoint:y=""}=e,{lang:p="en"}=e,{clientstyling:g=""}=e,{clientstylingurl:v=""}=e,{translationurl:x=""}=e,{customlocaleidentifier:F=""}=e,{gmversion:B="gm16"}=e,{displaybalanceoption:C="All"}=e,{totalcalculationmode:R="totalCashAmount"}=e,{currencyseparator:H=""}=e,{currencydecimal:M=""}=e,{currencyprecision:V=""}=e,{mbsource:Y}=e,T,S,z,D=!1,J="",Q=[],le,Z=!1,ve;const h={},ce=["totalCashAmount","totalRealAmount"],we=()=>{fetch(x).then(f=>f.json()).then(f=>Object.keys(f).forEach(_=>Xe(_,f[_]))).catch(f=>console.log(f))};Object.keys(qe).forEach(f=>Xe(f,qe[f]));const be=()=>{if(F.includes(p))return F},Be=f=>F?new Intl.NumberFormat(be(),{useGrouping:!0}).format(f):H&&M?ee(f,{separator:H,decimal:M,symbol:"",precision:parseInt(V||"2",10)}).format():ee(f,{separator:".",decimal:",",symbol:"",precision:parseInt(V||"2",10)}).format(),te=()=>Ge(this,null,function*(){var _,a,r;n(1,T=!0);const f=new URL(`${y}/v1/player/${d}/account`);try{const c=yield fetch(f,{method:"GET",headers:{"X-SessionID":u}}),s=yield c.json();if(c.ok)Q=s.items,n(3,J=(_=Q.find(l=>l.displayName==="Casino"))==null?void 0:_.currency),n(4,h.Total=[{amount:s.totalAmount[J]}],h),n(4,h.Real=[{amount:(a=Q.find(l=>l.displayName==="Casino"))==null?void 0:a.balanceAmount}],h),n(4,h.Bonus=[{amount:(r=Q.find(l=>l.displayName==="UBS"))==null?void 0:r.balanceAmount}],h);else throw new Error("Failed to fetch balance data !")}catch(c){console.log("Balance error: ",c)}finally{n(1,T=!1)}}),de=()=>{n(1,T=!0);const f=new URL(`${y}/v2/player/${d}/balance`),_=new Headers;_.append("X-SessionID",u),fetch(f,{method:"GET",headers:_}).then(r=>r.json()).then(r=>{r[R]||n(8,R=ce[0]);const c=r.items.find(l=>l.type==="Real"&&l.walletAccountType==="Ordinary");if(n(3,J=c.currency),Z=!!c.productType,n(4,h.Total=[{amount:0}],h),n(4,h.Real=[],h),n(4,h.Bonus=[],h),n(4,h.Credit=[],h),!Z){le={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(4,h.Total[0].amount=r[R][J],h);for(const l of r.items)switch(l.type){case"Bonus":h.Bonus.length===0?h.Bonus.push({amount:l.amount}):n(4,h.Bonus[0].amount+=l.amount,h);break;case"Real":if(l.creditLine&&h.Credit.length===0&&h.Credit.push({amount:l.creditLine}),R==="totalRealAmount")continue;h.Real.length===0?h.Real.push({amount:l.amount}):n(4,h.Real[0].amount+=l.amount,h);break}for(const[l,m]of Object.entries(h))m.length<1&&delete h[l];n(1,T=!1);return}le={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let s=r.items;C&&C!=="All"&&(s=r.items.filter(l=>l.productType===C));for(const l of s){let m;switch(l.type){case"Bonus":m=h.Bonus.findIndex(b=>b.productType===l.productType),m>0?n(4,h.Bonus[m].amount+=l.amount,h):h.Bonus.push({amount:l.amount,productType:l.productType});break;case"Real":l.creditLine&&h.Credit.push({amount:l.creditLine,productType:l.productType}),m=h.Real.findIndex(b=>b.productType===l.productType),m>0?n(4,h.Real[m].amount+=l.amount,h):h.Real.push({amount:l.amount,productType:l.productType});break}}Ce();for(const[l,m]of Object.entries(h))m.length<1&&delete h[l];n(1,T=!1)}).catch(r=>{throw n(1,T=!1),new Error("Failed to fetch balance data !")})},ae=()=>{if(z&&z.close(),u.length<1)return;let f,_;switch(B){case"gm16":f=new URL(`${y}/v2/player/${d}/information/updates`),_=c=>De(c);break;case"gmcore":f=new URL(`${y}/v1/player/${d}/balance/updates`),_=c=>ne(c);break}const a={accept:"text/event-stream","X-SessionId":u},r=new ct.EventSourcePolyfill(f,{headers:a});z=r,r.addEventListener("message",_)},he=f=>{let _;try{_=JSON.parse(f)}catch(a){console.log("Balance stream failed: ",a);return}return _},ne=f=>{var c,s;const _=he(f.data);if(!_){ae();return}let a="0";const r=_.balanceChange;Q=Q.map(l=>(r&&r[l.id]&&(l=Pe(Ue({},l),{balanceAmount:r[l.id].afterAmount})),a=(parseFloat(l==null?void 0:l.balanceAmount)+parseFloat(a)).toString(),l)),n(4,h.Real=[{amount:(c=Q[0])==null?void 0:c.balanceAmount}],h),n(4,h.Bonus=[{amount:(s=Q[1])==null?void 0:s.balanceAmount}],h),n(4,h.Total=[{amount:Number(a)}],h)},fe=(f,_,a)=>{let r=null;switch(a.walletAccountType){case"Ordinary":a.afterAmount!==a.affectedAmount&&(_.lastOrdinaryAfterAmount=a.afterAmount,_.showCreditLineAfterAmount||(r=a.afterAmount));break;case"CreditLine":a.afterAmount!==0?(r=a.afterAmount,_.showCreditLineAfterAmount=!0):(r=_.lastOrdinaryAfterAmount,_.showCreditLineAfterAmount=!1);break;default:r=a.afterAmount}return r===null?f:r},Ce=()=>{switch(R){case"totalCashAmount":let f=0;for(const a of["Real","Bonus"])for(const r of h[a])f+=Math.max(r.amount,0);n(4,h.Total[0].amount=f,h);break;case"totalRealAmount":if(!Z)return;let _=0;for(const a of h.Real)_+=a.amount;n(4,h.Total[0].amount=_,h)}},De=f=>{const _=he(f.data);if(!_){ae();return}if(_.type!=="BALANCE_UPDATE_V2")return;const a=_.body.balanceChange;for(const[r,c]of Object.entries(a))if(R==="totalRealAmount"&&r==="Real"&&!Z&&n(4,h.Total[0].amount=fe(h.Total[0].amount,le,c),h),!!h[r])for(const s of h[r]){if(!Z){s.amount=r==="Real"?fe(s.amount,le,c):c.afterAmount;continue}c.productType===s.productType&&(s.amount=r==="Real"?fe(s.amount,le[s.productType],c):c.afterAmount)}Ce()},Ae=()=>{n(2,D=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Le=()=>{ce.includes(R)||(console.error(`Unsupported value ('${R}') for totalcalculationmode parameter. Only the following values are supported ${ce}. Using default value ('${ce[0]}').`),n(8,R=ce[0]))},Me=()=>{switch(lt(p),Le(),B){case"gmcore":te();break;case"gm16":de();break;default:throw Error(`Invalid apiversion attribute: ${B}`)}},me=f=>f.data&&f.data.type==="LogoutSuccessfull"&&z.close();t.onMount(()=>(window.addEventListener("message",me,!1),()=>{window.emMessageBus&&ve&&ve.unsubscribe(),window.removeEventListener("message",me),z&&z.close()}));const Se=()=>n(2,D=!0),ue=()=>n(2,D=!1),X=()=>Ae(),Fe=()=>n(2,D=!1);function ke(f){t.binding_callbacks[f?"unshift":"push"](()=>{S=f,n(0,S)})}return o.$$set=f=>{"userid"in f&&n(9,d=f.userid),"session"in f&&n(10,u=f.session),"endpoint"in f&&n(11,y=f.endpoint),"lang"in f&&n(12,p=f.lang),"clientstyling"in f&&n(13,g=f.clientstyling),"clientstylingurl"in f&&n(14,v=f.clientstylingurl),"translationurl"in f&&n(15,x=f.translationurl),"customlocaleidentifier"in f&&n(16,F=f.customlocaleidentifier),"gmversion"in f&&n(17,B=f.gmversion),"displaybalanceoption"in f&&n(18,C=f.displaybalanceoption),"totalcalculationmode"in f&&n(8,R=f.totalcalculationmode),"currencyseparator"in f&&n(19,H=f.currencyseparator),"currencydecimal"in f&&n(20,M=f.currencydecimal),"currencyprecision"in f&&n(21,V=f.currencyprecision),"mbsource"in f&&n(22,Y=f.mbsource)},o.$$.update=()=>{o.$$.dirty[0]&4096&&p&&be(),o.$$.dirty[0]&400896&&y&&d&&u&&p&&B&&C&&Me(),o.$$.dirty[0]&134656&&y&&d&&u&&B&&ae(),o.$$.dirty[0]&8193&&g&&S&&t.setClientStyling(S,g),o.$$.dirty[0]&16385&&v&&S&&t.setClientStylingURL(S,v),o.$$.dirty[0]&4194305&&S&&t.setStreamStyling(S,`${Y}.Style`),o.$$.dirty[0]&32768&&x&&we()},[S,T,D,J,h,i,Be,Ae,R,d,u,y,p,g,v,x,F,B,C,H,M,V,Y,Se,ue,X,Fe,ke]}class et extends t.SvelteComponent{constructor(e){super(),t.init(this,e,wt,vt,t.safe_not_equal,{userid:9,session:10,endpoint:11,lang:12,clientstyling:13,clientstylingurl:14,translationurl:15,customlocaleidentifier:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,currencyseparator:19,currencydecimal:20,currencyprecision:21,mbsource:22},mt,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(e){this.$$set({userid:e}),t.flush()}get session(){return this.$$.ctx[10]}set session(e){this.$$set({session:e}),t.flush()}get endpoint(){return this.$$.ctx[11]}set endpoint(e){this.$$set({endpoint:e}),t.flush()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),t.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(e){this.$$set({translationurl:e}),t.flush()}get customlocaleidentifier(){return this.$$.ctx[16]}set customlocaleidentifier(e){this.$$set({customlocaleidentifier:e}),t.flush()}get gmversion(){return this.$$.ctx[17]}set gmversion(e){this.$$set({gmversion:e}),t.flush()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(e){this.$$set({displaybalanceoption:e}),t.flush()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(e){this.$$set({totalcalculationmode:e}),t.flush()}get currencyseparator(){return this.$$.ctx[19]}set currencyseparator(e){this.$$set({currencyseparator:e}),t.flush()}get currencydecimal(){return this.$$.ctx[20]}set currencydecimal(e){this.$$set({currencydecimal:e}),t.flush()}get currencyprecision(){return this.$$.ctx[21]}set currencyprecision(e){this.$$set({currencyprecision:e}),t.flush()}get mbsource(){return this.$$.ctx[22]}set mbsource(e){this.$$set({mbsource:e}),t.flush()}}t.create_custom_element(et,{userid:{},session:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},customlocaleidentifier:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencyseparator:{},currencydecimal:{},currencyprecision:{},mbsource:{}},[],[],!0);exports.default=et;
|
13
|
+
*/var dt={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:ht,fromCents:!1},$e=function(e){return Math.round(e)},Ve=function(e){return Math.pow(10,e)},ut=function(e,n){return $e(e/n)*n},ft=/(\d)(?=(\d{3})+\b)/g,pt=/(\d)(?=(\d\d)+\d\b)/g;function ee(o,e){var n=this;if(!(n instanceof ee))return new ee(o,e);var i=Object.assign({},dt,e),d=Ve(i.precision),u=xe(o,i);n.intValue=u,n.value=u/d,i.increment=i.increment||1/d,i.useVedic?i.groups=pt:i.groups=ft,this.s=i,this.p=d}function xe(o,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=0,d=e.decimal,u=e.errorOnInvalid,y=e.precision,p=e.fromCents,g=Ve(y),v=typeof o=="number",x=o instanceof ee;if(x&&p)return o.intValue;if(v||x)i=x?o.value:o;else if(typeof o=="string"){var F=new RegExp("[^-\\d"+d+"]","g"),B=new RegExp("\\"+d,"g");i=o.replace(/\((.*)\)/,"-$1").replace(F,"").replace(B,"."),i=i||0}else{if(u)throw Error("Invalid Input");i=0}return p||(i*=g,i=i.toFixed(4)),n?$e(i):i}function ht(o,e){var n=e.pattern,i=e.negativePattern,d=e.symbol,u=e.separator,y=e.decimal,p=e.groups,g=(""+o).replace(/^-/,"").split("."),v=g[0],x=g[1];return(o.value>=0?n:i).replace("!",d).replace("#",v.replace(p,"$1"+u)+(x?y+x:""))}ee.prototype={add:function(e){var n=this.intValue,i=this.s,d=this.p;return ee((n+=xe(e,i))/(i.fromCents?1:d),i)},subtract:function(e){var n=this.intValue,i=this.s,d=this.p;return ee((n-=xe(e,i))/(i.fromCents?1:d),i)},multiply:function(e){var n=this.intValue,i=this.s;return ee((n*=e)/(i.fromCents?1:Ve(i.precision)),i)},divide:function(e){var n=this.intValue,i=this.s;return ee(n/=xe(e,i,!1),i)},distribute:function(e){for(var n=this.intValue,i=this.p,d=this.s,u=[],y=Math[n>=0?"floor":"ceil"](n/e),p=Math.abs(n-y*e),g=d.fromCents?1:i;e!==0;e--){var v=ee(y/g,d);p-- >0&&(v=v[n>=0?"add":"subtract"](1/g)),u.push(v)}return u},dollars:function(){return~~this.value},cents:function(){var e=this.intValue,n=this.p;return~~(e%n)},format:function(e){var n=this.s;return typeof e=="function"?e(this,n):n.format(this,Object.assign({},n,e))},toString:function(){var e=this.intValue,n=this.p,i=this.s;return ut(e/n,i.increment).toFixed(i.precision)},toJSON:function(){return this.value}};function mt(o){t.append_styles(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}')}function Ke(o,e,n){const i=o.slice();return i[47]=e[n],i}function We(o,e,n){const i=o.slice();return i[50]=e[n],i}function gt(o){let e,n=(o[4].Total?o[6](o[4].Total[0].amount):"0")+"",i,d,u,y,p,g,v,x,F,B=o[2]&&Ye(o);return{c(){e=t.element("p"),i=t.text(n),d=t.space(),u=t.text(o[3]),y=t.space(),p=t.element("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=t.space(),B&&B.c(),v=t.empty(),t.attr(e,"class","BalanceValue")},m(C,R){t.insert(C,e,R),t.append(e,i),t.append(e,d),t.append(e,u),t.append(e,y),t.append(e,p),t.insert(C,g,R),B&&B.m(C,R),t.insert(C,v,R),x||(F=t.listen(e,"click",o[23]),x=!0)},p(C,R){R[0]&16&&n!==(n=(C[4].Total?C[6](C[4].Total[0].amount):"0")+"")&&t.set_data(i,n),R[0]&8&&t.set_data(u,C[3]),C[2]?B?B.p(C,R):(B=Ye(C),B.c(),B.m(v.parentNode,v)):B&&(B.d(1),B=null)},d(C){C&&(t.detach(e),t.detach(g),t.detach(v)),B&&B.d(C),x=!1,F()}}}function yt(o){let e,n=o[5]("Loading")+"",i;return{c(){e=t.element("p"),i=t.text(n)},m(d,u){t.insert(d,e,u),t.append(e,i)},p(d,u){u[0]&32&&n!==(n=d[5]("Loading")+"")&&t.set_data(i,n)},d(d){d&&t.detach(e)}}}function Ye(o){let e,n,i,d,u,y,p=o[5]("Title")+"",g,v,x,F,B,C,R=o[5]("DepositButton")+"",H,M,V,Y=t.ensure_array_like(Object.keys(o[4])),S=[];for(let T=0;T<Y.length;T+=1)S[T]=Qe(Ke(o,Y,T));return{c(){e=t.element("div"),n=t.element("div"),i=t.space(),d=t.element("div"),u=t.element("div"),y=t.element("p"),g=t.text(p),v=t.space(),x=t.element("div");for(let T=0;T<S.length;T+=1)S[T].c();F=t.space(),B=t.element("div"),C=t.element("button"),H=t.text(R),t.attr(n,"class","BalanceModalClose"),t.attr(y,"class","BalanceModalTitle"),t.attr(u,"class","BalanceModalHeader"),t.attr(x,"class","BalanceModalBody"),t.attr(C,"class","BalanceModalAction"),t.attr(B,"class","BalanceModalFooter"),t.attr(d,"class","BalanceModal"),t.attr(e,"class","BalanceModalWrapper")},m(T,z){t.insert(T,e,z),t.append(e,n),t.append(e,i),t.append(e,d),t.append(d,u),t.append(u,y),t.append(y,g),t.append(d,v),t.append(d,x);for(let D=0;D<S.length;D+=1)S[D]&&S[D].m(x,null);t.append(d,F),t.append(d,B),t.append(B,C),t.append(C,H),M||(V=[t.listen(n,"click",o[24]),t.listen(C,"click",o[25])],M=!0)},p(T,z){if(z[0]&32&&p!==(p=T[5]("Title")+"")&&t.set_data(g,p),z[0]&120){Y=t.ensure_array_like(Object.keys(T[4]));let D;for(D=0;D<Y.length;D+=1){const J=Ke(T,Y,D);S[D]?S[D].p(J,z):(S[D]=Qe(J),S[D].c(),S[D].m(x,null))}for(;D<S.length;D+=1)S[D].d(1);S.length=Y.length}z[0]&32&&R!==(R=T[5]("DepositButton")+"")&&t.set_data(H,R)},d(T){T&&t.detach(e),t.destroy_each(S,T),M=!1,t.run_all(V)}}}function Je(o){let e,n,i=o[5](o[47])+"",d,u,y=(o[50].productType?o[5](o[50].productType):"")+"",p,g,v,x,F=(o[50].amount?o[6](o[50].amount):"0")+"",B,C,R,H;return{c(){e=t.element("div"),n=t.element("p"),d=t.text(i),u=t.space(),p=t.text(y),g=t.space(),v=t.element("p"),x=t.element("span"),B=t.text(F),C=t.space(),R=t.element("span"),H=t.text(o[3]),t.attr(n,"class","BalanceModalText"),t.attr(x,"class","BalanceModalAmount"),t.attr(R,"class","BalanceModalCurrency"),t.attr(v,"class","BalanceModalValue"),t.attr(e,"class","BalanceModalRowLine")},m(M,V){t.insert(M,e,V),t.append(e,n),t.append(n,d),t.append(n,u),t.append(n,p),t.append(e,g),t.append(e,v),t.append(v,x),t.append(x,B),t.append(v,C),t.append(v,R),t.append(R,H)},p(M,V){V[0]&48&&i!==(i=M[5](M[47])+"")&&t.set_data(d,i),V[0]&48&&y!==(y=(M[50].productType?M[5](M[50].productType):"")+"")&&t.set_data(p,y),V[0]&16&&F!==(F=(M[50].amount?M[6](M[50].amount):"0")+"")&&t.set_data(B,F),V[0]&8&&t.set_data(H,M[3])},d(M){M&&t.detach(e)}}}function Qe(o){let e,n,i=t.ensure_array_like(o[4][o[47]]),d=[];for(let u=0;u<i.length;u+=1)d[u]=Je(We(o,i,u));return{c(){e=t.element("div");for(let u=0;u<d.length;u+=1)d[u].c();n=t.space(),t.attr(e,"class","BalanceModalRowBoth")},m(u,y){t.insert(u,e,y);for(let p=0;p<d.length;p+=1)d[p]&&d[p].m(e,null);t.append(e,n)},p(u,y){if(y[0]&120){i=t.ensure_array_like(u[4][u[47]]);let p;for(p=0;p<i.length;p+=1){const g=We(u,i,p);d[p]?d[p].p(g,y):(d[p]=Je(g),d[p].c(),d[p].m(e,n))}for(;p<d.length;p+=1)d[p].d(1);d.length=i.length}},d(u){u&&t.detach(e),t.destroy_each(d,u)}}}function Ze(o){let e,n,i;return{c(){e=t.element("div"),t.attr(e,"class","ShowBalanceModalOverlay")},m(d,u){t.insert(d,e,u),n||(i=t.listen(e,"click",o[26]),n=!0)},p:t.noop,d(d){d&&t.detach(e),n=!1,i()}}}function vt(o){let e,n,i;function d(g,v){return g[1]?yt:gt}let u=d(o),y=u(o),p=o[2]&&Ze(o);return{c(){e=t.element("div"),n=t.element("div"),y.c(),i=t.space(),p&&p.c(),t.attr(n,"class","ShowBalance")},m(g,v){t.insert(g,e,v),t.append(e,n),y.m(n,null),t.append(e,i),p&&p.m(e,null),o[27](e)},p(g,v){u===(u=d(g))&&y?y.p(g,v):(y.d(1),y=u(g),y&&(y.c(),y.m(n,null))),g[2]?p?p.p(g,v):(p=Ze(g),p.c(),p.m(e,null)):p&&(p.d(1),p=null)},i:t.noop,o:t.noop,d(g){g&&t.detach(e),y.d(),p&&p.d(),o[27](null)}}}function wt(o,e,n){let i;t.component_subscribe(o,t.$format,f=>n(5,i=f));let{userid:d=""}=e,{session:u=""}=e,{endpoint:y=""}=e,{lang:p="en"}=e,{clientstyling:g=""}=e,{clientstylingurl:v=""}=e,{translationurl:x=""}=e,{customlocaleidentifier:F=""}=e,{gmversion:B="gm16"}=e,{displaybalanceoption:C="All"}=e,{totalcalculationmode:R="totalCashAmount"}=e,{currencyseparator:H=""}=e,{currencydecimal:M=""}=e,{currencyprecision:V=""}=e,{mbsource:Y}=e,S,T,z,D=!1,J="",Q=[],le,Z=!1,ve;const h={},ce=["totalCashAmount","totalRealAmount"],we=()=>{fetch(x).then(f=>f.json()).then(f=>Object.keys(f).forEach(_=>Xe(_,f[_]))).catch(f=>console.log(f))};Object.keys(qe).forEach(f=>Xe(f,qe[f]));const be=()=>{if(F.includes(p))return F},Be=f=>F?new Intl.NumberFormat(be(),{useGrouping:!0}).format(f):H&&M?ee(f,{separator:H,decimal:M,symbol:"",precision:parseInt(V||"2",10)}).format():ee(f,{separator:".",decimal:",",symbol:"",precision:parseInt(V||"2",10)}).format(),te=()=>Ge(this,null,function*(){var _,a,r;n(1,S=!0);const f=new URL(`${y}/v1/player/${d}/account`);try{const c=yield fetch(f,{method:"GET",headers:{"X-SessionID":u}}),s=yield c.json();if(c.ok)Q=s.items,n(3,J=(_=Q.find(l=>l.displayName==="Casino"))==null?void 0:_.currency),n(4,h.Total=[{amount:s.totalAmount[J]}],h),n(4,h.Real=[{amount:(a=Q.find(l=>l.displayName==="Casino"))==null?void 0:a.balanceAmount}],h),n(4,h.Bonus=[{amount:(r=Q.find(l=>l.displayName==="UBS"))==null?void 0:r.balanceAmount}],h);else throw new Error("Failed to fetch balance data !")}catch(c){console.log("Balance error: ",c)}finally{n(1,S=!1)}}),de=()=>{n(1,S=!0);const f=new URL(`${y}/v2/player/${d}/balance`),_=new Headers;_.append("X-SessionID",u),fetch(f,{method:"GET",headers:_}).then(r=>r.json()).then(r=>{r[R]||n(8,R=ce[0]);const c=r.items.find(l=>l.type==="Real"&&l.walletAccountType==="Ordinary");if(n(3,J=c.currency),Z=!!c.productType,n(4,h.Total=[{amount:0}],h),n(4,h.Real=[],h),n(4,h.Bonus=[],h),n(4,h.Credit=[],h),!Z){le={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(4,h.Total[0].amount=r[R][J],h);for(const l of r.items)switch(l.type){case"Bonus":h.Bonus.length===0?h.Bonus.push({amount:l.amount}):n(4,h.Bonus[0].amount+=l.amount,h);break;case"Real":if(l.creditLine&&h.Credit.length===0&&h.Credit.push({amount:l.creditLine}),R==="totalRealAmount")continue;h.Real.length===0?h.Real.push({amount:l.amount}):n(4,h.Real[0].amount+=l.amount,h);break}for(const[l,m]of Object.entries(h))m.length<1&&delete h[l];n(1,S=!1);return}le={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let s=r.items;C&&C!=="All"&&(s=r.items.filter(l=>l.productType===C));for(const l of s){let m;switch(l.type){case"Bonus":m=h.Bonus.findIndex(b=>b.productType===l.productType),m>0?n(4,h.Bonus[m].amount+=l.amount,h):h.Bonus.push({amount:l.amount,productType:l.productType});break;case"Real":l.creditLine&&h.Credit.push({amount:l.creditLine,productType:l.productType}),m=h.Real.findIndex(b=>b.productType===l.productType),m>0?n(4,h.Real[m].amount+=l.amount,h):h.Real.push({amount:l.amount,productType:l.productType});break}}Ce();for(const[l,m]of Object.entries(h))m.length<1&&delete h[l];n(1,S=!1)}).catch(r=>{throw n(1,S=!1),new Error("Failed to fetch balance data !")})},ae=()=>{if(z&&z.close(),u.length<1)return;let f,_;switch(B){case"gm16":f=new URL(`${y}/v2/player/${d}/information/updates`),_=c=>De(c);break;case"gmcore":f=new URL(`${y}/v1/player/${d}/balance/updates`),_=c=>ne(c);break}const a={accept:"text/event-stream","X-SessionId":u},r=new ct.EventSourcePolyfill(f,{headers:a});z=r,r.addEventListener("message",_)},he=f=>{let _;try{_=JSON.parse(f)}catch(a){console.log("Balance stream failed: ",a);return}return _},ne=f=>{var c,s;const _=he(f.data);if(!_){ae();return}let a="0";const r=_.balanceChange;Q=Q.map(l=>(r&&r[l.id]&&(l=Pe(Ue({},l),{balanceAmount:r[l.id].afterAmount})),a=(parseFloat(l==null?void 0:l.balanceAmount)+parseFloat(a)).toString(),l)),n(4,h.Real=[{amount:(c=Q[0])==null?void 0:c.balanceAmount}],h),n(4,h.Bonus=[{amount:(s=Q[1])==null?void 0:s.balanceAmount}],h),n(4,h.Total=[{amount:Number(a)}],h)},fe=(f,_,a)=>{let r=null;switch(a.walletAccountType){case"Ordinary":a.afterAmount!==a.affectedAmount&&(_.lastOrdinaryAfterAmount=a.afterAmount,_.showCreditLineAfterAmount||(r=a.afterAmount));break;case"CreditLine":a.afterAmount!==0?(r=a.afterAmount,_.showCreditLineAfterAmount=!0):(r=_.lastOrdinaryAfterAmount,_.showCreditLineAfterAmount=!1);break;default:r=a.afterAmount}return r===null?f:r},Ce=()=>{switch(R){case"totalCashAmount":let f=0;for(const a of["Real","Bonus"])for(const r of h[a])f+=Math.max(r.amount,0);n(4,h.Total[0].amount=f,h);break;case"totalRealAmount":if(!Z)return;let _=0;for(const a of h.Real)_+=a.amount;n(4,h.Total[0].amount=_,h)}},De=f=>{const _=he(f.data);if(!_){ae();return}if(_.type!=="BALANCE_UPDATE_V2")return;const a=_.body.balanceChange;for(const[r,c]of Object.entries(a))if(R==="totalRealAmount"&&r==="Real"&&!Z&&n(4,h.Total[0].amount=fe(h.Total[0].amount,le,c),h),!!h[r])for(const s of h[r]){if(!Z){s.amount=r==="Real"?fe(s.amount,le,c):c.afterAmount;continue}c.productType===s.productType&&(s.amount=r==="Real"?fe(s.amount,le[s.productType],c):c.afterAmount)}Ce()},Ae=()=>{n(2,D=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Le=()=>{ce.includes(R)||(console.error(`Unsupported value ('${R}') for totalcalculationmode parameter. Only the following values are supported ${ce}. Using default value ('${ce[0]}').`),n(8,R=ce[0]))},Me=()=>{switch(lt(p),Le(),B){case"gmcore":te();break;case"gm16":de();break;default:throw Error(`Invalid apiversion attribute: ${B}`)}},me=f=>f.data&&f.data.type==="LogoutSuccessfull"&&z.close();t.onMount(()=>(window.addEventListener("message",me,!1),()=>{window.emMessageBus&&ve&&ve.unsubscribe(),window.removeEventListener("message",me),z&&z.close()}));const Te=()=>n(2,D=!0),ue=()=>n(2,D=!1),X=()=>Ae(),Fe=()=>n(2,D=!1);function ke(f){t.binding_callbacks[f?"unshift":"push"](()=>{T=f,n(0,T)})}return o.$$set=f=>{"userid"in f&&n(9,d=f.userid),"session"in f&&n(10,u=f.session),"endpoint"in f&&n(11,y=f.endpoint),"lang"in f&&n(12,p=f.lang),"clientstyling"in f&&n(13,g=f.clientstyling),"clientstylingurl"in f&&n(14,v=f.clientstylingurl),"translationurl"in f&&n(15,x=f.translationurl),"customlocaleidentifier"in f&&n(16,F=f.customlocaleidentifier),"gmversion"in f&&n(17,B=f.gmversion),"displaybalanceoption"in f&&n(18,C=f.displaybalanceoption),"totalcalculationmode"in f&&n(8,R=f.totalcalculationmode),"currencyseparator"in f&&n(19,H=f.currencyseparator),"currencydecimal"in f&&n(20,M=f.currencydecimal),"currencyprecision"in f&&n(21,V=f.currencyprecision),"mbsource"in f&&n(22,Y=f.mbsource)},o.$$.update=()=>{o.$$.dirty[0]&4096&&p&&be(),o.$$.dirty[0]&400896&&y&&d&&u&&p&&B&&C&&Me(),o.$$.dirty[0]&134656&&y&&d&&u&&B&&ae(),o.$$.dirty[0]&8193&&g&&T&&t.setClientStyling(T,g),o.$$.dirty[0]&16385&&v&&T&&t.setClientStylingURL(T,v),o.$$.dirty[0]&4194305&&T&&t.setStreamStyling(T,`${Y}.Style`),o.$$.dirty[0]&32768&&x&&we()},[T,S,D,J,h,i,Be,Ae,R,d,u,y,p,g,v,x,F,B,C,H,M,V,Y,Te,ue,X,Fe,ke]}class et extends t.SvelteComponent{constructor(e){super(),t.init(this,e,wt,vt,t.safe_not_equal,{userid:9,session:10,endpoint:11,lang:12,clientstyling:13,clientstylingurl:14,translationurl:15,customlocaleidentifier:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,currencyseparator:19,currencydecimal:20,currencyprecision:21,mbsource:22},mt,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(e){this.$$set({userid:e}),t.flush()}get session(){return this.$$.ctx[10]}set session(e){this.$$set({session:e}),t.flush()}get endpoint(){return this.$$.ctx[11]}set endpoint(e){this.$$set({endpoint:e}),t.flush()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),t.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(e){this.$$set({translationurl:e}),t.flush()}get customlocaleidentifier(){return this.$$.ctx[16]}set customlocaleidentifier(e){this.$$set({customlocaleidentifier:e}),t.flush()}get gmversion(){return this.$$.ctx[17]}set gmversion(e){this.$$set({gmversion:e}),t.flush()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(e){this.$$set({displaybalanceoption:e}),t.flush()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(e){this.$$set({totalcalculationmode:e}),t.flush()}get currencyseparator(){return this.$$.ctx[19]}set currencyseparator(e){this.$$set({currencyseparator:e}),t.flush()}get currencydecimal(){return this.$$.ctx[20]}set currencydecimal(e){this.$$set({currencydecimal:e}),t.flush()}get currencyprecision(){return this.$$.ctx[21]}set currencyprecision(e){this.$$set({currencyprecision:e}),t.flush()}get mbsource(){return this.$$.ctx[22]}set mbsource(e){this.$$set({mbsource:e}),t.flush()}}t.create_custom_element(et,{userid:{},session:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},customlocaleidentifier:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencyseparator:{},currencydecimal:{},currencyprecision:{},mbsource:{}},[],[],!0);exports.default=et;
|