@everymatrix/user-deposit-withdrawal 1.41.0 → 1.43.0

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.
@@ -37,7 +37,7 @@ const TRANSLATIONS = {
37
37
  hr: {
38
38
  Deposit: 'Uplata',
39
39
  Withdraw: 'Isplata',
40
- denyDeposit: 'Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija uplata.',
40
+ denyDeposit: 'Obavještavamo Vas da trenutno nemate mogućnost uplata.',
41
41
  denyWithdrawal: 'Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.',
42
42
  notFoundErrorCode: 'Not found error code',
43
43
  errorCode21122: 'Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122',
@@ -62,7 +62,7 @@ const isMobile = (userAgent) => {
62
62
  userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
63
63
  };
64
64
 
65
- const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-transform: capitalize;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";
65
+ const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";
66
66
 
67
67
  const emptyFunction = () => { };
68
68
  const UserDepositWithdrawal = class {
@@ -54,7 +54,6 @@
54
54
  margin: auto;
55
55
  width: 90%;
56
56
  margin-top: 70px;
57
- text-transform: capitalize;
58
57
  text-align: center;
59
58
  color: var(--emfe-w-color-black, #000000);
60
59
  }
@@ -31,7 +31,7 @@ const TRANSLATIONS = {
31
31
  hr: {
32
32
  Deposit: 'Uplata',
33
33
  Withdraw: 'Isplata',
34
- denyDeposit: 'Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija uplata.',
34
+ denyDeposit: 'Obavještavamo Vas da trenutno nemate mogućnost uplata.',
35
35
  denyWithdrawal: 'Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.',
36
36
  notFoundErrorCode: 'Not found error code',
37
37
  errorCode21122: 'Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122',
@@ -33,7 +33,7 @@ const TRANSLATIONS = {
33
33
  hr: {
34
34
  Deposit: 'Uplata',
35
35
  Withdraw: 'Isplata',
36
- denyDeposit: 'Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija uplata.',
36
+ denyDeposit: 'Obavještavamo Vas da trenutno nemate mogućnost uplata.',
37
37
  denyWithdrawal: 'Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.',
38
38
  notFoundErrorCode: 'Not found error code',
39
39
  errorCode21122: 'Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122',
@@ -58,7 +58,7 @@ const isMobile = (userAgent) => {
58
58
  userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
59
59
  };
60
60
 
61
- const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-transform: capitalize;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";
61
+ const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";
62
62
 
63
63
  const emptyFunction = () => { };
64
64
  const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
@@ -33,7 +33,7 @@ const TRANSLATIONS = {
33
33
  hr: {
34
34
  Deposit: 'Uplata',
35
35
  Withdraw: 'Isplata',
36
- denyDeposit: 'Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija uplata.',
36
+ denyDeposit: 'Obavještavamo Vas da trenutno nemate mogućnost uplata.',
37
37
  denyWithdrawal: 'Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.',
38
38
  notFoundErrorCode: 'Not found error code',
39
39
  errorCode21122: 'Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122',
@@ -58,7 +58,7 @@ const isMobile = (userAgent) => {
58
58
  userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
59
59
  };
60
60
 
61
- const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-transform: capitalize;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";
61
+ const userDepositWithdrawalCss = ":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";
62
62
 
63
63
  const emptyFunction = () => { };
64
64
  const UserDepositWithdrawal = class {
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as o}from"./p-4c4319e6.js";const r=["ro","en","fr","hr"],i={en:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Please be informed that currently you are not allowed to initiate depost transactions.",denyWithdrawal:"Please be informed that currently you are not allowed to initiate withdrawal transactions.",notFoundErrorCode:"Not found error code",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:"Depozit",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:"Not found error code",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"},fr:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de dépôt.",denyWithdrawal:"Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de retrait.",notFoundErrorCode:"Not found error code",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"},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"}},a=(t,e)=>{const o=e;return i[void 0!==o&&r.includes(o)?o:"en"][t]},n=()=>{},s=class{constructor(e){var o;t(this,e),this.clientStyling="",this.clientStylingUrl="",this.currency="",this.showBonusSelectionInput="true",this.isShortCashier=!1,this.beforeRedirect=n,this.limitStylingAppends=!1,this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((o=this.userAgent).toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.errorCodes=["21123","21122"],this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),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 e(o,null,e("div",{ref:t=>this.stylingContainer=t},e("div",{class:"DepositWithdrawalWrapper "+(this.isShortCashier?"ShortCashier":""),style:{height:this.dynamicHeight,marginTop:this.isShortCashier?"30px":"0"}},e("div",null,this.isMobile&&!this.isShortCashier?e("div",{class:"MenuReturnButton",onClick:()=>this.toggleScreen(this.isMobile)},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},e("defs",null),e("g",{transform:"translate(-20 -158)"},e("g",{transform:"translate(20 158)"},e("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)"})))),e("h2",{class:"CategoryTitleMobile"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))):e("h2",{class:"CategoryTitle"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))),this.cashierInfoUrl?e("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}):e("h3",{class:"ErrorMessage"},a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language)))))}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,currency:this.currency,showBonusSelectionInput:this.showBonusSelectionInput};try{const e=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,o=await fetch(e,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){const t=await o.text();throw new Error(t)}const r=await o.json();if(r.CashierInfo)this.cashierInfoUrl=r.CashierInfo.Url;else{let t;if(r.ResponseMessage){let e=this.errorCodes.find((t=>r.ResponseMessage.includes(t)))||null;t=a(e?`errorCode${e}`:"notFoundErrorCode",this.language)}else t=a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language);window.postMessage({type:"DenyDepositOrWithdrawal",data:{type:"error",message:t}},window.location.href)}}catch(t){console.error(t)}}handleMessage(t){var e,o,r,i,a,n,s,d;"true"===t.data["MMFE:openFullCashier"]&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),t.data["MMFE:setQuickDepositHeight"]&&this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setQuickDepositHeight"].toString()+"px"),t.data["MMFE:setIFrameHeight"]&&this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setIFrameHeight"].toString()+"px"),"mm-hcback-to-merchant"===(null===(e=t.data)||void 0===e?void 0:e.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(o=t.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(r=t.data)||void 0===r?void 0:r.redirect)&&this.doRedirect(null===(i=t.data)||void 0===i?void 0:i.redirect,this.sportsUrl),"mm-hc-casino"===(null===(a=t.data)||void 0===a?void 0:a.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.contactUrl)),"mm-wm-hc-init-deposit"!==(null===(s=t.data)||void 0===s?void 0:s.redirect)&&"mm-wm-hc-init-deposit-quick"!==(null===(d=t.data)||void 0===d?void 0:d.redirect)||(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.depositUrl))}doRedirect(t,e){const o={reason:t,url:e,cancel:!1};this.beforeRedirect(o),o.cancel||(window.location.href=o.url?o.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"],isShortCashier:["watchLoadWidget"],currency:["watchLoadWidget"],showBonusSelectionInput:["watchLoadWidget"]}}};s.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";export{s as user_deposit_withdrawal}
@@ -1 +1 @@
1
- import{p as r,b as e}from"./p-4c4319e6.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),r(s)})().then((r=>e([["p-f508a46a",[[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"],currency:[513],showBonusSelectionInput:[513,"show-bonus-selection-input"],isShortCashier:[516,"is-short-cashier"],homeUrl:[513,"home-url"],beforeRedirect:[16],limitStylingAppends:[32],dynamicHeight:[32],cashierInfoUrl:[32]}]]]],r)));
1
+ import{p as r,b as e}from"./p-4c4319e6.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),r(s)})().then((r=>e([["p-3bb8d4a8",[[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"],currency:[513],showBonusSelectionInput:[513,"show-bonus-selection-input"],isShortCashier:[516,"is-short-cashier"],homeUrl:[513,"home-url"],beforeRedirect:[16],limitStylingAppends:[32],dynamicHeight:[32],cashierInfoUrl:[32]}]]]],r)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-deposit-withdrawal",
3
- "version": "1.41.0",
3
+ "version": "1.43.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as o}from"./p-4c4319e6.js";const r=["ro","en","fr","hr"],i={en:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Please be informed that currently you are not allowed to initiate depost transactions.",denyWithdrawal:"Please be informed that currently you are not allowed to initiate withdrawal transactions.",notFoundErrorCode:"Not found error code",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:"Depozit",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:"Not found error code",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"},fr:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de dépôt.",denyWithdrawal:"Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de retrait.",notFoundErrorCode:"Not found error code",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"},hr:{Deposit:"Uplata",Withdraw:"Isplata",denyDeposit:"Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija 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"}},a=(t,e)=>{const o=e;return i[void 0!==o&&r.includes(o)?o:"en"][t]},n=()=>{},s=class{constructor(e){var o;t(this,e),this.clientStyling="",this.clientStylingUrl="",this.currency="",this.showBonusSelectionInput="true",this.isShortCashier=!1,this.beforeRedirect=n,this.limitStylingAppends=!1,this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((o=this.userAgent).toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.errorCodes=["21123","21122"],this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),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 e(o,null,e("div",{ref:t=>this.stylingContainer=t},e("div",{class:"DepositWithdrawalWrapper "+(this.isShortCashier?"ShortCashier":""),style:{height:this.dynamicHeight,marginTop:this.isShortCashier?"30px":"0"}},e("div",null,this.isMobile&&!this.isShortCashier?e("div",{class:"MenuReturnButton",onClick:()=>this.toggleScreen(this.isMobile)},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},e("defs",null),e("g",{transform:"translate(-20 -158)"},e("g",{transform:"translate(20 158)"},e("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)"})))),e("h2",{class:"CategoryTitleMobile"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))):e("h2",{class:"CategoryTitle"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))),this.cashierInfoUrl?e("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}):e("h3",{class:"ErrorMessage"},a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language)))))}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,currency:this.currency,showBonusSelectionInput:this.showBonusSelectionInput};try{const e=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,o=await fetch(e,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){const t=await o.text();throw new Error(t)}const r=await o.json();if(r.CashierInfo)this.cashierInfoUrl=r.CashierInfo.Url;else{let t;if(r.ResponseMessage){let e=this.errorCodes.find((t=>r.ResponseMessage.includes(t)))||null;t=a(e?`errorCode${e}`:"notFoundErrorCode",this.language)}else t=a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language);window.postMessage({type:"DenyDepositOrWithdrawal",data:{type:"error",message:t}},window.location.href)}}catch(t){console.error(t)}}handleMessage(t){var e,o,r,i,a,n,s,d;"true"===t.data["MMFE:openFullCashier"]&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),t.data["MMFE:setQuickDepositHeight"]&&this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setQuickDepositHeight"].toString()+"px"),t.data["MMFE:setIFrameHeight"]&&this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setIFrameHeight"].toString()+"px"),"mm-hcback-to-merchant"===(null===(e=t.data)||void 0===e?void 0:e.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(o=t.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(r=t.data)||void 0===r?void 0:r.redirect)&&this.doRedirect(null===(i=t.data)||void 0===i?void 0:i.redirect,this.sportsUrl),"mm-hc-casino"===(null===(a=t.data)||void 0===a?void 0:a.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.contactUrl)),"mm-wm-hc-init-deposit"!==(null===(s=t.data)||void 0===s?void 0:s.redirect)&&"mm-wm-hc-init-deposit-quick"!==(null===(d=t.data)||void 0===d?void 0:d.redirect)||(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.depositUrl))}doRedirect(t,e){const o={reason:t,url:e,cancel:!1};this.beforeRedirect(o),o.cancel||(window.location.href=o.url?o.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"],isShortCashier:["watchLoadWidget"],currency:["watchLoadWidget"],showBonusSelectionInput:["watchLoadWidget"]}}};s.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-transform: capitalize;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";export{s as user_deposit_withdrawal}