@everymatrix/cashier-page 1.0.69 → 1.0.71
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/CashierConfirmModal-CJUi-52c.cjs +4 -0
- package/components/CashierConfirmModal-DJCwaG3s.js +1067 -0
- package/components/CashierError-Bv5y8E21.cjs +5 -0
- package/components/CashierError-D1Sl93X0.js +3728 -0
- package/components/CashierHeader-BfiMdduW.cjs +1 -0
- package/components/CashierHeader-DPtk9YS7.js +354 -0
- package/components/CashierIframeRedirect-JKycDoGv.js +384 -0
- package/components/CashierIframeRedirect-euMQeO-W.cjs +1 -0
- package/components/CashierMethodDetails-CJQlWMCH.cjs +18 -0
- package/components/CashierMethodDetails-oNLo1qIb.js +7951 -0
- package/components/CashierMethodsList-CmqbF598.cjs +1 -0
- package/components/CashierMethodsList-Iun7lw-L.js +635 -0
- package/components/CashierModal-C0mhAnlZ.cjs +1 -0
- package/components/CashierModal-C_5YSQzV.js +220 -0
- package/components/CashierNotifications-Bizfd07g.js +136 -0
- package/components/CashierNotifications-DOy2PVHI.cjs +1 -0
- package/components/CashierPage-CA5Vb6Re.cjs +1 -0
- package/components/CashierPage-COmj0BRS.js +1257 -0
- package/components/CashierReceiptPage-Bm6wOvVX.cjs +1 -0
- package/components/CashierReceiptPage-g9G9PnHu.js +926 -0
- package/components/CashierSpinner-BXmEgLih.js +71 -0
- package/components/CashierSpinner-DCVKvCG4.cjs +1 -0
- package/package.json +11 -10
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { R as q, S as x, b as B, f as g, c as F, a as G, d as N, x as A, k as H, t as m, p as b, q as I, v as L, H as J, e as K, g as y, j as f, G as M, l as C, T as O, u as P, m as Q, o as V, U as k, B as X, C as S } from "./CashierConfirmModal-DJCwaG3s.js";
|
|
2
|
+
function z(n, { delay: e = 0, duration: t = 400, easing: i = q } = {}) {
|
|
3
|
+
const a = +getComputedStyle(n).opacity;
|
|
4
|
+
return {
|
|
5
|
+
delay: e,
|
|
6
|
+
duration: t,
|
|
7
|
+
easing: i,
|
|
8
|
+
css: (l) => `opacity: ${l * a}`
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function Y(n) {
|
|
12
|
+
N(n, "svelte-u2fcen", ".svelte-u2fcen.svelte-u2fcen,.svelte-u2fcen.svelte-u2fcen::before,.svelte-u2fcen.svelte-u2fcen::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow.svelte-u2fcen.svelte-u2fcen{display:flex;position:fixed;align-items:center;justify-content:center;width:100%;height:100%;z-index:100;top:0;left:0;background-color:var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));container-type:inline-size;container-name:modal-window;border-radius:6px}.ModalWindow.svelte-u2fcen .ModalContainer.svelte-u2fcen{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:40%}@container modal-window (max-width:750px){.ModalWindow.svelte-u2fcen .ModalContainer.svelte-u2fcen{width:90%}}");
|
|
13
|
+
}
|
|
14
|
+
function E(n) {
|
|
15
|
+
let e, t, i, a, l, d;
|
|
16
|
+
const h = (
|
|
17
|
+
/*#slots*/
|
|
18
|
+
n[9].default
|
|
19
|
+
), r = K(
|
|
20
|
+
h,
|
|
21
|
+
n,
|
|
22
|
+
/*$$scope*/
|
|
23
|
+
n[8],
|
|
24
|
+
null
|
|
25
|
+
);
|
|
26
|
+
return {
|
|
27
|
+
c() {
|
|
28
|
+
e = y("div"), t = y("div"), i = y("div"), r && r.c(), f(i, "class", "ModalContainer svelte-u2fcen"), f(i, "part", "ModalContainer"), f(t, "class", "ModalWindow svelte-u2fcen"), f(t, "part", "ModalWindow"), f(t, "id", "Modal"), M(() => (
|
|
29
|
+
/*div1_elementresize_handler*/
|
|
30
|
+
n[11].call(t)
|
|
31
|
+
)), f(e, "part", "CustomStylingContainer"), f(e, "class", "svelte-u2fcen");
|
|
32
|
+
},
|
|
33
|
+
m(o, u) {
|
|
34
|
+
H(o, e, u), C(e, t), C(t, i), r && r.m(i, null), n[10](t), a = O(
|
|
35
|
+
t,
|
|
36
|
+
/*div1_elementresize_handler*/
|
|
37
|
+
n[11].bind(t)
|
|
38
|
+
), n[12](e), d = !0;
|
|
39
|
+
},
|
|
40
|
+
p(o, u) {
|
|
41
|
+
n = o, r && r.p && (!d || u & /*$$scope*/
|
|
42
|
+
256) && P(
|
|
43
|
+
r,
|
|
44
|
+
h,
|
|
45
|
+
n,
|
|
46
|
+
/*$$scope*/
|
|
47
|
+
n[8],
|
|
48
|
+
d ? V(
|
|
49
|
+
h,
|
|
50
|
+
/*$$scope*/
|
|
51
|
+
n[8],
|
|
52
|
+
u,
|
|
53
|
+
null
|
|
54
|
+
) : Q(
|
|
55
|
+
/*$$scope*/
|
|
56
|
+
n[8]
|
|
57
|
+
),
|
|
58
|
+
null
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
i(o) {
|
|
62
|
+
d || (m(r, o), o && M(() => {
|
|
63
|
+
d && (l || (l = k(t, z, { transitionDuration: (
|
|
64
|
+
/*duration*/
|
|
65
|
+
n[2]
|
|
66
|
+
) }, !0)), l.run(1));
|
|
67
|
+
}), d = !0);
|
|
68
|
+
},
|
|
69
|
+
o(o) {
|
|
70
|
+
b(r, o), o && (l || (l = k(t, z, { transitionDuration: (
|
|
71
|
+
/*duration*/
|
|
72
|
+
n[2]
|
|
73
|
+
) }, !1)), l.run(0)), d = !1;
|
|
74
|
+
},
|
|
75
|
+
d(o) {
|
|
76
|
+
o && L(e), r && r.d(o), n[10](null), a(), o && l && l.end(), n[12](null);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function Z(n) {
|
|
81
|
+
let e, t, i = (
|
|
82
|
+
/*show*/
|
|
83
|
+
n[5] && E(n)
|
|
84
|
+
);
|
|
85
|
+
return {
|
|
86
|
+
c() {
|
|
87
|
+
i && i.c(), e = A();
|
|
88
|
+
},
|
|
89
|
+
m(a, l) {
|
|
90
|
+
i && i.m(a, l), H(a, e, l), t = !0;
|
|
91
|
+
},
|
|
92
|
+
p(a, [l]) {
|
|
93
|
+
/*show*/
|
|
94
|
+
a[5] ? i ? (i.p(a, l), l & /*show*/
|
|
95
|
+
32 && m(i, 1)) : (i = E(a), i.c(), m(i, 1), i.m(e.parentNode, e)) : i && (X(), b(i, 1, 1, () => {
|
|
96
|
+
i = null;
|
|
97
|
+
}), I());
|
|
98
|
+
},
|
|
99
|
+
i(a) {
|
|
100
|
+
t || (m(i), t = !0);
|
|
101
|
+
},
|
|
102
|
+
o(a) {
|
|
103
|
+
b(i), t = !1;
|
|
104
|
+
},
|
|
105
|
+
d(a) {
|
|
106
|
+
a && L(e), i && i.d(a);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function $(n, e, t) {
|
|
111
|
+
let { $$slots: i = {}, $$scope: a } = e, { clientstyling: l = "" } = e, { clientstylingurl: d = "" } = e, { duration: h = "5ms" } = e, { width: r } = e, { height: o } = e, u, c, w = !1;
|
|
112
|
+
const W = () => {
|
|
113
|
+
t(5, w = !1), window.postMessage({ type: "ClosedCashierModal" }, window.location.href), window.postMessage({ type: "EnableScroll" }, window.location.href);
|
|
114
|
+
}, p = (s) => {
|
|
115
|
+
s.data.type == "ShowCashierModal" && (t(5, w = !0), window.postMessage({ type: "DisableScroll" }, window.location.href)), s.data.type == "HideCashierModal" && W();
|
|
116
|
+
}, T = () => {
|
|
117
|
+
let s = document.createElement("style");
|
|
118
|
+
s.innerHTML = l, c.appendChild(s);
|
|
119
|
+
}, D = () => {
|
|
120
|
+
let s = new URL(d), v = document.createElement("style");
|
|
121
|
+
fetch(s.href).then((_) => _.text()).then((_) => {
|
|
122
|
+
v.innerHTML = _, setTimeout(
|
|
123
|
+
() => {
|
|
124
|
+
c.appendChild(v);
|
|
125
|
+
},
|
|
126
|
+
1
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
J(() => (window.addEventListener("message", p, !1), () => {
|
|
131
|
+
window.removeEventListener("message", p);
|
|
132
|
+
}));
|
|
133
|
+
function R(s) {
|
|
134
|
+
S[s ? "unshift" : "push"](() => {
|
|
135
|
+
u = s, t(4, u);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function U() {
|
|
139
|
+
r = this.clientWidth, o = this.clientHeight, t(0, r), t(1, o);
|
|
140
|
+
}
|
|
141
|
+
function j(s) {
|
|
142
|
+
S[s ? "unshift" : "push"](() => {
|
|
143
|
+
c = s, t(3, c);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return n.$$set = (s) => {
|
|
147
|
+
"clientstyling" in s && t(6, l = s.clientstyling), "clientstylingurl" in s && t(7, d = s.clientstylingurl), "duration" in s && t(2, h = s.duration), "width" in s && t(0, r = s.width), "height" in s && t(1, o = s.height), "$$scope" in s && t(8, a = s.$$scope);
|
|
148
|
+
}, n.$$.update = () => {
|
|
149
|
+
n.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
150
|
+
72 && l && c && T(), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
151
|
+
136 && d && c && D();
|
|
152
|
+
}, [
|
|
153
|
+
r,
|
|
154
|
+
o,
|
|
155
|
+
h,
|
|
156
|
+
c,
|
|
157
|
+
u,
|
|
158
|
+
w,
|
|
159
|
+
l,
|
|
160
|
+
d,
|
|
161
|
+
a,
|
|
162
|
+
i,
|
|
163
|
+
R,
|
|
164
|
+
U,
|
|
165
|
+
j
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
class ee extends x {
|
|
169
|
+
constructor(e) {
|
|
170
|
+
super(), B(
|
|
171
|
+
this,
|
|
172
|
+
e,
|
|
173
|
+
$,
|
|
174
|
+
Z,
|
|
175
|
+
G,
|
|
176
|
+
{
|
|
177
|
+
clientstyling: 6,
|
|
178
|
+
clientstylingurl: 7,
|
|
179
|
+
duration: 2,
|
|
180
|
+
width: 0,
|
|
181
|
+
height: 1
|
|
182
|
+
},
|
|
183
|
+
Y
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
get clientstyling() {
|
|
187
|
+
return this.$$.ctx[6];
|
|
188
|
+
}
|
|
189
|
+
set clientstyling(e) {
|
|
190
|
+
this.$$set({ clientstyling: e }), g();
|
|
191
|
+
}
|
|
192
|
+
get clientstylingurl() {
|
|
193
|
+
return this.$$.ctx[7];
|
|
194
|
+
}
|
|
195
|
+
set clientstylingurl(e) {
|
|
196
|
+
this.$$set({ clientstylingurl: e }), g();
|
|
197
|
+
}
|
|
198
|
+
get duration() {
|
|
199
|
+
return this.$$.ctx[2];
|
|
200
|
+
}
|
|
201
|
+
set duration(e) {
|
|
202
|
+
this.$$set({ duration: e }), g();
|
|
203
|
+
}
|
|
204
|
+
get width() {
|
|
205
|
+
return this.$$.ctx[0];
|
|
206
|
+
}
|
|
207
|
+
set width(e) {
|
|
208
|
+
this.$$set({ width: e }), g();
|
|
209
|
+
}
|
|
210
|
+
get height() {
|
|
211
|
+
return this.$$.ctx[1];
|
|
212
|
+
}
|
|
213
|
+
set height(e) {
|
|
214
|
+
this.$$set({ height: e }), g();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
F(ee, { clientstyling: {}, clientstylingurl: {}, duration: {}, width: {}, height: {} }, ["default"], [], !0);
|
|
218
|
+
export {
|
|
219
|
+
ee as default
|
|
220
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { S as j, b as w, f as d, c as _, a as k, d as N, g, y as v, h as E, j as x, k as S, l as f, A as z, z as y, n as p, v as L, C as T } from "./CashierConfirmModal-DJCwaG3s.js";
|
|
2
|
+
function H(n) {
|
|
3
|
+
N(n, "svelte-enajx", ".CashierNotifications.svelte-enajx.svelte-enajx{position:fixed;z-index:9;background-color:var(--emw--color-background, #111);color:var(--emw--color-white, #fff);display:flex;border-radius:var(--emw--border-radius-medium, 4px);align-items:center;gap:var(--emw--spacing-small, 12px);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications.svelte-enajx span.svelte-enajx,.CashierNotifications.svelte-enajx button.svelte-enajx{font-family:inherit;border:none;font-variant:normal}.CashierNotifications.svelte-enajx span.svelte-enajx{line-height:normal}.CashierNotifications.svelte-enajx button.svelte-enajx{color:var(--emw--color-primary, #7EC51E);background-color:transparent;cursor:pointer;font-size:var(--emw--font-size-small, 14px);font-style:normal;font-weight:var(--emw--font-weight-bold, 700);font-family:inherit}");
|
|
4
|
+
}
|
|
5
|
+
function M(n) {
|
|
6
|
+
let t, s, r, u, l, a, i, m;
|
|
7
|
+
return {
|
|
8
|
+
c() {
|
|
9
|
+
t = g("div"), s = g("span"), r = v(
|
|
10
|
+
/*text*/
|
|
11
|
+
n[0]
|
|
12
|
+
), u = E(), l = g("button"), a = v(
|
|
13
|
+
/*button*/
|
|
14
|
+
n[1]
|
|
15
|
+
), x(s, "class", "svelte-enajx"), x(l, "class", "svelte-enajx"), x(t, "class", "CashierNotifications svelte-enajx");
|
|
16
|
+
},
|
|
17
|
+
m(o, c) {
|
|
18
|
+
S(o, t, c), f(t, s), f(s, r), f(t, u), f(t, l), f(l, a), n[6](t), i || (m = z(
|
|
19
|
+
l,
|
|
20
|
+
"click",
|
|
21
|
+
/*notificationClick*/
|
|
22
|
+
n[3]
|
|
23
|
+
), i = !0);
|
|
24
|
+
},
|
|
25
|
+
p(o, [c]) {
|
|
26
|
+
c & /*text*/
|
|
27
|
+
1 && y(
|
|
28
|
+
r,
|
|
29
|
+
/*text*/
|
|
30
|
+
o[0]
|
|
31
|
+
), c & /*button*/
|
|
32
|
+
2 && y(
|
|
33
|
+
a,
|
|
34
|
+
/*button*/
|
|
35
|
+
o[1]
|
|
36
|
+
);
|
|
37
|
+
},
|
|
38
|
+
i: p,
|
|
39
|
+
o: p,
|
|
40
|
+
d(o) {
|
|
41
|
+
o && L(t), n[6](null), i = !1, m();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function R(n, t, s) {
|
|
46
|
+
let { text: r } = t, { button: u } = t, { clientstyling: l = "" } = t, { clientstylingurl: a = "" } = t, i;
|
|
47
|
+
const m = () => {
|
|
48
|
+
dispatchEvent(new CustomEvent(
|
|
49
|
+
"notificationButtonClick",
|
|
50
|
+
{
|
|
51
|
+
bubbles: !0,
|
|
52
|
+
cancelable: !0,
|
|
53
|
+
composed: !0
|
|
54
|
+
}
|
|
55
|
+
));
|
|
56
|
+
}, o = () => {
|
|
57
|
+
let e = document.createElement("style");
|
|
58
|
+
e.innerHTML = l, i.appendChild(e);
|
|
59
|
+
}, c = () => {
|
|
60
|
+
let e = new URL(a), b = document.createElement("style");
|
|
61
|
+
fetch(e.href).then((h) => h.text()).then((h) => {
|
|
62
|
+
b.innerHTML = h, setTimeout(
|
|
63
|
+
() => {
|
|
64
|
+
i.appendChild(b);
|
|
65
|
+
},
|
|
66
|
+
1
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
function C(e) {
|
|
71
|
+
T[e ? "unshift" : "push"](() => {
|
|
72
|
+
i = e, s(2, i);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return n.$$set = (e) => {
|
|
76
|
+
"text" in e && s(0, r = e.text), "button" in e && s(1, u = e.button), "clientstyling" in e && s(4, l = e.clientstyling), "clientstylingurl" in e && s(5, a = e.clientstylingurl);
|
|
77
|
+
}, n.$$.update = () => {
|
|
78
|
+
n.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
79
|
+
20 && l && i && o(), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
80
|
+
36 && a && i && c();
|
|
81
|
+
}, [
|
|
82
|
+
r,
|
|
83
|
+
u,
|
|
84
|
+
i,
|
|
85
|
+
m,
|
|
86
|
+
l,
|
|
87
|
+
a,
|
|
88
|
+
C
|
|
89
|
+
];
|
|
90
|
+
}
|
|
91
|
+
class U extends j {
|
|
92
|
+
constructor(t) {
|
|
93
|
+
super(), w(
|
|
94
|
+
this,
|
|
95
|
+
t,
|
|
96
|
+
R,
|
|
97
|
+
M,
|
|
98
|
+
k,
|
|
99
|
+
{
|
|
100
|
+
text: 0,
|
|
101
|
+
button: 1,
|
|
102
|
+
clientstyling: 4,
|
|
103
|
+
clientstylingurl: 5
|
|
104
|
+
},
|
|
105
|
+
H
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
get text() {
|
|
109
|
+
return this.$$.ctx[0];
|
|
110
|
+
}
|
|
111
|
+
set text(t) {
|
|
112
|
+
this.$$set({ text: t }), d();
|
|
113
|
+
}
|
|
114
|
+
get button() {
|
|
115
|
+
return this.$$.ctx[1];
|
|
116
|
+
}
|
|
117
|
+
set button(t) {
|
|
118
|
+
this.$$set({ button: t }), d();
|
|
119
|
+
}
|
|
120
|
+
get clientstyling() {
|
|
121
|
+
return this.$$.ctx[4];
|
|
122
|
+
}
|
|
123
|
+
set clientstyling(t) {
|
|
124
|
+
this.$$set({ clientstyling: t }), d();
|
|
125
|
+
}
|
|
126
|
+
get clientstylingurl() {
|
|
127
|
+
return this.$$.ctx[5];
|
|
128
|
+
}
|
|
129
|
+
set clientstylingurl(t) {
|
|
130
|
+
this.$$set({ clientstylingurl: t }), d();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
_(U, { text: {}, button: {}, clientstyling: {}, clientstylingurl: {} }, [], [], !0);
|
|
134
|
+
export {
|
|
135
|
+
U as default
|
|
136
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CashierConfirmModal-CJUi-52c.cjs");function p(i){t.append_styles(i,"svelte-enajx",".CashierNotifications.svelte-enajx.svelte-enajx{position:fixed;z-index:9;background-color:var(--emw--color-background, #111);color:var(--emw--color-white, #fff);display:flex;border-radius:var(--emw--border-radius-medium, 4px);align-items:center;gap:var(--emw--spacing-small, 12px);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications.svelte-enajx span.svelte-enajx,.CashierNotifications.svelte-enajx button.svelte-enajx{font-family:inherit;border:none;font-variant:normal}.CashierNotifications.svelte-enajx span.svelte-enajx{line-height:normal}.CashierNotifications.svelte-enajx button.svelte-enajx{color:var(--emw--color-primary, #7EC51E);background-color:transparent;cursor:pointer;font-size:var(--emw--font-size-small, 14px);font-style:normal;font-weight:var(--emw--font-weight-bold, 700);font-family:inherit}")}function b(i){let e,s,c,f,a,o,l,d;return{c(){e=t.element("div"),s=t.element("span"),c=t.text(i[0]),f=t.space(),a=t.element("button"),o=t.text(i[1]),t.attr(s,"class","svelte-enajx"),t.attr(a,"class","svelte-enajx"),t.attr(e,"class","CashierNotifications svelte-enajx")},m(r,u){t.insert(r,e,u),t.append(e,s),t.append(s,c),t.append(e,f),t.append(e,a),t.append(a,o),i[6](e),l||(d=t.listen(a,"click",i[3]),l=!0)},p(r,[u]){u&1&&t.set_data(c,r[0]),u&2&&t.set_data(o,r[1])},i:t.noop,o:t.noop,d(r){r&&t.detach(e),i[6](null),l=!1,d()}}}function y(i,e,s){let{text:c}=e,{button:f}=e,{clientstyling:a=""}=e,{clientstylingurl:o=""}=e,l;const d=()=>{dispatchEvent(new CustomEvent("notificationButtonClick",{bubbles:!0,cancelable:!0,composed:!0}))},r=()=>{let n=document.createElement("style");n.innerHTML=a,l.appendChild(n)},u=()=>{let n=new URL(o),h=document.createElement("style");fetch(n.href).then(m=>m.text()).then(m=>{h.innerHTML=m,setTimeout(()=>{l.appendChild(h)},1)})};function x(n){t.binding_callbacks[n?"unshift":"push"](()=>{l=n,s(2,l)})}return i.$$set=n=>{"text"in n&&s(0,c=n.text),"button"in n&&s(1,f=n.button),"clientstyling"in n&&s(4,a=n.clientstyling),"clientstylingurl"in n&&s(5,o=n.clientstylingurl)},i.$$.update=()=>{i.$$.dirty&20&&a&&l&&r(),i.$$.dirty&36&&o&&l&&u()},[c,f,l,d,a,o,x]}class g extends t.SvelteComponent{constructor(e){super(),t.init(this,e,y,b,t.safe_not_equal,{text:0,button:1,clientstyling:4,clientstylingurl:5},p)}get text(){return this.$$.ctx[0]}set text(e){this.$$set({text:e}),t.flush()}get button(){return this.$$.ctx[1]}set button(e){this.$$set({button:e}),t.flush()}get clientstyling(){return this.$$.ctx[4]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[5]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}}t.create_custom_element(g,{text:{},button:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CashierConfirmModal-CJUi-52c.cjs"),B=require("./CashierError-Bv5y8E21.cjs");require("./CashierIframeRedirect-euMQeO-W.cjs");require("./CashierMethodDetails-CJQlWMCH.cjs");B.init({fallbackLocale:"en"});function te(s,t){B.addMessages(s,t)}function Ce(s){B.$locale.set(s)}const se={en:{loading:"Loading...",closeModal:"CLOSE",deposit:{makeTxnButton:"DEPOSIT",confirmText:"You're going to deposit to your account",confirmTextWithAmount:"You're going to deposit {amount} {currency} to your account",confirmButton:"Ok"},withdraw:{makeTxnButton:"WITHDRAW",confirmText:"You're going to withdraw from your account",confirmTextWithAmount:"You're going to withdraw {amount} {currency} from your account",confirmButton:"Ok"}},hr:{loading:"Učitavanje",header:{deposit:"Uplata",withdraw:"Povlačenje"}},tr:{loading:"Yükleniyor...",closeModal:"KAPAT",header:{deposit:"Yatır",withdraw:"Çek"},deposit:{makeTxnButton:"YATIR",confirmText:"Hesabınıza yatırıyorsunuz",confirmTextWithAmount:"Hesabınıza {amount} {currency} yatırıyorsunuz",confirmButton:"Tamam"},withdraw:{makeTxnButton:"ÇEK",confirmText:"Hesabınızdan çekiyorsunuz",confirmTextWithAmount:"Hesabınıza {amount} {currency} yatırıyorsunuz",confirmButton:"Tamam"}}};var ce=(s=>(s.Deposit="Deposit",s.Withdraw="Withdraw",s))(ce||{}),de=(s=>(s.Desktop="Desktop",s.Mobile="Mobile",s.NativeApp="NativeApp",s))(de||{}),R=(s=>(s.PlayerSessionIsNotValid="PlayerSessionIsNotValid",s.Success="Success",s.JwtTokenError="JwtTokenError",s))(R||{});if(typeof window!="undefined"){let s=function(t){return function(...l){try{return t.apply(this,l)}catch(n){if(n instanceof DOMException&&n.message.includes("has already been used with this registry")||n.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw n}}};customElements.define=s(customElements.define),Promise.resolve().then(()=>require("./CashierMethodsList-CmqbF598.cjs")).then(({default:t})=>{!customElements.get("cashier-methods-list")&&customElements.define("cashier-methods-list",t.element)})}if(typeof window!="undefined"){let s=function(t){return function(...l){try{return t.apply(this,l)}catch(n){if(n instanceof DOMException&&n.message.includes("has already been used with this registry")||n.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw n}}};customElements.define=s(customElements.define),Promise.resolve().then(()=>require("./CashierMethodDetails-CJQlWMCH.cjs")).then(({default:t})=>{!customElements.get("cashier-method-details")&&customElements.define("cashier-method-details",t.element)})}function ke(s){e.append_styles(s,"svelte-1eccdep","@keyframes svelte-1eccdep-loading-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.DisablePage.svelte-1eccdep.svelte-1eccdep{container-type:inline-size;container-name:confirm-modal;position:absolute;width:100%;height:100%;z-index:100;top:0;left:0;background-color:transparent}.CashierPageWidget.svelte-1eccdep.svelte-1eccdep{container-type:inline-size;container-name:deposit-page;height:inherit;position:relative;box-sizing:border-box}.CashierPageWidget.svelte-1eccdep .CashierMethodDetailsWrapper.svelte-1eccdep{display:none}.CashierPageWidget.svelte-1eccdep.svelte-1eccdep:has(.Header){border-radius:6px;border:1px solid var(--mmw--color-grey-105, #E8E9EB);box-sizing:border-box}.CashierPageWidget.svelte-1eccdep:has(.Header) .CashierPage.svelte-1eccdep,.CashierPageWidget.svelte-1eccdep:has(.Header) .DisablePage.svelte-1eccdep{height:calc(100% - var(--mmw--header-height, 32px))}.CashierPageWidget.svelte-1eccdep:has(.Header) .DisablePage.svelte-1eccdep{top:var(--mmw--header-height, 32px)}.CashierMethodListWrapper.svelte-1eccdep.svelte-1eccdep{height:100%;overflow:auto;box-sizing:border-box;scrollbar-gutter:stable both-edges;padding:var(--emw--spacing-large, 20px) var(--emw--spacing-x-small, 10px) var(--emw--spacing-small, 12px) var(--emw--spacing-x-small, 10px);width:50%}.CashierMethodListWrapper.svelte-1eccdep.svelte-1eccdep::-webkit-scrollbar{border-right:none}.BothSections.svelte-1eccdep .CashierMethodDetailsWrapper.svelte-1eccdep{height:100%;overflow:auto;box-sizing:border-box;scrollbar-gutter:stable both-edges;display:block;transition:all 1s;width:50%;justify-content:center}.BothSections.svelte-1eccdep .CashierMethodListWrapper.svelte-1eccdep::-webkit-scrollbar{border-right:1px solid var(--emw--color-gray-100, #E0E0E0)}.CashierPage.svelte-1eccdep.svelte-1eccdep{position:relative;display:flex;flex-direction:row;justify-content:center;height:inherit}cashier-method-details.svelte-1eccdep.svelte-1eccdep{width:0}cashier-iframe-redirect.svelte-1eccdep.svelte-1eccdep{height:inherit;width:inherit}.IframeRedirect.svelte-1eccdep.svelte-1eccdep{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:100;top:0;left:0;background-color:var(--emw--color-white, #FFF)}@container deposit-page (max-width:750px){.CashierPage.svelte-1eccdep.svelte-1eccdep,.BothSections.svelte-1eccdep .CashierPage.svelte-1eccdep{flex-direction:column;justify-content:flex-start;gap:0}.CashierPage.svelte-1eccdep cashier-methods-list.svelte-1eccdep,.CashierPage.svelte-1eccdep cashier-method-details.svelte-1eccdep,.CashierPage.svelte-1eccdep .CashierMethodDetailsWrapper.svelte-1eccdep,.BothSections.svelte-1eccdep .CashierPage cashier-methods-list.svelte-1eccdep,.BothSections.svelte-1eccdep .CashierPage cashier-method-details.svelte-1eccdep,.BothSections.svelte-1eccdep .CashierPage .CashierMethodDetailsWrapper.svelte-1eccdep{width:100%;height:100%}cashier-method-details.svelte-1eccdep.svelte-1eccdep{display:none}.BothSections.svelte-1eccdep cashier-method-details.svelte-1eccdep{display:flex}.BothSections.svelte-1eccdep .CashierMethodListWrapper.svelte-1eccdep{display:none}.CashierMethodListWrapper.svelte-1eccdep.svelte-1eccdep{width:100%}}.svelte-1eccdep.svelte-1eccdep::-webkit-scrollbar{width:4px}.svelte-1eccdep.svelte-1eccdep::-webkit-scrollbar-track{background:transparent}.svelte-1eccdep.svelte-1eccdep::-webkit-scrollbar-thumb{background:var(--mmw--color-grey-105, #E8E9EB)}.svelte-1eccdep.svelte-1eccdep::-webkit-scrollbar-thumb:hover{background:var(--mmw--color-grey-290, #666)}")}function le(s){let t;return{c(){t=e.element("div"),e.attr(t,"class","DisablePage svelte-1eccdep")},m(l,n){e.insert(l,t,n)},d(l){l&&e.detach(t)}}}function ne(s){let t,l,n,r,p,i=s[32]("closeModal")+"",m,c,o,u,h,_=!!s[10]&&s[10]!=="false"&&ae(s),g=s[21]&&s[28]===s[16].Default&&ie(s),w=s[20]&&oe(s);return{c(){_&&_.c(),t=e.space(),g&&g.c(),l=e.space(),n=e.element("cashier-modal"),r=e.element("cashier-error"),p=e.element("div"),m=e.text(i),c=e.space(),w&&w.c(),o=e.empty(),e.attr(p,"slot","button"),e.attr(p,"class","ModalButton svelte-1eccdep"),e.set_custom_element_data(r,"assetsurl",s[8]),e.set_custom_element_data(r,"translationurl",s[4]),e.set_custom_element_data(r,"clientstylingurl",s[13]),e.set_custom_element_data(r,"clientstyling",s[12]),e.set_custom_element_data(r,"errorcode",s[29]),e.set_custom_element_data(r,"class","svelte-1eccdep"),e.set_custom_element_data(n,"class","svelte-1eccdep")},m(d,f){_&&_.m(d,f),e.insert(d,t,f),g&&g.m(d,f),e.insert(d,l,f),e.insert(d,n,f),e.append(n,r),e.append(r,p),e.append(p,m),e.insert(d,c,f),w&&w.m(d,f),e.insert(d,o,f),u||(h=e.listen(p,"click",s[34]),u=!0)},p(d,f){d[10]&&d[10]!=="false"?_?_.p(d,f):(_=ae(d),_.c(),_.m(t.parentNode,t)):_&&(_.d(1),_=null),d[21]&&d[28]===d[16].Default?g?g.p(d,f):(g=ie(d),g.c(),g.m(l.parentNode,l)):g&&(g.d(1),g=null),f[1]&2&&i!==(i=d[32]("closeModal")+"")&&e.set_data(m,i),f[0]&256&&e.set_custom_element_data(r,"assetsurl",d[8]),f[0]&16&&e.set_custom_element_data(r,"translationurl",d[4]),f[0]&8192&&e.set_custom_element_data(r,"clientstylingurl",d[13]),f[0]&4096&&e.set_custom_element_data(r,"clientstyling",d[12]),f[0]&536870912&&e.set_custom_element_data(r,"errorcode",d[29]),d[20]?w?w.p(d,f):(w=oe(d),w.c(),w.m(o.parentNode,o)):w&&(w.d(1),w=null)},d(d){d&&(e.detach(t),e.detach(l),e.detach(n),e.detach(c),e.detach(o)),_&&_.d(d),g&&g.d(d),w&&w.d(d),u=!1,h()}}}function ae(s){let t;return{c(){t=e.element("cashier-header"),e.set_custom_element_data(t,"class","Header svelte-1eccdep"),e.set_custom_element_data(t,"lang",s[2]),e.set_custom_element_data(t,"translationurl",s[4]),e.set_custom_element_data(t,"title",s[30]),e.set_custom_element_data(t,"clientstylingurl",s[13]),e.set_custom_element_data(t,"clientstyling",s[12]),e.set_custom_element_data(t,"showbackbutton",s[31])},m(l,n){e.insert(l,t,n)},p(l,n){n[0]&4&&e.set_custom_element_data(t,"lang",l[2]),n[0]&16&&e.set_custom_element_data(t,"translationurl",l[4]),n[0]&1073741824&&e.set_custom_element_data(t,"title",l[30]),n[0]&8192&&e.set_custom_element_data(t,"clientstylingurl",l[13]),n[0]&4096&&e.set_custom_element_data(t,"clientstyling",l[12]),n[1]&1&&e.set_custom_element_data(t,"showbackbutton",l[31])},d(l){l&&e.detach(t)}}}function ie(s){let t,l;return{c(){t=e.element("div"),l=e.element("cashier-iframe-redirect"),e.set_custom_element_data(l,"lang",s[2]),e.set_custom_element_data(l,"translationurl",s[4]),e.set_custom_element_data(l,"title",s[30]),e.set_custom_element_data(l,"clientstylingurl",s[13]),e.set_custom_element_data(l,"clientstyling",s[12]),e.set_custom_element_data(l,"showbackbutton",s[10]),e.set_custom_element_data(l,"iframeurl",s[21]),e.set_custom_element_data(l,"class","svelte-1eccdep"),e.attr(t,"class","IframeRedirect svelte-1eccdep")},m(n,r){e.insert(n,t,r),e.append(t,l)},p(n,r){r[0]&4&&e.set_custom_element_data(l,"lang",n[2]),r[0]&16&&e.set_custom_element_data(l,"translationurl",n[4]),r[0]&1073741824&&e.set_custom_element_data(l,"title",n[30]),r[0]&8192&&e.set_custom_element_data(l,"clientstylingurl",n[13]),r[0]&4096&&e.set_custom_element_data(l,"clientstyling",n[12]),r[0]&1024&&e.set_custom_element_data(l,"showbackbutton",n[10]),r[0]&2097152&&e.set_custom_element_data(l,"iframeurl",n[21])},d(n){n&&e.detach(t)}}}function oe(s){let t,l,n=(s[26]&&!s[27]?s[32](`${s[9].toLowerCase()}.confirmTextWithAmount`,{values:{amount:s[33].format(s[26]),currency:s[6]}}):s[32](`${s[9].toLowerCase()}.confirmText`))+"",r,p,i,m=s[32](`${s[9].toLowerCase()}.confirmButton`)+"",c;return{c(){t=e.element("cashier-confirm-modal"),l=e.element("span"),r=e.text(n),p=e.space(),i=e.element("div"),c=e.text(m),e.attr(l,"slot","text"),e.attr(l,"class","svelte-1eccdep"),e.attr(i,"slot","confirm"),e.attr(i,"class","svelte-1eccdep"),e.set_custom_element_data(t,"clientstylingurl",s[13]),e.set_custom_element_data(t,"clientstyling",s[12]),e.set_custom_element_data(t,"class","svelte-1eccdep")},m(o,u){e.insert(o,t,u),e.append(t,l),e.append(l,r),e.append(t,p),e.append(t,i),e.append(i,c)},p(o,u){u[0]&201327168|u[1]&2&&n!==(n=(o[26]&&!o[27]?o[32](`${o[9].toLowerCase()}.confirmTextWithAmount`,{values:{amount:o[33].format(o[26]),currency:o[6]}}):o[32](`${o[9].toLowerCase()}.confirmText`))+"")&&e.set_data(r,n),u[0]&512|u[1]&2&&m!==(m=o[32](`${o[9].toLowerCase()}.confirmButton`)+"")&&e.set_data(c,m),u[0]&8192&&e.set_custom_element_data(t,"clientstylingurl",o[13]),u[0]&4096&&e.set_custom_element_data(t,"clientstyling",o[12])},d(o){o&&e.detach(t)}}}function Me(s){let t,l=!s[25]&&re(s);return{c(){t=e.element("cashier-error"),l&&l.c(),e.set_custom_element_data(t,"class","Error svelte-1eccdep"),e.set_custom_element_data(t,"lang",s[2]),e.set_custom_element_data(t,"assetsurl",s[8]),e.set_custom_element_data(t,"translationurl",s[4]),e.set_custom_element_data(t,"clientstylingurl",s[13]),e.set_custom_element_data(t,"clientstyling",s[12]),e.set_custom_element_data(t,"hidebuttons","true"),e.set_custom_element_data(t,"errorcode",s[25])},m(n,r){e.insert(n,t,r),l&&l.m(t,null)},p(n,r){n[25]?l&&(l.d(1),l=null):l?l.p(n,r):(l=re(n),l.c(),l.m(t,null)),r[0]&4&&e.set_custom_element_data(t,"lang",n[2]),r[0]&256&&e.set_custom_element_data(t,"assetsurl",n[8]),r[0]&16&&e.set_custom_element_data(t,"translationurl",n[4]),r[0]&8192&&e.set_custom_element_data(t,"clientstylingurl",n[13]),r[0]&4096&&e.set_custom_element_data(t,"clientstyling",n[12]),r[0]&33554432&&e.set_custom_element_data(t,"errorcode",n[25])},d(n){n&&e.detach(t),l&&l.d()}}}function Pe(s){let t,l,n,r,p,i,m;return{c(){t=e.element("div"),l=e.element("div"),n=e.element("cashier-methods-list"),r=e.space(),p=e.element("div"),i=e.element("cashier-method-details"),e.set_custom_element_data(n,"lang",s[2]),e.set_custom_element_data(n,"local",s[3]),e.set_custom_element_data(n,"translationurl",s[4]),e.set_custom_element_data(n,"endpoint",s[0]),e.set_custom_element_data(n,"customerid",s[5]),e.set_custom_element_data(n,"currency",s[6]),e.set_custom_element_data(n,"numberofmethodsshown",s[11]),e.set_custom_element_data(n,"clientstylingurl",s[13]),e.set_custom_element_data(n,"clientstyling",s[12]),e.set_custom_element_data(n,"assetsurl",s[8]),e.set_custom_element_data(n,"session",s[17]),e.set_custom_element_data(n,"ismobileview",s[19]),e.set_custom_element_data(n,"class","svelte-1eccdep"),e.attr(l,"class","CashierMethodListWrapper svelte-1eccdep"),e.set_custom_element_data(i,"lang",s[2]),e.set_custom_element_data(i,"local",s[3]),e.set_custom_element_data(i,"translationurl",s[4]),e.set_custom_element_data(i,"endpoint",s[0]),e.set_custom_element_data(i,"customerid",s[5]),e.set_custom_element_data(i,"currency",s[6]),e.set_custom_element_data(i,"amount",s[7]),e.set_custom_element_data(i,"assetsurl",s[8]),e.set_custom_element_data(i,"type",s[9]),e.set_custom_element_data(i,"clientstylingurl",s[13]),e.set_custom_element_data(i,"clientstyling",s[12]),e.set_custom_element_data(i,"ismobileview",s[19]),e.set_custom_element_data(i,"selectedpaymentmethodname",m=s[18].Name),e.set_custom_element_data(i,"session",s[17]),e.set_custom_element_data(i,"playersession",s[1]),e.set_custom_element_data(i,"class","svelte-1eccdep"),e.attr(p,"class","CashierMethodDetailsWrapper svelte-1eccdep"),e.attr(t,"class","CashierPage svelte-1eccdep")},m(c,o){e.insert(c,t,o),e.append(t,l),e.append(l,n),e.append(t,r),e.append(t,p),e.append(p,i)},p(c,o){o[0]&4&&e.set_custom_element_data(n,"lang",c[2]),o[0]&8&&e.set_custom_element_data(n,"local",c[3]),o[0]&16&&e.set_custom_element_data(n,"translationurl",c[4]),o[0]&1&&e.set_custom_element_data(n,"endpoint",c[0]),o[0]&32&&e.set_custom_element_data(n,"customerid",c[5]),o[0]&64&&e.set_custom_element_data(n,"currency",c[6]),o[0]&2048&&e.set_custom_element_data(n,"numberofmethodsshown",c[11]),o[0]&8192&&e.set_custom_element_data(n,"clientstylingurl",c[13]),o[0]&4096&&e.set_custom_element_data(n,"clientstyling",c[12]),o[0]&256&&e.set_custom_element_data(n,"assetsurl",c[8]),o[0]&131072&&e.set_custom_element_data(n,"session",c[17]),o[0]&524288&&e.set_custom_element_data(n,"ismobileview",c[19]),o[0]&4&&e.set_custom_element_data(i,"lang",c[2]),o[0]&8&&e.set_custom_element_data(i,"local",c[3]),o[0]&16&&e.set_custom_element_data(i,"translationurl",c[4]),o[0]&1&&e.set_custom_element_data(i,"endpoint",c[0]),o[0]&32&&e.set_custom_element_data(i,"customerid",c[5]),o[0]&64&&e.set_custom_element_data(i,"currency",c[6]),o[0]&128&&e.set_custom_element_data(i,"amount",c[7]),o[0]&256&&e.set_custom_element_data(i,"assetsurl",c[8]),o[0]&512&&e.set_custom_element_data(i,"type",c[9]),o[0]&8192&&e.set_custom_element_data(i,"clientstylingurl",c[13]),o[0]&4096&&e.set_custom_element_data(i,"clientstyling",c[12]),o[0]&524288&&e.set_custom_element_data(i,"ismobileview",c[19]),o[0]&262144&&m!==(m=c[18].Name)&&e.set_custom_element_data(i,"selectedpaymentmethodname",m),o[0]&131072&&e.set_custom_element_data(i,"session",c[17]),o[0]&2&&e.set_custom_element_data(i,"playersession",c[1])},d(c){c&&e.detach(t)}}}function re(s){let t,l;return{c(){t=e.element("span"),l=e.text(s[24]),e.attr(t,"slot","text"),e.attr(t,"class","svelte-1eccdep")},m(n,r){e.insert(n,t,r),e.append(t,l)},p(n,r){r[0]&16777216&&e.set_data(l,n[24])},d(n){n&&e.detach(t)}}}function Ee(s){let t,l,n,r,p,i=s[22]&&le(),m=s[2]&&ne(s);function c(h,_){return!h[24]&&!h[25]?Pe:Me}let o=c(s),u=o(s);return{c(){t=e.element("div"),i&&i.c(),l=e.space(),m&&m.c(),n=e.space(),u.c(),e.attr(t,"class",r=e.null_to_empty(s[23]?"CashierPageWidget BothSections":"CashierPageWidget")+" svelte-1eccdep"),e.add_render_callback(()=>s[40].call(t))},m(h,_){e.insert(h,t,_),i&&i.m(t,null),e.append(t,l),m&&m.m(t,null),e.append(t,n),u.m(t,null),s[39](t),p=e.add_iframe_resize_listener(t,s[40].bind(t))},p(h,_){h[22]?i||(i=le(),i.c(),i.m(t,l)):i&&(i.d(1),i=null),h[2]?m?m.p(h,_):(m=ne(h),m.c(),m.m(t,n)):m&&(m.d(1),m=null),o===(o=c(h))&&u?u.p(h,_):(u.d(1),u=o(h),u&&(u.c(),u.m(t,null))),_[0]&8388608&&r!==(r=e.null_to_empty(h[23]?"CashierPageWidget BothSections":"CashierPageWidget")+" svelte-1eccdep")&&e.attr(t,"class",r)},i:e.noop,o:e.noop,d(h){h&&e.detach(t),i&&i.d(),m&&m.d(),u.d(),s[39](null),p()}}}function Se(s,t,l){let n;e.component_subscribe(s,B.$format,a=>l(32,n=a));var r;(function(a){a.Default="Default",a.RedirectWithRetry="Redirect"})(r||(r={}));const p=(a,[b,y])=>[...a,...Array.isArray(b)?[...b.map(v=>[v,y])]:[[b,y]]];new Map([[["Default",0],r.Default],[["Redirect",1],r.RedirectWithRetry]].reduce(p,[]));let{endpoint:i}=t,{session:m}=t,{lang:c="en"}=t,{local:o="en-US"}=t,{translationurl:u}=t,{successurl:h}=t,{failurl:_}=t,{cancelurl:g}=t,{customerid:w}=t,{currency:d}=t,{amount:f}=t,{assetsurl:O}=t,{type:E=ce.Deposit}=t,{channel:T=de.Desktop}=t,{showheader:I="true"}=t,{numberofmethodsshown:U}=t,{clientstyling:L=""}=t,{clientstylingurl:W=""}=t,F,C={},ue=new Intl.NumberFormat(o,{minimumFractionDigits:2}),k,S,q,A=!1,Y,J,D=!1,z,M,V,K,X,G,N,H;const _e=()=>{Ce(c)},he=()=>{let a=u;if(a)return fetch(a).then(b=>b.json()).then(b=>{Object.keys(b).forEach(y=>{te(y,b[y])})}).catch(b=>{console.log(b)})};Object.keys(se).forEach(a=>{te(a,se[a])});const fe=()=>{const a=new URL(`${i}/v2/player/${w}/payment/GetPaymentSession`),b=new Headers;b.append("accept","application/json"),b.append("Content-Type","application/json"),b.append("X-SessionId",`${m}`);const y={method:"POST",mode:"cors",headers:b,body:JSON.stringify({Channel:T,Type:E,SuccessUrl:h,CancelUrl:g,FailUrl:_,Language:c})};fetch(a,y).then(v=>v.json()).then(v=>{if(v.error&&l(24,z=v.error),v.ResponseCode===R.PlayerSessionIsNotValid){l(25,M=v.ResponseCode),j();return}if(v.ResponseCode===R.JwtTokenError&&(l(25,M=v.ResponseCode),j()),v.ResponseCode!==R.Success){l(25,M=v.ResponseCode),j();return}l(17,F=v.XPaymentSessionToken)}).catch(v=>console.log(v))},P=()=>{D&&Q()&&!M?(l(30,N=C.Label||C.Name),l(31,H="true")):(l(30,N=`header.${E.toLowerCase()}`),l(31,H="false"))},pe=()=>{l(19,q=Q().toString()),P()},Q=()=>S<750,Z=a=>{l(18,C.Name=a.detail.Name,C),l(18,C.Label=a.detail.Label,C),l(23,D=!0),P()},j=()=>{window.postMessage({type:"ErrorResponseCode",errorResponseCode:M},window.location.href)},ge=()=>{let a=document.createElement("style");a.innerHTML=L,k.appendChild(a)},we=()=>{let a=new URL(W),b=document.createElement("style");fetch(a.href).then(y=>y.text()).then(y=>{b.innerHTML=y,setTimeout(()=>{k.appendChild(b)},1),setTimeout(()=>{},500)})},x=a=>{l(23,D=!a.detail.hideMethodDetails),P()};e.onMount(()=>(window.addEventListener("selectPayMeth",Z,!1),window.addEventListener("hidePaymentDetails",x,!1),window.addEventListener("message",ee,!1),window.addEventListener("closeModal",$,!1),()=>{window.removeEventListener("hidePaymentDetails",x),window.removeEventListener("selectPayMeth",Z),window.removeEventListener("message",ee),window.removeEventListener("closeModal",$)}));const be=()=>{window.postMessage({type:"HideCashierModal"},window.location.href)},$=()=>{l(20,A=!1)},ee=a=>{a.data.type==="ShowSessionError"&&l(24,z=a.data.error),a.data.type==="ToggleDisableActionOnPage"&&l(22,J=a.data.disable),a.data.type==="ErrorResponseCode"&&(l(25,M=a.data.errorResponseCode),P()),a.data.type==="ShowConfirmModal"&&(l(20,A=a.data.showConfirmModal),l(26,V=a.data.editedAmount),l(27,K=a.data.hideAmountField)),a.data.type==="RedirectInfo"&&(l(21,Y=a.data.redirectUrl),l(28,X=a.data.redirectMode),P()),a.data.type==="ShowCashierModal"&&l(29,G=a.data.modalErrorMessage)};function ve(a){e.binding_callbacks[a?"unshift":"push"](()=>{k=a,l(14,k)})}function ye(){S=this.clientWidth,l(15,S)}return s.$$set=a=>{"endpoint"in a&&l(0,i=a.endpoint),"session"in a&&l(1,m=a.session),"lang"in a&&l(2,c=a.lang),"local"in a&&l(3,o=a.local),"translationurl"in a&&l(4,u=a.translationurl),"successurl"in a&&l(35,h=a.successurl),"failurl"in a&&l(36,_=a.failurl),"cancelurl"in a&&l(37,g=a.cancelurl),"customerid"in a&&l(5,w=a.customerid),"currency"in a&&l(6,d=a.currency),"amount"in a&&l(7,f=a.amount),"assetsurl"in a&&l(8,O=a.assetsurl),"type"in a&&l(9,E=a.type),"channel"in a&&l(38,T=a.channel),"showheader"in a&&l(10,I=a.showheader),"numberofmethodsshown"in a&&l(11,U=a.numberofmethodsshown),"clientstyling"in a&&l(12,L=a.clientstyling),"clientstylingurl"in a&&l(13,W=a.clientstylingurl)},s.$$.update=()=>{s.$$.dirty[0]&551|s.$$.dirty[1]&240&&i&&m&&w&&c&&T&&E&&h&&_&&g&&fe(),s.$$.dirty[0]&20480&&L&&k&&ge(),s.$$.dirty[0]&24576&&W&&k&&we(),s.$$.dirty[0]&4&&c&&_e(),s.$$.dirty[0]&4&&c&&P(),s.$$.dirty[0]&16&&u&&he(),s.$$.dirty[0]&32768&&S&&pe()},[i,m,c,o,u,w,d,f,O,E,I,U,L,W,k,S,r,F,C,q,A,Y,J,D,z,M,V,K,X,G,N,H,n,ue,be,h,_,g,T,ve,ye]}class me extends e.SvelteComponent{constructor(t){super(),e.init(this,t,Se,Ee,e.safe_not_equal,{endpoint:0,session:1,lang:2,local:3,translationurl:4,successurl:35,failurl:36,cancelurl:37,customerid:5,currency:6,amount:7,assetsurl:8,type:9,channel:38,showheader:10,numberofmethodsshown:11,clientstyling:12,clientstylingurl:13},ke,[-1,-1,-1])}get endpoint(){return this.$$.ctx[0]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[1]}set session(t){this.$$set({session:t}),e.flush()}get lang(){return this.$$.ctx[2]}set lang(t){this.$$set({lang:t}),e.flush()}get local(){return this.$$.ctx[3]}set local(t){this.$$set({local:t}),e.flush()}get translationurl(){return this.$$.ctx[4]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get successurl(){return this.$$.ctx[35]}set successurl(t){this.$$set({successurl:t}),e.flush()}get failurl(){return this.$$.ctx[36]}set failurl(t){this.$$set({failurl:t}),e.flush()}get cancelurl(){return this.$$.ctx[37]}set cancelurl(t){this.$$set({cancelurl:t}),e.flush()}get customerid(){return this.$$.ctx[5]}set customerid(t){this.$$set({customerid:t}),e.flush()}get currency(){return this.$$.ctx[6]}set currency(t){this.$$set({currency:t}),e.flush()}get amount(){return this.$$.ctx[7]}set amount(t){this.$$set({amount:t}),e.flush()}get assetsurl(){return this.$$.ctx[8]}set assetsurl(t){this.$$set({assetsurl:t}),e.flush()}get type(){return this.$$.ctx[9]}set type(t){this.$$set({type:t}),e.flush()}get channel(){return this.$$.ctx[38]}set channel(t){this.$$set({channel:t}),e.flush()}get showheader(){return this.$$.ctx[10]}set showheader(t){this.$$set({showheader:t}),e.flush()}get numberofmethodsshown(){return this.$$.ctx[11]}set numberofmethodsshown(t){this.$$set({numberofmethodsshown:t}),e.flush()}get clientstyling(){return this.$$.ctx[12]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[13]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}}e.create_custom_element(me,{endpoint:{},session:{},lang:{},local:{},translationurl:{},successurl:{},failurl:{},cancelurl:{},customerid:{},currency:{},amount:{},assetsurl:{},type:{},channel:{},showheader:{},numberofmethodsshown:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=me;
|