@everymatrix/user-deposit-withdrawal 1.22.10 → 1.23.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/dist/cjs/{index-3568d1cc.js → index-b92094b0.js} +128 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/user-deposit-withdrawal.cjs.entry.js +85 -3
- package/dist/cjs/user-deposit-withdrawal.cjs.js +2 -2
- package/dist/collection/components/user-deposit-withdrawal/user-deposit-withdrawal.css +29 -0
- package/dist/collection/components/user-deposit-withdrawal/user-deposit-withdrawal.js +97 -3
- package/dist/collection/utils/locale.utils.js +24 -0
- package/dist/collection/utils/utils.js +28 -2
- package/dist/components/user-deposit-withdrawal.js +88 -3
- package/dist/esm/{index-363130bb.js → index-14b7b64f.js} +128 -5
- package/dist/esm/loader.js +2 -2
- package/dist/esm/user-deposit-withdrawal.entry.js +85 -3
- package/dist/esm/user-deposit-withdrawal.js +2 -2
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/user-deposit-withdrawal/.stencil/packages/user-deposit-withdrawal/stencil.config.d.ts +2 -0
- package/dist/types/components/user-deposit-withdrawal/user-deposit-withdrawal.d.ts +19 -0
- package/dist/types/components.d.ts +22 -0
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +8 -1
- package/dist/user-deposit-withdrawal/p-02b29406.entry.js +1 -0
- package/dist/user-deposit-withdrawal/p-3ccd8b8c.js +1 -0
- package/dist/user-deposit-withdrawal/user-deposit-withdrawal.esm.js +1 -1
- package/package.json +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/user-deposit-withdrawal/.stencil/packages/user-deposit-withdrawal/stencil.config.d.ts +0 -2
- package/dist/user-deposit-withdrawal/p-dad29c54.entry.js +0 -1
- package/dist/user-deposit-withdrawal/p-ed11cb75.js +0 -1
|
@@ -135,6 +135,11 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
135
135
|
* Don't add values to these!!
|
|
136
136
|
*/
|
|
137
137
|
const EMPTY_OBJ = {};
|
|
138
|
+
/**
|
|
139
|
+
* Namespaces
|
|
140
|
+
*/
|
|
141
|
+
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
142
|
+
const HTML_NS = 'http://www.w3.org/1999/xhtml';
|
|
138
143
|
const isDef = (v) => v != null;
|
|
139
144
|
const isComplexType = (o) => {
|
|
140
145
|
// https://jsperf.com/typeof-fn-object/5
|
|
@@ -180,6 +185,19 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
180
185
|
}
|
|
181
186
|
};
|
|
182
187
|
walk(children);
|
|
188
|
+
if (vnodeData) {
|
|
189
|
+
{
|
|
190
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
191
|
+
if (classData) {
|
|
192
|
+
vnodeData.class =
|
|
193
|
+
typeof classData !== 'object'
|
|
194
|
+
? classData
|
|
195
|
+
: Object.keys(classData)
|
|
196
|
+
.filter((k) => classData[k])
|
|
197
|
+
.join(' ');
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
183
201
|
const vnode = newVNode(nodeName, null);
|
|
184
202
|
vnode.$attrs$ = vnodeData;
|
|
185
203
|
if (vNodeChildren.length > 0) {
|
|
@@ -213,8 +231,60 @@ const isHost = (node) => node && node.$tag$ === Host;
|
|
|
213
231
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
214
232
|
if (oldValue !== newValue) {
|
|
215
233
|
let isProp = isMemberInElement(elm, memberName);
|
|
216
|
-
memberName.toLowerCase();
|
|
217
|
-
{
|
|
234
|
+
let ln = memberName.toLowerCase();
|
|
235
|
+
if (memberName === 'class') {
|
|
236
|
+
const classList = elm.classList;
|
|
237
|
+
const oldClasses = parseClassList(oldValue);
|
|
238
|
+
const newClasses = parseClassList(newValue);
|
|
239
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
240
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
241
|
+
}
|
|
242
|
+
else if (memberName === 'ref') {
|
|
243
|
+
// minifier will clean this up
|
|
244
|
+
if (newValue) {
|
|
245
|
+
newValue(elm);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
else if ((!isProp ) &&
|
|
249
|
+
memberName[0] === 'o' &&
|
|
250
|
+
memberName[1] === 'n') {
|
|
251
|
+
// Event Handlers
|
|
252
|
+
// so if the member name starts with "on" and the 3rd characters is
|
|
253
|
+
// a capital letter, and it's not already a member on the element,
|
|
254
|
+
// then we're assuming it's an event listener
|
|
255
|
+
if (memberName[2] === '-') {
|
|
256
|
+
// on- prefixed events
|
|
257
|
+
// allows to be explicit about the dom event to listen without any magic
|
|
258
|
+
// under the hood:
|
|
259
|
+
// <my-cmp on-click> // listens for "click"
|
|
260
|
+
// <my-cmp on-Click> // listens for "Click"
|
|
261
|
+
// <my-cmp on-ionChange> // listens for "ionChange"
|
|
262
|
+
// <my-cmp on-EVENTS> // listens for "EVENTS"
|
|
263
|
+
memberName = memberName.slice(3);
|
|
264
|
+
}
|
|
265
|
+
else if (isMemberInElement(win, ln)) {
|
|
266
|
+
// standard event
|
|
267
|
+
// the JSX attribute could have been "onMouseOver" and the
|
|
268
|
+
// member name "onmouseover" is on the window's prototype
|
|
269
|
+
// so let's add the listener "mouseover", which is all lowercased
|
|
270
|
+
memberName = ln.slice(2);
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
// custom event
|
|
274
|
+
// the JSX attribute could have been "onMyCustomEvent"
|
|
275
|
+
// so let's trim off the "on" prefix and lowercase the first character
|
|
276
|
+
// and add the listener "myCustomEvent"
|
|
277
|
+
// except for the first character, we keep the event name case
|
|
278
|
+
memberName = ln[2] + memberName.slice(3);
|
|
279
|
+
}
|
|
280
|
+
if (oldValue) {
|
|
281
|
+
plt.rel(elm, memberName, oldValue, false);
|
|
282
|
+
}
|
|
283
|
+
if (newValue) {
|
|
284
|
+
plt.ael(elm, memberName, newValue, false);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
218
288
|
// Set property if it exists and it's not a SVG
|
|
219
289
|
const isComplex = isComplexType(newValue);
|
|
220
290
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
@@ -251,6 +321,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
251
321
|
}
|
|
252
322
|
}
|
|
253
323
|
};
|
|
324
|
+
const parseClassListRegex = /\s/;
|
|
325
|
+
const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
|
|
254
326
|
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
255
327
|
// if the element passed in is a shadow root, which is a document fragment
|
|
256
328
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
@@ -279,9 +351,20 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
279
351
|
let i = 0;
|
|
280
352
|
let elm;
|
|
281
353
|
let childNode;
|
|
282
|
-
{
|
|
354
|
+
if (newVNode.$text$ !== null) {
|
|
355
|
+
// create text node
|
|
356
|
+
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
if (!isSvgMode) {
|
|
360
|
+
isSvgMode = newVNode.$tag$ === 'svg';
|
|
361
|
+
}
|
|
283
362
|
// create element
|
|
284
|
-
elm = newVNode.$elm$ = (doc.
|
|
363
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
|
|
364
|
+
);
|
|
365
|
+
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
366
|
+
isSvgMode = false;
|
|
367
|
+
}
|
|
285
368
|
// add css classes, attrs, props, listeners, etc.
|
|
286
369
|
{
|
|
287
370
|
updateElement(null, newVNode, isSvgMode);
|
|
@@ -302,6 +385,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
302
385
|
}
|
|
303
386
|
}
|
|
304
387
|
}
|
|
388
|
+
{
|
|
389
|
+
if (newVNode.$tag$ === 'svg') {
|
|
390
|
+
// Only reset the SVG context when we're exiting <svg> element
|
|
391
|
+
isSvgMode = false;
|
|
392
|
+
}
|
|
393
|
+
else if (elm.tagName === 'foreignObject') {
|
|
394
|
+
// Reenter SVG context when we're exiting <foreignObject> element
|
|
395
|
+
isSvgMode = true;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
305
398
|
}
|
|
306
399
|
return elm;
|
|
307
400
|
};
|
|
@@ -325,6 +418,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
325
418
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
326
419
|
if ((vnode = vnodes[startIdx])) {
|
|
327
420
|
elm = vnode.$elm$;
|
|
421
|
+
callNodeRefs(vnode);
|
|
328
422
|
// remove the vnode's element from the dom
|
|
329
423
|
elm.remove();
|
|
330
424
|
}
|
|
@@ -408,7 +502,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
408
502
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
409
503
|
const oldChildren = oldVNode.$children$;
|
|
410
504
|
const newChildren = newVNode.$children$;
|
|
411
|
-
|
|
505
|
+
const tag = newVNode.$tag$;
|
|
506
|
+
const text = newVNode.$text$;
|
|
507
|
+
if (text === null) {
|
|
508
|
+
{
|
|
509
|
+
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
510
|
+
// only add this to the when the compiler sees we're using an svg somewhere
|
|
511
|
+
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
512
|
+
}
|
|
412
513
|
// element node
|
|
413
514
|
{
|
|
414
515
|
{
|
|
@@ -423,6 +524,11 @@ const patch = (oldVNode, newVNode) => {
|
|
|
423
524
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
424
525
|
}
|
|
425
526
|
else if (newChildren !== null) {
|
|
527
|
+
// no old child vnodes, but there are new child vnodes to add
|
|
528
|
+
if (oldVNode.$text$ !== null) {
|
|
529
|
+
// the old vnode was text, so be sure to clear it out
|
|
530
|
+
elm.textContent = '';
|
|
531
|
+
}
|
|
426
532
|
// add the new vnode children
|
|
427
533
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
428
534
|
}
|
|
@@ -430,6 +536,20 @@ const patch = (oldVNode, newVNode) => {
|
|
|
430
536
|
// no new child vnodes, but there are old child vnodes to remove
|
|
431
537
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
432
538
|
}
|
|
539
|
+
if (isSvgMode && tag === 'svg') {
|
|
540
|
+
isSvgMode = false;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
else if (oldVNode.$text$ !== text) {
|
|
544
|
+
// update the text content for the text only vnode
|
|
545
|
+
// and also only if the text is different than before
|
|
546
|
+
elm.data = text;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
const callNodeRefs = (vNode) => {
|
|
550
|
+
{
|
|
551
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
552
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
433
553
|
}
|
|
434
554
|
};
|
|
435
555
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
@@ -562,6 +682,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
562
682
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
563
683
|
const instance = hostRef.$lazyInstance$ ;
|
|
564
684
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
685
|
+
{
|
|
686
|
+
safeCall(instance, 'componentDidRender');
|
|
687
|
+
}
|
|
565
688
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
566
689
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
567
690
|
{
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-b92094b0.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,16 +2,83 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-b92094b0.js');
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr'];
|
|
9
|
+
const TRANSLATIONS = {
|
|
10
|
+
en: {
|
|
11
|
+
Deposit: 'Deposit',
|
|
12
|
+
Withdraw: 'Withdraw',
|
|
13
|
+
},
|
|
14
|
+
ro: {
|
|
15
|
+
Deposit: 'Depozit',
|
|
16
|
+
Withdraw: 'Retragere',
|
|
17
|
+
},
|
|
18
|
+
fr: {
|
|
19
|
+
Deposit: 'Deposit',
|
|
20
|
+
Withdraw: 'Withdraw',
|
|
21
|
+
},
|
|
22
|
+
hr: {
|
|
23
|
+
Deposit: 'Letét',
|
|
24
|
+
Withdraw: 'Visszavonás',
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const translate = (key, customLang) => {
|
|
28
|
+
const lang = customLang;
|
|
29
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @name isMobile
|
|
34
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
35
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
36
|
+
* @returns {Boolean} true or false
|
|
37
|
+
*/
|
|
38
|
+
const isMobile = (userAgent) => {
|
|
39
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
40
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
41
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
42
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emfe-w-color-gray-300, #58586B);\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n}\n.MenuReturnButton svg {\n fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n padding: 0;\n margin: 0;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";
|
|
8
46
|
|
|
9
47
|
const emptyFunction = () => { };
|
|
10
48
|
const UserDepositWithdrawal = class {
|
|
11
49
|
constructor(hostRef) {
|
|
12
50
|
index.registerInstance(this, hostRef);
|
|
51
|
+
/**
|
|
52
|
+
* Client custom styling via inline style
|
|
53
|
+
*/
|
|
54
|
+
this.clientStyling = '';
|
|
55
|
+
/**
|
|
56
|
+
* Client custom styling via url
|
|
57
|
+
*/
|
|
58
|
+
this.clientStylingUrl = '';
|
|
13
59
|
this.beforeRedirect = emptyFunction;
|
|
60
|
+
this.limitStylingAppends = false;
|
|
14
61
|
this.bindedHandler = this.handleMessage.bind(this);
|
|
62
|
+
this.userAgent = window.navigator.userAgent;
|
|
63
|
+
this.isMobile = isMobile(this.userAgent);
|
|
64
|
+
this.setClientStyling = () => {
|
|
65
|
+
let sheet = document.createElement('style');
|
|
66
|
+
sheet.innerHTML = this.clientStyling;
|
|
67
|
+
this.stylingContainer.prepend(sheet);
|
|
68
|
+
};
|
|
69
|
+
this.setClientStylingURL = () => {
|
|
70
|
+
let url = new URL(this.clientStylingUrl);
|
|
71
|
+
let cssFile = document.createElement('style');
|
|
72
|
+
fetch(url.href)
|
|
73
|
+
.then((res) => res.text())
|
|
74
|
+
.then((data) => {
|
|
75
|
+
cssFile.innerHTML = data;
|
|
76
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
77
|
+
})
|
|
78
|
+
.catch((err) => {
|
|
79
|
+
console.log('error ', err);
|
|
80
|
+
});
|
|
81
|
+
};
|
|
15
82
|
}
|
|
16
83
|
get typeParameter() {
|
|
17
84
|
if (this.type === 'deposit') {
|
|
@@ -27,14 +94,29 @@ const UserDepositWithdrawal = class {
|
|
|
27
94
|
async componentWillLoad() {
|
|
28
95
|
await this.loadWidget();
|
|
29
96
|
}
|
|
97
|
+
toggleScreen(isMobile) {
|
|
98
|
+
window.postMessage({ type: 'PlayerAccountMenuActive', isMobile }, window.location.href);
|
|
99
|
+
}
|
|
30
100
|
componentDidLoad() {
|
|
31
101
|
window.addEventListener('message', this.bindedHandler, false);
|
|
32
102
|
}
|
|
33
103
|
disconnectedCallback() {
|
|
34
104
|
window.removeEventListener('message', this.bindedHandler, false);
|
|
35
105
|
}
|
|
106
|
+
componentDidRender() {
|
|
107
|
+
// start custom styling area
|
|
108
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
109
|
+
if (this.clientStyling)
|
|
110
|
+
this.setClientStyling();
|
|
111
|
+
if (this.clientStylingUrl)
|
|
112
|
+
this.setClientStylingURL();
|
|
113
|
+
this.limitStylingAppends = true;
|
|
114
|
+
}
|
|
115
|
+
// end custom styling area
|
|
116
|
+
}
|
|
36
117
|
render() {
|
|
37
|
-
return (index.h(index.Host, null, index.h("
|
|
118
|
+
return (index.h(index.Host, null, index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "DepositWithdrawalWrapper" }, index.h("div", null, (this.isMobile &&
|
|
119
|
+
index.h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, index.h("defs", null), index.h("g", { transform: "translate(-20 -158)" }, index.h("g", { transform: "translate(20 158)" }, index.h("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), index.h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language))))), index.h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl })))));
|
|
38
120
|
}
|
|
39
121
|
async loadWidget() {
|
|
40
122
|
const requestObject = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-b92094b0.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
font: inherit;
|
|
2
3
|
display: block;
|
|
3
4
|
height: 100%;
|
|
4
5
|
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.MenuReturnButton {
|
|
9
|
+
font: inherit;
|
|
10
|
+
color: var(--emfe-w-color-gray-300, #58586B);
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
column-gap: 10px;
|
|
14
|
+
margin-bottom: 10px;
|
|
15
|
+
}
|
|
16
|
+
.MenuReturnButton svg {
|
|
17
|
+
fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
18
|
+
}
|
|
19
|
+
.MenuReturnButton h2.CategoryTitleMobile {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.DepositWithdrawalWrapper {
|
|
25
|
+
width: 100%;
|
|
26
|
+
padding: 0;
|
|
27
|
+
margin: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@container (max-width: 475px) {
|
|
31
|
+
.DepositWithdrawalWrapper {
|
|
32
|
+
height: 100vh;
|
|
33
|
+
}
|
|
5
34
|
}
|
|
@@ -1,9 +1,40 @@
|
|
|
1
|
-
import { Component, Host,
|
|
1
|
+
import { Component, Host, Prop, Watch, State, h } from '@stencil/core';
|
|
2
|
+
import { translate } from '../../utils/locale.utils';
|
|
3
|
+
import { isMobile } from '../../utils/utils';
|
|
2
4
|
const emptyFunction = () => { };
|
|
3
5
|
export class UserDepositWithdrawal {
|
|
4
6
|
constructor() {
|
|
7
|
+
/**
|
|
8
|
+
* Client custom styling via inline style
|
|
9
|
+
*/
|
|
10
|
+
this.clientStyling = '';
|
|
11
|
+
/**
|
|
12
|
+
* Client custom styling via url
|
|
13
|
+
*/
|
|
14
|
+
this.clientStylingUrl = '';
|
|
5
15
|
this.beforeRedirect = emptyFunction;
|
|
16
|
+
this.limitStylingAppends = false;
|
|
6
17
|
this.bindedHandler = this.handleMessage.bind(this);
|
|
18
|
+
this.userAgent = window.navigator.userAgent;
|
|
19
|
+
this.isMobile = isMobile(this.userAgent);
|
|
20
|
+
this.setClientStyling = () => {
|
|
21
|
+
let sheet = document.createElement('style');
|
|
22
|
+
sheet.innerHTML = this.clientStyling;
|
|
23
|
+
this.stylingContainer.prepend(sheet);
|
|
24
|
+
};
|
|
25
|
+
this.setClientStylingURL = () => {
|
|
26
|
+
let url = new URL(this.clientStylingUrl);
|
|
27
|
+
let cssFile = document.createElement('style');
|
|
28
|
+
fetch(url.href)
|
|
29
|
+
.then((res) => res.text())
|
|
30
|
+
.then((data) => {
|
|
31
|
+
cssFile.innerHTML = data;
|
|
32
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
33
|
+
})
|
|
34
|
+
.catch((err) => {
|
|
35
|
+
console.log('error ', err);
|
|
36
|
+
});
|
|
37
|
+
};
|
|
7
38
|
}
|
|
8
39
|
get typeParameter() {
|
|
9
40
|
if (this.type === 'deposit') {
|
|
@@ -19,15 +50,39 @@ export class UserDepositWithdrawal {
|
|
|
19
50
|
async componentWillLoad() {
|
|
20
51
|
await this.loadWidget();
|
|
21
52
|
}
|
|
53
|
+
toggleScreen(isMobile) {
|
|
54
|
+
window.postMessage({ type: 'PlayerAccountMenuActive', isMobile }, window.location.href);
|
|
55
|
+
}
|
|
22
56
|
componentDidLoad() {
|
|
23
57
|
window.addEventListener('message', this.bindedHandler, false);
|
|
24
58
|
}
|
|
25
59
|
disconnectedCallback() {
|
|
26
60
|
window.removeEventListener('message', this.bindedHandler, false);
|
|
27
61
|
}
|
|
62
|
+
componentDidRender() {
|
|
63
|
+
// start custom styling area
|
|
64
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
65
|
+
if (this.clientStyling)
|
|
66
|
+
this.setClientStyling();
|
|
67
|
+
if (this.clientStylingUrl)
|
|
68
|
+
this.setClientStylingURL();
|
|
69
|
+
this.limitStylingAppends = true;
|
|
70
|
+
}
|
|
71
|
+
// end custom styling area
|
|
72
|
+
}
|
|
28
73
|
render() {
|
|
29
74
|
return (h(Host, null,
|
|
30
|
-
h("
|
|
75
|
+
h("div", { ref: el => this.stylingContainer = el },
|
|
76
|
+
h("div", { class: "DepositWithdrawalWrapper" },
|
|
77
|
+
h("div", null, (this.isMobile &&
|
|
78
|
+
h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) },
|
|
79
|
+
h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" },
|
|
80
|
+
h("defs", null),
|
|
81
|
+
h("g", { transform: "translate(-20 -158)" },
|
|
82
|
+
h("g", { transform: "translate(20 158)" },
|
|
83
|
+
h("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))),
|
|
84
|
+
h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language))))),
|
|
85
|
+
h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl })))));
|
|
31
86
|
}
|
|
32
87
|
async loadWidget() {
|
|
33
88
|
const requestObject = {
|
|
@@ -102,6 +157,42 @@ export class UserDepositWithdrawal {
|
|
|
102
157
|
"$": ["user-deposit-withdrawal.css"]
|
|
103
158
|
}; }
|
|
104
159
|
static get properties() { return {
|
|
160
|
+
"clientStyling": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "string",
|
|
165
|
+
"resolved": "string",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": false,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": "Client custom styling via inline style"
|
|
173
|
+
},
|
|
174
|
+
"attribute": "client-styling",
|
|
175
|
+
"reflect": true,
|
|
176
|
+
"defaultValue": "''"
|
|
177
|
+
},
|
|
178
|
+
"clientStylingUrl": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"mutable": false,
|
|
181
|
+
"complexType": {
|
|
182
|
+
"original": "string",
|
|
183
|
+
"resolved": "string",
|
|
184
|
+
"references": {}
|
|
185
|
+
},
|
|
186
|
+
"required": false,
|
|
187
|
+
"optional": false,
|
|
188
|
+
"docs": {
|
|
189
|
+
"tags": [],
|
|
190
|
+
"text": "Client custom styling via url"
|
|
191
|
+
},
|
|
192
|
+
"attribute": "client-styling-url",
|
|
193
|
+
"reflect": true,
|
|
194
|
+
"defaultValue": "''"
|
|
195
|
+
},
|
|
105
196
|
"endpoint": {
|
|
106
197
|
"type": "string",
|
|
107
198
|
"mutable": false,
|
|
@@ -114,7 +205,7 @@ export class UserDepositWithdrawal {
|
|
|
114
205
|
"optional": false,
|
|
115
206
|
"docs": {
|
|
116
207
|
"tags": [],
|
|
117
|
-
"text": ""
|
|
208
|
+
"text": "Endpoint"
|
|
118
209
|
},
|
|
119
210
|
"attribute": "endpoint",
|
|
120
211
|
"reflect": true
|
|
@@ -378,6 +469,9 @@ export class UserDepositWithdrawal {
|
|
|
378
469
|
"defaultValue": "emptyFunction"
|
|
379
470
|
}
|
|
380
471
|
}; }
|
|
472
|
+
static get states() { return {
|
|
473
|
+
"limitStylingAppends": {}
|
|
474
|
+
}; }
|
|
381
475
|
static get watchers() { return [{
|
|
382
476
|
"propName": "session",
|
|
383
477
|
"methodName": "watchLoadWidget"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr'];
|
|
3
|
+
const TRANSLATIONS = {
|
|
4
|
+
en: {
|
|
5
|
+
Deposit: 'Deposit',
|
|
6
|
+
Withdraw: 'Withdraw',
|
|
7
|
+
},
|
|
8
|
+
ro: {
|
|
9
|
+
Deposit: 'Depozit',
|
|
10
|
+
Withdraw: 'Retragere',
|
|
11
|
+
},
|
|
12
|
+
fr: {
|
|
13
|
+
Deposit: 'Deposit',
|
|
14
|
+
Withdraw: 'Withdraw',
|
|
15
|
+
},
|
|
16
|
+
hr: {
|
|
17
|
+
Deposit: 'Letét',
|
|
18
|
+
Withdraw: 'Visszavonás',
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export const translate = (key, customLang) => {
|
|
22
|
+
const lang = customLang;
|
|
23
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
24
|
+
};
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @name isMobile
|
|
3
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
4
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
5
|
+
* @returns {Boolean} true or false
|
|
6
|
+
*/
|
|
7
|
+
export const isMobile = (userAgent) => {
|
|
8
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
9
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
10
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
11
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
12
|
+
};
|
|
13
|
+
export function checkDeviceType() {
|
|
14
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
15
|
+
const width = screen.availWidth;
|
|
16
|
+
const height = screen.availHeight;
|
|
17
|
+
if (userAgent.includes('iphone')) {
|
|
18
|
+
return 'mobile';
|
|
19
|
+
}
|
|
20
|
+
if (userAgent.includes('android')) {
|
|
21
|
+
if (height > width && width < 800) {
|
|
22
|
+
return 'mobile';
|
|
23
|
+
}
|
|
24
|
+
if (width > height && height < 800) {
|
|
25
|
+
return 'tablet';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return 'desktop';
|
|
3
29
|
}
|
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr'];
|
|
5
|
+
const TRANSLATIONS = {
|
|
6
|
+
en: {
|
|
7
|
+
Deposit: 'Deposit',
|
|
8
|
+
Withdraw: 'Withdraw',
|
|
9
|
+
},
|
|
10
|
+
ro: {
|
|
11
|
+
Deposit: 'Depozit',
|
|
12
|
+
Withdraw: 'Retragere',
|
|
13
|
+
},
|
|
14
|
+
fr: {
|
|
15
|
+
Deposit: 'Deposit',
|
|
16
|
+
Withdraw: 'Withdraw',
|
|
17
|
+
},
|
|
18
|
+
hr: {
|
|
19
|
+
Deposit: 'Letét',
|
|
20
|
+
Withdraw: 'Visszavonás',
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const translate = (key, customLang) => {
|
|
24
|
+
const lang = customLang;
|
|
25
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @name isMobile
|
|
30
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
31
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
32
|
+
* @returns {Boolean} true or false
|
|
33
|
+
*/
|
|
34
|
+
const isMobile = (userAgent) => {
|
|
35
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
36
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
37
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
38
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emfe-w-color-gray-300, #58586B);\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n}\n.MenuReturnButton svg {\n fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n padding: 0;\n margin: 0;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";
|
|
4
42
|
|
|
5
43
|
const emptyFunction = () => { };
|
|
6
44
|
const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -8,8 +46,37 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
8
46
|
super();
|
|
9
47
|
this.__registerHost();
|
|
10
48
|
this.__attachShadow();
|
|
49
|
+
/**
|
|
50
|
+
* Client custom styling via inline style
|
|
51
|
+
*/
|
|
52
|
+
this.clientStyling = '';
|
|
53
|
+
/**
|
|
54
|
+
* Client custom styling via url
|
|
55
|
+
*/
|
|
56
|
+
this.clientStylingUrl = '';
|
|
11
57
|
this.beforeRedirect = emptyFunction;
|
|
58
|
+
this.limitStylingAppends = false;
|
|
12
59
|
this.bindedHandler = this.handleMessage.bind(this);
|
|
60
|
+
this.userAgent = window.navigator.userAgent;
|
|
61
|
+
this.isMobile = isMobile(this.userAgent);
|
|
62
|
+
this.setClientStyling = () => {
|
|
63
|
+
let sheet = document.createElement('style');
|
|
64
|
+
sheet.innerHTML = this.clientStyling;
|
|
65
|
+
this.stylingContainer.prepend(sheet);
|
|
66
|
+
};
|
|
67
|
+
this.setClientStylingURL = () => {
|
|
68
|
+
let url = new URL(this.clientStylingUrl);
|
|
69
|
+
let cssFile = document.createElement('style');
|
|
70
|
+
fetch(url.href)
|
|
71
|
+
.then((res) => res.text())
|
|
72
|
+
.then((data) => {
|
|
73
|
+
cssFile.innerHTML = data;
|
|
74
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
75
|
+
})
|
|
76
|
+
.catch((err) => {
|
|
77
|
+
console.log('error ', err);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
13
80
|
}
|
|
14
81
|
get typeParameter() {
|
|
15
82
|
if (this.type === 'deposit') {
|
|
@@ -25,14 +92,29 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
25
92
|
async componentWillLoad() {
|
|
26
93
|
await this.loadWidget();
|
|
27
94
|
}
|
|
95
|
+
toggleScreen(isMobile) {
|
|
96
|
+
window.postMessage({ type: 'PlayerAccountMenuActive', isMobile }, window.location.href);
|
|
97
|
+
}
|
|
28
98
|
componentDidLoad() {
|
|
29
99
|
window.addEventListener('message', this.bindedHandler, false);
|
|
30
100
|
}
|
|
31
101
|
disconnectedCallback() {
|
|
32
102
|
window.removeEventListener('message', this.bindedHandler, false);
|
|
33
103
|
}
|
|
104
|
+
componentDidRender() {
|
|
105
|
+
// start custom styling area
|
|
106
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
107
|
+
if (this.clientStyling)
|
|
108
|
+
this.setClientStyling();
|
|
109
|
+
if (this.clientStylingUrl)
|
|
110
|
+
this.setClientStylingURL();
|
|
111
|
+
this.limitStylingAppends = true;
|
|
112
|
+
}
|
|
113
|
+
// end custom styling area
|
|
114
|
+
}
|
|
34
115
|
render() {
|
|
35
|
-
return (h(Host, null, h("
|
|
116
|
+
return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "DepositWithdrawalWrapper" }, h("div", null, (this.isMobile &&
|
|
117
|
+
h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, h("defs", null), h("g", { transform: "translate(-20 -158)" }, h("g", { transform: "translate(20 158)" }, h("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language))))), h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl })))));
|
|
36
118
|
}
|
|
37
119
|
async loadWidget() {
|
|
38
120
|
const requestObject = {
|
|
@@ -104,6 +186,8 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
104
186
|
}; }
|
|
105
187
|
static get style() { return userDepositWithdrawalCss; }
|
|
106
188
|
}, [1, "user-deposit-withdrawal", {
|
|
189
|
+
"clientStyling": [513, "client-styling"],
|
|
190
|
+
"clientStylingUrl": [513, "client-styling-url"],
|
|
107
191
|
"endpoint": [513],
|
|
108
192
|
"type": [513],
|
|
109
193
|
"channel": [513],
|
|
@@ -119,7 +203,8 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
119
203
|
"contactUrl": [513, "contact-url"],
|
|
120
204
|
"depositUrl": [513, "deposit-url"],
|
|
121
205
|
"homeUrl": [513, "home-url"],
|
|
122
|
-
"beforeRedirect": [16]
|
|
206
|
+
"beforeRedirect": [16],
|
|
207
|
+
"limitStylingAppends": [32]
|
|
123
208
|
}]);
|
|
124
209
|
function defineCustomElement$1() {
|
|
125
210
|
if (typeof customElements === "undefined") {
|
|
@@ -113,6 +113,11 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
113
113
|
* Don't add values to these!!
|
|
114
114
|
*/
|
|
115
115
|
const EMPTY_OBJ = {};
|
|
116
|
+
/**
|
|
117
|
+
* Namespaces
|
|
118
|
+
*/
|
|
119
|
+
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
120
|
+
const HTML_NS = 'http://www.w3.org/1999/xhtml';
|
|
116
121
|
const isDef = (v) => v != null;
|
|
117
122
|
const isComplexType = (o) => {
|
|
118
123
|
// https://jsperf.com/typeof-fn-object/5
|
|
@@ -158,6 +163,19 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
158
163
|
}
|
|
159
164
|
};
|
|
160
165
|
walk(children);
|
|
166
|
+
if (vnodeData) {
|
|
167
|
+
{
|
|
168
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
169
|
+
if (classData) {
|
|
170
|
+
vnodeData.class =
|
|
171
|
+
typeof classData !== 'object'
|
|
172
|
+
? classData
|
|
173
|
+
: Object.keys(classData)
|
|
174
|
+
.filter((k) => classData[k])
|
|
175
|
+
.join(' ');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
161
179
|
const vnode = newVNode(nodeName, null);
|
|
162
180
|
vnode.$attrs$ = vnodeData;
|
|
163
181
|
if (vNodeChildren.length > 0) {
|
|
@@ -191,8 +209,60 @@ const isHost = (node) => node && node.$tag$ === Host;
|
|
|
191
209
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
192
210
|
if (oldValue !== newValue) {
|
|
193
211
|
let isProp = isMemberInElement(elm, memberName);
|
|
194
|
-
memberName.toLowerCase();
|
|
195
|
-
{
|
|
212
|
+
let ln = memberName.toLowerCase();
|
|
213
|
+
if (memberName === 'class') {
|
|
214
|
+
const classList = elm.classList;
|
|
215
|
+
const oldClasses = parseClassList(oldValue);
|
|
216
|
+
const newClasses = parseClassList(newValue);
|
|
217
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
218
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
219
|
+
}
|
|
220
|
+
else if (memberName === 'ref') {
|
|
221
|
+
// minifier will clean this up
|
|
222
|
+
if (newValue) {
|
|
223
|
+
newValue(elm);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
else if ((!isProp ) &&
|
|
227
|
+
memberName[0] === 'o' &&
|
|
228
|
+
memberName[1] === 'n') {
|
|
229
|
+
// Event Handlers
|
|
230
|
+
// so if the member name starts with "on" and the 3rd characters is
|
|
231
|
+
// a capital letter, and it's not already a member on the element,
|
|
232
|
+
// then we're assuming it's an event listener
|
|
233
|
+
if (memberName[2] === '-') {
|
|
234
|
+
// on- prefixed events
|
|
235
|
+
// allows to be explicit about the dom event to listen without any magic
|
|
236
|
+
// under the hood:
|
|
237
|
+
// <my-cmp on-click> // listens for "click"
|
|
238
|
+
// <my-cmp on-Click> // listens for "Click"
|
|
239
|
+
// <my-cmp on-ionChange> // listens for "ionChange"
|
|
240
|
+
// <my-cmp on-EVENTS> // listens for "EVENTS"
|
|
241
|
+
memberName = memberName.slice(3);
|
|
242
|
+
}
|
|
243
|
+
else if (isMemberInElement(win, ln)) {
|
|
244
|
+
// standard event
|
|
245
|
+
// the JSX attribute could have been "onMouseOver" and the
|
|
246
|
+
// member name "onmouseover" is on the window's prototype
|
|
247
|
+
// so let's add the listener "mouseover", which is all lowercased
|
|
248
|
+
memberName = ln.slice(2);
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
// custom event
|
|
252
|
+
// the JSX attribute could have been "onMyCustomEvent"
|
|
253
|
+
// so let's trim off the "on" prefix and lowercase the first character
|
|
254
|
+
// and add the listener "myCustomEvent"
|
|
255
|
+
// except for the first character, we keep the event name case
|
|
256
|
+
memberName = ln[2] + memberName.slice(3);
|
|
257
|
+
}
|
|
258
|
+
if (oldValue) {
|
|
259
|
+
plt.rel(elm, memberName, oldValue, false);
|
|
260
|
+
}
|
|
261
|
+
if (newValue) {
|
|
262
|
+
plt.ael(elm, memberName, newValue, false);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
196
266
|
// Set property if it exists and it's not a SVG
|
|
197
267
|
const isComplex = isComplexType(newValue);
|
|
198
268
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
@@ -229,6 +299,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
229
299
|
}
|
|
230
300
|
}
|
|
231
301
|
};
|
|
302
|
+
const parseClassListRegex = /\s/;
|
|
303
|
+
const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
|
|
232
304
|
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
233
305
|
// if the element passed in is a shadow root, which is a document fragment
|
|
234
306
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
@@ -257,9 +329,20 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
257
329
|
let i = 0;
|
|
258
330
|
let elm;
|
|
259
331
|
let childNode;
|
|
260
|
-
{
|
|
332
|
+
if (newVNode.$text$ !== null) {
|
|
333
|
+
// create text node
|
|
334
|
+
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
if (!isSvgMode) {
|
|
338
|
+
isSvgMode = newVNode.$tag$ === 'svg';
|
|
339
|
+
}
|
|
261
340
|
// create element
|
|
262
|
-
elm = newVNode.$elm$ = (doc.
|
|
341
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
|
|
342
|
+
);
|
|
343
|
+
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
344
|
+
isSvgMode = false;
|
|
345
|
+
}
|
|
263
346
|
// add css classes, attrs, props, listeners, etc.
|
|
264
347
|
{
|
|
265
348
|
updateElement(null, newVNode, isSvgMode);
|
|
@@ -280,6 +363,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
280
363
|
}
|
|
281
364
|
}
|
|
282
365
|
}
|
|
366
|
+
{
|
|
367
|
+
if (newVNode.$tag$ === 'svg') {
|
|
368
|
+
// Only reset the SVG context when we're exiting <svg> element
|
|
369
|
+
isSvgMode = false;
|
|
370
|
+
}
|
|
371
|
+
else if (elm.tagName === 'foreignObject') {
|
|
372
|
+
// Reenter SVG context when we're exiting <foreignObject> element
|
|
373
|
+
isSvgMode = true;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
283
376
|
}
|
|
284
377
|
return elm;
|
|
285
378
|
};
|
|
@@ -303,6 +396,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
303
396
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
304
397
|
if ((vnode = vnodes[startIdx])) {
|
|
305
398
|
elm = vnode.$elm$;
|
|
399
|
+
callNodeRefs(vnode);
|
|
306
400
|
// remove the vnode's element from the dom
|
|
307
401
|
elm.remove();
|
|
308
402
|
}
|
|
@@ -386,7 +480,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
386
480
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
387
481
|
const oldChildren = oldVNode.$children$;
|
|
388
482
|
const newChildren = newVNode.$children$;
|
|
389
|
-
|
|
483
|
+
const tag = newVNode.$tag$;
|
|
484
|
+
const text = newVNode.$text$;
|
|
485
|
+
if (text === null) {
|
|
486
|
+
{
|
|
487
|
+
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
488
|
+
// only add this to the when the compiler sees we're using an svg somewhere
|
|
489
|
+
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
490
|
+
}
|
|
390
491
|
// element node
|
|
391
492
|
{
|
|
392
493
|
{
|
|
@@ -401,6 +502,11 @@ const patch = (oldVNode, newVNode) => {
|
|
|
401
502
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
402
503
|
}
|
|
403
504
|
else if (newChildren !== null) {
|
|
505
|
+
// no old child vnodes, but there are new child vnodes to add
|
|
506
|
+
if (oldVNode.$text$ !== null) {
|
|
507
|
+
// the old vnode was text, so be sure to clear it out
|
|
508
|
+
elm.textContent = '';
|
|
509
|
+
}
|
|
404
510
|
// add the new vnode children
|
|
405
511
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
406
512
|
}
|
|
@@ -408,6 +514,20 @@ const patch = (oldVNode, newVNode) => {
|
|
|
408
514
|
// no new child vnodes, but there are old child vnodes to remove
|
|
409
515
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
410
516
|
}
|
|
517
|
+
if (isSvgMode && tag === 'svg') {
|
|
518
|
+
isSvgMode = false;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
else if (oldVNode.$text$ !== text) {
|
|
522
|
+
// update the text content for the text only vnode
|
|
523
|
+
// and also only if the text is different than before
|
|
524
|
+
elm.data = text;
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
const callNodeRefs = (vNode) => {
|
|
528
|
+
{
|
|
529
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
530
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
411
531
|
}
|
|
412
532
|
};
|
|
413
533
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
@@ -540,6 +660,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
540
660
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
541
661
|
const instance = hostRef.$lazyInstance$ ;
|
|
542
662
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
663
|
+
{
|
|
664
|
+
safeCall(instance, 'componentDidRender');
|
|
665
|
+
}
|
|
543
666
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
544
667
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
545
668
|
{
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-14b7b64f.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,13 +1,80 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-14b7b64f.js';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr'];
|
|
5
|
+
const TRANSLATIONS = {
|
|
6
|
+
en: {
|
|
7
|
+
Deposit: 'Deposit',
|
|
8
|
+
Withdraw: 'Withdraw',
|
|
9
|
+
},
|
|
10
|
+
ro: {
|
|
11
|
+
Deposit: 'Depozit',
|
|
12
|
+
Withdraw: 'Retragere',
|
|
13
|
+
},
|
|
14
|
+
fr: {
|
|
15
|
+
Deposit: 'Deposit',
|
|
16
|
+
Withdraw: 'Withdraw',
|
|
17
|
+
},
|
|
18
|
+
hr: {
|
|
19
|
+
Deposit: 'Letét',
|
|
20
|
+
Withdraw: 'Visszavonás',
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const translate = (key, customLang) => {
|
|
24
|
+
const lang = customLang;
|
|
25
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @name isMobile
|
|
30
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
31
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
32
|
+
* @returns {Boolean} true or false
|
|
33
|
+
*/
|
|
34
|
+
const isMobile = (userAgent) => {
|
|
35
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
36
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
37
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
38
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emfe-w-color-gray-300, #58586B);\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n}\n.MenuReturnButton svg {\n fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n padding: 0;\n margin: 0;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";
|
|
4
42
|
|
|
5
43
|
const emptyFunction = () => { };
|
|
6
44
|
const UserDepositWithdrawal = class {
|
|
7
45
|
constructor(hostRef) {
|
|
8
46
|
registerInstance(this, hostRef);
|
|
47
|
+
/**
|
|
48
|
+
* Client custom styling via inline style
|
|
49
|
+
*/
|
|
50
|
+
this.clientStyling = '';
|
|
51
|
+
/**
|
|
52
|
+
* Client custom styling via url
|
|
53
|
+
*/
|
|
54
|
+
this.clientStylingUrl = '';
|
|
9
55
|
this.beforeRedirect = emptyFunction;
|
|
56
|
+
this.limitStylingAppends = false;
|
|
10
57
|
this.bindedHandler = this.handleMessage.bind(this);
|
|
58
|
+
this.userAgent = window.navigator.userAgent;
|
|
59
|
+
this.isMobile = isMobile(this.userAgent);
|
|
60
|
+
this.setClientStyling = () => {
|
|
61
|
+
let sheet = document.createElement('style');
|
|
62
|
+
sheet.innerHTML = this.clientStyling;
|
|
63
|
+
this.stylingContainer.prepend(sheet);
|
|
64
|
+
};
|
|
65
|
+
this.setClientStylingURL = () => {
|
|
66
|
+
let url = new URL(this.clientStylingUrl);
|
|
67
|
+
let cssFile = document.createElement('style');
|
|
68
|
+
fetch(url.href)
|
|
69
|
+
.then((res) => res.text())
|
|
70
|
+
.then((data) => {
|
|
71
|
+
cssFile.innerHTML = data;
|
|
72
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
73
|
+
})
|
|
74
|
+
.catch((err) => {
|
|
75
|
+
console.log('error ', err);
|
|
76
|
+
});
|
|
77
|
+
};
|
|
11
78
|
}
|
|
12
79
|
get typeParameter() {
|
|
13
80
|
if (this.type === 'deposit') {
|
|
@@ -23,14 +90,29 @@ const UserDepositWithdrawal = class {
|
|
|
23
90
|
async componentWillLoad() {
|
|
24
91
|
await this.loadWidget();
|
|
25
92
|
}
|
|
93
|
+
toggleScreen(isMobile) {
|
|
94
|
+
window.postMessage({ type: 'PlayerAccountMenuActive', isMobile }, window.location.href);
|
|
95
|
+
}
|
|
26
96
|
componentDidLoad() {
|
|
27
97
|
window.addEventListener('message', this.bindedHandler, false);
|
|
28
98
|
}
|
|
29
99
|
disconnectedCallback() {
|
|
30
100
|
window.removeEventListener('message', this.bindedHandler, false);
|
|
31
101
|
}
|
|
102
|
+
componentDidRender() {
|
|
103
|
+
// start custom styling area
|
|
104
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
105
|
+
if (this.clientStyling)
|
|
106
|
+
this.setClientStyling();
|
|
107
|
+
if (this.clientStylingUrl)
|
|
108
|
+
this.setClientStylingURL();
|
|
109
|
+
this.limitStylingAppends = true;
|
|
110
|
+
}
|
|
111
|
+
// end custom styling area
|
|
112
|
+
}
|
|
32
113
|
render() {
|
|
33
|
-
return (h(Host, null, h("
|
|
114
|
+
return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "DepositWithdrawalWrapper" }, h("div", null, (this.isMobile &&
|
|
115
|
+
h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, h("defs", null), h("g", { transform: "translate(-20 -158)" }, h("g", { transform: "translate(20 158)" }, h("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language))))), h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl })))));
|
|
34
116
|
}
|
|
35
117
|
async loadWidget() {
|
|
36
118
|
const requestObject = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-14b7b64f.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -21,6 +21,17 @@ export interface RedirectCallbackArgs {
|
|
|
21
21
|
url: string;
|
|
22
22
|
}
|
|
23
23
|
export declare class UserDepositWithdrawal {
|
|
24
|
+
/**
|
|
25
|
+
* Client custom styling via inline style
|
|
26
|
+
*/
|
|
27
|
+
clientStyling: string;
|
|
28
|
+
/**
|
|
29
|
+
* Client custom styling via url
|
|
30
|
+
*/
|
|
31
|
+
clientStylingUrl: string;
|
|
32
|
+
/**
|
|
33
|
+
* Endpoint
|
|
34
|
+
*/
|
|
24
35
|
endpoint: string;
|
|
25
36
|
type: 'deposit' | 'withdraw';
|
|
26
37
|
channel: string;
|
|
@@ -37,13 +48,21 @@ export declare class UserDepositWithdrawal {
|
|
|
37
48
|
depositUrl: string;
|
|
38
49
|
homeUrl: string;
|
|
39
50
|
beforeRedirect: (params: RedirectCallbackArgs) => void;
|
|
51
|
+
private limitStylingAppends;
|
|
40
52
|
get typeParameter(): "Deposit" | "Withdraw";
|
|
41
53
|
private cashierInfoUrl;
|
|
42
54
|
private bindedHandler;
|
|
55
|
+
private userAgent;
|
|
56
|
+
isMobile: boolean;
|
|
57
|
+
private stylingContainer;
|
|
43
58
|
watchLoadWidget(): void;
|
|
44
59
|
componentWillLoad(): Promise<void>;
|
|
60
|
+
toggleScreen(isMobile: any): void;
|
|
45
61
|
componentDidLoad(): void;
|
|
46
62
|
disconnectedCallback(): void;
|
|
63
|
+
setClientStyling: () => void;
|
|
64
|
+
setClientStylingURL: () => void;
|
|
65
|
+
componentDidRender(): void;
|
|
47
66
|
render(): any;
|
|
48
67
|
private loadWidget;
|
|
49
68
|
private handleMessage;
|
|
@@ -12,8 +12,19 @@ export namespace Components {
|
|
|
12
12
|
"cancelUrl": string;
|
|
13
13
|
"casinoUrl": string;
|
|
14
14
|
"channel": string;
|
|
15
|
+
/**
|
|
16
|
+
* Client custom styling via inline style
|
|
17
|
+
*/
|
|
18
|
+
"clientStyling": string;
|
|
19
|
+
/**
|
|
20
|
+
* Client custom styling via url
|
|
21
|
+
*/
|
|
22
|
+
"clientStylingUrl": string;
|
|
15
23
|
"contactUrl": string;
|
|
16
24
|
"depositUrl": string;
|
|
25
|
+
/**
|
|
26
|
+
* Endpoint
|
|
27
|
+
*/
|
|
17
28
|
"endpoint": string;
|
|
18
29
|
"failUrl": string;
|
|
19
30
|
"homeUrl": string;
|
|
@@ -43,8 +54,19 @@ declare namespace LocalJSX {
|
|
|
43
54
|
"cancelUrl"?: string;
|
|
44
55
|
"casinoUrl"?: string;
|
|
45
56
|
"channel": string;
|
|
57
|
+
/**
|
|
58
|
+
* Client custom styling via inline style
|
|
59
|
+
*/
|
|
60
|
+
"clientStyling"?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Client custom styling via url
|
|
63
|
+
*/
|
|
64
|
+
"clientStylingUrl"?: string;
|
|
46
65
|
"contactUrl"?: string;
|
|
47
66
|
"depositUrl"?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Endpoint
|
|
69
|
+
*/
|
|
48
70
|
"endpoint": string;
|
|
49
71
|
"failUrl"?: string;
|
|
50
72
|
"homeUrl"?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const translate: (key: string, customLang?: any) => string;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @name isMobile
|
|
3
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
4
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
5
|
+
* @returns {Boolean} true or false
|
|
6
|
+
*/
|
|
7
|
+
export declare const isMobile: (userAgent: string) => boolean;
|
|
8
|
+
export declare function checkDeviceType(): 'mobile' | 'tablet' | 'desktop';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,H as e}from"./p-3ccd8b8c.js";const s=["ro","en","fr","hr"],n={en:{Deposit:"Deposit",Withdraw:"Withdraw"},ro:{Deposit:"Depozit",Withdraw:"Retragere"},fr:{Deposit:"Deposit",Withdraw:"Withdraw"},hr:{Deposit:"Letét",Withdraw:"Visszavonás"}},o=()=>{},r=class{constructor(i){var e;t(this,i),this.clientStyling="",this.clientStylingUrl="",this.beforeRedirect=o,this.limitStylingAppends=!1,this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((e=this.userAgent).toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))}}get typeParameter(){return"deposit"===this.type?"Deposit":"withdraw"===this.type?"Withdraw":void 0}watchLoadWidget(){this.loadWidget()}async componentWillLoad(){await this.loadWidget()}toggleScreen(t){window.postMessage({type:"PlayerAccountMenuActive",isMobile:t},window.location.href)}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i(e,null,i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"DepositWithdrawalWrapper"},i("div",null,this.isMobile&&i("div",{class:"MenuReturnButton",onClick:()=>this.toggleScreen(this.isMobile)},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},i("defs",null),i("g",{transform:"translate(-20 -158)"},i("g",{transform:"translate(20 158)"},i("path",{class:"aaa",d:"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z",transform:"translate(15 15) rotate(180)"})))),i("h2",{class:"CategoryTitleMobile"},(t=>{const i=this.language;return n[void 0!==i&&s.includes(i)?i:"en"][t]})("Withdraw"===this.typeParameter?"Withdraw":"Deposit")))),i("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}))))}async loadWidget(){const t={Channel:this.channel,Type:this.typeParameter,SuccessUrl:this.successUrl,CancelUrl:this.cancelUrl,FailUrl:this.failUrl,Language:this.language,productType:this.productType};try{const i=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,e=await fetch(i,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const t=await e.text();throw new Error(t)}const s=await e.json();this.cashierInfoUrl=s.CashierInfo.Url}catch(t){console.error(t)}}handleMessage(t){var i,e,s,n,o,r,a;"mm-hcback-to-merchant"===(null===(i=t.data)||void 0===i?void 0:i.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(e=t.data)||void 0===e?void 0:e.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(s=t.data)||void 0===s?void 0:s.redirect)&&this.doRedirect(null===(n=t.data)||void 0===n?void 0:n.redirect,this.sportsUrl),"mm-hc-casino"===(null===(o=t.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(r=t.data)||void 0===r?void 0:r.redirect)&&this.doRedirect(window.location.href,this.contactUrl),"mm-wm-hc-init-deposit"===(null===(a=t.data)||void 0===a?void 0:a.redirect)&&this.doRedirect(window.location.href,this.depositUrl)}doRedirect(t,i){const e={reason:t,url:i,cancel:!1};this.beforeRedirect(e),e.cancel||(window.location.href=e.url?e.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"]}}};r.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emfe-w-color-gray-300, #58586B);\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n}\n.MenuReturnButton svg {\n fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n padding: 0;\n margin: 0;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";export{r as user_deposit_withdrawal}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=new WeakMap,a=e=>"sc-"+e.o,f={},h=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!h(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?p(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=p(e,null);return c.u=t,r.length>0&&(c.h=r),c},p=(e,t)=>({t:0,p:e,i:t,$:null,h:null,u:null}),$={},m=(e,t,n,l,o,i)=>{if(n!==l){let c=V(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=w(n),o=w(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=h(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):V(s,u)?u.slice(2):u[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},y=/\s/,w=e=>e?e.split(y):[],b=(e,t,n,l)=>{const s=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||f,r=t.u||f;for(l in o)l in r||m(s,l,o[l],void 0,n,t.t);for(l in r)m(s,l,o[l],r[l],n,t.t)},g=(t,l,s)=>{let r,i,c=l.h[s],u=0;if(null!==c.i)r=c.$=o.createTextNode(c.i);else{if(n||(n="svg"===c.p),r=c.$=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.p),n&&"foreignObject"===c.p&&(n=!1),b(null,c,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),c.h)for(u=0;u<c.h.length;++u)i=g(t,c,u),i&&r.appendChild(i);"svg"===c.p?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=g(null,l,o),i&&(s[o].$=i,c.insertBefore(i,n)))},j=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.$,M(l),s.remove())},v=(e,t)=>e.p===t.p,O=(e,t)=>{const l=t.$=e.$,s=e.h,o=t.h,r=t.p,i=t.i;null===i?(n="svg"===r||"foreignObject"!==r&&n,b(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],h=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==h?h=l[--a]:v(c,f)?(O(c,f),c=t[++o],f=l[++r]):v(u,h)?(O(u,h),u=t[--i],h=l[--a]):v(c,h)?(O(c,h),e.insertBefore(c.$,u.$.nextSibling),c=t[++o],h=l[--a]):v(u,f)?(O(u,f),e.insertBefore(u.$,c.$),u=t[--i],f=l[++r]):(s=g(t&&t[r],n,r),f=l[++r],s&&c.$.parentNode.insertBefore(s,c.$));o>i?S(e,null==l[a+1]?null:l[a+1].$,n,l,r,a):r>a&&j(t,o,i)})(l,s,t,o):null!==o?(null!==e.i&&(l.textContent=""),S(l,null,t,o,0,o.length-1)):null!==s&&j(s,0,s.length-1),n&&"svg"===r&&(n=!1)):e.i!==i&&(l.data=i)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(M)},k=(e,t)=>{t&&!e.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.m=t)))},C=(e,t)=>{if(e.t|=16,!(4&e.t))return k(e,e.g),Z((()=>x(e,t)));e.t|=512},x=(e,t)=>{const n=e.S;let l;return t&&(l=R(n,"componentWillLoad")),T(l,(()=>L(e,n,t)))},L=async(e,t,n)=>{const l=e.j,s=l["s-rc"];n&&(e=>{const t=e.v,n=e.j,l=t.t,s=((e,t)=>{let n=a(t),l=G.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=u.get(e=e.head||e);s||u.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);P(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>E(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},P=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.v,r=n.O||p(null,null),i=(e=>e&&e.p===$)(l)?l:d(null,null,l);t=s.tagName,o.M&&(i.u=i.u||{},o.M.map((([e,t])=>i.u[t]=s[e]))),i.p=null,i.t|=4,n.O=i,i.$=r.$=s.shadowRoot||s,e=s["s-sc"],O(r,i)})(n,l)}catch(e){_(e,n.j)}return null},E=e=>{const t=e.j,n=e.S,l=e.g;R(n,"componentDidRender"),64&e.t||(e.t|=64,W(t),R(n,"componentDidLoad"),e.k(t),l||N()),e.m&&(e.m(),e.m=void 0),512&e.t&&Y((()=>C(e,!1))),e.t&=-517},N=()=>{W(o.documentElement),Y((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"user-deposit-withdrawal"}});return e.dispatchEvent(t),t})(s)))},R=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){_(e)}},T=(e,t)=>e&&e.then?e.then(t):t(),W=e=>e.classList.add("hydrated"),A=(e,t,n)=>{if(t.C){e.watchers&&(t.L=e.watchers);const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>U(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=U(e),o=s.j,r=s.P.get(t),i=s.t,c=s.S;if(n=((e,t)=>null==e||h(e)?e:1&t?e+"":e)(n,l.C[t][0]),(!(8&i)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(s.P.set(t,n),c)){if(l.L&&128&i){const e=l.L[t];e&&e.map((e=>{try{c[e](n,r,t)}catch(e){_(e,o)}}))}2==(18&i)&&C(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){r.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.M.push([e,s]),s}))}}return e},D=(e,t={})=>{const n=[],l=t.exclude||[],i=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),h=o.createElement("style"),d=[];let p,$=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],C:t[2],N:t[3]};s.C=t[2],s.M=[],s.L={};const o=s.o,u=class extends HTMLElement{constructor(e){super(e),F(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){p&&(clearTimeout(p),p=null),$?d.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=U(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(t,t.g=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=B(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.L=s.watchers,A(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){_(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=a(n);if(!G.has(t)){const l=()=>{};((e,t,n)=>{let l=G.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,G.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>C(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{0==(1&r.t)&&R(U(this).S,"disconnectedCallback")})()))}componentOnReady(){return U(this).R}};s.T=e[0],l.includes(o)||i.get(o)||(n.push(o),i.define(o,A(u,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),u.insertBefore(h,f?f.nextSibling:u.firstChild),$=!1,d.length?d.map((e=>e.connectedCallback())):r.jmp((()=>p=setTimeout(N,30)))},H=new WeakMap,U=e=>H.get(e),q=(e,t)=>H.set(t.S=e,t),F=(e,t)=>{const n={t:0,j:e,v:t,P:new Map};return n.R=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],H.set(e,n)},V=(e,t)=>t in e,_=(e,t)=>(0,console.error)(e,t),z=new Map,B=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(z.set(n,e),e[t])),_)},G=new Map,I=[],J=[],K=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?Y(X):r.raf(X))},Q=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){_(e)}e.length=0},X=()=>{Q(I),Q(J),(l=I.length>0)&&r.raf(X)},Y=e=>i().then(e),Z=K(J,!0);export{$ as H,D as b,d as h,i as p,q as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as l,b as r}from"./p-3ccd8b8c.js";(()=>{const r=import.meta.url,e={};return""!==r&&(e.resourcesUrl=new URL(".",r).href),l(e)})().then((l=>r([["p-02b29406",[[1,"user-deposit-withdrawal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],endpoint:[513],type:[513],channel:[513],language:[513],productType:[513,"product-type"],userId:[513,"user-id"],session:[513],successUrl:[513,"success-url"],cancelUrl:[513,"cancel-url"],failUrl:[513,"fail-url"],sportsUrl:[513,"sports-url"],casinoUrl:[513,"casino-url"],contactUrl:[513,"contact-url"],depositUrl:[513,"deposit-url"],homeUrl:[513,"home-url"],beforeRedirect:[16],limitStylingAppends:[32]}]]]],l)));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as s}from"./p-ed11cb75.js";const o=()=>{},e=class{constructor(i){t(this,i),this.beforeRedirect=o,this.bindedHandler=this.handleMessage.bind(this)}get typeParameter(){return"deposit"===this.type?"Deposit":"withdraw"===this.type?"Withdraw":void 0}watchLoadWidget(){this.loadWidget()}async componentWillLoad(){await this.loadWidget()}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}render(){return i(s,null,i("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}))}async loadWidget(){const t={Channel:this.channel,Type:this.typeParameter,SuccessUrl:this.successUrl,CancelUrl:this.cancelUrl,FailUrl:this.failUrl,Language:this.language,productType:this.productType};try{const i=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,s=await fetch(i,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok){const t=await s.text();throw new Error(t)}const o=await s.json();this.cashierInfoUrl=o.CashierInfo.Url}catch(t){console.error(t)}}handleMessage(t){var i,s,o,e,h,a,n;"mm-hcback-to-merchant"===(null===(i=t.data)||void 0===i?void 0:i.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(s=t.data)||void 0===s?void 0:s.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(o=t.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(null===(e=t.data)||void 0===e?void 0:e.redirect,this.sportsUrl),"mm-hc-casino"===(null===(h=t.data)||void 0===h?void 0:h.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(a=t.data)||void 0===a?void 0:a.redirect)&&this.doRedirect(window.location.href,this.contactUrl),"mm-wm-hc-init-deposit"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&this.doRedirect(window.location.href,this.depositUrl)}doRedirect(t,i){const s={reason:t,url:i,cancel:!1};this.beforeRedirect(s),s.cancel||(window.location.href=s.url?s.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"]}}};e.style=":host{display:block;height:100%;overflow:hidden}";export{e as user_deposit_withdrawal}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let t,e,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},r=t=>Promise.resolve(t),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(t){}return!1})(),c=new WeakMap,a=t=>"sc-"+t.o,u={},f=t=>"object"==(t=typeof t)||"function"===t,d=(t,e,...n)=>{let l=null,s=!1,o=!1,r=[];const i=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?h(null,l):l),o=s)};i(n);const c=h(t,null);return c.u=e,r.length>0&&(c.h=r),c},h=(t,e)=>({t:0,$:t,i:e,m:null,h:null,u:null}),$={},y=(t,e,n,l,s,o)=>{if(n!==l){let r=U(t,e);e.toLowerCase();{const i=f(l);if((r||i&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{let s=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&o||s)&&!i&&t.setAttribute(e,l=!0===l?"":l)}}},m=(t,e,n,l)=>{const s=11===e.m.nodeType&&e.m.host?e.m.host:e.m,o=t&&t.u||u,r=e.u||u;for(l in o)l in r||y(s,l,o[l],void 0,n,e.t);for(l in r)y(s,l,o[l],r[l],n,e.t)},p=(e,n,l)=>{let o,r,i=n.h[l],c=0;if(o=i.m=s.createElement(i.$),m(null,i,!1),null!=t&&o["s-si"]!==t&&o.classList.add(o["s-si"]=t),i.h)for(c=0;c<i.h.length;++c)r=p(e,i,c),r&&o.appendChild(r);return o},w=(t,n,l,s,o,r)=>{let i,c=t;for(c.shadowRoot&&c.tagName===e&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=p(null,l,o),i&&(s[o].m=i,c.insertBefore(i,n)))},b=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.m.remove()},S=(t,e)=>t.$===e.$,g=(t,e)=>{const n=e.m=t.m,l=t.h,s=e.h;m(t,e,!1),null!==l&&null!==s?((t,e,n,l)=>{let s,o=0,r=0,i=e.length-1,c=e[0],a=e[i],u=l.length-1,f=l[0],d=l[u];for(;o<=i&&r<=u;)null==c?c=e[++o]:null==a?a=e[--i]:null==f?f=l[++r]:null==d?d=l[--u]:S(c,f)?(g(c,f),c=e[++o],f=l[++r]):S(a,d)?(g(a,d),a=e[--i],d=l[--u]):S(c,d)?(g(c,d),t.insertBefore(c.m,a.m.nextSibling),c=e[++o],d=l[--u]):S(a,f)?(g(a,f),t.insertBefore(a.m,c.m),a=e[--i],f=l[++r]):(s=p(e&&e[r],n,r),f=l[++r],s&&c.m.parentNode.insertBefore(s,c.m));o>i?w(t,null==l[u+1]?null:l[u+1].m,n,l,r,u):r>u&&b(e,o,i)})(n,l,e,s):null!==s?w(n,null,e,s,0,s.length-1):null!==l&&b(l,0,l.length-1)},M=(t,e)=>{e&&!t.p&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.p=e)))},j=(t,e)=>{if(t.t|=16,!(4&t.t))return M(t,t.S),K((()=>k(t,e)));t.t|=512},k=(t,e)=>{const n=t.g;let l;return e&&(l=P(n,"componentWillLoad")),x(l,(()=>v(t,n,e)))},v=async(t,e,n)=>{const l=t.M,o=l["s-rc"];n&&(t=>{const e=t.j,n=t.M,l=e.t,o=((t,e)=>{let n=a(e),l=V.get(n);if(t=11===t.nodeType?t:s,l)if("string"==typeof l){let e,o=c.get(t=t.head||t);o||c.set(t,o=new Set),o.has(n)||(e=s.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),o&&o.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);C(t,e),o&&(o.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>O(t);0===e.length?n():(Promise.all(e).then(n),t.t|=4,e.length=0)}},C=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.M,o=n.j,r=n.k||h(null,null),i=(t=>t&&t.$===$)(l)?l:d(null,null,l);e=s.tagName,o.v&&(i.u=i.u||{},o.v.map((([t,e])=>i.u[e]=s[t]))),i.$=null,i.t|=4,n.k=i,i.m=r.m=s.shadowRoot||s,t=s["s-sc"],g(r,i)})(n,l)}catch(t){q(t,n.M)}return null},O=t=>{const e=t.M,n=t.g,l=t.S;64&t.t||(t.t|=64,E(e),P(n,"componentDidLoad"),t.C(e),l||L()),t.p&&(t.p(),t.p=void 0),512&t.t&&J((()=>j(t,!1))),t.t&=-517},L=()=>{E(s.documentElement),J((()=>(t=>{const e=o.ce("appload",{detail:{namespace:"user-deposit-withdrawal"}});return t.dispatchEvent(e),e})(l)))},P=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){q(t)}},x=(t,e)=>t&&t.then?t.then(e):e(),E=t=>t.classList.add("hydrated"),N=(t,e,n)=>{if(e.O){t.watchers&&(e.L=t.watchers);const l=Object.entries(e.O),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>A(this).P.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=A(t),o=s.M,r=s.P.get(e),i=s.t,c=s.g;if(n=((t,e)=>null==t||f(t)?t:1&e?t+"":t)(n,l.O[e][0]),(!(8&i)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(s.P.set(e,n),c)){if(l.L&&128&i){const t=l.L[e];t&&t.map((t=>{try{c[t](n,r,e)}catch(t){q(t,o)}}))}2==(18&i)&&j(s,!1)}})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(t,e,l){o.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(s.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,l])=>{const s=l[1]||t;return n.set(s,t),512&l[0]&&e.v.push([t,s]),s}))}}return t},T=(t,e={})=>{const n=[],r=e.exclude||[],c=l.customElements,u=s.head,f=u.querySelector("meta[charset]"),d=s.createElement("style"),h=[];let $,y=!0;Object.assign(o,e),o.l=new URL(e.resourcesUrl||"./",s.baseURI).href,t.map((t=>{t[1].map((e=>{const l={t:e[0],o:e[1],O:e[2],N:e[3]};l.O=e[2],l.v=[],l.L={};const s=l.o,u=class extends HTMLElement{constructor(t){super(t),R(t=this,l),1&l.t&&t.attachShadow({mode:"open"})}connectedCallback(){$&&(clearTimeout($),$=null),y?h.push(this):o.jmp((()=>(t=>{if(0==(1&o.t)){const e=A(t),n=e.j,l=()=>{};if(!(1&e.t)){e.t|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){M(e,e.S=n);break}}n.O&&Object.entries(n.O).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.t)){{if(e.t|=32,(s=F(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(n.L=s.watchers,N(s,n,2),s.isProxied=!0);const t=()=>{};e.t|=8;try{new s(e)}catch(t){q(t)}e.t&=-9,e.t|=128,t()}if(s.style){let t=s.style;const e=a(n);if(!V.has(e)){const l=()=>{};((t,e,n)=>{let l=V.get(t);i&&n?(l=l||new CSSStyleSheet,l.replace(e)):l=e,V.set(t,l)})(e,t,!!(1&n.t)),l()}}}const o=e.S,r=()=>j(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>(()=>{0==(1&o.t)&&P(A(this).g,"disconnectedCallback")})()))}componentOnReady(){return A(this).T}};l.W=t[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,N(u,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),y=!1,h.length?h.map((t=>t.connectedCallback())):o.jmp((()=>$=setTimeout(L,30)))},W=new WeakMap,A=t=>W.get(t),H=(t,e)=>W.set(e.g=t,e),R=(t,e)=>{const n={t:0,M:t,j:e,P:new Map};return n.T=new Promise((t=>n.C=t)),t["s-p"]=[],t["s-rc"]=[],W.set(t,n)},U=(t,e)=>e in t,q=(t,e)=>(0,console.error)(t,e),D=new Map,F=t=>{const e=t.o.replace(/-/g,"_"),n=t.W,l=D.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(D.set(n,t),t[e])),q)},V=new Map,_=[],z=[],B=(t,e)=>l=>{t.push(l),n||(n=!0,e&&4&o.t?J(I):o.raf(I))},G=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){q(t)}t.length=0},I=()=>{G(_),G(z),(n=_.length>0)&&o.raf(I)},J=t=>r().then(t),K=B(z,!0);export{$ as H,T as b,d as h,r as p,H as r}
|