@everymatrix/user-deposit-withdrawal 1.26.0 → 1.26.1
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-b92094b0.js → index-0e9931a1.js} +25 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/user-deposit-withdrawal.cjs.entry.js +14 -3
- package/dist/cjs/user-deposit-withdrawal.cjs.js +2 -2
- package/dist/collection/components/user-deposit-withdrawal/user-deposit-withdrawal.js +35 -3
- package/dist/components/user-deposit-withdrawal.js +16 -3
- package/dist/esm/{index-14b7b64f.js → index-fe945b18.js} +25 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/user-deposit-withdrawal.entry.js +14 -3
- package/dist/esm/user-deposit-withdrawal.js +2 -2
- package/dist/types/components/user-deposit-withdrawal/user-deposit-withdrawal.d.ts +2 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/user-deposit-withdrawal/p-086a6b5a.js +1 -0
- package/dist/user-deposit-withdrawal/p-7e65ac31.entry.js +1 -0
- package/dist/user-deposit-withdrawal/user-deposit-withdrawal.esm.js +1 -1
- package/package.json +1 -1
- package/dist/user-deposit-withdrawal/p-3ccd8b8c.js +0 -1
- package/dist/user-deposit-withdrawal/p-411f236f.entry.js +0 -1
|
@@ -239,6 +239,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
239
239
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
240
240
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
241
241
|
}
|
|
242
|
+
else if (memberName === 'style') {
|
|
243
|
+
// update style attribute, css properties and values
|
|
244
|
+
{
|
|
245
|
+
for (const prop in oldValue) {
|
|
246
|
+
if (!newValue || newValue[prop] == null) {
|
|
247
|
+
if (prop.includes('-')) {
|
|
248
|
+
elm.style.removeProperty(prop);
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
elm.style[prop] = '';
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
for (const prop in newValue) {
|
|
257
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
258
|
+
if (prop.includes('-')) {
|
|
259
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
elm.style[prop] = newValue[prop];
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
242
267
|
else if (memberName === 'ref') {
|
|
243
268
|
// minifier will clean this up
|
|
244
269
|
if (newValue) {
|
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-0e9931a1.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",{"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
|
+
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"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -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-0e9931a1.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr'];
|
|
@@ -56,6 +56,10 @@ const UserDepositWithdrawal = class {
|
|
|
56
56
|
* Client custom styling via url
|
|
57
57
|
*/
|
|
58
58
|
this.clientStylingUrl = '';
|
|
59
|
+
/*
|
|
60
|
+
* State of deposit - short cashier enabled or not
|
|
61
|
+
*/
|
|
62
|
+
this.isShortCashier = 'false';
|
|
59
63
|
this.beforeRedirect = emptyFunction;
|
|
60
64
|
this.limitStylingAppends = false;
|
|
61
65
|
this.bindedHandler = this.handleMessage.bind(this);
|
|
@@ -115,7 +119,7 @@ const UserDepositWithdrawal = class {
|
|
|
115
119
|
// end custom styling area
|
|
116
120
|
}
|
|
117
121
|
render() {
|
|
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 &&
|
|
122
|
+
return (index.h(index.Host, null, index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "DepositWithdrawalWrapper", style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, index.h("div", null, (this.isMobile && !this.isShortCashier &&
|
|
119
123
|
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 })))));
|
|
120
124
|
}
|
|
121
125
|
async loadWidget() {
|
|
@@ -127,6 +131,7 @@ const UserDepositWithdrawal = class {
|
|
|
127
131
|
FailUrl: this.failUrl,
|
|
128
132
|
Language: this.language,
|
|
129
133
|
productType: this.productType,
|
|
134
|
+
isShortCashier: this.isShortCashier
|
|
130
135
|
};
|
|
131
136
|
try {
|
|
132
137
|
const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
|
|
@@ -151,6 +156,9 @@ const UserDepositWithdrawal = class {
|
|
|
151
156
|
}
|
|
152
157
|
handleMessage(message) {
|
|
153
158
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
159
|
+
if (message.data["MMFE:setIFrameHeight"] && this.isShortCashier === 'true') {
|
|
160
|
+
this.dynamicHeight = message.data["MMFE:setIFrameHeight"].toString() + 'px';
|
|
161
|
+
}
|
|
154
162
|
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
|
|
155
163
|
this.doRedirect(message.data.type, this.homeUrl);
|
|
156
164
|
}
|
|
@@ -164,9 +172,11 @@ const UserDepositWithdrawal = class {
|
|
|
164
172
|
this.doRedirect(window.location.href, this.casinoUrl);
|
|
165
173
|
}
|
|
166
174
|
if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
|
|
175
|
+
window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
|
|
167
176
|
this.doRedirect(window.location.href, this.contactUrl);
|
|
168
177
|
}
|
|
169
178
|
if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
|
|
179
|
+
window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
|
|
170
180
|
this.doRedirect(window.location.href, this.depositUrl);
|
|
171
181
|
}
|
|
172
182
|
}
|
|
@@ -184,7 +194,8 @@ const UserDepositWithdrawal = class {
|
|
|
184
194
|
}
|
|
185
195
|
static get watchers() { return {
|
|
186
196
|
"session": ["watchLoadWidget"],
|
|
187
|
-
"userId": ["watchLoadWidget"]
|
|
197
|
+
"userId": ["watchLoadWidget"],
|
|
198
|
+
"isShortCashier": ["watchLoadWidget"]
|
|
188
199
|
}; }
|
|
189
200
|
};
|
|
190
201
|
UserDepositWithdrawal.style = userDepositWithdrawalCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-0e9931a1.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",{"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
|
+
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"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -12,6 +12,10 @@ export class UserDepositWithdrawal {
|
|
|
12
12
|
* Client custom styling via url
|
|
13
13
|
*/
|
|
14
14
|
this.clientStylingUrl = '';
|
|
15
|
+
/*
|
|
16
|
+
* State of deposit - short cashier enabled or not
|
|
17
|
+
*/
|
|
18
|
+
this.isShortCashier = 'false';
|
|
15
19
|
this.beforeRedirect = emptyFunction;
|
|
16
20
|
this.limitStylingAppends = false;
|
|
17
21
|
this.bindedHandler = this.handleMessage.bind(this);
|
|
@@ -73,8 +77,8 @@ export class UserDepositWithdrawal {
|
|
|
73
77
|
render() {
|
|
74
78
|
return (h(Host, null,
|
|
75
79
|
h("div", { ref: el => this.stylingContainer = el },
|
|
76
|
-
h("div", { class: "DepositWithdrawalWrapper" },
|
|
77
|
-
h("div", null, (this.isMobile &&
|
|
80
|
+
h("div", { class: "DepositWithdrawalWrapper", style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } },
|
|
81
|
+
h("div", null, (this.isMobile && !this.isShortCashier &&
|
|
78
82
|
h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) },
|
|
79
83
|
h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" },
|
|
80
84
|
h("defs", null),
|
|
@@ -93,6 +97,7 @@ export class UserDepositWithdrawal {
|
|
|
93
97
|
FailUrl: this.failUrl,
|
|
94
98
|
Language: this.language,
|
|
95
99
|
productType: this.productType,
|
|
100
|
+
isShortCashier: this.isShortCashier
|
|
96
101
|
};
|
|
97
102
|
try {
|
|
98
103
|
const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
|
|
@@ -117,6 +122,9 @@ export class UserDepositWithdrawal {
|
|
|
117
122
|
}
|
|
118
123
|
handleMessage(message) {
|
|
119
124
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
125
|
+
if (message.data["MMFE:setIFrameHeight"] && this.isShortCashier === 'true') {
|
|
126
|
+
this.dynamicHeight = message.data["MMFE:setIFrameHeight"].toString() + 'px';
|
|
127
|
+
}
|
|
120
128
|
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
|
|
121
129
|
this.doRedirect(message.data.type, this.homeUrl);
|
|
122
130
|
}
|
|
@@ -130,9 +138,11 @@ export class UserDepositWithdrawal {
|
|
|
130
138
|
this.doRedirect(window.location.href, this.casinoUrl);
|
|
131
139
|
}
|
|
132
140
|
if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
|
|
141
|
+
window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
|
|
133
142
|
this.doRedirect(window.location.href, this.contactUrl);
|
|
134
143
|
}
|
|
135
144
|
if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
|
|
145
|
+
window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
|
|
136
146
|
this.doRedirect(window.location.href, this.depositUrl);
|
|
137
147
|
}
|
|
138
148
|
}
|
|
@@ -431,6 +441,24 @@ export class UserDepositWithdrawal {
|
|
|
431
441
|
"attribute": "deposit-url",
|
|
432
442
|
"reflect": true
|
|
433
443
|
},
|
|
444
|
+
"isShortCashier": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "string",
|
|
449
|
+
"resolved": "string",
|
|
450
|
+
"references": {}
|
|
451
|
+
},
|
|
452
|
+
"required": false,
|
|
453
|
+
"optional": false,
|
|
454
|
+
"docs": {
|
|
455
|
+
"tags": [],
|
|
456
|
+
"text": ""
|
|
457
|
+
},
|
|
458
|
+
"attribute": "is-short-cashier",
|
|
459
|
+
"reflect": true,
|
|
460
|
+
"defaultValue": "'false'"
|
|
461
|
+
},
|
|
434
462
|
"homeUrl": {
|
|
435
463
|
"type": "string",
|
|
436
464
|
"mutable": false,
|
|
@@ -470,7 +498,8 @@ export class UserDepositWithdrawal {
|
|
|
470
498
|
}
|
|
471
499
|
}; }
|
|
472
500
|
static get states() { return {
|
|
473
|
-
"limitStylingAppends": {}
|
|
501
|
+
"limitStylingAppends": {},
|
|
502
|
+
"dynamicHeight": {}
|
|
474
503
|
}; }
|
|
475
504
|
static get watchers() { return [{
|
|
476
505
|
"propName": "session",
|
|
@@ -478,5 +507,8 @@ export class UserDepositWithdrawal {
|
|
|
478
507
|
}, {
|
|
479
508
|
"propName": "userId",
|
|
480
509
|
"methodName": "watchLoadWidget"
|
|
510
|
+
}, {
|
|
511
|
+
"propName": "isShortCashier",
|
|
512
|
+
"methodName": "watchLoadWidget"
|
|
481
513
|
}]; }
|
|
482
514
|
}
|
|
@@ -54,6 +54,10 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
54
54
|
* Client custom styling via url
|
|
55
55
|
*/
|
|
56
56
|
this.clientStylingUrl = '';
|
|
57
|
+
/*
|
|
58
|
+
* State of deposit - short cashier enabled or not
|
|
59
|
+
*/
|
|
60
|
+
this.isShortCashier = 'false';
|
|
57
61
|
this.beforeRedirect = emptyFunction;
|
|
58
62
|
this.limitStylingAppends = false;
|
|
59
63
|
this.bindedHandler = this.handleMessage.bind(this);
|
|
@@ -113,7 +117,7 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
113
117
|
// end custom styling area
|
|
114
118
|
}
|
|
115
119
|
render() {
|
|
116
|
-
return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "DepositWithdrawalWrapper" }, h("div", null, (this.isMobile &&
|
|
120
|
+
return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "DepositWithdrawalWrapper", style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, h("div", null, (this.isMobile && !this.isShortCashier &&
|
|
117
121
|
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 })))));
|
|
118
122
|
}
|
|
119
123
|
async loadWidget() {
|
|
@@ -125,6 +129,7 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
125
129
|
FailUrl: this.failUrl,
|
|
126
130
|
Language: this.language,
|
|
127
131
|
productType: this.productType,
|
|
132
|
+
isShortCashier: this.isShortCashier
|
|
128
133
|
};
|
|
129
134
|
try {
|
|
130
135
|
const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
|
|
@@ -149,6 +154,9 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
149
154
|
}
|
|
150
155
|
handleMessage(message) {
|
|
151
156
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
157
|
+
if (message.data["MMFE:setIFrameHeight"] && this.isShortCashier === 'true') {
|
|
158
|
+
this.dynamicHeight = message.data["MMFE:setIFrameHeight"].toString() + 'px';
|
|
159
|
+
}
|
|
152
160
|
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
|
|
153
161
|
this.doRedirect(message.data.type, this.homeUrl);
|
|
154
162
|
}
|
|
@@ -162,9 +170,11 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
162
170
|
this.doRedirect(window.location.href, this.casinoUrl);
|
|
163
171
|
}
|
|
164
172
|
if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
|
|
173
|
+
window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
|
|
165
174
|
this.doRedirect(window.location.href, this.contactUrl);
|
|
166
175
|
}
|
|
167
176
|
if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
|
|
177
|
+
window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
|
|
168
178
|
this.doRedirect(window.location.href, this.depositUrl);
|
|
169
179
|
}
|
|
170
180
|
}
|
|
@@ -182,7 +192,8 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
182
192
|
}
|
|
183
193
|
static get watchers() { return {
|
|
184
194
|
"session": ["watchLoadWidget"],
|
|
185
|
-
"userId": ["watchLoadWidget"]
|
|
195
|
+
"userId": ["watchLoadWidget"],
|
|
196
|
+
"isShortCashier": ["watchLoadWidget"]
|
|
186
197
|
}; }
|
|
187
198
|
static get style() { return userDepositWithdrawalCss; }
|
|
188
199
|
}, [1, "user-deposit-withdrawal", {
|
|
@@ -202,9 +213,11 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
202
213
|
"casinoUrl": [513, "casino-url"],
|
|
203
214
|
"contactUrl": [513, "contact-url"],
|
|
204
215
|
"depositUrl": [513, "deposit-url"],
|
|
216
|
+
"isShortCashier": [513, "is-short-cashier"],
|
|
205
217
|
"homeUrl": [513, "home-url"],
|
|
206
218
|
"beforeRedirect": [16],
|
|
207
|
-
"limitStylingAppends": [32]
|
|
219
|
+
"limitStylingAppends": [32],
|
|
220
|
+
"dynamicHeight": [32]
|
|
208
221
|
}]);
|
|
209
222
|
function defineCustomElement$1() {
|
|
210
223
|
if (typeof customElements === "undefined") {
|
|
@@ -217,6 +217,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
217
217
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
218
218
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
219
219
|
}
|
|
220
|
+
else if (memberName === 'style') {
|
|
221
|
+
// update style attribute, css properties and values
|
|
222
|
+
{
|
|
223
|
+
for (const prop in oldValue) {
|
|
224
|
+
if (!newValue || newValue[prop] == null) {
|
|
225
|
+
if (prop.includes('-')) {
|
|
226
|
+
elm.style.removeProperty(prop);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
elm.style[prop] = '';
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
for (const prop in newValue) {
|
|
235
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
236
|
+
if (prop.includes('-')) {
|
|
237
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
elm.style[prop] = newValue[prop];
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
220
245
|
else if (memberName === 'ref') {
|
|
221
246
|
// minifier will clean this up
|
|
222
247
|
if (newValue) {
|
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-fe945b18.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",{"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);
|
|
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"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-fe945b18.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr'];
|
|
@@ -52,6 +52,10 @@ const UserDepositWithdrawal = class {
|
|
|
52
52
|
* Client custom styling via url
|
|
53
53
|
*/
|
|
54
54
|
this.clientStylingUrl = '';
|
|
55
|
+
/*
|
|
56
|
+
* State of deposit - short cashier enabled or not
|
|
57
|
+
*/
|
|
58
|
+
this.isShortCashier = 'false';
|
|
55
59
|
this.beforeRedirect = emptyFunction;
|
|
56
60
|
this.limitStylingAppends = false;
|
|
57
61
|
this.bindedHandler = this.handleMessage.bind(this);
|
|
@@ -111,7 +115,7 @@ const UserDepositWithdrawal = class {
|
|
|
111
115
|
// end custom styling area
|
|
112
116
|
}
|
|
113
117
|
render() {
|
|
114
|
-
return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "DepositWithdrawalWrapper" }, h("div", null, (this.isMobile &&
|
|
118
|
+
return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "DepositWithdrawalWrapper", style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, h("div", null, (this.isMobile && !this.isShortCashier &&
|
|
115
119
|
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 })))));
|
|
116
120
|
}
|
|
117
121
|
async loadWidget() {
|
|
@@ -123,6 +127,7 @@ const UserDepositWithdrawal = class {
|
|
|
123
127
|
FailUrl: this.failUrl,
|
|
124
128
|
Language: this.language,
|
|
125
129
|
productType: this.productType,
|
|
130
|
+
isShortCashier: this.isShortCashier
|
|
126
131
|
};
|
|
127
132
|
try {
|
|
128
133
|
const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
|
|
@@ -147,6 +152,9 @@ const UserDepositWithdrawal = class {
|
|
|
147
152
|
}
|
|
148
153
|
handleMessage(message) {
|
|
149
154
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
155
|
+
if (message.data["MMFE:setIFrameHeight"] && this.isShortCashier === 'true') {
|
|
156
|
+
this.dynamicHeight = message.data["MMFE:setIFrameHeight"].toString() + 'px';
|
|
157
|
+
}
|
|
150
158
|
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
|
|
151
159
|
this.doRedirect(message.data.type, this.homeUrl);
|
|
152
160
|
}
|
|
@@ -160,9 +168,11 @@ const UserDepositWithdrawal = class {
|
|
|
160
168
|
this.doRedirect(window.location.href, this.casinoUrl);
|
|
161
169
|
}
|
|
162
170
|
if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
|
|
171
|
+
window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
|
|
163
172
|
this.doRedirect(window.location.href, this.contactUrl);
|
|
164
173
|
}
|
|
165
174
|
if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
|
|
175
|
+
window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
|
|
166
176
|
this.doRedirect(window.location.href, this.depositUrl);
|
|
167
177
|
}
|
|
168
178
|
}
|
|
@@ -180,7 +190,8 @@ const UserDepositWithdrawal = class {
|
|
|
180
190
|
}
|
|
181
191
|
static get watchers() { return {
|
|
182
192
|
"session": ["watchLoadWidget"],
|
|
183
|
-
"userId": ["watchLoadWidget"]
|
|
193
|
+
"userId": ["watchLoadWidget"],
|
|
194
|
+
"isShortCashier": ["watchLoadWidget"]
|
|
184
195
|
}; }
|
|
185
196
|
};
|
|
186
197
|
UserDepositWithdrawal.style = userDepositWithdrawalCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-fe945b18.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",{"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);
|
|
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"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -46,9 +46,11 @@ export declare class UserDepositWithdrawal {
|
|
|
46
46
|
casinoUrl: string;
|
|
47
47
|
contactUrl: string;
|
|
48
48
|
depositUrl: string;
|
|
49
|
+
isShortCashier: string;
|
|
49
50
|
homeUrl: string;
|
|
50
51
|
beforeRedirect: (params: RedirectCallbackArgs) => void;
|
|
51
52
|
private limitStylingAppends;
|
|
53
|
+
private dynamicHeight;
|
|
52
54
|
get typeParameter(): "Deposit" | "Withdraw";
|
|
53
55
|
private cashierInfoUrl;
|
|
54
56
|
private bindedHandler;
|
|
@@ -28,6 +28,7 @@ export namespace Components {
|
|
|
28
28
|
"endpoint": string;
|
|
29
29
|
"failUrl": string;
|
|
30
30
|
"homeUrl": string;
|
|
31
|
+
"isShortCashier": string;
|
|
31
32
|
"language": string;
|
|
32
33
|
"productType": string;
|
|
33
34
|
"session": string;
|
|
@@ -70,6 +71,7 @@ declare namespace LocalJSX {
|
|
|
70
71
|
"endpoint": string;
|
|
71
72
|
"failUrl"?: string;
|
|
72
73
|
"homeUrl"?: string;
|
|
74
|
+
"isShortCashier"?: string;
|
|
73
75
|
"language"?: string;
|
|
74
76
|
"productType"?: string;
|
|
75
77
|
"session"?: string;
|
|
@@ -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}),$={},y=(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("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}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)}},m=/\s/,w=e=>e?e.split(m):[],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||y(s,l,o[l],void 0,n,t.t);for(l in r)y(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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,H as e}from"./p-086a6b5a.js";const s=["ro","en","fr","hr"],o={en:{Deposit:"Deposit",Withdraw:"Withdraw"},ro:{Deposit:"Depozit",Withdraw:"Retragere"},fr:{Deposit:"Deposit",Withdraw:"Withdraw"},hr:{Deposit:"Letét",Withdraw:"Visszavonás"}},n=()=>{},h=class{constructor(i){var e;t(this,i),this.clientStyling="",this.clientStylingUrl="",this.isShortCashier="false",this.beforeRedirect=n,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",style:{height:this.dynamicHeight,marginTop:this.isShortCashier?"30px":"0"}},i("div",null,this.isMobile&&!this.isShortCashier&&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 o[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,isShortCashier:this.isShortCashier};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,o,n,h,r;t.data["MMFE:setIFrameHeight"]&&"true"===this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setIFrameHeight"].toString()+"px"),"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===(o=t.data)||void 0===o?void 0:o.redirect,this.sportsUrl),"mm-hc-casino"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(h=t.data)||void 0===h?void 0:h.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.contactUrl)),"mm-wm-hc-init-deposit"===(null===(r=t.data)||void 0===r?void 0:r.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),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"],isShortCashier:["watchLoadWidget"]}}};h.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 height: 100vh;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";export{h as user_deposit_withdrawal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as r,b as l}from"./p-086a6b5a.js";(()=>{const l=import.meta.url,e={};return""!==l&&(e.resourcesUrl=new URL(".",l).href),r(e)})().then((r=>l([["p-7e65ac31",[[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"],isShortCashier:[513,"is-short-cashier"],homeUrl:[513,"home-url"],beforeRedirect:[16],limitStylingAppends:[32],dynamicHeight:[32]}]]]],r)));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 height: 100vh;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";export{r as user_deposit_withdrawal}
|