@everymatrix/cashier-page 1.45.0 → 1.45.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.
Files changed (47) hide show
  1. package/components/CashierConfirmModal-DDkEGERx.cjs +4 -0
  2. package/components/{CashierConfirmModal-DUs77Z87.js → CashierConfirmModal-DcDzn1gw.js} +188 -192
  3. package/components/{CashierError-B6P10jDb.js → CashierError-BN74rRfp.js} +28 -27
  4. package/components/CashierError-BUdqkPz2.cjs +5 -0
  5. package/components/CashierHeader-CWh9KvU8.cjs +1 -0
  6. package/components/CashierHeader-GJVoWu3a.js +360 -0
  7. package/components/{CashierIframeRedirect-D-wtyZlJ.js → CashierIframeRedirect-7U7Ng9Ft.js} +72 -73
  8. package/components/CashierIframeRedirect-CPmCxUNQ.cjs +1 -0
  9. package/components/CashierMethodDetails-C1P_A8Q-.cjs +18 -0
  10. package/components/{CashierMethodDetails-BMH-N9d_.js → CashierMethodDetails-CcOrusOp.js} +670 -671
  11. package/components/CashierMethodsList-Cz8-AN80.js +651 -0
  12. package/components/CashierMethodsList-DV1rRC_l.cjs +1 -0
  13. package/components/CashierModal-BYaRLT3T.cjs +1 -0
  14. package/components/CashierModal-WFQXcGM-.js +226 -0
  15. package/components/CashierNotifications-C46bpv5c.js +136 -0
  16. package/components/CashierNotifications-DxsqjmwN.cjs +1 -0
  17. package/components/{CashierPage-CReuHHpH.js → CashierPage-BFzFcqIV.js} +887 -892
  18. package/components/CashierPage-BiLUhOOi.cjs +1 -0
  19. package/components/{CashierReceiptPage-CCmpwoHS.js → CashierReceiptPage-C-U0DylA.js} +242 -243
  20. package/components/CashierReceiptPage-D9D2pfkv.cjs +1 -0
  21. package/components/{CashierSessionExpirationModal-CTAwPOlx.js → CashierSessionExpirationModal-BPz4T6IO.js} +210 -217
  22. package/components/{CashierSessionExpirationModal-DgofnoWR.cjs → CashierSessionExpirationModal-Cm1_wYpc.cjs} +2 -2
  23. package/components/CashierSpinner-BDeVd6_8.js +71 -0
  24. package/components/CashierSpinner-BHiwUIfx.cjs +1 -0
  25. package/components/CashierVerifications-ChU2M2Cq.cjs +1 -0
  26. package/components/CashierVerifications-T229JPdw.js +495 -0
  27. package/es2015/cashier-page.cjs +1 -1
  28. package/es2015/cashier-page.js +1 -1
  29. package/package.json +2 -2
  30. package/components/CashierConfirmModal-BzlPDqCa.cjs +0 -4
  31. package/components/CashierError-CPdkGqU9.cjs +0 -5
  32. package/components/CashierHeader-WPbfJpfK.cjs +0 -1
  33. package/components/CashierHeader-sNXvMDOE.js +0 -361
  34. package/components/CashierIframeRedirect-D51bquYH.cjs +0 -1
  35. package/components/CashierMethodDetails-BRk_7FCh.cjs +0 -18
  36. package/components/CashierMethodsList-BzKakG_f.cjs +0 -1
  37. package/components/CashierMethodsList-C2cZyeSz.js +0 -652
  38. package/components/CashierModal-34pFwTKh.cjs +0 -1
  39. package/components/CashierModal-CSXMOh9Q.js +0 -225
  40. package/components/CashierNotifications-Bb_aXGZ9.cjs +0 -1
  41. package/components/CashierNotifications-CHJocFp_.js +0 -136
  42. package/components/CashierPage-DMz34mKD.cjs +0 -1
  43. package/components/CashierReceiptPage-Bx1bgMaF.cjs +0 -1
  44. package/components/CashierSpinner---P14FXy.cjs +0 -1
  45. package/components/CashierSpinner-w2LALF8s.js +0 -71
  46. package/components/CashierVerifications-DR2HJAoY.js +0 -496
  47. package/components/CashierVerifications-T_tbaHJ5.cjs +0 -1
@@ -0,0 +1,651 @@
1
+ var Te = Object.defineProperty, Ne = Object.defineProperties;
2
+ var Ae = Object.getOwnPropertyDescriptors;
3
+ var oe = Object.getOwnPropertySymbols;
4
+ var Pe = Object.prototype.hasOwnProperty, xe = Object.prototype.propertyIsEnumerable;
5
+ var re = (t, e, s) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, ee = (t, e) => {
6
+ for (var s in e || (e = {}))
7
+ Pe.call(e, s) && re(t, s, e[s]);
8
+ if (oe)
9
+ for (var s of oe(e))
10
+ xe.call(e, s) && re(t, s, e[s]);
11
+ return t;
12
+ }, te = (t, e) => Ne(t, Ae(e));
13
+ import { S as ze, b as Fe, f as v, c as De, a as je, d as Ue, h as S, x as Oe, k as U, n as ae, v as O, w as Re, F as He, H as We, g as p, E as f, K as ce, j as w, l as c, M as Be, y as P, D as me, J as ue, A as se, z as x, r as qe, C as Ie } from "./CashierConfirmModal-DcDzn1gw.js";
14
+ import { a as Je, i as Ye, $ as Ge, b as Ve } from "./CashierError-BN74rRfp.js";
15
+ import { d as de, u as Xe } from "./CashierMethodDetails-CcOrusOp.js";
16
+ function he(t, e) {
17
+ Je(t, e);
18
+ }
19
+ function Ke(t) {
20
+ Ye({
21
+ fallbackLocale: "en"
22
+ }), Ge.set(t);
23
+ }
24
+ const fe = {
25
+ en: {
26
+ generalMin: "Min",
27
+ generalMax: "Max",
28
+ showAll: "SHOW ALL",
29
+ showLess: "SHOW LESS"
30
+ },
31
+ uk: {
32
+ generalMin: "Мін",
33
+ generalMax: "Макс"
34
+ },
35
+ hr: {
36
+ generalMin: "Minimalno",
37
+ generalMax: "Maksimalno",
38
+ showAll: "Prikaži sve",
39
+ showLess: "Prikaži manje"
40
+ },
41
+ tr: {
42
+ generalMin: "Min",
43
+ generalMax: "Maks",
44
+ showAll: "HEPSİNİ GÖSTER",
45
+ showLess: "DAHA AZ GÖSTER"
46
+ }
47
+ };
48
+ function Ze(t) {
49
+ Ue(t, "svelte-14zz7tv", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #fff);box-shadow:0 0 4px var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));width:100%;border-radius:var(--mmw--border-radius-medium-plus, 6px);container-name:method-list;container-type:inline-size}.SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:var(--mmw-method-height, 80px);box-sizing:border-box;border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px)}.SelectorWrapper:first-child{border-radius:var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px) 0 0}.SelectorWrapper:last-child{border-radius:0 0 var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px)}.SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F8F8)}.SelectorWrapper:not(.checked):hover{background:linear-gradient(0, var(--emw--color-background-secondary, #F9F8F8) 0%, var(--emw--color-background, #fff) 100%)}.MethodLogo{display:flex;justify-content:center;align-items:center;margin-right:var(--mmw--spacing-small, 14px);min-width:var(--mmw-logo-width, 110px);min-height:var(--mmw-logo-height, 64px);background:var(--emw--color-background, #FFF);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px);overflow:hidden}.MethodTitle{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);word-break:break-all}.MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-small, 14px);line-height:var(--emw--line-height-xl, 24px);color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.ShowAllButton{cursor:pointer;color:var(--mmw--color-grey-290, #666);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;background:var(--emw--color-gray-50, #F7F8FA);line-height:normal;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}@container method-list (width < 450px){.MethodLogo{min-width:var(--mmw-logo-small-width, 90px);min-height:var(--mmw-logo--small-height, 50px);overflow:hidden}.CashierMethodList .MethodTitle{display:inline-block;flex-grow:1;font-size:var(--emw--font-size-small, 14px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.CashierMethodList .MethodLimits .Limits{flex-shrink:0;font-size:var(--emw--font-size-x-small, 12px)}}@container method-list (max-width: 300px){.Limits{display:none}}");
50
+ }
51
+ function ge(t, e, s) {
52
+ const a = t.slice();
53
+ return a[46] = e[s], a[48] = s, a;
54
+ }
55
+ function we(t) {
56
+ let e;
57
+ return {
58
+ c() {
59
+ e = p("cashier-spinner"), f(
60
+ e,
61
+ "clientstylingurl",
62
+ /*clientstylingurl*/
63
+ t[4]
64
+ ), f(
65
+ e,
66
+ "clientstyling",
67
+ /*clientstyling*/
68
+ t[3]
69
+ );
70
+ },
71
+ m(s, a) {
72
+ U(s, e, a);
73
+ },
74
+ p(s, a) {
75
+ a[0] & /*clientstylingurl*/
76
+ 16 && f(
77
+ e,
78
+ "clientstylingurl",
79
+ /*clientstylingurl*/
80
+ s[4]
81
+ ), a[0] & /*clientstyling*/
82
+ 8 && f(
83
+ e,
84
+ "clientstyling",
85
+ /*clientstyling*/
86
+ s[3]
87
+ );
88
+ },
89
+ d(s) {
90
+ s && O(e);
91
+ }
92
+ };
93
+ }
94
+ function pe(t) {
95
+ let e, s, a, o = ce(
96
+ /*paymentMethodsToShow*/
97
+ t[8]
98
+ ), i = [];
99
+ for (let l = 0; l < o.length; l += 1)
100
+ i[l] = ye(ge(t, o, l));
101
+ let r = (
102
+ /*methodsButtonToggleText*/
103
+ t[7] && be(t)
104
+ );
105
+ return {
106
+ c() {
107
+ e = p("div"), s = p("div");
108
+ for (let l = 0; l < i.length; l += 1)
109
+ i[l].c();
110
+ a = S(), r && r.c(), w(s, "class", "CashierMethodList"), w(e, "class", "CashierMethodListWidget");
111
+ },
112
+ m(l, m) {
113
+ U(l, e, m), c(e, s);
114
+ for (let u = 0; u < i.length; u += 1)
115
+ i[u] && i[u].m(s, null);
116
+ c(e, a), r && r.m(e, null), t[26](e);
117
+ },
118
+ p(l, m) {
119
+ if (m[0] & /*selectedPaymentMethod, paymentMethodsToShow, selectPayMeth, formatter, $_*/
120
+ 57664) {
121
+ o = ce(
122
+ /*paymentMethodsToShow*/
123
+ l[8]
124
+ );
125
+ let u;
126
+ for (u = 0; u < o.length; u += 1) {
127
+ const C = ge(l, o, u);
128
+ i[u] ? i[u].p(C, m) : (i[u] = ye(C), i[u].c(), i[u].m(s, null));
129
+ }
130
+ for (; u < i.length; u += 1)
131
+ i[u].d(1);
132
+ i.length = o.length;
133
+ }
134
+ /*methodsButtonToggleText*/
135
+ l[7] ? r ? r.p(l, m) : (r = be(l), r.c(), r.m(e, null)) : r && (r.d(1), r = null);
136
+ },
137
+ d(l) {
138
+ l && O(e), Be(i, l), r && r.d(), t[26](null);
139
+ }
140
+ };
141
+ }
142
+ function ye(t) {
143
+ let e, s, a, o, i, r, l, m, u = (
144
+ /*payMeth*/
145
+ (t[46].Label || /*payMeth*/
146
+ t[46].Name) + ""
147
+ ), C, E, _, y, N = (
148
+ /*$_*/
149
+ t[13]("generalMin") + ""
150
+ ), z, b, L = (
151
+ /*formatter*/
152
+ t[14].format(
153
+ /*payMeth*/
154
+ t[46].DisplayCurrency.MinAmountLimit
155
+ ) + ""
156
+ ), A, F, M = (
157
+ /*payMeth*/
158
+ t[46].DisplayCurrency.Name + ""
159
+ ), R, V, k, H = (
160
+ /*$_*/
161
+ t[13]("generalMax") + ""
162
+ ), W, B, D = (
163
+ /*formatter*/
164
+ t[14].format(
165
+ /*payMeth*/
166
+ t[46].DisplayCurrency.MaxAmountLimit
167
+ ) + ""
168
+ ), Y, X, q = (
169
+ /*payMeth*/
170
+ t[46].DisplayCurrency.Name + ""
171
+ ), G, K, I, Z;
172
+ function Q() {
173
+ return (
174
+ /*click_handler*/
175
+ t[24](
176
+ /*payMeth*/
177
+ t[46]
178
+ )
179
+ );
180
+ }
181
+ return {
182
+ c() {
183
+ e = p("div"), s = p("div"), a = p("img"), r = S(), l = p("div"), m = p("span"), C = P(u), E = S(), _ = p("div"), y = p("span"), z = P(N), b = S(), A = P(L), F = S(), R = P(M), V = S(), k = p("span"), W = P(H), B = S(), Y = P(D), X = S(), G = P(q), K = S(), me(a.src, o = /*payMeth*/
184
+ t[46].LogoUrl) || w(a, "src", o), w(a, "alt", i = /*payMeth*/
185
+ t[46].Label), w(s, "class", "MethodLogo"), w(l, "class", "MethodTitle"), w(y, "class", "Limits"), w(k, "class", "Limits"), w(_, "class", "MethodLimits"), w(e, "class", "SelectorWrapper"), ue(
186
+ e,
187
+ "checked",
188
+ /*selectedPaymentMethod*/
189
+ t[6] === /*payMeth*/
190
+ t[46].Name
191
+ );
192
+ },
193
+ m(j, g) {
194
+ U(j, e, g), c(e, s), c(s, a), c(e, r), c(e, l), c(l, m), c(m, C), c(e, E), c(e, _), c(_, y), c(y, z), c(y, b), c(y, A), c(y, F), c(y, R), c(_, V), c(_, k), c(k, W), c(k, B), c(k, Y), c(k, X), c(k, G), c(e, K), I || (Z = [
195
+ se(e, "click", Q),
196
+ se(e, "keyup", $e)
197
+ ], I = !0);
198
+ },
199
+ p(j, g) {
200
+ t = j, g[0] & /*paymentMethodsToShow*/
201
+ 256 && !me(a.src, o = /*payMeth*/
202
+ t[46].LogoUrl) && w(a, "src", o), g[0] & /*paymentMethodsToShow*/
203
+ 256 && i !== (i = /*payMeth*/
204
+ t[46].Label) && w(a, "alt", i), g[0] & /*paymentMethodsToShow*/
205
+ 256 && u !== (u = /*payMeth*/
206
+ (t[46].Label || /*payMeth*/
207
+ t[46].Name) + "") && x(C, u), g[0] & /*$_*/
208
+ 8192 && N !== (N = /*$_*/
209
+ t[13]("generalMin") + "") && x(z, N), g[0] & /*paymentMethodsToShow*/
210
+ 256 && L !== (L = /*formatter*/
211
+ t[14].format(
212
+ /*payMeth*/
213
+ t[46].DisplayCurrency.MinAmountLimit
214
+ ) + "") && x(A, L), g[0] & /*paymentMethodsToShow*/
215
+ 256 && M !== (M = /*payMeth*/
216
+ t[46].DisplayCurrency.Name + "") && x(R, M), g[0] & /*$_*/
217
+ 8192 && H !== (H = /*$_*/
218
+ t[13]("generalMax") + "") && x(W, H), g[0] & /*paymentMethodsToShow*/
219
+ 256 && D !== (D = /*formatter*/
220
+ t[14].format(
221
+ /*payMeth*/
222
+ t[46].DisplayCurrency.MaxAmountLimit
223
+ ) + "") && x(Y, D), g[0] & /*paymentMethodsToShow*/
224
+ 256 && q !== (q = /*payMeth*/
225
+ t[46].DisplayCurrency.Name + "") && x(G, q), g[0] & /*selectedPaymentMethod, paymentMethodsToShow*/
226
+ 320 && ue(
227
+ e,
228
+ "checked",
229
+ /*selectedPaymentMethod*/
230
+ t[6] === /*payMeth*/
231
+ t[46].Name
232
+ );
233
+ },
234
+ d(j) {
235
+ j && O(e), I = !1, qe(Z);
236
+ }
237
+ };
238
+ }
239
+ function be(t) {
240
+ let e, s, a, o;
241
+ return {
242
+ c() {
243
+ e = p("div"), s = P(
244
+ /*methodsButtonToggleText*/
245
+ t[7]
246
+ ), w(e, "class", "ShowAllButton");
247
+ },
248
+ m(i, r) {
249
+ U(i, e, r), c(e, s), a || (o = se(
250
+ e,
251
+ "click",
252
+ /*click_handler_1*/
253
+ t[25]
254
+ ), a = !0);
255
+ },
256
+ p(i, r) {
257
+ r[0] & /*methodsButtonToggleText*/
258
+ 128 && x(
259
+ s,
260
+ /*methodsButtonToggleText*/
261
+ i[7]
262
+ );
263
+ },
264
+ d(i) {
265
+ i && O(e), a = !1, o();
266
+ }
267
+ };
268
+ }
269
+ function Le(t) {
270
+ let e, s, a;
271
+ return {
272
+ c() {
273
+ e = p("cashier-error"), s = p("span"), a = P(
274
+ /*errorMessage*/
275
+ t[10]
276
+ ), w(s, "slot", "text"), f(
277
+ e,
278
+ "lang",
279
+ /*lang*/
280
+ t[0]
281
+ ), f(
282
+ e,
283
+ "assetsurl",
284
+ /*assetsurl*/
285
+ t[1]
286
+ ), f(
287
+ e,
288
+ "translationurl",
289
+ /*translationurl*/
290
+ t[2]
291
+ ), f(
292
+ e,
293
+ "clientstylingurl",
294
+ /*clientstylingurl*/
295
+ t[4]
296
+ ), f(
297
+ e,
298
+ "clientstyling",
299
+ /*clientstyling*/
300
+ t[3]
301
+ ), f(e, "hidebuttons", "true");
302
+ },
303
+ m(o, i) {
304
+ U(o, e, i), c(e, s), c(s, a);
305
+ },
306
+ p(o, i) {
307
+ i[0] & /*errorMessage*/
308
+ 1024 && x(
309
+ a,
310
+ /*errorMessage*/
311
+ o[10]
312
+ ), i[0] & /*lang*/
313
+ 1 && f(
314
+ e,
315
+ "lang",
316
+ /*lang*/
317
+ o[0]
318
+ ), i[0] & /*assetsurl*/
319
+ 2 && f(
320
+ e,
321
+ "assetsurl",
322
+ /*assetsurl*/
323
+ o[1]
324
+ ), i[0] & /*translationurl*/
325
+ 4 && f(
326
+ e,
327
+ "translationurl",
328
+ /*translationurl*/
329
+ o[2]
330
+ ), i[0] & /*clientstylingurl*/
331
+ 16 && f(
332
+ e,
333
+ "clientstylingurl",
334
+ /*clientstylingurl*/
335
+ o[4]
336
+ ), i[0] & /*clientstyling*/
337
+ 8 && f(
338
+ e,
339
+ "clientstyling",
340
+ /*clientstyling*/
341
+ o[3]
342
+ );
343
+ },
344
+ d(o) {
345
+ o && O(e);
346
+ }
347
+ };
348
+ }
349
+ function Qe(t) {
350
+ let e, s, a, o = (
351
+ /*showSpinner*/
352
+ t[12] && we(t)
353
+ ), i = (
354
+ /*showMethodsList*/
355
+ (t[9] || /*desktopView*/
356
+ t[11]) && pe(t)
357
+ ), r = (
358
+ /*errorMessage*/
359
+ t[10] && Le(t)
360
+ );
361
+ return {
362
+ c() {
363
+ o && o.c(), e = S(), i && i.c(), s = S(), r && r.c(), a = Oe();
364
+ },
365
+ m(l, m) {
366
+ o && o.m(l, m), U(l, e, m), i && i.m(l, m), U(l, s, m), r && r.m(l, m), U(l, a, m);
367
+ },
368
+ p(l, m) {
369
+ /*showSpinner*/
370
+ l[12] ? o ? o.p(l, m) : (o = we(l), o.c(), o.m(e.parentNode, e)) : o && (o.d(1), o = null), /*showMethodsList*/
371
+ l[9] || /*desktopView*/
372
+ l[11] ? i ? i.p(l, m) : (i = pe(l), i.c(), i.m(s.parentNode, s)) : i && (i.d(1), i = null), /*errorMessage*/
373
+ l[10] ? r ? r.p(l, m) : (r = Le(l), r.c(), r.m(a.parentNode, a)) : r && (r.d(1), r = null);
374
+ },
375
+ i: ae,
376
+ o: ae,
377
+ d(l) {
378
+ l && (O(e), O(s), O(a)), o && o.d(l), i && i.d(l), r && r.d(l);
379
+ }
380
+ };
381
+ }
382
+ const $e = () => {
383
+ };
384
+ function et(t, e, s) {
385
+ let a;
386
+ Re(t, Ve, (n) => s(13, a = n)), de.extend(Xe);
387
+ let { lang: o = "en" } = e, { local: i = "en-US" } = e, { endpoint: r } = e, { session: l } = e, { customerid: m } = e, { assetsurl: u } = e, { currency: C } = e, { numberofmethodsshown: E } = e, { translationurl: _ = "" } = e, { clientstyling: y = "" } = e, { clientstylingurl: N = "" } = e, { ismobileview: z } = e, b = [], L, A, F = "", M = [], R = !0, V = new Intl.NumberFormat(i, { minimumFractionDigits: 2 }), k = "", H, W = !0, B = !1;
388
+ var D;
389
+ (function(n) {
390
+ n.PlayerSessionIsNotValid = "PlayerSessionIsNotValid", n.Success = "Success", n.JwtTokenError = "JwtTokenError";
391
+ })(D || (D = {})), He();
392
+ const Y = () => {
393
+ let n = _;
394
+ if (n)
395
+ return fetch(n).then((d) => d.json()).then((d) => {
396
+ Object.keys(d).forEach((T) => {
397
+ he(T, d[T]);
398
+ });
399
+ }).catch((d) => {
400
+ console.log(d);
401
+ });
402
+ };
403
+ Object.keys(fe).forEach((n) => {
404
+ he(n, fe[n]);
405
+ });
406
+ const X = () => {
407
+ Ke(o);
408
+ }, q = () => {
409
+ s(12, B = !0);
410
+ const n = new URL(`${r}/v1/player/${m}/payment/GetPaymentMetadata`), d = new Headers();
411
+ d.append("accept", "application/json"), d.append("Content-Type", "application/json"), d.append("X-Client-Request-Timestamp", de.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
412
+ const T = {
413
+ method: "POST",
414
+ headers: d,
415
+ body: JSON.stringify({
416
+ XPaymentSessionToken: l,
417
+ Currency: C
418
+ })
419
+ };
420
+ fetch(n, T).then((h) => h.json()).then((h) => {
421
+ var J;
422
+ if (h.error) {
423
+ s(10, k = h.error);
424
+ return;
425
+ }
426
+ if (h.ResponseCode !== D.Success) {
427
+ H = h.ResponseCode, Z();
428
+ return;
429
+ }
430
+ b = (J = h.PaymentMethods) != null && J.Ordering ? G(h) : K(h), s(7, F = E && +E > 0 && b.length > +E ? a("showAll") : ""), s(8, M = F ? b.slice(0, +E) : b), window.postMessage(
431
+ {
432
+ type: "StartSessionCountdown",
433
+ paymentMethodName: b[0].Name,
434
+ xPaymentSessionToken: h.XPaymentSessionToken
435
+ },
436
+ window.location.href
437
+ );
438
+ }).finally(() => s(12, B = !1));
439
+ }, G = (n) => {
440
+ const d = [];
441
+ return n.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach((T) => {
442
+ const h = n.PaymentMethods.PaymentMethods.find((J) => J.Name === T);
443
+ if (h) {
444
+ const J = (h == null ? void 0 : h.Logos.find(($) => $.LogoType === "Desktop")) || {}, Ee = (h == null ? void 0 : h.Logos.find(($) => $.LogoType === "Mobile")) || {}, le = W ? J : Ee;
445
+ d.push(te(ee({}, h), {
446
+ LogoUrl: le.LogoUrl ? `https:${le.LogoUrl}` : ""
447
+ }));
448
+ }
449
+ }), d;
450
+ }, K = (n) => n.PaymentMethods.PaymentMethods.map((d) => te(ee({}, d), {
451
+ LogoUrl: d.Logos && d.Logos.length && d.Logos[0].LogoUrl ? `https:${d.Logos[0].LogoUrl}` : ""
452
+ })), I = (n) => {
453
+ s(6, A = n.Name), dispatchEvent(new CustomEvent(
454
+ "selectPayMeth",
455
+ {
456
+ detail: n,
457
+ bubbles: !0,
458
+ cancelable: !0,
459
+ composed: !0
460
+ }
461
+ ));
462
+ }, Z = () => {
463
+ window.postMessage(
464
+ {
465
+ type: "ErrorResponseCode",
466
+ errorResponseCode: H
467
+ },
468
+ window.location.href
469
+ );
470
+ }, Q = () => {
471
+ s(11, W = z === "false");
472
+ }, j = () => {
473
+ M == b ? Me() : g();
474
+ }, g = () => {
475
+ s(8, M = b), s(7, F = a("showLess"));
476
+ }, Me = () => {
477
+ s(8, M = b.slice(0, +E)), A && !M.find((n) => n.Name === A) && M.splice(0, 0, b.find((n) => n.Name === A)), s(7, F = a("showAll"));
478
+ }, ne = () => {
479
+ s(9, R = !0);
480
+ }, ie = (n) => {
481
+ s(9, R = !n.detail.hideMethodsList);
482
+ }, ve = () => {
483
+ let n = document.createElement("style");
484
+ n.innerHTML = y, L.appendChild(n);
485
+ }, _e = () => {
486
+ let n = new URL(N), d = document.createElement("style");
487
+ fetch(n.href).then((T) => T.text()).then((T) => {
488
+ d.innerHTML = T, setTimeout(
489
+ () => {
490
+ L.appendChild(d);
491
+ },
492
+ 1
493
+ ), setTimeout(
494
+ () => {
495
+ },
496
+ 500
497
+ );
498
+ });
499
+ };
500
+ We(() => (window.addEventListener("backToMethodList", ne, !1), window.addEventListener("hideMethodsList", ie, !1), () => {
501
+ window.removeEventListener("backToMethodList", ne), window.removeEventListener("paymentMethodLoaded", ie);
502
+ }));
503
+ const ke = (n) => I(n), Se = () => j();
504
+ function Ce(n) {
505
+ Ie[n ? "unshift" : "push"](() => {
506
+ L = n, s(5, L);
507
+ });
508
+ }
509
+ return t.$$set = (n) => {
510
+ "lang" in n && s(0, o = n.lang), "local" in n && s(17, i = n.local), "endpoint" in n && s(18, r = n.endpoint), "session" in n && s(19, l = n.session), "customerid" in n && s(20, m = n.customerid), "assetsurl" in n && s(1, u = n.assetsurl), "currency" in n && s(21, C = n.currency), "numberofmethodsshown" in n && s(22, E = n.numberofmethodsshown), "translationurl" in n && s(2, _ = n.translationurl), "clientstyling" in n && s(3, y = n.clientstyling), "clientstylingurl" in n && s(4, N = n.clientstylingurl), "ismobileview" in n && s(23, z = n.ismobileview);
511
+ }, t.$$.update = () => {
512
+ t.$$.dirty[0] & /*endpoint, session, customerid*/
513
+ 1835008 && r && l && m && q(), t.$$.dirty[0] & /*lang*/
514
+ 1 && o && X(), t.$$.dirty[0] & /*clientstyling, customStylingContainer*/
515
+ 40 && y && L && ve(), t.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
516
+ 48 && N && L && _e(), t.$$.dirty[0] & /*ismobileview*/
517
+ 8388608 && z && Q(), t.$$.dirty[0] & /*lang, translationurl*/
518
+ 5 && o && _ && Y();
519
+ }, [
520
+ o,
521
+ u,
522
+ _,
523
+ y,
524
+ N,
525
+ L,
526
+ A,
527
+ F,
528
+ M,
529
+ R,
530
+ k,
531
+ W,
532
+ B,
533
+ a,
534
+ V,
535
+ I,
536
+ j,
537
+ i,
538
+ r,
539
+ l,
540
+ m,
541
+ C,
542
+ E,
543
+ z,
544
+ ke,
545
+ Se,
546
+ Ce
547
+ ];
548
+ }
549
+ class tt extends ze {
550
+ constructor(e) {
551
+ super(), Fe(
552
+ this,
553
+ e,
554
+ et,
555
+ Qe,
556
+ je,
557
+ {
558
+ lang: 0,
559
+ local: 17,
560
+ endpoint: 18,
561
+ session: 19,
562
+ customerid: 20,
563
+ assetsurl: 1,
564
+ currency: 21,
565
+ numberofmethodsshown: 22,
566
+ translationurl: 2,
567
+ clientstyling: 3,
568
+ clientstylingurl: 4,
569
+ ismobileview: 23
570
+ },
571
+ Ze,
572
+ [-1, -1]
573
+ );
574
+ }
575
+ get lang() {
576
+ return this.$$.ctx[0];
577
+ }
578
+ set lang(e) {
579
+ this.$$set({ lang: e }), v();
580
+ }
581
+ get local() {
582
+ return this.$$.ctx[17];
583
+ }
584
+ set local(e) {
585
+ this.$$set({ local: e }), v();
586
+ }
587
+ get endpoint() {
588
+ return this.$$.ctx[18];
589
+ }
590
+ set endpoint(e) {
591
+ this.$$set({ endpoint: e }), v();
592
+ }
593
+ get session() {
594
+ return this.$$.ctx[19];
595
+ }
596
+ set session(e) {
597
+ this.$$set({ session: e }), v();
598
+ }
599
+ get customerid() {
600
+ return this.$$.ctx[20];
601
+ }
602
+ set customerid(e) {
603
+ this.$$set({ customerid: e }), v();
604
+ }
605
+ get assetsurl() {
606
+ return this.$$.ctx[1];
607
+ }
608
+ set assetsurl(e) {
609
+ this.$$set({ assetsurl: e }), v();
610
+ }
611
+ get currency() {
612
+ return this.$$.ctx[21];
613
+ }
614
+ set currency(e) {
615
+ this.$$set({ currency: e }), v();
616
+ }
617
+ get numberofmethodsshown() {
618
+ return this.$$.ctx[22];
619
+ }
620
+ set numberofmethodsshown(e) {
621
+ this.$$set({ numberofmethodsshown: e }), v();
622
+ }
623
+ get translationurl() {
624
+ return this.$$.ctx[2];
625
+ }
626
+ set translationurl(e) {
627
+ this.$$set({ translationurl: e }), v();
628
+ }
629
+ get clientstyling() {
630
+ return this.$$.ctx[3];
631
+ }
632
+ set clientstyling(e) {
633
+ this.$$set({ clientstyling: e }), v();
634
+ }
635
+ get clientstylingurl() {
636
+ return this.$$.ctx[4];
637
+ }
638
+ set clientstylingurl(e) {
639
+ this.$$set({ clientstylingurl: e }), v();
640
+ }
641
+ get ismobileview() {
642
+ return this.$$.ctx[23];
643
+ }
644
+ set ismobileview(e) {
645
+ this.$$set({ ismobileview: e }), v();
646
+ }
647
+ }
648
+ De(tt, { lang: {}, local: {}, endpoint: {}, session: {}, customerid: {}, assetsurl: {}, currency: {}, numberofmethodsshown: {}, translationurl: {}, clientstyling: {}, clientstylingurl: {}, ismobileview: {} }, [], [], !0);
649
+ export {
650
+ tt as default
651
+ };
@@ -0,0 +1 @@
1
+ "use strict";var pe=Object.defineProperty,_e=Object.defineProperties;var we=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var ye=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;var $=(n,t,s)=>t in n?pe(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s,G=(n,t)=>{for(var s in t||(t={}))ye.call(t,s)&&$(n,s,t[s]);if(Q)for(var s of Q(t))be.call(t,s)&&$(n,s,t[s]);return n},J=(n,t)=>_e(n,we(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CashierConfirmModal-DDkEGERx.cjs"),B=require("./CashierError-BUdqkPz2.cjs"),V=require("./CashierMethodDetails-C1P_A8Q-.cjs");function ee(n,t){B.addMessages(n,t)}function Le(n){B.init({fallbackLocale:"en"}),B.$locale.set(n)}const te={en:{generalMin:"Min",generalMax:"Max",showAll:"SHOW ALL",showLess:"SHOW LESS"},uk:{generalMin:"Мін",generalMax:"Макс"},hr:{generalMin:"Minimalno",generalMax:"Maksimalno",showAll:"Prikaži sve",showLess:"Prikaži manje"},tr:{generalMin:"Min",generalMax:"Maks",showAll:"HEPSİNİ GÖSTER",showLess:"DAHA AZ GÖSTER"}};function Me(n){e.append_styles(n,"svelte-14zz7tv","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #fff);box-shadow:0 0 4px var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));width:100%;border-radius:var(--mmw--border-radius-medium-plus, 6px);container-name:method-list;container-type:inline-size}.SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:var(--mmw-method-height, 80px);box-sizing:border-box;border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px)}.SelectorWrapper:first-child{border-radius:var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px) 0 0}.SelectorWrapper:last-child{border-radius:0 0 var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px)}.SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F8F8)}.SelectorWrapper:not(.checked):hover{background:linear-gradient(0, var(--emw--color-background-secondary, #F9F8F8) 0%, var(--emw--color-background, #fff) 100%)}.MethodLogo{display:flex;justify-content:center;align-items:center;margin-right:var(--mmw--spacing-small, 14px);min-width:var(--mmw-logo-width, 110px);min-height:var(--mmw-logo-height, 64px);background:var(--emw--color-background, #FFF);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px);overflow:hidden}.MethodTitle{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);word-break:break-all}.MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-small, 14px);line-height:var(--emw--line-height-xl, 24px);color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.ShowAllButton{cursor:pointer;color:var(--mmw--color-grey-290, #666);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;background:var(--emw--color-gray-50, #F7F8FA);line-height:normal;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}@container method-list (width < 450px){.MethodLogo{min-width:var(--mmw-logo-small-width, 90px);min-height:var(--mmw-logo--small-height, 50px);overflow:hidden}.CashierMethodList .MethodTitle{display:inline-block;flex-grow:1;font-size:var(--emw--font-size-small, 14px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.CashierMethodList .MethodLimits .Limits{flex-shrink:0;font-size:var(--emw--font-size-x-small, 12px)}}@container method-list (max-width: 300px){.Limits{display:none}}")}function ne(n,t,s){const c=n.slice();return c[46]=t[s],c[48]=s,c}function se(n){let t;return{c(){t=e.element("cashier-spinner"),e.set_custom_element_data(t,"clientstylingurl",n[4]),e.set_custom_element_data(t,"clientstyling",n[3])},m(s,c){e.insert(s,t,c)},p(s,c){c[0]&16&&e.set_custom_element_data(t,"clientstylingurl",s[4]),c[0]&8&&e.set_custom_element_data(t,"clientstyling",s[3])},d(s){s&&e.detach(t)}}}function le(n){let t,s,c,r=e.ensure_array_like(n[8]),i=[];for(let o=0;o<r.length;o+=1)i[o]=ie(ne(n,r,o));let a=n[7]&&oe(n);return{c(){t=e.element("div"),s=e.element("div");for(let o=0;o<i.length;o+=1)i[o].c();c=e.space(),a&&a.c(),e.attr(s,"class","CashierMethodList"),e.attr(t,"class","CashierMethodListWidget")},m(o,m){e.insert(o,t,m),e.append(t,s);for(let d=0;d<i.length;d+=1)i[d]&&i[d].m(s,null);e.append(t,c),a&&a.m(t,null),n[26](t)},p(o,m){if(m[0]&57664){r=e.ensure_array_like(o[8]);let d;for(d=0;d<r.length;d+=1){const L=ne(o,r,d);i[d]?i[d].p(L,m):(i[d]=ie(L),i[d].c(),i[d].m(s,null))}for(;d<i.length;d+=1)i[d].d(1);i.length=r.length}o[7]?a?a.p(o,m):(a=oe(o),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},d(o){o&&e.detach(t),e.destroy_each(i,o),a&&a.d(),n[26](null)}}}function ie(n){let t,s,c,r,i,a,o,m,d=(n[46].Label||n[46].Name)+"",L,M,y,g,k=n[13]("generalMin")+"",C,p,_=n[14].format(n[46].DisplayCurrency.MinAmountLimit)+"",S,E,w=n[46].DisplayCurrency.Name+"",x,R,b,A=n[13]("generalMax")+"",P,j,T=n[14].format(n[46].DisplayCurrency.MaxAmountLimit)+"",O,H,z=n[46].DisplayCurrency.Name+"",U,W,D,q;function I(){return n[24](n[46])}return{c(){t=e.element("div"),s=e.element("div"),c=e.element("img"),a=e.space(),o=e.element("div"),m=e.element("span"),L=e.text(d),M=e.space(),y=e.element("div"),g=e.element("span"),C=e.text(k),p=e.space(),S=e.text(_),E=e.space(),x=e.text(w),R=e.space(),b=e.element("span"),P=e.text(A),j=e.space(),O=e.text(T),H=e.space(),U=e.text(z),W=e.space(),e.src_url_equal(c.src,r=n[46].LogoUrl)||e.attr(c,"src",r),e.attr(c,"alt",i=n[46].Label),e.attr(s,"class","MethodLogo"),e.attr(o,"class","MethodTitle"),e.attr(g,"class","Limits"),e.attr(b,"class","Limits"),e.attr(y,"class","MethodLimits"),e.attr(t,"class","SelectorWrapper"),e.toggle_class(t,"checked",n[6]===n[46].Name)},m(N,f){e.insert(N,t,f),e.append(t,s),e.append(s,c),e.append(t,a),e.append(t,o),e.append(o,m),e.append(m,L),e.append(t,M),e.append(t,y),e.append(y,g),e.append(g,C),e.append(g,p),e.append(g,S),e.append(g,E),e.append(g,x),e.append(y,R),e.append(y,b),e.append(b,P),e.append(b,j),e.append(b,O),e.append(b,H),e.append(b,U),e.append(t,W),D||(q=[e.listen(t,"click",I),e.listen(t,"keyup",ke)],D=!0)},p(N,f){n=N,f[0]&256&&!e.src_url_equal(c.src,r=n[46].LogoUrl)&&e.attr(c,"src",r),f[0]&256&&i!==(i=n[46].Label)&&e.attr(c,"alt",i),f[0]&256&&d!==(d=(n[46].Label||n[46].Name)+"")&&e.set_data(L,d),f[0]&8192&&k!==(k=n[13]("generalMin")+"")&&e.set_data(C,k),f[0]&256&&_!==(_=n[14].format(n[46].DisplayCurrency.MinAmountLimit)+"")&&e.set_data(S,_),f[0]&256&&w!==(w=n[46].DisplayCurrency.Name+"")&&e.set_data(x,w),f[0]&8192&&A!==(A=n[13]("generalMax")+"")&&e.set_data(P,A),f[0]&256&&T!==(T=n[14].format(n[46].DisplayCurrency.MaxAmountLimit)+"")&&e.set_data(O,T),f[0]&256&&z!==(z=n[46].DisplayCurrency.Name+"")&&e.set_data(U,z),f[0]&320&&e.toggle_class(t,"checked",n[6]===n[46].Name)},d(N){N&&e.detach(t),D=!1,e.run_all(q)}}}function oe(n){let t,s,c,r;return{c(){t=e.element("div"),s=e.text(n[7]),e.attr(t,"class","ShowAllButton")},m(i,a){e.insert(i,t,a),e.append(t,s),c||(r=e.listen(t,"click",n[25]),c=!0)},p(i,a){a[0]&128&&e.set_data(s,i[7])},d(i){i&&e.detach(t),c=!1,r()}}}function re(n){let t,s,c;return{c(){t=e.element("cashier-error"),s=e.element("span"),c=e.text(n[10]),e.attr(s,"slot","text"),e.set_custom_element_data(t,"lang",n[0]),e.set_custom_element_data(t,"assetsurl",n[1]),e.set_custom_element_data(t,"translationurl",n[2]),e.set_custom_element_data(t,"clientstylingurl",n[4]),e.set_custom_element_data(t,"clientstyling",n[3]),e.set_custom_element_data(t,"hidebuttons","true")},m(r,i){e.insert(r,t,i),e.append(t,s),e.append(s,c)},p(r,i){i[0]&1024&&e.set_data(c,r[10]),i[0]&1&&e.set_custom_element_data(t,"lang",r[0]),i[0]&2&&e.set_custom_element_data(t,"assetsurl",r[1]),i[0]&4&&e.set_custom_element_data(t,"translationurl",r[2]),i[0]&16&&e.set_custom_element_data(t,"clientstylingurl",r[4]),i[0]&8&&e.set_custom_element_data(t,"clientstyling",r[3])},d(r){r&&e.detach(t)}}}function ve(n){let t,s,c,r=n[12]&&se(n),i=(n[9]||n[11])&&le(n),a=n[10]&&re(n);return{c(){r&&r.c(),t=e.space(),i&&i.c(),s=e.space(),a&&a.c(),c=e.empty()},m(o,m){r&&r.m(o,m),e.insert(o,t,m),i&&i.m(o,m),e.insert(o,s,m),a&&a.m(o,m),e.insert(o,c,m)},p(o,m){o[12]?r?r.p(o,m):(r=se(o),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null),o[9]||o[11]?i?i.p(o,m):(i=le(o),i.c(),i.m(s.parentNode,s)):i&&(i.d(1),i=null),o[10]?a?a.p(o,m):(a=re(o),a.c(),a.m(c.parentNode,c)):a&&(a.d(1),a=null)},i:e.noop,o:e.noop,d(o){o&&(e.detach(t),e.detach(s),e.detach(c)),r&&r.d(o),i&&i.d(o),a&&a.d(o)}}}const ke=()=>{};function Se(n,t,s){let c;e.component_subscribe(n,B.$format,l=>s(13,c=l)),V.dayjs.extend(V.utc);let{lang:r="en"}=t,{local:i="en-US"}=t,{endpoint:a}=t,{session:o}=t,{customerid:m}=t,{assetsurl:d}=t,{currency:L}=t,{numberofmethodsshown:M}=t,{translationurl:y=""}=t,{clientstyling:g=""}=t,{clientstylingurl:k=""}=t,{ismobileview:C}=t,p=[],_,S,E="",w=[],x=!0,R=new Intl.NumberFormat(i,{minimumFractionDigits:2}),b="",A,P=!0,j=!1;var T;(function(l){l.PlayerSessionIsNotValid="PlayerSessionIsNotValid",l.Success="Success",l.JwtTokenError="JwtTokenError"})(T||(T={})),e.createEventDispatcher();const O=()=>{let l=y;if(l)return fetch(l).then(u=>u.json()).then(u=>{Object.keys(u).forEach(v=>{ee(v,u[v])})}).catch(u=>{console.log(u)})};Object.keys(te).forEach(l=>{ee(l,te[l])});const H=()=>{Le(r)},z=()=>{s(12,j=!0);const l=new URL(`${a}/v1/player/${m}/payment/GetPaymentMetadata`),u=new Headers;u.append("accept","application/json"),u.append("Content-Type","application/json"),u.append("X-Client-Request-Timestamp",V.dayjs.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));const v={method:"POST",headers:u,body:JSON.stringify({XPaymentSessionToken:o,Currency:L})};fetch(l,v).then(h=>h.json()).then(h=>{var F;if(h.error){s(10,b=h.error);return}if(h.ResponseCode!==T.Success){A=h.ResponseCode,q();return}p=(F=h.PaymentMethods)!=null&&F.Ordering?U(h):W(h),s(7,E=M&&+M>0&&p.length>+M?c("showAll"):""),s(8,w=E?p.slice(0,+M):p),window.postMessage({type:"StartSessionCountdown",paymentMethodName:p[0].Name,xPaymentSessionToken:h.XPaymentSessionToken},window.location.href)}).finally(()=>s(12,j=!1))},U=l=>{const u=[];return l.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach(v=>{const h=l.PaymentMethods.PaymentMethods.find(F=>F.Name===v);if(h){const F=(h==null?void 0:h.Logos.find(Y=>Y.LogoType==="Desktop"))||{},ge=(h==null?void 0:h.Logos.find(Y=>Y.LogoType==="Mobile"))||{},K=P?F:ge;u.push(J(G({},h),{LogoUrl:K.LogoUrl?`https:${K.LogoUrl}`:""}))}}),u},W=l=>l.PaymentMethods.PaymentMethods.map(u=>J(G({},u),{LogoUrl:u.Logos&&u.Logos.length&&u.Logos[0].LogoUrl?`https:${u.Logos[0].LogoUrl}`:""})),D=l=>{s(6,S=l.Name),dispatchEvent(new CustomEvent("selectPayMeth",{detail:l,bubbles:!0,cancelable:!0,composed:!0}))},q=()=>{window.postMessage({type:"ErrorResponseCode",errorResponseCode:A},window.location.href)},I=()=>{s(11,P=C==="false")},N=()=>{w==p?ce():f()},f=()=>{s(8,w=p),s(7,E=c("showLess"))},ce=()=>{s(8,w=p.slice(0,+M)),S&&!w.find(l=>l.Name===S)&&w.splice(0,0,p.find(l=>l.Name===S)),s(7,E=c("showAll"))},X=()=>{s(9,x=!0)},Z=l=>{s(9,x=!l.detail.hideMethodsList)},me=()=>{let l=document.createElement("style");l.innerHTML=g,_.appendChild(l)},de=()=>{let l=new URL(k),u=document.createElement("style");fetch(l.href).then(v=>v.text()).then(v=>{u.innerHTML=v,setTimeout(()=>{_.appendChild(u)},1),setTimeout(()=>{},500)})};e.onMount(()=>(window.addEventListener("backToMethodList",X,!1),window.addEventListener("hideMethodsList",Z,!1),()=>{window.removeEventListener("backToMethodList",X),window.removeEventListener("paymentMethodLoaded",Z)}));const ue=l=>D(l),he=()=>N();function fe(l){e.binding_callbacks[l?"unshift":"push"](()=>{_=l,s(5,_)})}return n.$$set=l=>{"lang"in l&&s(0,r=l.lang),"local"in l&&s(17,i=l.local),"endpoint"in l&&s(18,a=l.endpoint),"session"in l&&s(19,o=l.session),"customerid"in l&&s(20,m=l.customerid),"assetsurl"in l&&s(1,d=l.assetsurl),"currency"in l&&s(21,L=l.currency),"numberofmethodsshown"in l&&s(22,M=l.numberofmethodsshown),"translationurl"in l&&s(2,y=l.translationurl),"clientstyling"in l&&s(3,g=l.clientstyling),"clientstylingurl"in l&&s(4,k=l.clientstylingurl),"ismobileview"in l&&s(23,C=l.ismobileview)},n.$$.update=()=>{n.$$.dirty[0]&1835008&&a&&o&&m&&z(),n.$$.dirty[0]&1&&r&&H(),n.$$.dirty[0]&40&&g&&_&&me(),n.$$.dirty[0]&48&&k&&_&&de(),n.$$.dirty[0]&8388608&&C&&I(),n.$$.dirty[0]&5&&r&&y&&O()},[r,d,y,g,k,_,S,E,w,x,b,P,j,c,R,D,N,i,a,o,m,L,M,C,ue,he,fe]}class ae extends e.SvelteComponent{constructor(t){super(),e.init(this,t,Se,ve,e.safe_not_equal,{lang:0,local:17,endpoint:18,session:19,customerid:20,assetsurl:1,currency:21,numberofmethodsshown:22,translationurl:2,clientstyling:3,clientstylingurl:4,ismobileview:23},Me,[-1,-1])}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),e.flush()}get local(){return this.$$.ctx[17]}set local(t){this.$$set({local:t}),e.flush()}get endpoint(){return this.$$.ctx[18]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[19]}set session(t){this.$$set({session:t}),e.flush()}get customerid(){return this.$$.ctx[20]}set customerid(t){this.$$set({customerid:t}),e.flush()}get assetsurl(){return this.$$.ctx[1]}set assetsurl(t){this.$$set({assetsurl:t}),e.flush()}get currency(){return this.$$.ctx[21]}set currency(t){this.$$set({currency:t}),e.flush()}get numberofmethodsshown(){return this.$$.ctx[22]}set numberofmethodsshown(t){this.$$set({numberofmethodsshown:t}),e.flush()}get translationurl(){return this.$$.ctx[2]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get clientstyling(){return this.$$.ctx[3]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[4]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get ismobileview(){return this.$$.ctx[23]}set ismobileview(t){this.$$set({ismobileview:t}),e.flush()}}e.create_custom_element(ae,{lang:{},local:{},endpoint:{},session:{},customerid:{},assetsurl:{},currency:{},numberofmethodsshown:{},translationurl:{},clientstyling:{},clientstylingurl:{},ismobileview:{}},[],[],!0);exports.default=ae;