@everymatrix/user-deposit-withdrawal 1.83.6 → 1.83.8

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.
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[516,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"dynamicHeight":[32],"cashierInfoUrl":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
11
+ return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[516,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"forwardCashierRedirects":[516,"forward-cashier-redirects"],"dynamicHeight":[32],"cashierInfoUrl":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -220,6 +220,16 @@ const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n
220
220
  const UserDepositWithdrawalStyle0 = userDepositWithdrawalCss;
221
221
 
222
222
  dayjs.extend(utc);
223
+ const FORWARD_MESSAGE_PREFIX = 'user-deposit-withdrawal';
224
+ const CASHIER_REDIRECT_REASONS = [
225
+ 'mm-hcback-to-merchant',
226
+ 'mm-hc-back-tomerchant',
227
+ 'mm-hc-sports',
228
+ 'mm-hc-casino',
229
+ 'mm-hc-contact',
230
+ 'mm-wm-hc-init-deposit',
231
+ 'mm-wm-hc-init-deposit-quick',
232
+ ];
223
233
  const emptyFunction = () => { };
224
234
  const UserDepositWithdrawal = class {
225
235
  constructor(hostRef) {
@@ -254,6 +264,7 @@ const UserDepositWithdrawal = class {
254
264
  this.isShortCashier = false;
255
265
  this.homeUrl = undefined;
256
266
  this.beforeRedirect = emptyFunction;
267
+ this.forwardCashierRedirects = false;
257
268
  this.dynamicHeight = undefined;
258
269
  this.cashierInfoUrl = undefined;
259
270
  }
@@ -302,7 +313,7 @@ const UserDepositWithdrawal = class {
302
313
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
303
314
  }
304
315
  render() {
305
- return (index.h(index.Host, { key: '4c6783c9cccc65e31901eb8755729147da7c3771' }, index.h("div", { key: 'cceae92ea2c7fb63f2de79e0d8748b7847c67842', ref: el => this.stylingContainer = el, class: "" }, index.h("div", { key: '5171e7159682058314022e47d93d4d20b377d7e1', class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}` }, (!(this.isMobile && !this.isShortCashier) && (index.h("h2", { key: '9d517ae70d3f6a654ffaff66d86d19c4259fa679', class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), index.h("div", { key: '97c991c8a18e44e50307a9bd3de11f446783a630', style: { marginTop: this.isShortCashier ? '30px' : '0' } }, (this.isMobile && !this.isShortCashier ?
316
+ return (index.h(index.Host, { key: '46153b61097691f3a3b2da29aa260edf0688f01c' }, index.h("div", { key: '0082deaaf9c6348cff4010ec8b1f58e5ea26e99b', ref: el => this.stylingContainer = el, class: "" }, index.h("div", { key: '8aec364ea2134d01c2b29fc75136cad08fd5d965', class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}` }, (!(this.isMobile && !this.isShortCashier) && (index.h("h2", { key: '4b0184e2354199332c8438b4430c047982364dff', class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), index.h("div", { key: '49c9dbda82eb6576bc11375371f4359ba0b0285d', style: { marginTop: this.isShortCashier ? '30px' : '0' } }, (this.isMobile && !this.isShortCashier ?
306
317
  index.h("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, 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)))
307
318
  : null)), this.cashierInfoUrl ?
308
319
  index.h("iframe", { width: "100%", allow: "payment", height: this.dynamicHeight, src: this.cashierInfoUrl }) :
@@ -370,38 +381,90 @@ const UserDepositWithdrawal = class {
370
381
  }
371
382
  }
372
383
  handleMessage(message) {
373
- var _a, _b, _c, _d, _e, _f, _g, _h;
374
- if (message.data['MMFE:openFullCashier'] === 'true') {
375
- window.postMessage({ type: 'GoToDeposit' }, window.location.href);
376
- window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
384
+ const payload = this.extractPayload(message);
385
+ if (!payload) {
386
+ return;
377
387
  }
378
- if (message.data["MMFE:setQuickDepositHeight"] && this.isShortCashier) {
379
- this.dynamicHeight = message.data["MMFE:setQuickDepositHeight"].toString() + 'px';
388
+ this.applyLayoutHints(payload);
389
+ const redirectReason = this.extractCashierRedirectReason(payload);
390
+ if (!redirectReason) {
391
+ return;
380
392
  }
381
- if (message.data["MMFE:setIFrameHeight"]) {
382
- this.dynamicHeight = message.data["MMFE:setIFrameHeight"].toString() + 'px';
393
+ if (this.emitForwardedRedirect(message, redirectReason)) {
394
+ return;
383
395
  }
384
- if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
385
- this.doRedirect(message.data.type, this.homeUrl);
396
+ const redirectPlan = this.resolveRedirectPlan(redirectReason);
397
+ if (!redirectPlan) {
398
+ return;
386
399
  }
387
- if (((_b = message.data) === null || _b === void 0 ? void 0 : _b.redirect) === 'mm-hc-back-tomerchant') {
388
- this.doRedirect(message.data.redirect, this.homeUrl);
400
+ this.doRedirect(redirectPlan.reason, redirectPlan.targetUrl);
401
+ }
402
+ extractCashierRedirectReason(data) {
403
+ if (typeof (data === null || data === void 0 ? void 0 : data.type) === 'string' && CASHIER_REDIRECT_REASONS.includes(data.type)) {
404
+ return data.type;
389
405
  }
390
- if (((_c = message.data) === null || _c === void 0 ? void 0 : _c.redirect) === 'mm-hc-sports') {
391
- this.doRedirect((_d = message.data) === null || _d === void 0 ? void 0 : _d.redirect, this.sportsUrl);
406
+ if (typeof (data === null || data === void 0 ? void 0 : data.redirect) === 'string' && CASHIER_REDIRECT_REASONS.includes(data.redirect)) {
407
+ return data.redirect;
392
408
  }
393
- if (((_e = message.data) === null || _e === void 0 ? void 0 : _e.redirect) === 'mm-hc-casino') {
394
- this.doRedirect(window.location.href, this.casinoUrl);
409
+ return undefined;
410
+ }
411
+ extractPayload(message) {
412
+ if (!(message === null || message === void 0 ? void 0 : message.data) || typeof message.data !== 'object') {
413
+ return undefined;
395
414
  }
396
- if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
415
+ return message.data;
416
+ }
417
+ applyLayoutHints(data) {
418
+ if (data['MMFE:openFullCashier'] === 'true') {
419
+ window.postMessage({ type: 'GoToDeposit' }, window.location.href);
397
420
  window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
398
- this.doRedirect(window.location.href, this.contactUrl);
399
421
  }
400
- if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit' || ((_h = message.data) === null || _h === void 0 ? void 0 : _h.redirect) === 'mm-wm-hc-init-deposit-quick') {
401
- window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
402
- this.doRedirect(window.location.href, this.depositUrl);
422
+ if (data['MMFE:setQuickDepositHeight'] && this.isShortCashier) {
423
+ this.dynamicHeight = data['MMFE:setQuickDepositHeight'].toString() + 'px';
424
+ }
425
+ if (data['MMFE:setIFrameHeight']) {
426
+ this.dynamicHeight = data['MMFE:setIFrameHeight'].toString() + 'px';
403
427
  }
404
428
  }
429
+ resolveRedirectPlan(reason) {
430
+ switch (reason) {
431
+ case 'mm-hcback-to-merchant':
432
+ case 'mm-hc-back-tomerchant':
433
+ return this.buildRedirectPlan(reason, this.homeUrl);
434
+ case 'mm-hc-sports':
435
+ return this.buildRedirectPlan(reason, this.sportsUrl);
436
+ case 'mm-hc-casino':
437
+ return this.buildRedirectPlan(window.location.href, this.casinoUrl);
438
+ case 'mm-hc-contact':
439
+ window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
440
+ return this.buildRedirectPlan(window.location.href, this.contactUrl);
441
+ case 'mm-wm-hc-init-deposit':
442
+ case 'mm-wm-hc-init-deposit-quick':
443
+ window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
444
+ return this.buildRedirectPlan(window.location.href, this.depositUrl);
445
+ default:
446
+ return undefined;
447
+ }
448
+ }
449
+ buildRedirectPlan(reason, targetUrl) {
450
+ if (!targetUrl) {
451
+ return undefined;
452
+ }
453
+ return { reason, targetUrl };
454
+ }
455
+ emitForwardedRedirect(message, reason) {
456
+ if (!this.forwardCashierRedirects) {
457
+ return false;
458
+ }
459
+ const forwardedMessage = {
460
+ type: `${FORWARD_MESSAGE_PREFIX}:${reason}`,
461
+ originalType: reason,
462
+ payload: message.data,
463
+ origin: message.origin,
464
+ };
465
+ window.postMessage(forwardedMessage, window.location.href);
466
+ return true;
467
+ }
405
468
  doRedirect(reason, url) {
406
469
  const redirectArgs = { reason, url, cancel: false };
407
470
  this.beforeRedirect(redirectArgs);
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[516,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"dynamicHeight":[32],"cashierInfoUrl":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
22
+ return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[516,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"forwardCashierRedirects":[516,"forward-cashier-redirects"],"dynamicHeight":[32],"cashierInfoUrl":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -5,6 +5,16 @@ import { isMobile } from "../../utils/utils";
5
5
  import dayjs from "dayjs";
6
6
  import utc from "dayjs/plugin/utc";
7
7
  dayjs.extend(utc);
8
+ const FORWARD_MESSAGE_PREFIX = 'user-deposit-withdrawal';
9
+ const CASHIER_REDIRECT_REASONS = [
10
+ 'mm-hcback-to-merchant',
11
+ 'mm-hc-back-tomerchant',
12
+ 'mm-hc-sports',
13
+ 'mm-hc-casino',
14
+ 'mm-hc-contact',
15
+ 'mm-wm-hc-init-deposit',
16
+ 'mm-wm-hc-init-deposit-quick',
17
+ ];
8
18
  const emptyFunction = () => { };
9
19
  export class UserDepositWithdrawal {
10
20
  constructor() {
@@ -38,6 +48,7 @@ export class UserDepositWithdrawal {
38
48
  this.isShortCashier = false;
39
49
  this.homeUrl = undefined;
40
50
  this.beforeRedirect = emptyFunction;
51
+ this.forwardCashierRedirects = false;
41
52
  this.dynamicHeight = undefined;
42
53
  this.cashierInfoUrl = undefined;
43
54
  }
@@ -86,7 +97,7 @@ export class UserDepositWithdrawal {
86
97
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
87
98
  }
88
99
  render() {
89
- return (h(Host, { key: '4c6783c9cccc65e31901eb8755729147da7c3771' }, h("div", { key: 'cceae92ea2c7fb63f2de79e0d8748b7847c67842', ref: el => this.stylingContainer = el, class: "" }, h("div", { key: '5171e7159682058314022e47d93d4d20b377d7e1', class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}` }, (!(this.isMobile && !this.isShortCashier) && (h("h2", { key: '9d517ae70d3f6a654ffaff66d86d19c4259fa679', class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), h("div", { key: '97c991c8a18e44e50307a9bd3de11f446783a630', style: { marginTop: this.isShortCashier ? '30px' : '0' } }, (this.isMobile && !this.isShortCashier ?
100
+ return (h(Host, { key: '46153b61097691f3a3b2da29aa260edf0688f01c' }, h("div", { key: '0082deaaf9c6348cff4010ec8b1f58e5ea26e99b', ref: el => this.stylingContainer = el, class: "" }, h("div", { key: '8aec364ea2134d01c2b29fc75136cad08fd5d965', class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}` }, (!(this.isMobile && !this.isShortCashier) && (h("h2", { key: '4b0184e2354199332c8438b4430c047982364dff', class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), h("div", { key: '49c9dbda82eb6576bc11375371f4359ba0b0285d', style: { marginTop: this.isShortCashier ? '30px' : '0' } }, (this.isMobile && !this.isShortCashier ?
90
101
  h("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, 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)))
91
102
  : null)), this.cashierInfoUrl ?
92
103
  h("iframe", { width: "100%", allow: "payment", height: this.dynamicHeight, src: this.cashierInfoUrl }) :
@@ -154,38 +165,90 @@ export class UserDepositWithdrawal {
154
165
  }
155
166
  }
156
167
  handleMessage(message) {
157
- var _a, _b, _c, _d, _e, _f, _g, _h;
158
- if (message.data['MMFE:openFullCashier'] === 'true') {
159
- window.postMessage({ type: 'GoToDeposit' }, window.location.href);
160
- window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
168
+ const payload = this.extractPayload(message);
169
+ if (!payload) {
170
+ return;
161
171
  }
162
- if (message.data["MMFE:setQuickDepositHeight"] && this.isShortCashier) {
163
- this.dynamicHeight = message.data["MMFE:setQuickDepositHeight"].toString() + 'px';
172
+ this.applyLayoutHints(payload);
173
+ const redirectReason = this.extractCashierRedirectReason(payload);
174
+ if (!redirectReason) {
175
+ return;
164
176
  }
165
- if (message.data["MMFE:setIFrameHeight"]) {
166
- this.dynamicHeight = message.data["MMFE:setIFrameHeight"].toString() + 'px';
177
+ if (this.emitForwardedRedirect(message, redirectReason)) {
178
+ return;
167
179
  }
168
- if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
169
- this.doRedirect(message.data.type, this.homeUrl);
180
+ const redirectPlan = this.resolveRedirectPlan(redirectReason);
181
+ if (!redirectPlan) {
182
+ return;
170
183
  }
171
- if (((_b = message.data) === null || _b === void 0 ? void 0 : _b.redirect) === 'mm-hc-back-tomerchant') {
172
- this.doRedirect(message.data.redirect, this.homeUrl);
184
+ this.doRedirect(redirectPlan.reason, redirectPlan.targetUrl);
185
+ }
186
+ extractCashierRedirectReason(data) {
187
+ if (typeof (data === null || data === void 0 ? void 0 : data.type) === 'string' && CASHIER_REDIRECT_REASONS.includes(data.type)) {
188
+ return data.type;
173
189
  }
174
- if (((_c = message.data) === null || _c === void 0 ? void 0 : _c.redirect) === 'mm-hc-sports') {
175
- this.doRedirect((_d = message.data) === null || _d === void 0 ? void 0 : _d.redirect, this.sportsUrl);
190
+ if (typeof (data === null || data === void 0 ? void 0 : data.redirect) === 'string' && CASHIER_REDIRECT_REASONS.includes(data.redirect)) {
191
+ return data.redirect;
176
192
  }
177
- if (((_e = message.data) === null || _e === void 0 ? void 0 : _e.redirect) === 'mm-hc-casino') {
178
- this.doRedirect(window.location.href, this.casinoUrl);
193
+ return undefined;
194
+ }
195
+ extractPayload(message) {
196
+ if (!(message === null || message === void 0 ? void 0 : message.data) || typeof message.data !== 'object') {
197
+ return undefined;
179
198
  }
180
- if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
199
+ return message.data;
200
+ }
201
+ applyLayoutHints(data) {
202
+ if (data['MMFE:openFullCashier'] === 'true') {
203
+ window.postMessage({ type: 'GoToDeposit' }, window.location.href);
181
204
  window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
182
- this.doRedirect(window.location.href, this.contactUrl);
183
205
  }
184
- if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit' || ((_h = message.data) === null || _h === void 0 ? void 0 : _h.redirect) === 'mm-wm-hc-init-deposit-quick') {
185
- window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
186
- this.doRedirect(window.location.href, this.depositUrl);
206
+ if (data['MMFE:setQuickDepositHeight'] && this.isShortCashier) {
207
+ this.dynamicHeight = data['MMFE:setQuickDepositHeight'].toString() + 'px';
208
+ }
209
+ if (data['MMFE:setIFrameHeight']) {
210
+ this.dynamicHeight = data['MMFE:setIFrameHeight'].toString() + 'px';
211
+ }
212
+ }
213
+ resolveRedirectPlan(reason) {
214
+ switch (reason) {
215
+ case 'mm-hcback-to-merchant':
216
+ case 'mm-hc-back-tomerchant':
217
+ return this.buildRedirectPlan(reason, this.homeUrl);
218
+ case 'mm-hc-sports':
219
+ return this.buildRedirectPlan(reason, this.sportsUrl);
220
+ case 'mm-hc-casino':
221
+ return this.buildRedirectPlan(window.location.href, this.casinoUrl);
222
+ case 'mm-hc-contact':
223
+ window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
224
+ return this.buildRedirectPlan(window.location.href, this.contactUrl);
225
+ case 'mm-wm-hc-init-deposit':
226
+ case 'mm-wm-hc-init-deposit-quick':
227
+ window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
228
+ return this.buildRedirectPlan(window.location.href, this.depositUrl);
229
+ default:
230
+ return undefined;
187
231
  }
188
232
  }
233
+ buildRedirectPlan(reason, targetUrl) {
234
+ if (!targetUrl) {
235
+ return undefined;
236
+ }
237
+ return { reason, targetUrl };
238
+ }
239
+ emitForwardedRedirect(message, reason) {
240
+ if (!this.forwardCashierRedirects) {
241
+ return false;
242
+ }
243
+ const forwardedMessage = {
244
+ type: `${FORWARD_MESSAGE_PREFIX}:${reason}`,
245
+ originalType: reason,
246
+ payload: message.data,
247
+ origin: message.origin,
248
+ };
249
+ window.postMessage(forwardedMessage, window.location.href);
250
+ return true;
251
+ }
189
252
  doRedirect(reason, url) {
190
253
  const redirectArgs = { reason, url, cancel: false };
191
254
  this.beforeRedirect(redirectArgs);
@@ -614,6 +677,24 @@ export class UserDepositWithdrawal {
614
677
  "text": ""
615
678
  },
616
679
  "defaultValue": "emptyFunction"
680
+ },
681
+ "forwardCashierRedirects": {
682
+ "type": "boolean",
683
+ "mutable": false,
684
+ "complexType": {
685
+ "original": "boolean",
686
+ "resolved": "boolean",
687
+ "references": {}
688
+ },
689
+ "required": false,
690
+ "optional": false,
691
+ "docs": {
692
+ "tags": [],
693
+ "text": ""
694
+ },
695
+ "attribute": "forward-cashier-redirects",
696
+ "reflect": true,
697
+ "defaultValue": "false"
617
698
  }
618
699
  };
619
700
  }
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[516,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"dynamicHeight":[32],"cashierInfoUrl":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
8
+ return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[516,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"forwardCashierRedirects":[516,"forward-cashier-redirects"],"dynamicHeight":[32],"cashierInfoUrl":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -216,6 +216,16 @@ const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n
216
216
  const UserDepositWithdrawalStyle0 = userDepositWithdrawalCss;
217
217
 
218
218
  dayjs.extend(utc);
219
+ const FORWARD_MESSAGE_PREFIX = 'user-deposit-withdrawal';
220
+ const CASHIER_REDIRECT_REASONS = [
221
+ 'mm-hcback-to-merchant',
222
+ 'mm-hc-back-tomerchant',
223
+ 'mm-hc-sports',
224
+ 'mm-hc-casino',
225
+ 'mm-hc-contact',
226
+ 'mm-wm-hc-init-deposit',
227
+ 'mm-wm-hc-init-deposit-quick',
228
+ ];
219
229
  const emptyFunction = () => { };
220
230
  const UserDepositWithdrawal = class {
221
231
  constructor(hostRef) {
@@ -250,6 +260,7 @@ const UserDepositWithdrawal = class {
250
260
  this.isShortCashier = false;
251
261
  this.homeUrl = undefined;
252
262
  this.beforeRedirect = emptyFunction;
263
+ this.forwardCashierRedirects = false;
253
264
  this.dynamicHeight = undefined;
254
265
  this.cashierInfoUrl = undefined;
255
266
  }
@@ -298,7 +309,7 @@ const UserDepositWithdrawal = class {
298
309
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
299
310
  }
300
311
  render() {
301
- return (h(Host, { key: '4c6783c9cccc65e31901eb8755729147da7c3771' }, h("div", { key: 'cceae92ea2c7fb63f2de79e0d8748b7847c67842', ref: el => this.stylingContainer = el, class: "" }, h("div", { key: '5171e7159682058314022e47d93d4d20b377d7e1', class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}` }, (!(this.isMobile && !this.isShortCashier) && (h("h2", { key: '9d517ae70d3f6a654ffaff66d86d19c4259fa679', class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), h("div", { key: '97c991c8a18e44e50307a9bd3de11f446783a630', style: { marginTop: this.isShortCashier ? '30px' : '0' } }, (this.isMobile && !this.isShortCashier ?
312
+ return (h(Host, { key: '46153b61097691f3a3b2da29aa260edf0688f01c' }, h("div", { key: '0082deaaf9c6348cff4010ec8b1f58e5ea26e99b', ref: el => this.stylingContainer = el, class: "" }, h("div", { key: '8aec364ea2134d01c2b29fc75136cad08fd5d965', class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}` }, (!(this.isMobile && !this.isShortCashier) && (h("h2", { key: '4b0184e2354199332c8438b4430c047982364dff', class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), h("div", { key: '49c9dbda82eb6576bc11375371f4359ba0b0285d', style: { marginTop: this.isShortCashier ? '30px' : '0' } }, (this.isMobile && !this.isShortCashier ?
302
313
  h("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, 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)))
303
314
  : null)), this.cashierInfoUrl ?
304
315
  h("iframe", { width: "100%", allow: "payment", height: this.dynamicHeight, src: this.cashierInfoUrl }) :
@@ -366,38 +377,90 @@ const UserDepositWithdrawal = class {
366
377
  }
367
378
  }
368
379
  handleMessage(message) {
369
- var _a, _b, _c, _d, _e, _f, _g, _h;
370
- if (message.data['MMFE:openFullCashier'] === 'true') {
371
- window.postMessage({ type: 'GoToDeposit' }, window.location.href);
372
- window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
380
+ const payload = this.extractPayload(message);
381
+ if (!payload) {
382
+ return;
373
383
  }
374
- if (message.data["MMFE:setQuickDepositHeight"] && this.isShortCashier) {
375
- this.dynamicHeight = message.data["MMFE:setQuickDepositHeight"].toString() + 'px';
384
+ this.applyLayoutHints(payload);
385
+ const redirectReason = this.extractCashierRedirectReason(payload);
386
+ if (!redirectReason) {
387
+ return;
376
388
  }
377
- if (message.data["MMFE:setIFrameHeight"]) {
378
- this.dynamicHeight = message.data["MMFE:setIFrameHeight"].toString() + 'px';
389
+ if (this.emitForwardedRedirect(message, redirectReason)) {
390
+ return;
379
391
  }
380
- if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
381
- this.doRedirect(message.data.type, this.homeUrl);
392
+ const redirectPlan = this.resolveRedirectPlan(redirectReason);
393
+ if (!redirectPlan) {
394
+ return;
382
395
  }
383
- if (((_b = message.data) === null || _b === void 0 ? void 0 : _b.redirect) === 'mm-hc-back-tomerchant') {
384
- this.doRedirect(message.data.redirect, this.homeUrl);
396
+ this.doRedirect(redirectPlan.reason, redirectPlan.targetUrl);
397
+ }
398
+ extractCashierRedirectReason(data) {
399
+ if (typeof (data === null || data === void 0 ? void 0 : data.type) === 'string' && CASHIER_REDIRECT_REASONS.includes(data.type)) {
400
+ return data.type;
385
401
  }
386
- if (((_c = message.data) === null || _c === void 0 ? void 0 : _c.redirect) === 'mm-hc-sports') {
387
- this.doRedirect((_d = message.data) === null || _d === void 0 ? void 0 : _d.redirect, this.sportsUrl);
402
+ if (typeof (data === null || data === void 0 ? void 0 : data.redirect) === 'string' && CASHIER_REDIRECT_REASONS.includes(data.redirect)) {
403
+ return data.redirect;
388
404
  }
389
- if (((_e = message.data) === null || _e === void 0 ? void 0 : _e.redirect) === 'mm-hc-casino') {
390
- this.doRedirect(window.location.href, this.casinoUrl);
405
+ return undefined;
406
+ }
407
+ extractPayload(message) {
408
+ if (!(message === null || message === void 0 ? void 0 : message.data) || typeof message.data !== 'object') {
409
+ return undefined;
391
410
  }
392
- if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
411
+ return message.data;
412
+ }
413
+ applyLayoutHints(data) {
414
+ if (data['MMFE:openFullCashier'] === 'true') {
415
+ window.postMessage({ type: 'GoToDeposit' }, window.location.href);
393
416
  window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
394
- this.doRedirect(window.location.href, this.contactUrl);
395
417
  }
396
- if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit' || ((_h = message.data) === null || _h === void 0 ? void 0 : _h.redirect) === 'mm-wm-hc-init-deposit-quick') {
397
- window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
398
- this.doRedirect(window.location.href, this.depositUrl);
418
+ if (data['MMFE:setQuickDepositHeight'] && this.isShortCashier) {
419
+ this.dynamicHeight = data['MMFE:setQuickDepositHeight'].toString() + 'px';
420
+ }
421
+ if (data['MMFE:setIFrameHeight']) {
422
+ this.dynamicHeight = data['MMFE:setIFrameHeight'].toString() + 'px';
399
423
  }
400
424
  }
425
+ resolveRedirectPlan(reason) {
426
+ switch (reason) {
427
+ case 'mm-hcback-to-merchant':
428
+ case 'mm-hc-back-tomerchant':
429
+ return this.buildRedirectPlan(reason, this.homeUrl);
430
+ case 'mm-hc-sports':
431
+ return this.buildRedirectPlan(reason, this.sportsUrl);
432
+ case 'mm-hc-casino':
433
+ return this.buildRedirectPlan(window.location.href, this.casinoUrl);
434
+ case 'mm-hc-contact':
435
+ window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
436
+ return this.buildRedirectPlan(window.location.href, this.contactUrl);
437
+ case 'mm-wm-hc-init-deposit':
438
+ case 'mm-wm-hc-init-deposit-quick':
439
+ window.postMessage({ type: 'CloseShortCashier' }, window.location.href);
440
+ return this.buildRedirectPlan(window.location.href, this.depositUrl);
441
+ default:
442
+ return undefined;
443
+ }
444
+ }
445
+ buildRedirectPlan(reason, targetUrl) {
446
+ if (!targetUrl) {
447
+ return undefined;
448
+ }
449
+ return { reason, targetUrl };
450
+ }
451
+ emitForwardedRedirect(message, reason) {
452
+ if (!this.forwardCashierRedirects) {
453
+ return false;
454
+ }
455
+ const forwardedMessage = {
456
+ type: `${FORWARD_MESSAGE_PREFIX}:${reason}`,
457
+ originalType: reason,
458
+ payload: message.data,
459
+ origin: message.origin,
460
+ };
461
+ window.postMessage(forwardedMessage, window.location.href);
462
+ return true;
463
+ }
401
464
  doRedirect(reason, url) {
402
465
  const redirectArgs = { reason, url, cancel: false };
403
466
  this.beforeRedirect(redirectArgs);
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[516,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"dynamicHeight":[32],"cashierInfoUrl":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
19
+ return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-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"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[516,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"forwardCashierRedirects":[516,"forward-cashier-redirects"],"dynamicHeight":[32],"cashierInfoUrl":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
20
20
  });
@@ -1 +1,2 @@
1
1
  export { UserDepositWithdrawal } from './user-deposit-withdrawal';
2
+ export type { CashierRedirectForwardedMessage } from './user-deposit-withdrawal';
@@ -1,3 +1,13 @@
1
+ declare const FORWARD_MESSAGE_PREFIX: "user-deposit-withdrawal";
2
+ declare const CASHIER_REDIRECT_REASONS: readonly ["mm-hcback-to-merchant", "mm-hc-back-tomerchant", "mm-hc-sports", "mm-hc-casino", "mm-hc-contact", "mm-wm-hc-init-deposit", "mm-wm-hc-init-deposit-quick"];
3
+ type CashierRedirectReason = typeof CASHIER_REDIRECT_REASONS[number];
4
+ type ForwardedCashierMessageType = `${typeof FORWARD_MESSAGE_PREFIX}:${CashierRedirectReason}`;
5
+ export interface CashierRedirectForwardedMessage<T = unknown> {
6
+ type: ForwardedCashierMessageType;
7
+ originalType: CashierRedirectReason;
8
+ payload: T;
9
+ origin: string;
10
+ }
1
11
  export interface Request {
2
12
  Channel: string;
3
13
  Type: string;
@@ -59,6 +69,7 @@ export declare class UserDepositWithdrawal {
59
69
  isShortCashier: boolean;
60
70
  homeUrl: string;
61
71
  beforeRedirect: (params: RedirectCallbackArgs) => void;
72
+ forwardCashierRedirects: boolean;
62
73
  private dynamicHeight;
63
74
  private cashierInfoUrl;
64
75
  get typeParameter(): "Deposit" | "Withdraw";
@@ -77,5 +88,12 @@ export declare class UserDepositWithdrawal {
77
88
  render(): any;
78
89
  private loadWidget;
79
90
  private handleMessage;
91
+ private extractCashierRedirectReason;
92
+ private extractPayload;
93
+ private applyLayoutHints;
94
+ private resolveRedirectPlan;
95
+ private buildRedirectPlan;
96
+ private emitForwardedRedirect;
80
97
  private doRedirect;
81
98
  }
99
+ export {};
@@ -29,6 +29,7 @@ export namespace Components {
29
29
  */
30
30
  "endpoint": string;
31
31
  "failUrl": string;
32
+ "forwardCashierRedirects": boolean;
32
33
  "homeUrl": string;
33
34
  "isShortCashier": boolean;
34
35
  "language": string;
@@ -82,6 +83,7 @@ declare namespace LocalJSX {
82
83
  */
83
84
  "endpoint": string;
84
85
  "failUrl"?: string;
86
+ "forwardCashierRedirects"?: boolean;
85
87
  "homeUrl"?: string;
86
88
  "isShortCashier"?: boolean;
87
89
  "language"?: string;
@@ -1 +1 @@
1
- import{r as e,h as t,H as r}from"./index-1ef3a64c.js";const n=["ro","en","fr","hr","en-us","es-mx","pt-br","es","de","pt","tr"],i={en:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Please be informed that currently you are not allowed to initiate deposit transactions.",denyWithdrawal:"Please be informed that currently you are not allowed to initiate withdrawal transactions.",notFoundErrorCode:"Not found error code",errorCode21121:"Dear Player! Please be informed that currently you are allowed to initiate only withdrawal transactions from your player account. Error Code: 21121",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},"en-us":{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Please be informed that currently you are not allowed to initiate deposit transactions.",denyWithdrawal:"Please be informed that currently you are not allowed to initiate withdrawal transactions.",notFoundErrorCode:"Not found error code",errorCode21121:"Dear Player! Please be informed that currently you are allowed to initiate only withdrawal transactions from your player account. Error Code: 21121",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},ro:{Deposit:"Depunere",Withdraw:"Retragere",denyDeposit:"Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de depunere.",denyWithdrawal:"Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de retragere.",notFoundErrorCode:"Cod de eroare negăsit",errorCode21122:"Stimate jucător! Vă informăm că în prezent nu aveți permisiunea de a iniția o tranzacție de retragere din contul dvs. de jucător. Cod de eroare: 21122",errorCode21123:"Stimate jucător! Vă informăm că în prezent nu aveți permisiunea de a efectua o depunere în contul dvs. de jucător. Cod de eroare: 21123"},fr:{Deposit:"Dépôt",Withdraw:"Retrait",denyDeposit:"Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier des transactions de dépôt.",denyWithdrawal:"Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier des transactions de retrait.",notFoundErrorCode:"Code d’erreur introuvable",errorCode21122:"Cher joueur ! Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier une transaction de retrait depuis votre compte joueur. Code d’erreur : 21122",errorCode21123:"Cher joueur ! Veuillez noter qu’actuellement vous n’êtes pas autorisé à effectuer un dépôt sur votre compte joueur. Code d’erreur : 21123"},hr:{Deposit:"Uplata",Withdraw:"Isplata",denyDeposit:"Obavještavamo Vas da trenutno nemate mogućnost uplata.",denyWithdrawal:"Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.",notFoundErrorCode:"Not found error code",errorCode21122:"Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122",errorCode21123:"Poštovani, trenutno nije moguće izvršiti uplatu na Vaš račun. Error Code:21123"},de:{Deposit:"Einzahlung",Withdraw:"Abhebung",denyDeposit:"Bitte beachten Sie, dass Sie derzeit keine Einzahlungs-Transaktionen durchführen dürfen.",denyWithdrawal:"Bitte beachten Sie, dass Sie derzeit keine Abhebungs-Transaktionen durchführen dürfen.",notFoundErrorCode:"Fehlercode nicht gefunden",errorCode21122:"Sehr geehrter Spieler! Bitte beachten Sie, dass Sie derzeit keine Abhebung von Ihrem Spielerkonto durchführen dürfen. Fehlercode: 21122",errorCode21123:"Sehr geehrter Spieler! Bitte beachten Sie, dass Sie derzeit keine Einzahlung auf Ihr Spielerkonto durchführen dürfen. Fehlercode: 21123"},es:{Deposit:"Depósito",Withdraw:"Retiro",denyDeposit:"Le informamos que actualmente no tiene permitido iniciar transacciones de depósito.",denyWithdrawal:"Le informamos que actualmente no tiene permitido iniciar transacciones de retiro.",notFoundErrorCode:"Código de error no encontrado",errorCode21122:"¡Estimado jugador! Le informamos que actualmente no tiene permitido iniciar una transacción de retiro desde su cuenta de jugador. Código de error: 21122",errorCode21123:"¡Estimado jugador! Le informamos que actualmente no tiene permitido realizar un depósito en su cuenta de jugador. Código de error: 21123"},pt:{Deposit:"Depósito",Withdraw:"Levantamento",denyDeposit:"Informamos que atualmente não tem permissão para iniciar transações de depósito.",denyWithdrawal:"Informamos que atualmente não tem permissão para iniciar transações de levantamento.",notFoundErrorCode:"Código de erro não encontrado",errorCode21122:"Caro jogador! Informamos que atualmente não tem permissão para iniciar uma transação de levantamento na sua conta de jogador. Código de erro: 21122",errorCode21123:"Caro jogador! Informamos que atualmente não tem permissão para realizar um depósito na sua conta de jogador. Código de erro: 21123"},"es-mx":{Deposit:"Depósito",Withdraw:"Retiro",denyDeposit:"Le informamos que actualmente no tiene permitido iniciar transacciones de depósito.",denyWithdrawal:"Le informamos que actualmente no tiene permitido iniciar transacciones de retiro.",notFoundErrorCode:"Código de error no encontrado",errorCode21122:"¡Estimado jugador! Le informamos que actualmente no tiene permitido iniciar una transacción de retiro desde su cuenta de jugador. Código de error: 21122",errorCode21123:"¡Estimado jugador! Le informamos que actualmente no tiene permitido realizar un depósito en su cuenta de jugador. Código de error: 21123"},"pt-br":{Deposit:"Depósito",Withdraw:"Saque",denyDeposit:"Informamos que atualmente você não tem permissão para iniciar transações de depósito.",denyWithdrawal:"Informamos que atualmente você não tem permissão para iniciar transações de saque.",notFoundErrorCode:"Código de erro não encontrado",errorCode21122:"Caro jogador! Informamos que atualmente você não tem permissão para iniciar uma transação de saque em sua conta de jogador. Código de erro: 21122",errorCode21123:"Caro jogador! Informamos que atualmente você não tem permissão para realizar um depósito em sua conta de jogador. Código de erro: 21123"},tr:{Deposit:"Para Yatırma",Withdraw:"Para Çekme",denyDeposit:"Lütfen şu anda para yatırma işlemi başlatamayacağınızı bilgilerinize sunarız.",denyWithdrawal:"Lütfen şu anda para çekme işlemi başlatamayacağınızı bilgilerinize sunarız.",notFoundErrorCode:"Hata kodu bulunamadı",errorCode21122:"Değerli oyuncumuz! Lütfen şu anda oyuncu hesabınızdan para çekme işlemi başlatamayacağınızı bilgilerinize sunarız. Hata Kodu: 21122",errorCode21123:"Değerli oyuncumuz! Lütfen şu anda oyuncu hesabınıza para yatırma işlemi yapamayacağınızı bilgilerinize sunarız. Hata Kodu: 21123"}},o=(e,t)=>{const r=t;return i[void 0!==r&&n.includes(r)?r:"en"][e]};function a(e,t){if(e){const r=document.createElement("style");r.innerHTML=t,e.appendChild(r)}}function s(e,t){const r=new URL(t);fetch(r.href).then((e=>e.text())).then((t=>{const r=document.createElement("style");r.innerHTML=t,e&&e.appendChild(r)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var d={exports:{}};d.exports=function(){var e=6e4,t=36e5,r="millisecond",n="second",i="minute",o="hour",a="day",s="week",d="month",u="quarter",h="year",c="date",l="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},w=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:w,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+w(n,2,"0")+":"+w(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,d),o=r-i<0,a=t.clone().add(n+(o?-1:1),d);return+(-(n+(r-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:d,y:h,w:s,d:a,D:c,h:o,m:i,s:n,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",g={};g[v]=f;var C="$isDayjsObject",b=function(e){return e instanceof W||!(!e||!e[C])},D=function e(t,r,n){var i;if(!t)return v;if("string"==typeof t){var o=t.toLowerCase();g[o]&&(i=o),r&&(g[o]=r,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;g[s]=t,i=s}return!n&&i&&(v=i),i||!n&&v},S=function(e,t){if(b(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new W(r)},M=y;M.l=D,M.i=b,M.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var W=function(){function f(e){this.$L=D(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[C]=!0}var w=f.prototype;return w.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.init()},w.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},w.$utils=function(){return M},w.isValid=function(){return!(this.$d.toString()===l)},w.isSame=function(e,t){var r=S(e);return this.startOf(t)<=r&&r<=this.endOf(t)},w.isAfter=function(e,t){return S(e)<this.startOf(t)},w.isBefore=function(e,t){return this.endOf(t)<S(e)},w.$g=function(e,t,r){return M.u(e)?this[t]:this.set(r,e)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(e,t){var r=this,u=!!M.u(t)||t,l=M.p(e),m=function(e,t){var n=M.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return u?n:n.endOf(a)},p=function(e,t){return M.w(r.toDate()[e].apply(r.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},f=this.$W,w=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(l){case h:return u?m(1,0):m(31,11);case d:return u?m(1,w):m(0,w+1);case s:var g=this.$locale().weekStart||0,C=(f<g?f+7:f)-g;return m(u?y-C:y+(6-C),w);case a:case c:return p(v+"Hours",0);case o:return p(v+"Minutes",1);case i:return p(v+"Seconds",2);case n:return p(v+"Milliseconds",3);default:return this.clone()}},w.endOf=function(e){return this.startOf(e,!1)},w.$set=function(e,t){var s,u=M.p(e),l="set"+(this.$u?"UTC":""),m=(s={},s[a]=l+"Date",s[c]=l+"Date",s[d]=l+"Month",s[h]=l+"FullYear",s[o]=l+"Hours",s[i]=l+"Minutes",s[n]=l+"Seconds",s[r]=l+"Milliseconds",s)[u],p=u===a?this.$D+(t-this.$W):t;if(u===d||u===h){var f=this.clone().set(c,1);f.$d[m](p),f.init(),this.$d=f.set(c,Math.min(this.$D,f.daysInMonth())).$d}else m&&this.$d[m](p);return this.init(),this},w.set=function(e,t){return this.clone().$set(e,t)},w.get=function(e){return this[M.p(e)]()},w.add=function(r,u){var c,l=this;r=Number(r);var m=M.p(u),p=function(e){var t=S(l);return M.w(t.date(t.date()+Math.round(e*r)),l)};if(m===d)return this.set(d,this.$M+r);if(m===h)return this.set(h,this.$y+r);if(m===a)return p(1);if(m===s)return p(7);var f=(c={},c[i]=e,c[o]=t,c[n]=1e3,c)[m]||1,w=this.$d.getTime()+r*f;return M.w(w,this)},w.subtract=function(e,t){return this.add(-1*e,t)},w.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=M.z(this),o=this.$H,a=this.$m,s=this.$M,d=r.weekdays,u=r.months,h=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].slice(0,o)},c=function(e){return M.s(o%12||12,e,"0")},m=r.meridiem||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(p,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return s+1;case"MM":return M.s(s+1,2,"0");case"MMM":return h(r.monthsShort,s,u,3);case"MMMM":return h(u,s);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,d,2);case"ddd":return h(r.weekdaysShort,t.$W,d,3);case"dddd":return d[t.$W];case"H":return String(o);case"HH":return M.s(o,2,"0");case"h":return c(1);case"hh":return c(2);case"a":return m(o,a,!0);case"A":return m(o,a,!1);case"m":return String(a);case"mm":return M.s(a,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(r,c,l){var m,p=this,f=M.p(c),w=S(r),y=(w.utcOffset()-this.utcOffset())*e,v=this-w,g=function(){return M.m(p,w)};switch(f){case h:m=g()/12;break;case d:m=g();break;case u:m=g()/3;break;case s:m=(v-y)/6048e5;break;case a:m=(v-y)/864e5;break;case o:m=v/t;break;case i:m=v/e;break;case n:m=v/1e3;break;default:m=v}return l?m:M.a(m)},w.daysInMonth=function(){return this.endOf(d).$D},w.$locale=function(){return g[this.$L]},w.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=D(e,t,!0);return n&&(r.$L=n),r},w.clone=function(){return M.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},f}(),z=W.prototype;return S.prototype=z,[["$ms",r],["$s",n],["$m",i],["$H",o],["$W",a],["$M",d],["$y",h],["$D",c]].forEach((function(e){z[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,W,S),e.$i=!0),S},S.locale=D,S.isDayjs=b,S.unix=function(e){return S(1e3*e)},S.en=g[v],S.Ls=g,S.p={},S}();const u=d.exports;var h,c,l,m={exports:{}};m.exports=(h="minute",c=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g,function(e,t,r){var n=t.prototype;r.utc=function(e){return new t({date:e,utc:!0,args:arguments})},n.utc=function(e){var t=r(this.toDate(),{locale:this.$L,utc:!0});return e?t.add(this.utcOffset(),h):t},n.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var i=n.parse;n.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),i.call(this,e)};var o=n.init;n.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else o.call(this)};var a=n.utcOffset;n.utcOffset=function(e,t){var r=this.$utils().u;if(r(e))return this.$u?0:r(this.$offset)?a.call(this):this.$offset;if("string"==typeof e&&(e=function(e){void 0===e&&(e="");var t=e.match(c);if(!t)return null;var r=(""+t[0]).match(l)||["-",0,0],n=60*+r[1]+ +r[2];return 0===n?0:"+"===r[0]?n:-n}(e),null===e))return this;var n=Math.abs(e)<=16?60*e:e,i=this;if(t)return i.$offset=n,i.$u=0===e,i;if(0!==e){var o=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(i=this.local().add(n+o,h)).$offset=n,i.$x.$localOffset=o}else i=this.utc();return i};var s=n.format;n.format=function(e){return s.call(this,e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":""))},n.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var d=n.toDate;n.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var u=n.diff;n.diff=function(e,t,n){if(e&&this.$u===e.$u)return u.call(this,e,t,n);var i=this.local(),o=r(e).local();return u.call(i,o,t,n)}}),u.extend(m.exports);const p=()=>{},f=class{constructor(t){var r;e(this,t),this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((r=this.userAgent).toLowerCase().match(/android/i)||r.toLowerCase().match(/blackberry|bb/i)||r.toLowerCase().match(/iphone|ipad|ipod/i)||r.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.errorCodes=["21123","21122","21121"],this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.endpoint=void 0,this.type=void 0,this.channel=void 0,this.language=void 0,this.productType="",this.userId=void 0,this.session=void 0,this.successUrl=void 0,this.cancelUrl=void 0,this.failUrl=void 0,this.sportsUrl=void 0,this.casinoUrl=void 0,this.contactUrl=void 0,this.depositUrl=void 0,this.currency="",this.showBonusSelectionInput="true",this.isShortCashier=!1,this.homeUrl=void 0,this.beforeRedirect=p,this.dynamicHeight=void 0,this.cashierInfoUrl=void 0}get typeParameter(){return"deposit"===this.type?"Deposit":"withdraw"===this.type?"Withdraw":void 0}handleClientStylingChange(e,t){e!=t&&a(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){if(await this.loadWidget(),this.translationUrl)return e=this.translationUrl,new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let r in e[t])i[t][r]=e[t][r]})),t(!0)}))}));var e}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(e,t){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{r.innerHTML=t,e&&e.appendChild(r)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))),window.addEventListener("message",this.bindedHandler,!1)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return t(r,{key:"4c6783c9cccc65e31901eb8755729147da7c3771"},t("div",{key:"cceae92ea2c7fb63f2de79e0d8748b7847c67842",ref:e=>this.stylingContainer=e,class:""},t("div",{key:"5171e7159682058314022e47d93d4d20b377d7e1",class:"DepositWithdrawalWrapper "+(this.isShortCashier?"ShortCashier":"")},!(this.isMobile&&!this.isShortCashier)&&t("h2",{key:"9d517ae70d3f6a654ffaff66d86d19c4259fa679",class:"CategoryTitle"},o("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language)),t("div",{key:"97c991c8a18e44e50307a9bd3de11f446783a630",style:{marginTop:this.isShortCashier?"30px":"0"}},this.isMobile&&!this.isShortCashier?t("div",{class:"MenuReturnButton",onClick:this.toggleScreen},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},t("defs",null),t("g",{transform:"translate(-20 -158)"},t("g",{transform:"translate(20 158)"},t("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)"})))),t("h2",{class:"CategoryTitleMobile"},o("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))):null),this.cashierInfoUrl?t("iframe",{width:"100%",allow:"payment",height:this.dynamicHeight,src:this.cashierInfoUrl}):t("h3",{innerHTML:o("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language),class:"ErrorMessage"}))))}async loadWidget(){const e={Channel:this.channel,Type:this.typeParameter,SuccessUrl:this.successUrl,CancelUrl:this.cancelUrl,FailUrl:this.failUrl,Language:this.language,productType:this.productType,isShortCashier:this.isShortCashier,currency:this.currency,showBonusSelectionInput:this.showBonusSelectionInput};if(!Object.values(e).some((e=>void 0===e))&&this.endpoint)try{const t=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,r=await fetch(t,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json","X-Client-Request-Timestamp":u.utc().format("YYYY-MM-DD HH:mm:ss.SSS")},body:JSON.stringify(e)});if(!r.ok){const e=await r.text();throw new Error(e)}const n=await r.json();if(n.CashierInfo)this.cashierInfoUrl=n.CashierInfo.Url;else{let e;if(n.ResponseMessage){let t=this.errorCodes.find((e=>n.ResponseMessage.includes(e)))||null;e=o(t?`errorCode${t}`:"notFoundErrorCode",this.language)}else e=o("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language);window.postMessage({type:"DenyDepositOrWithdrawal",data:{type:"error",message:e}},window.location.href)}}catch(e){console.error(e)}}handleMessage(e){var t,r,n,i,o,a,s,d;"true"===e.data["MMFE:openFullCashier"]&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),e.data["MMFE:setQuickDepositHeight"]&&this.isShortCashier&&(this.dynamicHeight=e.data["MMFE:setQuickDepositHeight"].toString()+"px"),e.data["MMFE:setIFrameHeight"]&&(this.dynamicHeight=e.data["MMFE:setIFrameHeight"].toString()+"px"),"mm-hcback-to-merchant"===(null===(t=e.data)||void 0===t?void 0:t.type)&&this.doRedirect(e.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(r=e.data)||void 0===r?void 0:r.redirect)&&this.doRedirect(e.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(n=e.data)||void 0===n?void 0:n.redirect)&&this.doRedirect(null===(i=e.data)||void 0===i?void 0:i.redirect,this.sportsUrl),"mm-hc-casino"===(null===(o=e.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(a=e.data)||void 0===a?void 0:a.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.contactUrl)),"mm-wm-hc-init-deposit"!==(null===(s=e.data)||void 0===s?void 0:s.redirect)&&"mm-wm-hc-init-deposit-quick"!==(null===(d=e.data)||void 0===d?void 0:d.redirect)||(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.depositUrl))}doRedirect(e,t){const r={reason:e,url:t,cancel:!1};this.beforeRedirect(r),r.cancel||(window.location.href=r.url?r.url:"/")}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};f.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n container-type: inline-size;\n}\n\n.DepositWithdrawalContainer {\n container-type: inline-size;\n container-name: deposit-container;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emw--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(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n\n.ErrorMessage {\n color: var(--emw--pam-color-typography, var(--emw--color-typography, #FFFFFF));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n margin: 0;\n padding: 50px;\n box-sizing: border-box;\n overflow-y: scroll;\n}\n.DepositWithdrawalWrapper iframe {\n border-width: 0;\n}\n\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: var(--emw--color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-align: center;\n color: var(--emw--color-black, #000000);\n}\n\n@container (max-width: 768px) {\n .DepositWithdrawalWrapper {\n padding: 20px 15px;\n }\n .DepositWithdrawalWrapper:not(.ShortCashier) {\n overflow: visible;\n }\n}";export{f as user_deposit_withdrawal}
1
+ import{r as e,h as t,H as r}from"./index-1ef3a64c.js";const n=["ro","en","fr","hr","en-us","es-mx","pt-br","es","de","pt","tr"],i={en:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Please be informed that currently you are not allowed to initiate deposit transactions.",denyWithdrawal:"Please be informed that currently you are not allowed to initiate withdrawal transactions.",notFoundErrorCode:"Not found error code",errorCode21121:"Dear Player! Please be informed that currently you are allowed to initiate only withdrawal transactions from your player account. Error Code: 21121",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},"en-us":{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Please be informed that currently you are not allowed to initiate deposit transactions.",denyWithdrawal:"Please be informed that currently you are not allowed to initiate withdrawal transactions.",notFoundErrorCode:"Not found error code",errorCode21121:"Dear Player! Please be informed that currently you are allowed to initiate only withdrawal transactions from your player account. Error Code: 21121",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},ro:{Deposit:"Depunere",Withdraw:"Retragere",denyDeposit:"Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de depunere.",denyWithdrawal:"Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de retragere.",notFoundErrorCode:"Cod de eroare negăsit",errorCode21122:"Stimate jucător! Vă informăm că în prezent nu aveți permisiunea de a iniția o tranzacție de retragere din contul dvs. de jucător. Cod de eroare: 21122",errorCode21123:"Stimate jucător! Vă informăm că în prezent nu aveți permisiunea de a efectua o depunere în contul dvs. de jucător. Cod de eroare: 21123"},fr:{Deposit:"Dépôt",Withdraw:"Retrait",denyDeposit:"Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier des transactions de dépôt.",denyWithdrawal:"Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier des transactions de retrait.",notFoundErrorCode:"Code d’erreur introuvable",errorCode21122:"Cher joueur ! Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier une transaction de retrait depuis votre compte joueur. Code d’erreur : 21122",errorCode21123:"Cher joueur ! Veuillez noter qu’actuellement vous n’êtes pas autorisé à effectuer un dépôt sur votre compte joueur. Code d’erreur : 21123"},hr:{Deposit:"Uplata",Withdraw:"Isplata",denyDeposit:"Obavještavamo Vas da trenutno nemate mogućnost uplata.",denyWithdrawal:"Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.",notFoundErrorCode:"Not found error code",errorCode21122:"Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122",errorCode21123:"Poštovani, trenutno nije moguće izvršiti uplatu na Vaš račun. Error Code:21123"},de:{Deposit:"Einzahlung",Withdraw:"Abhebung",denyDeposit:"Bitte beachten Sie, dass Sie derzeit keine Einzahlungs-Transaktionen durchführen dürfen.",denyWithdrawal:"Bitte beachten Sie, dass Sie derzeit keine Abhebungs-Transaktionen durchführen dürfen.",notFoundErrorCode:"Fehlercode nicht gefunden",errorCode21122:"Sehr geehrter Spieler! Bitte beachten Sie, dass Sie derzeit keine Abhebung von Ihrem Spielerkonto durchführen dürfen. Fehlercode: 21122",errorCode21123:"Sehr geehrter Spieler! Bitte beachten Sie, dass Sie derzeit keine Einzahlung auf Ihr Spielerkonto durchführen dürfen. Fehlercode: 21123"},es:{Deposit:"Depósito",Withdraw:"Retiro",denyDeposit:"Le informamos que actualmente no tiene permitido iniciar transacciones de depósito.",denyWithdrawal:"Le informamos que actualmente no tiene permitido iniciar transacciones de retiro.",notFoundErrorCode:"Código de error no encontrado",errorCode21122:"¡Estimado jugador! Le informamos que actualmente no tiene permitido iniciar una transacción de retiro desde su cuenta de jugador. Código de error: 21122",errorCode21123:"¡Estimado jugador! Le informamos que actualmente no tiene permitido realizar un depósito en su cuenta de jugador. Código de error: 21123"},pt:{Deposit:"Depósito",Withdraw:"Levantamento",denyDeposit:"Informamos que atualmente não tem permissão para iniciar transações de depósito.",denyWithdrawal:"Informamos que atualmente não tem permissão para iniciar transações de levantamento.",notFoundErrorCode:"Código de erro não encontrado",errorCode21122:"Caro jogador! Informamos que atualmente não tem permissão para iniciar uma transação de levantamento na sua conta de jogador. Código de erro: 21122",errorCode21123:"Caro jogador! Informamos que atualmente não tem permissão para realizar um depósito na sua conta de jogador. Código de erro: 21123"},"es-mx":{Deposit:"Depósito",Withdraw:"Retiro",denyDeposit:"Le informamos que actualmente no tiene permitido iniciar transacciones de depósito.",denyWithdrawal:"Le informamos que actualmente no tiene permitido iniciar transacciones de retiro.",notFoundErrorCode:"Código de error no encontrado",errorCode21122:"¡Estimado jugador! Le informamos que actualmente no tiene permitido iniciar una transacción de retiro desde su cuenta de jugador. Código de error: 21122",errorCode21123:"¡Estimado jugador! Le informamos que actualmente no tiene permitido realizar un depósito en su cuenta de jugador. Código de error: 21123"},"pt-br":{Deposit:"Depósito",Withdraw:"Saque",denyDeposit:"Informamos que atualmente você não tem permissão para iniciar transações de depósito.",denyWithdrawal:"Informamos que atualmente você não tem permissão para iniciar transações de saque.",notFoundErrorCode:"Código de erro não encontrado",errorCode21122:"Caro jogador! Informamos que atualmente você não tem permissão para iniciar uma transação de saque em sua conta de jogador. Código de erro: 21122",errorCode21123:"Caro jogador! Informamos que atualmente você não tem permissão para realizar um depósito em sua conta de jogador. Código de erro: 21123"},tr:{Deposit:"Para Yatırma",Withdraw:"Para Çekme",denyDeposit:"Lütfen şu anda para yatırma işlemi başlatamayacağınızı bilgilerinize sunarız.",denyWithdrawal:"Lütfen şu anda para çekme işlemi başlatamayacağınızı bilgilerinize sunarız.",notFoundErrorCode:"Hata kodu bulunamadı",errorCode21122:"Değerli oyuncumuz! Lütfen şu anda oyuncu hesabınızdan para çekme işlemi başlatamayacağınızı bilgilerinize sunarız. Hata Kodu: 21122",errorCode21123:"Değerli oyuncumuz! Lütfen şu anda oyuncu hesabınıza para yatırma işlemi yapamayacağınızı bilgilerinize sunarız. Hata Kodu: 21123"}},a=(e,t)=>{const r=t;return i[void 0!==r&&n.includes(r)?r:"en"][e]};function o(e,t){if(e){const r=document.createElement("style");r.innerHTML=t,e.appendChild(r)}}function s(e,t){const r=new URL(t);fetch(r.href).then((e=>e.text())).then((t=>{const r=document.createElement("style");r.innerHTML=t,e&&e.appendChild(r)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var d={exports:{}};d.exports=function(){var e=6e4,t=36e5,r="millisecond",n="second",i="minute",a="hour",o="day",s="week",d="month",u="quarter",h="year",c="date",l="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},w=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:w,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+w(n,2,"0")+":"+w(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,d),a=r-i<0,o=t.clone().add(n+(a?-1:1),d);return+(-(n+(r-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:d,y:h,w:s,d:o,D:c,h:a,m:i,s:n,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",g={};g[v]=f;var C="$isDayjsObject",b=function(e){return e instanceof W||!(!e||!e[C])},D=function e(t,r,n){var i;if(!t)return v;if("string"==typeof t){var a=t.toLowerCase();g[a]&&(i=a),r&&(g[a]=r,i=a);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var s=t.name;g[s]=t,i=s}return!n&&i&&(v=i),i||!n&&v},S=function(e,t){if(b(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new W(r)},M=y;M.l=D,M.i=b,M.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var W=function(){function f(e){this.$L=D(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[C]=!0}var w=f.prototype;return w.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(t)}(e),this.init()},w.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},w.$utils=function(){return M},w.isValid=function(){return!(this.$d.toString()===l)},w.isSame=function(e,t){var r=S(e);return this.startOf(t)<=r&&r<=this.endOf(t)},w.isAfter=function(e,t){return S(e)<this.startOf(t)},w.isBefore=function(e,t){return this.endOf(t)<S(e)},w.$g=function(e,t,r){return M.u(e)?this[t]:this.set(r,e)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(e,t){var r=this,u=!!M.u(t)||t,l=M.p(e),m=function(e,t){var n=M.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return u?n:n.endOf(o)},p=function(e,t){return M.w(r.toDate()[e].apply(r.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},f=this.$W,w=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(l){case h:return u?m(1,0):m(31,11);case d:return u?m(1,w):m(0,w+1);case s:var g=this.$locale().weekStart||0,C=(f<g?f+7:f)-g;return m(u?y-C:y+(6-C),w);case o:case c:return p(v+"Hours",0);case a:return p(v+"Minutes",1);case i:return p(v+"Seconds",2);case n:return p(v+"Milliseconds",3);default:return this.clone()}},w.endOf=function(e){return this.startOf(e,!1)},w.$set=function(e,t){var s,u=M.p(e),l="set"+(this.$u?"UTC":""),m=(s={},s[o]=l+"Date",s[c]=l+"Date",s[d]=l+"Month",s[h]=l+"FullYear",s[a]=l+"Hours",s[i]=l+"Minutes",s[n]=l+"Seconds",s[r]=l+"Milliseconds",s)[u],p=u===o?this.$D+(t-this.$W):t;if(u===d||u===h){var f=this.clone().set(c,1);f.$d[m](p),f.init(),this.$d=f.set(c,Math.min(this.$D,f.daysInMonth())).$d}else m&&this.$d[m](p);return this.init(),this},w.set=function(e,t){return this.clone().$set(e,t)},w.get=function(e){return this[M.p(e)]()},w.add=function(r,u){var c,l=this;r=Number(r);var m=M.p(u),p=function(e){var t=S(l);return M.w(t.date(t.date()+Math.round(e*r)),l)};if(m===d)return this.set(d,this.$M+r);if(m===h)return this.set(h,this.$y+r);if(m===o)return p(1);if(m===s)return p(7);var f=(c={},c[i]=e,c[a]=t,c[n]=1e3,c)[m]||1,w=this.$d.getTime()+r*f;return M.w(w,this)},w.subtract=function(e,t){return this.add(-1*e,t)},w.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=M.z(this),a=this.$H,o=this.$m,s=this.$M,d=r.weekdays,u=r.months,h=function(e,r,i,a){return e&&(e[r]||e(t,n))||i[r].slice(0,a)},c=function(e){return M.s(a%12||12,e,"0")},m=r.meridiem||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(p,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return s+1;case"MM":return M.s(s+1,2,"0");case"MMM":return h(r.monthsShort,s,u,3);case"MMMM":return h(u,s);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,d,2);case"ddd":return h(r.weekdaysShort,t.$W,d,3);case"dddd":return d[t.$W];case"H":return String(a);case"HH":return M.s(a,2,"0");case"h":return c(1);case"hh":return c(2);case"a":return m(a,o,!0);case"A":return m(a,o,!1);case"m":return String(o);case"mm":return M.s(o,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(r,c,l){var m,p=this,f=M.p(c),w=S(r),y=(w.utcOffset()-this.utcOffset())*e,v=this-w,g=function(){return M.m(p,w)};switch(f){case h:m=g()/12;break;case d:m=g();break;case u:m=g()/3;break;case s:m=(v-y)/6048e5;break;case o:m=(v-y)/864e5;break;case a:m=v/t;break;case i:m=v/e;break;case n:m=v/1e3;break;default:m=v}return l?m:M.a(m)},w.daysInMonth=function(){return this.endOf(d).$D},w.$locale=function(){return g[this.$L]},w.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=D(e,t,!0);return n&&(r.$L=n),r},w.clone=function(){return M.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},f}(),z=W.prototype;return S.prototype=z,[["$ms",r],["$s",n],["$m",i],["$H",a],["$W",o],["$M",d],["$y",h],["$D",c]].forEach((function(e){z[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,W,S),e.$i=!0),S},S.locale=D,S.isDayjs=b,S.unix=function(e){return S(1e3*e)},S.en=g[v],S.Ls=g,S.p={},S}();const u=d.exports;var h,c,l,m={exports:{}};m.exports=(h="minute",c=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g,function(e,t,r){var n=t.prototype;r.utc=function(e){return new t({date:e,utc:!0,args:arguments})},n.utc=function(e){var t=r(this.toDate(),{locale:this.$L,utc:!0});return e?t.add(this.utcOffset(),h):t},n.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var i=n.parse;n.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),i.call(this,e)};var a=n.init;n.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else a.call(this)};var o=n.utcOffset;n.utcOffset=function(e,t){var r=this.$utils().u;if(r(e))return this.$u?0:r(this.$offset)?o.call(this):this.$offset;if("string"==typeof e&&(e=function(e){void 0===e&&(e="");var t=e.match(c);if(!t)return null;var r=(""+t[0]).match(l)||["-",0,0],n=60*+r[1]+ +r[2];return 0===n?0:"+"===r[0]?n:-n}(e),null===e))return this;var n=Math.abs(e)<=16?60*e:e,i=this;if(t)return i.$offset=n,i.$u=0===e,i;if(0!==e){var a=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(i=this.local().add(n+a,h)).$offset=n,i.$x.$localOffset=a}else i=this.utc();return i};var s=n.format;n.format=function(e){return s.call(this,e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":""))},n.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var d=n.toDate;n.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var u=n.diff;n.diff=function(e,t,n){if(e&&this.$u===e.$u)return u.call(this,e,t,n);var i=this.local(),a=r(e).local();return u.call(i,a,t,n)}}),u.extend(m.exports);const p=["mm-hcback-to-merchant","mm-hc-back-tomerchant","mm-hc-sports","mm-hc-casino","mm-hc-contact","mm-wm-hc-init-deposit","mm-wm-hc-init-deposit-quick"],f=()=>{},w=class{constructor(t){var r;e(this,t),this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((r=this.userAgent).toLowerCase().match(/android/i)||r.toLowerCase().match(/blackberry|bb/i)||r.toLowerCase().match(/iphone|ipad|ipod/i)||r.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.errorCodes=["21123","21122","21121"],this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.endpoint=void 0,this.type=void 0,this.channel=void 0,this.language=void 0,this.productType="",this.userId=void 0,this.session=void 0,this.successUrl=void 0,this.cancelUrl=void 0,this.failUrl=void 0,this.sportsUrl=void 0,this.casinoUrl=void 0,this.contactUrl=void 0,this.depositUrl=void 0,this.currency="",this.showBonusSelectionInput="true",this.isShortCashier=!1,this.homeUrl=void 0,this.beforeRedirect=f,this.forwardCashierRedirects=!1,this.dynamicHeight=void 0,this.cashierInfoUrl=void 0}get typeParameter(){return"deposit"===this.type?"Deposit":"withdraw"===this.type?"Withdraw":void 0}handleClientStylingChange(e,t){e!=t&&o(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){if(await this.loadWidget(),this.translationUrl)return e=this.translationUrl,new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let r in e[t])i[t][r]=e[t][r]})),t(!0)}))}));var e}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(e,t){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{r.innerHTML=t,e&&e.appendChild(r)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))),window.addEventListener("message",this.bindedHandler,!1)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return t(r,{key:"46153b61097691f3a3b2da29aa260edf0688f01c"},t("div",{key:"0082deaaf9c6348cff4010ec8b1f58e5ea26e99b",ref:e=>this.stylingContainer=e,class:""},t("div",{key:"8aec364ea2134d01c2b29fc75136cad08fd5d965",class:"DepositWithdrawalWrapper "+(this.isShortCashier?"ShortCashier":"")},!(this.isMobile&&!this.isShortCashier)&&t("h2",{key:"4b0184e2354199332c8438b4430c047982364dff",class:"CategoryTitle"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language)),t("div",{key:"49c9dbda82eb6576bc11375371f4359ba0b0285d",style:{marginTop:this.isShortCashier?"30px":"0"}},this.isMobile&&!this.isShortCashier?t("div",{class:"MenuReturnButton",onClick:this.toggleScreen},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},t("defs",null),t("g",{transform:"translate(-20 -158)"},t("g",{transform:"translate(20 158)"},t("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)"})))),t("h2",{class:"CategoryTitleMobile"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))):null),this.cashierInfoUrl?t("iframe",{width:"100%",allow:"payment",height:this.dynamicHeight,src:this.cashierInfoUrl}):t("h3",{innerHTML:a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language),class:"ErrorMessage"}))))}async loadWidget(){const e={Channel:this.channel,Type:this.typeParameter,SuccessUrl:this.successUrl,CancelUrl:this.cancelUrl,FailUrl:this.failUrl,Language:this.language,productType:this.productType,isShortCashier:this.isShortCashier,currency:this.currency,showBonusSelectionInput:this.showBonusSelectionInput};if(!Object.values(e).some((e=>void 0===e))&&this.endpoint)try{const t=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,r=await fetch(t,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json","X-Client-Request-Timestamp":u.utc().format("YYYY-MM-DD HH:mm:ss.SSS")},body:JSON.stringify(e)});if(!r.ok){const e=await r.text();throw new Error(e)}const n=await r.json();if(n.CashierInfo)this.cashierInfoUrl=n.CashierInfo.Url;else{let e;if(n.ResponseMessage){let t=this.errorCodes.find((e=>n.ResponseMessage.includes(e)))||null;e=a(t?`errorCode${t}`:"notFoundErrorCode",this.language)}else e=a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language);window.postMessage({type:"DenyDepositOrWithdrawal",data:{type:"error",message:e}},window.location.href)}}catch(e){console.error(e)}}handleMessage(e){const t=this.extractPayload(e);if(!t)return;this.applyLayoutHints(t);const r=this.extractCashierRedirectReason(t);if(!r)return;if(this.emitForwardedRedirect(e,r))return;const n=this.resolveRedirectPlan(r);n&&this.doRedirect(n.reason,n.targetUrl)}extractCashierRedirectReason(e){return"string"==typeof(null==e?void 0:e.type)&&p.includes(e.type)?e.type:"string"==typeof(null==e?void 0:e.redirect)&&p.includes(e.redirect)?e.redirect:void 0}extractPayload(e){if((null==e?void 0:e.data)&&"object"==typeof e.data)return e.data}applyLayoutHints(e){"true"===e["MMFE:openFullCashier"]&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),e["MMFE:setQuickDepositHeight"]&&this.isShortCashier&&(this.dynamicHeight=e["MMFE:setQuickDepositHeight"].toString()+"px"),e["MMFE:setIFrameHeight"]&&(this.dynamicHeight=e["MMFE:setIFrameHeight"].toString()+"px")}resolveRedirectPlan(e){switch(e){case"mm-hcback-to-merchant":case"mm-hc-back-tomerchant":return this.buildRedirectPlan(e,this.homeUrl);case"mm-hc-sports":return this.buildRedirectPlan(e,this.sportsUrl);case"mm-hc-casino":return this.buildRedirectPlan(window.location.href,this.casinoUrl);case"mm-hc-contact":return window.postMessage({type:"CloseShortCashier"},window.location.href),this.buildRedirectPlan(window.location.href,this.contactUrl);case"mm-wm-hc-init-deposit":case"mm-wm-hc-init-deposit-quick":return window.postMessage({type:"CloseShortCashier"},window.location.href),this.buildRedirectPlan(window.location.href,this.depositUrl);default:return}}buildRedirectPlan(e,t){if(t)return{reason:e,targetUrl:t}}emitForwardedRedirect(e,t){return!!this.forwardCashierRedirects&&(window.postMessage({type:`user-deposit-withdrawal:${t}`,originalType:t,payload:e.data,origin:e.origin},window.location.href),!0)}doRedirect(e,t){const r={reason:e,url:t,cancel:!1};this.beforeRedirect(r),r.cancel||(window.location.href=r.url?r.url:"/")}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};w.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n container-type: inline-size;\n}\n\n.DepositWithdrawalContainer {\n container-type: inline-size;\n container-name: deposit-container;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emw--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(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n\n.ErrorMessage {\n color: var(--emw--pam-color-typography, var(--emw--color-typography, #FFFFFF));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n margin: 0;\n padding: 50px;\n box-sizing: border-box;\n overflow-y: scroll;\n}\n.DepositWithdrawalWrapper iframe {\n border-width: 0;\n}\n\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: var(--emw--color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-align: center;\n color: var(--emw--color-black, #000000);\n}\n\n@container (max-width: 768px) {\n .DepositWithdrawalWrapper {\n padding: 20px 15px;\n }\n .DepositWithdrawalWrapper:not(.ShortCashier) {\n overflow: visible;\n }\n}";export{w as user_deposit_withdrawal}
@@ -1 +1 @@
1
- import{p as e,b as l}from"./index-1ef3a64c.js";export{s as setNonce}from"./index-1ef3a64c.js";import{g as r}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,r={};return""!==l&&(r.resourcesUrl=new URL(".",l).href),e(r)})().then((async e=>(await r(),l([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-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"],currency:[513],showBonusSelectionInput:[513,"show-bonus-selection-input"],isShortCashier:[516,"is-short-cashier"],homeUrl:[513,"home-url"],beforeRedirect:[16],dynamicHeight:[32],cashierInfoUrl:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],e))));
1
+ import{p as e,b as r}from"./index-1ef3a64c.js";export{s as setNonce}from"./index-1ef3a64c.js";import{g as l}from"./app-globals-0f993ce5.js";(()=>{const r=import.meta.url,l={};return""!==r&&(l.resourcesUrl=new URL(".",r).href),e(l)})().then((async e=>(await l(),r([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-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"],currency:[513],showBonusSelectionInput:[513,"show-bonus-selection-input"],isShortCashier:[516,"is-short-cashier"],homeUrl:[513,"home-url"],beforeRedirect:[16],forwardCashierRedirects:[516,"forward-cashier-redirects"],dynamicHeight:[32],cashierInfoUrl:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-deposit-withdrawal",
3
- "version": "1.83.6",
3
+ "version": "1.83.8",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",